65527 lines
2.1 MiB
65527 lines
2.1 MiB
// The Module object: Our interface to the outside world. We import
|
|
// and export values on it, and do the work to get that through
|
|
// closure compiler if necessary. 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 do an eval in order to handle the closure compiler
|
|
// case, where this code here is minified but Module was defined
|
|
// elsewhere (e.g. case 4 above). We also need to check if Module
|
|
// already exists (e.g. case 3 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;
|
|
if (!Module) Module = (typeof Module !== 'undefined' ? Module : null) || {};
|
|
|
|
// 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 = {};
|
|
for (var key in Module) {
|
|
if (Module.hasOwnProperty(key)) {
|
|
moduleOverrides[key] = Module[key];
|
|
}
|
|
}
|
|
|
|
// The environment setup code below is customized to use Module.
|
|
// *** Environment setup code ***
|
|
var ENVIRONMENT_IS_WEB = typeof window === 'object';
|
|
// 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)
|
|
var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function';
|
|
var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function' && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER;
|
|
var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
|
|
|
|
if (ENVIRONMENT_IS_NODE) {
|
|
// Expose functionality in the same simple way that the shells work
|
|
// Note that we pollute the global namespace here, otherwise we break in node
|
|
if (!Module['print']) Module['print'] = function print(x) {
|
|
process['stdout'].write(x + '\n');
|
|
};
|
|
if (!Module['printErr']) Module['printErr'] = function printErr(x) {
|
|
process['stderr'].write(x + '\n');
|
|
};
|
|
|
|
var nodeFS = require('fs');
|
|
var nodePath = require('path');
|
|
|
|
Module['read'] = function read(filename, binary) {
|
|
filename = nodePath['normalize'](filename);
|
|
var ret = nodeFS['readFileSync'](filename);
|
|
// The path is absolute if the normalized version is the same as the resolved.
|
|
if (!ret && filename != nodePath['resolve'](filename)) {
|
|
filename = path.join(__dirname, '..', 'src', filename);
|
|
ret = nodeFS['readFileSync'](filename);
|
|
}
|
|
if (ret && !binary) ret = ret.toString();
|
|
return ret;
|
|
};
|
|
|
|
Module['readBinary'] = function readBinary(filename) {
|
|
var ret = Module['read'](filename, true);
|
|
if (!ret.buffer) {
|
|
ret = new Uint8Array(ret);
|
|
}
|
|
assert(ret.buffer);
|
|
return ret;
|
|
};
|
|
|
|
Module['load'] = function load(f) {
|
|
globalEval(read(f));
|
|
};
|
|
|
|
if (!Module['thisProgram']) {
|
|
if (process['argv'].length > 1) {
|
|
Module['thisProgram'] = process['argv'][1].replace(/\\/g, '/');
|
|
} else {
|
|
Module['thisProgram'] = 'unknown-program';
|
|
}
|
|
}
|
|
|
|
Module['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;
|
|
}
|
|
});
|
|
|
|
Module['inspect'] = function () { return '[Emscripten Module object]'; };
|
|
}
|
|
else if (ENVIRONMENT_IS_SHELL) {
|
|
if (!Module['print']) Module['print'] = print;
|
|
if (typeof printErr != 'undefined') Module['printErr'] = printErr; // not present in v8 or older sm
|
|
|
|
if (typeof read != 'undefined') {
|
|
Module['read'] = read;
|
|
} else {
|
|
Module['read'] = function read() { throw 'no read() available (jsc?)' };
|
|
}
|
|
|
|
Module['readBinary'] = function readBinary(f) {
|
|
if (typeof readbuffer === 'function') {
|
|
return new Uint8Array(readbuffer(f));
|
|
}
|
|
var 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;
|
|
}
|
|
|
|
}
|
|
else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
|
|
Module['read'] = function read(url) {
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.open('GET', url, false);
|
|
xhr.send(null);
|
|
return xhr.responseText;
|
|
};
|
|
|
|
if (typeof arguments != 'undefined') {
|
|
Module['arguments'] = arguments;
|
|
}
|
|
|
|
if (typeof console !== 'undefined') {
|
|
if (!Module['print']) Module['print'] = function print(x) {
|
|
console.log(x);
|
|
};
|
|
if (!Module['printErr']) Module['printErr'] = function printErr(x) {
|
|
console.log(x);
|
|
};
|
|
} else {
|
|
// Probably a worker, and without console.log. We can do very little here...
|
|
var TRY_USE_DUMP = false;
|
|
if (!Module['print']) Module['print'] = (TRY_USE_DUMP && (typeof(dump) !== "undefined") ? (function(x) {
|
|
dump(x);
|
|
}) : (function(x) {
|
|
// self.postMessage(x); // enable this if you want stdout to be sent as messages
|
|
}));
|
|
}
|
|
|
|
if (ENVIRONMENT_IS_WORKER) {
|
|
Module['load'] = importScripts;
|
|
}
|
|
|
|
if (typeof Module['setWindowTitle'] === 'undefined') {
|
|
Module['setWindowTitle'] = function(title) { document.title = title };
|
|
}
|
|
}
|
|
else {
|
|
// Unreachable because SHELL is dependant on the others
|
|
throw 'Unknown runtime environment. Where are we?';
|
|
}
|
|
|
|
function globalEval(x) {
|
|
eval.call(null, x);
|
|
}
|
|
if (!Module['load'] && Module['read']) {
|
|
Module['load'] = function load(f) {
|
|
globalEval(Module['read'](f));
|
|
};
|
|
}
|
|
if (!Module['print']) {
|
|
Module['print'] = function(){};
|
|
}
|
|
if (!Module['printErr']) {
|
|
Module['printErr'] = Module['print'];
|
|
}
|
|
if (!Module['arguments']) {
|
|
Module['arguments'] = [];
|
|
}
|
|
if (!Module['thisProgram']) {
|
|
Module['thisProgram'] = './this.program';
|
|
}
|
|
|
|
// *** Environment setup code ***
|
|
|
|
// Closure helpers
|
|
Module.print = Module['print'];
|
|
Module.printErr = Module['printErr'];
|
|
|
|
// Callbacks
|
|
Module['preRun'] = [];
|
|
Module['postRun'] = [];
|
|
|
|
// Merge back in the overrides
|
|
for (var key in moduleOverrides) {
|
|
if (moduleOverrides.hasOwnProperty(key)) {
|
|
Module[key] = moduleOverrides[key];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// === 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
|
|
|
|
//========================================
|
|
// Runtime code shared with compiler
|
|
//========================================
|
|
|
|
var Runtime = {
|
|
setTempRet0: function (value) {
|
|
tempRet0 = value;
|
|
},
|
|
getTempRet0: function () {
|
|
return tempRet0;
|
|
},
|
|
stackSave: function () {
|
|
return STACKTOP;
|
|
},
|
|
stackRestore: function (stackTop) {
|
|
STACKTOP = stackTop;
|
|
},
|
|
getNativeTypeSize: function (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 Runtime.QUANTUM_SIZE; // A pointer
|
|
} else if (type[0] === 'i') {
|
|
var bits = parseInt(type.substr(1));
|
|
assert(bits % 8 === 0);
|
|
return bits/8;
|
|
} else {
|
|
return 0;
|
|
}
|
|
}
|
|
}
|
|
},
|
|
getNativeFieldSize: function (type) {
|
|
return Math.max(Runtime.getNativeTypeSize(type), Runtime.QUANTUM_SIZE);
|
|
},
|
|
STACK_ALIGN: 16,
|
|
prepVararg: function (ptr, type) {
|
|
if (type === 'double' || type === 'i64') {
|
|
// move so the load is aligned
|
|
if (ptr & 7) {
|
|
assert((ptr & 7) === 4);
|
|
ptr += 4;
|
|
}
|
|
} else {
|
|
assert((ptr & 3) === 0);
|
|
}
|
|
return ptr;
|
|
},
|
|
getAlignSize: function (type, size, vararg) {
|
|
// we align i64s and doubles on 64-bit boundaries, unlike x86
|
|
if (!vararg && (type == 'i64' || type == 'double')) return 8;
|
|
if (!type) return Math.min(size, 8); // align structures internally to 64 bits
|
|
return Math.min(size || (type ? Runtime.getNativeFieldSize(type) : 0), Runtime.QUANTUM_SIZE);
|
|
},
|
|
dynCall: function (sig, ptr, args) {
|
|
if (args && args.length) {
|
|
assert(args.length == sig.length-1);
|
|
if (!args.splice) args = Array.prototype.slice.call(args);
|
|
args.splice(0, 0, ptr);
|
|
assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\'');
|
|
return Module['dynCall_' + sig].apply(null, 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);
|
|
}
|
|
},
|
|
functionPointers: [],
|
|
addFunction: function (func) {
|
|
for (var i = 0; i < Runtime.functionPointers.length; i++) {
|
|
if (!Runtime.functionPointers[i]) {
|
|
Runtime.functionPointers[i] = func;
|
|
return 2*(1 + i);
|
|
}
|
|
}
|
|
throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.';
|
|
},
|
|
removeFunction: function (index) {
|
|
Runtime.functionPointers[(index-2)/2] = null;
|
|
},
|
|
warnOnce: function (text) {
|
|
if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {};
|
|
if (!Runtime.warnOnce.shown[text]) {
|
|
Runtime.warnOnce.shown[text] = 1;
|
|
Module.printErr(text);
|
|
}
|
|
},
|
|
funcWrappers: {},
|
|
getFuncWrapper: function (func, sig) {
|
|
assert(sig);
|
|
if (!Runtime.funcWrappers[sig]) {
|
|
Runtime.funcWrappers[sig] = {};
|
|
}
|
|
var sigCache = Runtime.funcWrappers[sig];
|
|
if (!sigCache[func]) {
|
|
sigCache[func] = function dynCall_wrapper() {
|
|
return Runtime.dynCall(sig, func, arguments);
|
|
};
|
|
}
|
|
return sigCache[func];
|
|
},
|
|
getCompilerSetting: function (name) {
|
|
throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work';
|
|
},
|
|
stackAlloc: function (size) { var ret = STACKTOP;STACKTOP = (STACKTOP + size)|0;STACKTOP = (((STACKTOP)+15)&-16);(assert((((STACKTOP|0) < (STACK_MAX|0))|0))|0); return ret; },
|
|
staticAlloc: function (size) { var ret = STATICTOP;STATICTOP = (STATICTOP + (assert(!staticSealed),size))|0;STATICTOP = (((STATICTOP)+15)&-16); return ret; },
|
|
dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + (assert(DYNAMICTOP > 0),size))|0;DYNAMICTOP = (((DYNAMICTOP)+15)&-16); if (DYNAMICTOP >= TOTAL_MEMORY) { var success = enlargeMemory(); if (!success) { DYNAMICTOP = ret; return 0; } }; return ret; },
|
|
alignMemory: function (size,quantum) { var ret = size = Math.ceil((size)/(quantum ? quantum : 16))*(quantum ? quantum : 16); return ret; },
|
|
makeBigInt: function (low,high,unsigned) { var ret = (unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0))); return ret; },
|
|
GLOBAL_BASE: 8,
|
|
QUANTUM_SIZE: 4,
|
|
__dummy__: 0
|
|
}
|
|
|
|
|
|
|
|
Module["Runtime"] = Runtime;
|
|
|
|
|
|
|
|
//========================================
|
|
// Runtime essentials
|
|
//========================================
|
|
|
|
var __THREW__ = 0; // Used in checking for thrown exceptions.
|
|
|
|
var ABORT = false; // whether we are quitting the application. no code should run after this. set in exit() and abort()
|
|
var EXITSTATUS = 0;
|
|
|
|
var undef = 0;
|
|
// tempInt is used for 32-bit signed values or smaller. tempBigInt is used
|
|
// for 32-bit unsigned values or more than 32 bits. TODO: audit all uses of tempInt
|
|
var tempValue, tempInt, tempBigInt, tempInt2, tempBigInt2, tempPair, tempBigIntI, tempBigIntR, tempBigIntS, tempBigIntP, tempBigIntD, tempDouble, tempFloat;
|
|
var tempI64, tempI64b;
|
|
var tempRet0, tempRet1, tempRet2, tempRet3, tempRet4, tempRet5, tempRet6, tempRet7, tempRet8, tempRet9;
|
|
|
|
function assert(condition, text) {
|
|
if (!condition) {
|
|
abort('Assertion failed: ' + text);
|
|
}
|
|
}
|
|
|
|
var globalScope = this;
|
|
|
|
// 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
|
|
if (!func) {
|
|
try {
|
|
func = eval('_' + ident); // explicit lookup
|
|
} catch(e) {}
|
|
}
|
|
assert(func, 'Cannot call unknown function ' + ident + ' (perhaps LLVM optimizations or closure removed it?)');
|
|
return func;
|
|
}
|
|
|
|
var cwrap, ccall;
|
|
(function(){
|
|
var JSfuncs = {
|
|
// Helpers for cwrap -- it can't refer to Runtime directly because it might
|
|
// be renamed by closure, instead it calls JSfuncs['stackSave'].body to find
|
|
// out what the minified function name is.
|
|
'stackSave': function() {
|
|
Runtime.stackSave()
|
|
},
|
|
'stackRestore': function() {
|
|
Runtime.stackRestore()
|
|
},
|
|
// type conversion from js to c
|
|
'arrayToC' : function(arr) {
|
|
var ret = Runtime.stackAlloc(arr.length);
|
|
writeArrayToMemory(arr, ret);
|
|
return ret;
|
|
},
|
|
'stringToC' : 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'
|
|
ret = Runtime.stackAlloc((str.length << 2) + 1);
|
|
writeStringToMemory(str, ret);
|
|
}
|
|
return ret;
|
|
}
|
|
};
|
|
// For fast lookup of conversion functions
|
|
var toC = {'string' : JSfuncs['stringToC'], 'array' : JSfuncs['arrayToC']};
|
|
|
|
// C calling interface.
|
|
ccall = function ccallFunc(ident, returnType, argTypes, args, opts) {
|
|
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 = Runtime.stackSave();
|
|
cArgs[i] = converter(args[i]);
|
|
} else {
|
|
cArgs[i] = args[i];
|
|
}
|
|
}
|
|
}
|
|
var ret = func.apply(null, cArgs);
|
|
if ((!opts || !opts.async) && typeof EmterpreterAsync === 'object') {
|
|
assert(!EmterpreterAsync.state, 'cannot start async op with normal JS calling ccall');
|
|
}
|
|
if (opts && opts.async) assert(!returnType, 'async ccalls cannot return values');
|
|
if (returnType === 'string') ret = Pointer_stringify(ret);
|
|
if (stack !== 0) {
|
|
if (opts && opts.async) {
|
|
EmterpreterAsync.asyncFinalizers.push(function() {
|
|
Runtime.stackRestore(stack);
|
|
});
|
|
return;
|
|
}
|
|
Runtime.stackRestore(stack);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
var sourceRegex = /^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;
|
|
function parseJSFunc(jsfunc) {
|
|
// Match the body and the return value of a javascript function source
|
|
var parsed = jsfunc.toString().match(sourceRegex).slice(1);
|
|
return {arguments : parsed[0], body : parsed[1], returnValue: parsed[2]}
|
|
}
|
|
var JSsource = {};
|
|
for (var fun in JSfuncs) {
|
|
if (JSfuncs.hasOwnProperty(fun)) {
|
|
// Elements of toCsource are arrays of three items:
|
|
// the code, and the return value
|
|
JSsource[fun] = parseJSFunc(JSfuncs[fun]);
|
|
}
|
|
}
|
|
|
|
|
|
cwrap = function cwrap(ident, returnType, argTypes) {
|
|
argTypes = argTypes || [];
|
|
var cfunc = getCFunc(ident);
|
|
// When the function takes numbers and returns a number, we can just return
|
|
// the original function
|
|
var numericArgs = argTypes.every(function(type){ return type === 'number'});
|
|
var numericRet = (returnType !== 'string');
|
|
if ( numericRet && numericArgs) {
|
|
return cfunc;
|
|
}
|
|
// Creation of the arguments list (["$1","$2",...,"$nargs"])
|
|
var argNames = argTypes.map(function(x,i){return '$'+i});
|
|
var funcstr = "(function(" + argNames.join(',') + ") {";
|
|
var nargs = argTypes.length;
|
|
if (!numericArgs) {
|
|
// Generate the code needed to convert the arguments from javascript
|
|
// values to pointers
|
|
funcstr += 'var stack = ' + JSsource['stackSave'].body + ';';
|
|
for (var i = 0; i < nargs; i++) {
|
|
var arg = argNames[i], type = argTypes[i];
|
|
if (type === 'number') continue;
|
|
var convertCode = JSsource[type + 'ToC']; // [code, return]
|
|
funcstr += 'var ' + convertCode.arguments + ' = ' + arg + ';';
|
|
funcstr += convertCode.body + ';';
|
|
funcstr += arg + '=' + convertCode.returnValue + ';';
|
|
}
|
|
}
|
|
|
|
// When the code is compressed, the name of cfunc is not literally 'cfunc' anymore
|
|
var cfuncname = parseJSFunc(function(){return cfunc}).returnValue;
|
|
// Call the function
|
|
funcstr += 'var ret = ' + cfuncname + '(' + argNames.join(',') + ');';
|
|
if (!numericRet) { // Return type can only by 'string' or 'number'
|
|
// Convert the result to a string
|
|
var strgfy = parseJSFunc(function(){return Pointer_stringify}).returnValue;
|
|
funcstr += 'ret = ' + strgfy + '(ret);';
|
|
}
|
|
funcstr += "if (typeof EmterpreterAsync === 'object') { assert(!EmterpreterAsync.state, 'cannot start async op with normal JS calling cwrap') }";
|
|
if (!numericArgs) {
|
|
// If we had a stack, restore it
|
|
funcstr += JSsource['stackRestore'].body.replace('()', '(stack)') + ';';
|
|
}
|
|
funcstr += 'return ret})';
|
|
return eval(funcstr);
|
|
};
|
|
})();
|
|
Module["ccall"] = ccall;
|
|
Module["cwrap"] = cwrap;
|
|
|
|
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);
|
|
}
|
|
}
|
|
Module["setValue"] = setValue;
|
|
|
|
|
|
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 setValue: ' + type);
|
|
}
|
|
return null;
|
|
}
|
|
Module["getValue"] = getValue;
|
|
|
|
var ALLOC_NORMAL = 0; // Tries to use _malloc()
|
|
var ALLOC_STACK = 1; // Lives for the duration of the current function call
|
|
var ALLOC_STATIC = 2; // Cannot be freed
|
|
var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk
|
|
var ALLOC_NONE = 4; // Do not allocate
|
|
Module["ALLOC_NORMAL"] = ALLOC_NORMAL;
|
|
Module["ALLOC_STACK"] = ALLOC_STACK;
|
|
Module["ALLOC_STATIC"] = ALLOC_STATIC;
|
|
Module["ALLOC_DYNAMIC"] = ALLOC_DYNAMIC;
|
|
Module["ALLOC_NONE"] = ALLOC_NONE;
|
|
|
|
// 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_*
|
|
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, Runtime.stackAlloc, Runtime.staticAlloc, Runtime.dynamicAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length));
|
|
}
|
|
|
|
if (zeroinit) {
|
|
var ptr = ret, stop;
|
|
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(slab, ret);
|
|
} else {
|
|
HEAPU8.set(new Uint8Array(slab), ret);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
var i = 0, type, typeSize, previousType;
|
|
while (i < size) {
|
|
var curr = slab[i];
|
|
|
|
if (typeof curr === 'function') {
|
|
curr = Runtime.getFunctionIndex(curr);
|
|
}
|
|
|
|
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 = Runtime.getNativeTypeSize(type);
|
|
previousType = type;
|
|
}
|
|
i += typeSize;
|
|
}
|
|
|
|
return ret;
|
|
}
|
|
Module["allocate"] = allocate;
|
|
|
|
// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready
|
|
function getMemory(size) {
|
|
if (!staticSealed) return Runtime.staticAlloc(size);
|
|
if ((typeof _sbrk !== 'undefined' && !_sbrk.called) || !runtimeInitialized) return Runtime.dynamicAlloc(size);
|
|
return _malloc(size);
|
|
}
|
|
Module["getMemory"] = getMemory;
|
|
|
|
function Pointer_stringify(ptr, /* optional */ length) {
|
|
if (length === 0 || !ptr) return '';
|
|
// TODO: use TextDecoder
|
|
// Find the length, and check for UTF while doing so
|
|
var hasUtf = 0;
|
|
var t;
|
|
var i = 0;
|
|
while (1) {
|
|
assert(ptr + i < TOTAL_MEMORY);
|
|
t = HEAPU8[(((ptr)+(i))>>0)];
|
|
hasUtf |= t;
|
|
if (t == 0 && !length) break;
|
|
i++;
|
|
if (length && i == length) break;
|
|
}
|
|
if (!length) length = i;
|
|
|
|
var ret = '';
|
|
|
|
if (hasUtf < 128) {
|
|
var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack
|
|
var curr;
|
|
while (length > 0) {
|
|
curr = String.fromCharCode.apply(String, HEAPU8.subarray(ptr, ptr + Math.min(length, MAX_CHUNK)));
|
|
ret = ret ? ret + curr : curr;
|
|
ptr += MAX_CHUNK;
|
|
length -= MAX_CHUNK;
|
|
}
|
|
return ret;
|
|
}
|
|
return Module['UTF8ToString'](ptr);
|
|
}
|
|
Module["Pointer_stringify"] = Pointer_stringify;
|
|
|
|
// 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 = HEAP8[((ptr++)>>0)];
|
|
if (!ch) return str;
|
|
str += String.fromCharCode(ch);
|
|
}
|
|
}
|
|
Module["AsciiToString"] = AsciiToString;
|
|
|
|
// 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);
|
|
}
|
|
Module["stringToAscii"] = stringToAscii;
|
|
|
|
// 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.
|
|
|
|
function UTF8ArrayToString(u8Array, idx) {
|
|
var u0, u1, u2, u3, u4, u5;
|
|
|
|
var str = '';
|
|
while (1) {
|
|
// 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
|
|
u0 = u8Array[idx++];
|
|
if (!u0) return str;
|
|
if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }
|
|
u1 = u8Array[idx++] & 63;
|
|
if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }
|
|
u2 = u8Array[idx++] & 63;
|
|
if ((u0 & 0xF0) == 0xE0) {
|
|
u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;
|
|
} else {
|
|
u3 = u8Array[idx++] & 63;
|
|
if ((u0 & 0xF8) == 0xF0) {
|
|
u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3;
|
|
} else {
|
|
u4 = u8Array[idx++] & 63;
|
|
if ((u0 & 0xFC) == 0xF8) {
|
|
u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4;
|
|
} else {
|
|
u5 = u8Array[idx++] & 63;
|
|
u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5;
|
|
}
|
|
}
|
|
}
|
|
if (u0 < 0x10000) {
|
|
str += String.fromCharCode(u0);
|
|
} else {
|
|
var ch = u0 - 0x10000;
|
|
str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
|
|
}
|
|
}
|
|
}
|
|
Module["UTF8ArrayToString"] = UTF8ArrayToString;
|
|
|
|
// 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.
|
|
|
|
function UTF8ToString(ptr) {
|
|
return UTF8ArrayToString(HEAPU8,ptr);
|
|
}
|
|
Module["UTF8ToString"] = UTF8ToString;
|
|
|
|
// 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) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 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 (u <= 0x1FFFFF) {
|
|
if (outIdx + 3 >= endIdx) break;
|
|
outU8Array[outIdx++] = 0xF0 | (u >> 18);
|
|
outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63);
|
|
outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63);
|
|
outU8Array[outIdx++] = 0x80 | (u & 63);
|
|
} else if (u <= 0x3FFFFFF) {
|
|
if (outIdx + 4 >= endIdx) break;
|
|
outU8Array[outIdx++] = 0xF8 | (u >> 24);
|
|
outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63);
|
|
outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63);
|
|
outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63);
|
|
outU8Array[outIdx++] = 0x80 | (u & 63);
|
|
} else {
|
|
if (outIdx + 5 >= endIdx) break;
|
|
outU8Array[outIdx++] = 0xFC | (u >> 30);
|
|
outU8Array[outIdx++] = 0x80 | ((u >> 24) & 63);
|
|
outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63);
|
|
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;
|
|
}
|
|
Module["stringToUTF8Array"] = stringToUTF8Array;
|
|
|
|
// 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);
|
|
}
|
|
Module["stringToUTF8"] = stringToUTF8;
|
|
|
|
// 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 if (u <= 0x1FFFFF) {
|
|
len += 4;
|
|
} else if (u <= 0x3FFFFFF) {
|
|
len += 5;
|
|
} else {
|
|
len += 6;
|
|
}
|
|
}
|
|
return len;
|
|
}
|
|
Module["lengthBytesUTF8"] = lengthBytesUTF8;
|
|
|
|
// 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) {
|
|
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);
|
|
}
|
|
}
|
|
Module["UTF16ToString"] = UTF16ToString;
|
|
|
|
// 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(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;
|
|
}
|
|
Module["stringToUTF16"] = stringToUTF16;
|
|
|
|
// 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;
|
|
}
|
|
Module["lengthBytesUTF16"] = lengthBytesUTF16;
|
|
|
|
function UTF32ToString(ptr) {
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
Module["UTF32ToString"] = UTF32ToString;
|
|
|
|
// 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(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;
|
|
}
|
|
Module["stringToUTF32"] = stringToUTF32;
|
|
|
|
// 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;
|
|
}
|
|
Module["lengthBytesUTF32"] = lengthBytesUTF32;
|
|
|
|
function demangle(func) {
|
|
var hasLibcxxabi = !!Module['___cxa_demangle'];
|
|
if (hasLibcxxabi) {
|
|
try {
|
|
var buf = _malloc(func.length);
|
|
writeStringToMemory(func.substr(1), buf);
|
|
var status = _malloc(4);
|
|
var ret = Module['___cxa_demangle'](buf, 0, 0, status);
|
|
if (getValue(status, 'i32') === 0 && ret) {
|
|
return Pointer_stringify(ret);
|
|
}
|
|
// otherwise, libcxxabi failed, we can try ours which may return a partial result
|
|
} catch(e) {
|
|
// failure when using libcxxabi, we can try ours which may return a partial result
|
|
} finally {
|
|
if (buf) _free(buf);
|
|
if (status) _free(status);
|
|
if (ret) _free(ret);
|
|
}
|
|
}
|
|
var i = 3;
|
|
// params, etc.
|
|
var basicTypes = {
|
|
'v': 'void',
|
|
'b': 'bool',
|
|
'c': 'char',
|
|
's': 'short',
|
|
'i': 'int',
|
|
'l': 'long',
|
|
'f': 'float',
|
|
'd': 'double',
|
|
'w': 'wchar_t',
|
|
'a': 'signed char',
|
|
'h': 'unsigned char',
|
|
't': 'unsigned short',
|
|
'j': 'unsigned int',
|
|
'm': 'unsigned long',
|
|
'x': 'long long',
|
|
'y': 'unsigned long long',
|
|
'z': '...'
|
|
};
|
|
var subs = [];
|
|
var first = true;
|
|
function dump(x) {
|
|
//return;
|
|
if (x) Module.print(x);
|
|
Module.print(func);
|
|
var pre = '';
|
|
for (var a = 0; a < i; a++) pre += ' ';
|
|
Module.print (pre + '^');
|
|
}
|
|
function parseNested() {
|
|
i++;
|
|
if (func[i] === 'K') i++; // ignore const
|
|
var parts = [];
|
|
while (func[i] !== 'E') {
|
|
if (func[i] === 'S') { // substitution
|
|
i++;
|
|
var next = func.indexOf('_', i);
|
|
var num = func.substring(i, next) || 0;
|
|
parts.push(subs[num] || '?');
|
|
i = next+1;
|
|
continue;
|
|
}
|
|
if (func[i] === 'C') { // constructor
|
|
parts.push(parts[parts.length-1]);
|
|
i += 2;
|
|
continue;
|
|
}
|
|
var size = parseInt(func.substr(i));
|
|
var pre = size.toString().length;
|
|
if (!size || !pre) { i--; break; } // counter i++ below us
|
|
var curr = func.substr(i + pre, size);
|
|
parts.push(curr);
|
|
subs.push(curr);
|
|
i += pre + size;
|
|
}
|
|
i++; // skip E
|
|
return parts;
|
|
}
|
|
function parse(rawList, limit, allowVoid) { // main parser
|
|
limit = limit || Infinity;
|
|
var ret = '', list = [];
|
|
function flushList() {
|
|
return '(' + list.join(', ') + ')';
|
|
}
|
|
var name;
|
|
if (func[i] === 'N') {
|
|
// namespaced N-E
|
|
name = parseNested().join('::');
|
|
limit--;
|
|
if (limit === 0) return rawList ? [name] : name;
|
|
} else {
|
|
// not namespaced
|
|
if (func[i] === 'K' || (first && func[i] === 'L')) i++; // ignore const and first 'L'
|
|
var size = parseInt(func.substr(i));
|
|
if (size) {
|
|
var pre = size.toString().length;
|
|
name = func.substr(i + pre, size);
|
|
i += pre + size;
|
|
}
|
|
}
|
|
first = false;
|
|
if (func[i] === 'I') {
|
|
i++;
|
|
var iList = parse(true);
|
|
var iRet = parse(true, 1, true);
|
|
ret += iRet[0] + ' ' + name + '<' + iList.join(', ') + '>';
|
|
} else {
|
|
ret = name;
|
|
}
|
|
paramLoop: while (i < func.length && limit-- > 0) {
|
|
//dump('paramLoop');
|
|
var c = func[i++];
|
|
if (c in basicTypes) {
|
|
list.push(basicTypes[c]);
|
|
} else {
|
|
switch (c) {
|
|
case 'P': list.push(parse(true, 1, true)[0] + '*'); break; // pointer
|
|
case 'R': list.push(parse(true, 1, true)[0] + '&'); break; // reference
|
|
case 'L': { // literal
|
|
i++; // skip basic type
|
|
var end = func.indexOf('E', i);
|
|
var size = end - i;
|
|
list.push(func.substr(i, size));
|
|
i += size + 2; // size + 'EE'
|
|
break;
|
|
}
|
|
case 'A': { // array
|
|
var size = parseInt(func.substr(i));
|
|
i += size.toString().length;
|
|
if (func[i] !== '_') throw '?';
|
|
i++; // skip _
|
|
list.push(parse(true, 1, true)[0] + ' [' + size + ']');
|
|
break;
|
|
}
|
|
case 'E': break paramLoop;
|
|
default: ret += '?' + c; break paramLoop;
|
|
}
|
|
}
|
|
}
|
|
if (!allowVoid && list.length === 1 && list[0] === 'void') list = []; // avoid (void)
|
|
if (rawList) {
|
|
if (ret) {
|
|
list.push(ret + '?');
|
|
}
|
|
return list;
|
|
} else {
|
|
return ret + flushList();
|
|
}
|
|
}
|
|
var parsed = func;
|
|
try {
|
|
// Special-case the entry point, since its name differs from other name mangling.
|
|
if (func == 'Object._main' || func == '_main') {
|
|
return 'main()';
|
|
}
|
|
if (typeof func === 'number') func = Pointer_stringify(func);
|
|
if (func[0] !== '_') return func;
|
|
if (func[1] !== '_') return func; // C function
|
|
if (func[2] !== 'Z') return func;
|
|
switch (func[3]) {
|
|
case 'n': return 'operator new()';
|
|
case 'd': return 'operator delete()';
|
|
}
|
|
parsed = parse();
|
|
} catch(e) {
|
|
parsed += '?';
|
|
}
|
|
if (parsed.indexOf('?') >= 0 && !hasLibcxxabi) {
|
|
Runtime.warnOnce('warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling');
|
|
}
|
|
return parsed;
|
|
}
|
|
|
|
function demangleAll(text) {
|
|
return text.replace(/__Z[\w\d_]+/g, function(x) { var y = demangle(x); return x === y ? x : (x + ' [' + y + ']') });
|
|
}
|
|
|
|
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() {
|
|
return demangleAll(jsStackTrace());
|
|
}
|
|
Module["stackTrace"] = stackTrace;
|
|
|
|
// Memory management
|
|
|
|
var PAGE_SIZE = 4096;
|
|
|
|
function alignMemoryPage(x) {
|
|
if (x % 4096 > 0) {
|
|
x += (4096 - (x % 4096));
|
|
}
|
|
return x;
|
|
}
|
|
|
|
var HEAP;
|
|
var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;
|
|
|
|
var STATIC_BASE = 0, STATICTOP = 0, staticSealed = false; // static area
|
|
var STACK_BASE = 0, STACKTOP = 0, STACK_MAX = 0; // stack area
|
|
var DYNAMIC_BASE = 0, DYNAMICTOP = 0; // dynamic area handled by sbrk
|
|
|
|
|
|
function abortOnCannotGrowMemory() {
|
|
abort('Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + TOTAL_MEMORY + ', (2) compile with -s ALLOW_MEMORY_GROWTH=1 which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ');
|
|
}
|
|
|
|
function enlargeMemory() {
|
|
abortOnCannotGrowMemory();
|
|
}
|
|
|
|
|
|
var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880;
|
|
var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216;
|
|
|
|
var totalMemory = 64*1024;
|
|
while (totalMemory < TOTAL_MEMORY || totalMemory < 2*TOTAL_STACK) {
|
|
if (totalMemory < 16*1024*1024) {
|
|
totalMemory *= 2;
|
|
} else {
|
|
totalMemory += 16*1024*1024
|
|
}
|
|
}
|
|
if (totalMemory !== TOTAL_MEMORY) {
|
|
Module.printErr('increasing TOTAL_MEMORY to ' + totalMemory + ' to be compliant with the asm.js spec (and given that TOTAL_STACK=' + TOTAL_STACK + ')');
|
|
TOTAL_MEMORY = totalMemory;
|
|
}
|
|
|
|
// Initialize the runtime's memory
|
|
// check for full engine support (use string 'subarray' to avoid closure compiler confusion)
|
|
assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && !!(new Int32Array(1)['subarray']) && !!(new Int32Array(1)['set']),
|
|
'JS engine does not provide full typed array support');
|
|
|
|
var buffer;
|
|
|
|
|
|
|
|
buffer = new ArrayBuffer(TOTAL_MEMORY);
|
|
HEAP8 = new Int8Array(buffer);
|
|
HEAP16 = new Int16Array(buffer);
|
|
HEAP32 = new Int32Array(buffer);
|
|
HEAPU8 = new Uint8Array(buffer);
|
|
HEAPU16 = new Uint16Array(buffer);
|
|
HEAPU32 = new Uint32Array(buffer);
|
|
HEAPF32 = new Float32Array(buffer);
|
|
HEAPF64 = new Float64Array(buffer);
|
|
|
|
|
|
// Endianness check (note: assumes compiler arch was little-endian)
|
|
HEAP32[0] = 255;
|
|
assert(HEAPU8[0] === 255 && HEAPU8[3] === 0, 'Typed arrays 2 must be run on a little-endian system');
|
|
|
|
Module['HEAP'] = HEAP;
|
|
Module['buffer'] = buffer;
|
|
Module['HEAP8'] = HEAP8;
|
|
Module['HEAP16'] = HEAP16;
|
|
Module['HEAP32'] = HEAP32;
|
|
Module['HEAPU8'] = HEAPU8;
|
|
Module['HEAPU16'] = HEAPU16;
|
|
Module['HEAPU32'] = HEAPU32;
|
|
Module['HEAPF32'] = HEAPF32;
|
|
Module['HEAPF64'] = HEAPF64;
|
|
|
|
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) {
|
|
Runtime.dynCall('v', func);
|
|
} else {
|
|
Runtime.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 runtime has exited
|
|
|
|
var runtimeInitialized = false;
|
|
var runtimeExited = false;
|
|
|
|
|
|
function preRun() {
|
|
// compatibility - merge in anything from Module['preRun'] at this time
|
|
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;
|
|
callRuntimeCallbacks(__ATINIT__);
|
|
}
|
|
|
|
function preMain() {
|
|
callRuntimeCallbacks(__ATMAIN__);
|
|
}
|
|
|
|
function exitRuntime() {
|
|
callRuntimeCallbacks(__ATEXIT__);
|
|
runtimeExited = true;
|
|
}
|
|
|
|
function postRun() {
|
|
// compatibility - merge in anything from Module['postRun'] at this time
|
|
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);
|
|
}
|
|
Module["addOnPreRun"] = addOnPreRun;
|
|
|
|
function addOnInit(cb) {
|
|
__ATINIT__.unshift(cb);
|
|
}
|
|
Module["addOnInit"] = addOnInit;
|
|
|
|
function addOnPreMain(cb) {
|
|
__ATMAIN__.unshift(cb);
|
|
}
|
|
Module["addOnPreMain"] = addOnPreMain;
|
|
|
|
function addOnExit(cb) {
|
|
__ATEXIT__.unshift(cb);
|
|
}
|
|
Module["addOnExit"] = addOnExit;
|
|
|
|
function addOnPostRun(cb) {
|
|
__ATPOSTRUN__.unshift(cb);
|
|
}
|
|
Module["addOnPostRun"] = addOnPostRun;
|
|
|
|
// Tools
|
|
|
|
|
|
function intArrayFromString(stringy, dontAddNull, length /* optional */) {
|
|
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;
|
|
}
|
|
Module["intArrayFromString"] = intArrayFromString;
|
|
|
|
function intArrayToString(array) {
|
|
var ret = [];
|
|
for (var i = 0; i < array.length; i++) {
|
|
var chr = array[i];
|
|
if (chr > 0xFF) {
|
|
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('');
|
|
}
|
|
Module["intArrayToString"] = intArrayToString;
|
|
|
|
function writeStringToMemory(string, buffer, dontAddNull) {
|
|
var array = intArrayFromString(string, dontAddNull);
|
|
var i = 0;
|
|
while (i < array.length) {
|
|
var chr = array[i];
|
|
HEAP8[(((buffer)+(i))>>0)]=chr;
|
|
i = i + 1;
|
|
}
|
|
}
|
|
Module["writeStringToMemory"] = writeStringToMemory;
|
|
|
|
function writeArrayToMemory(array, buffer) {
|
|
for (var i = 0; i < array.length; i++) {
|
|
HEAP8[((buffer++)>>0)]=array[i];
|
|
}
|
|
}
|
|
Module["writeArrayToMemory"] = writeArrayToMemory;
|
|
|
|
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;
|
|
}
|
|
Module["writeAsciiToMemory"] = writeAsciiToMemory;
|
|
|
|
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;
|
|
}
|
|
|
|
|
|
// check for imul support, and also for correctness ( https://bugs.webkit.org/show_bug.cgi?id=126345 )
|
|
if (!Math['imul'] || Math['imul'](0xffffffff, 5) !== -5) Math['imul'] = function imul(a, b) {
|
|
var ah = a >>> 16;
|
|
var al = a & 0xffff;
|
|
var bh = b >>> 16;
|
|
var bl = b & 0xffff;
|
|
return (al*bl + ((ah*bl + al*bh) << 16))|0;
|
|
};
|
|
Math.imul = Math['imul'];
|
|
|
|
|
|
if (!Math['clz32']) Math['clz32'] = function(x) {
|
|
x = x >>> 0;
|
|
for (var i = 0; i < 32; i++) {
|
|
if (x & (1 << (31 - i))) return i;
|
|
}
|
|
return 32;
|
|
};
|
|
Math.clz32 = Math['clz32']
|
|
|
|
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_min = Math.min;
|
|
var Math_clz32 = Math.clz32;
|
|
|
|
// 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
|
|
// PRE_RUN_ADDITIONS (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;
|
|
Module.printErr('still waiting on run dependencies:');
|
|
}
|
|
Module.printErr('dependency: ' + dep);
|
|
}
|
|
if (shown) {
|
|
Module.printErr('(end of list)');
|
|
}
|
|
}, 10000);
|
|
}
|
|
} else {
|
|
Module.printErr('warning: run dependency added without ID');
|
|
}
|
|
}
|
|
Module["addRunDependency"] = addRunDependency;
|
|
|
|
function removeRunDependency(id) {
|
|
runDependencies--;
|
|
if (Module['monitorRunDependencies']) {
|
|
Module['monitorRunDependencies'](runDependencies);
|
|
}
|
|
if (id) {
|
|
assert(runDependencyTracking[id]);
|
|
delete runDependencyTracking[id];
|
|
} else {
|
|
Module.printErr('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["removeRunDependency"] = removeRunDependency;
|
|
|
|
Module["preloadedImages"] = {}; // maps url to image data
|
|
Module["preloadedAudios"] = {}; // maps url to audio data
|
|
|
|
|
|
|
|
var memoryInitializer = null;
|
|
|
|
|
|
|
|
// === Body ===
|
|
|
|
var ASM_CONSTS = [function() { return !!(document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement) }];
|
|
|
|
function _emscripten_asm_const_0(code) {
|
|
return ASM_CONSTS[code]();
|
|
}
|
|
|
|
|
|
|
|
STATIC_BASE = 8;
|
|
|
|
STATICTOP = STATIC_BASE + 35488;
|
|
/* global initializers */ __ATINIT__.push();
|
|
|
|
|
|
/* memory initializer */ allocate([0,0,0,198,0,0,0,198,0,0,128,70,0,0,128,70,32,0,0,0,255,0,0,0,0,0,0,0,98,112,0,0,111,113], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE);
|
|
/* memory initializer */ allocate([1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,8,0,0,0,0,1,0,255,255,16,0,127,0,0,0,255,7,0,0,255,255,0,0,255,255,16,0,0,0,128,63,0,0,0,0,0,0,0,0,0,0,128,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,132,49,0,0,244,49,0,0,244,49,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,5,0,0,0,131,136,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,5,0,0,0,123,132,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,115,116,114,0,46,47,46,46,47,46,46,47,110,117,107,108,101,97,114,46,104,0,110,107,95,115,116,114,108,101,110,0,110,117,109,98,101,114,0,110,107,95,115,116,114,116,111,102,0,98,117,102,102,101,114,0,112,116,114,0,105,109,103,0,110,107,95,105,109,97,103,101,95,105,115,95,115,117,98,105,109,97,103,101,0,114,101,115,117,108,116,0,110,107,95,116,114,105,97,110,103,108,101,95,102,114,111,109,95,100,105,114,101,99,116,105,111,110,0,99,0,110,107,95,117,116,102,95,100,101,99,111,100,101,0,117,0,110,107,95,117,116,102,95,108,101,110,0,117,110,105,99,111,100,101,0,108,101,110,0,98,0,110,107,95,98,117,102,102,101,114,95,105,110,105,116,0,97,0,105,110,105,116,105,97,108,95,115,105,122,101,0,110,107,95,98,117,102,102,101,114,95,105,110,105,116,95,102,105,120,101,100,0,109,0,115,105,122,101,0,110,107,95,98,117,102,102,101,114,95,109,97,114,107,0,110,107,95,98,117,102,102,101,114,95,114,101,115,101,116,0,110,107,95,98,117,102,102,101,114,95,99,108,101,97,114,0,110,107,95,98,117,102,102,101,114,95,102,114,101,101,0,98,45,62,112,111,111,108,46,102,114,101,101,0,115,0,110,107,95,98,117,102,102,101,114,95,109,101,109,111,114,121,0,110,107,95,98,117,102,102,101,114,95,116,111,116,97,108,0,110,107,95,115,116,114,95,97,112,112,101,110,100,95,116,101,120,116,95,99,104,97,114,0,110,107,95,115,116,114,95,105,110,115,101,114,116,95,97,116,95,99,104,97,114,0,108,101,110,32,62,61,32,48,0,40,40,105,110,116,41,112,111,115,32,43,32,40,105,110,116,41,108,101,110,32,43,32,40,40,105,110,116,41,99,111,112,121,108,101,110,32,45,32,49,41,41,32,62,61,32,48,0,40,40,105,110,116,41,112,111,115,32,43,32,40,40,105,110,116,41,99,111,112,121,108,101,110,32,45,32,49,41,41,32,62,61,32,48,0,110,107,95,115,116,114,95,105,110,115,101,114,116,95,97,116,95,114,117,110,101,0,99,115,116,114,0,116,101,120,116,0,110,107,95,115,116,114,95,105,110,115,101,114,116,95,116,101,120,116,95,114,117,110,101,115,0,110,107,95,115,116,114,95,114,101,109,111,118,101,95,99,104,97,114,115,0,40,40,105,110,116,41,115,45,62,98,117,102,102,101,114,46,97,108,108,111,99,97,116,101,100,32,45,32,40,105,110,116,41,108,101,110,41,32,62,61,32,48,0,110,107,95,115,116,114,95,100,101,108,101,116,101,95,99,104,97,114,115,0,110,107,95,115,116,114,95,100,101,108,101,116,101,95,114,117,110,101,115,0,115,45,62,108,101,110,32,62,61,32,112,111,115,32,43,32,108,101,110,0,110,107,95,115,116,114,95,97,116,95,114,117,110,101,0,110,107,95,115,116,114,95,97,116,95,99,111,110,115,116,0,110,107,95,115,116,114,95,103,101,116,95,99,111,110,115,116,0,110,107,95,115,116,114,95,108,101,110,0,110,107,95,115,116,114,95,108,101,110,95,99,104,97,114,0,110,107,95,112,117,115,104,95,115,99,105,115,115,111,114,0,110,107,95,115,116,114,111,107,101,95,108,105,110,101,0,110,107,95,102,105,108,108,95,114,101,99,116,0,110,107,95,102,105,108,108,95,114,101,99,116,95,109,117,108,116,105,95,99,111,108,111,114,0,110,107,95,102,105,108,108,95,99,105,114,99,108,101,0,110,107,95,102,105,108,108,95,116,114,105,97,110,103,108,101,0,110,107,95,100,114,97,119,95,105,109,97,103,101,0,110,107,95,100,114,97,119,95,116,101,120,116,0,102,111,110,116,0,110,107,95,95,100,114,97,119,95,108,105,115,116,95,98,101,103,105,110,0,110,107,95,95,100,114,97,119,95,108,105,115,116,95,110,101,120,116,0,99,97,110,118,97,115,0,108,105,115,116,0,110,107,95,100,114,97,119,95,108,105,115,116,95,99,108,101,97,114,0,110,107,95,100,114,97,119,95,108,105,115,116,95,115,116,114,111,107,101,95,112,111,108,121,95,108,105,110,101,0,118,116,120,32,38,38,32,105,100,115,0,110,111,114,109,97,108,115,0,110,107,95,100,114,97,119,95,108,105,115,116,95,102,105,108,108,95,112,111,108,121,95,99,111,110,118,101,120,0,110,107,95,100,114,97,119,95,108,105,115,116,95,112,97,116,104,95,99,108,101,97,114,0,110,107,95,100,114,97,119,95,108,105,115,116,95,112,97,116,104,95,108,105,110,101,95,116,111,0,110,107,95,100,114,97,119,95,108,105,115,116,95,112,97,116,104,95,97,114,99,95,116,111,95,102,97,115,116,0,110,107,95,100,114,97,119,95,108,105,115,116,95,112,97,116,104,95,97,114,99,95,116,111,0,110,107,95,100,114,97,119,95,108,105,115,116,95,112,97,116,104,95,114,101,99,116,95,116,111,0,110,107,95,100,114,97,119,95,108,105,115,116,95,112,97,116,104,95,99,117,114,118,101,95,116,111,0,108,105,115,116,45,62,112,97,116,104,95,99,111,117,110,116,0,110,107,95,100,114,97,119,95,108,105,115,116,95,112,97,116,104,95,102,105,108,108,0,110,107,95,100,114,97,119,95,108,105,115,116,95,112,97,116,104,95,115,116,114,111,107,101,0,110,107,95,100,114,97,119,95,108,105,115,116,95,115,116,114,111,107,101,95,108,105,110,101,0,110,107,95,100,114,97,119,95,108,105,115,116,95,102,105,108,108,95,114,101,99,116,0,110,107,95,100,114,97,119,95,108,105,115,116,95,115,116,114,111,107,101,95,114,101,99,116,0,110,107,95,100,114,97,119,95,108,105,115,116,95,102,105,108,108,95,114,101,99,116,95,109,117,108,116,105,95,99,111,108,111,114,0,110,107,95,100,114,97,119,95,108,105,115,116,95,102,105,108,108,95,116,114,105,97,110,103,108,101,0,110,107,95,100,114,97,119,95,108,105,115,116,95,115,116,114,111,107,101,95,116,114,105,97,110,103,108,101,0,110,107,95,100,114,97,119,95,108,105,115,116,95,102,105,108,108,95,99,105,114,99,108,101,0,110,107,95,100,114,97,119,95,108,105,115,116,95,115,116,114,111,107,101,95,99,105,114,99,108,101,0,110,107,95,100,114,97,119,95,108,105,115,116,95,115,116,114,111,107,101,95,99,117,114,118,101,0,110,107,95,100,114,97,119,95,108,105,115,116,95,97,100,100,95,105,109,97,103,101,0,110,107,95,100,114,97,119,95,108,105,115,116,95,97,100,100,95,116,101,120,116,0,99,116,120,0,110,107,95,99,111,110,118,101,114,116,0,99,109,100,115,0,118,101,114,116,105,99,101,115,0,101,108,101,109,101,110,116,115,0,99,111,110,102,105,103,0,110,107,95,102,111,110,116,95,98,97,107,101,95,109,101,109,111,114,121,0,103,108,121,112,104,95,99,111,117,110,116,0,105,109,97,103,101,95,109,101,109,111,114,121,0,110,107,95,102,111,110,116,95,98,97,107,101,95,112,97,99,107,0,119,105,100,116,104,0,104,101,105,103,104,116,0,116,101,109,112,0,116,101,109,112,95,115,105,122,101,0,99,111,117,110,116,0,97,108,108,111,99,0,114,101,99,116,95,110,32,61,61,32,116,111,116,97,108,95,103,108,121,112,104,95,99,111,117,110,116,0,99,104,97,114,95,110,32,61,61,32,116,111,116,97,108,95,103,108,121,112,104,95,99,111,117,110,116,0,114,97,110,103,101,95,110,32,61,61,32,116,111,116,97,108,95,114,97,110,103,101,95,99,111,117,110,116,0,110,107,95,102,111,110,116,95,98,97,107,101,0,102,111,110,116,95,99,111,117,110,116,0,103,108,121,112,104,115,95,99,111,117,110,116,0,105,109,103,95,109,101,109,111,114,121,0,110,107,95,102,111,110,116,95,98,97,107,101,95,99,117,115,116,111,109,95,100,97,116,97,0,105,109,103,95,119,105,100,116,104,0,105,109,103,95,104,101,105,103,104,116,0,116,101,120,116,117,114,101,95,100,97,116,97,95,109,97,115,107,0,111,117,116,95,109,101,109,111,114,121,0,110,107,95,102,111,110,116,95,98,97,107,101,95,99,111,110,118,101,114,116,0,105,110,95,109,101,109,111,114,121,0,110,107,95,102,111,110,116,95,102,105,110,100,95,103,108,121,112,104,0,102,111,110,116,45,62,103,108,121,112,104,115,0,110,107,95,102,111,110,116,95,105,110,105,116,0,103,108,121,112,104,115,0,98,97,107,101,100,95,102,111,110,116,0,97,116,108,97,115,0,110,107,95,102,111,110,116,95,97,116,108,97,115,95,105,110,105,116,95,100,101,102,97,117,108,116,0,110,107,95,102,111,110,116,95,97,116,108,97,115,95,98,101,103,105,110,0,97,116,108,97,115,45,62,116,101,109,112,111,114,97,114,121,46,97,108,108,111,99,32,38,38,32,97,116,108,97,115,45,62,116,101,109,112,111,114,97,114,121,46,102,114,101,101,0,97,116,108,97,115,45,62,112,101,114,109,97,110,101,110,116,46,97,108,108,111,99,32,38,38,32,97,116,108,97,115,45,62,112,101,114,109,97,110,101,110,116,46,102,114,101,101,0,110,107,95,102,111,110,116,95,97,116,108,97,115,95,97,100,100,0,97,116,108,97,115,45,62,112,101,114,109,97,110,101,110,116,46,97,108,108,111,99,0,97,116,108,97,115,45,62,112,101,114,109,97,110,101,110,116,46,102,114,101,101,0,97,116,108,97,115,45,62,116,101,109,112,111,114,97,114,121,46,97,108,108,111,99,0,97,116,108,97,115,45,62,116,101,109,112,111,114,97,114,121,46,102,114,101,101,0,99,111,110,102,105,103,45,62,116,116,102,95,98,108,111,98,0,99,111,110,102,105,103,45,62,116,116,102,95,115,105,122,101,0,99,111,110,102,105,103,45,62,115,105,122,101,32,62,32,48,46,48,102,0,97,116,108,97,115,45,62,102,111,110,116,95,110,117,109,0,99,45,62,116,116,102,95,98,108,111,98,0,99,111,109,112,114,101,115,115,101,100,95,100,97,116,97,0,110,107,95,102,111,110,116,95,97,116,108,97,115,95,97,100,100,95,99,111,109,112,114,101,115,115,101,100,0,99,111,109,112,114,101,115,115,101,100,95,115,105,122,101,0,100,101,99,111,109,112,114,101,115,115,101,100,95,100,97,116,97,0,100,97,116,97,95,98,97,115,101,56,53,0,110,107,95,102,111,110,116,95,97,116,108,97,115,95,97,100,100,95,99,111,109,112,114,101,115,115,101,100,95,98,97,115,101,56,53,0,110,107,95,102,111,110,116,95,97,116,108,97,115,95,97,100,100,95,100,101,102,97,117,108,116,0,55,93,41,35,35,35,35,35,35,35,104,86,48,113,115,39,47,35,35,35,91,41,44,35,35,47,108,58,36,35,81,54,62,35,35,53,91,110,52,50,62,99,45,84,72,96,45,62,62,35,47,101,62,49,49,78,78,86,61,66,118,40,42,58,46,70,63,117,117,35,40,103,82,85,46,111,48,88,71,72,96,36,118,104,76,71,49,104,120,116,57,63,87,96,35,44,53,76,115,67,112,35,45,105,62,46,114,36,60,36,54,112,68,62,76,98,39,59,57,67,114,99,54,116,103,88,109,75,86,101,85,50,99,68,52,69,111,51,82,47,50,42,62,93,98,40,77,67,59,36,106,80,102,89,46,59,104,94,96,73,87,77,57,60,76,104,50,84,108,83,43,102,45,115,36,111,54,81,60,66,87,72,96,89,105,85,46,120,102,76,113,36,78,59,36,48,105,82,47,71,88,58,85,40,106,99,87,50,112,47,87,42,113,63,45,113,109,110,85,67,73,59,106,72,83,65,105,70,87,77,46,82,42,107,85,64,67,61,71,72,63,97,57,119,112,56,102,36,101,46,45,52,94,81,103,49,41,81,45,71,76,40,108,102,40,114,47,55,71,114,82,103,119,86,37,77,83,61,67,35,96,56,78,68,62,81,111,35,116,39,88,35,40,118,35,89,57,119,48,35,49,68,36,67,73,102,59,87,39,35,112,87,85,80,88,79,117,120,88,117,85,40,72,57,77,40,49,60,113,45,85,69,51,49,35,94,45,86,39,56,73,82,85,111,55,81,102,46,47,76,62,61,75,101,36,36,39,53,70,37,41,93,48,94,35,48,88,64,85,46,97,60,114,58,81,76,116,70,115,76,99,76,54,35,35,108,79,106,41,35,46,89,53,60,45,82,38,75,103,76,119,113,74,102,76,103,78,38,59,81,63,103,73,94,35,68,89,50,117,76,105,64,94,114,77,108,57,116,61,99,87,113,54,35,35,119,101,103,62,36,70,66,106,86,81,84,83,68,103,69,75,110,73,83,55,69,77,57,62,90,89,57,119,48,35,76,59,62,62,35,77,120,38,52,77,118,116,47,47,76,91,77,107,65,35,87,64,108,75,46,78,39,91,48,35,55,82,76,95,38,35,119,43,70,37,72,116,71,57,77,35,88,76,96,78,38,46,44,71,77,52,80,103,59,45,60,110,76,69,78,104,118,120,62,45,86,115,77,46,77,48,114,74,102,76,72,50,101,84,77,96,42,111,74,77,72,82,67,96,78,107,102,105,109,77,50,74,44,87,45,106,88,83,58,41,114,48,119,75,35,64,70,103,101,36,85,62,96,119,39,78,55,71,35,36,35,102,66,35,36,69,94,36,35,58,57,58,104,107,43,101,79,101,45,45,54,120,41,70,55,42,69,37,63,55,54,37,94,71,77,72,101,80,87,45,90,53,108,39,38,71,105,70,35,36,57,53,54,58,114,83,63,100,65,35,102,105,75,58,41,89,114,43,96,38,35,48,106,64,39,68,98,71,38,35,94,36,80,71,46,76,108,43,68,78,97,60,88,67,77,75,69,86,42,78,41,76,78,47,78,42,98,61,37,81,54,112,105,97,45,88,103,56,73,36,60,77,82,38,44,86,100,74,101,36,60,40,55,71,59,67,107,108,39,38,104,70,59,59,36,60,95,61,88,40,98,46,82,83,37,37,41,35,35,35,77,80,66,117,117,69,49,86,58,118,38,99,88,38,35,50,109,35,40,38,99,86,93,96,107,57,79,104,76,77,98,110,37,115,36,71,50,44,66,36,66,102,68,51,88,42,115,112,53,35,108,44,36,82,35,93,120,95,88,49,120,75,88,37,98,53,85,42,91,114,53,105,77,102,85,111,57,85,96,78,57,57,104,71,41,116,109,43,47,85,115,57,112,71,41,88,80,117,96,60,48,115,45,41,87,84,116,40,103,67,82,120,73,103,40,37,54,115,102,104,61,107,116,77,75,110,51,106,41,60,54,60,98,53,83,107,95,47,48,40,94,93,65,97,78,35,40,112,47,76,62,38,86,90,62,49,105,37,104,49,83,57,117,53,111,64,89,97,97,87,36,101,43,98,60,84,87,70,110,47,90,58,79,104,40,67,120,50,36,108,78,69,111,78,94,101,41,35,67,70,89,64,64,73,59,66,79,81,42,115,82,119,90,116,90,120,82,99,85,55,117,87,54,67,88,111,119,48,105,40,63,36,81,91,99,106,79,100,91,80,52,100,41,93,62,82,79,80,79,112,120,84,79,55,83,116,119,105,49,58,58,105,66,49,113,41,67,95,61,100,86,50,54,74,59,50,44,93,55,111,112,36,93,117,81,114,64,95,86,55,36,113,94,37,108,81,119,116,117,72,89,93,61,68,88,44,110,51,76,35,48,80,72,68,79,52,102,57,62,100,67,64,79,62,72,66,117,75,80,112,80,42,69,44,78,43,98,51,76,35,108,112,82,47,77,114,84,69,72,46,73,65,81,107,46,97,62,68,91,46,101,59,109,99,46,120,93,73,112,46,80,72,94,39,47,97,113,85,79,47,36,49,87,120,76,111,87,48,91,105,76,65,60,81,84,59,53,72,75,68,43,64,113,81,39,78,81,40,51,95,80,76,104,69,52,56,82,46,113,65,80,83,119,81,48,47,87,75,63,90,44,91,120,63,45,74,59,106,81,84,87,65,48,88,64,75,74,40,95,89,56,78,45,58,47,77,55,52,58,47,45,90,112,75,114,85,115,115,63,100,35,100,90,113,93,68,65,98,107,85,42,74,113,107,76,43,110,119,88,64,64,52,55,96,53,62,119,61,52,104,40,57,46,96,71,67,82,85,120,72,80,101,82,96,53,77,106,111,108,40,100,85,87,120,90,97,40,62,83,84,114,80,107,114,74,105,87,120,96,53,85,55,70,35,46,103,42,106,114,111,104,71,103,96,99,103,58,108,83,84,118,69,89,47,69,86,95,55,72,52,81,57,91,90,37,99,110,118,59,74,81,89,90,53,113,46,108,55,90,101,97,115,58,72,79,73,90,79,66,63,71,60,78,97,108,100,36,113,115,93,64,93,76,60,74,55,98,82,42,62,103,118,58,91,55,77,73,50,107,41,46,39,50,40,36,53,70,78,80,38,69,81,40,44,41,85,93,87,93,43,102,104,49,56,46,118,115,97,105,48,48,41,59,68,51,64,52,107,117,53,80,63,68,80,56,97,74,116,43,59,113,85,77,93,61,43,98,39,56,64,59,109,86,105,66,75,120,48,68,69,91,45,97,117,71,108,56,58,80,74,38,68,106,43,77,54,79,67,93,79,94,40,40,35,35,93,96,48,105,41,100,114,84,59,45,55,88,96,61,45,72,51,91,105,103,85,110,80,71,45,78,90,108,111,46,35,107,64,104,35,61,79,114,107,36,109,62,97,62,36,45,63,84,109,36,85,86,40,63,35,80,54,89,89,35,39,47,35,35,35,120,101,55,113,46,55,51,114,73,51,42,112,80,47,36,49,62,115,57,41,87,44,74,114,77,55,83,78,93,39,47,52,67,35,118,36,85,96,48,35,86,46,91,48,62,120,81,115,72,36,102,69,109,80,77,103,89,50,117,55,75,104,40,71,37,115,105,73,102,76,83,111,83,43,77,75,50,101,84,77,36,61,53,44,77,56,112,96,65,46,59,95,82,37,35,117,91,75,35,36,120,52,65,71,56,46,107,75,47,72,83,66,61,61,45,39,73,101,47,81,84,116,71,63,45,46,42,94,78,45,52,66,47,90,77,95,51,89,108,81,67,55,40,112,55,113,41,38,93,40,96,54,95,99,41,36,47,42,74,76,40,76,45,94,40,93,36,119,73,77,96,100,80,116,79,100,71,65,44,85,51,58,119,50,77,45,48,60,113,45,93,76,95,63,94,41,49,118,119,39,46,44,77,82,115,113,86,114,46,76,59,97,78,38,35,47,69,103,74,41,80,66,99,91,45,102,62,43,87,111,109,88,50,117,55,108,113,77,50,105,69,117,109,77,84,99,115,70,63,45,97,84,61,90,45,57,55,85,69,110,88,103,108,69,110,49,75,45,98,110,69,79,96,103,117,70,116,40,99,37,61,59,65,109,95,81,115,64,106,76,111,111,73,38,78,88,59,93,48,35,106,52,35,70,49,52,59,103,108,56,45,71,81,112,103,119,104,114,113,56,39,61,108,95,102,45,98,52,57,39,85,79,113,107,76,117,55,45,35,35,111,68,89,50,76,40,116,101,43,77,99,104,38,103,76,89,116,74,44,77,69,116,74,102,76,104,39,120,39,77,61,36,67,83,45,90,90,37,80,93,56,98,90,62,35,83,63,89,89,35,37,81,38,113,39,51,94,70,119,38,63,68,41,85,68,78,114,111,99,77,51,65,55,54,47,47,111,76,63,35,104,55,103,108,56,53,91,113,87,47,78,68,79,107,37,49,54,105,106,59,43,58,49,97,39,105,78,73,100,98,45,111,117,56,46,80,42,119,44,118,53,35,69,73,36,84,87,83,62,80,111,116,45,82,42,72,39,45,83,69,112,65,58,103,41,102,43,79,36,37,37,96,107,65,35,71,61,56,82,77,109,71,49,38,79,96,62,116,111,56,98,67,93,84,38,36,44,110,46,76,111,79,62,50,57,115,112,51,100,116,45,53,50,85,37,86,77,35,113,55,39,68,72,112,103,43,35,90,57,37,72,91,75,60,76,37,97,50,69,45,103,114,87,86,77,51,64,50,61,45,107,50,50,116,76,93,52,36,35,35,54,87,101,39,56,85,74,67,75,69,91,100,95,61,37,119,73,59,39,54,88,45,71,115,76,88,52,106,94,83,103,74,36,35,35,82,42,119,44,118,80,51,119,75,35,105,105,87,38,35,42,104,94,68,38,82,63,106,112,55,43,47,117,38,35,40,65,80,35,35,88,85,56,99,36,102,83,89,87,45,74,57,53,95,45,68,112,91,103,57,119,99,79,38,35,77,45,104,49,79,99,74,108,99,45,42,118,112,119,48,120,85,88,38,35,79,81,70,75,78,88,64,81,73,39,73,111,80,112,55,110,98,44,81,85,47,47,77,81,38,90,68,107,75,80,41,88,60,87,83,86,76,40,54,56,117,86,108,38,35,99,39,91,48,35,40,115,49,88,38,120,109,36,89,37,66,55,42,75,58,101,68,65,51,50,51,106,57,57,56,71,88,98,65,35,112,119,77,115,45,106,103,68,36,57,81,73,83,66,45,65,95,40,97,78,52,120,111,70,77,94,64,67,53,56,68,48,43,81,43,113,51,110,48,35,51,85,49,73,110,68,106,70,54,56,50,45,83,106,77,88,74,75,41,40,104,36,104,120,117,97,95,75,93,117,108,57,50,37,39,66,79,85,38,35,66,82,82,104,45,115,108,103,56,75,68,108,114,58,37,76,55,49,75,97,58,46,65,59,37,89,85,76,106,68,80,109,76,60,76,89,115,56,105,35,88,119,74,79,89,97,75,80,75,99,49,104,58,39,57,75,101,44,103,41,98,41,44,55,56,61,73,51,57,66,59,120,105,89,36,98,103,71,119,45,38,46,90,105,57,73,110,88,68,117,89,97,37,71,42,102,50,66,113,55,109,110,57,94,35,112,49,118,118,37,35,40,87,105,45,59,47,90,53,104,111,59,35,50,58,59,37,100,38,35,120,57,118,54,56,67,53,103,63,110,116,88,48,88,41,112,84,96,59,37,112,66,51,113,55,109,103,71,78,41,51,37,40,80,56,110,84,100,53,76,55,71,101,65,45,71,76,64,43,37,74,51,117,50,58,40,89,102,62,101,116,96,101,59,41,102,35,75,109,56,38,43,68,67,36,73,52,54,62,35,75,114,93,93,117,45,91,61,57,57,116,116,115,49,46,113,98,35,113,55,50,103,49,87,74,79,56,49,113,43,101,78,39,48,51,39,101,77,62,38,49,88,120,89,45,99,97,69,110,79,106,37,50,110,56,41,41,44,63,73,76,82,53,94,46,73,98,110,60,45,88,45,77,113,55,91,97,56,50,76,113,58,70,38,35,99,101,43,83,57,119,115,67,75,42,120,96,53,54,57,69,56,101,119,39,72,101,93,104,58,115,73,91,50,76,77,36,91,103,117,107,97,51,90,82,100,54,58,116,37,73,71,58,59,36,37,89,105,74,58,78,113,61,63,101,65,119,59,47,58,110,110,68,113,48,40,67,89,99,77,112,71,41,113,76,78,52,36,35,35,38,74,60,106,36,85,112,75,60,81,52,97,49,93,77,117,112,87,94,45,115,106,95,36,37,91,72,75,37,39,70,35,35,35,35,81,82,90,74,58,58,89,51,69,71,108,52,39,64,37,70,107,105,65,79,103,35,112,91,35,35,79,96,103,117,107,84,102,66,72,97,103,76,60,76,72,119,37,113,38,79,86,48,35,35,70,61,54,47,58,99,104,73,109,48,64,101,67,80,56,88,93,58,107,70,73,37,104,108,56,104,103,79,64,82,99,66,104,83,45,64,81,98,36,37,43,109,61,104,80,68,76,103,42,37,75,56,108,110,40,119,99,102,51,47,39,68,87,45,36,46,108,82,63,110,91,110,67,72,45,101,88,79,79,78,84,74,108,104,58,46,82,89,70,37,51,39,112,54,115,113,58,85,73,77,65,57,52,53,38,94,72,70,83,56,55,64,36,69,80,50,105,71,60,45,108,67,79,36,37,99,96,117,75,71,68,51,114,67,36,120,48,66,76,56,97,70,110,45,45,96,107,101,37,35,72,77,80,39,118,104,49,47,82,38,79,95,74,57,39,117,109,44,46,60,116,120,91,64,37,119,115,74,107,38,98,85,84,50,96,48,117,77,118,55,103,103,35,113,112,47,105,106,46,76,53,54,39,104,108,59,46,115,53,67,85,114,120,106,79,77,55,45,35,35,46,108,43,65,117,39,65,38,79,58,45,84,55,50,76,93,80,96,38,61,59,99,116,112,39,88,83,99,88,42,114,85,46,62,45,88,84,116,44,37,79,86,85,52,41,83,49,43,82,45,35,100,103,48,47,78,110,63,75,117,49,94,48,102,36,66,42,80,58,82,111,119,119,109,45,96,48,80,75,106,89,68,68,77,39,51,93,100,51,57,86,90,72,69,108,52,44,46,106,39,93,80,107,45,77,46,104,94,38,58,48,70,65,67,109,36,109,97,113,45,38,115,103,119,48,116,55,47,54,40,94,120,116,107,37,76,117,72,56,56,70,106,45,101,107,109,62,71,65,35,95,62,53,54,56,120,54,40,79,70,82,108,45,73,90,112,96,38,98,44,95,80,39,36,77,60,74,110,113,55,57,86,115,74,87,47,109,87,83,42,80,85,105,113,55,54,59,93,47,78,77,95,62,104,76,98,120,102,99,36,109,106,96,44,79,59,38,37,87,50,109,96,90,104,58,47,41,85,101,116,119,58,97,74,37,93,75,57,104,58,84,99,70,93,117,95,45,83,106,57,44,86,75,51,77,46,42,39,38,48,68,91,67,97,93,74,57,103,112,56,44,107,65,87,93,37,40,63,65,37,82,36,102,60,45,62,90,116,115,39,94,107,110,61,45,94,64,99,52,37,45,112,89,54,113,73,37,74,37,49,73,71,120,102,76,85,57,67,80,56,99,98,80,108,88,118,41,59,67,61,98,41,44,60,50,109,79,118,80,56,117,112,44,85,86,102,51,56,51,57,97,99,65,87,65,87,45,87,63,35,97,111,47,94,35,37,75,89,111,56,102,82,85,76,78,100,50,46,62,37,109,93,85,75,58,110,37,114,36,39,115,119,93,74,59,53,112,65,111,79,95,35,50,109,79,51,110,44,39,61,72,53,40,101,116,72,103,42,96,43,82,76,103,118,62,61,52,85,56,103,117,68,36,73,37,68,58,87,62,45,114,53,86,42,37,106,42,87,58,75,118,101,106,46,76,112,36,60,77,45,83,71,90,39,58,43,81,95,107,43,117,118,79,83,76,105,69,111,40,60,97,68,47,75,60,67,67,99,96,39,76,120,62,39,63,59,43,43,79,39,62,40,41,106,76,82,45,94,117,54,56,80,72,109,56,90,70,87,101,43,101,106,56,104,58,57,114,54,76,42,48,47,47,99,38,105,72,38,82,56,112,82,98,65,35,75,106,109,37,117,112,86,49,103,58,97,95,35,85,114,55,70,117,65,35,40,116,82,104,35,46,89,53,75,43,64,63,51,60,45,56,109,48,36,80,69,110,59,74,58,114,104,54,63,73,54,117,71,60,45,96,119,77,85,39,105,114,99,112,48,76,97,69,95,79,116,108,77,98,38,49,35,54,84,46,35,70,68,75,117,35,49,76,119,37,117,37,43,71,77,43,88,39,101,63,89,76,102,106,77,91,86,79,48,77,98,117,70,112,55,59,62,81,38,35,87,73,111,41,48,64,70,37,113,55,99,35,52,88,65,88,78,45,85,38,86,66,60,72,70,70,42,113,76,40,36,47,86,44,59,40,107,88,90,101,106,87,79,96,60,91,53,63,63,101,119,89,40,42,57,61,37,119,68,99,59,44,117,60,39,57,116,51,87,45,40,72,49,116,104,51,43,71,93,117,99,81,93,107,76,115,55,100,102,40,36,47,42,74,76,93,64,42,116,55,66,117,95,71,51,95,55,109,112,55,60,105,97,81,106,79,64,46,107,76,103,59,120,51,66,48,108,113,112,55,72,102,44,94,90,101,55,45,35,35,64,47,99,53,56,77,111,40,51,59,107,110,112,48,37,41,65,55,63,45,87,43,101,73,39,111,56,41,98,60,110,75,110,119,39,72,111,56,67,61,89,62,112,113,66,62,48,105,101,38,106,104,90,91,63,105,76,82,64,64,95,65,118,65,45,105,81,67,40,61,107,115,82,90,82,86,112,55,96,46,61,43,78,112,66,67,37,114,104,38,51,93,82,58,56,88,68,109,69,53,94,86,56,79,40,120,60,60,97,71,47,49,78,36,35,70,88,36,48,86,53,89,54,120,39,97,69,114,73,51,73,36,55,120,37,69,96,118,60,45,66,89,44,41,37,45,63,80,115,102,42,108,63,37,67,51,46,109,77,40,61,47,77,48,58,74,120,71,39,63,55,87,104,72,37,111,39,97,60,45,56,48,103,48,78,66,120,111,79,40,71,72,60,100,77,93,110,46,43,37,113,64,106,72,63,102,46,85,115,74,50,71,103,115,38,52,60,45,101,52,55,38,75,108,43,102,47,47,57,64,96,98,43,63,46,84,101,78,95,38,66,56,83,115,63,118,59,94,84,114,107,59,102,35,89,118,74,107,108,38,119,36,93,62,45,43,107,63,39,40,60,83,58,54,56,116,113,42,87,111,68,102,90,117,39,59,109,77,63,56,88,91,109,97,56,87,37,42,96,45,61,59,68,46,40,110,99,55,47,59,41,103,58,84,49,61,94,74,36,38,66,82,86,40,45,108,84,109,78,66,54,120,113,66,91,64,48,42,111,46,101,114,77,42,60,83,87,70,93,117,50,61,115,116,45,42,40,54,118,62,94,93,40,72,46,97,82,69,90,83,105,44,35,49,58,91,73,88,97,90,70,79,109,60,45,117,105,35,113,85,113,50,36,35,35,82,105,59,117,55,53,79,75,35,40,82,116,97,87,45,75,45,70,96,83,43,99,70,93,117,78,96,45,75,77,81,37,114,80,47,88,114,105,46,76,82,99,66,35,35,61,89,76,51,66,103,77,47,51,77,68,63,64,102,38,49,39,66,87,45,41,74,117,60,76,50,53,103,108,56,117,104,86,109,49,104,76,36,35,35,42,56,35,35,35,39,65,51,47,76,107,75,87,43,40,94,114,87,88,63,53,87,95,56,103,41,97,40,109,38,75,56,80,62,35,98,109,109,87,67,77,107,107,38,35,84,82,96,67,44,53,100,62,103,41,70,59,116,44,52,58,64,95,108,56,71,47,53,104,52,118,85,100,37,38,37,57,53,48,58,86,88,68,39,81,100,87,111,89,45,70,36,66,116,85,119,109,102,101,36,89,113,76,39,56,40,80,87,88,40,80,63,94,64,80,111,51,36,35,35,96,77,83,115,63,68,87,66,90,47,83,62,43,52,37,62,102,88,44,86,87,118,47,119,39,75,68,96,76,80,53,73,98,72,59,114,84,86,62,110,51,99,69,75,56,85,35,98,88,93,108,45,47,86,43,94,108,106,51,59,118,108,77,98,38,91,53,89,81,56,35,112,101,107,88,57,74,80,51,88,85,67,55,50,76,44,44,63,43,78,105,38,99,111,55,65,112,110,79,42,53,78,75,44,40,40,87,45,105,58,36,44,107,112,39,85,68,65,79,40,71,48,83,113,55,77,86,106,74,115,98,73,117,41,39,90,44,42,91,62,98,114,53,102,88,94,58,70,80,65,87,114,45,109,50,75,103,76,60,76,85,78,48,57,56,107,84,70,38,35,108,118,111,53,56,61,47,118,106,68,111,59,46,59,41,75,97,42,104,76,82,35,47,107,61,114,75,98,120,117,86,96,62,81,95,110,78,54,39,56,117,84,71,38,35,49,84,53,103,41,117,76,118,58,56,55,51,85,112,84,76,103,72,43,35,70,103,112,72,39,95,111,49,55,56,48,80,104,56,75,109,120,81,74,56,35,72,55,50,76,52,64,55,54,56,64,84,109,38,81,104,52,67,66,47,53,79,118,109,65,38,44,81,38,81,98,85,111,105,36,97,95,37,51,77,48,49,72,41,52,120,55,73,94,38,75,81,86,103,116,70,110,86,43,59,91,80,99,62,91,109,52,107,47,47,44,93,49,63,35,96,86,89,91,74,114,42,51,38,38,115,108,82,102,76,105,86,90,74,58,93,63,61,75,51,83,119,61,91,36,61,117,82,66,63,51,120,107,52,56,64,97,101,103,60,90,39,60,36,35,52,72,41,54,44,62,101,48,106,84,54,39,78,35,40,113,37,46,79,61,63,50,83,93,117,42,40,109,60,45,86,56,74,39,40,49,41,71,93,91,54,56,104,87,36,53,39,113,91,71,67,38,53,106,96,84,69,63,109,39,101,115,70,71,78,82,77,41,106,44,102,102,90,63,45,113,120,56,59,45,62,103,52,116,42,58,67,73,80,47,91,81,97,112,55,47,57,39,35,40,49,115,97,111,55,119,45,46,113,78,85,100,107,74,41,116,67,70,38,35,66,94,59,120,71,118,110,50,114,57,70,69,80,70,70,70,99,76,64,46,105,70,78,107,84,118,101,36,109,37,35,81,118,81,83,56,85,64,41,50,90,43,51,75,58,65,75,77,53,105,115,90,56,56,43,100,75,81,41,87,54,62,74,37,67,76,60,75,69,62,96,46,100,42,40,66,96,45,110,56,68,57,111,75,60,85,112,93,99,36,88,36,40,44,41,77,56,90,116,55,47,91,114,100,107,113,84,103,108,45,48,99,117,71,77,118,39,63,62,45,88,86,49,113,91,39,45,53,107,39,99,65,90,54,57,101,59,68,95,63,36,90,80,80,38,115,94,43,55,93,41,36,42,36,35,64,81,89,105,57,44,53,80,38,35,57,114,43,36,37,67,69,61,54,56,62,75,56,114,48,61,100,83,67,37,37,40,64,112,55,46,109,55,106,105,108,81,48,50,39,48,45,86,87,65,103,60,97,47,39,39,51,117,46,61,52,76,36,89,41,54,107,47,75,58,95,91,51,61,38,106,118,76,60,76,48,67,47,50,39,118,58,94,59,45,68,73,66,87,44,66,52,69,54,56,58,107,90,59,37,63,56,40,81,56,66,72,61,107,79,54,53,66,87,63,120,83,71,38,35,64,117,85,44,68,83,42,44,63,46,43,40,111,40,35,49,118,67,83,56,35,67,72,70,62,84,108,71,87,39,98,41,84,113,55,86,84,57,113,94,42,94,36,36,46,58,38,78,64,64,36,38,41,87,72,116,80,109,42,53,95,114,79,48,38,101,37,75,38,35,45,51,48,106,40,69,52,35,39,90,98,46,111,47,40,84,112,109,36,62,75,39,102,64,91,80,118,70,108,44,104,102,73,78,84,78,85,54,117,39,48,112,97,111,55,37,88,85,112,57,93,53,46,62,37,104,96,56,95,61,86,89,98,120,117,101,108,46,78,84,83,115,74,102,76,97,99,70,117,51,66,39,108,81,83,117,47,109,54,45,79,113,101,109,56,84,43,111,69,45,45,36,48,97,47,107,93,117,106,57,69,119,115,71,62,37,118,101,82,42,104,118,94,66,70,112,81,106,58,75,39,35,83,74,44,115,66,45,39,35,93,40,106,46,76,103,57,50,114,84,119,45,42,110,37,64,47,59,51,57,114,114,74,70,44,108,35,113,86,37,79,114,116,66,101,67,54,47,44,59,113,66,51,101,98,78,87,91,63,44,72,113,106,50,76,46,49,78,80,38,71,106,85,82,61,49,68,56,81,97,83,51,85,112,38,64,42,57,119,80,63,43,108,111,55,98,63,64,37,39,107,52,96,112,48,90,36,50,50,37,75,51,43,105,67,90,106,63,88,74,78,52,78,109,38,43,89,70,93,117,64,45,87,36,85,37,86,69,81,47,44,44,62,62,35,41,68,60,104,35,96,41,104,48,58,60,81,54,57,48,57,117,97,43,38,86,85,37,110,50,58,99,71,51,70,74,45,37,64,66,106,45,68,103,76,114,96,72,119,38,72,65,75,106,75,106,115,101,75,60,47,120,75,84,42,41,66,44,78,57,88,51,93,107,114,99,49,50,116,39,112,103,84,86,40,76,118,45,116,76,91,120,103,95,37,61,77,95,113,55,97,94,120,63,55,85,98,100,62,35,37,56,99,89,35,89,90,63,61,44,96,87,100,120,117,47,97,101,38,35,119,54,41,82,56,57,116,73,35,54,64,115,39,40,54,66,102,55,97,38,63,83,61,94,90,73,95,107,83,38,97,105,96,38,61,116,69,55,50,76,95,68,44,59,94,82,41,55,91,36,115,60,69,104,35,99,38,41,113,46,77,88,73,37,35,118,57,82,79,97,53,70,90,79,37,115,70,55,113,55,78,119,98,38,35,112,116,85,74,58,97,113,74,101,36,83,108,54,56,37,46,68,35,35,35,69,67,62,60,63,45,97,70,38,35,82,78,81,118,62,111,56,108,75,78,37,53,47,36,40,118,100,102,113,55,43,101,98,65,35,117,49,112,93,111,118,85,75,87,38,89,37,113,93,39,62,36,49,64,45,91,120,102,110,36,55,90,84,112,55,109,77,44,71,44,75,111,55,97,38,71,117,37,71,91,82,77,120,74,115,91,48,77,77,37,119,99,105,46,76,70,68,75,41,40,60,99,96,81,56,78,41,106,69,73,70,42,43,63,80,50,97,56,103,37,41,36,113,93,111,50,97,72,56,67,38,60,83,105,98,67,47,113,44,40,101,58,118,59,45,98,35,54,91,36,78,116,68,90,56,52,74,101,50,75,78,118,66,35,36,80,53,63,116,81,51,110,116,40,48,100,61,106,46,76,81,102,46,47,76,108,51,51,43,40,59,113,51,76,45,119,61,56,100,88,36,35,87,70,38,117,73,74,64,45,98,102,73,62,37,58,95,105,50,66,53,67,115,82,56,38,57,90,38,35,61,109,80,69,110,109,48,102,96,60,38,99,41,81,76,53,117,74,35,37,117,37,108,74,106,43,68,45,114,59,66,111,70,38,35,52,68,111,83,57,55,104,53,103,41,69,35,111,58,38,83,52,119,101,68,70,44,57,94,72,111,101,96,104,42,76,43,95,97,42,78,114,76,87,45,49,112,71,95,38,50,85,100,66,56,54,101,37,66,47,58,61,62,41,78,52,120,101,87,46,42,119,102,116,45,59,36,39,53,56,45,69,83,113,114,60,98,63,85,73,40,95,37,64,91,80,52,54,62,35,85,96,39,54,65,81,93,109,38,54,47,96,90,62,35,83,63,89,89,35,86,99,59,114,55,85,50,38,51,50,54,100,61,119,38,72,35,35,35,35,63,84,90,96,42,52,63,38,46,77,75,63,76,80,56,86,120,103,62,36,91,81,88,99,37,81,74,118,57,50,46,40,68,98,42,66,41,103,98,42,66,77,57,100,77,42,104,74,77,65,111,42,99,38,35,98,48,118,61,80,106,101,114,93,36,103,71,38,74,88,68,102,45,62,39,83,116,118,85,55,53,48,53,108,57,36,65,70,118,103,89,82,73,94,38,60,94,98,54,56,63,106,35,113,57,81,88,52,83,77,39,82,79,35,38,115,76,49,73,77,46,114,74,102,76,85,65,106,50,50,49,93,100,35,35,68,87,61,109,56,51,117,53,59,39,98,89,120,44,42,83,108,48,104,76,40,87,59,59,36,100,111,66,38,79,47,84,81,58,40,90,94,120,66,100,76,106,76,60,76,110,105,59,39,39,88,46,96,36,35,56,43,49,71,68,58,107,36,89,85,87,115,98,110,56,111,103,104,54,114,120,90,50,90,57,93,37,110,100,43,62,86,35,42,56,85,95,55,50,76,104,43,50,81,56,67,106,48,105,58,54,104,112,38,36,67,47,58,112,40,72,75,62,84,56,89,91,103,72,81,52,96,52,41,39,36,65,98,40,78,111,102,37,86,39,56,104,76,38,35,60,78,69,100,116,103,40,110,39,61,83,49,65,40,81,49,47,73,38,52,40,91,37,100,77,96,44,73,117,39,49,58,95,104,76,62,83,102,68,48,55,38,54,68,60,102,112,56,100,72,77,55,47,103,43,116,108,80,78,57,74,42,114,75,97,80,99,116,38,63,39,117,66,67,101,109,94,106,110,37,57,95,75,41,60,44,67,53,75,51,115,61,53,103,38,71,109,74,98,42,91,83,89,113,55,75,59,84,82,76,71,67,115,77,45,36,36,59,83,37,58,89,64,114,55,65,75,48,112,112,114,112,76,60,76,114,104,44,113,55,101,47,37,75,87,75,58,53,48,73,94,43,109,39,118,105,96,51,63,37,90,112,43,60,45,100,43,36,76,45,83,118,58,64,46,111,49,57,110,36,115,48,38,51,57,59,107,110,59,83,37,66,83,113,42,36,51,87,111,74,83,67,76,119,101,86,91,97,90,39,77,81,73,106,79,60,55,59,88,45,88,59,38,43,100,77,76,118,117,35,94,85,115,71,69,67,57,87,69,99,91,88,40,119,73,55,35,50,46,40,70,48,106,86,42,101,90,102,60,45,81,118,51,74,45,99,43,74,53,65,108,114,66,35,36,112,40,72,54,56,76,118,69,65,39,113,51,110,48,35,109,44,91,96,42,56,70,116,41,70,99,89,103,69,117,100,93,67,87,102,109,54,56,44,40,97,76,65,36,64,69,70,84,103,76,88,111,66,113,47,85,80,108,112,55,58,100,91,47,59,114,95,105,120,61,58,84,70,96,83,53,72], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+12484);
|
|
/* memory initializer */ allocate([45,98,60,76,73,38,72,89,40,75,61,104,35,41,93,76,107,36,75,49,52,108,86,102,109,58,120,36,72,60,51,94,81,108,60,77,96,36,79,104,97,112,66,110,107,117,112,39,68,35,76,36,80,98,95,96,78,42,103,93,50,101,59,88,47,68,116,103,44,98,115,106,38,75,35,50,91,45,58,105,89,114,39,95,119,103,72,41,78,85,73,82,56,97,49,110,35,83,63,89,101,106,39,104,56,94,53,56,85,98,90,100,43,94,70,75,68,42,84,64,59,54,65,55,97,81,67,91,75,56,100,45,40,118,54,71,73,36,120,58,84,60,38,39,71,112,53,85,102,62,64,77,46,42,74,58,59,36,45,114,118,50,57,39,77,93,56,113,77,118,45,116,76,112,44,39,56,56,54,105,97,67,61,72,98,42,89,74,111,75,74,44,40,106,37,75,61,72,96,75,46,118,57,72,103,103,113,66,73,105,90,117,39,81,118,66,84,46,35,61,41,48,117,107,114,117,86,38,46,41,51,61,40,94,49,96,111,42,80,106,52,60,45,60,97,78,40,40,94,55,40,39,35,90,48,119,75,35,53,71,88,64,55,117,93,91,96,42,83,94,52,51,57,51,51,65,52,114,108,93,91,96,42,79,52,67,103,76,69,108,93,118,36,49,81,51,65,101,70,51,55,100,98,88,107,44,46,41,118,106,35,120,39,100,96,59,113,103,98,81,82,37,70,87,44,50,40,63,76,79,61,115,37,83,99,54,56,37,78,80,39,35,35,65,111,116,108,56,120,61,66,69,35,106,49,85,68,40,91,51,36,77,40,93,85,73,50,76,88,51,82,112,75,78,64,59,47,35,102,39,102,47,38,95,109,116,38,70,41,88,100,70,60,57,116,52,41,81,97,46,42,107,84,76,119,81,39,40,84,84,66,57,46,120,72,39,62,35,77,74,43,103,76,113,57,45,35,35,64,72,117,90,80,78,48,93,117,58,104,55,46,84,46,46,71,58,59,36,47,85,115,106,40,84,55,96,81,56,116,84,55,50,76,110,89,108,60,45,113,120,56,59,45,72,86,55,81,45,38,88,100,120,37,49,97,44,104,67,61,48,117,43,72,108,115,86,62,110,117,73,81,76,45,53,60,78,63,41,78,66,83,41,81,78,42,95,73,44,63,38,41,50,39,73,77,37,76,51,73,41,88,40,40,101,47,100,108,50,38,56,39,60,77,58,94,35,77,42,81,43,91,84,46,88,114,105,46,76,89,83,51,118,37,102,70,96,54,56,104,59,98,45,88,91,47,69,110,39,67,82,46,113,55,69,41,112,39,47,107,108,101,50,72,77,44,117,59,94,37,79,75,67,45,78,43,76,108,37,70,57,67,70,60,78,102,39,94,35,116,50,76,44,59,50,55,87,58,48,79,64,54,35,35,85,54,87,55,58,36,114,74,102,76,87,72,106,36,35,41,119,111,113,66,101,102,73,90,46,80,75,60,98,42,116,55,101,100,59,112,42,95,109,59,52,69,120,75,35,104,64,38,93,62,95,62,64,107,88,81,116,77,97,99,102,68,46,109,45,86,65,98,56,59,73,82,101,77,51,36,119,102,48,39,39,104,114,97,42,115,111,53,54,56,39,73,112,38,118,82,115,56,52,57,39,77,82,89,83,112,37,58,116,58,104,53,113,83,103,119,112,69,114,36,66,62,81,44,59,115,40,67,35,36,41,96,115,118,81,117,70,36,35,35,45,68,44,35,35,44,103,54,56,64,50,91,84,59,46,88,83,100,78,57,81,101,41,114,112,116,46,95,75,45,35,53,119,70,41,115,80,39,35,35,112,35,67,48,99,37,45,71,98,37,104,100,43,60,45,106,39,65,105,42,120,38,38,72,77,107,84,93,67,39,79,83,108,35,35,53,82,71,91,74,88,97,72,78,59,100,39,117,65,35,120,46,95,85,59,46,96,80,85,64,40,90,51,100,116,52,114,49,53,50,64,58,118,44,39,82,46,83,106,39,119,35,48,60,45,59,107,80,73,41,70,102,74,38,35,65,89,74,38,35,47,47,41,62,45,107,61,109,61,42,88,110,75,36,62,61,41,55,50,76,93,48,73,37,62,46,71,54,57,48,97,58,36,35,35,60,44,41,59,63,59,55,50,35,63,120,57,43,100,59,94,86,39,57,59,106,89,64,59,41,98,114,35,113,94,89,81,112,120,58,88,35,84,101,36,90,94,39,61,45,61,98,71,104,76,102,58,68,54,38,98,78,119,90,57,45,90,68,35,110,94,57,72,104,76,77,114,53,71,59,39,93,100,38,54,39,119,89,109,84,70,109,76,60,76,68,41,70,94,37,91,116,67,39,56,59,43,57,69,35,67,36,103,37,35,53,89,62,113,57,119,73,62,80,40,57,109,73,91,62,107,67,45,101,107,76,67,47,82,38,67,72,43,115,39,66,59,75,45,77,54,36,69,66,37,105,115,48,48,58,43,65,52,91,55,120,107,115,46,76,114,78,107,48,38,69,41,119,73,76,89,70,64,50,76,39,48,78,98,36,43,112,118,60,40,50,46,55,54,56,47,70,114,89,38,104,36,94,51,105,38,64,43,71,37,74,84,39,60,45,44,118,96,51,59,95,41,73,57,77,94,65,69,93,67,78,63,67,108,50,65,90,103,43,37,52,105,84,112,84,51,60,110,45,38,37,72,37,98,60,70,68,106,50,77,60,104,72,61,38,69,104,60,50,76,101,110,36,98,42,97,84,88,61,45,56,81,120,78,41,107,49,49,73,77,49,99,94,106,37,57,115,60,76,60,78,70,83,111,41,66,63,43,60,45,40,71,120,115,70,44,94,45,69,104,64,36,52,100,88,104,78,36,43,35,114,120,75,56,39,106,101,39,68,55,107,96,101,59,41,50,112,89,119,80,65,39,95,112,57,38,64,94,49,56,109,108,49,94,91,64,103,52,116,42,91,74,79,97,42,91,61,81,112,55,40,113,74,95,111,79,76,94,40,39,55,102,66,38,72,113,45,58,115,102,44,115,78,106,56,120,113,94,62,36,85,52,79,93,71,75,120,39,109,57,41,98,64,112,55,89,115,118,75,51,119,94,89,82,45,67,100,81,42,58,73,114,60,40,36,117,38,41,35,40,38,63,76,57,82,103,51,72,41,52,102,105,69,112,94,105,73,57,79,56,75,110,84,106,44,93,72,63,68,42,114,55,39,77,59,80,119,90,57,75,48,69,94,107,38,45,99,112,73,59,46,112,47,54,95,118,119,111,70,77,86,60,45,62,35,37,88,105,46,76,120,86,110,114,85,40,52,38,56,47,80,43,58,104,76,83,75,106,36,35,85,37,93,52,57,116,39,73,58,114,103,77,105,39,70,76,64,97,58,48,89,45,117,65,91,51,57,39,44,40,118,98,109,97,42,104,85,37,60,45,83,82,70,96,84,116,58,53,52,50,82,95,86,86,36,112,64,91,112,56,68,86,91,65,44,63,49,56,51,57,70,87,100,70,60,84,100,100,70,60,57,65,104,45,54,38,57,116,87,111,68,108,104,93,38,49,83,112,71,77,113,62,84,105,49,79,42,72,38,35,40,65,76,56,91,95,80,37,46,77,62,118,94,45,41,41,113,79,84,42,70,53,67,113,48,96,89,101,37,43,36,66,54,105,58,55,64,48,73,88,60,78,43,84,43,48,77,108,77,66,80,81,42,86,106,62,83,115,68,60,85,52,74,72,89,56,107,68,50,41,50,102,85,47,77,35,36,101,46,41,84,52,44,95,61,56,104,76,105,109,91,38,41,59,63,85,107,75,39,45,120,63,39,40,58,115,105,73,102,76,60,36,112,70,77,96,105,60,63,37,87,40,109,71,68,72,77,37,62,105,87,80,44,35,35,80,96,37,47,76,60,101,88,105,58,64,90,57,67,46,55,111,61,64,40,112,88,100,65,79,47,78,76,81,56,108,80,108,43,72,80,79,81,97,56,119,68,56,61,94,71,108,80,97,56,84,75,73,49,67,106,104,115,67,84,83,76,74,77,39,47,87,108,62,45,83,40,113,119,37,115,102,47,64,37,35,66,54,59,47,85,55,75,93,117,90,98,105,94,79,99,94,50,110,60,98,104,80,109,85,107,77,119,62,37,116,60,41,39,109,69,86,69,39,39,110,96,87,110,74,114,97,36,94,84,75,118,88,53,66,62,59,95,97,83,69,75,39,44,40,104,119,97,48,58,105,52,71,63,46,66,99,105,46,40,88,91,63,98,42,40,36,44,61,45,110,60,46,81,37,96,40,88,61,63,43,64,65,109,42,74,115,48,38,61,51,98,104,56,75,93,109,76,60,76,111,78,115,39,54,44,39,56,53,96,48,63,116,47,39,95,85,53,57,64,93,100,100,70,60,35,76,100,70,60,101,87,100,70,60,79,117,78,47,52,53,114,89,60,45,76,64,38,35,43,102,109,62,54,57,61,76,98,44,79,99,90,86,47,41,59,84,84,109,56,86,73,59,63,37,79,116,74,60,40,98,52,109,113,55,77,54,58,117,63,75,82,100,70,60,103,82,64,50,76,61,70,78,85,45,60,98,91,40,57,99,47,77,76,51,109,59,90,91,36,111,70,51,103,41,71,65,87,113,112,65,82,99,61,60,82,79,117,55,99,76,53,108,59,45,91,65,93,37,47,43,102,115,100,59,108,35,83,97,102,84,47,102,42,87,93,48,61,79,39,36,40,84,98,60,91,41,42,64,101,55,55,53,82,45,58,89,111,98,37,103,42,62,108,42,58,120,80,63,89,98,46,53,41,37,119,95,73,63,55,117,107,53,74,67,43,70,83,40,109,35,105,39,107,46,39,97,48,105,41,57,60,55,98,39,102,115,39,53,57,104,113,36,42,53,85,104,118,35,35,112,105,94,56,43,104,73,69,66,70,96,110,118,111,96,59,39,108,48,46,94,83,49,60,45,119,85,75,50,47,67,111,104,53,56,75,75,104,76,106,77,61,83,79,42,114,102,79,96,43,113,67,96,87,45,79,110,46,61,65,74,53,54,62,62,105,50,64,50,76,72,54,65,58,38,53,113,96,63,57,73,51,64,64,39,48,52,38,112,50,47,76,86,97,42,84,45,52,60,45,105,51,59,77,57,85,118,90,100,43,78,55,62,98,42,101,73,119,103,58,67,67,41,99,60,62,110,79,38,35,60,73,71,101,59,95,95,46,116,104,106,90,108,60,37,119,40,87,107,50,120,109,112,52,81,64,73,35,73,57,44,68,70,93,117,55,45,80,61,46,45,95,58,89,74,93,97,83,64,86,63,54,42,67,40,41,100,79,112,55,58,87,76,44,98,38,51,82,103,47,46,99,109,77,57,38,114,94,62,36,40,62,46,90,45,73,38,74,40,81,48,72,100,53,81,37,55,67,111,45,98,96,45,99,60,78,40,54,114,64,105,112,43,65,117,114,75,60,109,56,54,81,73,116,104,42,35,118,59,45,79,66,113,105,43,76,55,119,68,69,45,73,114,56,75,91,39,109,43,68,68,83,76,119,75,38,47,46,63,45,86,37,85,95,37,51,58,113,75,78,117,36,95,98,42,66,45,107,112,55,78,97,68,39,81,100,87,81,80,75,89,113,91,64,62,80,41,104,73,59,42,95,70,93,117,96,82,98,91,46,106,56,95,81,47,60,38,62,117,117,43,86,115,72,36,115,77,57,84,65,37,63,41,40,118,109,74,56,48,41,44,80,55,69,62,41,116,106,68,37,50,76,61,45,116,35,102,75,91,37,96,118,61,81,56,60,70,102,78,107,103,103,94,111,73,98,97,104,42,35,56,47,81,116,36,70,38,58,75,42,45,40,78,47,39,43,49,118,77,66,44,117,40,41,45,97,46,86,85,85,42,35,91,101,37,103,65,65,79,40,83,62,87,108,65,50,41,59,83,97,62,103,88,109,56,89,66,96,49,100,64,75,35,110,93,55,54,45,97,36,85,44,109,70,60,102,88,93,105,100,113,100,41,60,51,44,93,74,55,74,109,87,52,96,54,93,117,107,115,61,52,45,55,50,76,40,106,69,107,43,58,98,74,48,77,94,113,45,56,68,109,95,90,63,48,111,108,80,49,67,57,83,97,38,72,91,100,38,99,36,111,111,81,85,106,93,69,120,100,42,51,90,77,64,45,87,71,87,50,37,115,39,44,66,45,95,77,37,62,37,85,108,58,35,47,39,120,111,70,77,57,81,88,45,36,46,81,78,39,62,91,37,36,90,36,117,70,54,112,65,54,75,105,50,79,53,58,56,119,42,118,80,49,60,45,49,96,91,71,44,41,45,109,35,62,48,96,80,38,35,101,98,35,46,51,105,41,114,116,66,54,49,40,111,39,36,63,88,51,66,60,47,82,57,48,59,101,90,93,37,78,99,113,59,45,84,108,93,35,70,62,50,81,102,116,94,97,101,95,53,116,75,76,57,77,85,101,57,98,42,115,76,69,81,57,53,67,38,96,61,71,63,64,77,106,61,119,104,42,39,51,69,62,61,45,60,41,71,116,42,73,119,41,39,81,71,58,96,64,73,119,79,102,55,38,93,49,105,39,83,48,49,66,43,69,118,47,78,97,99,35,57,83,59,61,59,89,81,112,103,95,54,85,96,42,107,86,89,51,57,120,75,44,91,47,54,65,106,55,58,39,49,66,109,45,95,49,69,89,102,97,49,43,111,38,111,52,104,112,55,75,78,95,81,40,79,108,73,111,64,83,37,59,106,86,100,110,48,39,49,60,86,99,53,50,61,117,96,51,94,111,45,110,49,39,103,52,118,53,56,72,106,38,54,95,116,55,36,35,35,63,77,41,99,60,36,98,103,81,95,39,83,89,40,40,45,120,107,65,35,89,40,44,112,39,72,57,114,73,86,89,45,98,44,39,37,98,67,80,70,55,46,74,60,85,112,94,44,40,100,85,49,86,89,42,53,35,87,107,84,85,62,104,49,57,119,44,87,81,104,76,73,41,51,83,35,102,36,50,40,101,98,44,106,114,42,98,59,51,86,119,93,42,55,78,72,37,36,99,52,86,115,44,101,68,57,62,88,87,56,63,78,93,111,43,40,42,112,103,67,37,47,55,50,76,86,45,117,60,72,112,44,51,64,101,94,57,85,66,49,74,43,97,107,57,45,84,78,47,109,104,75,80,103,43,65,74,89,100,36,77,108,118,65,70,95,106,67,75,42,46,79,45,94,40,54,51,97,100,77,84,45,62,87,37,105,101,119,83,56,87,54,109,50,114,116,67,112,111,39,82,83,49,82,56,52,61,64,112,97,84,75,116,41,62,61,37,38,49,91,41,42,118,112,39,117,43,120,44,86,114,119,78,59,38,93,107,117,79,57,74,68,98,103,61,112,79,36,74,42,46,106,86,101,59,117,39,109,48,100,114,57,108,44,60,42,119,77,75,42,79,101,61,103,56,108,86,95,75,69,66,70,107,79,39,111,85,93,94,61,91,45,55,57,50,35,111,107,44,41,105,93,108,82,56,113,81,50,111,65,56,119,99,82,67,90,94,55,119,47,78,106,104,59,63,46,115,116,88,63,81,49,62,83,49,113,52,66,110,36,41,75,49,60,45,114,71,100,79,39,36,87,114,46,76,99,46,67,71,41,36,47,42,74,76,52,116,78,82,47,44,83,86,79,51,44,97,85,119,39,68,74,78,58,41,83,115,59,119,71,110,57,65,51,50,105,106,119,37,70,76,43,90,48,70,110,46,85,57,59,114,101,83,113,41,98,109,73,51,50,85,61,61,53,65,76,117,71,38,35,86,102,49,51,57,56,47,112,86,111,49,42,99,45,40,97,89,49,54,56,111,60,96,74,115,83,98,107,45,44,49,78,59,36,62,48,58,79,85,97,115,40,51,58,56,90,57,55,50,76,83,102,70,56,101,98,61,99,45,59,62,83,80,119,55,46,54,104,110,51,109,96,57,94,88,107,110,40,114,46,113,83,91,48,59,84,37,38,81,99,61,43,83,84,82,120,88,39,113,49,66,78,107,51,38,42,101,117,50,59,38,56,113,36,38,120,62,81,35,81,55,94,84,102,43,54,60,40,100,37,90,86,109,106,50,98,68,105,37,46,51,76,50,110,43,52,87,39,36,80,105,68,68,71,41,103,44,114,37,43,63,44,36,64,63,117,111,117,53,116,83,101,50,97,78,95,65,81,85,42,60,104,96,101,45,71,73,55,41,63,79,75,50,65,46,100,55,95,99,41,63,119,81,53,65,83,64,68,76,51,114,35,55,102,83,107,103,108,54,45,43,43,68,58,39,65,44,117,113,55,83,118,108,66,36,112,99,112,72,39,113,51,110,48,35,95,37,100,89,35,120,67,112,114,45,108,60,70,48,78,82,64,45,35,35,70,69,86,54,78,84,70,54,35,35,36,108,56,52,78,49,119,63,65,79,62,39,73,65,79,85,82,81,35,35,86,94,70,118,45,88,70,98,71,77,55,70,108,40,78,60,51,68,104,76,71,70,37,113,46,49,114,67,36,35,58,84,95,95,38,80,105,54,56,37,48,120,105,95,38,91,113,70,74,40,55,55,106,95,38,74,87,111,70,46,86,55,51,53,38,84,44,91,82,42,58,120,70,82,42,75,53,62,62,35,96,98,87,45,63,52,78,101,95,38,54,78,101,95,38,54,78,101,95,38,110,96,107,114,45,35,71,74,99,77,54,88,59,117,77,54,88,59,117,77,40,46,97,46,46,94,50,84,107,76,37,111,82,40,35,59,117,46,84,37,102,65,114,37,52,116,74,56,38,62,60,49,61,71,72,90,95,43,109,57,47,35,72,49,70,94,82,35,83,67,35,42,78,61,66,65,57,40,68,63,118,91,85,105,70,89,62,62,94,56,112,44,75,75,70,46,87,93,76,50,57,117,76,107,76,108,117,47,43,52,84,60,88,111,73,66,38,104,120,61,84,49,80,99,68,97,66,38,59,72,72,43,45,65,70,114,63,40,109,57,72,90,86,41,70,75,83,56,74,67,119,59,83,68,61,54,91,94,47,68,90,85,76,96,69,85,68,102,93,71,71,108,71,38,62,119,36,41,70,46,47,94,110,51,43,114,108,111,43,68,66,59,53,115,73,89,71,78,107,43,105,49,116,45,54,57,74,103,45,45,48,112,97,111,55,83,109,35,75,41,112,100,72,87,38,59,76,117,68,78,72,64,72,62,35,47,88,45,84,73,40,59,80,62,35,44,71,99,62,35,48,83,117,62,35,52,96,49,63,35,56,108,67,63,35,60,120,85,63,35,64,46,105,63,35,68,58,37,64,35,72,70,55,64,35,76,82,73,64,35,80,95,91,64,35,84,107,110,64,35,88,119,42,65,35,93,45,61,65,35,97,57,79,65,35,100,60,70,38,35,42,59,71,35,35,46,71,89,35,35,50,83,108,35,35,54,96,40,36,35,58,108,58,36,35,62,120,76,36,35,66,46,96,36,35,70,58,114,36,35,74,70,46,37,35,78,82,64,37,35,82,95,82,37,35,86,107,101,37,35,90,119,119,37,35,95,45,52,38,35,51,94,82,104,37,83,102,108,114,45,107,39,77,83,46,111,63,46,53,47,115,87,101,108,47,119,112,69,77,48,37,51,39,47,49,41,75,94,102,49,45,100,62,71,50,49,38,118,40,51,53,62,86,96,51,57,86,55,65,52,61,111,110,120,52,65,49,79,89,53,69,73,48,59,54,73,98,103,114,54,77,36,72,83,55,81,60,41,53,56,67,53,119,44,59,87,111,65,42,35,91,37,84,42,35,96,49,103,42,35,100,61,35,43,35,104,73,53,43,35,108,85,71,43,35,112,98,89,43,35,116,110,108,43,35,120,36,41,44,35,38,49,59,44,35,42,61,77,44,35,46,73,96,44,35,50,85,114,44,35,54,98,46,45,35,59,119,91,72,35,105,81,116,65,35,109,94,48,66,35,113,106,66,66,35,117,118,84,66,35,35,45,104,66,35,39,57,36,67,35,43,69,54,67,35,47,81,72,67,35,51,94,90,67,35,55,106,109,67,35,59,118,41,68,35,63,44,60,68,35,67,56,78,68,35,71,68,97,68,35,75,80,115,68,35,79,93,47,69,35,103,49,65,53,35,75,65,42,49,35,103,67,49,55,35,77,71,100,59,35,56,40,48,50,35,76,45,100,51,35,114,87,77,52,35,72,103,97,49,35,44,60,119,48,35,84,46,106,60,35,79,35,39,50,35,67,89,78,49,35,113,97,94,58,35,95,52,109,51,35,111,64,47,61,35,101,71,56,61,35,116,56,74,53,35,96,43,55,56,35,52,117,73,45,35,109,51,66,50,35,83,66,91,56,35,81,48,64,56,35,105,91,42,57,35,105,79,110,56,35,49,78,109,59,35,94,115,78,57,35,113,104,60,57,35,58,61,120,45,35,80,59,75,50,35,36,37,88,57,35,98,67,43,46,35,82,103,59,60,35,109,78,61,46,35,77,84,70,46,35,82,90,79,46,35,50,63,41,52,35,89,35,40,47,35,91,41,49,47,35,98,59,76,47,35,100,65,85,47,35,48,83,118,59,35,108,89,36,48,35,110,96,45,48,35,115,102,54,48,35,40,70,50,52,35,119,114,72,48,35,37,47,101,48,35,84,109,68,60,35,37,74,83,77,70,111,118,101,58,67,84,66,69,88,73,58,60,101,104,50,103,41,66,44,51,104,50,94,71,51,105,59,35,100,51,106,68,62,41,52,107,77,89,68,52,108,86,117,96,52,109,96,58,38,53,110,105,85,65,53,64,40,65,53,66,65,49,93,80,66,66,58,120,108,66,67,67,61,50,67,68,76,88,77,67,69,85,116,105,67,102,38,48,103,50,39,116,78,63,80,71,84,52,67,80,71,84,52,67,80,71,84,52,67,80,71,84,52,67,80,71,84,52,67,80,71,84,52,67,80,71,84,52,67,80,71,84,52,67,80,71,84,52,67,80,71,84,52,67,80,71,84,52,67,80,71,84,52,67,80,71,84,52,67,80,45,113,101,107,67,96,46,57,107,69,103,94,43,70,36,107,119,86,105,70,74,84,66,38,53,75,84,66,38,53,75,84,66,38,53,75,84,66,38,53,75,84,66,38,53,75,84,66,38,53,75,84,66,38,53,75,84,66,38,53,75,84,66,38,53,75,84,66,38,53,75,84,66,38,53,75,84,66,38,53,75,84,66,38,53,75,84,66,38,53,75,84,66,38,53,111,44,94,60,45,50,56,90,73,39,79,63,59,120,112,79,63,59,120,112,79,63,59,120,112,79,63,59,120,112,79,63,59,120,112,79,63,59,120,112,79,63,59,120,112,79,63,59,120,112,79,63,59,120,112,79,63,59,120,112,79,63,59,120,112,79,63,59,120,112,79,63,59,120,112,79,63,59,120,112,59,55,113,45,35,108,76,89,73,58,120,118,68,61,35,0,110,107,95,102,111,110,116,95,97,116,108,97,115,95,98,97,107,101,0,116,109,112,0,97,116,108,97,115,45,62,103,108,121,112,104,115,0,97,116,108,97,115,45,62,112,105,120,101,108,0,46,46,46,46,0,105,109,103,95,114,103,98,97,0,110,107,95,102,111,110,116,95,97,116,108,97,115,95,101,110,100,0,110,107,95,102,111,110,116,95,97,116,108,97,115,95,99,108,101,97,114,0,110,107,95,105,110,112,117,116,95,98,101,103,105,110,0,110,107,95,105,110,112,117,116,95,101,110,100,0,110,107,95,105,110,112,117,116,95,109,111,116,105,111,110,0,110,107,95,105,110,112,117,116,95,107,101,121,0,110,107,95,105,110,112,117,116,95,98,117,116,116,111,110,0,110,107,95,105,110,112,117,116,95,115,99,114,111,108,108,0,110,107,95,105,110,112,117,116,95,103,108,121,112,104,0,110,107,95,105,110,112,117,116,95,117,110,105,99,111,100,101,0,115,116,97,116,101,0,110,107,95,116,101,120,116,101,100,105,116,95,116,101,120,116,0,110,107,95,116,101,120,116,101,100,105,116,95,115,101,108,101,99,116,95,97,108,108,0,110,107,95,115,116,121,108,101,95,102,114,111,109,95,116,97,98,108,101,0,175,175,175,255,45,45,45,255,40,40,40,255,65,65,65,255,50,50,50,255,40,40,40,255,35,35,35,255,100,100,100,255,120,120,120,255,45,45,45,255,45,45,45,255,35,35,35,255,38,38,38,255,100,100,100,255,120,120,120,255,150,150,150,255,38,38,38,255,38,38,38,255,175,175,175,255,45,45,45,255,120,120,120,255,45,45,45,255,255,0,0,255,40,40,40,255,100,100,100,255,120,120,120,255,150,150,150,255,40,40,40,255,110,107,95,115,116,121,108,101,95,115,101,116,95,102,111,110,116,0,110,107,95,105,110,105,116,0,110,107,95,102,114,101,101,0,110,107,95,99,108,101,97,114,0,110,107,95,95,98,101,103,105,110,0,110,107,95,95,110,101,120,116,0,110,107,95,98,101,103,105,110,0,99,116,120,45,62,115,116,121,108,101,46,102,111,110,116,46,119,105,100,116,104,32,38,38,32,34,105,102,32,116,104,105,115,32,116,114,105,103,103,101,114,115,32,121,111,117,32,102,111,114,103,111,116,32,116,111,32,97,100,100,32,97,32,102,111,110,116,34,0,33,99,116,120,45,62,99,117,114,114,101,110,116,32,38,38,32,34,105,102,32,116,104,105,115,32,116,114,105,103,103,101,114,115,32,121,111,117,32,109,105,115,115,101,100,32,97,32,96,110,107,95,101,110,100,96,32,99,97,108,108,34,0,119,105,110,0,110,107,95,101,110,100,0,99,116,120,45,62,99,117,114,114,101,110,116,32,38,38,32,34,105,102,32,116,104,105,115,32,116,114,105,103,103,101,114,115,32,121,111,117,32,102,111,114,103,111,116,32,116,111,32,99,97,108,108,32,96,110,107,95,98,101,103,105,110,96,34,0,99,116,120,45,62,99,117,114,114,101,110,116,45,62,108,97,121,111,117,116,0,99,116,120,45,62,99,117,114,114,101,110,116,0,110,107,95,119,105,100,103,101,116,0,110,107,95,116,101,120,116,95,99,111,108,111,114,101,100,0,110,107,95,116,101,120,116,0,110,107,95,98,117,116,116,111,110,95,116,101,120,116,0,110,107,95,111,112,116,105,111,110,95,116,101,120,116,0,110,97,109,101,0,118,97,108,0,110,107,95,112,114,111,112,101,114,116,121,95,105,110,116,0,110,107,95,112,114,111,112,101,114,116,121,105,0,110,107,95,99,111,108,111,114,95,112,105,99,107,0,99,111,108,111,114,0,33,40,119,105,110,45,62,102,108,97,103,115,32,38,32,78,75,95,87,73,78,68,79,87,95,80,79,80,85,80,41,0,112,111,112,117,112,45,62,112,97,114,101,110,116,0,110,107,95,112,111,112,117,112,95,101,110,100,0,110,107,95,99,111,110,116,101,120,116,117,97,108,95,101,110,100,0,110,107,95,99,111,109,98,111,95,98,101,103,105,110,95,99,111,108,111,114,0,35,118,101,114,115,105,111,110,32,49,48,48,10,117,110,105,102,111,114,109,32,109,97,116,52,32,80,114,111,106,77,116,120,59,10,97,116,116,114,105,98,117,116,101,32,118,101,99,50,32,80,111,115,105,116,105,111,110,59,10,97,116,116,114,105,98,117,116,101,32,118,101,99,50,32,84,101,120,67,111,111,114,100,59,10,97,116,116,114,105,98,117,116,101,32,118,101,99,52,32,67,111,108,111,114,59,10,118,97,114,121,105,110,103,32,118,101,99,50,32,70,114,97,103,95,85,86,59,10,118,97,114,121,105,110,103,32,118,101,99,52,32,70,114,97,103,95,67,111,108,111,114,59,10,118,111,105,100,32,109,97,105,110,40,41,32,123,10,32,32,32,70,114,97,103,95,85,86,32,61,32,84,101,120,67,111,111,114,100,59,10,32,32,32,70,114,97,103,95,67,111,108,111,114,32,61,32,67,111,108,111,114,59,10,32,32,32,103,108,95,80,111,115,105,116,105,111,110,32,61,32,80,114,111,106,77,116,120,32,42,32,118,101,99,52,40,80,111,115,105,116,105,111,110,46,120,121,44,32,48,44,32,49,41,59,10,125,10,0,35,118,101,114,115,105,111,110,32,49,48,48,10,112,114,101,99,105,115,105,111,110,32,109,101,100,105,117,109,112,32,102,108,111,97,116,59,10,117,110,105,102,111,114,109,32,115,97,109,112,108,101,114,50,68,32,84,101,120,116,117,114,101,59,10,118,97,114,121,105,110,103,32,118,101,99,50,32,70,114,97,103,95,85,86,59,10,118,97,114,121,105,110,103,32,118,101,99,52,32,70,114,97,103,95,67,111,108,111,114,59,10,118,111,105,100,32,109,97,105,110,40,41,123,10,32,32,32,103,108,95,70,114,97,103,67,111,108,111,114,32,61,32,70,114,97,103,95,67,111,108,111,114,32,42,32,116,101,120,116,117,114,101,50,68,40,84,101,120,116,117,114,101,44,32,70,114,97,103,95,85,86,41,59,10,125,10,0,115,116,97,116,117,115,32,61,61,32,71,76,95,84,82,85,69,0,46,47,110,117,107,108,101,97,114,95,103,108,102,119,95,103,108,51,46,104,0,110,107,95,103,108,102,119,51,95,100,101,118,105,99,101,95,99,114,101,97,116,101,0,84,101,120,116,117,114,101,0,80,114,111,106,77,116,120,0,80,111,115,105,116,105,111,110,0,84,101,120,67,111,111,114,100,0,67,111,108,111,114,0,68,101,109,111,0,98,117,116,116,111,110,0,98,117,116,116,111,110,32,112,114,101,115,115,101,100,10,0,101,97,115,121,0,104,97,114,100,0,67,111,109,112,114,101,115,115,105,111,110,58,0,98,97,99,107,103,114,111,117,110,100,58,0,0,0,0,0,35,82,58,0,35,71,58,0,35,66,58,0,35,65,58,0,69,114,114,111,114,32,37,100,58,32,37,115,10,0,114,101,116,117,114,110,32,33,33,40,100,111,99,117,109,101,110,116,46,102,117,108,108,115,99,114,101,101,110,69,108,101,109,101,110,116,32,124,124,32,100,111,99,117,109,101,110,116,46,109,111,122,70,117,108,108,83,99,114,101,101,110,69,108,101,109,101,110,116,32,124,124,32,100,111,99,117,109,101,110,116,46,119,101,98,107,105,116,70,117,108,108,115,99,114,101,101,110,69,108,101,109,101,110,116,32,124,124,32,100,111,99,117,109,101,110,116,46,109,115,70,117,108,108,115,99,114,101,101,110,69,108,101,109,101,110,116,41,0,83,117,99,99,101,115,115,102,117,108,108,121,32,116,114,97,110,115,105,116,105,111,110,101,100,32,116,111,32,102,117,108,108,115,99,114,101,101,110,32,109,111,100,101,33,10,0,69,120,105,116,101,100,32,102,117,108,108,115,99,114,101,101,110,46,32,84,101,115,116,32,115,117,99,99,101,101,100,101,100,46,10,0,67,111,117,108,100,32,110,111,116,32,99,114,101,97,116,101,32,119,105,110,100,111,119,46,32,84,101,115,116,32,102,97,105,108,101,100,46,10,0,71,76,70,87,32,114,101,115,105,122,105,110,103,32,116,101,115,116,32,45,32,119,105,110,100,111,119,101,100,0,110,107,95,122,101,114,111,0,105,0,110,107,95,117,116,102,95,100,101,99,111,100,101,95,98,121,116,101,0,192,128,224,240,248,128,0,192,224,240,110,107,95,117,116,102,95,118,97,108,105,100,97,116,101,0,110,107,95,98,117,102,102,101,114,95,97,108,108,111,99,0,98,45,62,116,121,112,101,32,61,61,32,78,75,95,66,85,70,70,69,82,95,68,89,78,65,77,73,67,0,98,45,62,112,111,111,108,46,97,108,108,111,99,32,38,38,32,98,45,62,112,111,111,108,46,102,114,101,101,0,110,107,95,98,117,102,102,101,114,95,114,101,97,108,108,111,99,0,110,107,95,99,111,109,109,97,110,100,95,98,117,102,102,101,114,95,112,117,115,104,0,98,45,62,98,97,115,101,0,110,107,95,100,114,97,119,95,108,105,115,116,95,97,108,108,111,99,95,118,101,114,116,105,99,101,115,0,110,107,95,100,114,97,119,95,108,105,115,116,95,97,108,108,111,99,95,101,108,101,109,101,110,116,115,0,110,107,95,100,114,97,119,95,108,105,115,116,95,97,100,100,95,99,108,105,112,0,110,107,95,100,114,97,119,95,108,105,115,116,95,112,117,115,104,95,99,111,109,109,97,110,100,0,108,105,115,116,45,62,99,109,100,95,99,111,117,110,116,0,110,107,95,100,114,97,119,95,108,105,115,116,95,99,111,109,109,97,110,100,95,108,97,115,116,0,110,107,95,100,114,97,119,95,108,105,115,116,95,112,117,115,104,95,105,109,97,103,101,0,110,107,95,100,114,97,119,95,108,105,115,116,95,112,97,116,104,95,108,97,115,116,0,110,107,95,100,114,97,119,95,108,105,115,116,95,112,117,115,104,95,114,101,99,116,95,117,118,0,114,97,110,103,101,0,110,107,95,114,97,110,103,101,95,99,111,117,110,116,0,116,32,62,61,32,102,0,110,107,95,114,97,110,103,101,95,103,108,121,112,104,95,99,111,117,110,116,0,99,109,97,112,0,108,111,99,97,0,104,101,97,100,0,103,108,121,102,0,104,104,101,97,0,104,109,116,120,0,107,101,114,110,0,109,97,120,112,0,119,105,100,116,104,32,60,61,32,48,120,102,102,102,102,32,38,38,32,104,101,105,103,104,116,32,60,61,32,48,120,102,102,102,102,0,110,107,95,114,112,95,105,110,105,116,95,116,97,114,103,101,116,0,104,95,111,118,101,114,115,97,109,112,108,101,32,60,61,32,56,0,110,107,95,116,116,95,80,97,99,107,83,101,116,79,118,101,114,115,97,109,112,108,105,110,103,0,118,95,111,118,101,114,115,97,109,112,108,101,32,60,61,32,56,0,119,105,100,116,104,32,37,32,99,45,62,97,108,105,103,110,32,61,61,32,48,0,110,107,95,114,112,95,95,115,107,121,108,105,110,101,95,102,105,110,100,95,98,101,115,116,95,112,111,115,0,120,112,111,115,32,62,61,32,48,0,110,111,100,101,45,62,110,101,120,116,45,62,120,32,62,32,120,112,111,115,32,38,38,32,110,111,100,101,45,62,120,32,60,61,32,120,112,111,115,0,121,32,60,61,32,98,101,115,116,95,121,0,102,105,114,115,116,45,62,120,32,60,61,32,120,48,0,110,107,95,114,112,95,95,115,107,121,108,105,110,101,95,102,105,110,100,95,109,105,110,95,121,0,110,111,100,101,45,62,110,101,120,116,45,62,120,32,62,32,120,48,0,110,111,100,101,45,62,120,32,60,61,32,120,48,0,48,0,110,107,95,116,116,95,70,105,110,100,71,108,121,112,104,73,110,100,101,120,0,117,110,105,99,111,100,101,95,99,111,100,101,112,111,105,110,116,32,60,61,32,110,107,95,116,116,85,83,72,79,82,84,40,100,97,116,97,32,43,32,101,110,100,67,111,117,110,116,32,43,32,50,42,105,116,101,109,41,0,110,107,95,116,116,95,71,101,116,71,108,121,112,104,83,104,97,112,101,0,110,107,95,116,116,95,82,97,115,116,101,114,105,122,101,0,122,45,62,100,105,114,101,99,116,105,111,110,0,110,107,95,116,116,95,95,114,97,115,116,101,114,105,122,101,95,115,111,114,116,101,100,95,101,100,103,101,115,0,122,45,62,101,121,32,62,61,32,115,99,97,110,95,121,95,116,111,112,0,101,45,62,101,121,32,62,61,32,121,95,116,111,112,0,110,107,95,116,116,95,95,102,105,108,108,95,97,99,116,105,118,101,95,101,100,103,101,115,95,110,101,119,0,101,45,62,115,121,32,60,61,32,121,95,98,111,116,116,111,109,32,38,38,32,101,45,62,101,121,32,62,61,32,121,95,116,111,112,0,120,32,62,61,32,48,32,38,38,32,120,32,60,32,108,101,110,0,121,48,32,60,32,121,49,0,110,107,95,116,116,95,95,104,97,110,100,108,101,95,99,108,105,112,112,101,100,95,101,100,103,101,0,101,45,62,115,121,32,60,61,32,101,45,62,101,121,0,120,49,32,60,61,32,120,43,49,0,120,49,32,62,61,32,120,0,120,49,32,60,61,32,120,0,120,49,32,62,61,32,120,43,49,0,120,49,32,62,61,32,120,32,38,38,32,120,49,32,60,61,32,120,43,49,0,120,48,32,62,61,32,120,32,38,38,32,120,48,32,60,61,32,120,43,49,32,38,38,32,120,49,32,62,61,32,120,32,38,38,32,120,49,32,60,61,32,120,43,49,0,112,105,120,101,108,115,91,105,93,32,61,61,32,48,0,110,107,95,116,116,95,95,104,95,112,114,101,102,105,108,116,101,114,0,112,105,120,101,108,115,91,105,42,115,116,114,105,100,101,95,105,110,95,98,121,116,101,115,93,32,61,61,32,48,0,110,107,95,116,116,95,95,118,95,112,114,101,102,105,108,116,101,114,0,110,107,95,102,111,110,116,95,116,101,120,116,95,119,105,100,116,104,0,103,108,121,112,104,0,110,107,95,102,111,110,116,95,113,117,101,114,121,95,102,111,110,116,95,103,108,121,112,104,0,110,107,95,95,100,111,117,116,32,61,61,32,111,117,116,112,117,116,32,43,32,111,108,101,110,0,110,107,95,100,101,99,111,109,112,114,101,115,115,0,110,107,95,95,100,111,117,116,32,60,61,32,111,117,116,112,117,116,32,43,32,111,108,101,110,0,110,107,95,95,100,111,117,116,32,43,32,108,101,110,103,116,104,32,60,61,32,110,107,95,95,98,97,114,114,105,101,114,0,110,107,95,95,109,97,116,99,104,0,110,107,95,95,108,105,116,0,110,107,95,115,101,116,117,112,0,105,116,101,114,32,33,61,32,105,116,101,114,45,62,110,101,120,116,0,110,107,95,102,105,110,100,95,119,105,110,100,111,119,0,101,108,101,109,0,110,107,95,99,114,101,97,116,101,95,112,97,103,101,95,101,108,101,109,101,110,116,0,112,111,111,108,45,62,112,97,103,101,115,0,110,107,95,112,111,111,108,95,97,108,108,111,99,0,112,111,111,108,45,62,112,97,103,101,115,45,62,115,105,122,101,32,60,32,112,111,111,108,45,62,99,97,112,97,99,105,116,121,0,110,107,95,105,110,115,101,114,116,95,119,105,110,100,111,119,0,105,116,101,114,32,33,61,32,119,105,110,0,99,109,100,98,117,102,0,110,107,95,99,111,109,109,97,110,100,95,98,117,102,102,101,114,95,105,110,105,116,0,110,107,95,115,116,97,114,116,0,110,107,95,112,97,110,101,108,95,98,101,103,105,110,0,110,107,95,112,97,110,101,108,95,101,110,100,0,33,108,97,121,111,117,116,45,62,114,111,119,46,116,114,101,101,95,100,101,112,116,104,0,111,117,116,0,110,107,95,100,111,95,115,99,114,111,108,108,98,97,114,118,0,115,116,121,108,101,0,110,107,95,100,111,95,115,99,114,111,108,108,98,97,114,104,0,110,107,95,99,111,109,109,97,110,100,95,98,117,102,102,101,114,95,114,101,115,101,116,0,110,107,95,102,105,110,105,115,104,0,110,107,95,114,111,119,95,108,97,121,111,117,116,0,110,107,95,112,97,110,101,108,95,108,97,121,111,117,116,0,110,107,95,108,97,121,111,117,116,95,119,105,100,103,101,116,95,115,112,97,99,101,0,98,111,117,110,100,115,0,108,97,121,111,117,116,45,62,114,111,119,46,114,97,116,105,111,0,110,107,95,112,97,110,101,108,95,97,108,108,111,99,95,115,112,97,99,101,0,111,0,110,107,95,119,105,100,103,101,116,95,116,101,120,116,0,116,0,110,107,95,100,111,95,98,117,116,116,111,110,95,116,101,120,116,0,115,116,114,105,110,103,0,110,107,95,100,111,95,98,117,116,116,111,110,0,110,107,95,100,111,95,98,117,116,116,111,110,95,115,121,109,98,111,108,0,110,107,95,100,111,95,116,111,103,103,108,101,0,110,107,95,100,111,95,101,100,105,116,0,10,0,32,32,32,32,0,115,101,108,101,99,116,95,98,101,103,105,110,95,112,116,114,0,115,101,108,101,99,116,95,101,110,100,95,112,116,114,0,99,117,114,115,111,114,95,112,116,114,0,110,107,95,101,100,105,116,95,100,114,97,119,95,116,101,120,116,0,110,107,95,112,114,111,112,101,114,116,121,0,110,107,95,100,111,95,99,111,108,111,114,95,112,105,99,107,101,114,0,110,107,95,99,111,108,111,114,95,112,105,99,107,101,114,95,98,101,104,97,118,105,111,114,0,109,97,116,114,105,120,0,104,117,101,95,98,97,114,0,0,0,0,255,255,255,255,255,0,0,0,0,110,107,95,100,114,97,119,95,99,111,108,111,114,95,112,105,99,107,101,114,0,97,108,112,104,97,95,98,97,114,0,255,0,0,255,255,255,0,255,0,255,0,255,0,255,255,255,0,0,255,255,255,0,255,255,255,0,0,255,110,107,95,117,110,105,102,121,0,99,108,105,112,0,110,107,95,115,116,97,114,116,95,112,111,112,117,112,0,110,107,95,102,105,110,105,115,104,95,112,111,112,117,112,0,110,107,95,110,111,110,98,108,111,99,107,95,98,101,103,105,110,0,110,107,95,99,111,109,98,111,95,98,101,103,105,110,0,120,0,95,0,43,0,45,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+22724);
|
|
/* memory initializer */ allocate([97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+32964);
|
|
/* memory initializer */ allocate([17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,46,0], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+34939);
|
|
|
|
|
|
|
|
|
|
|
|
/* no memory initializer */
|
|
var tempDoublePtr = Runtime.alignMemory(allocate(12, "i8", ALLOC_STATIC), 8);
|
|
|
|
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}}
|
|
|
|
|
|
|
|
Module["_i64Subtract"] = _i64Subtract;
|
|
|
|
|
|
var GL={counter:1,lastError:0,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],uniforms:[],shaders:[],vaos:[],contexts:[],currentContext:null,byteSizeByTypeRoot:5120,byteSizeByType:[1,1,2,2,4,4,4,2,3,4,8],programInfos:{},stringCache:{},packAlignment:4,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:16,miniTempBuffer:null,miniTempBufferViews:[0],getSource:function (shader, count, string, length) {
|
|
var source = '';
|
|
for (var i = 0; i < count; ++i) {
|
|
var frag;
|
|
if (length) {
|
|
var len = HEAP32[(((length)+(i*4))>>2)];
|
|
if (len < 0) {
|
|
frag = Pointer_stringify(HEAP32[(((string)+(i*4))>>2)]);
|
|
} else {
|
|
frag = Pointer_stringify(HEAP32[(((string)+(i*4))>>2)], len);
|
|
}
|
|
} else {
|
|
frag = Pointer_stringify(HEAP32[(((string)+(i*4))>>2)]);
|
|
}
|
|
source += frag;
|
|
}
|
|
return source;
|
|
},createContext:function (canvas, webGLContextAttributes) {
|
|
if (typeof webGLContextAttributes.majorVersion === 'undefined' && typeof webGLContextAttributes.minorVersion === 'undefined') {
|
|
webGLContextAttributes.majorVersion = 1;
|
|
webGLContextAttributes.minorVersion = 0;
|
|
}
|
|
var ctx;
|
|
var errorInfo = '?';
|
|
function onContextCreationError(event) {
|
|
errorInfo = event.statusMessage || errorInfo;
|
|
}
|
|
try {
|
|
canvas.addEventListener('webglcontextcreationerror', onContextCreationError, false);
|
|
try {
|
|
if (webGLContextAttributes.majorVersion == 1 && webGLContextAttributes.minorVersion == 0) {
|
|
ctx = canvas.getContext("webgl", webGLContextAttributes) || canvas.getContext("experimental-webgl", webGLContextAttributes);
|
|
} else if (webGLContextAttributes.majorVersion == 2 && webGLContextAttributes.minorVersion == 0) {
|
|
ctx = canvas.getContext("webgl2", webGLContextAttributes) || canvas.getContext("experimental-webgl2", webGLContextAttributes);
|
|
} else {
|
|
throw 'Unsupported WebGL context version ' + majorVersion + '.' + minorVersion + '!'
|
|
}
|
|
} finally {
|
|
canvas.removeEventListener('webglcontextcreationerror', onContextCreationError, false);
|
|
}
|
|
if (!ctx) throw ':(';
|
|
} catch (e) {
|
|
Module.print('Could not create canvas: ' + [errorInfo, e, JSON.stringify(webGLContextAttributes)]);
|
|
return 0;
|
|
}
|
|
// possible GL_DEBUG entry point: ctx = wrapDebugGL(ctx);
|
|
|
|
if (!ctx) return 0;
|
|
return GL.registerContext(ctx, webGLContextAttributes);
|
|
},registerContext:function (ctx, webGLContextAttributes) {
|
|
var handle = GL.getNewId(GL.contexts);
|
|
var context = {
|
|
handle: handle,
|
|
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) {
|
|
var context = GL.contexts[contextHandle];
|
|
if (!context) return false;
|
|
GLctx = Module.ctx = context.GLctx; // Active WebGL context object.
|
|
GL.currentContext = context; // Active Emscripten GL layer context object.
|
|
return true;
|
|
},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.
|
|
GL.contexts[contextHandle] = null;
|
|
},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;
|
|
|
|
context.maxVertexAttribs = GLctx.getParameter(GLctx.MAX_VERTEX_ATTRIBS);
|
|
|
|
// Detect the presence of a few extensions manually, this GL interop layer itself will need to know if they exist.
|
|
|
|
if (context.version < 2) {
|
|
// Extension available from Firefox 26 and Google Chrome 30
|
|
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); };
|
|
}
|
|
|
|
// Extension available from Firefox 25 and WebKit
|
|
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); };
|
|
}
|
|
}
|
|
|
|
// 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 = [ "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", "ANGLE_instanced_arrays",
|
|
"OES_texture_float_linear", "OES_texture_half_float_linear", "WEBGL_compressed_texture_atc",
|
|
"WEBGL_compressed_texture_pvrtc", "EXT_color_buffer_half_float", "WEBGL_color_buffer_float",
|
|
"EXT_frag_depth", "EXT_sRGB", "WEBGL_draw_buffers", "WEBGL_shared_resources",
|
|
"EXT_shader_texture_lod" ];
|
|
|
|
function shouldEnableAutomatically(extension) {
|
|
var ret = false;
|
|
automaticallyEnabledExtensions.forEach(function(include) {
|
|
if (ext.indexOf(include) != -1) {
|
|
ret = true;
|
|
}
|
|
});
|
|
return ret;
|
|
}
|
|
|
|
var exts = GLctx.getSupportedExtensions();
|
|
if (exts && exts.length > 0) {
|
|
GLctx.getSupportedExtensions().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];
|
|
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.
|
|
};
|
|
|
|
var ptable = GL.programInfos[program];
|
|
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, GLctx.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);
|
|
|
|
// Strip off any trailing array specifier we might have got, e.g. "[0]".
|
|
if (name.indexOf(']', name.length-1) !== -1) {
|
|
var ls = name.lastIndexOf('[');
|
|
name = name.slice(0, ls);
|
|
}
|
|
|
|
// 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);
|
|
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 _glClearColor(x0, x1, x2, x3) { GLctx.clearColor(x0, x1, x2, x3) }
|
|
|
|
|
|
Module["_i64Add"] = _i64Add;
|
|
|
|
|
|
|
|
function _emscripten_get_now() {
|
|
if (!_emscripten_get_now.actual) {
|
|
if (ENVIRONMENT_IS_NODE) {
|
|
_emscripten_get_now.actual = function _emscripten_get_now_actual() {
|
|
var t = process['hrtime']();
|
|
return t[0] * 1e3 + t[1] / 1e6;
|
|
}
|
|
} else if (typeof dateNow !== 'undefined') {
|
|
_emscripten_get_now.actual = dateNow;
|
|
} else if (typeof self === 'object' && self['performance'] && typeof self['performance']['now'] === 'function') {
|
|
_emscripten_get_now.actual = function _emscripten_get_now_actual() { return self['performance']['now'](); };
|
|
} else if (typeof performance === 'object' && typeof performance['now'] === 'function') {
|
|
_emscripten_get_now.actual = function _emscripten_get_now_actual() { return performance['now'](); };
|
|
} else {
|
|
_emscripten_get_now.actual = Date.now;
|
|
}
|
|
}
|
|
return _emscripten_get_now.actual();
|
|
}var GLFW={Window:function (id, width, height, title, monitor, share) {
|
|
this.id = id;
|
|
this.x = 0;
|
|
this.y = 0;
|
|
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.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.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];
|
|
},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 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 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 0x61: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;
|
|
|
|
// correct unicode charCode is only available with onKeyPress event
|
|
var charCode = event.charCode;
|
|
if (charCode == 0 || (charCode >= 0x00 && charCode <= 0x1F)) return;
|
|
|
|
|
|
Runtime.dynCall('vii', GLFW.active.charFunc, [GLFW.active.id, charCode]);
|
|
},onKeyChanged:function (event, status) {
|
|
if (!GLFW.active) return;
|
|
|
|
var key = GLFW.DOMToGLFWKeyCode(event.keyCode);
|
|
if (key == -1) return;
|
|
|
|
GLFW.active.keys[key] = status;
|
|
if (!GLFW.active.keyFunc) return;
|
|
|
|
|
|
Runtime.dynCall('viiiii', GLFW.active.keyFunc, [GLFW.active.id, key, event.keyCode, status, GLFW.getModBits(GLFW.active)]);
|
|
},onKeydown:function (event) {
|
|
GLFW.onKeyChanged(event, 1); // GLFW_PRESS
|
|
|
|
// 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, 0); // GLFW_RELEASE
|
|
},onMousemove:function (event) {
|
|
if (!GLFW.active) return;
|
|
|
|
Browser.calculateMouseEvent(event);
|
|
|
|
if (event.target != Module["canvas"] || !GLFW.active.cursorPosFunc) return;
|
|
|
|
|
|
Runtime.dynCall('vidd', GLFW.active.cursorPosFunc, [GLFW.active.id, Browser.mouseX, Browser.mouseY]);
|
|
},onMouseButtonChanged:function (event, status) {
|
|
if (!GLFW.active || !GLFW.active.mouseButtonFunc) return;
|
|
|
|
Browser.calculateMouseEvent(event);
|
|
|
|
if (event.target != Module["canvas"]) return;
|
|
|
|
if (status == 1) { // GLFW_PRESS
|
|
try {
|
|
event.target.setCapture();
|
|
} catch (e) {}
|
|
}
|
|
|
|
// DOM and glfw have different button codes
|
|
var eventButton = event['button'];
|
|
if (eventButton > 0) {
|
|
if (eventButton == 1) {
|
|
eventButton = 2;
|
|
} else {
|
|
eventButton = 1;
|
|
}
|
|
}
|
|
|
|
|
|
Runtime.dynCall('viiii', GLFW.active.mouseButtonFunc, [GLFW.active.id, eventButton, status, GLFW.getModBits(GLFW.active)]);
|
|
},onMouseButtonDown:function (event) {
|
|
if (!GLFW.active) return;
|
|
GLFW.active.buttons |= (1 << event['button']);
|
|
GLFW.onMouseButtonChanged(event, 1); // GLFW_PRESS
|
|
},onMouseButtonUp:function (event) {
|
|
if (!GLFW.active) return;
|
|
GLFW.active.buttons &= ~(1 << event['button']);
|
|
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;
|
|
}
|
|
|
|
Runtime.dynCall('vidd', GLFW.active.scrollFunc, [GLFW.active.id, sx, sy]);
|
|
|
|
event.preventDefault();
|
|
},onFullScreenEventChange:function () {
|
|
if (!GLFW.active) return;
|
|
|
|
if (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;
|
|
} else {
|
|
GLFW.active.x = GLFW.active.storedX;
|
|
GLFW.active.y = GLFW.active.storedY;
|
|
GLFW.active.width = GLFW.active.storedWidth;
|
|
GLFW.active.height = GLFW.active.storedHeight;
|
|
}
|
|
|
|
Browser.setCanvasSize(GLFW.active.width, GLFW.active.height, true); // resets the canvas size to counter the aspect preservation of Browser.updateCanvasDimensions
|
|
|
|
if (!GLFW.active.windowSizeFunc) return;
|
|
|
|
|
|
Runtime.dynCall('viii', GLFW.active.windowSizeFunc, [GLFW.active.id, GLFW.active.width, GLFW.active.height]);
|
|
},requestFullScreen:function () {
|
|
var RFS = Module["canvas"]['requestFullscreen'] ||
|
|
Module["canvas"]['requestFullScreen'] ||
|
|
Module["canvas"]['mozRequestFullScreen'] ||
|
|
Module["canvas"]['webkitRequestFullScreen'] ||
|
|
(function() {});
|
|
RFS.apply(Module["canvas"], []);
|
|
},cancelFullScreen:function () {
|
|
var CFS = document['exitFullscreen'] ||
|
|
document['cancelFullScreen'] ||
|
|
document['mozCancelFullScreen'] ||
|
|
document['webkitCancelFullScreen'] ||
|
|
(function() {});
|
|
CFS.apply(document, []);
|
|
},getTime:function () {
|
|
return _emscripten_get_now() / 1000;
|
|
},setWindowTitle:function (winid, title) {
|
|
var win = GLFW.WindowFromId(winid);
|
|
if (!win) return;
|
|
|
|
win.title = Pointer_stringify(title);
|
|
if (GLFW.active.id == win.id) {
|
|
document.title = win.title;
|
|
}
|
|
},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;
|
|
},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;
|
|
},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.cancelFullScreen();
|
|
Browser.setCanvasSize(width, height);
|
|
win.width = width;
|
|
win.height = height;
|
|
}
|
|
}
|
|
|
|
if (!win.windowResizeFunc) return;
|
|
|
|
|
|
Runtime.dynCall('viii', win.windowResizeFunc, [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
|
|
}
|
|
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)
|
|
Runtime.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) {
|
|
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 _glfwGetCursorPos(winid, x, y) {
|
|
GLFW.getCursorPos(winid, x, y);
|
|
}
|
|
|
|
function _glfwSetCursorPos(winid, x, y) {
|
|
GLFW.setCursorPos(winid, x, y);
|
|
}
|
|
|
|
function _glLinkProgram(program) {
|
|
GLctx.linkProgram(GL.programs[program]);
|
|
GL.programInfos[program] = null; // uniforms no longer keep the same names after linking
|
|
GL.populateUniformTable(program);
|
|
}
|
|
|
|
function _glShaderSource(shader, count, string, length) {
|
|
var source = GL.getSource(shader, count, string, length);
|
|
GLctx.shaderSource(GL.shaders[shader], source);
|
|
}
|
|
|
|
function _glBindTexture(target, texture) {
|
|
GLctx.bindTexture(target, texture ? GL.textures[texture] : null);
|
|
}
|
|
|
|
|
|
function ___setErrNo(value) {
|
|
if (Module['___errno_location']) HEAP32[((Module['___errno_location']())>>2)]=value;
|
|
else Module.printErr('failed to set errno from JS');
|
|
return value;
|
|
}
|
|
|
|
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};function _sysconf(name) {
|
|
// long sysconf(int name);
|
|
// http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html
|
|
switch(name) {
|
|
case 30: return PAGE_SIZE;
|
|
case 85: return totalMemory / PAGE_SIZE;
|
|
case 132:
|
|
case 133:
|
|
case 12:
|
|
case 137:
|
|
case 138:
|
|
case 15:
|
|
case 235:
|
|
case 16:
|
|
case 17:
|
|
case 18:
|
|
case 19:
|
|
case 20:
|
|
case 149:
|
|
case 13:
|
|
case 10:
|
|
case 236:
|
|
case 153:
|
|
case 9:
|
|
case 21:
|
|
case 22:
|
|
case 159:
|
|
case 154:
|
|
case 14:
|
|
case 77:
|
|
case 78:
|
|
case 139:
|
|
case 80:
|
|
case 81:
|
|
case 82:
|
|
case 68:
|
|
case 67:
|
|
case 164:
|
|
case 11:
|
|
case 29:
|
|
case 47:
|
|
case 48:
|
|
case 95:
|
|
case 52:
|
|
case 51:
|
|
case 46:
|
|
return 200809;
|
|
case 79:
|
|
return 0;
|
|
case 27:
|
|
case 246:
|
|
case 127:
|
|
case 128:
|
|
case 23:
|
|
case 24:
|
|
case 160:
|
|
case 161:
|
|
case 181:
|
|
case 182:
|
|
case 242:
|
|
case 183:
|
|
case 184:
|
|
case 243:
|
|
case 244:
|
|
case 245:
|
|
case 165:
|
|
case 178:
|
|
case 179:
|
|
case 49:
|
|
case 50:
|
|
case 168:
|
|
case 169:
|
|
case 175:
|
|
case 170:
|
|
case 171:
|
|
case 172:
|
|
case 97:
|
|
case 76:
|
|
case 32:
|
|
case 173:
|
|
case 35:
|
|
return -1;
|
|
case 176:
|
|
case 177:
|
|
case 7:
|
|
case 155:
|
|
case 8:
|
|
case 157:
|
|
case 125:
|
|
case 126:
|
|
case 92:
|
|
case 93:
|
|
case 129:
|
|
case 130:
|
|
case 131:
|
|
case 94:
|
|
case 91:
|
|
return 1;
|
|
case 74:
|
|
case 60:
|
|
case 69:
|
|
case 70:
|
|
case 4:
|
|
return 1024;
|
|
case 31:
|
|
case 42:
|
|
case 72:
|
|
return 32;
|
|
case 87:
|
|
case 26:
|
|
case 33:
|
|
return 2147483647;
|
|
case 34:
|
|
case 1:
|
|
return 47839;
|
|
case 38:
|
|
case 36:
|
|
return 99;
|
|
case 43:
|
|
case 37:
|
|
return 2048;
|
|
case 0: return 2097152;
|
|
case 3: return 65536;
|
|
case 28: return 32768;
|
|
case 44: return 32767;
|
|
case 75: return 16384;
|
|
case 39: return 1000;
|
|
case 89: return 700;
|
|
case 71: return 256;
|
|
case 40: return 255;
|
|
case 2: return 100;
|
|
case 180: return 64;
|
|
case 25: return 20;
|
|
case 5: return 16;
|
|
case 6: return 6;
|
|
case 73: return 4;
|
|
case 84: {
|
|
if (typeof navigator === 'object') return navigator['hardwareConcurrency'] || 1;
|
|
return 1;
|
|
}
|
|
}
|
|
___setErrNo(ERRNO_CODES.EINVAL);
|
|
return -1;
|
|
}
|
|
|
|
function _glDetachShader(program, shader) {
|
|
GLctx.detachShader(GL.programs[program],
|
|
GL.shaders[shader]);
|
|
}
|
|
|
|
function _glClear(x0) { GLctx.clear(x0) }
|
|
|
|
function _glfwSetCharCallback(winid, cbfun) {
|
|
GLFW.setCharCallback(winid, cbfun);
|
|
}
|
|
|
|
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 _glEnableVertexAttribArray(index) {
|
|
GLctx.enableVertexAttribArray(index);
|
|
}
|
|
|
|
function _glBindBuffer(target, buffer) {
|
|
var bufferObj = buffer ? GL.buffers[buffer] : null;
|
|
|
|
|
|
GLctx.bindBuffer(target, bufferObj);
|
|
}
|
|
|
|
function _glCompileShader(shader) {
|
|
GLctx.compileShader(GL.shaders[shader]);
|
|
}
|
|
|
|
function _emscripten_cancel_main_loop() {
|
|
Browser.mainLoop.pause();
|
|
Browser.mainLoop.func = 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;
|
|
}
|
|
}
|
|
|
|
|
|
Module["_bitshift64Lshr"] = _bitshift64Lshr;
|
|
|
|
function _glBufferData(target, size, data, usage) {
|
|
switch (usage) { // fix usages, WebGL only has *_DRAW
|
|
case 0x88E1: // GL_STREAM_READ
|
|
case 0x88E2: // GL_STREAM_COPY
|
|
usage = 0x88E0; // GL_STREAM_DRAW
|
|
break;
|
|
case 0x88E5: // GL_STATIC_READ
|
|
case 0x88E6: // GL_STATIC_COPY
|
|
usage = 0x88E4; // GL_STATIC_DRAW
|
|
break;
|
|
case 0x88E9: // GL_DYNAMIC_READ
|
|
case 0x88EA: // GL_DYNAMIC_COPY
|
|
usage = 0x88E8; // GL_DYNAMIC_DRAW
|
|
break;
|
|
}
|
|
if (!data) {
|
|
GLctx.bufferData(target, size, usage);
|
|
} else {
|
|
GLctx.bufferData(target, HEAPU8.subarray(data, data+size), usage);
|
|
}
|
|
}
|
|
|
|
function _glfwCreateWindow(width, height, title, monitor, share) {
|
|
return GLFW.createWindow(width, height, title, monitor, share);
|
|
}
|
|
|
|
function _glfwSetWindowSizeCallback(winid, cbfun) {
|
|
GLFW.setWindowSizeCallback(winid, cbfun);
|
|
}
|
|
|
|
function _pthread_cleanup_push(routine, arg) {
|
|
__ATEXIT__.push(function() { Runtime.dynCall('vi', routine, [arg]) })
|
|
_pthread_cleanup_push.level = __ATEXIT__.length;
|
|
}
|
|
|
|
function _pthread_cleanup_pop() {
|
|
assert(_pthread_cleanup_push.level == __ATEXIT__.length, 'cannot pop if something else added meanwhile!');
|
|
__ATEXIT__.pop();
|
|
_pthread_cleanup_push.level = __ATEXIT__.length;
|
|
}
|
|
|
|
|
|
function _emscripten_memcpy_big(dest, src, num) {
|
|
HEAPU8.set(HEAPU8.subarray(src, src+num), dest);
|
|
return dest;
|
|
}
|
|
Module["_memcpy"] = _memcpy;
|
|
|
|
function _glfwGetFramebufferSize(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');
|
|
}
|
|
|
|
function _sbrk(bytes) {
|
|
// Implement a Linux-like 'memory area' for our 'process'.
|
|
// Changes the size of the memory area by |bytes|; returns the
|
|
// address of the previous top ('break') of the memory area
|
|
// We control the "dynamic" memory - DYNAMIC_BASE to DYNAMICTOP
|
|
var self = _sbrk;
|
|
if (!self.called) {
|
|
DYNAMICTOP = alignMemoryPage(DYNAMICTOP); // make sure we start out aligned
|
|
self.called = true;
|
|
assert(Runtime.dynamicAlloc);
|
|
self.alloc = Runtime.dynamicAlloc;
|
|
Runtime.dynamicAlloc = function() { abort('cannot dynamically allocate, sbrk now has control') };
|
|
}
|
|
var ret = DYNAMICTOP;
|
|
if (bytes != 0) {
|
|
var success = self.alloc(bytes);
|
|
if (!success) return -1 >>> 0; // sbrk failure code
|
|
}
|
|
return ret; // Previous break location.
|
|
}
|
|
|
|
function _glGenTextures(n, textures) {
|
|
for (var i = 0; i < n; i++) {
|
|
var texture = GLctx.createTexture();
|
|
if (!texture) {
|
|
GL.recordError(0x0502 /* GL_INVALID_OPERATION */); // GLES + EGL specs don't specify what should happen here, so best to issue an error and create IDs with 0.
|
|
while(i < n) HEAP32[(((textures)+(i++*4))>>2)]=0;
|
|
return;
|
|
}
|
|
var id = GL.getNewId(GL.textures);
|
|
texture.name = id;
|
|
GL.textures[id] = texture;
|
|
HEAP32[(((textures)+(i*4))>>2)]=id;
|
|
}
|
|
}
|
|
|
|
var _BItoD=true;
|
|
|
|
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("keydown", GLFW.onKeydown, true);
|
|
window.addEventListener("keypress", GLFW.onKeyPress, true);
|
|
window.addEventListener("keyup", GLFW.onKeyup, 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);
|
|
|
|
Browser.resizeListeners.push(function(width, height) {
|
|
GLFW.onFullScreenEventChange();
|
|
});
|
|
return 1; // GL_TRUE
|
|
}
|
|
|
|
function _glfwSetInputMode(winid, mode, value) {}
|
|
|
|
function _glfwSwapBuffers(winid) {
|
|
GLFW.swapBuffers(winid);
|
|
}
|
|
|
|
function _glTexParameteri(x0, x1, x2) { GLctx.texParameteri(x0, x1, x2) }
|
|
|
|
function _glCreateShader(shaderType) {
|
|
var id = GL.getNewId(GL.shaders);
|
|
GL.shaders[id] = GLctx.createShader(shaderType);
|
|
return id;
|
|
}
|
|
|
|
function _glUniform1i(location, v0) {
|
|
location = GL.uniforms[location];
|
|
GLctx.uniform1i(location, v0);
|
|
}
|
|
|
|
function _glUseProgram(program) {
|
|
GLctx.useProgram(program ? GL.programs[program] : null);
|
|
}
|
|
|
|
|
|
|
|
function emscriptenWebGLComputeImageSize(width, height, sizePerPixel, alignment) {
|
|
function roundedToNextMultipleOf(x, y) {
|
|
return Math.floor((x + y - 1) / y) * y
|
|
}
|
|
var plainRowSize = width * sizePerPixel;
|
|
var alignedRowSize = roundedToNextMultipleOf(plainRowSize, alignment);
|
|
return (height <= 0) ? 0 :
|
|
((height - 1) * alignedRowSize + plainRowSize);
|
|
}function emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) {
|
|
var sizePerPixel;
|
|
var numChannels;
|
|
switch(format) {
|
|
case 0x1906 /* GL_ALPHA */:
|
|
case 0x1909 /* GL_LUMINANCE */:
|
|
case 0x1902 /* GL_DEPTH_COMPONENT */:
|
|
case 0x1903 /* GL_RED */:
|
|
numChannels = 1;
|
|
break;
|
|
case 0x190A /* GL_LUMINANCE_ALPHA */:
|
|
case 0x8227 /* GL_RG */:
|
|
numChannels = 2;
|
|
break;
|
|
case 0x1907 /* GL_RGB */:
|
|
case 0x8C40 /* GL_SRGB_EXT */:
|
|
numChannels = 3;
|
|
break;
|
|
case 0x1908 /* GL_RGBA */:
|
|
case 0x8C42 /* GL_SRGB_ALPHA_EXT */:
|
|
numChannels = 4;
|
|
break;
|
|
default:
|
|
GL.recordError(0x0500); // GL_INVALID_ENUM
|
|
return {
|
|
pixels: null,
|
|
internalFormat: 0x0
|
|
};
|
|
}
|
|
switch (type) {
|
|
case 0x1401 /* GL_UNSIGNED_BYTE */:
|
|
sizePerPixel = numChannels*1;
|
|
break;
|
|
case 0x1403 /* GL_UNSIGNED_SHORT */:
|
|
case 0x8D61 /* GL_HALF_FLOAT_OES */:
|
|
sizePerPixel = numChannels*2;
|
|
break;
|
|
case 0x1405 /* GL_UNSIGNED_INT */:
|
|
case 0x1406 /* GL_FLOAT */:
|
|
sizePerPixel = numChannels*4;
|
|
break;
|
|
case 0x84FA /* UNSIGNED_INT_24_8_WEBGL/UNSIGNED_INT_24_8 */:
|
|
sizePerPixel = 4;
|
|
break;
|
|
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 */:
|
|
sizePerPixel = 2;
|
|
break;
|
|
default:
|
|
GL.recordError(0x0500); // GL_INVALID_ENUM
|
|
return {
|
|
pixels: null,
|
|
internalFormat: 0x0
|
|
};
|
|
}
|
|
var bytes = emscriptenWebGLComputeImageSize(width, height, sizePerPixel, GL.unpackAlignment);
|
|
if (type == 0x1401 /* GL_UNSIGNED_BYTE */) {
|
|
pixels = HEAPU8.subarray((pixels),(pixels+bytes));
|
|
} else if (type == 0x1406 /* GL_FLOAT */) {
|
|
pixels = HEAPF32.subarray((pixels)>>2,(pixels+bytes)>>2);
|
|
} else if (type == 0x1405 /* GL_UNSIGNED_INT */ || type == 0x84FA /* UNSIGNED_INT_24_8_WEBGL */) {
|
|
pixels = HEAPU32.subarray((pixels)>>2,(pixels+bytes)>>2);
|
|
} else {
|
|
pixels = HEAPU16.subarray((pixels)>>1,(pixels+bytes)>>1);
|
|
}
|
|
return {
|
|
pixels: pixels,
|
|
internalFormat: internalFormat
|
|
};
|
|
}function _glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels) {
|
|
var pixelData;
|
|
if (pixels) {
|
|
var data = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat);
|
|
pixelData = data.pixels;
|
|
internalFormat = data.internalFormat;
|
|
} else {
|
|
pixelData = null;
|
|
}
|
|
GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixelData);
|
|
}
|
|
|
|
function _glDisable(x0) { GLctx.disable(x0) }
|
|
|
|
function _glfwGetMouseButton(winid, button) {
|
|
return GLFW.getMouseButton(winid, button);
|
|
}
|
|
|
|
function _glfwGetWindowSize(winid, width, height) {
|
|
GLFW.getWindowSize(winid, width, height);
|
|
}
|
|
|
|
|
|
Module["_memset"] = _memset;
|
|
|
|
var _BDtoILow=true;
|
|
|
|
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 (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 */) {
|
|
var ptable = GL.programInfos[program];
|
|
if (ptable) {
|
|
HEAP32[((p)>>2)]=ptable.maxUniformLength;
|
|
return;
|
|
} else if (program < GL.counter) {
|
|
GL.recordError(0x0502 /* GL_INVALID_OPERATION */);
|
|
} else {
|
|
GL.recordError(0x0501 /* GL_INVALID_VALUE */);
|
|
}
|
|
} else if (pname == 0x8B8A /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */) {
|
|
var ptable = GL.programInfos[program];
|
|
if (ptable) {
|
|
if (ptable.maxAttributeLength == -1) {
|
|
var program = GL.programs[program];
|
|
var numAttribs = GLctx.getProgramParameter(program, GLctx.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;
|
|
return;
|
|
} else if (program < GL.counter) {
|
|
GL.recordError(0x0502 /* GL_INVALID_OPERATION */);
|
|
} else {
|
|
GL.recordError(0x0501 /* GL_INVALID_VALUE */);
|
|
}
|
|
} else {
|
|
HEAP32[((p)>>2)]=GLctx.getProgramParameter(GL.programs[program], pname);
|
|
}
|
|
}
|
|
|
|
function _glVertexAttribPointer(index, size, type, normalized, stride, ptr) {
|
|
GLctx.vertexAttribPointer(index, size, type, normalized, stride, ptr);
|
|
}
|
|
|
|
function _glfwPollEvents() {}
|
|
|
|
|
|
Module["_bitshift64Shl"] = _bitshift64Shl;
|
|
|
|
function _abort() {
|
|
Module['abort']();
|
|
}
|
|
|
|
function ___assert_fail(condition, filename, line, func) {
|
|
ABORT = true;
|
|
throw 'Assertion failed: ' + Pointer_stringify(condition) + ', at: ' + [filename ? Pointer_stringify(filename) : 'unknown filename', line, func ? Pointer_stringify(func) : 'unknown function'] + ' at ' + stackTrace();
|
|
}
|
|
|
|
function _glBlendEquation(x0) { GLctx.blendEquation(x0) }
|
|
|
|
function _glGetUniformLocation(program, name) {
|
|
name = Pointer_stringify(name);
|
|
|
|
var arrayOffset = 0;
|
|
// If user passed an array accessor "[index]", parse the array index off the accessor.
|
|
if (name.indexOf(']', name.length-1) !== -1) {
|
|
var ls = name.lastIndexOf('[');
|
|
var arrayIndex = name.slice(ls+1, -1);
|
|
if (arrayIndex.length > 0) {
|
|
arrayOffset = parseInt(arrayIndex);
|
|
if (arrayOffset < 0) {
|
|
return -1;
|
|
}
|
|
}
|
|
name = name.slice(0, ls);
|
|
}
|
|
|
|
var ptable = GL.programInfos[program];
|
|
if (!ptable) {
|
|
return -1;
|
|
}
|
|
var utable = ptable.uniforms;
|
|
var uniformInfo = utable[name]; // returns pair [ dimension_of_uniform_array, uniform_location ]
|
|
if (uniformInfo && arrayOffset < 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]+arrayOffset;
|
|
} else {
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
function _glfwMakeContextCurrent(winid) {}
|
|
|
|
function ___lock() {}
|
|
|
|
function ___unlock() {}
|
|
|
|
function _glfwSetClipboardString(win, string) {}
|
|
|
|
function _glEnable(x0) { GLctx.enable(x0) }
|
|
|
|
var _emscripten_asm_const_int=true;
|
|
|
|
function _glGenBuffers(n, buffers) {
|
|
for (var i = 0; i < n; i++) {
|
|
var buffer = GLctx.createBuffer();
|
|
if (!buffer) {
|
|
GL.recordError(0x0502 /* GL_INVALID_OPERATION */);
|
|
while(i < n) HEAP32[(((buffers)+(i++*4))>>2)]=0;
|
|
return;
|
|
}
|
|
var id = GL.getNewId(GL.buffers);
|
|
buffer.name = id;
|
|
GL.buffers[id] = buffer;
|
|
HEAP32[(((buffers)+(i*4))>>2)]=id;
|
|
}
|
|
}
|
|
|
|
function _glfwSetScrollCallback(winid, cbfun) {
|
|
GLFW.setScrollCallback(winid, cbfun);
|
|
}
|
|
|
|
|
|
|
|
|
|
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 TTY={ttys:[],init:function () {
|
|
// https://github.com/kripken/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/kripken/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(ERRNO_CODES.ENODEV);
|
|
}
|
|
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(ERRNO_CODES.ENXIO);
|
|
}
|
|
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(ERRNO_CODES.EIO);
|
|
}
|
|
if (result === undefined && bytesRead === 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);
|
|
}
|
|
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(ERRNO_CODES.ENXIO);
|
|
}
|
|
for (var i = 0; i < length; i++) {
|
|
try {
|
|
stream.tty.ops.put_char(stream.tty, buffer[offset+i]);
|
|
} catch (e) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EIO);
|
|
}
|
|
}
|
|
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 = new Buffer(BUFSIZE);
|
|
var bytesRead = 0;
|
|
|
|
var fd = process.stdin.fd;
|
|
// 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) {}
|
|
|
|
bytesRead = fs.readSync(fd, buf, 0, BUFSIZE, null);
|
|
|
|
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) {
|
|
Module['print'](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) {
|
|
Module['print'](UTF8ArrayToString(tty.output, 0));
|
|
tty.output = [];
|
|
}
|
|
}},default_tty1_ops:{put_char:function (tty, val) {
|
|
if (val === null || val === 10) {
|
|
Module['printErr'](UTF8ArrayToString(tty.output, 0));
|
|
tty.output = [];
|
|
} else {
|
|
if (val != 0) tty.output.push(val);
|
|
}
|
|
},flush:function (tty) {
|
|
if (tty.output && tty.output.length > 0) {
|
|
Module['printErr'](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(ERRNO_CODES.EPERM);
|
|
}
|
|
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.buffer.byteLength 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) {
|
|
// If we are asked to expand the size of a file that already exists, revert to using a standard JS array to store the file
|
|
// instead of a typed array. This makes resizing the array more flexible because we can just .push() elements at the back to
|
|
// increase the size.
|
|
if (node.contents && node.contents.subarray && newCapacity > node.contents.length) {
|
|
node.contents = MEMFS.getFileDataAsRegularArray(node);
|
|
node.usedBytes = node.contents.length; // We might be writing to a lazy-loaded file which had overridden this property, so force-reset it.
|
|
}
|
|
|
|
if (!node.contents || node.contents.subarray) { // Keep using a typed array if creating a new storage, or if old one was a typed array as well.
|
|
var prevCapacity = node.contents ? node.contents.buffer.byteLength : 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;
|
|
}
|
|
// Not using a typed array to back the file storage. Use a standard JS array instead.
|
|
if (!node.contents && newCapacity > 0) node.contents = [];
|
|
while (node.contents.length < newCapacity) node.contents.push(0);
|
|
},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[ERRNO_CODES.ENOENT];
|
|
},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(ERRNO_CODES.ENOTEMPTY);
|
|
}
|
|
}
|
|
}
|
|
// 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(ERRNO_CODES.ENOTEMPTY);
|
|
}
|
|
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(ERRNO_CODES.EINVAL);
|
|
}
|
|
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) { // Can we just reuse the buffer we are given?
|
|
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(ERRNO_CODES.EINVAL);
|
|
}
|
|
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(ERRNO_CODES.ENODEV);
|
|
}
|
|
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;
|
|
ptr = _malloc(length);
|
|
if (!ptr) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOMEM);
|
|
}
|
|
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(ERRNO_CODES.ENODEV);
|
|
}
|
|
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);
|
|
}
|
|
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);
|
|
|
|
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();
|
|
};
|
|
});
|
|
},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, { encoding: 'binary', 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 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();
|
|
};
|
|
|
|
// 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/);
|
|
},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(ERRNO_CODES.EINVAL);
|
|
}
|
|
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) {
|
|
// On Windows, directories return permission bits 'rw-rw-rw-', even though they have 'rwxrwxrwx', so
|
|
// propagate write bits to execute bits.
|
|
stat.mode = stat.mode | ((stat.mode & 146) >> 1);
|
|
}
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
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);
|
|
},flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:function (flags) {
|
|
flags &= ~0100000 /*O_LARGEFILE*/; // Ignore this flag from musl, otherwise node.js fails to open the file.
|
|
if (flags in NODEFS.flagsToPermissionStringMap) {
|
|
return NODEFS.flagsToPermissionStringMap[flags];
|
|
} else {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
},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(ERRNO_CODES[e.code]);
|
|
}
|
|
// 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(ERRNO_CODES[e.code]);
|
|
}
|
|
},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(ERRNO_CODES[e.code]);
|
|
}
|
|
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(ERRNO_CODES[e.code]);
|
|
}
|
|
},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(ERRNO_CODES[e.code]);
|
|
}
|
|
},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(ERRNO_CODES[e.code]);
|
|
}
|
|
},readdir:function (node) {
|
|
var path = NODEFS.realPath(node);
|
|
try {
|
|
return fs.readdirSync(path);
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
},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(ERRNO_CODES[e.code]);
|
|
}
|
|
},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(ERRNO_CODES[e.code]);
|
|
}
|
|
}},stream_ops:{open:function (stream) {
|
|
var path = NODEFS.realPath(stream.node);
|
|
try {
|
|
if (FS.isFile(stream.node.mode)) {
|
|
stream.nfd = fs.openSync(path, NODEFS.flagsToPermissionString(stream.flags));
|
|
}
|
|
} catch (e) {
|
|
if (!e.code) throw e;
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
},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(ERRNO_CODES[e.code]);
|
|
}
|
|
},read:function (stream, buffer, offset, length, position) {
|
|
if (length === 0) return 0; // node errors on 0 length reads
|
|
// FIXME this is terrible.
|
|
var nbuffer = new Buffer(length);
|
|
var res;
|
|
try {
|
|
res = fs.readSync(stream.nfd, nbuffer, 0, length, position);
|
|
} catch (e) {
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
if (res > 0) {
|
|
for (var i = 0; i < res; i++) {
|
|
buffer[offset + i] = nbuffer[i];
|
|
}
|
|
}
|
|
return res;
|
|
},write:function (stream, buffer, offset, length, position) {
|
|
// FIXME this is terrible.
|
|
var nbuffer = new Buffer(buffer.subarray(offset, offset + length));
|
|
var res;
|
|
try {
|
|
res = fs.writeSync(stream.nfd, nbuffer, 0, length, position);
|
|
} catch (e) {
|
|
throw new FS.ErrnoError(ERRNO_CODES[e.code]);
|
|
}
|
|
return res;
|
|
},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(ERRNO_CODES[e.code]);
|
|
}
|
|
}
|
|
}
|
|
|
|
if (position < 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
|
|
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('/');
|
|
if (!createdParents[curr]) {
|
|
createdParents[curr] = WORKERFS.createNode(parent, curr, 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(ERRNO_CODES.ENOENT);
|
|
},mknod:function (parent, name, mode, dev) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
},rename:function (oldNode, newDir, newName) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
},unlink:function (parent, name) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
},rmdir:function (parent, name) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
},readdir:function (node) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
},symlink:function (parent, newName, oldPath) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
},readlink:function (node) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
}},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(ERRNO_CODES.EIO);
|
|
},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(ERRNO_CODES.EINVAL);
|
|
}
|
|
return position;
|
|
}}};
|
|
|
|
var _stdin=allocate(1, "i32*", ALLOC_STATIC);
|
|
|
|
var _stdout=allocate(1, "i32*", ALLOC_STATIC);
|
|
|
|
var _stderr=allocate(1, "i32*", ALLOC_STATIC);var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,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) { // max recursive lookup of 8
|
|
throw new FS.ErrnoError(ERRNO_CODES.ELOOP);
|
|
}
|
|
|
|
// 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.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(ERRNO_CODES.ELOOP);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
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 ERRNO_CODES.EACCES;
|
|
} else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) {
|
|
return ERRNO_CODES.EACCES;
|
|
} else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) {
|
|
return ERRNO_CODES.EACCES;
|
|
}
|
|
return 0;
|
|
},mayLookup:function (dir) {
|
|
var err = FS.nodePermissions(dir, 'x');
|
|
if (err) return err;
|
|
if (!dir.node_ops.lookup) return ERRNO_CODES.EACCES;
|
|
return 0;
|
|
},mayCreate:function (dir, name) {
|
|
try {
|
|
var node = FS.lookupNode(dir, name);
|
|
return ERRNO_CODES.EEXIST;
|
|
} 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 ERRNO_CODES.ENOTDIR;
|
|
}
|
|
if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) {
|
|
return ERRNO_CODES.EBUSY;
|
|
}
|
|
} else {
|
|
if (FS.isDir(node.mode)) {
|
|
return ERRNO_CODES.EISDIR;
|
|
}
|
|
}
|
|
return 0;
|
|
},mayOpen:function (node, flags) {
|
|
if (!node) {
|
|
return ERRNO_CODES.ENOENT;
|
|
}
|
|
if (FS.isLink(node.mode)) {
|
|
return ERRNO_CODES.ELOOP;
|
|
} else if (FS.isDir(node.mode)) {
|
|
if ((flags & 2097155) !== 0 || // opening for write
|
|
(flags & 512)) {
|
|
return ERRNO_CODES.EISDIR;
|
|
}
|
|
}
|
|
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(ERRNO_CODES.EMFILE);
|
|
},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(ERRNO_CODES.ESPIPE);
|
|
}},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;
|
|
}
|
|
|
|
var mounts = FS.getMounts(FS.root.mount);
|
|
var completed = 0;
|
|
|
|
function done(err) {
|
|
if (err) {
|
|
if (!done.errored) {
|
|
done.errored = true;
|
|
return callback(err);
|
|
}
|
|
return;
|
|
}
|
|
if (++completed >= mounts.length) {
|
|
callback(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(ERRNO_CODES.EBUSY);
|
|
} 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(ERRNO_CODES.EBUSY);
|
|
}
|
|
|
|
if (!FS.isDir(node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);
|
|
}
|
|
}
|
|
|
|
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(ERRNO_CODES.EINVAL);
|
|
}
|
|
|
|
// 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(ERRNO_CODES.EINVAL);
|
|
}
|
|
var err = FS.mayCreate(parent, name);
|
|
if (err) {
|
|
throw new FS.ErrnoError(err);
|
|
}
|
|
if (!parent.node_ops.mknod) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
}
|
|
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);
|
|
},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.resolve(oldpath)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOENT);
|
|
}
|
|
var lookup = FS.lookupPath(newpath, { parent: true });
|
|
var parent = lookup.node;
|
|
if (!parent) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOENT);
|
|
}
|
|
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(ERRNO_CODES.EPERM);
|
|
}
|
|
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(ERRNO_CODES.EBUSY);
|
|
}
|
|
if (!old_dir || !new_dir) throw new FS.ErrnoError(ERRNO_CODES.ENOENT);
|
|
// need to be part of the same mount
|
|
if (old_dir.mount !== new_dir.mount) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EXDEV);
|
|
}
|
|
// 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.relative(old_path, new_dirname);
|
|
if (relative.charAt(0) !== '.') {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
// new path should not be an ancestor of the old path
|
|
relative = PATH.relative(new_path, old_dirname);
|
|
if (relative.charAt(0) !== '.') {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);
|
|
}
|
|
// 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(ERRNO_CODES.EPERM);
|
|
}
|
|
if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
|
|
}
|
|
// 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(ERRNO_CODES.EPERM);
|
|
}
|
|
if (FS.isMountpoint(node)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
|
|
}
|
|
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(ERRNO_CODES.ENOTDIR);
|
|
}
|
|
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) {
|
|
// POSIX says unlink should set EPERM, not EISDIR
|
|
if (err === ERRNO_CODES.EISDIR) err = ERRNO_CODES.EPERM;
|
|
throw new FS.ErrnoError(err);
|
|
}
|
|
if (!parent.node_ops.unlink) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
}
|
|
if (FS.isMountpoint(node)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
|
|
}
|
|
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(ERRNO_CODES.ENOENT);
|
|
}
|
|
if (!link.node_ops.readlink) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
return PATH.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(ERRNO_CODES.ENOENT);
|
|
}
|
|
if (!node.node_ops.getattr) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EPERM);
|
|
}
|
|
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(ERRNO_CODES.EPERM);
|
|
}
|
|
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(ERRNO_CODES.EBADF);
|
|
}
|
|
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(ERRNO_CODES.EPERM);
|
|
}
|
|
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(ERRNO_CODES.EBADF);
|
|
}
|
|
FS.chown(stream.node, uid, gid);
|
|
},truncate:function (path, len) {
|
|
if (len < 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
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(ERRNO_CODES.EPERM);
|
|
}
|
|
if (FS.isDir(node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EISDIR);
|
|
}
|
|
if (!FS.isFile(node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
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(ERRNO_CODES.EBADF);
|
|
}
|
|
if ((stream.flags & 2097155) === 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
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(ERRNO_CODES.ENOENT);
|
|
}
|
|
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(ERRNO_CODES.EEXIST);
|
|
}
|
|
} else {
|
|
// node doesn't exist, try to create it
|
|
node = FS.mknod(path, mode, 0);
|
|
created = true;
|
|
}
|
|
}
|
|
if (!node) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOENT);
|
|
}
|
|
// 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(ERRNO_CODES.ENOTDIR);
|
|
}
|
|
// 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;
|
|
Module['printErr']('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 (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);
|
|
}
|
|
},llseek:function (stream, offset, whence) {
|
|
if (!stream.seekable || !stream.stream_ops.llseek) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);
|
|
}
|
|
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(ERRNO_CODES.EINVAL);
|
|
}
|
|
if ((stream.flags & 2097155) === 1) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBADF);
|
|
}
|
|
if (FS.isDir(stream.node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EISDIR);
|
|
}
|
|
if (!stream.stream_ops.read) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
var seeking = true;
|
|
if (typeof position === 'undefined') {
|
|
position = stream.position;
|
|
seeking = false;
|
|
} else if (!stream.seekable) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);
|
|
}
|
|
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(ERRNO_CODES.EINVAL);
|
|
}
|
|
if ((stream.flags & 2097155) === 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBADF);
|
|
}
|
|
if (FS.isDir(stream.node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EISDIR);
|
|
}
|
|
if (!stream.stream_ops.write) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
if (stream.flags & 1024) {
|
|
// seek to the end before writing in append mode
|
|
FS.llseek(stream, 0, 2);
|
|
}
|
|
var seeking = true;
|
|
if (typeof position === 'undefined') {
|
|
position = stream.position;
|
|
seeking = false;
|
|
} else if (!stream.seekable) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);
|
|
}
|
|
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']('"+path+"') threw an exception: " + e.message);
|
|
}
|
|
return bytesWritten;
|
|
},allocate:function (stream, offset, length) {
|
|
if (offset < 0 || length <= 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
|
|
}
|
|
if ((stream.flags & 2097155) === 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EBADF);
|
|
}
|
|
if (!FS.isFile(stream.node.mode) && !FS.isDir(node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENODEV);
|
|
}
|
|
if (!stream.stream_ops.allocate) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP);
|
|
}
|
|
stream.stream_ops.allocate(stream, offset, length);
|
|
},mmap:function (stream, buffer, offset, length, position, prot, flags) {
|
|
// TODO if PROT is PROT_WRITE, make sure we have write access
|
|
if ((stream.flags & 2097155) === 1) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EACCES);
|
|
}
|
|
if (!stream.stream_ops.mmap) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENODEV);
|
|
}
|
|
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(ERRNO_CODES.ENOTTY);
|
|
}
|
|
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';
|
|
opts.encoding = opts.encoding || 'utf8';
|
|
if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') {
|
|
throw new Error('Invalid encoding type "' + opts.encoding + '"');
|
|
}
|
|
var stream = FS.open(path, opts.flags, opts.mode);
|
|
if (opts.encoding === 'utf8') {
|
|
var buf = new Uint8Array(lengthBytesUTF8(data)+1);
|
|
var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length);
|
|
FS.write(stream, buf, 0, actualNumBytes, 0, opts.canOwn);
|
|
} else if (opts.encoding === 'binary') {
|
|
FS.write(stream, data, 0, data.length, 0, opts.canOwn);
|
|
}
|
|
FS.close(stream);
|
|
},cwd:function () {
|
|
return FS.currentPath;
|
|
},chdir:function (path) {
|
|
var lookup = FS.lookupPath(path, { follow: true });
|
|
if (!FS.isDir(lookup.node.mode)) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);
|
|
}
|
|
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 !== 'undefined') {
|
|
// 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
|
|
random_device = function() { return require('crypto').randomBytes(1)[0]; };
|
|
} else {
|
|
// default for ES5 platforms
|
|
random_device = function() { return (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 | 0777, 73);
|
|
node.node_ops = {
|
|
lookup: function(parent, name) {
|
|
var fd = +name;
|
|
var stream = FS.getStream(fd);
|
|
if (!stream) throw new FS.ErrnoError(ERRNO_CODES.EBADF);
|
|
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');
|
|
assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')');
|
|
|
|
var stdout = FS.open('/dev/stdout', 'w');
|
|
assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')');
|
|
|
|
var stderr = FS.open('/dev/stderr', 'w');
|
|
assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')');
|
|
},ensureErrnoError:function () {
|
|
if (FS.ErrnoError) return;
|
|
FS.ErrnoError = function ErrnoError(errno, node) {
|
|
//Module.printErr(stackTrace()); // useful for debugging
|
|
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];
|
|
if (this.stack) 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)
|
|
[ERRNO_CODES.ENOENT].forEach(function(code) {
|
|
FS.genericErrors[code] = new FS.ErrnoError(code);
|
|
FS.genericErrors[code].stack = '<generic error, no 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.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(ERRNO_CODES.EIO);
|
|
}
|
|
if (result === undefined && bytesRead === 0) {
|
|
throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);
|
|
}
|
|
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(ERRNO_CODES.EIO);
|
|
}
|
|
}
|
|
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 (Module['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(Module['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(ERRNO_CODES.EIO);
|
|
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 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];
|
|
});
|
|
|
|
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.defineProperty(lazyArray, "length", {
|
|
get: function() {
|
|
if(!this.lengthKnown) {
|
|
this.cacheLength();
|
|
}
|
|
return this._length;
|
|
}
|
|
});
|
|
Object.defineProperty(lazyArray, "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.defineProperty(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(ERRNO_CODES.EIO);
|
|
}
|
|
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(ERRNO_CODES.EIO);
|
|
}
|
|
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();
|
|
// 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.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 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);
|
|
},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.resolve(from).substr(1);
|
|
to = PATH.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('/');
|
|
}};
|
|
|
|
|
|
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() {
|
|
setTimeout(Browser.mainLoop.runner, value); // 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 (!window['setImmediate']) {
|
|
// 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 = '__emcc';
|
|
function Browser_setImmediate_messageHandler(event) {
|
|
if (event.source === window && event.data === emscriptenMainLoopMessageId) {
|
|
event.stopPropagation();
|
|
setImmediates.shift()();
|
|
}
|
|
}
|
|
window.addEventListener("message", Browser_setImmediate_messageHandler, true);
|
|
window['setImmediate'] = function Browser_emulated_setImmediate(func) {
|
|
setImmediates.push(func);
|
|
window.postMessage(emscriptenMainLoopMessageId, "*");
|
|
}
|
|
}
|
|
Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() {
|
|
window['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 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();
|
|
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;
|
|
}
|
|
|
|
// 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) {
|
|
Module.printErr('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(function() {
|
|
if (typeof arg !== 'undefined') {
|
|
Runtime.dynCall('vi', func, [arg]);
|
|
} else {
|
|
Runtime.dynCall('v', func);
|
|
}
|
|
});
|
|
|
|
// 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) Module.printErr('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) {
|
|
Runtime.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
|
|
|
|
var canvas = Module['canvas'];
|
|
function pointerLockChange() {
|
|
Browser.pointerLock = document['pointerLockElement'] === canvas ||
|
|
document['mozPointerLockElement'] === canvas ||
|
|
document['webkitPointerLockElement'] === canvas ||
|
|
document['msPointerLockElement'] === 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 && canvas.requestPointerLock) {
|
|
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
|
|
};
|
|
|
|
if (webGLContextAttributes) {
|
|
for (var attribute in webGLContextAttributes) {
|
|
contextAttributes[attribute] = webGLContextAttributes[attribute];
|
|
}
|
|
}
|
|
|
|
contextHandle = GL.createContext(canvas, contextAttributes);
|
|
if (contextHandle) {
|
|
ctx = GL.getContext(contextHandle).GLctx;
|
|
}
|
|
// Set the background of the WebGL canvas to black
|
|
canvas.style.backgroundColor = "black";
|
|
} 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['webkitFullScreenElement'] || document['webkitFullscreenElement'] ||
|
|
document['mozFullScreenElement'] || document['mozFullscreenElement'] ||
|
|
document['fullScreenElement'] || document['fullscreenElement'] ||
|
|
document['msFullScreenElement'] || document['msFullscreenElement'] ||
|
|
document['webkitCurrentFullScreenElement']) === canvasContainer) {
|
|
canvas.cancelFullScreen = document['cancelFullScreen'] ||
|
|
document['mozCancelFullScreen'] ||
|
|
document['webkitCancelFullScreen'] ||
|
|
document['msExitFullscreen'] ||
|
|
document['exitFullscreen'] ||
|
|
function() {};
|
|
canvas.cancelFullScreen = canvas.cancelFullScreen.bind(document);
|
|
if (Browser.lockPointer) canvas.requestPointerLock();
|
|
Browser.isFullScreen = true;
|
|
if (Browser.resizeCanvas) Browser.setFullScreenCanvasSize();
|
|
} 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();
|
|
}
|
|
if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullScreen);
|
|
Browser.updateCanvasDimensions(canvas);
|
|
}
|
|
|
|
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);
|
|
|
|
if (vrDevice) {
|
|
canvasContainer.requestFullScreen({ vrDisplay: vrDevice });
|
|
} else {
|
|
canvasContainer.requestFullScreen();
|
|
}
|
|
},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 requestAnimationFrame(func) {
|
|
if (typeof window === 'undefined') { // Provide fallback to setTimeout if window is undefined (e.g. in Node.js)
|
|
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 () { // 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) {
|
|
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();
|
|
} // 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':
|
|
delta = event.detail;
|
|
break;
|
|
case 'mousewheel':
|
|
delta = event.wheelDelta;
|
|
break;
|
|
case 'wheel':
|
|
delta = event['deltaY'];
|
|
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;
|
|
}
|
|
},xhrLoad:function (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);
|
|
} else {
|
|
onerror();
|
|
}
|
|
};
|
|
xhr.onerror = onerror;
|
|
xhr.send(null);
|
|
},asyncLoad:function (url, onload, onerror, noRunDep) {
|
|
Browser.xhrLoad(url, function(arrayBuffer) {
|
|
assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).');
|
|
onload(new Uint8Array(arrayBuffer));
|
|
if (!noRunDep) removeRunDependency('al ' + url);
|
|
}, function(event) {
|
|
if (onerror) {
|
|
onerror();
|
|
} else {
|
|
throw 'Loading data file "' + url + '" failed.';
|
|
}
|
|
});
|
|
if (!noRunDep) addRunDependency('al ' + url);
|
|
},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+Runtime.QUANTUM_SIZE*0)>>2)];
|
|
flags = flags | 0x00800000; // set SDL_FULLSCREEN flag
|
|
HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags
|
|
}
|
|
Browser.updateResizeListeners();
|
|
},setWindowedCanvasSize:function () {
|
|
// check if SDL is available
|
|
if (typeof SDL != "undefined") {
|
|
var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)];
|
|
flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag
|
|
HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags
|
|
}
|
|
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['webkitFullScreenElement'] || document['webkitFullscreenElement'] ||
|
|
document['mozFullScreenElement'] || document['mozFullscreenElement'] ||
|
|
document['fullScreenElement'] || document['fullscreenElement'] ||
|
|
document['msFullScreenElement'] || document['msFullscreenElement'] ||
|
|
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;
|
|
}};
|
|
|
|
function _glGetAttribLocation(program, name) {
|
|
program = GL.programs[program];
|
|
name = Pointer_stringify(name);
|
|
return GLctx.getAttribLocation(program, name);
|
|
}
|
|
|
|
function _glfwWindowHint(target, hint) {
|
|
GLFW.hints[target] = hint;
|
|
}
|
|
|
|
function _glAttachShader(program, shader) {
|
|
GLctx.attachShader(GL.programs[program],
|
|
GL.shaders[shader]);
|
|
}
|
|
|
|
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 _glBlendFunc(x0, x1) { GLctx.blendFunc(x0, x1) }
|
|
|
|
function _glCreateProgram() {
|
|
var id = GL.getNewId(GL.programs);
|
|
var program = GLctx.createProgram();
|
|
program.name = id;
|
|
GL.programs[id] = program;
|
|
return id;
|
|
}
|
|
|
|
var _BDtoIHigh=true;
|
|
|
|
function _glViewport(x0, x1, x2, x3) { GLctx.viewport(x0, x1, x2, x3) }
|
|
|
|
|
|
function _time(ptr) {
|
|
var ret = (Date.now()/1000)|0;
|
|
if (ptr) {
|
|
HEAP32[((ptr)>>2)]=ret;
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
|
|
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(ERRNO_CODES.EBADF);
|
|
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 -ERRNO_CODES.ENOTDIR;
|
|
}
|
|
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;
|
|
HEAP32[(((buf)+(36))>>2)]=stat.size;
|
|
HEAP32[(((buf)+(40))>>2)]=4096;
|
|
HEAP32[(((buf)+(44))>>2)]=stat.blocks;
|
|
HEAP32[(((buf)+(48))>>2)]=(stat.atime.getTime() / 1000)|0;
|
|
HEAP32[(((buf)+(52))>>2)]=0;
|
|
HEAP32[(((buf)+(56))>>2)]=(stat.mtime.getTime() / 1000)|0;
|
|
HEAP32[(((buf)+(60))>>2)]=0;
|
|
HEAP32[(((buf)+(64))>>2)]=(stat.ctime.getTime() / 1000)|0;
|
|
HEAP32[(((buf)+(68))>>2)]=0;
|
|
HEAP32[(((buf)+(72))>>2)]=stat.ino;
|
|
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 -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);
|
|
ret = ret.slice(0, Math.max(0, bufsize));
|
|
writeStringToMemory(ret, buf, true);
|
|
return ret.length;
|
|
},doAccess:function (path, amode) {
|
|
if (amode & ~7) {
|
|
// need a valid mode
|
|
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 /* otherwise, they've just passed F_OK */ && 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 < 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 = Pointer_stringify(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 ___syscall54(which, varargs) {SYSCALLS.varargs = varargs;
|
|
try {
|
|
// ioctl
|
|
var stream = SYSCALLS.getStreamFromFD(), op = SYSCALLS.get();
|
|
switch (op) {
|
|
case 21505: {
|
|
if (!stream.tty) return -ERRNO_CODES.ENOTTY;
|
|
return 0;
|
|
}
|
|
case 21506: {
|
|
if (!stream.tty) return -ERRNO_CODES.ENOTTY;
|
|
return 0; // no-op, not actually adjusting terminal settings
|
|
}
|
|
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; // not supported
|
|
}
|
|
case 21531: {
|
|
var argp = SYSCALLS.get();
|
|
return FS.ioctl(stream, op, argp);
|
|
}
|
|
default: abort('bad ioctl syscall ' + op);
|
|
}
|
|
} catch (e) {
|
|
if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
|
|
return -e.errno;
|
|
}
|
|
}
|
|
|
|
function _glDrawElements(mode, count, type, indices) {
|
|
|
|
GLctx.drawElements(mode, count, type, indices);
|
|
|
|
}
|
|
|
|
function _glfwSetErrorCallback(cbfun) {
|
|
GLFW.errorFunc = cbfun;
|
|
}
|
|
|
|
function _glfwTerminate() {
|
|
window.removeEventListener("keydown", GLFW.onKeydown, true);
|
|
window.removeEventListener("keypress", GLFW.onKeyPress, true);
|
|
window.removeEventListener("keyup", GLFW.onKeyup, 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"].width = Module["canvas"].height = 1;
|
|
GLFW.windows = null;
|
|
GLFW.active = null;
|
|
}
|
|
|
|
function _glUniformMatrix4fv(location, count, transpose, value) {
|
|
location = GL.uniforms[location];
|
|
var view;
|
|
if (count === 1) {
|
|
// avoid allocation for the common case of uploading one uniform matrix
|
|
view = GL.miniTempBufferViews[15];
|
|
for (var i = 0; i < 16; i++) {
|
|
view[i] = HEAPF32[(((value)+(i*4))>>2)];
|
|
}
|
|
} else {
|
|
view = HEAPF32.subarray((value)>>2,(value+count*64)>>2);
|
|
}
|
|
GLctx.uniformMatrix4fv(location, transpose, view);
|
|
}
|
|
|
|
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 _glBufferSubData(target, offset, size, data) {
|
|
GLctx.bufferSubData(target, offset, HEAPU8.subarray(data, data+size));
|
|
}
|
|
|
|
function _glActiveTexture(x0) { GLctx.activeTexture(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 _glScissor(x0, x1, x2, x3) { GLctx.scissor(x0, x1, x2, x3) }
|
|
|
|
function _glfwGetKey(winid, key) {
|
|
return GLFW.getKey(winid, key);
|
|
}
|
|
|
|
function _glfwGetClipboardString(win) {}
|
|
|
|
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 {
|
|
HEAP32[((p)>>2)]=GLctx.getShaderParameter(GL.shaders[shader], pname);
|
|
}
|
|
}
|
|
|
|
function _pthread_self() {
|
|
//FIXME: assumes only a single thread
|
|
return 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 offset = offset_low;
|
|
assert(offset_high === 0);
|
|
FS.llseek(stream, offset, whence);
|
|
HEAP32[((result)>>2)]=stream.position;
|
|
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 ___syscall146(which, varargs) {SYSCALLS.varargs = varargs;
|
|
try {
|
|
// writev
|
|
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;
|
|
}
|
|
}
|
|
var GLctx; GL.init()
|
|
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) }
|
|
FS.staticInit();__ATINIT__.unshift(function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() });__ATMAIN__.push(function() { FS.ignorePermissions = false });__ATEXIT__.push(function() { FS.quit() });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;
|
|
__ATINIT__.unshift(function() { TTY.init() });__ATEXIT__.push(function() { TTY.shutdown() });
|
|
if (ENVIRONMENT_IS_NODE) { var fs = require("fs"); var NODEJS_PATH = require("path"); NODEFS.staticInit(); }
|
|
STACK_BASE = STACKTOP = Runtime.alignMemory(STATICTOP);
|
|
|
|
staticSealed = true; // seal the static portion of memory
|
|
|
|
STACK_MAX = STACK_BASE + TOTAL_STACK;
|
|
|
|
DYNAMIC_BASE = DYNAMICTOP = Runtime.alignMemory(STACK_MAX);
|
|
|
|
assert(DYNAMIC_BASE < TOTAL_MEMORY, "TOTAL_MEMORY not big enough for stack");
|
|
|
|
var cttz_i8 = allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0], "i8", ALLOC_DYNAMIC);
|
|
|
|
|
|
function nullFunc_iiii(x) { Module["printErr"]("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)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
|
|
|
|
function nullFunc_vi(x) { Module["printErr"]("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)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
|
|
|
|
function nullFunc_vii(x) { Module["printErr"]("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)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
|
|
|
|
function nullFunc_vidd(x) { Module["printErr"]("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)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
|
|
|
|
function nullFunc_ii(x) { Module["printErr"]("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)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
|
|
|
|
function nullFunc_didii(x) { Module["printErr"]("Invalid function pointer called with signature 'didii'. 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)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
|
|
|
|
function nullFunc_viii(x) { Module["printErr"]("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)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
|
|
|
|
function nullFunc_v(x) { Module["printErr"]("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)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
|
|
|
|
function nullFunc_iii(x) { Module["printErr"]("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)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
|
|
|
|
function nullFunc_vidiii(x) { Module["printErr"]("Invalid function pointer called with signature 'vidiii'. 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)"); Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
|
|
|
|
function invoke_iiii(index,a1,a2,a3) {
|
|
try {
|
|
return Module["dynCall_iiii"](index,a1,a2,a3);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_vi(index,a1) {
|
|
try {
|
|
Module["dynCall_vi"](index,a1);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_vii(index,a1,a2) {
|
|
try {
|
|
Module["dynCall_vii"](index,a1,a2);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_vidd(index,a1,a2,a3) {
|
|
try {
|
|
Module["dynCall_vidd"](index,a1,a2,a3);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_ii(index,a1) {
|
|
try {
|
|
return Module["dynCall_ii"](index,a1);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_didii(index,a1,a2,a3,a4) {
|
|
try {
|
|
return Module["dynCall_didii"](index,a1,a2,a3,a4);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_viii(index,a1,a2,a3) {
|
|
try {
|
|
Module["dynCall_viii"](index,a1,a2,a3);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_v(index) {
|
|
try {
|
|
Module["dynCall_v"](index);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_iii(index,a1,a2) {
|
|
try {
|
|
return Module["dynCall_iii"](index,a1,a2);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
function invoke_vidiii(index,a1,a2,a3,a4,a5) {
|
|
try {
|
|
Module["dynCall_vidiii"](index,a1,a2,a3,a4,a5);
|
|
} catch(e) {
|
|
if (typeof e !== 'number' && e !== 'longjmp') throw e;
|
|
asm["setThrew"](1, 0);
|
|
}
|
|
}
|
|
|
|
Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "NaN": NaN, "Infinity": Infinity };
|
|
|
|
Module.asmLibraryArg = { "abort": abort, "assert": assert, "nullFunc_iiii": nullFunc_iiii, "nullFunc_vi": nullFunc_vi, "nullFunc_vii": nullFunc_vii, "nullFunc_vidd": nullFunc_vidd, "nullFunc_ii": nullFunc_ii, "nullFunc_didii": nullFunc_didii, "nullFunc_viii": nullFunc_viii, "nullFunc_v": nullFunc_v, "nullFunc_iii": nullFunc_iii, "nullFunc_vidiii": nullFunc_vidiii, "invoke_iiii": invoke_iiii, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_vidd": invoke_vidd, "invoke_ii": invoke_ii, "invoke_didii": invoke_didii, "invoke_viii": invoke_viii, "invoke_v": invoke_v, "invoke_iii": invoke_iii, "invoke_vidiii": invoke_vidiii, "_glUseProgram": _glUseProgram, "_pthread_cleanup_pop": _pthread_cleanup_pop, "_glDeleteShader": _glDeleteShader, "_glVertexAttribPointer": _glVertexAttribPointer, "_glfwCreateWindow": _glfwCreateWindow, "_glShaderSource": _glShaderSource, "_glGetProgramiv": _glGetProgramiv, "_glLinkProgram": _glLinkProgram, "_glfwPollEvents": _glfwPollEvents, "_glfwSetClipboardString": _glfwSetClipboardString, "_glScissor": _glScissor, "_glGetUniformLocation": _glGetUniformLocation, "_glUniformMatrix4fv": _glUniformMatrix4fv, "___unlock": ___unlock, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "_glfwGetClipboardString": _glfwGetClipboardString, "_glfwGetWindowSize": _glfwGetWindowSize, "_glfwSetInputMode": _glfwSetInputMode, "___assert_fail": ___assert_fail, "_glDeleteProgram": _glDeleteProgram, "_glBlendEquation": _glBlendEquation, "_glfwMakeContextCurrent": _glfwMakeContextCurrent, "_glBindBuffer": _glBindBuffer, "_glCreateProgram": _glCreateProgram, "_glfwGetFramebufferSize": _glfwGetFramebufferSize, "_glViewport": _glViewport, "_glBindTexture": _glBindTexture, "_glGetShaderiv": _glGetShaderiv, "_glClearColor": _glClearColor, "_sbrk": _sbrk, "_glBlendFunc": _glBlendFunc, "_glDeleteTextures": _glDeleteTextures, "_glGetAttribLocation": _glGetAttribLocation, "_glClear": _glClear, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_glfwSetCharCallback": _glfwSetCharCallback, "_emscripten_cancel_main_loop": _emscripten_cancel_main_loop, "_sysconf": _sysconf, "_glfwSetScrollCallback": _glfwSetScrollCallback, "___setErrNo": ___setErrNo, "emscriptenWebGLComputeImageSize": emscriptenWebGLComputeImageSize, "_glfwSetCursorPos": _glfwSetCursorPos, "_glfwGetKey": _glfwGetKey, "_pthread_self": _pthread_self, "_glfwGetMouseButton": _glfwGetMouseButton, "_glEnable": _glEnable, "_abort": _abort, "_glGenTextures": _glGenTextures, "_glDrawElements": _glDrawElements, "_glfwSetWindowSizeCallback": _glfwSetWindowSizeCallback, "___syscall54": ___syscall54, "_glfwInit": _glfwInit, "_glActiveTexture": _glActiveTexture, "_glfwSwapBuffers": _glfwSwapBuffers, "_emscripten_set_main_loop": _emscripten_set_main_loop, "_emscripten_get_now": _emscripten_get_now, "_glfwWindowHint": _glfwWindowHint, "_glGenBuffers": _glGenBuffers, "_glAttachShader": _glAttachShader, "_glfwTerminate": _glfwTerminate, "_glBufferSubData": _glBufferSubData, "_glCompileShader": _glCompileShader, "_glUniform1i": _glUniform1i, "_glEnableVertexAttribArray": _glEnableVertexAttribArray, "___lock": ___lock, "emscriptenWebGLGetTexPixelData": emscriptenWebGLGetTexPixelData, "___syscall6": ___syscall6, "_pthread_cleanup_push": _pthread_cleanup_push, "_glTexParameteri": _glTexParameteri, "_glDisable": _glDisable, "_time": _time, "_glDetachShader": _glDetachShader, "_glDeleteBuffers": _glDeleteBuffers, "_glBufferData": _glBufferData, "_glfwGetCursorPos": _glfwGetCursorPos, "_glTexImage2D": _glTexImage2D, "___syscall140": ___syscall140, "_glfwSetErrorCallback": _glfwSetErrorCallback, "_glCreateShader": _glCreateShader, "___syscall146": ___syscall146, "_emscripten_asm_const_0": _emscripten_asm_const_0, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "cttz_i8": cttz_i8 };
|
|
// EMSCRIPTEN_START_ASM
|
|
var asm = (function(global, env, buffer) {
|
|
'almost asm';
|
|
|
|
|
|
var HEAP8 = new global.Int8Array(buffer);
|
|
var HEAP16 = new global.Int16Array(buffer);
|
|
var HEAP32 = new global.Int32Array(buffer);
|
|
var HEAPU8 = new global.Uint8Array(buffer);
|
|
var HEAPU16 = new global.Uint16Array(buffer);
|
|
var HEAPU32 = new global.Uint32Array(buffer);
|
|
var HEAPF32 = new global.Float32Array(buffer);
|
|
var HEAPF64 = new global.Float64Array(buffer);
|
|
|
|
|
|
var STACKTOP=env.STACKTOP|0;
|
|
var STACK_MAX=env.STACK_MAX|0;
|
|
var tempDoublePtr=env.tempDoublePtr|0;
|
|
var ABORT=env.ABORT|0;
|
|
var cttz_i8=env.cttz_i8|0;
|
|
|
|
var __THREW__ = 0;
|
|
var threwValue = 0;
|
|
var setjmpId = 0;
|
|
var undef = 0;
|
|
var nan = global.NaN, inf = global.Infinity;
|
|
var tempInt = 0, tempBigInt = 0, tempBigIntP = 0, tempBigIntS = 0, tempBigIntR = 0.0, tempBigIntI = 0, tempBigIntD = 0, tempValue = 0, tempDouble = 0.0;
|
|
|
|
var tempRet0 = 0;
|
|
var tempRet1 = 0;
|
|
var tempRet2 = 0;
|
|
var tempRet3 = 0;
|
|
var tempRet4 = 0;
|
|
var tempRet5 = 0;
|
|
var tempRet6 = 0;
|
|
var tempRet7 = 0;
|
|
var tempRet8 = 0;
|
|
var tempRet9 = 0;
|
|
var Math_floor=global.Math.floor;
|
|
var Math_abs=global.Math.abs;
|
|
var Math_sqrt=global.Math.sqrt;
|
|
var Math_pow=global.Math.pow;
|
|
var Math_cos=global.Math.cos;
|
|
var Math_sin=global.Math.sin;
|
|
var Math_tan=global.Math.tan;
|
|
var Math_acos=global.Math.acos;
|
|
var Math_asin=global.Math.asin;
|
|
var Math_atan=global.Math.atan;
|
|
var Math_atan2=global.Math.atan2;
|
|
var Math_exp=global.Math.exp;
|
|
var Math_log=global.Math.log;
|
|
var Math_ceil=global.Math.ceil;
|
|
var Math_imul=global.Math.imul;
|
|
var Math_min=global.Math.min;
|
|
var Math_clz32=global.Math.clz32;
|
|
var abort=env.abort;
|
|
var assert=env.assert;
|
|
var nullFunc_iiii=env.nullFunc_iiii;
|
|
var nullFunc_vi=env.nullFunc_vi;
|
|
var nullFunc_vii=env.nullFunc_vii;
|
|
var nullFunc_vidd=env.nullFunc_vidd;
|
|
var nullFunc_ii=env.nullFunc_ii;
|
|
var nullFunc_didii=env.nullFunc_didii;
|
|
var nullFunc_viii=env.nullFunc_viii;
|
|
var nullFunc_v=env.nullFunc_v;
|
|
var nullFunc_iii=env.nullFunc_iii;
|
|
var nullFunc_vidiii=env.nullFunc_vidiii;
|
|
var invoke_iiii=env.invoke_iiii;
|
|
var invoke_vi=env.invoke_vi;
|
|
var invoke_vii=env.invoke_vii;
|
|
var invoke_vidd=env.invoke_vidd;
|
|
var invoke_ii=env.invoke_ii;
|
|
var invoke_didii=env.invoke_didii;
|
|
var invoke_viii=env.invoke_viii;
|
|
var invoke_v=env.invoke_v;
|
|
var invoke_iii=env.invoke_iii;
|
|
var invoke_vidiii=env.invoke_vidiii;
|
|
var _glUseProgram=env._glUseProgram;
|
|
var _pthread_cleanup_pop=env._pthread_cleanup_pop;
|
|
var _glDeleteShader=env._glDeleteShader;
|
|
var _glVertexAttribPointer=env._glVertexAttribPointer;
|
|
var _glfwCreateWindow=env._glfwCreateWindow;
|
|
var _glShaderSource=env._glShaderSource;
|
|
var _glGetProgramiv=env._glGetProgramiv;
|
|
var _glLinkProgram=env._glLinkProgram;
|
|
var _glfwPollEvents=env._glfwPollEvents;
|
|
var _glfwSetClipboardString=env._glfwSetClipboardString;
|
|
var _glScissor=env._glScissor;
|
|
var _glGetUniformLocation=env._glGetUniformLocation;
|
|
var _glUniformMatrix4fv=env._glUniformMatrix4fv;
|
|
var ___unlock=env.___unlock;
|
|
var _emscripten_set_main_loop_timing=env._emscripten_set_main_loop_timing;
|
|
var _glfwGetClipboardString=env._glfwGetClipboardString;
|
|
var _glfwGetWindowSize=env._glfwGetWindowSize;
|
|
var _glfwSetInputMode=env._glfwSetInputMode;
|
|
var ___assert_fail=env.___assert_fail;
|
|
var _glDeleteProgram=env._glDeleteProgram;
|
|
var _glBlendEquation=env._glBlendEquation;
|
|
var _glfwMakeContextCurrent=env._glfwMakeContextCurrent;
|
|
var _glBindBuffer=env._glBindBuffer;
|
|
var _glCreateProgram=env._glCreateProgram;
|
|
var _glfwGetFramebufferSize=env._glfwGetFramebufferSize;
|
|
var _glViewport=env._glViewport;
|
|
var _glBindTexture=env._glBindTexture;
|
|
var _glGetShaderiv=env._glGetShaderiv;
|
|
var _glClearColor=env._glClearColor;
|
|
var _sbrk=env._sbrk;
|
|
var _glBlendFunc=env._glBlendFunc;
|
|
var _glDeleteTextures=env._glDeleteTextures;
|
|
var _glGetAttribLocation=env._glGetAttribLocation;
|
|
var _glClear=env._glClear;
|
|
var _emscripten_memcpy_big=env._emscripten_memcpy_big;
|
|
var _glfwSetCharCallback=env._glfwSetCharCallback;
|
|
var _emscripten_cancel_main_loop=env._emscripten_cancel_main_loop;
|
|
var _sysconf=env._sysconf;
|
|
var _glfwSetScrollCallback=env._glfwSetScrollCallback;
|
|
var ___setErrNo=env.___setErrNo;
|
|
var emscriptenWebGLComputeImageSize=env.emscriptenWebGLComputeImageSize;
|
|
var _glfwSetCursorPos=env._glfwSetCursorPos;
|
|
var _glfwGetKey=env._glfwGetKey;
|
|
var _pthread_self=env._pthread_self;
|
|
var _glfwGetMouseButton=env._glfwGetMouseButton;
|
|
var _glEnable=env._glEnable;
|
|
var _abort=env._abort;
|
|
var _glGenTextures=env._glGenTextures;
|
|
var _glDrawElements=env._glDrawElements;
|
|
var _glfwSetWindowSizeCallback=env._glfwSetWindowSizeCallback;
|
|
var ___syscall54=env.___syscall54;
|
|
var _glfwInit=env._glfwInit;
|
|
var _glActiveTexture=env._glActiveTexture;
|
|
var _glfwSwapBuffers=env._glfwSwapBuffers;
|
|
var _emscripten_set_main_loop=env._emscripten_set_main_loop;
|
|
var _emscripten_get_now=env._emscripten_get_now;
|
|
var _glfwWindowHint=env._glfwWindowHint;
|
|
var _glGenBuffers=env._glGenBuffers;
|
|
var _glAttachShader=env._glAttachShader;
|
|
var _glfwTerminate=env._glfwTerminate;
|
|
var _glBufferSubData=env._glBufferSubData;
|
|
var _glCompileShader=env._glCompileShader;
|
|
var _glUniform1i=env._glUniform1i;
|
|
var _glEnableVertexAttribArray=env._glEnableVertexAttribArray;
|
|
var ___lock=env.___lock;
|
|
var emscriptenWebGLGetTexPixelData=env.emscriptenWebGLGetTexPixelData;
|
|
var ___syscall6=env.___syscall6;
|
|
var _pthread_cleanup_push=env._pthread_cleanup_push;
|
|
var _glTexParameteri=env._glTexParameteri;
|
|
var _glDisable=env._glDisable;
|
|
var _time=env._time;
|
|
var _glDetachShader=env._glDetachShader;
|
|
var _glDeleteBuffers=env._glDeleteBuffers;
|
|
var _glBufferData=env._glBufferData;
|
|
var _glfwGetCursorPos=env._glfwGetCursorPos;
|
|
var _glTexImage2D=env._glTexImage2D;
|
|
var ___syscall140=env.___syscall140;
|
|
var _glfwSetErrorCallback=env._glfwSetErrorCallback;
|
|
var _glCreateShader=env._glCreateShader;
|
|
var ___syscall146=env.___syscall146;
|
|
var _emscripten_asm_const_0=env._emscripten_asm_const_0;
|
|
var tempFloat = 0.0;
|
|
|
|
// EMSCRIPTEN_START_FUNCS
|
|
function stackAlloc(size) {
|
|
size = size|0;
|
|
var ret = 0;
|
|
ret = STACKTOP;
|
|
STACKTOP = (STACKTOP + size)|0;
|
|
STACKTOP = (STACKTOP + 15)&-16;
|
|
if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
|
|
return ret|0;
|
|
}
|
|
function stackSave() {
|
|
return STACKTOP|0;
|
|
}
|
|
function stackRestore(top) {
|
|
top = top|0;
|
|
STACKTOP = top;
|
|
}
|
|
function establishStackSpace(stackBase, stackMax) {
|
|
stackBase = stackBase|0;
|
|
stackMax = stackMax|0;
|
|
STACKTOP = stackBase;
|
|
STACK_MAX = stackMax;
|
|
}
|
|
|
|
function setThrew(threw, value) {
|
|
threw = threw|0;
|
|
value = value|0;
|
|
if ((__THREW__|0) == 0) {
|
|
__THREW__ = threw;
|
|
threwValue = value;
|
|
}
|
|
}
|
|
function copyTempFloat(ptr) {
|
|
ptr = ptr|0;
|
|
HEAP8[tempDoublePtr>>0] = HEAP8[ptr>>0];
|
|
HEAP8[tempDoublePtr+1>>0] = HEAP8[ptr+1>>0];
|
|
HEAP8[tempDoublePtr+2>>0] = HEAP8[ptr+2>>0];
|
|
HEAP8[tempDoublePtr+3>>0] = HEAP8[ptr+3>>0];
|
|
}
|
|
function copyTempDouble(ptr) {
|
|
ptr = ptr|0;
|
|
HEAP8[tempDoublePtr>>0] = HEAP8[ptr>>0];
|
|
HEAP8[tempDoublePtr+1>>0] = HEAP8[ptr+1>>0];
|
|
HEAP8[tempDoublePtr+2>>0] = HEAP8[ptr+2>>0];
|
|
HEAP8[tempDoublePtr+3>>0] = HEAP8[ptr+3>>0];
|
|
HEAP8[tempDoublePtr+4>>0] = HEAP8[ptr+4>>0];
|
|
HEAP8[tempDoublePtr+5>>0] = HEAP8[ptr+5>>0];
|
|
HEAP8[tempDoublePtr+6>>0] = HEAP8[ptr+6>>0];
|
|
HEAP8[tempDoublePtr+7>>0] = HEAP8[ptr+7>>0];
|
|
}
|
|
|
|
function setTempRet0(value) {
|
|
value = value|0;
|
|
tempRet0 = value;
|
|
}
|
|
function getTempRet0() {
|
|
return tempRet0|0;
|
|
}
|
|
|
|
function _nk_rect($agg$result,$x,$y,$w,$h) {
|
|
$agg$result = $agg$result|0;
|
|
$x = +$x;
|
|
$y = +$y;
|
|
$w = +$w;
|
|
$h = +$h;
|
|
var $0 = 0.0, $1 = 0.0, $10 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, $r = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$r = sp;
|
|
$0 = $x;
|
|
$1 = $y;
|
|
$2 = $w;
|
|
$3 = $h;
|
|
$4 = $0;
|
|
HEAPF32[$r>>2] = $4;
|
|
$5 = $1;
|
|
$6 = ((($r)) + 4|0);
|
|
HEAPF32[$6>>2] = $5;
|
|
$7 = $2;
|
|
$8 = ((($r)) + 8|0);
|
|
HEAPF32[$8>>2] = $7;
|
|
$9 = $3;
|
|
$10 = ((($r)) + 12|0);
|
|
HEAPF32[$10>>2] = $9;
|
|
;HEAP32[$agg$result>>2]=HEAP32[$r>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$r+4>>2]|0;HEAP32[$agg$result+8>>2]=HEAP32[$r+8>>2]|0;HEAP32[$agg$result+12>>2]=HEAP32[$r+12>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_rect_size($agg$result,$r) {
|
|
$agg$result = $agg$result|0;
|
|
$r = $r|0;
|
|
var $0 = 0, $1 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $ret = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$ret = sp;
|
|
$0 = ((($r)) + 8|0);
|
|
$1 = +HEAPF32[$0>>2];
|
|
HEAPF32[$ret>>2] = $1;
|
|
$2 = ((($r)) + 12|0);
|
|
$3 = +HEAPF32[$2>>2];
|
|
$4 = ((($ret)) + 4|0);
|
|
HEAPF32[$4>>2] = $3;
|
|
;HEAP32[$agg$result>>2]=HEAP32[$ret>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ret+4>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_vec2($agg$result,$x,$y) {
|
|
$agg$result = $agg$result|0;
|
|
$x = +$x;
|
|
$y = +$y;
|
|
var $0 = 0.0, $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0, $ret = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$ret = sp;
|
|
$0 = $x;
|
|
$1 = $y;
|
|
$2 = $0;
|
|
HEAPF32[$ret>>2] = $2;
|
|
$3 = $1;
|
|
$4 = ((($ret)) + 4|0);
|
|
HEAPF32[$4>>2] = $3;
|
|
;HEAP32[$agg$result>>2]=HEAP32[$ret>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ret+4>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_strlen($str) {
|
|
$str = $str|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $siz = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $str;
|
|
$siz = 0;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((13396|0),(13400|0),2885,(13418|0));
|
|
// unreachable;
|
|
}
|
|
while(1) {
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if ($4) {
|
|
$5 = $0;
|
|
$6 = ((($5)) + 1|0);
|
|
$0 = $6;
|
|
$7 = HEAP8[$5>>0]|0;
|
|
$8 = $7 << 24 >> 24;
|
|
$9 = ($8|0)!=(0);
|
|
$12 = $9;
|
|
} else {
|
|
$12 = 0;
|
|
}
|
|
$10 = $siz;
|
|
if (!($12)) {
|
|
break;
|
|
}
|
|
$11 = (($10) + 1)|0;
|
|
$siz = $11;
|
|
}
|
|
STACKTOP = sp;return ($10|0);
|
|
}
|
|
function _nk_strtof($number,$buffer) {
|
|
$number = $number|0;
|
|
$buffer = $buffer|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0.0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0, $124 = 0, $125 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0;
|
|
var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0;
|
|
var $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0.0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0;
|
|
var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0.0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0;
|
|
var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0;
|
|
var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $div = 0, $floatvalue = 0.0, $i = 0, $m = 0.0, $neg = 0.0, $or$cond = 0, $p = 0, $pow = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $number;
|
|
$2 = $buffer;
|
|
$neg = 1.0;
|
|
$3 = $2;
|
|
$p = $3;
|
|
$floatvalue = 0.0;
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((13428|0),(13400|0),2898,(13435|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $2;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((13445|0),(13400|0),2899,(13435|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
$10 = $2;
|
|
$11 = ($10|0)!=(0|0);
|
|
$or$cond = $9 & $11;
|
|
if (!($or$cond)) {
|
|
$0 = 0;
|
|
$124 = $0;
|
|
STACKTOP = sp;return ($124|0);
|
|
}
|
|
$12 = $1;
|
|
HEAPF32[$12>>2] = 0.0;
|
|
while(1) {
|
|
$13 = $p;
|
|
$14 = HEAP8[$13>>0]|0;
|
|
$15 = $14 << 24 >> 24;
|
|
$16 = ($15|0)!=(0);
|
|
if ($16) {
|
|
$17 = $p;
|
|
$18 = HEAP8[$17>>0]|0;
|
|
$19 = $18 << 24 >> 24;
|
|
$20 = ($19|0)==(32);
|
|
$125 = $20;
|
|
} else {
|
|
$125 = 0;
|
|
}
|
|
$21 = $p;
|
|
if (!($125)) {
|
|
break;
|
|
}
|
|
$22 = ((($21)) + 1|0);
|
|
$p = $22;
|
|
}
|
|
$23 = HEAP8[$21>>0]|0;
|
|
$24 = $23 << 24 >> 24;
|
|
$25 = ($24|0)==(45);
|
|
if ($25) {
|
|
$neg = -1.0;
|
|
$26 = $p;
|
|
$27 = ((($26)) + 1|0);
|
|
$p = $27;
|
|
}
|
|
while(1) {
|
|
$28 = $p;
|
|
$29 = HEAP8[$28>>0]|0;
|
|
$30 = $29 << 24 >> 24;
|
|
$31 = ($30|0)!=(0);
|
|
if (!($31)) {
|
|
break;
|
|
}
|
|
$32 = $p;
|
|
$33 = HEAP8[$32>>0]|0;
|
|
$34 = $33 << 24 >> 24;
|
|
$35 = ($34|0)!=(46);
|
|
if (!($35)) {
|
|
break;
|
|
}
|
|
$36 = $p;
|
|
$37 = HEAP8[$36>>0]|0;
|
|
$38 = $37 << 24 >> 24;
|
|
$39 = ($38|0)!=(101);
|
|
if (!($39)) {
|
|
break;
|
|
}
|
|
$40 = $floatvalue;
|
|
$41 = $40 * 10.0;
|
|
$42 = $p;
|
|
$43 = HEAP8[$42>>0]|0;
|
|
$44 = $43 << 24 >> 24;
|
|
$45 = (($44) - 48)|0;
|
|
$46 = (+($45|0));
|
|
$47 = $41 + $46;
|
|
$floatvalue = $47;
|
|
$48 = $p;
|
|
$49 = ((($48)) + 1|0);
|
|
$p = $49;
|
|
}
|
|
$50 = $p;
|
|
$51 = HEAP8[$50>>0]|0;
|
|
$52 = $51 << 24 >> 24;
|
|
$53 = ($52|0)==(46);
|
|
L26: do {
|
|
if ($53) {
|
|
$54 = $p;
|
|
$55 = ((($54)) + 1|0);
|
|
$p = $55;
|
|
$m = 0.10000000149011612;
|
|
while(1) {
|
|
$56 = $p;
|
|
$57 = HEAP8[$56>>0]|0;
|
|
$58 = $57 << 24 >> 24;
|
|
$59 = ($58|0)!=(0);
|
|
if (!($59)) {
|
|
break L26;
|
|
}
|
|
$60 = $p;
|
|
$61 = HEAP8[$60>>0]|0;
|
|
$62 = $61 << 24 >> 24;
|
|
$63 = ($62|0)!=(101);
|
|
if (!($63)) {
|
|
break L26;
|
|
}
|
|
$64 = $floatvalue;
|
|
$65 = $p;
|
|
$66 = HEAP8[$65>>0]|0;
|
|
$67 = $66 << 24 >> 24;
|
|
$68 = (($67) - 48)|0;
|
|
$69 = (+($68|0));
|
|
$70 = $m;
|
|
$71 = $69 * $70;
|
|
$72 = $64 + $71;
|
|
$floatvalue = $72;
|
|
$73 = $m;
|
|
$74 = $73 * 0.10000000149011612;
|
|
$m = $74;
|
|
$75 = $p;
|
|
$76 = ((($75)) + 1|0);
|
|
$p = $76;
|
|
}
|
|
}
|
|
} while(0);
|
|
$77 = $p;
|
|
$78 = HEAP8[$77>>0]|0;
|
|
$79 = $78 << 24 >> 24;
|
|
$80 = ($79|0)==(101);
|
|
do {
|
|
if ($80) {
|
|
$81 = $p;
|
|
$82 = ((($81)) + 1|0);
|
|
$p = $82;
|
|
$83 = $p;
|
|
$84 = HEAP8[$83>>0]|0;
|
|
$85 = $84 << 24 >> 24;
|
|
$86 = ($85|0)==(45);
|
|
if ($86) {
|
|
$div = 1;
|
|
$87 = $p;
|
|
$88 = ((($87)) + 1|0);
|
|
$p = $88;
|
|
} else {
|
|
$89 = $p;
|
|
$90 = HEAP8[$89>>0]|0;
|
|
$91 = $90 << 24 >> 24;
|
|
$92 = ($91|0)==(43);
|
|
$div = 0;
|
|
if ($92) {
|
|
$93 = $p;
|
|
$94 = ((($93)) + 1|0);
|
|
$p = $94;
|
|
}
|
|
}
|
|
$pow = 0;
|
|
while(1) {
|
|
$95 = $p;
|
|
$96 = HEAP8[$95>>0]|0;
|
|
$97 = ($96<<24>>24)!=(0);
|
|
if (!($97)) {
|
|
break;
|
|
}
|
|
$98 = $pow;
|
|
$99 = ($98*10)|0;
|
|
$100 = $p;
|
|
$101 = HEAP8[$100>>0]|0;
|
|
$102 = $101 << 24 >> 24;
|
|
$103 = (($102) - 48)|0;
|
|
$104 = (($99) + ($103))|0;
|
|
$pow = $104;
|
|
$105 = $p;
|
|
$106 = ((($105)) + 1|0);
|
|
$p = $106;
|
|
}
|
|
$m = 1.0;
|
|
$i = 0;
|
|
while(1) {
|
|
$107 = $i;
|
|
$108 = $pow;
|
|
$109 = ($107|0)<($108|0);
|
|
if (!($109)) {
|
|
break;
|
|
}
|
|
$110 = $m;
|
|
$111 = $110 * 10.0;
|
|
$m = $111;
|
|
$112 = $i;
|
|
$113 = (($112) + 1)|0;
|
|
$i = $113;
|
|
}
|
|
$114 = $div;
|
|
$115 = ($114|0)!=(0);
|
|
$116 = $m;
|
|
$117 = $floatvalue;
|
|
if ($115) {
|
|
$118 = $117 / $116;
|
|
$floatvalue = $118;
|
|
break;
|
|
} else {
|
|
$119 = $117 * $116;
|
|
$floatvalue = $119;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$120 = $floatvalue;
|
|
$121 = $neg;
|
|
$122 = $120 * $121;
|
|
$123 = $1;
|
|
HEAPF32[$123>>2] = $122;
|
|
$0 = 1;
|
|
$124 = $0;
|
|
STACKTOP = sp;return ($124|0);
|
|
}
|
|
function _nk_murmur_hash($key,$len,$seed) {
|
|
$key = $key|0;
|
|
$len = $len|0;
|
|
$seed = $seed|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
|
|
var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
|
|
var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0;
|
|
var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0;
|
|
var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0;
|
|
var $97 = 0, $98 = 0, $99 = 0, $blocks = 0, $c1 = 0, $c2 = 0, $conv = 0, $data = 0, $h1 = 0, $i = 0, $k1 = 0, $nblocks = 0, $tail = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$conv = sp + 36|0;
|
|
$1 = $key;
|
|
$2 = $len;
|
|
$3 = $seed;
|
|
;HEAP32[$conv>>2]=0|0;
|
|
$4 = $1;
|
|
$data = $4;
|
|
$5 = $2;
|
|
$6 = (($5|0) / 4)&-1;
|
|
$nblocks = $6;
|
|
$7 = $3;
|
|
$h1 = $7;
|
|
$c1 = -862048943;
|
|
$c2 = 461845907;
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
$0 = 0;
|
|
$102 = $0;
|
|
STACKTOP = sp;return ($102|0);
|
|
}
|
|
$10 = $data;
|
|
$11 = $nblocks;
|
|
$12 = $11<<2;
|
|
$13 = (($10) + ($12)|0);
|
|
HEAP32[$conv>>2] = $13;
|
|
$14 = HEAP32[$conv>>2]|0;
|
|
$blocks = $14;
|
|
$15 = $nblocks;
|
|
$16 = (0 - ($15))|0;
|
|
$i = $16;
|
|
while(1) {
|
|
$17 = $i;
|
|
$18 = ($17|0)!=(0);
|
|
if (!($18)) {
|
|
break;
|
|
}
|
|
$19 = $i;
|
|
$20 = $blocks;
|
|
$21 = (($20) + ($19<<2)|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$k1 = $22;
|
|
$23 = $k1;
|
|
$24 = Math_imul($23, -862048943)|0;
|
|
$k1 = $24;
|
|
$25 = $k1;
|
|
$26 = $25 << 15;
|
|
$27 = $k1;
|
|
$28 = $27 >>> 17;
|
|
$29 = $26 | $28;
|
|
$k1 = $29;
|
|
$30 = $k1;
|
|
$31 = Math_imul($30, 461845907)|0;
|
|
$k1 = $31;
|
|
$32 = $k1;
|
|
$33 = $h1;
|
|
$34 = $33 ^ $32;
|
|
$h1 = $34;
|
|
$35 = $h1;
|
|
$36 = $35 << 13;
|
|
$37 = $h1;
|
|
$38 = $37 >>> 19;
|
|
$39 = $36 | $38;
|
|
$h1 = $39;
|
|
$40 = $h1;
|
|
$41 = ($40*5)|0;
|
|
$42 = (($41) + -430675100)|0;
|
|
$h1 = $42;
|
|
$43 = $i;
|
|
$44 = (($43) + 1)|0;
|
|
$i = $44;
|
|
}
|
|
$45 = $data;
|
|
$46 = $nblocks;
|
|
$47 = $46<<2;
|
|
$48 = (($45) + ($47)|0);
|
|
$tail = $48;
|
|
$k1 = 0;
|
|
$49 = $2;
|
|
$50 = $49 & 3;
|
|
switch ($50|0) {
|
|
case 3: {
|
|
$51 = $tail;
|
|
$52 = ((($51)) + 2|0);
|
|
$53 = HEAP8[$52>>0]|0;
|
|
$54 = $53&255;
|
|
$55 = $54 << 16;
|
|
$56 = $k1;
|
|
$57 = $56 ^ $55;
|
|
$k1 = $57;
|
|
label = 8;
|
|
break;
|
|
}
|
|
case 2: {
|
|
label = 8;
|
|
break;
|
|
}
|
|
case 1: {
|
|
label = 9;
|
|
break;
|
|
}
|
|
default: {
|
|
}
|
|
}
|
|
if ((label|0) == 8) {
|
|
$58 = $tail;
|
|
$59 = ((($58)) + 1|0);
|
|
$60 = HEAP8[$59>>0]|0;
|
|
$61 = $60&255;
|
|
$62 = $61 << 8;
|
|
$63 = $k1;
|
|
$64 = $63 ^ $62;
|
|
$k1 = $64;
|
|
label = 9;
|
|
}
|
|
if ((label|0) == 9) {
|
|
$65 = $tail;
|
|
$66 = HEAP8[$65>>0]|0;
|
|
$67 = $66&255;
|
|
$68 = $k1;
|
|
$69 = $68 ^ $67;
|
|
$k1 = $69;
|
|
$70 = $k1;
|
|
$71 = Math_imul($70, -862048943)|0;
|
|
$k1 = $71;
|
|
$72 = $k1;
|
|
$73 = $72 << 15;
|
|
$74 = $k1;
|
|
$75 = $74 >>> 17;
|
|
$76 = $73 | $75;
|
|
$k1 = $76;
|
|
$77 = $k1;
|
|
$78 = Math_imul($77, 461845907)|0;
|
|
$k1 = $78;
|
|
$79 = $k1;
|
|
$80 = $h1;
|
|
$81 = $80 ^ $79;
|
|
$h1 = $81;
|
|
}
|
|
$82 = $2;
|
|
$83 = $h1;
|
|
$84 = $83 ^ $82;
|
|
$h1 = $84;
|
|
$85 = $h1;
|
|
$86 = $85 >>> 16;
|
|
$87 = $h1;
|
|
$88 = $87 ^ $86;
|
|
$h1 = $88;
|
|
$89 = $h1;
|
|
$90 = Math_imul($89, -2048144789)|0;
|
|
$h1 = $90;
|
|
$91 = $h1;
|
|
$92 = $91 >>> 13;
|
|
$93 = $h1;
|
|
$94 = $93 ^ $92;
|
|
$h1 = $94;
|
|
$95 = $h1;
|
|
$96 = Math_imul($95, -1028477387)|0;
|
|
$h1 = $96;
|
|
$97 = $h1;
|
|
$98 = $97 >>> 16;
|
|
$99 = $h1;
|
|
$100 = $99 ^ $98;
|
|
$h1 = $100;
|
|
$101 = $h1;
|
|
$0 = $101;
|
|
$102 = $0;
|
|
STACKTOP = sp;return ($102|0);
|
|
}
|
|
function _nk_rgba($agg$result,$r,$g,$b,$a) {
|
|
$agg$result = $agg$result|0;
|
|
$r = $r|0;
|
|
$g = $g|0;
|
|
$b = $b|0;
|
|
$a = $a|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ret = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$ret = sp + 16|0;
|
|
$0 = $r;
|
|
$1 = $g;
|
|
$2 = $b;
|
|
$3 = $a;
|
|
$4 = $0;
|
|
$5 = ($4|0)<(255);
|
|
$6 = $0;
|
|
$7 = $5 ? $6 : 255;
|
|
$8 = ($7|0)<(0);
|
|
if ($8) {
|
|
$14 = 0;
|
|
} else {
|
|
$9 = $0;
|
|
$10 = ($9|0)<(255);
|
|
$11 = $0;
|
|
$12 = $10 ? $11 : 255;
|
|
$14 = $12;
|
|
}
|
|
$13 = $14&255;
|
|
HEAP8[$ret>>0] = $13;
|
|
$15 = $1;
|
|
$16 = ($15|0)<(255);
|
|
$17 = $1;
|
|
$18 = $16 ? $17 : 255;
|
|
$19 = ($18|0)<(0);
|
|
if ($19) {
|
|
$25 = 0;
|
|
} else {
|
|
$20 = $1;
|
|
$21 = ($20|0)<(255);
|
|
$22 = $1;
|
|
$23 = $21 ? $22 : 255;
|
|
$25 = $23;
|
|
}
|
|
$24 = $25&255;
|
|
$26 = ((($ret)) + 1|0);
|
|
HEAP8[$26>>0] = $24;
|
|
$27 = $2;
|
|
$28 = ($27|0)<(255);
|
|
$29 = $2;
|
|
$30 = $28 ? $29 : 255;
|
|
$31 = ($30|0)<(0);
|
|
if ($31) {
|
|
$37 = 0;
|
|
} else {
|
|
$32 = $2;
|
|
$33 = ($32|0)<(255);
|
|
$34 = $2;
|
|
$35 = $33 ? $34 : 255;
|
|
$37 = $35;
|
|
}
|
|
$36 = $37&255;
|
|
$38 = ((($ret)) + 2|0);
|
|
HEAP8[$38>>0] = $36;
|
|
$39 = $3;
|
|
$40 = ($39|0)<(255);
|
|
$41 = $3;
|
|
$42 = $40 ? $41 : 255;
|
|
$43 = ($42|0)<(0);
|
|
if ($43) {
|
|
$49 = 0;
|
|
} else {
|
|
$44 = $3;
|
|
$45 = ($44|0)<(255);
|
|
$46 = $3;
|
|
$47 = $45 ? $46 : 255;
|
|
$49 = $47;
|
|
}
|
|
$48 = $49&255;
|
|
$50 = ((($ret)) + 3|0);
|
|
HEAP8[$50>>0] = $48;
|
|
;HEAP8[$agg$result>>0]=HEAP8[$ret>>0]|0;HEAP8[$agg$result+1>>0]=HEAP8[$ret+1>>0]|0;HEAP8[$agg$result+2>>0]=HEAP8[$ret+2>>0]|0;HEAP8[$agg$result+3>>0]=HEAP8[$ret+3>>0]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_rgb($agg$result,$r,$g,$b) {
|
|
$agg$result = $agg$result|0;
|
|
$r = $r|0;
|
|
$g = $g|0;
|
|
$b = $b|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ret = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$ret = sp + 12|0;
|
|
$0 = $r;
|
|
$1 = $g;
|
|
$2 = $b;
|
|
$3 = $0;
|
|
$4 = ($3|0)<(255);
|
|
$5 = $0;
|
|
$6 = $4 ? $5 : 255;
|
|
$7 = ($6|0)<(0);
|
|
if ($7) {
|
|
$13 = 0;
|
|
} else {
|
|
$8 = $0;
|
|
$9 = ($8|0)<(255);
|
|
$10 = $0;
|
|
$11 = $9 ? $10 : 255;
|
|
$13 = $11;
|
|
}
|
|
$12 = $13&255;
|
|
HEAP8[$ret>>0] = $12;
|
|
$14 = $1;
|
|
$15 = ($14|0)<(255);
|
|
$16 = $1;
|
|
$17 = $15 ? $16 : 255;
|
|
$18 = ($17|0)<(0);
|
|
if ($18) {
|
|
$24 = 0;
|
|
} else {
|
|
$19 = $1;
|
|
$20 = ($19|0)<(255);
|
|
$21 = $1;
|
|
$22 = $20 ? $21 : 255;
|
|
$24 = $22;
|
|
}
|
|
$23 = $24&255;
|
|
$25 = ((($ret)) + 1|0);
|
|
HEAP8[$25>>0] = $23;
|
|
$26 = $2;
|
|
$27 = ($26|0)<(255);
|
|
$28 = $2;
|
|
$29 = $27 ? $28 : 255;
|
|
$30 = ($29|0)<(0);
|
|
if ($30) {
|
|
$36 = 0;
|
|
} else {
|
|
$31 = $2;
|
|
$32 = ($31|0)<(255);
|
|
$33 = $2;
|
|
$34 = $32 ? $33 : 255;
|
|
$36 = $34;
|
|
}
|
|
$35 = $36&255;
|
|
$37 = ((($ret)) + 2|0);
|
|
HEAP8[$37>>0] = $35;
|
|
$38 = ((($ret)) + 3|0);
|
|
HEAP8[$38>>0] = -1;
|
|
;HEAP8[$agg$result>>0]=HEAP8[$ret>>0]|0;HEAP8[$agg$result+1>>0]=HEAP8[$ret+1>>0]|0;HEAP8[$agg$result+2>>0]=HEAP8[$ret+2>>0]|0;HEAP8[$agg$result+3>>0]=HEAP8[$ret+3>>0]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_rgba_f($agg$result,$r,$g,$b,$a) {
|
|
$agg$result = $agg$result|0;
|
|
$r = +$r;
|
|
$g = +$g;
|
|
$b = +$b;
|
|
$a = +$a;
|
|
var $0 = 0.0, $1 = 0.0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0;
|
|
var $27 = 0, $28 = 0, $29 = 0.0, $3 = 0.0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0, $41 = 0, $42 = 0.0, $43 = 0, $44 = 0.0;
|
|
var $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0, $54 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0.0, $ret = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$ret = sp + 16|0;
|
|
$0 = $r;
|
|
$1 = $g;
|
|
$2 = $b;
|
|
$3 = $a;
|
|
$4 = $0;
|
|
$5 = 1.0 < $4;
|
|
$6 = $0;
|
|
$7 = $5 ? 1.0 : $6;
|
|
$8 = 0.0 < $7;
|
|
if ($8) {
|
|
$9 = $0;
|
|
$10 = 1.0 < $9;
|
|
$11 = $0;
|
|
$12 = $10 ? 1.0 : $11;
|
|
$14 = $12;
|
|
} else {
|
|
$14 = 0.0;
|
|
}
|
|
$13 = $14 * 255.0;
|
|
$15 = (~~(($13))&255);
|
|
HEAP8[$ret>>0] = $15;
|
|
$16 = $1;
|
|
$17 = 1.0 < $16;
|
|
$18 = $1;
|
|
$19 = $17 ? 1.0 : $18;
|
|
$20 = 0.0 < $19;
|
|
if ($20) {
|
|
$21 = $1;
|
|
$22 = 1.0 < $21;
|
|
$23 = $1;
|
|
$24 = $22 ? 1.0 : $23;
|
|
$26 = $24;
|
|
} else {
|
|
$26 = 0.0;
|
|
}
|
|
$25 = $26 * 255.0;
|
|
$27 = (~~(($25))&255);
|
|
$28 = ((($ret)) + 1|0);
|
|
HEAP8[$28>>0] = $27;
|
|
$29 = $2;
|
|
$30 = 1.0 < $29;
|
|
$31 = $2;
|
|
$32 = $30 ? 1.0 : $31;
|
|
$33 = 0.0 < $32;
|
|
if ($33) {
|
|
$34 = $2;
|
|
$35 = 1.0 < $34;
|
|
$36 = $2;
|
|
$37 = $35 ? 1.0 : $36;
|
|
$39 = $37;
|
|
} else {
|
|
$39 = 0.0;
|
|
}
|
|
$38 = $39 * 255.0;
|
|
$40 = (~~(($38))&255);
|
|
$41 = ((($ret)) + 2|0);
|
|
HEAP8[$41>>0] = $40;
|
|
$42 = $3;
|
|
$43 = 1.0 < $42;
|
|
$44 = $3;
|
|
$45 = $43 ? 1.0 : $44;
|
|
$46 = 0.0 < $45;
|
|
if ($46) {
|
|
$47 = $3;
|
|
$48 = 1.0 < $47;
|
|
$49 = $3;
|
|
$50 = $48 ? 1.0 : $49;
|
|
$52 = $50;
|
|
} else {
|
|
$52 = 0.0;
|
|
}
|
|
$51 = $52 * 255.0;
|
|
$53 = (~~(($51))&255);
|
|
$54 = ((($ret)) + 3|0);
|
|
HEAP8[$54>>0] = $53;
|
|
;HEAP8[$agg$result>>0]=HEAP8[$ret>>0]|0;HEAP8[$agg$result+1>>0]=HEAP8[$ret+1>>0]|0;HEAP8[$agg$result+2>>0]=HEAP8[$ret+2>>0]|0;HEAP8[$agg$result+3>>0]=HEAP8[$ret+3>>0]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_rgb_f($agg$result,$r,$g,$b) {
|
|
$agg$result = $agg$result|0;
|
|
$r = +$r;
|
|
$g = +$g;
|
|
$b = +$b;
|
|
var $0 = 0.0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0.0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0;
|
|
var $27 = 0, $28 = 0.0, $29 = 0, $3 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0.0, $6 = 0.0, $7 = 0;
|
|
var $8 = 0.0, $9 = 0, $ret = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$ret = sp + 12|0;
|
|
$0 = $r;
|
|
$1 = $g;
|
|
$2 = $b;
|
|
$3 = $0;
|
|
$4 = 1.0 < $3;
|
|
$5 = $0;
|
|
$6 = $4 ? 1.0 : $5;
|
|
$7 = 0.0 < $6;
|
|
if ($7) {
|
|
$8 = $0;
|
|
$9 = 1.0 < $8;
|
|
$10 = $0;
|
|
$11 = $9 ? 1.0 : $10;
|
|
$13 = $11;
|
|
} else {
|
|
$13 = 0.0;
|
|
}
|
|
$12 = $13 * 255.0;
|
|
$14 = (~~(($12))&255);
|
|
HEAP8[$ret>>0] = $14;
|
|
$15 = $1;
|
|
$16 = 1.0 < $15;
|
|
$17 = $1;
|
|
$18 = $16 ? 1.0 : $17;
|
|
$19 = 0.0 < $18;
|
|
if ($19) {
|
|
$20 = $1;
|
|
$21 = 1.0 < $20;
|
|
$22 = $1;
|
|
$23 = $21 ? 1.0 : $22;
|
|
$25 = $23;
|
|
} else {
|
|
$25 = 0.0;
|
|
}
|
|
$24 = $25 * 255.0;
|
|
$26 = (~~(($24))&255);
|
|
$27 = ((($ret)) + 1|0);
|
|
HEAP8[$27>>0] = $26;
|
|
$28 = $2;
|
|
$29 = 1.0 < $28;
|
|
$30 = $2;
|
|
$31 = $29 ? 1.0 : $30;
|
|
$32 = 0.0 < $31;
|
|
if ($32) {
|
|
$33 = $2;
|
|
$34 = 1.0 < $33;
|
|
$35 = $2;
|
|
$36 = $34 ? 1.0 : $35;
|
|
$38 = $36;
|
|
} else {
|
|
$38 = 0.0;
|
|
}
|
|
$37 = $38 * 255.0;
|
|
$39 = (~~(($37))&255);
|
|
$40 = ((($ret)) + 2|0);
|
|
HEAP8[$40>>0] = $39;
|
|
$41 = ((($ret)) + 3|0);
|
|
HEAP8[$41>>0] = -1;
|
|
;HEAP8[$agg$result>>0]=HEAP8[$ret>>0]|0;HEAP8[$agg$result+1>>0]=HEAP8[$ret+1>>0]|0;HEAP8[$agg$result+2>>0]=HEAP8[$ret+2>>0]|0;HEAP8[$agg$result+3>>0]=HEAP8[$ret+3>>0]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_hsv_f($agg$result,$h,$s,$v) {
|
|
$agg$result = $agg$result|0;
|
|
$h = +$h;
|
|
$s = +$s;
|
|
$v = +$v;
|
|
var $0 = 0.0, $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $h;
|
|
$1 = $s;
|
|
$2 = $v;
|
|
$3 = $0;
|
|
$4 = $1;
|
|
$5 = $2;
|
|
_nk_hsva_f($agg$result,$3,$4,$5,1.0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_hsva_f($agg$result,$h,$s,$v,$a) {
|
|
$agg$result = $agg$result|0;
|
|
$h = +$h;
|
|
$s = +$s;
|
|
$v = +$v;
|
|
$a = +$a;
|
|
var $0 = 0.0, $1 = 0.0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0.0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0;
|
|
var $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0.0, $44 = 0;
|
|
var $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0, $57 = 0.0, $58 = 0.0, $59 = 0, $6 = 0.0, $60 = 0.0, $61 = 0, $62 = 0.0;
|
|
var $63 = 0.0, $64 = 0, $65 = 0.0, $66 = 0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0.0, $70 = 0.0, $71 = 0, $72 = 0.0, $73 = 0, $74 = 0.0, $75 = 0, $76 = 0.0, $77 = 0.0, $8 = 0, $9 = 0.0, $f = 0.0, $i = 0;
|
|
var $out = 0, $p = 0.0, $q = 0.0, $t = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$out = sp + 20|0;
|
|
$0 = $h;
|
|
$1 = $s;
|
|
$2 = $v;
|
|
$3 = $a;
|
|
;HEAP32[$out>>2]=0|0;HEAP32[$out+4>>2]=0|0;HEAP32[$out+8>>2]=0|0;
|
|
$4 = $1;
|
|
$5 = $4 <= 0.0;
|
|
if ($5) {
|
|
$6 = $2;
|
|
HEAPF32[$out>>2] = $6;
|
|
$7 = $2;
|
|
$8 = ((($out)) + 4|0);
|
|
HEAPF32[$8>>2] = $7;
|
|
$9 = $2;
|
|
$10 = ((($out)) + 8|0);
|
|
HEAPF32[$10>>2] = $9;
|
|
$11 = +HEAPF32[$out>>2];
|
|
$12 = ((($out)) + 4|0);
|
|
$13 = +HEAPF32[$12>>2];
|
|
$14 = ((($out)) + 8|0);
|
|
$15 = +HEAPF32[$14>>2];
|
|
_nk_rgb_f($agg$result,$11,$13,$15);
|
|
STACKTOP = sp;return;
|
|
}
|
|
$16 = $0;
|
|
$17 = $16 / 0.1666666716337204;
|
|
$0 = $17;
|
|
$18 = $0;
|
|
$19 = (~~(($18)));
|
|
$i = $19;
|
|
$20 = $0;
|
|
$21 = $i;
|
|
$22 = (+($21|0));
|
|
$23 = $20 - $22;
|
|
$f = $23;
|
|
$24 = $2;
|
|
$25 = $1;
|
|
$26 = 1.0 - $25;
|
|
$27 = $24 * $26;
|
|
$p = $27;
|
|
$28 = $2;
|
|
$29 = $1;
|
|
$30 = $f;
|
|
$31 = $29 * $30;
|
|
$32 = 1.0 - $31;
|
|
$33 = $28 * $32;
|
|
$q = $33;
|
|
$34 = $2;
|
|
$35 = $1;
|
|
$36 = $f;
|
|
$37 = 1.0 - $36;
|
|
$38 = $35 * $37;
|
|
$39 = 1.0 - $38;
|
|
$40 = $34 * $39;
|
|
$t = $40;
|
|
$41 = $i;
|
|
switch ($41|0) {
|
|
case 0: {
|
|
$42 = $2;
|
|
HEAPF32[$out>>2] = $42;
|
|
$43 = $t;
|
|
$44 = ((($out)) + 4|0);
|
|
HEAPF32[$44>>2] = $43;
|
|
$45 = $p;
|
|
$46 = ((($out)) + 8|0);
|
|
HEAPF32[$46>>2] = $45;
|
|
break;
|
|
}
|
|
case 1: {
|
|
$47 = $q;
|
|
HEAPF32[$out>>2] = $47;
|
|
$48 = $2;
|
|
$49 = ((($out)) + 4|0);
|
|
HEAPF32[$49>>2] = $48;
|
|
$50 = $p;
|
|
$51 = ((($out)) + 8|0);
|
|
HEAPF32[$51>>2] = $50;
|
|
break;
|
|
}
|
|
case 2: {
|
|
$52 = $p;
|
|
HEAPF32[$out>>2] = $52;
|
|
$53 = $2;
|
|
$54 = ((($out)) + 4|0);
|
|
HEAPF32[$54>>2] = $53;
|
|
$55 = $t;
|
|
$56 = ((($out)) + 8|0);
|
|
HEAPF32[$56>>2] = $55;
|
|
break;
|
|
}
|
|
case 3: {
|
|
$57 = $p;
|
|
HEAPF32[$out>>2] = $57;
|
|
$58 = $q;
|
|
$59 = ((($out)) + 4|0);
|
|
HEAPF32[$59>>2] = $58;
|
|
$60 = $2;
|
|
$61 = ((($out)) + 8|0);
|
|
HEAPF32[$61>>2] = $60;
|
|
break;
|
|
}
|
|
case 4: {
|
|
$62 = $t;
|
|
HEAPF32[$out>>2] = $62;
|
|
$63 = $p;
|
|
$64 = ((($out)) + 4|0);
|
|
HEAPF32[$64>>2] = $63;
|
|
$65 = $2;
|
|
$66 = ((($out)) + 8|0);
|
|
HEAPF32[$66>>2] = $65;
|
|
break;
|
|
}
|
|
default: {
|
|
$67 = $2;
|
|
HEAPF32[$out>>2] = $67;
|
|
$68 = $p;
|
|
$69 = ((($out)) + 4|0);
|
|
HEAPF32[$69>>2] = $68;
|
|
$70 = $q;
|
|
$71 = ((($out)) + 8|0);
|
|
HEAPF32[$71>>2] = $70;
|
|
}
|
|
}
|
|
$72 = +HEAPF32[$out>>2];
|
|
$73 = ((($out)) + 4|0);
|
|
$74 = +HEAPF32[$73>>2];
|
|
$75 = ((($out)) + 8|0);
|
|
$76 = +HEAPF32[$75>>2];
|
|
$77 = $3;
|
|
_nk_rgba_f($agg$result,$72,$74,$76,$77);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_hsva_fv($agg$result,$c) {
|
|
$agg$result = $agg$result|0;
|
|
$c = $c|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $2 = 0.0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $c;
|
|
$1 = $0;
|
|
$2 = +HEAPF32[$1>>2];
|
|
$3 = $0;
|
|
$4 = ((($3)) + 4|0);
|
|
$5 = +HEAPF32[$4>>2];
|
|
$6 = $0;
|
|
$7 = ((($6)) + 8|0);
|
|
$8 = +HEAPF32[$7>>2];
|
|
$9 = $0;
|
|
$10 = ((($9)) + 12|0);
|
|
$11 = +HEAPF32[$10>>2];
|
|
_nk_hsva_f($agg$result,$2,$5,$8,$11);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_color_u32($in) {
|
|
$in = $in|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
|
|
var $9 = 0, $out = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = HEAP8[$in>>0]|0;
|
|
$1 = $0&255;
|
|
$out = $1;
|
|
$2 = ((($in)) + 1|0);
|
|
$3 = HEAP8[$2>>0]|0;
|
|
$4 = $3&255;
|
|
$5 = $4 << 8;
|
|
$6 = $out;
|
|
$7 = $6 | $5;
|
|
$out = $7;
|
|
$8 = ((($in)) + 2|0);
|
|
$9 = HEAP8[$8>>0]|0;
|
|
$10 = $9&255;
|
|
$11 = $10 << 16;
|
|
$12 = $out;
|
|
$13 = $12 | $11;
|
|
$out = $13;
|
|
$14 = ((($in)) + 3|0);
|
|
$15 = HEAP8[$14>>0]|0;
|
|
$16 = $15&255;
|
|
$17 = $16 << 24;
|
|
$18 = $out;
|
|
$19 = $18 | $17;
|
|
$out = $19;
|
|
$20 = $out;
|
|
STACKTOP = sp;return ($20|0);
|
|
}
|
|
function _nk_color_f($r,$g,$b,$a,$in) {
|
|
$r = $r|0;
|
|
$g = $g|0;
|
|
$b = $b|0;
|
|
$a = $a|0;
|
|
$in = $in|0;
|
|
var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0.0;
|
|
var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $r;
|
|
$1 = $g;
|
|
$2 = $b;
|
|
$3 = $a;
|
|
$4 = HEAP8[$in>>0]|0;
|
|
$5 = (+($4&255));
|
|
$6 = $5 * 0.0039215688593685627;
|
|
$7 = $0;
|
|
HEAPF32[$7>>2] = $6;
|
|
$8 = ((($in)) + 1|0);
|
|
$9 = HEAP8[$8>>0]|0;
|
|
$10 = (+($9&255));
|
|
$11 = $10 * 0.0039215688593685627;
|
|
$12 = $1;
|
|
HEAPF32[$12>>2] = $11;
|
|
$13 = ((($in)) + 2|0);
|
|
$14 = HEAP8[$13>>0]|0;
|
|
$15 = (+($14&255));
|
|
$16 = $15 * 0.0039215688593685627;
|
|
$17 = $2;
|
|
HEAPF32[$17>>2] = $16;
|
|
$18 = ((($in)) + 3|0);
|
|
$19 = HEAP8[$18>>0]|0;
|
|
$20 = (+($19&255));
|
|
$21 = $20 * 0.0039215688593685627;
|
|
$22 = $3;
|
|
HEAPF32[$22>>2] = $21;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_color_fv($c,$in) {
|
|
$c = $c|0;
|
|
$in = $in|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $in$byval_copy = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$in$byval_copy = sp + 4|0;
|
|
$0 = $c;
|
|
$1 = $0;
|
|
$2 = $0;
|
|
$3 = ((($2)) + 4|0);
|
|
$4 = $0;
|
|
$5 = ((($4)) + 8|0);
|
|
$6 = $0;
|
|
$7 = ((($6)) + 12|0);
|
|
;HEAP8[$in$byval_copy>>0]=HEAP8[$in>>0]|0;HEAP8[$in$byval_copy+1>>0]=HEAP8[$in+1>>0]|0;HEAP8[$in$byval_copy+2>>0]=HEAP8[$in+2>>0]|0;HEAP8[$in$byval_copy+3>>0]=HEAP8[$in+3>>0]|0;
|
|
_nk_color_f($1,$3,$5,$7,$in$byval_copy);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_color_hsva_f($out_h,$out_s,$out_v,$out_a,$in) {
|
|
$out_h = $out_h|0;
|
|
$out_s = $out_s|0;
|
|
$out_v = $out_v|0;
|
|
$out_a = $out_a|0;
|
|
$in = $in|0;
|
|
var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0;
|
|
var $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0;
|
|
var $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0, $57 = 0.0, $58 = 0.0, $59 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0;
|
|
var $K = 0.0, $a = 0, $b = 0, $chroma = 0.0, $g = 0, $in$byval_copy = 0, $r = 0, $t = 0.0, $t1 = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$in$byval_copy = sp + 48|0;
|
|
$r = sp + 20|0;
|
|
$g = sp + 16|0;
|
|
$b = sp + 12|0;
|
|
$a = sp + 8|0;
|
|
$0 = $out_h;
|
|
$1 = $out_s;
|
|
$2 = $out_v;
|
|
$3 = $out_a;
|
|
$K = 0.0;
|
|
;HEAP8[$in$byval_copy>>0]=HEAP8[$in>>0]|0;HEAP8[$in$byval_copy+1>>0]=HEAP8[$in+1>>0]|0;HEAP8[$in$byval_copy+2>>0]=HEAP8[$in+2>>0]|0;HEAP8[$in$byval_copy+3>>0]=HEAP8[$in+3>>0]|0;
|
|
_nk_color_f($r,$g,$b,$a,$in$byval_copy);
|
|
$4 = +HEAPF32[$g>>2];
|
|
$5 = +HEAPF32[$b>>2];
|
|
$6 = $4 < $5;
|
|
if ($6) {
|
|
$7 = +HEAPF32[$g>>2];
|
|
$t = $7;
|
|
$8 = +HEAPF32[$b>>2];
|
|
HEAPF32[$g>>2] = $8;
|
|
$9 = $t;
|
|
HEAPF32[$b>>2] = $9;
|
|
$K = -1.0;
|
|
}
|
|
$10 = +HEAPF32[$r>>2];
|
|
$11 = +HEAPF32[$g>>2];
|
|
$12 = $10 < $11;
|
|
if ($12) {
|
|
$13 = +HEAPF32[$r>>2];
|
|
$t1 = $13;
|
|
$14 = +HEAPF32[$g>>2];
|
|
HEAPF32[$r>>2] = $14;
|
|
$15 = $t1;
|
|
HEAPF32[$g>>2] = $15;
|
|
$16 = $K;
|
|
$17 = -0.3333333432674408 - $16;
|
|
$K = $17;
|
|
}
|
|
$18 = +HEAPF32[$r>>2];
|
|
$19 = +HEAPF32[$g>>2];
|
|
$20 = +HEAPF32[$b>>2];
|
|
$21 = $19 < $20;
|
|
$22 = +HEAPF32[$g>>2];
|
|
$23 = +HEAPF32[$b>>2];
|
|
$24 = $21 ? $22 : $23;
|
|
$25 = $18 - $24;
|
|
$chroma = $25;
|
|
$26 = $K;
|
|
$27 = +HEAPF32[$g>>2];
|
|
$28 = +HEAPF32[$b>>2];
|
|
$29 = $27 - $28;
|
|
$30 = $chroma;
|
|
$31 = 6.0 * $30;
|
|
$32 = $31 + 9.9999996826552254E-21;
|
|
$33 = $29 / $32;
|
|
$34 = $26 + $33;
|
|
$35 = $34 < 0.0;
|
|
$36 = $K;
|
|
$37 = +HEAPF32[$g>>2];
|
|
$38 = +HEAPF32[$b>>2];
|
|
$39 = $37 - $38;
|
|
$40 = $chroma;
|
|
$41 = 6.0 * $40;
|
|
$42 = $41 + 9.9999996826552254E-21;
|
|
$43 = $39 / $42;
|
|
$44 = $36 + $43;
|
|
$45 = -$44;
|
|
$46 = $35 ? $45 : $44;
|
|
$47 = $0;
|
|
HEAPF32[$47>>2] = $46;
|
|
$48 = $chroma;
|
|
$49 = +HEAPF32[$r>>2];
|
|
$50 = $49 + 9.9999996826552254E-21;
|
|
$51 = $48 / $50;
|
|
$52 = $1;
|
|
HEAPF32[$52>>2] = $51;
|
|
$53 = +HEAPF32[$r>>2];
|
|
$54 = $2;
|
|
HEAPF32[$54>>2] = $53;
|
|
$55 = ((($in)) + 3|0);
|
|
$56 = HEAP8[$55>>0]|0;
|
|
$57 = (+($56&255));
|
|
$58 = $57 / 255.0;
|
|
$59 = $3;
|
|
HEAPF32[$59>>2] = $58;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_color_hsv_fv($out,$in) {
|
|
$out = $out|0;
|
|
$in = $in|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $a = 0, $in$byval_copy = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$in$byval_copy = sp + 8|0;
|
|
$a = sp;
|
|
$0 = $out;
|
|
$1 = $0;
|
|
$2 = $0;
|
|
$3 = ((($2)) + 4|0);
|
|
$4 = $0;
|
|
$5 = ((($4)) + 8|0);
|
|
;HEAP8[$in$byval_copy>>0]=HEAP8[$in>>0]|0;HEAP8[$in$byval_copy+1>>0]=HEAP8[$in+1>>0]|0;HEAP8[$in$byval_copy+2>>0]=HEAP8[$in+2>>0]|0;HEAP8[$in$byval_copy+3>>0]=HEAP8[$in+3>>0]|0;
|
|
_nk_color_hsva_f($1,$3,$5,$a,$in$byval_copy);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_color_hsva_fv($out,$in) {
|
|
$out = $out|0;
|
|
$in = $in|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $in$byval_copy = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$in$byval_copy = sp + 4|0;
|
|
$0 = $out;
|
|
$1 = $0;
|
|
$2 = $0;
|
|
$3 = ((($2)) + 4|0);
|
|
$4 = $0;
|
|
$5 = ((($4)) + 8|0);
|
|
$6 = $0;
|
|
$7 = ((($6)) + 12|0);
|
|
;HEAP8[$in$byval_copy>>0]=HEAP8[$in>>0]|0;HEAP8[$in$byval_copy+1>>0]=HEAP8[$in+1>>0]|0;HEAP8[$in$byval_copy+2>>0]=HEAP8[$in+2>>0]|0;HEAP8[$in$byval_copy+3>>0]=HEAP8[$in+3>>0]|0;
|
|
_nk_color_hsva_f($1,$3,$5,$7,$in$byval_copy);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_handle_ptr($agg$result,$ptr) {
|
|
$agg$result = $agg$result|0;
|
|
$ptr = $ptr|0;
|
|
var $0 = 0, $1 = 0, $handle = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$handle = sp;
|
|
$0 = $ptr;
|
|
;HEAP32[$handle>>2]=0|0;
|
|
$1 = $0;
|
|
HEAP32[$handle>>2] = $1;
|
|
;HEAP32[$agg$result>>2]=HEAP32[$handle>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_handle_id($agg$result,$id) {
|
|
$agg$result = $agg$result|0;
|
|
$id = $id|0;
|
|
var $0 = 0, $1 = 0, $handle = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$handle = sp;
|
|
$0 = $id;
|
|
_nk_zero($handle,4);
|
|
$1 = $0;
|
|
HEAP32[$handle>>2] = $1;
|
|
;HEAP32[$agg$result>>2]=HEAP32[$handle>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_zero($ptr,$size) {
|
|
$ptr = $ptr|0;
|
|
$size = $size|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ptr;
|
|
$1 = $size;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if ($3) {
|
|
$4 = $0;
|
|
$5 = $1;
|
|
_nk_memset($4,0,$5);
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
___assert_fail((13452|0),(13400|0),2877,(29717|0));
|
|
// unreachable;
|
|
}
|
|
}
|
|
function _nk_image_is_subimage($img) {
|
|
$img = $img|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $img;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((13456|0),(13400|0),3922,(13460|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ((($3)) + 4|0);
|
|
$5 = HEAP16[$4>>1]|0;
|
|
$6 = $5&65535;
|
|
$7 = ($6|0)==(0);
|
|
if (!($7)) {
|
|
$14 = 0;
|
|
$13 = $14 ^ 1;
|
|
$15 = $13&1;
|
|
STACKTOP = sp;return ($15|0);
|
|
}
|
|
$8 = $0;
|
|
$9 = ((($8)) + 6|0);
|
|
$10 = HEAP16[$9>>1]|0;
|
|
$11 = $10&65535;
|
|
$12 = ($11|0)==(0);
|
|
$14 = $12;
|
|
$13 = $14 ^ 1;
|
|
$15 = $13&1;
|
|
STACKTOP = sp;return ($15|0);
|
|
}
|
|
function _nk_triangle_from_direction($result,$r,$pad_x,$pad_y,$direction) {
|
|
$result = $result|0;
|
|
$r = $r|0;
|
|
$pad_x = +$pad_x;
|
|
$pad_y = +$pad_y;
|
|
$direction = $direction|0;
|
|
var $0 = 0, $1 = 0.0, $10 = 0, $100 = 0, $101 = 0.0, $102 = 0, $103 = 0.0, $104 = 0.0, $105 = 0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0, $11 = 0, $110 = 0, $111 = 0.0, $112 = 0, $113 = 0.0, $114 = 0, $115 = 0.0;
|
|
var $116 = 0.0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0.0, $121 = 0, $122 = 0.0, $123 = 0, $124 = 0, $125 = 0.0, $126 = 0, $127 = 0.0, $128 = 0.0, $129 = 0, $13 = 0, $130 = 0.0, $131 = 0, $132 = 0, $133 = 0.0;
|
|
var $134 = 0.0, $135 = 0.0, $136 = 0, $137 = 0.0, $138 = 0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0.0, $142 = 0.0, $143 = 0, $144 = 0, $145 = 0.0, $146 = 0, $147 = 0.0, $148 = 0.0, $149 = 0, $15 = 0, $150 = 0.0, $151 = 0;
|
|
var $152 = 0, $153 = 0.0, $154 = 0, $155 = 0.0, $156 = 0.0, $157 = 0, $158 = 0.0, $159 = 0, $16 = 0, $160 = 0.0, $161 = 0.0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0.0;
|
|
var $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0.0;
|
|
var $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0;
|
|
var $61 = 0.0, $62 = 0.0, $63 = 0, $64 = 0.0, $65 = 0.0, $66 = 0, $67 = 0, $68 = 0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0.0, $77 = 0, $78 = 0.0, $79 = 0.0;
|
|
var $8 = 0, $80 = 0, $81 = 0.0, $82 = 0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0, $87 = 0.0, $88 = 0, $89 = 0.0, $9 = 0, $90 = 0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0, $96 = 0.0, $97 = 0;
|
|
var $98 = 0.0, $99 = 0, $h_half = 0.0, $w_half = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$4 = sp + 88|0;
|
|
$5 = sp + 80|0;
|
|
$6 = sp + 72|0;
|
|
$7 = sp + 64|0;
|
|
$8 = sp + 56|0;
|
|
$9 = sp + 48|0;
|
|
$10 = sp + 40|0;
|
|
$11 = sp + 32|0;
|
|
$12 = sp + 24|0;
|
|
$13 = sp + 16|0;
|
|
$14 = sp + 8|0;
|
|
$15 = sp;
|
|
$0 = $result;
|
|
$1 = $pad_x;
|
|
$2 = $pad_y;
|
|
$3 = $direction;
|
|
$16 = $0;
|
|
$17 = ($16|0)!=(0|0);
|
|
if (!($17)) {
|
|
___assert_fail((13481|0),(13400|0),3945,(13488|0));
|
|
// unreachable;
|
|
}
|
|
$18 = $1;
|
|
$19 = 2.0 * $18;
|
|
$20 = ((($r)) + 8|0);
|
|
$21 = +HEAPF32[$20>>2];
|
|
$22 = $19 < $21;
|
|
$23 = ((($r)) + 8|0);
|
|
$24 = +HEAPF32[$23>>2];
|
|
$25 = $1;
|
|
$26 = 2.0 * $25;
|
|
$27 = $22 ? $24 : $26;
|
|
$28 = ((($r)) + 8|0);
|
|
HEAPF32[$28>>2] = $27;
|
|
$29 = $2;
|
|
$30 = 2.0 * $29;
|
|
$31 = ((($r)) + 12|0);
|
|
$32 = +HEAPF32[$31>>2];
|
|
$33 = $30 < $32;
|
|
$34 = ((($r)) + 12|0);
|
|
$35 = +HEAPF32[$34>>2];
|
|
$36 = $2;
|
|
$37 = 2.0 * $36;
|
|
$38 = $33 ? $35 : $37;
|
|
$39 = ((($r)) + 12|0);
|
|
HEAPF32[$39>>2] = $38;
|
|
$40 = ((($r)) + 8|0);
|
|
$41 = +HEAPF32[$40>>2];
|
|
$42 = $1;
|
|
$43 = 2.0 * $42;
|
|
$44 = $41 - $43;
|
|
$45 = ((($r)) + 8|0);
|
|
HEAPF32[$45>>2] = $44;
|
|
$46 = ((($r)) + 12|0);
|
|
$47 = +HEAPF32[$46>>2];
|
|
$48 = $2;
|
|
$49 = 2.0 * $48;
|
|
$50 = $47 - $49;
|
|
$51 = ((($r)) + 12|0);
|
|
HEAPF32[$51>>2] = $50;
|
|
$52 = +HEAPF32[$r>>2];
|
|
$53 = $1;
|
|
$54 = $52 + $53;
|
|
HEAPF32[$r>>2] = $54;
|
|
$55 = ((($r)) + 4|0);
|
|
$56 = +HEAPF32[$55>>2];
|
|
$57 = $2;
|
|
$58 = $56 + $57;
|
|
$59 = ((($r)) + 4|0);
|
|
HEAPF32[$59>>2] = $58;
|
|
$60 = ((($r)) + 8|0);
|
|
$61 = +HEAPF32[$60>>2];
|
|
$62 = $61 / 2.0;
|
|
$w_half = $62;
|
|
$63 = ((($r)) + 12|0);
|
|
$64 = +HEAPF32[$63>>2];
|
|
$65 = $64 / 2.0;
|
|
$h_half = $65;
|
|
$66 = $3;
|
|
$67 = ($66|0)==(0);
|
|
if ($67) {
|
|
$68 = $0;
|
|
$69 = +HEAPF32[$r>>2];
|
|
$70 = $w_half;
|
|
$71 = $69 + $70;
|
|
$72 = ((($r)) + 4|0);
|
|
$73 = +HEAPF32[$72>>2];
|
|
_nk_vec2($4,$71,$73);
|
|
;HEAP32[$68>>2]=HEAP32[$4>>2]|0;HEAP32[$68+4>>2]=HEAP32[$4+4>>2]|0;
|
|
$74 = $0;
|
|
$75 = ((($74)) + 8|0);
|
|
$76 = +HEAPF32[$r>>2];
|
|
$77 = ((($r)) + 8|0);
|
|
$78 = +HEAPF32[$77>>2];
|
|
$79 = $76 + $78;
|
|
$80 = ((($r)) + 4|0);
|
|
$81 = +HEAPF32[$80>>2];
|
|
$82 = ((($r)) + 12|0);
|
|
$83 = +HEAPF32[$82>>2];
|
|
$84 = $81 + $83;
|
|
_nk_vec2($5,$79,$84);
|
|
;HEAP32[$75>>2]=HEAP32[$5>>2]|0;HEAP32[$75+4>>2]=HEAP32[$5+4>>2]|0;
|
|
$85 = $0;
|
|
$86 = ((($85)) + 16|0);
|
|
$87 = +HEAPF32[$r>>2];
|
|
$88 = ((($r)) + 4|0);
|
|
$89 = +HEAPF32[$88>>2];
|
|
$90 = ((($r)) + 12|0);
|
|
$91 = +HEAPF32[$90>>2];
|
|
$92 = $89 + $91;
|
|
_nk_vec2($6,$87,$92);
|
|
;HEAP32[$86>>2]=HEAP32[$6>>2]|0;HEAP32[$86+4>>2]=HEAP32[$6+4>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
$93 = $3;
|
|
$94 = ($93|0)==(1);
|
|
if ($94) {
|
|
$95 = $0;
|
|
$96 = +HEAPF32[$r>>2];
|
|
$97 = ((($r)) + 4|0);
|
|
$98 = +HEAPF32[$97>>2];
|
|
_nk_vec2($7,$96,$98);
|
|
;HEAP32[$95>>2]=HEAP32[$7>>2]|0;HEAP32[$95+4>>2]=HEAP32[$7+4>>2]|0;
|
|
$99 = $0;
|
|
$100 = ((($99)) + 8|0);
|
|
$101 = +HEAPF32[$r>>2];
|
|
$102 = ((($r)) + 8|0);
|
|
$103 = +HEAPF32[$102>>2];
|
|
$104 = $101 + $103;
|
|
$105 = ((($r)) + 4|0);
|
|
$106 = +HEAPF32[$105>>2];
|
|
$107 = $h_half;
|
|
$108 = $106 + $107;
|
|
_nk_vec2($8,$104,$108);
|
|
;HEAP32[$100>>2]=HEAP32[$8>>2]|0;HEAP32[$100+4>>2]=HEAP32[$8+4>>2]|0;
|
|
$109 = $0;
|
|
$110 = ((($109)) + 16|0);
|
|
$111 = +HEAPF32[$r>>2];
|
|
$112 = ((($r)) + 4|0);
|
|
$113 = +HEAPF32[$112>>2];
|
|
$114 = ((($r)) + 12|0);
|
|
$115 = +HEAPF32[$114>>2];
|
|
$116 = $113 + $115;
|
|
_nk_vec2($9,$111,$116);
|
|
;HEAP32[$110>>2]=HEAP32[$9>>2]|0;HEAP32[$110+4>>2]=HEAP32[$9+4>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
$117 = $3;
|
|
$118 = ($117|0)==(2);
|
|
$119 = $0;
|
|
$120 = +HEAPF32[$r>>2];
|
|
$121 = ((($r)) + 4|0);
|
|
$122 = +HEAPF32[$121>>2];
|
|
if ($118) {
|
|
_nk_vec2($10,$120,$122);
|
|
;HEAP32[$119>>2]=HEAP32[$10>>2]|0;HEAP32[$119+4>>2]=HEAP32[$10+4>>2]|0;
|
|
$123 = $0;
|
|
$124 = ((($123)) + 8|0);
|
|
$125 = +HEAPF32[$r>>2];
|
|
$126 = ((($r)) + 8|0);
|
|
$127 = +HEAPF32[$126>>2];
|
|
$128 = $125 + $127;
|
|
$129 = ((($r)) + 4|0);
|
|
$130 = +HEAPF32[$129>>2];
|
|
_nk_vec2($11,$128,$130);
|
|
;HEAP32[$124>>2]=HEAP32[$11>>2]|0;HEAP32[$124+4>>2]=HEAP32[$11+4>>2]|0;
|
|
$131 = $0;
|
|
$132 = ((($131)) + 16|0);
|
|
$133 = +HEAPF32[$r>>2];
|
|
$134 = $w_half;
|
|
$135 = $133 + $134;
|
|
$136 = ((($r)) + 4|0);
|
|
$137 = +HEAPF32[$136>>2];
|
|
$138 = ((($r)) + 12|0);
|
|
$139 = +HEAPF32[$138>>2];
|
|
$140 = $137 + $139;
|
|
_nk_vec2($12,$135,$140);
|
|
;HEAP32[$132>>2]=HEAP32[$12>>2]|0;HEAP32[$132+4>>2]=HEAP32[$12+4>>2]|0;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$141 = $h_half;
|
|
$142 = $122 + $141;
|
|
_nk_vec2($13,$120,$142);
|
|
;HEAP32[$119>>2]=HEAP32[$13>>2]|0;HEAP32[$119+4>>2]=HEAP32[$13+4>>2]|0;
|
|
$143 = $0;
|
|
$144 = ((($143)) + 8|0);
|
|
$145 = +HEAPF32[$r>>2];
|
|
$146 = ((($r)) + 8|0);
|
|
$147 = +HEAPF32[$146>>2];
|
|
$148 = $145 + $147;
|
|
$149 = ((($r)) + 4|0);
|
|
$150 = +HEAPF32[$149>>2];
|
|
_nk_vec2($14,$148,$150);
|
|
;HEAP32[$144>>2]=HEAP32[$14>>2]|0;HEAP32[$144+4>>2]=HEAP32[$14+4>>2]|0;
|
|
$151 = $0;
|
|
$152 = ((($151)) + 16|0);
|
|
$153 = +HEAPF32[$r>>2];
|
|
$154 = ((($r)) + 8|0);
|
|
$155 = +HEAPF32[$154>>2];
|
|
$156 = $153 + $155;
|
|
$157 = ((($r)) + 4|0);
|
|
$158 = +HEAPF32[$157>>2];
|
|
$159 = ((($r)) + 12|0);
|
|
$160 = +HEAPF32[$159>>2];
|
|
$161 = $158 + $160;
|
|
_nk_vec2($15,$156,$161);
|
|
;HEAP32[$152>>2]=HEAP32[$15>>2]|0;HEAP32[$152+4>>2]=HEAP32[$15+4>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_utf_decode($c,$u,$clen) {
|
|
$c = $c|0;
|
|
$u = $u|0;
|
|
$clen = $clen|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $j = 0, $len = 0, $or$cond = 0, $or$cond3 = 0, $type = 0, $udecoded = 0, label = 0;
|
|
var sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$len = sp + 8|0;
|
|
$type = sp + 4|0;
|
|
$1 = $c;
|
|
$2 = $u;
|
|
$3 = $clen;
|
|
HEAP32[$type>>2] = 0;
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((13515|0),(13400|0),4107,(13517|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $2;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((13531|0),(13400|0),4108,(13517|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
$10 = $2;
|
|
$11 = ($10|0)!=(0|0);
|
|
$or$cond = $9 & $11;
|
|
if (!($or$cond)) {
|
|
$0 = 0;
|
|
$51 = $0;
|
|
STACKTOP = sp;return ($51|0);
|
|
}
|
|
$12 = $3;
|
|
$13 = ($12|0)!=(0);
|
|
if (!($13)) {
|
|
$0 = 0;
|
|
$51 = $0;
|
|
STACKTOP = sp;return ($51|0);
|
|
}
|
|
$14 = $2;
|
|
HEAP32[$14>>2] = 65533;
|
|
$15 = $1;
|
|
$16 = HEAP8[$15>>0]|0;
|
|
$17 = (_nk_utf_decode_byte($16,$len)|0);
|
|
$udecoded = $17;
|
|
$18 = HEAP32[$len>>2]|0;
|
|
$19 = (1)<=($18|0);
|
|
$20 = HEAP32[$len>>2]|0;
|
|
$21 = ($20|0)<=(4);
|
|
$or$cond3 = $19 & $21;
|
|
if (!($or$cond3)) {
|
|
$0 = 1;
|
|
$51 = $0;
|
|
STACKTOP = sp;return ($51|0);
|
|
}
|
|
$i = 1;
|
|
$j = 1;
|
|
while(1) {
|
|
$22 = $i;
|
|
$23 = $3;
|
|
$24 = ($22|0)<($23|0);
|
|
if (!($24)) {
|
|
break;
|
|
}
|
|
$25 = $j;
|
|
$26 = HEAP32[$len>>2]|0;
|
|
$27 = ($25|0)<($26|0);
|
|
if (!($27)) {
|
|
break;
|
|
}
|
|
$28 = $udecoded;
|
|
$29 = $28 << 6;
|
|
$30 = $i;
|
|
$31 = $1;
|
|
$32 = (($31) + ($30)|0);
|
|
$33 = HEAP8[$32>>0]|0;
|
|
$34 = (_nk_utf_decode_byte($33,$type)|0);
|
|
$35 = $29 | $34;
|
|
$udecoded = $35;
|
|
$36 = HEAP32[$type>>2]|0;
|
|
$37 = ($36|0)!=(0);
|
|
if ($37) {
|
|
label = 15;
|
|
break;
|
|
}
|
|
$39 = $i;
|
|
$40 = (($39) + 1)|0;
|
|
$i = $40;
|
|
$41 = $j;
|
|
$42 = (($41) + 1)|0;
|
|
$j = $42;
|
|
}
|
|
if ((label|0) == 15) {
|
|
$38 = $j;
|
|
$0 = $38;
|
|
$51 = $0;
|
|
STACKTOP = sp;return ($51|0);
|
|
}
|
|
$43 = $j;
|
|
$44 = HEAP32[$len>>2]|0;
|
|
$45 = ($43|0)<($44|0);
|
|
if ($45) {
|
|
$0 = 0;
|
|
$51 = $0;
|
|
STACKTOP = sp;return ($51|0);
|
|
} else {
|
|
$46 = $udecoded;
|
|
$47 = $2;
|
|
HEAP32[$47>>2] = $46;
|
|
$48 = $2;
|
|
$49 = HEAP32[$len>>2]|0;
|
|
(_nk_utf_validate($48,$49)|0);
|
|
$50 = HEAP32[$len>>2]|0;
|
|
$0 = $50;
|
|
$51 = $0;
|
|
STACKTOP = sp;return ($51|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_utf_decode_byte($c,$i) {
|
|
$c = $c|0;
|
|
$i = $i|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $c;
|
|
$2 = $i;
|
|
$3 = $2;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((29725|0),(13400|0),4092,(29727|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $2;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
$0 = 0;
|
|
$39 = $0;
|
|
STACKTOP = sp;return ($39|0);
|
|
}
|
|
$7 = $2;
|
|
HEAP32[$7>>2] = 0;
|
|
while(1) {
|
|
$8 = $2;
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ($9|0)<(5);
|
|
if (!($10)) {
|
|
label = 10;
|
|
break;
|
|
}
|
|
$11 = $1;
|
|
$12 = $11&255;
|
|
$13 = $2;
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = (29746 + ($14)|0);
|
|
$16 = HEAP8[$15>>0]|0;
|
|
$17 = $16&255;
|
|
$18 = $12 & $17;
|
|
$19 = $2;
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = (29751 + ($20)|0);
|
|
$22 = HEAP8[$21>>0]|0;
|
|
$23 = $22&255;
|
|
$24 = ($18|0)==($23|0);
|
|
if ($24) {
|
|
label = 8;
|
|
break;
|
|
}
|
|
$36 = $2;
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$38 = (($37) + 1)|0;
|
|
HEAP32[$36>>2] = $38;
|
|
}
|
|
if ((label|0) == 8) {
|
|
$25 = $1;
|
|
$26 = $25 << 24 >> 24;
|
|
$27 = $2;
|
|
$28 = HEAP32[$27>>2]|0;
|
|
$29 = (29746 + ($28)|0);
|
|
$30 = HEAP8[$29>>0]|0;
|
|
$31 = $30&255;
|
|
$32 = $31 ^ -1;
|
|
$33 = $26 & $32;
|
|
$34 = $33&255;
|
|
$35 = $34&255;
|
|
$0 = $35;
|
|
$39 = $0;
|
|
STACKTOP = sp;return ($39|0);
|
|
}
|
|
else if ((label|0) == 10) {
|
|
$0 = 0;
|
|
$39 = $0;
|
|
STACKTOP = sp;return ($39|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_utf_validate($u,$i) {
|
|
$u = $u|0;
|
|
$i = $i|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $u;
|
|
$2 = $i;
|
|
$3 = $1;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((13531|0),(13400|0),4080,(29756|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
$0 = 0;
|
|
$34 = $0;
|
|
STACKTOP = sp;return ($34|0);
|
|
}
|
|
$7 = $2;
|
|
$8 = (12524 + ($7<<2)|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = $1;
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = ($9>>>0)<=($11>>>0);
|
|
if ($12) {
|
|
$13 = $1;
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = $2;
|
|
$16 = (12544 + ($15<<2)|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = ($14>>>0)<=($17>>>0);
|
|
if ($18) {
|
|
$19 = $1;
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = (55296)<=($20>>>0);
|
|
if ($21) {
|
|
$22 = $1;
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$24 = ($23>>>0)<=(57343);
|
|
if ($24) {
|
|
label = 9;
|
|
}
|
|
}
|
|
} else {
|
|
label = 9;
|
|
}
|
|
} else {
|
|
label = 9;
|
|
}
|
|
if ((label|0) == 9) {
|
|
$25 = $1;
|
|
HEAP32[$25>>2] = 65533;
|
|
}
|
|
$2 = 1;
|
|
while(1) {
|
|
$26 = $1;
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = $2;
|
|
$29 = (12544 + ($28<<2)|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$31 = ($27>>>0)>($30>>>0);
|
|
$32 = $2;
|
|
if (!($31)) {
|
|
break;
|
|
}
|
|
$33 = (($32) + 1)|0;
|
|
$2 = $33;
|
|
}
|
|
$0 = $32;
|
|
$34 = $0;
|
|
STACKTOP = sp;return ($34|0);
|
|
}
|
|
function _nk_utf_encode($u,$c,$clen) {
|
|
$u = $u|0;
|
|
$c = $c|0;
|
|
$clen = $clen|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $len = 0, $or$cond = 0, $or$cond$not = 0, $or$cond3 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = sp + 16|0;
|
|
HEAP32[$1>>2] = $u;
|
|
$2 = $c;
|
|
$3 = $clen;
|
|
$4 = (_nk_utf_validate($1,0)|0);
|
|
$len = $4;
|
|
$5 = $3;
|
|
$6 = $len;
|
|
$7 = ($5|0)>=($6|0);
|
|
$8 = $len;
|
|
$9 = ($8|0)!=(0);
|
|
$or$cond = $7 & $9;
|
|
$or$cond$not = $or$cond ^ 1;
|
|
$10 = $len;
|
|
$11 = ($10|0)>(4);
|
|
$or$cond3 = $or$cond$not | $11;
|
|
if ($or$cond3) {
|
|
$0 = 0;
|
|
$29 = $0;
|
|
STACKTOP = sp;return ($29|0);
|
|
}
|
|
$12 = $len;
|
|
$13 = (($12) - 1)|0;
|
|
$i = $13;
|
|
while(1) {
|
|
$14 = $i;
|
|
$15 = ($14|0)!=(0);
|
|
$16 = HEAP32[$1>>2]|0;
|
|
if (!($15)) {
|
|
break;
|
|
}
|
|
$17 = (_nk_utf_encode_byte($16,0)|0);
|
|
$18 = $i;
|
|
$19 = $2;
|
|
$20 = (($19) + ($18)|0);
|
|
HEAP8[$20>>0] = $17;
|
|
$21 = HEAP32[$1>>2]|0;
|
|
$22 = $21 >>> 6;
|
|
HEAP32[$1>>2] = $22;
|
|
$23 = $i;
|
|
$24 = (($23) + -1)|0;
|
|
$i = $24;
|
|
}
|
|
$25 = $len;
|
|
$26 = (_nk_utf_encode_byte($16,$25)|0);
|
|
$27 = $2;
|
|
HEAP8[$27>>0] = $26;
|
|
$28 = $len;
|
|
$0 = $28;
|
|
$29 = $0;
|
|
STACKTOP = sp;return ($29|0);
|
|
}
|
|
function _nk_utf_encode_byte($u,$i) {
|
|
$u = $u|0;
|
|
$i = $i|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $u;
|
|
$1 = $i;
|
|
$2 = $1;
|
|
$3 = (29751 + ($2)|0);
|
|
$4 = HEAP8[$3>>0]|0;
|
|
$5 = $4&255;
|
|
$6 = $0;
|
|
$7 = $6&255;
|
|
$8 = $7&255;
|
|
$9 = $1;
|
|
$10 = (29746 + ($9)|0);
|
|
$11 = HEAP8[$10>>0]|0;
|
|
$12 = $11&255;
|
|
$13 = $12 ^ -1;
|
|
$14 = $8 & $13;
|
|
$15 = $5 | $14;
|
|
$16 = $15&255;
|
|
STACKTOP = sp;return ($16|0);
|
|
}
|
|
function _nk_utf_len($str,$len) {
|
|
$str = $str|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $glyph_len = 0, $glyphs = 0, $or$cond = 0, $src_len = 0, $text = 0, $text_len = 0, $unicode = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$unicode = sp;
|
|
$1 = $str;
|
|
$2 = $len;
|
|
$glyphs = 0;
|
|
$src_len = 0;
|
|
$3 = $1;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((13396|0),(13400|0),4162,(13533|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
$7 = $2;
|
|
$8 = ($7|0)!=(0);
|
|
$or$cond = $6 & $8;
|
|
if (!($or$cond)) {
|
|
$0 = 0;
|
|
$31 = $0;
|
|
STACKTOP = sp;return ($31|0);
|
|
}
|
|
$9 = $1;
|
|
$text = $9;
|
|
$10 = $2;
|
|
$text_len = $10;
|
|
$11 = $text;
|
|
$12 = $text_len;
|
|
$13 = (_nk_utf_decode($11,$unicode,$12)|0);
|
|
$glyph_len = $13;
|
|
while(1) {
|
|
$14 = $glyph_len;
|
|
$15 = ($14|0)!=(0);
|
|
if ($15) {
|
|
$16 = $src_len;
|
|
$17 = $2;
|
|
$18 = ($16|0)<($17|0);
|
|
$32 = $18;
|
|
} else {
|
|
$32 = 0;
|
|
}
|
|
$19 = $glyphs;
|
|
if (!($32)) {
|
|
break;
|
|
}
|
|
$20 = (($19) + 1)|0;
|
|
$glyphs = $20;
|
|
$21 = $src_len;
|
|
$22 = $glyph_len;
|
|
$23 = (($21) + ($22))|0;
|
|
$src_len = $23;
|
|
$24 = $text;
|
|
$25 = $src_len;
|
|
$26 = (($24) + ($25)|0);
|
|
$27 = $text_len;
|
|
$28 = $src_len;
|
|
$29 = (($27) - ($28))|0;
|
|
$30 = (_nk_utf_decode($26,$unicode,$29)|0);
|
|
$glyph_len = $30;
|
|
}
|
|
$0 = $19;
|
|
$31 = $0;
|
|
STACKTOP = sp;return ($31|0);
|
|
}
|
|
function _nk_buffer_init_default($buffer) {
|
|
$buffer = $buffer|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $alloc = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$alloc = sp;
|
|
$0 = $buffer;
|
|
HEAP32[$alloc>>2] = 0;
|
|
$1 = ((($alloc)) + 4|0);
|
|
HEAP32[$1>>2] = 7;
|
|
$2 = ((($alloc)) + 8|0);
|
|
HEAP32[$2>>2] = 8;
|
|
$3 = $0;
|
|
_nk_buffer_init($3,$alloc,4096);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_malloc($unused,$old,$size) {
|
|
$unused = $unused|0;
|
|
$old = $old|0;
|
|
$size = $size|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $old;
|
|
$1 = $size;
|
|
$2 = $1;
|
|
$3 = (_malloc($2)|0);
|
|
STACKTOP = sp;return ($3|0);
|
|
}
|
|
function _nk_mfree($unused,$ptr) {
|
|
$unused = $unused|0;
|
|
$ptr = $ptr|0;
|
|
var $0 = 0, $1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ptr;
|
|
$1 = $0;
|
|
_free($1);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_buffer_init($b,$a,$initial_size) {
|
|
$b = $b|0;
|
|
$a = $a|0;
|
|
$initial_size = $initial_size|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0;
|
|
var $or$cond3 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 12|0;
|
|
$0 = $b;
|
|
$1 = $a;
|
|
$2 = $initial_size;
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((13556|0),(13400|0),4240,(13558|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((13573|0),(13400|0),4241,(13558|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $2;
|
|
$8 = ($7|0)!=(0);
|
|
if (!($8)) {
|
|
___assert_fail((13575|0),(13400|0),4242,(13558|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $0;
|
|
$10 = ($9|0)!=(0|0);
|
|
$11 = $1;
|
|
$12 = ($11|0)!=(0|0);
|
|
$or$cond = $10 & $12;
|
|
$13 = $2;
|
|
$14 = ($13|0)!=(0);
|
|
$or$cond3 = $or$cond & $14;
|
|
if (!($or$cond3)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$15 = $0;
|
|
_nk_zero($15,60);
|
|
$16 = $0;
|
|
$17 = ((($16)) + 28|0);
|
|
HEAP32[$17>>2] = 1;
|
|
$18 = $1;
|
|
$19 = ((($18)) + 4|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = $1;
|
|
$22 = $2;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$21>>2]|0;
|
|
$23 = (FUNCTION_TABLE_iiii[$20 & 7]($$byval_copy,0,$22)|0);
|
|
$24 = $0;
|
|
$25 = ((($24)) + 32|0);
|
|
HEAP32[$25>>2] = $23;
|
|
$26 = $2;
|
|
$27 = $0;
|
|
$28 = ((($27)) + 32|0);
|
|
$29 = ((($28)) + 4|0);
|
|
HEAP32[$29>>2] = $26;
|
|
$30 = $2;
|
|
$31 = $0;
|
|
$32 = ((($31)) + 56|0);
|
|
HEAP32[$32>>2] = $30;
|
|
$33 = $0;
|
|
$34 = ((($33)) + 40|0);
|
|
HEAPF32[$34>>2] = 2.0;
|
|
$35 = $0;
|
|
$36 = ((($35)) + 16|0);
|
|
$37 = $1;
|
|
;HEAP32[$36>>2]=HEAP32[$37>>2]|0;HEAP32[$36+4>>2]=HEAP32[$37+4>>2]|0;HEAP32[$36+8>>2]=HEAP32[$37+8>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_buffer_init_fixed($b,$m,$size) {
|
|
$b = $b|0;
|
|
$m = $m|0;
|
|
$size = $size|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond3 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $b;
|
|
$1 = $m;
|
|
$2 = $size;
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((13556|0),(13400|0),4257,(13588|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((13609|0),(13400|0),4258,(13588|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $2;
|
|
$8 = ($7|0)!=(0);
|
|
if (!($8)) {
|
|
___assert_fail((13611|0),(13400|0),4259,(13588|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $0;
|
|
$10 = ($9|0)!=(0|0);
|
|
$11 = $1;
|
|
$12 = ($11|0)!=(0|0);
|
|
$or$cond = $10 & $12;
|
|
$13 = $2;
|
|
$14 = ($13|0)!=(0);
|
|
$or$cond3 = $or$cond & $14;
|
|
if (!($or$cond3)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$15 = $0;
|
|
_nk_zero($15,60);
|
|
$16 = $0;
|
|
$17 = ((($16)) + 28|0);
|
|
HEAP32[$17>>2] = 0;
|
|
$18 = $1;
|
|
$19 = $0;
|
|
$20 = ((($19)) + 32|0);
|
|
HEAP32[$20>>2] = $18;
|
|
$21 = $2;
|
|
$22 = $0;
|
|
$23 = ((($22)) + 32|0);
|
|
$24 = ((($23)) + 4|0);
|
|
HEAP32[$24>>2] = $21;
|
|
$25 = $2;
|
|
$26 = $0;
|
|
$27 = ((($26)) + 56|0);
|
|
HEAP32[$27>>2] = $25;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_buffer_alloc($b,$type,$size,$align) {
|
|
$b = $b|0;
|
|
$type = $type|0;
|
|
$size = $size|0;
|
|
$align = $align|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $17 = 0, $18 = 0, $19 = 0;
|
|
var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0;
|
|
var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0;
|
|
var $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0;
|
|
var $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0;
|
|
var $92 = 0, $93 = 0, $94 = 0, $95 = 0.0, $96 = 0, $97 = 0, $98 = 0.0, $99 = 0.0, $alignment = 0, $capacity = 0, $full = 0, $memory = 0, $or$cond = 0, $unaligned = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$alignment = sp + 12|0;
|
|
$1 = $b;
|
|
$2 = $type;
|
|
$3 = $size;
|
|
$4 = $align;
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((13556|0),(13400|0),4347,(29772|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $3;
|
|
$8 = ($7|0)!=(0);
|
|
if (!($8)) {
|
|
___assert_fail((13611|0),(13400|0),4348,(29772|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $1;
|
|
$10 = ($9|0)!=(0|0);
|
|
$11 = $3;
|
|
$12 = ($11|0)!=(0);
|
|
$or$cond = $10 & $12;
|
|
if (!($or$cond)) {
|
|
$0 = 0;
|
|
$167 = $0;
|
|
STACKTOP = sp;return ($167|0);
|
|
}
|
|
$13 = $3;
|
|
$14 = $1;
|
|
$15 = ((($14)) + 48|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = (($16) + ($13))|0;
|
|
HEAP32[$15>>2] = $17;
|
|
$18 = $2;
|
|
$19 = ($18|0)==(0);
|
|
$20 = $1;
|
|
$21 = ((($20)) + 32|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = $1;
|
|
if ($19) {
|
|
$24 = ((($23)) + 44|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = (($22) + ($25)|0);
|
|
$unaligned = $26;
|
|
} else {
|
|
$27 = ((($23)) + 56|0);
|
|
$28 = HEAP32[$27>>2]|0;
|
|
$29 = $3;
|
|
$30 = (($28) - ($29))|0;
|
|
$31 = (($22) + ($30)|0);
|
|
$unaligned = $31;
|
|
}
|
|
$32 = $unaligned;
|
|
$33 = $4;
|
|
$34 = $2;
|
|
$35 = (_nk_buffer_align($32,$33,$alignment,$34)|0);
|
|
$memory = $35;
|
|
$36 = $2;
|
|
$37 = ($36|0)==(0);
|
|
$38 = $1;
|
|
if ($37) {
|
|
$39 = ((($38)) + 44|0);
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$41 = $3;
|
|
$42 = (($40) + ($41))|0;
|
|
$43 = HEAP32[$alignment>>2]|0;
|
|
$44 = (($42) + ($43))|0;
|
|
$45 = $1;
|
|
$46 = ((($45)) + 56|0);
|
|
$47 = HEAP32[$46>>2]|0;
|
|
$48 = ($44>>>0)>($47>>>0);
|
|
$49 = $48&1;
|
|
$full = $49;
|
|
} else {
|
|
$50 = ((($38)) + 56|0);
|
|
$51 = HEAP32[$50>>2]|0;
|
|
$52 = $3;
|
|
$53 = HEAP32[$alignment>>2]|0;
|
|
$54 = (($52) + ($53))|0;
|
|
$55 = (($51) - ($54))|0;
|
|
$56 = $1;
|
|
$57 = ((($56)) + 44|0);
|
|
$58 = HEAP32[$57>>2]|0;
|
|
$59 = ($55>>>0)<=($58>>>0);
|
|
$60 = $59&1;
|
|
$full = $60;
|
|
}
|
|
$61 = $full;
|
|
$62 = ($61|0)!=(0);
|
|
do {
|
|
if ($62) {
|
|
$63 = $1;
|
|
$64 = ((($63)) + 28|0);
|
|
$65 = HEAP32[$64>>2]|0;
|
|
$66 = ($65|0)==(1);
|
|
if (!($66)) {
|
|
___assert_fail((29788|0),(13400|0),4365,(29772|0));
|
|
// unreachable;
|
|
}
|
|
$67 = $1;
|
|
$68 = ((($67)) + 16|0);
|
|
$69 = ((($68)) + 4|0);
|
|
$70 = HEAP32[$69>>2]|0;
|
|
$71 = ($70|0)!=(0|0);
|
|
if (!($71)) {
|
|
___assert_fail((29817|0),(13400|0),4366,(29772|0));
|
|
// unreachable;
|
|
}
|
|
$72 = $1;
|
|
$73 = ((($72)) + 16|0);
|
|
$74 = ((($73)) + 8|0);
|
|
$75 = HEAP32[$74>>2]|0;
|
|
$76 = ($75|0)!=(0|0);
|
|
if (!($76)) {
|
|
___assert_fail((29817|0),(13400|0),4366,(29772|0));
|
|
// unreachable;
|
|
}
|
|
$77 = $1;
|
|
$78 = ((($77)) + 28|0);
|
|
$79 = HEAP32[$78>>2]|0;
|
|
$80 = ($79|0)!=(1);
|
|
if (!($80)) {
|
|
$81 = $1;
|
|
$82 = ((($81)) + 16|0);
|
|
$83 = ((($82)) + 4|0);
|
|
$84 = HEAP32[$83>>2]|0;
|
|
$85 = ($84|0)!=(0|0);
|
|
if ($85) {
|
|
$86 = $1;
|
|
$87 = ((($86)) + 16|0);
|
|
$88 = ((($87)) + 8|0);
|
|
$89 = HEAP32[$88>>2]|0;
|
|
$90 = ($89|0)!=(0|0);
|
|
if ($90) {
|
|
$91 = $1;
|
|
$92 = ((($91)) + 32|0);
|
|
$93 = ((($92)) + 4|0);
|
|
$94 = HEAP32[$93>>2]|0;
|
|
$95 = (+($94>>>0));
|
|
$96 = $1;
|
|
$97 = ((($96)) + 40|0);
|
|
$98 = +HEAPF32[$97>>2];
|
|
$99 = $95 * $98;
|
|
$100 = (~~(($99))>>>0);
|
|
$capacity = $100;
|
|
$101 = $capacity;
|
|
$102 = $1;
|
|
$103 = ((($102)) + 44|0);
|
|
$104 = HEAP32[$103>>2]|0;
|
|
$105 = $3;
|
|
$106 = (($104) + ($105))|0;
|
|
$107 = (_nk_round_up_pow2($106)|0);
|
|
$108 = ($101>>>0)<($107>>>0);
|
|
if ($108) {
|
|
$109 = $1;
|
|
$110 = ((($109)) + 44|0);
|
|
$111 = HEAP32[$110>>2]|0;
|
|
$112 = $3;
|
|
$113 = (($111) + ($112))|0;
|
|
$114 = (_nk_round_up_pow2($113)|0);
|
|
$116 = $114;
|
|
} else {
|
|
$115 = $capacity;
|
|
$116 = $115;
|
|
}
|
|
$capacity = $116;
|
|
$117 = $1;
|
|
$118 = $capacity;
|
|
$119 = $1;
|
|
$120 = ((($119)) + 32|0);
|
|
$121 = ((($120)) + 4|0);
|
|
$122 = (_nk_buffer_realloc($117,$118,$121)|0);
|
|
$123 = $1;
|
|
$124 = ((($123)) + 32|0);
|
|
HEAP32[$124>>2] = $122;
|
|
$125 = $1;
|
|
$126 = ((($125)) + 32|0);
|
|
$127 = HEAP32[$126>>2]|0;
|
|
$128 = ($127|0)!=(0|0);
|
|
if (!($128)) {
|
|
$0 = 0;
|
|
$167 = $0;
|
|
STACKTOP = sp;return ($167|0);
|
|
}
|
|
$129 = $2;
|
|
$130 = ($129|0)==(0);
|
|
$131 = $1;
|
|
$132 = ((($131)) + 32|0);
|
|
$133 = HEAP32[$132>>2]|0;
|
|
$134 = $1;
|
|
if ($130) {
|
|
$135 = ((($134)) + 44|0);
|
|
$136 = HEAP32[$135>>2]|0;
|
|
$137 = (($133) + ($136)|0);
|
|
$unaligned = $137;
|
|
} else {
|
|
$138 = ((($134)) + 56|0);
|
|
$139 = HEAP32[$138>>2]|0;
|
|
$140 = (($133) + ($139)|0);
|
|
$unaligned = $140;
|
|
}
|
|
$141 = $unaligned;
|
|
$142 = $4;
|
|
$143 = $2;
|
|
$144 = (_nk_buffer_align($141,$142,$alignment,$143)|0);
|
|
$memory = $144;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$167 = $0;
|
|
STACKTOP = sp;return ($167|0);
|
|
}
|
|
} while(0);
|
|
$145 = $2;
|
|
$146 = ($145|0)==(0);
|
|
$147 = $3;
|
|
$148 = HEAP32[$alignment>>2]|0;
|
|
$149 = (($147) + ($148))|0;
|
|
$150 = $1;
|
|
if ($146) {
|
|
$151 = ((($150)) + 44|0);
|
|
$152 = HEAP32[$151>>2]|0;
|
|
$153 = (($152) + ($149))|0;
|
|
HEAP32[$151>>2] = $153;
|
|
} else {
|
|
$154 = ((($150)) + 56|0);
|
|
$155 = HEAP32[$154>>2]|0;
|
|
$156 = (($155) - ($149))|0;
|
|
HEAP32[$154>>2] = $156;
|
|
}
|
|
$157 = HEAP32[$alignment>>2]|0;
|
|
$158 = $1;
|
|
$159 = ((($158)) + 48|0);
|
|
$160 = HEAP32[$159>>2]|0;
|
|
$161 = (($160) + ($157))|0;
|
|
HEAP32[$159>>2] = $161;
|
|
$162 = $1;
|
|
$163 = ((($162)) + 52|0);
|
|
$164 = HEAP32[$163>>2]|0;
|
|
$165 = (($164) + 1)|0;
|
|
HEAP32[$163>>2] = $165;
|
|
$166 = $memory;
|
|
$0 = $166;
|
|
$167 = $0;
|
|
STACKTOP = sp;return ($167|0);
|
|
}
|
|
function _nk_memcopy($dst0,$src0,$length) {
|
|
$dst0 = $dst0|0;
|
|
$src0 = $src0|0;
|
|
$length = $length|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $14 = 0;
|
|
var $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0;
|
|
var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0;
|
|
var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0;
|
|
var $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0;
|
|
var $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $dst = 0, $or$cond = 0, $or$cond3 = 0, $src = 0, $t = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $dst0;
|
|
$1 = $src0;
|
|
$2 = $length;
|
|
$3 = $0;
|
|
$dst = $3;
|
|
$4 = $1;
|
|
$src = $4;
|
|
$5 = $2;
|
|
$6 = ($5|0)==(0);
|
|
if ($6) {
|
|
$132 = $0;
|
|
STACKTOP = sp;return ($132|0);
|
|
}
|
|
$7 = $dst;
|
|
$8 = $src;
|
|
$9 = ($7|0)==($8|0);
|
|
if ($9) {
|
|
$132 = $0;
|
|
STACKTOP = sp;return ($132|0);
|
|
}
|
|
$10 = $dst;
|
|
$11 = $src;
|
|
$12 = ($10>>>0)<($11>>>0);
|
|
if ($12) {
|
|
$13 = $src;
|
|
$14 = $13;
|
|
$t = $14;
|
|
$15 = $t;
|
|
$16 = $dst;
|
|
$17 = $16;
|
|
$18 = $15 | $17;
|
|
$19 = $18 & 3;
|
|
$20 = ($19|0)!=(0);
|
|
if ($20) {
|
|
$21 = $t;
|
|
$22 = $dst;
|
|
$23 = $22;
|
|
$24 = $21 ^ $23;
|
|
$25 = $24 & 3;
|
|
$26 = ($25|0)!=(0);
|
|
$27 = $2;
|
|
$28 = ($27>>>0)<(4);
|
|
$or$cond = $26 | $28;
|
|
if ($or$cond) {
|
|
$29 = $2;
|
|
$t = $29;
|
|
} else {
|
|
$30 = $t;
|
|
$31 = $30 & 3;
|
|
$32 = (4 - ($31))|0;
|
|
$t = $32;
|
|
}
|
|
$33 = $t;
|
|
$34 = $2;
|
|
$35 = (($34) - ($33))|0;
|
|
$2 = $35;
|
|
while(1) {
|
|
$36 = $src;
|
|
$37 = ((($36)) + 1|0);
|
|
$src = $37;
|
|
$38 = HEAP8[$36>>0]|0;
|
|
$39 = $dst;
|
|
$40 = ((($39)) + 1|0);
|
|
$dst = $40;
|
|
HEAP8[$39>>0] = $38;
|
|
$41 = $t;
|
|
$42 = (($41) + -1)|0;
|
|
$t = $42;
|
|
$43 = ($42|0)!=(0);
|
|
if (!($43)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
$44 = $2;
|
|
$45 = (($44>>>0) / 4)&-1;
|
|
$t = $45;
|
|
$46 = $t;
|
|
$47 = ($46|0)!=(0);
|
|
if ($47) {
|
|
while(1) {
|
|
$48 = $src;
|
|
$49 = HEAP32[$48>>2]|0;
|
|
$50 = $dst;
|
|
HEAP32[$50>>2] = $49;
|
|
$51 = $src;
|
|
$52 = ((($51)) + 4|0);
|
|
$src = $52;
|
|
$53 = $dst;
|
|
$54 = ((($53)) + 4|0);
|
|
$dst = $54;
|
|
$55 = $t;
|
|
$56 = (($55) + -1)|0;
|
|
$t = $56;
|
|
$57 = ($56|0)!=(0);
|
|
if (!($57)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
$58 = $2;
|
|
$59 = $58 & 3;
|
|
$t = $59;
|
|
$60 = $t;
|
|
$61 = ($60|0)!=(0);
|
|
if (!($61)) {
|
|
$132 = $0;
|
|
STACKTOP = sp;return ($132|0);
|
|
}
|
|
while(1) {
|
|
$62 = $src;
|
|
$63 = ((($62)) + 1|0);
|
|
$src = $63;
|
|
$64 = HEAP8[$62>>0]|0;
|
|
$65 = $dst;
|
|
$66 = ((($65)) + 1|0);
|
|
$dst = $66;
|
|
HEAP8[$65>>0] = $64;
|
|
$67 = $t;
|
|
$68 = (($67) + -1)|0;
|
|
$t = $68;
|
|
$69 = ($68|0)!=(0);
|
|
if (!($69)) {
|
|
break;
|
|
}
|
|
}
|
|
$132 = $0;
|
|
STACKTOP = sp;return ($132|0);
|
|
} else {
|
|
$70 = $2;
|
|
$71 = $src;
|
|
$72 = (($71) + ($70)|0);
|
|
$src = $72;
|
|
$73 = $2;
|
|
$74 = $dst;
|
|
$75 = (($74) + ($73)|0);
|
|
$dst = $75;
|
|
$76 = $src;
|
|
$77 = $76;
|
|
$t = $77;
|
|
$78 = $t;
|
|
$79 = $dst;
|
|
$80 = $79;
|
|
$81 = $78 | $80;
|
|
$82 = $81 & 3;
|
|
$83 = ($82|0)!=(0);
|
|
if ($83) {
|
|
$84 = $t;
|
|
$85 = $dst;
|
|
$86 = $85;
|
|
$87 = $84 ^ $86;
|
|
$88 = $87 & 3;
|
|
$89 = ($88|0)!=(0);
|
|
$90 = $2;
|
|
$91 = ($90>>>0)<=(4);
|
|
$or$cond3 = $89 | $91;
|
|
if ($or$cond3) {
|
|
$92 = $2;
|
|
$t = $92;
|
|
} else {
|
|
$93 = $t;
|
|
$94 = $93 & 3;
|
|
$t = $94;
|
|
}
|
|
$95 = $t;
|
|
$96 = $2;
|
|
$97 = (($96) - ($95))|0;
|
|
$2 = $97;
|
|
while(1) {
|
|
$98 = $src;
|
|
$99 = ((($98)) + -1|0);
|
|
$src = $99;
|
|
$100 = HEAP8[$99>>0]|0;
|
|
$101 = $dst;
|
|
$102 = ((($101)) + -1|0);
|
|
$dst = $102;
|
|
HEAP8[$102>>0] = $100;
|
|
$103 = $t;
|
|
$104 = (($103) + -1)|0;
|
|
$t = $104;
|
|
$105 = ($104|0)!=(0);
|
|
if (!($105)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
$106 = $2;
|
|
$107 = (($106>>>0) / 4)&-1;
|
|
$t = $107;
|
|
$108 = $t;
|
|
$109 = ($108|0)!=(0);
|
|
if ($109) {
|
|
while(1) {
|
|
$110 = $src;
|
|
$111 = ((($110)) + -4|0);
|
|
$src = $111;
|
|
$112 = $dst;
|
|
$113 = ((($112)) + -4|0);
|
|
$dst = $113;
|
|
$114 = $src;
|
|
$115 = HEAP32[$114>>2]|0;
|
|
$116 = $dst;
|
|
HEAP32[$116>>2] = $115;
|
|
$117 = $t;
|
|
$118 = (($117) + -1)|0;
|
|
$t = $118;
|
|
$119 = ($118|0)!=(0);
|
|
if (!($119)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
$120 = $2;
|
|
$121 = $120 & 3;
|
|
$t = $121;
|
|
$122 = $t;
|
|
$123 = ($122|0)!=(0);
|
|
if (!($123)) {
|
|
$132 = $0;
|
|
STACKTOP = sp;return ($132|0);
|
|
}
|
|
while(1) {
|
|
$124 = $src;
|
|
$125 = ((($124)) + -1|0);
|
|
$src = $125;
|
|
$126 = HEAP8[$125>>0]|0;
|
|
$127 = $dst;
|
|
$128 = ((($127)) + -1|0);
|
|
$dst = $128;
|
|
HEAP8[$128>>0] = $126;
|
|
$129 = $t;
|
|
$130 = (($129) + -1)|0;
|
|
$t = $130;
|
|
$131 = ($130|0)!=(0);
|
|
if (!($131)) {
|
|
break;
|
|
}
|
|
}
|
|
$132 = $0;
|
|
STACKTOP = sp;return ($132|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_buffer_mark($buffer,$type) {
|
|
$buffer = $buffer|0;
|
|
$type = $type|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0;
|
|
var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $buffer;
|
|
$1 = $type;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((13445|0),(13400|0),4403,(13616|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$6 = $1;
|
|
$7 = $0;
|
|
$8 = (($7) + ($6<<3)|0);
|
|
HEAP32[$8>>2] = 1;
|
|
$9 = $1;
|
|
$10 = ($9|0)==(1);
|
|
$11 = $0;
|
|
if ($10) {
|
|
$12 = ((($11)) + 56|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = $1;
|
|
$15 = $0;
|
|
$16 = (($15) + ($14<<3)|0);
|
|
$17 = ((($16)) + 4|0);
|
|
HEAP32[$17>>2] = $13;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$18 = ((($11)) + 44|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = $1;
|
|
$21 = $0;
|
|
$22 = (($21) + ($20<<3)|0);
|
|
$23 = ((($22)) + 4|0);
|
|
HEAP32[$23>>2] = $19;
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_buffer_reset($buffer,$type) {
|
|
$buffer = $buffer|0;
|
|
$type = $type|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $buffer;
|
|
$1 = $type;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((13445|0),(13400|0),4414,(13631|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$6 = $1;
|
|
$7 = ($6|0)==(1);
|
|
$8 = $0;
|
|
if ($7) {
|
|
$9 = ((($8)) + 32|0);
|
|
$10 = ((($9)) + 4|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = $1;
|
|
$13 = $0;
|
|
$14 = (($13) + ($12<<3)|0);
|
|
$15 = ((($14)) + 4|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = (($11) - ($16))|0;
|
|
$18 = $0;
|
|
$19 = ((($18)) + 48|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = (($20) - ($17))|0;
|
|
HEAP32[$19>>2] = $21;
|
|
$22 = $1;
|
|
$23 = $0;
|
|
$24 = (($23) + ($22<<3)|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = ($25|0)!=(0);
|
|
if ($26) {
|
|
$27 = $1;
|
|
$28 = $0;
|
|
$29 = (($28) + ($27<<3)|0);
|
|
$30 = ((($29)) + 4|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = $0;
|
|
$33 = ((($32)) + 56|0);
|
|
HEAP32[$33>>2] = $31;
|
|
} else {
|
|
$34 = $0;
|
|
$35 = ((($34)) + 32|0);
|
|
$36 = ((($35)) + 4|0);
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$38 = $0;
|
|
$39 = ((($38)) + 56|0);
|
|
HEAP32[$39>>2] = $37;
|
|
}
|
|
$40 = $1;
|
|
$41 = $0;
|
|
$42 = (($41) + ($40<<3)|0);
|
|
HEAP32[$42>>2] = 0;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$43 = ((($8)) + 44|0);
|
|
$44 = HEAP32[$43>>2]|0;
|
|
$45 = $1;
|
|
$46 = $0;
|
|
$47 = (($46) + ($45<<3)|0);
|
|
$48 = ((($47)) + 4|0);
|
|
$49 = HEAP32[$48>>2]|0;
|
|
$50 = (($44) - ($49))|0;
|
|
$51 = $0;
|
|
$52 = ((($51)) + 48|0);
|
|
$53 = HEAP32[$52>>2]|0;
|
|
$54 = (($53) - ($50))|0;
|
|
HEAP32[$52>>2] = $54;
|
|
$55 = $1;
|
|
$56 = $0;
|
|
$57 = (($56) + ($55<<3)|0);
|
|
$58 = HEAP32[$57>>2]|0;
|
|
$59 = ($58|0)!=(0);
|
|
if ($59) {
|
|
$60 = $1;
|
|
$61 = $0;
|
|
$62 = (($61) + ($60<<3)|0);
|
|
$63 = ((($62)) + 4|0);
|
|
$64 = HEAP32[$63>>2]|0;
|
|
$65 = $0;
|
|
$66 = ((($65)) + 44|0);
|
|
HEAP32[$66>>2] = $64;
|
|
} else {
|
|
$67 = $0;
|
|
$68 = ((($67)) + 44|0);
|
|
HEAP32[$68>>2] = 0;
|
|
}
|
|
$69 = $1;
|
|
$70 = $0;
|
|
$71 = (($70) + ($69<<3)|0);
|
|
HEAP32[$71>>2] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_buffer_clear($b) {
|
|
$b = $b|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $b;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((13556|0),(13400|0),4436,(13647|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$6 = ((($5)) + 44|0);
|
|
HEAP32[$6>>2] = 0;
|
|
$7 = $0;
|
|
$8 = ((($7)) + 32|0);
|
|
$9 = ((($8)) + 4|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = $0;
|
|
$12 = ((($11)) + 56|0);
|
|
HEAP32[$12>>2] = $10;
|
|
$13 = $0;
|
|
$14 = ((($13)) + 52|0);
|
|
HEAP32[$14>>2] = 0;
|
|
$15 = $0;
|
|
$16 = ((($15)) + 48|0);
|
|
HEAP32[$16>>2] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_buffer_free($b) {
|
|
$b = $b|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 4|0;
|
|
$0 = $b;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((13556|0),(13400|0),4447,(13663|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$6 = ((($5)) + 32|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$9 = $0;
|
|
$10 = ((($9)) + 28|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = ($11|0)==(0);
|
|
if ($12) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$13 = $0;
|
|
$14 = ((($13)) + 16|0);
|
|
$15 = ((($14)) + 8|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = ($16|0)!=(0|0);
|
|
if (!($17)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$18 = $0;
|
|
$19 = ((($18)) + 16|0);
|
|
$20 = ((($19)) + 8|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = ($21|0)!=(0|0);
|
|
if (!($22)) {
|
|
___assert_fail((13678|0),(13400|0),4451,(13663|0));
|
|
// unreachable;
|
|
}
|
|
$23 = $0;
|
|
$24 = ((($23)) + 16|0);
|
|
$25 = ((($24)) + 8|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$27 = $0;
|
|
$28 = ((($27)) + 16|0);
|
|
$29 = $0;
|
|
$30 = ((($29)) + 32|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$28>>2]|0;
|
|
FUNCTION_TABLE_vii[$26 & 31]($$byval_copy,$31);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_buffer_memory($buffer) {
|
|
$buffer = $buffer|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $buffer;
|
|
$2 = $1;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((13445|0),(13400|0),4471,(13693|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if ($5) {
|
|
$6 = $1;
|
|
$7 = ((($6)) + 32|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$0 = $8;
|
|
$9 = $0;
|
|
STACKTOP = sp;return ($9|0);
|
|
} else {
|
|
$0 = 0;
|
|
$9 = $0;
|
|
STACKTOP = sp;return ($9|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_buffer_total($buffer) {
|
|
$buffer = $buffer|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $buffer;
|
|
$2 = $1;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((13445|0),(13400|0),4487,(13710|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if ($5) {
|
|
$6 = $1;
|
|
$7 = ((($6)) + 32|0);
|
|
$8 = ((($7)) + 4|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$0 = $9;
|
|
$10 = $0;
|
|
STACKTOP = sp;return ($10|0);
|
|
} else {
|
|
$0 = 0;
|
|
$10 = $0;
|
|
STACKTOP = sp;return ($10|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_str_append_text_char($s,$str,$len) {
|
|
$s = $s|0;
|
|
$str = $str|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $mem = 0, $or$cond = 0, $or$cond3 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $s;
|
|
$2 = $str;
|
|
$3 = $len;
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((13691|0),(13400|0),4530,(13726|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $2;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((13396|0),(13400|0),4531,(13726|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
$10 = $2;
|
|
$11 = ($10|0)!=(0|0);
|
|
$or$cond = $9 & $11;
|
|
$12 = $3;
|
|
$13 = ($12|0)!=(0);
|
|
$or$cond3 = $or$cond & $13;
|
|
if (!($or$cond3)) {
|
|
$0 = 0;
|
|
$32 = $0;
|
|
STACKTOP = sp;return ($32|0);
|
|
}
|
|
$14 = $1;
|
|
$15 = $3;
|
|
$16 = $15;
|
|
$17 = (_nk_buffer_alloc($14,0,$16,0)|0);
|
|
$mem = $17;
|
|
$18 = $mem;
|
|
$19 = ($18|0)!=(0|0);
|
|
if ($19) {
|
|
$20 = $mem;
|
|
$21 = $2;
|
|
$22 = $3;
|
|
$23 = $22;
|
|
(_nk_memcopy($20,$21,$23)|0);
|
|
$24 = $2;
|
|
$25 = $3;
|
|
$26 = (_nk_utf_len($24,$25)|0);
|
|
$27 = $1;
|
|
$28 = ((($27)) + 60|0);
|
|
$29 = HEAP32[$28>>2]|0;
|
|
$30 = (($29) + ($26))|0;
|
|
HEAP32[$28>>2] = $30;
|
|
$31 = $3;
|
|
$0 = $31;
|
|
$32 = $0;
|
|
STACKTOP = sp;return ($32|0);
|
|
} else {
|
|
$0 = 0;
|
|
$32 = $0;
|
|
STACKTOP = sp;return ($32|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_str_insert_at_char($s,$pos,$str,$len) {
|
|
$s = $s|0;
|
|
$pos = $pos|0;
|
|
$str = $str|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0;
|
|
var $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0;
|
|
var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0;
|
|
var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0;
|
|
var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0;
|
|
var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $copylen = 0, $dst = 0, $i = 0, $mem = 0, $or$cond = 0, $or$cond3 = 0, $src = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $s;
|
|
$2 = $pos;
|
|
$3 = $str;
|
|
$4 = $len;
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((13691|0),(13400|0),4621,(13750|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $3;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((13396|0),(13400|0),4622,(13750|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $4;
|
|
$10 = ($9|0)>=(0);
|
|
if (!($10)) {
|
|
___assert_fail((13772|0),(13400|0),4623,(13750|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $1;
|
|
$12 = ($11|0)!=(0|0);
|
|
$13 = $3;
|
|
$14 = ($13|0)!=(0|0);
|
|
$or$cond = $12 & $14;
|
|
$15 = $4;
|
|
$16 = ($15|0)!=(0);
|
|
$or$cond3 = $or$cond & $16;
|
|
if ($or$cond3) {
|
|
$17 = $2;
|
|
$18 = $1;
|
|
$19 = ((($18)) + 44|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = ($17>>>0)>($20>>>0);
|
|
if (!($21)) {
|
|
$22 = $1;
|
|
$23 = ((($22)) + 44|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = $4;
|
|
$26 = (($24) + ($25))|0;
|
|
$27 = $1;
|
|
$28 = ((($27)) + 32|0);
|
|
$29 = ((($28)) + 4|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$31 = ($26>>>0)>=($30>>>0);
|
|
if ($31) {
|
|
$32 = $1;
|
|
$33 = ((($32)) + 28|0);
|
|
$34 = HEAP32[$33>>2]|0;
|
|
$35 = ($34|0)==(0);
|
|
if ($35) {
|
|
$0 = 0;
|
|
$109 = $0;
|
|
STACKTOP = sp;return ($109|0);
|
|
}
|
|
}
|
|
$36 = $1;
|
|
$37 = ((($36)) + 44|0);
|
|
$38 = HEAP32[$37>>2]|0;
|
|
$39 = $2;
|
|
$40 = (($38) - ($39))|0;
|
|
$copylen = $40;
|
|
$41 = $copylen;
|
|
$42 = ($41|0)!=(0);
|
|
$43 = $1;
|
|
if (!($42)) {
|
|
$44 = $3;
|
|
$45 = $4;
|
|
(_nk_str_append_text_char($43,$44,$45)|0);
|
|
$0 = 1;
|
|
$109 = $0;
|
|
STACKTOP = sp;return ($109|0);
|
|
}
|
|
$46 = $4;
|
|
$47 = $46;
|
|
$48 = (_nk_buffer_alloc($43,0,$47,0)|0);
|
|
$mem = $48;
|
|
$49 = $mem;
|
|
$50 = ($49|0)!=(0|0);
|
|
if (!($50)) {
|
|
$0 = 0;
|
|
$109 = $0;
|
|
STACKTOP = sp;return ($109|0);
|
|
}
|
|
$51 = $2;
|
|
$52 = $4;
|
|
$53 = (($51) + ($52))|0;
|
|
$54 = $copylen;
|
|
$55 = (($54) - 1)|0;
|
|
$56 = (($53) + ($55))|0;
|
|
$57 = ($56|0)>=(0);
|
|
if (!($57)) {
|
|
___assert_fail((13781|0),(13400|0),4637,(13750|0));
|
|
// unreachable;
|
|
}
|
|
$58 = $2;
|
|
$59 = $copylen;
|
|
$60 = (($59) - 1)|0;
|
|
$61 = (($58) + ($60))|0;
|
|
$62 = ($61|0)>=(0);
|
|
if (!($62)) {
|
|
___assert_fail((13829|0),(13400|0),4638,(13750|0));
|
|
// unreachable;
|
|
}
|
|
$63 = $1;
|
|
$64 = ((($63)) + 32|0);
|
|
$65 = HEAP32[$64>>2]|0;
|
|
$66 = $2;
|
|
$67 = $4;
|
|
$68 = (($66) + ($67))|0;
|
|
$69 = $copylen;
|
|
$70 = (($69) - 1)|0;
|
|
$71 = (($68) + ($70))|0;
|
|
$72 = (($65) + ($71)|0);
|
|
$dst = $72;
|
|
$73 = $1;
|
|
$74 = ((($73)) + 32|0);
|
|
$75 = HEAP32[$74>>2]|0;
|
|
$76 = $2;
|
|
$77 = $copylen;
|
|
$78 = (($77) - 1)|0;
|
|
$79 = (($76) + ($78))|0;
|
|
$80 = (($75) + ($79)|0);
|
|
$src = $80;
|
|
$i = 0;
|
|
while(1) {
|
|
$81 = $i;
|
|
$82 = $copylen;
|
|
$83 = ($81|0)<($82|0);
|
|
if (!($83)) {
|
|
break;
|
|
}
|
|
$84 = $src;
|
|
$85 = ((($84)) + -1|0);
|
|
$src = $85;
|
|
$86 = HEAP8[$84>>0]|0;
|
|
$87 = $dst;
|
|
$88 = ((($87)) + -1|0);
|
|
$dst = $88;
|
|
HEAP8[$87>>0] = $86;
|
|
$89 = $i;
|
|
$90 = (($89) + 1)|0;
|
|
$i = $90;
|
|
}
|
|
$91 = $1;
|
|
$92 = ((($91)) + 32|0);
|
|
$93 = HEAP32[$92>>2]|0;
|
|
$94 = $2;
|
|
$95 = (($93) + ($94)|0);
|
|
$mem = $95;
|
|
$96 = $mem;
|
|
$97 = $3;
|
|
$98 = $4;
|
|
$99 = $98;
|
|
(_nk_memcopy($96,$97,$99)|0);
|
|
$100 = $1;
|
|
$101 = ((($100)) + 32|0);
|
|
$102 = HEAP32[$101>>2]|0;
|
|
$103 = $1;
|
|
$104 = ((($103)) + 44|0);
|
|
$105 = HEAP32[$104>>2]|0;
|
|
$106 = (_nk_utf_len($102,$105)|0);
|
|
$107 = $1;
|
|
$108 = ((($107)) + 60|0);
|
|
HEAP32[$108>>2] = $106;
|
|
$0 = 1;
|
|
$109 = $0;
|
|
STACKTOP = sp;return ($109|0);
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$109 = $0;
|
|
STACKTOP = sp;return ($109|0);
|
|
}
|
|
function _nk_str_insert_at_rune($str,$pos,$cstr,$len) {
|
|
$str = $str|0;
|
|
$pos = $pos|0;
|
|
$cstr = $cstr|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $begin = 0, $buffer = 0, $glyph_len = 0, $or$cond = 0, $or$cond3 = 0, $unicode = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$glyph_len = sp + 12|0;
|
|
$unicode = sp + 8|0;
|
|
$1 = $str;
|
|
$2 = $pos;
|
|
$3 = $cstr;
|
|
$4 = $len;
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((13396|0),(13400|0),4656,(13866|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $3;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((13888|0),(13400|0),4657,(13866|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $4;
|
|
$10 = ($9|0)!=(0);
|
|
if (!($10)) {
|
|
___assert_fail((13552|0),(13400|0),4658,(13866|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $1;
|
|
$12 = ($11|0)!=(0|0);
|
|
$13 = $3;
|
|
$14 = ($13|0)!=(0|0);
|
|
$or$cond = $12 & $14;
|
|
$15 = $4;
|
|
$16 = ($15|0)!=(0);
|
|
$or$cond3 = $or$cond & $16;
|
|
if (!($or$cond3)) {
|
|
$0 = 0;
|
|
$33 = $0;
|
|
STACKTOP = sp;return ($33|0);
|
|
}
|
|
$17 = $1;
|
|
$18 = $2;
|
|
$19 = (_nk_str_at_rune($17,$18,$unicode,$glyph_len)|0);
|
|
$begin = $19;
|
|
$20 = $1;
|
|
$21 = (_nk_str_get_const($20)|0);
|
|
$buffer = $21;
|
|
$22 = $begin;
|
|
$23 = ($22|0)!=(0|0);
|
|
if ($23) {
|
|
$24 = $1;
|
|
$25 = $begin;
|
|
$26 = $buffer;
|
|
$27 = $25;
|
|
$28 = $26;
|
|
$29 = (($27) - ($28))|0;
|
|
$30 = $3;
|
|
$31 = $4;
|
|
$32 = (_nk_str_insert_text_char($24,$29,$30,$31)|0);
|
|
$0 = $32;
|
|
$33 = $0;
|
|
STACKTOP = sp;return ($33|0);
|
|
} else {
|
|
$0 = 0;
|
|
$33 = $0;
|
|
STACKTOP = sp;return ($33|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_str_at_rune($str,$pos,$unicode,$len) {
|
|
$str = $str|0;
|
|
$pos = $pos|0;
|
|
$unicode = $unicode|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $glyph_len = 0, $i = 0;
|
|
var $or$cond = 0, $or$cond3 = 0, $src_len = 0, $text = 0, $text_len = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $str;
|
|
$2 = $pos;
|
|
$3 = $unicode;
|
|
$4 = $len;
|
|
$i = 0;
|
|
$src_len = 0;
|
|
$glyph_len = 0;
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((13396|0),(13400|0),4834,(14046|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $3;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((13544|0),(13400|0),4835,(14046|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $4;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((13552|0),(13400|0),4836,(14046|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $1;
|
|
$12 = ($11|0)!=(0|0);
|
|
$13 = $3;
|
|
$14 = ($13|0)!=(0|0);
|
|
$or$cond = $12 & $14;
|
|
$15 = $4;
|
|
$16 = ($15|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $16;
|
|
if (!($or$cond3)) {
|
|
$0 = 0;
|
|
$57 = $0;
|
|
STACKTOP = sp;return ($57|0);
|
|
}
|
|
$17 = $2;
|
|
$18 = ($17|0)<(0);
|
|
if ($18) {
|
|
$19 = $3;
|
|
HEAP32[$19>>2] = 0;
|
|
$20 = $4;
|
|
HEAP32[$20>>2] = 0;
|
|
$0 = 0;
|
|
$57 = $0;
|
|
STACKTOP = sp;return ($57|0);
|
|
}
|
|
$21 = $1;
|
|
$22 = ((($21)) + 32|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$text = $23;
|
|
$24 = $1;
|
|
$25 = ((($24)) + 44|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$text_len = $26;
|
|
$27 = $text;
|
|
$28 = $3;
|
|
$29 = $text_len;
|
|
$30 = (_nk_utf_decode($27,$28,$29)|0);
|
|
$glyph_len = $30;
|
|
while(1) {
|
|
$31 = $glyph_len;
|
|
$32 = ($31|0)!=(0);
|
|
if (!($32)) {
|
|
break;
|
|
}
|
|
$33 = $i;
|
|
$34 = $2;
|
|
$35 = ($33|0)==($34|0);
|
|
$36 = $glyph_len;
|
|
if ($35) {
|
|
label = 14;
|
|
break;
|
|
}
|
|
$38 = $i;
|
|
$39 = (($38) + ($36))|0;
|
|
$i = $39;
|
|
$40 = $src_len;
|
|
$41 = $glyph_len;
|
|
$42 = (($40) + ($41))|0;
|
|
$src_len = $42;
|
|
$43 = $text;
|
|
$44 = $src_len;
|
|
$45 = (($43) + ($44)|0);
|
|
$46 = $3;
|
|
$47 = $text_len;
|
|
$48 = $src_len;
|
|
$49 = (($47) - ($48))|0;
|
|
$50 = (_nk_utf_decode($45,$46,$49)|0);
|
|
$glyph_len = $50;
|
|
}
|
|
if ((label|0) == 14) {
|
|
$37 = $4;
|
|
HEAP32[$37>>2] = $36;
|
|
}
|
|
$51 = $i;
|
|
$52 = $2;
|
|
$53 = ($51|0)!=($52|0);
|
|
if ($53) {
|
|
$0 = 0;
|
|
$57 = $0;
|
|
STACKTOP = sp;return ($57|0);
|
|
} else {
|
|
$54 = $text;
|
|
$55 = $src_len;
|
|
$56 = (($54) + ($55)|0);
|
|
$0 = $56;
|
|
$57 = $0;
|
|
STACKTOP = sp;return ($57|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_str_get_const($s) {
|
|
$s = $s|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $s;
|
|
$2 = $1;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((13691|0),(13400|0),4927,(14077|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if ($5) {
|
|
$6 = $1;
|
|
$7 = ((($6)) + 60|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = ($8|0)!=(0);
|
|
if ($9) {
|
|
$10 = $1;
|
|
$11 = ((($10)) + 44|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ($12|0)!=(0);
|
|
if ($13) {
|
|
$14 = $1;
|
|
$15 = ((($14)) + 32|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$0 = $16;
|
|
$17 = $0;
|
|
STACKTOP = sp;return ($17|0);
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$17 = $0;
|
|
STACKTOP = sp;return ($17|0);
|
|
}
|
|
function _nk_str_insert_text_char($str,$pos,$text,$len) {
|
|
$str = $str|0;
|
|
$pos = $pos|0;
|
|
$text = $text|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $str;
|
|
$1 = $pos;
|
|
$2 = $text;
|
|
$3 = $len;
|
|
$4 = $0;
|
|
$5 = $1;
|
|
$6 = $2;
|
|
$7 = $3;
|
|
$8 = (_nk_str_insert_at_char($4,$5,$6,$7)|0);
|
|
STACKTOP = sp;return ($8|0);
|
|
}
|
|
function _nk_str_insert_text_runes($str,$pos,$runes,$len) {
|
|
$str = $str|0;
|
|
$pos = $pos|0;
|
|
$runes = $runes|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $byte_len = 0, $glyph = 0, $i = 0, $or$cond = 0, $or$cond3 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$glyph = sp + 28|0;
|
|
$1 = $str;
|
|
$2 = $pos;
|
|
$3 = $runes;
|
|
$4 = $len;
|
|
$i = 0;
|
|
$byte_len = 0;
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((13396|0),(13400|0),4715,(13898|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $1;
|
|
$8 = ($7|0)!=(0|0);
|
|
$9 = $3;
|
|
$10 = ($9|0)!=(0|0);
|
|
$or$cond = $8 & $10;
|
|
$11 = $4;
|
|
$12 = ($11|0)!=(0);
|
|
$or$cond3 = $or$cond & $12;
|
|
if (!($or$cond3)) {
|
|
$0 = 0;
|
|
$31 = $0;
|
|
STACKTOP = sp;return ($31|0);
|
|
}
|
|
$i = 0;
|
|
while(1) {
|
|
$13 = $i;
|
|
$14 = $4;
|
|
$15 = ($13|0)<($14|0);
|
|
if (!($15)) {
|
|
break;
|
|
}
|
|
$16 = $i;
|
|
$17 = $3;
|
|
$18 = (($17) + ($16<<2)|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = (_nk_utf_encode($19,$glyph,4)|0);
|
|
$byte_len = $20;
|
|
$21 = $byte_len;
|
|
$22 = ($21|0)!=(0);
|
|
if (!($22)) {
|
|
break;
|
|
}
|
|
$23 = $1;
|
|
$24 = $2;
|
|
$25 = $i;
|
|
$26 = (($24) + ($25))|0;
|
|
$27 = $byte_len;
|
|
(_nk_str_insert_at_rune($23,$26,$glyph,$27)|0);
|
|
$28 = $i;
|
|
$29 = (($28) + 1)|0;
|
|
$i = $29;
|
|
}
|
|
$30 = $4;
|
|
$0 = $30;
|
|
$31 = $0;
|
|
STACKTOP = sp;return ($31|0);
|
|
}
|
|
function _nk_str_remove_chars($s,$len) {
|
|
$s = $s|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $s;
|
|
$1 = $len;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((13691|0),(13400|0),4744,(13923|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $1;
|
|
$5 = ($4|0)>=(0);
|
|
if (!($5)) {
|
|
___assert_fail((13772|0),(13400|0),4745,(13923|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $0;
|
|
$7 = ($6|0)==(0|0);
|
|
$8 = $1;
|
|
$9 = ($8|0)<(0);
|
|
$or$cond = $7 | $9;
|
|
if ($or$cond) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$10 = $1;
|
|
$11 = $0;
|
|
$12 = ((($11)) + 44|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ($10>>>0)>($13>>>0);
|
|
if ($14) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$15 = $0;
|
|
$16 = ((($15)) + 44|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = $1;
|
|
$19 = (($17) - ($18))|0;
|
|
$20 = ($19|0)>=(0);
|
|
if (!($20)) {
|
|
___assert_fail((13943|0),(13400|0),4747,(13923|0));
|
|
// unreachable;
|
|
}
|
|
$21 = $1;
|
|
$22 = $0;
|
|
$23 = ((($22)) + 44|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = (($24) - ($21))|0;
|
|
HEAP32[$23>>2] = $25;
|
|
$26 = $0;
|
|
$27 = ((($26)) + 32|0);
|
|
$28 = HEAP32[$27>>2]|0;
|
|
$29 = $0;
|
|
$30 = ((($29)) + 44|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = (_nk_utf_len($28,$31)|0);
|
|
$33 = $0;
|
|
$34 = ((($33)) + 60|0);
|
|
HEAP32[$34>>2] = $32;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_str_delete_chars($s,$pos,$len) {
|
|
$s = $s|0;
|
|
$pos = $pos|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $8 = 0, $9 = 0, $dst = 0, $or$cond = 0, $src = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $s;
|
|
$1 = $pos;
|
|
$2 = $len;
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((13691|0),(13400|0),4777,(13986|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $0;
|
|
$6 = ($5|0)!=(0|0);
|
|
$7 = $2;
|
|
$8 = ($7|0)!=(0);
|
|
$or$cond = $6 & $8;
|
|
if (!($or$cond)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$9 = $1;
|
|
$10 = $0;
|
|
$11 = ((($10)) + 44|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ($9>>>0)>($12>>>0);
|
|
if ($13) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$14 = $1;
|
|
$15 = $2;
|
|
$16 = (($14) + ($15))|0;
|
|
$17 = $0;
|
|
$18 = ((($17)) + 44|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = ($16>>>0)>($19>>>0);
|
|
if ($20) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$21 = $1;
|
|
$22 = $2;
|
|
$23 = (($21) + ($22))|0;
|
|
$24 = $0;
|
|
$25 = ((($24)) + 44|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$27 = ($23>>>0)<($26>>>0);
|
|
$28 = $0;
|
|
do {
|
|
if ($27) {
|
|
$29 = ((($28)) + 32|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$31 = $1;
|
|
$32 = (($30) + ($31)|0);
|
|
$dst = $32;
|
|
$33 = $0;
|
|
$34 = ((($33)) + 32|0);
|
|
$35 = HEAP32[$34>>2]|0;
|
|
$36 = $1;
|
|
$37 = $2;
|
|
$38 = (($36) + ($37))|0;
|
|
$39 = (($35) + ($38)|0);
|
|
$src = $39;
|
|
$40 = $dst;
|
|
$41 = $src;
|
|
$42 = $0;
|
|
$43 = ((($42)) + 44|0);
|
|
$44 = HEAP32[$43>>2]|0;
|
|
$45 = $1;
|
|
$46 = $2;
|
|
$47 = (($45) + ($46))|0;
|
|
$48 = (($44) - ($47))|0;
|
|
(_nk_memcopy($40,$41,$48)|0);
|
|
$49 = $0;
|
|
$50 = ((($49)) + 44|0);
|
|
$51 = HEAP32[$50>>2]|0;
|
|
$52 = $2;
|
|
$53 = (($51) - ($52))|0;
|
|
$54 = ($53|0)>=(0);
|
|
if ($54) {
|
|
$55 = $2;
|
|
$56 = $0;
|
|
$57 = ((($56)) + 44|0);
|
|
$58 = HEAP32[$57>>2]|0;
|
|
$59 = (($58) - ($55))|0;
|
|
HEAP32[$57>>2] = $59;
|
|
break;
|
|
} else {
|
|
___assert_fail((13943|0),(13400|0),4786,(13986|0));
|
|
// unreachable;
|
|
}
|
|
} else {
|
|
$60 = $2;
|
|
_nk_str_remove_chars($28,$60);
|
|
}
|
|
} while(0);
|
|
$61 = $0;
|
|
$62 = ((($61)) + 32|0);
|
|
$63 = HEAP32[$62>>2]|0;
|
|
$64 = $0;
|
|
$65 = ((($64)) + 44|0);
|
|
$66 = HEAP32[$65>>2]|0;
|
|
$67 = (_nk_utf_len($63,$66)|0);
|
|
$68 = $0;
|
|
$69 = ((($68)) + 60|0);
|
|
HEAP32[$69>>2] = $67;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_str_delete_runes($s,$pos,$len) {
|
|
$s = $s|0;
|
|
$pos = $pos|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
|
|
var $81 = 0, $82 = 0, $9 = 0, $begin = 0, $end = 0, $temp = 0, $unicode = 0, $unused = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$unicode = sp + 12|0;
|
|
$unused = sp;
|
|
$0 = $s;
|
|
$1 = $pos;
|
|
$2 = $len;
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((13691|0),(13400|0),4801,(14006|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $0;
|
|
$6 = ((($5)) + 60|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = $1;
|
|
$9 = $2;
|
|
$10 = (($8) + ($9))|0;
|
|
$11 = ($7|0)>=($10|0);
|
|
if (!($11)) {
|
|
___assert_fail((14026|0),(13400|0),4802,(14006|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $0;
|
|
$13 = ((($12)) + 60|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = $1;
|
|
$16 = $2;
|
|
$17 = (($15) + ($16))|0;
|
|
$18 = ($14|0)<($17|0);
|
|
if ($18) {
|
|
$19 = $0;
|
|
$20 = ((($19)) + 60|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = $1;
|
|
$23 = (($21) - ($22))|0;
|
|
$24 = $0;
|
|
$25 = ((($24)) + 60|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$27 = ($23|0)<($26|0);
|
|
$28 = $0;
|
|
$29 = ((($28)) + 60|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$31 = $1;
|
|
$32 = (($30) - ($31))|0;
|
|
$33 = $27 ? $32 : $30;
|
|
$34 = ($33|0)<(0);
|
|
if ($34) {
|
|
$50 = 0;
|
|
} else {
|
|
$35 = $0;
|
|
$36 = ((($35)) + 60|0);
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$38 = $1;
|
|
$39 = (($37) - ($38))|0;
|
|
$40 = $0;
|
|
$41 = ((($40)) + 60|0);
|
|
$42 = HEAP32[$41>>2]|0;
|
|
$43 = ($39|0)<($42|0);
|
|
$44 = $0;
|
|
$45 = ((($44)) + 60|0);
|
|
$46 = HEAP32[$45>>2]|0;
|
|
$47 = $1;
|
|
$48 = (($46) - ($47))|0;
|
|
$49 = $43 ? $48 : $46;
|
|
$50 = $49;
|
|
}
|
|
$2 = $50;
|
|
}
|
|
$51 = $2;
|
|
$52 = ($51|0)!=(0);
|
|
if (!($52)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$53 = $0;
|
|
$54 = ((($53)) + 32|0);
|
|
$55 = HEAP32[$54>>2]|0;
|
|
$temp = $55;
|
|
$56 = $0;
|
|
$57 = $1;
|
|
$58 = (_nk_str_at_rune($56,$57,$unicode,$unused)|0);
|
|
$begin = $58;
|
|
$59 = $begin;
|
|
$60 = ($59|0)!=(0|0);
|
|
if (!($60)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$61 = $begin;
|
|
$62 = $0;
|
|
$63 = ((($62)) + 32|0);
|
|
HEAP32[$63>>2] = $61;
|
|
$64 = $0;
|
|
$65 = $2;
|
|
$66 = (_nk_str_at_rune($64,$65,$unicode,$unused)|0);
|
|
$end = $66;
|
|
$67 = $temp;
|
|
$68 = $0;
|
|
$69 = ((($68)) + 32|0);
|
|
HEAP32[$69>>2] = $67;
|
|
$70 = $end;
|
|
$71 = ($70|0)!=(0|0);
|
|
if (!($71)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$72 = $0;
|
|
$73 = $begin;
|
|
$74 = $temp;
|
|
$75 = $73;
|
|
$76 = $74;
|
|
$77 = (($75) - ($76))|0;
|
|
$78 = $end;
|
|
$79 = $begin;
|
|
$80 = $78;
|
|
$81 = $79;
|
|
$82 = (($80) - ($81))|0;
|
|
_nk_str_delete_chars($72,$77,$82);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_str_at_const($str,$pos,$unicode,$len) {
|
|
$str = $str|0;
|
|
$pos = $pos|0;
|
|
$unicode = $unicode|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $glyph_len = 0, $i = 0;
|
|
var $or$cond = 0, $or$cond3 = 0, $src_len = 0, $text = 0, $text_len = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $str;
|
|
$2 = $pos;
|
|
$3 = $unicode;
|
|
$4 = $len;
|
|
$i = 0;
|
|
$src_len = 0;
|
|
$glyph_len = 0;
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((13396|0),(13400|0),4879,(14061|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $3;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((13544|0),(13400|0),4880,(14061|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $4;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((13552|0),(13400|0),4881,(14061|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $1;
|
|
$12 = ($11|0)!=(0|0);
|
|
$13 = $3;
|
|
$14 = ($13|0)!=(0|0);
|
|
$or$cond = $12 & $14;
|
|
$15 = $4;
|
|
$16 = ($15|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $16;
|
|
if (!($or$cond3)) {
|
|
$0 = 0;
|
|
$57 = $0;
|
|
STACKTOP = sp;return ($57|0);
|
|
}
|
|
$17 = $2;
|
|
$18 = ($17|0)<(0);
|
|
if ($18) {
|
|
$19 = $3;
|
|
HEAP32[$19>>2] = 0;
|
|
$20 = $4;
|
|
HEAP32[$20>>2] = 0;
|
|
$0 = 0;
|
|
$57 = $0;
|
|
STACKTOP = sp;return ($57|0);
|
|
}
|
|
$21 = $1;
|
|
$22 = ((($21)) + 32|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$text = $23;
|
|
$24 = $1;
|
|
$25 = ((($24)) + 44|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$text_len = $26;
|
|
$27 = $text;
|
|
$28 = $3;
|
|
$29 = $text_len;
|
|
$30 = (_nk_utf_decode($27,$28,$29)|0);
|
|
$glyph_len = $30;
|
|
while(1) {
|
|
$31 = $glyph_len;
|
|
$32 = ($31|0)!=(0);
|
|
if (!($32)) {
|
|
break;
|
|
}
|
|
$33 = $i;
|
|
$34 = $2;
|
|
$35 = ($33|0)==($34|0);
|
|
if ($35) {
|
|
label = 14;
|
|
break;
|
|
}
|
|
$38 = $i;
|
|
$39 = (($38) + 1)|0;
|
|
$i = $39;
|
|
$40 = $src_len;
|
|
$41 = $glyph_len;
|
|
$42 = (($40) + ($41))|0;
|
|
$src_len = $42;
|
|
$43 = $text;
|
|
$44 = $src_len;
|
|
$45 = (($43) + ($44)|0);
|
|
$46 = $3;
|
|
$47 = $text_len;
|
|
$48 = $src_len;
|
|
$49 = (($47) - ($48))|0;
|
|
$50 = (_nk_utf_decode($45,$46,$49)|0);
|
|
$glyph_len = $50;
|
|
}
|
|
if ((label|0) == 14) {
|
|
$36 = $glyph_len;
|
|
$37 = $4;
|
|
HEAP32[$37>>2] = $36;
|
|
}
|
|
$51 = $i;
|
|
$52 = $2;
|
|
$53 = ($51|0)!=($52|0);
|
|
if ($53) {
|
|
$0 = 0;
|
|
$57 = $0;
|
|
STACKTOP = sp;return ($57|0);
|
|
} else {
|
|
$54 = $text;
|
|
$55 = $src_len;
|
|
$56 = (($54) + ($55)|0);
|
|
$0 = $56;
|
|
$57 = $0;
|
|
STACKTOP = sp;return ($57|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_str_rune_at($str,$pos) {
|
|
$str = $str|0;
|
|
$pos = $pos|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $len = 0, $unicode = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$len = sp + 4|0;
|
|
$unicode = sp;
|
|
$0 = $str;
|
|
$1 = $pos;
|
|
HEAP32[$unicode>>2] = 0;
|
|
$2 = $0;
|
|
$3 = $1;
|
|
(_nk_str_at_const($2,$3,$unicode,$len)|0);
|
|
$4 = HEAP32[$unicode>>2]|0;
|
|
STACKTOP = sp;return ($4|0);
|
|
}
|
|
function _nk_str_len($s) {
|
|
$s = $s|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $s;
|
|
$2 = $1;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((13691|0),(13400|0),4935,(14094|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if ($5) {
|
|
$6 = $1;
|
|
$7 = ((($6)) + 60|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = ($8|0)!=(0);
|
|
if ($9) {
|
|
$10 = $1;
|
|
$11 = ((($10)) + 44|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ($12|0)!=(0);
|
|
if ($13) {
|
|
$14 = $1;
|
|
$15 = ((($14)) + 60|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$0 = $16;
|
|
$17 = $0;
|
|
STACKTOP = sp;return ($17|0);
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$17 = $0;
|
|
STACKTOP = sp;return ($17|0);
|
|
}
|
|
function _nk_str_len_char($s) {
|
|
$s = $s|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $s;
|
|
$2 = $1;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((13691|0),(13400|0),4943,(14105|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if ($5) {
|
|
$6 = $1;
|
|
$7 = ((($6)) + 60|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = ($8|0)!=(0);
|
|
if ($9) {
|
|
$10 = $1;
|
|
$11 = ((($10)) + 44|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ($12|0)!=(0);
|
|
if ($13) {
|
|
$14 = $1;
|
|
$15 = ((($14)) + 44|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$0 = $16;
|
|
$17 = $0;
|
|
STACKTOP = sp;return ($17|0);
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$17 = $0;
|
|
STACKTOP = sp;return ($17|0);
|
|
}
|
|
function _nk_push_scissor($b,$r) {
|
|
$b = $b|0;
|
|
$r = $r|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0.0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0, $52 = 0, $53 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, $cmd = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $b;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((13556|0),(13400|0),5035,(14121|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = +HEAPF32[$r>>2];
|
|
$6 = $0;
|
|
$7 = ((($6)) + 4|0);
|
|
HEAPF32[$7>>2] = $5;
|
|
$8 = ((($r)) + 4|0);
|
|
$9 = +HEAPF32[$8>>2];
|
|
$10 = $0;
|
|
$11 = ((($10)) + 4|0);
|
|
$12 = ((($11)) + 4|0);
|
|
HEAPF32[$12>>2] = $9;
|
|
$13 = ((($r)) + 8|0);
|
|
$14 = +HEAPF32[$13>>2];
|
|
$15 = $0;
|
|
$16 = ((($15)) + 4|0);
|
|
$17 = ((($16)) + 8|0);
|
|
HEAPF32[$17>>2] = $14;
|
|
$18 = ((($r)) + 12|0);
|
|
$19 = +HEAPF32[$18>>2];
|
|
$20 = $0;
|
|
$21 = ((($20)) + 4|0);
|
|
$22 = ((($21)) + 12|0);
|
|
HEAPF32[$22>>2] = $19;
|
|
$23 = $0;
|
|
$24 = (_nk_command_buffer_push($23,1,16)|0);
|
|
$cmd = $24;
|
|
$25 = $cmd;
|
|
$26 = ($25|0)!=(0|0);
|
|
if (!($26)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$27 = +HEAPF32[$r>>2];
|
|
$28 = (~~(($27)));
|
|
$29 = $cmd;
|
|
$30 = ((($29)) + 8|0);
|
|
HEAP16[$30>>1] = $28;
|
|
$31 = ((($r)) + 4|0);
|
|
$32 = +HEAPF32[$31>>2];
|
|
$33 = (~~(($32)));
|
|
$34 = $cmd;
|
|
$35 = ((($34)) + 10|0);
|
|
HEAP16[$35>>1] = $33;
|
|
$36 = ((($r)) + 8|0);
|
|
$37 = +HEAPF32[$36>>2];
|
|
$38 = 0.0 < $37;
|
|
$39 = ((($r)) + 8|0);
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = $38 ? $40 : 0.0;
|
|
$42 = (~~(($41))&65535);
|
|
$43 = $cmd;
|
|
$44 = ((($43)) + 12|0);
|
|
HEAP16[$44>>1] = $42;
|
|
$45 = ((($r)) + 12|0);
|
|
$46 = +HEAPF32[$45>>2];
|
|
$47 = 0.0 < $46;
|
|
$48 = ((($r)) + 12|0);
|
|
$49 = +HEAPF32[$48>>2];
|
|
$50 = $47 ? $49 : 0.0;
|
|
$51 = (~~(($50))&65535);
|
|
$52 = $cmd;
|
|
$53 = ((($52)) + 14|0);
|
|
HEAP16[$53>>1] = $51;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_command_buffer_push($b,$t,$size) {
|
|
$b = $b|0;
|
|
$t = $t|0;
|
|
$size = $size|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $alignment = 0, $cmd = 0, $memory = 0;
|
|
var $unaligned = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $b;
|
|
$2 = $t;
|
|
$3 = $size;
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((13556|0),(13400|0),5009,(29865|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $1;
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((29888|0),(13400|0),5010,(29865|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $1;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
$0 = 0;
|
|
$56 = $0;
|
|
STACKTOP = sp;return ($56|0);
|
|
}
|
|
$11 = $1;
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = $3;
|
|
$14 = (_nk_buffer_alloc($12,0,$13,4)|0);
|
|
$cmd = $14;
|
|
$15 = $cmd;
|
|
$16 = ($15|0)!=(0|0);
|
|
if ($16) {
|
|
$17 = $cmd;
|
|
$18 = $1;
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = ((($19)) + 32|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = $17;
|
|
$23 = $21;
|
|
$24 = (($22) - ($23))|0;
|
|
$25 = $1;
|
|
$26 = ((($25)) + 36|0);
|
|
HEAP32[$26>>2] = $24;
|
|
$27 = $cmd;
|
|
$28 = $3;
|
|
$29 = (($27) + ($28)|0);
|
|
$unaligned = $29;
|
|
$30 = $unaligned;
|
|
$31 = ((($30)) + 3|0);
|
|
$32 = $31;
|
|
$33 = $32 & -4;
|
|
$34 = $33;
|
|
$memory = $34;
|
|
$35 = $memory;
|
|
$36 = $unaligned;
|
|
$37 = $35;
|
|
$38 = $36;
|
|
$39 = (($37) - ($38))|0;
|
|
$alignment = $39;
|
|
$40 = $2;
|
|
$41 = $cmd;
|
|
HEAP32[$41>>2] = $40;
|
|
$42 = $1;
|
|
$43 = HEAP32[$42>>2]|0;
|
|
$44 = ((($43)) + 44|0);
|
|
$45 = HEAP32[$44>>2]|0;
|
|
$46 = $alignment;
|
|
$47 = (($45) + ($46))|0;
|
|
$48 = $cmd;
|
|
$49 = ((($48)) + 4|0);
|
|
HEAP32[$49>>2] = $47;
|
|
$50 = $cmd;
|
|
$51 = ((($50)) + 4|0);
|
|
$52 = HEAP32[$51>>2]|0;
|
|
$53 = $1;
|
|
$54 = ((($53)) + 32|0);
|
|
HEAP32[$54>>2] = $52;
|
|
$55 = $cmd;
|
|
$0 = $55;
|
|
$56 = $0;
|
|
STACKTOP = sp;return ($56|0);
|
|
} else {
|
|
$0 = 0;
|
|
$56 = $0;
|
|
STACKTOP = sp;return ($56|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_stroke_line($b,$x0,$y0,$x1,$y1,$line_thickness,$c) {
|
|
$b = $b|0;
|
|
$x0 = +$x0;
|
|
$y0 = +$y0;
|
|
$x1 = +$x1;
|
|
$y1 = +$y1;
|
|
$line_thickness = +$line_thickness;
|
|
$c = $c|0;
|
|
var $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0.0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cmd = 0, label = 0;
|
|
var sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $b;
|
|
$1 = $x0;
|
|
$2 = $y0;
|
|
$3 = $x1;
|
|
$4 = $y1;
|
|
$5 = $line_thickness;
|
|
$6 = $0;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((13556|0),(13400|0),5057,(14137|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $0;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$10 = $0;
|
|
$11 = (_nk_command_buffer_push($10,2,24)|0);
|
|
$cmd = $11;
|
|
$12 = $cmd;
|
|
$13 = ($12|0)!=(0|0);
|
|
if (!($13)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$14 = $5;
|
|
$15 = (~~(($14))&65535);
|
|
$16 = $cmd;
|
|
$17 = ((($16)) + 8|0);
|
|
HEAP16[$17>>1] = $15;
|
|
$18 = $1;
|
|
$19 = (~~(($18)));
|
|
$20 = $cmd;
|
|
$21 = ((($20)) + 10|0);
|
|
HEAP16[$21>>1] = $19;
|
|
$22 = $2;
|
|
$23 = (~~(($22)));
|
|
$24 = $cmd;
|
|
$25 = ((($24)) + 10|0);
|
|
$26 = ((($25)) + 2|0);
|
|
HEAP16[$26>>1] = $23;
|
|
$27 = $3;
|
|
$28 = (~~(($27)));
|
|
$29 = $cmd;
|
|
$30 = ((($29)) + 14|0);
|
|
HEAP16[$30>>1] = $28;
|
|
$31 = $4;
|
|
$32 = (~~(($31)));
|
|
$33 = $cmd;
|
|
$34 = ((($33)) + 14|0);
|
|
$35 = ((($34)) + 2|0);
|
|
HEAP16[$35>>1] = $32;
|
|
$36 = $cmd;
|
|
$37 = ((($36)) + 18|0);
|
|
;HEAP8[$37>>0]=HEAP8[$c>>0]|0;HEAP8[$37+1>>0]=HEAP8[$c+1>>0]|0;HEAP8[$37+2>>0]=HEAP8[$c+2>>0]|0;HEAP8[$37+3>>0]=HEAP8[$c+3>>0]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_fill_rect($b,$rect,$rounding,$c) {
|
|
$b = $b|0;
|
|
$rect = $rect|0;
|
|
$rounding = +$rounding;
|
|
$c = $c|0;
|
|
var $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0;
|
|
var $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0.0, $43 = 0, $44 = 0;
|
|
var $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0.0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0, $78 = 0, $79 = 0, $8 = 0, $80 = 0.0;
|
|
var $81 = 0.0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $9 = 0, $clip = 0, $cmd = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $b;
|
|
$1 = $rounding;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((13556|0),(13400|0),5124,(14152|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$6 = ((($c)) + 3|0);
|
|
$7 = HEAP8[$6>>0]|0;
|
|
$8 = $7&255;
|
|
$9 = ($8|0)==(0);
|
|
if ($9) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$10 = $0;
|
|
$11 = ((($10)) + 20|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ($12|0)!=(0);
|
|
if ($13) {
|
|
$14 = $0;
|
|
$15 = ((($14)) + 4|0);
|
|
$clip = $15;
|
|
$16 = $clip;
|
|
$17 = +HEAPF32[$16>>2];
|
|
$18 = +HEAPF32[$rect>>2];
|
|
$19 = ((($rect)) + 8|0);
|
|
$20 = +HEAPF32[$19>>2];
|
|
$21 = $18 + $20;
|
|
$22 = $17 > $21;
|
|
if ($22) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$23 = $clip;
|
|
$24 = +HEAPF32[$23>>2];
|
|
$25 = $clip;
|
|
$26 = ((($25)) + 8|0);
|
|
$27 = +HEAPF32[$26>>2];
|
|
$28 = $24 + $27;
|
|
$29 = +HEAPF32[$rect>>2];
|
|
$30 = $28 < $29;
|
|
if ($30) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$31 = $clip;
|
|
$32 = ((($31)) + 4|0);
|
|
$33 = +HEAPF32[$32>>2];
|
|
$34 = ((($rect)) + 4|0);
|
|
$35 = +HEAPF32[$34>>2];
|
|
$36 = ((($rect)) + 12|0);
|
|
$37 = +HEAPF32[$36>>2];
|
|
$38 = $35 + $37;
|
|
$39 = $33 > $38;
|
|
if ($39) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$40 = $clip;
|
|
$41 = ((($40)) + 4|0);
|
|
$42 = +HEAPF32[$41>>2];
|
|
$43 = $clip;
|
|
$44 = ((($43)) + 12|0);
|
|
$45 = +HEAPF32[$44>>2];
|
|
$46 = $42 + $45;
|
|
$47 = ((($rect)) + 4|0);
|
|
$48 = +HEAPF32[$47>>2];
|
|
$49 = $46 < $48;
|
|
if ($49) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
$50 = $0;
|
|
$51 = (_nk_command_buffer_push($50,5,24)|0);
|
|
$cmd = $51;
|
|
$52 = $cmd;
|
|
$53 = ($52|0)!=(0|0);
|
|
if (!($53)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$54 = $1;
|
|
$55 = (~~(($54))&65535);
|
|
$56 = $cmd;
|
|
$57 = ((($56)) + 8|0);
|
|
HEAP16[$57>>1] = $55;
|
|
$58 = +HEAPF32[$rect>>2];
|
|
$59 = (~~(($58)));
|
|
$60 = $cmd;
|
|
$61 = ((($60)) + 10|0);
|
|
HEAP16[$61>>1] = $59;
|
|
$62 = ((($rect)) + 4|0);
|
|
$63 = +HEAPF32[$62>>2];
|
|
$64 = (~~(($63)));
|
|
$65 = $cmd;
|
|
$66 = ((($65)) + 12|0);
|
|
HEAP16[$66>>1] = $64;
|
|
$67 = ((($rect)) + 8|0);
|
|
$68 = +HEAPF32[$67>>2];
|
|
$69 = 0.0 < $68;
|
|
$70 = ((($rect)) + 8|0);
|
|
$71 = +HEAPF32[$70>>2];
|
|
$72 = $69 ? $71 : 0.0;
|
|
$73 = (~~(($72))&65535);
|
|
$74 = $cmd;
|
|
$75 = ((($74)) + 14|0);
|
|
HEAP16[$75>>1] = $73;
|
|
$76 = ((($rect)) + 12|0);
|
|
$77 = +HEAPF32[$76>>2];
|
|
$78 = 0.0 < $77;
|
|
$79 = ((($rect)) + 12|0);
|
|
$80 = +HEAPF32[$79>>2];
|
|
$81 = $78 ? $80 : 0.0;
|
|
$82 = (~~(($81))&65535);
|
|
$83 = $cmd;
|
|
$84 = ((($83)) + 16|0);
|
|
HEAP16[$84>>1] = $82;
|
|
$85 = $cmd;
|
|
$86 = ((($85)) + 18|0);
|
|
;HEAP8[$86>>0]=HEAP8[$c>>0]|0;HEAP8[$86+1>>0]=HEAP8[$c+1>>0]|0;HEAP8[$86+2>>0]=HEAP8[$c+2>>0]|0;HEAP8[$86+3>>0]=HEAP8[$c+3>>0]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_fill_rect_multi_color($b,$rect,$left,$top,$right,$bottom) {
|
|
$b = $b|0;
|
|
$rect = $rect|0;
|
|
$left = $left|0;
|
|
$top = $top|0;
|
|
$right = $right|0;
|
|
$bottom = $bottom|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0.0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0.0;
|
|
var $63 = 0.0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
|
|
var $81 = 0, $82 = 0, $83 = 0, $9 = 0, $clip = 0, $cmd = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $b;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((13556|0),(13400|0),5149,(14165|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$6 = ((($5)) + 20|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = ($7|0)!=(0);
|
|
if ($8) {
|
|
$9 = $0;
|
|
$10 = ((($9)) + 4|0);
|
|
$clip = $10;
|
|
$11 = $clip;
|
|
$12 = +HEAPF32[$11>>2];
|
|
$13 = +HEAPF32[$rect>>2];
|
|
$14 = ((($rect)) + 8|0);
|
|
$15 = +HEAPF32[$14>>2];
|
|
$16 = $13 + $15;
|
|
$17 = $12 > $16;
|
|
if ($17) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$18 = $clip;
|
|
$19 = +HEAPF32[$18>>2];
|
|
$20 = $clip;
|
|
$21 = ((($20)) + 8|0);
|
|
$22 = +HEAPF32[$21>>2];
|
|
$23 = $19 + $22;
|
|
$24 = +HEAPF32[$rect>>2];
|
|
$25 = $23 < $24;
|
|
if ($25) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$26 = $clip;
|
|
$27 = ((($26)) + 4|0);
|
|
$28 = +HEAPF32[$27>>2];
|
|
$29 = ((($rect)) + 4|0);
|
|
$30 = +HEAPF32[$29>>2];
|
|
$31 = ((($rect)) + 12|0);
|
|
$32 = +HEAPF32[$31>>2];
|
|
$33 = $30 + $32;
|
|
$34 = $28 > $33;
|
|
if ($34) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$35 = $clip;
|
|
$36 = ((($35)) + 4|0);
|
|
$37 = +HEAPF32[$36>>2];
|
|
$38 = $clip;
|
|
$39 = ((($38)) + 12|0);
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = $37 + $40;
|
|
$42 = ((($rect)) + 4|0);
|
|
$43 = +HEAPF32[$42>>2];
|
|
$44 = $41 < $43;
|
|
if ($44) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
$45 = $0;
|
|
$46 = (_nk_command_buffer_push($45,6,32)|0);
|
|
$cmd = $46;
|
|
$47 = $cmd;
|
|
$48 = ($47|0)!=(0|0);
|
|
if (!($48)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$49 = +HEAPF32[$rect>>2];
|
|
$50 = (~~(($49)));
|
|
$51 = $cmd;
|
|
$52 = ((($51)) + 8|0);
|
|
HEAP16[$52>>1] = $50;
|
|
$53 = ((($rect)) + 4|0);
|
|
$54 = +HEAPF32[$53>>2];
|
|
$55 = (~~(($54)));
|
|
$56 = $cmd;
|
|
$57 = ((($56)) + 10|0);
|
|
HEAP16[$57>>1] = $55;
|
|
$58 = ((($rect)) + 8|0);
|
|
$59 = +HEAPF32[$58>>2];
|
|
$60 = 0.0 < $59;
|
|
$61 = ((($rect)) + 8|0);
|
|
$62 = +HEAPF32[$61>>2];
|
|
$63 = $60 ? $62 : 0.0;
|
|
$64 = (~~(($63))&65535);
|
|
$65 = $cmd;
|
|
$66 = ((($65)) + 12|0);
|
|
HEAP16[$66>>1] = $64;
|
|
$67 = ((($rect)) + 12|0);
|
|
$68 = +HEAPF32[$67>>2];
|
|
$69 = 0.0 < $68;
|
|
$70 = ((($rect)) + 12|0);
|
|
$71 = +HEAPF32[$70>>2];
|
|
$72 = $69 ? $71 : 0.0;
|
|
$73 = (~~(($72))&65535);
|
|
$74 = $cmd;
|
|
$75 = ((($74)) + 14|0);
|
|
HEAP16[$75>>1] = $73;
|
|
$76 = $cmd;
|
|
$77 = ((($76)) + 16|0);
|
|
;HEAP8[$77>>0]=HEAP8[$left>>0]|0;HEAP8[$77+1>>0]=HEAP8[$left+1>>0]|0;HEAP8[$77+2>>0]=HEAP8[$left+2>>0]|0;HEAP8[$77+3>>0]=HEAP8[$left+3>>0]|0;
|
|
$78 = $cmd;
|
|
$79 = ((($78)) + 20|0);
|
|
;HEAP8[$79>>0]=HEAP8[$top>>0]|0;HEAP8[$79+1>>0]=HEAP8[$top+1>>0]|0;HEAP8[$79+2>>0]=HEAP8[$top+2>>0]|0;HEAP8[$79+3>>0]=HEAP8[$top+3>>0]|0;
|
|
$80 = $cmd;
|
|
$81 = ((($80)) + 28|0);
|
|
;HEAP8[$81>>0]=HEAP8[$right>>0]|0;HEAP8[$81+1>>0]=HEAP8[$right+1>>0]|0;HEAP8[$81+2>>0]=HEAP8[$right+2>>0]|0;HEAP8[$81+3>>0]=HEAP8[$right+3>>0]|0;
|
|
$82 = $cmd;
|
|
$83 = ((($82)) + 24|0);
|
|
;HEAP8[$83>>0]=HEAP8[$bottom>>0]|0;HEAP8[$83+1>>0]=HEAP8[$bottom+1>>0]|0;HEAP8[$83+2>>0]=HEAP8[$bottom+2>>0]|0;HEAP8[$83+3>>0]=HEAP8[$bottom+3>>0]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_fill_circle($b,$r,$c) {
|
|
$b = $b|0;
|
|
$r = $r|0;
|
|
$c = $c|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0.0;
|
|
var $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0.0;
|
|
var $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0.0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0.0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
|
|
var $81 = 0, $9 = 0, $clip = 0, $cmd = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $b;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((13556|0),(13400|0),5197,(14190|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = ((($c)) + 3|0);
|
|
$6 = HEAP8[$5>>0]|0;
|
|
$7 = $6&255;
|
|
$8 = ($7|0)==(0);
|
|
if ($8) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$9 = $0;
|
|
$10 = ((($9)) + 20|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = ($11|0)!=(0);
|
|
if ($12) {
|
|
$13 = $0;
|
|
$14 = ((($13)) + 4|0);
|
|
$clip = $14;
|
|
$15 = $clip;
|
|
$16 = +HEAPF32[$15>>2];
|
|
$17 = +HEAPF32[$r>>2];
|
|
$18 = ((($r)) + 8|0);
|
|
$19 = +HEAPF32[$18>>2];
|
|
$20 = $17 + $19;
|
|
$21 = $16 > $20;
|
|
if ($21) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$22 = $clip;
|
|
$23 = +HEAPF32[$22>>2];
|
|
$24 = $clip;
|
|
$25 = ((($24)) + 8|0);
|
|
$26 = +HEAPF32[$25>>2];
|
|
$27 = $23 + $26;
|
|
$28 = +HEAPF32[$r>>2];
|
|
$29 = $27 < $28;
|
|
if ($29) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$30 = $clip;
|
|
$31 = ((($30)) + 4|0);
|
|
$32 = +HEAPF32[$31>>2];
|
|
$33 = ((($r)) + 4|0);
|
|
$34 = +HEAPF32[$33>>2];
|
|
$35 = ((($r)) + 12|0);
|
|
$36 = +HEAPF32[$35>>2];
|
|
$37 = $34 + $36;
|
|
$38 = $32 > $37;
|
|
if ($38) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$39 = $clip;
|
|
$40 = ((($39)) + 4|0);
|
|
$41 = +HEAPF32[$40>>2];
|
|
$42 = $clip;
|
|
$43 = ((($42)) + 12|0);
|
|
$44 = +HEAPF32[$43>>2];
|
|
$45 = $41 + $44;
|
|
$46 = ((($r)) + 4|0);
|
|
$47 = +HEAPF32[$46>>2];
|
|
$48 = $45 < $47;
|
|
if ($48) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
$49 = $0;
|
|
$50 = (_nk_command_buffer_push($49,8,20)|0);
|
|
$cmd = $50;
|
|
$51 = $cmd;
|
|
$52 = ($51|0)!=(0|0);
|
|
if (!($52)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$53 = +HEAPF32[$r>>2];
|
|
$54 = (~~(($53)));
|
|
$55 = $cmd;
|
|
$56 = ((($55)) + 8|0);
|
|
HEAP16[$56>>1] = $54;
|
|
$57 = ((($r)) + 4|0);
|
|
$58 = +HEAPF32[$57>>2];
|
|
$59 = (~~(($58)));
|
|
$60 = $cmd;
|
|
$61 = ((($60)) + 10|0);
|
|
HEAP16[$61>>1] = $59;
|
|
$62 = ((($r)) + 8|0);
|
|
$63 = +HEAPF32[$62>>2];
|
|
$64 = $63 < 0.0;
|
|
$65 = ((($r)) + 8|0);
|
|
$66 = +HEAPF32[$65>>2];
|
|
$67 = $64 ? 0.0 : $66;
|
|
$68 = (~~(($67))&65535);
|
|
$69 = $cmd;
|
|
$70 = ((($69)) + 12|0);
|
|
HEAP16[$70>>1] = $68;
|
|
$71 = ((($r)) + 12|0);
|
|
$72 = +HEAPF32[$71>>2];
|
|
$73 = $72 < 0.0;
|
|
$74 = ((($r)) + 12|0);
|
|
$75 = +HEAPF32[$74>>2];
|
|
$76 = $73 ? 0.0 : $75;
|
|
$77 = (~~(($76))&65535);
|
|
$78 = $cmd;
|
|
$79 = ((($78)) + 14|0);
|
|
HEAP16[$79>>1] = $77;
|
|
$80 = $cmd;
|
|
$81 = ((($80)) + 16|0);
|
|
;HEAP8[$81>>0]=HEAP8[$c>>0]|0;HEAP8[$81+1>>0]=HEAP8[$c+1>>0]|0;HEAP8[$81+2>>0]=HEAP8[$c+2>>0]|0;HEAP8[$81+3>>0]=HEAP8[$c+3>>0]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_fill_triangle($b,$x0,$y0,$x1,$y1,$x2,$y2,$c) {
|
|
$b = $b|0;
|
|
$x0 = +$x0;
|
|
$y0 = +$y0;
|
|
$x1 = +$x1;
|
|
$y1 = +$y1;
|
|
$x2 = +$x2;
|
|
$y2 = +$y2;
|
|
$c = $c|0;
|
|
var $0 = 0, $1 = 0.0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0.0, $106 = 0, $107 = 0, $108 = 0, $109 = 0.0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0.0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0.0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0.0, $124 = 0, $125 = 0, $126 = 0, $127 = 0.0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0.0, $30 = 0, $31 = 0;
|
|
var $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0, $45 = 0, $46 = 0.0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0.0;
|
|
var $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0, $57 = 0, $58 = 0.0, $59 = 0.0, $6 = 0.0, $60 = 0, $61 = 0, $62 = 0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0.0, $67 = 0, $68 = 0;
|
|
var $69 = 0.0, $7 = 0, $70 = 0, $71 = 0, $72 = 0.0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0, $83 = 0, $84 = 0.0, $85 = 0.0, $86 = 0;
|
|
var $87 = 0, $88 = 0, $89 = 0.0, $9 = 0, $90 = 0.0, $91 = 0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0.0, $96 = 0, $97 = 0, $98 = 0.0, $99 = 0.0, $clip = 0, $cmd = 0, $or$cond = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $b;
|
|
$1 = $x0;
|
|
$2 = $y0;
|
|
$3 = $x1;
|
|
$4 = $y1;
|
|
$5 = $x2;
|
|
$6 = $y2;
|
|
$7 = $0;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((13556|0),(13400|0),5284,(14205|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $0;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$11 = ((($c)) + 3|0);
|
|
$12 = HEAP8[$11>>0]|0;
|
|
$13 = $12&255;
|
|
$14 = ($13|0)!=(0);
|
|
$15 = $0;
|
|
$16 = ($15|0)!=(0|0);
|
|
$or$cond = $14 & $16;
|
|
if (!($or$cond)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$17 = $0;
|
|
$18 = ((($17)) + 20|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = ($19|0)!=(0);
|
|
do {
|
|
if ($20) {
|
|
$21 = $0;
|
|
$22 = ((($21)) + 4|0);
|
|
$clip = $22;
|
|
$23 = $clip;
|
|
$24 = +HEAPF32[$23>>2];
|
|
$25 = $1;
|
|
$26 = $24 <= $25;
|
|
if ($26) {
|
|
$27 = $1;
|
|
$28 = $clip;
|
|
$29 = +HEAPF32[$28>>2];
|
|
$30 = $clip;
|
|
$31 = ((($30)) + 8|0);
|
|
$32 = +HEAPF32[$31>>2];
|
|
$33 = $29 + $32;
|
|
$34 = $27 <= $33;
|
|
if ($34) {
|
|
$35 = $clip;
|
|
$36 = ((($35)) + 4|0);
|
|
$37 = +HEAPF32[$36>>2];
|
|
$38 = $2;
|
|
$39 = $37 <= $38;
|
|
if ($39) {
|
|
$40 = $2;
|
|
$41 = $clip;
|
|
$42 = ((($41)) + 4|0);
|
|
$43 = +HEAPF32[$42>>2];
|
|
$44 = $clip;
|
|
$45 = ((($44)) + 12|0);
|
|
$46 = +HEAPF32[$45>>2];
|
|
$47 = $43 + $46;
|
|
$48 = $40 <= $47;
|
|
if ($48) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$49 = $clip;
|
|
$50 = +HEAPF32[$49>>2];
|
|
$51 = $3;
|
|
$52 = $50 <= $51;
|
|
if ($52) {
|
|
$53 = $3;
|
|
$54 = $clip;
|
|
$55 = +HEAPF32[$54>>2];
|
|
$56 = $clip;
|
|
$57 = ((($56)) + 8|0);
|
|
$58 = +HEAPF32[$57>>2];
|
|
$59 = $55 + $58;
|
|
$60 = $53 <= $59;
|
|
if ($60) {
|
|
$61 = $clip;
|
|
$62 = ((($61)) + 4|0);
|
|
$63 = +HEAPF32[$62>>2];
|
|
$64 = $4;
|
|
$65 = $63 <= $64;
|
|
if ($65) {
|
|
$66 = $4;
|
|
$67 = $clip;
|
|
$68 = ((($67)) + 4|0);
|
|
$69 = +HEAPF32[$68>>2];
|
|
$70 = $clip;
|
|
$71 = ((($70)) + 12|0);
|
|
$72 = +HEAPF32[$71>>2];
|
|
$73 = $69 + $72;
|
|
$74 = $66 <= $73;
|
|
if ($74) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$75 = $clip;
|
|
$76 = +HEAPF32[$75>>2];
|
|
$77 = $5;
|
|
$78 = $76 <= $77;
|
|
if (!($78)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$79 = $5;
|
|
$80 = $clip;
|
|
$81 = +HEAPF32[$80>>2];
|
|
$82 = $clip;
|
|
$83 = ((($82)) + 8|0);
|
|
$84 = +HEAPF32[$83>>2];
|
|
$85 = $81 + $84;
|
|
$86 = $79 <= $85;
|
|
if (!($86)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$87 = $clip;
|
|
$88 = ((($87)) + 4|0);
|
|
$89 = +HEAPF32[$88>>2];
|
|
$90 = $6;
|
|
$91 = $89 <= $90;
|
|
if (!($91)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$92 = $6;
|
|
$93 = $clip;
|
|
$94 = ((($93)) + 4|0);
|
|
$95 = +HEAPF32[$94>>2];
|
|
$96 = $clip;
|
|
$97 = ((($96)) + 12|0);
|
|
$98 = +HEAPF32[$97>>2];
|
|
$99 = $95 + $98;
|
|
$100 = $92 <= $99;
|
|
if (!($100)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
} while(0);
|
|
$101 = $0;
|
|
$102 = (_nk_command_buffer_push($101,12,24)|0);
|
|
$cmd = $102;
|
|
$103 = $cmd;
|
|
$104 = ($103|0)!=(0|0);
|
|
if (!($104)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$105 = $1;
|
|
$106 = (~~(($105)));
|
|
$107 = $cmd;
|
|
$108 = ((($107)) + 8|0);
|
|
HEAP16[$108>>1] = $106;
|
|
$109 = $2;
|
|
$110 = (~~(($109)));
|
|
$111 = $cmd;
|
|
$112 = ((($111)) + 8|0);
|
|
$113 = ((($112)) + 2|0);
|
|
HEAP16[$113>>1] = $110;
|
|
$114 = $3;
|
|
$115 = (~~(($114)));
|
|
$116 = $cmd;
|
|
$117 = ((($116)) + 12|0);
|
|
HEAP16[$117>>1] = $115;
|
|
$118 = $4;
|
|
$119 = (~~(($118)));
|
|
$120 = $cmd;
|
|
$121 = ((($120)) + 12|0);
|
|
$122 = ((($121)) + 2|0);
|
|
HEAP16[$122>>1] = $119;
|
|
$123 = $5;
|
|
$124 = (~~(($123)));
|
|
$125 = $cmd;
|
|
$126 = ((($125)) + 16|0);
|
|
HEAP16[$126>>1] = $124;
|
|
$127 = $6;
|
|
$128 = (~~(($127)));
|
|
$129 = $cmd;
|
|
$130 = ((($129)) + 16|0);
|
|
$131 = ((($130)) + 2|0);
|
|
HEAP16[$131>>1] = $128;
|
|
$132 = $cmd;
|
|
$133 = ((($132)) + 20|0);
|
|
;HEAP8[$133>>0]=HEAP8[$c>>0]|0;HEAP8[$133+1>>0]=HEAP8[$c+1>>0]|0;HEAP8[$133+2>>0]=HEAP8[$c+2>>0]|0;HEAP8[$133+3>>0]=HEAP8[$c+3>>0]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_image($b,$r,$img) {
|
|
$b = $b|0;
|
|
$r = $r|0;
|
|
$img = $img|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0;
|
|
var $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0.0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0, $78 = 0, $79 = 0, $8 = 0, $80 = 0.0;
|
|
var $81 = 0.0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $9 = 0, $c = 0, $cmd = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $b;
|
|
$1 = $img;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((13556|0),(13400|0),5378,(14222|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$6 = $0;
|
|
$7 = ((($6)) + 20|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = ($8|0)!=(0);
|
|
if ($9) {
|
|
$10 = $0;
|
|
$11 = ((($10)) + 4|0);
|
|
$c = $11;
|
|
$12 = $c;
|
|
$13 = ((($12)) + 8|0);
|
|
$14 = +HEAPF32[$13>>2];
|
|
$15 = $14 != 0.0;
|
|
if (!($15)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$16 = $c;
|
|
$17 = ((($16)) + 12|0);
|
|
$18 = +HEAPF32[$17>>2];
|
|
$19 = $18 != 0.0;
|
|
if (!($19)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$20 = $c;
|
|
$21 = +HEAPF32[$20>>2];
|
|
$22 = +HEAPF32[$r>>2];
|
|
$23 = ((($r)) + 8|0);
|
|
$24 = +HEAPF32[$23>>2];
|
|
$25 = $22 + $24;
|
|
$26 = $21 > $25;
|
|
if ($26) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$27 = $c;
|
|
$28 = +HEAPF32[$27>>2];
|
|
$29 = $c;
|
|
$30 = ((($29)) + 8|0);
|
|
$31 = +HEAPF32[$30>>2];
|
|
$32 = $28 + $31;
|
|
$33 = +HEAPF32[$r>>2];
|
|
$34 = $32 < $33;
|
|
if ($34) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$35 = $c;
|
|
$36 = ((($35)) + 4|0);
|
|
$37 = +HEAPF32[$36>>2];
|
|
$38 = ((($r)) + 4|0);
|
|
$39 = +HEAPF32[$38>>2];
|
|
$40 = ((($r)) + 12|0);
|
|
$41 = +HEAPF32[$40>>2];
|
|
$42 = $39 + $41;
|
|
$43 = $37 > $42;
|
|
if ($43) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$44 = $c;
|
|
$45 = ((($44)) + 4|0);
|
|
$46 = +HEAPF32[$45>>2];
|
|
$47 = $c;
|
|
$48 = ((($47)) + 12|0);
|
|
$49 = +HEAPF32[$48>>2];
|
|
$50 = $46 + $49;
|
|
$51 = ((($r)) + 4|0);
|
|
$52 = +HEAPF32[$51>>2];
|
|
$53 = $50 < $52;
|
|
if ($53) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
$54 = $0;
|
|
$55 = (_nk_command_buffer_push($54,17,32)|0);
|
|
$cmd = $55;
|
|
$56 = $cmd;
|
|
$57 = ($56|0)!=(0|0);
|
|
if (!($57)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$58 = +HEAPF32[$r>>2];
|
|
$59 = (~~(($58)));
|
|
$60 = $cmd;
|
|
$61 = ((($60)) + 8|0);
|
|
HEAP16[$61>>1] = $59;
|
|
$62 = ((($r)) + 4|0);
|
|
$63 = +HEAPF32[$62>>2];
|
|
$64 = (~~(($63)));
|
|
$65 = $cmd;
|
|
$66 = ((($65)) + 10|0);
|
|
HEAP16[$66>>1] = $64;
|
|
$67 = ((($r)) + 8|0);
|
|
$68 = +HEAPF32[$67>>2];
|
|
$69 = 0.0 < $68;
|
|
$70 = ((($r)) + 8|0);
|
|
$71 = +HEAPF32[$70>>2];
|
|
$72 = $69 ? $71 : 0.0;
|
|
$73 = (~~(($72))&65535);
|
|
$74 = $cmd;
|
|
$75 = ((($74)) + 12|0);
|
|
HEAP16[$75>>1] = $73;
|
|
$76 = ((($r)) + 12|0);
|
|
$77 = +HEAPF32[$76>>2];
|
|
$78 = 0.0 < $77;
|
|
$79 = ((($r)) + 12|0);
|
|
$80 = +HEAPF32[$79>>2];
|
|
$81 = $78 ? $80 : 0.0;
|
|
$82 = (~~(($81))&65535);
|
|
$83 = $cmd;
|
|
$84 = ((($83)) + 14|0);
|
|
HEAP16[$84>>1] = $82;
|
|
$85 = $cmd;
|
|
$86 = ((($85)) + 16|0);
|
|
$87 = $1;
|
|
;HEAP32[$86>>2]=HEAP32[$87>>2]|0;HEAP32[$86+4>>2]=HEAP32[$87+4>>2]|0;HEAP32[$86+8>>2]=HEAP32[$87+8>>2]|0;HEAP32[$86+12>>2]=HEAP32[$87+12>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_text($b,$r,$string,$length,$font,$bg,$fg) {
|
|
$b = $b|0;
|
|
$r = $r|0;
|
|
$string = $string|0;
|
|
$length = $length|0;
|
|
$font = $font|0;
|
|
$bg = $bg|0;
|
|
$fg = $fg|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0.0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0, $112 = 0, $113 = 0, $114 = 0;
|
|
var $115 = 0.0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0.0, $132 = 0;
|
|
var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
|
|
var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0;
|
|
var $42 = 0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0, $57 = 0.0, $58 = 0.0, $59 = 0, $6 = 0;
|
|
var $60 = 0, $61 = 0, $62 = 0.0, $63 = 0, $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0.0, $77 = 0, $78 = 0;
|
|
var $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0, $82 = 0.0, $83 = 0, $84 = 0.0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0.0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0;
|
|
var $97 = 0, $98 = 0, $99 = 0, $c = 0, $cmd = 0, $glyphs = 0, $or$cond = 0, $or$cond3 = 0, $text_width = 0.0, $txt_width = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 36|0;
|
|
$glyphs = sp + 4|0;
|
|
$txt_width = sp;
|
|
$0 = $b;
|
|
$1 = $string;
|
|
$2 = $length;
|
|
$3 = $font;
|
|
$text_width = 0.0;
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((13556|0),(13400|0),5404,(14236|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $3;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((14249|0),(13400|0),5405,(14236|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $0;
|
|
$9 = ($8|0)!=(0|0);
|
|
$10 = $1;
|
|
$11 = ($10|0)!=(0|0);
|
|
$or$cond = $9 & $11;
|
|
$12 = $2;
|
|
$13 = ($12|0)!=(0);
|
|
$or$cond3 = $or$cond & $13;
|
|
if (!($or$cond3)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$14 = ((($bg)) + 3|0);
|
|
$15 = HEAP8[$14>>0]|0;
|
|
$16 = $15&255;
|
|
$17 = ($16|0)==(0);
|
|
if ($17) {
|
|
$18 = ((($fg)) + 3|0);
|
|
$19 = HEAP8[$18>>0]|0;
|
|
$20 = $19&255;
|
|
$21 = ($20|0)==(0);
|
|
if ($21) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
$22 = $0;
|
|
$23 = ((($22)) + 20|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = ($24|0)!=(0);
|
|
if ($25) {
|
|
$26 = $0;
|
|
$27 = ((($26)) + 4|0);
|
|
$c = $27;
|
|
$28 = $c;
|
|
$29 = ((($28)) + 8|0);
|
|
$30 = +HEAPF32[$29>>2];
|
|
$31 = $30 != 0.0;
|
|
if (!($31)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$32 = $c;
|
|
$33 = ((($32)) + 12|0);
|
|
$34 = +HEAPF32[$33>>2];
|
|
$35 = $34 != 0.0;
|
|
if (!($35)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$36 = $c;
|
|
$37 = +HEAPF32[$36>>2];
|
|
$38 = +HEAPF32[$r>>2];
|
|
$39 = ((($r)) + 8|0);
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = $38 + $40;
|
|
$42 = $37 > $41;
|
|
if ($42) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$43 = $c;
|
|
$44 = +HEAPF32[$43>>2];
|
|
$45 = $c;
|
|
$46 = ((($45)) + 8|0);
|
|
$47 = +HEAPF32[$46>>2];
|
|
$48 = $44 + $47;
|
|
$49 = +HEAPF32[$r>>2];
|
|
$50 = $48 < $49;
|
|
if ($50) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$51 = $c;
|
|
$52 = ((($51)) + 4|0);
|
|
$53 = +HEAPF32[$52>>2];
|
|
$54 = ((($r)) + 4|0);
|
|
$55 = +HEAPF32[$54>>2];
|
|
$56 = ((($r)) + 12|0);
|
|
$57 = +HEAPF32[$56>>2];
|
|
$58 = $55 + $57;
|
|
$59 = $53 > $58;
|
|
if ($59) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$60 = $c;
|
|
$61 = ((($60)) + 4|0);
|
|
$62 = +HEAPF32[$61>>2];
|
|
$63 = $c;
|
|
$64 = ((($63)) + 12|0);
|
|
$65 = +HEAPF32[$64>>2];
|
|
$66 = $62 + $65;
|
|
$67 = ((($r)) + 4|0);
|
|
$68 = +HEAPF32[$67>>2];
|
|
$69 = $66 < $68;
|
|
if ($69) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
$70 = $3;
|
|
$71 = ((($70)) + 8|0);
|
|
$72 = HEAP32[$71>>2]|0;
|
|
$73 = $3;
|
|
$74 = $3;
|
|
$75 = ((($74)) + 4|0);
|
|
$76 = +HEAPF32[$75>>2];
|
|
$77 = $1;
|
|
$78 = $2;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$73>>2]|0;
|
|
$79 = (+FUNCTION_TABLE_didii[$72 & 15]($$byval_copy,$76,$77,$78));
|
|
$text_width = $79;
|
|
$80 = $text_width;
|
|
$81 = ((($r)) + 8|0);
|
|
$82 = +HEAPF32[$81>>2];
|
|
$83 = $80 > $82;
|
|
if ($83) {
|
|
HEAP32[$glyphs>>2] = 0;
|
|
$84 = $text_width;
|
|
HEAPF32[$txt_width>>2] = $84;
|
|
$85 = $3;
|
|
$86 = $1;
|
|
$87 = $2;
|
|
$88 = ((($r)) + 8|0);
|
|
$89 = +HEAPF32[$88>>2];
|
|
$90 = (_nk_text_clamp($85,$86,$87,$89,$glyphs,$txt_width)|0);
|
|
$2 = $90;
|
|
}
|
|
$91 = $2;
|
|
$92 = ($91|0)!=(0);
|
|
if (!($92)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$93 = $0;
|
|
$94 = $2;
|
|
$95 = (($94) + 1)|0;
|
|
$96 = (40 + ($95))|0;
|
|
$97 = (_nk_command_buffer_push($93,16,$96)|0);
|
|
$cmd = $97;
|
|
$98 = $cmd;
|
|
$99 = ($98|0)!=(0|0);
|
|
if (!($99)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$100 = +HEAPF32[$r>>2];
|
|
$101 = (~~(($100)));
|
|
$102 = $cmd;
|
|
$103 = ((($102)) + 20|0);
|
|
HEAP16[$103>>1] = $101;
|
|
$104 = ((($r)) + 4|0);
|
|
$105 = +HEAPF32[$104>>2];
|
|
$106 = (~~(($105)));
|
|
$107 = $cmd;
|
|
$108 = ((($107)) + 22|0);
|
|
HEAP16[$108>>1] = $106;
|
|
$109 = ((($r)) + 8|0);
|
|
$110 = +HEAPF32[$109>>2];
|
|
$111 = (~~(($110))&65535);
|
|
$112 = $cmd;
|
|
$113 = ((($112)) + 24|0);
|
|
HEAP16[$113>>1] = $111;
|
|
$114 = ((($r)) + 12|0);
|
|
$115 = +HEAPF32[$114>>2];
|
|
$116 = (~~(($115))&65535);
|
|
$117 = $cmd;
|
|
$118 = ((($117)) + 26|0);
|
|
HEAP16[$118>>1] = $116;
|
|
$119 = $cmd;
|
|
$120 = ((($119)) + 12|0);
|
|
;HEAP8[$120>>0]=HEAP8[$bg>>0]|0;HEAP8[$120+1>>0]=HEAP8[$bg+1>>0]|0;HEAP8[$120+2>>0]=HEAP8[$bg+2>>0]|0;HEAP8[$120+3>>0]=HEAP8[$bg+3>>0]|0;
|
|
$121 = $cmd;
|
|
$122 = ((($121)) + 16|0);
|
|
;HEAP8[$122>>0]=HEAP8[$fg>>0]|0;HEAP8[$122+1>>0]=HEAP8[$fg+1>>0]|0;HEAP8[$122+2>>0]=HEAP8[$fg+2>>0]|0;HEAP8[$122+3>>0]=HEAP8[$fg+3>>0]|0;
|
|
$123 = $3;
|
|
$124 = $cmd;
|
|
$125 = ((($124)) + 8|0);
|
|
HEAP32[$125>>2] = $123;
|
|
$126 = $2;
|
|
$127 = $cmd;
|
|
$128 = ((($127)) + 32|0);
|
|
HEAP32[$128>>2] = $126;
|
|
$129 = $3;
|
|
$130 = ((($129)) + 4|0);
|
|
$131 = +HEAPF32[$130>>2];
|
|
$132 = $cmd;
|
|
$133 = ((($132)) + 28|0);
|
|
HEAPF32[$133>>2] = $131;
|
|
$134 = $cmd;
|
|
$135 = ((($134)) + 36|0);
|
|
$136 = $1;
|
|
$137 = $2;
|
|
(_nk_memcopy($135,$136,$137)|0);
|
|
$138 = $2;
|
|
$139 = $cmd;
|
|
$140 = ((($139)) + 36|0);
|
|
$141 = (($140) + ($138)|0);
|
|
HEAP8[$141>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_text_clamp($font,$text,$text_len,$space,$glyphs,$text_width) {
|
|
$font = $font|0;
|
|
$text = $text|0;
|
|
$text_len = $text_len|0;
|
|
$space = +$space;
|
|
$glyphs = $glyphs|0;
|
|
$text_width = $text_width|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0.0, $27 = 0, $28 = 0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0.0;
|
|
var $44 = 0, $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $g = 0, $glyph_len = 0, $last_width = 0.0, $len = 0, $s = 0.0, $unicode = 0, $width = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 52|0;
|
|
$unicode = sp + 16|0;
|
|
$0 = $font;
|
|
$1 = $text;
|
|
$2 = $text_len;
|
|
$3 = $space;
|
|
$4 = $glyphs;
|
|
$5 = $text_width;
|
|
$glyph_len = 0;
|
|
$last_width = 0.0;
|
|
HEAP32[$unicode>>2] = 0;
|
|
$width = 0.0;
|
|
$len = 0;
|
|
$g = 0;
|
|
$6 = $1;
|
|
$7 = $2;
|
|
$8 = (_nk_utf_decode($6,$unicode,$7)|0);
|
|
$glyph_len = $8;
|
|
while(1) {
|
|
$9 = $glyph_len;
|
|
$10 = ($9|0)!=(0);
|
|
if (!($10)) {
|
|
break;
|
|
}
|
|
$11 = $width;
|
|
$12 = $3;
|
|
$13 = $11 < $12;
|
|
if (!($13)) {
|
|
break;
|
|
}
|
|
$14 = $len;
|
|
$15 = $2;
|
|
$16 = ($14|0)<($15|0);
|
|
if (!($16)) {
|
|
break;
|
|
}
|
|
$17 = $glyph_len;
|
|
$18 = $len;
|
|
$19 = (($18) + ($17))|0;
|
|
$len = $19;
|
|
$20 = $0;
|
|
$21 = ((($20)) + 8|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = $0;
|
|
$24 = $0;
|
|
$25 = ((($24)) + 4|0);
|
|
$26 = +HEAPF32[$25>>2];
|
|
$27 = $1;
|
|
$28 = $len;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$23>>2]|0;
|
|
$29 = (+FUNCTION_TABLE_didii[$22 & 15]($$byval_copy,$26,$27,$28));
|
|
$s = $29;
|
|
$30 = $width;
|
|
$last_width = $30;
|
|
$31 = $s;
|
|
$width = $31;
|
|
$32 = $len;
|
|
$33 = $1;
|
|
$34 = (($33) + ($32)|0);
|
|
$35 = $2;
|
|
$36 = $len;
|
|
$37 = (($35) - ($36))|0;
|
|
$38 = (_nk_utf_decode($34,$unicode,$37)|0);
|
|
$glyph_len = $38;
|
|
$39 = $g;
|
|
$40 = (($39) + 1)|0;
|
|
$g = $40;
|
|
}
|
|
$41 = $g;
|
|
$42 = $4;
|
|
HEAP32[$42>>2] = $41;
|
|
$43 = $last_width;
|
|
$44 = $5;
|
|
HEAPF32[$44>>2] = $43;
|
|
$45 = $len;
|
|
STACKTOP = sp;return ($45|0);
|
|
}
|
|
function _nk_draw_list_init($list) {
|
|
$list = $list|0;
|
|
var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0.0;
|
|
var $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $a = 0.0, $i = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $list;
|
|
$i = 0;
|
|
$1 = $0;
|
|
_nk_zero($1,172);
|
|
$i = 0;
|
|
while(1) {
|
|
$2 = $i;
|
|
$3 = ($2>>>0)<(12);
|
|
if (!($3)) {
|
|
break;
|
|
}
|
|
$4 = $i;
|
|
$5 = (+($4>>>0));
|
|
$6 = $5 / 12.0;
|
|
$7 = $6 * 2.0;
|
|
$8 = $7 * 3.1415927410125732;
|
|
$a = $8;
|
|
$9 = $a;
|
|
$10 = (+_nk_cos($9));
|
|
$11 = $i;
|
|
$12 = $0;
|
|
$13 = ((($12)) + 76|0);
|
|
$14 = (($13) + ($11<<3)|0);
|
|
HEAPF32[$14>>2] = $10;
|
|
$15 = $a;
|
|
$16 = (+_nk_sin($15));
|
|
$17 = $i;
|
|
$18 = $0;
|
|
$19 = ((($18)) + 76|0);
|
|
$20 = (($19) + ($17<<3)|0);
|
|
$21 = ((($20)) + 4|0);
|
|
HEAPF32[$21>>2] = $16;
|
|
$22 = $i;
|
|
$23 = (($22) + 1)|0;
|
|
$i = $23;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_cos($x) {
|
|
$x = +$x;
|
|
var $0 = 0.0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0.0, $21 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0;
|
|
var $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $x;
|
|
$1 = $0;
|
|
$2 = $0;
|
|
$3 = $0;
|
|
$4 = $0;
|
|
$5 = $0;
|
|
$6 = $0;
|
|
$7 = $0;
|
|
$8 = $7 * -5.2302214344429956E-14;
|
|
$9 = 9.9014095030725002E-4 + $8;
|
|
$10 = $6 * $9;
|
|
$11 = -0.018663715571165085 + $10;
|
|
$12 = $5 * $11;
|
|
$13 = 0.10712379962205887 + $12;
|
|
$14 = $4 * $13;
|
|
$15 = -0.1181340366601944 + $14;
|
|
$16 = $3 * $15;
|
|
$17 = -0.39438232779502869 + $16;
|
|
$18 = $2 * $17;
|
|
$19 = -0.038191996514797211 + $18;
|
|
$20 = $1 * $19;
|
|
$21 = 1.0023859739303589 + $20;
|
|
STACKTOP = sp;return (+$21);
|
|
}
|
|
function _nk_sin($x) {
|
|
$x = +$x;
|
|
var $0 = 0.0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0.0, $21 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0;
|
|
var $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $x;
|
|
$1 = $0;
|
|
$2 = $0;
|
|
$3 = $0;
|
|
$4 = $0;
|
|
$5 = $0;
|
|
$6 = $0;
|
|
$7 = $0;
|
|
$8 = $7 * 1.3823564222548157E-4;
|
|
$9 = -0.0030399605166167021 + $8;
|
|
$10 = $6 * $9;
|
|
$11 = 0.020802659913897514 + $10;
|
|
$12 = $5 * $11;
|
|
$13 = -0.026735339313745499 + $12;
|
|
$14 = $4 * $13;
|
|
$15 = -0.13807877898216248 + $14;
|
|
$16 = $3 * $15;
|
|
$17 = -0.012127612717449665 + $16;
|
|
$18 = $2 * $17;
|
|
$19 = 1.0008676052093506 + $18;
|
|
$20 = $1 * $19;
|
|
$21 = 1.9105930344931873E-31 + $20;
|
|
STACKTOP = sp;return (+$21);
|
|
}
|
|
function _nk_draw_list_setup($canvas,$global_alpha,$line_AA,$shape_AA,$null,$cmds,$vertices,$elements) {
|
|
$canvas = $canvas|0;
|
|
$global_alpha = +$global_alpha;
|
|
$line_AA = $line_AA|0;
|
|
$shape_AA = $shape_AA|0;
|
|
$null = $null|0;
|
|
$cmds = $cmds|0;
|
|
$vertices = $vertices|0;
|
|
$elements = $elements|0;
|
|
var $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0;
|
|
var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $canvas;
|
|
$1 = $global_alpha;
|
|
$2 = $line_AA;
|
|
$3 = $shape_AA;
|
|
$4 = $cmds;
|
|
$5 = $vertices;
|
|
$6 = $elements;
|
|
$7 = $0;
|
|
$8 = ((($7)) + 12|0);
|
|
;HEAP32[$8>>2]=HEAP32[$null>>2]|0;HEAP32[$8+4>>2]=HEAP32[$null+4>>2]|0;HEAP32[$8+8>>2]=HEAP32[$null+8>>2]|0;
|
|
$9 = $0;
|
|
$10 = ((($9)) + 24|0);
|
|
;HEAP32[$10>>2]=HEAP32[8>>2]|0;HEAP32[$10+4>>2]=HEAP32[8+4>>2]|0;HEAP32[$10+8>>2]=HEAP32[8+8>>2]|0;HEAP32[$10+12>>2]=HEAP32[8+12>>2]|0;
|
|
$11 = $5;
|
|
$12 = $0;
|
|
$13 = ((($12)) + 44|0);
|
|
HEAP32[$13>>2] = $11;
|
|
$14 = $6;
|
|
$15 = $0;
|
|
$16 = ((($15)) + 48|0);
|
|
HEAP32[$16>>2] = $14;
|
|
$17 = $4;
|
|
$18 = $0;
|
|
$19 = ((($18)) + 40|0);
|
|
HEAP32[$19>>2] = $17;
|
|
$20 = $2;
|
|
$21 = $0;
|
|
$22 = ((($21)) + 8|0);
|
|
HEAP32[$22>>2] = $20;
|
|
$23 = $3;
|
|
$24 = $0;
|
|
$25 = ((($24)) + 4|0);
|
|
HEAP32[$25>>2] = $23;
|
|
$26 = $1;
|
|
$27 = $0;
|
|
HEAPF32[$27>>2] = $26;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk__draw_list_begin($canvas,$buffer) {
|
|
$canvas = $canvas|0;
|
|
$buffer = $buffer|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cmd = 0, $memory = 0, $offset = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $canvas;
|
|
$2 = $buffer;
|
|
$3 = $2;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((13445|0),(13400|0),5479,(14254|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $2;
|
|
$6 = ($5|0)!=(0|0);
|
|
if ($6) {
|
|
$7 = $2;
|
|
$8 = ((($7)) + 56|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ($9|0)!=(0);
|
|
if ($10) {
|
|
$11 = $1;
|
|
$12 = ((($11)) + 64|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ($13|0)!=(0);
|
|
if ($14) {
|
|
$15 = $2;
|
|
$16 = ((($15)) + 32|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$memory = $17;
|
|
$18 = $2;
|
|
$19 = ((($18)) + 32|0);
|
|
$20 = ((($19)) + 4|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = $1;
|
|
$23 = ((($22)) + 60|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = (($21) - ($24))|0;
|
|
$offset = $25;
|
|
$26 = $memory;
|
|
$27 = $offset;
|
|
$28 = (($26) + ($27)|0);
|
|
$cmd = $28;
|
|
$29 = $cmd;
|
|
$0 = $29;
|
|
$30 = $0;
|
|
STACKTOP = sp;return ($30|0);
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$30 = $0;
|
|
STACKTOP = sp;return ($30|0);
|
|
}
|
|
function _nk__draw_list_next($cmd,$buffer,$canvas) {
|
|
$cmd = $cmd|0;
|
|
$buffer = $buffer|0;
|
|
$canvas = $canvas|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, $end = 0, $memory = 0, $offset = 0, $or$cond = 0, $or$cond3 = 0, $size = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $cmd;
|
|
$2 = $buffer;
|
|
$3 = $canvas;
|
|
$4 = $2;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((13445|0),(13400|0),5498,(14274|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $3;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((14293|0),(13400|0),5499,(14274|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
$10 = $2;
|
|
$11 = ($10|0)!=(0|0);
|
|
$or$cond = $9 & $11;
|
|
$12 = $3;
|
|
$13 = ($12|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $13;
|
|
if (!($or$cond3)) {
|
|
$0 = 0;
|
|
$41 = $0;
|
|
STACKTOP = sp;return ($41|0);
|
|
}
|
|
$14 = $2;
|
|
$15 = ((($14)) + 32|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$memory = $16;
|
|
$17 = $2;
|
|
$18 = ((($17)) + 32|0);
|
|
$19 = ((($18)) + 4|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$size = $20;
|
|
$21 = $size;
|
|
$22 = $3;
|
|
$23 = ((($22)) + 60|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = (($21) - ($24))|0;
|
|
$offset = $25;
|
|
$26 = $memory;
|
|
$27 = $offset;
|
|
$28 = (($26) + ($27)|0);
|
|
$end = $28;
|
|
$29 = $3;
|
|
$30 = ((($29)) + 64|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = (($31) - 1)|0;
|
|
$33 = $end;
|
|
$34 = (0 - ($32))|0;
|
|
$35 = (($33) + (($34*24)|0)|0);
|
|
$end = $35;
|
|
$36 = $1;
|
|
$37 = $end;
|
|
$38 = ($36>>>0)<=($37>>>0);
|
|
if ($38) {
|
|
$0 = 0;
|
|
$41 = $0;
|
|
STACKTOP = sp;return ($41|0);
|
|
} else {
|
|
$39 = $1;
|
|
$40 = ((($39)) + -24|0);
|
|
$0 = $40;
|
|
$41 = $0;
|
|
STACKTOP = sp;return ($41|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_draw_list_clear($list) {
|
|
$list = $list|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $list;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((14300|0),(13400|0),5516,(14305|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$6 = ((($5)) + 40|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = ($7|0)!=(0|0);
|
|
if ($8) {
|
|
$9 = $0;
|
|
$10 = ((($9)) + 40|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
_nk_buffer_clear($11);
|
|
}
|
|
$12 = $0;
|
|
$13 = ((($12)) + 48|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = ($14|0)!=(0|0);
|
|
if ($15) {
|
|
$16 = $0;
|
|
$17 = ((($16)) + 44|0);
|
|
$18 = HEAP32[$17>>2]|0;
|
|
_nk_buffer_clear($18);
|
|
}
|
|
$19 = $0;
|
|
$20 = ((($19)) + 44|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = ($21|0)!=(0|0);
|
|
if ($22) {
|
|
$23 = $0;
|
|
$24 = ((($23)) + 48|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
_nk_buffer_clear($25);
|
|
}
|
|
$26 = $0;
|
|
$27 = ((($26)) + 52|0);
|
|
HEAP32[$27>>2] = 0;
|
|
$28 = $0;
|
|
$29 = ((($28)) + 56|0);
|
|
HEAP32[$29>>2] = 0;
|
|
$30 = $0;
|
|
$31 = ((($30)) + 60|0);
|
|
HEAP32[$31>>2] = 0;
|
|
$32 = $0;
|
|
$33 = ((($32)) + 64|0);
|
|
HEAP32[$33>>2] = 0;
|
|
$34 = $0;
|
|
$35 = ((($34)) + 68|0);
|
|
HEAP32[$35>>2] = 0;
|
|
$36 = $0;
|
|
$37 = ((($36)) + 44|0);
|
|
HEAP32[$37>>2] = 0;
|
|
$38 = $0;
|
|
$39 = ((($38)) + 48|0);
|
|
HEAP32[$39>>2] = 0;
|
|
$40 = $0;
|
|
$41 = ((($40)) + 24|0);
|
|
;HEAP32[$41>>2]=HEAP32[8>>2]|0;HEAP32[$41+4>>2]=HEAP32[8+4>>2]|0;HEAP32[$41+8>>2]=HEAP32[8+8>>2]|0;HEAP32[$41+12>>2]=HEAP32[8+12>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_stroke_poly_line($list,$points,$points_count,$color,$closed,$thickness,$aliasing) {
|
|
$list = $list|0;
|
|
$points = $points|0;
|
|
$points_count = $points_count|0;
|
|
$color = $color|0;
|
|
$closed = $closed|0;
|
|
$thickness = +$thickness;
|
|
$aliasing = $aliasing|0;
|
|
var $$byval_copy = 0, $$byval_copy10 = 0, $$byval_copy12 = 0, $$byval_copy13 = 0, $$byval_copy15 = 0, $$byval_copy17 = 0, $$byval_copy19 = 0, $$byval_copy20 = 0, $$byval_copy22 = 0, $$byval_copy24 = 0, $$byval_copy8 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0;
|
|
var $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0;
|
|
var $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0;
|
|
var $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0;
|
|
var $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0;
|
|
var $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0, $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0;
|
|
var $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0, $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0.0, $1109 = 0.0, $111 = 0, $1110 = 0.0, $1111 = 0, $1112 = 0.0;
|
|
var $1113 = 0, $1114 = 0.0, $1115 = 0.0, $1116 = 0.0, $1117 = 0.0, $1118 = 0.0, $1119 = 0, $112 = 0, $1120 = 0.0, $1121 = 0, $1122 = 0.0, $1123 = 0.0, $1124 = 0.0, $1125 = 0.0, $1126 = 0, $1127 = 0.0, $1128 = 0.0, $1129 = 0.0, $113 = 0, $1130 = 0.0;
|
|
var $1131 = 0.0, $1132 = 0, $1133 = 0.0, $1134 = 0.0, $1135 = 0.0, $1136 = 0.0, $1137 = 0.0, $1138 = 0.0, $1139 = 0.0, $114 = 0, $1140 = 0, $1141 = 0.0, $1142 = 0.0, $1143 = 0.0, $1144 = 0.0, $1145 = 0, $1146 = 0.0, $1147 = 0.0, $1148 = 0.0, $1149 = 0;
|
|
var $115 = 0, $1150 = 0.0, $1151 = 0.0, $1152 = 0.0, $1153 = 0, $1154 = 0, $1155 = 0, $1156 = 0.0, $1157 = 0.0, $1158 = 0.0, $1159 = 0, $116 = 0, $1160 = 0.0, $1161 = 0.0, $1162 = 0.0, $1163 = 0, $1164 = 0, $1165 = 0, $1166 = 0.0, $1167 = 0.0;
|
|
var $1168 = 0.0, $1169 = 0, $117 = 0, $1170 = 0.0, $1171 = 0.0, $1172 = 0.0, $1173 = 0, $1174 = 0, $1175 = 0, $1176 = 0.0, $1177 = 0.0, $1178 = 0.0, $1179 = 0, $118 = 0, $1180 = 0.0, $1181 = 0.0, $1182 = 0.0, $1183 = 0, $1184 = 0, $1185 = 0;
|
|
var $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0, $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0, $1194 = 0, $1195 = 0, $1196 = 0, $1197 = 0, $1198 = 0, $1199 = 0, $12 = 0, $120 = 0, $1200 = 0, $1201 = 0, $1202 = 0;
|
|
var $1203 = 0, $1204 = 0, $1205 = 0, $1206 = 0, $1207 = 0, $1208 = 0, $1209 = 0, $121 = 0, $1210 = 0, $1211 = 0, $1212 = 0, $1213 = 0, $1214 = 0, $1215 = 0, $1216 = 0, $1217 = 0, $1218 = 0, $1219 = 0, $122 = 0, $1220 = 0;
|
|
var $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0;
|
|
var $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0;
|
|
var $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0.0, $165 = 0, $166 = 0, $167 = 0, $168 = 0.0, $169 = 0.0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0.0, $175 = 0, $176 = 0, $177 = 0;
|
|
var $178 = 0, $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0.0, $182 = 0.0, $183 = 0.0, $184 = 0, $185 = 0.0, $186 = 0, $187 = 0.0, $188 = 0.0, $189 = 0.0, $19 = 0, $190 = 0.0, $191 = 0, $192 = 0.0, $193 = 0.0, $194 = 0.0, $195 = 0.0;
|
|
var $196 = 0.0, $197 = 0, $198 = 0.0, $199 = 0.0, $2 = 0, $20 = 0, $200 = 0.0, $201 = 0, $202 = 0.0, $203 = 0, $204 = 0, $205 = 0, $206 = 0.0, $207 = 0.0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0;
|
|
var $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0.0;
|
|
var $231 = 0, $232 = 0.0, $233 = 0.0, $234 = 0, $235 = 0, $236 = 0.0, $237 = 0.0, $238 = 0.0, $239 = 0.0, $24 = 0, $240 = 0, $241 = 0, $242 = 0.0, $243 = 0, $244 = 0.0, $245 = 0.0, $246 = 0, $247 = 0, $248 = 0.0, $249 = 0.0;
|
|
var $25 = 0, $250 = 0, $251 = 0.0, $252 = 0.0, $253 = 0, $254 = 0, $255 = 0, $256 = 0.0, $257 = 0, $258 = 0.0, $259 = 0.0, $26 = 0, $260 = 0, $261 = 0, $262 = 0.0, $263 = 0.0, $264 = 0.0, $265 = 0.0, $266 = 0, $267 = 0;
|
|
var $268 = 0.0, $269 = 0, $27 = 0, $270 = 0.0, $271 = 0.0, $272 = 0, $273 = 0, $274 = 0.0, $275 = 0.0, $276 = 0, $277 = 0.0, $278 = 0.0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0.0, $284 = 0.0, $285 = 0;
|
|
var $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0.0, $291 = 0.0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0.0;
|
|
var $303 = 0.0, $304 = 0.0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0.0, $311 = 0, $312 = 0.0, $313 = 0.0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0;
|
|
var $321 = 0, $322 = 0, $323 = 0, $324 = 0.0, $325 = 0.0, $326 = 0.0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0.0, $333 = 0, $334 = 0.0, $335 = 0.0, $336 = 0, $337 = 0, $338 = 0, $339 = 0;
|
|
var $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0;
|
|
var $358 = 0.0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0.0, $363 = 0.0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0.0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0.0, $374 = 0.0, $375 = 0.0;
|
|
var $376 = 0.0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0.0, $381 = 0, $382 = 0, $383 = 0, $384 = 0.0, $385 = 0.0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0.0, $391 = 0, $392 = 0, $393 = 0;
|
|
var $394 = 0, $395 = 0.0, $396 = 0.0, $397 = 0, $398 = 0.0, $399 = 0.0, $4 = 0.0, $40 = 0, $400 = 0.0, $401 = 0.0, $402 = 0.0, $403 = 0, $404 = 0.0, $405 = 0, $406 = 0.0, $407 = 0.0, $408 = 0.0, $409 = 0.0, $41 = 0, $410 = 0;
|
|
var $411 = 0.0, $412 = 0.0, $413 = 0.0, $414 = 0, $415 = 0.0, $416 = 0.0, $417 = 0.0, $418 = 0.0, $419 = 0.0, $42 = 0, $420 = 0, $421 = 0.0, $422 = 0.0, $423 = 0.0, $424 = 0.0, $425 = 0.0, $426 = 0, $427 = 0.0, $428 = 0.0, $429 = 0;
|
|
var $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0.0, $438 = 0.0, $439 = 0.0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0.0, $445 = 0, $446 = 0.0, $447 = 0.0;
|
|
var $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0.0, $457 = 0.0, $458 = 0.0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0.0, $464 = 0, $465 = 0.0;
|
|
var $466 = 0.0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0;
|
|
var $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0;
|
|
var $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0;
|
|
var $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0;
|
|
var $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0;
|
|
var $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0.0, $563 = 0.0, $564 = 0.0, $565 = 0, $566 = 0, $567 = 0, $568 = 0.0, $569 = 0.0, $57 = 0, $570 = 0.0, $571 = 0.0, $572 = 0, $573 = 0;
|
|
var $574 = 0.0, $575 = 0.0, $576 = 0.0, $577 = 0.0, $578 = 0, $579 = 0.0, $58 = 0, $580 = 0.0, $581 = 0.0, $582 = 0, $583 = 0, $584 = 0.0, $585 = 0.0, $586 = 0.0, $587 = 0, $588 = 0, $589 = 0.0, $59 = 0, $590 = 0.0, $591 = 0.0;
|
|
var $592 = 0, $593 = 0, $594 = 0.0, $595 = 0, $596 = 0.0, $597 = 0.0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0.0, $602 = 0.0, $603 = 0.0, $604 = 0, $605 = 0, $606 = 0.0, $607 = 0, $608 = 0.0, $609 = 0.0;
|
|
var $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0.0, $614 = 0.0, $615 = 0.0, $616 = 0, $617 = 0, $618 = 0.0, $619 = 0, $62 = 0, $620 = 0.0, $621 = 0.0, $622 = 0, $623 = 0, $624 = 0, $625 = 0.0, $626 = 0.0, $627 = 0.0;
|
|
var $628 = 0, $629 = 0, $63 = 0, $630 = 0.0, $631 = 0, $632 = 0.0, $633 = 0.0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0.0, $639 = 0.0, $64 = 0, $640 = 0.0, $641 = 0.0, $642 = 0, $643 = 0, $644 = 0, $645 = 0;
|
|
var $646 = 0, $647 = 0.0, $648 = 0.0, $649 = 0.0, $65 = 0, $650 = 0.0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0.0, $656 = 0.0, $657 = 0.0, $658 = 0, $659 = 0, $66 = 0.0, $660 = 0, $661 = 0, $662 = 0, $663 = 0.0;
|
|
var $664 = 0.0, $665 = 0.0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0.0, $677 = 0.0, $678 = 0.0, $679 = 0, $68 = 0.0, $680 = 0, $681 = 0;
|
|
var $682 = 0, $683 = 0, $684 = 0.0, $685 = 0, $686 = 0.0, $687 = 0.0, $688 = 0, $689 = 0, $69 = 0.0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0.0, $699 = 0.0, $7 = 0;
|
|
var $70 = 0, $700 = 0.0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0.0, $707 = 0, $708 = 0.0, $709 = 0.0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0;
|
|
var $718 = 0, $719 = 0, $72 = 0, $720 = 0.0, $721 = 0.0, $722 = 0.0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0.0, $729 = 0, $73 = 0, $730 = 0.0, $731 = 0.0, $732 = 0, $733 = 0, $734 = 0, $735 = 0;
|
|
var $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0.0, $743 = 0.0, $744 = 0.0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0.0, $751 = 0, $752 = 0.0, $753 = 0.0;
|
|
var $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0;
|
|
var $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0.0, $777 = 0, $778 = 0, $779 = 0, $78 = 0.0, $780 = 0.0, $781 = 0.0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0.0, $787 = 0, $788 = 0, $789 = 0, $79 = 0;
|
|
var $790 = 0, $791 = 0.0, $792 = 0.0, $793 = 0.0, $794 = 0.0, $795 = 0, $796 = 0, $797 = 0, $798 = 0.0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0.0, $803 = 0.0, $804 = 0, $805 = 0, $806 = 0, $807 = 0;
|
|
var $808 = 0.0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0.0, $814 = 0.0, $815 = 0, $816 = 0.0, $817 = 0.0, $818 = 0.0, $819 = 0.0, $82 = 0, $820 = 0.0, $821 = 0, $822 = 0.0, $823 = 0, $824 = 0.0, $825 = 0.0;
|
|
var $826 = 0.0, $827 = 0.0, $828 = 0, $829 = 0.0, $83 = 0, $830 = 0.0, $831 = 0.0, $832 = 0, $833 = 0.0, $834 = 0.0, $835 = 0.0, $836 = 0.0, $837 = 0.0, $838 = 0, $839 = 0.0, $84 = 0, $840 = 0.0, $841 = 0.0, $842 = 0.0, $843 = 0.0;
|
|
var $844 = 0.0, $845 = 0.0, $846 = 0, $847 = 0.0, $848 = 0.0, $849 = 0.0, $85 = 0, $850 = 0.0, $851 = 0.0, $852 = 0.0, $853 = 0.0, $854 = 0, $855 = 0.0, $856 = 0.0, $857 = 0.0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0;
|
|
var $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0.0, $867 = 0.0, $868 = 0.0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0.0, $874 = 0, $875 = 0.0, $876 = 0.0, $877 = 0, $878 = 0, $879 = 0, $88 = 0;
|
|
var $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0.0, $886 = 0.0, $887 = 0.0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0.0, $893 = 0, $894 = 0.0, $895 = 0.0, $896 = 0, $897 = 0, $898 = 0;
|
|
var $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0.0, $905 = 0.0, $906 = 0.0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0.0, $912 = 0, $913 = 0.0, $914 = 0.0, $915 = 0;
|
|
var $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0.0, $924 = 0.0, $925 = 0.0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0.0, $931 = 0, $932 = 0.0, $933 = 0.0;
|
|
var $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0;
|
|
var $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0;
|
|
var $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0;
|
|
var $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $AA_SIZE = 0.0, $col = 0, $col_trans = 0, $color$byval_copy = 0, $count = 0, $d = 0, $d1 = 0, $d2 = 0;
|
|
var $diff = 0, $diff17 = 0, $dm = 0, $dm6 = 0, $dm_in = 0, $dm_out = 0, $dmr2 = 0.0, $dmr27 = 0.0, $dx = 0.0, $dy = 0.0, $half_inner_thickness = 0.0, $i = 0, $i1 = 0, $i110 = 0, $i2 = 0, $i21 = 0, $i216 = 0, $i24 = 0, $i3 = 0, $ids = 0;
|
|
var $ids14 = 0, $idx = 0, $idx1 = 0, $idx12 = 0, $idx2 = 0, $idx25 = 0, $idx_count = 0, $idx_count11 = 0, $index = 0, $len = 0.0, $len18 = 0.0, $normals = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $p1 = 0, $p2 = 0, $scale = 0.0, $scale8 = 0.0;
|
|
var $size = 0, $temp = 0, $thick_line = 0, $uv = 0, $uv$byval_copy = 0, $uv$byval_copy11 = 0, $uv$byval_copy9 = 0, $uv15 = 0, $uv15$byval_copy = 0, $uv15$byval_copy21 = 0, $uv15$byval_copy23 = 0, $uv15$byval_copy25 = 0, $uv9 = 0, $uv9$byval_copy = 0, $uv9$byval_copy14 = 0, $uv9$byval_copy16 = 0, $uv9$byval_copy18 = 0, $vertex_offset = 0, $vtx = 0, $vtx13 = 0;
|
|
var $vtx_count = 0, $vtx_count12 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 1072|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$uv15$byval_copy25 = sp + 1048|0;
|
|
$$byval_copy24 = sp + 1040|0;
|
|
$uv15$byval_copy23 = sp + 1032|0;
|
|
$$byval_copy22 = sp + 1024|0;
|
|
$uv15$byval_copy21 = sp + 1016|0;
|
|
$$byval_copy20 = sp + 1008|0;
|
|
$uv15$byval_copy = sp + 1000|0;
|
|
$$byval_copy19 = sp + 992|0;
|
|
$uv9$byval_copy18 = sp + 984|0;
|
|
$$byval_copy17 = sp + 976|0;
|
|
$uv9$byval_copy16 = sp + 968|0;
|
|
$$byval_copy15 = sp + 960|0;
|
|
$uv9$byval_copy14 = sp + 952|0;
|
|
$$byval_copy13 = sp + 944|0;
|
|
$uv9$byval_copy = sp + 936|0;
|
|
$$byval_copy12 = sp + 928|0;
|
|
$uv$byval_copy11 = sp + 920|0;
|
|
$$byval_copy10 = sp + 912|0;
|
|
$uv$byval_copy9 = sp + 904|0;
|
|
$$byval_copy8 = sp + 896|0;
|
|
$uv$byval_copy = sp + 888|0;
|
|
$$byval_copy = sp + 880|0;
|
|
$color$byval_copy = sp + 1056|0;
|
|
$diff = sp + 784|0;
|
|
$6 = sp + 768|0;
|
|
$d = sp + 752|0;
|
|
$7 = sp + 744|0;
|
|
$8 = sp + 736|0;
|
|
$9 = sp + 728|0;
|
|
$10 = sp + 720|0;
|
|
$11 = sp + 712|0;
|
|
$12 = sp + 704|0;
|
|
$13 = sp + 696|0;
|
|
$14 = sp + 688|0;
|
|
$15 = sp + 680|0;
|
|
$dm = sp + 672|0;
|
|
$16 = sp + 648|0;
|
|
$17 = sp + 640|0;
|
|
$18 = sp + 632|0;
|
|
$19 = sp + 616|0;
|
|
$20 = sp + 608|0;
|
|
$21 = sp + 600|0;
|
|
$22 = sp + 592|0;
|
|
$uv = sp + 584|0;
|
|
$23 = sp + 564|0;
|
|
$24 = sp + 544|0;
|
|
$25 = sp + 524|0;
|
|
$d1 = sp + 504|0;
|
|
$d2 = sp + 496|0;
|
|
$26 = sp + 488|0;
|
|
$27 = sp + 480|0;
|
|
$28 = sp + 472|0;
|
|
$29 = sp + 464|0;
|
|
$30 = sp + 456|0;
|
|
$31 = sp + 448|0;
|
|
$32 = sp + 440|0;
|
|
$33 = sp + 432|0;
|
|
$34 = sp + 424|0;
|
|
$35 = sp + 416|0;
|
|
$dm_out = sp + 408|0;
|
|
$dm_in = sp + 400|0;
|
|
$dm6 = sp + 384|0;
|
|
$36 = sp + 376|0;
|
|
$37 = sp + 368|0;
|
|
$38 = sp + 352|0;
|
|
$39 = sp + 344|0;
|
|
$40 = sp + 336|0;
|
|
$41 = sp + 328|0;
|
|
$42 = sp + 320|0;
|
|
$43 = sp + 312|0;
|
|
$44 = sp + 304|0;
|
|
$uv9 = sp + 296|0;
|
|
$45 = sp + 276|0;
|
|
$46 = sp + 256|0;
|
|
$47 = sp + 236|0;
|
|
$48 = sp + 216|0;
|
|
$uv15 = sp + 176|0;
|
|
$p1 = sp + 160|0;
|
|
$p2 = sp + 152|0;
|
|
$diff17 = sp + 144|0;
|
|
$49 = sp + 128|0;
|
|
$50 = sp + 120|0;
|
|
$51 = sp + 96|0;
|
|
$52 = sp + 88|0;
|
|
$53 = sp + 64|0;
|
|
$54 = sp + 56|0;
|
|
$55 = sp + 32|0;
|
|
$56 = sp + 24|0;
|
|
$57 = sp;
|
|
$0 = $list;
|
|
$1 = $points;
|
|
$2 = $points_count;
|
|
$3 = $closed;
|
|
$4 = $thickness;
|
|
$5 = $aliasing;
|
|
$58 = $0;
|
|
$59 = ($58|0)!=(0|0);
|
|
if (!($59)) {
|
|
___assert_fail((14300|0),(13400|0),5717,(14324|0));
|
|
// unreachable;
|
|
}
|
|
$60 = $0;
|
|
$61 = ($60|0)==(0|0);
|
|
$62 = $2;
|
|
$63 = ($62>>>0)<(2);
|
|
$or$cond = $61 | $63;
|
|
if ($or$cond) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$64 = ((($color)) + 3|0);
|
|
$65 = HEAP8[$64>>0]|0;
|
|
$66 = (+($65&255));
|
|
$67 = $0;
|
|
$68 = +HEAPF32[$67>>2];
|
|
$69 = $66 * $68;
|
|
$70 = (~~(($69))&255);
|
|
$71 = ((($color)) + 3|0);
|
|
HEAP8[$71>>0] = $70;
|
|
;HEAP8[$color$byval_copy>>0]=HEAP8[$color>>0]|0;HEAP8[$color$byval_copy+1>>0]=HEAP8[$color+1>>0]|0;HEAP8[$color$byval_copy+2>>0]=HEAP8[$color+2>>0]|0;HEAP8[$color$byval_copy+3>>0]=HEAP8[$color+3>>0]|0;
|
|
$72 = (_nk_color_u32($color$byval_copy)|0);
|
|
$col = $72;
|
|
$73 = $2;
|
|
$count = $73;
|
|
$74 = $3;
|
|
$75 = ($74|0)!=(0);
|
|
if (!($75)) {
|
|
$76 = $2;
|
|
$77 = (($76) - 1)|0;
|
|
$count = $77;
|
|
}
|
|
$78 = $4;
|
|
$79 = $78 > 1.0;
|
|
$80 = $79&1;
|
|
$thick_line = $80;
|
|
$81 = $5;
|
|
$82 = ($81|0)==(1);
|
|
if (!($82)) {
|
|
$i110 = 0;
|
|
$1072 = $0;
|
|
$1073 = ((($1072)) + 56|0);
|
|
$1074 = HEAP32[$1073>>2]|0;
|
|
$idx = $1074;
|
|
$1075 = $count;
|
|
$1076 = ($1075*6)|0;
|
|
$idx_count11 = $1076;
|
|
$1077 = $count;
|
|
$1078 = $1077<<2;
|
|
$vtx_count12 = $1078;
|
|
$1079 = $0;
|
|
$1080 = $vtx_count12;
|
|
$1081 = (_nk_draw_list_alloc_vertices($1079,$1080)|0);
|
|
$vtx13 = $1081;
|
|
$1082 = $0;
|
|
$1083 = $idx_count11;
|
|
$1084 = (_nk_draw_list_alloc_elements($1082,$1083)|0);
|
|
$ids14 = $1084;
|
|
$1085 = $vtx13;
|
|
$1086 = ($1085|0)!=(0|0);
|
|
$1087 = $ids14;
|
|
$1088 = ($1087|0)!=(0|0);
|
|
$or$cond7 = $1086 & $1088;
|
|
if (!($or$cond7)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$i110 = 0;
|
|
while(1) {
|
|
$1089 = $i110;
|
|
$1090 = $count;
|
|
$1091 = ($1089>>>0)<($1090>>>0);
|
|
if (!($1091)) {
|
|
break;
|
|
}
|
|
$1092 = $0;
|
|
$1093 = ((($1092)) + 12|0);
|
|
$1094 = ((($1093)) + 4|0);
|
|
;HEAP32[$uv15>>2]=HEAP32[$1094>>2]|0;HEAP32[$uv15+4>>2]=HEAP32[$1094+4>>2]|0;
|
|
$1095 = $i110;
|
|
$1096 = (($1095) + 1)|0;
|
|
$1097 = $2;
|
|
$1098 = ($1096|0)==($1097|0);
|
|
$1099 = $i110;
|
|
$1100 = (($1099) + 1)|0;
|
|
$1101 = $1098 ? 0 : $1100;
|
|
$i216 = $1101;
|
|
$1102 = $i110;
|
|
$1103 = $1;
|
|
$1104 = (($1103) + ($1102<<3)|0);
|
|
;HEAP32[$p1>>2]=HEAP32[$1104>>2]|0;HEAP32[$p1+4>>2]=HEAP32[$1104+4>>2]|0;
|
|
$1105 = $i216;
|
|
$1106 = $1;
|
|
$1107 = (($1106) + ($1105<<3)|0);
|
|
;HEAP32[$p2>>2]=HEAP32[$1107>>2]|0;HEAP32[$p2+4>>2]=HEAP32[$1107+4>>2]|0;
|
|
$1108 = +HEAPF32[$p2>>2];
|
|
$1109 = +HEAPF32[$p1>>2];
|
|
$1110 = $1108 - $1109;
|
|
$1111 = ((($p2)) + 4|0);
|
|
$1112 = +HEAPF32[$1111>>2];
|
|
$1113 = ((($p1)) + 4|0);
|
|
$1114 = +HEAPF32[$1113>>2];
|
|
$1115 = $1112 - $1114;
|
|
_nk_vec2($diff17,$1110,$1115);
|
|
$1116 = +HEAPF32[$diff17>>2];
|
|
$1117 = +HEAPF32[$diff17>>2];
|
|
$1118 = $1116 * $1117;
|
|
$1119 = ((($diff17)) + 4|0);
|
|
$1120 = +HEAPF32[$1119>>2];
|
|
$1121 = ((($diff17)) + 4|0);
|
|
$1122 = +HEAPF32[$1121>>2];
|
|
$1123 = $1120 * $1122;
|
|
$1124 = $1118 + $1123;
|
|
$len18 = $1124;
|
|
$1125 = $len18;
|
|
$1126 = $1125 != 0.0;
|
|
if ($1126) {
|
|
$1127 = $len18;
|
|
$1128 = (+_nk_inv_sqrt($1127));
|
|
$len18 = $1128;
|
|
} else {
|
|
$len18 = 1.0;
|
|
}
|
|
$1129 = +HEAPF32[$diff17>>2];
|
|
$1130 = $len18;
|
|
$1131 = $1129 * $1130;
|
|
$1132 = ((($diff17)) + 4|0);
|
|
$1133 = +HEAPF32[$1132>>2];
|
|
$1134 = $len18;
|
|
$1135 = $1133 * $1134;
|
|
_nk_vec2($49,$1131,$1135);
|
|
;HEAP32[$diff17>>2]=HEAP32[$49>>2]|0;HEAP32[$diff17+4>>2]=HEAP32[$49+4>>2]|0;
|
|
$1136 = +HEAPF32[$diff17>>2];
|
|
$1137 = $4;
|
|
$1138 = $1137 * 0.5;
|
|
$1139 = $1136 * $1138;
|
|
$dx = $1139;
|
|
$1140 = ((($diff17)) + 4|0);
|
|
$1141 = +HEAPF32[$1140>>2];
|
|
$1142 = $4;
|
|
$1143 = $1142 * 0.5;
|
|
$1144 = $1141 * $1143;
|
|
$dy = $1144;
|
|
$1145 = $vtx13;
|
|
$1146 = +HEAPF32[$p1>>2];
|
|
$1147 = $dy;
|
|
$1148 = $1146 + $1147;
|
|
$1149 = ((($p1)) + 4|0);
|
|
$1150 = +HEAPF32[$1149>>2];
|
|
$1151 = $dx;
|
|
$1152 = $1150 - $1151;
|
|
_nk_vec2($50,$1148,$1152);
|
|
$1153 = $col;
|
|
;HEAP32[$$byval_copy19>>2]=HEAP32[$50>>2]|0;HEAP32[$$byval_copy19+4>>2]=HEAP32[$50+4>>2]|0;
|
|
;HEAP32[$uv15$byval_copy>>2]=HEAP32[$uv15>>2]|0;HEAP32[$uv15$byval_copy+4>>2]=HEAP32[$uv15+4>>2]|0;
|
|
_nk_draw_vertex($51,$$byval_copy19,$uv15$byval_copy,$1153);
|
|
;HEAP32[$1145>>2]=HEAP32[$51>>2]|0;HEAP32[$1145+4>>2]=HEAP32[$51+4>>2]|0;HEAP32[$1145+8>>2]=HEAP32[$51+8>>2]|0;HEAP32[$1145+12>>2]=HEAP32[$51+12>>2]|0;HEAP32[$1145+16>>2]=HEAP32[$51+16>>2]|0;
|
|
$1154 = $vtx13;
|
|
$1155 = ((($1154)) + 20|0);
|
|
$1156 = +HEAPF32[$p2>>2];
|
|
$1157 = $dy;
|
|
$1158 = $1156 + $1157;
|
|
$1159 = ((($p2)) + 4|0);
|
|
$1160 = +HEAPF32[$1159>>2];
|
|
$1161 = $dx;
|
|
$1162 = $1160 - $1161;
|
|
_nk_vec2($52,$1158,$1162);
|
|
$1163 = $col;
|
|
;HEAP32[$$byval_copy20>>2]=HEAP32[$52>>2]|0;HEAP32[$$byval_copy20+4>>2]=HEAP32[$52+4>>2]|0;
|
|
;HEAP32[$uv15$byval_copy21>>2]=HEAP32[$uv15>>2]|0;HEAP32[$uv15$byval_copy21+4>>2]=HEAP32[$uv15+4>>2]|0;
|
|
_nk_draw_vertex($53,$$byval_copy20,$uv15$byval_copy21,$1163);
|
|
;HEAP32[$1155>>2]=HEAP32[$53>>2]|0;HEAP32[$1155+4>>2]=HEAP32[$53+4>>2]|0;HEAP32[$1155+8>>2]=HEAP32[$53+8>>2]|0;HEAP32[$1155+12>>2]=HEAP32[$53+12>>2]|0;HEAP32[$1155+16>>2]=HEAP32[$53+16>>2]|0;
|
|
$1164 = $vtx13;
|
|
$1165 = ((($1164)) + 40|0);
|
|
$1166 = +HEAPF32[$p2>>2];
|
|
$1167 = $dy;
|
|
$1168 = $1166 - $1167;
|
|
$1169 = ((($p2)) + 4|0);
|
|
$1170 = +HEAPF32[$1169>>2];
|
|
$1171 = $dx;
|
|
$1172 = $1170 + $1171;
|
|
_nk_vec2($54,$1168,$1172);
|
|
$1173 = $col;
|
|
;HEAP32[$$byval_copy22>>2]=HEAP32[$54>>2]|0;HEAP32[$$byval_copy22+4>>2]=HEAP32[$54+4>>2]|0;
|
|
;HEAP32[$uv15$byval_copy23>>2]=HEAP32[$uv15>>2]|0;HEAP32[$uv15$byval_copy23+4>>2]=HEAP32[$uv15+4>>2]|0;
|
|
_nk_draw_vertex($55,$$byval_copy22,$uv15$byval_copy23,$1173);
|
|
;HEAP32[$1165>>2]=HEAP32[$55>>2]|0;HEAP32[$1165+4>>2]=HEAP32[$55+4>>2]|0;HEAP32[$1165+8>>2]=HEAP32[$55+8>>2]|0;HEAP32[$1165+12>>2]=HEAP32[$55+12>>2]|0;HEAP32[$1165+16>>2]=HEAP32[$55+16>>2]|0;
|
|
$1174 = $vtx13;
|
|
$1175 = ((($1174)) + 60|0);
|
|
$1176 = +HEAPF32[$p1>>2];
|
|
$1177 = $dy;
|
|
$1178 = $1176 - $1177;
|
|
$1179 = ((($p1)) + 4|0);
|
|
$1180 = +HEAPF32[$1179>>2];
|
|
$1181 = $dx;
|
|
$1182 = $1180 + $1181;
|
|
_nk_vec2($56,$1178,$1182);
|
|
$1183 = $col;
|
|
;HEAP32[$$byval_copy24>>2]=HEAP32[$56>>2]|0;HEAP32[$$byval_copy24+4>>2]=HEAP32[$56+4>>2]|0;
|
|
;HEAP32[$uv15$byval_copy25>>2]=HEAP32[$uv15>>2]|0;HEAP32[$uv15$byval_copy25+4>>2]=HEAP32[$uv15+4>>2]|0;
|
|
_nk_draw_vertex($57,$$byval_copy24,$uv15$byval_copy25,$1183);
|
|
;HEAP32[$1175>>2]=HEAP32[$57>>2]|0;HEAP32[$1175+4>>2]=HEAP32[$57+4>>2]|0;HEAP32[$1175+8>>2]=HEAP32[$57+8>>2]|0;HEAP32[$1175+12>>2]=HEAP32[$57+12>>2]|0;HEAP32[$1175+16>>2]=HEAP32[$57+16>>2]|0;
|
|
$1184 = $vtx13;
|
|
$1185 = ((($1184)) + 80|0);
|
|
$vtx13 = $1185;
|
|
$1186 = $idx;
|
|
$1187 = (($1186) + 0)|0;
|
|
$1188 = $1187&65535;
|
|
$1189 = $ids14;
|
|
HEAP16[$1189>>1] = $1188;
|
|
$1190 = $idx;
|
|
$1191 = (($1190) + 1)|0;
|
|
$1192 = $1191&65535;
|
|
$1193 = $ids14;
|
|
$1194 = ((($1193)) + 2|0);
|
|
HEAP16[$1194>>1] = $1192;
|
|
$1195 = $idx;
|
|
$1196 = (($1195) + 2)|0;
|
|
$1197 = $1196&65535;
|
|
$1198 = $ids14;
|
|
$1199 = ((($1198)) + 4|0);
|
|
HEAP16[$1199>>1] = $1197;
|
|
$1200 = $idx;
|
|
$1201 = (($1200) + 0)|0;
|
|
$1202 = $1201&65535;
|
|
$1203 = $ids14;
|
|
$1204 = ((($1203)) + 6|0);
|
|
HEAP16[$1204>>1] = $1202;
|
|
$1205 = $idx;
|
|
$1206 = (($1205) + 2)|0;
|
|
$1207 = $1206&65535;
|
|
$1208 = $ids14;
|
|
$1209 = ((($1208)) + 8|0);
|
|
HEAP16[$1209>>1] = $1207;
|
|
$1210 = $idx;
|
|
$1211 = (($1210) + 3)|0;
|
|
$1212 = $1211&65535;
|
|
$1213 = $ids14;
|
|
$1214 = ((($1213)) + 10|0);
|
|
HEAP16[$1214>>1] = $1212;
|
|
$1215 = $ids14;
|
|
$1216 = ((($1215)) + 12|0);
|
|
$ids14 = $1216;
|
|
$1217 = $idx;
|
|
$1218 = (($1217) + 4)|0;
|
|
$idx = $1218;
|
|
$1219 = $i110;
|
|
$1220 = (($1219) + 1)|0;
|
|
$i110 = $1220;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
$AA_SIZE = 1.0;
|
|
$83 = $col;
|
|
$84 = $83 & 16777215;
|
|
$col_trans = $84;
|
|
$i1 = 0;
|
|
$85 = $0;
|
|
$86 = ((($85)) + 56|0);
|
|
$87 = HEAP32[$86>>2]|0;
|
|
$index = $87;
|
|
$88 = $thick_line;
|
|
$89 = ($88|0)!=(0);
|
|
$90 = $count;
|
|
$91 = ($90*18)|0;
|
|
$92 = ($90*12)|0;
|
|
$93 = $89 ? $91 : $92;
|
|
$idx_count = $93;
|
|
$94 = $thick_line;
|
|
$95 = ($94|0)!=(0);
|
|
$96 = $2;
|
|
$97 = $96<<2;
|
|
$98 = ($96*3)|0;
|
|
$99 = $95 ? $97 : $98;
|
|
$vtx_count = $99;
|
|
$100 = $0;
|
|
$101 = $vtx_count;
|
|
$102 = (_nk_draw_list_alloc_vertices($100,$101)|0);
|
|
$vtx = $102;
|
|
$103 = $0;
|
|
$104 = $idx_count;
|
|
$105 = (_nk_draw_list_alloc_elements($103,$104)|0);
|
|
$ids = $105;
|
|
$106 = $vtx;
|
|
$107 = ($106|0)!=(0|0);
|
|
$108 = $ids;
|
|
$109 = ($108|0)!=(0|0);
|
|
$or$cond3 = $107 & $109;
|
|
if (!($or$cond3)) {
|
|
___assert_fail((14354|0),(13400|0),5748,(14324|0));
|
|
// unreachable;
|
|
}
|
|
$110 = $vtx;
|
|
$111 = ($110|0)!=(0|0);
|
|
$112 = $ids;
|
|
$113 = ($112|0)!=(0|0);
|
|
$or$cond5 = $111 & $113;
|
|
if (!($or$cond5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$114 = $vtx;
|
|
$115 = $0;
|
|
$116 = ((($115)) + 44|0);
|
|
$117 = HEAP32[$116>>2]|0;
|
|
$118 = ((($117)) + 32|0);
|
|
$119 = HEAP32[$118>>2]|0;
|
|
$120 = $114;
|
|
$121 = $119;
|
|
$122 = (($120) - ($121))|0;
|
|
$vertex_offset = $122;
|
|
$123 = $0;
|
|
$124 = ((($123)) + 44|0);
|
|
$125 = HEAP32[$124>>2]|0;
|
|
_nk_buffer_mark($125,0);
|
|
$126 = $thick_line;
|
|
$127 = ($126|0)!=(0);
|
|
$128 = $127 ? 5 : 3;
|
|
$129 = $128<<3;
|
|
$130 = $2;
|
|
$131 = Math_imul($129, $130)|0;
|
|
$size = $131;
|
|
$132 = $0;
|
|
$133 = ((($132)) + 44|0);
|
|
$134 = HEAP32[$133>>2]|0;
|
|
$135 = $size;
|
|
$136 = (_nk_buffer_alloc($134,0,$135,4)|0);
|
|
$normals = $136;
|
|
$137 = $normals;
|
|
$138 = ($137|0)!=(0|0);
|
|
if (!($138)) {
|
|
___assert_fail((14365|0),(13400|0),5757,(14324|0));
|
|
// unreachable;
|
|
}
|
|
$139 = $normals;
|
|
$140 = ($139|0)!=(0|0);
|
|
if (!($140)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$141 = $0;
|
|
$142 = ((($141)) + 44|0);
|
|
$143 = HEAP32[$142>>2]|0;
|
|
$144 = ((($143)) + 32|0);
|
|
$145 = HEAP32[$144>>2]|0;
|
|
$146 = $vertex_offset;
|
|
$147 = (($145) + ($146)|0);
|
|
$vtx = $147;
|
|
$148 = $normals;
|
|
$149 = $2;
|
|
$150 = (($148) + ($149<<3)|0);
|
|
$temp = $150;
|
|
$i1 = 0;
|
|
while(1) {
|
|
$151 = $i1;
|
|
$152 = $count;
|
|
$153 = ($151>>>0)<($152>>>0);
|
|
if (!($153)) {
|
|
break;
|
|
}
|
|
$154 = $i1;
|
|
$155 = (($154) + 1)|0;
|
|
$156 = $2;
|
|
$157 = ($155|0)==($156|0);
|
|
$158 = $i1;
|
|
$159 = (($158) + 1)|0;
|
|
$160 = $157 ? 0 : $159;
|
|
$i2 = $160;
|
|
$161 = $i2;
|
|
$162 = $1;
|
|
$163 = (($162) + ($161<<3)|0);
|
|
$164 = +HEAPF32[$163>>2];
|
|
$165 = $i1;
|
|
$166 = $1;
|
|
$167 = (($166) + ($165<<3)|0);
|
|
$168 = +HEAPF32[$167>>2];
|
|
$169 = $164 - $168;
|
|
$170 = $i2;
|
|
$171 = $1;
|
|
$172 = (($171) + ($170<<3)|0);
|
|
$173 = ((($172)) + 4|0);
|
|
$174 = +HEAPF32[$173>>2];
|
|
$175 = $i1;
|
|
$176 = $1;
|
|
$177 = (($176) + ($175<<3)|0);
|
|
$178 = ((($177)) + 4|0);
|
|
$179 = +HEAPF32[$178>>2];
|
|
$180 = $174 - $179;
|
|
_nk_vec2($diff,$169,$180);
|
|
$181 = +HEAPF32[$diff>>2];
|
|
$182 = +HEAPF32[$diff>>2];
|
|
$183 = $181 * $182;
|
|
$184 = ((($diff)) + 4|0);
|
|
$185 = +HEAPF32[$184>>2];
|
|
$186 = ((($diff)) + 4|0);
|
|
$187 = +HEAPF32[$186>>2];
|
|
$188 = $185 * $187;
|
|
$189 = $183 + $188;
|
|
$len = $189;
|
|
$190 = $len;
|
|
$191 = $190 != 0.0;
|
|
if ($191) {
|
|
$192 = $len;
|
|
$193 = (+_nk_inv_sqrt($192));
|
|
$len = $193;
|
|
} else {
|
|
$len = 1.0;
|
|
}
|
|
$194 = +HEAPF32[$diff>>2];
|
|
$195 = $len;
|
|
$196 = $194 * $195;
|
|
$197 = ((($diff)) + 4|0);
|
|
$198 = +HEAPF32[$197>>2];
|
|
$199 = $len;
|
|
$200 = $198 * $199;
|
|
_nk_vec2($6,$196,$200);
|
|
;HEAP32[$diff>>2]=HEAP32[$6>>2]|0;HEAP32[$diff+4>>2]=HEAP32[$6+4>>2]|0;
|
|
$201 = ((($diff)) + 4|0);
|
|
$202 = +HEAPF32[$201>>2];
|
|
$203 = $i1;
|
|
$204 = $normals;
|
|
$205 = (($204) + ($203<<3)|0);
|
|
HEAPF32[$205>>2] = $202;
|
|
$206 = +HEAPF32[$diff>>2];
|
|
$207 = -$206;
|
|
$208 = $i1;
|
|
$209 = $normals;
|
|
$210 = (($209) + ($208<<3)|0);
|
|
$211 = ((($210)) + 4|0);
|
|
HEAPF32[$211>>2] = $207;
|
|
$212 = $i1;
|
|
$213 = (($212) + 1)|0;
|
|
$i1 = $213;
|
|
}
|
|
$214 = $3;
|
|
$215 = ($214|0)!=(0);
|
|
if (!($215)) {
|
|
$216 = $2;
|
|
$217 = (($216) - 1)|0;
|
|
$218 = $normals;
|
|
$219 = (($218) + ($217<<3)|0);
|
|
$220 = $2;
|
|
$221 = (($220) - 2)|0;
|
|
$222 = $normals;
|
|
$223 = (($222) + ($221<<3)|0);
|
|
;HEAP32[$219>>2]=HEAP32[$223>>2]|0;HEAP32[$219+4>>2]=HEAP32[$223+4>>2]|0;
|
|
}
|
|
$224 = $thick_line;
|
|
$225 = ($224|0)!=(0);
|
|
L47: do {
|
|
if ($225) {
|
|
$562 = $4;
|
|
$563 = $562 - 1.0;
|
|
$564 = $563 * 0.5;
|
|
$half_inner_thickness = $564;
|
|
$565 = $3;
|
|
$566 = ($565|0)!=(0);
|
|
if (!($566)) {
|
|
$567 = $normals;
|
|
$568 = +HEAPF32[$567>>2];
|
|
$569 = $half_inner_thickness;
|
|
$570 = $569 + 1.0;
|
|
$571 = $568 * $570;
|
|
$572 = $normals;
|
|
$573 = ((($572)) + 4|0);
|
|
$574 = +HEAPF32[$573>>2];
|
|
$575 = $half_inner_thickness;
|
|
$576 = $575 + 1.0;
|
|
$577 = $574 * $576;
|
|
_nk_vec2($d1,$571,$577);
|
|
$578 = $normals;
|
|
$579 = +HEAPF32[$578>>2];
|
|
$580 = $half_inner_thickness;
|
|
$581 = $579 * $580;
|
|
$582 = $normals;
|
|
$583 = ((($582)) + 4|0);
|
|
$584 = +HEAPF32[$583>>2];
|
|
$585 = $half_inner_thickness;
|
|
$586 = $584 * $585;
|
|
_nk_vec2($d2,$581,$586);
|
|
$587 = $temp;
|
|
$588 = $1;
|
|
$589 = +HEAPF32[$588>>2];
|
|
$590 = +HEAPF32[$d1>>2];
|
|
$591 = $589 + $590;
|
|
$592 = $1;
|
|
$593 = ((($592)) + 4|0);
|
|
$594 = +HEAPF32[$593>>2];
|
|
$595 = ((($d1)) + 4|0);
|
|
$596 = +HEAPF32[$595>>2];
|
|
$597 = $594 + $596;
|
|
_nk_vec2($26,$591,$597);
|
|
;HEAP32[$587>>2]=HEAP32[$26>>2]|0;HEAP32[$587+4>>2]=HEAP32[$26+4>>2]|0;
|
|
$598 = $temp;
|
|
$599 = ((($598)) + 8|0);
|
|
$600 = $1;
|
|
$601 = +HEAPF32[$600>>2];
|
|
$602 = +HEAPF32[$d2>>2];
|
|
$603 = $601 + $602;
|
|
$604 = $1;
|
|
$605 = ((($604)) + 4|0);
|
|
$606 = +HEAPF32[$605>>2];
|
|
$607 = ((($d2)) + 4|0);
|
|
$608 = +HEAPF32[$607>>2];
|
|
$609 = $606 + $608;
|
|
_nk_vec2($27,$603,$609);
|
|
;HEAP32[$599>>2]=HEAP32[$27>>2]|0;HEAP32[$599+4>>2]=HEAP32[$27+4>>2]|0;
|
|
$610 = $temp;
|
|
$611 = ((($610)) + 16|0);
|
|
$612 = $1;
|
|
$613 = +HEAPF32[$612>>2];
|
|
$614 = +HEAPF32[$d2>>2];
|
|
$615 = $613 - $614;
|
|
$616 = $1;
|
|
$617 = ((($616)) + 4|0);
|
|
$618 = +HEAPF32[$617>>2];
|
|
$619 = ((($d2)) + 4|0);
|
|
$620 = +HEAPF32[$619>>2];
|
|
$621 = $618 - $620;
|
|
_nk_vec2($28,$615,$621);
|
|
;HEAP32[$611>>2]=HEAP32[$28>>2]|0;HEAP32[$611+4>>2]=HEAP32[$28+4>>2]|0;
|
|
$622 = $temp;
|
|
$623 = ((($622)) + 24|0);
|
|
$624 = $1;
|
|
$625 = +HEAPF32[$624>>2];
|
|
$626 = +HEAPF32[$d1>>2];
|
|
$627 = $625 - $626;
|
|
$628 = $1;
|
|
$629 = ((($628)) + 4|0);
|
|
$630 = +HEAPF32[$629>>2];
|
|
$631 = ((($d1)) + 4|0);
|
|
$632 = +HEAPF32[$631>>2];
|
|
$633 = $630 - $632;
|
|
_nk_vec2($29,$627,$633);
|
|
;HEAP32[$623>>2]=HEAP32[$29>>2]|0;HEAP32[$623+4>>2]=HEAP32[$29+4>>2]|0;
|
|
$634 = $2;
|
|
$635 = (($634) - 1)|0;
|
|
$636 = $normals;
|
|
$637 = (($636) + ($635<<3)|0);
|
|
$638 = +HEAPF32[$637>>2];
|
|
$639 = $half_inner_thickness;
|
|
$640 = $639 + 1.0;
|
|
$641 = $638 * $640;
|
|
$642 = $2;
|
|
$643 = (($642) - 1)|0;
|
|
$644 = $normals;
|
|
$645 = (($644) + ($643<<3)|0);
|
|
$646 = ((($645)) + 4|0);
|
|
$647 = +HEAPF32[$646>>2];
|
|
$648 = $half_inner_thickness;
|
|
$649 = $648 + 1.0;
|
|
$650 = $647 * $649;
|
|
_nk_vec2($30,$641,$650);
|
|
;HEAP32[$d1>>2]=HEAP32[$30>>2]|0;HEAP32[$d1+4>>2]=HEAP32[$30+4>>2]|0;
|
|
$651 = $2;
|
|
$652 = (($651) - 1)|0;
|
|
$653 = $normals;
|
|
$654 = (($653) + ($652<<3)|0);
|
|
$655 = +HEAPF32[$654>>2];
|
|
$656 = $half_inner_thickness;
|
|
$657 = $655 * $656;
|
|
$658 = $2;
|
|
$659 = (($658) - 1)|0;
|
|
$660 = $normals;
|
|
$661 = (($660) + ($659<<3)|0);
|
|
$662 = ((($661)) + 4|0);
|
|
$663 = +HEAPF32[$662>>2];
|
|
$664 = $half_inner_thickness;
|
|
$665 = $663 * $664;
|
|
_nk_vec2($31,$657,$665);
|
|
;HEAP32[$d2>>2]=HEAP32[$31>>2]|0;HEAP32[$d2+4>>2]=HEAP32[$31+4>>2]|0;
|
|
$666 = $2;
|
|
$667 = (($666) - 1)|0;
|
|
$668 = $667<<2;
|
|
$669 = (($668) + 0)|0;
|
|
$670 = $temp;
|
|
$671 = (($670) + ($669<<3)|0);
|
|
$672 = $2;
|
|
$673 = (($672) - 1)|0;
|
|
$674 = $1;
|
|
$675 = (($674) + ($673<<3)|0);
|
|
$676 = +HEAPF32[$675>>2];
|
|
$677 = +HEAPF32[$d1>>2];
|
|
$678 = $676 + $677;
|
|
$679 = $2;
|
|
$680 = (($679) - 1)|0;
|
|
$681 = $1;
|
|
$682 = (($681) + ($680<<3)|0);
|
|
$683 = ((($682)) + 4|0);
|
|
$684 = +HEAPF32[$683>>2];
|
|
$685 = ((($d1)) + 4|0);
|
|
$686 = +HEAPF32[$685>>2];
|
|
$687 = $684 + $686;
|
|
_nk_vec2($32,$678,$687);
|
|
;HEAP32[$671>>2]=HEAP32[$32>>2]|0;HEAP32[$671+4>>2]=HEAP32[$32+4>>2]|0;
|
|
$688 = $2;
|
|
$689 = (($688) - 1)|0;
|
|
$690 = $689<<2;
|
|
$691 = (($690) + 1)|0;
|
|
$692 = $temp;
|
|
$693 = (($692) + ($691<<3)|0);
|
|
$694 = $2;
|
|
$695 = (($694) - 1)|0;
|
|
$696 = $1;
|
|
$697 = (($696) + ($695<<3)|0);
|
|
$698 = +HEAPF32[$697>>2];
|
|
$699 = +HEAPF32[$d2>>2];
|
|
$700 = $698 + $699;
|
|
$701 = $2;
|
|
$702 = (($701) - 1)|0;
|
|
$703 = $1;
|
|
$704 = (($703) + ($702<<3)|0);
|
|
$705 = ((($704)) + 4|0);
|
|
$706 = +HEAPF32[$705>>2];
|
|
$707 = ((($d2)) + 4|0);
|
|
$708 = +HEAPF32[$707>>2];
|
|
$709 = $706 + $708;
|
|
_nk_vec2($33,$700,$709);
|
|
;HEAP32[$693>>2]=HEAP32[$33>>2]|0;HEAP32[$693+4>>2]=HEAP32[$33+4>>2]|0;
|
|
$710 = $2;
|
|
$711 = (($710) - 1)|0;
|
|
$712 = $711<<2;
|
|
$713 = (($712) + 2)|0;
|
|
$714 = $temp;
|
|
$715 = (($714) + ($713<<3)|0);
|
|
$716 = $2;
|
|
$717 = (($716) - 1)|0;
|
|
$718 = $1;
|
|
$719 = (($718) + ($717<<3)|0);
|
|
$720 = +HEAPF32[$719>>2];
|
|
$721 = +HEAPF32[$d2>>2];
|
|
$722 = $720 - $721;
|
|
$723 = $2;
|
|
$724 = (($723) - 1)|0;
|
|
$725 = $1;
|
|
$726 = (($725) + ($724<<3)|0);
|
|
$727 = ((($726)) + 4|0);
|
|
$728 = +HEAPF32[$727>>2];
|
|
$729 = ((($d2)) + 4|0);
|
|
$730 = +HEAPF32[$729>>2];
|
|
$731 = $728 - $730;
|
|
_nk_vec2($34,$722,$731);
|
|
;HEAP32[$715>>2]=HEAP32[$34>>2]|0;HEAP32[$715+4>>2]=HEAP32[$34+4>>2]|0;
|
|
$732 = $2;
|
|
$733 = (($732) - 1)|0;
|
|
$734 = $733<<2;
|
|
$735 = (($734) + 3)|0;
|
|
$736 = $temp;
|
|
$737 = (($736) + ($735<<3)|0);
|
|
$738 = $2;
|
|
$739 = (($738) - 1)|0;
|
|
$740 = $1;
|
|
$741 = (($740) + ($739<<3)|0);
|
|
$742 = +HEAPF32[$741>>2];
|
|
$743 = +HEAPF32[$d1>>2];
|
|
$744 = $742 - $743;
|
|
$745 = $2;
|
|
$746 = (($745) - 1)|0;
|
|
$747 = $1;
|
|
$748 = (($747) + ($746<<3)|0);
|
|
$749 = ((($748)) + 4|0);
|
|
$750 = +HEAPF32[$749>>2];
|
|
$751 = ((($d1)) + 4|0);
|
|
$752 = +HEAPF32[$751>>2];
|
|
$753 = $750 - $752;
|
|
_nk_vec2($35,$744,$753);
|
|
;HEAP32[$737>>2]=HEAP32[$35>>2]|0;HEAP32[$737+4>>2]=HEAP32[$35+4>>2]|0;
|
|
}
|
|
$754 = $index;
|
|
$idx12 = $754;
|
|
$i1 = 0;
|
|
while(1) {
|
|
$755 = $i1;
|
|
$756 = $count;
|
|
$757 = ($755>>>0)<($756>>>0);
|
|
if (!($757)) {
|
|
break;
|
|
}
|
|
$758 = $i1;
|
|
$759 = (($758) + 1)|0;
|
|
$760 = $2;
|
|
$761 = ($759|0)==($760|0);
|
|
$762 = $i1;
|
|
$763 = (($762) + 1)|0;
|
|
$764 = $761 ? 0 : $763;
|
|
$i24 = $764;
|
|
$765 = $i1;
|
|
$766 = (($765) + 1)|0;
|
|
$767 = $2;
|
|
$768 = ($766|0)==($767|0);
|
|
$769 = $index;
|
|
$770 = $idx12;
|
|
$771 = (($770) + 4)|0;
|
|
$772 = $768 ? $769 : $771;
|
|
$idx25 = $772;
|
|
$773 = $i1;
|
|
$774 = $normals;
|
|
$775 = (($774) + ($773<<3)|0);
|
|
$776 = +HEAPF32[$775>>2];
|
|
$777 = $i24;
|
|
$778 = $normals;
|
|
$779 = (($778) + ($777<<3)|0);
|
|
$780 = +HEAPF32[$779>>2];
|
|
$781 = $776 + $780;
|
|
$782 = $i1;
|
|
$783 = $normals;
|
|
$784 = (($783) + ($782<<3)|0);
|
|
$785 = ((($784)) + 4|0);
|
|
$786 = +HEAPF32[$785>>2];
|
|
$787 = $i24;
|
|
$788 = $normals;
|
|
$789 = (($788) + ($787<<3)|0);
|
|
$790 = ((($789)) + 4|0);
|
|
$791 = +HEAPF32[$790>>2];
|
|
$792 = $786 + $791;
|
|
_nk_vec2($36,$781,$792);
|
|
$793 = +HEAPF32[$36>>2];
|
|
$794 = $793 * 0.5;
|
|
$795 = $i1;
|
|
$796 = $normals;
|
|
$797 = (($796) + ($795<<3)|0);
|
|
$798 = +HEAPF32[$797>>2];
|
|
$799 = $i24;
|
|
$800 = $normals;
|
|
$801 = (($800) + ($799<<3)|0);
|
|
$802 = +HEAPF32[$801>>2];
|
|
$803 = $798 + $802;
|
|
$804 = $i1;
|
|
$805 = $normals;
|
|
$806 = (($805) + ($804<<3)|0);
|
|
$807 = ((($806)) + 4|0);
|
|
$808 = +HEAPF32[$807>>2];
|
|
$809 = $i24;
|
|
$810 = $normals;
|
|
$811 = (($810) + ($809<<3)|0);
|
|
$812 = ((($811)) + 4|0);
|
|
$813 = +HEAPF32[$812>>2];
|
|
$814 = $808 + $813;
|
|
_nk_vec2($37,$803,$814);
|
|
$815 = ((($37)) + 4|0);
|
|
$816 = +HEAPF32[$815>>2];
|
|
$817 = $816 * 0.5;
|
|
_nk_vec2($dm6,$794,$817);
|
|
$818 = +HEAPF32[$dm6>>2];
|
|
$819 = +HEAPF32[$dm6>>2];
|
|
$820 = $818 * $819;
|
|
$821 = ((($dm6)) + 4|0);
|
|
$822 = +HEAPF32[$821>>2];
|
|
$823 = ((($dm6)) + 4|0);
|
|
$824 = +HEAPF32[$823>>2];
|
|
$825 = $822 * $824;
|
|
$826 = $820 + $825;
|
|
$dmr27 = $826;
|
|
$827 = $dmr27;
|
|
$828 = $827 > 9.9999999747524271E-7;
|
|
if ($828) {
|
|
$829 = $dmr27;
|
|
$830 = 1.0 / $829;
|
|
$scale8 = $830;
|
|
$831 = $scale8;
|
|
$832 = 100.0 < $831;
|
|
$833 = $scale8;
|
|
$834 = $832 ? 100.0 : $833;
|
|
$scale8 = $834;
|
|
$835 = +HEAPF32[$dm6>>2];
|
|
$836 = $scale8;
|
|
$837 = $835 * $836;
|
|
$838 = ((($dm6)) + 4|0);
|
|
$839 = +HEAPF32[$838>>2];
|
|
$840 = $scale8;
|
|
$841 = $839 * $840;
|
|
_nk_vec2($38,$837,$841);
|
|
;HEAP32[$dm6>>2]=HEAP32[$38>>2]|0;HEAP32[$dm6+4>>2]=HEAP32[$38+4>>2]|0;
|
|
}
|
|
$842 = +HEAPF32[$dm6>>2];
|
|
$843 = $half_inner_thickness;
|
|
$844 = $843 + 1.0;
|
|
$845 = $842 * $844;
|
|
$846 = ((($dm6)) + 4|0);
|
|
$847 = +HEAPF32[$846>>2];
|
|
$848 = $half_inner_thickness;
|
|
$849 = $848 + 1.0;
|
|
$850 = $847 * $849;
|
|
_nk_vec2($39,$845,$850);
|
|
;HEAP32[$dm_out>>2]=HEAP32[$39>>2]|0;HEAP32[$dm_out+4>>2]=HEAP32[$39+4>>2]|0;
|
|
$851 = +HEAPF32[$dm6>>2];
|
|
$852 = $half_inner_thickness;
|
|
$853 = $851 * $852;
|
|
$854 = ((($dm6)) + 4|0);
|
|
$855 = +HEAPF32[$854>>2];
|
|
$856 = $half_inner_thickness;
|
|
$857 = $855 * $856;
|
|
_nk_vec2($40,$853,$857);
|
|
;HEAP32[$dm_in>>2]=HEAP32[$40>>2]|0;HEAP32[$dm_in+4>>2]=HEAP32[$40+4>>2]|0;
|
|
$858 = $i24;
|
|
$859 = $858<<2;
|
|
$860 = (($859) + 0)|0;
|
|
$861 = $temp;
|
|
$862 = (($861) + ($860<<3)|0);
|
|
$863 = $i24;
|
|
$864 = $1;
|
|
$865 = (($864) + ($863<<3)|0);
|
|
$866 = +HEAPF32[$865>>2];
|
|
$867 = +HEAPF32[$dm_out>>2];
|
|
$868 = $866 + $867;
|
|
$869 = $i24;
|
|
$870 = $1;
|
|
$871 = (($870) + ($869<<3)|0);
|
|
$872 = ((($871)) + 4|0);
|
|
$873 = +HEAPF32[$872>>2];
|
|
$874 = ((($dm_out)) + 4|0);
|
|
$875 = +HEAPF32[$874>>2];
|
|
$876 = $873 + $875;
|
|
_nk_vec2($41,$868,$876);
|
|
;HEAP32[$862>>2]=HEAP32[$41>>2]|0;HEAP32[$862+4>>2]=HEAP32[$41+4>>2]|0;
|
|
$877 = $i24;
|
|
$878 = $877<<2;
|
|
$879 = (($878) + 1)|0;
|
|
$880 = $temp;
|
|
$881 = (($880) + ($879<<3)|0);
|
|
$882 = $i24;
|
|
$883 = $1;
|
|
$884 = (($883) + ($882<<3)|0);
|
|
$885 = +HEAPF32[$884>>2];
|
|
$886 = +HEAPF32[$dm_in>>2];
|
|
$887 = $885 + $886;
|
|
$888 = $i24;
|
|
$889 = $1;
|
|
$890 = (($889) + ($888<<3)|0);
|
|
$891 = ((($890)) + 4|0);
|
|
$892 = +HEAPF32[$891>>2];
|
|
$893 = ((($dm_in)) + 4|0);
|
|
$894 = +HEAPF32[$893>>2];
|
|
$895 = $892 + $894;
|
|
_nk_vec2($42,$887,$895);
|
|
;HEAP32[$881>>2]=HEAP32[$42>>2]|0;HEAP32[$881+4>>2]=HEAP32[$42+4>>2]|0;
|
|
$896 = $i24;
|
|
$897 = $896<<2;
|
|
$898 = (($897) + 2)|0;
|
|
$899 = $temp;
|
|
$900 = (($899) + ($898<<3)|0);
|
|
$901 = $i24;
|
|
$902 = $1;
|
|
$903 = (($902) + ($901<<3)|0);
|
|
$904 = +HEAPF32[$903>>2];
|
|
$905 = +HEAPF32[$dm_in>>2];
|
|
$906 = $904 - $905;
|
|
$907 = $i24;
|
|
$908 = $1;
|
|
$909 = (($908) + ($907<<3)|0);
|
|
$910 = ((($909)) + 4|0);
|
|
$911 = +HEAPF32[$910>>2];
|
|
$912 = ((($dm_in)) + 4|0);
|
|
$913 = +HEAPF32[$912>>2];
|
|
$914 = $911 - $913;
|
|
_nk_vec2($43,$906,$914);
|
|
;HEAP32[$900>>2]=HEAP32[$43>>2]|0;HEAP32[$900+4>>2]=HEAP32[$43+4>>2]|0;
|
|
$915 = $i24;
|
|
$916 = $915<<2;
|
|
$917 = (($916) + 3)|0;
|
|
$918 = $temp;
|
|
$919 = (($918) + ($917<<3)|0);
|
|
$920 = $i24;
|
|
$921 = $1;
|
|
$922 = (($921) + ($920<<3)|0);
|
|
$923 = +HEAPF32[$922>>2];
|
|
$924 = +HEAPF32[$dm_out>>2];
|
|
$925 = $923 - $924;
|
|
$926 = $i24;
|
|
$927 = $1;
|
|
$928 = (($927) + ($926<<3)|0);
|
|
$929 = ((($928)) + 4|0);
|
|
$930 = +HEAPF32[$929>>2];
|
|
$931 = ((($dm_out)) + 4|0);
|
|
$932 = +HEAPF32[$931>>2];
|
|
$933 = $930 - $932;
|
|
_nk_vec2($44,$925,$933);
|
|
;HEAP32[$919>>2]=HEAP32[$44>>2]|0;HEAP32[$919+4>>2]=HEAP32[$44+4>>2]|0;
|
|
$934 = $idx25;
|
|
$935 = (($934) + 1)|0;
|
|
$936 = $935&65535;
|
|
$937 = $ids;
|
|
HEAP16[$937>>1] = $936;
|
|
$938 = $idx12;
|
|
$939 = (($938) + 1)|0;
|
|
$940 = $939&65535;
|
|
$941 = $ids;
|
|
$942 = ((($941)) + 2|0);
|
|
HEAP16[$942>>1] = $940;
|
|
$943 = $idx12;
|
|
$944 = (($943) + 2)|0;
|
|
$945 = $944&65535;
|
|
$946 = $ids;
|
|
$947 = ((($946)) + 4|0);
|
|
HEAP16[$947>>1] = $945;
|
|
$948 = $idx12;
|
|
$949 = (($948) + 2)|0;
|
|
$950 = $949&65535;
|
|
$951 = $ids;
|
|
$952 = ((($951)) + 6|0);
|
|
HEAP16[$952>>1] = $950;
|
|
$953 = $idx25;
|
|
$954 = (($953) + 2)|0;
|
|
$955 = $954&65535;
|
|
$956 = $ids;
|
|
$957 = ((($956)) + 8|0);
|
|
HEAP16[$957>>1] = $955;
|
|
$958 = $idx25;
|
|
$959 = (($958) + 1)|0;
|
|
$960 = $959&65535;
|
|
$961 = $ids;
|
|
$962 = ((($961)) + 10|0);
|
|
HEAP16[$962>>1] = $960;
|
|
$963 = $idx25;
|
|
$964 = (($963) + 1)|0;
|
|
$965 = $964&65535;
|
|
$966 = $ids;
|
|
$967 = ((($966)) + 12|0);
|
|
HEAP16[$967>>1] = $965;
|
|
$968 = $idx12;
|
|
$969 = (($968) + 1)|0;
|
|
$970 = $969&65535;
|
|
$971 = $ids;
|
|
$972 = ((($971)) + 14|0);
|
|
HEAP16[$972>>1] = $970;
|
|
$973 = $idx12;
|
|
$974 = (($973) + 0)|0;
|
|
$975 = $974&65535;
|
|
$976 = $ids;
|
|
$977 = ((($976)) + 16|0);
|
|
HEAP16[$977>>1] = $975;
|
|
$978 = $idx12;
|
|
$979 = (($978) + 0)|0;
|
|
$980 = $979&65535;
|
|
$981 = $ids;
|
|
$982 = ((($981)) + 18|0);
|
|
HEAP16[$982>>1] = $980;
|
|
$983 = $idx25;
|
|
$984 = (($983) + 0)|0;
|
|
$985 = $984&65535;
|
|
$986 = $ids;
|
|
$987 = ((($986)) + 20|0);
|
|
HEAP16[$987>>1] = $985;
|
|
$988 = $idx25;
|
|
$989 = (($988) + 1)|0;
|
|
$990 = $989&65535;
|
|
$991 = $ids;
|
|
$992 = ((($991)) + 22|0);
|
|
HEAP16[$992>>1] = $990;
|
|
$993 = $idx25;
|
|
$994 = (($993) + 2)|0;
|
|
$995 = $994&65535;
|
|
$996 = $ids;
|
|
$997 = ((($996)) + 24|0);
|
|
HEAP16[$997>>1] = $995;
|
|
$998 = $idx12;
|
|
$999 = (($998) + 2)|0;
|
|
$1000 = $999&65535;
|
|
$1001 = $ids;
|
|
$1002 = ((($1001)) + 26|0);
|
|
HEAP16[$1002>>1] = $1000;
|
|
$1003 = $idx12;
|
|
$1004 = (($1003) + 3)|0;
|
|
$1005 = $1004&65535;
|
|
$1006 = $ids;
|
|
$1007 = ((($1006)) + 28|0);
|
|
HEAP16[$1007>>1] = $1005;
|
|
$1008 = $idx12;
|
|
$1009 = (($1008) + 3)|0;
|
|
$1010 = $1009&65535;
|
|
$1011 = $ids;
|
|
$1012 = ((($1011)) + 30|0);
|
|
HEAP16[$1012>>1] = $1010;
|
|
$1013 = $idx25;
|
|
$1014 = (($1013) + 3)|0;
|
|
$1015 = $1014&65535;
|
|
$1016 = $ids;
|
|
$1017 = ((($1016)) + 32|0);
|
|
HEAP16[$1017>>1] = $1015;
|
|
$1018 = $idx25;
|
|
$1019 = (($1018) + 2)|0;
|
|
$1020 = $1019&65535;
|
|
$1021 = $ids;
|
|
$1022 = ((($1021)) + 34|0);
|
|
HEAP16[$1022>>1] = $1020;
|
|
$1023 = $ids;
|
|
$1024 = ((($1023)) + 36|0);
|
|
$ids = $1024;
|
|
$1025 = $idx25;
|
|
$idx12 = $1025;
|
|
$1026 = $i1;
|
|
$1027 = (($1026) + 1)|0;
|
|
$i1 = $1027;
|
|
}
|
|
$i3 = 0;
|
|
while(1) {
|
|
$1028 = $i3;
|
|
$1029 = $2;
|
|
$1030 = ($1028>>>0)<($1029>>>0);
|
|
if (!($1030)) {
|
|
break L47;
|
|
}
|
|
$1031 = $0;
|
|
$1032 = ((($1031)) + 12|0);
|
|
$1033 = ((($1032)) + 4|0);
|
|
;HEAP32[$uv9>>2]=HEAP32[$1033>>2]|0;HEAP32[$uv9+4>>2]=HEAP32[$1033+4>>2]|0;
|
|
$1034 = $vtx;
|
|
$1035 = $i3;
|
|
$1036 = $1035<<2;
|
|
$1037 = (($1036) + 0)|0;
|
|
$1038 = $temp;
|
|
$1039 = (($1038) + ($1037<<3)|0);
|
|
$1040 = $col_trans;
|
|
;HEAP32[$$byval_copy12>>2]=HEAP32[$1039>>2]|0;HEAP32[$$byval_copy12+4>>2]=HEAP32[$1039+4>>2]|0;
|
|
;HEAP32[$uv9$byval_copy>>2]=HEAP32[$uv9>>2]|0;HEAP32[$uv9$byval_copy+4>>2]=HEAP32[$uv9+4>>2]|0;
|
|
_nk_draw_vertex($45,$$byval_copy12,$uv9$byval_copy,$1040);
|
|
;HEAP32[$1034>>2]=HEAP32[$45>>2]|0;HEAP32[$1034+4>>2]=HEAP32[$45+4>>2]|0;HEAP32[$1034+8>>2]=HEAP32[$45+8>>2]|0;HEAP32[$1034+12>>2]=HEAP32[$45+12>>2]|0;HEAP32[$1034+16>>2]=HEAP32[$45+16>>2]|0;
|
|
$1041 = $vtx;
|
|
$1042 = ((($1041)) + 20|0);
|
|
$1043 = $i3;
|
|
$1044 = $1043<<2;
|
|
$1045 = (($1044) + 1)|0;
|
|
$1046 = $temp;
|
|
$1047 = (($1046) + ($1045<<3)|0);
|
|
$1048 = $col;
|
|
;HEAP32[$$byval_copy13>>2]=HEAP32[$1047>>2]|0;HEAP32[$$byval_copy13+4>>2]=HEAP32[$1047+4>>2]|0;
|
|
;HEAP32[$uv9$byval_copy14>>2]=HEAP32[$uv9>>2]|0;HEAP32[$uv9$byval_copy14+4>>2]=HEAP32[$uv9+4>>2]|0;
|
|
_nk_draw_vertex($46,$$byval_copy13,$uv9$byval_copy14,$1048);
|
|
;HEAP32[$1042>>2]=HEAP32[$46>>2]|0;HEAP32[$1042+4>>2]=HEAP32[$46+4>>2]|0;HEAP32[$1042+8>>2]=HEAP32[$46+8>>2]|0;HEAP32[$1042+12>>2]=HEAP32[$46+12>>2]|0;HEAP32[$1042+16>>2]=HEAP32[$46+16>>2]|0;
|
|
$1049 = $vtx;
|
|
$1050 = ((($1049)) + 40|0);
|
|
$1051 = $i3;
|
|
$1052 = $1051<<2;
|
|
$1053 = (($1052) + 2)|0;
|
|
$1054 = $temp;
|
|
$1055 = (($1054) + ($1053<<3)|0);
|
|
$1056 = $col;
|
|
;HEAP32[$$byval_copy15>>2]=HEAP32[$1055>>2]|0;HEAP32[$$byval_copy15+4>>2]=HEAP32[$1055+4>>2]|0;
|
|
;HEAP32[$uv9$byval_copy16>>2]=HEAP32[$uv9>>2]|0;HEAP32[$uv9$byval_copy16+4>>2]=HEAP32[$uv9+4>>2]|0;
|
|
_nk_draw_vertex($47,$$byval_copy15,$uv9$byval_copy16,$1056);
|
|
;HEAP32[$1050>>2]=HEAP32[$47>>2]|0;HEAP32[$1050+4>>2]=HEAP32[$47+4>>2]|0;HEAP32[$1050+8>>2]=HEAP32[$47+8>>2]|0;HEAP32[$1050+12>>2]=HEAP32[$47+12>>2]|0;HEAP32[$1050+16>>2]=HEAP32[$47+16>>2]|0;
|
|
$1057 = $vtx;
|
|
$1058 = ((($1057)) + 60|0);
|
|
$1059 = $i3;
|
|
$1060 = $1059<<2;
|
|
$1061 = (($1060) + 3)|0;
|
|
$1062 = $temp;
|
|
$1063 = (($1062) + ($1061<<3)|0);
|
|
$1064 = $col_trans;
|
|
;HEAP32[$$byval_copy17>>2]=HEAP32[$1063>>2]|0;HEAP32[$$byval_copy17+4>>2]=HEAP32[$1063+4>>2]|0;
|
|
;HEAP32[$uv9$byval_copy18>>2]=HEAP32[$uv9>>2]|0;HEAP32[$uv9$byval_copy18+4>>2]=HEAP32[$uv9+4>>2]|0;
|
|
_nk_draw_vertex($48,$$byval_copy17,$uv9$byval_copy18,$1064);
|
|
;HEAP32[$1058>>2]=HEAP32[$48>>2]|0;HEAP32[$1058+4>>2]=HEAP32[$48+4>>2]|0;HEAP32[$1058+8>>2]=HEAP32[$48+8>>2]|0;HEAP32[$1058+12>>2]=HEAP32[$48+12>>2]|0;HEAP32[$1058+16>>2]=HEAP32[$48+16>>2]|0;
|
|
$1065 = $vtx;
|
|
$1066 = ((($1065)) + 80|0);
|
|
$vtx = $1066;
|
|
$1067 = $i3;
|
|
$1068 = (($1067) + 1)|0;
|
|
$i3 = $1068;
|
|
}
|
|
} else {
|
|
$226 = $3;
|
|
$227 = ($226|0)!=(0);
|
|
if (!($227)) {
|
|
$228 = $temp;
|
|
$229 = $1;
|
|
$230 = +HEAPF32[$229>>2];
|
|
$231 = $normals;
|
|
$232 = +HEAPF32[$231>>2];
|
|
$233 = $232 * 1.0;
|
|
$234 = $normals;
|
|
$235 = ((($234)) + 4|0);
|
|
$236 = +HEAPF32[$235>>2];
|
|
$237 = $236 * 1.0;
|
|
_nk_vec2($7,$233,$237);
|
|
$238 = +HEAPF32[$7>>2];
|
|
$239 = $230 + $238;
|
|
$240 = $1;
|
|
$241 = ((($240)) + 4|0);
|
|
$242 = +HEAPF32[$241>>2];
|
|
$243 = $normals;
|
|
$244 = +HEAPF32[$243>>2];
|
|
$245 = $244 * 1.0;
|
|
$246 = $normals;
|
|
$247 = ((($246)) + 4|0);
|
|
$248 = +HEAPF32[$247>>2];
|
|
$249 = $248 * 1.0;
|
|
_nk_vec2($8,$245,$249);
|
|
$250 = ((($8)) + 4|0);
|
|
$251 = +HEAPF32[$250>>2];
|
|
$252 = $242 + $251;
|
|
_nk_vec2($9,$239,$252);
|
|
;HEAP32[$228>>2]=HEAP32[$9>>2]|0;HEAP32[$228+4>>2]=HEAP32[$9+4>>2]|0;
|
|
$253 = $temp;
|
|
$254 = ((($253)) + 8|0);
|
|
$255 = $1;
|
|
$256 = +HEAPF32[$255>>2];
|
|
$257 = $normals;
|
|
$258 = +HEAPF32[$257>>2];
|
|
$259 = $258 * 1.0;
|
|
$260 = $normals;
|
|
$261 = ((($260)) + 4|0);
|
|
$262 = +HEAPF32[$261>>2];
|
|
$263 = $262 * 1.0;
|
|
_nk_vec2($10,$259,$263);
|
|
$264 = +HEAPF32[$10>>2];
|
|
$265 = $256 - $264;
|
|
$266 = $1;
|
|
$267 = ((($266)) + 4|0);
|
|
$268 = +HEAPF32[$267>>2];
|
|
$269 = $normals;
|
|
$270 = +HEAPF32[$269>>2];
|
|
$271 = $270 * 1.0;
|
|
$272 = $normals;
|
|
$273 = ((($272)) + 4|0);
|
|
$274 = +HEAPF32[$273>>2];
|
|
$275 = $274 * 1.0;
|
|
_nk_vec2($11,$271,$275);
|
|
$276 = ((($11)) + 4|0);
|
|
$277 = +HEAPF32[$276>>2];
|
|
$278 = $268 - $277;
|
|
_nk_vec2($12,$265,$278);
|
|
;HEAP32[$254>>2]=HEAP32[$12>>2]|0;HEAP32[$254+4>>2]=HEAP32[$12+4>>2]|0;
|
|
$279 = $2;
|
|
$280 = (($279) - 1)|0;
|
|
$281 = $normals;
|
|
$282 = (($281) + ($280<<3)|0);
|
|
$283 = +HEAPF32[$282>>2];
|
|
$284 = $283 * 1.0;
|
|
$285 = $2;
|
|
$286 = (($285) - 1)|0;
|
|
$287 = $normals;
|
|
$288 = (($287) + ($286<<3)|0);
|
|
$289 = ((($288)) + 4|0);
|
|
$290 = +HEAPF32[$289>>2];
|
|
$291 = $290 * 1.0;
|
|
_nk_vec2($13,$284,$291);
|
|
;HEAP32[$d>>2]=HEAP32[$13>>2]|0;HEAP32[$d+4>>2]=HEAP32[$13+4>>2]|0;
|
|
$292 = $2;
|
|
$293 = (($292) - 1)|0;
|
|
$294 = $293<<1;
|
|
$295 = (($294) + 0)|0;
|
|
$296 = $temp;
|
|
$297 = (($296) + ($295<<3)|0);
|
|
$298 = $2;
|
|
$299 = (($298) - 1)|0;
|
|
$300 = $1;
|
|
$301 = (($300) + ($299<<3)|0);
|
|
$302 = +HEAPF32[$301>>2];
|
|
$303 = +HEAPF32[$d>>2];
|
|
$304 = $302 + $303;
|
|
$305 = $2;
|
|
$306 = (($305) - 1)|0;
|
|
$307 = $1;
|
|
$308 = (($307) + ($306<<3)|0);
|
|
$309 = ((($308)) + 4|0);
|
|
$310 = +HEAPF32[$309>>2];
|
|
$311 = ((($d)) + 4|0);
|
|
$312 = +HEAPF32[$311>>2];
|
|
$313 = $310 + $312;
|
|
_nk_vec2($14,$304,$313);
|
|
;HEAP32[$297>>2]=HEAP32[$14>>2]|0;HEAP32[$297+4>>2]=HEAP32[$14+4>>2]|0;
|
|
$314 = $2;
|
|
$315 = (($314) - 1)|0;
|
|
$316 = $315<<1;
|
|
$317 = (($316) + 1)|0;
|
|
$318 = $temp;
|
|
$319 = (($318) + ($317<<3)|0);
|
|
$320 = $2;
|
|
$321 = (($320) - 1)|0;
|
|
$322 = $1;
|
|
$323 = (($322) + ($321<<3)|0);
|
|
$324 = +HEAPF32[$323>>2];
|
|
$325 = +HEAPF32[$d>>2];
|
|
$326 = $324 - $325;
|
|
$327 = $2;
|
|
$328 = (($327) - 1)|0;
|
|
$329 = $1;
|
|
$330 = (($329) + ($328<<3)|0);
|
|
$331 = ((($330)) + 4|0);
|
|
$332 = +HEAPF32[$331>>2];
|
|
$333 = ((($d)) + 4|0);
|
|
$334 = +HEAPF32[$333>>2];
|
|
$335 = $332 - $334;
|
|
_nk_vec2($15,$326,$335);
|
|
;HEAP32[$319>>2]=HEAP32[$15>>2]|0;HEAP32[$319+4>>2]=HEAP32[$15+4>>2]|0;
|
|
}
|
|
$336 = $index;
|
|
$idx1 = $336;
|
|
$i1 = 0;
|
|
while(1) {
|
|
$337 = $i1;
|
|
$338 = $count;
|
|
$339 = ($337>>>0)<($338>>>0);
|
|
if (!($339)) {
|
|
break;
|
|
}
|
|
$340 = $i1;
|
|
$341 = (($340) + 1)|0;
|
|
$342 = $2;
|
|
$343 = ($341|0)==($342|0);
|
|
$344 = $i1;
|
|
$345 = (($344) + 1)|0;
|
|
$346 = $343 ? 0 : $345;
|
|
$i21 = $346;
|
|
$347 = $i1;
|
|
$348 = (($347) + 1)|0;
|
|
$349 = $2;
|
|
$350 = ($348|0)==($349|0);
|
|
$351 = $index;
|
|
$352 = $idx1;
|
|
$353 = (($352) + 3)|0;
|
|
$354 = $350 ? $351 : $353;
|
|
$idx2 = $354;
|
|
$355 = $i1;
|
|
$356 = $normals;
|
|
$357 = (($356) + ($355<<3)|0);
|
|
$358 = +HEAPF32[$357>>2];
|
|
$359 = $i21;
|
|
$360 = $normals;
|
|
$361 = (($360) + ($359<<3)|0);
|
|
$362 = +HEAPF32[$361>>2];
|
|
$363 = $358 + $362;
|
|
$364 = $i1;
|
|
$365 = $normals;
|
|
$366 = (($365) + ($364<<3)|0);
|
|
$367 = ((($366)) + 4|0);
|
|
$368 = +HEAPF32[$367>>2];
|
|
$369 = $i21;
|
|
$370 = $normals;
|
|
$371 = (($370) + ($369<<3)|0);
|
|
$372 = ((($371)) + 4|0);
|
|
$373 = +HEAPF32[$372>>2];
|
|
$374 = $368 + $373;
|
|
_nk_vec2($16,$363,$374);
|
|
$375 = +HEAPF32[$16>>2];
|
|
$376 = $375 * 0.5;
|
|
$377 = $i1;
|
|
$378 = $normals;
|
|
$379 = (($378) + ($377<<3)|0);
|
|
$380 = +HEAPF32[$379>>2];
|
|
$381 = $i21;
|
|
$382 = $normals;
|
|
$383 = (($382) + ($381<<3)|0);
|
|
$384 = +HEAPF32[$383>>2];
|
|
$385 = $380 + $384;
|
|
$386 = $i1;
|
|
$387 = $normals;
|
|
$388 = (($387) + ($386<<3)|0);
|
|
$389 = ((($388)) + 4|0);
|
|
$390 = +HEAPF32[$389>>2];
|
|
$391 = $i21;
|
|
$392 = $normals;
|
|
$393 = (($392) + ($391<<3)|0);
|
|
$394 = ((($393)) + 4|0);
|
|
$395 = +HEAPF32[$394>>2];
|
|
$396 = $390 + $395;
|
|
_nk_vec2($17,$385,$396);
|
|
$397 = ((($17)) + 4|0);
|
|
$398 = +HEAPF32[$397>>2];
|
|
$399 = $398 * 0.5;
|
|
_nk_vec2($18,$376,$399);
|
|
;HEAP32[$dm>>2]=HEAP32[$18>>2]|0;HEAP32[$dm+4>>2]=HEAP32[$18+4>>2]|0;
|
|
$400 = +HEAPF32[$dm>>2];
|
|
$401 = +HEAPF32[$dm>>2];
|
|
$402 = $400 * $401;
|
|
$403 = ((($dm)) + 4|0);
|
|
$404 = +HEAPF32[$403>>2];
|
|
$405 = ((($dm)) + 4|0);
|
|
$406 = +HEAPF32[$405>>2];
|
|
$407 = $404 * $406;
|
|
$408 = $402 + $407;
|
|
$dmr2 = $408;
|
|
$409 = $dmr2;
|
|
$410 = $409 > 9.9999999747524271E-7;
|
|
if ($410) {
|
|
$411 = $dmr2;
|
|
$412 = 1.0 / $411;
|
|
$scale = $412;
|
|
$413 = $scale;
|
|
$414 = 100.0 < $413;
|
|
$415 = $scale;
|
|
$416 = $414 ? 100.0 : $415;
|
|
$scale = $416;
|
|
$417 = +HEAPF32[$dm>>2];
|
|
$418 = $scale;
|
|
$419 = $417 * $418;
|
|
$420 = ((($dm)) + 4|0);
|
|
$421 = +HEAPF32[$420>>2];
|
|
$422 = $scale;
|
|
$423 = $421 * $422;
|
|
_nk_vec2($19,$419,$423);
|
|
;HEAP32[$dm>>2]=HEAP32[$19>>2]|0;HEAP32[$dm+4>>2]=HEAP32[$19+4>>2]|0;
|
|
}
|
|
$424 = +HEAPF32[$dm>>2];
|
|
$425 = $424 * 1.0;
|
|
$426 = ((($dm)) + 4|0);
|
|
$427 = +HEAPF32[$426>>2];
|
|
$428 = $427 * 1.0;
|
|
_nk_vec2($20,$425,$428);
|
|
;HEAP32[$dm>>2]=HEAP32[$20>>2]|0;HEAP32[$dm+4>>2]=HEAP32[$20+4>>2]|0;
|
|
$429 = $i21;
|
|
$430 = $429<<1;
|
|
$431 = (($430) + 0)|0;
|
|
$432 = $temp;
|
|
$433 = (($432) + ($431<<3)|0);
|
|
$434 = $i21;
|
|
$435 = $1;
|
|
$436 = (($435) + ($434<<3)|0);
|
|
$437 = +HEAPF32[$436>>2];
|
|
$438 = +HEAPF32[$dm>>2];
|
|
$439 = $437 + $438;
|
|
$440 = $i21;
|
|
$441 = $1;
|
|
$442 = (($441) + ($440<<3)|0);
|
|
$443 = ((($442)) + 4|0);
|
|
$444 = +HEAPF32[$443>>2];
|
|
$445 = ((($dm)) + 4|0);
|
|
$446 = +HEAPF32[$445>>2];
|
|
$447 = $444 + $446;
|
|
_nk_vec2($21,$439,$447);
|
|
;HEAP32[$433>>2]=HEAP32[$21>>2]|0;HEAP32[$433+4>>2]=HEAP32[$21+4>>2]|0;
|
|
$448 = $i21;
|
|
$449 = $448<<1;
|
|
$450 = (($449) + 1)|0;
|
|
$451 = $temp;
|
|
$452 = (($451) + ($450<<3)|0);
|
|
$453 = $i21;
|
|
$454 = $1;
|
|
$455 = (($454) + ($453<<3)|0);
|
|
$456 = +HEAPF32[$455>>2];
|
|
$457 = +HEAPF32[$dm>>2];
|
|
$458 = $456 - $457;
|
|
$459 = $i21;
|
|
$460 = $1;
|
|
$461 = (($460) + ($459<<3)|0);
|
|
$462 = ((($461)) + 4|0);
|
|
$463 = +HEAPF32[$462>>2];
|
|
$464 = ((($dm)) + 4|0);
|
|
$465 = +HEAPF32[$464>>2];
|
|
$466 = $463 - $465;
|
|
_nk_vec2($22,$458,$466);
|
|
;HEAP32[$452>>2]=HEAP32[$22>>2]|0;HEAP32[$452+4>>2]=HEAP32[$22+4>>2]|0;
|
|
$467 = $idx2;
|
|
$468 = (($467) + 0)|0;
|
|
$469 = $468&65535;
|
|
$470 = $ids;
|
|
HEAP16[$470>>1] = $469;
|
|
$471 = $idx1;
|
|
$472 = (($471) + 0)|0;
|
|
$473 = $472&65535;
|
|
$474 = $ids;
|
|
$475 = ((($474)) + 2|0);
|
|
HEAP16[$475>>1] = $473;
|
|
$476 = $idx1;
|
|
$477 = (($476) + 2)|0;
|
|
$478 = $477&65535;
|
|
$479 = $ids;
|
|
$480 = ((($479)) + 4|0);
|
|
HEAP16[$480>>1] = $478;
|
|
$481 = $idx1;
|
|
$482 = (($481) + 2)|0;
|
|
$483 = $482&65535;
|
|
$484 = $ids;
|
|
$485 = ((($484)) + 6|0);
|
|
HEAP16[$485>>1] = $483;
|
|
$486 = $idx2;
|
|
$487 = (($486) + 2)|0;
|
|
$488 = $487&65535;
|
|
$489 = $ids;
|
|
$490 = ((($489)) + 8|0);
|
|
HEAP16[$490>>1] = $488;
|
|
$491 = $idx2;
|
|
$492 = (($491) + 0)|0;
|
|
$493 = $492&65535;
|
|
$494 = $ids;
|
|
$495 = ((($494)) + 10|0);
|
|
HEAP16[$495>>1] = $493;
|
|
$496 = $idx2;
|
|
$497 = (($496) + 1)|0;
|
|
$498 = $497&65535;
|
|
$499 = $ids;
|
|
$500 = ((($499)) + 12|0);
|
|
HEAP16[$500>>1] = $498;
|
|
$501 = $idx1;
|
|
$502 = (($501) + 1)|0;
|
|
$503 = $502&65535;
|
|
$504 = $ids;
|
|
$505 = ((($504)) + 14|0);
|
|
HEAP16[$505>>1] = $503;
|
|
$506 = $idx1;
|
|
$507 = (($506) + 0)|0;
|
|
$508 = $507&65535;
|
|
$509 = $ids;
|
|
$510 = ((($509)) + 16|0);
|
|
HEAP16[$510>>1] = $508;
|
|
$511 = $idx1;
|
|
$512 = (($511) + 0)|0;
|
|
$513 = $512&65535;
|
|
$514 = $ids;
|
|
$515 = ((($514)) + 18|0);
|
|
HEAP16[$515>>1] = $513;
|
|
$516 = $idx2;
|
|
$517 = (($516) + 0)|0;
|
|
$518 = $517&65535;
|
|
$519 = $ids;
|
|
$520 = ((($519)) + 20|0);
|
|
HEAP16[$520>>1] = $518;
|
|
$521 = $idx2;
|
|
$522 = (($521) + 1)|0;
|
|
$523 = $522&65535;
|
|
$524 = $ids;
|
|
$525 = ((($524)) + 22|0);
|
|
HEAP16[$525>>1] = $523;
|
|
$526 = $ids;
|
|
$527 = ((($526)) + 24|0);
|
|
$ids = $527;
|
|
$528 = $idx2;
|
|
$idx1 = $528;
|
|
$529 = $i1;
|
|
$530 = (($529) + 1)|0;
|
|
$i1 = $530;
|
|
}
|
|
$i = 0;
|
|
while(1) {
|
|
$531 = $i;
|
|
$532 = $2;
|
|
$533 = ($531>>>0)<($532>>>0);
|
|
if (!($533)) {
|
|
break L47;
|
|
}
|
|
$534 = $0;
|
|
$535 = ((($534)) + 12|0);
|
|
$536 = ((($535)) + 4|0);
|
|
;HEAP32[$uv>>2]=HEAP32[$536>>2]|0;HEAP32[$uv+4>>2]=HEAP32[$536+4>>2]|0;
|
|
$537 = $vtx;
|
|
$538 = $i;
|
|
$539 = $1;
|
|
$540 = (($539) + ($538<<3)|0);
|
|
$541 = $col;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$540>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$540+4>>2]|0;
|
|
;HEAP32[$uv$byval_copy>>2]=HEAP32[$uv>>2]|0;HEAP32[$uv$byval_copy+4>>2]=HEAP32[$uv+4>>2]|0;
|
|
_nk_draw_vertex($23,$$byval_copy,$uv$byval_copy,$541);
|
|
;HEAP32[$537>>2]=HEAP32[$23>>2]|0;HEAP32[$537+4>>2]=HEAP32[$23+4>>2]|0;HEAP32[$537+8>>2]=HEAP32[$23+8>>2]|0;HEAP32[$537+12>>2]=HEAP32[$23+12>>2]|0;HEAP32[$537+16>>2]=HEAP32[$23+16>>2]|0;
|
|
$542 = $vtx;
|
|
$543 = ((($542)) + 20|0);
|
|
$544 = $i;
|
|
$545 = $544<<1;
|
|
$546 = (($545) + 0)|0;
|
|
$547 = $temp;
|
|
$548 = (($547) + ($546<<3)|0);
|
|
$549 = $col_trans;
|
|
;HEAP32[$$byval_copy8>>2]=HEAP32[$548>>2]|0;HEAP32[$$byval_copy8+4>>2]=HEAP32[$548+4>>2]|0;
|
|
;HEAP32[$uv$byval_copy9>>2]=HEAP32[$uv>>2]|0;HEAP32[$uv$byval_copy9+4>>2]=HEAP32[$uv+4>>2]|0;
|
|
_nk_draw_vertex($24,$$byval_copy8,$uv$byval_copy9,$549);
|
|
;HEAP32[$543>>2]=HEAP32[$24>>2]|0;HEAP32[$543+4>>2]=HEAP32[$24+4>>2]|0;HEAP32[$543+8>>2]=HEAP32[$24+8>>2]|0;HEAP32[$543+12>>2]=HEAP32[$24+12>>2]|0;HEAP32[$543+16>>2]=HEAP32[$24+16>>2]|0;
|
|
$550 = $vtx;
|
|
$551 = ((($550)) + 40|0);
|
|
$552 = $i;
|
|
$553 = $552<<1;
|
|
$554 = (($553) + 1)|0;
|
|
$555 = $temp;
|
|
$556 = (($555) + ($554<<3)|0);
|
|
$557 = $col_trans;
|
|
;HEAP32[$$byval_copy10>>2]=HEAP32[$556>>2]|0;HEAP32[$$byval_copy10+4>>2]=HEAP32[$556+4>>2]|0;
|
|
;HEAP32[$uv$byval_copy11>>2]=HEAP32[$uv>>2]|0;HEAP32[$uv$byval_copy11+4>>2]=HEAP32[$uv+4>>2]|0;
|
|
_nk_draw_vertex($25,$$byval_copy10,$uv$byval_copy11,$557);
|
|
;HEAP32[$551>>2]=HEAP32[$25>>2]|0;HEAP32[$551+4>>2]=HEAP32[$25+4>>2]|0;HEAP32[$551+8>>2]=HEAP32[$25+8>>2]|0;HEAP32[$551+12>>2]=HEAP32[$25+12>>2]|0;HEAP32[$551+16>>2]=HEAP32[$25+16>>2]|0;
|
|
$558 = $vtx;
|
|
$559 = ((($558)) + 60|0);
|
|
$vtx = $559;
|
|
$560 = $i;
|
|
$561 = (($560) + 1)|0;
|
|
$i = $561;
|
|
}
|
|
}
|
|
} while(0);
|
|
$1069 = $0;
|
|
$1070 = ((($1069)) + 44|0);
|
|
$1071 = HEAP32[$1070>>2]|0;
|
|
_nk_buffer_reset($1071,0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_alloc_vertices($list,$count) {
|
|
$list = $list|0;
|
|
$count = $count|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, $vtx = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $list;
|
|
$2 = $count;
|
|
$3 = $1;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((14300|0),(13400|0),5670,(29896|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
$0 = 0;
|
|
$21 = $0;
|
|
STACKTOP = sp;return ($21|0);
|
|
}
|
|
$7 = $1;
|
|
$8 = ((($7)) + 44|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = $2;
|
|
$11 = ($10*20)|0;
|
|
$12 = (_nk_buffer_alloc($9,0,$11,4)|0);
|
|
$vtx = $12;
|
|
$13 = $vtx;
|
|
$14 = ($13|0)!=(0|0);
|
|
if ($14) {
|
|
$15 = $2;
|
|
$16 = $1;
|
|
$17 = ((($16)) + 56|0);
|
|
$18 = HEAP32[$17>>2]|0;
|
|
$19 = (($18) + ($15))|0;
|
|
HEAP32[$17>>2] = $19;
|
|
$20 = $vtx;
|
|
$0 = $20;
|
|
$21 = $0;
|
|
STACKTOP = sp;return ($21|0);
|
|
} else {
|
|
$0 = 0;
|
|
$21 = $0;
|
|
STACKTOP = sp;return ($21|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_draw_list_alloc_elements($list,$count) {
|
|
$list = $list|0;
|
|
$count = $count|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cmd = 0, $ids = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $list;
|
|
$2 = $count;
|
|
$3 = $1;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((14300|0),(13400|0),5687,(29924|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
$0 = 0;
|
|
$27 = $0;
|
|
STACKTOP = sp;return ($27|0);
|
|
}
|
|
$7 = $1;
|
|
$8 = ((($7)) + 48|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = $2;
|
|
$11 = $10<<1;
|
|
$12 = (_nk_buffer_alloc($9,0,$11,2)|0);
|
|
$ids = $12;
|
|
$13 = $ids;
|
|
$14 = ($13|0)!=(0|0);
|
|
if ($14) {
|
|
$15 = $1;
|
|
$16 = (_nk_draw_list_command_last($15)|0);
|
|
$cmd = $16;
|
|
$17 = $2;
|
|
$18 = $1;
|
|
$19 = ((($18)) + 52|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = (($20) + ($17))|0;
|
|
HEAP32[$19>>2] = $21;
|
|
$22 = $2;
|
|
$23 = $cmd;
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = (($24) + ($22))|0;
|
|
HEAP32[$23>>2] = $25;
|
|
$26 = $ids;
|
|
$0 = $26;
|
|
$27 = $0;
|
|
STACKTOP = sp;return ($27|0);
|
|
} else {
|
|
$0 = 0;
|
|
$27 = $0;
|
|
STACKTOP = sp;return ($27|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_inv_sqrt($number) {
|
|
$number = +$number;
|
|
var $0 = 0.0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $conv = 0, $threehalfs = 0.0, $x2 = 0.0, label = 0;
|
|
var sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$conv = sp;
|
|
$0 = $number;
|
|
$threehalfs = 1.5;
|
|
;HEAP32[$conv>>2]=0|0;
|
|
$1 = $0;
|
|
HEAPF32[$conv>>2] = $1;
|
|
$2 = $0;
|
|
$3 = $2 * 0.5;
|
|
$x2 = $3;
|
|
$4 = HEAP32[$conv>>2]|0;
|
|
$5 = $4 >>> 1;
|
|
$6 = (1597463172 - ($5))|0;
|
|
HEAP32[$conv>>2] = $6;
|
|
$7 = +HEAPF32[$conv>>2];
|
|
$8 = $x2;
|
|
$9 = +HEAPF32[$conv>>2];
|
|
$10 = $8 * $9;
|
|
$11 = +HEAPF32[$conv>>2];
|
|
$12 = $10 * $11;
|
|
$13 = 1.5 - $12;
|
|
$14 = $7 * $13;
|
|
HEAPF32[$conv>>2] = $14;
|
|
$15 = +HEAPF32[$conv>>2];
|
|
STACKTOP = sp;return (+$15);
|
|
}
|
|
function _nk_draw_vertex($agg$result,$pos,$uv,$col) {
|
|
$agg$result = $agg$result|0;
|
|
$pos = $pos|0;
|
|
$uv = $uv|0;
|
|
$col = $col|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $out = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$out = sp;
|
|
$0 = $col;
|
|
;HEAP32[$out>>2]=HEAP32[$pos>>2]|0;HEAP32[$out+4>>2]=HEAP32[$pos+4>>2]|0;
|
|
$1 = ((($out)) + 8|0);
|
|
;HEAP32[$1>>2]=HEAP32[$uv>>2]|0;HEAP32[$1+4>>2]=HEAP32[$uv+4>>2]|0;
|
|
$2 = $0;
|
|
$3 = ((($out)) + 16|0);
|
|
HEAP32[$3>>2] = $2;
|
|
;HEAP32[$agg$result>>2]=HEAP32[$out>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$out+4>>2]|0;HEAP32[$agg$result+8>>2]=HEAP32[$out+8>>2]|0;HEAP32[$agg$result+12>>2]=HEAP32[$out+12>>2]|0;HEAP32[$agg$result+16>>2]=HEAP32[$out+16>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_fill_poly_convex($list,$points,$points_count,$color,$aliasing) {
|
|
$list = $list|0;
|
|
$points = $points|0;
|
|
$points_count = $points_count|0;
|
|
$color = $color|0;
|
|
$aliasing = $aliasing|0;
|
|
var $$byval_copy = 0, $$byval_copy6 = 0, $$byval_copy8 = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0;
|
|
var $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0, $128 = 0.0, $129 = 0, $13 = 0;
|
|
var $130 = 0.0, $131 = 0.0, $132 = 0.0, $133 = 0.0, $134 = 0.0, $135 = 0, $136 = 0.0, $137 = 0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0.0, $142 = 0, $143 = 0.0, $144 = 0.0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0;
|
|
var $149 = 0.0, $15 = 0, $150 = 0.0, $151 = 0.0, $152 = 0, $153 = 0.0, $154 = 0, $155 = 0, $156 = 0, $157 = 0.0, $158 = 0.0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0;
|
|
var $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0.0, $182 = 0, $183 = 0.0, $184 = 0;
|
|
var $185 = 0.0, $186 = 0.0, $187 = 0.0, $188 = 0.0, $189 = 0.0, $19 = 0, $190 = 0.0, $191 = 0.0, $192 = 0, $193 = 0.0, $194 = 0, $195 = 0.0, $196 = 0.0, $197 = 0, $198 = 0.0, $199 = 0.0, $2 = 0, $20 = 0, $200 = 0.0, $201 = 0.0;
|
|
var $202 = 0.0, $203 = 0, $204 = 0.0, $205 = 0, $206 = 0.0, $207 = 0.0, $208 = 0.0, $209 = 0.0, $21 = 0, $210 = 0, $211 = 0.0, $212 = 0.0, $213 = 0.0, $214 = 0, $215 = 0.0, $216 = 0.0, $217 = 0.0, $218 = 0.0, $219 = 0.0, $22 = 0.0;
|
|
var $220 = 0, $221 = 0.0, $222 = 0.0, $223 = 0.0, $224 = 0.0, $225 = 0.0, $226 = 0, $227 = 0.0, $228 = 0.0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0.0, $234 = 0.0, $235 = 0.0, $236 = 0, $237 = 0, $238 = 0;
|
|
var $239 = 0, $24 = 0.0, $240 = 0.0, $241 = 0, $242 = 0.0, $243 = 0.0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0.0, $250 = 0.0, $251 = 0.0, $252 = 0.0, $253 = 0, $254 = 0, $255 = 0, $256 = 0;
|
|
var $257 = 0.0, $258 = 0, $259 = 0.0, $26 = 0, $260 = 0.0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0;
|
|
var $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0;
|
|
var $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0;
|
|
var $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0;
|
|
var $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0;
|
|
var $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0;
|
|
var $365 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0;
|
|
var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0;
|
|
var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0;
|
|
var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $AA_SIZE = 0.0, $col = 0, $col_trans = 0, $color$byval_copy = 0, $diff = 0, $dm = 0, $dmr2 = 0.0, $i = 0, $i0 = 0, $i1 = 0;
|
|
var $i2 = 0, $ids = 0, $ids7 = 0, $idx_count = 0, $idx_count4 = 0, $index = 0, $index3 = 0, $len = 0.0, $n0 = 0, $n1 = 0, $normals = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $p0 = 0, $p1 = 0, $scale = 0.0, $size = 0, $uv = 0, $uv$byval_copy = 0;
|
|
var $uv$byval_copy7 = 0, $vertex_offset = 0, $vtx = 0, $vtx6 = 0, $vtx_count = 0, $vtx_count5 = 0, $vtx_inner_idx = 0, $vtx_outer_idx = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 352|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy9 = sp + 336|0;
|
|
$$byval_copy8 = sp + 328|0;
|
|
$uv$byval_copy7 = sp + 320|0;
|
|
$$byval_copy6 = sp + 312|0;
|
|
$uv$byval_copy = sp + 304|0;
|
|
$$byval_copy = sp + 296|0;
|
|
$color$byval_copy = sp + 344|0;
|
|
$p0 = sp + 208|0;
|
|
$p1 = sp + 200|0;
|
|
$diff = sp + 192|0;
|
|
$4 = sp + 176|0;
|
|
$uv = sp + 168|0;
|
|
$n0 = sp + 160|0;
|
|
$n1 = sp + 152|0;
|
|
$dm = sp + 144|0;
|
|
$5 = sp + 136|0;
|
|
$6 = sp + 128|0;
|
|
$7 = sp + 112|0;
|
|
$8 = sp + 104|0;
|
|
$9 = sp + 96|0;
|
|
$10 = sp + 72|0;
|
|
$11 = sp + 64|0;
|
|
$12 = sp + 44|0;
|
|
$13 = sp;
|
|
$0 = $list;
|
|
$1 = $points;
|
|
$2 = $points_count;
|
|
$3 = $aliasing;
|
|
$14 = $0;
|
|
$15 = ($14|0)!=(0|0);
|
|
if (!($15)) {
|
|
___assert_fail((14300|0),(13400|0),5956,(14373|0));
|
|
// unreachable;
|
|
}
|
|
$16 = $0;
|
|
$17 = ($16|0)==(0|0);
|
|
$18 = $2;
|
|
$19 = ($18>>>0)<(3);
|
|
$or$cond = $17 | $19;
|
|
if ($or$cond) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$20 = ((($color)) + 3|0);
|
|
$21 = HEAP8[$20>>0]|0;
|
|
$22 = (+($21&255));
|
|
$23 = $0;
|
|
$24 = +HEAPF32[$23>>2];
|
|
$25 = $22 * $24;
|
|
$26 = (~~(($25))&255);
|
|
$27 = ((($color)) + 3|0);
|
|
HEAP8[$27>>0] = $26;
|
|
;HEAP8[$color$byval_copy>>0]=HEAP8[$color>>0]|0;HEAP8[$color$byval_copy+1>>0]=HEAP8[$color+1>>0]|0;HEAP8[$color$byval_copy+2>>0]=HEAP8[$color+2>>0]|0;HEAP8[$color$byval_copy+3>>0]=HEAP8[$color+3>>0]|0;
|
|
$28 = (_nk_color_u32($color$byval_copy)|0);
|
|
$col = $28;
|
|
$29 = $3;
|
|
$30 = ($29|0)==(1);
|
|
if (!($30)) {
|
|
$i2 = 0;
|
|
$311 = $0;
|
|
$312 = ((($311)) + 56|0);
|
|
$313 = HEAP32[$312>>2]|0;
|
|
$index3 = $313;
|
|
$314 = $2;
|
|
$315 = (($314) - 2)|0;
|
|
$316 = ($315*3)|0;
|
|
$idx_count4 = $316;
|
|
$317 = $2;
|
|
$vtx_count5 = $317;
|
|
$318 = $0;
|
|
$319 = $vtx_count5;
|
|
$320 = (_nk_draw_list_alloc_vertices($318,$319)|0);
|
|
$vtx6 = $320;
|
|
$321 = $0;
|
|
$322 = $idx_count4;
|
|
$323 = (_nk_draw_list_alloc_elements($321,$322)|0);
|
|
$ids7 = $323;
|
|
$324 = $vtx6;
|
|
$325 = ($324|0)!=(0|0);
|
|
$326 = $ids7;
|
|
$327 = ($326|0)!=(0|0);
|
|
$or$cond5 = $325 & $327;
|
|
if (!($or$cond5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$i2 = 0;
|
|
while(1) {
|
|
$328 = $i2;
|
|
$329 = $vtx_count5;
|
|
$330 = ($328>>>0)<($329>>>0);
|
|
if (!($330)) {
|
|
break;
|
|
}
|
|
$331 = $vtx6;
|
|
$332 = $i2;
|
|
$333 = $1;
|
|
$334 = (($333) + ($332<<3)|0);
|
|
$335 = $0;
|
|
$336 = ((($335)) + 12|0);
|
|
$337 = ((($336)) + 4|0);
|
|
$338 = $col;
|
|
;HEAP32[$$byval_copy8>>2]=HEAP32[$334>>2]|0;HEAP32[$$byval_copy8+4>>2]=HEAP32[$334+4>>2]|0;
|
|
;HEAP32[$$byval_copy9>>2]=HEAP32[$337>>2]|0;HEAP32[$$byval_copy9+4>>2]=HEAP32[$337+4>>2]|0;
|
|
_nk_draw_vertex($13,$$byval_copy8,$$byval_copy9,$338);
|
|
;HEAP32[$331>>2]=HEAP32[$13>>2]|0;HEAP32[$331+4>>2]=HEAP32[$13+4>>2]|0;HEAP32[$331+8>>2]=HEAP32[$13+8>>2]|0;HEAP32[$331+12>>2]=HEAP32[$13+12>>2]|0;HEAP32[$331+16>>2]=HEAP32[$13+16>>2]|0;
|
|
$339 = $vtx6;
|
|
$340 = ((($339)) + 20|0);
|
|
$vtx6 = $340;
|
|
$341 = $i2;
|
|
$342 = (($341) + 1)|0;
|
|
$i2 = $342;
|
|
}
|
|
$i2 = 2;
|
|
while(1) {
|
|
$343 = $i2;
|
|
$344 = $2;
|
|
$345 = ($343>>>0)<($344>>>0);
|
|
if (!($345)) {
|
|
break;
|
|
}
|
|
$346 = $index3;
|
|
$347 = $346&65535;
|
|
$348 = $ids7;
|
|
HEAP16[$348>>1] = $347;
|
|
$349 = $index3;
|
|
$350 = $i2;
|
|
$351 = (($349) + ($350))|0;
|
|
$352 = (($351) - 1)|0;
|
|
$353 = $352&65535;
|
|
$354 = $ids7;
|
|
$355 = ((($354)) + 2|0);
|
|
HEAP16[$355>>1] = $353;
|
|
$356 = $index3;
|
|
$357 = $i2;
|
|
$358 = (($356) + ($357))|0;
|
|
$359 = $358&65535;
|
|
$360 = $ids7;
|
|
$361 = ((($360)) + 4|0);
|
|
HEAP16[$361>>1] = $359;
|
|
$362 = $ids7;
|
|
$363 = ((($362)) + 6|0);
|
|
$ids7 = $363;
|
|
$364 = $i2;
|
|
$365 = (($364) + 1)|0;
|
|
$i2 = $365;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
$i = 0;
|
|
$i0 = 0;
|
|
$i1 = 0;
|
|
$AA_SIZE = 1.0;
|
|
$vertex_offset = 0;
|
|
$31 = $col;
|
|
$32 = $31 & 16777215;
|
|
$col_trans = $32;
|
|
$33 = $0;
|
|
$34 = ((($33)) + 56|0);
|
|
$35 = HEAP32[$34>>2]|0;
|
|
$index = $35;
|
|
$36 = $2;
|
|
$37 = (($36) - 2)|0;
|
|
$38 = ($37*3)|0;
|
|
$39 = $2;
|
|
$40 = ($39*6)|0;
|
|
$41 = (($38) + ($40))|0;
|
|
$idx_count = $41;
|
|
$42 = $2;
|
|
$43 = $42<<1;
|
|
$vtx_count = $43;
|
|
$44 = $0;
|
|
$45 = $vtx_count;
|
|
$46 = (_nk_draw_list_alloc_vertices($44,$45)|0);
|
|
$vtx = $46;
|
|
$47 = $0;
|
|
$48 = $idx_count;
|
|
$49 = (_nk_draw_list_alloc_elements($47,$48)|0);
|
|
$ids = $49;
|
|
$50 = $index;
|
|
$51 = (($50) + 0)|0;
|
|
$vtx_inner_idx = $51;
|
|
$52 = $index;
|
|
$53 = (($52) + 1)|0;
|
|
$vtx_outer_idx = $53;
|
|
$normals = 0;
|
|
$size = 0;
|
|
$54 = $vtx;
|
|
$55 = ($54|0)!=(0|0);
|
|
$56 = $ids;
|
|
$57 = ($56|0)!=(0|0);
|
|
$or$cond3 = $55 & $57;
|
|
if (!($or$cond3)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$58 = $vtx;
|
|
$59 = $0;
|
|
$60 = ((($59)) + 44|0);
|
|
$61 = HEAP32[$60>>2]|0;
|
|
$62 = ((($61)) + 32|0);
|
|
$63 = HEAP32[$62>>2]|0;
|
|
$64 = $58;
|
|
$65 = $63;
|
|
$66 = (($64) - ($65))|0;
|
|
$vertex_offset = $66;
|
|
$67 = $0;
|
|
$68 = ((($67)) + 44|0);
|
|
$69 = HEAP32[$68>>2]|0;
|
|
_nk_buffer_mark($69,0);
|
|
$70 = $2;
|
|
$71 = $70<<3;
|
|
$size = $71;
|
|
$72 = $0;
|
|
$73 = ((($72)) + 44|0);
|
|
$74 = HEAP32[$73>>2]|0;
|
|
$75 = $size;
|
|
$76 = (_nk_buffer_alloc($74,0,$75,4)|0);
|
|
$normals = $76;
|
|
$77 = $normals;
|
|
$78 = ($77|0)!=(0|0);
|
|
if (!($78)) {
|
|
___assert_fail((14365|0),(13400|0),5991,(14373|0));
|
|
// unreachable;
|
|
}
|
|
$79 = $normals;
|
|
$80 = ($79|0)!=(0|0);
|
|
if (!($80)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$81 = $0;
|
|
$82 = ((($81)) + 44|0);
|
|
$83 = HEAP32[$82>>2]|0;
|
|
$84 = ((($83)) + 32|0);
|
|
$85 = HEAP32[$84>>2]|0;
|
|
$86 = $vertex_offset;
|
|
$87 = (($85) + ($86)|0);
|
|
$vtx = $87;
|
|
$i = 2;
|
|
while(1) {
|
|
$88 = $i;
|
|
$89 = $2;
|
|
$90 = ($88>>>0)<($89>>>0);
|
|
if (!($90)) {
|
|
break;
|
|
}
|
|
$91 = $vtx_inner_idx;
|
|
$92 = $91&65535;
|
|
$93 = $ids;
|
|
HEAP16[$93>>1] = $92;
|
|
$94 = $vtx_inner_idx;
|
|
$95 = $i;
|
|
$96 = (($95) - 1)|0;
|
|
$97 = $96 << 1;
|
|
$98 = (($94) + ($97))|0;
|
|
$99 = $98&65535;
|
|
$100 = $ids;
|
|
$101 = ((($100)) + 2|0);
|
|
HEAP16[$101>>1] = $99;
|
|
$102 = $vtx_inner_idx;
|
|
$103 = $i;
|
|
$104 = $103 << 1;
|
|
$105 = (($102) + ($104))|0;
|
|
$106 = $105&65535;
|
|
$107 = $ids;
|
|
$108 = ((($107)) + 4|0);
|
|
HEAP16[$108>>1] = $106;
|
|
$109 = $ids;
|
|
$110 = ((($109)) + 6|0);
|
|
$ids = $110;
|
|
$111 = $i;
|
|
$112 = (($111) + 1)|0;
|
|
$i = $112;
|
|
}
|
|
$113 = $2;
|
|
$114 = (($113) - 1)|0;
|
|
$i0 = $114;
|
|
$i1 = 0;
|
|
while(1) {
|
|
$115 = $i1;
|
|
$116 = $2;
|
|
$117 = ($115>>>0)<($116>>>0);
|
|
if (!($117)) {
|
|
break;
|
|
}
|
|
$118 = $i0;
|
|
$119 = $1;
|
|
$120 = (($119) + ($118<<3)|0);
|
|
;HEAP32[$p0>>2]=HEAP32[$120>>2]|0;HEAP32[$p0+4>>2]=HEAP32[$120+4>>2]|0;
|
|
$121 = $i1;
|
|
$122 = $1;
|
|
$123 = (($122) + ($121<<3)|0);
|
|
;HEAP32[$p1>>2]=HEAP32[$123>>2]|0;HEAP32[$p1+4>>2]=HEAP32[$123+4>>2]|0;
|
|
$124 = +HEAPF32[$p1>>2];
|
|
$125 = +HEAPF32[$p0>>2];
|
|
$126 = $124 - $125;
|
|
$127 = ((($p1)) + 4|0);
|
|
$128 = +HEAPF32[$127>>2];
|
|
$129 = ((($p0)) + 4|0);
|
|
$130 = +HEAPF32[$129>>2];
|
|
$131 = $128 - $130;
|
|
_nk_vec2($diff,$126,$131);
|
|
$132 = +HEAPF32[$diff>>2];
|
|
$133 = +HEAPF32[$diff>>2];
|
|
$134 = $132 * $133;
|
|
$135 = ((($diff)) + 4|0);
|
|
$136 = +HEAPF32[$135>>2];
|
|
$137 = ((($diff)) + 4|0);
|
|
$138 = +HEAPF32[$137>>2];
|
|
$139 = $136 * $138;
|
|
$140 = $134 + $139;
|
|
$len = $140;
|
|
$141 = $len;
|
|
$142 = $141 != 0.0;
|
|
if ($142) {
|
|
$143 = $len;
|
|
$144 = (+_nk_inv_sqrt($143));
|
|
$len = $144;
|
|
} else {
|
|
$len = 1.0;
|
|
}
|
|
$145 = +HEAPF32[$diff>>2];
|
|
$146 = $len;
|
|
$147 = $145 * $146;
|
|
$148 = ((($diff)) + 4|0);
|
|
$149 = +HEAPF32[$148>>2];
|
|
$150 = $len;
|
|
$151 = $149 * $150;
|
|
_nk_vec2($4,$147,$151);
|
|
;HEAP32[$diff>>2]=HEAP32[$4>>2]|0;HEAP32[$diff+4>>2]=HEAP32[$4+4>>2]|0;
|
|
$152 = ((($diff)) + 4|0);
|
|
$153 = +HEAPF32[$152>>2];
|
|
$154 = $i0;
|
|
$155 = $normals;
|
|
$156 = (($155) + ($154<<3)|0);
|
|
HEAPF32[$156>>2] = $153;
|
|
$157 = +HEAPF32[$diff>>2];
|
|
$158 = -$157;
|
|
$159 = $i0;
|
|
$160 = $normals;
|
|
$161 = (($160) + ($159<<3)|0);
|
|
$162 = ((($161)) + 4|0);
|
|
HEAPF32[$162>>2] = $158;
|
|
$163 = $i1;
|
|
$164 = (($163) + 1)|0;
|
|
$i1 = $164;
|
|
$i0 = $163;
|
|
}
|
|
$165 = $2;
|
|
$166 = (($165) - 1)|0;
|
|
$i0 = $166;
|
|
$i1 = 0;
|
|
while(1) {
|
|
$167 = $i1;
|
|
$168 = $2;
|
|
$169 = ($167>>>0)<($168>>>0);
|
|
$170 = $0;
|
|
if (!($169)) {
|
|
break;
|
|
}
|
|
$171 = ((($170)) + 12|0);
|
|
$172 = ((($171)) + 4|0);
|
|
;HEAP32[$uv>>2]=HEAP32[$172>>2]|0;HEAP32[$uv+4>>2]=HEAP32[$172+4>>2]|0;
|
|
$173 = $i0;
|
|
$174 = $normals;
|
|
$175 = (($174) + ($173<<3)|0);
|
|
;HEAP32[$n0>>2]=HEAP32[$175>>2]|0;HEAP32[$n0+4>>2]=HEAP32[$175+4>>2]|0;
|
|
$176 = $i1;
|
|
$177 = $normals;
|
|
$178 = (($177) + ($176<<3)|0);
|
|
;HEAP32[$n1>>2]=HEAP32[$178>>2]|0;HEAP32[$n1+4>>2]=HEAP32[$178+4>>2]|0;
|
|
$179 = +HEAPF32[$n0>>2];
|
|
$180 = +HEAPF32[$n1>>2];
|
|
$181 = $179 + $180;
|
|
$182 = ((($n0)) + 4|0);
|
|
$183 = +HEAPF32[$182>>2];
|
|
$184 = ((($n1)) + 4|0);
|
|
$185 = +HEAPF32[$184>>2];
|
|
$186 = $183 + $185;
|
|
_nk_vec2($5,$181,$186);
|
|
$187 = +HEAPF32[$5>>2];
|
|
$188 = $187 * 0.5;
|
|
$189 = +HEAPF32[$n0>>2];
|
|
$190 = +HEAPF32[$n1>>2];
|
|
$191 = $189 + $190;
|
|
$192 = ((($n0)) + 4|0);
|
|
$193 = +HEAPF32[$192>>2];
|
|
$194 = ((($n1)) + 4|0);
|
|
$195 = +HEAPF32[$194>>2];
|
|
$196 = $193 + $195;
|
|
_nk_vec2($6,$191,$196);
|
|
$197 = ((($6)) + 4|0);
|
|
$198 = +HEAPF32[$197>>2];
|
|
$199 = $198 * 0.5;
|
|
_nk_vec2($dm,$188,$199);
|
|
$200 = +HEAPF32[$dm>>2];
|
|
$201 = +HEAPF32[$dm>>2];
|
|
$202 = $200 * $201;
|
|
$203 = ((($dm)) + 4|0);
|
|
$204 = +HEAPF32[$203>>2];
|
|
$205 = ((($dm)) + 4|0);
|
|
$206 = +HEAPF32[$205>>2];
|
|
$207 = $204 * $206;
|
|
$208 = $202 + $207;
|
|
$dmr2 = $208;
|
|
$209 = $dmr2;
|
|
$210 = $209 > 9.9999999747524271E-7;
|
|
if ($210) {
|
|
$211 = $dmr2;
|
|
$212 = 1.0 / $211;
|
|
$scale = $212;
|
|
$213 = $scale;
|
|
$214 = $213 < 100.0;
|
|
$215 = $scale;
|
|
$216 = $214 ? $215 : 100.0;
|
|
$scale = $216;
|
|
$217 = +HEAPF32[$dm>>2];
|
|
$218 = $scale;
|
|
$219 = $217 * $218;
|
|
$220 = ((($dm)) + 4|0);
|
|
$221 = +HEAPF32[$220>>2];
|
|
$222 = $scale;
|
|
$223 = $221 * $222;
|
|
_nk_vec2($7,$219,$223);
|
|
;HEAP32[$dm>>2]=HEAP32[$7>>2]|0;HEAP32[$dm+4>>2]=HEAP32[$7+4>>2]|0;
|
|
}
|
|
$224 = +HEAPF32[$dm>>2];
|
|
$225 = $224 * 0.5;
|
|
$226 = ((($dm)) + 4|0);
|
|
$227 = +HEAPF32[$226>>2];
|
|
$228 = $227 * 0.5;
|
|
_nk_vec2($8,$225,$228);
|
|
;HEAP32[$dm>>2]=HEAP32[$8>>2]|0;HEAP32[$dm+4>>2]=HEAP32[$8+4>>2]|0;
|
|
$229 = $vtx;
|
|
$230 = $i1;
|
|
$231 = $1;
|
|
$232 = (($231) + ($230<<3)|0);
|
|
$233 = +HEAPF32[$232>>2];
|
|
$234 = +HEAPF32[$dm>>2];
|
|
$235 = $233 - $234;
|
|
$236 = $i1;
|
|
$237 = $1;
|
|
$238 = (($237) + ($236<<3)|0);
|
|
$239 = ((($238)) + 4|0);
|
|
$240 = +HEAPF32[$239>>2];
|
|
$241 = ((($dm)) + 4|0);
|
|
$242 = +HEAPF32[$241>>2];
|
|
$243 = $240 - $242;
|
|
_nk_vec2($9,$235,$243);
|
|
$244 = $col;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$9>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$9+4>>2]|0;
|
|
;HEAP32[$uv$byval_copy>>2]=HEAP32[$uv>>2]|0;HEAP32[$uv$byval_copy+4>>2]=HEAP32[$uv+4>>2]|0;
|
|
_nk_draw_vertex($10,$$byval_copy,$uv$byval_copy,$244);
|
|
;HEAP32[$229>>2]=HEAP32[$10>>2]|0;HEAP32[$229+4>>2]=HEAP32[$10+4>>2]|0;HEAP32[$229+8>>2]=HEAP32[$10+8>>2]|0;HEAP32[$229+12>>2]=HEAP32[$10+12>>2]|0;HEAP32[$229+16>>2]=HEAP32[$10+16>>2]|0;
|
|
$245 = $vtx;
|
|
$246 = ((($245)) + 20|0);
|
|
$247 = $i1;
|
|
$248 = $1;
|
|
$249 = (($248) + ($247<<3)|0);
|
|
$250 = +HEAPF32[$249>>2];
|
|
$251 = +HEAPF32[$dm>>2];
|
|
$252 = $250 + $251;
|
|
$253 = $i1;
|
|
$254 = $1;
|
|
$255 = (($254) + ($253<<3)|0);
|
|
$256 = ((($255)) + 4|0);
|
|
$257 = +HEAPF32[$256>>2];
|
|
$258 = ((($dm)) + 4|0);
|
|
$259 = +HEAPF32[$258>>2];
|
|
$260 = $257 + $259;
|
|
_nk_vec2($11,$252,$260);
|
|
$261 = $col_trans;
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$11>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$11+4>>2]|0;
|
|
;HEAP32[$uv$byval_copy7>>2]=HEAP32[$uv>>2]|0;HEAP32[$uv$byval_copy7+4>>2]=HEAP32[$uv+4>>2]|0;
|
|
_nk_draw_vertex($12,$$byval_copy6,$uv$byval_copy7,$261);
|
|
;HEAP32[$246>>2]=HEAP32[$12>>2]|0;HEAP32[$246+4>>2]=HEAP32[$12+4>>2]|0;HEAP32[$246+8>>2]=HEAP32[$12+8>>2]|0;HEAP32[$246+12>>2]=HEAP32[$12+12>>2]|0;HEAP32[$246+16>>2]=HEAP32[$12+16>>2]|0;
|
|
$262 = $vtx;
|
|
$263 = ((($262)) + 40|0);
|
|
$vtx = $263;
|
|
$264 = $vtx_inner_idx;
|
|
$265 = $i1;
|
|
$266 = $265 << 1;
|
|
$267 = (($264) + ($266))|0;
|
|
$268 = $267&65535;
|
|
$269 = $ids;
|
|
HEAP16[$269>>1] = $268;
|
|
$270 = $vtx_inner_idx;
|
|
$271 = $i0;
|
|
$272 = $271 << 1;
|
|
$273 = (($270) + ($272))|0;
|
|
$274 = $273&65535;
|
|
$275 = $ids;
|
|
$276 = ((($275)) + 2|0);
|
|
HEAP16[$276>>1] = $274;
|
|
$277 = $vtx_outer_idx;
|
|
$278 = $i0;
|
|
$279 = $278 << 1;
|
|
$280 = (($277) + ($279))|0;
|
|
$281 = $280&65535;
|
|
$282 = $ids;
|
|
$283 = ((($282)) + 4|0);
|
|
HEAP16[$283>>1] = $281;
|
|
$284 = $vtx_outer_idx;
|
|
$285 = $i0;
|
|
$286 = $285 << 1;
|
|
$287 = (($284) + ($286))|0;
|
|
$288 = $287&65535;
|
|
$289 = $ids;
|
|
$290 = ((($289)) + 6|0);
|
|
HEAP16[$290>>1] = $288;
|
|
$291 = $vtx_outer_idx;
|
|
$292 = $i1;
|
|
$293 = $292 << 1;
|
|
$294 = (($291) + ($293))|0;
|
|
$295 = $294&65535;
|
|
$296 = $ids;
|
|
$297 = ((($296)) + 8|0);
|
|
HEAP16[$297>>1] = $295;
|
|
$298 = $vtx_inner_idx;
|
|
$299 = $i1;
|
|
$300 = $299 << 1;
|
|
$301 = (($298) + ($300))|0;
|
|
$302 = $301&65535;
|
|
$303 = $ids;
|
|
$304 = ((($303)) + 10|0);
|
|
HEAP16[$304>>1] = $302;
|
|
$305 = $ids;
|
|
$306 = ((($305)) + 12|0);
|
|
$ids = $306;
|
|
$307 = $i1;
|
|
$308 = (($307) + 1)|0;
|
|
$i1 = $308;
|
|
$i0 = $307;
|
|
}
|
|
$309 = ((($170)) + 44|0);
|
|
$310 = HEAP32[$309>>2]|0;
|
|
_nk_buffer_reset($310,0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_path_clear($list) {
|
|
$list = $list|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $list;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((14300|0),(13400|0),6075,(14403|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$6 = ((($5)) + 40|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
_nk_buffer_reset($7,0);
|
|
$8 = $0;
|
|
$9 = ((($8)) + 68|0);
|
|
HEAP32[$9>>2] = 0;
|
|
$10 = $0;
|
|
$11 = ((($10)) + 72|0);
|
|
HEAP32[$11>>2] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_path_line_to($list,$pos) {
|
|
$list = $list|0;
|
|
$pos = $pos|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cmd = 0, $nk_null_rect$byval_copy = 0, $points = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 32|0;
|
|
$nk_null_rect$byval_copy = sp + 16|0;
|
|
$0 = $list;
|
|
$points = 0;
|
|
$cmd = 0;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((14300|0),(13400|0),6087,(14427|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$6 = ((($5)) + 64|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = ($7|0)!=(0);
|
|
if (!($8)) {
|
|
$9 = $0;
|
|
;HEAP32[$nk_null_rect$byval_copy>>2]=HEAP32[8>>2]|0;HEAP32[$nk_null_rect$byval_copy+4>>2]=HEAP32[8+4>>2]|0;HEAP32[$nk_null_rect$byval_copy+8>>2]=HEAP32[8+8>>2]|0;HEAP32[$nk_null_rect$byval_copy+12>>2]=HEAP32[8+12>>2]|0;
|
|
_nk_draw_list_add_clip($9,$nk_null_rect$byval_copy);
|
|
}
|
|
$10 = $0;
|
|
$11 = (_nk_draw_list_command_last($10)|0);
|
|
$cmd = $11;
|
|
$12 = $cmd;
|
|
$13 = ($12|0)!=(0|0);
|
|
if ($13) {
|
|
$14 = $cmd;
|
|
$15 = ((($14)) + 20|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = $0;
|
|
$18 = ((($17)) + 12|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = ($16|0)!=($19|0);
|
|
if ($20) {
|
|
$21 = $0;
|
|
$22 = $0;
|
|
$23 = ((($22)) + 12|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$23>>2]|0;
|
|
_nk_draw_list_push_image($21,$$byval_copy);
|
|
}
|
|
}
|
|
$24 = $0;
|
|
$25 = (_nk_draw_list_alloc_path($24,1)|0);
|
|
$points = $25;
|
|
$26 = $points;
|
|
$27 = ($26|0)!=(0|0);
|
|
if (!($27)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$28 = $points;
|
|
;HEAP32[$28>>2]=HEAP32[$pos>>2]|0;HEAP32[$28+4>>2]=HEAP32[$pos+4>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_add_clip($list,$rect) {
|
|
$list = $list|0;
|
|
$rect = $rect|0;
|
|
var $$byval_copy = 0, $$byval_copy2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
|
|
var $7 = 0, $8 = 0, $9 = 0, $prev = 0, $rect$byval_copy = 0, $rect$byval_copy1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy2 = sp + 48|0;
|
|
$rect$byval_copy1 = sp + 32|0;
|
|
$$byval_copy = sp + 24|0;
|
|
$rect$byval_copy = sp + 8|0;
|
|
$0 = $list;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((14300|0),(13400|0),5612,(29952|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$6 = ((($5)) + 64|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = ($7|0)!=(0);
|
|
$9 = $0;
|
|
if (!($8)) {
|
|
$10 = $0;
|
|
$11 = ((($10)) + 12|0);
|
|
;HEAP32[$rect$byval_copy>>2]=HEAP32[$rect>>2]|0;HEAP32[$rect$byval_copy+4>>2]=HEAP32[$rect+4>>2]|0;HEAP32[$rect$byval_copy+8>>2]=HEAP32[$rect+8>>2]|0;HEAP32[$rect$byval_copy+12>>2]=HEAP32[$rect+12>>2]|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$11>>2]|0;
|
|
(_nk_draw_list_push_command($9,$rect$byval_copy,$$byval_copy)|0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
$12 = (_nk_draw_list_command_last($9)|0);
|
|
$prev = $12;
|
|
$13 = $prev;
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = ($14|0)==(0);
|
|
if ($15) {
|
|
$16 = $prev;
|
|
$17 = ((($16)) + 4|0);
|
|
;HEAP32[$17>>2]=HEAP32[$rect>>2]|0;HEAP32[$17+4>>2]=HEAP32[$rect+4>>2]|0;HEAP32[$17+8>>2]=HEAP32[$rect+8>>2]|0;HEAP32[$17+12>>2]=HEAP32[$rect+12>>2]|0;
|
|
}
|
|
$18 = $0;
|
|
$19 = $prev;
|
|
$20 = ((($19)) + 20|0);
|
|
;HEAP32[$rect$byval_copy1>>2]=HEAP32[$rect>>2]|0;HEAP32[$rect$byval_copy1+4>>2]=HEAP32[$rect+4>>2]|0;HEAP32[$rect$byval_copy1+8>>2]=HEAP32[$rect+8>>2]|0;HEAP32[$rect$byval_copy1+12>>2]=HEAP32[$rect+12>>2]|0;
|
|
;HEAP32[$$byval_copy2>>2]=HEAP32[$20>>2]|0;
|
|
(_nk_draw_list_push_command($18,$rect$byval_copy1,$$byval_copy2)|0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_command_last($list) {
|
|
$list = $list|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cmd = 0, $memory = 0, $size = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $list;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 64|0);
|
|
$3 = HEAP32[$2>>2]|0;
|
|
$4 = ($3|0)!=(0);
|
|
if ($4) {
|
|
$5 = $0;
|
|
$6 = ((($5)) + 40|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = (_nk_buffer_memory($7)|0);
|
|
$memory = $8;
|
|
$9 = $0;
|
|
$10 = ((($9)) + 40|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = (_nk_buffer_total($11)|0);
|
|
$size = $12;
|
|
$13 = $memory;
|
|
$14 = $size;
|
|
$15 = $0;
|
|
$16 = ((($15)) + 60|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = (($14) - ($17))|0;
|
|
$19 = (($13) + ($18)|0);
|
|
$cmd = $19;
|
|
$20 = $cmd;
|
|
$21 = $0;
|
|
$22 = ((($21)) + 64|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$24 = (($23) - 1)|0;
|
|
$25 = (0 - ($24))|0;
|
|
$26 = (($20) + (($25*24)|0)|0);
|
|
STACKTOP = sp;return ($26|0);
|
|
} else {
|
|
___assert_fail((30000|0),(13400|0),5601,(30016|0));
|
|
// unreachable;
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_draw_list_push_image($list,$texture) {
|
|
$list = $list|0;
|
|
$texture = $texture|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
|
|
var $7 = 0, $8 = 0, $9 = 0, $nk_null_rect$byval_copy = 0, $prev = 0, $texture$byval_copy = 0, $texture$byval_copy1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$texture$byval_copy1 = sp + 48|0;
|
|
$$byval_copy = sp + 32|0;
|
|
$texture$byval_copy = sp + 24|0;
|
|
$nk_null_rect$byval_copy = sp + 8|0;
|
|
$0 = $list;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((14300|0),(13400|0),5627,(30042|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$6 = ((($5)) + 64|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = ($7|0)!=(0);
|
|
$9 = $0;
|
|
if (!($8)) {
|
|
;HEAP32[$nk_null_rect$byval_copy>>2]=HEAP32[8>>2]|0;HEAP32[$nk_null_rect$byval_copy+4>>2]=HEAP32[8+4>>2]|0;HEAP32[$nk_null_rect$byval_copy+8>>2]=HEAP32[8+8>>2]|0;HEAP32[$nk_null_rect$byval_copy+12>>2]=HEAP32[8+12>>2]|0;
|
|
;HEAP32[$texture$byval_copy>>2]=HEAP32[$texture>>2]|0;
|
|
(_nk_draw_list_push_command($9,$nk_null_rect$byval_copy,$texture$byval_copy)|0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
$10 = (_nk_draw_list_command_last($9)|0);
|
|
$prev = $10;
|
|
$11 = $prev;
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ($12|0)==(0);
|
|
$14 = $prev;
|
|
$15 = ((($14)) + 20|0);
|
|
if ($13) {
|
|
;HEAP32[$15>>2]=HEAP32[$texture>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = HEAP32[$texture>>2]|0;
|
|
$18 = ($16|0)!=($17|0);
|
|
if (!($18)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$19 = $0;
|
|
$20 = $prev;
|
|
$21 = ((($20)) + 4|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$21>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$21+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$21+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$21+12>>2]|0;
|
|
;HEAP32[$texture$byval_copy1>>2]=HEAP32[$texture>>2]|0;
|
|
(_nk_draw_list_push_command($19,$$byval_copy,$texture$byval_copy1)|0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_alloc_path($list,$count) {
|
|
$list = $list|0;
|
|
$count = $count|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $memory = 0, $points = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $list;
|
|
$2 = $count;
|
|
$3 = $1;
|
|
$4 = ((($3)) + 40|0);
|
|
$5 = HEAP32[$4>>2]|0;
|
|
$6 = $2;
|
|
$7 = $6<<3;
|
|
$8 = (_nk_buffer_alloc($5,0,$7,4)|0);
|
|
$points = $8;
|
|
$9 = $points;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
$0 = 0;
|
|
$32 = $0;
|
|
STACKTOP = sp;return ($32|0);
|
|
}
|
|
$11 = $1;
|
|
$12 = ((($11)) + 72|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ($13|0)!=(0);
|
|
if (!($14)) {
|
|
$15 = $1;
|
|
$16 = ((($15)) + 40|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = (_nk_buffer_memory($17)|0);
|
|
$memory = $18;
|
|
$19 = $points;
|
|
$20 = $memory;
|
|
$21 = $19;
|
|
$22 = $20;
|
|
$23 = (($21) - ($22))|0;
|
|
$24 = $1;
|
|
$25 = ((($24)) + 72|0);
|
|
HEAP32[$25>>2] = $23;
|
|
}
|
|
$26 = $2;
|
|
$27 = $1;
|
|
$28 = ((($27)) + 68|0);
|
|
$29 = HEAP32[$28>>2]|0;
|
|
$30 = (($29) + ($26))|0;
|
|
HEAP32[$28>>2] = $30;
|
|
$31 = $points;
|
|
$0 = $31;
|
|
$32 = $0;
|
|
STACKTOP = sp;return ($32|0);
|
|
}
|
|
function _nk_draw_list_path_arc_to_fast($list,$center,$radius,$a_min,$a_max) {
|
|
$list = $list|0;
|
|
$center = $center|0;
|
|
$radius = +$radius;
|
|
$a_min = $a_min|0;
|
|
$a_max = $a_max|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0;
|
|
var $26 = 0, $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0;
|
|
var $c = 0, $x = 0.0, $y = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 48|0;
|
|
$c = sp + 16|0;
|
|
$4 = sp;
|
|
$0 = $list;
|
|
$1 = $radius;
|
|
$2 = $a_min;
|
|
$3 = $a_max;
|
|
$5 = $0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((14300|0),(13400|0),6105,(14453|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $0;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$9 = $2;
|
|
$10 = $3;
|
|
$11 = ($9|0)<=($10|0);
|
|
if (!($11)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$a = 0;
|
|
$12 = $2;
|
|
$a = $12;
|
|
while(1) {
|
|
$13 = $a;
|
|
$14 = $3;
|
|
$15 = ($13|0)<=($14|0);
|
|
if (!($15)) {
|
|
break;
|
|
}
|
|
$16 = $a;
|
|
$17 = (($16>>>0) % 12)&-1;
|
|
$18 = $0;
|
|
$19 = ((($18)) + 76|0);
|
|
$20 = (($19) + ($17<<3)|0);
|
|
;HEAP32[$c>>2]=HEAP32[$20>>2]|0;HEAP32[$c+4>>2]=HEAP32[$20+4>>2]|0;
|
|
$21 = +HEAPF32[$center>>2];
|
|
$22 = +HEAPF32[$c>>2];
|
|
$23 = $1;
|
|
$24 = $22 * $23;
|
|
$25 = $21 + $24;
|
|
$x = $25;
|
|
$26 = ((($center)) + 4|0);
|
|
$27 = +HEAPF32[$26>>2];
|
|
$28 = ((($c)) + 4|0);
|
|
$29 = +HEAPF32[$28>>2];
|
|
$30 = $1;
|
|
$31 = $29 * $30;
|
|
$32 = $27 + $31;
|
|
$y = $32;
|
|
$33 = $0;
|
|
$34 = $x;
|
|
$35 = $y;
|
|
_nk_vec2($4,$34,$35);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;
|
|
_nk_draw_list_path_line_to($33,$$byval_copy);
|
|
$36 = $a;
|
|
$37 = (($36) + 1)|0;
|
|
$a = $37;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_path_arc_to($list,$center,$radius,$a_min,$a_max,$segments) {
|
|
$list = $list|0;
|
|
$center = $center|0;
|
|
$radius = +$radius;
|
|
$a_min = +$a_min;
|
|
$a_max = +$a_max;
|
|
$segments = $segments|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0.0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0;
|
|
var $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0;
|
|
var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0.0, $i = 0, $or$cond = 0, $x = 0.0, $y = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 48|0;
|
|
$5 = sp;
|
|
$0 = $list;
|
|
$1 = $radius;
|
|
$2 = $a_min;
|
|
$3 = $a_max;
|
|
$4 = $segments;
|
|
$i = 0;
|
|
$6 = $0;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((14300|0),(13400|0),6123,(14483|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $0;
|
|
$9 = ($8|0)==(0|0);
|
|
$10 = $1;
|
|
$11 = $10 == 0.0;
|
|
$or$cond = $9 | $11;
|
|
if ($or$cond) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$i = 0;
|
|
while(1) {
|
|
$12 = $i;
|
|
$13 = $4;
|
|
$14 = ($12>>>0)<=($13>>>0);
|
|
if (!($14)) {
|
|
break;
|
|
}
|
|
$15 = $2;
|
|
$16 = $i;
|
|
$17 = (+($16>>>0));
|
|
$18 = $4;
|
|
$19 = (+($18>>>0));
|
|
$20 = $17 / $19;
|
|
$21 = $3;
|
|
$22 = $2;
|
|
$23 = $21 - $22;
|
|
$24 = $20 * $23;
|
|
$25 = $15 + $24;
|
|
$a = $25;
|
|
$26 = +HEAPF32[$center>>2];
|
|
$27 = $a;
|
|
$28 = (+_nk_cos($27));
|
|
$29 = $1;
|
|
$30 = $28 * $29;
|
|
$31 = $26 + $30;
|
|
$x = $31;
|
|
$32 = ((($center)) + 4|0);
|
|
$33 = +HEAPF32[$32>>2];
|
|
$34 = $a;
|
|
$35 = (+_nk_sin($34));
|
|
$36 = $1;
|
|
$37 = $35 * $36;
|
|
$38 = $33 + $37;
|
|
$y = $38;
|
|
$39 = $0;
|
|
$40 = $x;
|
|
$41 = $y;
|
|
_nk_vec2($5,$40,$41);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$5+4>>2]|0;
|
|
_nk_draw_list_path_line_to($39,$$byval_copy);
|
|
$42 = $i;
|
|
$43 = (($42) + 1)|0;
|
|
$i = $43;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_path_rect_to($list,$a,$b,$rounding) {
|
|
$list = $list|0;
|
|
$a = $a|0;
|
|
$b = $b|0;
|
|
$rounding = +$rounding;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $0 = 0, $1 = 0.0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0, $108 = 0.0, $109 = 0.0, $11 = 0;
|
|
var $110 = 0.0, $111 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0;
|
|
var $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0, $45 = 0.0, $46 = 0.0;
|
|
var $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0, $54 = 0.0, $55 = 0.0, $56 = 0, $57 = 0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0;
|
|
var $65 = 0.0, $66 = 0, $67 = 0, $68 = 0, $69 = 0.0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0, $73 = 0, $74 = 0.0, $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0.0;
|
|
var $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0, $9 = 0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0, $99 = 0.0, $a$byval_copy = 0, $b$byval_copy = 0;
|
|
var $r = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy5 = sp + 120|0;
|
|
$$byval_copy4 = sp + 112|0;
|
|
$$byval_copy3 = sp + 104|0;
|
|
$$byval_copy2 = sp + 96|0;
|
|
$$byval_copy1 = sp + 88|0;
|
|
$b$byval_copy = sp + 80|0;
|
|
$$byval_copy = sp + 72|0;
|
|
$a$byval_copy = sp + 64|0;
|
|
$2 = sp + 40|0;
|
|
$3 = sp + 32|0;
|
|
$4 = sp + 24|0;
|
|
$5 = sp + 16|0;
|
|
$6 = sp + 8|0;
|
|
$7 = sp;
|
|
$0 = $list;
|
|
$1 = $rounding;
|
|
$8 = $0;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
___assert_fail((14300|0),(13400|0),6139,(14508|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $0;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$12 = $1;
|
|
$r = $12;
|
|
$13 = $r;
|
|
$14 = +HEAPF32[$b>>2];
|
|
$15 = +HEAPF32[$a>>2];
|
|
$16 = $14 - $15;
|
|
$17 = $16 < 0.0;
|
|
$18 = +HEAPF32[$b>>2];
|
|
$19 = +HEAPF32[$a>>2];
|
|
$20 = $18 - $19;
|
|
$21 = -$20;
|
|
$22 = $17 ? $21 : $20;
|
|
$23 = $13 < $22;
|
|
if ($23) {
|
|
$24 = $r;
|
|
$34 = $24;
|
|
} else {
|
|
$25 = +HEAPF32[$b>>2];
|
|
$26 = +HEAPF32[$a>>2];
|
|
$27 = $25 - $26;
|
|
$28 = $27 < 0.0;
|
|
$29 = +HEAPF32[$b>>2];
|
|
$30 = +HEAPF32[$a>>2];
|
|
$31 = $29 - $30;
|
|
$32 = -$31;
|
|
$33 = $28 ? $32 : $31;
|
|
$34 = $33;
|
|
}
|
|
$r = $34;
|
|
$35 = $r;
|
|
$36 = ((($b)) + 4|0);
|
|
$37 = +HEAPF32[$36>>2];
|
|
$38 = ((($a)) + 4|0);
|
|
$39 = +HEAPF32[$38>>2];
|
|
$40 = $37 - $39;
|
|
$41 = $40 < 0.0;
|
|
$42 = ((($b)) + 4|0);
|
|
$43 = +HEAPF32[$42>>2];
|
|
$44 = ((($a)) + 4|0);
|
|
$45 = +HEAPF32[$44>>2];
|
|
$46 = $43 - $45;
|
|
$47 = -$46;
|
|
$48 = $41 ? $47 : $46;
|
|
$49 = $35 < $48;
|
|
if ($49) {
|
|
$50 = $r;
|
|
$64 = $50;
|
|
} else {
|
|
$51 = ((($b)) + 4|0);
|
|
$52 = +HEAPF32[$51>>2];
|
|
$53 = ((($a)) + 4|0);
|
|
$54 = +HEAPF32[$53>>2];
|
|
$55 = $52 - $54;
|
|
$56 = $55 < 0.0;
|
|
$57 = ((($b)) + 4|0);
|
|
$58 = +HEAPF32[$57>>2];
|
|
$59 = ((($a)) + 4|0);
|
|
$60 = +HEAPF32[$59>>2];
|
|
$61 = $58 - $60;
|
|
$62 = -$61;
|
|
$63 = $56 ? $62 : $61;
|
|
$64 = $63;
|
|
}
|
|
$r = $64;
|
|
$65 = $r;
|
|
$66 = $65 == 0.0;
|
|
$67 = $0;
|
|
if ($66) {
|
|
;HEAP32[$a$byval_copy>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy+4>>2]=HEAP32[$a+4>>2]|0;
|
|
_nk_draw_list_path_line_to($67,$a$byval_copy);
|
|
$68 = $0;
|
|
$69 = +HEAPF32[$b>>2];
|
|
$70 = ((($a)) + 4|0);
|
|
$71 = +HEAPF32[$70>>2];
|
|
_nk_vec2($2,$69,$71);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
|
|
_nk_draw_list_path_line_to($68,$$byval_copy);
|
|
$72 = $0;
|
|
;HEAP32[$b$byval_copy>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy+4>>2]=HEAP32[$b+4>>2]|0;
|
|
_nk_draw_list_path_line_to($72,$b$byval_copy);
|
|
$73 = $0;
|
|
$74 = +HEAPF32[$a>>2];
|
|
$75 = ((($b)) + 4|0);
|
|
$76 = +HEAPF32[$75>>2];
|
|
_nk_vec2($3,$74,$76);
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$3+4>>2]|0;
|
|
_nk_draw_list_path_line_to($73,$$byval_copy1);
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$77 = +HEAPF32[$a>>2];
|
|
$78 = $r;
|
|
$79 = $77 + $78;
|
|
$80 = ((($a)) + 4|0);
|
|
$81 = +HEAPF32[$80>>2];
|
|
$82 = $r;
|
|
$83 = $81 + $82;
|
|
_nk_vec2($4,$79,$83);
|
|
$84 = $r;
|
|
;HEAP32[$$byval_copy2>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$4+4>>2]|0;
|
|
_nk_draw_list_path_arc_to_fast($67,$$byval_copy2,$84,6,9);
|
|
$85 = $0;
|
|
$86 = +HEAPF32[$b>>2];
|
|
$87 = $r;
|
|
$88 = $86 - $87;
|
|
$89 = ((($a)) + 4|0);
|
|
$90 = +HEAPF32[$89>>2];
|
|
$91 = $r;
|
|
$92 = $90 + $91;
|
|
_nk_vec2($5,$88,$92);
|
|
$93 = $r;
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$5+4>>2]|0;
|
|
_nk_draw_list_path_arc_to_fast($85,$$byval_copy3,$93,9,12);
|
|
$94 = $0;
|
|
$95 = +HEAPF32[$b>>2];
|
|
$96 = $r;
|
|
$97 = $95 - $96;
|
|
$98 = ((($b)) + 4|0);
|
|
$99 = +HEAPF32[$98>>2];
|
|
$100 = $r;
|
|
$101 = $99 - $100;
|
|
_nk_vec2($6,$97,$101);
|
|
$102 = $r;
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$6+4>>2]|0;
|
|
_nk_draw_list_path_arc_to_fast($94,$$byval_copy4,$102,0,3);
|
|
$103 = $0;
|
|
$104 = +HEAPF32[$a>>2];
|
|
$105 = $r;
|
|
$106 = $104 + $105;
|
|
$107 = ((($b)) + 4|0);
|
|
$108 = +HEAPF32[$107>>2];
|
|
$109 = $r;
|
|
$110 = $108 - $109;
|
|
_nk_vec2($7,$106,$110);
|
|
$111 = $r;
|
|
;HEAP32[$$byval_copy5>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$7+4>>2]|0;
|
|
_nk_draw_list_path_arc_to_fast($103,$$byval_copy5,$111,3,6);
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_draw_list_path_curve_to($list,$p2,$p3,$p4,$num_segments) {
|
|
$list = $list|0;
|
|
$p2 = $p2|0;
|
|
$p3 = $p3|0;
|
|
$p4 = $p4|0;
|
|
$num_segments = $num_segments|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0;
|
|
var $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0;
|
|
var $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0;
|
|
var $80 = 0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0, $9 = 0, $90 = 0.0, $91 = 0.0, $92 = 0, $93 = 0, $i_step = 0, $p1 = 0, $t = 0.0, $t_step = 0.0, $u = 0.0;
|
|
var $w1 = 0.0, $w2 = 0.0, $w3 = 0.0, $w4 = 0.0, $x = 0.0, $y = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 72|0;
|
|
$p1 = sp + 48|0;
|
|
$2 = sp + 40|0;
|
|
$3 = sp;
|
|
$0 = $list;
|
|
$1 = $num_segments;
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((14300|0),(13400|0),6166,(14534|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $0;
|
|
$7 = ((($6)) + 68|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = ($8|0)!=(0);
|
|
if (!($9)) {
|
|
___assert_fail((14561|0),(13400|0),6167,(14534|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $0;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$12 = $0;
|
|
$13 = ((($12)) + 68|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = ($14|0)!=(0);
|
|
if (!($15)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$16 = $1;
|
|
$17 = ($16>>>0)<(1);
|
|
$18 = $1;
|
|
$19 = $17 ? 1 : $18;
|
|
$1 = $19;
|
|
$20 = $0;
|
|
_nk_draw_list_path_last($2,$20);
|
|
;HEAP32[$p1>>2]=HEAP32[$2>>2]|0;HEAP32[$p1+4>>2]=HEAP32[$2+4>>2]|0;
|
|
$21 = $1;
|
|
$22 = (+($21>>>0));
|
|
$23 = 1.0 / $22;
|
|
$t_step = $23;
|
|
$i_step = 1;
|
|
while(1) {
|
|
$24 = $i_step;
|
|
$25 = $1;
|
|
$26 = ($24>>>0)<=($25>>>0);
|
|
if (!($26)) {
|
|
break;
|
|
}
|
|
$27 = $t_step;
|
|
$28 = $i_step;
|
|
$29 = (+($28>>>0));
|
|
$30 = $27 * $29;
|
|
$t = $30;
|
|
$31 = $t;
|
|
$32 = 1.0 - $31;
|
|
$u = $32;
|
|
$33 = $u;
|
|
$34 = $u;
|
|
$35 = $33 * $34;
|
|
$36 = $u;
|
|
$37 = $35 * $36;
|
|
$w1 = $37;
|
|
$38 = $u;
|
|
$39 = 3.0 * $38;
|
|
$40 = $u;
|
|
$41 = $39 * $40;
|
|
$42 = $t;
|
|
$43 = $41 * $42;
|
|
$w2 = $43;
|
|
$44 = $u;
|
|
$45 = 3.0 * $44;
|
|
$46 = $t;
|
|
$47 = $45 * $46;
|
|
$48 = $t;
|
|
$49 = $47 * $48;
|
|
$w3 = $49;
|
|
$50 = $t;
|
|
$51 = $t;
|
|
$52 = $50 * $51;
|
|
$53 = $t;
|
|
$54 = $52 * $53;
|
|
$w4 = $54;
|
|
$55 = $w1;
|
|
$56 = +HEAPF32[$p1>>2];
|
|
$57 = $55 * $56;
|
|
$58 = $w2;
|
|
$59 = +HEAPF32[$p2>>2];
|
|
$60 = $58 * $59;
|
|
$61 = $57 + $60;
|
|
$62 = $w3;
|
|
$63 = +HEAPF32[$p3>>2];
|
|
$64 = $62 * $63;
|
|
$65 = $61 + $64;
|
|
$66 = $w4;
|
|
$67 = +HEAPF32[$p4>>2];
|
|
$68 = $66 * $67;
|
|
$69 = $65 + $68;
|
|
$x = $69;
|
|
$70 = $w1;
|
|
$71 = ((($p1)) + 4|0);
|
|
$72 = +HEAPF32[$71>>2];
|
|
$73 = $70 * $72;
|
|
$74 = $w2;
|
|
$75 = ((($p2)) + 4|0);
|
|
$76 = +HEAPF32[$75>>2];
|
|
$77 = $74 * $76;
|
|
$78 = $73 + $77;
|
|
$79 = $w3;
|
|
$80 = ((($p3)) + 4|0);
|
|
$81 = +HEAPF32[$80>>2];
|
|
$82 = $79 * $81;
|
|
$83 = $78 + $82;
|
|
$84 = $w4;
|
|
$85 = ((($p4)) + 4|0);
|
|
$86 = +HEAPF32[$85>>2];
|
|
$87 = $84 * $86;
|
|
$88 = $83 + $87;
|
|
$y = $88;
|
|
$89 = $0;
|
|
$90 = $x;
|
|
$91 = $y;
|
|
_nk_vec2($3,$90,$91);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
|
|
_nk_draw_list_path_line_to($89,$$byval_copy);
|
|
$92 = $i_step;
|
|
$93 = (($92) + 1)|0;
|
|
$i_step = $93;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_path_last($agg$result,$list) {
|
|
$agg$result = $agg$result|0;
|
|
$list = $list|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
|
|
var $9 = 0, $memory = 0, $point = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $list;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 68|0);
|
|
$3 = HEAP32[$2>>2]|0;
|
|
$4 = ($3|0)!=(0);
|
|
if ($4) {
|
|
$5 = $0;
|
|
$6 = ((($5)) + 40|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = (_nk_buffer_memory($7)|0);
|
|
$memory = $8;
|
|
$9 = $memory;
|
|
$10 = $0;
|
|
$11 = ((($10)) + 72|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = (($9) + ($12)|0);
|
|
$point = $13;
|
|
$14 = $0;
|
|
$15 = ((($14)) + 68|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = (($16) - 1)|0;
|
|
$18 = $point;
|
|
$19 = (($18) + ($17<<3)|0);
|
|
$point = $19;
|
|
$20 = $point;
|
|
;HEAP32[$agg$result>>2]=HEAP32[$20>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$20+4>>2]|0;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
___assert_fail((14561|0),(13400|0),5559,(30066|0));
|
|
// unreachable;
|
|
}
|
|
}
|
|
function _nk_draw_list_path_fill($list,$color) {
|
|
$list = $list|0;
|
|
$color = $color|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $color$byval_copy = 0, $points = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$color$byval_copy = sp + 8|0;
|
|
$0 = $list;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((14300|0),(13400|0),6190,(14578|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$6 = ((($5)) + 40|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = (_nk_buffer_memory($7)|0);
|
|
$points = $8;
|
|
$9 = $0;
|
|
$10 = $points;
|
|
$11 = $0;
|
|
$12 = ((($11)) + 68|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = $0;
|
|
$15 = ((($14)) + 4|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
;HEAP8[$color$byval_copy>>0]=HEAP8[$color>>0]|0;HEAP8[$color$byval_copy+1>>0]=HEAP8[$color+1>>0]|0;HEAP8[$color$byval_copy+2>>0]=HEAP8[$color+2>>0]|0;HEAP8[$color$byval_copy+3>>0]=HEAP8[$color+3>>0]|0;
|
|
_nk_draw_list_fill_poly_convex($9,$10,$13,$color$byval_copy,$16);
|
|
$17 = $0;
|
|
_nk_draw_list_path_clear($17);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_path_stroke($list,$color,$closed,$thickness) {
|
|
$list = $list|0;
|
|
$color = $color|0;
|
|
$closed = $closed|0;
|
|
$thickness = +$thickness;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, $color$byval_copy = 0, $points = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$color$byval_copy = sp + 16|0;
|
|
$0 = $list;
|
|
$1 = $closed;
|
|
$2 = $thickness;
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((14300|0),(13400|0),6202,(14601|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$7 = $0;
|
|
$8 = ((($7)) + 40|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = (_nk_buffer_memory($9)|0);
|
|
$points = $10;
|
|
$11 = $0;
|
|
$12 = $points;
|
|
$13 = $0;
|
|
$14 = ((($13)) + 68|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = $1;
|
|
$17 = $2;
|
|
$18 = $0;
|
|
$19 = ((($18)) + 8|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
;HEAP8[$color$byval_copy>>0]=HEAP8[$color>>0]|0;HEAP8[$color$byval_copy+1>>0]=HEAP8[$color+1>>0]|0;HEAP8[$color$byval_copy+2>>0]=HEAP8[$color+2>>0]|0;HEAP8[$color$byval_copy+3>>0]=HEAP8[$color+3>>0]|0;
|
|
_nk_draw_list_stroke_poly_line($11,$12,$15,$color$byval_copy,$16,$17,$20);
|
|
$21 = $0;
|
|
_nk_draw_list_path_clear($21);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_stroke_line($list,$a,$b,$col,$thickness) {
|
|
$list = $list|0;
|
|
$a = $a|0;
|
|
$b = $b|0;
|
|
$col = $col|0;
|
|
$thickness = +$thickness;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0;
|
|
var $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $col$byval_copy = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$col$byval_copy = sp + 72|0;
|
|
$$byval_copy1 = sp + 64|0;
|
|
$$byval_copy = sp + 56|0;
|
|
$2 = sp + 40|0;
|
|
$3 = sp + 32|0;
|
|
$4 = sp + 24|0;
|
|
$5 = sp + 16|0;
|
|
$6 = sp + 8|0;
|
|
$7 = sp;
|
|
$0 = $list;
|
|
$1 = $thickness;
|
|
$8 = $0;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
___assert_fail((14300|0),(13400|0),6214,(14626|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $0;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$12 = ((($col)) + 3|0);
|
|
$13 = HEAP8[$12>>0]|0;
|
|
$14 = ($13<<24>>24)!=(0);
|
|
if (!($14)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$15 = $0;
|
|
$16 = +HEAPF32[$a>>2];
|
|
_nk_vec2($3,0.5,0.5);
|
|
$17 = +HEAPF32[$3>>2];
|
|
$18 = $16 + $17;
|
|
$19 = ((($a)) + 4|0);
|
|
$20 = +HEAPF32[$19>>2];
|
|
_nk_vec2($4,0.5,0.5);
|
|
$21 = ((($4)) + 4|0);
|
|
$22 = +HEAPF32[$21>>2];
|
|
$23 = $20 + $22;
|
|
_nk_vec2($2,$18,$23);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
|
|
_nk_draw_list_path_line_to($15,$$byval_copy);
|
|
$24 = $0;
|
|
$25 = +HEAPF32[$b>>2];
|
|
_nk_vec2($6,0.5,0.5);
|
|
$26 = +HEAPF32[$6>>2];
|
|
$27 = $25 + $26;
|
|
$28 = ((($b)) + 4|0);
|
|
$29 = +HEAPF32[$28>>2];
|
|
_nk_vec2($7,0.5,0.5);
|
|
$30 = ((($7)) + 4|0);
|
|
$31 = +HEAPF32[$30>>2];
|
|
$32 = $29 + $31;
|
|
_nk_vec2($5,$27,$32);
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$5+4>>2]|0;
|
|
_nk_draw_list_path_line_to($24,$$byval_copy1);
|
|
$33 = $0;
|
|
$34 = $1;
|
|
;HEAP8[$col$byval_copy>>0]=HEAP8[$col>>0]|0;HEAP8[$col$byval_copy+1>>0]=HEAP8[$col+1>>0]|0;HEAP8[$col$byval_copy+2>>0]=HEAP8[$col+2>>0]|0;HEAP8[$col$byval_copy+3>>0]=HEAP8[$col+3>>0]|0;
|
|
_nk_draw_list_path_stroke($33,$col$byval_copy,0,$34);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_fill_rect($list,$rect,$col,$rounding) {
|
|
$list = $list|0;
|
|
$rect = $rect|0;
|
|
$col = $col|0;
|
|
$rounding = +$rounding;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0;
|
|
var $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $col$byval_copy = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$col$byval_copy = sp + 40|0;
|
|
$$byval_copy1 = sp + 32|0;
|
|
$$byval_copy = sp + 24|0;
|
|
$2 = sp + 8|0;
|
|
$3 = sp;
|
|
$0 = $list;
|
|
$1 = $rounding;
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((14300|0),(13400|0),6225,(14651|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $0;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$8 = ((($col)) + 3|0);
|
|
$9 = HEAP8[$8>>0]|0;
|
|
$10 = ($9<<24>>24)!=(0);
|
|
if (!($10)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$11 = $0;
|
|
$12 = +HEAPF32[$rect>>2];
|
|
$13 = $12 + 0.5;
|
|
$14 = ((($rect)) + 4|0);
|
|
$15 = +HEAPF32[$14>>2];
|
|
$16 = $15 + 0.5;
|
|
_nk_vec2($2,$13,$16);
|
|
$17 = +HEAPF32[$rect>>2];
|
|
$18 = ((($rect)) + 8|0);
|
|
$19 = +HEAPF32[$18>>2];
|
|
$20 = $17 + $19;
|
|
$21 = $20 + 0.5;
|
|
$22 = ((($rect)) + 4|0);
|
|
$23 = +HEAPF32[$22>>2];
|
|
$24 = ((($rect)) + 12|0);
|
|
$25 = +HEAPF32[$24>>2];
|
|
$26 = $23 + $25;
|
|
$27 = $26 + 0.5;
|
|
_nk_vec2($3,$21,$27);
|
|
$28 = $1;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$3+4>>2]|0;
|
|
_nk_draw_list_path_rect_to($11,$$byval_copy,$$byval_copy1,$28);
|
|
$29 = $0;
|
|
;HEAP8[$col$byval_copy>>0]=HEAP8[$col>>0]|0;HEAP8[$col$byval_copy+1>>0]=HEAP8[$col+1>>0]|0;HEAP8[$col$byval_copy+2>>0]=HEAP8[$col+2>>0]|0;HEAP8[$col$byval_copy+3>>0]=HEAP8[$col+3>>0]|0;
|
|
_nk_draw_list_path_fill($29,$col$byval_copy);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_stroke_rect($list,$rect,$col,$rounding,$thickness) {
|
|
$list = $list|0;
|
|
$rect = $rect|0;
|
|
$col = $col|0;
|
|
$rounding = +$rounding;
|
|
$thickness = +$thickness;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0;
|
|
var $25 = 0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $col$byval_copy = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$col$byval_copy = sp + 48|0;
|
|
$$byval_copy1 = sp + 40|0;
|
|
$$byval_copy = sp + 32|0;
|
|
$3 = sp + 8|0;
|
|
$4 = sp;
|
|
$0 = $list;
|
|
$1 = $rounding;
|
|
$2 = $thickness;
|
|
$5 = $0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((14300|0),(13400|0),6236,(14674|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $0;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$9 = ((($col)) + 3|0);
|
|
$10 = HEAP8[$9>>0]|0;
|
|
$11 = ($10<<24>>24)!=(0);
|
|
if (!($11)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$12 = $0;
|
|
$13 = +HEAPF32[$rect>>2];
|
|
$14 = $13 + 0.5;
|
|
$15 = ((($rect)) + 4|0);
|
|
$16 = +HEAPF32[$15>>2];
|
|
$17 = $16 + 0.5;
|
|
_nk_vec2($3,$14,$17);
|
|
$18 = +HEAPF32[$rect>>2];
|
|
$19 = ((($rect)) + 8|0);
|
|
$20 = +HEAPF32[$19>>2];
|
|
$21 = $18 + $20;
|
|
$22 = $21 + 0.5;
|
|
$23 = ((($rect)) + 4|0);
|
|
$24 = +HEAPF32[$23>>2];
|
|
$25 = ((($rect)) + 12|0);
|
|
$26 = +HEAPF32[$25>>2];
|
|
$27 = $24 + $26;
|
|
$28 = $27 + 0.5;
|
|
_nk_vec2($4,$22,$28);
|
|
$29 = $1;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$4+4>>2]|0;
|
|
_nk_draw_list_path_rect_to($12,$$byval_copy,$$byval_copy1,$29);
|
|
$30 = $0;
|
|
$31 = $2;
|
|
;HEAP8[$col$byval_copy>>0]=HEAP8[$col>>0]|0;HEAP8[$col$byval_copy+1>>0]=HEAP8[$col+1>>0]|0;HEAP8[$col$byval_copy+2>>0]=HEAP8[$col+2>>0]|0;HEAP8[$col$byval_copy+3>>0]=HEAP8[$col+3>>0]|0;
|
|
_nk_draw_list_path_stroke($30,$col$byval_copy,1,$31);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_fill_rect_multi_color($list,$rect,$left,$top,$right,$bottom) {
|
|
$list = $list|0;
|
|
$rect = $rect|0;
|
|
$left = $left|0;
|
|
$top = $top|0;
|
|
$right = $right|0;
|
|
$bottom = $bottom|0;
|
|
var $$byval_copy = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $$byval_copy7 = 0, $$byval_copy8 = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0.0, $105 = 0, $106 = 0.0, $107 = 0;
|
|
var $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
|
|
var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
|
|
var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0;
|
|
var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0.0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0, $78 = 0;
|
|
var $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0, $82 = 0.0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0.0, $9 = 0, $90 = 0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0.0, $95 = 0, $96 = 0.0;
|
|
var $97 = 0.0, $98 = 0, $99 = 0, $bottom$byval_copy = 0, $col_bottom = 0, $col_left = 0, $col_right = 0, $col_top = 0, $idx = 0, $index = 0, $left$byval_copy = 0, $or$cond = 0, $right$byval_copy = 0, $top$byval_copy = 0, $vtx = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy9 = sp + 216|0;
|
|
$$byval_copy8 = sp + 208|0;
|
|
$$byval_copy7 = sp + 200|0;
|
|
$$byval_copy6 = sp + 192|0;
|
|
$$byval_copy5 = sp + 184|0;
|
|
$$byval_copy4 = sp + 176|0;
|
|
$$byval_copy3 = sp + 168|0;
|
|
$$byval_copy2 = sp + 160|0;
|
|
$$byval_copy = sp + 156|0;
|
|
$bottom$byval_copy = sp + 240|0;
|
|
$right$byval_copy = sp + 236|0;
|
|
$top$byval_copy = sp + 232|0;
|
|
$left$byval_copy = sp + 228|0;
|
|
$1 = sp + 120|0;
|
|
$2 = sp + 96|0;
|
|
$3 = sp + 88|0;
|
|
$4 = sp + 64|0;
|
|
$5 = sp + 56|0;
|
|
$6 = sp + 32|0;
|
|
$7 = sp + 24|0;
|
|
$8 = sp;
|
|
$0 = $list;
|
|
;HEAP8[$left$byval_copy>>0]=HEAP8[$left>>0]|0;HEAP8[$left$byval_copy+1>>0]=HEAP8[$left+1>>0]|0;HEAP8[$left$byval_copy+2>>0]=HEAP8[$left+2>>0]|0;HEAP8[$left$byval_copy+3>>0]=HEAP8[$left+3>>0]|0;
|
|
$9 = (_nk_color_u32($left$byval_copy)|0);
|
|
$col_left = $9;
|
|
;HEAP8[$top$byval_copy>>0]=HEAP8[$top>>0]|0;HEAP8[$top$byval_copy+1>>0]=HEAP8[$top+1>>0]|0;HEAP8[$top$byval_copy+2>>0]=HEAP8[$top+2>>0]|0;HEAP8[$top$byval_copy+3>>0]=HEAP8[$top+3>>0]|0;
|
|
$10 = (_nk_color_u32($top$byval_copy)|0);
|
|
$col_top = $10;
|
|
;HEAP8[$right$byval_copy>>0]=HEAP8[$right>>0]|0;HEAP8[$right$byval_copy+1>>0]=HEAP8[$right+1>>0]|0;HEAP8[$right$byval_copy+2>>0]=HEAP8[$right+2>>0]|0;HEAP8[$right$byval_copy+3>>0]=HEAP8[$right+3>>0]|0;
|
|
$11 = (_nk_color_u32($right$byval_copy)|0);
|
|
$col_right = $11;
|
|
;HEAP8[$bottom$byval_copy>>0]=HEAP8[$bottom>>0]|0;HEAP8[$bottom$byval_copy+1>>0]=HEAP8[$bottom+1>>0]|0;HEAP8[$bottom$byval_copy+2>>0]=HEAP8[$bottom+2>>0]|0;HEAP8[$bottom$byval_copy+3>>0]=HEAP8[$bottom+3>>0]|0;
|
|
$12 = (_nk_color_u32($bottom$byval_copy)|0);
|
|
$col_bottom = $12;
|
|
$13 = $0;
|
|
$14 = ($13|0)!=(0|0);
|
|
if (!($14)) {
|
|
___assert_fail((14300|0),(13400|0),6256,(14699|0));
|
|
// unreachable;
|
|
}
|
|
$15 = $0;
|
|
$16 = ($15|0)!=(0|0);
|
|
if (!($16)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$17 = $0;
|
|
$18 = $0;
|
|
$19 = ((($18)) + 12|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$19>>2]|0;
|
|
_nk_draw_list_push_image($17,$$byval_copy);
|
|
$20 = $0;
|
|
$21 = ((($20)) + 56|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = $22&65535;
|
|
$index = $23;
|
|
$24 = $0;
|
|
$25 = (_nk_draw_list_alloc_vertices($24,4)|0);
|
|
$vtx = $25;
|
|
$26 = $0;
|
|
$27 = (_nk_draw_list_alloc_elements($26,6)|0);
|
|
$idx = $27;
|
|
$28 = $vtx;
|
|
$29 = ($28|0)!=(0|0);
|
|
$30 = $idx;
|
|
$31 = ($30|0)!=(0|0);
|
|
$or$cond = $29 & $31;
|
|
if (!($or$cond)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$32 = $index;
|
|
$33 = $32&65535;
|
|
$34 = (($33) + 0)|0;
|
|
$35 = $34&65535;
|
|
$36 = $idx;
|
|
HEAP16[$36>>1] = $35;
|
|
$37 = $index;
|
|
$38 = $37&65535;
|
|
$39 = (($38) + 1)|0;
|
|
$40 = $39&65535;
|
|
$41 = $idx;
|
|
$42 = ((($41)) + 2|0);
|
|
HEAP16[$42>>1] = $40;
|
|
$43 = $index;
|
|
$44 = $43&65535;
|
|
$45 = (($44) + 2)|0;
|
|
$46 = $45&65535;
|
|
$47 = $idx;
|
|
$48 = ((($47)) + 4|0);
|
|
HEAP16[$48>>1] = $46;
|
|
$49 = $index;
|
|
$50 = $49&65535;
|
|
$51 = (($50) + 0)|0;
|
|
$52 = $51&65535;
|
|
$53 = $idx;
|
|
$54 = ((($53)) + 6|0);
|
|
HEAP16[$54>>1] = $52;
|
|
$55 = $index;
|
|
$56 = $55&65535;
|
|
$57 = (($56) + 2)|0;
|
|
$58 = $57&65535;
|
|
$59 = $idx;
|
|
$60 = ((($59)) + 8|0);
|
|
HEAP16[$60>>1] = $58;
|
|
$61 = $index;
|
|
$62 = $61&65535;
|
|
$63 = (($62) + 3)|0;
|
|
$64 = $63&65535;
|
|
$65 = $idx;
|
|
$66 = ((($65)) + 10|0);
|
|
HEAP16[$66>>1] = $64;
|
|
$67 = $vtx;
|
|
$68 = +HEAPF32[$rect>>2];
|
|
$69 = ((($rect)) + 4|0);
|
|
$70 = +HEAPF32[$69>>2];
|
|
_nk_vec2($1,$68,$70);
|
|
$71 = $0;
|
|
$72 = ((($71)) + 12|0);
|
|
$73 = ((($72)) + 4|0);
|
|
$74 = $col_left;
|
|
;HEAP32[$$byval_copy2>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$1+4>>2]|0;
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$73>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$73+4>>2]|0;
|
|
_nk_draw_vertex($2,$$byval_copy2,$$byval_copy3,$74);
|
|
;HEAP32[$67>>2]=HEAP32[$2>>2]|0;HEAP32[$67+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$67+8>>2]=HEAP32[$2+8>>2]|0;HEAP32[$67+12>>2]=HEAP32[$2+12>>2]|0;HEAP32[$67+16>>2]=HEAP32[$2+16>>2]|0;
|
|
$75 = $vtx;
|
|
$76 = ((($75)) + 20|0);
|
|
$77 = +HEAPF32[$rect>>2];
|
|
$78 = ((($rect)) + 8|0);
|
|
$79 = +HEAPF32[$78>>2];
|
|
$80 = $77 + $79;
|
|
$81 = ((($rect)) + 4|0);
|
|
$82 = +HEAPF32[$81>>2];
|
|
_nk_vec2($3,$80,$82);
|
|
$83 = $0;
|
|
$84 = ((($83)) + 12|0);
|
|
$85 = ((($84)) + 4|0);
|
|
$86 = $col_top;
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$3+4>>2]|0;
|
|
;HEAP32[$$byval_copy5>>2]=HEAP32[$85>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$85+4>>2]|0;
|
|
_nk_draw_vertex($4,$$byval_copy4,$$byval_copy5,$86);
|
|
;HEAP32[$76>>2]=HEAP32[$4>>2]|0;HEAP32[$76+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$76+8>>2]=HEAP32[$4+8>>2]|0;HEAP32[$76+12>>2]=HEAP32[$4+12>>2]|0;HEAP32[$76+16>>2]=HEAP32[$4+16>>2]|0;
|
|
$87 = $vtx;
|
|
$88 = ((($87)) + 40|0);
|
|
$89 = +HEAPF32[$rect>>2];
|
|
$90 = ((($rect)) + 8|0);
|
|
$91 = +HEAPF32[$90>>2];
|
|
$92 = $89 + $91;
|
|
$93 = ((($rect)) + 4|0);
|
|
$94 = +HEAPF32[$93>>2];
|
|
$95 = ((($rect)) + 12|0);
|
|
$96 = +HEAPF32[$95>>2];
|
|
$97 = $94 + $96;
|
|
_nk_vec2($5,$92,$97);
|
|
$98 = $0;
|
|
$99 = ((($98)) + 12|0);
|
|
$100 = ((($99)) + 4|0);
|
|
$101 = $col_right;
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$5+4>>2]|0;
|
|
;HEAP32[$$byval_copy7>>2]=HEAP32[$100>>2]|0;HEAP32[$$byval_copy7+4>>2]=HEAP32[$100+4>>2]|0;
|
|
_nk_draw_vertex($6,$$byval_copy6,$$byval_copy7,$101);
|
|
;HEAP32[$88>>2]=HEAP32[$6>>2]|0;HEAP32[$88+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$88+8>>2]=HEAP32[$6+8>>2]|0;HEAP32[$88+12>>2]=HEAP32[$6+12>>2]|0;HEAP32[$88+16>>2]=HEAP32[$6+16>>2]|0;
|
|
$102 = $vtx;
|
|
$103 = ((($102)) + 60|0);
|
|
$104 = +HEAPF32[$rect>>2];
|
|
$105 = ((($rect)) + 4|0);
|
|
$106 = +HEAPF32[$105>>2];
|
|
$107 = ((($rect)) + 12|0);
|
|
$108 = +HEAPF32[$107>>2];
|
|
$109 = $106 + $108;
|
|
_nk_vec2($7,$104,$109);
|
|
$110 = $0;
|
|
$111 = ((($110)) + 12|0);
|
|
$112 = ((($111)) + 4|0);
|
|
$113 = $col_bottom;
|
|
;HEAP32[$$byval_copy8>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy8+4>>2]=HEAP32[$7+4>>2]|0;
|
|
;HEAP32[$$byval_copy9>>2]=HEAP32[$112>>2]|0;HEAP32[$$byval_copy9+4>>2]=HEAP32[$112+4>>2]|0;
|
|
_nk_draw_vertex($8,$$byval_copy8,$$byval_copy9,$113);
|
|
;HEAP32[$103>>2]=HEAP32[$8>>2]|0;HEAP32[$103+4>>2]=HEAP32[$8+4>>2]|0;HEAP32[$103+8>>2]=HEAP32[$8+8>>2]|0;HEAP32[$103+12>>2]=HEAP32[$8+12>>2]|0;HEAP32[$103+16>>2]=HEAP32[$8+16>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_fill_triangle($list,$a,$b,$c,$col) {
|
|
$list = $list|0;
|
|
$a = $a|0;
|
|
$b = $b|0;
|
|
$c = $c|0;
|
|
$col = $col|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a$byval_copy = 0, $b$byval_copy = 0, $c$byval_copy = 0, $col$byval_copy = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$col$byval_copy = sp + 32|0;
|
|
$c$byval_copy = sp + 24|0;
|
|
$b$byval_copy = sp + 16|0;
|
|
$a$byval_copy = sp + 8|0;
|
|
$0 = $list;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((14300|0),(13400|0),6279,(14734|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = ((($col)) + 3|0);
|
|
$6 = HEAP8[$5>>0]|0;
|
|
$7 = ($6<<24>>24)!=(0);
|
|
if (!($7)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$8 = $0;
|
|
;HEAP32[$a$byval_copy>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy+4>>2]=HEAP32[$a+4>>2]|0;
|
|
_nk_draw_list_path_line_to($8,$a$byval_copy);
|
|
$9 = $0;
|
|
;HEAP32[$b$byval_copy>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy+4>>2]=HEAP32[$b+4>>2]|0;
|
|
_nk_draw_list_path_line_to($9,$b$byval_copy);
|
|
$10 = $0;
|
|
;HEAP32[$c$byval_copy>>2]=HEAP32[$c>>2]|0;HEAP32[$c$byval_copy+4>>2]=HEAP32[$c+4>>2]|0;
|
|
_nk_draw_list_path_line_to($10,$c$byval_copy);
|
|
$11 = $0;
|
|
;HEAP8[$col$byval_copy>>0]=HEAP8[$col>>0]|0;HEAP8[$col$byval_copy+1>>0]=HEAP8[$col+1>>0]|0;HEAP8[$col$byval_copy+2>>0]=HEAP8[$col+2>>0]|0;HEAP8[$col$byval_copy+3>>0]=HEAP8[$col+3>>0]|0;
|
|
_nk_draw_list_path_fill($11,$col$byval_copy);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_stroke_triangle($list,$a,$b,$c,$col,$thickness) {
|
|
$list = $list|0;
|
|
$a = $a|0;
|
|
$b = $b|0;
|
|
$c = $c|0;
|
|
$col = $col|0;
|
|
$thickness = +$thickness;
|
|
var $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a$byval_copy = 0, $b$byval_copy = 0, $c$byval_copy = 0, $col$byval_copy = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$col$byval_copy = sp + 32|0;
|
|
$c$byval_copy = sp + 24|0;
|
|
$b$byval_copy = sp + 16|0;
|
|
$a$byval_copy = sp + 8|0;
|
|
$0 = $list;
|
|
$1 = $thickness;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((14300|0),(13400|0),6291,(14761|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$6 = ((($col)) + 3|0);
|
|
$7 = HEAP8[$6>>0]|0;
|
|
$8 = ($7<<24>>24)!=(0);
|
|
if (!($8)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$9 = $0;
|
|
;HEAP32[$a$byval_copy>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy+4>>2]=HEAP32[$a+4>>2]|0;
|
|
_nk_draw_list_path_line_to($9,$a$byval_copy);
|
|
$10 = $0;
|
|
;HEAP32[$b$byval_copy>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy+4>>2]=HEAP32[$b+4>>2]|0;
|
|
_nk_draw_list_path_line_to($10,$b$byval_copy);
|
|
$11 = $0;
|
|
;HEAP32[$c$byval_copy>>2]=HEAP32[$c>>2]|0;HEAP32[$c$byval_copy+4>>2]=HEAP32[$c+4>>2]|0;
|
|
_nk_draw_list_path_line_to($11,$c$byval_copy);
|
|
$12 = $0;
|
|
$13 = $1;
|
|
;HEAP8[$col$byval_copy>>0]=HEAP8[$col>>0]|0;HEAP8[$col$byval_copy+1>>0]=HEAP8[$col+1>>0]|0;HEAP8[$col$byval_copy+2>>0]=HEAP8[$col+2>>0]|0;HEAP8[$col$byval_copy+3>>0]=HEAP8[$col+3>>0]|0;
|
|
_nk_draw_list_path_stroke($12,$col$byval_copy,1,$13);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_fill_circle($list,$center,$radius,$col,$segs) {
|
|
$list = $list|0;
|
|
$center = $center|0;
|
|
$radius = +$radius;
|
|
$col = $col|0;
|
|
$segs = $segs|0;
|
|
var $0 = 0, $1 = 0.0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, $a_max = 0.0, $center$byval_copy = 0, $col$byval_copy = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$col$byval_copy = sp + 24|0;
|
|
$center$byval_copy = sp + 16|0;
|
|
$0 = $list;
|
|
$1 = $radius;
|
|
$2 = $segs;
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((14300|0),(13400|0),6304,(14790|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$7 = ((($col)) + 3|0);
|
|
$8 = HEAP8[$7>>0]|0;
|
|
$9 = ($8<<24>>24)!=(0);
|
|
if (!($9)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$10 = $2;
|
|
$11 = (+($10>>>0));
|
|
$12 = $11 - 1.0;
|
|
$13 = 6.2831854820251465 * $12;
|
|
$14 = $2;
|
|
$15 = (+($14>>>0));
|
|
$16 = $13 / $15;
|
|
$a_max = $16;
|
|
$17 = $0;
|
|
$18 = $1;
|
|
$19 = $a_max;
|
|
$20 = $2;
|
|
;HEAP32[$center$byval_copy>>2]=HEAP32[$center>>2]|0;HEAP32[$center$byval_copy+4>>2]=HEAP32[$center+4>>2]|0;
|
|
_nk_draw_list_path_arc_to($17,$center$byval_copy,$18,0.0,$19,$20);
|
|
$21 = $0;
|
|
;HEAP8[$col$byval_copy>>0]=HEAP8[$col>>0]|0;HEAP8[$col$byval_copy+1>>0]=HEAP8[$col+1>>0]|0;HEAP8[$col$byval_copy+2>>0]=HEAP8[$col+2>>0]|0;HEAP8[$col$byval_copy+3>>0]=HEAP8[$col+3>>0]|0;
|
|
_nk_draw_list_path_fill($21,$col$byval_copy);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_stroke_circle($list,$center,$radius,$col,$segs,$thickness) {
|
|
$list = $list|0;
|
|
$center = $center|0;
|
|
$radius = +$radius;
|
|
$col = $col|0;
|
|
$segs = $segs|0;
|
|
$thickness = +$thickness;
|
|
var $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0, $3 = 0.0, $4 = 0, $5 = 0;
|
|
var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a_max = 0.0, $center$byval_copy = 0, $col$byval_copy = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$col$byval_copy = sp + 32|0;
|
|
$center$byval_copy = sp + 24|0;
|
|
$0 = $list;
|
|
$1 = $radius;
|
|
$2 = $segs;
|
|
$3 = $thickness;
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((14300|0),(13400|0),6316,(14815|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $0;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$8 = ((($col)) + 3|0);
|
|
$9 = HEAP8[$8>>0]|0;
|
|
$10 = ($9<<24>>24)!=(0);
|
|
if (!($10)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$11 = $2;
|
|
$12 = (+($11>>>0));
|
|
$13 = $12 - 1.0;
|
|
$14 = 6.2831854820251465 * $13;
|
|
$15 = $2;
|
|
$16 = (+($15>>>0));
|
|
$17 = $14 / $16;
|
|
$a_max = $17;
|
|
$18 = $0;
|
|
$19 = $1;
|
|
$20 = $a_max;
|
|
$21 = $2;
|
|
;HEAP32[$center$byval_copy>>2]=HEAP32[$center>>2]|0;HEAP32[$center$byval_copy+4>>2]=HEAP32[$center+4>>2]|0;
|
|
_nk_draw_list_path_arc_to($18,$center$byval_copy,$19,0.0,$20,$21);
|
|
$22 = $0;
|
|
$23 = $3;
|
|
;HEAP8[$col$byval_copy>>0]=HEAP8[$col>>0]|0;HEAP8[$col$byval_copy+1>>0]=HEAP8[$col+1>>0]|0;HEAP8[$col$byval_copy+2>>0]=HEAP8[$col+2>>0]|0;HEAP8[$col$byval_copy+3>>0]=HEAP8[$col+3>>0]|0;
|
|
_nk_draw_list_path_stroke($22,$col$byval_copy,1,$23);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_stroke_curve($list,$p0,$cp0,$cp1,$p1,$col,$segments,$thickness) {
|
|
$list = $list|0;
|
|
$p0 = $p0|0;
|
|
$cp0 = $cp0|0;
|
|
$cp1 = $cp1|0;
|
|
$p1 = $p1|0;
|
|
$col = $col|0;
|
|
$segments = $segments|0;
|
|
$thickness = +$thickness;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $2 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $col$byval_copy = 0, $cp0$byval_copy = 0, $cp1$byval_copy = 0, $p0$byval_copy = 0, $p1$byval_copy = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$col$byval_copy = sp + 48|0;
|
|
$p1$byval_copy = sp + 40|0;
|
|
$cp1$byval_copy = sp + 32|0;
|
|
$cp0$byval_copy = sp + 24|0;
|
|
$p0$byval_copy = sp + 16|0;
|
|
$0 = $list;
|
|
$1 = $segments;
|
|
$2 = $thickness;
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((14300|0),(13400|0),6328,(14842|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$7 = ((($col)) + 3|0);
|
|
$8 = HEAP8[$7>>0]|0;
|
|
$9 = ($8<<24>>24)!=(0);
|
|
if (!($9)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$10 = $0;
|
|
;HEAP32[$p0$byval_copy>>2]=HEAP32[$p0>>2]|0;HEAP32[$p0$byval_copy+4>>2]=HEAP32[$p0+4>>2]|0;
|
|
_nk_draw_list_path_line_to($10,$p0$byval_copy);
|
|
$11 = $0;
|
|
$12 = $1;
|
|
;HEAP32[$cp0$byval_copy>>2]=HEAP32[$cp0>>2]|0;HEAP32[$cp0$byval_copy+4>>2]=HEAP32[$cp0+4>>2]|0;
|
|
;HEAP32[$cp1$byval_copy>>2]=HEAP32[$cp1>>2]|0;HEAP32[$cp1$byval_copy+4>>2]=HEAP32[$cp1+4>>2]|0;
|
|
;HEAP32[$p1$byval_copy>>2]=HEAP32[$p1>>2]|0;HEAP32[$p1$byval_copy+4>>2]=HEAP32[$p1+4>>2]|0;
|
|
_nk_draw_list_path_curve_to($11,$cp0$byval_copy,$cp1$byval_copy,$p1$byval_copy,$12);
|
|
$13 = $0;
|
|
$14 = $2;
|
|
;HEAP8[$col$byval_copy>>0]=HEAP8[$col>>0]|0;HEAP8[$col$byval_copy+1>>0]=HEAP8[$col+1>>0]|0;HEAP8[$col$byval_copy+2>>0]=HEAP8[$col+2>>0]|0;HEAP8[$col$byval_copy+3>>0]=HEAP8[$col+3>>0]|0;
|
|
_nk_draw_list_path_stroke($13,$col$byval_copy,0,$14);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_add_image($list,$texture,$rect,$color) {
|
|
$list = $list|0;
|
|
$texture = $texture|0;
|
|
$rect = $rect|0;
|
|
$color = $color|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $$byval_copy7 = 0, $$byval_copy8 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0;
|
|
var $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0;
|
|
var $37 = 0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0.0, $54 = 0;
|
|
var $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0.0, $62 = 0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0, $69 = 0.0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0;
|
|
var $73 = 0, $74 = 0, $75 = 0.0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0, $83 = 0.0, $84 = 0, $85 = 0.0, $86 = 0.0, $9 = 0, $color$byval_copy = 0, $color$byval_copy9 = 0, $uv = 0, label = 0;
|
|
var sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$color$byval_copy9 = sp + 140|0;
|
|
$$byval_copy8 = sp + 128|0;
|
|
$$byval_copy7 = sp + 120|0;
|
|
$$byval_copy6 = sp + 112|0;
|
|
$$byval_copy5 = sp + 104|0;
|
|
$color$byval_copy = sp + 136|0;
|
|
$$byval_copy4 = sp + 96|0;
|
|
$$byval_copy3 = sp + 88|0;
|
|
$$byval_copy2 = sp + 80|0;
|
|
$$byval_copy1 = sp + 72|0;
|
|
$$byval_copy = sp + 68|0;
|
|
$uv = sp + 48|0;
|
|
$1 = sp + 40|0;
|
|
$2 = sp + 32|0;
|
|
$3 = sp + 24|0;
|
|
$4 = sp + 16|0;
|
|
$5 = sp + 8|0;
|
|
$6 = sp;
|
|
$0 = $list;
|
|
$7 = $0;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((14300|0),(13400|0),6375,(14868|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $0;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$11 = $0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$texture>>2]|0;
|
|
_nk_draw_list_push_image($11,$$byval_copy);
|
|
$12 = (_nk_image_is_subimage($texture)|0);
|
|
$13 = ($12|0)!=(0);
|
|
if ($13) {
|
|
$14 = ((($texture)) + 8|0);
|
|
$15 = HEAP16[$14>>1]|0;
|
|
$16 = (+($15&65535));
|
|
$17 = ((($texture)) + 4|0);
|
|
$18 = HEAP16[$17>>1]|0;
|
|
$19 = (+($18&65535));
|
|
$20 = $16 / $19;
|
|
HEAPF32[$uv>>2] = $20;
|
|
$21 = ((($texture)) + 8|0);
|
|
$22 = ((($21)) + 2|0);
|
|
$23 = HEAP16[$22>>1]|0;
|
|
$24 = (+($23&65535));
|
|
$25 = ((($texture)) + 6|0);
|
|
$26 = HEAP16[$25>>1]|0;
|
|
$27 = (+($26&65535));
|
|
$28 = $24 / $27;
|
|
$29 = ((($uv)) + 4|0);
|
|
HEAPF32[$29>>2] = $28;
|
|
$30 = ((($texture)) + 8|0);
|
|
$31 = HEAP16[$30>>1]|0;
|
|
$32 = $31&65535;
|
|
$33 = ((($texture)) + 8|0);
|
|
$34 = ((($33)) + 4|0);
|
|
$35 = HEAP16[$34>>1]|0;
|
|
$36 = $35&65535;
|
|
$37 = (($32) + ($36))|0;
|
|
$38 = (+($37|0));
|
|
$39 = ((($texture)) + 4|0);
|
|
$40 = HEAP16[$39>>1]|0;
|
|
$41 = (+($40&65535));
|
|
$42 = $38 / $41;
|
|
$43 = ((($uv)) + 8|0);
|
|
HEAPF32[$43>>2] = $42;
|
|
$44 = ((($texture)) + 8|0);
|
|
$45 = ((($44)) + 2|0);
|
|
$46 = HEAP16[$45>>1]|0;
|
|
$47 = $46&65535;
|
|
$48 = ((($texture)) + 8|0);
|
|
$49 = ((($48)) + 6|0);
|
|
$50 = HEAP16[$49>>1]|0;
|
|
$51 = $50&65535;
|
|
$52 = (($47) + ($51))|0;
|
|
$53 = (+($52|0));
|
|
$54 = ((($texture)) + 6|0);
|
|
$55 = HEAP16[$54>>1]|0;
|
|
$56 = (+($55&65535));
|
|
$57 = $53 / $56;
|
|
$58 = ((($uv)) + 8|0);
|
|
$59 = ((($58)) + 4|0);
|
|
HEAPF32[$59>>2] = $57;
|
|
$60 = $0;
|
|
$61 = +HEAPF32[$rect>>2];
|
|
$62 = ((($rect)) + 4|0);
|
|
$63 = +HEAPF32[$62>>2];
|
|
_nk_vec2($1,$61,$63);
|
|
$64 = +HEAPF32[$rect>>2];
|
|
$65 = ((($rect)) + 8|0);
|
|
$66 = +HEAPF32[$65>>2];
|
|
$67 = $64 + $66;
|
|
$68 = ((($rect)) + 4|0);
|
|
$69 = +HEAPF32[$68>>2];
|
|
$70 = ((($rect)) + 12|0);
|
|
$71 = +HEAPF32[$70>>2];
|
|
$72 = $69 + $71;
|
|
_nk_vec2($2,$67,$72);
|
|
$73 = ((($uv)) + 8|0);
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$1+4>>2]|0;
|
|
;HEAP32[$$byval_copy2>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$2+4>>2]|0;
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$uv>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$uv+4>>2]|0;
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$73>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$73+4>>2]|0;
|
|
;HEAP8[$color$byval_copy>>0]=HEAP8[$color>>0]|0;HEAP8[$color$byval_copy+1>>0]=HEAP8[$color+1>>0]|0;HEAP8[$color$byval_copy+2>>0]=HEAP8[$color+2>>0]|0;HEAP8[$color$byval_copy+3>>0]=HEAP8[$color+3>>0]|0;
|
|
_nk_draw_list_push_rect_uv($60,$$byval_copy1,$$byval_copy2,$$byval_copy3,$$byval_copy4,$color$byval_copy);
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$74 = $0;
|
|
$75 = +HEAPF32[$rect>>2];
|
|
$76 = ((($rect)) + 4|0);
|
|
$77 = +HEAPF32[$76>>2];
|
|
_nk_vec2($3,$75,$77);
|
|
$78 = +HEAPF32[$rect>>2];
|
|
$79 = ((($rect)) + 8|0);
|
|
$80 = +HEAPF32[$79>>2];
|
|
$81 = $78 + $80;
|
|
$82 = ((($rect)) + 4|0);
|
|
$83 = +HEAPF32[$82>>2];
|
|
$84 = ((($rect)) + 12|0);
|
|
$85 = +HEAPF32[$84>>2];
|
|
$86 = $83 + $85;
|
|
_nk_vec2($4,$81,$86);
|
|
_nk_vec2($5,0.0,0.0);
|
|
_nk_vec2($6,1.0,1.0);
|
|
;HEAP32[$$byval_copy5>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$3+4>>2]|0;
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$4+4>>2]|0;
|
|
;HEAP32[$$byval_copy7>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy7+4>>2]=HEAP32[$5+4>>2]|0;
|
|
;HEAP32[$$byval_copy8>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy8+4>>2]=HEAP32[$6+4>>2]|0;
|
|
;HEAP8[$color$byval_copy9>>0]=HEAP8[$color>>0]|0;HEAP8[$color$byval_copy9+1>>0]=HEAP8[$color+1>>0]|0;HEAP8[$color$byval_copy9+2>>0]=HEAP8[$color+2>>0]|0;HEAP8[$color$byval_copy9+3>>0]=HEAP8[$color+3>>0]|0;
|
|
_nk_draw_list_push_rect_uv($74,$$byval_copy5,$$byval_copy6,$$byval_copy7,$$byval_copy8,$color$byval_copy9);
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_draw_list_push_rect_uv($list,$a,$c,$uva,$uvc,$color) {
|
|
$list = $list|0;
|
|
$a = $a|0;
|
|
$c = $c|0;
|
|
$uva = $uva|0;
|
|
$uvc = $uvc|0;
|
|
$color = $color|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
|
|
var $81 = 0, $82 = 0, $83 = 0, $9 = 0, $a$byval_copy = 0, $b = 0, $b$byval_copy = 0, $c$byval_copy = 0, $col = 0, $color$byval_copy = 0, $d = 0, $d$byval_copy = 0, $idx = 0, $index = 0, $or$cond = 0, $uva$byval_copy = 0, $uvb = 0, $uvb$byval_copy = 0, $uvc$byval_copy = 0, $uvd = 0;
|
|
var $uvd$byval_copy = 0, $vtx = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 240|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$uvd$byval_copy = sp + 224|0;
|
|
$d$byval_copy = sp + 216|0;
|
|
$uvc$byval_copy = sp + 208|0;
|
|
$c$byval_copy = sp + 200|0;
|
|
$uvb$byval_copy = sp + 192|0;
|
|
$b$byval_copy = sp + 184|0;
|
|
$uva$byval_copy = sp + 176|0;
|
|
$a$byval_copy = sp + 168|0;
|
|
$color$byval_copy = sp + 236|0;
|
|
$uvb = sp + 144|0;
|
|
$uvd = sp + 136|0;
|
|
$b = sp + 128|0;
|
|
$d = sp + 120|0;
|
|
$1 = sp + 104|0;
|
|
$2 = sp + 96|0;
|
|
$3 = sp + 88|0;
|
|
$4 = sp + 80|0;
|
|
$5 = sp + 60|0;
|
|
$6 = sp + 40|0;
|
|
$7 = sp + 20|0;
|
|
$8 = sp;
|
|
$0 = $list;
|
|
;HEAP8[$color$byval_copy>>0]=HEAP8[$color>>0]|0;HEAP8[$color$byval_copy+1>>0]=HEAP8[$color+1>>0]|0;HEAP8[$color$byval_copy+2>>0]=HEAP8[$color+2>>0]|0;HEAP8[$color$byval_copy+3>>0]=HEAP8[$color+3>>0]|0;
|
|
$9 = (_nk_color_u32($color$byval_copy)|0);
|
|
$col = $9;
|
|
$10 = $0;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
___assert_fail((14300|0),(13400|0),6348,(30089|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $0;
|
|
$13 = ($12|0)!=(0|0);
|
|
if (!($13)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$14 = +HEAPF32[$uvc>>2];
|
|
$15 = ((($uva)) + 4|0);
|
|
$16 = +HEAPF32[$15>>2];
|
|
_nk_vec2($1,$14,$16);
|
|
;HEAP32[$uvb>>2]=HEAP32[$1>>2]|0;HEAP32[$uvb+4>>2]=HEAP32[$1+4>>2]|0;
|
|
$17 = +HEAPF32[$uva>>2];
|
|
$18 = ((($uvc)) + 4|0);
|
|
$19 = +HEAPF32[$18>>2];
|
|
_nk_vec2($2,$17,$19);
|
|
;HEAP32[$uvd>>2]=HEAP32[$2>>2]|0;HEAP32[$uvd+4>>2]=HEAP32[$2+4>>2]|0;
|
|
$20 = +HEAPF32[$c>>2];
|
|
$21 = ((($a)) + 4|0);
|
|
$22 = +HEAPF32[$21>>2];
|
|
_nk_vec2($3,$20,$22);
|
|
;HEAP32[$b>>2]=HEAP32[$3>>2]|0;HEAP32[$b+4>>2]=HEAP32[$3+4>>2]|0;
|
|
$23 = +HEAPF32[$a>>2];
|
|
$24 = ((($c)) + 4|0);
|
|
$25 = +HEAPF32[$24>>2];
|
|
_nk_vec2($4,$23,$25);
|
|
;HEAP32[$d>>2]=HEAP32[$4>>2]|0;HEAP32[$d+4>>2]=HEAP32[$4+4>>2]|0;
|
|
$26 = $0;
|
|
$27 = ((($26)) + 56|0);
|
|
$28 = HEAP32[$27>>2]|0;
|
|
$29 = $28&65535;
|
|
$index = $29;
|
|
$30 = $0;
|
|
$31 = (_nk_draw_list_alloc_vertices($30,4)|0);
|
|
$vtx = $31;
|
|
$32 = $0;
|
|
$33 = (_nk_draw_list_alloc_elements($32,6)|0);
|
|
$idx = $33;
|
|
$34 = $vtx;
|
|
$35 = ($34|0)!=(0|0);
|
|
$36 = $idx;
|
|
$37 = ($36|0)!=(0|0);
|
|
$or$cond = $35 & $37;
|
|
if (!($or$cond)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$38 = $index;
|
|
$39 = $38&65535;
|
|
$40 = (($39) + 0)|0;
|
|
$41 = $40&65535;
|
|
$42 = $idx;
|
|
HEAP16[$42>>1] = $41;
|
|
$43 = $index;
|
|
$44 = $43&65535;
|
|
$45 = (($44) + 1)|0;
|
|
$46 = $45&65535;
|
|
$47 = $idx;
|
|
$48 = ((($47)) + 2|0);
|
|
HEAP16[$48>>1] = $46;
|
|
$49 = $index;
|
|
$50 = $49&65535;
|
|
$51 = (($50) + 2)|0;
|
|
$52 = $51&65535;
|
|
$53 = $idx;
|
|
$54 = ((($53)) + 4|0);
|
|
HEAP16[$54>>1] = $52;
|
|
$55 = $index;
|
|
$56 = $55&65535;
|
|
$57 = (($56) + 0)|0;
|
|
$58 = $57&65535;
|
|
$59 = $idx;
|
|
$60 = ((($59)) + 6|0);
|
|
HEAP16[$60>>1] = $58;
|
|
$61 = $index;
|
|
$62 = $61&65535;
|
|
$63 = (($62) + 2)|0;
|
|
$64 = $63&65535;
|
|
$65 = $idx;
|
|
$66 = ((($65)) + 8|0);
|
|
HEAP16[$66>>1] = $64;
|
|
$67 = $index;
|
|
$68 = $67&65535;
|
|
$69 = (($68) + 3)|0;
|
|
$70 = $69&65535;
|
|
$71 = $idx;
|
|
$72 = ((($71)) + 10|0);
|
|
HEAP16[$72>>1] = $70;
|
|
$73 = $vtx;
|
|
$74 = $col;
|
|
;HEAP32[$a$byval_copy>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy+4>>2]=HEAP32[$a+4>>2]|0;
|
|
;HEAP32[$uva$byval_copy>>2]=HEAP32[$uva>>2]|0;HEAP32[$uva$byval_copy+4>>2]=HEAP32[$uva+4>>2]|0;
|
|
_nk_draw_vertex($5,$a$byval_copy,$uva$byval_copy,$74);
|
|
;HEAP32[$73>>2]=HEAP32[$5>>2]|0;HEAP32[$73+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$73+8>>2]=HEAP32[$5+8>>2]|0;HEAP32[$73+12>>2]=HEAP32[$5+12>>2]|0;HEAP32[$73+16>>2]=HEAP32[$5+16>>2]|0;
|
|
$75 = $vtx;
|
|
$76 = ((($75)) + 20|0);
|
|
$77 = $col;
|
|
;HEAP32[$b$byval_copy>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy+4>>2]=HEAP32[$b+4>>2]|0;
|
|
;HEAP32[$uvb$byval_copy>>2]=HEAP32[$uvb>>2]|0;HEAP32[$uvb$byval_copy+4>>2]=HEAP32[$uvb+4>>2]|0;
|
|
_nk_draw_vertex($6,$b$byval_copy,$uvb$byval_copy,$77);
|
|
;HEAP32[$76>>2]=HEAP32[$6>>2]|0;HEAP32[$76+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$76+8>>2]=HEAP32[$6+8>>2]|0;HEAP32[$76+12>>2]=HEAP32[$6+12>>2]|0;HEAP32[$76+16>>2]=HEAP32[$6+16>>2]|0;
|
|
$78 = $vtx;
|
|
$79 = ((($78)) + 40|0);
|
|
$80 = $col;
|
|
;HEAP32[$c$byval_copy>>2]=HEAP32[$c>>2]|0;HEAP32[$c$byval_copy+4>>2]=HEAP32[$c+4>>2]|0;
|
|
;HEAP32[$uvc$byval_copy>>2]=HEAP32[$uvc>>2]|0;HEAP32[$uvc$byval_copy+4>>2]=HEAP32[$uvc+4>>2]|0;
|
|
_nk_draw_vertex($7,$c$byval_copy,$uvc$byval_copy,$80);
|
|
;HEAP32[$79>>2]=HEAP32[$7>>2]|0;HEAP32[$79+4>>2]=HEAP32[$7+4>>2]|0;HEAP32[$79+8>>2]=HEAP32[$7+8>>2]|0;HEAP32[$79+12>>2]=HEAP32[$7+12>>2]|0;HEAP32[$79+16>>2]=HEAP32[$7+16>>2]|0;
|
|
$81 = $vtx;
|
|
$82 = ((($81)) + 60|0);
|
|
$83 = $col;
|
|
;HEAP32[$d$byval_copy>>2]=HEAP32[$d>>2]|0;HEAP32[$d$byval_copy+4>>2]=HEAP32[$d+4>>2]|0;
|
|
;HEAP32[$uvd$byval_copy>>2]=HEAP32[$uvd>>2]|0;HEAP32[$uvd$byval_copy+4>>2]=HEAP32[$uvd+4>>2]|0;
|
|
_nk_draw_vertex($8,$d$byval_copy,$uvd$byval_copy,$83);
|
|
;HEAP32[$82>>2]=HEAP32[$8>>2]|0;HEAP32[$82+4>>2]=HEAP32[$8+4>>2]|0;HEAP32[$82+8>>2]=HEAP32[$8+8>>2]|0;HEAP32[$82+12>>2]=HEAP32[$8+12>>2]|0;HEAP32[$82+16>>2]=HEAP32[$8+16>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_list_add_text($list,$font,$rect,$text,$len,$font_height,$fg) {
|
|
$list = $list|0;
|
|
$font = $font|0;
|
|
$rect = $rect|0;
|
|
$text = $text|0;
|
|
$len = $len|0;
|
|
$font_height = +$font_height;
|
|
$fg = $fg|0;
|
|
var $$byval_copy = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $$byval_copy7 = 0, $$byval_copy8 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0.0, $102 = 0, $103 = 0.0, $104 = 0.0, $105 = 0, $106 = 0, $107 = 0, $108 = 0.0, $109 = 0.0, $11 = 0;
|
|
var $110 = 0.0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0, $124 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0;
|
|
var $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0.0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0;
|
|
var $35 = 0.0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0.0;
|
|
var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0;
|
|
var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0.0, $84 = 0, $85 = 0.0, $86 = 0.0, $87 = 0, $88 = 0.0, $89 = 0;
|
|
var $9 = 0, $90 = 0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0.0, $95 = 0, $96 = 0.0, $97 = 0, $98 = 0.0, $99 = 0, $char_width = 0.0, $fg$byval_copy = 0, $g = 0, $gh = 0.0, $glyph_len = 0, $gw = 0.0, $gx = 0.0, $gy = 0.0, $next = 0;
|
|
var $next_glyph_len = 0, $or$cond = 0, $or$cond3 = 0, $text_len = 0, $unicode = 0, $x = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 176|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$fg$byval_copy = sp + 160|0;
|
|
$$byval_copy8 = sp + 152|0;
|
|
$$byval_copy7 = sp + 144|0;
|
|
$$byval_copy6 = sp + 136|0;
|
|
$$byval_copy5 = sp + 128|0;
|
|
$$byval_copy4 = sp + 120|0;
|
|
$$byval_copy = sp + 116|0;
|
|
$unicode = sp + 84|0;
|
|
$next = sp + 80|0;
|
|
$g = sp + 36|0;
|
|
$5 = sp + 8|0;
|
|
$6 = sp;
|
|
$0 = $list;
|
|
$1 = $font;
|
|
$2 = $text;
|
|
$3 = $len;
|
|
$4 = $font_height;
|
|
$x = 0.0;
|
|
$text_len = 0;
|
|
HEAP32[$unicode>>2] = 0;
|
|
HEAP32[$next>>2] = 0;
|
|
$glyph_len = 0;
|
|
$next_glyph_len = 0;
|
|
$7 = $0;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((14300|0),(13400|0),6406,(14891|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $0;
|
|
$10 = ($9|0)!=(0|0);
|
|
$11 = $3;
|
|
$12 = ($11|0)!=(0);
|
|
$or$cond = $10 & $12;
|
|
$13 = $2;
|
|
$14 = ($13|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $14;
|
|
if (!($or$cond3)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$15 = +HEAPF32[$rect>>2];
|
|
$16 = $0;
|
|
$17 = ((($16)) + 24|0);
|
|
$18 = +HEAPF32[$17>>2];
|
|
$19 = $0;
|
|
$20 = ((($19)) + 24|0);
|
|
$21 = ((($20)) + 8|0);
|
|
$22 = +HEAPF32[$21>>2];
|
|
$23 = $18 + $22;
|
|
$24 = $15 > $23;
|
|
if ($24) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$25 = ((($rect)) + 4|0);
|
|
$26 = +HEAPF32[$25>>2];
|
|
$27 = $0;
|
|
$28 = ((($27)) + 24|0);
|
|
$29 = ((($28)) + 4|0);
|
|
$30 = +HEAPF32[$29>>2];
|
|
$31 = $0;
|
|
$32 = ((($31)) + 24|0);
|
|
$33 = ((($32)) + 12|0);
|
|
$34 = +HEAPF32[$33>>2];
|
|
$35 = $30 + $34;
|
|
$36 = $26 > $35;
|
|
if ($36) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$37 = +HEAPF32[$rect>>2];
|
|
$38 = $0;
|
|
$39 = ((($38)) + 24|0);
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = $37 < $40;
|
|
if ($41) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$42 = ((($rect)) + 4|0);
|
|
$43 = +HEAPF32[$42>>2];
|
|
$44 = $0;
|
|
$45 = ((($44)) + 24|0);
|
|
$46 = ((($45)) + 4|0);
|
|
$47 = +HEAPF32[$46>>2];
|
|
$48 = $43 < $47;
|
|
if ($48) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$49 = $0;
|
|
$50 = $1;
|
|
$51 = ((($50)) + 16|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$51>>2]|0;
|
|
_nk_draw_list_push_image($49,$$byval_copy);
|
|
$52 = +HEAPF32[$rect>>2];
|
|
$x = $52;
|
|
$53 = $2;
|
|
$54 = $3;
|
|
$55 = (_nk_utf_decode($53,$unicode,$54)|0);
|
|
$text_len = $55;
|
|
$glyph_len = $55;
|
|
$56 = $glyph_len;
|
|
$57 = ($56|0)!=(0);
|
|
if (!($57)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
while(1) {
|
|
$58 = $text_len;
|
|
$59 = $3;
|
|
$60 = ($58|0)<=($59|0);
|
|
$61 = $glyph_len;
|
|
$62 = ($61|0)!=(0);
|
|
$63 = $60 ? $62 : 0;
|
|
if (!($63)) {
|
|
label = 12;
|
|
break;
|
|
}
|
|
$char_width = 0.0;
|
|
$64 = HEAP32[$unicode>>2]|0;
|
|
$65 = ($64|0)==(65533);
|
|
if ($65) {
|
|
label = 12;
|
|
break;
|
|
}
|
|
$66 = $2;
|
|
$67 = $text_len;
|
|
$68 = (($66) + ($67)|0);
|
|
$69 = $3;
|
|
$70 = $text_len;
|
|
$71 = (($69) - ($70))|0;
|
|
$72 = (_nk_utf_decode($68,$next,$71)|0);
|
|
$next_glyph_len = $72;
|
|
$73 = $1;
|
|
$74 = ((($73)) + 12|0);
|
|
$75 = HEAP32[$74>>2]|0;
|
|
$76 = $1;
|
|
$77 = $4;
|
|
$78 = HEAP32[$unicode>>2]|0;
|
|
$79 = HEAP32[$next>>2]|0;
|
|
$80 = ($79|0)==(65533);
|
|
$81 = HEAP32[$next>>2]|0;
|
|
$82 = $80 ? 0 : $81;
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$76>>2]|0;
|
|
FUNCTION_TABLE_vidiii[$75 & 15]($$byval_copy4,$77,$g,$78,$82);
|
|
$83 = $x;
|
|
$84 = ((($g)) + 16|0);
|
|
$85 = +HEAPF32[$84>>2];
|
|
$86 = $83 + $85;
|
|
$gx = $86;
|
|
$87 = ((($rect)) + 4|0);
|
|
$88 = +HEAPF32[$87>>2];
|
|
$89 = ((($g)) + 16|0);
|
|
$90 = ((($89)) + 4|0);
|
|
$91 = +HEAPF32[$90>>2];
|
|
$92 = $88 + $91;
|
|
$gy = $92;
|
|
$93 = ((($g)) + 24|0);
|
|
$94 = +HEAPF32[$93>>2];
|
|
$gw = $94;
|
|
$95 = ((($g)) + 28|0);
|
|
$96 = +HEAPF32[$95>>2];
|
|
$gh = $96;
|
|
$97 = ((($g)) + 32|0);
|
|
$98 = +HEAPF32[$97>>2];
|
|
$char_width = $98;
|
|
$99 = ((($fg)) + 3|0);
|
|
$100 = HEAP8[$99>>0]|0;
|
|
$101 = (+($100&255));
|
|
$102 = $0;
|
|
$103 = +HEAPF32[$102>>2];
|
|
$104 = $101 * $103;
|
|
$105 = (~~(($104))&255);
|
|
$106 = ((($fg)) + 3|0);
|
|
HEAP8[$106>>0] = $105;
|
|
$107 = $0;
|
|
$108 = $gx;
|
|
$109 = $gy;
|
|
_nk_vec2($5,$108,$109);
|
|
$110 = $gx;
|
|
$111 = $gw;
|
|
$112 = $110 + $111;
|
|
$113 = $gy;
|
|
$114 = $gh;
|
|
$115 = $113 + $114;
|
|
_nk_vec2($6,$112,$115);
|
|
$116 = ((($g)) + 8|0);
|
|
;HEAP32[$$byval_copy5>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$5+4>>2]|0;
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$6+4>>2]|0;
|
|
;HEAP32[$$byval_copy7>>2]=HEAP32[$g>>2]|0;HEAP32[$$byval_copy7+4>>2]=HEAP32[$g+4>>2]|0;
|
|
;HEAP32[$$byval_copy8>>2]=HEAP32[$116>>2]|0;HEAP32[$$byval_copy8+4>>2]=HEAP32[$116+4>>2]|0;
|
|
;HEAP8[$fg$byval_copy>>0]=HEAP8[$fg>>0]|0;HEAP8[$fg$byval_copy+1>>0]=HEAP8[$fg+1>>0]|0;HEAP8[$fg$byval_copy+2>>0]=HEAP8[$fg+2>>0]|0;HEAP8[$fg$byval_copy+3>>0]=HEAP8[$fg+3>>0]|0;
|
|
_nk_draw_list_push_rect_uv($107,$$byval_copy5,$$byval_copy6,$$byval_copy7,$$byval_copy8,$fg$byval_copy);
|
|
$117 = $glyph_len;
|
|
$118 = $text_len;
|
|
$119 = (($118) + ($117))|0;
|
|
$text_len = $119;
|
|
$120 = $char_width;
|
|
$121 = $x;
|
|
$122 = $121 + $120;
|
|
$x = $122;
|
|
$123 = $next_glyph_len;
|
|
$glyph_len = $123;
|
|
$124 = HEAP32[$next>>2]|0;
|
|
HEAP32[$unicode>>2] = $124;
|
|
}
|
|
if ((label|0) == 12) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_convert($ctx,$cmds,$vertices,$elements,$config) {
|
|
$ctx = $ctx|0;
|
|
$cmds = $cmds|0;
|
|
$vertices = $vertices|0;
|
|
$elements = $elements|0;
|
|
$config = $config|0;
|
|
var $$byval_copy = 0, $$byval_copy10 = 0, $$byval_copy11 = 0, $$byval_copy12 = 0, $$byval_copy13 = 0, $$byval_copy14 = 0, $$byval_copy15 = 0, $$byval_copy16 = 0, $$byval_copy17 = 0, $$byval_copy18 = 0, $$byval_copy19 = 0, $$byval_copy20 = 0, $$byval_copy21 = 0, $$byval_copy22 = 0, $$byval_copy23 = 0, $$byval_copy24 = 0, $$byval_copy25 = 0, $$byval_copy26 = 0, $$byval_copy27 = 0, $$byval_copy28 = 0;
|
|
var $$byval_copy29 = 0, $$byval_copy30 = 0, $$byval_copy31 = 0, $$byval_copy32 = 0, $$byval_copy33 = 0, $$byval_copy34 = 0, $$byval_copy35 = 0, $$byval_copy36 = 0, $$byval_copy37 = 0, $$byval_copy38 = 0, $$byval_copy39 = 0, $$byval_copy40 = 0, $$byval_copy41 = 0, $$byval_copy42 = 0, $$byval_copy43 = 0, $$byval_copy44 = 0, $$byval_copy45 = 0, $$byval_copy46 = 0, $$byval_copy47 = 0, $$byval_copy48 = 0;
|
|
var $$byval_copy49 = 0, $$byval_copy6 = 0, $$byval_copy7 = 0, $$byval_copy8 = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0.0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0.0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0;
|
|
var $111 = 0, $112 = 0.0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0.0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0.0, $125 = 0, $126 = 0, $127 = 0, $128 = 0.0, $129 = 0;
|
|
var $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0.0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0.0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0.0, $145 = 0, $146 = 0, $147 = 0;
|
|
var $148 = 0.0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0.0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0.0, $163 = 0, $164 = 0, $165 = 0;
|
|
var $166 = 0, $167 = 0, $168 = 0, $169 = 0.0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0.0, $174 = 0, $175 = 0, $176 = 0, $177 = 0.0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0.0, $182 = 0, $183 = 0;
|
|
var $184 = 0, $185 = 0, $186 = 0, $187 = 0.0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0.0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0.0, $199 = 0, $2 = 0, $20 = 0, $200 = 0;
|
|
var $201 = 0, $202 = 0.0, $203 = 0, $204 = 0, $205 = 0, $206 = 0.0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0.0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0.0, $217 = 0, $218 = 0, $219 = 0;
|
|
var $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0.0, $224 = 0, $225 = 0, $226 = 0, $227 = 0.0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0.0, $232 = 0, $233 = 0, $234 = 0, $235 = 0.0, $236 = 0, $237 = 0;
|
|
var $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0.0, $251 = 0, $252 = 0, $253 = 0, $254 = 0.0, $255 = 0.0;
|
|
var $256 = 0.0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0.0, $261 = 0, $262 = 0, $263 = 0, $264 = 0.0, $265 = 0.0, $266 = 0.0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0.0, $271 = 0.0, $272 = 0, $273 = 0;
|
|
var $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0.0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0.0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0.0;
|
|
var $292 = 0.0, $293 = 0.0, $294 = 0, $295 = 0, $296 = 0, $297 = 0.0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0.0, $302 = 0.0, $303 = 0.0, $304 = 0, $305 = 0, $306 = 0, $307 = 0.0, $308 = 0.0, $309 = 0;
|
|
var $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0.0, $321 = 0, $322 = 0, $323 = 0, $324 = 0.0, $325 = 0, $326 = 0, $327 = 0;
|
|
var $328 = 0, $329 = 0, $33 = 0, $330 = 0.0, $331 = 0, $332 = 0, $333 = 0, $334 = 0.0, $335 = 0, $336 = 0, $337 = 0, $338 = 0.0, $339 = 0, $34 = 0, $340 = 0, $341 = 0.0, $342 = 0, $343 = 0, $344 = 0, $345 = 0.0;
|
|
var $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0.0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0.0;
|
|
var $364 = 0, $365 = 0, $366 = 0, $367 = 0.0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0.0, $374 = 0, $375 = 0, $376 = 0, $377 = 0.0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0.0;
|
|
var $382 = 0, $383 = 0, $384 = 0.0, $385 = 0, $386 = 0, $387 = 0, $388 = 0.0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0;
|
|
var $40 = 0, $400 = 0, $401 = 0, $402 = 0.0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0.0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0.0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0.0, $417 = 0;
|
|
var $418 = 0, $419 = 0, $42 = 0, $420 = 0.0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0.0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0.0, $432 = 0, $433 = 0, $434 = 0, $435 = 0;
|
|
var $436 = 0, $437 = 0, $438 = 0.0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0.0, $444 = 0, $445 = 0, $446 = 0, $447 = 0.0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0.0, $453 = 0;
|
|
var $454 = 0, $455 = 0, $456 = 0.0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0.0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0;
|
|
var $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0.0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0.0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0.0;
|
|
var $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0.0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0;
|
|
var $508 = 0.0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0.0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0;
|
|
var $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0.0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0.0;
|
|
var $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0.0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0;
|
|
var $562 = 0, $563 = 0, $564 = 0, $565 = 0.0, $566 = 0, $567 = 0, $568 = 0, $569 = 0.0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0.0, $574 = 0, $575 = 0, $576 = 0, $577 = 0.0, $578 = 0, $579 = 0, $58 = 0;
|
|
var $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0.0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0.0, $597 = 0, $598 = 0;
|
|
var $599 = 0, $6 = 0, $60 = 0, $600 = 0.0, $601 = 0, $602 = 0, $603 = 0, $604 = 0.0, $605 = 0, $606 = 0, $607 = 0, $608 = 0.0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0;
|
|
var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0, $83 = 0;
|
|
var $84 = 0, $85 = 0.0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0.0, $98 = 0, $99 = 0, $c = 0, $c3 = 0, $c4 = 0;
|
|
var $c5 = 0, $cmd = 0, $i = 0, $i10 = 0, $i14 = 0, $i7 = 0, $l = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $p = 0, $p11 = 0, $p8 = 0, $pnt = 0, $pnt$byval_copy = 0, $pnt12 = 0, $pnt12$byval_copy = 0, $pnt9 = 0, $pnt9$byval_copy = 0, $q = 0;
|
|
var $r = 0, $r1 = 0, $r2 = 0, $s = 0, $t = 0, $t13 = 0, $t6 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 800|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy49 = sp + 788|0;
|
|
$$byval_copy48 = sp + 696|0;
|
|
$$byval_copy47 = sp + 680|0;
|
|
$$byval_copy46 = sp + 784|0;
|
|
$$byval_copy45 = sp + 664|0;
|
|
$$byval_copy44 = sp + 780|0;
|
|
$pnt12$byval_copy = sp + 656|0;
|
|
$$byval_copy43 = sp + 776|0;
|
|
$pnt9$byval_copy = sp + 648|0;
|
|
$$byval_copy42 = sp + 772|0;
|
|
$pnt$byval_copy = sp + 640|0;
|
|
$$byval_copy41 = sp + 768|0;
|
|
$$byval_copy40 = sp + 632|0;
|
|
$$byval_copy39 = sp + 624|0;
|
|
$$byval_copy38 = sp + 616|0;
|
|
$$byval_copy37 = sp + 764|0;
|
|
$$byval_copy36 = sp + 608|0;
|
|
$$byval_copy35 = sp + 600|0;
|
|
$$byval_copy34 = sp + 592|0;
|
|
$$byval_copy33 = sp + 760|0;
|
|
$$byval_copy32 = sp + 584|0;
|
|
$$byval_copy31 = sp + 576|0;
|
|
$$byval_copy30 = sp + 756|0;
|
|
$$byval_copy29 = sp + 568|0;
|
|
$$byval_copy28 = sp + 560|0;
|
|
$$byval_copy27 = sp + 752|0;
|
|
$$byval_copy26 = sp + 552|0;
|
|
$$byval_copy25 = sp + 748|0;
|
|
$$byval_copy24 = sp + 544|0;
|
|
$$byval_copy23 = sp + 744|0;
|
|
$$byval_copy22 = sp + 740|0;
|
|
$$byval_copy21 = sp + 736|0;
|
|
$$byval_copy20 = sp + 732|0;
|
|
$$byval_copy19 = sp + 528|0;
|
|
$$byval_copy18 = sp + 728|0;
|
|
$$byval_copy17 = sp + 512|0;
|
|
$$byval_copy16 = sp + 724|0;
|
|
$$byval_copy15 = sp + 496|0;
|
|
$$byval_copy14 = sp + 720|0;
|
|
$$byval_copy13 = sp + 488|0;
|
|
$$byval_copy12 = sp + 480|0;
|
|
$$byval_copy11 = sp + 472|0;
|
|
$$byval_copy10 = sp + 464|0;
|
|
$$byval_copy9 = sp + 716|0;
|
|
$$byval_copy8 = sp + 456|0;
|
|
$$byval_copy7 = sp + 448|0;
|
|
$$byval_copy6 = sp + 432|0;
|
|
$$byval_copy = sp + 420|0;
|
|
$5 = sp + 376|0;
|
|
$6 = sp + 360|0;
|
|
$7 = sp + 352|0;
|
|
$8 = sp + 336|0;
|
|
$9 = sp + 328|0;
|
|
$10 = sp + 320|0;
|
|
$11 = sp + 312|0;
|
|
$12 = sp + 288|0;
|
|
$13 = sp + 264|0;
|
|
$14 = sp + 240|0;
|
|
$15 = sp + 224|0;
|
|
$16 = sp + 208|0;
|
|
$17 = sp + 192|0;
|
|
$18 = sp + 184|0;
|
|
$19 = sp + 168|0;
|
|
$20 = sp + 160|0;
|
|
$21 = sp + 144|0;
|
|
$22 = sp + 136|0;
|
|
$23 = sp + 128|0;
|
|
$24 = sp + 112|0;
|
|
$25 = sp + 104|0;
|
|
$26 = sp + 96|0;
|
|
$pnt = sp + 80|0;
|
|
$pnt9 = sp + 64|0;
|
|
$pnt12 = sp + 48|0;
|
|
$27 = sp + 24|0;
|
|
$28 = sp;
|
|
$29 = sp + 712|0;
|
|
$0 = $ctx;
|
|
$1 = $cmds;
|
|
$2 = $vertices;
|
|
$3 = $elements;
|
|
$4 = $config;
|
|
$30 = $0;
|
|
$31 = ($30|0)!=(0|0);
|
|
if (!($31)) {
|
|
___assert_fail((14913|0),(13400|0),6453,(14917|0));
|
|
// unreachable;
|
|
}
|
|
$32 = $1;
|
|
$33 = ($32|0)!=(0|0);
|
|
if (!($33)) {
|
|
___assert_fail((14928|0),(13400|0),6454,(14917|0));
|
|
// unreachable;
|
|
}
|
|
$34 = $2;
|
|
$35 = ($34|0)!=(0|0);
|
|
if (!($35)) {
|
|
___assert_fail((14933|0),(13400|0),6455,(14917|0));
|
|
// unreachable;
|
|
}
|
|
$36 = $3;
|
|
$37 = ($36|0)!=(0|0);
|
|
if (!($37)) {
|
|
___assert_fail((14942|0),(13400|0),6456,(14917|0));
|
|
// unreachable;
|
|
}
|
|
$38 = $0;
|
|
$39 = ($38|0)!=(0|0);
|
|
$40 = $1;
|
|
$41 = ($40|0)!=(0|0);
|
|
$or$cond = $39 & $41;
|
|
$42 = $2;
|
|
$43 = ($42|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $43;
|
|
$44 = $3;
|
|
$45 = ($44|0)!=(0|0);
|
|
$or$cond5 = $or$cond3 & $45;
|
|
if (!($or$cond5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$46 = $0;
|
|
$47 = ((($46)) + 5672|0);
|
|
$48 = $4;
|
|
$49 = +HEAPF32[$48>>2];
|
|
$50 = $4;
|
|
$51 = ((($50)) + 4|0);
|
|
$52 = HEAP32[$51>>2]|0;
|
|
$53 = $4;
|
|
$54 = ((($53)) + 8|0);
|
|
$55 = HEAP32[$54>>2]|0;
|
|
$56 = $4;
|
|
$57 = ((($56)) + 24|0);
|
|
$58 = $1;
|
|
$59 = $2;
|
|
$60 = $3;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$57>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$57+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$57+8>>2]|0;
|
|
_nk_draw_list_setup($47,$49,$52,$55,$$byval_copy,$58,$59,$60);
|
|
$61 = $0;
|
|
$62 = (_nk__begin($61)|0);
|
|
$cmd = $62;
|
|
while(1) {
|
|
$63 = $cmd;
|
|
$64 = ($63|0)!=(0|0);
|
|
if (!($64)) {
|
|
break;
|
|
}
|
|
$65 = $cmd;
|
|
$66 = HEAP32[$65>>2]|0;
|
|
do {
|
|
switch ($66|0) {
|
|
case 17: {
|
|
$588 = $cmd;
|
|
$i14 = $588;
|
|
$589 = $0;
|
|
$590 = ((($589)) + 5672|0);
|
|
$591 = $i14;
|
|
$592 = ((($591)) + 16|0);
|
|
$593 = $i14;
|
|
$594 = ((($593)) + 8|0);
|
|
$595 = HEAP16[$594>>1]|0;
|
|
$596 = (+($595<<16>>16));
|
|
$597 = $i14;
|
|
$598 = ((($597)) + 10|0);
|
|
$599 = HEAP16[$598>>1]|0;
|
|
$600 = (+($599<<16>>16));
|
|
$601 = $i14;
|
|
$602 = ((($601)) + 12|0);
|
|
$603 = HEAP16[$602>>1]|0;
|
|
$604 = (+($603&65535));
|
|
$605 = $i14;
|
|
$606 = ((($605)) + 14|0);
|
|
$607 = HEAP16[$606>>1]|0;
|
|
$608 = (+($607&65535));
|
|
_nk_rect($28,$596,$600,$604,$608);
|
|
_nk_rgb($29,255,255,255);
|
|
;HEAP32[$$byval_copy47>>2]=HEAP32[$592>>2]|0;HEAP32[$$byval_copy47+4>>2]=HEAP32[$592+4>>2]|0;HEAP32[$$byval_copy47+8>>2]=HEAP32[$592+8>>2]|0;HEAP32[$$byval_copy47+12>>2]=HEAP32[$592+12>>2]|0;
|
|
;HEAP32[$$byval_copy48>>2]=HEAP32[$28>>2]|0;HEAP32[$$byval_copy48+4>>2]=HEAP32[$28+4>>2]|0;HEAP32[$$byval_copy48+8>>2]=HEAP32[$28+8>>2]|0;HEAP32[$$byval_copy48+12>>2]=HEAP32[$28+12>>2]|0;
|
|
;HEAP8[$$byval_copy49>>0]=HEAP8[$29>>0]|0;HEAP8[$$byval_copy49+1>>0]=HEAP8[$29+1>>0]|0;HEAP8[$$byval_copy49+2>>0]=HEAP8[$29+2>>0]|0;HEAP8[$$byval_copy49+3>>0]=HEAP8[$29+3>>0]|0;
|
|
_nk_draw_list_add_image($590,$$byval_copy47,$$byval_copy48,$$byval_copy49);
|
|
break;
|
|
}
|
|
case 1: {
|
|
$67 = $cmd;
|
|
$s = $67;
|
|
$68 = $0;
|
|
$69 = ((($68)) + 5672|0);
|
|
$70 = $s;
|
|
$71 = ((($70)) + 8|0);
|
|
$72 = HEAP16[$71>>1]|0;
|
|
$73 = (+($72<<16>>16));
|
|
$74 = $s;
|
|
$75 = ((($74)) + 10|0);
|
|
$76 = HEAP16[$75>>1]|0;
|
|
$77 = (+($76<<16>>16));
|
|
$78 = $s;
|
|
$79 = ((($78)) + 12|0);
|
|
$80 = HEAP16[$79>>1]|0;
|
|
$81 = (+($80&65535));
|
|
$82 = $s;
|
|
$83 = ((($82)) + 14|0);
|
|
$84 = HEAP16[$83>>1]|0;
|
|
$85 = (+($84&65535));
|
|
_nk_rect($5,$73,$77,$81,$85);
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[$5+8>>2]|0;HEAP32[$$byval_copy6+12>>2]=HEAP32[$5+12>>2]|0;
|
|
_nk_draw_list_add_clip($69,$$byval_copy6);
|
|
break;
|
|
}
|
|
case 2: {
|
|
$86 = $cmd;
|
|
$l = $86;
|
|
$87 = $0;
|
|
$88 = ((($87)) + 5672|0);
|
|
$89 = $l;
|
|
$90 = ((($89)) + 10|0);
|
|
$91 = HEAP16[$90>>1]|0;
|
|
$92 = (+($91<<16>>16));
|
|
$93 = $l;
|
|
$94 = ((($93)) + 10|0);
|
|
$95 = ((($94)) + 2|0);
|
|
$96 = HEAP16[$95>>1]|0;
|
|
$97 = (+($96<<16>>16));
|
|
_nk_vec2($6,$92,$97);
|
|
$98 = $l;
|
|
$99 = ((($98)) + 14|0);
|
|
$100 = HEAP16[$99>>1]|0;
|
|
$101 = (+($100<<16>>16));
|
|
$102 = $l;
|
|
$103 = ((($102)) + 14|0);
|
|
$104 = ((($103)) + 2|0);
|
|
$105 = HEAP16[$104>>1]|0;
|
|
$106 = (+($105<<16>>16));
|
|
_nk_vec2($7,$101,$106);
|
|
$107 = $l;
|
|
$108 = ((($107)) + 18|0);
|
|
$109 = $l;
|
|
$110 = ((($109)) + 8|0);
|
|
$111 = HEAP16[$110>>1]|0;
|
|
$112 = (+($111&65535));
|
|
;HEAP32[$$byval_copy7>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy7+4>>2]=HEAP32[$6+4>>2]|0;
|
|
;HEAP32[$$byval_copy8>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy8+4>>2]=HEAP32[$7+4>>2]|0;
|
|
;HEAP8[$$byval_copy9>>0]=HEAP8[$108>>0]|0;HEAP8[$$byval_copy9+1>>0]=HEAP8[$108+1>>0]|0;HEAP8[$$byval_copy9+2>>0]=HEAP8[$108+2>>0]|0;HEAP8[$$byval_copy9+3>>0]=HEAP8[$108+3>>0]|0;
|
|
_nk_draw_list_stroke_line($88,$$byval_copy7,$$byval_copy8,$$byval_copy9,$112);
|
|
break;
|
|
}
|
|
case 3: {
|
|
$113 = $cmd;
|
|
$q = $113;
|
|
$114 = $0;
|
|
$115 = ((($114)) + 5672|0);
|
|
$116 = $q;
|
|
$117 = ((($116)) + 10|0);
|
|
$118 = HEAP16[$117>>1]|0;
|
|
$119 = (+($118<<16>>16));
|
|
$120 = $q;
|
|
$121 = ((($120)) + 10|0);
|
|
$122 = ((($121)) + 2|0);
|
|
$123 = HEAP16[$122>>1]|0;
|
|
$124 = (+($123<<16>>16));
|
|
_nk_vec2($8,$119,$124);
|
|
$125 = $q;
|
|
$126 = ((($125)) + 18|0);
|
|
$127 = HEAP16[$126>>1]|0;
|
|
$128 = (+($127<<16>>16));
|
|
$129 = $q;
|
|
$130 = ((($129)) + 18|0);
|
|
$131 = ((($130)) + 2|0);
|
|
$132 = HEAP16[$131>>1]|0;
|
|
$133 = (+($132<<16>>16));
|
|
_nk_vec2($9,$128,$133);
|
|
$134 = $q;
|
|
$135 = ((($134)) + 18|0);
|
|
$136 = ((($135)) + 4|0);
|
|
$137 = HEAP16[$136>>1]|0;
|
|
$138 = (+($137<<16>>16));
|
|
$139 = $q;
|
|
$140 = ((($139)) + 18|0);
|
|
$141 = ((($140)) + 4|0);
|
|
$142 = ((($141)) + 2|0);
|
|
$143 = HEAP16[$142>>1]|0;
|
|
$144 = (+($143<<16>>16));
|
|
_nk_vec2($10,$138,$144);
|
|
$145 = $q;
|
|
$146 = ((($145)) + 14|0);
|
|
$147 = HEAP16[$146>>1]|0;
|
|
$148 = (+($147<<16>>16));
|
|
$149 = $q;
|
|
$150 = ((($149)) + 14|0);
|
|
$151 = ((($150)) + 2|0);
|
|
$152 = HEAP16[$151>>1]|0;
|
|
$153 = (+($152<<16>>16));
|
|
_nk_vec2($11,$148,$153);
|
|
$154 = $q;
|
|
$155 = ((($154)) + 26|0);
|
|
$156 = $4;
|
|
$157 = ((($156)) + 20|0);
|
|
$158 = HEAP32[$157>>2]|0;
|
|
$159 = $q;
|
|
$160 = ((($159)) + 8|0);
|
|
$161 = HEAP16[$160>>1]|0;
|
|
$162 = (+($161&65535));
|
|
;HEAP32[$$byval_copy10>>2]=HEAP32[$8>>2]|0;HEAP32[$$byval_copy10+4>>2]=HEAP32[$8+4>>2]|0;
|
|
;HEAP32[$$byval_copy11>>2]=HEAP32[$9>>2]|0;HEAP32[$$byval_copy11+4>>2]=HEAP32[$9+4>>2]|0;
|
|
;HEAP32[$$byval_copy12>>2]=HEAP32[$10>>2]|0;HEAP32[$$byval_copy12+4>>2]=HEAP32[$10+4>>2]|0;
|
|
;HEAP32[$$byval_copy13>>2]=HEAP32[$11>>2]|0;HEAP32[$$byval_copy13+4>>2]=HEAP32[$11+4>>2]|0;
|
|
;HEAP8[$$byval_copy14>>0]=HEAP8[$155>>0]|0;HEAP8[$$byval_copy14+1>>0]=HEAP8[$155+1>>0]|0;HEAP8[$$byval_copy14+2>>0]=HEAP8[$155+2>>0]|0;HEAP8[$$byval_copy14+3>>0]=HEAP8[$155+3>>0]|0;
|
|
_nk_draw_list_stroke_curve($115,$$byval_copy10,$$byval_copy11,$$byval_copy12,$$byval_copy13,$$byval_copy14,$158,$162);
|
|
break;
|
|
}
|
|
case 4: {
|
|
$163 = $cmd;
|
|
$r = $163;
|
|
$164 = $0;
|
|
$165 = ((($164)) + 5672|0);
|
|
$166 = $r;
|
|
$167 = ((($166)) + 12|0);
|
|
$168 = HEAP16[$167>>1]|0;
|
|
$169 = (+($168<<16>>16));
|
|
$170 = $r;
|
|
$171 = ((($170)) + 14|0);
|
|
$172 = HEAP16[$171>>1]|0;
|
|
$173 = (+($172<<16>>16));
|
|
$174 = $r;
|
|
$175 = ((($174)) + 16|0);
|
|
$176 = HEAP16[$175>>1]|0;
|
|
$177 = (+($176&65535));
|
|
$178 = $r;
|
|
$179 = ((($178)) + 18|0);
|
|
$180 = HEAP16[$179>>1]|0;
|
|
$181 = (+($180&65535));
|
|
_nk_rect($12,$169,$173,$177,$181);
|
|
$182 = $r;
|
|
$183 = ((($182)) + 20|0);
|
|
$184 = $r;
|
|
$185 = ((($184)) + 8|0);
|
|
$186 = HEAP16[$185>>1]|0;
|
|
$187 = (+($186&65535));
|
|
$188 = $r;
|
|
$189 = ((($188)) + 10|0);
|
|
$190 = HEAP16[$189>>1]|0;
|
|
$191 = (+($190&65535));
|
|
;HEAP32[$$byval_copy15>>2]=HEAP32[$12>>2]|0;HEAP32[$$byval_copy15+4>>2]=HEAP32[$12+4>>2]|0;HEAP32[$$byval_copy15+8>>2]=HEAP32[$12+8>>2]|0;HEAP32[$$byval_copy15+12>>2]=HEAP32[$12+12>>2]|0;
|
|
;HEAP8[$$byval_copy16>>0]=HEAP8[$183>>0]|0;HEAP8[$$byval_copy16+1>>0]=HEAP8[$183+1>>0]|0;HEAP8[$$byval_copy16+2>>0]=HEAP8[$183+2>>0]|0;HEAP8[$$byval_copy16+3>>0]=HEAP8[$183+3>>0]|0;
|
|
_nk_draw_list_stroke_rect($165,$$byval_copy15,$$byval_copy16,$187,$191);
|
|
break;
|
|
}
|
|
case 5: {
|
|
$192 = $cmd;
|
|
$r1 = $192;
|
|
$193 = $0;
|
|
$194 = ((($193)) + 5672|0);
|
|
$195 = $r1;
|
|
$196 = ((($195)) + 10|0);
|
|
$197 = HEAP16[$196>>1]|0;
|
|
$198 = (+($197<<16>>16));
|
|
$199 = $r1;
|
|
$200 = ((($199)) + 12|0);
|
|
$201 = HEAP16[$200>>1]|0;
|
|
$202 = (+($201<<16>>16));
|
|
$203 = $r1;
|
|
$204 = ((($203)) + 14|0);
|
|
$205 = HEAP16[$204>>1]|0;
|
|
$206 = (+($205&65535));
|
|
$207 = $r1;
|
|
$208 = ((($207)) + 16|0);
|
|
$209 = HEAP16[$208>>1]|0;
|
|
$210 = (+($209&65535));
|
|
_nk_rect($13,$198,$202,$206,$210);
|
|
$211 = $r1;
|
|
$212 = ((($211)) + 18|0);
|
|
$213 = $r1;
|
|
$214 = ((($213)) + 8|0);
|
|
$215 = HEAP16[$214>>1]|0;
|
|
$216 = (+($215&65535));
|
|
;HEAP32[$$byval_copy17>>2]=HEAP32[$13>>2]|0;HEAP32[$$byval_copy17+4>>2]=HEAP32[$13+4>>2]|0;HEAP32[$$byval_copy17+8>>2]=HEAP32[$13+8>>2]|0;HEAP32[$$byval_copy17+12>>2]=HEAP32[$13+12>>2]|0;
|
|
;HEAP8[$$byval_copy18>>0]=HEAP8[$212>>0]|0;HEAP8[$$byval_copy18+1>>0]=HEAP8[$212+1>>0]|0;HEAP8[$$byval_copy18+2>>0]=HEAP8[$212+2>>0]|0;HEAP8[$$byval_copy18+3>>0]=HEAP8[$212+3>>0]|0;
|
|
_nk_draw_list_fill_rect($194,$$byval_copy17,$$byval_copy18,$216);
|
|
break;
|
|
}
|
|
case 6: {
|
|
$217 = $cmd;
|
|
$r2 = $217;
|
|
$218 = $0;
|
|
$219 = ((($218)) + 5672|0);
|
|
$220 = $r2;
|
|
$221 = ((($220)) + 8|0);
|
|
$222 = HEAP16[$221>>1]|0;
|
|
$223 = (+($222<<16>>16));
|
|
$224 = $r2;
|
|
$225 = ((($224)) + 10|0);
|
|
$226 = HEAP16[$225>>1]|0;
|
|
$227 = (+($226<<16>>16));
|
|
$228 = $r2;
|
|
$229 = ((($228)) + 12|0);
|
|
$230 = HEAP16[$229>>1]|0;
|
|
$231 = (+($230&65535));
|
|
$232 = $r2;
|
|
$233 = ((($232)) + 14|0);
|
|
$234 = HEAP16[$233>>1]|0;
|
|
$235 = (+($234&65535));
|
|
_nk_rect($14,$223,$227,$231,$235);
|
|
$236 = $r2;
|
|
$237 = ((($236)) + 16|0);
|
|
$238 = $r2;
|
|
$239 = ((($238)) + 20|0);
|
|
$240 = $r2;
|
|
$241 = ((($240)) + 28|0);
|
|
$242 = $r2;
|
|
$243 = ((($242)) + 24|0);
|
|
;HEAP32[$$byval_copy19>>2]=HEAP32[$14>>2]|0;HEAP32[$$byval_copy19+4>>2]=HEAP32[$14+4>>2]|0;HEAP32[$$byval_copy19+8>>2]=HEAP32[$14+8>>2]|0;HEAP32[$$byval_copy19+12>>2]=HEAP32[$14+12>>2]|0;
|
|
;HEAP8[$$byval_copy20>>0]=HEAP8[$237>>0]|0;HEAP8[$$byval_copy20+1>>0]=HEAP8[$237+1>>0]|0;HEAP8[$$byval_copy20+2>>0]=HEAP8[$237+2>>0]|0;HEAP8[$$byval_copy20+3>>0]=HEAP8[$237+3>>0]|0;
|
|
;HEAP8[$$byval_copy21>>0]=HEAP8[$239>>0]|0;HEAP8[$$byval_copy21+1>>0]=HEAP8[$239+1>>0]|0;HEAP8[$$byval_copy21+2>>0]=HEAP8[$239+2>>0]|0;HEAP8[$$byval_copy21+3>>0]=HEAP8[$239+3>>0]|0;
|
|
;HEAP8[$$byval_copy22>>0]=HEAP8[$241>>0]|0;HEAP8[$$byval_copy22+1>>0]=HEAP8[$241+1>>0]|0;HEAP8[$$byval_copy22+2>>0]=HEAP8[$241+2>>0]|0;HEAP8[$$byval_copy22+3>>0]=HEAP8[$241+3>>0]|0;
|
|
;HEAP8[$$byval_copy23>>0]=HEAP8[$243>>0]|0;HEAP8[$$byval_copy23+1>>0]=HEAP8[$243+1>>0]|0;HEAP8[$$byval_copy23+2>>0]=HEAP8[$243+2>>0]|0;HEAP8[$$byval_copy23+3>>0]=HEAP8[$243+3>>0]|0;
|
|
_nk_draw_list_fill_rect_multi_color($219,$$byval_copy19,$$byval_copy20,$$byval_copy21,$$byval_copy22,$$byval_copy23);
|
|
break;
|
|
}
|
|
case 7: {
|
|
$244 = $cmd;
|
|
$c = $244;
|
|
$245 = $0;
|
|
$246 = ((($245)) + 5672|0);
|
|
$247 = $c;
|
|
$248 = ((($247)) + 8|0);
|
|
$249 = HEAP16[$248>>1]|0;
|
|
$250 = (+($249<<16>>16));
|
|
$251 = $c;
|
|
$252 = ((($251)) + 14|0);
|
|
$253 = HEAP16[$252>>1]|0;
|
|
$254 = (+($253&65535));
|
|
$255 = $254 / 2.0;
|
|
$256 = $250 + $255;
|
|
$257 = $c;
|
|
$258 = ((($257)) + 10|0);
|
|
$259 = HEAP16[$258>>1]|0;
|
|
$260 = (+($259<<16>>16));
|
|
$261 = $c;
|
|
$262 = ((($261)) + 16|0);
|
|
$263 = HEAP16[$262>>1]|0;
|
|
$264 = (+($263&65535));
|
|
$265 = $264 / 2.0;
|
|
$266 = $260 + $265;
|
|
_nk_vec2($15,$256,$266);
|
|
$267 = $c;
|
|
$268 = ((($267)) + 14|0);
|
|
$269 = HEAP16[$268>>1]|0;
|
|
$270 = (+($269&65535));
|
|
$271 = $270 / 2.0;
|
|
$272 = $c;
|
|
$273 = ((($272)) + 18|0);
|
|
$274 = $4;
|
|
$275 = ((($274)) + 12|0);
|
|
$276 = HEAP32[$275>>2]|0;
|
|
$277 = $c;
|
|
$278 = ((($277)) + 12|0);
|
|
$279 = HEAP16[$278>>1]|0;
|
|
$280 = (+($279&65535));
|
|
;HEAP32[$$byval_copy24>>2]=HEAP32[$15>>2]|0;HEAP32[$$byval_copy24+4>>2]=HEAP32[$15+4>>2]|0;
|
|
;HEAP8[$$byval_copy25>>0]=HEAP8[$273>>0]|0;HEAP8[$$byval_copy25+1>>0]=HEAP8[$273+1>>0]|0;HEAP8[$$byval_copy25+2>>0]=HEAP8[$273+2>>0]|0;HEAP8[$$byval_copy25+3>>0]=HEAP8[$273+3>>0]|0;
|
|
_nk_draw_list_stroke_circle($246,$$byval_copy24,$271,$$byval_copy25,$276,$280);
|
|
break;
|
|
}
|
|
case 8: {
|
|
$281 = $cmd;
|
|
$c3 = $281;
|
|
$282 = $0;
|
|
$283 = ((($282)) + 5672|0);
|
|
$284 = $c3;
|
|
$285 = ((($284)) + 8|0);
|
|
$286 = HEAP16[$285>>1]|0;
|
|
$287 = (+($286<<16>>16));
|
|
$288 = $c3;
|
|
$289 = ((($288)) + 12|0);
|
|
$290 = HEAP16[$289>>1]|0;
|
|
$291 = (+($290&65535));
|
|
$292 = $291 / 2.0;
|
|
$293 = $287 + $292;
|
|
$294 = $c3;
|
|
$295 = ((($294)) + 10|0);
|
|
$296 = HEAP16[$295>>1]|0;
|
|
$297 = (+($296<<16>>16));
|
|
$298 = $c3;
|
|
$299 = ((($298)) + 14|0);
|
|
$300 = HEAP16[$299>>1]|0;
|
|
$301 = (+($300&65535));
|
|
$302 = $301 / 2.0;
|
|
$303 = $297 + $302;
|
|
_nk_vec2($16,$293,$303);
|
|
$304 = $c3;
|
|
$305 = ((($304)) + 12|0);
|
|
$306 = HEAP16[$305>>1]|0;
|
|
$307 = (+($306&65535));
|
|
$308 = $307 / 2.0;
|
|
$309 = $c3;
|
|
$310 = ((($309)) + 16|0);
|
|
$311 = $4;
|
|
$312 = ((($311)) + 12|0);
|
|
$313 = HEAP32[$312>>2]|0;
|
|
;HEAP32[$$byval_copy26>>2]=HEAP32[$16>>2]|0;HEAP32[$$byval_copy26+4>>2]=HEAP32[$16+4>>2]|0;
|
|
;HEAP8[$$byval_copy27>>0]=HEAP8[$310>>0]|0;HEAP8[$$byval_copy27+1>>0]=HEAP8[$310+1>>0]|0;HEAP8[$$byval_copy27+2>>0]=HEAP8[$310+2>>0]|0;HEAP8[$$byval_copy27+3>>0]=HEAP8[$310+3>>0]|0;
|
|
_nk_draw_list_fill_circle($283,$$byval_copy26,$308,$$byval_copy27,$313);
|
|
break;
|
|
}
|
|
case 9: {
|
|
$314 = $cmd;
|
|
$c4 = $314;
|
|
$315 = $0;
|
|
$316 = ((($315)) + 5672|0);
|
|
$317 = $c4;
|
|
$318 = ((($317)) + 8|0);
|
|
$319 = HEAP16[$318>>1]|0;
|
|
$320 = (+($319<<16>>16));
|
|
$321 = $c4;
|
|
$322 = ((($321)) + 10|0);
|
|
$323 = HEAP16[$322>>1]|0;
|
|
$324 = (+($323<<16>>16));
|
|
_nk_vec2($17,$320,$324);
|
|
;HEAP32[$$byval_copy28>>2]=HEAP32[$17>>2]|0;HEAP32[$$byval_copy28+4>>2]=HEAP32[$17+4>>2]|0;
|
|
_nk_draw_list_path_line_to($316,$$byval_copy28);
|
|
$325 = $0;
|
|
$326 = ((($325)) + 5672|0);
|
|
$327 = $c4;
|
|
$328 = ((($327)) + 8|0);
|
|
$329 = HEAP16[$328>>1]|0;
|
|
$330 = (+($329<<16>>16));
|
|
$331 = $c4;
|
|
$332 = ((($331)) + 10|0);
|
|
$333 = HEAP16[$332>>1]|0;
|
|
$334 = (+($333<<16>>16));
|
|
_nk_vec2($18,$330,$334);
|
|
$335 = $c4;
|
|
$336 = ((($335)) + 12|0);
|
|
$337 = HEAP16[$336>>1]|0;
|
|
$338 = (+($337&65535));
|
|
$339 = $c4;
|
|
$340 = ((($339)) + 16|0);
|
|
$341 = +HEAPF32[$340>>2];
|
|
$342 = $c4;
|
|
$343 = ((($342)) + 16|0);
|
|
$344 = ((($343)) + 4|0);
|
|
$345 = +HEAPF32[$344>>2];
|
|
$346 = $4;
|
|
$347 = ((($346)) + 16|0);
|
|
$348 = HEAP32[$347>>2]|0;
|
|
;HEAP32[$$byval_copy29>>2]=HEAP32[$18>>2]|0;HEAP32[$$byval_copy29+4>>2]=HEAP32[$18+4>>2]|0;
|
|
_nk_draw_list_path_arc_to($326,$$byval_copy29,$338,$341,$345,$348);
|
|
$349 = $0;
|
|
$350 = ((($349)) + 5672|0);
|
|
$351 = $c4;
|
|
$352 = ((($351)) + 24|0);
|
|
$353 = $c4;
|
|
$354 = ((($353)) + 14|0);
|
|
$355 = HEAP16[$354>>1]|0;
|
|
$356 = (+($355&65535));
|
|
;HEAP8[$$byval_copy30>>0]=HEAP8[$352>>0]|0;HEAP8[$$byval_copy30+1>>0]=HEAP8[$352+1>>0]|0;HEAP8[$$byval_copy30+2>>0]=HEAP8[$352+2>>0]|0;HEAP8[$$byval_copy30+3>>0]=HEAP8[$352+3>>0]|0;
|
|
_nk_draw_list_path_stroke($350,$$byval_copy30,1,$356);
|
|
break;
|
|
}
|
|
case 10: {
|
|
$357 = $cmd;
|
|
$c5 = $357;
|
|
$358 = $0;
|
|
$359 = ((($358)) + 5672|0);
|
|
$360 = $c5;
|
|
$361 = ((($360)) + 8|0);
|
|
$362 = HEAP16[$361>>1]|0;
|
|
$363 = (+($362<<16>>16));
|
|
$364 = $c5;
|
|
$365 = ((($364)) + 10|0);
|
|
$366 = HEAP16[$365>>1]|0;
|
|
$367 = (+($366<<16>>16));
|
|
_nk_vec2($19,$363,$367);
|
|
;HEAP32[$$byval_copy31>>2]=HEAP32[$19>>2]|0;HEAP32[$$byval_copy31+4>>2]=HEAP32[$19+4>>2]|0;
|
|
_nk_draw_list_path_line_to($359,$$byval_copy31);
|
|
$368 = $0;
|
|
$369 = ((($368)) + 5672|0);
|
|
$370 = $c5;
|
|
$371 = ((($370)) + 8|0);
|
|
$372 = HEAP16[$371>>1]|0;
|
|
$373 = (+($372<<16>>16));
|
|
$374 = $c5;
|
|
$375 = ((($374)) + 10|0);
|
|
$376 = HEAP16[$375>>1]|0;
|
|
$377 = (+($376<<16>>16));
|
|
_nk_vec2($20,$373,$377);
|
|
$378 = $c5;
|
|
$379 = ((($378)) + 12|0);
|
|
$380 = HEAP16[$379>>1]|0;
|
|
$381 = (+($380&65535));
|
|
$382 = $c5;
|
|
$383 = ((($382)) + 16|0);
|
|
$384 = +HEAPF32[$383>>2];
|
|
$385 = $c5;
|
|
$386 = ((($385)) + 16|0);
|
|
$387 = ((($386)) + 4|0);
|
|
$388 = +HEAPF32[$387>>2];
|
|
$389 = $4;
|
|
$390 = ((($389)) + 16|0);
|
|
$391 = HEAP32[$390>>2]|0;
|
|
;HEAP32[$$byval_copy32>>2]=HEAP32[$20>>2]|0;HEAP32[$$byval_copy32+4>>2]=HEAP32[$20+4>>2]|0;
|
|
_nk_draw_list_path_arc_to($369,$$byval_copy32,$381,$384,$388,$391);
|
|
$392 = $0;
|
|
$393 = ((($392)) + 5672|0);
|
|
$394 = $c5;
|
|
$395 = ((($394)) + 24|0);
|
|
;HEAP8[$$byval_copy33>>0]=HEAP8[$395>>0]|0;HEAP8[$$byval_copy33+1>>0]=HEAP8[$395+1>>0]|0;HEAP8[$$byval_copy33+2>>0]=HEAP8[$395+2>>0]|0;HEAP8[$$byval_copy33+3>>0]=HEAP8[$395+3>>0]|0;
|
|
_nk_draw_list_path_fill($393,$$byval_copy33);
|
|
break;
|
|
}
|
|
case 11: {
|
|
$396 = $cmd;
|
|
$t = $396;
|
|
$397 = $0;
|
|
$398 = ((($397)) + 5672|0);
|
|
$399 = $t;
|
|
$400 = ((($399)) + 10|0);
|
|
$401 = HEAP16[$400>>1]|0;
|
|
$402 = (+($401<<16>>16));
|
|
$403 = $t;
|
|
$404 = ((($403)) + 10|0);
|
|
$405 = ((($404)) + 2|0);
|
|
$406 = HEAP16[$405>>1]|0;
|
|
$407 = (+($406<<16>>16));
|
|
_nk_vec2($21,$402,$407);
|
|
$408 = $t;
|
|
$409 = ((($408)) + 14|0);
|
|
$410 = HEAP16[$409>>1]|0;
|
|
$411 = (+($410<<16>>16));
|
|
$412 = $t;
|
|
$413 = ((($412)) + 14|0);
|
|
$414 = ((($413)) + 2|0);
|
|
$415 = HEAP16[$414>>1]|0;
|
|
$416 = (+($415<<16>>16));
|
|
_nk_vec2($22,$411,$416);
|
|
$417 = $t;
|
|
$418 = ((($417)) + 18|0);
|
|
$419 = HEAP16[$418>>1]|0;
|
|
$420 = (+($419<<16>>16));
|
|
$421 = $t;
|
|
$422 = ((($421)) + 18|0);
|
|
$423 = ((($422)) + 2|0);
|
|
$424 = HEAP16[$423>>1]|0;
|
|
$425 = (+($424<<16>>16));
|
|
_nk_vec2($23,$420,$425);
|
|
$426 = $t;
|
|
$427 = ((($426)) + 22|0);
|
|
$428 = $t;
|
|
$429 = ((($428)) + 8|0);
|
|
$430 = HEAP16[$429>>1]|0;
|
|
$431 = (+($430&65535));
|
|
;HEAP32[$$byval_copy34>>2]=HEAP32[$21>>2]|0;HEAP32[$$byval_copy34+4>>2]=HEAP32[$21+4>>2]|0;
|
|
;HEAP32[$$byval_copy35>>2]=HEAP32[$22>>2]|0;HEAP32[$$byval_copy35+4>>2]=HEAP32[$22+4>>2]|0;
|
|
;HEAP32[$$byval_copy36>>2]=HEAP32[$23>>2]|0;HEAP32[$$byval_copy36+4>>2]=HEAP32[$23+4>>2]|0;
|
|
;HEAP8[$$byval_copy37>>0]=HEAP8[$427>>0]|0;HEAP8[$$byval_copy37+1>>0]=HEAP8[$427+1>>0]|0;HEAP8[$$byval_copy37+2>>0]=HEAP8[$427+2>>0]|0;HEAP8[$$byval_copy37+3>>0]=HEAP8[$427+3>>0]|0;
|
|
_nk_draw_list_stroke_triangle($398,$$byval_copy34,$$byval_copy35,$$byval_copy36,$$byval_copy37,$431);
|
|
break;
|
|
}
|
|
case 12: {
|
|
$432 = $cmd;
|
|
$t6 = $432;
|
|
$433 = $0;
|
|
$434 = ((($433)) + 5672|0);
|
|
$435 = $t6;
|
|
$436 = ((($435)) + 8|0);
|
|
$437 = HEAP16[$436>>1]|0;
|
|
$438 = (+($437<<16>>16));
|
|
$439 = $t6;
|
|
$440 = ((($439)) + 8|0);
|
|
$441 = ((($440)) + 2|0);
|
|
$442 = HEAP16[$441>>1]|0;
|
|
$443 = (+($442<<16>>16));
|
|
_nk_vec2($24,$438,$443);
|
|
$444 = $t6;
|
|
$445 = ((($444)) + 12|0);
|
|
$446 = HEAP16[$445>>1]|0;
|
|
$447 = (+($446<<16>>16));
|
|
$448 = $t6;
|
|
$449 = ((($448)) + 12|0);
|
|
$450 = ((($449)) + 2|0);
|
|
$451 = HEAP16[$450>>1]|0;
|
|
$452 = (+($451<<16>>16));
|
|
_nk_vec2($25,$447,$452);
|
|
$453 = $t6;
|
|
$454 = ((($453)) + 16|0);
|
|
$455 = HEAP16[$454>>1]|0;
|
|
$456 = (+($455<<16>>16));
|
|
$457 = $t6;
|
|
$458 = ((($457)) + 16|0);
|
|
$459 = ((($458)) + 2|0);
|
|
$460 = HEAP16[$459>>1]|0;
|
|
$461 = (+($460<<16>>16));
|
|
_nk_vec2($26,$456,$461);
|
|
$462 = $t6;
|
|
$463 = ((($462)) + 20|0);
|
|
;HEAP32[$$byval_copy38>>2]=HEAP32[$24>>2]|0;HEAP32[$$byval_copy38+4>>2]=HEAP32[$24+4>>2]|0;
|
|
;HEAP32[$$byval_copy39>>2]=HEAP32[$25>>2]|0;HEAP32[$$byval_copy39+4>>2]=HEAP32[$25+4>>2]|0;
|
|
;HEAP32[$$byval_copy40>>2]=HEAP32[$26>>2]|0;HEAP32[$$byval_copy40+4>>2]=HEAP32[$26+4>>2]|0;
|
|
;HEAP8[$$byval_copy41>>0]=HEAP8[$463>>0]|0;HEAP8[$$byval_copy41+1>>0]=HEAP8[$463+1>>0]|0;HEAP8[$$byval_copy41+2>>0]=HEAP8[$463+2>>0]|0;HEAP8[$$byval_copy41+3>>0]=HEAP8[$463+3>>0]|0;
|
|
_nk_draw_list_fill_triangle($434,$$byval_copy38,$$byval_copy39,$$byval_copy40,$$byval_copy41);
|
|
break;
|
|
}
|
|
case 13: {
|
|
$464 = $cmd;
|
|
$p = $464;
|
|
$i = 0;
|
|
while(1) {
|
|
$465 = $i;
|
|
$466 = $p;
|
|
$467 = ((($466)) + 14|0);
|
|
$468 = HEAP16[$467>>1]|0;
|
|
$469 = $468&65535;
|
|
$470 = ($465|0)<($469|0);
|
|
if (!($470)) {
|
|
break;
|
|
}
|
|
$471 = $i;
|
|
$472 = $p;
|
|
$473 = ((($472)) + 16|0);
|
|
$474 = (($473) + ($471<<2)|0);
|
|
$475 = HEAP16[$474>>1]|0;
|
|
$476 = (+($475<<16>>16));
|
|
$477 = $i;
|
|
$478 = $p;
|
|
$479 = ((($478)) + 16|0);
|
|
$480 = (($479) + ($477<<2)|0);
|
|
$481 = ((($480)) + 2|0);
|
|
$482 = HEAP16[$481>>1]|0;
|
|
$483 = (+($482<<16>>16));
|
|
_nk_vec2($pnt,$476,$483);
|
|
$484 = $0;
|
|
$485 = ((($484)) + 5672|0);
|
|
;HEAP32[$pnt$byval_copy>>2]=HEAP32[$pnt>>2]|0;HEAP32[$pnt$byval_copy+4>>2]=HEAP32[$pnt+4>>2]|0;
|
|
_nk_draw_list_path_line_to($485,$pnt$byval_copy);
|
|
$486 = $i;
|
|
$487 = (($486) + 1)|0;
|
|
$i = $487;
|
|
}
|
|
$488 = $0;
|
|
$489 = ((($488)) + 5672|0);
|
|
$490 = $p;
|
|
$491 = ((($490)) + 8|0);
|
|
$492 = $p;
|
|
$493 = ((($492)) + 12|0);
|
|
$494 = HEAP16[$493>>1]|0;
|
|
$495 = (+($494&65535));
|
|
;HEAP8[$$byval_copy42>>0]=HEAP8[$491>>0]|0;HEAP8[$$byval_copy42+1>>0]=HEAP8[$491+1>>0]|0;HEAP8[$$byval_copy42+2>>0]=HEAP8[$491+2>>0]|0;HEAP8[$$byval_copy42+3>>0]=HEAP8[$491+3>>0]|0;
|
|
_nk_draw_list_path_stroke($489,$$byval_copy42,1,$495);
|
|
break;
|
|
}
|
|
case 14: {
|
|
$496 = $cmd;
|
|
$p8 = $496;
|
|
$i7 = 0;
|
|
while(1) {
|
|
$497 = $i7;
|
|
$498 = $p8;
|
|
$499 = ((($498)) + 12|0);
|
|
$500 = HEAP16[$499>>1]|0;
|
|
$501 = $500&65535;
|
|
$502 = ($497|0)<($501|0);
|
|
if (!($502)) {
|
|
break;
|
|
}
|
|
$503 = $i7;
|
|
$504 = $p8;
|
|
$505 = ((($504)) + 14|0);
|
|
$506 = (($505) + ($503<<2)|0);
|
|
$507 = HEAP16[$506>>1]|0;
|
|
$508 = (+($507<<16>>16));
|
|
$509 = $i7;
|
|
$510 = $p8;
|
|
$511 = ((($510)) + 14|0);
|
|
$512 = (($511) + ($509<<2)|0);
|
|
$513 = ((($512)) + 2|0);
|
|
$514 = HEAP16[$513>>1]|0;
|
|
$515 = (+($514<<16>>16));
|
|
_nk_vec2($pnt9,$508,$515);
|
|
$516 = $0;
|
|
$517 = ((($516)) + 5672|0);
|
|
;HEAP32[$pnt9$byval_copy>>2]=HEAP32[$pnt9>>2]|0;HEAP32[$pnt9$byval_copy+4>>2]=HEAP32[$pnt9+4>>2]|0;
|
|
_nk_draw_list_path_line_to($517,$pnt9$byval_copy);
|
|
$518 = $i7;
|
|
$519 = (($518) + 1)|0;
|
|
$i7 = $519;
|
|
}
|
|
$520 = $0;
|
|
$521 = ((($520)) + 5672|0);
|
|
$522 = $p8;
|
|
$523 = ((($522)) + 8|0);
|
|
;HEAP8[$$byval_copy43>>0]=HEAP8[$523>>0]|0;HEAP8[$$byval_copy43+1>>0]=HEAP8[$523+1>>0]|0;HEAP8[$$byval_copy43+2>>0]=HEAP8[$523+2>>0]|0;HEAP8[$$byval_copy43+3>>0]=HEAP8[$523+3>>0]|0;
|
|
_nk_draw_list_path_fill($521,$$byval_copy43);
|
|
break;
|
|
}
|
|
case 15: {
|
|
$524 = $cmd;
|
|
$p11 = $524;
|
|
$i10 = 0;
|
|
while(1) {
|
|
$525 = $i10;
|
|
$526 = $p11;
|
|
$527 = ((($526)) + 14|0);
|
|
$528 = HEAP16[$527>>1]|0;
|
|
$529 = $528&65535;
|
|
$530 = ($525|0)<($529|0);
|
|
if (!($530)) {
|
|
break;
|
|
}
|
|
$531 = $i10;
|
|
$532 = $p11;
|
|
$533 = ((($532)) + 16|0);
|
|
$534 = (($533) + ($531<<2)|0);
|
|
$535 = HEAP16[$534>>1]|0;
|
|
$536 = (+($535<<16>>16));
|
|
$537 = $i10;
|
|
$538 = $p11;
|
|
$539 = ((($538)) + 16|0);
|
|
$540 = (($539) + ($537<<2)|0);
|
|
$541 = ((($540)) + 2|0);
|
|
$542 = HEAP16[$541>>1]|0;
|
|
$543 = (+($542<<16>>16));
|
|
_nk_vec2($pnt12,$536,$543);
|
|
$544 = $0;
|
|
$545 = ((($544)) + 5672|0);
|
|
;HEAP32[$pnt12$byval_copy>>2]=HEAP32[$pnt12>>2]|0;HEAP32[$pnt12$byval_copy+4>>2]=HEAP32[$pnt12+4>>2]|0;
|
|
_nk_draw_list_path_line_to($545,$pnt12$byval_copy);
|
|
$546 = $i10;
|
|
$547 = (($546) + 1)|0;
|
|
$i10 = $547;
|
|
}
|
|
$548 = $0;
|
|
$549 = ((($548)) + 5672|0);
|
|
$550 = $p11;
|
|
$551 = ((($550)) + 8|0);
|
|
$552 = $p11;
|
|
$553 = ((($552)) + 12|0);
|
|
$554 = HEAP16[$553>>1]|0;
|
|
$555 = (+($554&65535));
|
|
;HEAP8[$$byval_copy44>>0]=HEAP8[$551>>0]|0;HEAP8[$$byval_copy44+1>>0]=HEAP8[$551+1>>0]|0;HEAP8[$$byval_copy44+2>>0]=HEAP8[$551+2>>0]|0;HEAP8[$$byval_copy44+3>>0]=HEAP8[$551+3>>0]|0;
|
|
_nk_draw_list_path_stroke($549,$$byval_copy44,0,$555);
|
|
break;
|
|
}
|
|
case 16: {
|
|
$556 = $cmd;
|
|
$t13 = $556;
|
|
$557 = $0;
|
|
$558 = ((($557)) + 5672|0);
|
|
$559 = $t13;
|
|
$560 = ((($559)) + 8|0);
|
|
$561 = HEAP32[$560>>2]|0;
|
|
$562 = $t13;
|
|
$563 = ((($562)) + 20|0);
|
|
$564 = HEAP16[$563>>1]|0;
|
|
$565 = (+($564<<16>>16));
|
|
$566 = $t13;
|
|
$567 = ((($566)) + 22|0);
|
|
$568 = HEAP16[$567>>1]|0;
|
|
$569 = (+($568<<16>>16));
|
|
$570 = $t13;
|
|
$571 = ((($570)) + 24|0);
|
|
$572 = HEAP16[$571>>1]|0;
|
|
$573 = (+($572&65535));
|
|
$574 = $t13;
|
|
$575 = ((($574)) + 26|0);
|
|
$576 = HEAP16[$575>>1]|0;
|
|
$577 = (+($576&65535));
|
|
_nk_rect($27,$565,$569,$573,$577);
|
|
$578 = $t13;
|
|
$579 = ((($578)) + 36|0);
|
|
$580 = $t13;
|
|
$581 = ((($580)) + 32|0);
|
|
$582 = HEAP32[$581>>2]|0;
|
|
$583 = $t13;
|
|
$584 = ((($583)) + 28|0);
|
|
$585 = +HEAPF32[$584>>2];
|
|
$586 = $t13;
|
|
$587 = ((($586)) + 16|0);
|
|
;HEAP32[$$byval_copy45>>2]=HEAP32[$27>>2]|0;HEAP32[$$byval_copy45+4>>2]=HEAP32[$27+4>>2]|0;HEAP32[$$byval_copy45+8>>2]=HEAP32[$27+8>>2]|0;HEAP32[$$byval_copy45+12>>2]=HEAP32[$27+12>>2]|0;
|
|
;HEAP8[$$byval_copy46>>0]=HEAP8[$587>>0]|0;HEAP8[$$byval_copy46+1>>0]=HEAP8[$587+1>>0]|0;HEAP8[$$byval_copy46+2>>0]=HEAP8[$587+2>>0]|0;HEAP8[$$byval_copy46+3>>0]=HEAP8[$587+3>>0]|0;
|
|
_nk_draw_list_add_text($558,$561,$$byval_copy45,$579,$582,$585,$$byval_copy46);
|
|
break;
|
|
}
|
|
default: {
|
|
}
|
|
}
|
|
} while(0);
|
|
$609 = $0;
|
|
$610 = $cmd;
|
|
$611 = (_nk__next($609,$610)|0);
|
|
$cmd = $611;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk__begin($ctx) {
|
|
$ctx = $ctx|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $buffer = 0, $iter = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $ctx;
|
|
$2 = $1;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((14913|0),(13400|0),14686,(28280|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
$0 = 0;
|
|
$50 = $0;
|
|
STACKTOP = sp;return ($50|0);
|
|
}
|
|
$6 = $1;
|
|
$7 = ((($6)) + 11176|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = ($8|0)!=(0);
|
|
if (!($9)) {
|
|
$0 = 0;
|
|
$50 = $0;
|
|
STACKTOP = sp;return ($50|0);
|
|
}
|
|
$10 = $1;
|
|
$11 = ((($10)) + 5596|0);
|
|
$12 = ((($11)) + 32|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$buffer = $13;
|
|
$14 = $1;
|
|
$15 = ((($14)) + 11148|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = ($16|0)!=(0);
|
|
if (!($17)) {
|
|
$18 = $1;
|
|
_nk_build($18);
|
|
$19 = $1;
|
|
$20 = ((($19)) + 11148|0);
|
|
HEAP32[$20>>2] = 1;
|
|
}
|
|
$21 = $1;
|
|
$22 = ((($21)) + 11156|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$iter = $23;
|
|
while(1) {
|
|
$24 = $iter;
|
|
$25 = ($24|0)!=(0|0);
|
|
if ($25) {
|
|
$26 = $iter;
|
|
$27 = ((($26)) + 32|0);
|
|
$28 = ((($27)) + 28|0);
|
|
$29 = HEAP32[$28>>2]|0;
|
|
$30 = $iter;
|
|
$31 = ((($30)) + 32|0);
|
|
$32 = ((($31)) + 32|0);
|
|
$33 = HEAP32[$32>>2]|0;
|
|
$34 = ($29|0)==($33|0);
|
|
if ($34) {
|
|
$51 = 1;
|
|
} else {
|
|
$35 = $iter;
|
|
$36 = ((($35)) + 8|0);
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$38 = $37 & 2048;
|
|
$39 = ($38|0)!=(0);
|
|
$51 = $39;
|
|
}
|
|
} else {
|
|
$51 = 0;
|
|
}
|
|
$40 = $iter;
|
|
if (!($51)) {
|
|
break;
|
|
}
|
|
$41 = ((($40)) + 264|0);
|
|
$42 = HEAP32[$41>>2]|0;
|
|
$iter = $42;
|
|
}
|
|
$43 = ($40|0)!=(0|0);
|
|
if ($43) {
|
|
$44 = $buffer;
|
|
$45 = $iter;
|
|
$46 = ((($45)) + 32|0);
|
|
$47 = ((($46)) + 28|0);
|
|
$48 = HEAP32[$47>>2]|0;
|
|
$49 = (($44) + ($48)|0);
|
|
$0 = $49;
|
|
$50 = $0;
|
|
STACKTOP = sp;return ($50|0);
|
|
} else {
|
|
$0 = 0;
|
|
$50 = $0;
|
|
STACKTOP = sp;return ($50|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk__next($ctx,$cmd) {
|
|
$ctx = $ctx|0;
|
|
$cmd = $cmd|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $buffer = 0, $next = 0, $or$cond = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $ctx;
|
|
$2 = $cmd;
|
|
$3 = $1;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((14913|0),(13400|0),14709,(28290|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
$7 = $2;
|
|
$8 = ($7|0)!=(0|0);
|
|
$or$cond = $6 & $8;
|
|
if ($or$cond) {
|
|
$9 = $1;
|
|
$10 = ((($9)) + 11176|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = ($11|0)!=(0);
|
|
if ($12) {
|
|
$13 = $2;
|
|
$14 = ((($13)) + 4|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = $1;
|
|
$17 = ((($16)) + 5596|0);
|
|
$18 = ((($17)) + 44|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = ($15>>>0)>=($19>>>0);
|
|
if ($20) {
|
|
$0 = 0;
|
|
$31 = $0;
|
|
STACKTOP = sp;return ($31|0);
|
|
} else {
|
|
$21 = $1;
|
|
$22 = ((($21)) + 5596|0);
|
|
$23 = ((($22)) + 32|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$buffer = $24;
|
|
$25 = $buffer;
|
|
$26 = $2;
|
|
$27 = ((($26)) + 4|0);
|
|
$28 = HEAP32[$27>>2]|0;
|
|
$29 = (($25) + ($28)|0);
|
|
$next = $29;
|
|
$30 = $next;
|
|
$0 = $30;
|
|
$31 = $0;
|
|
STACKTOP = sp;return ($31|0);
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$31 = $0;
|
|
STACKTOP = sp;return ($31|0);
|
|
}
|
|
function _nk__draw_begin($ctx,$buffer) {
|
|
$ctx = $ctx|0;
|
|
$buffer = $buffer|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $buffer;
|
|
$2 = $0;
|
|
$3 = ((($2)) + 5672|0);
|
|
$4 = $1;
|
|
$5 = (_nk__draw_list_begin($3,$4)|0);
|
|
STACKTOP = sp;return ($5|0);
|
|
}
|
|
function _nk__draw_next($cmd,$buffer,$ctx) {
|
|
$cmd = $cmd|0;
|
|
$buffer = $buffer|0;
|
|
$ctx = $ctx|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $cmd;
|
|
$1 = $buffer;
|
|
$2 = $ctx;
|
|
$3 = $0;
|
|
$4 = $1;
|
|
$5 = $2;
|
|
$6 = ((($5)) + 5672|0);
|
|
$7 = (_nk__draw_list_next($3,$4,$6)|0);
|
|
STACKTOP = sp;return ($7|0);
|
|
}
|
|
function _nk_font_default_glyph_ranges() {
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
return (24|0);
|
|
}
|
|
function _nk_font_bake_memory($temp,$glyph_count,$config,$count) {
|
|
$temp = $temp|0;
|
|
$glyph_count = $glyph_count|0;
|
|
$config = $config|0;
|
|
$count = $count|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $8 = 0, $9 = 0, $i = 0, $range_count = 0, $total_range_count = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $temp;
|
|
$1 = $glyph_count;
|
|
$2 = $config;
|
|
$3 = $count;
|
|
$range_count = 0;
|
|
$total_range_count = 0;
|
|
$4 = $2;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((14951|0),(13400|0),8781,(14958|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $1;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((14978|0),(13400|0),8782,(14958|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $2;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
$10 = $0;
|
|
HEAP32[$10>>2] = 0;
|
|
$11 = $1;
|
|
HEAP32[$11>>2] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
$12 = $1;
|
|
HEAP32[$12>>2] = 0;
|
|
$13 = $2;
|
|
$14 = ((($13)) + 32|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($15|0)!=(0|0);
|
|
if (!($16)) {
|
|
$17 = (_nk_font_default_glyph_ranges()|0);
|
|
$18 = $2;
|
|
$19 = ((($18)) + 32|0);
|
|
HEAP32[$19>>2] = $17;
|
|
}
|
|
$i = 0;
|
|
while(1) {
|
|
$20 = $i;
|
|
$21 = $3;
|
|
$22 = ($20|0)<($21|0);
|
|
if (!($22)) {
|
|
break;
|
|
}
|
|
$23 = $i;
|
|
$24 = $2;
|
|
$25 = (($24) + (($23*44)|0)|0);
|
|
$26 = ((($25)) + 32|0);
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = (_nk_range_count($27)|0);
|
|
$range_count = $28;
|
|
$29 = $range_count;
|
|
$30 = $total_range_count;
|
|
$31 = (($30) + ($29))|0;
|
|
$total_range_count = $31;
|
|
$32 = $i;
|
|
$33 = $2;
|
|
$34 = (($33) + (($32*44)|0)|0);
|
|
$35 = ((($34)) + 32|0);
|
|
$36 = HEAP32[$35>>2]|0;
|
|
$37 = $range_count;
|
|
$38 = (_nk_range_glyph_count($36,$37)|0);
|
|
$39 = $1;
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$41 = (($40) + ($38))|0;
|
|
HEAP32[$39>>2] = $41;
|
|
$42 = $i;
|
|
$43 = (($42) + 1)|0;
|
|
$i = $43;
|
|
}
|
|
$44 = $1;
|
|
$45 = HEAP32[$44>>2]|0;
|
|
$46 = $45<<4;
|
|
$47 = $0;
|
|
HEAP32[$47>>2] = $46;
|
|
$48 = $total_range_count;
|
|
$49 = ($48*24)|0;
|
|
$50 = $0;
|
|
$51 = HEAP32[$50>>2]|0;
|
|
$52 = (($51) + ($49))|0;
|
|
HEAP32[$50>>2] = $52;
|
|
$53 = $1;
|
|
$54 = HEAP32[$53>>2]|0;
|
|
$55 = ($54*28)|0;
|
|
$56 = $0;
|
|
$57 = HEAP32[$56>>2]|0;
|
|
$58 = (($57) + ($55))|0;
|
|
HEAP32[$56>>2] = $58;
|
|
$59 = $3;
|
|
$60 = ($59*56)|0;
|
|
$61 = $0;
|
|
$62 = HEAP32[$61>>2]|0;
|
|
$63 = (($62) + ($60))|0;
|
|
HEAP32[$61>>2] = $63;
|
|
$64 = $0;
|
|
$65 = HEAP32[$64>>2]|0;
|
|
$66 = (($65) + 64)|0;
|
|
HEAP32[$64>>2] = $66;
|
|
$67 = $0;
|
|
$68 = HEAP32[$67>>2]|0;
|
|
$69 = (($68) + 12)|0;
|
|
HEAP32[$67>>2] = $69;
|
|
$70 = $0;
|
|
$71 = HEAP32[$70>>2]|0;
|
|
$72 = (($71) + 8)|0;
|
|
HEAP32[$70>>2] = $72;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_range_count($range) {
|
|
$range = $range|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
|
|
var $7 = 0, $8 = 0, $9 = 0, $iter = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $range;
|
|
$2 = $1;
|
|
$iter = $2;
|
|
$3 = $1;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((30115|0),(13400|0),8706,(30121|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
$0 = 0;
|
|
$22 = $0;
|
|
STACKTOP = sp;return ($22|0);
|
|
}
|
|
while(1) {
|
|
$7 = $iter;
|
|
$8 = ((($7)) + 4|0);
|
|
$iter = $8;
|
|
$9 = HEAP32[$7>>2]|0;
|
|
$10 = ($9|0)!=(0);
|
|
if (!($10)) {
|
|
break;
|
|
}
|
|
}
|
|
$11 = $iter;
|
|
$12 = $1;
|
|
$13 = ($11|0)==($12|0);
|
|
if ($13) {
|
|
$21 = 0;
|
|
} else {
|
|
$14 = $iter;
|
|
$15 = $1;
|
|
$16 = $14;
|
|
$17 = $15;
|
|
$18 = (($16) - ($17))|0;
|
|
$19 = (($18|0) / 4)&-1;
|
|
$20 = (($19|0) / 2)&-1;
|
|
$21 = $20;
|
|
}
|
|
$0 = $21;
|
|
$22 = $0;
|
|
STACKTOP = sp;return ($22|0);
|
|
}
|
|
function _nk_range_glyph_count($range,$count) {
|
|
$range = $range|0;
|
|
$count = $count|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $diff = 0, $f = 0, $i = 0, $t = 0, $total_glyphs = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $range;
|
|
$1 = $count;
|
|
$i = 0;
|
|
$total_glyphs = 0;
|
|
$i = 0;
|
|
while(1) {
|
|
$2 = $i;
|
|
$3 = $1;
|
|
$4 = ($2|0)<($3|0);
|
|
if (!($4)) {
|
|
label = 6;
|
|
break;
|
|
}
|
|
$5 = $i;
|
|
$6 = $5<<1;
|
|
$7 = (($6) + 0)|0;
|
|
$8 = $0;
|
|
$9 = (($8) + ($7<<2)|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$f = $10;
|
|
$11 = $i;
|
|
$12 = $11<<1;
|
|
$13 = (($12) + 1)|0;
|
|
$14 = $0;
|
|
$15 = (($14) + ($13<<2)|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$t = $16;
|
|
$17 = $t;
|
|
$18 = $f;
|
|
$19 = ($17>>>0)>=($18>>>0);
|
|
if (!($19)) {
|
|
label = 4;
|
|
break;
|
|
}
|
|
$20 = $t;
|
|
$21 = $f;
|
|
$22 = (($20) - ($21))|0;
|
|
$23 = (($22) + 1)|0;
|
|
$diff = $23;
|
|
$24 = $diff;
|
|
$25 = $total_glyphs;
|
|
$26 = (($25) + ($24))|0;
|
|
$total_glyphs = $26;
|
|
$27 = $i;
|
|
$28 = (($27) + 1)|0;
|
|
$i = $28;
|
|
}
|
|
if ((label|0) == 4) {
|
|
___assert_fail((30136|0),(13400|0),8721,(30143|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 6) {
|
|
$29 = $total_glyphs;
|
|
STACKTOP = sp;return ($29|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_font_bake_pack($image_memory,$width,$height,$custom,$temp,$temp_size,$config,$count,$alloc) {
|
|
$image_memory = $image_memory|0;
|
|
$width = $width|0;
|
|
$height = $height|0;
|
|
$custom = $custom|0;
|
|
$temp = $temp|0;
|
|
$temp_size = $temp_size|0;
|
|
$config = $config|0;
|
|
$count = $count|0;
|
|
$alloc = $alloc|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
|
|
var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
|
|
var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
|
|
var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0.0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
|
|
var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0;
|
|
var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0;
|
|
var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0;
|
|
var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0;
|
|
var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0;
|
|
var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0;
|
|
var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0;
|
|
var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0;
|
|
var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
|
|
var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0;
|
|
var $baker = 0, $cfg = 0, $cfg1 = 0, $char_n = 0, $custom_space = 0, $glyph_count = 0, $i = 0, $in_range = 0, $input_i = 0, $n = 0, $or$cond = 0, $or$cond11 = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0, $range_count = 0, $range_n = 0, $rect_n = 0, $tmp = 0;
|
|
var $total_glyph_count = 0, $total_range_count = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$custom_space = sp + 24|0;
|
|
$1 = $image_memory;
|
|
$2 = $width;
|
|
$3 = $height;
|
|
$4 = $custom;
|
|
$5 = $temp;
|
|
$6 = $temp_size;
|
|
$7 = $config;
|
|
$8 = $count;
|
|
$9 = $alloc;
|
|
$total_glyph_count = 0;
|
|
$total_range_count = 0;
|
|
$range_count = 0;
|
|
$i = 0;
|
|
$10 = $1;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
___assert_fail((14990|0),(13400|0),8835,(15003|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $2;
|
|
$13 = ($12|0)!=(0|0);
|
|
if (!($13)) {
|
|
___assert_fail((15021|0),(13400|0),8836,(15003|0));
|
|
// unreachable;
|
|
}
|
|
$14 = $3;
|
|
$15 = ($14|0)!=(0|0);
|
|
if (!($15)) {
|
|
___assert_fail((15027|0),(13400|0),8837,(15003|0));
|
|
// unreachable;
|
|
}
|
|
$16 = $7;
|
|
$17 = ($16|0)!=(0|0);
|
|
if (!($17)) {
|
|
___assert_fail((14951|0),(13400|0),8838,(15003|0));
|
|
// unreachable;
|
|
}
|
|
$18 = $5;
|
|
$19 = ($18|0)!=(0|0);
|
|
if (!($19)) {
|
|
___assert_fail((15034|0),(13400|0),8839,(15003|0));
|
|
// unreachable;
|
|
}
|
|
$20 = $6;
|
|
$21 = ($20|0)!=(0);
|
|
if (!($21)) {
|
|
___assert_fail((15039|0),(13400|0),8840,(15003|0));
|
|
// unreachable;
|
|
}
|
|
$22 = $8;
|
|
$23 = ($22|0)!=(0);
|
|
if (!($23)) {
|
|
___assert_fail((15049|0),(13400|0),8841,(15003|0));
|
|
// unreachable;
|
|
}
|
|
$24 = $9;
|
|
$25 = ($24|0)!=(0|0);
|
|
if (!($25)) {
|
|
___assert_fail((15055|0),(13400|0),8842,(15003|0));
|
|
// unreachable;
|
|
}
|
|
$26 = $1;
|
|
$27 = ($26|0)!=(0|0);
|
|
$28 = $2;
|
|
$29 = ($28|0)!=(0|0);
|
|
$or$cond = $27 & $29;
|
|
$30 = $3;
|
|
$31 = ($30|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $31;
|
|
$32 = $7;
|
|
$33 = ($32|0)!=(0|0);
|
|
$or$cond5 = $or$cond3 & $33;
|
|
$34 = $5;
|
|
$35 = ($34|0)!=(0|0);
|
|
$or$cond7 = $or$cond5 & $35;
|
|
$36 = $6;
|
|
$37 = ($36|0)!=(0);
|
|
$or$cond9 = $or$cond7 & $37;
|
|
$38 = $8;
|
|
$39 = ($38|0)!=(0);
|
|
$or$cond11 = $or$cond9 & $39;
|
|
if (!($or$cond11)) {
|
|
$0 = 0;
|
|
$379 = $0;
|
|
STACKTOP = sp;return ($379|0);
|
|
}
|
|
$i = 0;
|
|
while(1) {
|
|
$40 = $i;
|
|
$41 = $8;
|
|
$42 = ($40|0)<($41|0);
|
|
if (!($42)) {
|
|
break;
|
|
}
|
|
$43 = $i;
|
|
$44 = $7;
|
|
$45 = (($44) + (($43*44)|0)|0);
|
|
$46 = ((($45)) + 32|0);
|
|
$47 = HEAP32[$46>>2]|0;
|
|
$48 = (_nk_range_count($47)|0);
|
|
$range_count = $48;
|
|
$49 = $range_count;
|
|
$50 = $total_range_count;
|
|
$51 = (($50) + ($49))|0;
|
|
$total_range_count = $51;
|
|
$52 = $i;
|
|
$53 = $7;
|
|
$54 = (($53) + (($52*44)|0)|0);
|
|
$55 = ((($54)) + 32|0);
|
|
$56 = HEAP32[$55>>2]|0;
|
|
$57 = $range_count;
|
|
$58 = (_nk_range_glyph_count($56,$57)|0);
|
|
$59 = $total_glyph_count;
|
|
$60 = (($59) + ($58))|0;
|
|
$total_glyph_count = $60;
|
|
$61 = $i;
|
|
$62 = (($61) + 1)|0;
|
|
$i = $62;
|
|
}
|
|
$63 = $5;
|
|
$64 = $6;
|
|
_nk_zero($63,$64);
|
|
$65 = $5;
|
|
$66 = $total_glyph_count;
|
|
$67 = $8;
|
|
$68 = $9;
|
|
$69 = (_nk_font_baker($65,$66,$67,$68)|0);
|
|
$baker = $69;
|
|
$70 = $baker;
|
|
$71 = ($70|0)!=(0|0);
|
|
if (!($71)) {
|
|
$0 = 0;
|
|
$379 = $0;
|
|
STACKTOP = sp;return ($379|0);
|
|
}
|
|
$i = 0;
|
|
while(1) {
|
|
$72 = $i;
|
|
$73 = $8;
|
|
$74 = ($72|0)<($73|0);
|
|
if (!($74)) {
|
|
break;
|
|
}
|
|
$75 = $i;
|
|
$76 = $7;
|
|
$77 = (($76) + (($75*44)|0)|0);
|
|
$cfg = $77;
|
|
$78 = $i;
|
|
$79 = $baker;
|
|
$80 = ((($79)) + 48|0);
|
|
$81 = HEAP32[$80>>2]|0;
|
|
$82 = (($81) + (($78*56)|0)|0);
|
|
$83 = $cfg;
|
|
$84 = HEAP32[$83>>2]|0;
|
|
$85 = (_nk_tt_InitFont($82,$84,0)|0);
|
|
$86 = ($85|0)!=(0);
|
|
if (!($86)) {
|
|
label = 27;
|
|
break;
|
|
}
|
|
$87 = $i;
|
|
$88 = (($87) + 1)|0;
|
|
$i = $88;
|
|
}
|
|
if ((label|0) == 27) {
|
|
$0 = 0;
|
|
$379 = $0;
|
|
STACKTOP = sp;return ($379|0);
|
|
}
|
|
$89 = $3;
|
|
HEAP32[$89>>2] = 0;
|
|
$90 = $total_glyph_count;
|
|
$91 = ($90|0)>(1000);
|
|
$92 = $91 ? 1024 : 512;
|
|
$93 = $2;
|
|
HEAP32[$93>>2] = $92;
|
|
$94 = $baker;
|
|
$95 = ((($94)) + 12|0);
|
|
$96 = $2;
|
|
$97 = HEAP32[$96>>2]|0;
|
|
$98 = $9;
|
|
(_nk_tt_PackBegin($95,0,$97,32768,0,1,$98)|0);
|
|
$input_i = 0;
|
|
$range_n = 0;
|
|
$rect_n = 0;
|
|
$char_n = 0;
|
|
$99 = $4;
|
|
$100 = ($99|0)!=(0|0);
|
|
if ($100) {
|
|
_nk_zero($custom_space,16);
|
|
$101 = $4;
|
|
$102 = ((($101)) + 4|0);
|
|
$103 = HEAP16[$102>>1]|0;
|
|
$104 = $103 << 16 >> 16;
|
|
$105 = $104<<1;
|
|
$106 = (($105) + 1)|0;
|
|
$107 = $106&65535;
|
|
$108 = ((($custom_space)) + 4|0);
|
|
HEAP16[$108>>1] = $107;
|
|
$109 = $4;
|
|
$110 = ((($109)) + 6|0);
|
|
$111 = HEAP16[$110>>1]|0;
|
|
$112 = $111 << 16 >> 16;
|
|
$113 = (($112) + 1)|0;
|
|
$114 = $113&65535;
|
|
$115 = ((($custom_space)) + 6|0);
|
|
HEAP16[$115>>1] = $114;
|
|
$116 = $baker;
|
|
$117 = ((($116)) + 12|0);
|
|
_nk_tt_PackSetOversampling($117,1,1);
|
|
$118 = $baker;
|
|
$119 = ((($118)) + 12|0);
|
|
$120 = HEAP32[$119>>2]|0;
|
|
_nk_rp_pack_rects($120,$custom_space,1);
|
|
$121 = $3;
|
|
$122 = HEAP32[$121>>2]|0;
|
|
$123 = ((($custom_space)) + 10|0);
|
|
$124 = HEAP16[$123>>1]|0;
|
|
$125 = $124&65535;
|
|
$126 = ((($custom_space)) + 6|0);
|
|
$127 = HEAP16[$126>>1]|0;
|
|
$128 = $127&65535;
|
|
$129 = (($125) + ($128))|0;
|
|
$130 = ($122|0)<($129|0);
|
|
if ($130) {
|
|
$131 = ((($custom_space)) + 10|0);
|
|
$132 = HEAP16[$131>>1]|0;
|
|
$133 = $132&65535;
|
|
$134 = ((($custom_space)) + 6|0);
|
|
$135 = HEAP16[$134>>1]|0;
|
|
$136 = $135&65535;
|
|
$137 = (($133) + ($136))|0;
|
|
$141 = $137;
|
|
} else {
|
|
$138 = $3;
|
|
$139 = HEAP32[$138>>2]|0;
|
|
$141 = $139;
|
|
}
|
|
$140 = $3;
|
|
HEAP32[$140>>2] = $141;
|
|
$142 = ((($custom_space)) + 8|0);
|
|
$143 = HEAP16[$142>>1]|0;
|
|
$144 = $4;
|
|
HEAP16[$144>>1] = $143;
|
|
$145 = ((($custom_space)) + 10|0);
|
|
$146 = HEAP16[$145>>1]|0;
|
|
$147 = $4;
|
|
$148 = ((($147)) + 2|0);
|
|
HEAP16[$148>>1] = $146;
|
|
$149 = ((($custom_space)) + 4|0);
|
|
$150 = HEAP16[$149>>1]|0;
|
|
$151 = $4;
|
|
$152 = ((($151)) + 4|0);
|
|
HEAP16[$152>>1] = $150;
|
|
$153 = ((($custom_space)) + 6|0);
|
|
$154 = HEAP16[$153>>1]|0;
|
|
$155 = $4;
|
|
$156 = ((($155)) + 6|0);
|
|
HEAP16[$156>>1] = $154;
|
|
}
|
|
$input_i = 0;
|
|
while(1) {
|
|
$157 = $input_i;
|
|
$158 = $8;
|
|
$159 = ($157|0)<($158|0);
|
|
if (!($159)) {
|
|
break;
|
|
}
|
|
$n = 0;
|
|
$160 = $input_i;
|
|
$161 = $7;
|
|
$162 = (($161) + (($160*44)|0)|0);
|
|
$cfg1 = $162;
|
|
$163 = $input_i;
|
|
$164 = $baker;
|
|
$165 = ((($164)) + 48|0);
|
|
$166 = HEAP32[$165>>2]|0;
|
|
$167 = (($166) + (($163*56)|0)|0);
|
|
$tmp = $167;
|
|
$glyph_count = 0;
|
|
$range_count = 0;
|
|
$168 = $cfg1;
|
|
$169 = ((($168)) + 32|0);
|
|
$170 = HEAP32[$169>>2]|0;
|
|
$in_range = $170;
|
|
while(1) {
|
|
$171 = $in_range;
|
|
$172 = HEAP32[$171>>2]|0;
|
|
$173 = ($172|0)!=(0);
|
|
if (!($173)) {
|
|
break;
|
|
}
|
|
$174 = $in_range;
|
|
$175 = ((($174)) + 4|0);
|
|
$176 = HEAP32[$175>>2]|0;
|
|
$177 = ($176|0)!=(0);
|
|
if (!($177)) {
|
|
break;
|
|
}
|
|
$178 = $in_range;
|
|
$179 = ((($178)) + 4|0);
|
|
$180 = HEAP32[$179>>2]|0;
|
|
$181 = $in_range;
|
|
$182 = HEAP32[$181>>2]|0;
|
|
$183 = (($180) - ($182))|0;
|
|
$184 = (($183) + 1)|0;
|
|
$185 = $glyph_count;
|
|
$186 = (($185) + ($184))|0;
|
|
$glyph_count = $186;
|
|
$187 = $range_count;
|
|
$188 = (($187) + 1)|0;
|
|
$range_count = $188;
|
|
$189 = $in_range;
|
|
$190 = ((($189)) + 8|0);
|
|
$in_range = $190;
|
|
}
|
|
$191 = $baker;
|
|
$192 = ((($191)) + 60|0);
|
|
$193 = HEAP32[$192>>2]|0;
|
|
$194 = $range_n;
|
|
$195 = (($193) + (($194*24)|0)|0);
|
|
$196 = $tmp;
|
|
$197 = ((($196)) + 48|0);
|
|
HEAP32[$197>>2] = $195;
|
|
$198 = $range_count;
|
|
$199 = $tmp;
|
|
$200 = ((($199)) + 52|0);
|
|
HEAP32[$200>>2] = $198;
|
|
$201 = $range_count;
|
|
$202 = $range_n;
|
|
$203 = (($202) + ($201))|0;
|
|
$range_n = $203;
|
|
$i = 0;
|
|
while(1) {
|
|
$204 = $i;
|
|
$205 = $range_count;
|
|
$206 = ($204|0)<($205|0);
|
|
if (!($206)) {
|
|
break;
|
|
}
|
|
$207 = $i;
|
|
$208 = $207<<1;
|
|
$209 = $cfg1;
|
|
$210 = ((($209)) + 32|0);
|
|
$211 = HEAP32[$210>>2]|0;
|
|
$212 = (($211) + ($208<<2)|0);
|
|
$in_range = $212;
|
|
$213 = $cfg1;
|
|
$214 = ((($213)) + 16|0);
|
|
$215 = +HEAPF32[$214>>2];
|
|
$216 = $i;
|
|
$217 = $tmp;
|
|
$218 = ((($217)) + 48|0);
|
|
$219 = HEAP32[$218>>2]|0;
|
|
$220 = (($219) + (($216*24)|0)|0);
|
|
HEAPF32[$220>>2] = $215;
|
|
$221 = $in_range;
|
|
$222 = HEAP32[$221>>2]|0;
|
|
$223 = $i;
|
|
$224 = $tmp;
|
|
$225 = ((($224)) + 48|0);
|
|
$226 = HEAP32[$225>>2]|0;
|
|
$227 = (($226) + (($223*24)|0)|0);
|
|
$228 = ((($227)) + 4|0);
|
|
HEAP32[$228>>2] = $222;
|
|
$229 = $in_range;
|
|
$230 = ((($229)) + 4|0);
|
|
$231 = HEAP32[$230>>2]|0;
|
|
$232 = $in_range;
|
|
$233 = HEAP32[$232>>2]|0;
|
|
$234 = (($231) - ($233))|0;
|
|
$235 = (($234) + 1)|0;
|
|
$236 = $i;
|
|
$237 = $tmp;
|
|
$238 = ((($237)) + 48|0);
|
|
$239 = HEAP32[$238>>2]|0;
|
|
$240 = (($239) + (($236*24)|0)|0);
|
|
$241 = ((($240)) + 12|0);
|
|
HEAP32[$241>>2] = $235;
|
|
$242 = $baker;
|
|
$243 = ((($242)) + 52|0);
|
|
$244 = HEAP32[$243>>2]|0;
|
|
$245 = $char_n;
|
|
$246 = (($244) + (($245*28)|0)|0);
|
|
$247 = $i;
|
|
$248 = $tmp;
|
|
$249 = ((($248)) + 48|0);
|
|
$250 = HEAP32[$249>>2]|0;
|
|
$251 = (($250) + (($247*24)|0)|0);
|
|
$252 = ((($251)) + 16|0);
|
|
HEAP32[$252>>2] = $246;
|
|
$253 = $i;
|
|
$254 = $tmp;
|
|
$255 = ((($254)) + 48|0);
|
|
$256 = HEAP32[$255>>2]|0;
|
|
$257 = (($256) + (($253*24)|0)|0);
|
|
$258 = ((($257)) + 12|0);
|
|
$259 = HEAP32[$258>>2]|0;
|
|
$260 = $char_n;
|
|
$261 = (($260) + ($259))|0;
|
|
$char_n = $261;
|
|
$262 = $i;
|
|
$263 = (($262) + 1)|0;
|
|
$i = $263;
|
|
}
|
|
$264 = $baker;
|
|
$265 = ((($264)) + 56|0);
|
|
$266 = HEAP32[$265>>2]|0;
|
|
$267 = $rect_n;
|
|
$268 = (($266) + ($267<<4)|0);
|
|
$269 = $tmp;
|
|
$270 = ((($269)) + 44|0);
|
|
HEAP32[$270>>2] = $268;
|
|
$271 = $glyph_count;
|
|
$272 = $rect_n;
|
|
$273 = (($272) + ($271))|0;
|
|
$rect_n = $273;
|
|
$274 = $baker;
|
|
$275 = ((($274)) + 12|0);
|
|
$276 = $cfg1;
|
|
$277 = ((($276)) + 12|0);
|
|
$278 = HEAP8[$277>>0]|0;
|
|
$279 = $278&255;
|
|
$280 = $cfg1;
|
|
$281 = ((($280)) + 11|0);
|
|
$282 = HEAP8[$281>>0]|0;
|
|
$283 = $282&255;
|
|
_nk_tt_PackSetOversampling($275,$279,$283);
|
|
$284 = $baker;
|
|
$285 = ((($284)) + 12|0);
|
|
$286 = $tmp;
|
|
$287 = $tmp;
|
|
$288 = ((($287)) + 48|0);
|
|
$289 = HEAP32[$288>>2]|0;
|
|
$290 = $tmp;
|
|
$291 = ((($290)) + 52|0);
|
|
$292 = HEAP32[$291>>2]|0;
|
|
$293 = $tmp;
|
|
$294 = ((($293)) + 44|0);
|
|
$295 = HEAP32[$294>>2]|0;
|
|
$296 = (_nk_tt_PackFontRangesGatherRects($285,$286,$289,$292,$295)|0);
|
|
$n = $296;
|
|
$297 = $baker;
|
|
$298 = ((($297)) + 12|0);
|
|
$299 = HEAP32[$298>>2]|0;
|
|
$300 = $tmp;
|
|
$301 = ((($300)) + 44|0);
|
|
$302 = HEAP32[$301>>2]|0;
|
|
$303 = $n;
|
|
_nk_rp_pack_rects($299,$302,$303);
|
|
$i = 0;
|
|
while(1) {
|
|
$304 = $i;
|
|
$305 = $n;
|
|
$306 = ($304|0)<($305|0);
|
|
if (!($306)) {
|
|
break;
|
|
}
|
|
$307 = $i;
|
|
$308 = $tmp;
|
|
$309 = ((($308)) + 44|0);
|
|
$310 = HEAP32[$309>>2]|0;
|
|
$311 = (($310) + ($307<<4)|0);
|
|
$312 = ((($311)) + 12|0);
|
|
$313 = HEAP32[$312>>2]|0;
|
|
$314 = ($313|0)!=(0);
|
|
if ($314) {
|
|
$315 = $3;
|
|
$316 = HEAP32[$315>>2]|0;
|
|
$317 = $i;
|
|
$318 = $tmp;
|
|
$319 = ((($318)) + 44|0);
|
|
$320 = HEAP32[$319>>2]|0;
|
|
$321 = (($320) + ($317<<4)|0);
|
|
$322 = ((($321)) + 10|0);
|
|
$323 = HEAP16[$322>>1]|0;
|
|
$324 = $323&65535;
|
|
$325 = $i;
|
|
$326 = $tmp;
|
|
$327 = ((($326)) + 44|0);
|
|
$328 = HEAP32[$327>>2]|0;
|
|
$329 = (($328) + ($325<<4)|0);
|
|
$330 = ((($329)) + 6|0);
|
|
$331 = HEAP16[$330>>1]|0;
|
|
$332 = $331&65535;
|
|
$333 = (($324) + ($332))|0;
|
|
$334 = ($316|0)<($333|0);
|
|
if ($334) {
|
|
$335 = $i;
|
|
$336 = $tmp;
|
|
$337 = ((($336)) + 44|0);
|
|
$338 = HEAP32[$337>>2]|0;
|
|
$339 = (($338) + ($335<<4)|0);
|
|
$340 = ((($339)) + 10|0);
|
|
$341 = HEAP16[$340>>1]|0;
|
|
$342 = $341&65535;
|
|
$343 = $i;
|
|
$344 = $tmp;
|
|
$345 = ((($344)) + 44|0);
|
|
$346 = HEAP32[$345>>2]|0;
|
|
$347 = (($346) + ($343<<4)|0);
|
|
$348 = ((($347)) + 6|0);
|
|
$349 = HEAP16[$348>>1]|0;
|
|
$350 = $349&65535;
|
|
$351 = (($342) + ($350))|0;
|
|
$355 = $351;
|
|
} else {
|
|
$352 = $3;
|
|
$353 = HEAP32[$352>>2]|0;
|
|
$355 = $353;
|
|
}
|
|
$354 = $3;
|
|
HEAP32[$354>>2] = $355;
|
|
}
|
|
$356 = $i;
|
|
$357 = (($356) + 1)|0;
|
|
$i = $357;
|
|
}
|
|
$358 = $input_i;
|
|
$359 = (($358) + 1)|0;
|
|
$input_i = $359;
|
|
}
|
|
$360 = $rect_n;
|
|
$361 = $total_glyph_count;
|
|
$362 = ($360|0)==($361|0);
|
|
if (!($362)) {
|
|
___assert_fail((15061|0),(13400|0),8930,(15003|0));
|
|
// unreachable;
|
|
}
|
|
$363 = $char_n;
|
|
$364 = $total_glyph_count;
|
|
$365 = ($363|0)==($364|0);
|
|
if (!($365)) {
|
|
___assert_fail((15089|0),(13400|0),8931,(15003|0));
|
|
// unreachable;
|
|
}
|
|
$366 = $range_n;
|
|
$367 = $total_range_count;
|
|
$368 = ($366|0)==($367|0);
|
|
if (!($368)) {
|
|
___assert_fail((15117|0),(13400|0),8932,(15003|0));
|
|
// unreachable;
|
|
}
|
|
$369 = $3;
|
|
$370 = HEAP32[$369>>2]|0;
|
|
$371 = (_nk_round_up_pow2($370)|0);
|
|
$372 = $3;
|
|
HEAP32[$372>>2] = $371;
|
|
$373 = $2;
|
|
$374 = HEAP32[$373>>2]|0;
|
|
$375 = $3;
|
|
$376 = HEAP32[$375>>2]|0;
|
|
$377 = Math_imul($374, $376)|0;
|
|
$378 = $1;
|
|
HEAP32[$378>>2] = $377;
|
|
$0 = 1;
|
|
$379 = $0;
|
|
STACKTOP = sp;return ($379|0);
|
|
}
|
|
function _nk_font_baker($memory,$glyph_count,$count,$alloc) {
|
|
$memory = $memory|0;
|
|
$glyph_count = $glyph_count|0;
|
|
$count = $count|0;
|
|
$alloc = $alloc|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $baker = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $memory;
|
|
$2 = $glyph_count;
|
|
$3 = $count;
|
|
$4 = $alloc;
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if ($6) {
|
|
$7 = $1;
|
|
$8 = ((($7)) + 3|0);
|
|
$9 = $8;
|
|
$10 = $9 & -4;
|
|
$11 = $10;
|
|
$baker = $11;
|
|
$12 = $baker;
|
|
$13 = ((($12)) + 64|0);
|
|
$14 = ((($13)) + 3|0);
|
|
$15 = $14;
|
|
$16 = $15 & -4;
|
|
$17 = $16;
|
|
$18 = $baker;
|
|
$19 = ((($18)) + 48|0);
|
|
HEAP32[$19>>2] = $17;
|
|
$20 = $baker;
|
|
$21 = ((($20)) + 48|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = $3;
|
|
$24 = (($22) + (($23*56)|0)|0);
|
|
$25 = ((($24)) + 3|0);
|
|
$26 = $25;
|
|
$27 = $26 & -4;
|
|
$28 = $27;
|
|
$29 = $baker;
|
|
$30 = ((($29)) + 52|0);
|
|
HEAP32[$30>>2] = $28;
|
|
$31 = $baker;
|
|
$32 = ((($31)) + 52|0);
|
|
$33 = HEAP32[$32>>2]|0;
|
|
$34 = $2;
|
|
$35 = (($33) + (($34*28)|0)|0);
|
|
$36 = ((($35)) + 3|0);
|
|
$37 = $36;
|
|
$38 = $37 & -4;
|
|
$39 = $38;
|
|
$40 = $baker;
|
|
$41 = ((($40)) + 56|0);
|
|
HEAP32[$41>>2] = $39;
|
|
$42 = $baker;
|
|
$43 = ((($42)) + 56|0);
|
|
$44 = HEAP32[$43>>2]|0;
|
|
$45 = $2;
|
|
$46 = (($44) + ($45<<4)|0);
|
|
$47 = ((($46)) + 3|0);
|
|
$48 = $47;
|
|
$49 = $48 & -4;
|
|
$50 = $49;
|
|
$51 = $baker;
|
|
$52 = ((($51)) + 60|0);
|
|
HEAP32[$52>>2] = $50;
|
|
$53 = $baker;
|
|
$54 = $4;
|
|
;HEAP32[$53>>2]=HEAP32[$54>>2]|0;HEAP32[$53+4>>2]=HEAP32[$54+4>>2]|0;HEAP32[$53+8>>2]=HEAP32[$54+8>>2]|0;
|
|
$55 = $baker;
|
|
$0 = $55;
|
|
$56 = $0;
|
|
STACKTOP = sp;return ($56|0);
|
|
} else {
|
|
$0 = 0;
|
|
$56 = $0;
|
|
STACKTOP = sp;return ($56|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_tt_InitFont($info,$data2,$fontstart) {
|
|
$info = $info|0;
|
|
$data2 = $data2|0;
|
|
$fontstart = $fontstart|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
|
|
var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
|
|
var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
|
|
var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0;
|
|
var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0;
|
|
var $98 = 0, $99 = 0, $cmap = 0, $data = 0, $encoding_record = 0, $i = 0, $numTables = 0, $t = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $info;
|
|
$2 = $data2;
|
|
$3 = $fontstart;
|
|
$4 = $2;
|
|
$data = $4;
|
|
$5 = $data;
|
|
$6 = $1;
|
|
HEAP32[$6>>2] = $5;
|
|
$7 = $3;
|
|
$8 = $1;
|
|
$9 = ((($8)) + 4|0);
|
|
HEAP32[$9>>2] = $7;
|
|
$10 = $data;
|
|
$11 = $3;
|
|
$12 = (_nk_tt__find_table($10,$11,30164)|0);
|
|
$cmap = $12;
|
|
$13 = $data;
|
|
$14 = $3;
|
|
$15 = (_nk_tt__find_table($13,$14,30169)|0);
|
|
$16 = $1;
|
|
$17 = ((($16)) + 12|0);
|
|
HEAP32[$17>>2] = $15;
|
|
$18 = $data;
|
|
$19 = $3;
|
|
$20 = (_nk_tt__find_table($18,$19,30174)|0);
|
|
$21 = $1;
|
|
$22 = ((($21)) + 16|0);
|
|
HEAP32[$22>>2] = $20;
|
|
$23 = $data;
|
|
$24 = $3;
|
|
$25 = (_nk_tt__find_table($23,$24,30179)|0);
|
|
$26 = $1;
|
|
$27 = ((($26)) + 20|0);
|
|
HEAP32[$27>>2] = $25;
|
|
$28 = $data;
|
|
$29 = $3;
|
|
$30 = (_nk_tt__find_table($28,$29,30184)|0);
|
|
$31 = $1;
|
|
$32 = ((($31)) + 24|0);
|
|
HEAP32[$32>>2] = $30;
|
|
$33 = $data;
|
|
$34 = $3;
|
|
$35 = (_nk_tt__find_table($33,$34,30189)|0);
|
|
$36 = $1;
|
|
$37 = ((($36)) + 28|0);
|
|
HEAP32[$37>>2] = $35;
|
|
$38 = $data;
|
|
$39 = $3;
|
|
$40 = (_nk_tt__find_table($38,$39,30194)|0);
|
|
$41 = $1;
|
|
$42 = ((($41)) + 32|0);
|
|
HEAP32[$42>>2] = $40;
|
|
$43 = $cmap;
|
|
$44 = ($43|0)!=(0);
|
|
if ($44) {
|
|
$45 = $1;
|
|
$46 = ((($45)) + 12|0);
|
|
$47 = HEAP32[$46>>2]|0;
|
|
$48 = ($47|0)!=(0);
|
|
if ($48) {
|
|
$49 = $1;
|
|
$50 = ((($49)) + 16|0);
|
|
$51 = HEAP32[$50>>2]|0;
|
|
$52 = ($51|0)!=(0);
|
|
if ($52) {
|
|
$53 = $1;
|
|
$54 = ((($53)) + 20|0);
|
|
$55 = HEAP32[$54>>2]|0;
|
|
$56 = ($55|0)!=(0);
|
|
if ($56) {
|
|
$57 = $1;
|
|
$58 = ((($57)) + 24|0);
|
|
$59 = HEAP32[$58>>2]|0;
|
|
$60 = ($59|0)!=(0);
|
|
if ($60) {
|
|
$61 = $1;
|
|
$62 = ((($61)) + 28|0);
|
|
$63 = HEAP32[$62>>2]|0;
|
|
$64 = ($63|0)!=(0);
|
|
if ($64) {
|
|
$65 = $data;
|
|
$66 = $3;
|
|
$67 = (_nk_tt__find_table($65,$66,30199)|0);
|
|
$t = $67;
|
|
$68 = $t;
|
|
$69 = ($68|0)!=(0);
|
|
if ($69) {
|
|
$70 = $data;
|
|
$71 = $t;
|
|
$72 = (($70) + ($71)|0);
|
|
$73 = ((($72)) + 4|0);
|
|
$74 = (_nk_ttUSHORT($73)|0);
|
|
$75 = $74&65535;
|
|
$76 = $1;
|
|
$77 = ((($76)) + 8|0);
|
|
HEAP32[$77>>2] = $75;
|
|
} else {
|
|
$78 = $1;
|
|
$79 = ((($78)) + 8|0);
|
|
HEAP32[$79>>2] = 65535;
|
|
}
|
|
$80 = $data;
|
|
$81 = $cmap;
|
|
$82 = (($80) + ($81)|0);
|
|
$83 = ((($82)) + 2|0);
|
|
$84 = (_nk_ttUSHORT($83)|0);
|
|
$85 = $84&65535;
|
|
$numTables = $85;
|
|
$86 = $1;
|
|
$87 = ((($86)) + 36|0);
|
|
HEAP32[$87>>2] = 0;
|
|
$i = 0;
|
|
while(1) {
|
|
$88 = $i;
|
|
$89 = $numTables;
|
|
$90 = ($88|0)<($89|0);
|
|
if (!($90)) {
|
|
break;
|
|
}
|
|
$91 = $cmap;
|
|
$92 = (($91) + 4)|0;
|
|
$93 = $i;
|
|
$94 = $93<<3;
|
|
$95 = (($92) + ($94))|0;
|
|
$encoding_record = $95;
|
|
$96 = $data;
|
|
$97 = $encoding_record;
|
|
$98 = (($96) + ($97)|0);
|
|
$99 = (_nk_ttUSHORT($98)|0);
|
|
$100 = $99&65535;
|
|
L15: do {
|
|
switch ($100|0) {
|
|
case 3: {
|
|
$101 = $data;
|
|
$102 = $encoding_record;
|
|
$103 = (($101) + ($102)|0);
|
|
$104 = ((($103)) + 2|0);
|
|
$105 = (_nk_ttUSHORT($104)|0);
|
|
$106 = $105&65535;
|
|
switch ($106|0) {
|
|
case 10: case 1: {
|
|
break;
|
|
}
|
|
default: {
|
|
break L15;
|
|
}
|
|
}
|
|
$107 = $cmap;
|
|
$108 = $data;
|
|
$109 = $encoding_record;
|
|
$110 = (($108) + ($109)|0);
|
|
$111 = ((($110)) + 4|0);
|
|
$112 = (_nk_ttULONG($111)|0);
|
|
$113 = (($107) + ($112))|0;
|
|
$114 = $1;
|
|
$115 = ((($114)) + 36|0);
|
|
HEAP32[$115>>2] = $113;
|
|
break;
|
|
}
|
|
case 0: {
|
|
$116 = $cmap;
|
|
$117 = $data;
|
|
$118 = $encoding_record;
|
|
$119 = (($117) + ($118)|0);
|
|
$120 = ((($119)) + 4|0);
|
|
$121 = (_nk_ttULONG($120)|0);
|
|
$122 = (($116) + ($121))|0;
|
|
$123 = $1;
|
|
$124 = ((($123)) + 36|0);
|
|
HEAP32[$124>>2] = $122;
|
|
break;
|
|
}
|
|
default: {
|
|
}
|
|
}
|
|
} while(0);
|
|
$125 = $i;
|
|
$126 = (($125) + 1)|0;
|
|
$i = $126;
|
|
}
|
|
$127 = $1;
|
|
$128 = ((($127)) + 36|0);
|
|
$129 = HEAP32[$128>>2]|0;
|
|
$130 = ($129|0)==(0);
|
|
if ($130) {
|
|
$0 = 0;
|
|
$141 = $0;
|
|
STACKTOP = sp;return ($141|0);
|
|
} else {
|
|
$131 = $data;
|
|
$132 = $1;
|
|
$133 = ((($132)) + 16|0);
|
|
$134 = HEAP32[$133>>2]|0;
|
|
$135 = (($131) + ($134)|0);
|
|
$136 = ((($135)) + 50|0);
|
|
$137 = (_nk_ttUSHORT($136)|0);
|
|
$138 = $137&65535;
|
|
$139 = $1;
|
|
$140 = ((($139)) + 40|0);
|
|
HEAP32[$140>>2] = $138;
|
|
$0 = 1;
|
|
$141 = $0;
|
|
STACKTOP = sp;return ($141|0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$141 = $0;
|
|
STACKTOP = sp;return ($141|0);
|
|
}
|
|
function _nk_tt_PackBegin($spc,$pixels,$pw,$ph,$stride_in_bytes,$padding,$alloc) {
|
|
$spc = $spc|0;
|
|
$pixels = $pixels|0;
|
|
$pw = $pw|0;
|
|
$ph = $ph|0;
|
|
$stride_in_bytes = $stride_in_bytes|0;
|
|
$padding = $padding|0;
|
|
$alloc = $alloc|0;
|
|
var $$byval_copy = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0;
|
|
var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0;
|
|
var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0;
|
|
var $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0;
|
|
var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $9 = 0, $context = 0, $nodes = 0, $num_nodes = 0, $or$cond = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy4 = sp + 56|0;
|
|
$$byval_copy3 = sp + 52|0;
|
|
$$byval_copy2 = sp + 48|0;
|
|
$$byval_copy = sp + 44|0;
|
|
$1 = $spc;
|
|
$2 = $pixels;
|
|
$3 = $pw;
|
|
$4 = $ph;
|
|
$5 = $stride_in_bytes;
|
|
$6 = $padding;
|
|
$7 = $alloc;
|
|
$8 = $3;
|
|
$9 = $6;
|
|
$10 = (($8) - ($9))|0;
|
|
$num_nodes = $10;
|
|
$11 = $7;
|
|
$12 = ((($11)) + 4|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = $7;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$14>>2]|0;
|
|
$15 = (FUNCTION_TABLE_iiii[$13 & 7]($$byval_copy,0,48)|0);
|
|
$context = $15;
|
|
$16 = $7;
|
|
$17 = ((($16)) + 4|0);
|
|
$18 = HEAP32[$17>>2]|0;
|
|
$19 = $7;
|
|
$20 = $num_nodes;
|
|
$21 = $20<<3;
|
|
;HEAP32[$$byval_copy2>>2]=HEAP32[$19>>2]|0;
|
|
$22 = (FUNCTION_TABLE_iiii[$18 & 7]($$byval_copy2,0,$21)|0);
|
|
$nodes = $22;
|
|
$23 = $context;
|
|
$24 = ($23|0)==(0|0);
|
|
$25 = $nodes;
|
|
$26 = ($25|0)==(0|0);
|
|
$or$cond = $24 | $26;
|
|
if (!($or$cond)) {
|
|
$41 = $3;
|
|
$42 = $1;
|
|
$43 = ((($42)) + 4|0);
|
|
HEAP32[$43>>2] = $41;
|
|
$44 = $4;
|
|
$45 = $1;
|
|
$46 = ((($45)) + 8|0);
|
|
HEAP32[$46>>2] = $44;
|
|
$47 = $2;
|
|
$48 = $1;
|
|
$49 = ((($48)) + 28|0);
|
|
HEAP32[$49>>2] = $47;
|
|
$50 = $context;
|
|
$51 = $1;
|
|
HEAP32[$51>>2] = $50;
|
|
$52 = $nodes;
|
|
$53 = $1;
|
|
$54 = ((($53)) + 32|0);
|
|
HEAP32[$54>>2] = $52;
|
|
$55 = $6;
|
|
$56 = $1;
|
|
$57 = ((($56)) + 16|0);
|
|
HEAP32[$57>>2] = $55;
|
|
$58 = $5;
|
|
$59 = ($58|0)!=(0);
|
|
$60 = $5;
|
|
$61 = $3;
|
|
$62 = $59 ? $60 : $61;
|
|
$63 = $1;
|
|
$64 = ((($63)) + 12|0);
|
|
HEAP32[$64>>2] = $62;
|
|
$65 = $1;
|
|
$66 = ((($65)) + 20|0);
|
|
HEAP32[$66>>2] = 1;
|
|
$67 = $1;
|
|
$68 = ((($67)) + 24|0);
|
|
HEAP32[$68>>2] = 1;
|
|
$69 = $context;
|
|
$70 = $3;
|
|
$71 = $6;
|
|
$72 = (($70) - ($71))|0;
|
|
$73 = $4;
|
|
$74 = $6;
|
|
$75 = (($73) - ($74))|0;
|
|
$76 = $nodes;
|
|
$77 = $num_nodes;
|
|
_nk_rp_init_target($69,$72,$75,$76,$77);
|
|
$78 = $2;
|
|
$79 = ($78|0)!=(0|0);
|
|
if ($79) {
|
|
$80 = $2;
|
|
$81 = $3;
|
|
$82 = $4;
|
|
$83 = Math_imul($81, $82)|0;
|
|
_nk_memset($80,0,$83);
|
|
}
|
|
$0 = 1;
|
|
$84 = $0;
|
|
STACKTOP = sp;return ($84|0);
|
|
}
|
|
$27 = $context;
|
|
$28 = ($27|0)!=(0|0);
|
|
if ($28) {
|
|
$29 = $7;
|
|
$30 = ((($29)) + 8|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = $7;
|
|
$33 = $context;
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$32>>2]|0;
|
|
FUNCTION_TABLE_vii[$31 & 31]($$byval_copy3,$33);
|
|
}
|
|
$34 = $nodes;
|
|
$35 = ($34|0)!=(0|0);
|
|
if ($35) {
|
|
$36 = $7;
|
|
$37 = ((($36)) + 8|0);
|
|
$38 = HEAP32[$37>>2]|0;
|
|
$39 = $7;
|
|
$40 = $nodes;
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$39>>2]|0;
|
|
FUNCTION_TABLE_vii[$38 & 31]($$byval_copy4,$40);
|
|
}
|
|
$0 = 0;
|
|
$84 = $0;
|
|
STACKTOP = sp;return ($84|0);
|
|
}
|
|
function _nk_tt_PackSetOversampling($spc,$h_oversample,$v_oversample) {
|
|
$spc = $spc|0;
|
|
$h_oversample = $h_oversample|0;
|
|
$v_oversample = $v_oversample|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $spc;
|
|
$1 = $h_oversample;
|
|
$2 = $v_oversample;
|
|
$3 = $1;
|
|
$4 = ($3>>>0)<=(8);
|
|
if (!($4)) {
|
|
___assert_fail((30258|0),(13400|0),8379,(30276|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $2;
|
|
$6 = ($5>>>0)<=(8);
|
|
if (!($6)) {
|
|
___assert_fail((30302|0),(13400|0),8380,(30276|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $1;
|
|
$8 = ($7>>>0)<=(8);
|
|
if ($8) {
|
|
$9 = $1;
|
|
$10 = $0;
|
|
$11 = ((($10)) + 20|0);
|
|
HEAP32[$11>>2] = $9;
|
|
}
|
|
$12 = $2;
|
|
$13 = ($12>>>0)<=(8);
|
|
if (!($13)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$14 = $2;
|
|
$15 = $0;
|
|
$16 = ((($15)) + 24|0);
|
|
HEAP32[$16>>2] = $14;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_rp_pack_rects($context,$rects,$num_rects) {
|
|
$context = $context|0;
|
|
$rects = $rects|0;
|
|
$num_rects = $num_rects|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
|
|
var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $9 = 0, $fr = 0, $i = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$fr = sp;
|
|
$0 = $context;
|
|
$1 = $rects;
|
|
$2 = $num_rects;
|
|
$i = 0;
|
|
while(1) {
|
|
$3 = $i;
|
|
$4 = $2;
|
|
$5 = ($3|0)<($4|0);
|
|
if (!($5)) {
|
|
break;
|
|
}
|
|
$6 = $i;
|
|
$7 = $i;
|
|
$8 = $1;
|
|
$9 = (($8) + ($7<<4)|0);
|
|
$10 = ((($9)) + 12|0);
|
|
HEAP32[$10>>2] = $6;
|
|
$11 = $i;
|
|
$12 = (($11) + 1)|0;
|
|
$i = $12;
|
|
}
|
|
$13 = $1;
|
|
$14 = $2;
|
|
_nk_rp_qsort($13,$14,9);
|
|
$i = 0;
|
|
while(1) {
|
|
$15 = $i;
|
|
$16 = $2;
|
|
$17 = ($15|0)<($16|0);
|
|
if (!($17)) {
|
|
break;
|
|
}
|
|
$18 = $0;
|
|
$19 = $i;
|
|
$20 = $1;
|
|
$21 = (($20) + ($19<<4)|0);
|
|
$22 = ((($21)) + 4|0);
|
|
$23 = HEAP16[$22>>1]|0;
|
|
$24 = $23&65535;
|
|
$25 = $i;
|
|
$26 = $1;
|
|
$27 = (($26) + ($25<<4)|0);
|
|
$28 = ((($27)) + 6|0);
|
|
$29 = HEAP16[$28>>1]|0;
|
|
$30 = $29&65535;
|
|
_nk_rp__skyline_pack_rectangle($fr,$18,$24,$30);
|
|
$31 = ((($fr)) + 8|0);
|
|
$32 = HEAP32[$31>>2]|0;
|
|
$33 = ($32|0)!=(0|0);
|
|
if ($33) {
|
|
$34 = HEAP32[$fr>>2]|0;
|
|
$35 = $34&65535;
|
|
$36 = $i;
|
|
$37 = $1;
|
|
$38 = (($37) + ($36<<4)|0);
|
|
$39 = ((($38)) + 8|0);
|
|
HEAP16[$39>>1] = $35;
|
|
$40 = ((($fr)) + 4|0);
|
|
$41 = HEAP32[$40>>2]|0;
|
|
$42 = $41&65535;
|
|
$43 = $i;
|
|
$44 = $1;
|
|
$45 = (($44) + ($43<<4)|0);
|
|
$46 = ((($45)) + 10|0);
|
|
HEAP16[$46>>1] = $42;
|
|
} else {
|
|
$47 = $i;
|
|
$48 = $1;
|
|
$49 = (($48) + ($47<<4)|0);
|
|
$50 = ((($49)) + 10|0);
|
|
HEAP16[$50>>1] = -1;
|
|
$51 = $i;
|
|
$52 = $1;
|
|
$53 = (($52) + ($51<<4)|0);
|
|
$54 = ((($53)) + 8|0);
|
|
HEAP16[$54>>1] = -1;
|
|
}
|
|
$55 = $i;
|
|
$56 = (($55) + 1)|0;
|
|
$i = $56;
|
|
}
|
|
$57 = $1;
|
|
$58 = $2;
|
|
_nk_rp_qsort($57,$58,10);
|
|
$i = 0;
|
|
while(1) {
|
|
$59 = $i;
|
|
$60 = $2;
|
|
$61 = ($59|0)<($60|0);
|
|
if (!($61)) {
|
|
break;
|
|
}
|
|
$62 = $i;
|
|
$63 = $1;
|
|
$64 = (($63) + ($62<<4)|0);
|
|
$65 = ((($64)) + 8|0);
|
|
$66 = HEAP16[$65>>1]|0;
|
|
$67 = $66&65535;
|
|
$68 = ($67|0)==(65535);
|
|
if ($68) {
|
|
$69 = $i;
|
|
$70 = $1;
|
|
$71 = (($70) + ($69<<4)|0);
|
|
$72 = ((($71)) + 10|0);
|
|
$73 = HEAP16[$72>>1]|0;
|
|
$74 = $73&65535;
|
|
$75 = ($74|0)==(65535);
|
|
$77 = $75;
|
|
} else {
|
|
$77 = 0;
|
|
}
|
|
$76 = $77 ^ 1;
|
|
$78 = $76&1;
|
|
$79 = $i;
|
|
$80 = $1;
|
|
$81 = (($80) + ($79<<4)|0);
|
|
$82 = ((($81)) + 12|0);
|
|
HEAP32[$82>>2] = $78;
|
|
$83 = $i;
|
|
$84 = (($83) + 1)|0;
|
|
$i = $84;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_tt_PackFontRangesGatherRects($spc,$info,$ranges,$num_ranges,$rects) {
|
|
$spc = $spc|0;
|
|
$info = $info|0;
|
|
$ranges = $ranges|0;
|
|
$num_ranges = $num_ranges|0;
|
|
$rects = $rects|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0.0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0.0, $120 = 0, $121 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
|
|
var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
|
|
var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
|
|
var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0.0, $71 = 0, $72 = 0, $73 = 0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0, $78 = 0, $79 = 0;
|
|
var $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0;
|
|
var $98 = 0, $99 = 0, $codepoint = 0, $fh = 0.0, $glyph = 0, $i = 0, $j = 0, $k = 0, $scale = 0.0, $x0 = 0, $x1 = 0, $y0 = 0, $y1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$x0 = sp + 20|0;
|
|
$y0 = sp + 16|0;
|
|
$x1 = sp + 12|0;
|
|
$y1 = sp + 8|0;
|
|
$0 = $spc;
|
|
$1 = $info;
|
|
$2 = $ranges;
|
|
$3 = $num_ranges;
|
|
$4 = $rects;
|
|
$k = 0;
|
|
$i = 0;
|
|
while(1) {
|
|
$5 = $i;
|
|
$6 = $3;
|
|
$7 = ($5|0)<($6|0);
|
|
if (!($7)) {
|
|
break;
|
|
}
|
|
$8 = $i;
|
|
$9 = $2;
|
|
$10 = (($9) + (($8*24)|0)|0);
|
|
$11 = +HEAPF32[$10>>2];
|
|
$fh = $11;
|
|
$12 = $fh;
|
|
$13 = $12 > 0.0;
|
|
$14 = $1;
|
|
$15 = $fh;
|
|
if ($13) {
|
|
$16 = (+_nk_tt_ScaleForPixelHeight($14,$15));
|
|
$19 = $16;
|
|
} else {
|
|
$17 = -$15;
|
|
$18 = (+_nk_tt_ScaleForMappingEmToPixels($14,$17));
|
|
$19 = $18;
|
|
}
|
|
$scale = $19;
|
|
$20 = $0;
|
|
$21 = ((($20)) + 20|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = $22&255;
|
|
$24 = $i;
|
|
$25 = $2;
|
|
$26 = (($25) + (($24*24)|0)|0);
|
|
$27 = ((($26)) + 20|0);
|
|
HEAP8[$27>>0] = $23;
|
|
$28 = $0;
|
|
$29 = ((($28)) + 24|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$31 = $30&255;
|
|
$32 = $i;
|
|
$33 = $2;
|
|
$34 = (($33) + (($32*24)|0)|0);
|
|
$35 = ((($34)) + 21|0);
|
|
HEAP8[$35>>0] = $31;
|
|
$j = 0;
|
|
while(1) {
|
|
$36 = $j;
|
|
$37 = $i;
|
|
$38 = $2;
|
|
$39 = (($38) + (($37*24)|0)|0);
|
|
$40 = ((($39)) + 12|0);
|
|
$41 = HEAP32[$40>>2]|0;
|
|
$42 = ($36|0)<($41|0);
|
|
$43 = $i;
|
|
if (!($42)) {
|
|
break;
|
|
}
|
|
$44 = $2;
|
|
$45 = (($44) + (($43*24)|0)|0);
|
|
$46 = ((($45)) + 4|0);
|
|
$47 = HEAP32[$46>>2]|0;
|
|
$48 = ($47|0)!=(0);
|
|
if ($48) {
|
|
$49 = $i;
|
|
$50 = $2;
|
|
$51 = (($50) + (($49*24)|0)|0);
|
|
$52 = ((($51)) + 4|0);
|
|
$53 = HEAP32[$52>>2]|0;
|
|
$54 = $j;
|
|
$55 = (($53) + ($54))|0;
|
|
$64 = $55;
|
|
} else {
|
|
$56 = $j;
|
|
$57 = $i;
|
|
$58 = $2;
|
|
$59 = (($58) + (($57*24)|0)|0);
|
|
$60 = ((($59)) + 8|0);
|
|
$61 = HEAP32[$60>>2]|0;
|
|
$62 = (($61) + ($56<<2)|0);
|
|
$63 = HEAP32[$62>>2]|0;
|
|
$64 = $63;
|
|
}
|
|
$codepoint = $64;
|
|
$65 = $1;
|
|
$66 = $codepoint;
|
|
$67 = (_nk_tt_FindGlyphIndex($65,$66)|0);
|
|
$glyph = $67;
|
|
$68 = $1;
|
|
$69 = $glyph;
|
|
$70 = $scale;
|
|
$71 = $0;
|
|
$72 = ((($71)) + 20|0);
|
|
$73 = HEAP32[$72>>2]|0;
|
|
$74 = (+($73>>>0));
|
|
$75 = $70 * $74;
|
|
$76 = $scale;
|
|
$77 = $0;
|
|
$78 = ((($77)) + 24|0);
|
|
$79 = HEAP32[$78>>2]|0;
|
|
$80 = (+($79>>>0));
|
|
$81 = $76 * $80;
|
|
_nk_tt_GetGlyphBitmapBoxSubpixel($68,$69,$75,$81,0.0,0.0,$x0,$y0,$x1,$y1);
|
|
$82 = HEAP32[$x1>>2]|0;
|
|
$83 = HEAP32[$x0>>2]|0;
|
|
$84 = (($82) - ($83))|0;
|
|
$85 = $0;
|
|
$86 = ((($85)) + 16|0);
|
|
$87 = HEAP32[$86>>2]|0;
|
|
$88 = (($84) + ($87))|0;
|
|
$89 = $0;
|
|
$90 = ((($89)) + 20|0);
|
|
$91 = HEAP32[$90>>2]|0;
|
|
$92 = (($88) + ($91))|0;
|
|
$93 = (($92) - 1)|0;
|
|
$94 = $93&65535;
|
|
$95 = $k;
|
|
$96 = $4;
|
|
$97 = (($96) + ($95<<4)|0);
|
|
$98 = ((($97)) + 4|0);
|
|
HEAP16[$98>>1] = $94;
|
|
$99 = HEAP32[$y1>>2]|0;
|
|
$100 = HEAP32[$y0>>2]|0;
|
|
$101 = (($99) - ($100))|0;
|
|
$102 = $0;
|
|
$103 = ((($102)) + 16|0);
|
|
$104 = HEAP32[$103>>2]|0;
|
|
$105 = (($101) + ($104))|0;
|
|
$106 = $0;
|
|
$107 = ((($106)) + 24|0);
|
|
$108 = HEAP32[$107>>2]|0;
|
|
$109 = (($105) + ($108))|0;
|
|
$110 = (($109) - 1)|0;
|
|
$111 = $110&65535;
|
|
$112 = $k;
|
|
$113 = $4;
|
|
$114 = (($113) + ($112<<4)|0);
|
|
$115 = ((($114)) + 6|0);
|
|
HEAP16[$115>>1] = $111;
|
|
$116 = $k;
|
|
$117 = (($116) + 1)|0;
|
|
$k = $117;
|
|
$118 = $j;
|
|
$119 = (($118) + 1)|0;
|
|
$j = $119;
|
|
}
|
|
$120 = (($43) + 1)|0;
|
|
$i = $120;
|
|
}
|
|
$121 = $k;
|
|
STACKTOP = sp;return ($121|0);
|
|
}
|
|
function _nk_round_up_pow2($v) {
|
|
$v = $v|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0;
|
|
var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $v;
|
|
$1 = $0;
|
|
$2 = (($1) + -1)|0;
|
|
$0 = $2;
|
|
$3 = $0;
|
|
$4 = $3 >>> 1;
|
|
$5 = $0;
|
|
$6 = $5 | $4;
|
|
$0 = $6;
|
|
$7 = $0;
|
|
$8 = $7 >>> 2;
|
|
$9 = $0;
|
|
$10 = $9 | $8;
|
|
$0 = $10;
|
|
$11 = $0;
|
|
$12 = $11 >>> 4;
|
|
$13 = $0;
|
|
$14 = $13 | $12;
|
|
$0 = $14;
|
|
$15 = $0;
|
|
$16 = $15 >>> 8;
|
|
$17 = $0;
|
|
$18 = $17 | $16;
|
|
$0 = $18;
|
|
$19 = $0;
|
|
$20 = $19 >>> 16;
|
|
$21 = $0;
|
|
$22 = $21 | $20;
|
|
$0 = $22;
|
|
$23 = $0;
|
|
$24 = (($23) + 1)|0;
|
|
$0 = $24;
|
|
$25 = $0;
|
|
STACKTOP = sp;return ($25|0);
|
|
}
|
|
function _nk_font_bake($image_memory,$width,$height,$temp,$temp_size,$glyphs,$glyphs_count,$config,$font_count) {
|
|
$image_memory = $image_memory|0;
|
|
$width = $width|0;
|
|
$height = $height|0;
|
|
$temp = $temp|0;
|
|
$temp_size = $temp_size|0;
|
|
$glyphs = $glyphs|0;
|
|
$glyphs_count = $glyphs_count|0;
|
|
$config = $config|0;
|
|
$font_count = $font_count|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0.0, $117 = 0.0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0.0, $131 = 0, $132 = 0, $133 = 0.0;
|
|
var $134 = 0.0, $135 = 0.0, $136 = 0, $137 = 0, $138 = 0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0.0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
|
|
var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
|
|
var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0.0, $205 = 0;
|
|
var $206 = 0, $207 = 0, $208 = 0.0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0.0, $213 = 0, $214 = 0, $215 = 0, $216 = 0.0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0.0, $222 = 0.0, $223 = 0;
|
|
var $224 = 0, $225 = 0.0, $226 = 0.0, $227 = 0, $228 = 0, $229 = 0.0, $23 = 0, $230 = 0.0, $231 = 0, $232 = 0, $233 = 0.0, $234 = 0.0, $235 = 0, $236 = 0, $237 = 0.0, $238 = 0, $239 = 0, $24 = 0, $240 = 0.0, $241 = 0.0;
|
|
var $242 = 0.0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0.0, $248 = 0, $249 = 0, $25 = 0, $250 = 0.0, $251 = 0.0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0.0, $26 = 0;
|
|
var $260 = 0, $261 = 0.0, $262 = 0.0, $263 = 0, $264 = 0, $265 = 0, $266 = 0.0, $267 = 0, $268 = 0.0, $269 = 0.0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0.0, $274 = 0, $275 = 0.0, $276 = 0.0, $277 = 0, $278 = 0;
|
|
var $279 = 0, $28 = 0, $280 = 0.0, $281 = 0, $282 = 0.0, $283 = 0.0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0.0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0.0, $294 = 0, $295 = 0, $296 = 0;
|
|
var $297 = 0.0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0.0, $303 = 0, $304 = 0, $305 = 0.0, $306 = 0.0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0;
|
|
var $314 = 0, $315 = 0.0, $316 = 0.0, $317 = 0, $318 = 0.0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0;
|
|
var $332 = 0, $333 = 0, $334 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0;
|
|
var $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0;
|
|
var $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0;
|
|
var $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $baker = 0, $cfg = 0, $cfg1 = 0, $char_idx = 0, $codepoint = 0;
|
|
var $dst_font = 0, $dummy_x = 0, $dummy_y = 0, $font_scale = 0.0, $glyph = 0, $glyph_count = 0, $glyph_n = 0, $i = 0, $input_i = 0, $or$cond = 0, $or$cond11 = 0, $or$cond13 = 0, $or$cond15 = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0, $pc = 0, $q = 0, $range = 0;
|
|
var $tmp = 0, $tmp2 = 0, $unscaled_ascent = 0, $unscaled_descent = 0, $unscaled_line_gap = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$unscaled_ascent = sp + 64|0;
|
|
$unscaled_descent = sp + 60|0;
|
|
$unscaled_line_gap = sp + 56|0;
|
|
$dummy_x = sp + 44|0;
|
|
$dummy_y = sp + 40|0;
|
|
$q = sp + 8|0;
|
|
$0 = $image_memory;
|
|
$1 = $width;
|
|
$2 = $height;
|
|
$3 = $temp;
|
|
$4 = $temp_size;
|
|
$5 = $glyphs;
|
|
$6 = $glyphs_count;
|
|
$7 = $config;
|
|
$8 = $font_count;
|
|
$input_i = 0;
|
|
$glyph_n = 0;
|
|
$9 = $0;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((14990|0),(13400|0),8948,(15146|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $1;
|
|
$12 = ($11|0)!=(0);
|
|
if (!($12)) {
|
|
___assert_fail((15021|0),(13400|0),8949,(15146|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $2;
|
|
$14 = ($13|0)!=(0);
|
|
if (!($14)) {
|
|
___assert_fail((15027|0),(13400|0),8950,(15146|0));
|
|
// unreachable;
|
|
}
|
|
$15 = $7;
|
|
$16 = ($15|0)!=(0|0);
|
|
if (!($16)) {
|
|
___assert_fail((14951|0),(13400|0),8951,(15146|0));
|
|
// unreachable;
|
|
}
|
|
$17 = $3;
|
|
$18 = ($17|0)!=(0|0);
|
|
if (!($18)) {
|
|
___assert_fail((15034|0),(13400|0),8952,(15146|0));
|
|
// unreachable;
|
|
}
|
|
$19 = $4;
|
|
$20 = ($19|0)!=(0);
|
|
if (!($20)) {
|
|
___assert_fail((15039|0),(13400|0),8953,(15146|0));
|
|
// unreachable;
|
|
}
|
|
$21 = $8;
|
|
$22 = ($21|0)!=(0);
|
|
if (!($22)) {
|
|
___assert_fail((15159|0),(13400|0),8954,(15146|0));
|
|
// unreachable;
|
|
}
|
|
$23 = $6;
|
|
$24 = ($23|0)!=(0);
|
|
if (!($24)) {
|
|
___assert_fail((15170|0),(13400|0),8955,(15146|0));
|
|
// unreachable;
|
|
}
|
|
$25 = $0;
|
|
$26 = ($25|0)!=(0|0);
|
|
$27 = $1;
|
|
$28 = ($27|0)!=(0);
|
|
$or$cond = $26 & $28;
|
|
$29 = $2;
|
|
$30 = ($29|0)!=(0);
|
|
$or$cond3 = $or$cond & $30;
|
|
$31 = $7;
|
|
$32 = ($31|0)!=(0|0);
|
|
$or$cond5 = $or$cond3 & $32;
|
|
$33 = $3;
|
|
$34 = ($33|0)!=(0|0);
|
|
$or$cond7 = $or$cond5 & $34;
|
|
$35 = $4;
|
|
$36 = ($35|0)!=(0);
|
|
$or$cond9 = $or$cond7 & $36;
|
|
$37 = $8;
|
|
$38 = ($37|0)!=(0);
|
|
$or$cond11 = $or$cond9 & $38;
|
|
$39 = $5;
|
|
$40 = ($39|0)!=(0|0);
|
|
$or$cond13 = $or$cond11 & $40;
|
|
$41 = $6;
|
|
$42 = ($41|0)!=(0);
|
|
$or$cond15 = $or$cond13 & $42;
|
|
if (!($or$cond15)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$43 = $3;
|
|
$44 = ((($43)) + 3|0);
|
|
$45 = $44;
|
|
$46 = $45 & -4;
|
|
$47 = $46;
|
|
$baker = $47;
|
|
$48 = $0;
|
|
$49 = $1;
|
|
$50 = $2;
|
|
$51 = Math_imul($49, $50)|0;
|
|
_nk_zero($48,$51);
|
|
$52 = $0;
|
|
$53 = $baker;
|
|
$54 = ((($53)) + 12|0);
|
|
$55 = ((($54)) + 28|0);
|
|
HEAP32[$55>>2] = $52;
|
|
$56 = $2;
|
|
$57 = $baker;
|
|
$58 = ((($57)) + 12|0);
|
|
$59 = ((($58)) + 8|0);
|
|
HEAP32[$59>>2] = $56;
|
|
$input_i = 0;
|
|
while(1) {
|
|
$60 = $input_i;
|
|
$61 = $8;
|
|
$62 = ($60|0)<($61|0);
|
|
if (!($62)) {
|
|
break;
|
|
}
|
|
$63 = $input_i;
|
|
$64 = $7;
|
|
$65 = (($64) + (($63*44)|0)|0);
|
|
$cfg = $65;
|
|
$66 = $input_i;
|
|
$67 = $baker;
|
|
$68 = ((($67)) + 48|0);
|
|
$69 = HEAP32[$68>>2]|0;
|
|
$70 = (($69) + (($66*56)|0)|0);
|
|
$tmp = $70;
|
|
$71 = $baker;
|
|
$72 = ((($71)) + 12|0);
|
|
$73 = $cfg;
|
|
$74 = ((($73)) + 12|0);
|
|
$75 = HEAP8[$74>>0]|0;
|
|
$76 = $75&255;
|
|
$77 = $cfg;
|
|
$78 = ((($77)) + 11|0);
|
|
$79 = HEAP8[$78>>0]|0;
|
|
$80 = $79&255;
|
|
_nk_tt_PackSetOversampling($72,$76,$80);
|
|
$81 = $baker;
|
|
$82 = ((($81)) + 12|0);
|
|
$83 = $tmp;
|
|
$84 = $tmp;
|
|
$85 = ((($84)) + 48|0);
|
|
$86 = HEAP32[$85>>2]|0;
|
|
$87 = $tmp;
|
|
$88 = ((($87)) + 52|0);
|
|
$89 = HEAP32[$88>>2]|0;
|
|
$90 = $tmp;
|
|
$91 = ((($90)) + 44|0);
|
|
$92 = HEAP32[$91>>2]|0;
|
|
$93 = $baker;
|
|
(_nk_tt_PackFontRangesRenderIntoRects($82,$83,$86,$89,$92,$93)|0);
|
|
$94 = $input_i;
|
|
$95 = (($94) + 1)|0;
|
|
$input_i = $95;
|
|
}
|
|
$96 = $baker;
|
|
$97 = ((($96)) + 12|0);
|
|
$98 = $baker;
|
|
_nk_tt_PackEnd($97,$98);
|
|
$input_i = 0;
|
|
while(1) {
|
|
$99 = $input_i;
|
|
$100 = $8;
|
|
$101 = ($99|0)<($100|0);
|
|
if (!($101)) {
|
|
break;
|
|
}
|
|
$i = 0;
|
|
$char_idx = 0;
|
|
$glyph_count = 0;
|
|
$102 = $input_i;
|
|
$103 = $7;
|
|
$104 = (($103) + (($102*44)|0)|0);
|
|
$cfg1 = $104;
|
|
$105 = $input_i;
|
|
$106 = $baker;
|
|
$107 = ((($106)) + 48|0);
|
|
$108 = HEAP32[$107>>2]|0;
|
|
$109 = (($108) + (($105*56)|0)|0);
|
|
$tmp2 = $109;
|
|
$110 = $cfg1;
|
|
$111 = ((($110)) + 36|0);
|
|
$112 = HEAP32[$111>>2]|0;
|
|
$dst_font = $112;
|
|
$113 = $tmp2;
|
|
$114 = $cfg1;
|
|
$115 = ((($114)) + 16|0);
|
|
$116 = +HEAPF32[$115>>2];
|
|
$117 = (+_nk_tt_ScaleForPixelHeight($113,$116));
|
|
$font_scale = $117;
|
|
$118 = $tmp2;
|
|
_nk_tt_GetFontVMetrics($118,$unscaled_ascent,$unscaled_descent,$unscaled_line_gap);
|
|
$119 = $cfg1;
|
|
$120 = ((($119)) + 9|0);
|
|
$121 = HEAP8[$120>>0]|0;
|
|
$122 = ($121<<24>>24)!=(0);
|
|
if (!($122)) {
|
|
$123 = $cfg1;
|
|
$124 = ((($123)) + 32|0);
|
|
$125 = HEAP32[$124>>2]|0;
|
|
$126 = $dst_font;
|
|
$127 = ((($126)) + 20|0);
|
|
HEAP32[$127>>2] = $125;
|
|
$128 = $cfg1;
|
|
$129 = ((($128)) + 16|0);
|
|
$130 = +HEAPF32[$129>>2];
|
|
$131 = $dst_font;
|
|
HEAPF32[$131>>2] = $130;
|
|
$132 = HEAP32[$unscaled_ascent>>2]|0;
|
|
$133 = (+($132|0));
|
|
$134 = $font_scale;
|
|
$135 = $133 * $134;
|
|
$136 = $dst_font;
|
|
$137 = ((($136)) + 4|0);
|
|
HEAPF32[$137>>2] = $135;
|
|
$138 = HEAP32[$unscaled_descent>>2]|0;
|
|
$139 = (+($138|0));
|
|
$140 = $font_scale;
|
|
$141 = $139 * $140;
|
|
$142 = $dst_font;
|
|
$143 = ((($142)) + 8|0);
|
|
HEAPF32[$143>>2] = $141;
|
|
$144 = $glyph_n;
|
|
$145 = $dst_font;
|
|
$146 = ((($145)) + 12|0);
|
|
HEAP32[$146>>2] = $144;
|
|
}
|
|
$i = 0;
|
|
while(1) {
|
|
$147 = $i;
|
|
$148 = $tmp2;
|
|
$149 = ((($148)) + 52|0);
|
|
$150 = HEAP32[$149>>2]|0;
|
|
$151 = ($147>>>0)<($150>>>0);
|
|
if (!($151)) {
|
|
break;
|
|
}
|
|
$152 = $i;
|
|
$153 = $tmp2;
|
|
$154 = ((($153)) + 48|0);
|
|
$155 = HEAP32[$154>>2]|0;
|
|
$156 = (($155) + (($152*24)|0)|0);
|
|
$range = $156;
|
|
$char_idx = 0;
|
|
while(1) {
|
|
$157 = $char_idx;
|
|
$158 = $range;
|
|
$159 = ((($158)) + 12|0);
|
|
$160 = HEAP32[$159>>2]|0;
|
|
$161 = ($157|0)<($160|0);
|
|
if (!($161)) {
|
|
break;
|
|
}
|
|
$codepoint = 0;
|
|
HEAPF32[$dummy_x>>2] = 0.0;
|
|
HEAPF32[$dummy_y>>2] = 0.0;
|
|
$162 = $char_idx;
|
|
$163 = $range;
|
|
$164 = ((($163)) + 16|0);
|
|
$165 = HEAP32[$164>>2]|0;
|
|
$166 = (($165) + (($162*28)|0)|0);
|
|
$pc = $166;
|
|
$167 = $glyph_count;
|
|
$168 = (($167) + 1)|0;
|
|
$glyph_count = $168;
|
|
$169 = $pc;
|
|
$170 = HEAP16[$169>>1]|0;
|
|
$171 = ($170<<16>>16)!=(0);
|
|
if ($171) {
|
|
label = 33;
|
|
} else {
|
|
$172 = $pc;
|
|
$173 = ((($172)) + 4|0);
|
|
$174 = HEAP16[$173>>1]|0;
|
|
$175 = ($174<<16>>16)!=(0);
|
|
if ($175) {
|
|
label = 33;
|
|
} else {
|
|
$176 = $pc;
|
|
$177 = ((($176)) + 2|0);
|
|
$178 = HEAP16[$177>>1]|0;
|
|
$179 = ($178<<16>>16)!=(0);
|
|
if ($179) {
|
|
label = 33;
|
|
} else {
|
|
$180 = $pc;
|
|
$181 = ((($180)) + 6|0);
|
|
$182 = HEAP16[$181>>1]|0;
|
|
$183 = ($182<<16>>16)!=(0);
|
|
if ($183) {
|
|
label = 33;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if ((label|0) == 33) {
|
|
label = 0;
|
|
$184 = $range;
|
|
$185 = ((($184)) + 4|0);
|
|
$186 = HEAP32[$185>>2]|0;
|
|
$187 = $char_idx;
|
|
$188 = (($186) + ($187))|0;
|
|
$codepoint = $188;
|
|
$189 = $range;
|
|
$190 = ((($189)) + 16|0);
|
|
$191 = HEAP32[$190>>2]|0;
|
|
$192 = $1;
|
|
$193 = $2;
|
|
$194 = $char_idx;
|
|
_nk_tt_GetPackedQuad($191,$192,$193,$194,$dummy_x,$dummy_y,$q,0);
|
|
$195 = $dst_font;
|
|
$196 = ((($195)) + 12|0);
|
|
$197 = HEAP32[$196>>2]|0;
|
|
$198 = $char_idx;
|
|
$199 = (($197) + ($198))|0;
|
|
$200 = $5;
|
|
$201 = (($200) + (($199*48)|0)|0);
|
|
$glyph = $201;
|
|
$202 = $codepoint;
|
|
$203 = $glyph;
|
|
HEAP32[$203>>2] = $202;
|
|
$204 = +HEAPF32[$q>>2];
|
|
$205 = $glyph;
|
|
$206 = ((($205)) + 8|0);
|
|
HEAPF32[$206>>2] = $204;
|
|
$207 = ((($q)) + 4|0);
|
|
$208 = +HEAPF32[$207>>2];
|
|
$209 = $glyph;
|
|
$210 = ((($209)) + 12|0);
|
|
HEAPF32[$210>>2] = $208;
|
|
$211 = ((($q)) + 16|0);
|
|
$212 = +HEAPF32[$211>>2];
|
|
$213 = $glyph;
|
|
$214 = ((($213)) + 16|0);
|
|
HEAPF32[$214>>2] = $212;
|
|
$215 = ((($q)) + 20|0);
|
|
$216 = +HEAPF32[$215>>2];
|
|
$217 = $glyph;
|
|
$218 = ((($217)) + 20|0);
|
|
HEAPF32[$218>>2] = $216;
|
|
$219 = $dst_font;
|
|
$220 = ((($219)) + 4|0);
|
|
$221 = +HEAPF32[$220>>2];
|
|
$222 = $221 + 0.5;
|
|
$223 = $glyph;
|
|
$224 = ((($223)) + 12|0);
|
|
$225 = +HEAPF32[$224>>2];
|
|
$226 = $225 + $222;
|
|
HEAPF32[$224>>2] = $226;
|
|
$227 = $dst_font;
|
|
$228 = ((($227)) + 4|0);
|
|
$229 = +HEAPF32[$228>>2];
|
|
$230 = $229 + 0.5;
|
|
$231 = $glyph;
|
|
$232 = ((($231)) + 20|0);
|
|
$233 = +HEAPF32[$232>>2];
|
|
$234 = $233 + $230;
|
|
HEAPF32[$232>>2] = $234;
|
|
$235 = $glyph;
|
|
$236 = ((($235)) + 16|0);
|
|
$237 = +HEAPF32[$236>>2];
|
|
$238 = $glyph;
|
|
$239 = ((($238)) + 8|0);
|
|
$240 = +HEAPF32[$239>>2];
|
|
$241 = $237 - $240;
|
|
$242 = $241 + 0.5;
|
|
$243 = $glyph;
|
|
$244 = ((($243)) + 24|0);
|
|
HEAPF32[$244>>2] = $242;
|
|
$245 = $glyph;
|
|
$246 = ((($245)) + 20|0);
|
|
$247 = +HEAPF32[$246>>2];
|
|
$248 = $glyph;
|
|
$249 = ((($248)) + 12|0);
|
|
$250 = +HEAPF32[$249>>2];
|
|
$251 = $247 - $250;
|
|
$252 = $glyph;
|
|
$253 = ((($252)) + 28|0);
|
|
HEAPF32[$253>>2] = $251;
|
|
$254 = $cfg1;
|
|
$255 = ((($254)) + 20|0);
|
|
$256 = HEAP32[$255>>2]|0;
|
|
$257 = ($256|0)==(1);
|
|
$258 = ((($q)) + 8|0);
|
|
$259 = +HEAPF32[$258>>2];
|
|
if ($257) {
|
|
$260 = $1;
|
|
$261 = (+($260|0));
|
|
$262 = $259 * $261;
|
|
$263 = $glyph;
|
|
$264 = ((($263)) + 32|0);
|
|
HEAPF32[$264>>2] = $262;
|
|
$265 = ((($q)) + 12|0);
|
|
$266 = +HEAPF32[$265>>2];
|
|
$267 = $2;
|
|
$268 = (+($267|0));
|
|
$269 = $266 * $268;
|
|
$270 = $glyph;
|
|
$271 = ((($270)) + 36|0);
|
|
HEAPF32[$271>>2] = $269;
|
|
$272 = ((($q)) + 24|0);
|
|
$273 = +HEAPF32[$272>>2];
|
|
$274 = $1;
|
|
$275 = (+($274|0));
|
|
$276 = $273 * $275;
|
|
$277 = $glyph;
|
|
$278 = ((($277)) + 40|0);
|
|
HEAPF32[$278>>2] = $276;
|
|
$279 = ((($q)) + 28|0);
|
|
$280 = +HEAPF32[$279>>2];
|
|
$281 = $2;
|
|
$282 = (+($281|0));
|
|
$283 = $280 * $282;
|
|
$284 = $glyph;
|
|
$285 = ((($284)) + 44|0);
|
|
HEAPF32[$285>>2] = $283;
|
|
} else {
|
|
$286 = $glyph;
|
|
$287 = ((($286)) + 32|0);
|
|
HEAPF32[$287>>2] = $259;
|
|
$288 = ((($q)) + 12|0);
|
|
$289 = +HEAPF32[$288>>2];
|
|
$290 = $glyph;
|
|
$291 = ((($290)) + 36|0);
|
|
HEAPF32[$291>>2] = $289;
|
|
$292 = ((($q)) + 24|0);
|
|
$293 = +HEAPF32[$292>>2];
|
|
$294 = $glyph;
|
|
$295 = ((($294)) + 40|0);
|
|
HEAPF32[$295>>2] = $293;
|
|
$296 = ((($q)) + 28|0);
|
|
$297 = +HEAPF32[$296>>2];
|
|
$298 = $glyph;
|
|
$299 = ((($298)) + 44|0);
|
|
HEAPF32[$299>>2] = $297;
|
|
}
|
|
$300 = $pc;
|
|
$301 = ((($300)) + 16|0);
|
|
$302 = +HEAPF32[$301>>2];
|
|
$303 = $cfg1;
|
|
$304 = ((($303)) + 24|0);
|
|
$305 = +HEAPF32[$304>>2];
|
|
$306 = $302 + $305;
|
|
$307 = $glyph;
|
|
$308 = ((($307)) + 4|0);
|
|
HEAPF32[$308>>2] = $306;
|
|
$309 = $cfg1;
|
|
$310 = ((($309)) + 10|0);
|
|
$311 = HEAP8[$310>>0]|0;
|
|
$312 = ($311<<24>>24)!=(0);
|
|
if ($312) {
|
|
$313 = $glyph;
|
|
$314 = ((($313)) + 4|0);
|
|
$315 = +HEAPF32[$314>>2];
|
|
$316 = $315 + 0.5;
|
|
$317 = (~~(($316)));
|
|
$318 = (+($317|0));
|
|
$319 = $glyph;
|
|
$320 = ((($319)) + 4|0);
|
|
HEAPF32[$320>>2] = $318;
|
|
}
|
|
}
|
|
$321 = $char_idx;
|
|
$322 = (($321) + 1)|0;
|
|
$char_idx = $322;
|
|
}
|
|
$323 = $i;
|
|
$324 = (($323) + 1)|0;
|
|
$i = $324;
|
|
}
|
|
$325 = $glyph_count;
|
|
$326 = $dst_font;
|
|
$327 = ((($326)) + 16|0);
|
|
HEAP32[$327>>2] = $325;
|
|
$328 = $dst_font;
|
|
$329 = ((($328)) + 16|0);
|
|
$330 = HEAP32[$329>>2]|0;
|
|
$331 = $glyph_n;
|
|
$332 = (($331) + ($330))|0;
|
|
$glyph_n = $332;
|
|
$333 = $input_i;
|
|
$334 = (($333) + 1)|0;
|
|
$input_i = $334;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_tt_PackFontRangesRenderIntoRects($spc,$info,$ranges,$num_ranges,$rects,$alloc) {
|
|
$spc = $spc|0;
|
|
$info = $info|0;
|
|
$ranges = $ranges|0;
|
|
$num_ranges = $num_ranges|0;
|
|
$rects = $rects|0;
|
|
$alloc = $alloc|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0.0, $156 = 0, $157 = 0, $158 = 0, $159 = 0.0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0, $163 = 0, $164 = 0, $165 = 0.0, $166 = 0.0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
|
|
var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0.0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
|
|
var $189 = 0, $19 = 0.0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
|
|
var $206 = 0.0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0.0, $211 = 0.0, $212 = 0.0, $213 = 0, $214 = 0, $215 = 0, $216 = 0.0, $217 = 0.0, $218 = 0, $219 = 0, $22 = 0.0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
|
|
var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0.0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0.0, $240 = 0, $241 = 0;
|
|
var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0.0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0.0;
|
|
var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0;
|
|
var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0;
|
|
var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0;
|
|
var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0.0, $324 = 0, $325 = 0.0, $326 = 0.0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0.0, $331 = 0.0;
|
|
var $332 = 0.0, $333 = 0.0, $334 = 0.0, $335 = 0, $336 = 0, $337 = 0, $338 = 0.0, $339 = 0.0, $34 = 0, $340 = 0.0, $341 = 0.0, $342 = 0.0, $343 = 0, $344 = 0, $345 = 0, $346 = 0.0, $347 = 0, $348 = 0, $349 = 0, $35 = 0;
|
|
var $350 = 0, $351 = 0.0, $352 = 0.0, $353 = 0.0, $354 = 0.0, $355 = 0.0, $356 = 0.0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0.0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0.0, $366 = 0.0, $367 = 0.0, $368 = 0.0;
|
|
var $369 = 0.0, $37 = 0, $370 = 0.0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $39 = 0;
|
|
var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0.0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0;
|
|
var $58 = 0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0;
|
|
var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0;
|
|
var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $advance = 0, $bc = 0, $codepoint = 0, $fh = 0.0, $glyph = 0, $i = 0, $j = 0, $k = 0, $lsb = 0, $old_h_over = 0, $old_v_over = 0, $pad = 0, $r = 0, $recip_h = 0.0;
|
|
var $recip_v = 0.0, $return_value = 0, $scale = 0.0, $sub_x = 0.0, $sub_y = 0.0, $x0 = 0, $x1 = 0, $y0 = 0, $y1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$advance = sp + 28|0;
|
|
$lsb = sp + 24|0;
|
|
$x0 = sp + 20|0;
|
|
$y0 = sp + 16|0;
|
|
$x1 = sp + 12|0;
|
|
$y1 = sp + 8|0;
|
|
$0 = $spc;
|
|
$1 = $info;
|
|
$2 = $ranges;
|
|
$3 = $num_ranges;
|
|
$4 = $rects;
|
|
$5 = $alloc;
|
|
$return_value = 1;
|
|
$6 = $0;
|
|
$7 = ((($6)) + 20|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$old_h_over = $8;
|
|
$9 = $0;
|
|
$10 = ((($9)) + 24|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$old_v_over = $11;
|
|
$k = 0;
|
|
$i = 0;
|
|
while(1) {
|
|
$12 = $i;
|
|
$13 = $3;
|
|
$14 = ($12|0)<($13|0);
|
|
if (!($14)) {
|
|
break;
|
|
}
|
|
$15 = $i;
|
|
$16 = $2;
|
|
$17 = (($16) + (($15*24)|0)|0);
|
|
$18 = +HEAPF32[$17>>2];
|
|
$fh = $18;
|
|
$19 = $fh;
|
|
$20 = $19 > 0.0;
|
|
$21 = $1;
|
|
$22 = $fh;
|
|
if ($20) {
|
|
$23 = (+_nk_tt_ScaleForPixelHeight($21,$22));
|
|
$26 = $23;
|
|
} else {
|
|
$24 = -$22;
|
|
$25 = (+_nk_tt_ScaleForMappingEmToPixels($21,$24));
|
|
$26 = $25;
|
|
}
|
|
$scale = $26;
|
|
$27 = $i;
|
|
$28 = $2;
|
|
$29 = (($28) + (($27*24)|0)|0);
|
|
$30 = ((($29)) + 20|0);
|
|
$31 = HEAP8[$30>>0]|0;
|
|
$32 = $31&255;
|
|
$33 = $0;
|
|
$34 = ((($33)) + 20|0);
|
|
HEAP32[$34>>2] = $32;
|
|
$35 = $i;
|
|
$36 = $2;
|
|
$37 = (($36) + (($35*24)|0)|0);
|
|
$38 = ((($37)) + 21|0);
|
|
$39 = HEAP8[$38>>0]|0;
|
|
$40 = $39&255;
|
|
$41 = $0;
|
|
$42 = ((($41)) + 24|0);
|
|
HEAP32[$42>>2] = $40;
|
|
$43 = $0;
|
|
$44 = ((($43)) + 20|0);
|
|
$45 = HEAP32[$44>>2]|0;
|
|
$46 = (+($45>>>0));
|
|
$47 = 1.0 / $46;
|
|
$recip_h = $47;
|
|
$48 = $0;
|
|
$49 = ((($48)) + 24|0);
|
|
$50 = HEAP32[$49>>2]|0;
|
|
$51 = (+($50>>>0));
|
|
$52 = 1.0 / $51;
|
|
$recip_v = $52;
|
|
$53 = $0;
|
|
$54 = ((($53)) + 20|0);
|
|
$55 = HEAP32[$54>>2]|0;
|
|
$56 = (+_nk_tt__oversample_shift($55));
|
|
$sub_x = $56;
|
|
$57 = $0;
|
|
$58 = ((($57)) + 24|0);
|
|
$59 = HEAP32[$58>>2]|0;
|
|
$60 = (+_nk_tt__oversample_shift($59));
|
|
$sub_y = $60;
|
|
$j = 0;
|
|
while(1) {
|
|
$61 = $j;
|
|
$62 = $i;
|
|
$63 = $2;
|
|
$64 = (($63) + (($62*24)|0)|0);
|
|
$65 = ((($64)) + 12|0);
|
|
$66 = HEAP32[$65>>2]|0;
|
|
$67 = ($61|0)<($66|0);
|
|
if (!($67)) {
|
|
break;
|
|
}
|
|
$68 = $k;
|
|
$69 = $4;
|
|
$70 = (($69) + ($68<<4)|0);
|
|
$r = $70;
|
|
$71 = $r;
|
|
$72 = ((($71)) + 12|0);
|
|
$73 = HEAP32[$72>>2]|0;
|
|
$74 = ($73|0)!=(0);
|
|
if ($74) {
|
|
$75 = $j;
|
|
$76 = $i;
|
|
$77 = $2;
|
|
$78 = (($77) + (($76*24)|0)|0);
|
|
$79 = ((($78)) + 16|0);
|
|
$80 = HEAP32[$79>>2]|0;
|
|
$81 = (($80) + (($75*28)|0)|0);
|
|
$bc = $81;
|
|
$82 = $i;
|
|
$83 = $2;
|
|
$84 = (($83) + (($82*24)|0)|0);
|
|
$85 = ((($84)) + 4|0);
|
|
$86 = HEAP32[$85>>2]|0;
|
|
$87 = ($86|0)!=(0);
|
|
if ($87) {
|
|
$88 = $i;
|
|
$89 = $2;
|
|
$90 = (($89) + (($88*24)|0)|0);
|
|
$91 = ((($90)) + 4|0);
|
|
$92 = HEAP32[$91>>2]|0;
|
|
$93 = $j;
|
|
$94 = (($92) + ($93))|0;
|
|
$103 = $94;
|
|
} else {
|
|
$95 = $j;
|
|
$96 = $i;
|
|
$97 = $2;
|
|
$98 = (($97) + (($96*24)|0)|0);
|
|
$99 = ((($98)) + 8|0);
|
|
$100 = HEAP32[$99>>2]|0;
|
|
$101 = (($100) + ($95<<2)|0);
|
|
$102 = HEAP32[$101>>2]|0;
|
|
$103 = $102;
|
|
}
|
|
$codepoint = $103;
|
|
$104 = $1;
|
|
$105 = $codepoint;
|
|
$106 = (_nk_tt_FindGlyphIndex($104,$105)|0);
|
|
$glyph = $106;
|
|
$107 = $0;
|
|
$108 = ((($107)) + 16|0);
|
|
$109 = HEAP32[$108>>2]|0;
|
|
$110 = $109&65535;
|
|
$pad = $110;
|
|
$111 = $r;
|
|
$112 = ((($111)) + 8|0);
|
|
$113 = HEAP16[$112>>1]|0;
|
|
$114 = $113&65535;
|
|
$115 = $pad;
|
|
$116 = $115&65535;
|
|
$117 = (($114) + ($116))|0;
|
|
$118 = $117&65535;
|
|
$119 = $r;
|
|
$120 = ((($119)) + 8|0);
|
|
HEAP16[$120>>1] = $118;
|
|
$121 = $r;
|
|
$122 = ((($121)) + 10|0);
|
|
$123 = HEAP16[$122>>1]|0;
|
|
$124 = $123&65535;
|
|
$125 = $pad;
|
|
$126 = $125&65535;
|
|
$127 = (($124) + ($126))|0;
|
|
$128 = $127&65535;
|
|
$129 = $r;
|
|
$130 = ((($129)) + 10|0);
|
|
HEAP16[$130>>1] = $128;
|
|
$131 = $r;
|
|
$132 = ((($131)) + 4|0);
|
|
$133 = HEAP16[$132>>1]|0;
|
|
$134 = $133&65535;
|
|
$135 = $pad;
|
|
$136 = $135&65535;
|
|
$137 = (($134) - ($136))|0;
|
|
$138 = $137&65535;
|
|
$139 = $r;
|
|
$140 = ((($139)) + 4|0);
|
|
HEAP16[$140>>1] = $138;
|
|
$141 = $r;
|
|
$142 = ((($141)) + 6|0);
|
|
$143 = HEAP16[$142>>1]|0;
|
|
$144 = $143&65535;
|
|
$145 = $pad;
|
|
$146 = $145&65535;
|
|
$147 = (($144) - ($146))|0;
|
|
$148 = $147&65535;
|
|
$149 = $r;
|
|
$150 = ((($149)) + 6|0);
|
|
HEAP16[$150>>1] = $148;
|
|
$151 = $1;
|
|
$152 = $glyph;
|
|
_nk_tt_GetGlyphHMetrics($151,$152,$advance,$lsb);
|
|
$153 = $1;
|
|
$154 = $glyph;
|
|
$155 = $scale;
|
|
$156 = $0;
|
|
$157 = ((($156)) + 20|0);
|
|
$158 = HEAP32[$157>>2]|0;
|
|
$159 = (+($158>>>0));
|
|
$160 = $155 * $159;
|
|
$161 = $scale;
|
|
$162 = $0;
|
|
$163 = ((($162)) + 24|0);
|
|
$164 = HEAP32[$163>>2]|0;
|
|
$165 = (+($164>>>0));
|
|
$166 = $161 * $165;
|
|
_nk_tt_GetGlyphBitmapBox($153,$154,$160,$166,$x0,$y0,$x1,$y1);
|
|
$167 = $1;
|
|
$168 = $0;
|
|
$169 = ((($168)) + 28|0);
|
|
$170 = HEAP32[$169>>2]|0;
|
|
$171 = $r;
|
|
$172 = ((($171)) + 8|0);
|
|
$173 = HEAP16[$172>>1]|0;
|
|
$174 = $173&65535;
|
|
$175 = (($170) + ($174)|0);
|
|
$176 = $r;
|
|
$177 = ((($176)) + 10|0);
|
|
$178 = HEAP16[$177>>1]|0;
|
|
$179 = $178&65535;
|
|
$180 = $0;
|
|
$181 = ((($180)) + 12|0);
|
|
$182 = HEAP32[$181>>2]|0;
|
|
$183 = Math_imul($179, $182)|0;
|
|
$184 = (($175) + ($183)|0);
|
|
$185 = $r;
|
|
$186 = ((($185)) + 4|0);
|
|
$187 = HEAP16[$186>>1]|0;
|
|
$188 = $187&65535;
|
|
$189 = $0;
|
|
$190 = ((($189)) + 20|0);
|
|
$191 = HEAP32[$190>>2]|0;
|
|
$192 = (($188) - ($191))|0;
|
|
$193 = (($192) + 1)|0;
|
|
$194 = $r;
|
|
$195 = ((($194)) + 6|0);
|
|
$196 = HEAP16[$195>>1]|0;
|
|
$197 = $196&65535;
|
|
$198 = $0;
|
|
$199 = ((($198)) + 24|0);
|
|
$200 = HEAP32[$199>>2]|0;
|
|
$201 = (($197) - ($200))|0;
|
|
$202 = (($201) + 1)|0;
|
|
$203 = $0;
|
|
$204 = ((($203)) + 12|0);
|
|
$205 = HEAP32[$204>>2]|0;
|
|
$206 = $scale;
|
|
$207 = $0;
|
|
$208 = ((($207)) + 20|0);
|
|
$209 = HEAP32[$208>>2]|0;
|
|
$210 = (+($209>>>0));
|
|
$211 = $206 * $210;
|
|
$212 = $scale;
|
|
$213 = $0;
|
|
$214 = ((($213)) + 24|0);
|
|
$215 = HEAP32[$214>>2]|0;
|
|
$216 = (+($215>>>0));
|
|
$217 = $212 * $216;
|
|
$218 = $glyph;
|
|
$219 = $5;
|
|
_nk_tt_MakeGlyphBitmapSubpixel($167,$184,$193,$202,$205,$211,$217,0.0,0.0,$218,$219);
|
|
$220 = $0;
|
|
$221 = ((($220)) + 20|0);
|
|
$222 = HEAP32[$221>>2]|0;
|
|
$223 = ($222>>>0)>(1);
|
|
if ($223) {
|
|
$224 = $0;
|
|
$225 = ((($224)) + 28|0);
|
|
$226 = HEAP32[$225>>2]|0;
|
|
$227 = $r;
|
|
$228 = ((($227)) + 8|0);
|
|
$229 = HEAP16[$228>>1]|0;
|
|
$230 = $229&65535;
|
|
$231 = (($226) + ($230)|0);
|
|
$232 = $r;
|
|
$233 = ((($232)) + 10|0);
|
|
$234 = HEAP16[$233>>1]|0;
|
|
$235 = $234&65535;
|
|
$236 = $0;
|
|
$237 = ((($236)) + 12|0);
|
|
$238 = HEAP32[$237>>2]|0;
|
|
$239 = Math_imul($235, $238)|0;
|
|
$240 = (($231) + ($239)|0);
|
|
$241 = $r;
|
|
$242 = ((($241)) + 4|0);
|
|
$243 = HEAP16[$242>>1]|0;
|
|
$244 = $243&65535;
|
|
$245 = $r;
|
|
$246 = ((($245)) + 6|0);
|
|
$247 = HEAP16[$246>>1]|0;
|
|
$248 = $247&65535;
|
|
$249 = $0;
|
|
$250 = ((($249)) + 12|0);
|
|
$251 = HEAP32[$250>>2]|0;
|
|
$252 = $0;
|
|
$253 = ((($252)) + 20|0);
|
|
$254 = HEAP32[$253>>2]|0;
|
|
_nk_tt__h_prefilter($240,$244,$248,$251,$254);
|
|
}
|
|
$255 = $0;
|
|
$256 = ((($255)) + 24|0);
|
|
$257 = HEAP32[$256>>2]|0;
|
|
$258 = ($257>>>0)>(1);
|
|
if ($258) {
|
|
$259 = $0;
|
|
$260 = ((($259)) + 28|0);
|
|
$261 = HEAP32[$260>>2]|0;
|
|
$262 = $r;
|
|
$263 = ((($262)) + 8|0);
|
|
$264 = HEAP16[$263>>1]|0;
|
|
$265 = $264&65535;
|
|
$266 = (($261) + ($265)|0);
|
|
$267 = $r;
|
|
$268 = ((($267)) + 10|0);
|
|
$269 = HEAP16[$268>>1]|0;
|
|
$270 = $269&65535;
|
|
$271 = $0;
|
|
$272 = ((($271)) + 12|0);
|
|
$273 = HEAP32[$272>>2]|0;
|
|
$274 = Math_imul($270, $273)|0;
|
|
$275 = (($266) + ($274)|0);
|
|
$276 = $r;
|
|
$277 = ((($276)) + 4|0);
|
|
$278 = HEAP16[$277>>1]|0;
|
|
$279 = $278&65535;
|
|
$280 = $r;
|
|
$281 = ((($280)) + 6|0);
|
|
$282 = HEAP16[$281>>1]|0;
|
|
$283 = $282&65535;
|
|
$284 = $0;
|
|
$285 = ((($284)) + 12|0);
|
|
$286 = HEAP32[$285>>2]|0;
|
|
$287 = $0;
|
|
$288 = ((($287)) + 24|0);
|
|
$289 = HEAP32[$288>>2]|0;
|
|
_nk_tt__v_prefilter($275,$279,$283,$286,$289);
|
|
}
|
|
$290 = $r;
|
|
$291 = ((($290)) + 8|0);
|
|
$292 = HEAP16[$291>>1]|0;
|
|
$293 = $bc;
|
|
HEAP16[$293>>1] = $292;
|
|
$294 = $r;
|
|
$295 = ((($294)) + 10|0);
|
|
$296 = HEAP16[$295>>1]|0;
|
|
$297 = $bc;
|
|
$298 = ((($297)) + 2|0);
|
|
HEAP16[$298>>1] = $296;
|
|
$299 = $r;
|
|
$300 = ((($299)) + 8|0);
|
|
$301 = HEAP16[$300>>1]|0;
|
|
$302 = $301&65535;
|
|
$303 = $r;
|
|
$304 = ((($303)) + 4|0);
|
|
$305 = HEAP16[$304>>1]|0;
|
|
$306 = $305&65535;
|
|
$307 = (($302) + ($306))|0;
|
|
$308 = $307&65535;
|
|
$309 = $bc;
|
|
$310 = ((($309)) + 4|0);
|
|
HEAP16[$310>>1] = $308;
|
|
$311 = $r;
|
|
$312 = ((($311)) + 10|0);
|
|
$313 = HEAP16[$312>>1]|0;
|
|
$314 = $313&65535;
|
|
$315 = $r;
|
|
$316 = ((($315)) + 6|0);
|
|
$317 = HEAP16[$316>>1]|0;
|
|
$318 = $317&65535;
|
|
$319 = (($314) + ($318))|0;
|
|
$320 = $319&65535;
|
|
$321 = $bc;
|
|
$322 = ((($321)) + 6|0);
|
|
HEAP16[$322>>1] = $320;
|
|
$323 = $scale;
|
|
$324 = HEAP32[$advance>>2]|0;
|
|
$325 = (+($324|0));
|
|
$326 = $323 * $325;
|
|
$327 = $bc;
|
|
$328 = ((($327)) + 16|0);
|
|
HEAPF32[$328>>2] = $326;
|
|
$329 = HEAP32[$x0>>2]|0;
|
|
$330 = (+($329|0));
|
|
$331 = $recip_h;
|
|
$332 = $330 * $331;
|
|
$333 = $sub_x;
|
|
$334 = $332 + $333;
|
|
$335 = $bc;
|
|
$336 = ((($335)) + 8|0);
|
|
HEAPF32[$336>>2] = $334;
|
|
$337 = HEAP32[$y0>>2]|0;
|
|
$338 = (+($337|0));
|
|
$339 = $recip_v;
|
|
$340 = $338 * $339;
|
|
$341 = $sub_y;
|
|
$342 = $340 + $341;
|
|
$343 = $bc;
|
|
$344 = ((($343)) + 12|0);
|
|
HEAPF32[$344>>2] = $342;
|
|
$345 = HEAP32[$x0>>2]|0;
|
|
$346 = (+($345|0));
|
|
$347 = $r;
|
|
$348 = ((($347)) + 4|0);
|
|
$349 = HEAP16[$348>>1]|0;
|
|
$350 = $349&65535;
|
|
$351 = (+($350|0));
|
|
$352 = $346 + $351;
|
|
$353 = $recip_h;
|
|
$354 = $352 * $353;
|
|
$355 = $sub_x;
|
|
$356 = $354 + $355;
|
|
$357 = $bc;
|
|
$358 = ((($357)) + 20|0);
|
|
HEAPF32[$358>>2] = $356;
|
|
$359 = HEAP32[$y0>>2]|0;
|
|
$360 = (+($359|0));
|
|
$361 = $r;
|
|
$362 = ((($361)) + 6|0);
|
|
$363 = HEAP16[$362>>1]|0;
|
|
$364 = $363&65535;
|
|
$365 = (+($364|0));
|
|
$366 = $360 + $365;
|
|
$367 = $recip_v;
|
|
$368 = $366 * $367;
|
|
$369 = $sub_y;
|
|
$370 = $368 + $369;
|
|
$371 = $bc;
|
|
$372 = ((($371)) + 24|0);
|
|
HEAPF32[$372>>2] = $370;
|
|
} else {
|
|
$return_value = 0;
|
|
}
|
|
$373 = $k;
|
|
$374 = (($373) + 1)|0;
|
|
$k = $374;
|
|
$375 = $j;
|
|
$376 = (($375) + 1)|0;
|
|
$j = $376;
|
|
}
|
|
$377 = $i;
|
|
$378 = (($377) + 1)|0;
|
|
$i = $378;
|
|
}
|
|
$379 = $old_h_over;
|
|
$380 = $0;
|
|
$381 = ((($380)) + 20|0);
|
|
HEAP32[$381>>2] = $379;
|
|
$382 = $old_v_over;
|
|
$383 = $0;
|
|
$384 = ((($383)) + 24|0);
|
|
HEAP32[$384>>2] = $382;
|
|
$385 = $return_value;
|
|
STACKTOP = sp;return ($385|0);
|
|
}
|
|
function _nk_tt_PackEnd($spc,$alloc) {
|
|
$spc = $spc|0;
|
|
$alloc = $alloc|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy1 = sp + 12|0;
|
|
$$byval_copy = sp + 8|0;
|
|
$0 = $spc;
|
|
$1 = $alloc;
|
|
$2 = $1;
|
|
$3 = ((($2)) + 8|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$5 = $1;
|
|
$6 = $0;
|
|
$7 = ((($6)) + 32|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$5>>2]|0;
|
|
FUNCTION_TABLE_vii[$4 & 31]($$byval_copy,$8);
|
|
$9 = $1;
|
|
$10 = ((($9)) + 8|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = $1;
|
|
$13 = $0;
|
|
$14 = HEAP32[$13>>2]|0;
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$12>>2]|0;
|
|
FUNCTION_TABLE_vii[$11 & 31]($$byval_copy1,$14);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_tt_ScaleForPixelHeight($info,$height) {
|
|
$info = $info|0;
|
|
$height = +$height;
|
|
var $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $3 = 0, $4 = 0;
|
|
var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $fheight = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $info;
|
|
$1 = $height;
|
|
$2 = $0;
|
|
$3 = HEAP32[$2>>2]|0;
|
|
$4 = $0;
|
|
$5 = ((($4)) + 24|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$7 = (($3) + ($6)|0);
|
|
$8 = ((($7)) + 4|0);
|
|
$9 = (_nk_ttSHORT($8)|0);
|
|
$10 = $9 << 16 >> 16;
|
|
$11 = $0;
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = $0;
|
|
$14 = ((($13)) + 24|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = (($12) + ($15)|0);
|
|
$17 = ((($16)) + 6|0);
|
|
$18 = (_nk_ttSHORT($17)|0);
|
|
$19 = $18 << 16 >> 16;
|
|
$20 = (($10) - ($19))|0;
|
|
$fheight = $20;
|
|
$21 = $1;
|
|
$22 = $fheight;
|
|
$23 = (+($22|0));
|
|
$24 = $21 / $23;
|
|
STACKTOP = sp;return (+$24);
|
|
}
|
|
function _nk_tt_GetFontVMetrics($info,$ascent,$descent,$lineGap) {
|
|
$info = $info|0;
|
|
$ascent = $ascent|0;
|
|
$descent = $descent|0;
|
|
$lineGap = $lineGap|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $info;
|
|
$1 = $ascent;
|
|
$2 = $descent;
|
|
$3 = $lineGap;
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if ($5) {
|
|
$6 = $0;
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = $0;
|
|
$9 = ((($8)) + 24|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = (($7) + ($10)|0);
|
|
$12 = ((($11)) + 4|0);
|
|
$13 = (_nk_ttSHORT($12)|0);
|
|
$14 = $13 << 16 >> 16;
|
|
$15 = $1;
|
|
HEAP32[$15>>2] = $14;
|
|
}
|
|
$16 = $2;
|
|
$17 = ($16|0)!=(0|0);
|
|
if ($17) {
|
|
$18 = $0;
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = $0;
|
|
$21 = ((($20)) + 24|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = (($19) + ($22)|0);
|
|
$24 = ((($23)) + 6|0);
|
|
$25 = (_nk_ttSHORT($24)|0);
|
|
$26 = $25 << 16 >> 16;
|
|
$27 = $2;
|
|
HEAP32[$27>>2] = $26;
|
|
}
|
|
$28 = $3;
|
|
$29 = ($28|0)!=(0|0);
|
|
if (!($29)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$30 = $0;
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = $0;
|
|
$33 = ((($32)) + 24|0);
|
|
$34 = HEAP32[$33>>2]|0;
|
|
$35 = (($31) + ($34)|0);
|
|
$36 = ((($35)) + 8|0);
|
|
$37 = (_nk_ttSHORT($36)|0);
|
|
$38 = $37 << 16 >> 16;
|
|
$39 = $3;
|
|
HEAP32[$39>>2] = $38;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_tt_GetPackedQuad($chardata,$pw,$ph,$char_index,$xpos,$ypos,$q,$align_to_integer) {
|
|
$chardata = $chardata|0;
|
|
$pw = $pw|0;
|
|
$ph = $ph|0;
|
|
$char_index = $char_index|0;
|
|
$xpos = $xpos|0;
|
|
$ypos = $ypos|0;
|
|
$q = $q|0;
|
|
$align_to_integer = $align_to_integer|0;
|
|
var $0 = 0, $1 = 0, $10 = 0.0, $100 = 0, $101 = 0, $102 = 0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0.0, $120 = 0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0.0, $129 = 0, $13 = 0.0, $130 = 0.0, $131 = 0.0, $14 = 0, $15 = 0;
|
|
var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0.0;
|
|
var $34 = 0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0;
|
|
var $52 = 0.0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0, $57 = 0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0.0, $63 = 0.0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0.0, $69 = 0, $7 = 0;
|
|
var $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0, $76 = 0.0, $77 = 0, $78 = 0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0, $82 = 0, $83 = 0, $84 = 0.0, $85 = 0, $86 = 0, $87 = 0.0, $88 = 0.0;
|
|
var $89 = 0, $9 = 0.0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0, $98 = 0, $99 = 0, $b = 0, $iph = 0.0, $ipw = 0.0, $tx = 0, $ty = 0, $x = 0.0, $y = 0.0, label = 0;
|
|
var sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $chardata;
|
|
$1 = $pw;
|
|
$2 = $ph;
|
|
$3 = $char_index;
|
|
$4 = $xpos;
|
|
$5 = $ypos;
|
|
$6 = $q;
|
|
$7 = $align_to_integer;
|
|
$8 = $1;
|
|
$9 = (+($8|0));
|
|
$10 = 1.0 / $9;
|
|
$ipw = $10;
|
|
$11 = $2;
|
|
$12 = (+($11|0));
|
|
$13 = 1.0 / $12;
|
|
$iph = $13;
|
|
$14 = $0;
|
|
$15 = $3;
|
|
$16 = (($14) + (($15*28)|0)|0);
|
|
$b = $16;
|
|
$17 = $7;
|
|
$18 = ($17|0)!=(0);
|
|
$19 = $4;
|
|
$20 = +HEAPF32[$19>>2];
|
|
$21 = $b;
|
|
$22 = ((($21)) + 8|0);
|
|
$23 = +HEAPF32[$22>>2];
|
|
$24 = $20 + $23;
|
|
if ($18) {
|
|
$25 = $24 + 0.5;
|
|
$26 = (_nk_ifloor($25)|0);
|
|
$tx = $26;
|
|
$27 = $5;
|
|
$28 = +HEAPF32[$27>>2];
|
|
$29 = $b;
|
|
$30 = ((($29)) + 12|0);
|
|
$31 = +HEAPF32[$30>>2];
|
|
$32 = $28 + $31;
|
|
$33 = $32 + 0.5;
|
|
$34 = (_nk_ifloor($33)|0);
|
|
$ty = $34;
|
|
$35 = $tx;
|
|
$36 = (+($35|0));
|
|
$x = $36;
|
|
$37 = $ty;
|
|
$38 = (+($37|0));
|
|
$y = $38;
|
|
$39 = $x;
|
|
$40 = $6;
|
|
HEAPF32[$40>>2] = $39;
|
|
$41 = $y;
|
|
$42 = $6;
|
|
$43 = ((($42)) + 4|0);
|
|
HEAPF32[$43>>2] = $41;
|
|
$44 = $x;
|
|
$45 = $b;
|
|
$46 = ((($45)) + 20|0);
|
|
$47 = +HEAPF32[$46>>2];
|
|
$48 = $44 + $47;
|
|
$49 = $b;
|
|
$50 = ((($49)) + 8|0);
|
|
$51 = +HEAPF32[$50>>2];
|
|
$52 = $48 - $51;
|
|
$53 = $6;
|
|
$54 = ((($53)) + 16|0);
|
|
HEAPF32[$54>>2] = $52;
|
|
$55 = $y;
|
|
$56 = $b;
|
|
$57 = ((($56)) + 24|0);
|
|
$58 = +HEAPF32[$57>>2];
|
|
$59 = $55 + $58;
|
|
$60 = $b;
|
|
$61 = ((($60)) + 12|0);
|
|
$62 = +HEAPF32[$61>>2];
|
|
$63 = $59 - $62;
|
|
$64 = $6;
|
|
$65 = ((($64)) + 20|0);
|
|
HEAPF32[$65>>2] = $63;
|
|
} else {
|
|
$66 = $6;
|
|
HEAPF32[$66>>2] = $24;
|
|
$67 = $5;
|
|
$68 = +HEAPF32[$67>>2];
|
|
$69 = $b;
|
|
$70 = ((($69)) + 12|0);
|
|
$71 = +HEAPF32[$70>>2];
|
|
$72 = $68 + $71;
|
|
$73 = $6;
|
|
$74 = ((($73)) + 4|0);
|
|
HEAPF32[$74>>2] = $72;
|
|
$75 = $4;
|
|
$76 = +HEAPF32[$75>>2];
|
|
$77 = $b;
|
|
$78 = ((($77)) + 20|0);
|
|
$79 = +HEAPF32[$78>>2];
|
|
$80 = $76 + $79;
|
|
$81 = $6;
|
|
$82 = ((($81)) + 16|0);
|
|
HEAPF32[$82>>2] = $80;
|
|
$83 = $5;
|
|
$84 = +HEAPF32[$83>>2];
|
|
$85 = $b;
|
|
$86 = ((($85)) + 24|0);
|
|
$87 = +HEAPF32[$86>>2];
|
|
$88 = $84 + $87;
|
|
$89 = $6;
|
|
$90 = ((($89)) + 20|0);
|
|
HEAPF32[$90>>2] = $88;
|
|
}
|
|
$91 = $b;
|
|
$92 = HEAP16[$91>>1]|0;
|
|
$93 = $92&65535;
|
|
$94 = (+($93|0));
|
|
$95 = $ipw;
|
|
$96 = $94 * $95;
|
|
$97 = $6;
|
|
$98 = ((($97)) + 8|0);
|
|
HEAPF32[$98>>2] = $96;
|
|
$99 = $b;
|
|
$100 = ((($99)) + 2|0);
|
|
$101 = HEAP16[$100>>1]|0;
|
|
$102 = $101&65535;
|
|
$103 = (+($102|0));
|
|
$104 = $iph;
|
|
$105 = $103 * $104;
|
|
$106 = $6;
|
|
$107 = ((($106)) + 12|0);
|
|
HEAPF32[$107>>2] = $105;
|
|
$108 = $b;
|
|
$109 = ((($108)) + 4|0);
|
|
$110 = HEAP16[$109>>1]|0;
|
|
$111 = $110&65535;
|
|
$112 = (+($111|0));
|
|
$113 = $ipw;
|
|
$114 = $112 * $113;
|
|
$115 = $6;
|
|
$116 = ((($115)) + 24|0);
|
|
HEAPF32[$116>>2] = $114;
|
|
$117 = $b;
|
|
$118 = ((($117)) + 6|0);
|
|
$119 = HEAP16[$118>>1]|0;
|
|
$120 = $119&65535;
|
|
$121 = (+($120|0));
|
|
$122 = $iph;
|
|
$123 = $121 * $122;
|
|
$124 = $6;
|
|
$125 = ((($124)) + 28|0);
|
|
HEAPF32[$125>>2] = $123;
|
|
$126 = $b;
|
|
$127 = ((($126)) + 16|0);
|
|
$128 = +HEAPF32[$127>>2];
|
|
$129 = $4;
|
|
$130 = +HEAPF32[$129>>2];
|
|
$131 = $130 + $128;
|
|
HEAPF32[$129>>2] = $131;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_font_bake_custom_data($img_memory,$img_width,$img_height,$img_dst,$texture_data_mask,$tex_width,$tex_height,$white,$black) {
|
|
$img_memory = $img_memory|0;
|
|
$img_width = $img_width|0;
|
|
$img_height = $img_height|0;
|
|
$img_dst = $img_dst|0;
|
|
$texture_data_mask = $texture_data_mask|0;
|
|
$tex_width = $tex_width|0;
|
|
$tex_height = $tex_height|0;
|
|
$white = $white|0;
|
|
$black = $black|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $8 = 0, $9 = 0, $n = 0;
|
|
var $off0 = 0, $off1 = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $pixels = 0, $x = 0, $y = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $img_memory;
|
|
$1 = $img_width;
|
|
$2 = $img_height;
|
|
$3 = $texture_data_mask;
|
|
$4 = $tex_width;
|
|
$5 = $tex_height;
|
|
$6 = $white;
|
|
$7 = $black;
|
|
$y = 0;
|
|
$x = 0;
|
|
$n = 0;
|
|
$8 = $0;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
___assert_fail((15183|0),(13400|0),9058,(15194|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $1;
|
|
$11 = ($10|0)!=(0);
|
|
if (!($11)) {
|
|
___assert_fail((15219|0),(13400|0),9059,(15194|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $2;
|
|
$13 = ($12|0)!=(0);
|
|
if (!($13)) {
|
|
___assert_fail((15229|0),(13400|0),9060,(15194|0));
|
|
// unreachable;
|
|
}
|
|
$14 = $3;
|
|
$15 = ($14|0)!=(0|0);
|
|
if (!($15)) {
|
|
___assert_fail((15240|0),(13400|0),9061,(15194|0));
|
|
// unreachable;
|
|
}
|
|
$16 = $0;
|
|
$17 = ($16|0)!=(0|0);
|
|
$18 = $1;
|
|
$19 = ($18|0)!=(0);
|
|
$or$cond = $17 & $19;
|
|
$20 = $2;
|
|
$21 = ($20|0)!=(0);
|
|
$or$cond3 = $or$cond & $21;
|
|
$22 = $3;
|
|
$23 = ($22|0)!=(0|0);
|
|
$or$cond5 = $or$cond3 & $23;
|
|
if (!($or$cond5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$24 = $0;
|
|
$pixels = $24;
|
|
$y = 0;
|
|
$n = 0;
|
|
while(1) {
|
|
$25 = $y;
|
|
$26 = $5;
|
|
$27 = ($25|0)<($26|0);
|
|
if (!($27)) {
|
|
break;
|
|
}
|
|
$x = 0;
|
|
while(1) {
|
|
$28 = $x;
|
|
$29 = $4;
|
|
$30 = ($28|0)<($29|0);
|
|
if (!($30)) {
|
|
break;
|
|
}
|
|
$31 = HEAP16[$img_dst>>1]|0;
|
|
$32 = $31 << 16 >> 16;
|
|
$33 = $x;
|
|
$34 = (($32) + ($33))|0;
|
|
$35 = ((($img_dst)) + 2|0);
|
|
$36 = HEAP16[$35>>1]|0;
|
|
$37 = $36 << 16 >> 16;
|
|
$38 = $y;
|
|
$39 = (($37) + ($38))|0;
|
|
$40 = $1;
|
|
$41 = Math_imul($39, $40)|0;
|
|
$42 = (($34) + ($41))|0;
|
|
$off0 = $42;
|
|
$43 = $off0;
|
|
$44 = (($43) + 1)|0;
|
|
$45 = $4;
|
|
$46 = (($44) + ($45))|0;
|
|
$off1 = $46;
|
|
$47 = $n;
|
|
$48 = $3;
|
|
$49 = (($48) + ($47)|0);
|
|
$50 = HEAP8[$49>>0]|0;
|
|
$51 = $50 << 24 >> 24;
|
|
$52 = $6;
|
|
$53 = $52 << 24 >> 24;
|
|
$54 = ($51|0)==($53|0);
|
|
$55 = $54 ? 255 : 0;
|
|
$56 = $55&255;
|
|
$57 = $off0;
|
|
$58 = $pixels;
|
|
$59 = (($58) + ($57)|0);
|
|
HEAP8[$59>>0] = $56;
|
|
$60 = $n;
|
|
$61 = $3;
|
|
$62 = (($61) + ($60)|0);
|
|
$63 = HEAP8[$62>>0]|0;
|
|
$64 = $63 << 24 >> 24;
|
|
$65 = $7;
|
|
$66 = $65 << 24 >> 24;
|
|
$67 = ($64|0)==($66|0);
|
|
$68 = $67 ? 255 : 0;
|
|
$69 = $68&255;
|
|
$70 = $off1;
|
|
$71 = $pixels;
|
|
$72 = (($71) + ($70)|0);
|
|
HEAP8[$72>>0] = $69;
|
|
$73 = $x;
|
|
$74 = (($73) + 1)|0;
|
|
$x = $74;
|
|
$75 = $n;
|
|
$76 = (($75) + 1)|0;
|
|
$n = $76;
|
|
}
|
|
$77 = $y;
|
|
$78 = (($77) + 1)|0;
|
|
$y = $78;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_font_bake_convert($out_memory,$img_width,$img_height,$in_memory) {
|
|
$out_memory = $out_memory|0;
|
|
$img_width = $img_width|0;
|
|
$img_height = $img_height|0;
|
|
$in_memory = $in_memory|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $dst = 0, $n = 0, $or$cond = 0;
|
|
var $or$cond3 = 0, $or$cond5 = 0, $src = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $out_memory;
|
|
$1 = $img_width;
|
|
$2 = $img_height;
|
|
$3 = $in_memory;
|
|
$n = 0;
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((15258|0),(13400|0),9085,(15269|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $3;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((15290|0),(13400|0),9086,(15269|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0);
|
|
if (!($9)) {
|
|
___assert_fail((15219|0),(13400|0),9087,(15269|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $2;
|
|
$11 = ($10|0)!=(0);
|
|
if (!($11)) {
|
|
___assert_fail((15229|0),(13400|0),9088,(15269|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $0;
|
|
$13 = ($12|0)!=(0|0);
|
|
$14 = $3;
|
|
$15 = ($14|0)!=(0|0);
|
|
$or$cond = $13 & $15;
|
|
$16 = $2;
|
|
$17 = ($16|0)!=(0);
|
|
$or$cond3 = $or$cond & $17;
|
|
$18 = $1;
|
|
$19 = ($18|0)!=(0);
|
|
$or$cond5 = $or$cond3 & $19;
|
|
if (!($or$cond5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$20 = $0;
|
|
$dst = $20;
|
|
$21 = $3;
|
|
$src = $21;
|
|
$22 = $1;
|
|
$23 = $2;
|
|
$24 = Math_imul($22, $23)|0;
|
|
$n = $24;
|
|
while(1) {
|
|
$25 = $n;
|
|
$26 = ($25|0)>(0);
|
|
if (!($26)) {
|
|
break;
|
|
}
|
|
$27 = $src;
|
|
$28 = ((($27)) + 1|0);
|
|
$src = $28;
|
|
$29 = HEAP8[$27>>0]|0;
|
|
$30 = $29&255;
|
|
$31 = $30 << 24;
|
|
$32 = $31 | 16777215;
|
|
$33 = $dst;
|
|
$34 = ((($33)) + 4|0);
|
|
$dst = $34;
|
|
HEAP32[$33>>2] = $32;
|
|
$35 = $n;
|
|
$36 = (($35) + -1)|0;
|
|
$n = $36;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_font_find_glyph($font,$unicode) {
|
|
$font = $font|0;
|
|
$unicode = $unicode|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $7 = 0, $8 = 0, $9 = 0, $count = 0, $diff = 0, $f = 0, $glyph = 0, $i = 0, $t = 0, $total_glyphs = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $font;
|
|
$2 = $unicode;
|
|
$i = 0;
|
|
$total_glyphs = 0;
|
|
$glyph = 0;
|
|
$3 = $1;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((14249|0),(13400|0),9171,(15300|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $1;
|
|
$6 = ((($5)) + 48|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((15319|0),(13400|0),9172,(15300|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $1;
|
|
$10 = ((($9)) + 52|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$glyph = $11;
|
|
$12 = $1;
|
|
$13 = ((($12)) + 20|0);
|
|
$14 = ((($13)) + 20|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = (_nk_range_count($15)|0);
|
|
$count = $16;
|
|
$i = 0;
|
|
while(1) {
|
|
$17 = $i;
|
|
$18 = $count;
|
|
$19 = ($17|0)<($18|0);
|
|
if (!($19)) {
|
|
label = 11;
|
|
break;
|
|
}
|
|
$20 = $i;
|
|
$21 = $20<<1;
|
|
$22 = (($21) + 0)|0;
|
|
$23 = $1;
|
|
$24 = ((($23)) + 20|0);
|
|
$25 = ((($24)) + 20|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$27 = (($26) + ($22<<2)|0);
|
|
$28 = HEAP32[$27>>2]|0;
|
|
$f = $28;
|
|
$29 = $i;
|
|
$30 = $29<<1;
|
|
$31 = (($30) + 1)|0;
|
|
$32 = $1;
|
|
$33 = ((($32)) + 20|0);
|
|
$34 = ((($33)) + 20|0);
|
|
$35 = HEAP32[$34>>2]|0;
|
|
$36 = (($35) + ($31<<2)|0);
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$t = $37;
|
|
$38 = $t;
|
|
$39 = $f;
|
|
$40 = (($38) - ($39))|0;
|
|
$41 = (($40) + 1)|0;
|
|
$diff = $41;
|
|
$42 = $2;
|
|
$43 = $f;
|
|
$44 = ($42>>>0)>=($43>>>0);
|
|
if ($44) {
|
|
$45 = $2;
|
|
$46 = $t;
|
|
$47 = ($45>>>0)<=($46>>>0);
|
|
if ($47) {
|
|
label = 9;
|
|
break;
|
|
}
|
|
}
|
|
$57 = $diff;
|
|
$58 = $total_glyphs;
|
|
$59 = (($58) + ($57))|0;
|
|
$total_glyphs = $59;
|
|
$60 = $i;
|
|
$61 = (($60) + 1)|0;
|
|
$i = $61;
|
|
}
|
|
if ((label|0) == 9) {
|
|
$48 = $total_glyphs;
|
|
$49 = $2;
|
|
$50 = $f;
|
|
$51 = (($49) - ($50))|0;
|
|
$52 = (($48) + ($51))|0;
|
|
$53 = $1;
|
|
$54 = ((($53)) + 48|0);
|
|
$55 = HEAP32[$54>>2]|0;
|
|
$56 = (($55) + (($52*48)|0)|0);
|
|
$0 = $56;
|
|
$63 = $0;
|
|
STACKTOP = sp;return ($63|0);
|
|
}
|
|
else if ((label|0) == 11) {
|
|
$62 = $glyph;
|
|
$0 = $62;
|
|
$63 = $0;
|
|
STACKTOP = sp;return ($63|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_font_init($font,$pixel_height,$fallback_codepoint,$glyphs,$baked_font,$atlas) {
|
|
$font = $font|0;
|
|
$pixel_height = +$pixel_height;
|
|
$fallback_codepoint = $fallback_codepoint|0;
|
|
$glyphs = $glyphs|0;
|
|
$baked_font = $baked_font|0;
|
|
$atlas = $atlas|0;
|
|
var $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $7 = 0, $8 = 0, $9 = 0, $baked = 0, $or$cond = 0, $or$cond3 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$baked = sp;
|
|
$0 = $font;
|
|
$1 = $pixel_height;
|
|
$2 = $fallback_codepoint;
|
|
$3 = $glyphs;
|
|
$4 = $baked_font;
|
|
$5 = $0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((14249|0),(13400|0),9194,(15332|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $3;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((15345|0),(13400|0),9195,(15332|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $4;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((15352|0),(13400|0),9196,(15332|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $0;
|
|
$12 = ($11|0)!=(0|0);
|
|
$13 = $3;
|
|
$14 = ($13|0)!=(0|0);
|
|
$or$cond = $12 & $14;
|
|
$15 = $4;
|
|
$16 = ($15|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $16;
|
|
if (!($or$cond3)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$17 = $4;
|
|
;HEAP32[$baked>>2]=HEAP32[$17>>2]|0;HEAP32[$baked+4>>2]=HEAP32[$17+4>>2]|0;HEAP32[$baked+8>>2]=HEAP32[$17+8>>2]|0;HEAP32[$baked+12>>2]=HEAP32[$17+12>>2]|0;HEAP32[$baked+16>>2]=HEAP32[$17+16>>2]|0;HEAP32[$baked+20>>2]=HEAP32[$17+20>>2]|0;
|
|
$18 = $0;
|
|
_nk_zero($18,68);
|
|
$19 = $0;
|
|
$20 = ((($19)) + 20|0);
|
|
;HEAP32[$20>>2]=HEAP32[$baked>>2]|0;HEAP32[$20+4>>2]=HEAP32[$baked+4>>2]|0;HEAP32[$20+8>>2]=HEAP32[$baked+8>>2]|0;HEAP32[$20+12>>2]=HEAP32[$baked+12>>2]|0;HEAP32[$20+16>>2]=HEAP32[$baked+16>>2]|0;HEAP32[$20+20>>2]=HEAP32[$baked+20>>2]|0;
|
|
$21 = $1;
|
|
$22 = $0;
|
|
$23 = ((($22)) + 20|0);
|
|
$24 = +HEAPF32[$23>>2];
|
|
$25 = $21 / $24;
|
|
$26 = $0;
|
|
$27 = ((($26)) + 44|0);
|
|
HEAPF32[$27>>2] = $25;
|
|
$28 = $4;
|
|
$29 = ((($28)) + 12|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$31 = $3;
|
|
$32 = (($31) + (($30*48)|0)|0);
|
|
$33 = $0;
|
|
$34 = ((($33)) + 48|0);
|
|
HEAP32[$34>>2] = $32;
|
|
$35 = $0;
|
|
$36 = ((($35)) + 60|0);
|
|
;HEAP32[$36>>2]=HEAP32[$atlas>>2]|0;
|
|
$37 = $2;
|
|
$38 = $0;
|
|
$39 = ((($38)) + 56|0);
|
|
HEAP32[$39>>2] = $37;
|
|
$40 = $0;
|
|
$41 = $2;
|
|
$42 = (_nk_font_find_glyph($40,$41)|0);
|
|
$43 = $0;
|
|
$44 = ((($43)) + 52|0);
|
|
HEAP32[$44>>2] = $42;
|
|
$45 = $0;
|
|
$46 = ((($45)) + 20|0);
|
|
$47 = +HEAPF32[$46>>2];
|
|
$48 = $0;
|
|
$49 = ((($48)) + 44|0);
|
|
$50 = +HEAPF32[$49>>2];
|
|
$51 = $47 * $50;
|
|
$52 = $0;
|
|
$53 = ((($52)) + 4|0);
|
|
HEAPF32[$53>>2] = $51;
|
|
$54 = $0;
|
|
$55 = ((($54)) + 8|0);
|
|
HEAP32[$55>>2] = 11;
|
|
$56 = $0;
|
|
$57 = $0;
|
|
HEAP32[$57>>2] = $56;
|
|
$58 = $0;
|
|
$59 = ((($58)) + 12|0);
|
|
HEAP32[$59>>2] = 12;
|
|
$60 = $0;
|
|
$61 = ((($60)) + 16|0);
|
|
$62 = $0;
|
|
$63 = ((($62)) + 60|0);
|
|
;HEAP32[$61>>2]=HEAP32[$63>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_font_text_width($handle,$height,$text,$len) {
|
|
$handle = $handle|0;
|
|
$height = +$height;
|
|
$text = $text|0;
|
|
$len = $len|0;
|
|
var $$not = 0, $0 = 0.0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0;
|
|
var $44 = 0.0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0.0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $font = 0, $g = 0;
|
|
var $glyph_len = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $scale = 0.0, $text_len = 0, $text_width = 0.0, $unicode = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$unicode = sp + 24|0;
|
|
$1 = $height;
|
|
$2 = $text;
|
|
$3 = $len;
|
|
$text_len = 0;
|
|
$text_width = 0.0;
|
|
$glyph_len = 0;
|
|
$scale = 0.0;
|
|
$4 = HEAP32[$handle>>2]|0;
|
|
$font = $4;
|
|
$5 = $font;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((14249|0),(13400|0),9112,(31022|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $font;
|
|
$8 = ((($7)) + 48|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((15319|0),(13400|0),9113,(31022|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $font;
|
|
$12 = ($11|0)!=(0|0);
|
|
$13 = $2;
|
|
$14 = ($13|0)!=(0|0);
|
|
$or$cond = $12 & $14;
|
|
$15 = $3;
|
|
$16 = ($15|0)!=(0);
|
|
$or$cond3 = $or$cond & $16;
|
|
if (!($or$cond3)) {
|
|
$0 = 0.0;
|
|
$56 = $0;
|
|
STACKTOP = sp;return (+$56);
|
|
}
|
|
$17 = $1;
|
|
$18 = $font;
|
|
$19 = ((($18)) + 20|0);
|
|
$20 = +HEAPF32[$19>>2];
|
|
$21 = $17 / $20;
|
|
$scale = $21;
|
|
$22 = $2;
|
|
$23 = $3;
|
|
$24 = (_nk_utf_decode($22,$unicode,$23)|0);
|
|
$text_len = $24;
|
|
$glyph_len = $24;
|
|
$25 = $glyph_len;
|
|
$26 = ($25|0)!=(0);
|
|
if (!($26)) {
|
|
$0 = 0.0;
|
|
$56 = $0;
|
|
STACKTOP = sp;return (+$56);
|
|
}
|
|
while(1) {
|
|
$27 = $text_len;
|
|
$28 = $3;
|
|
$29 = ($27|0)<=($28|0);
|
|
$30 = $glyph_len;
|
|
$31 = ($30|0)!=(0);
|
|
$32 = $29 ? $31 : 0;
|
|
$$not = $32 ^ 1;
|
|
$33 = HEAP32[$unicode>>2]|0;
|
|
$34 = ($33|0)==(65533);
|
|
$or$cond5 = $$not | $34;
|
|
if ($or$cond5) {
|
|
break;
|
|
}
|
|
$35 = $font;
|
|
$36 = HEAP32[$unicode>>2]|0;
|
|
$37 = (_nk_font_find_glyph($35,$36)|0);
|
|
$g = $37;
|
|
$38 = $g;
|
|
$39 = ((($38)) + 4|0);
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = $scale;
|
|
$42 = $40 * $41;
|
|
$43 = $text_width;
|
|
$44 = $43 + $42;
|
|
$text_width = $44;
|
|
$45 = $2;
|
|
$46 = $text_len;
|
|
$47 = (($45) + ($46)|0);
|
|
$48 = $3;
|
|
$49 = $text_len;
|
|
$50 = (($48) - ($49))|0;
|
|
$51 = (_nk_utf_decode($47,$unicode,$50)|0);
|
|
$glyph_len = $51;
|
|
$52 = $glyph_len;
|
|
$53 = $text_len;
|
|
$54 = (($53) + ($52))|0;
|
|
$text_len = $54;
|
|
}
|
|
$55 = $text_width;
|
|
$0 = $55;
|
|
$56 = $0;
|
|
STACKTOP = sp;return (+$56);
|
|
}
|
|
function _nk_font_query_font_glyph($handle,$height,$glyph,$codepoint,$next_codepoint) {
|
|
$handle = $handle|0;
|
|
$height = +$height;
|
|
$glyph = $glyph|0;
|
|
$codepoint = $codepoint|0;
|
|
$next_codepoint = $next_codepoint|0;
|
|
var $0 = 0.0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0.0;
|
|
var $45 = 0.0, $46 = 0.0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0;
|
|
var $63 = 0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0.0;
|
|
var $81 = 0, $82 = 0, $83 = 0.0, $9 = 0, $font = 0, $g = 0, $or$cond = 0, $scale = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$4 = sp + 16|0;
|
|
$5 = sp + 8|0;
|
|
$6 = sp;
|
|
$0 = $height;
|
|
$1 = $glyph;
|
|
$2 = $codepoint;
|
|
$3 = $next_codepoint;
|
|
$7 = $1;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((31041|0),(13400|0),9144,(31047|0));
|
|
// unreachable;
|
|
}
|
|
$9 = HEAP32[$handle>>2]|0;
|
|
$font = $9;
|
|
$10 = $font;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
___assert_fail((14249|0),(13400|0),9148,(31047|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $font;
|
|
$13 = ((($12)) + 48|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = ($14|0)!=(0|0);
|
|
if (!($15)) {
|
|
___assert_fail((15319|0),(13400|0),9149,(31047|0));
|
|
// unreachable;
|
|
}
|
|
$16 = $font;
|
|
$17 = ($16|0)!=(0|0);
|
|
$18 = $1;
|
|
$19 = ($18|0)!=(0|0);
|
|
$or$cond = $17 & $19;
|
|
if (!($or$cond)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$20 = $0;
|
|
$21 = $font;
|
|
$22 = ((($21)) + 20|0);
|
|
$23 = +HEAPF32[$22>>2];
|
|
$24 = $20 / $23;
|
|
$scale = $24;
|
|
$25 = $font;
|
|
$26 = $2;
|
|
$27 = (_nk_font_find_glyph($25,$26)|0);
|
|
$g = $27;
|
|
$28 = $g;
|
|
$29 = ((($28)) + 16|0);
|
|
$30 = +HEAPF32[$29>>2];
|
|
$31 = $g;
|
|
$32 = ((($31)) + 8|0);
|
|
$33 = +HEAPF32[$32>>2];
|
|
$34 = $30 - $33;
|
|
$35 = $scale;
|
|
$36 = $34 * $35;
|
|
$37 = $1;
|
|
$38 = ((($37)) + 24|0);
|
|
HEAPF32[$38>>2] = $36;
|
|
$39 = $g;
|
|
$40 = ((($39)) + 20|0);
|
|
$41 = +HEAPF32[$40>>2];
|
|
$42 = $g;
|
|
$43 = ((($42)) + 12|0);
|
|
$44 = +HEAPF32[$43>>2];
|
|
$45 = $41 - $44;
|
|
$46 = $scale;
|
|
$47 = $45 * $46;
|
|
$48 = $1;
|
|
$49 = ((($48)) + 28|0);
|
|
HEAPF32[$49>>2] = $47;
|
|
$50 = $1;
|
|
$51 = ((($50)) + 16|0);
|
|
$52 = $g;
|
|
$53 = ((($52)) + 8|0);
|
|
$54 = +HEAPF32[$53>>2];
|
|
$55 = $scale;
|
|
$56 = $54 * $55;
|
|
$57 = $g;
|
|
$58 = ((($57)) + 12|0);
|
|
$59 = +HEAPF32[$58>>2];
|
|
$60 = $scale;
|
|
$61 = $59 * $60;
|
|
_nk_vec2($4,$56,$61);
|
|
;HEAP32[$51>>2]=HEAP32[$4>>2]|0;HEAP32[$51+4>>2]=HEAP32[$4+4>>2]|0;
|
|
$62 = $g;
|
|
$63 = ((($62)) + 4|0);
|
|
$64 = +HEAPF32[$63>>2];
|
|
$65 = $scale;
|
|
$66 = $64 * $65;
|
|
$67 = $1;
|
|
$68 = ((($67)) + 32|0);
|
|
HEAPF32[$68>>2] = $66;
|
|
$69 = $1;
|
|
$70 = $g;
|
|
$71 = ((($70)) + 32|0);
|
|
$72 = +HEAPF32[$71>>2];
|
|
$73 = $g;
|
|
$74 = ((($73)) + 36|0);
|
|
$75 = +HEAPF32[$74>>2];
|
|
_nk_vec2($5,$72,$75);
|
|
;HEAP32[$69>>2]=HEAP32[$5>>2]|0;HEAP32[$69+4>>2]=HEAP32[$5+4>>2]|0;
|
|
$76 = $1;
|
|
$77 = ((($76)) + 8|0);
|
|
$78 = $g;
|
|
$79 = ((($78)) + 40|0);
|
|
$80 = +HEAPF32[$79>>2];
|
|
$81 = $g;
|
|
$82 = ((($81)) + 44|0);
|
|
$83 = +HEAPF32[$82>>2];
|
|
_nk_vec2($6,$80,$83);
|
|
;HEAP32[$77>>2]=HEAP32[$6>>2]|0;HEAP32[$77+4>>2]=HEAP32[$6+4>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_font_config($agg$result,$pixel_height) {
|
|
$agg$result = $agg$result|0;
|
|
$pixel_height = +$pixel_height;
|
|
var $0 = 0.0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cfg = 0, dest = 0, label = 0, sp = 0;
|
|
var src = 0, stop = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$cfg = sp + 8|0;
|
|
$1 = sp;
|
|
$0 = $pixel_height;
|
|
_nk_zero($cfg,44);
|
|
HEAP32[$cfg>>2] = 0;
|
|
$2 = ((($cfg)) + 4|0);
|
|
HEAP32[$2>>2] = 0;
|
|
$3 = ((($cfg)) + 8|0);
|
|
HEAP8[$3>>0] = 0;
|
|
$4 = $0;
|
|
$5 = ((($cfg)) + 16|0);
|
|
HEAPF32[$5>>2] = $4;
|
|
$6 = ((($cfg)) + 12|0);
|
|
HEAP8[$6>>0] = 3;
|
|
$7 = ((($cfg)) + 11|0);
|
|
HEAP8[$7>>0] = 1;
|
|
$8 = ((($cfg)) + 10|0);
|
|
HEAP8[$8>>0] = 0;
|
|
$9 = ((($cfg)) + 20|0);
|
|
HEAP32[$9>>2] = 0;
|
|
$10 = ((($cfg)) + 24|0);
|
|
_nk_vec2($1,0.0,0.0);
|
|
;HEAP32[$10>>2]=HEAP32[$1>>2]|0;HEAP32[$10+4>>2]=HEAP32[$1+4>>2]|0;
|
|
$11 = (_nk_font_default_glyph_ranges()|0);
|
|
$12 = ((($cfg)) + 32|0);
|
|
HEAP32[$12>>2] = $11;
|
|
$13 = ((($cfg)) + 40|0);
|
|
HEAP32[$13>>2] = 63;
|
|
$14 = ((($cfg)) + 36|0);
|
|
HEAP32[$14>>2] = 0;
|
|
$15 = ((($cfg)) + 9|0);
|
|
HEAP8[$15>>0] = 0;
|
|
dest=$agg$result; src=$cfg; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_font_atlas_init_default($atlas) {
|
|
$atlas = $atlas|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $atlas;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((15363|0),(13400|0),9511,(15369|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
_nk_zero($5,72);
|
|
$6 = $0;
|
|
$7 = ((($6)) + 24|0);
|
|
HEAP32[$7>>2] = 0;
|
|
$8 = $0;
|
|
$9 = ((($8)) + 24|0);
|
|
$10 = ((($9)) + 4|0);
|
|
HEAP32[$10>>2] = 7;
|
|
$11 = $0;
|
|
$12 = ((($11)) + 24|0);
|
|
$13 = ((($12)) + 8|0);
|
|
HEAP32[$13>>2] = 8;
|
|
$14 = $0;
|
|
$15 = ((($14)) + 12|0);
|
|
HEAP32[$15>>2] = 0;
|
|
$16 = $0;
|
|
$17 = ((($16)) + 12|0);
|
|
$18 = ((($17)) + 4|0);
|
|
HEAP32[$18>>2] = 7;
|
|
$19 = $0;
|
|
$20 = ((($19)) + 12|0);
|
|
$21 = ((($20)) + 8|0);
|
|
HEAP32[$21>>2] = 8;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_font_atlas_begin($atlas) {
|
|
$atlas = $atlas|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
|
|
var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
|
|
var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
|
|
var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy1 = sp + 8|0;
|
|
$$byval_copy = sp + 4|0;
|
|
$0 = $atlas;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((15363|0),(13400|0),9550,(15396|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ((($3)) + 24|0);
|
|
$5 = ((($4)) + 4|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((15416|0),(13400|0),9551,(15396|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $0;
|
|
$9 = ((($8)) + 24|0);
|
|
$10 = ((($9)) + 8|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = ($11|0)!=(0|0);
|
|
if (!($12)) {
|
|
___assert_fail((15416|0),(13400|0),9551,(15396|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $0;
|
|
$14 = ((($13)) + 12|0);
|
|
$15 = ((($14)) + 4|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = ($16|0)!=(0|0);
|
|
if (!($17)) {
|
|
___assert_fail((15464|0),(13400|0),9552,(15396|0));
|
|
// unreachable;
|
|
}
|
|
$18 = $0;
|
|
$19 = ((($18)) + 12|0);
|
|
$20 = ((($19)) + 8|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = ($21|0)!=(0|0);
|
|
if (!($22)) {
|
|
___assert_fail((15464|0),(13400|0),9552,(15396|0));
|
|
// unreachable;
|
|
}
|
|
$23 = $0;
|
|
$24 = ($23|0)!=(0|0);
|
|
if (!($24)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$25 = $0;
|
|
$26 = ((($25)) + 12|0);
|
|
$27 = ((($26)) + 4|0);
|
|
$28 = HEAP32[$27>>2]|0;
|
|
$29 = ($28|0)!=(0|0);
|
|
if (!($29)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$30 = $0;
|
|
$31 = ((($30)) + 12|0);
|
|
$32 = ((($31)) + 8|0);
|
|
$33 = HEAP32[$32>>2]|0;
|
|
$34 = ($33|0)!=(0|0);
|
|
if (!($34)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$35 = $0;
|
|
$36 = ((($35)) + 24|0);
|
|
$37 = ((($36)) + 4|0);
|
|
$38 = HEAP32[$37>>2]|0;
|
|
$39 = ($38|0)!=(0|0);
|
|
if (!($39)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$40 = $0;
|
|
$41 = ((($40)) + 24|0);
|
|
$42 = ((($41)) + 8|0);
|
|
$43 = HEAP32[$42>>2]|0;
|
|
$44 = ($43|0)!=(0|0);
|
|
if (!($44)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$45 = $0;
|
|
$46 = ((($45)) + 52|0);
|
|
$47 = HEAP32[$46>>2]|0;
|
|
$48 = ($47|0)!=(0|0);
|
|
if ($48) {
|
|
$49 = $0;
|
|
$50 = ((($49)) + 12|0);
|
|
$51 = ((($50)) + 8|0);
|
|
$52 = HEAP32[$51>>2]|0;
|
|
$53 = $0;
|
|
$54 = ((($53)) + 12|0);
|
|
$55 = $0;
|
|
$56 = ((($55)) + 52|0);
|
|
$57 = HEAP32[$56>>2]|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$54>>2]|0;
|
|
FUNCTION_TABLE_vii[$52 & 31]($$byval_copy,$57);
|
|
$58 = $0;
|
|
$59 = ((($58)) + 52|0);
|
|
HEAP32[$59>>2] = 0;
|
|
}
|
|
$60 = $0;
|
|
$61 = HEAP32[$60>>2]|0;
|
|
$62 = ($61|0)!=(0|0);
|
|
if (!($62)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$63 = $0;
|
|
$64 = ((($63)) + 12|0);
|
|
$65 = ((($64)) + 8|0);
|
|
$66 = HEAP32[$65>>2]|0;
|
|
$67 = $0;
|
|
$68 = ((($67)) + 12|0);
|
|
$69 = $0;
|
|
$70 = HEAP32[$69>>2]|0;
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$68>>2]|0;
|
|
FUNCTION_TABLE_vii[$66 & 31]($$byval_copy1,$70);
|
|
$71 = $0;
|
|
HEAP32[$71>>2] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_font_atlas_add($atlas,$config) {
|
|
$atlas = $atlas|0;
|
|
$config = $config|0;
|
|
var $$byval_copy = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0;
|
|
var $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0;
|
|
var $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0;
|
|
var $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0;
|
|
var $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0;
|
|
var $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0;
|
|
var $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0;
|
|
var $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0;
|
|
var $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0;
|
|
var $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $28 = 0;
|
|
var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0;
|
|
var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0;
|
|
var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0;
|
|
var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $c = 0, $font = 0;
|
|
var $or$cond = 0, $tmp_config = 0, $tmp_font = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy6 = sp + 48|0;
|
|
$$byval_copy5 = sp + 44|0;
|
|
$$byval_copy4 = sp + 40|0;
|
|
$$byval_copy3 = sp + 36|0;
|
|
$$byval_copy2 = sp + 32|0;
|
|
$$byval_copy = sp + 28|0;
|
|
$1 = $atlas;
|
|
$2 = $config;
|
|
$font = 0;
|
|
$3 = $1;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((15363|0),(13400|0),9570,(15512|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $2;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((14951|0),(13400|0),9571,(15512|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $1;
|
|
$8 = ((($7)) + 12|0);
|
|
$9 = ((($8)) + 4|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
___assert_fail((15530|0),(13400|0),9572,(15512|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $1;
|
|
$13 = ((($12)) + 12|0);
|
|
$14 = ((($13)) + 8|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($15|0)!=(0|0);
|
|
if (!($16)) {
|
|
___assert_fail((15553|0),(13400|0),9573,(15512|0));
|
|
// unreachable;
|
|
}
|
|
$17 = $1;
|
|
$18 = ((($17)) + 24|0);
|
|
$19 = ((($18)) + 4|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = ($20|0)!=(0|0);
|
|
if (!($21)) {
|
|
___assert_fail((15575|0),(13400|0),9574,(15512|0));
|
|
// unreachable;
|
|
}
|
|
$22 = $1;
|
|
$23 = ((($22)) + 24|0);
|
|
$24 = ((($23)) + 8|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = ($25|0)!=(0|0);
|
|
if (!($26)) {
|
|
___assert_fail((15598|0),(13400|0),9575,(15512|0));
|
|
// unreachable;
|
|
}
|
|
$27 = $2;
|
|
$28 = HEAP32[$27>>2]|0;
|
|
$29 = ($28|0)!=(0|0);
|
|
if (!($29)) {
|
|
___assert_fail((15620|0),(13400|0),9576,(15512|0));
|
|
// unreachable;
|
|
}
|
|
$30 = $2;
|
|
$31 = ((($30)) + 4|0);
|
|
$32 = HEAP32[$31>>2]|0;
|
|
$33 = ($32|0)!=(0);
|
|
if (!($33)) {
|
|
___assert_fail((15637|0),(13400|0),9577,(15512|0));
|
|
// unreachable;
|
|
}
|
|
$34 = $2;
|
|
$35 = ((($34)) + 16|0);
|
|
$36 = +HEAPF32[$35>>2];
|
|
$37 = $36 > 0.0;
|
|
if (!($37)) {
|
|
___assert_fail((15654|0),(13400|0),9578,(15512|0));
|
|
// unreachable;
|
|
}
|
|
$38 = $1;
|
|
$39 = ($38|0)!=(0|0);
|
|
$40 = $2;
|
|
$41 = ($40|0)!=(0|0);
|
|
$or$cond = $39 & $41;
|
|
if ($or$cond) {
|
|
$42 = $2;
|
|
$43 = HEAP32[$42>>2]|0;
|
|
$44 = ($43|0)!=(0|0);
|
|
if ($44) {
|
|
$45 = $2;
|
|
$46 = ((($45)) + 4|0);
|
|
$47 = HEAP32[$46>>2]|0;
|
|
$48 = ($47|0)!=(0);
|
|
if ($48) {
|
|
$49 = $2;
|
|
$50 = ((($49)) + 16|0);
|
|
$51 = +HEAPF32[$50>>2];
|
|
$52 = $51 <= 0.0;
|
|
if (!($52)) {
|
|
$53 = $1;
|
|
$54 = ((($53)) + 12|0);
|
|
$55 = ((($54)) + 4|0);
|
|
$56 = HEAP32[$55>>2]|0;
|
|
$57 = ($56|0)!=(0|0);
|
|
if ($57) {
|
|
$58 = $1;
|
|
$59 = ((($58)) + 12|0);
|
|
$60 = ((($59)) + 8|0);
|
|
$61 = HEAP32[$60>>2]|0;
|
|
$62 = ($61|0)!=(0|0);
|
|
if ($62) {
|
|
$63 = $1;
|
|
$64 = ((($63)) + 24|0);
|
|
$65 = ((($64)) + 4|0);
|
|
$66 = HEAP32[$65>>2]|0;
|
|
$67 = ($66|0)!=(0|0);
|
|
if ($67) {
|
|
$68 = $1;
|
|
$69 = ((($68)) + 24|0);
|
|
$70 = ((($69)) + 8|0);
|
|
$71 = HEAP32[$70>>2]|0;
|
|
$72 = ($71|0)!=(0|0);
|
|
if ($72) {
|
|
$73 = $2;
|
|
$74 = ((($73)) + 9|0);
|
|
$75 = HEAP8[$74>>0]|0;
|
|
$76 = ($75<<24>>24)!=(0);
|
|
$77 = $1;
|
|
do {
|
|
if ($76) {
|
|
$88 = ((($77)) + 64|0);
|
|
$89 = HEAP32[$88>>2]|0;
|
|
$90 = ($89|0)!=(0);
|
|
if ($90) {
|
|
$91 = $1;
|
|
$92 = ((($91)) + 64|0);
|
|
$93 = HEAP32[$92>>2]|0;
|
|
$94 = (($93) - 1)|0;
|
|
$95 = $1;
|
|
$96 = ((($95)) + 56|0);
|
|
$97 = HEAP32[$96>>2]|0;
|
|
$98 = (($97) + ($94<<2)|0);
|
|
$99 = HEAP32[$98>>2]|0;
|
|
$font = $99;
|
|
break;
|
|
} else {
|
|
___assert_fail((15674|0),(13400|0),9591,(15512|0));
|
|
// unreachable;
|
|
}
|
|
} else {
|
|
$78 = ((($77)) + 12|0);
|
|
$79 = ((($78)) + 4|0);
|
|
$80 = HEAP32[$79>>2]|0;
|
|
$81 = $1;
|
|
$82 = ((($81)) + 12|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$82>>2]|0;
|
|
$83 = (FUNCTION_TABLE_iiii[$80 & 7]($$byval_copy,0,68)|0);
|
|
$font = $83;
|
|
$84 = $font;
|
|
$85 = ($84|0)!=(0|0);
|
|
if (!($85)) {
|
|
___assert_fail((14249|0),(13400|0),9588,(15512|0));
|
|
// unreachable;
|
|
}
|
|
$86 = $font;
|
|
$87 = ($86|0)!=(0|0);
|
|
if ($87) {
|
|
break;
|
|
}
|
|
$0 = 0;
|
|
$271 = $0;
|
|
STACKTOP = sp;return ($271|0);
|
|
}
|
|
} while(0);
|
|
$100 = $1;
|
|
$101 = ((($100)) + 60|0);
|
|
$102 = HEAP32[$101>>2]|0;
|
|
$103 = ($102|0)!=(0|0);
|
|
if ($103) {
|
|
$104 = $1;
|
|
$105 = ((($104)) + 64|0);
|
|
$106 = HEAP32[$105>>2]|0;
|
|
$107 = $1;
|
|
$108 = ((($107)) + 68|0);
|
|
$109 = HEAP32[$108>>2]|0;
|
|
$110 = ($106|0)>=($109|0);
|
|
if ($110) {
|
|
label = 38;
|
|
}
|
|
} else {
|
|
label = 38;
|
|
}
|
|
do {
|
|
if ((label|0) == 38) {
|
|
$111 = $1;
|
|
$112 = ((($111)) + 60|0);
|
|
$113 = HEAP32[$112>>2]|0;
|
|
$114 = ($113|0)!=(0|0);
|
|
if ($114) {
|
|
$115 = $1;
|
|
$116 = ((($115)) + 68|0);
|
|
$117 = HEAP32[$116>>2]|0;
|
|
$118 = (+($117|0));
|
|
$119 = $118 * 2.7000000476837158;
|
|
$120 = (~~(($119)));
|
|
$123 = $120;
|
|
} else {
|
|
$123 = 32;
|
|
}
|
|
$121 = $1;
|
|
$122 = ((($121)) + 68|0);
|
|
HEAP32[$122>>2] = $123;
|
|
$124 = $1;
|
|
$125 = ((($124)) + 12|0);
|
|
$126 = ((($125)) + 4|0);
|
|
$127 = HEAP32[$126>>2]|0;
|
|
$128 = $1;
|
|
$129 = ((($128)) + 12|0);
|
|
$130 = $1;
|
|
$131 = ((($130)) + 68|0);
|
|
$132 = HEAP32[$131>>2]|0;
|
|
$133 = $132<<2;
|
|
;HEAP32[$$byval_copy2>>2]=HEAP32[$129>>2]|0;
|
|
$134 = (FUNCTION_TABLE_iiii[$127 & 7]($$byval_copy2,0,$133)|0);
|
|
$tmp_font = $134;
|
|
$135 = $1;
|
|
$136 = ((($135)) + 12|0);
|
|
$137 = ((($136)) + 4|0);
|
|
$138 = HEAP32[$137>>2]|0;
|
|
$139 = $1;
|
|
$140 = ((($139)) + 12|0);
|
|
$141 = $1;
|
|
$142 = ((($141)) + 68|0);
|
|
$143 = HEAP32[$142>>2]|0;
|
|
$144 = ($143*44)|0;
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$140>>2]|0;
|
|
$145 = (FUNCTION_TABLE_iiii[$138 & 7]($$byval_copy3,0,$144)|0);
|
|
$tmp_config = $145;
|
|
$146 = $1;
|
|
$147 = ((($146)) + 60|0);
|
|
$148 = HEAP32[$147>>2]|0;
|
|
$149 = ($148|0)!=(0|0);
|
|
$150 = $tmp_font;
|
|
if ($149) {
|
|
$156 = $1;
|
|
$157 = ((($156)) + 56|0);
|
|
$158 = HEAP32[$157>>2]|0;
|
|
$159 = $1;
|
|
$160 = ((($159)) + 64|0);
|
|
$161 = HEAP32[$160>>2]|0;
|
|
$162 = $161<<2;
|
|
(_nk_memcopy($150,$158,$162)|0);
|
|
$163 = $tmp_config;
|
|
$164 = $1;
|
|
$165 = ((($164)) + 60|0);
|
|
$166 = HEAP32[$165>>2]|0;
|
|
$167 = $1;
|
|
$168 = ((($167)) + 64|0);
|
|
$169 = HEAP32[$168>>2]|0;
|
|
$170 = ($169*44)|0;
|
|
(_nk_memcopy($163,$166,$170)|0);
|
|
$171 = $1;
|
|
$172 = ((($171)) + 12|0);
|
|
$173 = ((($172)) + 8|0);
|
|
$174 = HEAP32[$173>>2]|0;
|
|
$175 = $1;
|
|
$176 = ((($175)) + 12|0);
|
|
$177 = $1;
|
|
$178 = ((($177)) + 56|0);
|
|
$179 = HEAP32[$178>>2]|0;
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$176>>2]|0;
|
|
FUNCTION_TABLE_vii[$174 & 31]($$byval_copy4,$179);
|
|
$180 = $1;
|
|
$181 = ((($180)) + 12|0);
|
|
$182 = ((($181)) + 8|0);
|
|
$183 = HEAP32[$182>>2]|0;
|
|
$184 = $1;
|
|
$185 = ((($184)) + 12|0);
|
|
$186 = $1;
|
|
$187 = ((($186)) + 60|0);
|
|
$188 = HEAP32[$187>>2]|0;
|
|
;HEAP32[$$byval_copy5>>2]=HEAP32[$185>>2]|0;
|
|
FUNCTION_TABLE_vii[$183 & 31]($$byval_copy5,$188);
|
|
$189 = $tmp_font;
|
|
$190 = $1;
|
|
$191 = ((($190)) + 56|0);
|
|
HEAP32[$191>>2] = $189;
|
|
$192 = $tmp_config;
|
|
$193 = $1;
|
|
$194 = ((($193)) + 60|0);
|
|
HEAP32[$194>>2] = $192;
|
|
break;
|
|
} else {
|
|
$151 = $1;
|
|
$152 = ((($151)) + 56|0);
|
|
HEAP32[$152>>2] = $150;
|
|
$153 = $tmp_config;
|
|
$154 = $1;
|
|
$155 = ((($154)) + 60|0);
|
|
HEAP32[$155>>2] = $153;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$195 = $1;
|
|
$196 = ((($195)) + 64|0);
|
|
$197 = HEAP32[$196>>2]|0;
|
|
$198 = $1;
|
|
$199 = ((($198)) + 60|0);
|
|
$200 = HEAP32[$199>>2]|0;
|
|
$201 = (($200) + (($197*44)|0)|0);
|
|
$202 = $2;
|
|
dest=$201; src=$202; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
|
|
$203 = $2;
|
|
$204 = ((($203)) + 9|0);
|
|
$205 = HEAP8[$204>>0]|0;
|
|
$206 = ($205<<24>>24)!=(0);
|
|
if (!($206)) {
|
|
$207 = $font;
|
|
$208 = $1;
|
|
$209 = ((($208)) + 64|0);
|
|
$210 = HEAP32[$209>>2]|0;
|
|
$211 = $1;
|
|
$212 = ((($211)) + 56|0);
|
|
$213 = HEAP32[$212>>2]|0;
|
|
$214 = (($213) + ($210<<2)|0);
|
|
HEAP32[$214>>2] = $207;
|
|
$215 = $font;
|
|
$216 = ((($215)) + 20|0);
|
|
$217 = $1;
|
|
$218 = ((($217)) + 64|0);
|
|
$219 = HEAP32[$218>>2]|0;
|
|
$220 = $1;
|
|
$221 = ((($220)) + 60|0);
|
|
$222 = HEAP32[$221>>2]|0;
|
|
$223 = (($222) + (($219*44)|0)|0);
|
|
$224 = ((($223)) + 36|0);
|
|
HEAP32[$224>>2] = $216;
|
|
}
|
|
$225 = $2;
|
|
$226 = ((($225)) + 8|0);
|
|
$227 = HEAP8[$226>>0]|0;
|
|
$228 = ($227<<24>>24)!=(0);
|
|
do {
|
|
if (!($228)) {
|
|
$229 = $1;
|
|
$230 = ((($229)) + 64|0);
|
|
$231 = HEAP32[$230>>2]|0;
|
|
$232 = $1;
|
|
$233 = ((($232)) + 60|0);
|
|
$234 = HEAP32[$233>>2]|0;
|
|
$235 = (($234) + (($231*44)|0)|0);
|
|
$c = $235;
|
|
$236 = $1;
|
|
$237 = ((($236)) + 12|0);
|
|
$238 = ((($237)) + 4|0);
|
|
$239 = HEAP32[$238>>2]|0;
|
|
$240 = $1;
|
|
$241 = ((($240)) + 12|0);
|
|
$242 = $c;
|
|
$243 = ((($242)) + 4|0);
|
|
$244 = HEAP32[$243>>2]|0;
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$241>>2]|0;
|
|
$245 = (FUNCTION_TABLE_iiii[$239 & 7]($$byval_copy6,0,$244)|0);
|
|
$246 = $c;
|
|
HEAP32[$246>>2] = $245;
|
|
$247 = $c;
|
|
$248 = HEAP32[$247>>2]|0;
|
|
$249 = ($248|0)!=(0|0);
|
|
if (!($249)) {
|
|
___assert_fail((15690|0),(13400|0),9633,(15512|0));
|
|
// unreachable;
|
|
}
|
|
$250 = $c;
|
|
$251 = HEAP32[$250>>2]|0;
|
|
$252 = ($251|0)!=(0|0);
|
|
if ($252) {
|
|
$257 = $c;
|
|
$258 = HEAP32[$257>>2]|0;
|
|
$259 = $2;
|
|
$260 = HEAP32[$259>>2]|0;
|
|
$261 = $c;
|
|
$262 = ((($261)) + 4|0);
|
|
$263 = HEAP32[$262>>2]|0;
|
|
(_nk_memcopy($258,$260,$263)|0);
|
|
$264 = $c;
|
|
$265 = ((($264)) + 8|0);
|
|
HEAP8[$265>>0] = 1;
|
|
break;
|
|
}
|
|
$253 = $1;
|
|
$254 = ((($253)) + 64|0);
|
|
$255 = HEAP32[$254>>2]|0;
|
|
$256 = (($255) + 1)|0;
|
|
HEAP32[$254>>2] = $256;
|
|
$0 = 0;
|
|
$271 = $0;
|
|
STACKTOP = sp;return ($271|0);
|
|
}
|
|
} while(0);
|
|
$266 = $1;
|
|
$267 = ((($266)) + 64|0);
|
|
$268 = HEAP32[$267>>2]|0;
|
|
$269 = (($268) + 1)|0;
|
|
HEAP32[$267>>2] = $269;
|
|
$270 = $font;
|
|
$0 = $270;
|
|
$271 = $0;
|
|
STACKTOP = sp;return ($271|0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$271 = $0;
|
|
STACKTOP = sp;return ($271|0);
|
|
}
|
|
function _nk_font_atlas_add_compressed($atlas,$compressed_data,$compressed_size,$height,$config) {
|
|
$atlas = $atlas|0;
|
|
$compressed_data = $compressed_data|0;
|
|
$compressed_size = $compressed_size|0;
|
|
$height = +$height;
|
|
$config = $config|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
|
|
var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
|
|
var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0, $78 = 0, $79 = 0, $8 = 0;
|
|
var $80 = 0, $81 = 0.0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $9 = 0, $cfg = 0, $decompressed_data = 0, $decompressed_size = 0, $or$cond = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 120|0;
|
|
$cfg = sp + 44|0;
|
|
$6 = sp;
|
|
$1 = $atlas;
|
|
$2 = $compressed_data;
|
|
$3 = $compressed_size;
|
|
$4 = $height;
|
|
$5 = $config;
|
|
$7 = $2;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((15702|0),(13400|0),9705,(15718|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $3;
|
|
$10 = ($9|0)!=(0);
|
|
if (!($10)) {
|
|
___assert_fail((15747|0),(13400|0),9706,(15718|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $1;
|
|
$12 = ($11|0)!=(0|0);
|
|
if (!($12)) {
|
|
___assert_fail((15363|0),(13400|0),9707,(15718|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $1;
|
|
$14 = ((($13)) + 24|0);
|
|
$15 = ((($14)) + 4|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = ($16|0)!=(0|0);
|
|
if (!($17)) {
|
|
___assert_fail((15575|0),(13400|0),9708,(15718|0));
|
|
// unreachable;
|
|
}
|
|
$18 = $1;
|
|
$19 = ((($18)) + 24|0);
|
|
$20 = ((($19)) + 8|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = ($21|0)!=(0|0);
|
|
if (!($22)) {
|
|
___assert_fail((15598|0),(13400|0),9709,(15718|0));
|
|
// unreachable;
|
|
}
|
|
$23 = $1;
|
|
$24 = ((($23)) + 12|0);
|
|
$25 = ((($24)) + 4|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$27 = ($26|0)!=(0|0);
|
|
if (!($27)) {
|
|
___assert_fail((15530|0),(13400|0),9710,(15718|0));
|
|
// unreachable;
|
|
}
|
|
$28 = $1;
|
|
$29 = ((($28)) + 12|0);
|
|
$30 = ((($29)) + 8|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = ($31|0)!=(0|0);
|
|
if (!($32)) {
|
|
___assert_fail((15553|0),(13400|0),9711,(15718|0));
|
|
// unreachable;
|
|
}
|
|
$33 = $1;
|
|
$34 = ($33|0)!=(0|0);
|
|
$35 = $2;
|
|
$36 = ($35|0)!=(0|0);
|
|
$or$cond = $34 & $36;
|
|
if ($or$cond) {
|
|
$37 = $1;
|
|
$38 = ((($37)) + 24|0);
|
|
$39 = ((($38)) + 4|0);
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$41 = ($40|0)!=(0|0);
|
|
if ($41) {
|
|
$42 = $1;
|
|
$43 = ((($42)) + 24|0);
|
|
$44 = ((($43)) + 8|0);
|
|
$45 = HEAP32[$44>>2]|0;
|
|
$46 = ($45|0)!=(0|0);
|
|
if ($46) {
|
|
$47 = $1;
|
|
$48 = ((($47)) + 12|0);
|
|
$49 = ((($48)) + 4|0);
|
|
$50 = HEAP32[$49>>2]|0;
|
|
$51 = ($50|0)!=(0|0);
|
|
if ($51) {
|
|
$52 = $1;
|
|
$53 = ((($52)) + 12|0);
|
|
$54 = ((($53)) + 8|0);
|
|
$55 = HEAP32[$54>>2]|0;
|
|
$56 = ($55|0)!=(0|0);
|
|
if ($56) {
|
|
$57 = $2;
|
|
$58 = (_nk_decompress_length($57)|0);
|
|
$decompressed_size = $58;
|
|
$59 = $1;
|
|
$60 = ((($59)) + 12|0);
|
|
$61 = ((($60)) + 4|0);
|
|
$62 = HEAP32[$61>>2]|0;
|
|
$63 = $1;
|
|
$64 = ((($63)) + 12|0);
|
|
$65 = $decompressed_size;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$64>>2]|0;
|
|
$66 = (FUNCTION_TABLE_iiii[$62 & 7]($$byval_copy,0,$65)|0);
|
|
$decompressed_data = $66;
|
|
$67 = $decompressed_data;
|
|
$68 = ($67|0)!=(0|0);
|
|
if (!($68)) {
|
|
___assert_fail((15763|0),(13400|0),9718,(15718|0));
|
|
// unreachable;
|
|
}
|
|
$69 = $decompressed_data;
|
|
$70 = ($69|0)!=(0|0);
|
|
if (!($70)) {
|
|
$0 = 0;
|
|
$86 = $0;
|
|
STACKTOP = sp;return ($86|0);
|
|
}
|
|
$71 = $decompressed_data;
|
|
$72 = $2;
|
|
$73 = $3;
|
|
(_nk_decompress($71,$72,$73)|0);
|
|
$74 = $5;
|
|
$75 = ($74|0)!=(0|0);
|
|
if ($75) {
|
|
$76 = $5;
|
|
dest=$cfg; src=$76; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
|
|
} else {
|
|
$77 = $4;
|
|
_nk_font_config($6,$77);
|
|
dest=$cfg; src=$6; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
|
|
}
|
|
$78 = $decompressed_data;
|
|
HEAP32[$cfg>>2] = $78;
|
|
$79 = $decompressed_size;
|
|
$80 = ((($cfg)) + 4|0);
|
|
HEAP32[$80>>2] = $79;
|
|
$81 = $4;
|
|
$82 = ((($cfg)) + 16|0);
|
|
HEAPF32[$82>>2] = $81;
|
|
$83 = ((($cfg)) + 8|0);
|
|
HEAP8[$83>>0] = 1;
|
|
$84 = $1;
|
|
$85 = (_nk_font_atlas_add($84,$cfg)|0);
|
|
$0 = $85;
|
|
$86 = $0;
|
|
STACKTOP = sp;return ($86|0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$86 = $0;
|
|
STACKTOP = sp;return ($86|0);
|
|
}
|
|
function _nk_decompress_length($input) {
|
|
$input = $input|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
|
|
var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $input;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 8|0);
|
|
$3 = HEAP8[$2>>0]|0;
|
|
$4 = $3&255;
|
|
$5 = $4 << 24;
|
|
$6 = $0;
|
|
$7 = ((($6)) + 9|0);
|
|
$8 = HEAP8[$7>>0]|0;
|
|
$9 = $8&255;
|
|
$10 = $9 << 16;
|
|
$11 = (($5) + ($10))|0;
|
|
$12 = $0;
|
|
$13 = ((($12)) + 10|0);
|
|
$14 = HEAP8[$13>>0]|0;
|
|
$15 = $14&255;
|
|
$16 = $15 << 8;
|
|
$17 = (($11) + ($16))|0;
|
|
$18 = $0;
|
|
$19 = ((($18)) + 11|0);
|
|
$20 = HEAP8[$19>>0]|0;
|
|
$21 = $20&255;
|
|
$22 = (($17) + ($21))|0;
|
|
STACKTOP = sp;return ($22|0);
|
|
}
|
|
function _nk_decompress($output,$i,$length) {
|
|
$output = $output|0;
|
|
$i = $i|0;
|
|
$length = $length|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0;
|
|
var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0;
|
|
var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0;
|
|
var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0;
|
|
var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0;
|
|
var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $old_i = 0, $olen = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $output;
|
|
$2 = $i;
|
|
$3 = $length;
|
|
$4 = $2;
|
|
$5 = HEAP8[$4>>0]|0;
|
|
$6 = $5&255;
|
|
$7 = $6 << 24;
|
|
$8 = $2;
|
|
$9 = ((($8)) + 1|0);
|
|
$10 = HEAP8[$9>>0]|0;
|
|
$11 = $10&255;
|
|
$12 = $11 << 16;
|
|
$13 = $2;
|
|
$14 = ((($13)) + 2|0);
|
|
$15 = HEAP8[$14>>0]|0;
|
|
$16 = $15&255;
|
|
$17 = $16 << 8;
|
|
$18 = $2;
|
|
$19 = ((($18)) + 3|0);
|
|
$20 = HEAP8[$19>>0]|0;
|
|
$21 = $20&255;
|
|
$22 = (($17) + ($21))|0;
|
|
$23 = (($12) + ($22))|0;
|
|
$24 = (($7) + ($23))|0;
|
|
$25 = ($24|0)!=(1471938560);
|
|
if ($25) {
|
|
$0 = 0;
|
|
$124 = $0;
|
|
STACKTOP = sp;return ($124|0);
|
|
}
|
|
$26 = $2;
|
|
$27 = ((($26)) + 4|0);
|
|
$28 = HEAP8[$27>>0]|0;
|
|
$29 = $28&255;
|
|
$30 = $29 << 24;
|
|
$31 = $2;
|
|
$32 = ((($31)) + 5|0);
|
|
$33 = HEAP8[$32>>0]|0;
|
|
$34 = $33&255;
|
|
$35 = $34 << 16;
|
|
$36 = $2;
|
|
$37 = ((($36)) + 6|0);
|
|
$38 = HEAP8[$37>>0]|0;
|
|
$39 = $38&255;
|
|
$40 = $39 << 8;
|
|
$41 = $2;
|
|
$42 = ((($41)) + 7|0);
|
|
$43 = HEAP8[$42>>0]|0;
|
|
$44 = $43&255;
|
|
$45 = (($40) + ($44))|0;
|
|
$46 = (($35) + ($45))|0;
|
|
$47 = (($30) + ($46))|0;
|
|
$48 = ($47|0)!=(0);
|
|
if ($48) {
|
|
$0 = 0;
|
|
$124 = $0;
|
|
STACKTOP = sp;return ($124|0);
|
|
}
|
|
$49 = $2;
|
|
$50 = (_nk_decompress_length($49)|0);
|
|
$olen = $50;
|
|
$51 = $2;
|
|
HEAP32[12588>>2] = $51;
|
|
$52 = $2;
|
|
$53 = $3;
|
|
$54 = (($52) + ($53)|0);
|
|
HEAP32[12592>>2] = $54;
|
|
$55 = $1;
|
|
$56 = $olen;
|
|
$57 = (($55) + ($56)|0);
|
|
HEAP32[12596>>2] = $57;
|
|
$58 = $1;
|
|
HEAP32[12600>>2] = $58;
|
|
$59 = $2;
|
|
$60 = ((($59)) + 16|0);
|
|
$2 = $60;
|
|
$61 = $1;
|
|
HEAP32[12604>>2] = $61;
|
|
while(1) {
|
|
$62 = $2;
|
|
$old_i = $62;
|
|
$63 = $2;
|
|
$64 = (_nk_decompress_token($63)|0);
|
|
$2 = $64;
|
|
$65 = $2;
|
|
$66 = $old_i;
|
|
$67 = ($65|0)==($66|0);
|
|
if ($67) {
|
|
label = 7;
|
|
break;
|
|
}
|
|
$114 = HEAP32[12604>>2]|0;
|
|
$115 = $1;
|
|
$116 = $olen;
|
|
$117 = (($115) + ($116)|0);
|
|
$118 = ($114>>>0)<=($117>>>0);
|
|
if (!($118)) {
|
|
label = 18;
|
|
break;
|
|
}
|
|
$119 = HEAP32[12604>>2]|0;
|
|
$120 = $1;
|
|
$121 = $olen;
|
|
$122 = (($120) + ($121)|0);
|
|
$123 = ($119>>>0)>($122>>>0);
|
|
if ($123) {
|
|
label = 20;
|
|
break;
|
|
}
|
|
}
|
|
if ((label|0) == 7) {
|
|
$68 = $2;
|
|
$69 = HEAP8[$68>>0]|0;
|
|
$70 = $69&255;
|
|
$71 = ($70|0)==(5);
|
|
if (!($71)) {
|
|
___assert_fail((30507|0),(13400|0),9444,(31098|0));
|
|
// unreachable;
|
|
}
|
|
$72 = $2;
|
|
$73 = ((($72)) + 1|0);
|
|
$74 = HEAP8[$73>>0]|0;
|
|
$75 = $74&255;
|
|
$76 = ($75|0)==(250);
|
|
if (!($76)) {
|
|
___assert_fail((30507|0),(13400|0),9444,(31098|0));
|
|
// unreachable;
|
|
}
|
|
$77 = HEAP32[12604>>2]|0;
|
|
$78 = $1;
|
|
$79 = $olen;
|
|
$80 = (($78) + ($79)|0);
|
|
$81 = ($77|0)==($80|0);
|
|
if (!($81)) {
|
|
___assert_fail((31072|0),(13400|0),9438,(31098|0));
|
|
// unreachable;
|
|
}
|
|
$82 = HEAP32[12604>>2]|0;
|
|
$83 = $1;
|
|
$84 = $olen;
|
|
$85 = (($83) + ($84)|0);
|
|
$86 = ($82|0)!=($85|0);
|
|
if ($86) {
|
|
$0 = 0;
|
|
$124 = $0;
|
|
STACKTOP = sp;return ($124|0);
|
|
}
|
|
$87 = $1;
|
|
$88 = $olen;
|
|
$89 = (_nk_adler32(1,$87,$88)|0);
|
|
$90 = $2;
|
|
$91 = ((($90)) + 2|0);
|
|
$92 = HEAP8[$91>>0]|0;
|
|
$93 = $92&255;
|
|
$94 = $93 << 24;
|
|
$95 = $2;
|
|
$96 = ((($95)) + 3|0);
|
|
$97 = HEAP8[$96>>0]|0;
|
|
$98 = $97&255;
|
|
$99 = $98 << 16;
|
|
$100 = $2;
|
|
$101 = ((($100)) + 4|0);
|
|
$102 = HEAP8[$101>>0]|0;
|
|
$103 = $102&255;
|
|
$104 = $103 << 8;
|
|
$105 = $2;
|
|
$106 = ((($105)) + 5|0);
|
|
$107 = HEAP8[$106>>0]|0;
|
|
$108 = $107&255;
|
|
$109 = (($104) + ($108))|0;
|
|
$110 = (($99) + ($109))|0;
|
|
$111 = (($94) + ($110))|0;
|
|
$112 = ($89|0)!=($111|0);
|
|
if ($112) {
|
|
$0 = 0;
|
|
$124 = $0;
|
|
STACKTOP = sp;return ($124|0);
|
|
} else {
|
|
$113 = $olen;
|
|
$0 = $113;
|
|
$124 = $0;
|
|
STACKTOP = sp;return ($124|0);
|
|
}
|
|
}
|
|
else if ((label|0) == 18) {
|
|
___assert_fail((31112|0),(13400|0),9448,(31098|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 20) {
|
|
$0 = 0;
|
|
$124 = $0;
|
|
STACKTOP = sp;return ($124|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_font_atlas_add_compressed_base85($atlas,$data_base85,$height,$config) {
|
|
$atlas = $atlas|0;
|
|
$data_base85 = $data_base85|0;
|
|
$height = +$height;
|
|
$config = $config|0;
|
|
var $$byval_copy = 0, $$byval_copy2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
|
|
var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
|
|
var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
|
|
var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0, $77 = 0, $78 = 0, $79 = 0;
|
|
var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $9 = 0, $compressed_data = 0, $compressed_size = 0, $font = 0, $or$cond = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy2 = sp + 36|0;
|
|
$$byval_copy = sp + 32|0;
|
|
$1 = $atlas;
|
|
$2 = $data_base85;
|
|
$3 = $height;
|
|
$4 = $config;
|
|
$5 = $2;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((15781|0),(13400|0),9739,(15793|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $1;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((15363|0),(13400|0),9740,(15793|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $1;
|
|
$10 = ((($9)) + 24|0);
|
|
$11 = ((($10)) + 4|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ($12|0)!=(0|0);
|
|
if (!($13)) {
|
|
___assert_fail((15575|0),(13400|0),9741,(15793|0));
|
|
// unreachable;
|
|
}
|
|
$14 = $1;
|
|
$15 = ((($14)) + 24|0);
|
|
$16 = ((($15)) + 8|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = ($17|0)!=(0|0);
|
|
if (!($18)) {
|
|
___assert_fail((15598|0),(13400|0),9742,(15793|0));
|
|
// unreachable;
|
|
}
|
|
$19 = $1;
|
|
$20 = ((($19)) + 12|0);
|
|
$21 = ((($20)) + 4|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = ($22|0)!=(0|0);
|
|
if (!($23)) {
|
|
___assert_fail((15530|0),(13400|0),9743,(15793|0));
|
|
// unreachable;
|
|
}
|
|
$24 = $1;
|
|
$25 = ((($24)) + 12|0);
|
|
$26 = ((($25)) + 8|0);
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = ($27|0)!=(0|0);
|
|
if (!($28)) {
|
|
___assert_fail((15553|0),(13400|0),9744,(15793|0));
|
|
// unreachable;
|
|
}
|
|
$29 = $1;
|
|
$30 = ($29|0)!=(0|0);
|
|
$31 = $2;
|
|
$32 = ($31|0)!=(0|0);
|
|
$or$cond = $30 & $32;
|
|
if ($or$cond) {
|
|
$33 = $1;
|
|
$34 = ((($33)) + 24|0);
|
|
$35 = ((($34)) + 4|0);
|
|
$36 = HEAP32[$35>>2]|0;
|
|
$37 = ($36|0)!=(0|0);
|
|
if ($37) {
|
|
$38 = $1;
|
|
$39 = ((($38)) + 24|0);
|
|
$40 = ((($39)) + 8|0);
|
|
$41 = HEAP32[$40>>2]|0;
|
|
$42 = ($41|0)!=(0|0);
|
|
if ($42) {
|
|
$43 = $1;
|
|
$44 = ((($43)) + 12|0);
|
|
$45 = ((($44)) + 4|0);
|
|
$46 = HEAP32[$45>>2]|0;
|
|
$47 = ($46|0)!=(0|0);
|
|
if ($47) {
|
|
$48 = $1;
|
|
$49 = ((($48)) + 12|0);
|
|
$50 = ((($49)) + 8|0);
|
|
$51 = HEAP32[$50>>2]|0;
|
|
$52 = ($51|0)!=(0|0);
|
|
if ($52) {
|
|
$53 = $2;
|
|
$54 = (_nk_strlen($53)|0);
|
|
$55 = (($54) + 4)|0;
|
|
$56 = (($55|0) / 5)&-1;
|
|
$57 = $56<<2;
|
|
$compressed_size = $57;
|
|
$58 = $1;
|
|
$59 = ((($58)) + 24|0);
|
|
$60 = ((($59)) + 4|0);
|
|
$61 = HEAP32[$60>>2]|0;
|
|
$62 = $1;
|
|
$63 = ((($62)) + 24|0);
|
|
$64 = $compressed_size;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$63>>2]|0;
|
|
$65 = (FUNCTION_TABLE_iiii[$61 & 7]($$byval_copy,0,$64)|0);
|
|
$compressed_data = $65;
|
|
$66 = $compressed_data;
|
|
$67 = ($66|0)!=(0|0);
|
|
if (!($67)) {
|
|
___assert_fail((15702|0),(13400|0),9751,(15793|0));
|
|
// unreachable;
|
|
}
|
|
$68 = $compressed_data;
|
|
$69 = ($68|0)!=(0|0);
|
|
if ($69) {
|
|
$70 = $compressed_data;
|
|
$71 = $2;
|
|
_nk_decode_85($70,$71);
|
|
$72 = $1;
|
|
$73 = $compressed_data;
|
|
$74 = $compressed_size;
|
|
$75 = $3;
|
|
$76 = $4;
|
|
$77 = (_nk_font_atlas_add_compressed($72,$73,$74,$75,$76)|0);
|
|
$font = $77;
|
|
$78 = $1;
|
|
$79 = ((($78)) + 24|0);
|
|
$80 = ((($79)) + 8|0);
|
|
$81 = HEAP32[$80>>2]|0;
|
|
$82 = $1;
|
|
$83 = ((($82)) + 24|0);
|
|
$84 = $compressed_data;
|
|
;HEAP32[$$byval_copy2>>2]=HEAP32[$83>>2]|0;
|
|
FUNCTION_TABLE_vii[$81 & 31]($$byval_copy2,$84);
|
|
$85 = $font;
|
|
$0 = $85;
|
|
$86 = $0;
|
|
STACKTOP = sp;return ($86|0);
|
|
} else {
|
|
$0 = 0;
|
|
$86 = $0;
|
|
STACKTOP = sp;return ($86|0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$86 = $0;
|
|
STACKTOP = sp;return ($86|0);
|
|
}
|
|
function _nk_decode_85($dst,$src) {
|
|
$dst = $dst|0;
|
|
$src = $src|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $tmp = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $dst;
|
|
$1 = $src;
|
|
while(1) {
|
|
$2 = $1;
|
|
$3 = HEAP8[$2>>0]|0;
|
|
$4 = ($3<<24>>24)!=(0);
|
|
if (!($4)) {
|
|
break;
|
|
}
|
|
$5 = $1;
|
|
$6 = HEAP8[$5>>0]|0;
|
|
$7 = (_nk_decode_85_byte($6)|0);
|
|
$8 = $1;
|
|
$9 = ((($8)) + 1|0);
|
|
$10 = HEAP8[$9>>0]|0;
|
|
$11 = (_nk_decode_85_byte($10)|0);
|
|
$12 = $1;
|
|
$13 = ((($12)) + 2|0);
|
|
$14 = HEAP8[$13>>0]|0;
|
|
$15 = (_nk_decode_85_byte($14)|0);
|
|
$16 = $1;
|
|
$17 = ((($16)) + 3|0);
|
|
$18 = HEAP8[$17>>0]|0;
|
|
$19 = (_nk_decode_85_byte($18)|0);
|
|
$20 = $1;
|
|
$21 = ((($20)) + 4|0);
|
|
$22 = HEAP8[$21>>0]|0;
|
|
$23 = (_nk_decode_85_byte($22)|0);
|
|
$24 = ($23*85)|0;
|
|
$25 = (($19) + ($24))|0;
|
|
$26 = ($25*85)|0;
|
|
$27 = (($15) + ($26))|0;
|
|
$28 = ($27*85)|0;
|
|
$29 = (($11) + ($28))|0;
|
|
$30 = ($29*85)|0;
|
|
$31 = (($7) + ($30))|0;
|
|
$tmp = $31;
|
|
$32 = $tmp;
|
|
$33 = $32 >>> 0;
|
|
$34 = $33 & 255;
|
|
$35 = $34&255;
|
|
$36 = $0;
|
|
HEAP8[$36>>0] = $35;
|
|
$37 = $tmp;
|
|
$38 = $37 >>> 8;
|
|
$39 = $38 & 255;
|
|
$40 = $39&255;
|
|
$41 = $0;
|
|
$42 = ((($41)) + 1|0);
|
|
HEAP8[$42>>0] = $40;
|
|
$43 = $tmp;
|
|
$44 = $43 >>> 16;
|
|
$45 = $44 & 255;
|
|
$46 = $45&255;
|
|
$47 = $0;
|
|
$48 = ((($47)) + 2|0);
|
|
HEAP8[$48>>0] = $46;
|
|
$49 = $tmp;
|
|
$50 = $49 >>> 24;
|
|
$51 = $50 & 255;
|
|
$52 = $51&255;
|
|
$53 = $0;
|
|
$54 = ((($53)) + 3|0);
|
|
HEAP8[$54>>0] = $52;
|
|
$55 = $1;
|
|
$56 = ((($55)) + 5|0);
|
|
$1 = $56;
|
|
$57 = $0;
|
|
$58 = ((($57)) + 4|0);
|
|
$0 = $58;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_font_atlas_add_default($atlas,$pixel_height,$config) {
|
|
$atlas = $atlas|0;
|
|
$pixel_height = +$pixel_height;
|
|
$config = $config|0;
|
|
var $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0;
|
|
var $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $atlas;
|
|
$1 = $pixel_height;
|
|
$2 = $config;
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((15363|0),(13400|0),9765,(15829|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $0;
|
|
$6 = ((($5)) + 24|0);
|
|
$7 = ((($6)) + 4|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
___assert_fail((15575|0),(13400|0),9766,(15829|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $0;
|
|
$11 = ((($10)) + 24|0);
|
|
$12 = ((($11)) + 8|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ($13|0)!=(0|0);
|
|
if (!($14)) {
|
|
___assert_fail((15598|0),(13400|0),9767,(15829|0));
|
|
// unreachable;
|
|
}
|
|
$15 = $0;
|
|
$16 = ((($15)) + 12|0);
|
|
$17 = ((($16)) + 4|0);
|
|
$18 = HEAP32[$17>>2]|0;
|
|
$19 = ($18|0)!=(0|0);
|
|
if (!($19)) {
|
|
___assert_fail((15530|0),(13400|0),9768,(15829|0));
|
|
// unreachable;
|
|
}
|
|
$20 = $0;
|
|
$21 = ((($20)) + 12|0);
|
|
$22 = ((($21)) + 8|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$24 = ($23|0)!=(0|0);
|
|
if ($24) {
|
|
$25 = $0;
|
|
$26 = $1;
|
|
$27 = $2;
|
|
$28 = (_nk_font_atlas_add_compressed_base85($25,15855,$26,$27)|0);
|
|
STACKTOP = sp;return ($28|0);
|
|
} else {
|
|
___assert_fail((15553|0),(13400|0),9769,(15829|0));
|
|
// unreachable;
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_font_atlas_bake($atlas,$width,$height,$fmt) {
|
|
$atlas = $atlas|0;
|
|
$width = $width|0;
|
|
$height = $height|0;
|
|
$fmt = $fmt|0;
|
|
var $$byval_copy = 0, $$byval_copy10 = 0, $$byval_copy11 = 0, $$byval_copy12 = 0, $$byval_copy13 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $$byval_copy7 = 0, $$byval_copy8 = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0;
|
|
var $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0;
|
|
var $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0;
|
|
var $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0;
|
|
var $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0;
|
|
var $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0;
|
|
var $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0;
|
|
var $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0;
|
|
var $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0.0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0;
|
|
var $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0;
|
|
var $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0;
|
|
var $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0;
|
|
var $304 = 0, $305 = 0, $306 = 0, $307 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0;
|
|
var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0;
|
|
var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0;
|
|
var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $custom_data = 0;
|
|
var $i = 0, $img_rgba = 0, $img_size = 0, $or$cond = 0, $or$cond3 = 0, $tmp = 0, $tmp_size = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy13 = sp + 84|0;
|
|
$$byval_copy12 = sp + 80|0;
|
|
$$byval_copy11 = sp + 76|0;
|
|
$$byval_copy10 = sp + 72|0;
|
|
$$byval_copy9 = sp + 68|0;
|
|
$$byval_copy8 = sp + 64|0;
|
|
$$byval_copy7 = sp + 60|0;
|
|
$$byval_copy6 = sp + 88|0;
|
|
$$byval_copy5 = sp + 56|0;
|
|
$$byval_copy4 = sp + 52|0;
|
|
$$byval_copy = sp + 48|0;
|
|
$tmp_size = sp + 16|0;
|
|
$img_size = sp + 12|0;
|
|
$5 = sp;
|
|
$1 = $atlas;
|
|
$2 = $width;
|
|
$3 = $height;
|
|
$4 = $fmt;
|
|
$i = 0;
|
|
$tmp = 0;
|
|
$6 = $2;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((15021|0),(13400|0),9783,(27836|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $3;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
___assert_fail((15027|0),(13400|0),9784,(27836|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $1;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
___assert_fail((15363|0),(13400|0),9785,(27836|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $1;
|
|
$13 = ((($12)) + 24|0);
|
|
$14 = ((($13)) + 4|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($15|0)!=(0|0);
|
|
if (!($16)) {
|
|
___assert_fail((15575|0),(13400|0),9786,(27836|0));
|
|
// unreachable;
|
|
}
|
|
$17 = $1;
|
|
$18 = ((($17)) + 24|0);
|
|
$19 = ((($18)) + 8|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = ($20|0)!=(0|0);
|
|
if (!($21)) {
|
|
___assert_fail((15598|0),(13400|0),9787,(27836|0));
|
|
// unreachable;
|
|
}
|
|
$22 = $1;
|
|
$23 = ((($22)) + 12|0);
|
|
$24 = ((($23)) + 4|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = ($25|0)!=(0|0);
|
|
if (!($26)) {
|
|
___assert_fail((15530|0),(13400|0),9788,(27836|0));
|
|
// unreachable;
|
|
}
|
|
$27 = $1;
|
|
$28 = ((($27)) + 12|0);
|
|
$29 = ((($28)) + 8|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$31 = ($30|0)!=(0|0);
|
|
if (!($31)) {
|
|
___assert_fail((15553|0),(13400|0),9789,(27836|0));
|
|
// unreachable;
|
|
}
|
|
$32 = $1;
|
|
$33 = ($32|0)!=(0|0);
|
|
$34 = $2;
|
|
$35 = ($34|0)!=(0|0);
|
|
$or$cond = $33 & $35;
|
|
$36 = $3;
|
|
$37 = ($36|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $37;
|
|
if ($or$cond3) {
|
|
$38 = $1;
|
|
$39 = ((($38)) + 24|0);
|
|
$40 = ((($39)) + 4|0);
|
|
$41 = HEAP32[$40>>2]|0;
|
|
$42 = ($41|0)!=(0|0);
|
|
if ($42) {
|
|
$43 = $1;
|
|
$44 = ((($43)) + 24|0);
|
|
$45 = ((($44)) + 8|0);
|
|
$46 = HEAP32[$45>>2]|0;
|
|
$47 = ($46|0)!=(0|0);
|
|
if ($47) {
|
|
$48 = $1;
|
|
$49 = ((($48)) + 12|0);
|
|
$50 = ((($49)) + 4|0);
|
|
$51 = HEAP32[$50>>2]|0;
|
|
$52 = ($51|0)!=(0|0);
|
|
if ($52) {
|
|
$53 = $1;
|
|
$54 = ((($53)) + 12|0);
|
|
$55 = ((($54)) + 8|0);
|
|
$56 = HEAP32[$55>>2]|0;
|
|
$57 = ($56|0)!=(0|0);
|
|
if ($57) {
|
|
$58 = $1;
|
|
$59 = ((($58)) + 64|0);
|
|
$60 = HEAP32[$59>>2]|0;
|
|
$61 = ($60|0)!=(0);
|
|
if (!($61)) {
|
|
$62 = $1;
|
|
$63 = (_nk_font_atlas_add_default($62,13.0,0)|0);
|
|
$64 = $1;
|
|
$65 = ((($64)) + 48|0);
|
|
HEAP32[$65>>2] = $63;
|
|
}
|
|
$66 = $1;
|
|
$67 = ((($66)) + 64|0);
|
|
$68 = HEAP32[$67>>2]|0;
|
|
$69 = ($68|0)!=(0);
|
|
if (!($69)) {
|
|
___assert_fail((15674|0),(13400|0),9800,(27836|0));
|
|
// unreachable;
|
|
}
|
|
$70 = $1;
|
|
$71 = ((($70)) + 64|0);
|
|
$72 = HEAP32[$71>>2]|0;
|
|
$73 = ($72|0)!=(0);
|
|
if (!($73)) {
|
|
$0 = 0;
|
|
$307 = $0;
|
|
STACKTOP = sp;return ($307|0);
|
|
}
|
|
$74 = $1;
|
|
$75 = ((($74)) + 44|0);
|
|
$76 = $1;
|
|
$77 = ((($76)) + 60|0);
|
|
$78 = HEAP32[$77>>2]|0;
|
|
$79 = $1;
|
|
$80 = ((($79)) + 64|0);
|
|
$81 = HEAP32[$80>>2]|0;
|
|
_nk_font_bake_memory($tmp_size,$75,$78,$81);
|
|
$82 = $1;
|
|
$83 = ((($82)) + 24|0);
|
|
$84 = ((($83)) + 4|0);
|
|
$85 = HEAP32[$84>>2]|0;
|
|
$86 = $1;
|
|
$87 = ((($86)) + 24|0);
|
|
$88 = HEAP32[$tmp_size>>2]|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$87>>2]|0;
|
|
$89 = (FUNCTION_TABLE_iiii[$85 & 7]($$byval_copy,0,$88)|0);
|
|
$tmp = $89;
|
|
$90 = $tmp;
|
|
$91 = ($90|0)!=(0|0);
|
|
if (!($91)) {
|
|
___assert_fail((27855|0),(13400|0),9806,(27836|0));
|
|
// unreachable;
|
|
}
|
|
$92 = $tmp;
|
|
$93 = ($92|0)!=(0|0);
|
|
do {
|
|
if ($93) {
|
|
$94 = $1;
|
|
$95 = ((($94)) + 12|0);
|
|
$96 = ((($95)) + 4|0);
|
|
$97 = HEAP32[$96>>2]|0;
|
|
$98 = $1;
|
|
$99 = ((($98)) + 12|0);
|
|
$100 = $1;
|
|
$101 = ((($100)) + 44|0);
|
|
$102 = HEAP32[$101>>2]|0;
|
|
$103 = ($102*48)|0;
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$99>>2]|0;
|
|
$104 = (FUNCTION_TABLE_iiii[$97 & 7]($$byval_copy4,0,$103)|0);
|
|
$105 = $1;
|
|
$106 = ((($105)) + 52|0);
|
|
HEAP32[$106>>2] = $104;
|
|
$107 = $1;
|
|
$108 = ((($107)) + 52|0);
|
|
$109 = HEAP32[$108>>2]|0;
|
|
$110 = ($109|0)!=(0|0);
|
|
if (!($110)) {
|
|
___assert_fail((27859|0),(13400|0),9813,(27836|0));
|
|
// unreachable;
|
|
}
|
|
$111 = $1;
|
|
$112 = ((($111)) + 52|0);
|
|
$113 = HEAP32[$112>>2]|0;
|
|
$114 = ($113|0)!=(0|0);
|
|
if (!($114)) {
|
|
break;
|
|
}
|
|
$115 = $1;
|
|
$116 = ((($115)) + 36|0);
|
|
$117 = ((($116)) + 4|0);
|
|
HEAP16[$117>>1] = 2;
|
|
$118 = $1;
|
|
$119 = ((($118)) + 36|0);
|
|
$120 = ((($119)) + 6|0);
|
|
HEAP16[$120>>1] = 2;
|
|
$121 = $2;
|
|
$122 = $3;
|
|
$123 = $1;
|
|
$124 = ((($123)) + 36|0);
|
|
$125 = $tmp;
|
|
$126 = HEAP32[$tmp_size>>2]|0;
|
|
$127 = $1;
|
|
$128 = ((($127)) + 60|0);
|
|
$129 = HEAP32[$128>>2]|0;
|
|
$130 = $1;
|
|
$131 = ((($130)) + 64|0);
|
|
$132 = HEAP32[$131>>2]|0;
|
|
$133 = $1;
|
|
$134 = ((($133)) + 24|0);
|
|
$135 = (_nk_font_bake_pack($img_size,$121,$122,$124,$125,$126,$129,$132,$134)|0);
|
|
$136 = ($135|0)!=(0);
|
|
if (!($136)) {
|
|
break;
|
|
}
|
|
$137 = $1;
|
|
$138 = ((($137)) + 24|0);
|
|
$139 = ((($138)) + 4|0);
|
|
$140 = HEAP32[$139>>2]|0;
|
|
$141 = $1;
|
|
$142 = ((($141)) + 24|0);
|
|
$143 = HEAP32[$img_size>>2]|0;
|
|
;HEAP32[$$byval_copy5>>2]=HEAP32[$142>>2]|0;
|
|
$144 = (FUNCTION_TABLE_iiii[$140 & 7]($$byval_copy5,0,$143)|0);
|
|
$145 = $1;
|
|
HEAP32[$145>>2] = $144;
|
|
$146 = $1;
|
|
$147 = HEAP32[$146>>2]|0;
|
|
$148 = ($147|0)!=(0|0);
|
|
if (!($148)) {
|
|
___assert_fail((27873|0),(13400|0),9825,(27836|0));
|
|
// unreachable;
|
|
}
|
|
$149 = $1;
|
|
$150 = HEAP32[$149>>2]|0;
|
|
$151 = ($150|0)!=(0|0);
|
|
if (!($151)) {
|
|
break;
|
|
}
|
|
$custom_data = 27886;
|
|
$152 = $1;
|
|
$153 = HEAP32[$152>>2]|0;
|
|
$154 = $2;
|
|
$155 = HEAP32[$154>>2]|0;
|
|
$156 = $3;
|
|
$157 = HEAP32[$156>>2]|0;
|
|
$158 = $tmp;
|
|
$159 = HEAP32[$tmp_size>>2]|0;
|
|
$160 = $1;
|
|
$161 = ((($160)) + 52|0);
|
|
$162 = HEAP32[$161>>2]|0;
|
|
$163 = $1;
|
|
$164 = ((($163)) + 44|0);
|
|
$165 = HEAP32[$164>>2]|0;
|
|
$166 = $1;
|
|
$167 = ((($166)) + 60|0);
|
|
$168 = HEAP32[$167>>2]|0;
|
|
$169 = $1;
|
|
$170 = ((($169)) + 64|0);
|
|
$171 = HEAP32[$170>>2]|0;
|
|
_nk_font_bake($153,$155,$157,$158,$159,$162,$165,$168,$171);
|
|
$172 = $1;
|
|
$173 = HEAP32[$172>>2]|0;
|
|
$174 = $2;
|
|
$175 = HEAP32[$174>>2]|0;
|
|
$176 = $3;
|
|
$177 = HEAP32[$176>>2]|0;
|
|
$178 = $1;
|
|
$179 = ((($178)) + 36|0);
|
|
$180 = $custom_data;
|
|
;HEAP16[$$byval_copy6>>1]=HEAP16[$179>>1]|0;HEAP16[$$byval_copy6+2>>1]=HEAP16[$179+2>>1]|0;HEAP16[$$byval_copy6+4>>1]=HEAP16[$179+4>>1]|0;HEAP16[$$byval_copy6+6>>1]=HEAP16[$179+6>>1]|0;
|
|
_nk_font_bake_custom_data($173,$175,$177,$$byval_copy6,$180,2,2,46,88);
|
|
$181 = $4;
|
|
$182 = ($181|0)==(1);
|
|
if ($182) {
|
|
$183 = $1;
|
|
$184 = ((($183)) + 24|0);
|
|
$185 = ((($184)) + 4|0);
|
|
$186 = HEAP32[$185>>2]|0;
|
|
$187 = $1;
|
|
$188 = ((($187)) + 24|0);
|
|
$189 = $2;
|
|
$190 = HEAP32[$189>>2]|0;
|
|
$191 = $3;
|
|
$192 = HEAP32[$191>>2]|0;
|
|
$193 = Math_imul($190, $192)|0;
|
|
$194 = $193<<2;
|
|
;HEAP32[$$byval_copy7>>2]=HEAP32[$188>>2]|0;
|
|
$195 = (FUNCTION_TABLE_iiii[$186 & 7]($$byval_copy7,0,$194)|0);
|
|
$img_rgba = $195;
|
|
$196 = $img_rgba;
|
|
$197 = ($196|0)!=(0|0);
|
|
if (!($197)) {
|
|
___assert_fail((27891|0),(13400|0),9840,(27836|0));
|
|
// unreachable;
|
|
}
|
|
$198 = $img_rgba;
|
|
$199 = ($198|0)!=(0|0);
|
|
if (!($199)) {
|
|
break;
|
|
}
|
|
$200 = $img_rgba;
|
|
$201 = $2;
|
|
$202 = HEAP32[$201>>2]|0;
|
|
$203 = $3;
|
|
$204 = HEAP32[$203>>2]|0;
|
|
$205 = $1;
|
|
$206 = HEAP32[$205>>2]|0;
|
|
_nk_font_bake_convert($200,$202,$204,$206);
|
|
$207 = $1;
|
|
$208 = ((($207)) + 24|0);
|
|
$209 = ((($208)) + 8|0);
|
|
$210 = HEAP32[$209>>2]|0;
|
|
$211 = $1;
|
|
$212 = ((($211)) + 24|0);
|
|
$213 = $1;
|
|
$214 = HEAP32[$213>>2]|0;
|
|
;HEAP32[$$byval_copy8>>2]=HEAP32[$212>>2]|0;
|
|
FUNCTION_TABLE_vii[$210 & 31]($$byval_copy8,$214);
|
|
$215 = $img_rgba;
|
|
$216 = $1;
|
|
HEAP32[$216>>2] = $215;
|
|
}
|
|
$217 = $2;
|
|
$218 = HEAP32[$217>>2]|0;
|
|
$219 = $1;
|
|
$220 = ((($219)) + 4|0);
|
|
HEAP32[$220>>2] = $218;
|
|
$221 = $3;
|
|
$222 = HEAP32[$221>>2]|0;
|
|
$223 = $1;
|
|
$224 = ((($223)) + 8|0);
|
|
HEAP32[$224>>2] = $222;
|
|
$i = 0;
|
|
while(1) {
|
|
$225 = $i;
|
|
$226 = $1;
|
|
$227 = ((($226)) + 64|0);
|
|
$228 = HEAP32[$227>>2]|0;
|
|
$229 = ($225|0)<($228|0);
|
|
if (!($229)) {
|
|
break;
|
|
}
|
|
$230 = $i;
|
|
$231 = $1;
|
|
$232 = ((($231)) + 56|0);
|
|
$233 = HEAP32[$232>>2]|0;
|
|
$234 = (($233) + ($230<<2)|0);
|
|
$235 = HEAP32[$234>>2]|0;
|
|
$236 = $i;
|
|
$237 = $1;
|
|
$238 = ((($237)) + 60|0);
|
|
$239 = HEAP32[$238>>2]|0;
|
|
$240 = (($239) + (($236*44)|0)|0);
|
|
$241 = ((($240)) + 16|0);
|
|
$242 = +HEAPF32[$241>>2];
|
|
$243 = $i;
|
|
$244 = $1;
|
|
$245 = ((($244)) + 60|0);
|
|
$246 = HEAP32[$245>>2]|0;
|
|
$247 = (($246) + (($243*44)|0)|0);
|
|
$248 = ((($247)) + 40|0);
|
|
$249 = HEAP32[$248>>2]|0;
|
|
$250 = $1;
|
|
$251 = ((($250)) + 52|0);
|
|
$252 = HEAP32[$251>>2]|0;
|
|
$253 = $i;
|
|
$254 = $1;
|
|
$255 = ((($254)) + 60|0);
|
|
$256 = HEAP32[$255>>2]|0;
|
|
$257 = (($256) + (($253*44)|0)|0);
|
|
$258 = ((($257)) + 36|0);
|
|
$259 = HEAP32[$258>>2]|0;
|
|
_nk_handle_ptr($5,0);
|
|
;HEAP32[$$byval_copy9>>2]=HEAP32[$5>>2]|0;
|
|
_nk_font_init($235,$242,$249,$252,$259,$$byval_copy9);
|
|
$260 = $i;
|
|
$261 = (($260) + 1)|0;
|
|
$i = $261;
|
|
}
|
|
$262 = $1;
|
|
$263 = ((($262)) + 24|0);
|
|
$264 = ((($263)) + 8|0);
|
|
$265 = HEAP32[$264>>2]|0;
|
|
$266 = $1;
|
|
$267 = ((($266)) + 24|0);
|
|
$268 = $tmp;
|
|
;HEAP32[$$byval_copy10>>2]=HEAP32[$267>>2]|0;
|
|
FUNCTION_TABLE_vii[$265 & 31]($$byval_copy10,$268);
|
|
$269 = $1;
|
|
$270 = HEAP32[$269>>2]|0;
|
|
$0 = $270;
|
|
$307 = $0;
|
|
STACKTOP = sp;return ($307|0);
|
|
}
|
|
} while(0);
|
|
$271 = $tmp;
|
|
$272 = ($271|0)!=(0|0);
|
|
if ($272) {
|
|
$273 = $1;
|
|
$274 = ((($273)) + 24|0);
|
|
$275 = ((($274)) + 8|0);
|
|
$276 = HEAP32[$275>>2]|0;
|
|
$277 = $1;
|
|
$278 = ((($277)) + 24|0);
|
|
$279 = $tmp;
|
|
;HEAP32[$$byval_copy11>>2]=HEAP32[$278>>2]|0;
|
|
FUNCTION_TABLE_vii[$276 & 31]($$byval_copy11,$279);
|
|
}
|
|
$280 = $1;
|
|
$281 = ((($280)) + 52|0);
|
|
$282 = HEAP32[$281>>2]|0;
|
|
$283 = ($282|0)!=(0|0);
|
|
if ($283) {
|
|
$284 = $1;
|
|
$285 = ((($284)) + 12|0);
|
|
$286 = ((($285)) + 8|0);
|
|
$287 = HEAP32[$286>>2]|0;
|
|
$288 = $1;
|
|
$289 = ((($288)) + 12|0);
|
|
$290 = $1;
|
|
$291 = ((($290)) + 52|0);
|
|
$292 = HEAP32[$291>>2]|0;
|
|
;HEAP32[$$byval_copy12>>2]=HEAP32[$289>>2]|0;
|
|
FUNCTION_TABLE_vii[$287 & 31]($$byval_copy12,$292);
|
|
$293 = $1;
|
|
$294 = ((($293)) + 52|0);
|
|
HEAP32[$294>>2] = 0;
|
|
}
|
|
$295 = $1;
|
|
$296 = HEAP32[$295>>2]|0;
|
|
$297 = ($296|0)!=(0|0);
|
|
if ($297) {
|
|
$298 = $1;
|
|
$299 = ((($298)) + 24|0);
|
|
$300 = ((($299)) + 8|0);
|
|
$301 = HEAP32[$300>>2]|0;
|
|
$302 = $1;
|
|
$303 = ((($302)) + 24|0);
|
|
$304 = $1;
|
|
$305 = HEAP32[$304>>2]|0;
|
|
;HEAP32[$$byval_copy13>>2]=HEAP32[$303>>2]|0;
|
|
FUNCTION_TABLE_vii[$301 & 31]($$byval_copy13,$305);
|
|
$306 = $1;
|
|
HEAP32[$306>>2] = 0;
|
|
}
|
|
$0 = 0;
|
|
$307 = $0;
|
|
STACKTOP = sp;return ($307|0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$307 = $0;
|
|
STACKTOP = sp;return ($307|0);
|
|
}
|
|
function _nk_font_atlas_end($atlas,$texture,$null) {
|
|
$atlas = $atlas|0;
|
|
$texture = $texture|0;
|
|
$null = $null|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0;
|
|
var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
|
|
var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0;
|
|
var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $9 = 0, $i = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 28|0;
|
|
$2 = sp + 8|0;
|
|
$3 = sp;
|
|
$0 = $atlas;
|
|
$1 = $null;
|
|
$i = 0;
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((15363|0),(13400|0),9879,(27900|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $0;
|
|
$7 = ($6|0)!=(0|0);
|
|
do {
|
|
if (!($7)) {
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
if ($9) {
|
|
$10 = $1;
|
|
;HEAP32[$10>>2]=HEAP32[$texture>>2]|0;
|
|
$11 = $1;
|
|
$12 = ((($11)) + 4|0);
|
|
_nk_vec2($2,0.5,0.5);
|
|
;HEAP32[$12>>2]=HEAP32[$2>>2]|0;HEAP32[$12+4>>2]=HEAP32[$2+4>>2]|0;
|
|
break;
|
|
} else {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
} while(0);
|
|
$13 = $1;
|
|
$14 = ($13|0)!=(0|0);
|
|
if ($14) {
|
|
$15 = $1;
|
|
;HEAP32[$15>>2]=HEAP32[$texture>>2]|0;
|
|
$16 = $1;
|
|
$17 = ((($16)) + 4|0);
|
|
$18 = $0;
|
|
$19 = ((($18)) + 36|0);
|
|
$20 = HEAP16[$19>>1]|0;
|
|
$21 = $20 << 16 >> 16;
|
|
$22 = (+($21|0));
|
|
$23 = $22 + 0.5;
|
|
$24 = $0;
|
|
$25 = ((($24)) + 4|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$27 = (+($26|0));
|
|
$28 = $23 / $27;
|
|
$29 = $0;
|
|
$30 = ((($29)) + 36|0);
|
|
$31 = ((($30)) + 2|0);
|
|
$32 = HEAP16[$31>>1]|0;
|
|
$33 = $32 << 16 >> 16;
|
|
$34 = (+($33|0));
|
|
$35 = $34 + 0.5;
|
|
$36 = $0;
|
|
$37 = ((($36)) + 8|0);
|
|
$38 = HEAP32[$37>>2]|0;
|
|
$39 = (+($38|0));
|
|
$40 = $35 / $39;
|
|
_nk_vec2($3,$28,$40);
|
|
;HEAP32[$17>>2]=HEAP32[$3>>2]|0;HEAP32[$17+4>>2]=HEAP32[$3+4>>2]|0;
|
|
}
|
|
$i = 0;
|
|
while(1) {
|
|
$41 = $i;
|
|
$42 = $0;
|
|
$43 = ((($42)) + 64|0);
|
|
$44 = HEAP32[$43>>2]|0;
|
|
$45 = ($41|0)<($44|0);
|
|
if (!($45)) {
|
|
break;
|
|
}
|
|
$46 = $i;
|
|
$47 = $0;
|
|
$48 = ((($47)) + 56|0);
|
|
$49 = HEAP32[$48>>2]|0;
|
|
$50 = (($49) + ($46<<2)|0);
|
|
$51 = HEAP32[$50>>2]|0;
|
|
$52 = ((($51)) + 60|0);
|
|
;HEAP32[$52>>2]=HEAP32[$texture>>2]|0;
|
|
$53 = $i;
|
|
$54 = $0;
|
|
$55 = ((($54)) + 56|0);
|
|
$56 = HEAP32[$55>>2]|0;
|
|
$57 = (($56) + ($53<<2)|0);
|
|
$58 = HEAP32[$57>>2]|0;
|
|
$59 = ((($58)) + 16|0);
|
|
;HEAP32[$59>>2]=HEAP32[$texture>>2]|0;
|
|
$60 = $i;
|
|
$61 = (($60) + 1)|0;
|
|
$i = $61;
|
|
}
|
|
$62 = $0;
|
|
$63 = ((($62)) + 24|0);
|
|
$64 = ((($63)) + 8|0);
|
|
$65 = HEAP32[$64>>2]|0;
|
|
$66 = $0;
|
|
$67 = ((($66)) + 24|0);
|
|
$68 = $0;
|
|
$69 = HEAP32[$68>>2]|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$67>>2]|0;
|
|
FUNCTION_TABLE_vii[$65 & 31]($$byval_copy,$69);
|
|
$70 = $0;
|
|
HEAP32[$70>>2] = 0;
|
|
$71 = $0;
|
|
$72 = ((($71)) + 4|0);
|
|
HEAP32[$72>>2] = 0;
|
|
$73 = $0;
|
|
$74 = ((($73)) + 8|0);
|
|
HEAP32[$74>>2] = 0;
|
|
$75 = $0;
|
|
$76 = ((($75)) + 36|0);
|
|
HEAP16[$76>>1] = 0;
|
|
$77 = $0;
|
|
$78 = ((($77)) + 36|0);
|
|
$79 = ((($78)) + 2|0);
|
|
HEAP16[$79>>1] = 0;
|
|
$80 = $0;
|
|
$81 = ((($80)) + 36|0);
|
|
$82 = ((($81)) + 4|0);
|
|
HEAP16[$82>>1] = 0;
|
|
$83 = $0;
|
|
$84 = ((($83)) + 36|0);
|
|
$85 = ((($84)) + 6|0);
|
|
HEAP16[$85>>1] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_font_atlas_clear($atlas) {
|
|
$atlas = $atlas|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0;
|
|
var $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0;
|
|
var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0;
|
|
var $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0;
|
|
var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0;
|
|
var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $i = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy4 = sp + 24|0;
|
|
$$byval_copy3 = sp + 20|0;
|
|
$$byval_copy2 = sp + 16|0;
|
|
$$byval_copy1 = sp + 12|0;
|
|
$$byval_copy = sp + 8|0;
|
|
$0 = $atlas;
|
|
$i = 0;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((15363|0),(13400|0),9911,(27918|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ((($3)) + 24|0);
|
|
$5 = ((($4)) + 4|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((15575|0),(13400|0),9912,(27918|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $0;
|
|
$9 = ((($8)) + 24|0);
|
|
$10 = ((($9)) + 8|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = ($11|0)!=(0|0);
|
|
if (!($12)) {
|
|
___assert_fail((15598|0),(13400|0),9913,(27918|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $0;
|
|
$14 = ((($13)) + 12|0);
|
|
$15 = ((($14)) + 4|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = ($16|0)!=(0|0);
|
|
if (!($17)) {
|
|
___assert_fail((15530|0),(13400|0),9914,(27918|0));
|
|
// unreachable;
|
|
}
|
|
$18 = $0;
|
|
$19 = ((($18)) + 12|0);
|
|
$20 = ((($19)) + 8|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = ($21|0)!=(0|0);
|
|
if (!($22)) {
|
|
___assert_fail((15553|0),(13400|0),9915,(27918|0));
|
|
// unreachable;
|
|
}
|
|
$23 = $0;
|
|
$24 = ($23|0)!=(0|0);
|
|
if (!($24)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$25 = $0;
|
|
$26 = ((($25)) + 24|0);
|
|
$27 = ((($26)) + 4|0);
|
|
$28 = HEAP32[$27>>2]|0;
|
|
$29 = ($28|0)!=(0|0);
|
|
if (!($29)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$30 = $0;
|
|
$31 = ((($30)) + 24|0);
|
|
$32 = ((($31)) + 8|0);
|
|
$33 = HEAP32[$32>>2]|0;
|
|
$34 = ($33|0)!=(0|0);
|
|
if (!($34)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$35 = $0;
|
|
$36 = ((($35)) + 12|0);
|
|
$37 = ((($36)) + 4|0);
|
|
$38 = HEAP32[$37>>2]|0;
|
|
$39 = ($38|0)!=(0|0);
|
|
if (!($39)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$40 = $0;
|
|
$41 = ((($40)) + 12|0);
|
|
$42 = ((($41)) + 8|0);
|
|
$43 = HEAP32[$42>>2]|0;
|
|
$44 = ($43|0)!=(0|0);
|
|
if (!($44)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$45 = $0;
|
|
$46 = ((($45)) + 56|0);
|
|
$47 = HEAP32[$46>>2]|0;
|
|
$48 = ($47|0)!=(0|0);
|
|
if ($48) {
|
|
$i = 0;
|
|
while(1) {
|
|
$49 = $i;
|
|
$50 = $0;
|
|
$51 = ((($50)) + 64|0);
|
|
$52 = HEAP32[$51>>2]|0;
|
|
$53 = ($49|0)<($52|0);
|
|
$54 = $0;
|
|
$55 = ((($54)) + 12|0);
|
|
$56 = ((($55)) + 8|0);
|
|
$57 = HEAP32[$56>>2]|0;
|
|
$58 = $0;
|
|
$59 = ((($58)) + 12|0);
|
|
if (!($53)) {
|
|
break;
|
|
}
|
|
$60 = $i;
|
|
$61 = $0;
|
|
$62 = ((($61)) + 56|0);
|
|
$63 = HEAP32[$62>>2]|0;
|
|
$64 = (($63) + ($60<<2)|0);
|
|
$65 = HEAP32[$64>>2]|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$59>>2]|0;
|
|
FUNCTION_TABLE_vii[$57 & 31]($$byval_copy,$65);
|
|
$66 = $i;
|
|
$67 = (($66) + 1)|0;
|
|
$i = $67;
|
|
}
|
|
$68 = $0;
|
|
$69 = ((($68)) + 56|0);
|
|
$70 = HEAP32[$69>>2]|0;
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$59>>2]|0;
|
|
FUNCTION_TABLE_vii[$57 & 31]($$byval_copy1,$70);
|
|
}
|
|
$71 = $0;
|
|
$72 = ((($71)) + 60|0);
|
|
$73 = HEAP32[$72>>2]|0;
|
|
$74 = ($73|0)!=(0|0);
|
|
if ($74) {
|
|
$i = 0;
|
|
while(1) {
|
|
$75 = $i;
|
|
$76 = $0;
|
|
$77 = ((($76)) + 64|0);
|
|
$78 = HEAP32[$77>>2]|0;
|
|
$79 = ($75|0)<($78|0);
|
|
$80 = $0;
|
|
$81 = ((($80)) + 12|0);
|
|
$82 = ((($81)) + 8|0);
|
|
$83 = HEAP32[$82>>2]|0;
|
|
$84 = $0;
|
|
$85 = ((($84)) + 12|0);
|
|
if (!($79)) {
|
|
break;
|
|
}
|
|
$86 = $i;
|
|
$87 = $0;
|
|
$88 = ((($87)) + 60|0);
|
|
$89 = HEAP32[$88>>2]|0;
|
|
$90 = (($89) + (($86*44)|0)|0);
|
|
$91 = HEAP32[$90>>2]|0;
|
|
;HEAP32[$$byval_copy2>>2]=HEAP32[$85>>2]|0;
|
|
FUNCTION_TABLE_vii[$83 & 31]($$byval_copy2,$91);
|
|
$92 = $i;
|
|
$93 = (($92) + 1)|0;
|
|
$i = $93;
|
|
}
|
|
$94 = $0;
|
|
$95 = ((($94)) + 60|0);
|
|
$96 = HEAP32[$95>>2]|0;
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$85>>2]|0;
|
|
FUNCTION_TABLE_vii[$83 & 31]($$byval_copy3,$96);
|
|
}
|
|
$97 = $0;
|
|
$98 = ((($97)) + 52|0);
|
|
$99 = HEAP32[$98>>2]|0;
|
|
$100 = ($99|0)!=(0|0);
|
|
if ($100) {
|
|
$101 = $0;
|
|
$102 = ((($101)) + 12|0);
|
|
$103 = ((($102)) + 8|0);
|
|
$104 = HEAP32[$103>>2]|0;
|
|
$105 = $0;
|
|
$106 = ((($105)) + 12|0);
|
|
$107 = $0;
|
|
$108 = ((($107)) + 52|0);
|
|
$109 = HEAP32[$108>>2]|0;
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$106>>2]|0;
|
|
FUNCTION_TABLE_vii[$104 & 31]($$byval_copy4,$109);
|
|
}
|
|
$110 = $0;
|
|
_nk_zero($110,72);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_input_begin($ctx) {
|
|
$ctx = $ctx|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $in = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((14913|0),(13400|0),9945,(27938|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$in = $5;
|
|
$i = 0;
|
|
while(1) {
|
|
$6 = $i;
|
|
$7 = ($6|0)<(3);
|
|
if (!($7)) {
|
|
break;
|
|
}
|
|
$8 = $i;
|
|
$9 = $in;
|
|
$10 = ((($9)) + 220|0);
|
|
$11 = (($10) + ($8<<4)|0);
|
|
$12 = ((($11)) + 4|0);
|
|
HEAP32[$12>>2] = 0;
|
|
$13 = $i;
|
|
$14 = (($13) + 1)|0;
|
|
$i = $14;
|
|
}
|
|
$15 = $in;
|
|
$16 = ((($15)) + 216|0);
|
|
HEAP32[$16>>2] = 0;
|
|
$17 = $in;
|
|
$18 = ((($17)) + 220|0);
|
|
$19 = ((($18)) + 72|0);
|
|
HEAPF32[$19>>2] = 0.0;
|
|
$20 = $in;
|
|
$21 = ((($20)) + 220|0);
|
|
$22 = ((($21)) + 48|0);
|
|
$23 = +HEAPF32[$22>>2];
|
|
$24 = $in;
|
|
$25 = ((($24)) + 220|0);
|
|
$26 = ((($25)) + 56|0);
|
|
HEAPF32[$26>>2] = $23;
|
|
$27 = $in;
|
|
$28 = ((($27)) + 220|0);
|
|
$29 = ((($28)) + 48|0);
|
|
$30 = ((($29)) + 4|0);
|
|
$31 = +HEAPF32[$30>>2];
|
|
$32 = $in;
|
|
$33 = ((($32)) + 220|0);
|
|
$34 = ((($33)) + 56|0);
|
|
$35 = ((($34)) + 4|0);
|
|
HEAPF32[$35>>2] = $31;
|
|
$36 = $in;
|
|
$37 = ((($36)) + 220|0);
|
|
$38 = ((($37)) + 64|0);
|
|
HEAPF32[$38>>2] = 0.0;
|
|
$39 = $in;
|
|
$40 = ((($39)) + 220|0);
|
|
$41 = ((($40)) + 64|0);
|
|
$42 = ((($41)) + 4|0);
|
|
HEAPF32[$42>>2] = 0.0;
|
|
$i = 0;
|
|
while(1) {
|
|
$43 = $i;
|
|
$44 = ($43|0)<(25);
|
|
if (!($44)) {
|
|
break;
|
|
}
|
|
$45 = $i;
|
|
$46 = $in;
|
|
$47 = (($46) + ($45<<3)|0);
|
|
$48 = ((($47)) + 4|0);
|
|
HEAP32[$48>>2] = 0;
|
|
$49 = $i;
|
|
$50 = (($49) + 1)|0;
|
|
$i = $50;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_input_end($ctx) {
|
|
$ctx = $ctx|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $in = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((14913|0),(13400|0),9965,(27953|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$in = $5;
|
|
$6 = $in;
|
|
$7 = ((($6)) + 220|0);
|
|
$8 = ((($7)) + 76|0);
|
|
$9 = HEAP8[$8>>0]|0;
|
|
$10 = ($9<<24>>24)!=(0);
|
|
if ($10) {
|
|
$11 = $in;
|
|
$12 = ((($11)) + 220|0);
|
|
$13 = ((($12)) + 76|0);
|
|
HEAP8[$13>>0] = 0;
|
|
}
|
|
$14 = $in;
|
|
$15 = ((($14)) + 220|0);
|
|
$16 = ((($15)) + 78|0);
|
|
$17 = HEAP8[$16>>0]|0;
|
|
$18 = ($17<<24>>24)!=(0);
|
|
if (!($18)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$19 = $in;
|
|
$20 = ((($19)) + 220|0);
|
|
$21 = ((($20)) + 77|0);
|
|
HEAP8[$21>>0] = 0;
|
|
$22 = $in;
|
|
$23 = ((($22)) + 220|0);
|
|
$24 = ((($23)) + 78|0);
|
|
HEAP8[$24>>0] = 0;
|
|
$25 = $in;
|
|
$26 = ((($25)) + 220|0);
|
|
$27 = ((($26)) + 76|0);
|
|
HEAP8[$27>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_input_motion($ctx,$x,$y) {
|
|
$ctx = $ctx|0;
|
|
$x = $x|0;
|
|
$y = $y|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0;
|
|
var $27 = 0.0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, $in = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $x;
|
|
$2 = $y;
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((14913|0),(13400|0),9981,(27966|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$7 = $0;
|
|
$in = $7;
|
|
$8 = $1;
|
|
$9 = (+($8|0));
|
|
$10 = $in;
|
|
$11 = ((($10)) + 220|0);
|
|
$12 = ((($11)) + 48|0);
|
|
HEAPF32[$12>>2] = $9;
|
|
$13 = $2;
|
|
$14 = (+($13|0));
|
|
$15 = $in;
|
|
$16 = ((($15)) + 220|0);
|
|
$17 = ((($16)) + 48|0);
|
|
$18 = ((($17)) + 4|0);
|
|
HEAPF32[$18>>2] = $14;
|
|
$19 = $in;
|
|
$20 = ((($19)) + 220|0);
|
|
$21 = ((($20)) + 48|0);
|
|
$22 = +HEAPF32[$21>>2];
|
|
$23 = $in;
|
|
$24 = ((($23)) + 220|0);
|
|
$25 = ((($24)) + 56|0);
|
|
$26 = +HEAPF32[$25>>2];
|
|
$27 = $22 - $26;
|
|
$28 = $in;
|
|
$29 = ((($28)) + 220|0);
|
|
$30 = ((($29)) + 64|0);
|
|
HEAPF32[$30>>2] = $27;
|
|
$31 = $in;
|
|
$32 = ((($31)) + 220|0);
|
|
$33 = ((($32)) + 48|0);
|
|
$34 = ((($33)) + 4|0);
|
|
$35 = +HEAPF32[$34>>2];
|
|
$36 = $in;
|
|
$37 = ((($36)) + 220|0);
|
|
$38 = ((($37)) + 56|0);
|
|
$39 = ((($38)) + 4|0);
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = $35 - $40;
|
|
$42 = $in;
|
|
$43 = ((($42)) + 220|0);
|
|
$44 = ((($43)) + 64|0);
|
|
$45 = ((($44)) + 4|0);
|
|
HEAPF32[$45>>2] = $41;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_input_key($ctx,$key,$down) {
|
|
$ctx = $ctx|0;
|
|
$key = $key|0;
|
|
$down = $down|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0;
|
|
var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $in = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $key;
|
|
$2 = $down;
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((14913|0),(13400|0),9994,(27982|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$7 = $0;
|
|
$in = $7;
|
|
$8 = $1;
|
|
$9 = $in;
|
|
$10 = (($9) + ($8<<3)|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = $2;
|
|
$13 = ($11|0)==($12|0);
|
|
if ($13) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$14 = $2;
|
|
$15 = $1;
|
|
$16 = $in;
|
|
$17 = (($16) + ($15<<3)|0);
|
|
HEAP32[$17>>2] = $14;
|
|
$18 = $1;
|
|
$19 = $in;
|
|
$20 = (($19) + ($18<<3)|0);
|
|
$21 = ((($20)) + 4|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = (($22) + 1)|0;
|
|
HEAP32[$21>>2] = $23;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_input_button($ctx,$id,$x,$y,$down) {
|
|
$ctx = $ctx|0;
|
|
$id = $id|0;
|
|
$x = $x|0;
|
|
$y = $y|0;
|
|
$down = $down|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $btn = 0, $in = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $id;
|
|
$2 = $x;
|
|
$3 = $y;
|
|
$4 = $down;
|
|
$5 = $0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((14913|0),(13400|0),10007,(27995|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $0;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$9 = $0;
|
|
$in = $9;
|
|
$10 = $1;
|
|
$11 = $in;
|
|
$12 = ((($11)) + 220|0);
|
|
$13 = (($12) + ($10<<4)|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = $4;
|
|
$16 = ($14|0)==($15|0);
|
|
if ($16) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$17 = $1;
|
|
$18 = $in;
|
|
$19 = ((($18)) + 220|0);
|
|
$20 = (($19) + ($17<<4)|0);
|
|
$btn = $20;
|
|
$21 = $2;
|
|
$22 = (+($21|0));
|
|
$23 = $btn;
|
|
$24 = ((($23)) + 8|0);
|
|
HEAPF32[$24>>2] = $22;
|
|
$25 = $3;
|
|
$26 = (+($25|0));
|
|
$27 = $btn;
|
|
$28 = ((($27)) + 8|0);
|
|
$29 = ((($28)) + 4|0);
|
|
HEAPF32[$29>>2] = $26;
|
|
$30 = $4;
|
|
$31 = $btn;
|
|
HEAP32[$31>>2] = $30;
|
|
$32 = $btn;
|
|
$33 = ((($32)) + 4|0);
|
|
$34 = HEAP32[$33>>2]|0;
|
|
$35 = (($34) + 1)|0;
|
|
HEAP32[$33>>2] = $35;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_input_scroll($ctx,$y) {
|
|
$ctx = $ctx|0;
|
|
$y = +$y;
|
|
var $0 = 0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $y;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((14913|0),(13400|0),10022,(28011|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$6 = $1;
|
|
$7 = $0;
|
|
$8 = ((($7)) + 220|0);
|
|
$9 = ((($8)) + 72|0);
|
|
$10 = +HEAPF32[$9>>2];
|
|
$11 = $10 + $6;
|
|
HEAPF32[$9>>2] = $11;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_input_glyph($ctx,$glyph) {
|
|
$ctx = $ctx|0;
|
|
$glyph = $glyph|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $in = 0, $len = 0, $unicode = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$unicode = sp + 4|0;
|
|
$0 = $ctx;
|
|
$1 = $glyph;
|
|
$len = 0;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((14913|0),(13400|0),10034,(28027|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$6 = $0;
|
|
$in = $6;
|
|
$7 = $1;
|
|
$8 = (_nk_utf_decode($7,$unicode,4)|0);
|
|
$len = $8;
|
|
$9 = $len;
|
|
$10 = ($9|0)!=(0);
|
|
if (!($10)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$11 = $in;
|
|
$12 = ((($11)) + 216|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = $len;
|
|
$15 = (($13) + ($14))|0;
|
|
$16 = ($15|0)<(16);
|
|
if (!($16)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$17 = HEAP32[$unicode>>2]|0;
|
|
$18 = $in;
|
|
$19 = ((($18)) + 216|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = $in;
|
|
$22 = ((($21)) + 200|0);
|
|
$23 = (($22) + ($20)|0);
|
|
$24 = $in;
|
|
$25 = ((($24)) + 216|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$27 = (16 - ($26))|0;
|
|
(_nk_utf_encode($17,$23,$27)|0);
|
|
$28 = $len;
|
|
$29 = $in;
|
|
$30 = ((($29)) + 216|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = (($31) + ($28))|0;
|
|
HEAP32[$30>>2] = $32;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_input_unicode($ctx,$unicode) {
|
|
$ctx = $ctx|0;
|
|
$unicode = $unicode|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $rune = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$rune = sp + 8|0;
|
|
$0 = $ctx;
|
|
$1 = $unicode;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((14913|0),(13400|0),10060,(28042|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$6 = $1;
|
|
(_nk_utf_encode($6,$rune,4)|0);
|
|
$7 = $0;
|
|
_nk_input_glyph($7,$rune);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_input_has_mouse_click($i,$id) {
|
|
$i = $i|0;
|
|
$id = $id|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $btn = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $i;
|
|
$2 = $id;
|
|
$3 = $1;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
$0 = 0;
|
|
$18 = $0;
|
|
STACKTOP = sp;return ($18|0);
|
|
}
|
|
$5 = $2;
|
|
$6 = $1;
|
|
$7 = ((($6)) + 220|0);
|
|
$8 = (($7) + ($5<<4)|0);
|
|
$btn = $8;
|
|
$9 = $btn;
|
|
$10 = ((($9)) + 4|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = ($11|0)!=(0);
|
|
if ($12) {
|
|
$13 = $btn;
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = ($14|0)==(0);
|
|
$16 = $15;
|
|
} else {
|
|
$16 = 0;
|
|
}
|
|
$17 = $16 ? 1 : 0;
|
|
$0 = $17;
|
|
$18 = $0;
|
|
STACKTOP = sp;return ($18|0);
|
|
}
|
|
function _nk_input_has_mouse_click_in_rect($i,$id,$b) {
|
|
$i = $i|0;
|
|
$id = $id|0;
|
|
$b = $b|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0.0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0;
|
|
var $btn = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $i;
|
|
$2 = $id;
|
|
$3 = $1;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
$0 = 0;
|
|
$39 = $0;
|
|
STACKTOP = sp;return ($39|0);
|
|
}
|
|
$5 = $2;
|
|
$6 = $1;
|
|
$7 = ((($6)) + 220|0);
|
|
$8 = (($7) + ($5<<4)|0);
|
|
$btn = $8;
|
|
$9 = +HEAPF32[$b>>2];
|
|
$10 = $btn;
|
|
$11 = ((($10)) + 8|0);
|
|
$12 = +HEAPF32[$11>>2];
|
|
$13 = $9 <= $12;
|
|
if ($13) {
|
|
$14 = $btn;
|
|
$15 = ((($14)) + 8|0);
|
|
$16 = +HEAPF32[$15>>2];
|
|
$17 = +HEAPF32[$b>>2];
|
|
$18 = ((($b)) + 8|0);
|
|
$19 = +HEAPF32[$18>>2];
|
|
$20 = $17 + $19;
|
|
$21 = $16 <= $20;
|
|
if ($21) {
|
|
$22 = ((($b)) + 4|0);
|
|
$23 = +HEAPF32[$22>>2];
|
|
$24 = $btn;
|
|
$25 = ((($24)) + 8|0);
|
|
$26 = ((($25)) + 4|0);
|
|
$27 = +HEAPF32[$26>>2];
|
|
$28 = $23 <= $27;
|
|
if ($28) {
|
|
$29 = $btn;
|
|
$30 = ((($29)) + 8|0);
|
|
$31 = ((($30)) + 4|0);
|
|
$32 = +HEAPF32[$31>>2];
|
|
$33 = ((($b)) + 4|0);
|
|
$34 = +HEAPF32[$33>>2];
|
|
$35 = ((($b)) + 12|0);
|
|
$36 = +HEAPF32[$35>>2];
|
|
$37 = $34 + $36;
|
|
$38 = $32 <= $37;
|
|
if ($38) {
|
|
$0 = 1;
|
|
$39 = $0;
|
|
STACKTOP = sp;return ($39|0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$39 = $0;
|
|
STACKTOP = sp;return ($39|0);
|
|
}
|
|
function _nk_input_has_mouse_click_down_in_rect($i,$id,$b,$down) {
|
|
$i = $i|0;
|
|
$id = $id|0;
|
|
$b = $b|0;
|
|
$down = $down|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
|
|
var $9 = 0, $b$byval_copy = 0, $btn = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$b$byval_copy = sp + 24|0;
|
|
$1 = $i;
|
|
$2 = $id;
|
|
$3 = $down;
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
$0 = 0;
|
|
$20 = $0;
|
|
STACKTOP = sp;return ($20|0);
|
|
}
|
|
$6 = $2;
|
|
$7 = $1;
|
|
$8 = ((($7)) + 220|0);
|
|
$9 = (($8) + ($6<<4)|0);
|
|
$btn = $9;
|
|
$10 = $1;
|
|
$11 = $2;
|
|
;HEAP32[$b$byval_copy>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy+4>>2]=HEAP32[$b+4>>2]|0;HEAP32[$b$byval_copy+8>>2]=HEAP32[$b+8>>2]|0;HEAP32[$b$byval_copy+12>>2]=HEAP32[$b+12>>2]|0;
|
|
$12 = (_nk_input_has_mouse_click_in_rect($10,$11,$b$byval_copy)|0);
|
|
$13 = ($12|0)!=(0);
|
|
if ($13) {
|
|
$14 = $btn;
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = $3;
|
|
$17 = ($15|0)==($16|0);
|
|
$19 = $17;
|
|
} else {
|
|
$19 = 0;
|
|
}
|
|
$18 = $19&1;
|
|
$0 = $18;
|
|
$20 = $0;
|
|
STACKTOP = sp;return ($20|0);
|
|
}
|
|
function _nk_input_is_mouse_click_in_rect($i,$id,$b) {
|
|
$i = $i|0;
|
|
$id = $id|0;
|
|
$b = $b|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
|
|
var $b$byval_copy = 0, $btn = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$b$byval_copy = sp + 16|0;
|
|
$1 = $i;
|
|
$2 = $id;
|
|
$3 = $1;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
$0 = 0;
|
|
$19 = $0;
|
|
STACKTOP = sp;return ($19|0);
|
|
}
|
|
$5 = $2;
|
|
$6 = $1;
|
|
$7 = ((($6)) + 220|0);
|
|
$8 = (($7) + ($5<<4)|0);
|
|
$btn = $8;
|
|
$9 = $1;
|
|
$10 = $2;
|
|
;HEAP32[$b$byval_copy>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy+4>>2]=HEAP32[$b+4>>2]|0;HEAP32[$b$byval_copy+8>>2]=HEAP32[$b+8>>2]|0;HEAP32[$b$byval_copy+12>>2]=HEAP32[$b+12>>2]|0;
|
|
$11 = (_nk_input_has_mouse_click_down_in_rect($9,$10,$b$byval_copy,0)|0);
|
|
$12 = ($11|0)!=(0);
|
|
if ($12) {
|
|
$13 = $btn;
|
|
$14 = ((($13)) + 4|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($15|0)!=(0);
|
|
$17 = $16;
|
|
} else {
|
|
$17 = 0;
|
|
}
|
|
$18 = $17 ? 1 : 0;
|
|
$0 = $18;
|
|
$19 = $0;
|
|
STACKTOP = sp;return ($19|0);
|
|
}
|
|
function _nk_input_is_mouse_click_down_in_rect($i,$id,$b,$down) {
|
|
$i = $i|0;
|
|
$id = $id|0;
|
|
$b = $b|0;
|
|
$down = $down|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, $b$byval_copy = 0, $btn = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$b$byval_copy = sp + 24|0;
|
|
$1 = $i;
|
|
$2 = $id;
|
|
$3 = $down;
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
$0 = 0;
|
|
$21 = $0;
|
|
STACKTOP = sp;return ($21|0);
|
|
}
|
|
$6 = $2;
|
|
$7 = $1;
|
|
$8 = ((($7)) + 220|0);
|
|
$9 = (($8) + ($6<<4)|0);
|
|
$btn = $9;
|
|
$10 = $1;
|
|
$11 = $2;
|
|
$12 = $3;
|
|
;HEAP32[$b$byval_copy>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy+4>>2]=HEAP32[$b+4>>2]|0;HEAP32[$b$byval_copy+8>>2]=HEAP32[$b+8>>2]|0;HEAP32[$b$byval_copy+12>>2]=HEAP32[$b+12>>2]|0;
|
|
$13 = (_nk_input_has_mouse_click_down_in_rect($10,$11,$b$byval_copy,$12)|0);
|
|
$14 = ($13|0)!=(0);
|
|
if ($14) {
|
|
$15 = $btn;
|
|
$16 = ((($15)) + 4|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = ($17|0)!=(0);
|
|
$19 = $18;
|
|
} else {
|
|
$19 = 0;
|
|
}
|
|
$20 = $19 ? 1 : 0;
|
|
$0 = $20;
|
|
$21 = $0;
|
|
STACKTOP = sp;return ($21|0);
|
|
}
|
|
function _nk_input_is_mouse_hovering_rect($i,$rect) {
|
|
$i = $i|0;
|
|
$rect = $rect|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0;
|
|
var $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $i;
|
|
$2 = $1;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
$0 = 0;
|
|
$40 = $0;
|
|
STACKTOP = sp;return ($40|0);
|
|
}
|
|
$4 = +HEAPF32[$rect>>2];
|
|
$5 = $1;
|
|
$6 = ((($5)) + 220|0);
|
|
$7 = ((($6)) + 48|0);
|
|
$8 = +HEAPF32[$7>>2];
|
|
$9 = $4 <= $8;
|
|
if ($9) {
|
|
$10 = $1;
|
|
$11 = ((($10)) + 220|0);
|
|
$12 = ((($11)) + 48|0);
|
|
$13 = +HEAPF32[$12>>2];
|
|
$14 = +HEAPF32[$rect>>2];
|
|
$15 = ((($rect)) + 8|0);
|
|
$16 = +HEAPF32[$15>>2];
|
|
$17 = $14 + $16;
|
|
$18 = $13 <= $17;
|
|
if ($18) {
|
|
$19 = ((($rect)) + 4|0);
|
|
$20 = +HEAPF32[$19>>2];
|
|
$21 = $1;
|
|
$22 = ((($21)) + 220|0);
|
|
$23 = ((($22)) + 48|0);
|
|
$24 = ((($23)) + 4|0);
|
|
$25 = +HEAPF32[$24>>2];
|
|
$26 = $20 <= $25;
|
|
if ($26) {
|
|
$27 = $1;
|
|
$28 = ((($27)) + 220|0);
|
|
$29 = ((($28)) + 48|0);
|
|
$30 = ((($29)) + 4|0);
|
|
$31 = +HEAPF32[$30>>2];
|
|
$32 = ((($rect)) + 4|0);
|
|
$33 = +HEAPF32[$32>>2];
|
|
$34 = ((($rect)) + 12|0);
|
|
$35 = +HEAPF32[$34>>2];
|
|
$36 = $33 + $35;
|
|
$37 = $31 <= $36;
|
|
$39 = $37;
|
|
} else {
|
|
$39 = 0;
|
|
}
|
|
} else {
|
|
$39 = 0;
|
|
}
|
|
} else {
|
|
$39 = 0;
|
|
}
|
|
$38 = $39&1;
|
|
$0 = $38;
|
|
$40 = $0;
|
|
STACKTOP = sp;return ($40|0);
|
|
}
|
|
function _nk_input_is_mouse_prev_hovering_rect($i,$rect) {
|
|
$i = $i|0;
|
|
$rect = $rect|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0;
|
|
var $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $i;
|
|
$2 = $1;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
$0 = 0;
|
|
$40 = $0;
|
|
STACKTOP = sp;return ($40|0);
|
|
}
|
|
$4 = +HEAPF32[$rect>>2];
|
|
$5 = $1;
|
|
$6 = ((($5)) + 220|0);
|
|
$7 = ((($6)) + 56|0);
|
|
$8 = +HEAPF32[$7>>2];
|
|
$9 = $4 <= $8;
|
|
if ($9) {
|
|
$10 = $1;
|
|
$11 = ((($10)) + 220|0);
|
|
$12 = ((($11)) + 56|0);
|
|
$13 = +HEAPF32[$12>>2];
|
|
$14 = +HEAPF32[$rect>>2];
|
|
$15 = ((($rect)) + 8|0);
|
|
$16 = +HEAPF32[$15>>2];
|
|
$17 = $14 + $16;
|
|
$18 = $13 <= $17;
|
|
if ($18) {
|
|
$19 = ((($rect)) + 4|0);
|
|
$20 = +HEAPF32[$19>>2];
|
|
$21 = $1;
|
|
$22 = ((($21)) + 220|0);
|
|
$23 = ((($22)) + 56|0);
|
|
$24 = ((($23)) + 4|0);
|
|
$25 = +HEAPF32[$24>>2];
|
|
$26 = $20 <= $25;
|
|
if ($26) {
|
|
$27 = $1;
|
|
$28 = ((($27)) + 220|0);
|
|
$29 = ((($28)) + 56|0);
|
|
$30 = ((($29)) + 4|0);
|
|
$31 = +HEAPF32[$30>>2];
|
|
$32 = ((($rect)) + 4|0);
|
|
$33 = +HEAPF32[$32>>2];
|
|
$34 = ((($rect)) + 12|0);
|
|
$35 = +HEAPF32[$34>>2];
|
|
$36 = $33 + $35;
|
|
$37 = $31 <= $36;
|
|
$39 = $37;
|
|
} else {
|
|
$39 = 0;
|
|
}
|
|
} else {
|
|
$39 = 0;
|
|
}
|
|
} else {
|
|
$39 = 0;
|
|
}
|
|
$38 = $39&1;
|
|
$0 = $38;
|
|
$40 = $0;
|
|
STACKTOP = sp;return ($40|0);
|
|
}
|
|
function _nk_input_is_mouse_down($i,$id) {
|
|
$i = $i|0;
|
|
$id = $id|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $i;
|
|
$2 = $id;
|
|
$3 = $1;
|
|
$4 = ($3|0)!=(0|0);
|
|
if ($4) {
|
|
$5 = $2;
|
|
$6 = $1;
|
|
$7 = ((($6)) + 220|0);
|
|
$8 = (($7) + ($5<<4)|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$0 = $9;
|
|
} else {
|
|
$0 = 0;
|
|
}
|
|
$10 = $0;
|
|
STACKTOP = sp;return ($10|0);
|
|
}
|
|
function _nk_input_is_mouse_pressed($i,$id) {
|
|
$i = $i|0;
|
|
$id = $id|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $i;
|
|
$2 = $id;
|
|
$3 = $1;
|
|
$4 = ($3|0)!=(0|0);
|
|
do {
|
|
if ($4) {
|
|
$5 = $2;
|
|
$6 = $1;
|
|
$7 = ((($6)) + 220|0);
|
|
$8 = (($7) + ($5<<4)|0);
|
|
$b = $8;
|
|
$9 = $b;
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = ($10|0)!=(0);
|
|
if ($11) {
|
|
$12 = $b;
|
|
$13 = ((($12)) + 4|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = ($14|0)!=(0);
|
|
if ($15) {
|
|
$0 = 1;
|
|
break;
|
|
}
|
|
}
|
|
$0 = 0;
|
|
} else {
|
|
$0 = 0;
|
|
}
|
|
} while(0);
|
|
$16 = $0;
|
|
STACKTOP = sp;return ($16|0);
|
|
}
|
|
function _nk_input_is_key_pressed($i,$key) {
|
|
$i = $i|0;
|
|
$key = $key|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $k = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $i;
|
|
$2 = $key;
|
|
$3 = $1;
|
|
$4 = ($3|0)!=(0|0);
|
|
do {
|
|
if ($4) {
|
|
$5 = $2;
|
|
$6 = $1;
|
|
$7 = (($6) + ($5<<3)|0);
|
|
$k = $7;
|
|
$8 = $k;
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ($9|0)!=(0);
|
|
if ($10) {
|
|
$11 = $k;
|
|
$12 = ((($11)) + 4|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ($13|0)!=(0);
|
|
if ($14) {
|
|
$0 = 1;
|
|
break;
|
|
}
|
|
}
|
|
$0 = 0;
|
|
} else {
|
|
$0 = 0;
|
|
}
|
|
} while(0);
|
|
$15 = $0;
|
|
STACKTOP = sp;return ($15|0);
|
|
}
|
|
function _nk_textedit_delete($state,$where,$len) {
|
|
$state = $state|0;
|
|
$where = $where|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $where;
|
|
$2 = $len;
|
|
$3 = $0;
|
|
$4 = $1;
|
|
$5 = $2;
|
|
_nk_textedit_makeundo_delete($3,$4,$5);
|
|
$6 = $0;
|
|
$7 = ((($6)) + 12|0);
|
|
$8 = $1;
|
|
$9 = $2;
|
|
_nk_str_delete_runes($7,$8,$9);
|
|
$10 = $0;
|
|
$11 = ((($10)) + 103|0);
|
|
HEAP8[$11>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_makeundo_delete($state,$where,$length) {
|
|
$state = $state|0;
|
|
$where = $where|0;
|
|
$length = $length|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0;
|
|
var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $p = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $where;
|
|
$2 = $length;
|
|
$3 = $0;
|
|
$4 = ((($3)) + 112|0);
|
|
$5 = $1;
|
|
$6 = $2;
|
|
$7 = (_nk_textedit_createundo($4,$5,$6,0)|0);
|
|
$p = $7;
|
|
$8 = $p;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$i = 0;
|
|
while(1) {
|
|
$10 = $i;
|
|
$11 = $2;
|
|
$12 = ($10|0)<($11|0);
|
|
if (!($12)) {
|
|
break;
|
|
}
|
|
$13 = $0;
|
|
$14 = ((($13)) + 12|0);
|
|
$15 = $1;
|
|
$16 = $i;
|
|
$17 = (($15) + ($16))|0;
|
|
$18 = (_nk_str_rune_at($14,$17)|0);
|
|
$19 = $i;
|
|
$20 = $p;
|
|
$21 = (($20) + ($19<<2)|0);
|
|
HEAP32[$21>>2] = $18;
|
|
$22 = $i;
|
|
$23 = (($22) + 1)|0;
|
|
$i = $23;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_delete_selection($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $0;
|
|
_nk_textedit_clamp($1);
|
|
$2 = $0;
|
|
$3 = ((($2)) + 92|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$5 = $0;
|
|
$6 = ((($5)) + 96|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = ($4|0)!=($7|0);
|
|
if (!($8)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$9 = $0;
|
|
$10 = ((($9)) + 92|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = $0;
|
|
$13 = ((($12)) + 96|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = ($11|0)<($14|0);
|
|
$16 = $0;
|
|
$17 = $0;
|
|
if ($15) {
|
|
$18 = ((($17)) + 92|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = $0;
|
|
$21 = ((($20)) + 96|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = $0;
|
|
$24 = ((($23)) + 92|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = (($22) - ($25))|0;
|
|
_nk_textedit_delete($16,$19,$26);
|
|
$27 = $0;
|
|
$28 = ((($27)) + 92|0);
|
|
$29 = HEAP32[$28>>2]|0;
|
|
$30 = $0;
|
|
$31 = ((($30)) + 88|0);
|
|
HEAP32[$31>>2] = $29;
|
|
$32 = $0;
|
|
$33 = ((($32)) + 96|0);
|
|
HEAP32[$33>>2] = $29;
|
|
} else {
|
|
$34 = ((($17)) + 96|0);
|
|
$35 = HEAP32[$34>>2]|0;
|
|
$36 = $0;
|
|
$37 = ((($36)) + 92|0);
|
|
$38 = HEAP32[$37>>2]|0;
|
|
$39 = $0;
|
|
$40 = ((($39)) + 96|0);
|
|
$41 = HEAP32[$40>>2]|0;
|
|
$42 = (($38) - ($41))|0;
|
|
_nk_textedit_delete($16,$35,$42);
|
|
$43 = $0;
|
|
$44 = ((($43)) + 96|0);
|
|
$45 = HEAP32[$44>>2]|0;
|
|
$46 = $0;
|
|
$47 = ((($46)) + 88|0);
|
|
HEAP32[$47>>2] = $45;
|
|
$48 = $0;
|
|
$49 = ((($48)) + 92|0);
|
|
HEAP32[$49>>2] = $45;
|
|
}
|
|
$50 = $0;
|
|
$51 = ((($50)) + 103|0);
|
|
HEAP8[$51>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_clamp($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $n = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 12|0);
|
|
$3 = ((($2)) + 60|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$n = $4;
|
|
$5 = $0;
|
|
$6 = ((($5)) + 92|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = $0;
|
|
$9 = ((($8)) + 96|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = ($7|0)!=($10|0);
|
|
if ($11) {
|
|
$12 = $0;
|
|
$13 = ((($12)) + 92|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = $n;
|
|
$16 = ($14|0)>($15|0);
|
|
if ($16) {
|
|
$17 = $n;
|
|
$18 = $0;
|
|
$19 = ((($18)) + 92|0);
|
|
HEAP32[$19>>2] = $17;
|
|
}
|
|
$20 = $0;
|
|
$21 = ((($20)) + 96|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = $n;
|
|
$24 = ($22|0)>($23|0);
|
|
if ($24) {
|
|
$25 = $n;
|
|
$26 = $0;
|
|
$27 = ((($26)) + 96|0);
|
|
HEAP32[$27>>2] = $25;
|
|
}
|
|
$28 = $0;
|
|
$29 = ((($28)) + 92|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$31 = $0;
|
|
$32 = ((($31)) + 96|0);
|
|
$33 = HEAP32[$32>>2]|0;
|
|
$34 = ($30|0)==($33|0);
|
|
if ($34) {
|
|
$35 = $0;
|
|
$36 = ((($35)) + 92|0);
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$38 = $0;
|
|
$39 = ((($38)) + 88|0);
|
|
HEAP32[$39>>2] = $37;
|
|
}
|
|
}
|
|
$40 = $0;
|
|
$41 = ((($40)) + 88|0);
|
|
$42 = HEAP32[$41>>2]|0;
|
|
$43 = $n;
|
|
$44 = ($42|0)>($43|0);
|
|
if (!($44)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$45 = $n;
|
|
$46 = $0;
|
|
$47 = ((($46)) + 88|0);
|
|
HEAP32[$47>>2] = $45;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_cut($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $state;
|
|
$2 = $1;
|
|
$3 = ((($2)) + 92|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$5 = $1;
|
|
$6 = ((($5)) + 96|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = ($4|0)!=($7|0);
|
|
if ($8) {
|
|
$9 = $1;
|
|
_nk_textedit_delete_selection($9);
|
|
$10 = $1;
|
|
$11 = ((($10)) + 103|0);
|
|
HEAP8[$11>>0] = 0;
|
|
$0 = 1;
|
|
$12 = $0;
|
|
STACKTOP = sp;return ($12|0);
|
|
} else {
|
|
$0 = 0;
|
|
$12 = $0;
|
|
STACKTOP = sp;return ($12|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_textedit_paste($state,$ctext,$len) {
|
|
$state = $state|0;
|
|
$ctext = $ctext|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
|
|
var $9 = 0, $glyphs = 0, $text = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $state;
|
|
$2 = $ctext;
|
|
$3 = $len;
|
|
$4 = $2;
|
|
$text = $4;
|
|
$5 = $1;
|
|
_nk_textedit_clamp($5);
|
|
$6 = $1;
|
|
_nk_textedit_delete_selection($6);
|
|
$7 = $2;
|
|
$8 = $3;
|
|
$9 = (_nk_utf_len($7,$8)|0);
|
|
$glyphs = $9;
|
|
$10 = $1;
|
|
$11 = ((($10)) + 12|0);
|
|
$12 = $1;
|
|
$13 = ((($12)) + 88|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = $text;
|
|
$16 = $3;
|
|
$17 = (_nk_str_insert_text_char($11,$14,$15,$16)|0);
|
|
$18 = ($17|0)!=(0);
|
|
$19 = $1;
|
|
if ($18) {
|
|
$20 = $1;
|
|
$21 = ((($20)) + 88|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = $glyphs;
|
|
_nk_textedit_makeundo_insert($19,$22,$23);
|
|
$24 = $3;
|
|
$25 = $1;
|
|
$26 = ((($25)) + 88|0);
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = (($27) + ($24))|0;
|
|
HEAP32[$26>>2] = $28;
|
|
$29 = $1;
|
|
$30 = ((($29)) + 103|0);
|
|
HEAP8[$30>>0] = 0;
|
|
$0 = 1;
|
|
$40 = $0;
|
|
STACKTOP = sp;return ($40|0);
|
|
}
|
|
$31 = ((($19)) + 112|0);
|
|
$32 = ((($31)) + 5184|0);
|
|
$33 = HEAP16[$32>>1]|0;
|
|
$34 = ($33<<16>>16)!=(0);
|
|
if ($34) {
|
|
$35 = $1;
|
|
$36 = ((($35)) + 112|0);
|
|
$37 = ((($36)) + 5184|0);
|
|
$38 = HEAP16[$37>>1]|0;
|
|
$39 = (($38) + -1)<<16>>16;
|
|
HEAP16[$37>>1] = $39;
|
|
}
|
|
$0 = 0;
|
|
$40 = $0;
|
|
STACKTOP = sp;return ($40|0);
|
|
}
|
|
function _nk_textedit_makeundo_insert($state,$where,$length) {
|
|
$state = $state|0;
|
|
$where = $where|0;
|
|
$length = $length|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $where;
|
|
$2 = $length;
|
|
$3 = $0;
|
|
$4 = ((($3)) + 112|0);
|
|
$5 = $1;
|
|
$6 = $2;
|
|
(_nk_textedit_createundo($4,$5,0,$6)|0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_text($state,$text,$total_len) {
|
|
$state = $state|0;
|
|
$text = $text|0;
|
|
$total_len = $total_len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $14 = 0;
|
|
var $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0;
|
|
var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0;
|
|
var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0;
|
|
var $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0;
|
|
var $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $glyph_len = 0, $or$cond = 0, $text_len = 0, $unicode = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$unicode = sp + 8|0;
|
|
$0 = $state;
|
|
$1 = $text;
|
|
$2 = $total_len;
|
|
$text_len = 0;
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((28059|0),(13400|0),10585,(28065|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((13893|0),(13400|0),10586,(28065|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $1;
|
|
$8 = ($7|0)!=(0|0);
|
|
$9 = $2;
|
|
$10 = ($9|0)!=(0);
|
|
$or$cond = $8 & $10;
|
|
if (!($or$cond)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$11 = $0;
|
|
$12 = ((($11)) + 100|0);
|
|
$13 = HEAP8[$12>>0]|0;
|
|
$14 = $13&255;
|
|
$15 = ($14|0)==(0);
|
|
if ($15) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$16 = $1;
|
|
$17 = $2;
|
|
$18 = (_nk_utf_decode($16,$unicode,$17)|0);
|
|
$glyph_len = $18;
|
|
$19 = $glyph_len;
|
|
$20 = ($19|0)!=(0);
|
|
if (!($20)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
while(1) {
|
|
$21 = $text_len;
|
|
$22 = $2;
|
|
$23 = ($21|0)<($22|0);
|
|
$24 = $glyph_len;
|
|
$25 = ($24|0)!=(0);
|
|
$26 = $23 ? $25 : 0;
|
|
if (!($26)) {
|
|
label = 23;
|
|
break;
|
|
}
|
|
$27 = HEAP32[$unicode>>2]|0;
|
|
$28 = ($27|0)==(10);
|
|
if ($28) {
|
|
$29 = $0;
|
|
$30 = ((($29)) + 104|0);
|
|
$31 = HEAP8[$30>>0]|0;
|
|
$32 = $31&255;
|
|
$33 = ($32|0)!=(0);
|
|
if ($33) {
|
|
label = 23;
|
|
break;
|
|
}
|
|
}
|
|
$34 = $0;
|
|
$35 = ((($34)) + 76|0);
|
|
$36 = HEAP32[$35>>2]|0;
|
|
$37 = ($36|0)!=(0|0);
|
|
if ($37) {
|
|
$38 = $0;
|
|
$39 = ((($38)) + 76|0);
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$41 = $0;
|
|
$42 = HEAP32[$unicode>>2]|0;
|
|
$43 = (FUNCTION_TABLE_iii[$40 & 15]($41,$42)|0);
|
|
$44 = ($43|0)!=(0);
|
|
if (!($44)) {
|
|
$45 = $1;
|
|
$46 = $text_len;
|
|
$47 = (($45) + ($46)|0);
|
|
$48 = $2;
|
|
$49 = $text_len;
|
|
$50 = (($48) - ($49))|0;
|
|
$51 = (_nk_utf_decode($47,$unicode,$50)|0);
|
|
$glyph_len = $51;
|
|
$52 = $glyph_len;
|
|
$53 = $text_len;
|
|
$54 = (($53) + ($52))|0;
|
|
$text_len = $54;
|
|
continue;
|
|
}
|
|
}
|
|
$55 = $0;
|
|
$56 = ((($55)) + 92|0);
|
|
$57 = HEAP32[$56>>2]|0;
|
|
$58 = $0;
|
|
$59 = ((($58)) + 96|0);
|
|
$60 = HEAP32[$59>>2]|0;
|
|
$61 = ($57|0)!=($60|0);
|
|
if ($61) {
|
|
label = 20;
|
|
} else {
|
|
$62 = $0;
|
|
$63 = ((($62)) + 88|0);
|
|
$64 = HEAP32[$63>>2]|0;
|
|
$65 = $0;
|
|
$66 = ((($65)) + 12|0);
|
|
$67 = ((($66)) + 60|0);
|
|
$68 = HEAP32[$67>>2]|0;
|
|
$69 = ($64|0)<($68|0);
|
|
if ($69) {
|
|
$70 = $0;
|
|
$71 = ((($70)) + 100|0);
|
|
$72 = HEAP8[$71>>0]|0;
|
|
$73 = $72&255;
|
|
$74 = ($73|0)==(2);
|
|
if ($74) {
|
|
$75 = $0;
|
|
$76 = $0;
|
|
$77 = ((($76)) + 88|0);
|
|
$78 = HEAP32[$77>>2]|0;
|
|
_nk_textedit_makeundo_replace($75,$78,1,1);
|
|
$79 = $0;
|
|
$80 = ((($79)) + 12|0);
|
|
$81 = $0;
|
|
$82 = ((($81)) + 88|0);
|
|
$83 = HEAP32[$82>>2]|0;
|
|
_nk_str_delete_runes($80,$83,1);
|
|
}
|
|
$84 = $0;
|
|
$85 = ((($84)) + 12|0);
|
|
$86 = $0;
|
|
$87 = ((($86)) + 88|0);
|
|
$88 = HEAP32[$87>>2]|0;
|
|
$89 = $1;
|
|
$90 = $text_len;
|
|
$91 = (($89) + ($90)|0);
|
|
$92 = $glyph_len;
|
|
$93 = (_nk_str_insert_text_char($85,$88,$91,$92)|0);
|
|
$94 = ($93|0)!=(0);
|
|
if ($94) {
|
|
$95 = $0;
|
|
$96 = ((($95)) + 88|0);
|
|
$97 = HEAP32[$96>>2]|0;
|
|
$98 = (($97) + 1)|0;
|
|
HEAP32[$96>>2] = $98;
|
|
$99 = $0;
|
|
$100 = ((($99)) + 103|0);
|
|
HEAP8[$100>>0] = 0;
|
|
}
|
|
} else {
|
|
label = 20;
|
|
}
|
|
}
|
|
if ((label|0) == 20) {
|
|
label = 0;
|
|
$101 = $0;
|
|
_nk_textedit_delete_selection($101);
|
|
$102 = $0;
|
|
$103 = ((($102)) + 12|0);
|
|
$104 = $0;
|
|
$105 = ((($104)) + 88|0);
|
|
$106 = HEAP32[$105>>2]|0;
|
|
$107 = $1;
|
|
$108 = $text_len;
|
|
$109 = (($107) + ($108)|0);
|
|
$110 = $glyph_len;
|
|
$111 = (_nk_str_insert_text_char($103,$106,$109,$110)|0);
|
|
$112 = ($111|0)!=(0);
|
|
if ($112) {
|
|
$113 = $0;
|
|
$114 = $0;
|
|
$115 = ((($114)) + 88|0);
|
|
$116 = HEAP32[$115>>2]|0;
|
|
_nk_textedit_makeundo_insert($113,$116,1);
|
|
$117 = $0;
|
|
$118 = ((($117)) + 88|0);
|
|
$119 = HEAP32[$118>>2]|0;
|
|
$120 = (($119) + 1)|0;
|
|
HEAP32[$118>>2] = $120;
|
|
$121 = $0;
|
|
$122 = ((($121)) + 103|0);
|
|
HEAP8[$122>>0] = 0;
|
|
}
|
|
}
|
|
$123 = $1;
|
|
$124 = $text_len;
|
|
$125 = (($123) + ($124)|0);
|
|
$126 = $2;
|
|
$127 = $text_len;
|
|
$128 = (($126) - ($127))|0;
|
|
$129 = (_nk_utf_decode($125,$unicode,$128)|0);
|
|
$glyph_len = $129;
|
|
$130 = $glyph_len;
|
|
$131 = $text_len;
|
|
$132 = (($131) + ($130))|0;
|
|
$text_len = $132;
|
|
}
|
|
if ((label|0) == 23) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_textedit_makeundo_replace($state,$where,$old_length,$new_length) {
|
|
$state = $state|0;
|
|
$where = $where|0;
|
|
$old_length = $old_length|0;
|
|
$new_length = $new_length|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0;
|
|
var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $p = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $where;
|
|
$2 = $old_length;
|
|
$3 = $new_length;
|
|
$4 = $0;
|
|
$5 = ((($4)) + 112|0);
|
|
$6 = $1;
|
|
$7 = $2;
|
|
$8 = $3;
|
|
$9 = (_nk_textedit_createundo($5,$6,$7,$8)|0);
|
|
$p = $9;
|
|
$10 = $p;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$i = 0;
|
|
while(1) {
|
|
$12 = $i;
|
|
$13 = $2;
|
|
$14 = ($12|0)<($13|0);
|
|
if (!($14)) {
|
|
break;
|
|
}
|
|
$15 = $0;
|
|
$16 = ((($15)) + 12|0);
|
|
$17 = $1;
|
|
$18 = $i;
|
|
$19 = (($17) + ($18))|0;
|
|
$20 = (_nk_str_rune_at($16,$19)|0);
|
|
$21 = $i;
|
|
$22 = $p;
|
|
$23 = (($22) + ($21<<2)|0);
|
|
HEAP32[$23>>2] = $20;
|
|
$24 = $i;
|
|
$25 = (($24) + 1)|0;
|
|
$i = $25;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_undo($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0;
|
|
var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0;
|
|
var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0;
|
|
var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0;
|
|
var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0;
|
|
var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $i = 0, $r = 0, $s = 0, $u = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$u = sp + 8|0;
|
|
$0 = $state;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 112|0);
|
|
$s = $2;
|
|
$3 = $s;
|
|
$4 = ((($3)) + 5184|0);
|
|
$5 = HEAP16[$4>>1]|0;
|
|
$6 = $5 << 16 >> 16;
|
|
$7 = ($6|0)==(0);
|
|
if ($7) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$8 = $s;
|
|
$9 = ((($8)) + 5184|0);
|
|
$10 = HEAP16[$9>>1]|0;
|
|
$11 = $10 << 16 >> 16;
|
|
$12 = (($11) - 1)|0;
|
|
$13 = $s;
|
|
$14 = (($13) + (($12*12)|0)|0);
|
|
;HEAP32[$u>>2]=HEAP32[$14>>2]|0;HEAP32[$u+4>>2]=HEAP32[$14+4>>2]|0;HEAP32[$u+8>>2]=HEAP32[$14+8>>2]|0;
|
|
$15 = $s;
|
|
$16 = ((($15)) + 5186|0);
|
|
$17 = HEAP16[$16>>1]|0;
|
|
$18 = $17 << 16 >> 16;
|
|
$19 = (($18) - 1)|0;
|
|
$20 = $s;
|
|
$21 = (($20) + (($19*12)|0)|0);
|
|
$r = $21;
|
|
$22 = $r;
|
|
$23 = ((($22)) + 8|0);
|
|
HEAP16[$23>>1] = -1;
|
|
$24 = ((($u)) + 6|0);
|
|
$25 = HEAP16[$24>>1]|0;
|
|
$26 = $r;
|
|
$27 = ((($26)) + 4|0);
|
|
HEAP16[$27>>1] = $25;
|
|
$28 = ((($u)) + 4|0);
|
|
$29 = HEAP16[$28>>1]|0;
|
|
$30 = $r;
|
|
$31 = ((($30)) + 6|0);
|
|
HEAP16[$31>>1] = $29;
|
|
$32 = HEAP32[$u>>2]|0;
|
|
$33 = $r;
|
|
HEAP32[$33>>2] = $32;
|
|
$34 = ((($u)) + 6|0);
|
|
$35 = HEAP16[$34>>1]|0;
|
|
$36 = ($35<<16>>16)!=(0);
|
|
if ($36) {
|
|
$37 = $s;
|
|
$38 = ((($37)) + 5188|0);
|
|
$39 = HEAP16[$38>>1]|0;
|
|
$40 = $39 << 16 >> 16;
|
|
$41 = ((($u)) + 6|0);
|
|
$42 = HEAP16[$41>>1]|0;
|
|
$43 = $42 << 16 >> 16;
|
|
$44 = (($40) + ($43))|0;
|
|
$45 = ($44|0)>=(999);
|
|
L6: do {
|
|
if ($45) {
|
|
$46 = $r;
|
|
$47 = ((($46)) + 4|0);
|
|
HEAP16[$47>>1] = 0;
|
|
} else {
|
|
while(1) {
|
|
$48 = $s;
|
|
$49 = ((($48)) + 5188|0);
|
|
$50 = HEAP16[$49>>1]|0;
|
|
$51 = $50 << 16 >> 16;
|
|
$52 = ((($u)) + 6|0);
|
|
$53 = HEAP16[$52>>1]|0;
|
|
$54 = $53 << 16 >> 16;
|
|
$55 = (($51) + ($54))|0;
|
|
$56 = $s;
|
|
$57 = ((($56)) + 5190|0);
|
|
$58 = HEAP16[$57>>1]|0;
|
|
$59 = $58 << 16 >> 16;
|
|
$60 = ($55|0)>($59|0);
|
|
$61 = $s;
|
|
if (!($60)) {
|
|
break;
|
|
}
|
|
_nk_textedit_discard_redo($61);
|
|
$62 = $s;
|
|
$63 = ((($62)) + 5186|0);
|
|
$64 = HEAP16[$63>>1]|0;
|
|
$65 = $64 << 16 >> 16;
|
|
$66 = ($65|0)==(99);
|
|
if ($66) {
|
|
label = 14;
|
|
break;
|
|
}
|
|
}
|
|
if ((label|0) == 14) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$67 = ((($61)) + 5186|0);
|
|
$68 = HEAP16[$67>>1]|0;
|
|
$69 = $68 << 16 >> 16;
|
|
$70 = (($69) - 1)|0;
|
|
$71 = $s;
|
|
$72 = (($71) + (($70*12)|0)|0);
|
|
$r = $72;
|
|
$73 = $s;
|
|
$74 = ((($73)) + 5190|0);
|
|
$75 = HEAP16[$74>>1]|0;
|
|
$76 = $75 << 16 >> 16;
|
|
$77 = ((($u)) + 6|0);
|
|
$78 = HEAP16[$77>>1]|0;
|
|
$79 = $78 << 16 >> 16;
|
|
$80 = (($76) - ($79))|0;
|
|
$81 = $80&65535;
|
|
$82 = $r;
|
|
$83 = ((($82)) + 8|0);
|
|
HEAP16[$83>>1] = $81;
|
|
$84 = $s;
|
|
$85 = ((($84)) + 5190|0);
|
|
$86 = HEAP16[$85>>1]|0;
|
|
$87 = $86 << 16 >> 16;
|
|
$88 = ((($u)) + 6|0);
|
|
$89 = HEAP16[$88>>1]|0;
|
|
$90 = $89 << 16 >> 16;
|
|
$91 = (($87) - ($90))|0;
|
|
$92 = $91&65535;
|
|
$93 = $s;
|
|
$94 = ((($93)) + 5190|0);
|
|
HEAP16[$94>>1] = $92;
|
|
$i = 0;
|
|
while(1) {
|
|
$95 = $i;
|
|
$96 = ((($u)) + 6|0);
|
|
$97 = HEAP16[$96>>1]|0;
|
|
$98 = $97 << 16 >> 16;
|
|
$99 = ($95|0)<($98|0);
|
|
if (!($99)) {
|
|
break L6;
|
|
}
|
|
$100 = $0;
|
|
$101 = ((($100)) + 12|0);
|
|
$102 = HEAP32[$u>>2]|0;
|
|
$103 = $i;
|
|
$104 = (($102) + ($103))|0;
|
|
$105 = (_nk_str_rune_at($101,$104)|0);
|
|
$106 = $r;
|
|
$107 = ((($106)) + 8|0);
|
|
$108 = HEAP16[$107>>1]|0;
|
|
$109 = $108 << 16 >> 16;
|
|
$110 = $i;
|
|
$111 = (($109) + ($110))|0;
|
|
$112 = $s;
|
|
$113 = ((($112)) + 1188|0);
|
|
$114 = (($113) + ($111<<2)|0);
|
|
HEAP32[$114>>2] = $105;
|
|
$115 = $i;
|
|
$116 = (($115) + 1)|0;
|
|
$i = $116;
|
|
}
|
|
}
|
|
} while(0);
|
|
$117 = $0;
|
|
$118 = ((($117)) + 12|0);
|
|
$119 = HEAP32[$u>>2]|0;
|
|
$120 = ((($u)) + 6|0);
|
|
$121 = HEAP16[$120>>1]|0;
|
|
$122 = $121 << 16 >> 16;
|
|
_nk_str_delete_runes($118,$119,$122);
|
|
}
|
|
$123 = ((($u)) + 4|0);
|
|
$124 = HEAP16[$123>>1]|0;
|
|
$125 = ($124<<16>>16)!=(0);
|
|
if ($125) {
|
|
$126 = $0;
|
|
$127 = ((($126)) + 12|0);
|
|
$128 = HEAP32[$u>>2]|0;
|
|
$129 = ((($u)) + 8|0);
|
|
$130 = HEAP16[$129>>1]|0;
|
|
$131 = $130 << 16 >> 16;
|
|
$132 = $s;
|
|
$133 = ((($132)) + 1188|0);
|
|
$134 = (($133) + ($131<<2)|0);
|
|
$135 = ((($u)) + 4|0);
|
|
$136 = HEAP16[$135>>1]|0;
|
|
$137 = $136 << 16 >> 16;
|
|
(_nk_str_insert_text_runes($127,$128,$134,$137)|0);
|
|
$138 = $s;
|
|
$139 = ((($138)) + 5188|0);
|
|
$140 = HEAP16[$139>>1]|0;
|
|
$141 = $140 << 16 >> 16;
|
|
$142 = ((($u)) + 4|0);
|
|
$143 = HEAP16[$142>>1]|0;
|
|
$144 = $143 << 16 >> 16;
|
|
$145 = (($141) - ($144))|0;
|
|
$146 = $145&65535;
|
|
$147 = $s;
|
|
$148 = ((($147)) + 5188|0);
|
|
HEAP16[$148>>1] = $146;
|
|
}
|
|
$149 = HEAP32[$u>>2]|0;
|
|
$150 = ((($u)) + 4|0);
|
|
$151 = HEAP16[$150>>1]|0;
|
|
$152 = $151 << 16 >> 16;
|
|
$153 = (($149) + ($152))|0;
|
|
$154 = $153&65535;
|
|
$155 = $154 << 16 >> 16;
|
|
$156 = $0;
|
|
$157 = ((($156)) + 88|0);
|
|
HEAP32[$157>>2] = $155;
|
|
$158 = $s;
|
|
$159 = ((($158)) + 5184|0);
|
|
$160 = HEAP16[$159>>1]|0;
|
|
$161 = (($160) + -1)<<16>>16;
|
|
HEAP16[$159>>1] = $161;
|
|
$162 = $s;
|
|
$163 = ((($162)) + 5186|0);
|
|
$164 = HEAP16[$163>>1]|0;
|
|
$165 = (($164) + -1)<<16>>16;
|
|
HEAP16[$163>>1] = $165;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_discard_redo($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0;
|
|
var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0;
|
|
var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0;
|
|
var $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0;
|
|
var $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0;
|
|
var $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $i = 0, $k = 0, $n = 0, $num = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$k = 98;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 5186|0);
|
|
$3 = HEAP16[$2>>1]|0;
|
|
$4 = $3 << 16 >> 16;
|
|
$5 = $k;
|
|
$6 = ($4|0)<=($5|0);
|
|
if (!($6)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$7 = $k;
|
|
$8 = $0;
|
|
$9 = (($8) + (($7*12)|0)|0);
|
|
$10 = ((($9)) + 8|0);
|
|
$11 = HEAP16[$10>>1]|0;
|
|
$12 = $11 << 16 >> 16;
|
|
$13 = ($12|0)>=(0);
|
|
L4: do {
|
|
if ($13) {
|
|
$14 = $k;
|
|
$15 = $0;
|
|
$16 = (($15) + (($14*12)|0)|0);
|
|
$17 = ((($16)) + 4|0);
|
|
$18 = HEAP16[$17>>1]|0;
|
|
$19 = $18 << 16 >> 16;
|
|
$n = $19;
|
|
$20 = $0;
|
|
$21 = ((($20)) + 5190|0);
|
|
$22 = HEAP16[$21>>1]|0;
|
|
$23 = $22 << 16 >> 16;
|
|
$24 = $n;
|
|
$25 = (($23) + ($24))|0;
|
|
$26 = $25&65535;
|
|
$27 = $0;
|
|
$28 = ((($27)) + 5190|0);
|
|
HEAP16[$28>>1] = $26;
|
|
$29 = $0;
|
|
$30 = ((($29)) + 5190|0);
|
|
$31 = HEAP16[$30>>1]|0;
|
|
$32 = $31 << 16 >> 16;
|
|
$33 = (999 - ($32))|0;
|
|
$num = $33;
|
|
$34 = $0;
|
|
$35 = ((($34)) + 1188|0);
|
|
$36 = $0;
|
|
$37 = ((($36)) + 5190|0);
|
|
$38 = HEAP16[$37>>1]|0;
|
|
$39 = $38 << 16 >> 16;
|
|
$40 = (($35) + ($39<<2)|0);
|
|
$41 = $0;
|
|
$42 = ((($41)) + 1188|0);
|
|
$43 = $0;
|
|
$44 = ((($43)) + 5190|0);
|
|
$45 = HEAP16[$44>>1]|0;
|
|
$46 = $45 << 16 >> 16;
|
|
$47 = (($42) + ($46<<2)|0);
|
|
$48 = $n;
|
|
$49 = (0 - ($48))|0;
|
|
$50 = (($47) + ($49<<2)|0);
|
|
$51 = $num;
|
|
$52 = $51;
|
|
(_nk_memcopy($40,$50,$52)|0);
|
|
$53 = $0;
|
|
$54 = ((($53)) + 5186|0);
|
|
$55 = HEAP16[$54>>1]|0;
|
|
$56 = $55 << 16 >> 16;
|
|
$i = $56;
|
|
while(1) {
|
|
$57 = $i;
|
|
$58 = $k;
|
|
$59 = ($57|0)<($58|0);
|
|
if (!($59)) {
|
|
break L4;
|
|
}
|
|
$60 = $i;
|
|
$61 = $0;
|
|
$62 = (($61) + (($60*12)|0)|0);
|
|
$63 = ((($62)) + 8|0);
|
|
$64 = HEAP16[$63>>1]|0;
|
|
$65 = $64 << 16 >> 16;
|
|
$66 = ($65|0)>=(0);
|
|
if ($66) {
|
|
$67 = $i;
|
|
$68 = $0;
|
|
$69 = (($68) + (($67*12)|0)|0);
|
|
$70 = ((($69)) + 8|0);
|
|
$71 = HEAP16[$70>>1]|0;
|
|
$72 = $71 << 16 >> 16;
|
|
$73 = $n;
|
|
$74 = (($72) + ($73))|0;
|
|
$75 = $74&65535;
|
|
$76 = $i;
|
|
$77 = $0;
|
|
$78 = (($77) + (($76*12)|0)|0);
|
|
$79 = ((($78)) + 8|0);
|
|
HEAP16[$79>>1] = $75;
|
|
}
|
|
$80 = $i;
|
|
$81 = (($80) + 1)|0;
|
|
$i = $81;
|
|
}
|
|
}
|
|
} while(0);
|
|
$82 = $0;
|
|
$83 = ((($82)) + 5186|0);
|
|
$84 = HEAP16[$83>>1]|0;
|
|
$85 = (($84) + 1)<<16>>16;
|
|
HEAP16[$83>>1] = $85;
|
|
$86 = $0;
|
|
$87 = ((($86)) + 5186|0);
|
|
$88 = HEAP16[$87>>1]|0;
|
|
$89 = $88 << 16 >> 16;
|
|
$90 = (99 - ($89))|0;
|
|
$num = $90;
|
|
$91 = $num;
|
|
$92 = ($91|0)!=(0);
|
|
if (!($92)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$93 = $0;
|
|
$94 = $0;
|
|
$95 = ((($94)) + 5186|0);
|
|
$96 = HEAP16[$95>>1]|0;
|
|
$97 = $96 << 16 >> 16;
|
|
$98 = (($93) + (($97*12)|0)|0);
|
|
$99 = ((($98)) + -12|0);
|
|
$100 = $0;
|
|
$101 = $0;
|
|
$102 = ((($101)) + 5186|0);
|
|
$103 = HEAP16[$102>>1]|0;
|
|
$104 = $103 << 16 >> 16;
|
|
$105 = (($100) + (($104*12)|0)|0);
|
|
$106 = $num;
|
|
$107 = ($106*12)|0;
|
|
(_nk_memcopy($99,$105,$107)|0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_redo($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0;
|
|
var $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0;
|
|
var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0;
|
|
var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0;
|
|
var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0;
|
|
var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $i = 0, $r = 0, $s = 0, $u = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$r = sp + 4|0;
|
|
$0 = $state;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 112|0);
|
|
$s = $2;
|
|
$3 = $s;
|
|
$4 = ((($3)) + 5186|0);
|
|
$5 = HEAP16[$4>>1]|0;
|
|
$6 = $5 << 16 >> 16;
|
|
$7 = ($6|0)==(99);
|
|
if ($7) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$8 = $s;
|
|
$9 = ((($8)) + 5184|0);
|
|
$10 = HEAP16[$9>>1]|0;
|
|
$11 = $10 << 16 >> 16;
|
|
$12 = $s;
|
|
$13 = (($12) + (($11*12)|0)|0);
|
|
$u = $13;
|
|
$14 = $s;
|
|
$15 = ((($14)) + 5186|0);
|
|
$16 = HEAP16[$15>>1]|0;
|
|
$17 = $16 << 16 >> 16;
|
|
$18 = $s;
|
|
$19 = (($18) + (($17*12)|0)|0);
|
|
;HEAP32[$r>>2]=HEAP32[$19>>2]|0;HEAP32[$r+4>>2]=HEAP32[$19+4>>2]|0;HEAP32[$r+8>>2]=HEAP32[$19+8>>2]|0;
|
|
$20 = ((($r)) + 4|0);
|
|
$21 = HEAP16[$20>>1]|0;
|
|
$22 = $u;
|
|
$23 = ((($22)) + 6|0);
|
|
HEAP16[$23>>1] = $21;
|
|
$24 = ((($r)) + 6|0);
|
|
$25 = HEAP16[$24>>1]|0;
|
|
$26 = $u;
|
|
$27 = ((($26)) + 4|0);
|
|
HEAP16[$27>>1] = $25;
|
|
$28 = HEAP32[$r>>2]|0;
|
|
$29 = $u;
|
|
HEAP32[$29>>2] = $28;
|
|
$30 = $u;
|
|
$31 = ((($30)) + 8|0);
|
|
HEAP16[$31>>1] = -1;
|
|
$32 = ((($r)) + 6|0);
|
|
$33 = HEAP16[$32>>1]|0;
|
|
$34 = ($33<<16>>16)!=(0);
|
|
if ($34) {
|
|
$35 = $s;
|
|
$36 = ((($35)) + 5188|0);
|
|
$37 = HEAP16[$36>>1]|0;
|
|
$38 = $37 << 16 >> 16;
|
|
$39 = $u;
|
|
$40 = ((($39)) + 4|0);
|
|
$41 = HEAP16[$40>>1]|0;
|
|
$42 = $41 << 16 >> 16;
|
|
$43 = (($38) + ($42))|0;
|
|
$44 = $s;
|
|
$45 = ((($44)) + 5190|0);
|
|
$46 = HEAP16[$45>>1]|0;
|
|
$47 = $46 << 16 >> 16;
|
|
$48 = ($43|0)>($47|0);
|
|
L6: do {
|
|
if ($48) {
|
|
$49 = $u;
|
|
$50 = ((($49)) + 4|0);
|
|
HEAP16[$50>>1] = 0;
|
|
$51 = $u;
|
|
$52 = ((($51)) + 6|0);
|
|
HEAP16[$52>>1] = 0;
|
|
} else {
|
|
$53 = $s;
|
|
$54 = ((($53)) + 5188|0);
|
|
$55 = HEAP16[$54>>1]|0;
|
|
$56 = $u;
|
|
$57 = ((($56)) + 8|0);
|
|
HEAP16[$57>>1] = $55;
|
|
$58 = $s;
|
|
$59 = ((($58)) + 5188|0);
|
|
$60 = HEAP16[$59>>1]|0;
|
|
$61 = $60 << 16 >> 16;
|
|
$62 = $u;
|
|
$63 = ((($62)) + 4|0);
|
|
$64 = HEAP16[$63>>1]|0;
|
|
$65 = $64 << 16 >> 16;
|
|
$66 = (($61) + ($65))|0;
|
|
$67 = $66&65535;
|
|
$68 = $s;
|
|
$69 = ((($68)) + 5188|0);
|
|
HEAP16[$69>>1] = $67;
|
|
$i = 0;
|
|
while(1) {
|
|
$70 = $i;
|
|
$71 = $u;
|
|
$72 = ((($71)) + 4|0);
|
|
$73 = HEAP16[$72>>1]|0;
|
|
$74 = $73 << 16 >> 16;
|
|
$75 = ($70|0)<($74|0);
|
|
if (!($75)) {
|
|
break L6;
|
|
}
|
|
$76 = $0;
|
|
$77 = ((($76)) + 12|0);
|
|
$78 = $u;
|
|
$79 = HEAP32[$78>>2]|0;
|
|
$80 = $i;
|
|
$81 = (($79) + ($80))|0;
|
|
$82 = (_nk_str_rune_at($77,$81)|0);
|
|
$83 = $u;
|
|
$84 = ((($83)) + 8|0);
|
|
$85 = HEAP16[$84>>1]|0;
|
|
$86 = $85 << 16 >> 16;
|
|
$87 = $i;
|
|
$88 = (($86) + ($87))|0;
|
|
$89 = $s;
|
|
$90 = ((($89)) + 1188|0);
|
|
$91 = (($90) + ($88<<2)|0);
|
|
HEAP32[$91>>2] = $82;
|
|
$92 = $i;
|
|
$93 = (($92) + 1)|0;
|
|
$i = $93;
|
|
}
|
|
}
|
|
} while(0);
|
|
$94 = $0;
|
|
$95 = ((($94)) + 12|0);
|
|
$96 = HEAP32[$r>>2]|0;
|
|
$97 = ((($r)) + 6|0);
|
|
$98 = HEAP16[$97>>1]|0;
|
|
$99 = $98 << 16 >> 16;
|
|
_nk_str_delete_runes($95,$96,$99);
|
|
}
|
|
$100 = ((($r)) + 4|0);
|
|
$101 = HEAP16[$100>>1]|0;
|
|
$102 = ($101<<16>>16)!=(0);
|
|
if ($102) {
|
|
$103 = $0;
|
|
$104 = ((($103)) + 12|0);
|
|
$105 = HEAP32[$r>>2]|0;
|
|
$106 = ((($r)) + 8|0);
|
|
$107 = HEAP16[$106>>1]|0;
|
|
$108 = $107 << 16 >> 16;
|
|
$109 = $s;
|
|
$110 = ((($109)) + 1188|0);
|
|
$111 = (($110) + ($108<<2)|0);
|
|
$112 = ((($r)) + 4|0);
|
|
$113 = HEAP16[$112>>1]|0;
|
|
$114 = $113 << 16 >> 16;
|
|
(_nk_str_insert_text_runes($104,$105,$111,$114)|0);
|
|
}
|
|
$115 = HEAP32[$r>>2]|0;
|
|
$116 = ((($r)) + 4|0);
|
|
$117 = HEAP16[$116>>1]|0;
|
|
$118 = $117 << 16 >> 16;
|
|
$119 = (($115) + ($118))|0;
|
|
$120 = $0;
|
|
$121 = ((($120)) + 88|0);
|
|
HEAP32[$121>>2] = $119;
|
|
$122 = $s;
|
|
$123 = ((($122)) + 5184|0);
|
|
$124 = HEAP16[$123>>1]|0;
|
|
$125 = (($124) + 1)<<16>>16;
|
|
HEAP16[$123>>1] = $125;
|
|
$126 = $s;
|
|
$127 = ((($126)) + 5186|0);
|
|
$128 = HEAP16[$127>>1]|0;
|
|
$129 = (($128) + 1)<<16>>16;
|
|
HEAP16[$127>>1] = $129;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_clear_state($state,$type,$filter) {
|
|
$state = $state|0;
|
|
$type = $type|0;
|
|
$filter = $filter|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $type;
|
|
$2 = $filter;
|
|
$3 = $0;
|
|
$4 = ((($3)) + 112|0);
|
|
$5 = ((($4)) + 5184|0);
|
|
HEAP16[$5>>1] = 0;
|
|
$6 = $0;
|
|
$7 = ((($6)) + 112|0);
|
|
$8 = ((($7)) + 5188|0);
|
|
HEAP16[$8>>1] = 0;
|
|
$9 = $0;
|
|
$10 = ((($9)) + 112|0);
|
|
$11 = ((($10)) + 5186|0);
|
|
HEAP16[$11>>1] = 99;
|
|
$12 = $0;
|
|
$13 = ((($12)) + 112|0);
|
|
$14 = ((($13)) + 5190|0);
|
|
HEAP16[$14>>1] = 999;
|
|
$15 = $0;
|
|
$16 = ((($15)) + 92|0);
|
|
HEAP32[$16>>2] = 0;
|
|
$17 = $0;
|
|
$18 = ((($17)) + 96|0);
|
|
HEAP32[$18>>2] = 0;
|
|
$19 = $0;
|
|
$20 = ((($19)) + 88|0);
|
|
HEAP32[$20>>2] = 0;
|
|
$21 = $0;
|
|
$22 = ((($21)) + 103|0);
|
|
HEAP8[$22>>0] = 0;
|
|
$23 = $0;
|
|
$24 = ((($23)) + 108|0);
|
|
HEAPF32[$24>>2] = 0.0;
|
|
$25 = $0;
|
|
$26 = ((($25)) + 101|0);
|
|
HEAP8[$26>>0] = 0;
|
|
$27 = $0;
|
|
$28 = ((($27)) + 102|0);
|
|
HEAP8[$28>>0] = 1;
|
|
$29 = $1;
|
|
$30 = ($29|0)==(0);
|
|
$31 = $30&1;
|
|
$32 = $31&255;
|
|
$33 = $0;
|
|
$34 = ((($33)) + 104|0);
|
|
HEAP8[$34>>0] = $32;
|
|
$35 = $0;
|
|
$36 = ((($35)) + 100|0);
|
|
HEAP8[$36>>0] = 0;
|
|
$37 = $2;
|
|
$38 = $0;
|
|
$39 = ((($38)) + 76|0);
|
|
HEAP32[$39>>2] = $37;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_select_all($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if ($2) {
|
|
$3 = $0;
|
|
$4 = ((($3)) + 92|0);
|
|
HEAP32[$4>>2] = 0;
|
|
$5 = $0;
|
|
$6 = ((($5)) + 12|0);
|
|
$7 = ((($6)) + 60|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = $0;
|
|
$10 = ((($9)) + 96|0);
|
|
HEAP32[$10>>2] = $8;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
___assert_fail((28059|0),(13400|0),11246,(28082|0));
|
|
// unreachable;
|
|
}
|
|
}
|
|
function _nk_filter_float($box,$unicode) {
|
|
$box = $box|0;
|
|
$unicode = $unicode|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $box;
|
|
$2 = $unicode;
|
|
$3 = $2;
|
|
$4 = ($3>>>0)<(48);
|
|
$5 = $2;
|
|
$6 = ($5>>>0)>(57);
|
|
$or$cond = $4 | $6;
|
|
$7 = $2;
|
|
$8 = ($7|0)!=(46);
|
|
$or$cond3 = $or$cond & $8;
|
|
$9 = $2;
|
|
$10 = ($9|0)!=(45);
|
|
$or$cond5 = $or$cond3 & $10;
|
|
if ($or$cond5) {
|
|
$0 = 0;
|
|
$11 = $0;
|
|
STACKTOP = sp;return ($11|0);
|
|
} else {
|
|
$0 = 1;
|
|
$11 = $0;
|
|
STACKTOP = sp;return ($11|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_filter_decimal($box,$unicode) {
|
|
$box = $box|0;
|
|
$unicode = $unicode|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond3 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $box;
|
|
$2 = $unicode;
|
|
$3 = $2;
|
|
$4 = ($3>>>0)<(48);
|
|
$5 = $2;
|
|
$6 = ($5>>>0)>(57);
|
|
$or$cond = $4 | $6;
|
|
$7 = $2;
|
|
$8 = ($7|0)!=(45);
|
|
$or$cond3 = $or$cond & $8;
|
|
if ($or$cond3) {
|
|
$0 = 0;
|
|
$9 = $0;
|
|
STACKTOP = sp;return ($9|0);
|
|
} else {
|
|
$0 = 1;
|
|
$9 = $0;
|
|
STACKTOP = sp;return ($9|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_style_default($ctx) {
|
|
$ctx = $ctx|0;
|
|
var $0 = 0, $1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $0;
|
|
_nk_style_from_table($1,0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_style_from_table($ctx,$table) {
|
|
$ctx = $ctx|0;
|
|
$table = $table|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy10 = 0, $$byval_copy11 = 0, $$byval_copy12 = 0, $$byval_copy13 = 0, $$byval_copy14 = 0, $$byval_copy15 = 0, $$byval_copy16 = 0, $$byval_copy17 = 0, $$byval_copy18 = 0, $$byval_copy19 = 0, $$byval_copy2 = 0, $$byval_copy20 = 0, $$byval_copy21 = 0, $$byval_copy22 = 0, $$byval_copy23 = 0, $$byval_copy24 = 0, $$byval_copy25 = 0, $$byval_copy26 = 0;
|
|
var $$byval_copy27 = 0, $$byval_copy28 = 0, $$byval_copy29 = 0, $$byval_copy3 = 0, $$byval_copy30 = 0, $$byval_copy31 = 0, $$byval_copy32 = 0, $$byval_copy33 = 0, $$byval_copy34 = 0, $$byval_copy35 = 0, $$byval_copy36 = 0, $$byval_copy37 = 0, $$byval_copy38 = 0, $$byval_copy39 = 0, $$byval_copy4 = 0, $$byval_copy40 = 0, $$byval_copy41 = 0, $$byval_copy42 = 0, $$byval_copy43 = 0, $$byval_copy44 = 0;
|
|
var $$byval_copy45 = 0, $$byval_copy46 = 0, $$byval_copy47 = 0, $$byval_copy48 = 0, $$byval_copy49 = 0, $$byval_copy5 = 0, $$byval_copy50 = 0, $$byval_copy51 = 0, $$byval_copy52 = 0, $$byval_copy53 = 0, $$byval_copy54 = 0, $$byval_copy55 = 0, $$byval_copy56 = 0, $$byval_copy57 = 0, $$byval_copy58 = 0, $$byval_copy59 = 0, $$byval_copy6 = 0, $$byval_copy60 = 0, $$byval_copy61 = 0, $$byval_copy62 = 0;
|
|
var $$byval_copy63 = 0, $$byval_copy64 = 0, $$byval_copy65 = 0, $$byval_copy66 = 0, $$byval_copy67 = 0, $$byval_copy68 = 0, $$byval_copy69 = 0, $$byval_copy7 = 0, $$byval_copy70 = 0, $$byval_copy71 = 0, $$byval_copy72 = 0, $$byval_copy73 = 0, $$byval_copy74 = 0, $$byval_copy75 = 0, $$byval_copy76 = 0, $$byval_copy77 = 0, $$byval_copy78 = 0, $$byval_copy79 = 0, $$byval_copy8 = 0, $$byval_copy80 = 0;
|
|
var $$byval_copy81 = 0, $$byval_copy82 = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0;
|
|
var $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0;
|
|
var $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0;
|
|
var $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0;
|
|
var $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0;
|
|
var $1085 = 0, $1086 = 0, $1087 = 0, $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0;
|
|
var $1102 = 0, $1103 = 0, $1104 = 0, $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $1119 = 0, $112 = 0;
|
|
var $1120 = 0, $1121 = 0, $1122 = 0, $1123 = 0, $1124 = 0, $1125 = 0, $1126 = 0, $1127 = 0, $1128 = 0, $1129 = 0, $113 = 0, $1130 = 0, $1131 = 0, $1132 = 0, $1133 = 0, $1134 = 0, $1135 = 0, $1136 = 0, $1137 = 0, $1138 = 0;
|
|
var $1139 = 0, $114 = 0, $1140 = 0, $1141 = 0, $1142 = 0, $1143 = 0, $1144 = 0, $1145 = 0, $1146 = 0, $1147 = 0, $1148 = 0, $1149 = 0, $115 = 0, $1150 = 0, $1151 = 0, $1152 = 0, $1153 = 0, $1154 = 0, $1155 = 0, $1156 = 0;
|
|
var $1157 = 0, $1158 = 0, $1159 = 0, $116 = 0, $1160 = 0, $1161 = 0, $1162 = 0, $1163 = 0, $1164 = 0, $1165 = 0, $1166 = 0, $1167 = 0, $1168 = 0, $1169 = 0, $117 = 0, $1170 = 0, $1171 = 0, $1172 = 0, $1173 = 0, $1174 = 0;
|
|
var $1175 = 0, $1176 = 0, $1177 = 0, $1178 = 0, $1179 = 0, $118 = 0, $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0, $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0;
|
|
var $1193 = 0, $1194 = 0, $1195 = 0, $1196 = 0, $1197 = 0, $1198 = 0, $1199 = 0, $12 = 0, $120 = 0, $1200 = 0, $1201 = 0, $1202 = 0, $1203 = 0, $1204 = 0, $1205 = 0, $1206 = 0, $1207 = 0, $1208 = 0, $1209 = 0, $121 = 0;
|
|
var $1210 = 0, $1211 = 0, $1212 = 0, $1213 = 0, $1214 = 0, $1215 = 0, $1216 = 0, $1217 = 0, $1218 = 0, $1219 = 0, $122 = 0, $1220 = 0, $1221 = 0, $1222 = 0, $1223 = 0, $1224 = 0, $1225 = 0, $1226 = 0, $1227 = 0, $1228 = 0;
|
|
var $1229 = 0, $123 = 0, $1230 = 0, $1231 = 0, $1232 = 0, $1233 = 0, $1234 = 0, $1235 = 0, $1236 = 0, $1237 = 0, $1238 = 0, $1239 = 0, $124 = 0, $1240 = 0, $1241 = 0, $1242 = 0, $1243 = 0, $1244 = 0, $1245 = 0, $1246 = 0;
|
|
var $1247 = 0, $1248 = 0, $1249 = 0, $125 = 0, $1250 = 0, $1251 = 0, $1252 = 0, $1253 = 0, $1254 = 0, $1255 = 0, $1256 = 0, $1257 = 0, $1258 = 0, $1259 = 0, $126 = 0, $1260 = 0, $1261 = 0, $1262 = 0, $1263 = 0, $1264 = 0;
|
|
var $1265 = 0, $1266 = 0, $1267 = 0, $1268 = 0, $1269 = 0, $127 = 0, $1270 = 0, $1271 = 0, $1272 = 0, $1273 = 0, $1274 = 0, $1275 = 0, $1276 = 0, $1277 = 0, $1278 = 0, $1279 = 0, $128 = 0, $1280 = 0, $1281 = 0, $1282 = 0;
|
|
var $1283 = 0, $1284 = 0, $1285 = 0, $1286 = 0, $1287 = 0, $1288 = 0, $1289 = 0, $129 = 0, $1290 = 0, $1291 = 0, $1292 = 0, $1293 = 0, $1294 = 0, $1295 = 0, $1296 = 0, $1297 = 0, $1298 = 0, $1299 = 0, $13 = 0, $130 = 0;
|
|
var $1300 = 0, $1301 = 0, $1302 = 0, $1303 = 0, $1304 = 0, $1305 = 0, $1306 = 0, $1307 = 0, $1308 = 0, $1309 = 0, $131 = 0, $1310 = 0, $1311 = 0, $1312 = 0, $1313 = 0, $1314 = 0, $1315 = 0, $1316 = 0, $1317 = 0, $1318 = 0;
|
|
var $1319 = 0, $132 = 0, $1320 = 0, $1321 = 0, $1322 = 0, $1323 = 0, $1324 = 0, $1325 = 0, $1326 = 0, $1327 = 0, $1328 = 0, $1329 = 0, $133 = 0, $1330 = 0, $1331 = 0, $1332 = 0, $1333 = 0, $1334 = 0, $1335 = 0, $1336 = 0;
|
|
var $1337 = 0, $1338 = 0, $1339 = 0, $134 = 0, $1340 = 0, $1341 = 0, $1342 = 0, $1343 = 0, $1344 = 0, $1345 = 0, $1346 = 0, $1347 = 0, $1348 = 0, $1349 = 0, $135 = 0, $1350 = 0, $1351 = 0, $1352 = 0, $1353 = 0, $1354 = 0;
|
|
var $1355 = 0, $1356 = 0, $1357 = 0, $1358 = 0, $1359 = 0, $136 = 0, $1360 = 0, $1361 = 0, $1362 = 0, $1363 = 0, $1364 = 0, $1365 = 0, $1366 = 0, $1367 = 0, $1368 = 0, $1369 = 0, $137 = 0, $1370 = 0, $1371 = 0, $1372 = 0;
|
|
var $1373 = 0, $1374 = 0, $1375 = 0, $1376 = 0, $1377 = 0, $1378 = 0, $1379 = 0, $138 = 0, $1380 = 0, $1381 = 0, $1382 = 0, $1383 = 0, $1384 = 0, $1385 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0;
|
|
var $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0;
|
|
var $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0;
|
|
var $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0;
|
|
var $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0;
|
|
var $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0;
|
|
var $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0;
|
|
var $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0;
|
|
var $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0;
|
|
var $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0;
|
|
var $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0;
|
|
var $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0;
|
|
var $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0;
|
|
var $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0;
|
|
var $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0;
|
|
var $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0;
|
|
var $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0;
|
|
var $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0;
|
|
var $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0;
|
|
var $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0;
|
|
var $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0;
|
|
var $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0;
|
|
var $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0;
|
|
var $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0;
|
|
var $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0;
|
|
var $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0;
|
|
var $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0;
|
|
var $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0;
|
|
var $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0;
|
|
var $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0;
|
|
var $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0;
|
|
var $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0;
|
|
var $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0;
|
|
var $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0;
|
|
var $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0;
|
|
var $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0;
|
|
var $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0;
|
|
var $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0;
|
|
var $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0;
|
|
var $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0;
|
|
var $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0;
|
|
var $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0;
|
|
var $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0;
|
|
var $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0;
|
|
var $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0;
|
|
var $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0;
|
|
var $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0;
|
|
var $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0;
|
|
var $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $button = 0, $chart = 0, $combo = 0, $edit = 0, $prog = 0, $property = 0, $scroll = 0, $select = 0, $slider = 0, $style = 0, $tab = 0;
|
|
var $text = 0, $toggle = 0, $win = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 2768|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy82 = sp + 2756|0;
|
|
$$byval_copy81 = sp + 2752|0;
|
|
$$byval_copy80 = sp + 2748|0;
|
|
$$byval_copy79 = sp + 2744|0;
|
|
$$byval_copy78 = sp + 2740|0;
|
|
$$byval_copy77 = sp + 2736|0;
|
|
$$byval_copy76 = sp + 2732|0;
|
|
$$byval_copy75 = sp + 2728|0;
|
|
$$byval_copy74 = sp + 2724|0;
|
|
$$byval_copy73 = sp + 2720|0;
|
|
$$byval_copy72 = sp + 2716|0;
|
|
$$byval_copy71 = sp + 2712|0;
|
|
$$byval_copy70 = sp + 2708|0;
|
|
$$byval_copy69 = sp + 2704|0;
|
|
$$byval_copy68 = sp + 2700|0;
|
|
$$byval_copy67 = sp + 2696|0;
|
|
$$byval_copy66 = sp + 2692|0;
|
|
$$byval_copy65 = sp + 2688|0;
|
|
$$byval_copy64 = sp + 2684|0;
|
|
$$byval_copy63 = sp + 2680|0;
|
|
$$byval_copy62 = sp + 2676|0;
|
|
$$byval_copy61 = sp + 2672|0;
|
|
$$byval_copy60 = sp + 2668|0;
|
|
$$byval_copy59 = sp + 2664|0;
|
|
$$byval_copy58 = sp + 2660|0;
|
|
$$byval_copy57 = sp + 2656|0;
|
|
$$byval_copy56 = sp + 2652|0;
|
|
$$byval_copy55 = sp + 2648|0;
|
|
$$byval_copy54 = sp + 2644|0;
|
|
$$byval_copy53 = sp + 2640|0;
|
|
$$byval_copy52 = sp + 2636|0;
|
|
$$byval_copy51 = sp + 2632|0;
|
|
$$byval_copy50 = sp + 2628|0;
|
|
$$byval_copy49 = sp + 2624|0;
|
|
$$byval_copy48 = sp + 2620|0;
|
|
$$byval_copy47 = sp + 2616|0;
|
|
$$byval_copy46 = sp + 2612|0;
|
|
$$byval_copy45 = sp + 2608|0;
|
|
$$byval_copy44 = sp + 2604|0;
|
|
$$byval_copy43 = sp + 2600|0;
|
|
$$byval_copy42 = sp + 2596|0;
|
|
$$byval_copy41 = sp + 2592|0;
|
|
$$byval_copy40 = sp + 2588|0;
|
|
$$byval_copy39 = sp + 2584|0;
|
|
$$byval_copy38 = sp + 2580|0;
|
|
$$byval_copy37 = sp + 2576|0;
|
|
$$byval_copy36 = sp + 2572|0;
|
|
$$byval_copy35 = sp + 2568|0;
|
|
$$byval_copy34 = sp + 2564|0;
|
|
$$byval_copy33 = sp + 2560|0;
|
|
$$byval_copy32 = sp + 2556|0;
|
|
$$byval_copy31 = sp + 2552|0;
|
|
$$byval_copy30 = sp + 2548|0;
|
|
$$byval_copy29 = sp + 2544|0;
|
|
$$byval_copy28 = sp + 2540|0;
|
|
$$byval_copy27 = sp + 2536|0;
|
|
$$byval_copy26 = sp + 2532|0;
|
|
$$byval_copy25 = sp + 2528|0;
|
|
$$byval_copy24 = sp + 2524|0;
|
|
$$byval_copy23 = sp + 2520|0;
|
|
$$byval_copy22 = sp + 2516|0;
|
|
$$byval_copy21 = sp + 2512|0;
|
|
$$byval_copy20 = sp + 2508|0;
|
|
$$byval_copy19 = sp + 2504|0;
|
|
$$byval_copy18 = sp + 2500|0;
|
|
$$byval_copy17 = sp + 2496|0;
|
|
$$byval_copy16 = sp + 2492|0;
|
|
$$byval_copy15 = sp + 2488|0;
|
|
$$byval_copy14 = sp + 2484|0;
|
|
$$byval_copy13 = sp + 2480|0;
|
|
$$byval_copy12 = sp + 2476|0;
|
|
$$byval_copy11 = sp + 2472|0;
|
|
$$byval_copy10 = sp + 2468|0;
|
|
$$byval_copy9 = sp + 2464|0;
|
|
$$byval_copy8 = sp + 2460|0;
|
|
$$byval_copy7 = sp + 2456|0;
|
|
$$byval_copy6 = sp + 2452|0;
|
|
$$byval_copy5 = sp + 2448|0;
|
|
$$byval_copy4 = sp + 2444|0;
|
|
$$byval_copy3 = sp + 2440|0;
|
|
$$byval_copy2 = sp + 2436|0;
|
|
$$byval_copy1 = sp + 2432|0;
|
|
$$byval_copy = sp + 2428|0;
|
|
$2 = sp + 2256|0;
|
|
$3 = sp + 2232|0;
|
|
$4 = sp + 2212|0;
|
|
$5 = sp + 2192|0;
|
|
$6 = sp + 2184|0;
|
|
$7 = sp + 2176|0;
|
|
$8 = sp + 2168|0;
|
|
$9 = sp + 2164|0;
|
|
$10 = sp + 2144|0;
|
|
$11 = sp + 2124|0;
|
|
$12 = sp + 2104|0;
|
|
$13 = sp + 2096|0;
|
|
$14 = sp + 2088|0;
|
|
$15 = sp + 2084|0;
|
|
$16 = sp + 2064|0;
|
|
$17 = sp + 2044|0;
|
|
$18 = sp + 2024|0;
|
|
$19 = sp + 2016|0;
|
|
$20 = sp + 2008|0;
|
|
$21 = sp + 2000|0;
|
|
$22 = sp + 1980|0;
|
|
$23 = sp + 1960|0;
|
|
$24 = sp + 1940|0;
|
|
$25 = sp + 1920|0;
|
|
$26 = sp + 1900|0;
|
|
$27 = sp + 1896|0;
|
|
$28 = sp + 1888|0;
|
|
$29 = sp + 1880|0;
|
|
$30 = sp + 1860|0;
|
|
$31 = sp + 1840|0;
|
|
$32 = sp + 1820|0;
|
|
$33 = sp + 1800|0;
|
|
$34 = sp + 1780|0;
|
|
$35 = sp + 1776|0;
|
|
$36 = sp + 1768|0;
|
|
$37 = sp + 1760|0;
|
|
$38 = sp + 1740|0;
|
|
$39 = sp + 1720|0;
|
|
$40 = sp + 1700|0;
|
|
$41 = sp + 1680|0;
|
|
$42 = sp + 1660|0;
|
|
$43 = sp + 1640|0;
|
|
$44 = sp + 1632|0;
|
|
$45 = sp + 1624|0;
|
|
$46 = sp + 1616|0;
|
|
$47 = sp + 1596|0;
|
|
$48 = sp + 1576|0;
|
|
$49 = sp + 1556|0;
|
|
$50 = sp + 1536|0;
|
|
$51 = sp + 1516|0;
|
|
$52 = sp + 1496|0;
|
|
$53 = sp + 1488|0;
|
|
$54 = sp + 1480|0;
|
|
$55 = sp + 1472|0;
|
|
$56 = sp + 1468|0;
|
|
$57 = sp + 2424|0;
|
|
$58 = sp + 1448|0;
|
|
$59 = sp + 2420|0;
|
|
$60 = sp + 1428|0;
|
|
$61 = sp + 2416|0;
|
|
$62 = sp + 1408|0;
|
|
$63 = sp + 2412|0;
|
|
$64 = sp + 2408|0;
|
|
$65 = sp + 2404|0;
|
|
$66 = sp + 2400|0;
|
|
$67 = sp + 2396|0;
|
|
$68 = sp + 1400|0;
|
|
$69 = sp + 1392|0;
|
|
$70 = sp + 1388|0;
|
|
$71 = sp + 1368|0;
|
|
$72 = sp + 1348|0;
|
|
$73 = sp + 1328|0;
|
|
$74 = sp + 1308|0;
|
|
$75 = sp + 1288|0;
|
|
$76 = sp + 1268|0;
|
|
$77 = sp + 2392|0;
|
|
$78 = sp + 2388|0;
|
|
$79 = sp + 1264|0;
|
|
$80 = sp + 1256|0;
|
|
$81 = sp + 1232|0;
|
|
$82 = sp + 1212|0;
|
|
$83 = sp + 1192|0;
|
|
$84 = sp + 1172|0;
|
|
$85 = sp + 1152|0;
|
|
$86 = sp + 1132|0;
|
|
$87 = sp + 1128|0;
|
|
$88 = sp + 1120|0;
|
|
$89 = sp + 2384|0;
|
|
$90 = sp + 1096|0;
|
|
$91 = sp + 2380|0;
|
|
$92 = sp + 1076|0;
|
|
$93 = sp + 2376|0;
|
|
$94 = sp + 1056|0;
|
|
$95 = sp + 2372|0;
|
|
$96 = sp + 2368|0;
|
|
$97 = sp + 2364|0;
|
|
$98 = sp + 2360|0;
|
|
$99 = sp + 2356|0;
|
|
$100 = sp + 1048|0;
|
|
$101 = sp + 1040|0;
|
|
$102 = sp + 1036|0;
|
|
$103 = sp + 1016|0;
|
|
$104 = sp + 996|0;
|
|
$105 = sp + 976|0;
|
|
$106 = sp + 968|0;
|
|
$107 = sp + 948|0;
|
|
$108 = sp + 928|0;
|
|
$109 = sp + 908|0;
|
|
$110 = sp + 904|0;
|
|
$111 = sp + 896|0;
|
|
$112 = sp + 872|0;
|
|
$113 = sp + 852|0;
|
|
$114 = sp + 832|0;
|
|
$115 = sp + 2352|0;
|
|
$116 = sp + 824|0;
|
|
$117 = sp + 816|0;
|
|
$118 = sp + 812|0;
|
|
$119 = sp + 792|0;
|
|
$120 = sp + 772|0;
|
|
$121 = sp + 752|0;
|
|
$122 = sp + 2348|0;
|
|
$123 = sp + 744|0;
|
|
$124 = sp + 720|0;
|
|
$125 = sp + 712|0;
|
|
$126 = sp + 688|0;
|
|
$127 = sp + 668|0;
|
|
$128 = sp + 648|0;
|
|
$129 = sp + 640|0;
|
|
$130 = sp + 632|0;
|
|
$131 = sp + 624|0;
|
|
$132 = sp + 600|0;
|
|
$133 = sp + 580|0;
|
|
$134 = sp + 560|0;
|
|
$135 = sp + 2344|0;
|
|
$136 = sp + 552|0;
|
|
$137 = sp + 544|0;
|
|
$138 = sp + 540|0;
|
|
$139 = sp + 520|0;
|
|
$140 = sp + 512|0;
|
|
$141 = sp + 504|0;
|
|
$142 = sp + 480|0;
|
|
$143 = sp + 460|0;
|
|
$144 = sp + 440|0;
|
|
$145 = sp + 2340|0;
|
|
$146 = sp + 432|0;
|
|
$147 = sp + 424|0;
|
|
$148 = sp + 420|0;
|
|
$149 = sp + 400|0;
|
|
$150 = sp + 380|0;
|
|
$151 = sp + 360|0;
|
|
$152 = sp + 2336|0;
|
|
$153 = sp + 352|0;
|
|
$154 = sp + 344|0;
|
|
$155 = sp + 340|0;
|
|
$156 = sp + 320|0;
|
|
$157 = sp + 300|0;
|
|
$158 = sp + 280|0;
|
|
$159 = sp + 272|0;
|
|
$160 = sp + 264|0;
|
|
$161 = sp + 256|0;
|
|
$162 = sp + 232|0;
|
|
$163 = sp + 212|0;
|
|
$164 = sp + 192|0;
|
|
$165 = sp + 2332|0;
|
|
$166 = sp + 184|0;
|
|
$167 = sp + 176|0;
|
|
$168 = sp + 172|0;
|
|
$169 = sp + 152|0;
|
|
$170 = sp + 132|0;
|
|
$171 = sp + 112|0;
|
|
$172 = sp + 2328|0;
|
|
$173 = sp + 104|0;
|
|
$174 = sp + 96|0;
|
|
$175 = sp + 88|0;
|
|
$176 = sp + 68|0;
|
|
$177 = sp + 48|0;
|
|
$178 = sp + 40|0;
|
|
$179 = sp + 32|0;
|
|
$180 = sp + 24|0;
|
|
$181 = sp + 16|0;
|
|
$182 = sp + 8|0;
|
|
$183 = sp;
|
|
$0 = $ctx;
|
|
$1 = $table;
|
|
$184 = $0;
|
|
$185 = ($184|0)!=(0|0);
|
|
if (!($185)) {
|
|
___assert_fail((14913|0),(13400|0),13755,(28105|0));
|
|
// unreachable;
|
|
}
|
|
$186 = $0;
|
|
$187 = ($186|0)!=(0|0);
|
|
if (!($187)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$188 = $0;
|
|
$189 = ((($188)) + 300|0);
|
|
$style = $189;
|
|
$190 = $1;
|
|
$191 = ($190|0)!=(0|0);
|
|
$192 = $1;
|
|
$193 = $191 ? $192 : 28125;
|
|
$1 = $193;
|
|
$194 = $style;
|
|
$195 = ((($194)) + 20|0);
|
|
$text = $195;
|
|
$196 = $text;
|
|
$197 = $1;
|
|
;HEAP8[$196>>0]=HEAP8[$197>>0]|0;HEAP8[$196+1>>0]=HEAP8[$197+1>>0]|0;HEAP8[$196+2>>0]=HEAP8[$197+2>>0]|0;HEAP8[$196+3>>0]=HEAP8[$197+3>>0]|0;
|
|
$198 = $text;
|
|
$199 = ((($198)) + 4|0);
|
|
_nk_vec2($2,4.0,4.0);
|
|
;HEAP32[$199>>2]=HEAP32[$2>>2]|0;HEAP32[$199+4>>2]=HEAP32[$2+4>>2]|0;
|
|
$200 = $style;
|
|
$201 = ((($200)) + 32|0);
|
|
$button = $201;
|
|
$202 = $button;
|
|
_nk_zero($202,128);
|
|
$203 = $button;
|
|
$204 = $1;
|
|
$205 = ((($204)) + 16|0);
|
|
;HEAP8[$$byval_copy>>0]=HEAP8[$205>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$205+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$205+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$205+3>>0]|0;
|
|
_nk_style_item_color($3,$$byval_copy);
|
|
;HEAP32[$203>>2]=HEAP32[$3>>2]|0;HEAP32[$203+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$203+8>>2]=HEAP32[$3+8>>2]|0;HEAP32[$203+12>>2]=HEAP32[$3+12>>2]|0;HEAP32[$203+16>>2]=HEAP32[$3+16>>2]|0;
|
|
$206 = $button;
|
|
$207 = ((($206)) + 20|0);
|
|
$208 = $1;
|
|
$209 = ((($208)) + 20|0);
|
|
;HEAP8[$$byval_copy1>>0]=HEAP8[$209>>0]|0;HEAP8[$$byval_copy1+1>>0]=HEAP8[$209+1>>0]|0;HEAP8[$$byval_copy1+2>>0]=HEAP8[$209+2>>0]|0;HEAP8[$$byval_copy1+3>>0]=HEAP8[$209+3>>0]|0;
|
|
_nk_style_item_color($4,$$byval_copy1);
|
|
;HEAP32[$207>>2]=HEAP32[$4>>2]|0;HEAP32[$207+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$207+8>>2]=HEAP32[$4+8>>2]|0;HEAP32[$207+12>>2]=HEAP32[$4+12>>2]|0;HEAP32[$207+16>>2]=HEAP32[$4+16>>2]|0;
|
|
$210 = $button;
|
|
$211 = ((($210)) + 40|0);
|
|
$212 = $1;
|
|
$213 = ((($212)) + 24|0);
|
|
;HEAP8[$$byval_copy2>>0]=HEAP8[$213>>0]|0;HEAP8[$$byval_copy2+1>>0]=HEAP8[$213+1>>0]|0;HEAP8[$$byval_copy2+2>>0]=HEAP8[$213+2>>0]|0;HEAP8[$$byval_copy2+3>>0]=HEAP8[$213+3>>0]|0;
|
|
_nk_style_item_color($5,$$byval_copy2);
|
|
;HEAP32[$211>>2]=HEAP32[$5>>2]|0;HEAP32[$211+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$211+8>>2]=HEAP32[$5+8>>2]|0;HEAP32[$211+12>>2]=HEAP32[$5+12>>2]|0;HEAP32[$211+16>>2]=HEAP32[$5+16>>2]|0;
|
|
$214 = $button;
|
|
$215 = ((($214)) + 60|0);
|
|
$216 = $1;
|
|
$217 = ((($216)) + 12|0);
|
|
;HEAP8[$215>>0]=HEAP8[$217>>0]|0;HEAP8[$215+1>>0]=HEAP8[$217+1>>0]|0;HEAP8[$215+2>>0]=HEAP8[$217+2>>0]|0;HEAP8[$215+3>>0]=HEAP8[$217+3>>0]|0;
|
|
$218 = $button;
|
|
$219 = ((($218)) + 64|0);
|
|
$220 = $1;
|
|
$221 = ((($220)) + 16|0);
|
|
;HEAP8[$219>>0]=HEAP8[$221>>0]|0;HEAP8[$219+1>>0]=HEAP8[$221+1>>0]|0;HEAP8[$219+2>>0]=HEAP8[$221+2>>0]|0;HEAP8[$219+3>>0]=HEAP8[$221+3>>0]|0;
|
|
$222 = $button;
|
|
$223 = ((($222)) + 68|0);
|
|
$224 = $1;
|
|
;HEAP8[$223>>0]=HEAP8[$224>>0]|0;HEAP8[$223+1>>0]=HEAP8[$224+1>>0]|0;HEAP8[$223+2>>0]=HEAP8[$224+2>>0]|0;HEAP8[$223+3>>0]=HEAP8[$224+3>>0]|0;
|
|
$225 = $button;
|
|
$226 = ((($225)) + 72|0);
|
|
$227 = $1;
|
|
;HEAP8[$226>>0]=HEAP8[$227>>0]|0;HEAP8[$226+1>>0]=HEAP8[$227+1>>0]|0;HEAP8[$226+2>>0]=HEAP8[$227+2>>0]|0;HEAP8[$226+3>>0]=HEAP8[$227+3>>0]|0;
|
|
$228 = $button;
|
|
$229 = ((($228)) + 76|0);
|
|
$230 = $1;
|
|
;HEAP8[$229>>0]=HEAP8[$230>>0]|0;HEAP8[$229+1>>0]=HEAP8[$230+1>>0]|0;HEAP8[$229+2>>0]=HEAP8[$230+2>>0]|0;HEAP8[$229+3>>0]=HEAP8[$230+3>>0]|0;
|
|
$231 = $button;
|
|
$232 = ((($231)) + 92|0);
|
|
_nk_vec2($6,4.0,4.0);
|
|
;HEAP32[$232>>2]=HEAP32[$6>>2]|0;HEAP32[$232+4>>2]=HEAP32[$6+4>>2]|0;
|
|
$233 = $button;
|
|
$234 = ((($233)) + 100|0);
|
|
_nk_vec2($7,0.0,0.0);
|
|
;HEAP32[$234>>2]=HEAP32[$7>>2]|0;HEAP32[$234+4>>2]=HEAP32[$7+4>>2]|0;
|
|
$235 = $button;
|
|
$236 = ((($235)) + 108|0);
|
|
_nk_vec2($8,0.0,0.0);
|
|
;HEAP32[$236>>2]=HEAP32[$8>>2]|0;HEAP32[$236+4>>2]=HEAP32[$8+4>>2]|0;
|
|
$237 = $button;
|
|
$238 = ((($237)) + 116|0);
|
|
_nk_handle_ptr($9,0);
|
|
;HEAP32[$238>>2]=HEAP32[$9>>2]|0;
|
|
$239 = $button;
|
|
$240 = ((($239)) + 80|0);
|
|
HEAP32[$240>>2] = 18;
|
|
$241 = $button;
|
|
$242 = ((($241)) + 84|0);
|
|
HEAPF32[$242>>2] = 1.0;
|
|
$243 = $button;
|
|
$244 = ((($243)) + 88|0);
|
|
HEAPF32[$244>>2] = 4.0;
|
|
$245 = $button;
|
|
$246 = ((($245)) + 120|0);
|
|
HEAP32[$246>>2] = 0;
|
|
$247 = $button;
|
|
$248 = ((($247)) + 124|0);
|
|
HEAP32[$248>>2] = 0;
|
|
$249 = $style;
|
|
$250 = ((($249)) + 160|0);
|
|
$button = $250;
|
|
$251 = $button;
|
|
_nk_zero($251,128);
|
|
$252 = $button;
|
|
$253 = $1;
|
|
$254 = ((($253)) + 4|0);
|
|
;HEAP8[$$byval_copy3>>0]=HEAP8[$254>>0]|0;HEAP8[$$byval_copy3+1>>0]=HEAP8[$254+1>>0]|0;HEAP8[$$byval_copy3+2>>0]=HEAP8[$254+2>>0]|0;HEAP8[$$byval_copy3+3>>0]=HEAP8[$254+3>>0]|0;
|
|
_nk_style_item_color($10,$$byval_copy3);
|
|
;HEAP32[$252>>2]=HEAP32[$10>>2]|0;HEAP32[$252+4>>2]=HEAP32[$10+4>>2]|0;HEAP32[$252+8>>2]=HEAP32[$10+8>>2]|0;HEAP32[$252+12>>2]=HEAP32[$10+12>>2]|0;HEAP32[$252+16>>2]=HEAP32[$10+16>>2]|0;
|
|
$255 = $button;
|
|
$256 = ((($255)) + 20|0);
|
|
$257 = $1;
|
|
$258 = ((($257)) + 20|0);
|
|
;HEAP8[$$byval_copy4>>0]=HEAP8[$258>>0]|0;HEAP8[$$byval_copy4+1>>0]=HEAP8[$258+1>>0]|0;HEAP8[$$byval_copy4+2>>0]=HEAP8[$258+2>>0]|0;HEAP8[$$byval_copy4+3>>0]=HEAP8[$258+3>>0]|0;
|
|
_nk_style_item_color($11,$$byval_copy4);
|
|
;HEAP32[$256>>2]=HEAP32[$11>>2]|0;HEAP32[$256+4>>2]=HEAP32[$11+4>>2]|0;HEAP32[$256+8>>2]=HEAP32[$11+8>>2]|0;HEAP32[$256+12>>2]=HEAP32[$11+12>>2]|0;HEAP32[$256+16>>2]=HEAP32[$11+16>>2]|0;
|
|
$259 = $button;
|
|
$260 = ((($259)) + 40|0);
|
|
$261 = $1;
|
|
$262 = ((($261)) + 24|0);
|
|
;HEAP8[$$byval_copy5>>0]=HEAP8[$262>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$262+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$262+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$262+3>>0]|0;
|
|
_nk_style_item_color($12,$$byval_copy5);
|
|
;HEAP32[$260>>2]=HEAP32[$12>>2]|0;HEAP32[$260+4>>2]=HEAP32[$12+4>>2]|0;HEAP32[$260+8>>2]=HEAP32[$12+8>>2]|0;HEAP32[$260+12>>2]=HEAP32[$12+12>>2]|0;HEAP32[$260+16>>2]=HEAP32[$12+16>>2]|0;
|
|
$263 = $button;
|
|
$264 = ((($263)) + 60|0);
|
|
$265 = $1;
|
|
$266 = ((($265)) + 4|0);
|
|
;HEAP8[$264>>0]=HEAP8[$266>>0]|0;HEAP8[$264+1>>0]=HEAP8[$266+1>>0]|0;HEAP8[$264+2>>0]=HEAP8[$266+2>>0]|0;HEAP8[$264+3>>0]=HEAP8[$266+3>>0]|0;
|
|
$267 = $button;
|
|
$268 = ((($267)) + 64|0);
|
|
$269 = $1;
|
|
$270 = ((($269)) + 4|0);
|
|
;HEAP8[$268>>0]=HEAP8[$270>>0]|0;HEAP8[$268+1>>0]=HEAP8[$270+1>>0]|0;HEAP8[$268+2>>0]=HEAP8[$270+2>>0]|0;HEAP8[$268+3>>0]=HEAP8[$270+3>>0]|0;
|
|
$271 = $button;
|
|
$272 = ((($271)) + 68|0);
|
|
$273 = $1;
|
|
;HEAP8[$272>>0]=HEAP8[$273>>0]|0;HEAP8[$272+1>>0]=HEAP8[$273+1>>0]|0;HEAP8[$272+2>>0]=HEAP8[$273+2>>0]|0;HEAP8[$272+3>>0]=HEAP8[$273+3>>0]|0;
|
|
$274 = $button;
|
|
$275 = ((($274)) + 72|0);
|
|
$276 = $1;
|
|
;HEAP8[$275>>0]=HEAP8[$276>>0]|0;HEAP8[$275+1>>0]=HEAP8[$276+1>>0]|0;HEAP8[$275+2>>0]=HEAP8[$276+2>>0]|0;HEAP8[$275+3>>0]=HEAP8[$276+3>>0]|0;
|
|
$277 = $button;
|
|
$278 = ((($277)) + 76|0);
|
|
$279 = $1;
|
|
;HEAP8[$278>>0]=HEAP8[$279>>0]|0;HEAP8[$278+1>>0]=HEAP8[$279+1>>0]|0;HEAP8[$278+2>>0]=HEAP8[$279+2>>0]|0;HEAP8[$278+3>>0]=HEAP8[$279+3>>0]|0;
|
|
$280 = $button;
|
|
$281 = ((($280)) + 92|0);
|
|
_nk_vec2($13,4.0,4.0);
|
|
;HEAP32[$281>>2]=HEAP32[$13>>2]|0;HEAP32[$281+4>>2]=HEAP32[$13+4>>2]|0;
|
|
$282 = $button;
|
|
$283 = ((($282)) + 108|0);
|
|
_nk_vec2($14,0.0,0.0);
|
|
;HEAP32[$283>>2]=HEAP32[$14>>2]|0;HEAP32[$283+4>>2]=HEAP32[$14+4>>2]|0;
|
|
$284 = $button;
|
|
$285 = ((($284)) + 116|0);
|
|
_nk_handle_ptr($15,0);
|
|
;HEAP32[$285>>2]=HEAP32[$15>>2]|0;
|
|
$286 = $button;
|
|
$287 = ((($286)) + 80|0);
|
|
HEAP32[$287>>2] = 18;
|
|
$288 = $button;
|
|
$289 = ((($288)) + 84|0);
|
|
HEAPF32[$289>>2] = 0.0;
|
|
$290 = $button;
|
|
$291 = ((($290)) + 88|0);
|
|
HEAPF32[$291>>2] = 0.0;
|
|
$292 = $button;
|
|
$293 = ((($292)) + 120|0);
|
|
HEAP32[$293>>2] = 0;
|
|
$294 = $button;
|
|
$295 = ((($294)) + 124|0);
|
|
HEAP32[$295>>2] = 0;
|
|
$296 = $style;
|
|
$297 = ((($296)) + 288|0);
|
|
$button = $297;
|
|
$298 = $button;
|
|
_nk_zero($298,128);
|
|
$299 = $button;
|
|
$300 = $1;
|
|
$301 = ((($300)) + 4|0);
|
|
;HEAP8[$$byval_copy6>>0]=HEAP8[$301>>0]|0;HEAP8[$$byval_copy6+1>>0]=HEAP8[$301+1>>0]|0;HEAP8[$$byval_copy6+2>>0]=HEAP8[$301+2>>0]|0;HEAP8[$$byval_copy6+3>>0]=HEAP8[$301+3>>0]|0;
|
|
_nk_style_item_color($16,$$byval_copy6);
|
|
;HEAP32[$299>>2]=HEAP32[$16>>2]|0;HEAP32[$299+4>>2]=HEAP32[$16+4>>2]|0;HEAP32[$299+8>>2]=HEAP32[$16+8>>2]|0;HEAP32[$299+12>>2]=HEAP32[$16+12>>2]|0;HEAP32[$299+16>>2]=HEAP32[$16+16>>2]|0;
|
|
$302 = $button;
|
|
$303 = ((($302)) + 20|0);
|
|
$304 = $1;
|
|
$305 = ((($304)) + 4|0);
|
|
;HEAP8[$$byval_copy7>>0]=HEAP8[$305>>0]|0;HEAP8[$$byval_copy7+1>>0]=HEAP8[$305+1>>0]|0;HEAP8[$$byval_copy7+2>>0]=HEAP8[$305+2>>0]|0;HEAP8[$$byval_copy7+3>>0]=HEAP8[$305+3>>0]|0;
|
|
_nk_style_item_color($17,$$byval_copy7);
|
|
;HEAP32[$303>>2]=HEAP32[$17>>2]|0;HEAP32[$303+4>>2]=HEAP32[$17+4>>2]|0;HEAP32[$303+8>>2]=HEAP32[$17+8>>2]|0;HEAP32[$303+12>>2]=HEAP32[$17+12>>2]|0;HEAP32[$303+16>>2]=HEAP32[$17+16>>2]|0;
|
|
$306 = $button;
|
|
$307 = ((($306)) + 40|0);
|
|
$308 = $1;
|
|
$309 = ((($308)) + 4|0);
|
|
;HEAP8[$$byval_copy8>>0]=HEAP8[$309>>0]|0;HEAP8[$$byval_copy8+1>>0]=HEAP8[$309+1>>0]|0;HEAP8[$$byval_copy8+2>>0]=HEAP8[$309+2>>0]|0;HEAP8[$$byval_copy8+3>>0]=HEAP8[$309+3>>0]|0;
|
|
_nk_style_item_color($18,$$byval_copy8);
|
|
;HEAP32[$307>>2]=HEAP32[$18>>2]|0;HEAP32[$307+4>>2]=HEAP32[$18+4>>2]|0;HEAP32[$307+8>>2]=HEAP32[$18+8>>2]|0;HEAP32[$307+12>>2]=HEAP32[$18+12>>2]|0;HEAP32[$307+16>>2]=HEAP32[$18+16>>2]|0;
|
|
$310 = $button;
|
|
$311 = ((($310)) + 60|0);
|
|
$312 = $1;
|
|
$313 = ((($312)) + 4|0);
|
|
;HEAP8[$311>>0]=HEAP8[$313>>0]|0;HEAP8[$311+1>>0]=HEAP8[$313+1>>0]|0;HEAP8[$311+2>>0]=HEAP8[$313+2>>0]|0;HEAP8[$311+3>>0]=HEAP8[$313+3>>0]|0;
|
|
$314 = $button;
|
|
$315 = ((($314)) + 64|0);
|
|
$316 = $1;
|
|
$317 = ((($316)) + 4|0);
|
|
;HEAP8[$315>>0]=HEAP8[$317>>0]|0;HEAP8[$315+1>>0]=HEAP8[$317+1>>0]|0;HEAP8[$315+2>>0]=HEAP8[$317+2>>0]|0;HEAP8[$315+3>>0]=HEAP8[$317+3>>0]|0;
|
|
$318 = $button;
|
|
$319 = ((($318)) + 68|0);
|
|
$320 = $1;
|
|
;HEAP8[$319>>0]=HEAP8[$320>>0]|0;HEAP8[$319+1>>0]=HEAP8[$320+1>>0]|0;HEAP8[$319+2>>0]=HEAP8[$320+2>>0]|0;HEAP8[$319+3>>0]=HEAP8[$320+3>>0]|0;
|
|
$321 = $button;
|
|
$322 = ((($321)) + 72|0);
|
|
$323 = $1;
|
|
;HEAP8[$322>>0]=HEAP8[$323>>0]|0;HEAP8[$322+1>>0]=HEAP8[$323+1>>0]|0;HEAP8[$322+2>>0]=HEAP8[$323+2>>0]|0;HEAP8[$322+3>>0]=HEAP8[$323+3>>0]|0;
|
|
$324 = $button;
|
|
$325 = ((($324)) + 76|0);
|
|
$326 = $1;
|
|
;HEAP8[$325>>0]=HEAP8[$326>>0]|0;HEAP8[$325+1>>0]=HEAP8[$326+1>>0]|0;HEAP8[$325+2>>0]=HEAP8[$326+2>>0]|0;HEAP8[$325+3>>0]=HEAP8[$326+3>>0]|0;
|
|
$327 = $button;
|
|
$328 = ((($327)) + 92|0);
|
|
_nk_vec2($19,4.0,4.0);
|
|
;HEAP32[$328>>2]=HEAP32[$19>>2]|0;HEAP32[$328+4>>2]=HEAP32[$19+4>>2]|0;
|
|
$329 = $button;
|
|
$330 = ((($329)) + 108|0);
|
|
_nk_vec2($20,0.0,0.0);
|
|
;HEAP32[$330>>2]=HEAP32[$20>>2]|0;HEAP32[$330+4>>2]=HEAP32[$20+4>>2]|0;
|
|
$331 = $button;
|
|
$332 = ((($331)) + 116|0);
|
|
_nk_handle_ptr($21,0);
|
|
;HEAP32[$332>>2]=HEAP32[$21>>2]|0;
|
|
$333 = $button;
|
|
$334 = ((($333)) + 80|0);
|
|
HEAP32[$334>>2] = 18;
|
|
$335 = $button;
|
|
$336 = ((($335)) + 84|0);
|
|
HEAPF32[$336>>2] = 0.0;
|
|
$337 = $button;
|
|
$338 = ((($337)) + 88|0);
|
|
HEAPF32[$338>>2] = 1.0;
|
|
$339 = $button;
|
|
$340 = ((($339)) + 120|0);
|
|
HEAP32[$340>>2] = 0;
|
|
$341 = $button;
|
|
$342 = ((($341)) + 124|0);
|
|
HEAP32[$342>>2] = 0;
|
|
$343 = $style;
|
|
$344 = ((($343)) + 564|0);
|
|
$toggle = $344;
|
|
$345 = $toggle;
|
|
_nk_zero($345,148);
|
|
$346 = $toggle;
|
|
$347 = $1;
|
|
$348 = ((($347)) + 28|0);
|
|
;HEAP8[$$byval_copy9>>0]=HEAP8[$348>>0]|0;HEAP8[$$byval_copy9+1>>0]=HEAP8[$348+1>>0]|0;HEAP8[$$byval_copy9+2>>0]=HEAP8[$348+2>>0]|0;HEAP8[$$byval_copy9+3>>0]=HEAP8[$348+3>>0]|0;
|
|
_nk_style_item_color($22,$$byval_copy9);
|
|
;HEAP32[$346>>2]=HEAP32[$22>>2]|0;HEAP32[$346+4>>2]=HEAP32[$22+4>>2]|0;HEAP32[$346+8>>2]=HEAP32[$22+8>>2]|0;HEAP32[$346+12>>2]=HEAP32[$22+12>>2]|0;HEAP32[$346+16>>2]=HEAP32[$22+16>>2]|0;
|
|
$349 = $toggle;
|
|
$350 = ((($349)) + 20|0);
|
|
$351 = $1;
|
|
$352 = ((($351)) + 32|0);
|
|
;HEAP8[$$byval_copy10>>0]=HEAP8[$352>>0]|0;HEAP8[$$byval_copy10+1>>0]=HEAP8[$352+1>>0]|0;HEAP8[$$byval_copy10+2>>0]=HEAP8[$352+2>>0]|0;HEAP8[$$byval_copy10+3>>0]=HEAP8[$352+3>>0]|0;
|
|
_nk_style_item_color($23,$$byval_copy10);
|
|
;HEAP32[$350>>2]=HEAP32[$23>>2]|0;HEAP32[$350+4>>2]=HEAP32[$23+4>>2]|0;HEAP32[$350+8>>2]=HEAP32[$23+8>>2]|0;HEAP32[$350+12>>2]=HEAP32[$23+12>>2]|0;HEAP32[$350+16>>2]=HEAP32[$23+16>>2]|0;
|
|
$353 = $toggle;
|
|
$354 = ((($353)) + 40|0);
|
|
$355 = $1;
|
|
$356 = ((($355)) + 32|0);
|
|
;HEAP8[$$byval_copy11>>0]=HEAP8[$356>>0]|0;HEAP8[$$byval_copy11+1>>0]=HEAP8[$356+1>>0]|0;HEAP8[$$byval_copy11+2>>0]=HEAP8[$356+2>>0]|0;HEAP8[$$byval_copy11+3>>0]=HEAP8[$356+3>>0]|0;
|
|
_nk_style_item_color($24,$$byval_copy11);
|
|
;HEAP32[$354>>2]=HEAP32[$24>>2]|0;HEAP32[$354+4>>2]=HEAP32[$24+4>>2]|0;HEAP32[$354+8>>2]=HEAP32[$24+8>>2]|0;HEAP32[$354+12>>2]=HEAP32[$24+12>>2]|0;HEAP32[$354+16>>2]=HEAP32[$24+16>>2]|0;
|
|
$357 = $toggle;
|
|
$358 = ((($357)) + 60|0);
|
|
$359 = $1;
|
|
$360 = ((($359)) + 36|0);
|
|
;HEAP8[$$byval_copy12>>0]=HEAP8[$360>>0]|0;HEAP8[$$byval_copy12+1>>0]=HEAP8[$360+1>>0]|0;HEAP8[$$byval_copy12+2>>0]=HEAP8[$360+2>>0]|0;HEAP8[$$byval_copy12+3>>0]=HEAP8[$360+3>>0]|0;
|
|
_nk_style_item_color($25,$$byval_copy12);
|
|
;HEAP32[$358>>2]=HEAP32[$25>>2]|0;HEAP32[$358+4>>2]=HEAP32[$25+4>>2]|0;HEAP32[$358+8>>2]=HEAP32[$25+8>>2]|0;HEAP32[$358+12>>2]=HEAP32[$25+12>>2]|0;HEAP32[$358+16>>2]=HEAP32[$25+16>>2]|0;
|
|
$361 = $toggle;
|
|
$362 = ((($361)) + 80|0);
|
|
$363 = $1;
|
|
$364 = ((($363)) + 36|0);
|
|
;HEAP8[$$byval_copy13>>0]=HEAP8[$364>>0]|0;HEAP8[$$byval_copy13+1>>0]=HEAP8[$364+1>>0]|0;HEAP8[$$byval_copy13+2>>0]=HEAP8[$364+2>>0]|0;HEAP8[$$byval_copy13+3>>0]=HEAP8[$364+3>>0]|0;
|
|
_nk_style_item_color($26,$$byval_copy13);
|
|
;HEAP32[$362>>2]=HEAP32[$26>>2]|0;HEAP32[$362+4>>2]=HEAP32[$26+4>>2]|0;HEAP32[$362+8>>2]=HEAP32[$26+8>>2]|0;HEAP32[$362+12>>2]=HEAP32[$26+12>>2]|0;HEAP32[$362+16>>2]=HEAP32[$26+16>>2]|0;
|
|
$365 = $toggle;
|
|
$366 = ((($365)) + 136|0);
|
|
_nk_handle_ptr($27,0);
|
|
;HEAP32[$366>>2]=HEAP32[$27>>2]|0;
|
|
$367 = $toggle;
|
|
$368 = ((($367)) + 112|0);
|
|
$369 = $1;
|
|
$370 = ((($369)) + 4|0);
|
|
;HEAP8[$368>>0]=HEAP8[$370>>0]|0;HEAP8[$368+1>>0]=HEAP8[$370+1>>0]|0;HEAP8[$368+2>>0]=HEAP8[$370+2>>0]|0;HEAP8[$368+3>>0]=HEAP8[$370+3>>0]|0;
|
|
$371 = $toggle;
|
|
$372 = ((($371)) + 100|0);
|
|
$373 = $1;
|
|
;HEAP8[$372>>0]=HEAP8[$373>>0]|0;HEAP8[$372+1>>0]=HEAP8[$373+1>>0]|0;HEAP8[$372+2>>0]=HEAP8[$373+2>>0]|0;HEAP8[$372+3>>0]=HEAP8[$373+3>>0]|0;
|
|
$374 = $toggle;
|
|
$375 = ((($374)) + 104|0);
|
|
$376 = $1;
|
|
;HEAP8[$375>>0]=HEAP8[$376>>0]|0;HEAP8[$375+1>>0]=HEAP8[$376+1>>0]|0;HEAP8[$375+2>>0]=HEAP8[$376+2>>0]|0;HEAP8[$375+3>>0]=HEAP8[$376+3>>0]|0;
|
|
$377 = $toggle;
|
|
$378 = ((($377)) + 108|0);
|
|
$379 = $1;
|
|
;HEAP8[$378>>0]=HEAP8[$379>>0]|0;HEAP8[$378+1>>0]=HEAP8[$379+1>>0]|0;HEAP8[$378+2>>0]=HEAP8[$379+2>>0]|0;HEAP8[$378+3>>0]=HEAP8[$379+3>>0]|0;
|
|
$380 = $toggle;
|
|
$381 = ((($380)) + 120|0);
|
|
_nk_vec2($28,4.0,4.0);
|
|
;HEAP32[$381>>2]=HEAP32[$28>>2]|0;HEAP32[$381+4>>2]=HEAP32[$28+4>>2]|0;
|
|
$382 = $toggle;
|
|
$383 = ((($382)) + 128|0);
|
|
_nk_vec2($29,0.0,0.0);
|
|
;HEAP32[$383>>2]=HEAP32[$29>>2]|0;HEAP32[$383+4>>2]=HEAP32[$29+4>>2]|0;
|
|
$384 = $style;
|
|
$385 = ((($384)) + 416|0);
|
|
$toggle = $385;
|
|
$386 = $toggle;
|
|
_nk_zero($386,148);
|
|
$387 = $toggle;
|
|
$388 = $1;
|
|
$389 = ((($388)) + 28|0);
|
|
;HEAP8[$$byval_copy14>>0]=HEAP8[$389>>0]|0;HEAP8[$$byval_copy14+1>>0]=HEAP8[$389+1>>0]|0;HEAP8[$$byval_copy14+2>>0]=HEAP8[$389+2>>0]|0;HEAP8[$$byval_copy14+3>>0]=HEAP8[$389+3>>0]|0;
|
|
_nk_style_item_color($30,$$byval_copy14);
|
|
;HEAP32[$387>>2]=HEAP32[$30>>2]|0;HEAP32[$387+4>>2]=HEAP32[$30+4>>2]|0;HEAP32[$387+8>>2]=HEAP32[$30+8>>2]|0;HEAP32[$387+12>>2]=HEAP32[$30+12>>2]|0;HEAP32[$387+16>>2]=HEAP32[$30+16>>2]|0;
|
|
$390 = $toggle;
|
|
$391 = ((($390)) + 20|0);
|
|
$392 = $1;
|
|
$393 = ((($392)) + 32|0);
|
|
;HEAP8[$$byval_copy15>>0]=HEAP8[$393>>0]|0;HEAP8[$$byval_copy15+1>>0]=HEAP8[$393+1>>0]|0;HEAP8[$$byval_copy15+2>>0]=HEAP8[$393+2>>0]|0;HEAP8[$$byval_copy15+3>>0]=HEAP8[$393+3>>0]|0;
|
|
_nk_style_item_color($31,$$byval_copy15);
|
|
;HEAP32[$391>>2]=HEAP32[$31>>2]|0;HEAP32[$391+4>>2]=HEAP32[$31+4>>2]|0;HEAP32[$391+8>>2]=HEAP32[$31+8>>2]|0;HEAP32[$391+12>>2]=HEAP32[$31+12>>2]|0;HEAP32[$391+16>>2]=HEAP32[$31+16>>2]|0;
|
|
$394 = $toggle;
|
|
$395 = ((($394)) + 40|0);
|
|
$396 = $1;
|
|
$397 = ((($396)) + 32|0);
|
|
;HEAP8[$$byval_copy16>>0]=HEAP8[$397>>0]|0;HEAP8[$$byval_copy16+1>>0]=HEAP8[$397+1>>0]|0;HEAP8[$$byval_copy16+2>>0]=HEAP8[$397+2>>0]|0;HEAP8[$$byval_copy16+3>>0]=HEAP8[$397+3>>0]|0;
|
|
_nk_style_item_color($32,$$byval_copy16);
|
|
;HEAP32[$395>>2]=HEAP32[$32>>2]|0;HEAP32[$395+4>>2]=HEAP32[$32+4>>2]|0;HEAP32[$395+8>>2]=HEAP32[$32+8>>2]|0;HEAP32[$395+12>>2]=HEAP32[$32+12>>2]|0;HEAP32[$395+16>>2]=HEAP32[$32+16>>2]|0;
|
|
$398 = $toggle;
|
|
$399 = ((($398)) + 60|0);
|
|
$400 = $1;
|
|
$401 = ((($400)) + 36|0);
|
|
;HEAP8[$$byval_copy17>>0]=HEAP8[$401>>0]|0;HEAP8[$$byval_copy17+1>>0]=HEAP8[$401+1>>0]|0;HEAP8[$$byval_copy17+2>>0]=HEAP8[$401+2>>0]|0;HEAP8[$$byval_copy17+3>>0]=HEAP8[$401+3>>0]|0;
|
|
_nk_style_item_color($33,$$byval_copy17);
|
|
;HEAP32[$399>>2]=HEAP32[$33>>2]|0;HEAP32[$399+4>>2]=HEAP32[$33+4>>2]|0;HEAP32[$399+8>>2]=HEAP32[$33+8>>2]|0;HEAP32[$399+12>>2]=HEAP32[$33+12>>2]|0;HEAP32[$399+16>>2]=HEAP32[$33+16>>2]|0;
|
|
$402 = $toggle;
|
|
$403 = ((($402)) + 80|0);
|
|
$404 = $1;
|
|
$405 = ((($404)) + 36|0);
|
|
;HEAP8[$$byval_copy18>>0]=HEAP8[$405>>0]|0;HEAP8[$$byval_copy18+1>>0]=HEAP8[$405+1>>0]|0;HEAP8[$$byval_copy18+2>>0]=HEAP8[$405+2>>0]|0;HEAP8[$$byval_copy18+3>>0]=HEAP8[$405+3>>0]|0;
|
|
_nk_style_item_color($34,$$byval_copy18);
|
|
;HEAP32[$403>>2]=HEAP32[$34>>2]|0;HEAP32[$403+4>>2]=HEAP32[$34+4>>2]|0;HEAP32[$403+8>>2]=HEAP32[$34+8>>2]|0;HEAP32[$403+12>>2]=HEAP32[$34+12>>2]|0;HEAP32[$403+16>>2]=HEAP32[$34+16>>2]|0;
|
|
$406 = $toggle;
|
|
$407 = ((($406)) + 136|0);
|
|
_nk_handle_ptr($35,0);
|
|
;HEAP32[$407>>2]=HEAP32[$35>>2]|0;
|
|
$408 = $toggle;
|
|
$409 = ((($408)) + 112|0);
|
|
$410 = $1;
|
|
$411 = ((($410)) + 4|0);
|
|
;HEAP8[$409>>0]=HEAP8[$411>>0]|0;HEAP8[$409+1>>0]=HEAP8[$411+1>>0]|0;HEAP8[$409+2>>0]=HEAP8[$411+2>>0]|0;HEAP8[$409+3>>0]=HEAP8[$411+3>>0]|0;
|
|
$412 = $toggle;
|
|
$413 = ((($412)) + 100|0);
|
|
$414 = $1;
|
|
;HEAP8[$413>>0]=HEAP8[$414>>0]|0;HEAP8[$413+1>>0]=HEAP8[$414+1>>0]|0;HEAP8[$413+2>>0]=HEAP8[$414+2>>0]|0;HEAP8[$413+3>>0]=HEAP8[$414+3>>0]|0;
|
|
$415 = $toggle;
|
|
$416 = ((($415)) + 104|0);
|
|
$417 = $1;
|
|
;HEAP8[$416>>0]=HEAP8[$417>>0]|0;HEAP8[$416+1>>0]=HEAP8[$417+1>>0]|0;HEAP8[$416+2>>0]=HEAP8[$417+2>>0]|0;HEAP8[$416+3>>0]=HEAP8[$417+3>>0]|0;
|
|
$418 = $toggle;
|
|
$419 = ((($418)) + 108|0);
|
|
$420 = $1;
|
|
;HEAP8[$419>>0]=HEAP8[$420>>0]|0;HEAP8[$419+1>>0]=HEAP8[$420+1>>0]|0;HEAP8[$419+2>>0]=HEAP8[$420+2>>0]|0;HEAP8[$419+3>>0]=HEAP8[$420+3>>0]|0;
|
|
$421 = $toggle;
|
|
$422 = ((($421)) + 120|0);
|
|
_nk_vec2($36,4.0,4.0);
|
|
;HEAP32[$422>>2]=HEAP32[$36>>2]|0;HEAP32[$422+4>>2]=HEAP32[$36+4>>2]|0;
|
|
$423 = $toggle;
|
|
$424 = ((($423)) + 128|0);
|
|
_nk_vec2($37,0.0,0.0);
|
|
;HEAP32[$424>>2]=HEAP32[$37>>2]|0;HEAP32[$424+4>>2]=HEAP32[$37+4>>2]|0;
|
|
$425 = $style;
|
|
$426 = ((($425)) + 712|0);
|
|
$select = $426;
|
|
$427 = $select;
|
|
_nk_zero($427,192);
|
|
$428 = $select;
|
|
$429 = $1;
|
|
$430 = ((($429)) + 40|0);
|
|
;HEAP8[$$byval_copy19>>0]=HEAP8[$430>>0]|0;HEAP8[$$byval_copy19+1>>0]=HEAP8[$430+1>>0]|0;HEAP8[$$byval_copy19+2>>0]=HEAP8[$430+2>>0]|0;HEAP8[$$byval_copy19+3>>0]=HEAP8[$430+3>>0]|0;
|
|
_nk_style_item_color($38,$$byval_copy19);
|
|
;HEAP32[$428>>2]=HEAP32[$38>>2]|0;HEAP32[$428+4>>2]=HEAP32[$38+4>>2]|0;HEAP32[$428+8>>2]=HEAP32[$38+8>>2]|0;HEAP32[$428+12>>2]=HEAP32[$38+12>>2]|0;HEAP32[$428+16>>2]=HEAP32[$38+16>>2]|0;
|
|
$431 = $select;
|
|
$432 = ((($431)) + 20|0);
|
|
$433 = $1;
|
|
$434 = ((($433)) + 40|0);
|
|
;HEAP8[$$byval_copy20>>0]=HEAP8[$434>>0]|0;HEAP8[$$byval_copy20+1>>0]=HEAP8[$434+1>>0]|0;HEAP8[$$byval_copy20+2>>0]=HEAP8[$434+2>>0]|0;HEAP8[$$byval_copy20+3>>0]=HEAP8[$434+3>>0]|0;
|
|
_nk_style_item_color($39,$$byval_copy20);
|
|
;HEAP32[$432>>2]=HEAP32[$39>>2]|0;HEAP32[$432+4>>2]=HEAP32[$39+4>>2]|0;HEAP32[$432+8>>2]=HEAP32[$39+8>>2]|0;HEAP32[$432+12>>2]=HEAP32[$39+12>>2]|0;HEAP32[$432+16>>2]=HEAP32[$39+16>>2]|0;
|
|
$435 = $select;
|
|
$436 = ((($435)) + 40|0);
|
|
$437 = $1;
|
|
$438 = ((($437)) + 40|0);
|
|
;HEAP8[$$byval_copy21>>0]=HEAP8[$438>>0]|0;HEAP8[$$byval_copy21+1>>0]=HEAP8[$438+1>>0]|0;HEAP8[$$byval_copy21+2>>0]=HEAP8[$438+2>>0]|0;HEAP8[$$byval_copy21+3>>0]=HEAP8[$438+3>>0]|0;
|
|
_nk_style_item_color($40,$$byval_copy21);
|
|
;HEAP32[$436>>2]=HEAP32[$40>>2]|0;HEAP32[$436+4>>2]=HEAP32[$40+4>>2]|0;HEAP32[$436+8>>2]=HEAP32[$40+8>>2]|0;HEAP32[$436+12>>2]=HEAP32[$40+12>>2]|0;HEAP32[$436+16>>2]=HEAP32[$40+16>>2]|0;
|
|
$439 = $select;
|
|
$440 = ((($439)) + 60|0);
|
|
$441 = $1;
|
|
$442 = ((($441)) + 44|0);
|
|
;HEAP8[$$byval_copy22>>0]=HEAP8[$442>>0]|0;HEAP8[$$byval_copy22+1>>0]=HEAP8[$442+1>>0]|0;HEAP8[$$byval_copy22+2>>0]=HEAP8[$442+2>>0]|0;HEAP8[$$byval_copy22+3>>0]=HEAP8[$442+3>>0]|0;
|
|
_nk_style_item_color($41,$$byval_copy22);
|
|
;HEAP32[$440>>2]=HEAP32[$41>>2]|0;HEAP32[$440+4>>2]=HEAP32[$41+4>>2]|0;HEAP32[$440+8>>2]=HEAP32[$41+8>>2]|0;HEAP32[$440+12>>2]=HEAP32[$41+12>>2]|0;HEAP32[$440+16>>2]=HEAP32[$41+16>>2]|0;
|
|
$443 = $select;
|
|
$444 = ((($443)) + 80|0);
|
|
$445 = $1;
|
|
$446 = ((($445)) + 44|0);
|
|
;HEAP8[$$byval_copy23>>0]=HEAP8[$446>>0]|0;HEAP8[$$byval_copy23+1>>0]=HEAP8[$446+1>>0]|0;HEAP8[$$byval_copy23+2>>0]=HEAP8[$446+2>>0]|0;HEAP8[$$byval_copy23+3>>0]=HEAP8[$446+3>>0]|0;
|
|
_nk_style_item_color($42,$$byval_copy23);
|
|
;HEAP32[$444>>2]=HEAP32[$42>>2]|0;HEAP32[$444+4>>2]=HEAP32[$42+4>>2]|0;HEAP32[$444+8>>2]=HEAP32[$42+8>>2]|0;HEAP32[$444+12>>2]=HEAP32[$42+12>>2]|0;HEAP32[$444+16>>2]=HEAP32[$42+16>>2]|0;
|
|
$447 = $select;
|
|
$448 = ((($447)) + 100|0);
|
|
$449 = $1;
|
|
$450 = ((($449)) + 44|0);
|
|
;HEAP8[$$byval_copy24>>0]=HEAP8[$450>>0]|0;HEAP8[$$byval_copy24+1>>0]=HEAP8[$450+1>>0]|0;HEAP8[$$byval_copy24+2>>0]=HEAP8[$450+2>>0]|0;HEAP8[$$byval_copy24+3>>0]=HEAP8[$450+3>>0]|0;
|
|
_nk_style_item_color($43,$$byval_copy24);
|
|
;HEAP32[$448>>2]=HEAP32[$43>>2]|0;HEAP32[$448+4>>2]=HEAP32[$43+4>>2]|0;HEAP32[$448+8>>2]=HEAP32[$43+8>>2]|0;HEAP32[$448+12>>2]=HEAP32[$43+12>>2]|0;HEAP32[$448+16>>2]=HEAP32[$43+16>>2]|0;
|
|
$451 = $select;
|
|
$452 = ((($451)) + 120|0);
|
|
$453 = $1;
|
|
;HEAP8[$452>>0]=HEAP8[$453>>0]|0;HEAP8[$452+1>>0]=HEAP8[$453+1>>0]|0;HEAP8[$452+2>>0]=HEAP8[$453+2>>0]|0;HEAP8[$452+3>>0]=HEAP8[$453+3>>0]|0;
|
|
$454 = $select;
|
|
$455 = ((($454)) + 124|0);
|
|
$456 = $1;
|
|
;HEAP8[$455>>0]=HEAP8[$456>>0]|0;HEAP8[$455+1>>0]=HEAP8[$456+1>>0]|0;HEAP8[$455+2>>0]=HEAP8[$456+2>>0]|0;HEAP8[$455+3>>0]=HEAP8[$456+3>>0]|0;
|
|
$457 = $select;
|
|
$458 = ((($457)) + 128|0);
|
|
$459 = $1;
|
|
;HEAP8[$458>>0]=HEAP8[$459>>0]|0;HEAP8[$458+1>>0]=HEAP8[$459+1>>0]|0;HEAP8[$458+2>>0]=HEAP8[$459+2>>0]|0;HEAP8[$458+3>>0]=HEAP8[$459+3>>0]|0;
|
|
$460 = $select;
|
|
$461 = ((($460)) + 132|0);
|
|
$462 = $1;
|
|
;HEAP8[$461>>0]=HEAP8[$462>>0]|0;HEAP8[$461+1>>0]=HEAP8[$462+1>>0]|0;HEAP8[$461+2>>0]=HEAP8[$462+2>>0]|0;HEAP8[$461+3>>0]=HEAP8[$462+3>>0]|0;
|
|
$463 = $select;
|
|
$464 = ((($463)) + 136|0);
|
|
$465 = $1;
|
|
;HEAP8[$464>>0]=HEAP8[$465>>0]|0;HEAP8[$464+1>>0]=HEAP8[$465+1>>0]|0;HEAP8[$464+2>>0]=HEAP8[$465+2>>0]|0;HEAP8[$464+3>>0]=HEAP8[$465+3>>0]|0;
|
|
$466 = $select;
|
|
$467 = ((($466)) + 140|0);
|
|
$468 = $1;
|
|
;HEAP8[$467>>0]=HEAP8[$468>>0]|0;HEAP8[$467+1>>0]=HEAP8[$468+1>>0]|0;HEAP8[$467+2>>0]=HEAP8[$468+2>>0]|0;HEAP8[$467+3>>0]=HEAP8[$468+3>>0]|0;
|
|
$469 = $select;
|
|
$470 = ((($469)) + 156|0);
|
|
_nk_vec2($44,4.0,4.0);
|
|
;HEAP32[$470>>2]=HEAP32[$44>>2]|0;HEAP32[$470+4>>2]=HEAP32[$44+4>>2]|0;
|
|
$471 = $select;
|
|
$472 = ((($471)) + 164|0);
|
|
_nk_vec2($45,0.0,0.0);
|
|
;HEAP32[$472>>2]=HEAP32[$45>>2]|0;HEAP32[$472+4>>2]=HEAP32[$45+4>>2]|0;
|
|
$473 = $select;
|
|
$474 = ((($473)) + 180|0);
|
|
_nk_handle_ptr($46,0);
|
|
;HEAP32[$474>>2]=HEAP32[$46>>2]|0;
|
|
$475 = $select;
|
|
$476 = ((($475)) + 152|0);
|
|
HEAPF32[$476>>2] = 0.0;
|
|
$477 = $select;
|
|
$478 = ((($477)) + 184|0);
|
|
HEAP32[$478>>2] = 0;
|
|
$479 = $select;
|
|
$480 = ((($479)) + 188|0);
|
|
HEAP32[$480>>2] = 0;
|
|
$481 = $style;
|
|
$482 = ((($481)) + 904|0);
|
|
$slider = $482;
|
|
$483 = $slider;
|
|
_nk_zero($483,456);
|
|
$484 = $slider;
|
|
_nk_style_item_hide($47);
|
|
;HEAP32[$484>>2]=HEAP32[$47>>2]|0;HEAP32[$484+4>>2]=HEAP32[$47+4>>2]|0;HEAP32[$484+8>>2]=HEAP32[$47+8>>2]|0;HEAP32[$484+12>>2]=HEAP32[$47+12>>2]|0;HEAP32[$484+16>>2]=HEAP32[$47+16>>2]|0;
|
|
$485 = $slider;
|
|
$486 = ((($485)) + 20|0);
|
|
_nk_style_item_hide($48);
|
|
;HEAP32[$486>>2]=HEAP32[$48>>2]|0;HEAP32[$486+4>>2]=HEAP32[$48+4>>2]|0;HEAP32[$486+8>>2]=HEAP32[$48+8>>2]|0;HEAP32[$486+12>>2]=HEAP32[$48+12>>2]|0;HEAP32[$486+16>>2]=HEAP32[$48+16>>2]|0;
|
|
$487 = $slider;
|
|
$488 = ((($487)) + 40|0);
|
|
_nk_style_item_hide($49);
|
|
;HEAP32[$488>>2]=HEAP32[$49>>2]|0;HEAP32[$488+4>>2]=HEAP32[$49+4>>2]|0;HEAP32[$488+8>>2]=HEAP32[$49+8>>2]|0;HEAP32[$488+12>>2]=HEAP32[$49+12>>2]|0;HEAP32[$488+16>>2]=HEAP32[$49+16>>2]|0;
|
|
$489 = $slider;
|
|
$490 = ((($489)) + 64|0);
|
|
$491 = $1;
|
|
$492 = ((($491)) + 48|0);
|
|
;HEAP8[$490>>0]=HEAP8[$492>>0]|0;HEAP8[$490+1>>0]=HEAP8[$492+1>>0]|0;HEAP8[$490+2>>0]=HEAP8[$492+2>>0]|0;HEAP8[$490+3>>0]=HEAP8[$492+3>>0]|0;
|
|
$493 = $slider;
|
|
$494 = ((($493)) + 68|0);
|
|
$495 = $1;
|
|
$496 = ((($495)) + 48|0);
|
|
;HEAP8[$494>>0]=HEAP8[$496>>0]|0;HEAP8[$494+1>>0]=HEAP8[$496+1>>0]|0;HEAP8[$494+2>>0]=HEAP8[$496+2>>0]|0;HEAP8[$494+3>>0]=HEAP8[$496+3>>0]|0;
|
|
$497 = $slider;
|
|
$498 = ((($497)) + 72|0);
|
|
$499 = $1;
|
|
$500 = ((($499)) + 48|0);
|
|
;HEAP8[$498>>0]=HEAP8[$500>>0]|0;HEAP8[$498+1>>0]=HEAP8[$500+1>>0]|0;HEAP8[$498+2>>0]=HEAP8[$500+2>>0]|0;HEAP8[$498+3>>0]=HEAP8[$500+3>>0]|0;
|
|
$501 = $slider;
|
|
$502 = ((($501)) + 76|0);
|
|
$503 = $1;
|
|
$504 = ((($503)) + 52|0);
|
|
;HEAP8[$502>>0]=HEAP8[$504>>0]|0;HEAP8[$502+1>>0]=HEAP8[$504+1>>0]|0;HEAP8[$502+2>>0]=HEAP8[$504+2>>0]|0;HEAP8[$502+3>>0]=HEAP8[$504+3>>0]|0;
|
|
$505 = $slider;
|
|
$506 = ((($505)) + 80|0);
|
|
$507 = $1;
|
|
$508 = ((($507)) + 52|0);
|
|
;HEAP8[$$byval_copy25>>0]=HEAP8[$508>>0]|0;HEAP8[$$byval_copy25+1>>0]=HEAP8[$508+1>>0]|0;HEAP8[$$byval_copy25+2>>0]=HEAP8[$508+2>>0]|0;HEAP8[$$byval_copy25+3>>0]=HEAP8[$508+3>>0]|0;
|
|
_nk_style_item_color($50,$$byval_copy25);
|
|
;HEAP32[$506>>2]=HEAP32[$50>>2]|0;HEAP32[$506+4>>2]=HEAP32[$50+4>>2]|0;HEAP32[$506+8>>2]=HEAP32[$50+8>>2]|0;HEAP32[$506+12>>2]=HEAP32[$50+12>>2]|0;HEAP32[$506+16>>2]=HEAP32[$50+16>>2]|0;
|
|
$509 = $slider;
|
|
$510 = ((($509)) + 100|0);
|
|
$511 = $1;
|
|
$512 = ((($511)) + 56|0);
|
|
;HEAP8[$$byval_copy26>>0]=HEAP8[$512>>0]|0;HEAP8[$$byval_copy26+1>>0]=HEAP8[$512+1>>0]|0;HEAP8[$$byval_copy26+2>>0]=HEAP8[$512+2>>0]|0;HEAP8[$$byval_copy26+3>>0]=HEAP8[$512+3>>0]|0;
|
|
_nk_style_item_color($51,$$byval_copy26);
|
|
;HEAP32[$510>>2]=HEAP32[$51>>2]|0;HEAP32[$510+4>>2]=HEAP32[$51+4>>2]|0;HEAP32[$510+8>>2]=HEAP32[$51+8>>2]|0;HEAP32[$510+12>>2]=HEAP32[$51+12>>2]|0;HEAP32[$510+16>>2]=HEAP32[$51+16>>2]|0;
|
|
$513 = $slider;
|
|
$514 = ((($513)) + 120|0);
|
|
$515 = $1;
|
|
$516 = ((($515)) + 60|0);
|
|
;HEAP8[$$byval_copy27>>0]=HEAP8[$516>>0]|0;HEAP8[$$byval_copy27+1>>0]=HEAP8[$516+1>>0]|0;HEAP8[$$byval_copy27+2>>0]=HEAP8[$516+2>>0]|0;HEAP8[$$byval_copy27+3>>0]=HEAP8[$516+3>>0]|0;
|
|
_nk_style_item_color($52,$$byval_copy27);
|
|
;HEAP32[$514>>2]=HEAP32[$52>>2]|0;HEAP32[$514+4>>2]=HEAP32[$52+4>>2]|0;HEAP32[$514+8>>2]=HEAP32[$52+8>>2]|0;HEAP32[$514+12>>2]=HEAP32[$52+12>>2]|0;HEAP32[$514+16>>2]=HEAP32[$52+16>>2]|0;
|
|
$517 = $slider;
|
|
$518 = ((($517)) + 436|0);
|
|
HEAP32[$518>>2] = 10;
|
|
$519 = $slider;
|
|
$520 = ((($519)) + 440|0);
|
|
HEAP32[$520>>2] = 9;
|
|
$521 = $slider;
|
|
$522 = ((($521)) + 168|0);
|
|
_nk_vec2($53,16.0,16.0);
|
|
;HEAP32[$522>>2]=HEAP32[$53>>2]|0;HEAP32[$522+4>>2]=HEAP32[$53+4>>2]|0;
|
|
$523 = $slider;
|
|
$524 = ((($523)) + 152|0);
|
|
_nk_vec2($54,4.0,4.0);
|
|
;HEAP32[$524>>2]=HEAP32[$54>>2]|0;HEAP32[$524+4>>2]=HEAP32[$54+4>>2]|0;
|
|
$525 = $slider;
|
|
$526 = ((($525)) + 160|0);
|
|
_nk_vec2($55,4.0,4.0);
|
|
;HEAP32[$526>>2]=HEAP32[$55>>2]|0;HEAP32[$526+4>>2]=HEAP32[$55+4>>2]|0;
|
|
$527 = $slider;
|
|
$528 = ((($527)) + 444|0);
|
|
_nk_handle_ptr($56,0);
|
|
;HEAP32[$528>>2]=HEAP32[$56>>2]|0;
|
|
$529 = $slider;
|
|
$530 = ((($529)) + 176|0);
|
|
HEAP32[$530>>2] = 0;
|
|
$531 = $slider;
|
|
$532 = ((($531)) + 148|0);
|
|
HEAPF32[$532>>2] = 8.0;
|
|
$533 = $slider;
|
|
$534 = ((($533)) + 144|0);
|
|
HEAPF32[$534>>2] = 0.0;
|
|
$535 = $slider;
|
|
$536 = ((($535)) + 448|0);
|
|
HEAP32[$536>>2] = 0;
|
|
$537 = $slider;
|
|
$538 = ((($537)) + 452|0);
|
|
HEAP32[$538>>2] = 0;
|
|
$539 = $style;
|
|
$540 = ((($539)) + 904|0);
|
|
$541 = ((($540)) + 180|0);
|
|
$button = $541;
|
|
$542 = $button;
|
|
_nk_rgb($57,40,40,40);
|
|
;HEAP8[$$byval_copy28>>0]=HEAP8[$57>>0]|0;HEAP8[$$byval_copy28+1>>0]=HEAP8[$57+1>>0]|0;HEAP8[$$byval_copy28+2>>0]=HEAP8[$57+2>>0]|0;HEAP8[$$byval_copy28+3>>0]=HEAP8[$57+3>>0]|0;
|
|
_nk_style_item_color($58,$$byval_copy28);
|
|
;HEAP32[$542>>2]=HEAP32[$58>>2]|0;HEAP32[$542+4>>2]=HEAP32[$58+4>>2]|0;HEAP32[$542+8>>2]=HEAP32[$58+8>>2]|0;HEAP32[$542+12>>2]=HEAP32[$58+12>>2]|0;HEAP32[$542+16>>2]=HEAP32[$58+16>>2]|0;
|
|
$543 = $button;
|
|
$544 = ((($543)) + 20|0);
|
|
_nk_rgb($59,42,42,42);
|
|
;HEAP8[$$byval_copy29>>0]=HEAP8[$59>>0]|0;HEAP8[$$byval_copy29+1>>0]=HEAP8[$59+1>>0]|0;HEAP8[$$byval_copy29+2>>0]=HEAP8[$59+2>>0]|0;HEAP8[$$byval_copy29+3>>0]=HEAP8[$59+3>>0]|0;
|
|
_nk_style_item_color($60,$$byval_copy29);
|
|
;HEAP32[$544>>2]=HEAP32[$60>>2]|0;HEAP32[$544+4>>2]=HEAP32[$60+4>>2]|0;HEAP32[$544+8>>2]=HEAP32[$60+8>>2]|0;HEAP32[$544+12>>2]=HEAP32[$60+12>>2]|0;HEAP32[$544+16>>2]=HEAP32[$60+16>>2]|0;
|
|
$545 = $button;
|
|
$546 = ((($545)) + 40|0);
|
|
_nk_rgb($61,44,44,44);
|
|
;HEAP8[$$byval_copy30>>0]=HEAP8[$61>>0]|0;HEAP8[$$byval_copy30+1>>0]=HEAP8[$61+1>>0]|0;HEAP8[$$byval_copy30+2>>0]=HEAP8[$61+2>>0]|0;HEAP8[$$byval_copy30+3>>0]=HEAP8[$61+3>>0]|0;
|
|
_nk_style_item_color($62,$$byval_copy30);
|
|
;HEAP32[$546>>2]=HEAP32[$62>>2]|0;HEAP32[$546+4>>2]=HEAP32[$62+4>>2]|0;HEAP32[$546+8>>2]=HEAP32[$62+8>>2]|0;HEAP32[$546+12>>2]=HEAP32[$62+12>>2]|0;HEAP32[$546+16>>2]=HEAP32[$62+16>>2]|0;
|
|
$547 = $button;
|
|
$548 = ((($547)) + 60|0);
|
|
_nk_rgb($63,65,65,65);
|
|
;HEAP8[$548>>0]=HEAP8[$63>>0]|0;HEAP8[$548+1>>0]=HEAP8[$63+1>>0]|0;HEAP8[$548+2>>0]=HEAP8[$63+2>>0]|0;HEAP8[$548+3>>0]=HEAP8[$63+3>>0]|0;
|
|
$549 = $button;
|
|
$550 = ((($549)) + 64|0);
|
|
_nk_rgb($64,40,40,40);
|
|
;HEAP8[$550>>0]=HEAP8[$64>>0]|0;HEAP8[$550+1>>0]=HEAP8[$64+1>>0]|0;HEAP8[$550+2>>0]=HEAP8[$64+2>>0]|0;HEAP8[$550+3>>0]=HEAP8[$64+3>>0]|0;
|
|
$551 = $button;
|
|
$552 = ((($551)) + 68|0);
|
|
_nk_rgb($65,175,175,175);
|
|
;HEAP8[$552>>0]=HEAP8[$65>>0]|0;HEAP8[$552+1>>0]=HEAP8[$65+1>>0]|0;HEAP8[$552+2>>0]=HEAP8[$65+2>>0]|0;HEAP8[$552+3>>0]=HEAP8[$65+3>>0]|0;
|
|
$553 = $button;
|
|
$554 = ((($553)) + 72|0);
|
|
_nk_rgb($66,175,175,175);
|
|
;HEAP8[$554>>0]=HEAP8[$66>>0]|0;HEAP8[$554+1>>0]=HEAP8[$66+1>>0]|0;HEAP8[$554+2>>0]=HEAP8[$66+2>>0]|0;HEAP8[$554+3>>0]=HEAP8[$66+3>>0]|0;
|
|
$555 = $button;
|
|
$556 = ((($555)) + 76|0);
|
|
_nk_rgb($67,175,175,175);
|
|
;HEAP8[$556>>0]=HEAP8[$67>>0]|0;HEAP8[$556+1>>0]=HEAP8[$67+1>>0]|0;HEAP8[$556+2>>0]=HEAP8[$67+2>>0]|0;HEAP8[$556+3>>0]=HEAP8[$67+3>>0]|0;
|
|
$557 = $button;
|
|
$558 = ((($557)) + 92|0);
|
|
_nk_vec2($68,8.0,8.0);
|
|
;HEAP32[$558>>2]=HEAP32[$68>>2]|0;HEAP32[$558+4>>2]=HEAP32[$68+4>>2]|0;
|
|
$559 = $button;
|
|
$560 = ((($559)) + 108|0);
|
|
_nk_vec2($69,0.0,0.0);
|
|
;HEAP32[$560>>2]=HEAP32[$69>>2]|0;HEAP32[$560+4>>2]=HEAP32[$69+4>>2]|0;
|
|
$561 = $button;
|
|
$562 = ((($561)) + 116|0);
|
|
_nk_handle_ptr($70,0);
|
|
;HEAP32[$562>>2]=HEAP32[$70>>2]|0;
|
|
$563 = $button;
|
|
$564 = ((($563)) + 80|0);
|
|
HEAP32[$564>>2] = 18;
|
|
$565 = $button;
|
|
$566 = ((($565)) + 84|0);
|
|
HEAPF32[$566>>2] = 1.0;
|
|
$567 = $button;
|
|
$568 = ((($567)) + 88|0);
|
|
HEAPF32[$568>>2] = 0.0;
|
|
$569 = $button;
|
|
$570 = ((($569)) + 120|0);
|
|
HEAP32[$570>>2] = 0;
|
|
$571 = $button;
|
|
$572 = ((($571)) + 124|0);
|
|
HEAP32[$572>>2] = 0;
|
|
$573 = $style;
|
|
$574 = ((($573)) + 904|0);
|
|
$575 = ((($574)) + 308|0);
|
|
$576 = $style;
|
|
$577 = ((($576)) + 904|0);
|
|
$578 = ((($577)) + 180|0);
|
|
dest=$575; src=$578; stop=dest+128|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
|
|
$579 = $style;
|
|
$580 = ((($579)) + 1360|0);
|
|
$prog = $580;
|
|
$581 = $prog;
|
|
_nk_zero($581,164);
|
|
$582 = $prog;
|
|
$583 = $1;
|
|
$584 = ((($583)) + 48|0);
|
|
;HEAP8[$$byval_copy31>>0]=HEAP8[$584>>0]|0;HEAP8[$$byval_copy31+1>>0]=HEAP8[$584+1>>0]|0;HEAP8[$$byval_copy31+2>>0]=HEAP8[$584+2>>0]|0;HEAP8[$$byval_copy31+3>>0]=HEAP8[$584+3>>0]|0;
|
|
_nk_style_item_color($71,$$byval_copy31);
|
|
;HEAP32[$582>>2]=HEAP32[$71>>2]|0;HEAP32[$582+4>>2]=HEAP32[$71+4>>2]|0;HEAP32[$582+8>>2]=HEAP32[$71+8>>2]|0;HEAP32[$582+12>>2]=HEAP32[$71+12>>2]|0;HEAP32[$582+16>>2]=HEAP32[$71+16>>2]|0;
|
|
$585 = $prog;
|
|
$586 = ((($585)) + 20|0);
|
|
$587 = $1;
|
|
$588 = ((($587)) + 48|0);
|
|
;HEAP8[$$byval_copy32>>0]=HEAP8[$588>>0]|0;HEAP8[$$byval_copy32+1>>0]=HEAP8[$588+1>>0]|0;HEAP8[$$byval_copy32+2>>0]=HEAP8[$588+2>>0]|0;HEAP8[$$byval_copy32+3>>0]=HEAP8[$588+3>>0]|0;
|
|
_nk_style_item_color($72,$$byval_copy32);
|
|
;HEAP32[$586>>2]=HEAP32[$72>>2]|0;HEAP32[$586+4>>2]=HEAP32[$72+4>>2]|0;HEAP32[$586+8>>2]=HEAP32[$72+8>>2]|0;HEAP32[$586+12>>2]=HEAP32[$72+12>>2]|0;HEAP32[$586+16>>2]=HEAP32[$72+16>>2]|0;
|
|
$589 = $prog;
|
|
$590 = ((($589)) + 40|0);
|
|
$591 = $1;
|
|
$592 = ((($591)) + 48|0);
|
|
;HEAP8[$$byval_copy33>>0]=HEAP8[$592>>0]|0;HEAP8[$$byval_copy33+1>>0]=HEAP8[$592+1>>0]|0;HEAP8[$$byval_copy33+2>>0]=HEAP8[$592+2>>0]|0;HEAP8[$$byval_copy33+3>>0]=HEAP8[$592+3>>0]|0;
|
|
_nk_style_item_color($73,$$byval_copy33);
|
|
;HEAP32[$590>>2]=HEAP32[$73>>2]|0;HEAP32[$590+4>>2]=HEAP32[$73+4>>2]|0;HEAP32[$590+8>>2]=HEAP32[$73+8>>2]|0;HEAP32[$590+12>>2]=HEAP32[$73+12>>2]|0;HEAP32[$590+16>>2]=HEAP32[$73+16>>2]|0;
|
|
$593 = $prog;
|
|
$594 = ((($593)) + 64|0);
|
|
$595 = $1;
|
|
$596 = ((($595)) + 52|0);
|
|
;HEAP8[$$byval_copy34>>0]=HEAP8[$596>>0]|0;HEAP8[$$byval_copy34+1>>0]=HEAP8[$596+1>>0]|0;HEAP8[$$byval_copy34+2>>0]=HEAP8[$596+2>>0]|0;HEAP8[$$byval_copy34+3>>0]=HEAP8[$596+3>>0]|0;
|
|
_nk_style_item_color($74,$$byval_copy34);
|
|
;HEAP32[$594>>2]=HEAP32[$74>>2]|0;HEAP32[$594+4>>2]=HEAP32[$74+4>>2]|0;HEAP32[$594+8>>2]=HEAP32[$74+8>>2]|0;HEAP32[$594+12>>2]=HEAP32[$74+12>>2]|0;HEAP32[$594+16>>2]=HEAP32[$74+16>>2]|0;
|
|
$597 = $prog;
|
|
$598 = ((($597)) + 84|0);
|
|
$599 = $1;
|
|
$600 = ((($599)) + 56|0);
|
|
;HEAP8[$$byval_copy35>>0]=HEAP8[$600>>0]|0;HEAP8[$$byval_copy35+1>>0]=HEAP8[$600+1>>0]|0;HEAP8[$$byval_copy35+2>>0]=HEAP8[$600+2>>0]|0;HEAP8[$$byval_copy35+3>>0]=HEAP8[$600+3>>0]|0;
|
|
_nk_style_item_color($75,$$byval_copy35);
|
|
;HEAP32[$598>>2]=HEAP32[$75>>2]|0;HEAP32[$598+4>>2]=HEAP32[$75+4>>2]|0;HEAP32[$598+8>>2]=HEAP32[$75+8>>2]|0;HEAP32[$598+12>>2]=HEAP32[$75+12>>2]|0;HEAP32[$598+16>>2]=HEAP32[$75+16>>2]|0;
|
|
$601 = $prog;
|
|
$602 = ((($601)) + 104|0);
|
|
$603 = $1;
|
|
$604 = ((($603)) + 60|0);
|
|
;HEAP8[$$byval_copy36>>0]=HEAP8[$604>>0]|0;HEAP8[$$byval_copy36+1>>0]=HEAP8[$604+1>>0]|0;HEAP8[$$byval_copy36+2>>0]=HEAP8[$604+2>>0]|0;HEAP8[$$byval_copy36+3>>0]=HEAP8[$604+3>>0]|0;
|
|
_nk_style_item_color($76,$$byval_copy36);
|
|
;HEAP32[$602>>2]=HEAP32[$76>>2]|0;HEAP32[$602+4>>2]=HEAP32[$76+4>>2]|0;HEAP32[$602+8>>2]=HEAP32[$76+8>>2]|0;HEAP32[$602+12>>2]=HEAP32[$76+12>>2]|0;HEAP32[$602+16>>2]=HEAP32[$76+16>>2]|0;
|
|
$605 = $prog;
|
|
$606 = ((($605)) + 60|0);
|
|
_nk_rgba($77,0,0,0,0);
|
|
;HEAP8[$606>>0]=HEAP8[$77>>0]|0;HEAP8[$606+1>>0]=HEAP8[$77+1>>0]|0;HEAP8[$606+2>>0]=HEAP8[$77+2>>0]|0;HEAP8[$606+3>>0]=HEAP8[$77+3>>0]|0;
|
|
$607 = $prog;
|
|
$608 = ((($607)) + 124|0);
|
|
_nk_rgba($78,0,0,0,0);
|
|
;HEAP8[$608>>0]=HEAP8[$78>>0]|0;HEAP8[$608+1>>0]=HEAP8[$78+1>>0]|0;HEAP8[$608+2>>0]=HEAP8[$78+2>>0]|0;HEAP8[$608+3>>0]=HEAP8[$78+3>>0]|0;
|
|
$609 = $prog;
|
|
$610 = ((($609)) + 152|0);
|
|
_nk_handle_ptr($79,0);
|
|
;HEAP32[$610>>2]=HEAP32[$79>>2]|0;
|
|
$611 = $prog;
|
|
$612 = ((($611)) + 144|0);
|
|
_nk_vec2($80,4.0,4.0);
|
|
;HEAP32[$612>>2]=HEAP32[$80>>2]|0;HEAP32[$612+4>>2]=HEAP32[$80+4>>2]|0;
|
|
$613 = $prog;
|
|
$614 = ((($613)) + 128|0);
|
|
HEAPF32[$614>>2] = 0.0;
|
|
$615 = $prog;
|
|
$616 = ((($615)) + 132|0);
|
|
HEAPF32[$616>>2] = 0.0;
|
|
$617 = $prog;
|
|
$618 = ((($617)) + 140|0);
|
|
HEAPF32[$618>>2] = 0.0;
|
|
$619 = $prog;
|
|
$620 = ((($619)) + 136|0);
|
|
HEAPF32[$620>>2] = 0.0;
|
|
$621 = $prog;
|
|
$622 = ((($621)) + 156|0);
|
|
HEAP32[$622>>2] = 0;
|
|
$623 = $prog;
|
|
$624 = ((($623)) + 160|0);
|
|
HEAP32[$624>>2] = 0;
|
|
$625 = $style;
|
|
$626 = ((($625)) + 3084|0);
|
|
$scroll = $626;
|
|
$627 = $scroll;
|
|
_nk_zero($627,432);
|
|
$628 = $scroll;
|
|
$629 = $1;
|
|
$630 = ((($629)) + 92|0);
|
|
;HEAP8[$$byval_copy37>>0]=HEAP8[$630>>0]|0;HEAP8[$$byval_copy37+1>>0]=HEAP8[$630+1>>0]|0;HEAP8[$$byval_copy37+2>>0]=HEAP8[$630+2>>0]|0;HEAP8[$$byval_copy37+3>>0]=HEAP8[$630+3>>0]|0;
|
|
_nk_style_item_color($81,$$byval_copy37);
|
|
;HEAP32[$628>>2]=HEAP32[$81>>2]|0;HEAP32[$628+4>>2]=HEAP32[$81+4>>2]|0;HEAP32[$628+8>>2]=HEAP32[$81+8>>2]|0;HEAP32[$628+12>>2]=HEAP32[$81+12>>2]|0;HEAP32[$628+16>>2]=HEAP32[$81+16>>2]|0;
|
|
$631 = $scroll;
|
|
$632 = ((($631)) + 20|0);
|
|
$633 = $1;
|
|
$634 = ((($633)) + 92|0);
|
|
;HEAP8[$$byval_copy38>>0]=HEAP8[$634>>0]|0;HEAP8[$$byval_copy38+1>>0]=HEAP8[$634+1>>0]|0;HEAP8[$$byval_copy38+2>>0]=HEAP8[$634+2>>0]|0;HEAP8[$$byval_copy38+3>>0]=HEAP8[$634+3>>0]|0;
|
|
_nk_style_item_color($82,$$byval_copy38);
|
|
;HEAP32[$632>>2]=HEAP32[$82>>2]|0;HEAP32[$632+4>>2]=HEAP32[$82+4>>2]|0;HEAP32[$632+8>>2]=HEAP32[$82+8>>2]|0;HEAP32[$632+12>>2]=HEAP32[$82+12>>2]|0;HEAP32[$632+16>>2]=HEAP32[$82+16>>2]|0;
|
|
$635 = $scroll;
|
|
$636 = ((($635)) + 40|0);
|
|
$637 = $1;
|
|
$638 = ((($637)) + 92|0);
|
|
;HEAP8[$$byval_copy39>>0]=HEAP8[$638>>0]|0;HEAP8[$$byval_copy39+1>>0]=HEAP8[$638+1>>0]|0;HEAP8[$$byval_copy39+2>>0]=HEAP8[$638+2>>0]|0;HEAP8[$$byval_copy39+3>>0]=HEAP8[$638+3>>0]|0;
|
|
_nk_style_item_color($83,$$byval_copy39);
|
|
;HEAP32[$636>>2]=HEAP32[$83>>2]|0;HEAP32[$636+4>>2]=HEAP32[$83+4>>2]|0;HEAP32[$636+8>>2]=HEAP32[$83+8>>2]|0;HEAP32[$636+12>>2]=HEAP32[$83+12>>2]|0;HEAP32[$636+16>>2]=HEAP32[$83+16>>2]|0;
|
|
$639 = $scroll;
|
|
$640 = ((($639)) + 64|0);
|
|
$641 = $1;
|
|
$642 = ((($641)) + 96|0);
|
|
;HEAP8[$$byval_copy40>>0]=HEAP8[$642>>0]|0;HEAP8[$$byval_copy40+1>>0]=HEAP8[$642+1>>0]|0;HEAP8[$$byval_copy40+2>>0]=HEAP8[$642+2>>0]|0;HEAP8[$$byval_copy40+3>>0]=HEAP8[$642+3>>0]|0;
|
|
_nk_style_item_color($84,$$byval_copy40);
|
|
;HEAP32[$640>>2]=HEAP32[$84>>2]|0;HEAP32[$640+4>>2]=HEAP32[$84+4>>2]|0;HEAP32[$640+8>>2]=HEAP32[$84+8>>2]|0;HEAP32[$640+12>>2]=HEAP32[$84+12>>2]|0;HEAP32[$640+16>>2]=HEAP32[$84+16>>2]|0;
|
|
$643 = $scroll;
|
|
$644 = ((($643)) + 84|0);
|
|
$645 = $1;
|
|
$646 = ((($645)) + 100|0);
|
|
;HEAP8[$$byval_copy41>>0]=HEAP8[$646>>0]|0;HEAP8[$$byval_copy41+1>>0]=HEAP8[$646+1>>0]|0;HEAP8[$$byval_copy41+2>>0]=HEAP8[$646+2>>0]|0;HEAP8[$$byval_copy41+3>>0]=HEAP8[$646+3>>0]|0;
|
|
_nk_style_item_color($85,$$byval_copy41);
|
|
;HEAP32[$644>>2]=HEAP32[$85>>2]|0;HEAP32[$644+4>>2]=HEAP32[$85+4>>2]|0;HEAP32[$644+8>>2]=HEAP32[$85+8>>2]|0;HEAP32[$644+12>>2]=HEAP32[$85+12>>2]|0;HEAP32[$644+16>>2]=HEAP32[$85+16>>2]|0;
|
|
$647 = $scroll;
|
|
$648 = ((($647)) + 104|0);
|
|
$649 = $1;
|
|
$650 = ((($649)) + 104|0);
|
|
;HEAP8[$$byval_copy42>>0]=HEAP8[$650>>0]|0;HEAP8[$$byval_copy42+1>>0]=HEAP8[$650+1>>0]|0;HEAP8[$$byval_copy42+2>>0]=HEAP8[$650+2>>0]|0;HEAP8[$$byval_copy42+3>>0]=HEAP8[$650+3>>0]|0;
|
|
_nk_style_item_color($86,$$byval_copy42);
|
|
;HEAP32[$648>>2]=HEAP32[$86>>2]|0;HEAP32[$648+4>>2]=HEAP32[$86+4>>2]|0;HEAP32[$648+8>>2]=HEAP32[$86+8>>2]|0;HEAP32[$648+12>>2]=HEAP32[$86+12>>2]|0;HEAP32[$648+16>>2]=HEAP32[$86+16>>2]|0;
|
|
$651 = $scroll;
|
|
$652 = ((($651)) + 416|0);
|
|
HEAP32[$652>>2] = 4;
|
|
$653 = $scroll;
|
|
$654 = ((($653)) + 412|0);
|
|
HEAP32[$654>>2] = 4;
|
|
$655 = $scroll;
|
|
$656 = ((($655)) + 420|0);
|
|
_nk_handle_ptr($87,0);
|
|
;HEAP32[$656>>2]=HEAP32[$87>>2]|0;
|
|
$657 = $scroll;
|
|
$658 = ((($657)) + 60|0);
|
|
$659 = $1;
|
|
$660 = ((($659)) + 12|0);
|
|
;HEAP8[$658>>0]=HEAP8[$660>>0]|0;HEAP8[$658+1>>0]=HEAP8[$660+1>>0]|0;HEAP8[$658+2>>0]=HEAP8[$660+2>>0]|0;HEAP8[$658+3>>0]=HEAP8[$660+3>>0]|0;
|
|
$661 = $scroll;
|
|
$662 = ((($661)) + 124|0);
|
|
$663 = $1;
|
|
$664 = ((($663)) + 12|0);
|
|
;HEAP8[$662>>0]=HEAP8[$664>>0]|0;HEAP8[$662+1>>0]=HEAP8[$664+1>>0]|0;HEAP8[$662+2>>0]=HEAP8[$664+2>>0]|0;HEAP8[$662+3>>0]=HEAP8[$664+3>>0]|0;
|
|
$665 = $scroll;
|
|
$666 = ((($665)) + 144|0);
|
|
_nk_vec2($88,0.0,0.0);
|
|
;HEAP32[$666>>2]=HEAP32[$88>>2]|0;HEAP32[$666+4>>2]=HEAP32[$88+4>>2]|0;
|
|
$667 = $scroll;
|
|
$668 = ((($667)) + 152|0);
|
|
HEAP32[$668>>2] = 0;
|
|
$669 = $scroll;
|
|
$670 = ((($669)) + 128|0);
|
|
HEAPF32[$670>>2] = 0.0;
|
|
$671 = $scroll;
|
|
$672 = ((($671)) + 132|0);
|
|
HEAPF32[$672>>2] = 0.0;
|
|
$673 = $scroll;
|
|
$674 = ((($673)) + 136|0);
|
|
HEAPF32[$674>>2] = 0.0;
|
|
$675 = $scroll;
|
|
$676 = ((($675)) + 140|0);
|
|
HEAPF32[$676>>2] = 0.0;
|
|
$677 = $scroll;
|
|
$678 = ((($677)) + 424|0);
|
|
HEAP32[$678>>2] = 0;
|
|
$679 = $scroll;
|
|
$680 = ((($679)) + 428|0);
|
|
HEAP32[$680>>2] = 0;
|
|
$681 = $style;
|
|
$682 = ((($681)) + 3516|0);
|
|
$683 = $style;
|
|
$684 = ((($683)) + 3084|0);
|
|
_memcpy(($682|0),($684|0),432)|0;
|
|
$685 = $style;
|
|
$686 = ((($685)) + 3084|0);
|
|
$687 = ((($686)) + 156|0);
|
|
$button = $687;
|
|
$688 = $button;
|
|
_nk_rgb($89,40,40,40);
|
|
;HEAP8[$$byval_copy43>>0]=HEAP8[$89>>0]|0;HEAP8[$$byval_copy43+1>>0]=HEAP8[$89+1>>0]|0;HEAP8[$$byval_copy43+2>>0]=HEAP8[$89+2>>0]|0;HEAP8[$$byval_copy43+3>>0]=HEAP8[$89+3>>0]|0;
|
|
_nk_style_item_color($90,$$byval_copy43);
|
|
;HEAP32[$688>>2]=HEAP32[$90>>2]|0;HEAP32[$688+4>>2]=HEAP32[$90+4>>2]|0;HEAP32[$688+8>>2]=HEAP32[$90+8>>2]|0;HEAP32[$688+12>>2]=HEAP32[$90+12>>2]|0;HEAP32[$688+16>>2]=HEAP32[$90+16>>2]|0;
|
|
$689 = $button;
|
|
$690 = ((($689)) + 20|0);
|
|
_nk_rgb($91,42,42,42);
|
|
;HEAP8[$$byval_copy44>>0]=HEAP8[$91>>0]|0;HEAP8[$$byval_copy44+1>>0]=HEAP8[$91+1>>0]|0;HEAP8[$$byval_copy44+2>>0]=HEAP8[$91+2>>0]|0;HEAP8[$$byval_copy44+3>>0]=HEAP8[$91+3>>0]|0;
|
|
_nk_style_item_color($92,$$byval_copy44);
|
|
;HEAP32[$690>>2]=HEAP32[$92>>2]|0;HEAP32[$690+4>>2]=HEAP32[$92+4>>2]|0;HEAP32[$690+8>>2]=HEAP32[$92+8>>2]|0;HEAP32[$690+12>>2]=HEAP32[$92+12>>2]|0;HEAP32[$690+16>>2]=HEAP32[$92+16>>2]|0;
|
|
$691 = $button;
|
|
$692 = ((($691)) + 40|0);
|
|
_nk_rgb($93,44,44,44);
|
|
;HEAP8[$$byval_copy45>>0]=HEAP8[$93>>0]|0;HEAP8[$$byval_copy45+1>>0]=HEAP8[$93+1>>0]|0;HEAP8[$$byval_copy45+2>>0]=HEAP8[$93+2>>0]|0;HEAP8[$$byval_copy45+3>>0]=HEAP8[$93+3>>0]|0;
|
|
_nk_style_item_color($94,$$byval_copy45);
|
|
;HEAP32[$692>>2]=HEAP32[$94>>2]|0;HEAP32[$692+4>>2]=HEAP32[$94+4>>2]|0;HEAP32[$692+8>>2]=HEAP32[$94+8>>2]|0;HEAP32[$692+12>>2]=HEAP32[$94+12>>2]|0;HEAP32[$692+16>>2]=HEAP32[$94+16>>2]|0;
|
|
$693 = $button;
|
|
$694 = ((($693)) + 60|0);
|
|
_nk_rgb($95,65,65,65);
|
|
;HEAP8[$694>>0]=HEAP8[$95>>0]|0;HEAP8[$694+1>>0]=HEAP8[$95+1>>0]|0;HEAP8[$694+2>>0]=HEAP8[$95+2>>0]|0;HEAP8[$694+3>>0]=HEAP8[$95+3>>0]|0;
|
|
$695 = $button;
|
|
$696 = ((($695)) + 64|0);
|
|
_nk_rgb($96,40,40,40);
|
|
;HEAP8[$696>>0]=HEAP8[$96>>0]|0;HEAP8[$696+1>>0]=HEAP8[$96+1>>0]|0;HEAP8[$696+2>>0]=HEAP8[$96+2>>0]|0;HEAP8[$696+3>>0]=HEAP8[$96+3>>0]|0;
|
|
$697 = $button;
|
|
$698 = ((($697)) + 68|0);
|
|
_nk_rgb($97,175,175,175);
|
|
;HEAP8[$698>>0]=HEAP8[$97>>0]|0;HEAP8[$698+1>>0]=HEAP8[$97+1>>0]|0;HEAP8[$698+2>>0]=HEAP8[$97+2>>0]|0;HEAP8[$698+3>>0]=HEAP8[$97+3>>0]|0;
|
|
$699 = $button;
|
|
$700 = ((($699)) + 72|0);
|
|
_nk_rgb($98,175,175,175);
|
|
;HEAP8[$700>>0]=HEAP8[$98>>0]|0;HEAP8[$700+1>>0]=HEAP8[$98+1>>0]|0;HEAP8[$700+2>>0]=HEAP8[$98+2>>0]|0;HEAP8[$700+3>>0]=HEAP8[$98+3>>0]|0;
|
|
$701 = $button;
|
|
$702 = ((($701)) + 76|0);
|
|
_nk_rgb($99,175,175,175);
|
|
;HEAP8[$702>>0]=HEAP8[$99>>0]|0;HEAP8[$702+1>>0]=HEAP8[$99+1>>0]|0;HEAP8[$702+2>>0]=HEAP8[$99+2>>0]|0;HEAP8[$702+3>>0]=HEAP8[$99+3>>0]|0;
|
|
$703 = $button;
|
|
$704 = ((($703)) + 92|0);
|
|
_nk_vec2($100,4.0,4.0);
|
|
;HEAP32[$704>>2]=HEAP32[$100>>2]|0;HEAP32[$704+4>>2]=HEAP32[$100+4>>2]|0;
|
|
$705 = $button;
|
|
$706 = ((($705)) + 108|0);
|
|
_nk_vec2($101,0.0,0.0);
|
|
;HEAP32[$706>>2]=HEAP32[$101>>2]|0;HEAP32[$706+4>>2]=HEAP32[$101+4>>2]|0;
|
|
$707 = $button;
|
|
$708 = ((($707)) + 116|0);
|
|
_nk_handle_ptr($102,0);
|
|
;HEAP32[$708>>2]=HEAP32[$102>>2]|0;
|
|
$709 = $button;
|
|
$710 = ((($709)) + 80|0);
|
|
HEAP32[$710>>2] = 18;
|
|
$711 = $button;
|
|
$712 = ((($711)) + 84|0);
|
|
HEAPF32[$712>>2] = 1.0;
|
|
$713 = $button;
|
|
$714 = ((($713)) + 88|0);
|
|
HEAPF32[$714>>2] = 0.0;
|
|
$715 = $button;
|
|
$716 = ((($715)) + 120|0);
|
|
HEAP32[$716>>2] = 0;
|
|
$717 = $button;
|
|
$718 = ((($717)) + 124|0);
|
|
HEAP32[$718>>2] = 0;
|
|
$719 = $style;
|
|
$720 = ((($719)) + 3084|0);
|
|
$721 = ((($720)) + 284|0);
|
|
$722 = $style;
|
|
$723 = ((($722)) + 3084|0);
|
|
$724 = ((($723)) + 156|0);
|
|
dest=$721; src=$724; stop=dest+128|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
|
|
$725 = $style;
|
|
$726 = ((($725)) + 3516|0);
|
|
$727 = ((($726)) + 156|0);
|
|
$728 = $style;
|
|
$729 = ((($728)) + 3084|0);
|
|
$730 = ((($729)) + 156|0);
|
|
dest=$727; src=$730; stop=dest+128|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
|
|
$731 = $style;
|
|
$732 = ((($731)) + 3516|0);
|
|
$733 = ((($732)) + 284|0);
|
|
$734 = $style;
|
|
$735 = ((($734)) + 3084|0);
|
|
$736 = ((($735)) + 156|0);
|
|
dest=$733; src=$736; stop=dest+128|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
|
|
$737 = $style;
|
|
$738 = ((($737)) + 2464|0);
|
|
$edit = $738;
|
|
$739 = $edit;
|
|
_nk_zero($739,572);
|
|
$740 = $edit;
|
|
$741 = $1;
|
|
$742 = ((($741)) + 68|0);
|
|
;HEAP8[$$byval_copy46>>0]=HEAP8[$742>>0]|0;HEAP8[$$byval_copy46+1>>0]=HEAP8[$742+1>>0]|0;HEAP8[$$byval_copy46+2>>0]=HEAP8[$742+2>>0]|0;HEAP8[$$byval_copy46+3>>0]=HEAP8[$742+3>>0]|0;
|
|
_nk_style_item_color($103,$$byval_copy46);
|
|
;HEAP32[$740>>2]=HEAP32[$103>>2]|0;HEAP32[$740+4>>2]=HEAP32[$103+4>>2]|0;HEAP32[$740+8>>2]=HEAP32[$103+8>>2]|0;HEAP32[$740+12>>2]=HEAP32[$103+12>>2]|0;HEAP32[$740+16>>2]=HEAP32[$103+16>>2]|0;
|
|
$743 = $edit;
|
|
$744 = ((($743)) + 20|0);
|
|
$745 = $1;
|
|
$746 = ((($745)) + 68|0);
|
|
;HEAP8[$$byval_copy47>>0]=HEAP8[$746>>0]|0;HEAP8[$$byval_copy47+1>>0]=HEAP8[$746+1>>0]|0;HEAP8[$$byval_copy47+2>>0]=HEAP8[$746+2>>0]|0;HEAP8[$$byval_copy47+3>>0]=HEAP8[$746+3>>0]|0;
|
|
_nk_style_item_color($104,$$byval_copy47);
|
|
;HEAP32[$744>>2]=HEAP32[$104>>2]|0;HEAP32[$744+4>>2]=HEAP32[$104+4>>2]|0;HEAP32[$744+8>>2]=HEAP32[$104+8>>2]|0;HEAP32[$744+12>>2]=HEAP32[$104+12>>2]|0;HEAP32[$744+16>>2]=HEAP32[$104+16>>2]|0;
|
|
$747 = $edit;
|
|
$748 = ((($747)) + 40|0);
|
|
$749 = $1;
|
|
$750 = ((($749)) + 68|0);
|
|
;HEAP8[$$byval_copy48>>0]=HEAP8[$750>>0]|0;HEAP8[$$byval_copy48+1>>0]=HEAP8[$750+1>>0]|0;HEAP8[$$byval_copy48+2>>0]=HEAP8[$750+2>>0]|0;HEAP8[$$byval_copy48+3>>0]=HEAP8[$750+3>>0]|0;
|
|
_nk_style_item_color($105,$$byval_copy48);
|
|
;HEAP32[$748>>2]=HEAP32[$105>>2]|0;HEAP32[$748+4>>2]=HEAP32[$105+4>>2]|0;HEAP32[$748+8>>2]=HEAP32[$105+8>>2]|0;HEAP32[$748+12>>2]=HEAP32[$105+12>>2]|0;HEAP32[$748+16>>2]=HEAP32[$105+16>>2]|0;
|
|
$751 = $edit;
|
|
$752 = ((($751)) + 496|0);
|
|
$753 = $1;
|
|
;HEAP8[$752>>0]=HEAP8[$753>>0]|0;HEAP8[$752+1>>0]=HEAP8[$753+1>>0]|0;HEAP8[$752+2>>0]=HEAP8[$753+2>>0]|0;HEAP8[$752+3>>0]=HEAP8[$753+3>>0]|0;
|
|
$754 = $edit;
|
|
$755 = ((($754)) + 500|0);
|
|
$756 = $1;
|
|
;HEAP8[$755>>0]=HEAP8[$756>>0]|0;HEAP8[$755+1>>0]=HEAP8[$756+1>>0]|0;HEAP8[$755+2>>0]=HEAP8[$756+2>>0]|0;HEAP8[$755+3>>0]=HEAP8[$756+3>>0]|0;
|
|
$757 = $edit;
|
|
$758 = ((($757)) + 504|0);
|
|
$759 = $1;
|
|
$760 = ((($759)) + 68|0);
|
|
;HEAP8[$758>>0]=HEAP8[$760>>0]|0;HEAP8[$758+1>>0]=HEAP8[$760+1>>0]|0;HEAP8[$758+2>>0]=HEAP8[$760+2>>0]|0;HEAP8[$758+3>>0]=HEAP8[$760+3>>0]|0;
|
|
$761 = $edit;
|
|
$762 = ((($761)) + 508|0);
|
|
$763 = $1;
|
|
$764 = ((($763)) + 68|0);
|
|
;HEAP8[$762>>0]=HEAP8[$764>>0]|0;HEAP8[$762+1>>0]=HEAP8[$764+1>>0]|0;HEAP8[$762+2>>0]=HEAP8[$764+2>>0]|0;HEAP8[$762+3>>0]=HEAP8[$764+3>>0]|0;
|
|
$765 = $edit;
|
|
$766 = ((($765)) + 60|0);
|
|
$767 = $1;
|
|
$768 = ((($767)) + 12|0);
|
|
;HEAP8[$766>>0]=HEAP8[$768>>0]|0;HEAP8[$766+1>>0]=HEAP8[$768+1>>0]|0;HEAP8[$766+2>>0]=HEAP8[$768+2>>0]|0;HEAP8[$766+3>>0]=HEAP8[$768+3>>0]|0;
|
|
$769 = $edit;
|
|
$770 = ((($769)) + 512|0);
|
|
$771 = $1;
|
|
;HEAP8[$770>>0]=HEAP8[$771>>0]|0;HEAP8[$770+1>>0]=HEAP8[$771+1>>0]|0;HEAP8[$770+2>>0]=HEAP8[$771+2>>0]|0;HEAP8[$770+3>>0]=HEAP8[$771+3>>0]|0;
|
|
$772 = $edit;
|
|
$773 = ((($772)) + 516|0);
|
|
$774 = $1;
|
|
;HEAP8[$773>>0]=HEAP8[$774>>0]|0;HEAP8[$773+1>>0]=HEAP8[$774+1>>0]|0;HEAP8[$773+2>>0]=HEAP8[$774+2>>0]|0;HEAP8[$773+3>>0]=HEAP8[$774+3>>0]|0;
|
|
$775 = $edit;
|
|
$776 = ((($775)) + 520|0);
|
|
$777 = $1;
|
|
;HEAP8[$776>>0]=HEAP8[$777>>0]|0;HEAP8[$776+1>>0]=HEAP8[$777+1>>0]|0;HEAP8[$776+2>>0]=HEAP8[$777+2>>0]|0;HEAP8[$776+3>>0]=HEAP8[$777+3>>0]|0;
|
|
$778 = $edit;
|
|
$779 = ((($778)) + 524|0);
|
|
$780 = $1;
|
|
;HEAP8[$779>>0]=HEAP8[$780>>0]|0;HEAP8[$779+1>>0]=HEAP8[$780+1>>0]|0;HEAP8[$779+2>>0]=HEAP8[$780+2>>0]|0;HEAP8[$779+3>>0]=HEAP8[$780+3>>0]|0;
|
|
$781 = $edit;
|
|
$782 = ((($781)) + 528|0);
|
|
$783 = $1;
|
|
;HEAP8[$782>>0]=HEAP8[$783>>0]|0;HEAP8[$782+1>>0]=HEAP8[$783+1>>0]|0;HEAP8[$782+2>>0]=HEAP8[$783+2>>0]|0;HEAP8[$782+3>>0]=HEAP8[$783+3>>0]|0;
|
|
$784 = $edit;
|
|
$785 = ((($784)) + 532|0);
|
|
$786 = $1;
|
|
$787 = ((($786)) + 68|0);
|
|
;HEAP8[$785>>0]=HEAP8[$787>>0]|0;HEAP8[$785+1>>0]=HEAP8[$787+1>>0]|0;HEAP8[$785+2>>0]=HEAP8[$787+2>>0]|0;HEAP8[$785+3>>0]=HEAP8[$787+3>>0]|0;
|
|
$788 = $edit;
|
|
$789 = ((($788)) + 536|0);
|
|
$790 = $1;
|
|
$791 = ((($790)) + 68|0);
|
|
;HEAP8[$789>>0]=HEAP8[$791>>0]|0;HEAP8[$789+1>>0]=HEAP8[$791+1>>0]|0;HEAP8[$789+2>>0]=HEAP8[$791+2>>0]|0;HEAP8[$789+3>>0]=HEAP8[$791+3>>0]|0;
|
|
$792 = $edit;
|
|
$793 = ((($792)) + 568|0);
|
|
HEAPF32[$793>>2] = 2.0;
|
|
$794 = $edit;
|
|
$795 = ((($794)) + 560|0);
|
|
_nk_vec2($106,4.0,4.0);
|
|
;HEAP32[$795>>2]=HEAP32[$106>>2]|0;HEAP32[$795+4>>2]=HEAP32[$106+4>>2]|0;
|
|
$796 = $edit;
|
|
$797 = ((($796)) + 548|0);
|
|
HEAPF32[$797>>2] = 4.0;
|
|
$798 = $edit;
|
|
$799 = ((($798)) + 540|0);
|
|
HEAPF32[$799>>2] = 1.0;
|
|
$800 = $edit;
|
|
$801 = ((($800)) + 544|0);
|
|
HEAPF32[$801>>2] = 0.0;
|
|
$802 = $style;
|
|
$803 = ((($802)) + 1524|0);
|
|
$property = $803;
|
|
$804 = $property;
|
|
_nk_zero($804,940);
|
|
$805 = $property;
|
|
$806 = $1;
|
|
$807 = ((($806)) + 64|0);
|
|
;HEAP8[$$byval_copy49>>0]=HEAP8[$807>>0]|0;HEAP8[$$byval_copy49+1>>0]=HEAP8[$807+1>>0]|0;HEAP8[$$byval_copy49+2>>0]=HEAP8[$807+2>>0]|0;HEAP8[$$byval_copy49+3>>0]=HEAP8[$807+3>>0]|0;
|
|
_nk_style_item_color($107,$$byval_copy49);
|
|
;HEAP32[$805>>2]=HEAP32[$107>>2]|0;HEAP32[$805+4>>2]=HEAP32[$107+4>>2]|0;HEAP32[$805+8>>2]=HEAP32[$107+8>>2]|0;HEAP32[$805+12>>2]=HEAP32[$107+12>>2]|0;HEAP32[$805+16>>2]=HEAP32[$107+16>>2]|0;
|
|
$808 = $property;
|
|
$809 = ((($808)) + 20|0);
|
|
$810 = $1;
|
|
$811 = ((($810)) + 64|0);
|
|
;HEAP8[$$byval_copy50>>0]=HEAP8[$811>>0]|0;HEAP8[$$byval_copy50+1>>0]=HEAP8[$811+1>>0]|0;HEAP8[$$byval_copy50+2>>0]=HEAP8[$811+2>>0]|0;HEAP8[$$byval_copy50+3>>0]=HEAP8[$811+3>>0]|0;
|
|
_nk_style_item_color($108,$$byval_copy50);
|
|
;HEAP32[$809>>2]=HEAP32[$108>>2]|0;HEAP32[$809+4>>2]=HEAP32[$108+4>>2]|0;HEAP32[$809+8>>2]=HEAP32[$108+8>>2]|0;HEAP32[$809+12>>2]=HEAP32[$108+12>>2]|0;HEAP32[$809+16>>2]=HEAP32[$108+16>>2]|0;
|
|
$812 = $property;
|
|
$813 = ((($812)) + 40|0);
|
|
$814 = $1;
|
|
$815 = ((($814)) + 64|0);
|
|
;HEAP8[$$byval_copy51>>0]=HEAP8[$815>>0]|0;HEAP8[$$byval_copy51+1>>0]=HEAP8[$815+1>>0]|0;HEAP8[$$byval_copy51+2>>0]=HEAP8[$815+2>>0]|0;HEAP8[$$byval_copy51+3>>0]=HEAP8[$815+3>>0]|0;
|
|
_nk_style_item_color($109,$$byval_copy51);
|
|
;HEAP32[$813>>2]=HEAP32[$109>>2]|0;HEAP32[$813+4>>2]=HEAP32[$109+4>>2]|0;HEAP32[$813+8>>2]=HEAP32[$109+8>>2]|0;HEAP32[$813+12>>2]=HEAP32[$109+12>>2]|0;HEAP32[$813+16>>2]=HEAP32[$109+16>>2]|0;
|
|
$816 = $property;
|
|
$817 = ((($816)) + 60|0);
|
|
$818 = $1;
|
|
$819 = ((($818)) + 12|0);
|
|
;HEAP8[$817>>0]=HEAP8[$819>>0]|0;HEAP8[$817+1>>0]=HEAP8[$819+1>>0]|0;HEAP8[$817+2>>0]=HEAP8[$819+2>>0]|0;HEAP8[$817+3>>0]=HEAP8[$819+3>>0]|0;
|
|
$820 = $property;
|
|
$821 = ((($820)) + 64|0);
|
|
$822 = $1;
|
|
;HEAP8[$821>>0]=HEAP8[$822>>0]|0;HEAP8[$821+1>>0]=HEAP8[$822+1>>0]|0;HEAP8[$821+2>>0]=HEAP8[$822+2>>0]|0;HEAP8[$821+3>>0]=HEAP8[$822+3>>0]|0;
|
|
$823 = $property;
|
|
$824 = ((($823)) + 68|0);
|
|
$825 = $1;
|
|
;HEAP8[$824>>0]=HEAP8[$825>>0]|0;HEAP8[$824+1>>0]=HEAP8[$825+1>>0]|0;HEAP8[$824+2>>0]=HEAP8[$825+2>>0]|0;HEAP8[$824+3>>0]=HEAP8[$825+3>>0]|0;
|
|
$826 = $property;
|
|
$827 = ((($826)) + 72|0);
|
|
$828 = $1;
|
|
;HEAP8[$827>>0]=HEAP8[$828>>0]|0;HEAP8[$827+1>>0]=HEAP8[$828+1>>0]|0;HEAP8[$827+2>>0]=HEAP8[$828+2>>0]|0;HEAP8[$827+3>>0]=HEAP8[$828+3>>0]|0;
|
|
$829 = $property;
|
|
$830 = ((($829)) + 76|0);
|
|
HEAP32[$830>>2] = 9;
|
|
$831 = $property;
|
|
$832 = ((($831)) + 80|0);
|
|
HEAP32[$832>>2] = 10;
|
|
$833 = $property;
|
|
$834 = ((($833)) + 928|0);
|
|
_nk_handle_ptr($110,0);
|
|
;HEAP32[$834>>2]=HEAP32[$110>>2]|0;
|
|
$835 = $property;
|
|
$836 = ((($835)) + 92|0);
|
|
_nk_vec2($111,4.0,4.0);
|
|
;HEAP32[$836>>2]=HEAP32[$111>>2]|0;HEAP32[$836+4>>2]=HEAP32[$111+4>>2]|0;
|
|
$837 = $property;
|
|
$838 = ((($837)) + 84|0);
|
|
HEAPF32[$838>>2] = 1.0;
|
|
$839 = $property;
|
|
$840 = ((($839)) + 88|0);
|
|
HEAPF32[$840>>2] = 10.0;
|
|
$841 = $property;
|
|
$842 = ((($841)) + 932|0);
|
|
HEAP32[$842>>2] = 0;
|
|
$843 = $property;
|
|
$844 = ((($843)) + 936|0);
|
|
HEAP32[$844>>2] = 0;
|
|
$845 = $style;
|
|
$846 = ((($845)) + 1524|0);
|
|
$847 = ((($846)) + 800|0);
|
|
$button = $847;
|
|
$848 = $button;
|
|
_nk_zero($848,128);
|
|
$849 = $button;
|
|
$850 = $1;
|
|
$851 = ((($850)) + 64|0);
|
|
;HEAP8[$$byval_copy52>>0]=HEAP8[$851>>0]|0;HEAP8[$$byval_copy52+1>>0]=HEAP8[$851+1>>0]|0;HEAP8[$$byval_copy52+2>>0]=HEAP8[$851+2>>0]|0;HEAP8[$$byval_copy52+3>>0]=HEAP8[$851+3>>0]|0;
|
|
_nk_style_item_color($112,$$byval_copy52);
|
|
;HEAP32[$849>>2]=HEAP32[$112>>2]|0;HEAP32[$849+4>>2]=HEAP32[$112+4>>2]|0;HEAP32[$849+8>>2]=HEAP32[$112+8>>2]|0;HEAP32[$849+12>>2]=HEAP32[$112+12>>2]|0;HEAP32[$849+16>>2]=HEAP32[$112+16>>2]|0;
|
|
$852 = $button;
|
|
$853 = ((($852)) + 20|0);
|
|
$854 = $1;
|
|
$855 = ((($854)) + 64|0);
|
|
;HEAP8[$$byval_copy53>>0]=HEAP8[$855>>0]|0;HEAP8[$$byval_copy53+1>>0]=HEAP8[$855+1>>0]|0;HEAP8[$$byval_copy53+2>>0]=HEAP8[$855+2>>0]|0;HEAP8[$$byval_copy53+3>>0]=HEAP8[$855+3>>0]|0;
|
|
_nk_style_item_color($113,$$byval_copy53);
|
|
;HEAP32[$853>>2]=HEAP32[$113>>2]|0;HEAP32[$853+4>>2]=HEAP32[$113+4>>2]|0;HEAP32[$853+8>>2]=HEAP32[$113+8>>2]|0;HEAP32[$853+12>>2]=HEAP32[$113+12>>2]|0;HEAP32[$853+16>>2]=HEAP32[$113+16>>2]|0;
|
|
$856 = $button;
|
|
$857 = ((($856)) + 40|0);
|
|
$858 = $1;
|
|
$859 = ((($858)) + 64|0);
|
|
;HEAP8[$$byval_copy54>>0]=HEAP8[$859>>0]|0;HEAP8[$$byval_copy54+1>>0]=HEAP8[$859+1>>0]|0;HEAP8[$$byval_copy54+2>>0]=HEAP8[$859+2>>0]|0;HEAP8[$$byval_copy54+3>>0]=HEAP8[$859+3>>0]|0;
|
|
_nk_style_item_color($114,$$byval_copy54);
|
|
;HEAP32[$857>>2]=HEAP32[$114>>2]|0;HEAP32[$857+4>>2]=HEAP32[$114+4>>2]|0;HEAP32[$857+8>>2]=HEAP32[$114+8>>2]|0;HEAP32[$857+12>>2]=HEAP32[$114+12>>2]|0;HEAP32[$857+16>>2]=HEAP32[$114+16>>2]|0;
|
|
$860 = $button;
|
|
$861 = ((($860)) + 60|0);
|
|
_nk_rgba($115,0,0,0,0);
|
|
;HEAP8[$861>>0]=HEAP8[$115>>0]|0;HEAP8[$861+1>>0]=HEAP8[$115+1>>0]|0;HEAP8[$861+2>>0]=HEAP8[$115+2>>0]|0;HEAP8[$861+3>>0]=HEAP8[$115+3>>0]|0;
|
|
$862 = $button;
|
|
$863 = ((($862)) + 64|0);
|
|
$864 = $1;
|
|
$865 = ((($864)) + 64|0);
|
|
;HEAP8[$863>>0]=HEAP8[$865>>0]|0;HEAP8[$863+1>>0]=HEAP8[$865+1>>0]|0;HEAP8[$863+2>>0]=HEAP8[$865+2>>0]|0;HEAP8[$863+3>>0]=HEAP8[$865+3>>0]|0;
|
|
$866 = $button;
|
|
$867 = ((($866)) + 68|0);
|
|
$868 = $1;
|
|
;HEAP8[$867>>0]=HEAP8[$868>>0]|0;HEAP8[$867+1>>0]=HEAP8[$868+1>>0]|0;HEAP8[$867+2>>0]=HEAP8[$868+2>>0]|0;HEAP8[$867+3>>0]=HEAP8[$868+3>>0]|0;
|
|
$869 = $button;
|
|
$870 = ((($869)) + 72|0);
|
|
$871 = $1;
|
|
;HEAP8[$870>>0]=HEAP8[$871>>0]|0;HEAP8[$870+1>>0]=HEAP8[$871+1>>0]|0;HEAP8[$870+2>>0]=HEAP8[$871+2>>0]|0;HEAP8[$870+3>>0]=HEAP8[$871+3>>0]|0;
|
|
$872 = $button;
|
|
$873 = ((($872)) + 76|0);
|
|
$874 = $1;
|
|
;HEAP8[$873>>0]=HEAP8[$874>>0]|0;HEAP8[$873+1>>0]=HEAP8[$874+1>>0]|0;HEAP8[$873+2>>0]=HEAP8[$874+2>>0]|0;HEAP8[$873+3>>0]=HEAP8[$874+3>>0]|0;
|
|
$875 = $button;
|
|
$876 = ((($875)) + 92|0);
|
|
_nk_vec2($116,0.0,0.0);
|
|
;HEAP32[$876>>2]=HEAP32[$116>>2]|0;HEAP32[$876+4>>2]=HEAP32[$116+4>>2]|0;
|
|
$877 = $button;
|
|
$878 = ((($877)) + 108|0);
|
|
_nk_vec2($117,0.0,0.0);
|
|
;HEAP32[$878>>2]=HEAP32[$117>>2]|0;HEAP32[$878+4>>2]=HEAP32[$117+4>>2]|0;
|
|
$879 = $button;
|
|
$880 = ((($879)) + 116|0);
|
|
_nk_handle_ptr($118,0);
|
|
;HEAP32[$880>>2]=HEAP32[$118>>2]|0;
|
|
$881 = $button;
|
|
$882 = ((($881)) + 80|0);
|
|
HEAP32[$882>>2] = 18;
|
|
$883 = $button;
|
|
$884 = ((($883)) + 84|0);
|
|
HEAPF32[$884>>2] = 0.0;
|
|
$885 = $button;
|
|
$886 = ((($885)) + 88|0);
|
|
HEAPF32[$886>>2] = 0.0;
|
|
$887 = $button;
|
|
$888 = ((($887)) + 120|0);
|
|
HEAP32[$888>>2] = 0;
|
|
$889 = $button;
|
|
$890 = ((($889)) + 124|0);
|
|
HEAP32[$890>>2] = 0;
|
|
$891 = $style;
|
|
$892 = ((($891)) + 1524|0);
|
|
$893 = ((($892)) + 672|0);
|
|
$894 = $style;
|
|
$895 = ((($894)) + 1524|0);
|
|
$896 = ((($895)) + 800|0);
|
|
dest=$893; src=$896; stop=dest+128|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
|
|
$897 = $style;
|
|
$898 = ((($897)) + 1524|0);
|
|
$899 = ((($898)) + 100|0);
|
|
$edit = $899;
|
|
$900 = $edit;
|
|
_nk_zero($900,572);
|
|
$901 = $edit;
|
|
$902 = $1;
|
|
$903 = ((($902)) + 64|0);
|
|
;HEAP8[$$byval_copy55>>0]=HEAP8[$903>>0]|0;HEAP8[$$byval_copy55+1>>0]=HEAP8[$903+1>>0]|0;HEAP8[$$byval_copy55+2>>0]=HEAP8[$903+2>>0]|0;HEAP8[$$byval_copy55+3>>0]=HEAP8[$903+3>>0]|0;
|
|
_nk_style_item_color($119,$$byval_copy55);
|
|
;HEAP32[$901>>2]=HEAP32[$119>>2]|0;HEAP32[$901+4>>2]=HEAP32[$119+4>>2]|0;HEAP32[$901+8>>2]=HEAP32[$119+8>>2]|0;HEAP32[$901+12>>2]=HEAP32[$119+12>>2]|0;HEAP32[$901+16>>2]=HEAP32[$119+16>>2]|0;
|
|
$904 = $edit;
|
|
$905 = ((($904)) + 20|0);
|
|
$906 = $1;
|
|
$907 = ((($906)) + 64|0);
|
|
;HEAP8[$$byval_copy56>>0]=HEAP8[$907>>0]|0;HEAP8[$$byval_copy56+1>>0]=HEAP8[$907+1>>0]|0;HEAP8[$$byval_copy56+2>>0]=HEAP8[$907+2>>0]|0;HEAP8[$$byval_copy56+3>>0]=HEAP8[$907+3>>0]|0;
|
|
_nk_style_item_color($120,$$byval_copy56);
|
|
;HEAP32[$905>>2]=HEAP32[$120>>2]|0;HEAP32[$905+4>>2]=HEAP32[$120+4>>2]|0;HEAP32[$905+8>>2]=HEAP32[$120+8>>2]|0;HEAP32[$905+12>>2]=HEAP32[$120+12>>2]|0;HEAP32[$905+16>>2]=HEAP32[$120+16>>2]|0;
|
|
$908 = $edit;
|
|
$909 = ((($908)) + 40|0);
|
|
$910 = $1;
|
|
$911 = ((($910)) + 64|0);
|
|
;HEAP8[$$byval_copy57>>0]=HEAP8[$911>>0]|0;HEAP8[$$byval_copy57+1>>0]=HEAP8[$911+1>>0]|0;HEAP8[$$byval_copy57+2>>0]=HEAP8[$911+2>>0]|0;HEAP8[$$byval_copy57+3>>0]=HEAP8[$911+3>>0]|0;
|
|
_nk_style_item_color($121,$$byval_copy57);
|
|
;HEAP32[$909>>2]=HEAP32[$121>>2]|0;HEAP32[$909+4>>2]=HEAP32[$121+4>>2]|0;HEAP32[$909+8>>2]=HEAP32[$121+8>>2]|0;HEAP32[$909+12>>2]=HEAP32[$121+12>>2]|0;HEAP32[$909+16>>2]=HEAP32[$121+16>>2]|0;
|
|
$912 = $edit;
|
|
$913 = ((($912)) + 60|0);
|
|
_nk_rgba($122,0,0,0,0);
|
|
;HEAP8[$913>>0]=HEAP8[$122>>0]|0;HEAP8[$913+1>>0]=HEAP8[$122+1>>0]|0;HEAP8[$913+2>>0]=HEAP8[$122+2>>0]|0;HEAP8[$913+3>>0]=HEAP8[$122+3>>0]|0;
|
|
$914 = $edit;
|
|
$915 = ((($914)) + 496|0);
|
|
$916 = $1;
|
|
;HEAP8[$915>>0]=HEAP8[$916>>0]|0;HEAP8[$915+1>>0]=HEAP8[$916+1>>0]|0;HEAP8[$915+2>>0]=HEAP8[$916+2>>0]|0;HEAP8[$915+3>>0]=HEAP8[$916+3>>0]|0;
|
|
$917 = $edit;
|
|
$918 = ((($917)) + 500|0);
|
|
$919 = $1;
|
|
;HEAP8[$918>>0]=HEAP8[$919>>0]|0;HEAP8[$918+1>>0]=HEAP8[$919+1>>0]|0;HEAP8[$918+2>>0]=HEAP8[$919+2>>0]|0;HEAP8[$918+3>>0]=HEAP8[$919+3>>0]|0;
|
|
$920 = $edit;
|
|
$921 = ((($920)) + 504|0);
|
|
$922 = $1;
|
|
$923 = ((($922)) + 68|0);
|
|
;HEAP8[$921>>0]=HEAP8[$923>>0]|0;HEAP8[$921+1>>0]=HEAP8[$923+1>>0]|0;HEAP8[$921+2>>0]=HEAP8[$923+2>>0]|0;HEAP8[$921+3>>0]=HEAP8[$923+3>>0]|0;
|
|
$924 = $edit;
|
|
$925 = ((($924)) + 508|0);
|
|
$926 = $1;
|
|
$927 = ((($926)) + 68|0);
|
|
;HEAP8[$925>>0]=HEAP8[$927>>0]|0;HEAP8[$925+1>>0]=HEAP8[$927+1>>0]|0;HEAP8[$925+2>>0]=HEAP8[$927+2>>0]|0;HEAP8[$925+3>>0]=HEAP8[$927+3>>0]|0;
|
|
$928 = $edit;
|
|
$929 = ((($928)) + 512|0);
|
|
$930 = $1;
|
|
;HEAP8[$929>>0]=HEAP8[$930>>0]|0;HEAP8[$929+1>>0]=HEAP8[$930+1>>0]|0;HEAP8[$929+2>>0]=HEAP8[$930+2>>0]|0;HEAP8[$929+3>>0]=HEAP8[$930+3>>0]|0;
|
|
$931 = $edit;
|
|
$932 = ((($931)) + 516|0);
|
|
$933 = $1;
|
|
;HEAP8[$932>>0]=HEAP8[$933>>0]|0;HEAP8[$932+1>>0]=HEAP8[$933+1>>0]|0;HEAP8[$932+2>>0]=HEAP8[$933+2>>0]|0;HEAP8[$932+3>>0]=HEAP8[$933+3>>0]|0;
|
|
$934 = $edit;
|
|
$935 = ((($934)) + 520|0);
|
|
$936 = $1;
|
|
;HEAP8[$935>>0]=HEAP8[$936>>0]|0;HEAP8[$935+1>>0]=HEAP8[$936+1>>0]|0;HEAP8[$935+2>>0]=HEAP8[$936+2>>0]|0;HEAP8[$935+3>>0]=HEAP8[$936+3>>0]|0;
|
|
$937 = $edit;
|
|
$938 = ((($937)) + 524|0);
|
|
$939 = $1;
|
|
;HEAP8[$938>>0]=HEAP8[$939>>0]|0;HEAP8[$938+1>>0]=HEAP8[$939+1>>0]|0;HEAP8[$938+2>>0]=HEAP8[$939+2>>0]|0;HEAP8[$938+3>>0]=HEAP8[$939+3>>0]|0;
|
|
$940 = $edit;
|
|
$941 = ((($940)) + 528|0);
|
|
$942 = $1;
|
|
;HEAP8[$941>>0]=HEAP8[$942>>0]|0;HEAP8[$941+1>>0]=HEAP8[$942+1>>0]|0;HEAP8[$941+2>>0]=HEAP8[$942+2>>0]|0;HEAP8[$941+3>>0]=HEAP8[$942+3>>0]|0;
|
|
$943 = $edit;
|
|
$944 = ((($943)) + 532|0);
|
|
$945 = $1;
|
|
$946 = ((($945)) + 68|0);
|
|
;HEAP8[$944>>0]=HEAP8[$946>>0]|0;HEAP8[$944+1>>0]=HEAP8[$946+1>>0]|0;HEAP8[$944+2>>0]=HEAP8[$946+2>>0]|0;HEAP8[$944+3>>0]=HEAP8[$946+3>>0]|0;
|
|
$947 = $edit;
|
|
$948 = ((($947)) + 536|0);
|
|
$949 = $1;
|
|
$950 = ((($949)) + 68|0);
|
|
;HEAP8[$948>>0]=HEAP8[$950>>0]|0;HEAP8[$948+1>>0]=HEAP8[$950+1>>0]|0;HEAP8[$948+2>>0]=HEAP8[$950+2>>0]|0;HEAP8[$948+3>>0]=HEAP8[$950+3>>0]|0;
|
|
$951 = $edit;
|
|
$952 = ((($951)) + 560|0);
|
|
_nk_vec2($123,0.0,0.0);
|
|
;HEAP32[$952>>2]=HEAP32[$123>>2]|0;HEAP32[$952+4>>2]=HEAP32[$123+4>>2]|0;
|
|
$953 = $edit;
|
|
$954 = ((($953)) + 548|0);
|
|
HEAPF32[$954>>2] = 8.0;
|
|
$955 = $edit;
|
|
$956 = ((($955)) + 540|0);
|
|
HEAPF32[$956>>2] = 0.0;
|
|
$957 = $edit;
|
|
$958 = ((($957)) + 544|0);
|
|
HEAPF32[$958>>2] = 0.0;
|
|
$959 = $style;
|
|
$960 = ((($959)) + 3036|0);
|
|
$chart = $960;
|
|
$961 = $chart;
|
|
_nk_zero($961,48);
|
|
$962 = $chart;
|
|
$963 = $1;
|
|
$964 = ((($963)) + 80|0);
|
|
;HEAP8[$$byval_copy58>>0]=HEAP8[$964>>0]|0;HEAP8[$$byval_copy58+1>>0]=HEAP8[$964+1>>0]|0;HEAP8[$$byval_copy58+2>>0]=HEAP8[$964+2>>0]|0;HEAP8[$$byval_copy58+3>>0]=HEAP8[$964+3>>0]|0;
|
|
_nk_style_item_color($124,$$byval_copy58);
|
|
;HEAP32[$962>>2]=HEAP32[$124>>2]|0;HEAP32[$962+4>>2]=HEAP32[$124+4>>2]|0;HEAP32[$962+8>>2]=HEAP32[$124+8>>2]|0;HEAP32[$962+12>>2]=HEAP32[$124+12>>2]|0;HEAP32[$962+16>>2]=HEAP32[$124+16>>2]|0;
|
|
$965 = $chart;
|
|
$966 = ((($965)) + 20|0);
|
|
$967 = $1;
|
|
$968 = ((($967)) + 12|0);
|
|
;HEAP8[$966>>0]=HEAP8[$968>>0]|0;HEAP8[$966+1>>0]=HEAP8[$968+1>>0]|0;HEAP8[$966+2>>0]=HEAP8[$968+2>>0]|0;HEAP8[$966+3>>0]=HEAP8[$968+3>>0]|0;
|
|
$969 = $chart;
|
|
$970 = ((($969)) + 24|0);
|
|
$971 = $1;
|
|
$972 = ((($971)) + 88|0);
|
|
;HEAP8[$970>>0]=HEAP8[$972>>0]|0;HEAP8[$970+1>>0]=HEAP8[$972+1>>0]|0;HEAP8[$970+2>>0]=HEAP8[$972+2>>0]|0;HEAP8[$970+3>>0]=HEAP8[$972+3>>0]|0;
|
|
$973 = $chart;
|
|
$974 = ((($973)) + 28|0);
|
|
$975 = $1;
|
|
$976 = ((($975)) + 84|0);
|
|
;HEAP8[$974>>0]=HEAP8[$976>>0]|0;HEAP8[$974+1>>0]=HEAP8[$976+1>>0]|0;HEAP8[$974+2>>0]=HEAP8[$976+2>>0]|0;HEAP8[$974+3>>0]=HEAP8[$976+3>>0]|0;
|
|
$977 = $chart;
|
|
$978 = ((($977)) + 40|0);
|
|
_nk_vec2($125,4.0,4.0);
|
|
;HEAP32[$978>>2]=HEAP32[$125>>2]|0;HEAP32[$978+4>>2]=HEAP32[$125+4>>2]|0;
|
|
$979 = $chart;
|
|
$980 = ((($979)) + 32|0);
|
|
HEAPF32[$980>>2] = 0.0;
|
|
$981 = $chart;
|
|
$982 = ((($981)) + 36|0);
|
|
HEAPF32[$982>>2] = 0.0;
|
|
$983 = $style;
|
|
$984 = ((($983)) + 4524|0);
|
|
$combo = $984;
|
|
$985 = $combo;
|
|
$986 = $1;
|
|
$987 = ((($986)) + 76|0);
|
|
;HEAP8[$$byval_copy59>>0]=HEAP8[$987>>0]|0;HEAP8[$$byval_copy59+1>>0]=HEAP8[$987+1>>0]|0;HEAP8[$$byval_copy59+2>>0]=HEAP8[$987+2>>0]|0;HEAP8[$$byval_copy59+3>>0]=HEAP8[$987+3>>0]|0;
|
|
_nk_style_item_color($126,$$byval_copy59);
|
|
;HEAP32[$985>>2]=HEAP32[$126>>2]|0;HEAP32[$985+4>>2]=HEAP32[$126+4>>2]|0;HEAP32[$985+8>>2]=HEAP32[$126+8>>2]|0;HEAP32[$985+12>>2]=HEAP32[$126+12>>2]|0;HEAP32[$985+16>>2]=HEAP32[$126+16>>2]|0;
|
|
$988 = $combo;
|
|
$989 = ((($988)) + 20|0);
|
|
$990 = $1;
|
|
$991 = ((($990)) + 76|0);
|
|
;HEAP8[$$byval_copy60>>0]=HEAP8[$991>>0]|0;HEAP8[$$byval_copy60+1>>0]=HEAP8[$991+1>>0]|0;HEAP8[$$byval_copy60+2>>0]=HEAP8[$991+2>>0]|0;HEAP8[$$byval_copy60+3>>0]=HEAP8[$991+3>>0]|0;
|
|
_nk_style_item_color($127,$$byval_copy60);
|
|
;HEAP32[$989>>2]=HEAP32[$127>>2]|0;HEAP32[$989+4>>2]=HEAP32[$127+4>>2]|0;HEAP32[$989+8>>2]=HEAP32[$127+8>>2]|0;HEAP32[$989+12>>2]=HEAP32[$127+12>>2]|0;HEAP32[$989+16>>2]=HEAP32[$127+16>>2]|0;
|
|
$992 = $combo;
|
|
$993 = ((($992)) + 40|0);
|
|
$994 = $1;
|
|
$995 = ((($994)) + 76|0);
|
|
;HEAP8[$$byval_copy61>>0]=HEAP8[$995>>0]|0;HEAP8[$$byval_copy61+1>>0]=HEAP8[$995+1>>0]|0;HEAP8[$$byval_copy61+2>>0]=HEAP8[$995+2>>0]|0;HEAP8[$$byval_copy61+3>>0]=HEAP8[$995+3>>0]|0;
|
|
_nk_style_item_color($128,$$byval_copy61);
|
|
;HEAP32[$993>>2]=HEAP32[$128>>2]|0;HEAP32[$993+4>>2]=HEAP32[$128+4>>2]|0;HEAP32[$993+8>>2]=HEAP32[$128+8>>2]|0;HEAP32[$993+12>>2]=HEAP32[$128+12>>2]|0;HEAP32[$993+16>>2]=HEAP32[$128+16>>2]|0;
|
|
$996 = $combo;
|
|
$997 = ((($996)) + 60|0);
|
|
$998 = $1;
|
|
$999 = ((($998)) + 12|0);
|
|
;HEAP8[$997>>0]=HEAP8[$999>>0]|0;HEAP8[$997+1>>0]=HEAP8[$999+1>>0]|0;HEAP8[$997+2>>0]=HEAP8[$999+2>>0]|0;HEAP8[$997+3>>0]=HEAP8[$999+3>>0]|0;
|
|
$1000 = $combo;
|
|
$1001 = ((($1000)) + 64|0);
|
|
$1002 = $1;
|
|
;HEAP8[$1001>>0]=HEAP8[$1002>>0]|0;HEAP8[$1001+1>>0]=HEAP8[$1002+1>>0]|0;HEAP8[$1001+2>>0]=HEAP8[$1002+2>>0]|0;HEAP8[$1001+3>>0]=HEAP8[$1002+3>>0]|0;
|
|
$1003 = $combo;
|
|
$1004 = ((($1003)) + 68|0);
|
|
$1005 = $1;
|
|
;HEAP8[$1004>>0]=HEAP8[$1005>>0]|0;HEAP8[$1004+1>>0]=HEAP8[$1005+1>>0]|0;HEAP8[$1004+2>>0]=HEAP8[$1005+2>>0]|0;HEAP8[$1004+3>>0]=HEAP8[$1005+3>>0]|0;
|
|
$1006 = $combo;
|
|
$1007 = ((($1006)) + 72|0);
|
|
$1008 = $1;
|
|
;HEAP8[$1007>>0]=HEAP8[$1008>>0]|0;HEAP8[$1007+1>>0]=HEAP8[$1008+1>>0]|0;HEAP8[$1007+2>>0]=HEAP8[$1008+2>>0]|0;HEAP8[$1007+3>>0]=HEAP8[$1008+3>>0]|0;
|
|
$1009 = $combo;
|
|
$1010 = ((($1009)) + 216|0);
|
|
HEAP32[$1010>>2] = 8;
|
|
$1011 = $combo;
|
|
$1012 = ((($1011)) + 220|0);
|
|
HEAP32[$1012>>2] = 8;
|
|
$1013 = $combo;
|
|
$1014 = ((($1013)) + 224|0);
|
|
HEAP32[$1014>>2] = 8;
|
|
$1015 = $combo;
|
|
$1016 = ((($1015)) + 236|0);
|
|
_nk_vec2($129,4.0,4.0);
|
|
;HEAP32[$1016>>2]=HEAP32[$129>>2]|0;HEAP32[$1016+4>>2]=HEAP32[$129+4>>2]|0;
|
|
$1017 = $combo;
|
|
$1018 = ((($1017)) + 244|0);
|
|
_nk_vec2($130,0.0,4.0);
|
|
;HEAP32[$1018>>2]=HEAP32[$130>>2]|0;HEAP32[$1018+4>>2]=HEAP32[$130+4>>2]|0;
|
|
$1019 = $combo;
|
|
$1020 = ((($1019)) + 252|0);
|
|
_nk_vec2($131,4.0,0.0);
|
|
;HEAP32[$1020>>2]=HEAP32[$131>>2]|0;HEAP32[$1020+4>>2]=HEAP32[$131+4>>2]|0;
|
|
$1021 = $combo;
|
|
$1022 = ((($1021)) + 228|0);
|
|
HEAPF32[$1022>>2] = 1.0;
|
|
$1023 = $combo;
|
|
$1024 = ((($1023)) + 232|0);
|
|
HEAPF32[$1024>>2] = 0.0;
|
|
$1025 = $style;
|
|
$1026 = ((($1025)) + 4524|0);
|
|
$1027 = ((($1026)) + 88|0);
|
|
$button = $1027;
|
|
$1028 = $button;
|
|
_nk_zero($1028,128);
|
|
$1029 = $button;
|
|
$1030 = $1;
|
|
$1031 = ((($1030)) + 76|0);
|
|
;HEAP8[$$byval_copy62>>0]=HEAP8[$1031>>0]|0;HEAP8[$$byval_copy62+1>>0]=HEAP8[$1031+1>>0]|0;HEAP8[$$byval_copy62+2>>0]=HEAP8[$1031+2>>0]|0;HEAP8[$$byval_copy62+3>>0]=HEAP8[$1031+3>>0]|0;
|
|
_nk_style_item_color($132,$$byval_copy62);
|
|
;HEAP32[$1029>>2]=HEAP32[$132>>2]|0;HEAP32[$1029+4>>2]=HEAP32[$132+4>>2]|0;HEAP32[$1029+8>>2]=HEAP32[$132+8>>2]|0;HEAP32[$1029+12>>2]=HEAP32[$132+12>>2]|0;HEAP32[$1029+16>>2]=HEAP32[$132+16>>2]|0;
|
|
$1032 = $button;
|
|
$1033 = ((($1032)) + 20|0);
|
|
$1034 = $1;
|
|
$1035 = ((($1034)) + 76|0);
|
|
;HEAP8[$$byval_copy63>>0]=HEAP8[$1035>>0]|0;HEAP8[$$byval_copy63+1>>0]=HEAP8[$1035+1>>0]|0;HEAP8[$$byval_copy63+2>>0]=HEAP8[$1035+2>>0]|0;HEAP8[$$byval_copy63+3>>0]=HEAP8[$1035+3>>0]|0;
|
|
_nk_style_item_color($133,$$byval_copy63);
|
|
;HEAP32[$1033>>2]=HEAP32[$133>>2]|0;HEAP32[$1033+4>>2]=HEAP32[$133+4>>2]|0;HEAP32[$1033+8>>2]=HEAP32[$133+8>>2]|0;HEAP32[$1033+12>>2]=HEAP32[$133+12>>2]|0;HEAP32[$1033+16>>2]=HEAP32[$133+16>>2]|0;
|
|
$1036 = $button;
|
|
$1037 = ((($1036)) + 40|0);
|
|
$1038 = $1;
|
|
$1039 = ((($1038)) + 76|0);
|
|
;HEAP8[$$byval_copy64>>0]=HEAP8[$1039>>0]|0;HEAP8[$$byval_copy64+1>>0]=HEAP8[$1039+1>>0]|0;HEAP8[$$byval_copy64+2>>0]=HEAP8[$1039+2>>0]|0;HEAP8[$$byval_copy64+3>>0]=HEAP8[$1039+3>>0]|0;
|
|
_nk_style_item_color($134,$$byval_copy64);
|
|
;HEAP32[$1037>>2]=HEAP32[$134>>2]|0;HEAP32[$1037+4>>2]=HEAP32[$134+4>>2]|0;HEAP32[$1037+8>>2]=HEAP32[$134+8>>2]|0;HEAP32[$1037+12>>2]=HEAP32[$134+12>>2]|0;HEAP32[$1037+16>>2]=HEAP32[$134+16>>2]|0;
|
|
$1040 = $button;
|
|
$1041 = ((($1040)) + 60|0);
|
|
_nk_rgba($135,0,0,0,0);
|
|
;HEAP8[$1041>>0]=HEAP8[$135>>0]|0;HEAP8[$1041+1>>0]=HEAP8[$135+1>>0]|0;HEAP8[$1041+2>>0]=HEAP8[$135+2>>0]|0;HEAP8[$1041+3>>0]=HEAP8[$135+3>>0]|0;
|
|
$1042 = $button;
|
|
$1043 = ((($1042)) + 64|0);
|
|
$1044 = $1;
|
|
$1045 = ((($1044)) + 76|0);
|
|
;HEAP8[$1043>>0]=HEAP8[$1045>>0]|0;HEAP8[$1043+1>>0]=HEAP8[$1045+1>>0]|0;HEAP8[$1043+2>>0]=HEAP8[$1045+2>>0]|0;HEAP8[$1043+3>>0]=HEAP8[$1045+3>>0]|0;
|
|
$1046 = $button;
|
|
$1047 = ((($1046)) + 68|0);
|
|
$1048 = $1;
|
|
;HEAP8[$1047>>0]=HEAP8[$1048>>0]|0;HEAP8[$1047+1>>0]=HEAP8[$1048+1>>0]|0;HEAP8[$1047+2>>0]=HEAP8[$1048+2>>0]|0;HEAP8[$1047+3>>0]=HEAP8[$1048+3>>0]|0;
|
|
$1049 = $button;
|
|
$1050 = ((($1049)) + 72|0);
|
|
$1051 = $1;
|
|
;HEAP8[$1050>>0]=HEAP8[$1051>>0]|0;HEAP8[$1050+1>>0]=HEAP8[$1051+1>>0]|0;HEAP8[$1050+2>>0]=HEAP8[$1051+2>>0]|0;HEAP8[$1050+3>>0]=HEAP8[$1051+3>>0]|0;
|
|
$1052 = $button;
|
|
$1053 = ((($1052)) + 76|0);
|
|
$1054 = $1;
|
|
;HEAP8[$1053>>0]=HEAP8[$1054>>0]|0;HEAP8[$1053+1>>0]=HEAP8[$1054+1>>0]|0;HEAP8[$1053+2>>0]=HEAP8[$1054+2>>0]|0;HEAP8[$1053+3>>0]=HEAP8[$1054+3>>0]|0;
|
|
$1055 = $button;
|
|
$1056 = ((($1055)) + 92|0);
|
|
_nk_vec2($136,2.0,2.0);
|
|
;HEAP32[$1056>>2]=HEAP32[$136>>2]|0;HEAP32[$1056+4>>2]=HEAP32[$136+4>>2]|0;
|
|
$1057 = $button;
|
|
$1058 = ((($1057)) + 108|0);
|
|
_nk_vec2($137,0.0,0.0);
|
|
;HEAP32[$1058>>2]=HEAP32[$137>>2]|0;HEAP32[$1058+4>>2]=HEAP32[$137+4>>2]|0;
|
|
$1059 = $button;
|
|
$1060 = ((($1059)) + 116|0);
|
|
_nk_handle_ptr($138,0);
|
|
;HEAP32[$1060>>2]=HEAP32[$138>>2]|0;
|
|
$1061 = $button;
|
|
$1062 = ((($1061)) + 80|0);
|
|
HEAP32[$1062>>2] = 18;
|
|
$1063 = $button;
|
|
$1064 = ((($1063)) + 84|0);
|
|
HEAPF32[$1064>>2] = 0.0;
|
|
$1065 = $button;
|
|
$1066 = ((($1065)) + 88|0);
|
|
HEAPF32[$1066>>2] = 0.0;
|
|
$1067 = $button;
|
|
$1068 = ((($1067)) + 120|0);
|
|
HEAP32[$1068>>2] = 0;
|
|
$1069 = $button;
|
|
$1070 = ((($1069)) + 124|0);
|
|
HEAP32[$1070>>2] = 0;
|
|
$1071 = $style;
|
|
$1072 = ((($1071)) + 3948|0);
|
|
$tab = $1072;
|
|
$1073 = $tab;
|
|
$1074 = $1;
|
|
$1075 = ((($1074)) + 108|0);
|
|
;HEAP8[$$byval_copy65>>0]=HEAP8[$1075>>0]|0;HEAP8[$$byval_copy65+1>>0]=HEAP8[$1075+1>>0]|0;HEAP8[$$byval_copy65+2>>0]=HEAP8[$1075+2>>0]|0;HEAP8[$$byval_copy65+3>>0]=HEAP8[$1075+3>>0]|0;
|
|
_nk_style_item_color($139,$$byval_copy65);
|
|
;HEAP32[$1073>>2]=HEAP32[$139>>2]|0;HEAP32[$1073+4>>2]=HEAP32[$139+4>>2]|0;HEAP32[$1073+8>>2]=HEAP32[$139+8>>2]|0;HEAP32[$1073+12>>2]=HEAP32[$139+12>>2]|0;HEAP32[$1073+16>>2]=HEAP32[$139+16>>2]|0;
|
|
$1076 = $tab;
|
|
$1077 = ((($1076)) + 20|0);
|
|
$1078 = $1;
|
|
$1079 = ((($1078)) + 12|0);
|
|
;HEAP8[$1077>>0]=HEAP8[$1079>>0]|0;HEAP8[$1077+1>>0]=HEAP8[$1079+1>>0]|0;HEAP8[$1077+2>>0]=HEAP8[$1079+2>>0]|0;HEAP8[$1077+3>>0]=HEAP8[$1079+3>>0]|0;
|
|
$1080 = $tab;
|
|
$1081 = ((($1080)) + 24|0);
|
|
$1082 = $1;
|
|
;HEAP8[$1081>>0]=HEAP8[$1082>>0]|0;HEAP8[$1081+1>>0]=HEAP8[$1082+1>>0]|0;HEAP8[$1081+2>>0]=HEAP8[$1082+2>>0]|0;HEAP8[$1081+3>>0]=HEAP8[$1082+3>>0]|0;
|
|
$1083 = $tab;
|
|
$1084 = ((($1083)) + 540|0);
|
|
HEAP32[$1084>>2] = 10;
|
|
$1085 = $tab;
|
|
$1086 = ((($1085)) + 544|0);
|
|
HEAP32[$1086>>2] = 8;
|
|
$1087 = $tab;
|
|
$1088 = ((($1087)) + 560|0);
|
|
_nk_vec2($140,4.0,4.0);
|
|
;HEAP32[$1088>>2]=HEAP32[$140>>2]|0;HEAP32[$1088+4>>2]=HEAP32[$140+4>>2]|0;
|
|
$1089 = $tab;
|
|
$1090 = ((($1089)) + 568|0);
|
|
_nk_vec2($141,4.0,4.0);
|
|
;HEAP32[$1090>>2]=HEAP32[$141>>2]|0;HEAP32[$1090+4>>2]=HEAP32[$141+4>>2]|0;
|
|
$1091 = $tab;
|
|
$1092 = ((($1091)) + 556|0);
|
|
HEAPF32[$1092>>2] = 10.0;
|
|
$1093 = $tab;
|
|
$1094 = ((($1093)) + 548|0);
|
|
HEAPF32[$1094>>2] = 1.0;
|
|
$1095 = $tab;
|
|
$1096 = ((($1095)) + 552|0);
|
|
HEAPF32[$1096>>2] = 0.0;
|
|
$1097 = $style;
|
|
$1098 = ((($1097)) + 3948|0);
|
|
$1099 = ((($1098)) + 156|0);
|
|
$button = $1099;
|
|
$1100 = $button;
|
|
_nk_zero($1100,128);
|
|
$1101 = $button;
|
|
$1102 = $1;
|
|
$1103 = ((($1102)) + 108|0);
|
|
;HEAP8[$$byval_copy66>>0]=HEAP8[$1103>>0]|0;HEAP8[$$byval_copy66+1>>0]=HEAP8[$1103+1>>0]|0;HEAP8[$$byval_copy66+2>>0]=HEAP8[$1103+2>>0]|0;HEAP8[$$byval_copy66+3>>0]=HEAP8[$1103+3>>0]|0;
|
|
_nk_style_item_color($142,$$byval_copy66);
|
|
;HEAP32[$1101>>2]=HEAP32[$142>>2]|0;HEAP32[$1101+4>>2]=HEAP32[$142+4>>2]|0;HEAP32[$1101+8>>2]=HEAP32[$142+8>>2]|0;HEAP32[$1101+12>>2]=HEAP32[$142+12>>2]|0;HEAP32[$1101+16>>2]=HEAP32[$142+16>>2]|0;
|
|
$1104 = $button;
|
|
$1105 = ((($1104)) + 20|0);
|
|
$1106 = $1;
|
|
$1107 = ((($1106)) + 108|0);
|
|
;HEAP8[$$byval_copy67>>0]=HEAP8[$1107>>0]|0;HEAP8[$$byval_copy67+1>>0]=HEAP8[$1107+1>>0]|0;HEAP8[$$byval_copy67+2>>0]=HEAP8[$1107+2>>0]|0;HEAP8[$$byval_copy67+3>>0]=HEAP8[$1107+3>>0]|0;
|
|
_nk_style_item_color($143,$$byval_copy67);
|
|
;HEAP32[$1105>>2]=HEAP32[$143>>2]|0;HEAP32[$1105+4>>2]=HEAP32[$143+4>>2]|0;HEAP32[$1105+8>>2]=HEAP32[$143+8>>2]|0;HEAP32[$1105+12>>2]=HEAP32[$143+12>>2]|0;HEAP32[$1105+16>>2]=HEAP32[$143+16>>2]|0;
|
|
$1108 = $button;
|
|
$1109 = ((($1108)) + 40|0);
|
|
$1110 = $1;
|
|
$1111 = ((($1110)) + 108|0);
|
|
;HEAP8[$$byval_copy68>>0]=HEAP8[$1111>>0]|0;HEAP8[$$byval_copy68+1>>0]=HEAP8[$1111+1>>0]|0;HEAP8[$$byval_copy68+2>>0]=HEAP8[$1111+2>>0]|0;HEAP8[$$byval_copy68+3>>0]=HEAP8[$1111+3>>0]|0;
|
|
_nk_style_item_color($144,$$byval_copy68);
|
|
;HEAP32[$1109>>2]=HEAP32[$144>>2]|0;HEAP32[$1109+4>>2]=HEAP32[$144+4>>2]|0;HEAP32[$1109+8>>2]=HEAP32[$144+8>>2]|0;HEAP32[$1109+12>>2]=HEAP32[$144+12>>2]|0;HEAP32[$1109+16>>2]=HEAP32[$144+16>>2]|0;
|
|
$1112 = $button;
|
|
$1113 = ((($1112)) + 60|0);
|
|
_nk_rgba($145,0,0,0,0);
|
|
;HEAP8[$1113>>0]=HEAP8[$145>>0]|0;HEAP8[$1113+1>>0]=HEAP8[$145+1>>0]|0;HEAP8[$1113+2>>0]=HEAP8[$145+2>>0]|0;HEAP8[$1113+3>>0]=HEAP8[$145+3>>0]|0;
|
|
$1114 = $button;
|
|
$1115 = ((($1114)) + 64|0);
|
|
$1116 = $1;
|
|
$1117 = ((($1116)) + 108|0);
|
|
;HEAP8[$1115>>0]=HEAP8[$1117>>0]|0;HEAP8[$1115+1>>0]=HEAP8[$1117+1>>0]|0;HEAP8[$1115+2>>0]=HEAP8[$1117+2>>0]|0;HEAP8[$1115+3>>0]=HEAP8[$1117+3>>0]|0;
|
|
$1118 = $button;
|
|
$1119 = ((($1118)) + 68|0);
|
|
$1120 = $1;
|
|
;HEAP8[$1119>>0]=HEAP8[$1120>>0]|0;HEAP8[$1119+1>>0]=HEAP8[$1120+1>>0]|0;HEAP8[$1119+2>>0]=HEAP8[$1120+2>>0]|0;HEAP8[$1119+3>>0]=HEAP8[$1120+3>>0]|0;
|
|
$1121 = $button;
|
|
$1122 = ((($1121)) + 72|0);
|
|
$1123 = $1;
|
|
;HEAP8[$1122>>0]=HEAP8[$1123>>0]|0;HEAP8[$1122+1>>0]=HEAP8[$1123+1>>0]|0;HEAP8[$1122+2>>0]=HEAP8[$1123+2>>0]|0;HEAP8[$1122+3>>0]=HEAP8[$1123+3>>0]|0;
|
|
$1124 = $button;
|
|
$1125 = ((($1124)) + 76|0);
|
|
$1126 = $1;
|
|
;HEAP8[$1125>>0]=HEAP8[$1126>>0]|0;HEAP8[$1125+1>>0]=HEAP8[$1126+1>>0]|0;HEAP8[$1125+2>>0]=HEAP8[$1126+2>>0]|0;HEAP8[$1125+3>>0]=HEAP8[$1126+3>>0]|0;
|
|
$1127 = $button;
|
|
$1128 = ((($1127)) + 92|0);
|
|
_nk_vec2($146,2.0,2.0);
|
|
;HEAP32[$1128>>2]=HEAP32[$146>>2]|0;HEAP32[$1128+4>>2]=HEAP32[$146+4>>2]|0;
|
|
$1129 = $button;
|
|
$1130 = ((($1129)) + 108|0);
|
|
_nk_vec2($147,0.0,0.0);
|
|
;HEAP32[$1130>>2]=HEAP32[$147>>2]|0;HEAP32[$1130+4>>2]=HEAP32[$147+4>>2]|0;
|
|
$1131 = $button;
|
|
$1132 = ((($1131)) + 116|0);
|
|
_nk_handle_ptr($148,0);
|
|
;HEAP32[$1132>>2]=HEAP32[$148>>2]|0;
|
|
$1133 = $button;
|
|
$1134 = ((($1133)) + 80|0);
|
|
HEAP32[$1134>>2] = 18;
|
|
$1135 = $button;
|
|
$1136 = ((($1135)) + 84|0);
|
|
HEAPF32[$1136>>2] = 0.0;
|
|
$1137 = $button;
|
|
$1138 = ((($1137)) + 88|0);
|
|
HEAPF32[$1138>>2] = 0.0;
|
|
$1139 = $button;
|
|
$1140 = ((($1139)) + 120|0);
|
|
HEAP32[$1140>>2] = 0;
|
|
$1141 = $button;
|
|
$1142 = ((($1141)) + 124|0);
|
|
HEAP32[$1142>>2] = 0;
|
|
$1143 = $style;
|
|
$1144 = ((($1143)) + 3948|0);
|
|
$1145 = ((($1144)) + 28|0);
|
|
$1146 = $button;
|
|
dest=$1145; src=$1146; stop=dest+128|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
|
|
$1147 = $style;
|
|
$1148 = ((($1147)) + 3948|0);
|
|
$1149 = ((($1148)) + 412|0);
|
|
$button = $1149;
|
|
$1150 = $button;
|
|
_nk_zero($1150,128);
|
|
$1151 = $button;
|
|
$1152 = $1;
|
|
$1153 = ((($1152)) + 4|0);
|
|
;HEAP8[$$byval_copy69>>0]=HEAP8[$1153>>0]|0;HEAP8[$$byval_copy69+1>>0]=HEAP8[$1153+1>>0]|0;HEAP8[$$byval_copy69+2>>0]=HEAP8[$1153+2>>0]|0;HEAP8[$$byval_copy69+3>>0]=HEAP8[$1153+3>>0]|0;
|
|
_nk_style_item_color($149,$$byval_copy69);
|
|
;HEAP32[$1151>>2]=HEAP32[$149>>2]|0;HEAP32[$1151+4>>2]=HEAP32[$149+4>>2]|0;HEAP32[$1151+8>>2]=HEAP32[$149+8>>2]|0;HEAP32[$1151+12>>2]=HEAP32[$149+12>>2]|0;HEAP32[$1151+16>>2]=HEAP32[$149+16>>2]|0;
|
|
$1154 = $button;
|
|
$1155 = ((($1154)) + 20|0);
|
|
$1156 = $1;
|
|
$1157 = ((($1156)) + 4|0);
|
|
;HEAP8[$$byval_copy70>>0]=HEAP8[$1157>>0]|0;HEAP8[$$byval_copy70+1>>0]=HEAP8[$1157+1>>0]|0;HEAP8[$$byval_copy70+2>>0]=HEAP8[$1157+2>>0]|0;HEAP8[$$byval_copy70+3>>0]=HEAP8[$1157+3>>0]|0;
|
|
_nk_style_item_color($150,$$byval_copy70);
|
|
;HEAP32[$1155>>2]=HEAP32[$150>>2]|0;HEAP32[$1155+4>>2]=HEAP32[$150+4>>2]|0;HEAP32[$1155+8>>2]=HEAP32[$150+8>>2]|0;HEAP32[$1155+12>>2]=HEAP32[$150+12>>2]|0;HEAP32[$1155+16>>2]=HEAP32[$150+16>>2]|0;
|
|
$1158 = $button;
|
|
$1159 = ((($1158)) + 40|0);
|
|
$1160 = $1;
|
|
$1161 = ((($1160)) + 4|0);
|
|
;HEAP8[$$byval_copy71>>0]=HEAP8[$1161>>0]|0;HEAP8[$$byval_copy71+1>>0]=HEAP8[$1161+1>>0]|0;HEAP8[$$byval_copy71+2>>0]=HEAP8[$1161+2>>0]|0;HEAP8[$$byval_copy71+3>>0]=HEAP8[$1161+3>>0]|0;
|
|
_nk_style_item_color($151,$$byval_copy71);
|
|
;HEAP32[$1159>>2]=HEAP32[$151>>2]|0;HEAP32[$1159+4>>2]=HEAP32[$151+4>>2]|0;HEAP32[$1159+8>>2]=HEAP32[$151+8>>2]|0;HEAP32[$1159+12>>2]=HEAP32[$151+12>>2]|0;HEAP32[$1159+16>>2]=HEAP32[$151+16>>2]|0;
|
|
$1162 = $button;
|
|
$1163 = ((($1162)) + 60|0);
|
|
_nk_rgba($152,0,0,0,0);
|
|
;HEAP8[$1163>>0]=HEAP8[$152>>0]|0;HEAP8[$1163+1>>0]=HEAP8[$152+1>>0]|0;HEAP8[$1163+2>>0]=HEAP8[$152+2>>0]|0;HEAP8[$1163+3>>0]=HEAP8[$152+3>>0]|0;
|
|
$1164 = $button;
|
|
$1165 = ((($1164)) + 64|0);
|
|
$1166 = $1;
|
|
$1167 = ((($1166)) + 108|0);
|
|
;HEAP8[$1165>>0]=HEAP8[$1167>>0]|0;HEAP8[$1165+1>>0]=HEAP8[$1167+1>>0]|0;HEAP8[$1165+2>>0]=HEAP8[$1167+2>>0]|0;HEAP8[$1165+3>>0]=HEAP8[$1167+3>>0]|0;
|
|
$1168 = $button;
|
|
$1169 = ((($1168)) + 68|0);
|
|
$1170 = $1;
|
|
;HEAP8[$1169>>0]=HEAP8[$1170>>0]|0;HEAP8[$1169+1>>0]=HEAP8[$1170+1>>0]|0;HEAP8[$1169+2>>0]=HEAP8[$1170+2>>0]|0;HEAP8[$1169+3>>0]=HEAP8[$1170+3>>0]|0;
|
|
$1171 = $button;
|
|
$1172 = ((($1171)) + 72|0);
|
|
$1173 = $1;
|
|
;HEAP8[$1172>>0]=HEAP8[$1173>>0]|0;HEAP8[$1172+1>>0]=HEAP8[$1173+1>>0]|0;HEAP8[$1172+2>>0]=HEAP8[$1173+2>>0]|0;HEAP8[$1172+3>>0]=HEAP8[$1173+3>>0]|0;
|
|
$1174 = $button;
|
|
$1175 = ((($1174)) + 76|0);
|
|
$1176 = $1;
|
|
;HEAP8[$1175>>0]=HEAP8[$1176>>0]|0;HEAP8[$1175+1>>0]=HEAP8[$1176+1>>0]|0;HEAP8[$1175+2>>0]=HEAP8[$1176+2>>0]|0;HEAP8[$1175+3>>0]=HEAP8[$1176+3>>0]|0;
|
|
$1177 = $button;
|
|
$1178 = ((($1177)) + 92|0);
|
|
_nk_vec2($153,2.0,2.0);
|
|
;HEAP32[$1178>>2]=HEAP32[$153>>2]|0;HEAP32[$1178+4>>2]=HEAP32[$153+4>>2]|0;
|
|
$1179 = $button;
|
|
$1180 = ((($1179)) + 108|0);
|
|
_nk_vec2($154,0.0,0.0);
|
|
;HEAP32[$1180>>2]=HEAP32[$154>>2]|0;HEAP32[$1180+4>>2]=HEAP32[$154+4>>2]|0;
|
|
$1181 = $button;
|
|
$1182 = ((($1181)) + 116|0);
|
|
_nk_handle_ptr($155,0);
|
|
;HEAP32[$1182>>2]=HEAP32[$155>>2]|0;
|
|
$1183 = $button;
|
|
$1184 = ((($1183)) + 80|0);
|
|
HEAP32[$1184>>2] = 18;
|
|
$1185 = $button;
|
|
$1186 = ((($1185)) + 84|0);
|
|
HEAPF32[$1186>>2] = 0.0;
|
|
$1187 = $button;
|
|
$1188 = ((($1187)) + 88|0);
|
|
HEAPF32[$1188>>2] = 0.0;
|
|
$1189 = $button;
|
|
$1190 = ((($1189)) + 120|0);
|
|
HEAP32[$1190>>2] = 0;
|
|
$1191 = $button;
|
|
$1192 = ((($1191)) + 124|0);
|
|
HEAP32[$1192>>2] = 0;
|
|
$1193 = $style;
|
|
$1194 = ((($1193)) + 3948|0);
|
|
$1195 = ((($1194)) + 284|0);
|
|
$1196 = $button;
|
|
dest=$1195; src=$1196; stop=dest+128|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
|
|
$1197 = $style;
|
|
$1198 = ((($1197)) + 4784|0);
|
|
$win = $1198;
|
|
$1199 = $win;
|
|
$1200 = ((($1199)) + 340|0);
|
|
HEAP32[$1200>>2] = 1;
|
|
$1201 = $win;
|
|
$1202 = ((($1201)) + 316|0);
|
|
HEAP32[$1202>>2] = 1;
|
|
$1203 = $win;
|
|
$1204 = ((($1203)) + 320|0);
|
|
HEAP32[$1204>>2] = 12;
|
|
$1205 = $win;
|
|
$1206 = ((($1205)) + 324|0);
|
|
HEAP32[$1206>>2] = 11;
|
|
$1207 = $win;
|
|
$1208 = $1;
|
|
$1209 = ((($1208)) + 8|0);
|
|
;HEAP8[$$byval_copy72>>0]=HEAP8[$1209>>0]|0;HEAP8[$$byval_copy72+1>>0]=HEAP8[$1209+1>>0]|0;HEAP8[$$byval_copy72+2>>0]=HEAP8[$1209+2>>0]|0;HEAP8[$$byval_copy72+3>>0]=HEAP8[$1209+3>>0]|0;
|
|
_nk_style_item_color($156,$$byval_copy72);
|
|
;HEAP32[$1207>>2]=HEAP32[$156>>2]|0;HEAP32[$1207+4>>2]=HEAP32[$156+4>>2]|0;HEAP32[$1207+8>>2]=HEAP32[$156+8>>2]|0;HEAP32[$1207+12>>2]=HEAP32[$156+12>>2]|0;HEAP32[$1207+16>>2]=HEAP32[$156+16>>2]|0;
|
|
$1210 = $win;
|
|
$1211 = ((($1210)) + 20|0);
|
|
$1212 = $1;
|
|
$1213 = ((($1212)) + 8|0);
|
|
;HEAP8[$$byval_copy73>>0]=HEAP8[$1213>>0]|0;HEAP8[$$byval_copy73+1>>0]=HEAP8[$1213+1>>0]|0;HEAP8[$$byval_copy73+2>>0]=HEAP8[$1213+2>>0]|0;HEAP8[$$byval_copy73+3>>0]=HEAP8[$1213+3>>0]|0;
|
|
_nk_style_item_color($157,$$byval_copy73);
|
|
;HEAP32[$1211>>2]=HEAP32[$157>>2]|0;HEAP32[$1211+4>>2]=HEAP32[$157+4>>2]|0;HEAP32[$1211+8>>2]=HEAP32[$157+8>>2]|0;HEAP32[$1211+12>>2]=HEAP32[$157+12>>2]|0;HEAP32[$1211+16>>2]=HEAP32[$157+16>>2]|0;
|
|
$1214 = $win;
|
|
$1215 = ((($1214)) + 40|0);
|
|
$1216 = $1;
|
|
$1217 = ((($1216)) + 8|0);
|
|
;HEAP8[$$byval_copy74>>0]=HEAP8[$1217>>0]|0;HEAP8[$$byval_copy74+1>>0]=HEAP8[$1217+1>>0]|0;HEAP8[$$byval_copy74+2>>0]=HEAP8[$1217+2>>0]|0;HEAP8[$$byval_copy74+3>>0]=HEAP8[$1217+3>>0]|0;
|
|
_nk_style_item_color($158,$$byval_copy74);
|
|
;HEAP32[$1215>>2]=HEAP32[$158>>2]|0;HEAP32[$1215+4>>2]=HEAP32[$158+4>>2]|0;HEAP32[$1215+8>>2]=HEAP32[$158+8>>2]|0;HEAP32[$1215+12>>2]=HEAP32[$158+12>>2]|0;HEAP32[$1215+16>>2]=HEAP32[$158+16>>2]|0;
|
|
$1218 = $win;
|
|
$1219 = ((($1218)) + 328|0);
|
|
$1220 = $1;
|
|
;HEAP8[$1219>>0]=HEAP8[$1220>>0]|0;HEAP8[$1219+1>>0]=HEAP8[$1220+1>>0]|0;HEAP8[$1219+2>>0]=HEAP8[$1220+2>>0]|0;HEAP8[$1219+3>>0]=HEAP8[$1220+3>>0]|0;
|
|
$1221 = $win;
|
|
$1222 = ((($1221)) + 332|0);
|
|
$1223 = $1;
|
|
;HEAP8[$1222>>0]=HEAP8[$1223>>0]|0;HEAP8[$1222+1>>0]=HEAP8[$1223+1>>0]|0;HEAP8[$1222+2>>0]=HEAP8[$1223+2>>0]|0;HEAP8[$1222+3>>0]=HEAP8[$1223+3>>0]|0;
|
|
$1224 = $win;
|
|
$1225 = ((($1224)) + 336|0);
|
|
$1226 = $1;
|
|
;HEAP8[$1225>>0]=HEAP8[$1226>>0]|0;HEAP8[$1225+1>>0]=HEAP8[$1226+1>>0]|0;HEAP8[$1225+2>>0]=HEAP8[$1226+2>>0]|0;HEAP8[$1225+3>>0]=HEAP8[$1226+3>>0]|0;
|
|
$1227 = $win;
|
|
$1228 = ((($1227)) + 352|0);
|
|
_nk_vec2($159,4.0,4.0);
|
|
;HEAP32[$1228>>2]=HEAP32[$159>>2]|0;HEAP32[$1228+4>>2]=HEAP32[$159+4>>2]|0;
|
|
$1229 = $win;
|
|
$1230 = ((($1229)) + 344|0);
|
|
_nk_vec2($160,4.0,4.0);
|
|
;HEAP32[$1230>>2]=HEAP32[$160>>2]|0;HEAP32[$1230+4>>2]=HEAP32[$160+4>>2]|0;
|
|
$1231 = $win;
|
|
$1232 = ((($1231)) + 360|0);
|
|
_nk_vec2($161,0.0,0.0);
|
|
;HEAP32[$1232>>2]=HEAP32[$161>>2]|0;HEAP32[$1232+4>>2]=HEAP32[$161+4>>2]|0;
|
|
$1233 = $style;
|
|
$1234 = ((($1233)) + 4784|0);
|
|
$1235 = ((($1234)) + 60|0);
|
|
$button = $1235;
|
|
$1236 = $button;
|
|
_nk_zero($1236,128);
|
|
$1237 = $button;
|
|
$1238 = $1;
|
|
$1239 = ((($1238)) + 8|0);
|
|
;HEAP8[$$byval_copy75>>0]=HEAP8[$1239>>0]|0;HEAP8[$$byval_copy75+1>>0]=HEAP8[$1239+1>>0]|0;HEAP8[$$byval_copy75+2>>0]=HEAP8[$1239+2>>0]|0;HEAP8[$$byval_copy75+3>>0]=HEAP8[$1239+3>>0]|0;
|
|
_nk_style_item_color($162,$$byval_copy75);
|
|
;HEAP32[$1237>>2]=HEAP32[$162>>2]|0;HEAP32[$1237+4>>2]=HEAP32[$162+4>>2]|0;HEAP32[$1237+8>>2]=HEAP32[$162+8>>2]|0;HEAP32[$1237+12>>2]=HEAP32[$162+12>>2]|0;HEAP32[$1237+16>>2]=HEAP32[$162+16>>2]|0;
|
|
$1240 = $button;
|
|
$1241 = ((($1240)) + 20|0);
|
|
$1242 = $1;
|
|
$1243 = ((($1242)) + 8|0);
|
|
;HEAP8[$$byval_copy76>>0]=HEAP8[$1243>>0]|0;HEAP8[$$byval_copy76+1>>0]=HEAP8[$1243+1>>0]|0;HEAP8[$$byval_copy76+2>>0]=HEAP8[$1243+2>>0]|0;HEAP8[$$byval_copy76+3>>0]=HEAP8[$1243+3>>0]|0;
|
|
_nk_style_item_color($163,$$byval_copy76);
|
|
;HEAP32[$1241>>2]=HEAP32[$163>>2]|0;HEAP32[$1241+4>>2]=HEAP32[$163+4>>2]|0;HEAP32[$1241+8>>2]=HEAP32[$163+8>>2]|0;HEAP32[$1241+12>>2]=HEAP32[$163+12>>2]|0;HEAP32[$1241+16>>2]=HEAP32[$163+16>>2]|0;
|
|
$1244 = $button;
|
|
$1245 = ((($1244)) + 40|0);
|
|
$1246 = $1;
|
|
$1247 = ((($1246)) + 8|0);
|
|
;HEAP8[$$byval_copy77>>0]=HEAP8[$1247>>0]|0;HEAP8[$$byval_copy77+1>>0]=HEAP8[$1247+1>>0]|0;HEAP8[$$byval_copy77+2>>0]=HEAP8[$1247+2>>0]|0;HEAP8[$$byval_copy77+3>>0]=HEAP8[$1247+3>>0]|0;
|
|
_nk_style_item_color($164,$$byval_copy77);
|
|
;HEAP32[$1245>>2]=HEAP32[$164>>2]|0;HEAP32[$1245+4>>2]=HEAP32[$164+4>>2]|0;HEAP32[$1245+8>>2]=HEAP32[$164+8>>2]|0;HEAP32[$1245+12>>2]=HEAP32[$164+12>>2]|0;HEAP32[$1245+16>>2]=HEAP32[$164+16>>2]|0;
|
|
$1248 = $button;
|
|
$1249 = ((($1248)) + 60|0);
|
|
_nk_rgba($165,0,0,0,0);
|
|
;HEAP8[$1249>>0]=HEAP8[$165>>0]|0;HEAP8[$1249+1>>0]=HEAP8[$165+1>>0]|0;HEAP8[$1249+2>>0]=HEAP8[$165+2>>0]|0;HEAP8[$1249+3>>0]=HEAP8[$165+3>>0]|0;
|
|
$1250 = $button;
|
|
$1251 = ((($1250)) + 64|0);
|
|
$1252 = $1;
|
|
$1253 = ((($1252)) + 8|0);
|
|
;HEAP8[$1251>>0]=HEAP8[$1253>>0]|0;HEAP8[$1251+1>>0]=HEAP8[$1253+1>>0]|0;HEAP8[$1251+2>>0]=HEAP8[$1253+2>>0]|0;HEAP8[$1251+3>>0]=HEAP8[$1253+3>>0]|0;
|
|
$1254 = $button;
|
|
$1255 = ((($1254)) + 68|0);
|
|
$1256 = $1;
|
|
;HEAP8[$1255>>0]=HEAP8[$1256>>0]|0;HEAP8[$1255+1>>0]=HEAP8[$1256+1>>0]|0;HEAP8[$1255+2>>0]=HEAP8[$1256+2>>0]|0;HEAP8[$1255+3>>0]=HEAP8[$1256+3>>0]|0;
|
|
$1257 = $button;
|
|
$1258 = ((($1257)) + 72|0);
|
|
$1259 = $1;
|
|
;HEAP8[$1258>>0]=HEAP8[$1259>>0]|0;HEAP8[$1258+1>>0]=HEAP8[$1259+1>>0]|0;HEAP8[$1258+2>>0]=HEAP8[$1259+2>>0]|0;HEAP8[$1258+3>>0]=HEAP8[$1259+3>>0]|0;
|
|
$1260 = $button;
|
|
$1261 = ((($1260)) + 76|0);
|
|
$1262 = $1;
|
|
;HEAP8[$1261>>0]=HEAP8[$1262>>0]|0;HEAP8[$1261+1>>0]=HEAP8[$1262+1>>0]|0;HEAP8[$1261+2>>0]=HEAP8[$1262+2>>0]|0;HEAP8[$1261+3>>0]=HEAP8[$1262+3>>0]|0;
|
|
$1263 = $button;
|
|
$1264 = ((($1263)) + 92|0);
|
|
_nk_vec2($166,0.0,0.0);
|
|
;HEAP32[$1264>>2]=HEAP32[$166>>2]|0;HEAP32[$1264+4>>2]=HEAP32[$166+4>>2]|0;
|
|
$1265 = $button;
|
|
$1266 = ((($1265)) + 108|0);
|
|
_nk_vec2($167,0.0,0.0);
|
|
;HEAP32[$1266>>2]=HEAP32[$167>>2]|0;HEAP32[$1266+4>>2]=HEAP32[$167+4>>2]|0;
|
|
$1267 = $button;
|
|
$1268 = ((($1267)) + 116|0);
|
|
_nk_handle_ptr($168,0);
|
|
;HEAP32[$1268>>2]=HEAP32[$168>>2]|0;
|
|
$1269 = $button;
|
|
$1270 = ((($1269)) + 80|0);
|
|
HEAP32[$1270>>2] = 18;
|
|
$1271 = $button;
|
|
$1272 = ((($1271)) + 84|0);
|
|
HEAPF32[$1272>>2] = 0.0;
|
|
$1273 = $button;
|
|
$1274 = ((($1273)) + 88|0);
|
|
HEAPF32[$1274>>2] = 0.0;
|
|
$1275 = $button;
|
|
$1276 = ((($1275)) + 120|0);
|
|
HEAP32[$1276>>2] = 0;
|
|
$1277 = $button;
|
|
$1278 = ((($1277)) + 124|0);
|
|
HEAP32[$1278>>2] = 0;
|
|
$1279 = $style;
|
|
$1280 = ((($1279)) + 4784|0);
|
|
$1281 = ((($1280)) + 188|0);
|
|
$button = $1281;
|
|
$1282 = $button;
|
|
_nk_zero($1282,128);
|
|
$1283 = $button;
|
|
$1284 = $1;
|
|
$1285 = ((($1284)) + 8|0);
|
|
;HEAP8[$$byval_copy78>>0]=HEAP8[$1285>>0]|0;HEAP8[$$byval_copy78+1>>0]=HEAP8[$1285+1>>0]|0;HEAP8[$$byval_copy78+2>>0]=HEAP8[$1285+2>>0]|0;HEAP8[$$byval_copy78+3>>0]=HEAP8[$1285+3>>0]|0;
|
|
_nk_style_item_color($169,$$byval_copy78);
|
|
;HEAP32[$1283>>2]=HEAP32[$169>>2]|0;HEAP32[$1283+4>>2]=HEAP32[$169+4>>2]|0;HEAP32[$1283+8>>2]=HEAP32[$169+8>>2]|0;HEAP32[$1283+12>>2]=HEAP32[$169+12>>2]|0;HEAP32[$1283+16>>2]=HEAP32[$169+16>>2]|0;
|
|
$1286 = $button;
|
|
$1287 = ((($1286)) + 20|0);
|
|
$1288 = $1;
|
|
$1289 = ((($1288)) + 8|0);
|
|
;HEAP8[$$byval_copy79>>0]=HEAP8[$1289>>0]|0;HEAP8[$$byval_copy79+1>>0]=HEAP8[$1289+1>>0]|0;HEAP8[$$byval_copy79+2>>0]=HEAP8[$1289+2>>0]|0;HEAP8[$$byval_copy79+3>>0]=HEAP8[$1289+3>>0]|0;
|
|
_nk_style_item_color($170,$$byval_copy79);
|
|
;HEAP32[$1287>>2]=HEAP32[$170>>2]|0;HEAP32[$1287+4>>2]=HEAP32[$170+4>>2]|0;HEAP32[$1287+8>>2]=HEAP32[$170+8>>2]|0;HEAP32[$1287+12>>2]=HEAP32[$170+12>>2]|0;HEAP32[$1287+16>>2]=HEAP32[$170+16>>2]|0;
|
|
$1290 = $button;
|
|
$1291 = ((($1290)) + 40|0);
|
|
$1292 = $1;
|
|
$1293 = ((($1292)) + 8|0);
|
|
;HEAP8[$$byval_copy80>>0]=HEAP8[$1293>>0]|0;HEAP8[$$byval_copy80+1>>0]=HEAP8[$1293+1>>0]|0;HEAP8[$$byval_copy80+2>>0]=HEAP8[$1293+2>>0]|0;HEAP8[$$byval_copy80+3>>0]=HEAP8[$1293+3>>0]|0;
|
|
_nk_style_item_color($171,$$byval_copy80);
|
|
;HEAP32[$1291>>2]=HEAP32[$171>>2]|0;HEAP32[$1291+4>>2]=HEAP32[$171+4>>2]|0;HEAP32[$1291+8>>2]=HEAP32[$171+8>>2]|0;HEAP32[$1291+12>>2]=HEAP32[$171+12>>2]|0;HEAP32[$1291+16>>2]=HEAP32[$171+16>>2]|0;
|
|
$1294 = $button;
|
|
$1295 = ((($1294)) + 60|0);
|
|
_nk_rgba($172,0,0,0,0);
|
|
;HEAP8[$1295>>0]=HEAP8[$172>>0]|0;HEAP8[$1295+1>>0]=HEAP8[$172+1>>0]|0;HEAP8[$1295+2>>0]=HEAP8[$172+2>>0]|0;HEAP8[$1295+3>>0]=HEAP8[$172+3>>0]|0;
|
|
$1296 = $button;
|
|
$1297 = ((($1296)) + 64|0);
|
|
$1298 = $1;
|
|
$1299 = ((($1298)) + 8|0);
|
|
;HEAP8[$1297>>0]=HEAP8[$1299>>0]|0;HEAP8[$1297+1>>0]=HEAP8[$1299+1>>0]|0;HEAP8[$1297+2>>0]=HEAP8[$1299+2>>0]|0;HEAP8[$1297+3>>0]=HEAP8[$1299+3>>0]|0;
|
|
$1300 = $button;
|
|
$1301 = ((($1300)) + 68|0);
|
|
$1302 = $1;
|
|
;HEAP8[$1301>>0]=HEAP8[$1302>>0]|0;HEAP8[$1301+1>>0]=HEAP8[$1302+1>>0]|0;HEAP8[$1301+2>>0]=HEAP8[$1302+2>>0]|0;HEAP8[$1301+3>>0]=HEAP8[$1302+3>>0]|0;
|
|
$1303 = $button;
|
|
$1304 = ((($1303)) + 72|0);
|
|
$1305 = $1;
|
|
;HEAP8[$1304>>0]=HEAP8[$1305>>0]|0;HEAP8[$1304+1>>0]=HEAP8[$1305+1>>0]|0;HEAP8[$1304+2>>0]=HEAP8[$1305+2>>0]|0;HEAP8[$1304+3>>0]=HEAP8[$1305+3>>0]|0;
|
|
$1306 = $button;
|
|
$1307 = ((($1306)) + 76|0);
|
|
$1308 = $1;
|
|
;HEAP8[$1307>>0]=HEAP8[$1308>>0]|0;HEAP8[$1307+1>>0]=HEAP8[$1308+1>>0]|0;HEAP8[$1307+2>>0]=HEAP8[$1308+2>>0]|0;HEAP8[$1307+3>>0]=HEAP8[$1308+3>>0]|0;
|
|
$1309 = $button;
|
|
$1310 = ((($1309)) + 92|0);
|
|
_nk_vec2($173,0.0,0.0);
|
|
;HEAP32[$1310>>2]=HEAP32[$173>>2]|0;HEAP32[$1310+4>>2]=HEAP32[$173+4>>2]|0;
|
|
$1311 = $button;
|
|
$1312 = ((($1311)) + 108|0);
|
|
_nk_vec2($174,0.0,0.0);
|
|
;HEAP32[$1312>>2]=HEAP32[$174>>2]|0;HEAP32[$1312+4>>2]=HEAP32[$174+4>>2]|0;
|
|
$1313 = $button;
|
|
$1314 = ((($1313)) + 116|0);
|
|
_nk_handle_ptr($175,0);
|
|
;HEAP32[$1314>>2]=HEAP32[$175>>2]|0;
|
|
$1315 = $button;
|
|
$1316 = ((($1315)) + 80|0);
|
|
HEAP32[$1316>>2] = 18;
|
|
$1317 = $button;
|
|
$1318 = ((($1317)) + 84|0);
|
|
HEAPF32[$1318>>2] = 0.0;
|
|
$1319 = $button;
|
|
$1320 = ((($1319)) + 88|0);
|
|
HEAPF32[$1320>>2] = 0.0;
|
|
$1321 = $button;
|
|
$1322 = ((($1321)) + 120|0);
|
|
HEAP32[$1322>>2] = 0;
|
|
$1323 = $button;
|
|
$1324 = ((($1323)) + 124|0);
|
|
HEAP32[$1324>>2] = 0;
|
|
$1325 = $win;
|
|
$1326 = ((($1325)) + 388|0);
|
|
$1327 = $1;
|
|
$1328 = ((($1327)) + 4|0);
|
|
;HEAP8[$1326>>0]=HEAP8[$1328>>0]|0;HEAP8[$1326+1>>0]=HEAP8[$1328+1>>0]|0;HEAP8[$1326+2>>0]=HEAP8[$1328+2>>0]|0;HEAP8[$1326+3>>0]=HEAP8[$1328+3>>0]|0;
|
|
$1329 = $win;
|
|
$1330 = ((($1329)) + 368|0);
|
|
$1331 = $1;
|
|
$1332 = ((($1331)) + 4|0);
|
|
;HEAP8[$$byval_copy81>>0]=HEAP8[$1332>>0]|0;HEAP8[$$byval_copy81+1>>0]=HEAP8[$1332+1>>0]|0;HEAP8[$$byval_copy81+2>>0]=HEAP8[$1332+2>>0]|0;HEAP8[$$byval_copy81+3>>0]=HEAP8[$1332+3>>0]|0;
|
|
_nk_style_item_color($176,$$byval_copy81);
|
|
;HEAP32[$1330>>2]=HEAP32[$176>>2]|0;HEAP32[$1330+4>>2]=HEAP32[$176+4>>2]|0;HEAP32[$1330+8>>2]=HEAP32[$176+8>>2]|0;HEAP32[$1330+12>>2]=HEAP32[$176+12>>2]|0;HEAP32[$1330+16>>2]=HEAP32[$176+16>>2]|0;
|
|
$1333 = $win;
|
|
$1334 = ((($1333)) + 392|0);
|
|
$1335 = $1;
|
|
$1336 = ((($1335)) + 12|0);
|
|
;HEAP8[$1334>>0]=HEAP8[$1336>>0]|0;HEAP8[$1334+1>>0]=HEAP8[$1336+1>>0]|0;HEAP8[$1334+2>>0]=HEAP8[$1336+2>>0]|0;HEAP8[$1334+3>>0]=HEAP8[$1336+3>>0]|0;
|
|
$1337 = $win;
|
|
$1338 = ((($1337)) + 396|0);
|
|
$1339 = $1;
|
|
$1340 = ((($1339)) + 12|0);
|
|
;HEAP8[$1338>>0]=HEAP8[$1340>>0]|0;HEAP8[$1338+1>>0]=HEAP8[$1340+1>>0]|0;HEAP8[$1338+2>>0]=HEAP8[$1340+2>>0]|0;HEAP8[$1338+3>>0]=HEAP8[$1340+3>>0]|0;
|
|
$1341 = $win;
|
|
$1342 = ((($1341)) + 400|0);
|
|
$1343 = $1;
|
|
$1344 = ((($1343)) + 12|0);
|
|
;HEAP8[$1342>>0]=HEAP8[$1344>>0]|0;HEAP8[$1342+1>>0]=HEAP8[$1344+1>>0]|0;HEAP8[$1342+2>>0]=HEAP8[$1344+2>>0]|0;HEAP8[$1342+3>>0]=HEAP8[$1344+3>>0]|0;
|
|
$1345 = $win;
|
|
$1346 = ((($1345)) + 404|0);
|
|
$1347 = $1;
|
|
$1348 = ((($1347)) + 12|0);
|
|
;HEAP8[$1346>>0]=HEAP8[$1348>>0]|0;HEAP8[$1346+1>>0]=HEAP8[$1348+1>>0]|0;HEAP8[$1346+2>>0]=HEAP8[$1348+2>>0]|0;HEAP8[$1346+3>>0]=HEAP8[$1348+3>>0]|0;
|
|
$1349 = $win;
|
|
$1350 = ((($1349)) + 408|0);
|
|
$1351 = $1;
|
|
$1352 = ((($1351)) + 12|0);
|
|
;HEAP8[$1350>>0]=HEAP8[$1352>>0]|0;HEAP8[$1350+1>>0]=HEAP8[$1352+1>>0]|0;HEAP8[$1350+2>>0]=HEAP8[$1352+2>>0]|0;HEAP8[$1350+3>>0]=HEAP8[$1352+3>>0]|0;
|
|
$1353 = $win;
|
|
$1354 = ((($1353)) + 412|0);
|
|
$1355 = $1;
|
|
$1356 = ((($1355)) + 12|0);
|
|
;HEAP8[$1354>>0]=HEAP8[$1356>>0]|0;HEAP8[$1354+1>>0]=HEAP8[$1356+1>>0]|0;HEAP8[$1354+2>>0]=HEAP8[$1356+2>>0]|0;HEAP8[$1354+3>>0]=HEAP8[$1356+3>>0]|0;
|
|
$1357 = $win;
|
|
$1358 = ((($1357)) + 416|0);
|
|
$1359 = $1;
|
|
;HEAP8[$$byval_copy82>>0]=HEAP8[$1359>>0]|0;HEAP8[$$byval_copy82+1>>0]=HEAP8[$1359+1>>0]|0;HEAP8[$$byval_copy82+2>>0]=HEAP8[$1359+2>>0]|0;HEAP8[$$byval_copy82+3>>0]=HEAP8[$1359+3>>0]|0;
|
|
_nk_style_item_color($177,$$byval_copy82);
|
|
;HEAP32[$1358>>2]=HEAP32[$177>>2]|0;HEAP32[$1358+4>>2]=HEAP32[$177+4>>2]|0;HEAP32[$1358+8>>2]=HEAP32[$177+8>>2]|0;HEAP32[$1358+12>>2]=HEAP32[$177+12>>2]|0;HEAP32[$1358+16>>2]=HEAP32[$177+16>>2]|0;
|
|
$1360 = $win;
|
|
$1361 = ((($1360)) + 436|0);
|
|
_nk_vec2($178,4.0,4.0);
|
|
;HEAP32[$1361>>2]=HEAP32[$178>>2]|0;HEAP32[$1361+4>>2]=HEAP32[$178+4>>2]|0;
|
|
$1362 = $win;
|
|
$1363 = ((($1362)) + 468|0);
|
|
HEAPF32[$1363>>2] = 0.0;
|
|
$1364 = $win;
|
|
$1365 = ((($1364)) + 472|0);
|
|
_nk_vec2($179,16.0,16.0);
|
|
;HEAP32[$1365>>2]=HEAP32[$179>>2]|0;HEAP32[$1365+4>>2]=HEAP32[$179+4>>2]|0;
|
|
$1366 = $win;
|
|
$1367 = ((($1366)) + 480|0);
|
|
_nk_vec2($180,8.0,8.0);
|
|
;HEAP32[$1367>>2]=HEAP32[$180>>2]|0;HEAP32[$1367+4>>2]=HEAP32[$180+4>>2]|0;
|
|
$1368 = $win;
|
|
$1369 = ((($1368)) + 488|0);
|
|
_nk_vec2($181,4.0,4.0);
|
|
;HEAP32[$1369>>2]=HEAP32[$181>>2]|0;HEAP32[$1369+4>>2]=HEAP32[$181+4>>2]|0;
|
|
$1370 = $win;
|
|
$1371 = ((($1370)) + 496|0);
|
|
_nk_vec2($182,10.0,10.0);
|
|
;HEAP32[$1371>>2]=HEAP32[$182>>2]|0;HEAP32[$1371+4>>2]=HEAP32[$182+4>>2]|0;
|
|
$1372 = $win;
|
|
$1373 = ((($1372)) + 504|0);
|
|
_nk_vec2($183,64.0,64.0);
|
|
;HEAP32[$1373>>2]=HEAP32[$183>>2]|0;HEAP32[$1373+4>>2]=HEAP32[$183+4>>2]|0;
|
|
$1374 = $win;
|
|
$1375 = ((($1374)) + 448|0);
|
|
HEAPF32[$1375>>2] = 1.0;
|
|
$1376 = $win;
|
|
$1377 = ((($1376)) + 452|0);
|
|
HEAPF32[$1377>>2] = 1.0;
|
|
$1378 = $win;
|
|
$1379 = ((($1378)) + 456|0);
|
|
HEAPF32[$1379>>2] = 1.0;
|
|
$1380 = $win;
|
|
$1381 = ((($1380)) + 460|0);
|
|
HEAPF32[$1381>>2] = 1.0;
|
|
$1382 = $win;
|
|
$1383 = ((($1382)) + 464|0);
|
|
HEAPF32[$1383>>2] = 1.0;
|
|
$1384 = $win;
|
|
$1385 = ((($1384)) + 444|0);
|
|
HEAPF32[$1385>>2] = 2.0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_style_item_color($agg$result,$col) {
|
|
$agg$result = $agg$result|0;
|
|
$col = $col|0;
|
|
var $0 = 0, $i = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$i = sp;
|
|
HEAP32[$i>>2] = 0;
|
|
$0 = ((($i)) + 4|0);
|
|
;HEAP8[$0>>0]=HEAP8[$col>>0]|0;HEAP8[$0+1>>0]=HEAP8[$col+1>>0]|0;HEAP8[$0+2>>0]=HEAP8[$col+2>>0]|0;HEAP8[$0+3>>0]=HEAP8[$col+3>>0]|0;
|
|
;HEAP32[$agg$result>>2]=HEAP32[$i>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$i+4>>2]|0;HEAP32[$agg$result+8>>2]=HEAP32[$i+8>>2]|0;HEAP32[$agg$result+12>>2]=HEAP32[$i+12>>2]|0;HEAP32[$agg$result+16>>2]=HEAP32[$i+16>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_style_item_hide($agg$result) {
|
|
$agg$result = $agg$result|0;
|
|
var $0 = 0, $1 = 0, $i = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$i = sp;
|
|
$0 = sp + 20|0;
|
|
HEAP32[$i>>2] = 0;
|
|
$1 = ((($i)) + 4|0);
|
|
_nk_rgba($0,0,0,0,0);
|
|
;HEAP8[$1>>0]=HEAP8[$0>>0]|0;HEAP8[$1+1>>0]=HEAP8[$0+1>>0]|0;HEAP8[$1+2>>0]=HEAP8[$0+2>>0]|0;HEAP8[$1+3>>0]=HEAP8[$0+3>>0]|0;
|
|
;HEAP32[$agg$result>>2]=HEAP32[$i>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$i+4>>2]|0;HEAP32[$agg$result+8>>2]=HEAP32[$i+8>>2]|0;HEAP32[$agg$result+12>>2]=HEAP32[$i+12>>2]|0;HEAP32[$agg$result+16>>2]=HEAP32[$i+16>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_style_set_font($ctx,$font) {
|
|
$ctx = $ctx|0;
|
|
$font = $font|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $style = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $font;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((14913|0),(13400|0),14267,(28237|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$6 = $0;
|
|
$7 = ((($6)) + 300|0);
|
|
$style = $7;
|
|
$8 = $style;
|
|
$9 = $1;
|
|
;HEAP32[$8>>2]=HEAP32[$9>>2]|0;HEAP32[$8+4>>2]=HEAP32[$9+4>>2]|0;HEAP32[$8+8>>2]=HEAP32[$9+8>>2]|0;HEAP32[$8+12>>2]=HEAP32[$9+12>>2]|0;HEAP32[$8+16>>2]=HEAP32[$9+16>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_init_default($ctx,$font) {
|
|
$ctx = $ctx|0;
|
|
$font = $font|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $alloc = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$alloc = sp;
|
|
$0 = $ctx;
|
|
$1 = $font;
|
|
HEAP32[$alloc>>2] = 0;
|
|
$2 = ((($alloc)) + 4|0);
|
|
HEAP32[$2>>2] = 7;
|
|
$3 = ((($alloc)) + 8|0);
|
|
HEAP32[$3>>2] = 8;
|
|
$4 = $0;
|
|
$5 = $1;
|
|
$6 = (_nk_init($4,$alloc,$5)|0);
|
|
STACKTOP = sp;return ($6|0);
|
|
}
|
|
function _nk_init($ctx,$alloc,$font) {
|
|
$ctx = $ctx|0;
|
|
$alloc = $alloc|0;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0;
|
|
var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 16|0;
|
|
$1 = $ctx;
|
|
$2 = $alloc;
|
|
$3 = $font;
|
|
$4 = $2;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((15055|0),(13400|0),14456,(28255|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $2;
|
|
$7 = ($6|0)!=(0|0);
|
|
if ($7) {
|
|
$8 = $1;
|
|
$9 = $3;
|
|
_nk_setup($8,$9);
|
|
$10 = $1;
|
|
$11 = ((($10)) + 5596|0);
|
|
$12 = $2;
|
|
_nk_buffer_init($11,$12,4096);
|
|
$13 = $2;
|
|
$14 = ((($13)) + 4|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = $2;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$16>>2]|0;
|
|
$17 = (FUNCTION_TABLE_iiii[$15 & 7]($$byval_copy,0,40)|0);
|
|
$18 = $1;
|
|
$19 = ((($18)) + 11152|0);
|
|
HEAP32[$19>>2] = $17;
|
|
$20 = $1;
|
|
$21 = ((($20)) + 11152|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = $2;
|
|
_nk_pool_init($22,$23,16);
|
|
$0 = 1;
|
|
$24 = $0;
|
|
STACKTOP = sp;return ($24|0);
|
|
} else {
|
|
$0 = 0;
|
|
$24 = $0;
|
|
STACKTOP = sp;return ($24|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_setup($ctx,$font) {
|
|
$ctx = $ctx|0;
|
|
$font = $font|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $font;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((14913|0),(13400|0),14390,(31189|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$6 = $0;
|
|
_nk_zero($6,11184);
|
|
$7 = $0;
|
|
_nk_style_default($7);
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
if ($9) {
|
|
$10 = $0;
|
|
$11 = ((($10)) + 300|0);
|
|
$12 = $1;
|
|
;HEAP32[$11>>2]=HEAP32[$12>>2]|0;HEAP32[$11+4>>2]=HEAP32[$12+4>>2]|0;HEAP32[$11+8>>2]=HEAP32[$12+8>>2]|0;HEAP32[$11+12>>2]=HEAP32[$12+12>>2]|0;HEAP32[$11+16>>2]=HEAP32[$12+16>>2]|0;
|
|
}
|
|
$13 = $0;
|
|
$14 = ((($13)) + 5672|0);
|
|
_nk_draw_list_init($14);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_pool_init($pool,$alloc,$capacity) {
|
|
$pool = $pool|0;
|
|
$alloc = $alloc|0;
|
|
$capacity = $capacity|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $pool;
|
|
$1 = $alloc;
|
|
$2 = $capacity;
|
|
$3 = $0;
|
|
_nk_zero($3,40);
|
|
$4 = $0;
|
|
$5 = $1;
|
|
;HEAP32[$4>>2]=HEAP32[$5>>2]|0;HEAP32[$4+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$4+8>>2]=HEAP32[$5+8>>2]|0;
|
|
$6 = $2;
|
|
$7 = $0;
|
|
$8 = ((($7)) + 28|0);
|
|
HEAP32[$8>>2] = $6;
|
|
$9 = $0;
|
|
$10 = ((($9)) + 20|0);
|
|
HEAP32[$10>>2] = 0;
|
|
$11 = $0;
|
|
$12 = ((($11)) + 12|0);
|
|
HEAP32[$12>>2] = 1;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_free($ctx) {
|
|
$ctx = $ctx|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0;
|
|
var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $pool = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 8|0;
|
|
$0 = $ctx;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((14913|0),(13400|0),14479,(28263|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$6 = ((($5)) + 5596|0);
|
|
_nk_buffer_free($6);
|
|
$7 = $0;
|
|
$8 = ((($7)) + 11152|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ($9|0)!=(0|0);
|
|
if ($10) {
|
|
$11 = $0;
|
|
$12 = ((($11)) + 11152|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$pool = $13;
|
|
$14 = $pool;
|
|
_nk_pool_free($14);
|
|
$15 = $pool;
|
|
$16 = ((($15)) + 8|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = $pool;
|
|
$19 = $pool;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$18>>2]|0;
|
|
FUNCTION_TABLE_vii[$17 & 31]($$byval_copy,$19);
|
|
}
|
|
$20 = $0;
|
|
_nk_zero($20,300);
|
|
$21 = $0;
|
|
$22 = ((($21)) + 300|0);
|
|
_nk_zero($22,5296);
|
|
$23 = $0;
|
|
$24 = ((($23)) + 5596|0);
|
|
_nk_zero($24,60);
|
|
$25 = $0;
|
|
$26 = ((($25)) + 11180|0);
|
|
HEAP32[$26>>2] = 0;
|
|
$27 = $0;
|
|
$28 = ((($27)) + 11152|0);
|
|
HEAP32[$28>>2] = 0;
|
|
$29 = $0;
|
|
$30 = ((($29)) + 11148|0);
|
|
HEAP32[$30>>2] = 0;
|
|
$31 = $0;
|
|
$32 = ((($31)) + 11156|0);
|
|
HEAP32[$32>>2] = 0;
|
|
$33 = $0;
|
|
$34 = ((($33)) + 11160|0);
|
|
HEAP32[$34>>2] = 0;
|
|
$35 = $0;
|
|
$36 = ((($35)) + 11164|0);
|
|
HEAP32[$36>>2] = 0;
|
|
$37 = $0;
|
|
$38 = ((($37)) + 11168|0);
|
|
HEAP32[$38>>2] = 0;
|
|
$39 = $0;
|
|
$40 = ((($39)) + 11172|0);
|
|
HEAP32[$40>>2] = 0;
|
|
$41 = $0;
|
|
$42 = ((($41)) + 11176|0);
|
|
HEAP32[$42>>2] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_pool_free($pool) {
|
|
$pool = $pool|0;
|
|
var $$byval_copy = 0, $$old = 0, $$old1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0;
|
|
var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $iter = 0, $next = 0, $or$cond = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 12|0;
|
|
$0 = $pool;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 20|0);
|
|
$3 = HEAP32[$2>>2]|0;
|
|
$iter = $3;
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$6 = $0;
|
|
$7 = ((($6)) + 12|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = ($8|0)!=(0);
|
|
$10 = $iter;
|
|
$11 = ($10|0)!=(0|0);
|
|
$or$cond = $9 & $11;
|
|
if (!($or$cond)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
while(1) {
|
|
$12 = $iter;
|
|
$13 = ((($12)) + 4|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$next = $14;
|
|
$15 = $0;
|
|
$16 = ((($15)) + 8|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = $0;
|
|
$19 = $iter;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$18>>2]|0;
|
|
FUNCTION_TABLE_vii[$17 & 31]($$byval_copy,$19);
|
|
$20 = $next;
|
|
$iter = $20;
|
|
$$old = $iter;
|
|
$$old1 = ($$old|0)!=(0|0);
|
|
if (!($$old1)) {
|
|
break;
|
|
}
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_clear($ctx) {
|
|
$ctx = $ctx|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0;
|
|
var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0;
|
|
var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0;
|
|
var $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0;
|
|
var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0;
|
|
var $96 = 0, $97 = 0, $98 = 0, $99 = 0, $it = 0, $iter = 0, $n = 0, $next = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((14913|0),(13400|0),14508,(28271|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$6 = ((($5)) + 11152|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = ($7|0)!=(0|0);
|
|
$9 = $0;
|
|
$10 = ((($9)) + 5596|0);
|
|
if ($8) {
|
|
_nk_buffer_clear($10);
|
|
} else {
|
|
_nk_buffer_reset($10,0);
|
|
}
|
|
$11 = $0;
|
|
$12 = ((($11)) + 11148|0);
|
|
HEAP32[$12>>2] = 0;
|
|
$13 = $0;
|
|
$14 = ((($13)) + 5596|0);
|
|
$15 = ((($14)) + 52|0);
|
|
HEAP32[$15>>2] = 0;
|
|
$16 = $0;
|
|
$17 = ((($16)) + 5668|0);
|
|
HEAP32[$17>>2] = 0;
|
|
$18 = $0;
|
|
$19 = ((($18)) + 5672|0);
|
|
_nk_draw_list_clear($19);
|
|
$20 = $0;
|
|
$21 = ((($20)) + 11156|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$iter = $22;
|
|
while(1) {
|
|
$23 = $iter;
|
|
$24 = ($23|0)!=(0|0);
|
|
if (!($24)) {
|
|
break;
|
|
}
|
|
$25 = $iter;
|
|
$26 = ((($25)) + 8|0);
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = $27 & 4096;
|
|
$29 = ($28|0)!=(0);
|
|
$30 = $iter;
|
|
if ($29) {
|
|
$31 = ((($30)) + 264|0);
|
|
$32 = HEAP32[$31>>2]|0;
|
|
$iter = $32;
|
|
continue;
|
|
}
|
|
$33 = ((($30)) + 172|0);
|
|
$34 = HEAP32[$33>>2]|0;
|
|
$35 = ($34|0)!=(0|0);
|
|
if ($35) {
|
|
$36 = $iter;
|
|
$37 = ((($36)) + 172|0);
|
|
$38 = HEAP32[$37>>2]|0;
|
|
$39 = HEAP32[$38>>2]|0;
|
|
$40 = $0;
|
|
$41 = ((($40)) + 11180|0);
|
|
$42 = HEAP32[$41>>2]|0;
|
|
$43 = ($39|0)!=($42|0);
|
|
if ($43) {
|
|
$44 = $0;
|
|
$45 = $iter;
|
|
$46 = ((($45)) + 172|0);
|
|
$47 = HEAP32[$46>>2]|0;
|
|
_nk_free_window($44,$47);
|
|
$48 = $iter;
|
|
$49 = ((($48)) + 172|0);
|
|
HEAP32[$49>>2] = 0;
|
|
}
|
|
}
|
|
$50 = $iter;
|
|
$51 = ((($50)) + 256|0);
|
|
$52 = HEAP32[$51>>2]|0;
|
|
$it = $52;
|
|
while(1) {
|
|
$53 = $it;
|
|
$54 = ($53|0)!=(0|0);
|
|
if (!($54)) {
|
|
break;
|
|
}
|
|
$55 = $it;
|
|
$56 = ((($55)) + 276|0);
|
|
$57 = HEAP32[$56>>2]|0;
|
|
$n = $57;
|
|
$58 = $it;
|
|
$59 = HEAP32[$58>>2]|0;
|
|
$60 = $0;
|
|
$61 = ((($60)) + 11180|0);
|
|
$62 = HEAP32[$61>>2]|0;
|
|
$63 = ($59|0)!=($62|0);
|
|
if ($63) {
|
|
$64 = $iter;
|
|
$65 = $it;
|
|
_nk_remove_table($64,$65);
|
|
$66 = $it;
|
|
_nk_zero($66,284);
|
|
$67 = $0;
|
|
$68 = $it;
|
|
_nk_free_table($67,$68);
|
|
$69 = $it;
|
|
$70 = $iter;
|
|
$71 = ((($70)) + 256|0);
|
|
$72 = HEAP32[$71>>2]|0;
|
|
$73 = ($69|0)==($72|0);
|
|
if ($73) {
|
|
$74 = $n;
|
|
$75 = $iter;
|
|
$76 = ((($75)) + 256|0);
|
|
HEAP32[$76>>2] = $74;
|
|
}
|
|
}
|
|
$77 = $n;
|
|
$it = $77;
|
|
}
|
|
$78 = $iter;
|
|
$79 = HEAP32[$78>>2]|0;
|
|
$80 = $0;
|
|
$81 = ((($80)) + 11180|0);
|
|
$82 = HEAP32[$81>>2]|0;
|
|
$83 = ($79|0)!=($82|0);
|
|
if (!($83)) {
|
|
$84 = $iter;
|
|
$85 = ((($84)) + 8|0);
|
|
$86 = HEAP32[$85>>2]|0;
|
|
$87 = $86 & 2048;
|
|
$88 = ($87|0)!=(0);
|
|
if (!($88)) {
|
|
$97 = $iter;
|
|
$98 = ((($97)) + 264|0);
|
|
$99 = HEAP32[$98>>2]|0;
|
|
$iter = $99;
|
|
continue;
|
|
}
|
|
}
|
|
$89 = $iter;
|
|
$90 = ((($89)) + 264|0);
|
|
$91 = HEAP32[$90>>2]|0;
|
|
$next = $91;
|
|
$92 = $0;
|
|
$93 = $iter;
|
|
_nk_remove_window($92,$93);
|
|
$94 = $0;
|
|
$95 = $iter;
|
|
_nk_free_window($94,$95);
|
|
$96 = $next;
|
|
$iter = $96;
|
|
}
|
|
$100 = $0;
|
|
$101 = ((($100)) + 11180|0);
|
|
$102 = HEAP32[$101>>2]|0;
|
|
$103 = (($102) + 1)|0;
|
|
HEAP32[$101>>2] = $103;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_free_window($ctx,$win) {
|
|
$ctx = $ctx|0;
|
|
$win = $win|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
|
|
var $9 = 0, $it = 0, $n = 0, $pd = 0, $pe = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $win;
|
|
$2 = $1;
|
|
$3 = ((($2)) + 256|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$it = $4;
|
|
$5 = $1;
|
|
$6 = ((($5)) + 172|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = ($7|0)!=(0|0);
|
|
if ($8) {
|
|
$9 = $0;
|
|
$10 = $1;
|
|
$11 = ((($10)) + 172|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
_nk_free_window($9,$12);
|
|
$13 = $1;
|
|
$14 = ((($13)) + 172|0);
|
|
HEAP32[$14>>2] = 0;
|
|
}
|
|
$15 = $1;
|
|
$16 = ((($15)) + 264|0);
|
|
HEAP32[$16>>2] = 0;
|
|
$17 = $1;
|
|
$18 = ((($17)) + 268|0);
|
|
HEAP32[$18>>2] = 0;
|
|
while(1) {
|
|
$19 = $it;
|
|
$20 = ($19|0)!=(0|0);
|
|
if (!($20)) {
|
|
break;
|
|
}
|
|
$21 = $it;
|
|
$22 = ((($21)) + 276|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$n = $23;
|
|
$24 = $1;
|
|
$25 = $it;
|
|
_nk_remove_table($24,$25);
|
|
$26 = $0;
|
|
$27 = $it;
|
|
_nk_free_table($26,$27);
|
|
$28 = $it;
|
|
$29 = $1;
|
|
$30 = ((($29)) + 256|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = ($28|0)==($31|0);
|
|
if ($32) {
|
|
$33 = $n;
|
|
$34 = $1;
|
|
$35 = ((($34)) + 256|0);
|
|
HEAP32[$35>>2] = $33;
|
|
}
|
|
$36 = $n;
|
|
$it = $36;
|
|
}
|
|
$37 = $1;
|
|
$pd = $37;
|
|
$38 = $pd;
|
|
$pe = $38;
|
|
$39 = $0;
|
|
$40 = $pe;
|
|
_nk_free_page_element($39,$40);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_remove_table($win,$tbl) {
|
|
$win = $win|0;
|
|
$tbl = $tbl|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $win;
|
|
$1 = $tbl;
|
|
$2 = $0;
|
|
$3 = ((($2)) + 256|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$5 = $1;
|
|
$6 = ($4|0)==($5|0);
|
|
if ($6) {
|
|
$7 = $1;
|
|
$8 = ((($7)) + 276|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = $0;
|
|
$11 = ((($10)) + 256|0);
|
|
HEAP32[$11>>2] = $9;
|
|
}
|
|
$12 = $1;
|
|
$13 = ((($12)) + 276|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = ($14|0)!=(0|0);
|
|
if ($15) {
|
|
$16 = $1;
|
|
$17 = ((($16)) + 280|0);
|
|
$18 = HEAP32[$17>>2]|0;
|
|
$19 = $1;
|
|
$20 = ((($19)) + 276|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = ((($21)) + 280|0);
|
|
HEAP32[$22>>2] = $18;
|
|
}
|
|
$23 = $1;
|
|
$24 = ((($23)) + 280|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = ($25|0)!=(0|0);
|
|
if (!($26)) {
|
|
$34 = $1;
|
|
$35 = ((($34)) + 276|0);
|
|
HEAP32[$35>>2] = 0;
|
|
$36 = $1;
|
|
$37 = ((($36)) + 280|0);
|
|
HEAP32[$37>>2] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
$27 = $1;
|
|
$28 = ((($27)) + 276|0);
|
|
$29 = HEAP32[$28>>2]|0;
|
|
$30 = $1;
|
|
$31 = ((($30)) + 280|0);
|
|
$32 = HEAP32[$31>>2]|0;
|
|
$33 = ((($32)) + 276|0);
|
|
HEAP32[$33>>2] = $29;
|
|
$34 = $1;
|
|
$35 = ((($34)) + 276|0);
|
|
HEAP32[$35>>2] = 0;
|
|
$36 = $1;
|
|
$37 = ((($36)) + 280|0);
|
|
HEAP32[$37>>2] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_free_table($ctx,$tbl) {
|
|
$ctx = $ctx|0;
|
|
$tbl = $tbl|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $pd = 0, $pe = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $tbl;
|
|
$2 = $1;
|
|
$pd = $2;
|
|
$3 = $pd;
|
|
$pe = $3;
|
|
$4 = $0;
|
|
$5 = $pe;
|
|
_nk_free_page_element($4,$5);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_remove_window($ctx,$win) {
|
|
$ctx = $ctx|0;
|
|
$win = $win|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
|
|
var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
|
|
var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
|
|
var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0;
|
|
var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0;
|
|
var $98 = 0, $99 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $win;
|
|
$2 = $1;
|
|
$3 = $0;
|
|
$4 = ((($3)) + 11156|0);
|
|
$5 = HEAP32[$4>>2]|0;
|
|
$6 = ($2|0)==($5|0);
|
|
if ($6) {
|
|
label = 3;
|
|
} else {
|
|
$7 = $1;
|
|
$8 = $0;
|
|
$9 = ((($8)) + 11160|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = ($7|0)==($10|0);
|
|
if ($11) {
|
|
label = 3;
|
|
} else {
|
|
$48 = $1;
|
|
$49 = ((($48)) + 264|0);
|
|
$50 = HEAP32[$49>>2]|0;
|
|
$51 = ($50|0)!=(0|0);
|
|
if ($51) {
|
|
$52 = $1;
|
|
$53 = ((($52)) + 268|0);
|
|
$54 = HEAP32[$53>>2]|0;
|
|
$55 = $1;
|
|
$56 = ((($55)) + 264|0);
|
|
$57 = HEAP32[$56>>2]|0;
|
|
$58 = ((($57)) + 268|0);
|
|
HEAP32[$58>>2] = $54;
|
|
}
|
|
$59 = $1;
|
|
$60 = ((($59)) + 268|0);
|
|
$61 = HEAP32[$60>>2]|0;
|
|
$62 = ($61|0)!=(0|0);
|
|
if ($62) {
|
|
$63 = $1;
|
|
$64 = ((($63)) + 264|0);
|
|
$65 = HEAP32[$64>>2]|0;
|
|
$66 = $1;
|
|
$67 = ((($66)) + 268|0);
|
|
$68 = HEAP32[$67>>2]|0;
|
|
$69 = ((($68)) + 264|0);
|
|
HEAP32[$69>>2] = $65;
|
|
}
|
|
}
|
|
}
|
|
if ((label|0) == 3) {
|
|
$12 = $1;
|
|
$13 = $0;
|
|
$14 = ((($13)) + 11156|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($12|0)==($15|0);
|
|
if ($16) {
|
|
$17 = $1;
|
|
$18 = ((($17)) + 264|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = $0;
|
|
$21 = ((($20)) + 11156|0);
|
|
HEAP32[$21>>2] = $19;
|
|
$22 = $1;
|
|
$23 = ((($22)) + 264|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = ($24|0)!=(0|0);
|
|
if ($25) {
|
|
$26 = $1;
|
|
$27 = ((($26)) + 264|0);
|
|
$28 = HEAP32[$27>>2]|0;
|
|
$29 = ((($28)) + 268|0);
|
|
HEAP32[$29>>2] = 0;
|
|
}
|
|
}
|
|
$30 = $1;
|
|
$31 = $0;
|
|
$32 = ((($31)) + 11160|0);
|
|
$33 = HEAP32[$32>>2]|0;
|
|
$34 = ($30|0)==($33|0);
|
|
if ($34) {
|
|
$35 = $1;
|
|
$36 = ((($35)) + 268|0);
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$38 = $0;
|
|
$39 = ((($38)) + 11160|0);
|
|
HEAP32[$39>>2] = $37;
|
|
$40 = $1;
|
|
$41 = ((($40)) + 268|0);
|
|
$42 = HEAP32[$41>>2]|0;
|
|
$43 = ($42|0)!=(0|0);
|
|
if ($43) {
|
|
$44 = $1;
|
|
$45 = ((($44)) + 268|0);
|
|
$46 = HEAP32[$45>>2]|0;
|
|
$47 = ((($46)) + 264|0);
|
|
HEAP32[$47>>2] = 0;
|
|
}
|
|
}
|
|
}
|
|
$70 = $1;
|
|
$71 = $0;
|
|
$72 = ((($71)) + 11164|0);
|
|
$73 = HEAP32[$72>>2]|0;
|
|
$74 = ($70|0)==($73|0);
|
|
if ($74) {
|
|
label = 15;
|
|
} else {
|
|
$75 = $0;
|
|
$76 = ((($75)) + 11164|0);
|
|
$77 = HEAP32[$76>>2]|0;
|
|
$78 = ($77|0)!=(0|0);
|
|
if (!($78)) {
|
|
label = 15;
|
|
}
|
|
}
|
|
if ((label|0) == 15) {
|
|
$79 = $0;
|
|
$80 = ((($79)) + 11160|0);
|
|
$81 = HEAP32[$80>>2]|0;
|
|
$82 = $0;
|
|
$83 = ((($82)) + 11164|0);
|
|
HEAP32[$83>>2] = $81;
|
|
$84 = $0;
|
|
$85 = ((($84)) + 11160|0);
|
|
$86 = HEAP32[$85>>2]|0;
|
|
$87 = ($86|0)!=(0|0);
|
|
if ($87) {
|
|
$88 = $0;
|
|
$89 = ((($88)) + 11160|0);
|
|
$90 = HEAP32[$89>>2]|0;
|
|
$91 = ((($90)) + 8|0);
|
|
$92 = HEAP32[$91>>2]|0;
|
|
$93 = $92 & -1025;
|
|
HEAP32[$91>>2] = $93;
|
|
}
|
|
}
|
|
$94 = $1;
|
|
$95 = ((($94)) + 264|0);
|
|
HEAP32[$95>>2] = 0;
|
|
$96 = $1;
|
|
$97 = ((($96)) + 268|0);
|
|
HEAP32[$97>>2] = 0;
|
|
$98 = $0;
|
|
$99 = ((($98)) + 11176|0);
|
|
$100 = HEAP32[$99>>2]|0;
|
|
$101 = (($100) + -1)|0;
|
|
HEAP32[$99>>2] = $101;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_build($ctx) {
|
|
$ctx = $ctx|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $7 = 0, $8 = 0, $9 = 0, $buffer = 0, $cmd = 0, $iter = 0, $next = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 11156|0);
|
|
$3 = HEAP32[$2>>2]|0;
|
|
$iter = $3;
|
|
$4 = $0;
|
|
$5 = ((($4)) + 5596|0);
|
|
$6 = ((($5)) + 32|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$buffer = $7;
|
|
while(1) {
|
|
$8 = $iter;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
break;
|
|
}
|
|
$10 = $iter;
|
|
$11 = ((($10)) + 264|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$next = $12;
|
|
$13 = $iter;
|
|
$14 = ((($13)) + 32|0);
|
|
$15 = ((($14)) + 36|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = $iter;
|
|
$18 = ((($17)) + 32|0);
|
|
$19 = ((($18)) + 28|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = ($16|0)==($20|0);
|
|
if (!($21)) {
|
|
$22 = $iter;
|
|
$23 = ((($22)) + 8|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = $24 & 2048;
|
|
$26 = ($25|0)!=(0);
|
|
if (!($26)) {
|
|
$28 = $buffer;
|
|
$29 = $iter;
|
|
$30 = ((($29)) + 32|0);
|
|
$31 = ((($30)) + 36|0);
|
|
$32 = HEAP32[$31>>2]|0;
|
|
$33 = (($28) + ($32)|0);
|
|
$cmd = $33;
|
|
while(1) {
|
|
$34 = $next;
|
|
$35 = ($34|0)!=(0|0);
|
|
if ($35) {
|
|
$36 = $next;
|
|
$37 = ((($36)) + 32|0);
|
|
$38 = ((($37)) + 36|0);
|
|
$39 = HEAP32[$38>>2]|0;
|
|
$40 = $next;
|
|
$41 = ((($40)) + 32|0);
|
|
$42 = ((($41)) + 28|0);
|
|
$43 = HEAP32[$42>>2]|0;
|
|
$44 = ($39|0)==($43|0);
|
|
if ($44) {
|
|
$67 = 1;
|
|
} else {
|
|
$45 = $next;
|
|
$46 = ((($45)) + 8|0);
|
|
$47 = HEAP32[$46>>2]|0;
|
|
$48 = $47 & 2048;
|
|
$49 = ($48|0)!=(0);
|
|
$67 = $49;
|
|
}
|
|
} else {
|
|
$67 = 0;
|
|
}
|
|
$50 = $next;
|
|
if (!($67)) {
|
|
break;
|
|
}
|
|
$51 = ((($50)) + 264|0);
|
|
$52 = HEAP32[$51>>2]|0;
|
|
$next = $52;
|
|
}
|
|
$53 = ($50|0)!=(0|0);
|
|
if ($53) {
|
|
$54 = $next;
|
|
$55 = ((($54)) + 32|0);
|
|
$56 = ((($55)) + 28|0);
|
|
$57 = HEAP32[$56>>2]|0;
|
|
$58 = $cmd;
|
|
$59 = ((($58)) + 4|0);
|
|
HEAP32[$59>>2] = $57;
|
|
} else {
|
|
$60 = $0;
|
|
$61 = ((($60)) + 5596|0);
|
|
$62 = ((($61)) + 44|0);
|
|
$63 = HEAP32[$62>>2]|0;
|
|
$64 = $cmd;
|
|
$65 = ((($64)) + 4|0);
|
|
HEAP32[$65>>2] = $63;
|
|
}
|
|
$66 = $next;
|
|
$iter = $66;
|
|
continue;
|
|
}
|
|
}
|
|
$27 = $next;
|
|
$iter = $27;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_begin($ctx,$layout,$title,$bounds,$flags) {
|
|
$ctx = $ctx|0;
|
|
$layout = $layout|0;
|
|
$title = $title|0;
|
|
$bounds = $bounds|0;
|
|
$flags = $flags|0;
|
|
var $$byval_copy = 0, $$byval_copy6 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0.0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0.0, $113 = 0;
|
|
var $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0;
|
|
var $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0;
|
|
var $150 = 0, $151 = 0.0, $152 = 0, $153 = 0, $154 = 0.0, $155 = 0, $156 = 0, $157 = 0, $158 = 0.0, $159 = 0.0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0.0, $164 = 0, $165 = 0, $166 = 0, $167 = 0.0, $168 = 0.0;
|
|
var $169 = 0, $17 = 0, $170 = 0, $171 = 0.0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0.0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0.0, $181 = 0, $182 = 0, $183 = 0, $184 = 0.0, $185 = 0.0, $186 = 0;
|
|
var $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0.0, $191 = 0, $192 = 0, $193 = 0, $194 = 0.0, $195 = 0.0, $196 = 0, $197 = 0, $198 = 0, $199 = 0.0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0;
|
|
var $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0.0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0.0, $213 = 0.0, $214 = 0, $215 = 0, $216 = 0.0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0.0;
|
|
var $222 = 0, $223 = 0, $224 = 0, $225 = 0.0, $226 = 0, $227 = 0, $228 = 0, $229 = 0.0, $23 = 0, $230 = 0.0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0.0, $236 = 0.0, $237 = 0.0, $238 = 0, $239 = 0, $24 = 0;
|
|
var $240 = 0, $241 = 0.0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0;
|
|
var $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0.0, $267 = 0, $268 = 0, $269 = 0.0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0.0, $274 = 0.0, $275 = 0, $276 = 0;
|
|
var $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0.0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0.0, $287 = 0.0, $288 = 0, $289 = 0, $29 = 0, $290 = 0.0, $291 = 0, $292 = 0, $293 = 0, $294 = 0;
|
|
var $295 = 0, $296 = 0, $297 = 0.0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0.0, $302 = 0, $303 = 0, $304 = 0, $305 = 0.0, $306 = 0.0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0;
|
|
var $312 = 0, $313 = 0.0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0.0, $32 = 0, $320 = 0.0, $321 = 0, $322 = 0, $323 = 0, $324 = 0.0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0;
|
|
var $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0;
|
|
var $349 = 0, $35 = 0, $350 = 0.0, $351 = 0, $352 = 0, $353 = 0, $354 = 0.0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0.0, $36 = 0, $360 = 0, $361 = 0, $362 = 0.0, $363 = 0, $364 = 0, $365 = 0, $366 = 0.0;
|
|
var $367 = 0.0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0.0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0.0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0.0, $384 = 0;
|
|
var $385 = 0, $386 = 0, $387 = 0.0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0.0, $392 = 0.0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0;
|
|
var $402 = 0.0, $403 = 0, $404 = 0, $405 = 0.0, $406 = 0, $407 = 0, $408 = 0, $409 = 0.0, $41 = 0, $410 = 0.0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0.0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0;
|
|
var $420 = 0.0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0.0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0.0, $431 = 0.0, $432 = 0.0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0;
|
|
var $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0;
|
|
var $457 = 0.0, $458 = 0, $459 = 0, $46 = 0, $460 = 0.0, $461 = 0, $462 = 0, $463 = 0, $464 = 0.0, $465 = 0.0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0.0, $472 = 0, $473 = 0, $474 = 0;
|
|
var $475 = 0, $476 = 0, $477 = 0.0, $478 = 0.0, $479 = 0, $48 = 0, $480 = 0, $481 = 0.0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0.0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0.0;
|
|
var $493 = 0, $494 = 0, $495 = 0, $496 = 0.0, $497 = 0.0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0.0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0;
|
|
var $510 = 0.0, $511 = 0.0, $512 = 0, $513 = 0, $514 = 0, $515 = 0.0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0;
|
|
var $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0;
|
|
var $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $57 = 0, $58 = 0, $59 = 0;
|
|
var $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0;
|
|
var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0;
|
|
var $96 = 0, $97 = 0, $98 = 0, $99 = 0, $h = 0.0, $inpanel = 0, $ishovered = 0, $iter = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $ret = 0, $style = 0, $title_hash = 0, $title_len = 0, $win = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy6 = sp + 72|0;
|
|
$$byval_copy = sp + 56|0;
|
|
$1 = $ctx;
|
|
$2 = $layout;
|
|
$3 = $title;
|
|
$4 = $flags;
|
|
$ret = 0;
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((14913|0),(13400|0),14983,(28299|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $1;
|
|
$8 = ((($7)) + 300|0);
|
|
$9 = ((($8)) + 8|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
___assert_fail((28308|0),(13400|0),14984,(28299|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $1;
|
|
$13 = ((($12)) + 11168|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = ($14|0)!=(0|0);
|
|
if ($15) {
|
|
___assert_fail((28377|0),(13400|0),14985,(28299|0));
|
|
// unreachable;
|
|
}
|
|
$16 = $1;
|
|
$17 = ($16|0)!=(0|0);
|
|
if ($17) {
|
|
$18 = $1;
|
|
$19 = ((($18)) + 11168|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = ($20|0)==(0|0);
|
|
$22 = $3;
|
|
$23 = ($22|0)!=(0|0);
|
|
$or$cond = $21 & $23;
|
|
if ($or$cond) {
|
|
$24 = $1;
|
|
$25 = ((($24)) + 300|0);
|
|
$style = $25;
|
|
$26 = $3;
|
|
$27 = (_nk_strlen($26)|0);
|
|
$title_len = $27;
|
|
$28 = $3;
|
|
$29 = $title_len;
|
|
$30 = (_nk_murmur_hash($28,$29,256)|0);
|
|
$title_hash = $30;
|
|
$31 = $1;
|
|
$32 = $title_hash;
|
|
$33 = (_nk_find_window($31,$32)|0);
|
|
$win = $33;
|
|
$34 = $win;
|
|
$35 = ($34|0)!=(0|0);
|
|
do {
|
|
if ($35) {
|
|
$65 = $win;
|
|
$66 = ((($65)) + 8|0);
|
|
$67 = HEAP32[$66>>2]|0;
|
|
$68 = $67 & -512;
|
|
HEAP32[$66>>2] = $68;
|
|
$69 = $4;
|
|
$70 = $win;
|
|
$71 = ((($70)) + 8|0);
|
|
$72 = HEAP32[$71>>2]|0;
|
|
$73 = $72 | $69;
|
|
HEAP32[$71>>2] = $73;
|
|
$74 = $win;
|
|
$75 = HEAP32[$74>>2]|0;
|
|
$76 = (($75) + 1)|0;
|
|
HEAP32[$74>>2] = $76;
|
|
$77 = $1;
|
|
$78 = ((($77)) + 11164|0);
|
|
$79 = HEAP32[$78>>2]|0;
|
|
$80 = ($79|0)!=(0|0);
|
|
if (!($80)) {
|
|
$81 = $win;
|
|
$82 = $1;
|
|
$83 = ((($82)) + 11164|0);
|
|
HEAP32[$83>>2] = $81;
|
|
}
|
|
} else {
|
|
$36 = $1;
|
|
$37 = (_nk_create_window($36)|0);
|
|
$win = $37;
|
|
$38 = $win;
|
|
$39 = ($38|0)!=(0|0);
|
|
if (!($39)) {
|
|
___assert_fail((28440|0),(13400|0),14997,(28299|0));
|
|
// unreachable;
|
|
}
|
|
$40 = $win;
|
|
$41 = ($40|0)!=(0|0);
|
|
if ($41) {
|
|
$42 = $1;
|
|
$43 = $win;
|
|
_nk_insert_window($42,$43);
|
|
$44 = $win;
|
|
$45 = ((($44)) + 32|0);
|
|
$46 = $1;
|
|
$47 = ((($46)) + 5596|0);
|
|
_nk_command_buffer_init($45,$47,1);
|
|
$48 = $4;
|
|
$49 = $win;
|
|
$50 = ((($49)) + 8|0);
|
|
HEAP32[$50>>2] = $48;
|
|
$51 = $win;
|
|
$52 = ((($51)) + 12|0);
|
|
;HEAP32[$52>>2]=HEAP32[$bounds>>2]|0;HEAP32[$52+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$52+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$52+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
$53 = $title_hash;
|
|
$54 = $win;
|
|
$55 = ((($54)) + 4|0);
|
|
HEAP32[$55>>2] = $53;
|
|
$56 = $win;
|
|
$57 = ((($56)) + 172|0);
|
|
HEAP32[$57>>2] = 0;
|
|
$58 = $1;
|
|
$59 = ((($58)) + 11164|0);
|
|
$60 = HEAP32[$59>>2]|0;
|
|
$61 = ($60|0)!=(0|0);
|
|
if ($61) {
|
|
break;
|
|
}
|
|
$62 = $win;
|
|
$63 = $1;
|
|
$64 = ((($63)) + 11164|0);
|
|
HEAP32[$64>>2] = $62;
|
|
break;
|
|
} else {
|
|
$0 = 0;
|
|
$561 = $0;
|
|
STACKTOP = sp;return ($561|0);
|
|
}
|
|
}
|
|
} while(0);
|
|
$84 = $win;
|
|
$85 = ((($84)) + 8|0);
|
|
$86 = HEAP32[$85>>2]|0;
|
|
$87 = $86 & 2048;
|
|
$88 = ($87|0)!=(0);
|
|
$89 = $win;
|
|
if ($88) {
|
|
$90 = $1;
|
|
$91 = ((($90)) + 11168|0);
|
|
HEAP32[$91>>2] = $89;
|
|
$0 = 0;
|
|
$561 = $0;
|
|
STACKTOP = sp;return ($561|0);
|
|
}
|
|
$92 = ((($89)) + 8|0);
|
|
$93 = HEAP32[$92>>2]|0;
|
|
$94 = $93 & 8192;
|
|
$95 = ($94|0)!=(0);
|
|
if (!($95)) {
|
|
$96 = $win;
|
|
$97 = ((($96)) + 8|0);
|
|
$98 = HEAP32[$97>>2]|0;
|
|
$99 = $98 & 2048;
|
|
$100 = ($99|0)!=(0);
|
|
if (!($100)) {
|
|
$101 = $win;
|
|
$iter = $101;
|
|
$102 = $1;
|
|
$103 = ((($102)) + 300|0);
|
|
$104 = ((($103)) + 4|0);
|
|
$105 = +HEAPF32[$104>>2];
|
|
$106 = $style;
|
|
$107 = ((($106)) + 4784|0);
|
|
$108 = ((($107)) + 344|0);
|
|
$109 = ((($108)) + 4|0);
|
|
$110 = +HEAPF32[$109>>2];
|
|
$111 = 2.0 * $110;
|
|
$112 = $105 + $111;
|
|
$h = $112;
|
|
$113 = $1;
|
|
$114 = $win;
|
|
_nk_start($113,$114);
|
|
$115 = $1;
|
|
$116 = $win;
|
|
$117 = ((($116)) + 12|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$117>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$117+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$117+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$117+12>>2]|0;
|
|
$118 = (_nk_input_has_mouse_click_down_in_rect($115,0,$$byval_copy,1)|0);
|
|
$inpanel = $118;
|
|
$119 = $inpanel;
|
|
$120 = ($119|0)!=(0);
|
|
if ($120) {
|
|
$121 = $1;
|
|
$122 = ((($121)) + 220|0);
|
|
$123 = ((($122)) + 4|0);
|
|
$124 = HEAP32[$123>>2]|0;
|
|
$125 = ($124|0)!=(0);
|
|
$127 = $125;
|
|
} else {
|
|
$127 = 0;
|
|
}
|
|
$126 = $127&1;
|
|
$inpanel = $126;
|
|
$128 = $1;
|
|
$129 = $win;
|
|
$130 = ((($129)) + 12|0);
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$130>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$130+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[$130+8>>2]|0;HEAP32[$$byval_copy6+12>>2]=HEAP32[$130+12>>2]|0;
|
|
$131 = (_nk_input_is_mouse_hovering_rect($128,$$byval_copy6)|0);
|
|
$ishovered = $131;
|
|
$132 = $win;
|
|
$133 = $1;
|
|
$134 = ((($133)) + 11164|0);
|
|
$135 = HEAP32[$134>>2]|0;
|
|
$136 = ($132|0)!=($135|0);
|
|
$137 = $ishovered;
|
|
$138 = ($137|0)!=(0);
|
|
$or$cond3 = $136 & $138;
|
|
L36: do {
|
|
if ($or$cond3) {
|
|
$139 = $win;
|
|
$140 = ((($139)) + 264|0);
|
|
$141 = HEAP32[$140>>2]|0;
|
|
$iter = $141;
|
|
while(1) {
|
|
$142 = $iter;
|
|
$143 = ($142|0)!=(0|0);
|
|
if (!($143)) {
|
|
break L36;
|
|
}
|
|
$144 = $iter;
|
|
$145 = ((($144)) + 8|0);
|
|
$146 = HEAP32[$145>>2]|0;
|
|
$147 = $146 & 4096;
|
|
$148 = ($147|0)!=(0);
|
|
$149 = $iter;
|
|
$150 = ((($149)) + 12|0);
|
|
$151 = +HEAPF32[$150>>2];
|
|
$152 = $win;
|
|
$153 = ((($152)) + 12|0);
|
|
$154 = +HEAPF32[$153>>2];
|
|
$155 = $win;
|
|
$156 = ((($155)) + 12|0);
|
|
$157 = ((($156)) + 8|0);
|
|
$158 = +HEAPF32[$157>>2];
|
|
$159 = $154 + $158;
|
|
$160 = $151 > $159;
|
|
do {
|
|
if ($148) {
|
|
if (!($160)) {
|
|
$206 = $iter;
|
|
$207 = ((($206)) + 12|0);
|
|
$208 = +HEAPF32[$207>>2];
|
|
$209 = $iter;
|
|
$210 = ((($209)) + 12|0);
|
|
$211 = ((($210)) + 8|0);
|
|
$212 = +HEAPF32[$211>>2];
|
|
$213 = $208 + $212;
|
|
$214 = $win;
|
|
$215 = ((($214)) + 12|0);
|
|
$216 = +HEAPF32[$215>>2];
|
|
$217 = $213 < $216;
|
|
if (!($217)) {
|
|
$218 = $iter;
|
|
$219 = ((($218)) + 12|0);
|
|
$220 = ((($219)) + 4|0);
|
|
$221 = +HEAPF32[$220>>2];
|
|
$222 = $win;
|
|
$223 = ((($222)) + 12|0);
|
|
$224 = ((($223)) + 4|0);
|
|
$225 = +HEAPF32[$224>>2];
|
|
$226 = $win;
|
|
$227 = ((($226)) + 12|0);
|
|
$228 = ((($227)) + 12|0);
|
|
$229 = +HEAPF32[$228>>2];
|
|
$230 = $225 + $229;
|
|
$231 = $221 > $230;
|
|
if ($231) {
|
|
break;
|
|
}
|
|
$232 = $iter;
|
|
$233 = ((($232)) + 12|0);
|
|
$234 = ((($233)) + 4|0);
|
|
$235 = +HEAPF32[$234>>2];
|
|
$236 = $h;
|
|
$237 = $235 + $236;
|
|
$238 = $win;
|
|
$239 = ((($238)) + 12|0);
|
|
$240 = ((($239)) + 4|0);
|
|
$241 = +HEAPF32[$240>>2];
|
|
$242 = $237 < $241;
|
|
if ($242) {
|
|
break;
|
|
}
|
|
$243 = $iter;
|
|
$244 = ((($243)) + 8|0);
|
|
$245 = HEAP32[$244>>2]|0;
|
|
$246 = $245 & 2048;
|
|
$247 = ($246|0)!=(0);
|
|
if (!($247)) {
|
|
break L36;
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
if (!($160)) {
|
|
$161 = $iter;
|
|
$162 = ((($161)) + 12|0);
|
|
$163 = +HEAPF32[$162>>2];
|
|
$164 = $iter;
|
|
$165 = ((($164)) + 12|0);
|
|
$166 = ((($165)) + 8|0);
|
|
$167 = +HEAPF32[$166>>2];
|
|
$168 = $163 + $167;
|
|
$169 = $win;
|
|
$170 = ((($169)) + 12|0);
|
|
$171 = +HEAPF32[$170>>2];
|
|
$172 = $168 < $171;
|
|
if (!($172)) {
|
|
$173 = $iter;
|
|
$174 = ((($173)) + 12|0);
|
|
$175 = ((($174)) + 4|0);
|
|
$176 = +HEAPF32[$175>>2];
|
|
$177 = $win;
|
|
$178 = ((($177)) + 12|0);
|
|
$179 = ((($178)) + 4|0);
|
|
$180 = +HEAPF32[$179>>2];
|
|
$181 = $win;
|
|
$182 = ((($181)) + 12|0);
|
|
$183 = ((($182)) + 12|0);
|
|
$184 = +HEAPF32[$183>>2];
|
|
$185 = $180 + $184;
|
|
$186 = $176 > $185;
|
|
if ($186) {
|
|
break;
|
|
}
|
|
$187 = $iter;
|
|
$188 = ((($187)) + 12|0);
|
|
$189 = ((($188)) + 4|0);
|
|
$190 = +HEAPF32[$189>>2];
|
|
$191 = $iter;
|
|
$192 = ((($191)) + 12|0);
|
|
$193 = ((($192)) + 12|0);
|
|
$194 = +HEAPF32[$193>>2];
|
|
$195 = $190 + $194;
|
|
$196 = $win;
|
|
$197 = ((($196)) + 12|0);
|
|
$198 = ((($197)) + 4|0);
|
|
$199 = +HEAPF32[$198>>2];
|
|
$200 = $195 < $199;
|
|
if ($200) {
|
|
break;
|
|
}
|
|
$201 = $iter;
|
|
$202 = ((($201)) + 8|0);
|
|
$203 = HEAP32[$202>>2]|0;
|
|
$204 = $203 & 2048;
|
|
$205 = ($204|0)!=(0);
|
|
if (!($205)) {
|
|
break L36;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$248 = $iter;
|
|
$249 = ((($248)) + 172|0);
|
|
$250 = HEAP32[$249>>2]|0;
|
|
$251 = ($250|0)!=(0|0);
|
|
do {
|
|
if ($251) {
|
|
$252 = $iter;
|
|
$253 = ((($252)) + 172|0);
|
|
$254 = ((($253)) + 12|0);
|
|
$255 = HEAP32[$254>>2]|0;
|
|
$256 = ($255|0)!=(0);
|
|
if ($256) {
|
|
$257 = $iter;
|
|
$258 = ((($257)) + 8|0);
|
|
$259 = HEAP32[$258>>2]|0;
|
|
$260 = $259 & 2048;
|
|
$261 = ($260|0)!=(0);
|
|
if ($261) {
|
|
break;
|
|
}
|
|
$262 = $iter;
|
|
$263 = ((($262)) + 172|0);
|
|
$264 = HEAP32[$263>>2]|0;
|
|
$265 = ((($264)) + 12|0);
|
|
$266 = +HEAPF32[$265>>2];
|
|
$267 = $win;
|
|
$268 = ((($267)) + 12|0);
|
|
$269 = +HEAPF32[$268>>2];
|
|
$270 = $win;
|
|
$271 = ((($270)) + 12|0);
|
|
$272 = ((($271)) + 8|0);
|
|
$273 = +HEAPF32[$272>>2];
|
|
$274 = $269 + $273;
|
|
$275 = $266 > $274;
|
|
if ($275) {
|
|
break;
|
|
}
|
|
$276 = $iter;
|
|
$277 = ((($276)) + 172|0);
|
|
$278 = HEAP32[$277>>2]|0;
|
|
$279 = ((($278)) + 12|0);
|
|
$280 = +HEAPF32[$279>>2];
|
|
$281 = $iter;
|
|
$282 = ((($281)) + 172|0);
|
|
$283 = HEAP32[$282>>2]|0;
|
|
$284 = ((($283)) + 12|0);
|
|
$285 = ((($284)) + 8|0);
|
|
$286 = +HEAPF32[$285>>2];
|
|
$287 = $280 + $286;
|
|
$288 = $win;
|
|
$289 = ((($288)) + 12|0);
|
|
$290 = +HEAPF32[$289>>2];
|
|
$291 = $287 < $290;
|
|
if ($291) {
|
|
break;
|
|
}
|
|
$292 = $iter;
|
|
$293 = ((($292)) + 172|0);
|
|
$294 = HEAP32[$293>>2]|0;
|
|
$295 = ((($294)) + 12|0);
|
|
$296 = ((($295)) + 4|0);
|
|
$297 = +HEAPF32[$296>>2];
|
|
$298 = $win;
|
|
$299 = ((($298)) + 12|0);
|
|
$300 = ((($299)) + 4|0);
|
|
$301 = +HEAPF32[$300>>2];
|
|
$302 = $win;
|
|
$303 = ((($302)) + 12|0);
|
|
$304 = ((($303)) + 12|0);
|
|
$305 = +HEAPF32[$304>>2];
|
|
$306 = $301 + $305;
|
|
$307 = $297 > $306;
|
|
if ($307) {
|
|
break;
|
|
}
|
|
$308 = $iter;
|
|
$309 = ((($308)) + 172|0);
|
|
$310 = HEAP32[$309>>2]|0;
|
|
$311 = ((($310)) + 12|0);
|
|
$312 = ((($311)) + 4|0);
|
|
$313 = +HEAPF32[$312>>2];
|
|
$314 = $iter;
|
|
$315 = ((($314)) + 172|0);
|
|
$316 = HEAP32[$315>>2]|0;
|
|
$317 = ((($316)) + 12|0);
|
|
$318 = ((($317)) + 12|0);
|
|
$319 = +HEAPF32[$318>>2];
|
|
$320 = $313 + $319;
|
|
$321 = $win;
|
|
$322 = ((($321)) + 12|0);
|
|
$323 = ((($322)) + 4|0);
|
|
$324 = +HEAPF32[$323>>2];
|
|
$325 = $320 < $324;
|
|
if (!($325)) {
|
|
break L36;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$326 = $iter;
|
|
$327 = ((($326)) + 264|0);
|
|
$328 = HEAP32[$327>>2]|0;
|
|
$iter = $328;
|
|
}
|
|
}
|
|
} while(0);
|
|
$329 = $iter;
|
|
$330 = ($329|0)!=(0|0);
|
|
$331 = $inpanel;
|
|
$332 = ($331|0)!=(0);
|
|
$or$cond5 = $330 & $332;
|
|
L62: do {
|
|
if ($or$cond5) {
|
|
$333 = $win;
|
|
$334 = $1;
|
|
$335 = ((($334)) + 11160|0);
|
|
$336 = HEAP32[$335>>2]|0;
|
|
$337 = ($333|0)!=($336|0);
|
|
if ($337) {
|
|
$338 = $win;
|
|
$339 = ((($338)) + 264|0);
|
|
$340 = HEAP32[$339>>2]|0;
|
|
$iter = $340;
|
|
while(1) {
|
|
$341 = $iter;
|
|
$342 = ($341|0)!=(0|0);
|
|
if (!($342)) {
|
|
break L62;
|
|
}
|
|
$343 = $iter;
|
|
$344 = ((($343)) + 8|0);
|
|
$345 = HEAP32[$344>>2]|0;
|
|
$346 = $345 & 4096;
|
|
$347 = ($346|0)!=(0);
|
|
$348 = $iter;
|
|
$349 = ((($348)) + 12|0);
|
|
$350 = +HEAPF32[$349>>2];
|
|
$351 = $1;
|
|
$352 = ((($351)) + 220|0);
|
|
$353 = ((($352)) + 48|0);
|
|
$354 = +HEAPF32[$353>>2];
|
|
$355 = $350 <= $354;
|
|
do {
|
|
if ($347) {
|
|
if (!($355)) {
|
|
break;
|
|
}
|
|
$399 = $1;
|
|
$400 = ((($399)) + 220|0);
|
|
$401 = ((($400)) + 48|0);
|
|
$402 = +HEAPF32[$401>>2];
|
|
$403 = $iter;
|
|
$404 = ((($403)) + 12|0);
|
|
$405 = +HEAPF32[$404>>2];
|
|
$406 = $iter;
|
|
$407 = ((($406)) + 12|0);
|
|
$408 = ((($407)) + 8|0);
|
|
$409 = +HEAPF32[$408>>2];
|
|
$410 = $405 + $409;
|
|
$411 = $402 <= $410;
|
|
if (!($411)) {
|
|
break;
|
|
}
|
|
$412 = $iter;
|
|
$413 = ((($412)) + 12|0);
|
|
$414 = ((($413)) + 4|0);
|
|
$415 = +HEAPF32[$414>>2];
|
|
$416 = $1;
|
|
$417 = ((($416)) + 220|0);
|
|
$418 = ((($417)) + 48|0);
|
|
$419 = ((($418)) + 4|0);
|
|
$420 = +HEAPF32[$419>>2];
|
|
$421 = $415 <= $420;
|
|
if (!($421)) {
|
|
break;
|
|
}
|
|
$422 = $1;
|
|
$423 = ((($422)) + 220|0);
|
|
$424 = ((($423)) + 48|0);
|
|
$425 = ((($424)) + 4|0);
|
|
$426 = +HEAPF32[$425>>2];
|
|
$427 = $iter;
|
|
$428 = ((($427)) + 12|0);
|
|
$429 = ((($428)) + 4|0);
|
|
$430 = +HEAPF32[$429>>2];
|
|
$431 = $h;
|
|
$432 = $430 + $431;
|
|
$433 = $426 <= $432;
|
|
if (!($433)) {
|
|
break;
|
|
}
|
|
$434 = $iter;
|
|
$435 = ((($434)) + 8|0);
|
|
$436 = HEAP32[$435>>2]|0;
|
|
$437 = $436 & 2048;
|
|
$438 = ($437|0)!=(0);
|
|
if (!($438)) {
|
|
break L62;
|
|
}
|
|
} else {
|
|
if (!($355)) {
|
|
break;
|
|
}
|
|
$356 = $1;
|
|
$357 = ((($356)) + 220|0);
|
|
$358 = ((($357)) + 48|0);
|
|
$359 = +HEAPF32[$358>>2];
|
|
$360 = $iter;
|
|
$361 = ((($360)) + 12|0);
|
|
$362 = +HEAPF32[$361>>2];
|
|
$363 = $iter;
|
|
$364 = ((($363)) + 12|0);
|
|
$365 = ((($364)) + 8|0);
|
|
$366 = +HEAPF32[$365>>2];
|
|
$367 = $362 + $366;
|
|
$368 = $359 <= $367;
|
|
if (!($368)) {
|
|
break;
|
|
}
|
|
$369 = $iter;
|
|
$370 = ((($369)) + 12|0);
|
|
$371 = ((($370)) + 4|0);
|
|
$372 = +HEAPF32[$371>>2];
|
|
$373 = $1;
|
|
$374 = ((($373)) + 220|0);
|
|
$375 = ((($374)) + 48|0);
|
|
$376 = ((($375)) + 4|0);
|
|
$377 = +HEAPF32[$376>>2];
|
|
$378 = $372 <= $377;
|
|
if (!($378)) {
|
|
break;
|
|
}
|
|
$379 = $1;
|
|
$380 = ((($379)) + 220|0);
|
|
$381 = ((($380)) + 48|0);
|
|
$382 = ((($381)) + 4|0);
|
|
$383 = +HEAPF32[$382>>2];
|
|
$384 = $iter;
|
|
$385 = ((($384)) + 12|0);
|
|
$386 = ((($385)) + 4|0);
|
|
$387 = +HEAPF32[$386>>2];
|
|
$388 = $iter;
|
|
$389 = ((($388)) + 12|0);
|
|
$390 = ((($389)) + 12|0);
|
|
$391 = +HEAPF32[$390>>2];
|
|
$392 = $387 + $391;
|
|
$393 = $383 <= $392;
|
|
if (!($393)) {
|
|
break;
|
|
}
|
|
$394 = $iter;
|
|
$395 = ((($394)) + 8|0);
|
|
$396 = HEAP32[$395>>2]|0;
|
|
$397 = $396 & 2048;
|
|
$398 = ($397|0)!=(0);
|
|
if (!($398)) {
|
|
break L62;
|
|
}
|
|
}
|
|
} while(0);
|
|
$439 = $iter;
|
|
$440 = ((($439)) + 172|0);
|
|
$441 = HEAP32[$440>>2]|0;
|
|
$442 = ($441|0)!=(0|0);
|
|
do {
|
|
if ($442) {
|
|
$443 = $iter;
|
|
$444 = ((($443)) + 172|0);
|
|
$445 = ((($444)) + 12|0);
|
|
$446 = HEAP32[$445>>2]|0;
|
|
$447 = ($446|0)!=(0);
|
|
if (!($447)) {
|
|
break;
|
|
}
|
|
$448 = $iter;
|
|
$449 = ((($448)) + 8|0);
|
|
$450 = HEAP32[$449>>2]|0;
|
|
$451 = $450 & 2048;
|
|
$452 = ($451|0)!=(0);
|
|
if ($452) {
|
|
break;
|
|
}
|
|
$453 = $iter;
|
|
$454 = ((($453)) + 172|0);
|
|
$455 = HEAP32[$454>>2]|0;
|
|
$456 = ((($455)) + 12|0);
|
|
$457 = +HEAPF32[$456>>2];
|
|
$458 = $win;
|
|
$459 = ((($458)) + 12|0);
|
|
$460 = +HEAPF32[$459>>2];
|
|
$461 = $win;
|
|
$462 = ((($461)) + 12|0);
|
|
$463 = ((($462)) + 8|0);
|
|
$464 = +HEAPF32[$463>>2];
|
|
$465 = $460 + $464;
|
|
$466 = $457 > $465;
|
|
if ($466) {
|
|
break;
|
|
}
|
|
$467 = $iter;
|
|
$468 = ((($467)) + 172|0);
|
|
$469 = HEAP32[$468>>2]|0;
|
|
$470 = ((($469)) + 12|0);
|
|
$471 = +HEAPF32[$470>>2];
|
|
$472 = $iter;
|
|
$473 = ((($472)) + 172|0);
|
|
$474 = HEAP32[$473>>2]|0;
|
|
$475 = ((($474)) + 12|0);
|
|
$476 = ((($475)) + 8|0);
|
|
$477 = +HEAPF32[$476>>2];
|
|
$478 = $471 + $477;
|
|
$479 = $win;
|
|
$480 = ((($479)) + 12|0);
|
|
$481 = +HEAPF32[$480>>2];
|
|
$482 = $478 < $481;
|
|
if ($482) {
|
|
break;
|
|
}
|
|
$483 = $iter;
|
|
$484 = ((($483)) + 172|0);
|
|
$485 = HEAP32[$484>>2]|0;
|
|
$486 = ((($485)) + 12|0);
|
|
$487 = ((($486)) + 4|0);
|
|
$488 = +HEAPF32[$487>>2];
|
|
$489 = $win;
|
|
$490 = ((($489)) + 12|0);
|
|
$491 = ((($490)) + 4|0);
|
|
$492 = +HEAPF32[$491>>2];
|
|
$493 = $win;
|
|
$494 = ((($493)) + 12|0);
|
|
$495 = ((($494)) + 12|0);
|
|
$496 = +HEAPF32[$495>>2];
|
|
$497 = $492 + $496;
|
|
$498 = $488 > $497;
|
|
if ($498) {
|
|
break;
|
|
}
|
|
$499 = $iter;
|
|
$500 = ((($499)) + 172|0);
|
|
$501 = HEAP32[$500>>2]|0;
|
|
$502 = ((($501)) + 12|0);
|
|
$503 = ((($502)) + 4|0);
|
|
$504 = +HEAPF32[$503>>2];
|
|
$505 = $iter;
|
|
$506 = ((($505)) + 172|0);
|
|
$507 = HEAP32[$506>>2]|0;
|
|
$508 = ((($507)) + 12|0);
|
|
$509 = ((($508)) + 12|0);
|
|
$510 = +HEAPF32[$509>>2];
|
|
$511 = $504 + $510;
|
|
$512 = $win;
|
|
$513 = ((($512)) + 12|0);
|
|
$514 = ((($513)) + 4|0);
|
|
$515 = +HEAPF32[$514>>2];
|
|
$516 = $511 < $515;
|
|
if (!($516)) {
|
|
break L62;
|
|
}
|
|
}
|
|
} while(0);
|
|
$517 = $iter;
|
|
$518 = ((($517)) + 264|0);
|
|
$519 = HEAP32[$518>>2]|0;
|
|
$iter = $519;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$520 = $iter;
|
|
$521 = ($520|0)!=(0|0);
|
|
if (!($521)) {
|
|
$522 = $1;
|
|
$523 = ((($522)) + 11160|0);
|
|
$524 = HEAP32[$523>>2]|0;
|
|
$525 = $win;
|
|
$526 = ($524|0)!=($525|0);
|
|
if ($526) {
|
|
$527 = $1;
|
|
$528 = $win;
|
|
_nk_remove_window($527,$528);
|
|
$529 = $1;
|
|
$530 = $win;
|
|
_nk_insert_window($529,$530);
|
|
$531 = $win;
|
|
$532 = ((($531)) + 8|0);
|
|
$533 = HEAP32[$532>>2]|0;
|
|
$534 = $533 & -1025;
|
|
HEAP32[$532>>2] = $534;
|
|
$535 = $win;
|
|
$536 = $1;
|
|
$537 = ((($536)) + 11164|0);
|
|
HEAP32[$537>>2] = $535;
|
|
}
|
|
}
|
|
$538 = $1;
|
|
$539 = ((($538)) + 11160|0);
|
|
$540 = HEAP32[$539>>2]|0;
|
|
$541 = $win;
|
|
$542 = ($540|0)!=($541|0);
|
|
if ($542) {
|
|
$543 = $win;
|
|
$544 = ((($543)) + 8|0);
|
|
$545 = HEAP32[$544>>2]|0;
|
|
$546 = $545 | 1024;
|
|
HEAP32[$544>>2] = $546;
|
|
}
|
|
}
|
|
}
|
|
$547 = $2;
|
|
$548 = $win;
|
|
$549 = ((($548)) + 72|0);
|
|
HEAP32[$549>>2] = $547;
|
|
$550 = $win;
|
|
$551 = $1;
|
|
$552 = ((($551)) + 11168|0);
|
|
HEAP32[$552>>2] = $550;
|
|
$553 = $1;
|
|
$554 = $3;
|
|
$555 = (_nk_panel_begin($553,$554)|0);
|
|
$ret = $555;
|
|
$556 = $win;
|
|
$557 = ((($556)) + 28|0);
|
|
$558 = $2;
|
|
$559 = ((($558)) + 20|0);
|
|
HEAP32[$559>>2] = $557;
|
|
$560 = $ret;
|
|
$0 = $560;
|
|
$561 = $0;
|
|
STACKTOP = sp;return ($561|0);
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$561 = $0;
|
|
STACKTOP = sp;return ($561|0);
|
|
}
|
|
function _nk_find_window($ctx,$hash) {
|
|
$ctx = $ctx|0;
|
|
$hash = $hash|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, $iter = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $ctx;
|
|
$2 = $hash;
|
|
$3 = $1;
|
|
$4 = ((($3)) + 11156|0);
|
|
$5 = HEAP32[$4>>2]|0;
|
|
$iter = $5;
|
|
while(1) {
|
|
$6 = $iter;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
label = 8;
|
|
break;
|
|
}
|
|
$8 = $iter;
|
|
$9 = $iter;
|
|
$10 = ((($9)) + 264|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = ($8|0)!=($11|0);
|
|
if (!($12)) {
|
|
label = 4;
|
|
break;
|
|
}
|
|
$13 = $iter;
|
|
$14 = ((($13)) + 4|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = $2;
|
|
$17 = ($15|0)==($16|0);
|
|
$18 = $iter;
|
|
if ($17) {
|
|
label = 6;
|
|
break;
|
|
}
|
|
$19 = ((($18)) + 264|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$iter = $20;
|
|
}
|
|
if ((label|0) == 4) {
|
|
___assert_fail((31198|0),(13400|0),14897,(31217|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 6) {
|
|
$0 = $18;
|
|
$21 = $0;
|
|
STACKTOP = sp;return ($21|0);
|
|
}
|
|
else if ((label|0) == 8) {
|
|
$0 = 0;
|
|
$21 = $0;
|
|
STACKTOP = sp;return ($21|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_create_window($ctx) {
|
|
$ctx = $ctx|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $elem = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $ctx;
|
|
$2 = $1;
|
|
$3 = (_nk_create_page_element($2)|0);
|
|
$elem = $3;
|
|
$4 = $elem;
|
|
$5 = ($4|0)!=(0|0);
|
|
if ($5) {
|
|
$6 = $1;
|
|
$7 = ((($6)) + 11180|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = $elem;
|
|
HEAP32[$9>>2] = $8;
|
|
$10 = $elem;
|
|
$0 = $10;
|
|
$11 = $0;
|
|
STACKTOP = sp;return ($11|0);
|
|
} else {
|
|
$0 = 0;
|
|
$11 = $0;
|
|
STACKTOP = sp;return ($11|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_insert_window($ctx,$win) {
|
|
$ctx = $ctx|0;
|
|
$win = $win|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $9 = 0;
|
|
var $end = 0, $iter = 0, $or$cond = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $win;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((14913|0),(13400|0),14910,(31321|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((28440|0),(13400|0),14911,(31321|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $1;
|
|
$7 = ($6|0)!=(0|0);
|
|
$8 = $0;
|
|
$9 = ($8|0)!=(0|0);
|
|
$or$cond = $7 & $9;
|
|
if (!($or$cond)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$10 = $0;
|
|
$11 = ((($10)) + 11156|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$iter = $12;
|
|
while(1) {
|
|
$13 = $iter;
|
|
$14 = ($13|0)!=(0|0);
|
|
if (!($14)) {
|
|
label = 14;
|
|
break;
|
|
}
|
|
$15 = $iter;
|
|
$16 = $iter;
|
|
$17 = ((($16)) + 264|0);
|
|
$18 = HEAP32[$17>>2]|0;
|
|
$19 = ($15|0)!=($18|0);
|
|
if (!($19)) {
|
|
label = 9;
|
|
break;
|
|
}
|
|
$20 = $iter;
|
|
$21 = $1;
|
|
$22 = ($20|0)!=($21|0);
|
|
if (!($22)) {
|
|
label = 11;
|
|
break;
|
|
}
|
|
$23 = $iter;
|
|
$24 = $1;
|
|
$25 = ($23|0)==($24|0);
|
|
if ($25) {
|
|
label = 17;
|
|
break;
|
|
}
|
|
$26 = $iter;
|
|
$27 = ((($26)) + 264|0);
|
|
$28 = HEAP32[$27>>2]|0;
|
|
$iter = $28;
|
|
}
|
|
if ((label|0) == 9) {
|
|
___assert_fail((31198|0),(13400|0),14916,(31321|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 11) {
|
|
___assert_fail((31338|0),(13400|0),14917,(31321|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 14) {
|
|
$29 = $0;
|
|
$30 = ((($29)) + 11156|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = ($31|0)!=(0|0);
|
|
if ($32) {
|
|
$45 = $0;
|
|
$46 = ((($45)) + 11160|0);
|
|
$47 = HEAP32[$46>>2]|0;
|
|
$end = $47;
|
|
$48 = $end;
|
|
$49 = ((($48)) + 8|0);
|
|
$50 = HEAP32[$49>>2]|0;
|
|
$51 = $50 | 1024;
|
|
HEAP32[$49>>2] = $51;
|
|
$52 = $1;
|
|
$53 = $end;
|
|
$54 = ((($53)) + 264|0);
|
|
HEAP32[$54>>2] = $52;
|
|
$55 = $0;
|
|
$56 = ((($55)) + 11160|0);
|
|
$57 = HEAP32[$56>>2]|0;
|
|
$58 = $1;
|
|
$59 = ((($58)) + 268|0);
|
|
HEAP32[$59>>2] = $57;
|
|
$60 = $1;
|
|
$61 = ((($60)) + 264|0);
|
|
HEAP32[$61>>2] = 0;
|
|
$62 = $1;
|
|
$63 = $0;
|
|
$64 = ((($63)) + 11160|0);
|
|
HEAP32[$64>>2] = $62;
|
|
$65 = $0;
|
|
$66 = ((($65)) + 11176|0);
|
|
$67 = HEAP32[$66>>2]|0;
|
|
$68 = (($67) + 1)|0;
|
|
HEAP32[$66>>2] = $68;
|
|
$69 = $0;
|
|
$70 = ((($69)) + 11160|0);
|
|
$71 = HEAP32[$70>>2]|0;
|
|
$72 = $0;
|
|
$73 = ((($72)) + 11164|0);
|
|
HEAP32[$73>>2] = $71;
|
|
$74 = $0;
|
|
$75 = ((($74)) + 11160|0);
|
|
$76 = HEAP32[$75>>2]|0;
|
|
$77 = ((($76)) + 8|0);
|
|
$78 = HEAP32[$77>>2]|0;
|
|
$79 = $78 & -1025;
|
|
HEAP32[$77>>2] = $79;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$33 = $1;
|
|
$34 = ((($33)) + 264|0);
|
|
HEAP32[$34>>2] = 0;
|
|
$35 = $1;
|
|
$36 = ((($35)) + 268|0);
|
|
HEAP32[$36>>2] = 0;
|
|
$37 = $1;
|
|
$38 = $0;
|
|
$39 = ((($38)) + 11156|0);
|
|
HEAP32[$39>>2] = $37;
|
|
$40 = $1;
|
|
$41 = $0;
|
|
$42 = ((($41)) + 11160|0);
|
|
HEAP32[$42>>2] = $40;
|
|
$43 = $0;
|
|
$44 = ((($43)) + 11176|0);
|
|
HEAP32[$44>>2] = 1;
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
else if ((label|0) == 17) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_command_buffer_init($cmdbuf,$buffer,$clip) {
|
|
$cmdbuf = $cmdbuf|0;
|
|
$buffer = $buffer|0;
|
|
$clip = $clip|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $cmdbuf;
|
|
$1 = $buffer;
|
|
$2 = $clip;
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((31350|0),(13400|0),4975,(31357|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((13445|0),(13400|0),4976,(31357|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $0;
|
|
$8 = ($7|0)!=(0|0);
|
|
$9 = $1;
|
|
$10 = ($9|0)!=(0|0);
|
|
$or$cond = $8 & $10;
|
|
if (!($or$cond)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$11 = $1;
|
|
$12 = $0;
|
|
HEAP32[$12>>2] = $11;
|
|
$13 = $2;
|
|
$14 = $0;
|
|
$15 = ((($14)) + 20|0);
|
|
HEAP32[$15>>2] = $13;
|
|
$16 = $1;
|
|
$17 = ((($16)) + 44|0);
|
|
$18 = HEAP32[$17>>2]|0;
|
|
$19 = $0;
|
|
$20 = ((($19)) + 28|0);
|
|
HEAP32[$20>>2] = $18;
|
|
$21 = $1;
|
|
$22 = ((($21)) + 44|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$24 = $0;
|
|
$25 = ((($24)) + 32|0);
|
|
HEAP32[$25>>2] = $23;
|
|
$26 = $1;
|
|
$27 = ((($26)) + 44|0);
|
|
$28 = HEAP32[$27>>2]|0;
|
|
$29 = $0;
|
|
$30 = ((($29)) + 36|0);
|
|
HEAP32[$30>>2] = $28;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_start($ctx,$win) {
|
|
$ctx = $ctx|0;
|
|
$win = $win|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $win;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((14913|0),(13400|0),14570,(31380|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((28440|0),(13400|0),14571,(31380|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $0;
|
|
$7 = ($6|0)!=(0|0);
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
$or$cond = $7 & $9;
|
|
if (!($or$cond)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$10 = $0;
|
|
$11 = ((($10)) + 5596|0);
|
|
$12 = ((($11)) + 44|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = $1;
|
|
$15 = ((($14)) + 32|0);
|
|
$16 = ((($15)) + 28|0);
|
|
HEAP32[$16>>2] = $13;
|
|
$17 = $1;
|
|
$18 = ((($17)) + 32|0);
|
|
$19 = ((($18)) + 28|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = $1;
|
|
$22 = ((($21)) + 32|0);
|
|
$23 = ((($22)) + 32|0);
|
|
HEAP32[$23>>2] = $20;
|
|
$24 = $1;
|
|
$25 = ((($24)) + 32|0);
|
|
$26 = ((($25)) + 28|0);
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = $1;
|
|
$29 = ((($28)) + 32|0);
|
|
$30 = ((($29)) + 36|0);
|
|
HEAP32[$30>>2] = $27;
|
|
$31 = $1;
|
|
$32 = ((($31)) + 32|0);
|
|
$33 = ((($32)) + 4|0);
|
|
;HEAP32[$33>>2]=HEAP32[8>>2]|0;HEAP32[$33+4>>2]=HEAP32[8+4>>2]|0;HEAP32[$33+8>>2]=HEAP32[8+8>>2]|0;HEAP32[$33+12>>2]=HEAP32[8+12>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_panel_begin($ctx,$title) {
|
|
$ctx = $ctx|0;
|
|
$title = $title|0;
|
|
var $$byval_copy = 0, $$byval_copy10 = 0, $$byval_copy12 = 0, $$byval_copy13 = 0, $$byval_copy14 = 0, $$byval_copy16 = 0, $$byval_copy17 = 0, $$byval_copy18 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $$byval_copy7 = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $1000 = 0;
|
|
var $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0.0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0.0, $1012 = 0.0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0;
|
|
var $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $103 = 0, $104 = 0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0.0, $114 = 0.0, $115 = 0;
|
|
var $116 = 0.0, $117 = 0.0, $118 = 0, $119 = 0.0, $12 = 0, $120 = 0, $121 = 0.0, $122 = 0.0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0.0, $136 = 0, $137 = 0, $138 = 0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0.0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0.0;
|
|
var $152 = 0.0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0.0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0.0, $164 = 0.0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0.0, $17 = 0;
|
|
var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0.0, $175 = 0.0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
|
|
var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0.0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
|
|
var $206 = 0.0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0.0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
|
|
var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0.0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0;
|
|
var $242 = 0, $243 = 0, $244 = 0, $245 = 0.0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0.0, $259 = 0, $26 = 0;
|
|
var $260 = 0.0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0.0, $268 = 0, $269 = 0, $27 = 0, $270 = 0.0, $271 = 0.0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0.0, $277 = 0, $278 = 0;
|
|
var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0.0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0.0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0.0, $295 = 0, $296 = 0;
|
|
var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0;
|
|
var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0;
|
|
var $332 = 0, $333 = 0, $334 = 0.0, $335 = 0, $336 = 0.0, $337 = 0.0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0;
|
|
var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0.0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0.0, $363 = 0.0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0;
|
|
var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0.0, $377 = 0.0, $378 = 0.0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0.0, $385 = 0, $386 = 0;
|
|
var $387 = 0.0, $388 = 0, $389 = 0.0, $39 = 0, $390 = 0.0, $391 = 0, $392 = 0.0, $393 = 0.0, $394 = 0.0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0.0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0.0, $403 = 0.0;
|
|
var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0.0, $412 = 0, $413 = 0, $414 = 0, $415 = 0.0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0.0, $421 = 0;
|
|
var $422 = 0, $423 = 0, $424 = 0.0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0.0, $43 = 0, $430 = 0.0, $431 = 0.0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0.0, $439 = 0.0, $44 = 0;
|
|
var $440 = 0, $441 = 0, $442 = 0.0, $443 = 0.0, $444 = 0, $445 = 0, $446 = 0.0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0.0, $451 = 0.0, $452 = 0, $453 = 0, $454 = 0.0, $455 = 0.0, $456 = 0, $457 = 0, $458 = 0;
|
|
var $459 = 0, $46 = 0, $460 = 0.0, $461 = 0, $462 = 0.0, $463 = 0, $464 = 0.0, $465 = 0.0, $466 = 0.0, $467 = 0.0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0.0, $473 = 0, $474 = 0, $475 = 0.0, $476 = 0.0;
|
|
var $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0;
|
|
var $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0;
|
|
var $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0.0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0.0, $521 = 0, $522 = 0, $523 = 0, $524 = 0.0, $525 = 0, $526 = 0, $527 = 0.0, $528 = 0, $529 = 0, $53 = 0;
|
|
var $530 = 0, $531 = 0.0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0.0, $537 = 0.0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0.0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0.0, $547 = 0.0, $548 = 0.0;
|
|
var $549 = 0, $55 = 0, $550 = 0, $551 = 0.0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0.0, $565 = 0.0, $566 = 0.0;
|
|
var $567 = 0, $568 = 0.0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0.0, $573 = 0.0, $574 = 0.0, $575 = 0, $576 = 0.0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0.0, $581 = 0.0, $582 = 0, $583 = 0, $584 = 0;
|
|
var $585 = 0.0, $586 = 0.0, $587 = 0, $588 = 0.0, $589 = 0.0, $59 = 0, $590 = 0.0, $591 = 0, $592 = 0, $593 = 0, $594 = 0.0, $595 = 0.0, $596 = 0, $597 = 0.0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0.0;
|
|
var $602 = 0.0, $603 = 0, $604 = 0, $605 = 0, $606 = 0.0, $607 = 0.0, $608 = 0.0, $609 = 0.0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0;
|
|
var $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0.0, $638 = 0.0;
|
|
var $639 = 0.0, $64 = 0, $640 = 0, $641 = 0.0, $642 = 0.0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0.0, $652 = 0.0, $653 = 0.0, $654 = 0, $655 = 0, $656 = 0;
|
|
var $657 = 0.0, $658 = 0, $659 = 0.0, $66 = 0, $660 = 0.0, $661 = 0, $662 = 0.0, $663 = 0, $664 = 0, $665 = 0, $666 = 0.0, $667 = 0.0, $668 = 0, $669 = 0.0, $67 = 0, $670 = 0.0, $671 = 0.0, $672 = 0, $673 = 0.0, $674 = 0;
|
|
var $675 = 0, $676 = 0, $677 = 0.0, $678 = 0.0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0.0, $683 = 0.0, $684 = 0.0, $685 = 0.0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0;
|
|
var $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0;
|
|
var $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0.0, $725 = 0, $726 = 0, $727 = 0.0, $728 = 0.0;
|
|
var $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0.0, $733 = 0.0, $734 = 0, $735 = 0, $736 = 0, $737 = 0.0, $738 = 0.0, $739 = 0.0, $74 = 0, $740 = 0, $741 = 0.0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0.0;
|
|
var $747 = 0.0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0.0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0.0, $757 = 0.0, $758 = 0.0, $759 = 0, $76 = 0, $760 = 0.0, $761 = 0, $762 = 0, $763 = 0, $764 = 0.0;
|
|
var $765 = 0.0, $766 = 0.0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0.0;
|
|
var $783 = 0.0, $784 = 0, $785 = 0, $786 = 0, $787 = 0.0, $788 = 0.0, $789 = 0, $79 = 0.0, $790 = 0, $791 = 0, $792 = 0.0, $793 = 0.0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0;
|
|
var $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0.0, $805 = 0, $806 = 0, $807 = 0, $808 = 0.0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0.0, $813 = 0, $814 = 0, $815 = 0, $816 = 0.0, $817 = 0, $818 = 0;
|
|
var $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0.0, $83 = 0.0, $830 = 0.0, $831 = 0, $832 = 0.0, $833 = 0.0, $834 = 0, $835 = 0, $836 = 0.0;
|
|
var $837 = 0, $838 = 0.0, $839 = 0.0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0.0, $854 = 0;
|
|
var $855 = 0, $856 = 0, $857 = 0.0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0.0, $862 = 0, $863 = 0, $864 = 0, $865 = 0.0, $866 = 0, $867 = 0.0, $868 = 0.0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0;
|
|
var $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0.0, $88 = 0.0, $880 = 0.0, $881 = 0.0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0.0, $887 = 0.0, $888 = 0.0, $889 = 0.0, $89 = 0, $890 = 0;
|
|
var $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0.0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0.0, $905 = 0, $906 = 0, $907 = 0.0, $908 = 0;
|
|
var $909 = 0, $91 = 0, $910 = 0.0, $911 = 0.0, $912 = 0.0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0.0, $920 = 0.0, $921 = 0.0, $922 = 0, $923 = 0, $924 = 0, $925 = 0.0, $926 = 0.0;
|
|
var $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0.0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0;
|
|
var $945 = 0, $946 = 0.0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0.0, $952 = 0.0, $953 = 0, $954 = 0, $955 = 0, $956 = 0.0, $957 = 0.0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0;
|
|
var $963 = 0.0, $964 = 0, $965 = 0, $966 = 0, $967 = 0.0, $968 = 0, $969 = 0, $97 = 0, $970 = 0.0, $971 = 0, $972 = 0, $973 = 0, $974 = 0.0, $975 = 0.0, $976 = 0, $977 = 0, $978 = 0, $979 = 0.0, $98 = 0, $980 = 0;
|
|
var $981 = 0, $982 = 0, $983 = 0.0, $984 = 0.0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0.0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0.0, $997 = 0, $998 = 0, $999 = 0;
|
|
var $background = 0, $body = 0, $body$byval_copy = 0, $body$byval_copy15 = 0, $button = 0, $button$byval_copy = 0, $button$byval_copy11 = 0, $clip = 0, $clip$byval_copy = 0, $font = 0, $header = 0, $header$byval_copy = 0, $header$byval_copy8 = 0, $header_active = 0, $in = 0, $item_spacing = 0, $label = 0, $label$byval_copy = 0, $layout = 0, $left_mouse_click_in_cursor = 0;
|
|
var $left_mouse_down = 0, $move = 0, $move$byval_copy = 0, $or$cond = 0, $out = 0, $scaler_size = 0, $scrollbar_size = 0, $style = 0, $t = 0.0, $text = 0, $text_len = 0, $win = 0, $window_padding = 0, $ws = 0, $ws1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 736|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$clip$byval_copy = sp + 688|0;
|
|
$$byval_copy18 = sp + 720|0;
|
|
$$byval_copy17 = sp + 672|0;
|
|
$$byval_copy16 = sp + 716|0;
|
|
$body$byval_copy15 = sp + 656|0;
|
|
$body$byval_copy = sp + 640|0;
|
|
$$byval_copy14 = sp + 712|0;
|
|
$$byval_copy13 = sp + 624|0;
|
|
$label$byval_copy = sp + 608|0;
|
|
$$byval_copy12 = sp + 600|0;
|
|
$button$byval_copy11 = sp + 584|0;
|
|
$button$byval_copy = sp + 568|0;
|
|
$$byval_copy10 = sp + 708|0;
|
|
$$byval_copy9 = sp + 552|0;
|
|
$header$byval_copy8 = sp + 536|0;
|
|
$header$byval_copy = sp + 520|0;
|
|
$$byval_copy7 = sp + 504|0;
|
|
$$byval_copy6 = sp + 488|0;
|
|
$$byval_copy5 = sp + 472|0;
|
|
$$byval_copy4 = sp + 456|0;
|
|
$$byval_copy3 = sp + 440|0;
|
|
$$byval_copy2 = sp + 424|0;
|
|
$$byval_copy = sp + 408|0;
|
|
$move$byval_copy = sp + 392|0;
|
|
$scrollbar_size = sp + 344|0;
|
|
$item_spacing = sp + 336|0;
|
|
$window_padding = sp + 328|0;
|
|
$scaler_size = sp + 320|0;
|
|
$move = sp + 296|0;
|
|
$3 = sp + 280|0;
|
|
$4 = sp + 264|0;
|
|
$5 = sp + 248|0;
|
|
$6 = sp + 232|0;
|
|
$7 = sp + 216|0;
|
|
$8 = sp + 200|0;
|
|
$9 = sp + 184|0;
|
|
$header = sp + 168|0;
|
|
$button = sp + 152|0;
|
|
$text = sp + 136|0;
|
|
$10 = sp + 704|0;
|
|
$11 = sp + 112|0;
|
|
$ws = sp + 104|0;
|
|
$ws1 = sp + 100|0;
|
|
$label = sp + 80|0;
|
|
$12 = sp + 64|0;
|
|
$13 = sp + 48|0;
|
|
$body = sp + 32|0;
|
|
$14 = sp + 16|0;
|
|
$clip = sp;
|
|
$1 = $ctx;
|
|
$2 = $title;
|
|
$header_active = 0;
|
|
$15 = $1;
|
|
$16 = ($15|0)!=(0|0);
|
|
if (!($16)) {
|
|
___assert_fail((14913|0),(13400|0),15475,(31389|0));
|
|
// unreachable;
|
|
}
|
|
$17 = $1;
|
|
$18 = ((($17)) + 11168|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = ($19|0)!=(0|0);
|
|
if (!($20)) {
|
|
___assert_fail((28537|0),(13400|0),15476,(31389|0));
|
|
// unreachable;
|
|
}
|
|
$21 = $1;
|
|
$22 = ((($21)) + 11168|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$24 = ((($23)) + 72|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = ($25|0)!=(0|0);
|
|
if (!($26)) {
|
|
___assert_fail((28516|0),(13400|0),15477,(31389|0));
|
|
// unreachable;
|
|
}
|
|
$27 = $1;
|
|
$28 = ($27|0)!=(0|0);
|
|
if ($28) {
|
|
$29 = $1;
|
|
$30 = ((($29)) + 11168|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = ($31|0)!=(0|0);
|
|
if ($32) {
|
|
$33 = $1;
|
|
$34 = ((($33)) + 11168|0);
|
|
$35 = HEAP32[$34>>2]|0;
|
|
$36 = ((($35)) + 72|0);
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$38 = ($37|0)!=(0|0);
|
|
if ($38) {
|
|
$39 = $1;
|
|
$40 = ((($39)) + 300|0);
|
|
$style = $40;
|
|
$41 = $style;
|
|
$font = $41;
|
|
$42 = $1;
|
|
$in = $42;
|
|
$43 = $1;
|
|
$44 = ((($43)) + 11168|0);
|
|
$45 = HEAP32[$44>>2]|0;
|
|
$win = $45;
|
|
$46 = $win;
|
|
$47 = ((($46)) + 72|0);
|
|
$48 = HEAP32[$47>>2]|0;
|
|
$layout = $48;
|
|
$49 = $style;
|
|
$50 = ((($49)) + 4784|0);
|
|
$51 = ((($50)) + 496|0);
|
|
;HEAP32[$scrollbar_size>>2]=HEAP32[$51>>2]|0;HEAP32[$scrollbar_size+4>>2]=HEAP32[$51+4>>2]|0;
|
|
$52 = $style;
|
|
$53 = ((($52)) + 4784|0);
|
|
$54 = ((($53)) + 480|0);
|
|
;HEAP32[$window_padding>>2]=HEAP32[$54>>2]|0;HEAP32[$window_padding+4>>2]=HEAP32[$54+4>>2]|0;
|
|
$55 = $style;
|
|
$56 = ((($55)) + 4784|0);
|
|
$57 = ((($56)) + 488|0);
|
|
;HEAP32[$item_spacing>>2]=HEAP32[$57>>2]|0;HEAP32[$item_spacing+4>>2]=HEAP32[$57+4>>2]|0;
|
|
$58 = $style;
|
|
$59 = ((($58)) + 4784|0);
|
|
$60 = ((($59)) + 472|0);
|
|
;HEAP32[$scaler_size>>2]=HEAP32[$60>>2]|0;HEAP32[$scaler_size+4>>2]=HEAP32[$60+4>>2]|0;
|
|
$61 = $layout;
|
|
_nk_zero($61,356);
|
|
$62 = $win;
|
|
$63 = ((($62)) + 8|0);
|
|
$64 = HEAP32[$63>>2]|0;
|
|
$65 = $64 & 2048;
|
|
$66 = ($65|0)!=(0);
|
|
if ($66) {
|
|
$0 = 0;
|
|
$1024 = $0;
|
|
STACKTOP = sp;return ($1024|0);
|
|
}
|
|
$67 = $win;
|
|
$68 = ((($67)) + 8|0);
|
|
$69 = HEAP32[$68>>2]|0;
|
|
$70 = $69 & 4;
|
|
$71 = ($70|0)!=(0);
|
|
if ($71) {
|
|
$72 = $1;
|
|
$73 = ((($72)) + 11164|0);
|
|
$74 = HEAP32[$73>>2]|0;
|
|
$75 = $win;
|
|
$76 = ($74|0)==($75|0);
|
|
if ($76) {
|
|
$77 = $win;
|
|
$78 = ((($77)) + 12|0);
|
|
$79 = +HEAPF32[$78>>2];
|
|
HEAPF32[$move>>2] = $79;
|
|
$80 = $win;
|
|
$81 = ((($80)) + 12|0);
|
|
$82 = ((($81)) + 4|0);
|
|
$83 = +HEAPF32[$82>>2];
|
|
$84 = ((($move)) + 4|0);
|
|
HEAPF32[$84>>2] = $83;
|
|
$85 = $win;
|
|
$86 = ((($85)) + 12|0);
|
|
$87 = ((($86)) + 8|0);
|
|
$88 = +HEAPF32[$87>>2];
|
|
$89 = ((($move)) + 8|0);
|
|
HEAPF32[$89>>2] = $88;
|
|
$90 = $layout;
|
|
$91 = ((($90)) + 48|0);
|
|
$92 = +HEAPF32[$91>>2];
|
|
$93 = ((($move)) + 12|0);
|
|
HEAPF32[$93>>2] = $92;
|
|
$94 = $win;
|
|
$95 = $2;
|
|
$96 = (_nk_window_has_header($94,$95)|0);
|
|
$97 = ($96|0)!=(0);
|
|
if ($97) {
|
|
$98 = $font;
|
|
$99 = ((($98)) + 4|0);
|
|
$100 = +HEAPF32[$99>>2];
|
|
$101 = $style;
|
|
$102 = ((($101)) + 4784|0);
|
|
$103 = ((($102)) + 344|0);
|
|
$104 = ((($103)) + 4|0);
|
|
$105 = +HEAPF32[$104>>2];
|
|
$106 = 2.0 * $105;
|
|
$107 = $100 + $106;
|
|
$108 = ((($move)) + 12|0);
|
|
HEAPF32[$108>>2] = $107;
|
|
$109 = $style;
|
|
$110 = ((($109)) + 4784|0);
|
|
$111 = ((($110)) + 352|0);
|
|
$112 = ((($111)) + 4|0);
|
|
$113 = +HEAPF32[$112>>2];
|
|
$114 = 2.0 * $113;
|
|
$115 = ((($move)) + 12|0);
|
|
$116 = +HEAPF32[$115>>2];
|
|
$117 = $116 + $114;
|
|
HEAPF32[$115>>2] = $117;
|
|
} else {
|
|
$118 = ((($window_padding)) + 4|0);
|
|
$119 = +HEAPF32[$118>>2];
|
|
$120 = ((($item_spacing)) + 4|0);
|
|
$121 = +HEAPF32[$120>>2];
|
|
$122 = $119 + $121;
|
|
$123 = ((($move)) + 12|0);
|
|
HEAPF32[$123>>2] = $122;
|
|
}
|
|
$124 = $in;
|
|
$125 = ((($124)) + 220|0);
|
|
$126 = HEAP32[$125>>2]|0;
|
|
$left_mouse_down = $126;
|
|
$127 = $in;
|
|
;HEAP32[$move$byval_copy>>2]=HEAP32[$move>>2]|0;HEAP32[$move$byval_copy+4>>2]=HEAP32[$move+4>>2]|0;HEAP32[$move$byval_copy+8>>2]=HEAP32[$move+8>>2]|0;HEAP32[$move$byval_copy+12>>2]=HEAP32[$move+12>>2]|0;
|
|
$128 = (_nk_input_has_mouse_click_down_in_rect($127,0,$move$byval_copy,1)|0);
|
|
$left_mouse_click_in_cursor = $128;
|
|
$129 = $left_mouse_down;
|
|
$130 = ($129|0)!=(0);
|
|
$131 = $left_mouse_click_in_cursor;
|
|
$132 = ($131|0)!=(0);
|
|
$or$cond = $130 & $132;
|
|
if ($or$cond) {
|
|
$133 = $win;
|
|
$134 = ((($133)) + 12|0);
|
|
$135 = +HEAPF32[$134>>2];
|
|
$136 = $in;
|
|
$137 = ((($136)) + 220|0);
|
|
$138 = ((($137)) + 64|0);
|
|
$139 = +HEAPF32[$138>>2];
|
|
$140 = $135 + $139;
|
|
$141 = $win;
|
|
$142 = ((($141)) + 12|0);
|
|
HEAPF32[$142>>2] = $140;
|
|
$143 = $win;
|
|
$144 = ((($143)) + 12|0);
|
|
$145 = ((($144)) + 4|0);
|
|
$146 = +HEAPF32[$145>>2];
|
|
$147 = $in;
|
|
$148 = ((($147)) + 220|0);
|
|
$149 = ((($148)) + 64|0);
|
|
$150 = ((($149)) + 4|0);
|
|
$151 = +HEAPF32[$150>>2];
|
|
$152 = $146 + $151;
|
|
$153 = $win;
|
|
$154 = ((($153)) + 12|0);
|
|
$155 = ((($154)) + 4|0);
|
|
HEAPF32[$155>>2] = $152;
|
|
$156 = $in;
|
|
$157 = ((($156)) + 220|0);
|
|
$158 = ((($157)) + 64|0);
|
|
$159 = +HEAPF32[$158>>2];
|
|
$160 = $in;
|
|
$161 = ((($160)) + 220|0);
|
|
$162 = ((($161)) + 8|0);
|
|
$163 = +HEAPF32[$162>>2];
|
|
$164 = $163 + $159;
|
|
HEAPF32[$162>>2] = $164;
|
|
$165 = $in;
|
|
$166 = ((($165)) + 220|0);
|
|
$167 = ((($166)) + 64|0);
|
|
$168 = ((($167)) + 4|0);
|
|
$169 = +HEAPF32[$168>>2];
|
|
$170 = $in;
|
|
$171 = ((($170)) + 220|0);
|
|
$172 = ((($171)) + 8|0);
|
|
$173 = ((($172)) + 4|0);
|
|
$174 = +HEAPF32[$173>>2];
|
|
$175 = $174 + $169;
|
|
HEAPF32[$173>>2] = $175;
|
|
}
|
|
}
|
|
}
|
|
$176 = $win;
|
|
$177 = ((($176)) + 8|0);
|
|
$178 = HEAP32[$177>>2]|0;
|
|
$179 = $178 & 1;
|
|
$180 = ($179|0)!=(0);
|
|
do {
|
|
if ($180) {
|
|
$181 = $win;
|
|
$182 = ((($181)) + 8|0);
|
|
$183 = HEAP32[$182>>2]|0;
|
|
$184 = $183 & 8192;
|
|
$185 = ($184|0)!=(0);
|
|
if (!($185)) {
|
|
$186 = $layout;
|
|
$187 = ((($186)) + 4|0);
|
|
$188 = $win;
|
|
$189 = ((($188)) + 12|0);
|
|
$190 = $style;
|
|
$191 = ((($190)) + 4784|0);
|
|
$192 = ((($191)) + 444|0);
|
|
$193 = +HEAPF32[$192>>2];
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$189>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$189+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$189+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$189+12>>2]|0;
|
|
_nk_shrink_rect($3,$$byval_copy,$193);
|
|
;HEAP32[$187>>2]=HEAP32[$3>>2]|0;HEAP32[$187+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$187+8>>2]=HEAP32[$3+8>>2]|0;HEAP32[$187+12>>2]=HEAP32[$3+12>>2]|0;
|
|
break;
|
|
}
|
|
$194 = $win;
|
|
$195 = ((($194)) + 8|0);
|
|
$196 = HEAP32[$195>>2]|0;
|
|
$197 = $196 & 262144;
|
|
$198 = ($197|0)!=(0);
|
|
if ($198) {
|
|
$199 = $layout;
|
|
$200 = ((($199)) + 4|0);
|
|
$201 = $win;
|
|
$202 = ((($201)) + 12|0);
|
|
$203 = $style;
|
|
$204 = ((($203)) + 4784|0);
|
|
$205 = ((($204)) + 448|0);
|
|
$206 = +HEAPF32[$205>>2];
|
|
;HEAP32[$$byval_copy2>>2]=HEAP32[$202>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$202+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$202+8>>2]|0;HEAP32[$$byval_copy2+12>>2]=HEAP32[$202+12>>2]|0;
|
|
_nk_shrink_rect($4,$$byval_copy2,$206);
|
|
;HEAP32[$200>>2]=HEAP32[$4>>2]|0;HEAP32[$200+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$200+8>>2]=HEAP32[$4+8>>2]|0;HEAP32[$200+12>>2]=HEAP32[$4+12>>2]|0;
|
|
break;
|
|
}
|
|
$207 = $win;
|
|
$208 = ((($207)) + 8|0);
|
|
$209 = HEAP32[$208>>2]|0;
|
|
$210 = $209 & 131072;
|
|
$211 = ($210|0)!=(0);
|
|
if ($211) {
|
|
$212 = $layout;
|
|
$213 = ((($212)) + 4|0);
|
|
$214 = $win;
|
|
$215 = ((($214)) + 12|0);
|
|
$216 = $style;
|
|
$217 = ((($216)) + 4784|0);
|
|
$218 = ((($217)) + 452|0);
|
|
$219 = +HEAPF32[$218>>2];
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$215>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$215+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$215+8>>2]|0;HEAP32[$$byval_copy3+12>>2]=HEAP32[$215+12>>2]|0;
|
|
_nk_shrink_rect($5,$$byval_copy3,$219);
|
|
;HEAP32[$213>>2]=HEAP32[$5>>2]|0;HEAP32[$213+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$213+8>>2]=HEAP32[$5+8>>2]|0;HEAP32[$213+12>>2]=HEAP32[$5+12>>2]|0;
|
|
break;
|
|
}
|
|
$220 = $win;
|
|
$221 = ((($220)) + 8|0);
|
|
$222 = HEAP32[$221>>2]|0;
|
|
$223 = $222 & 524288;
|
|
$224 = ($223|0)!=(0);
|
|
if ($224) {
|
|
$225 = $layout;
|
|
$226 = ((($225)) + 4|0);
|
|
$227 = $win;
|
|
$228 = ((($227)) + 12|0);
|
|
$229 = $style;
|
|
$230 = ((($229)) + 4784|0);
|
|
$231 = ((($230)) + 456|0);
|
|
$232 = +HEAPF32[$231>>2];
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$228>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$228+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$228+8>>2]|0;HEAP32[$$byval_copy4+12>>2]=HEAP32[$228+12>>2]|0;
|
|
_nk_shrink_rect($6,$$byval_copy4,$232);
|
|
;HEAP32[$226>>2]=HEAP32[$6>>2]|0;HEAP32[$226+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$226+8>>2]=HEAP32[$6+8>>2]|0;HEAP32[$226+12>>2]=HEAP32[$6+12>>2]|0;
|
|
break;
|
|
}
|
|
$233 = $win;
|
|
$234 = ((($233)) + 8|0);
|
|
$235 = HEAP32[$234>>2]|0;
|
|
$236 = $235 & 16384;
|
|
$237 = ($236|0)!=(0);
|
|
if ($237) {
|
|
$238 = $layout;
|
|
$239 = ((($238)) + 4|0);
|
|
$240 = $win;
|
|
$241 = ((($240)) + 12|0);
|
|
$242 = $style;
|
|
$243 = ((($242)) + 4784|0);
|
|
$244 = ((($243)) + 460|0);
|
|
$245 = +HEAPF32[$244>>2];
|
|
;HEAP32[$$byval_copy5>>2]=HEAP32[$241>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$241+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$241+8>>2]|0;HEAP32[$$byval_copy5+12>>2]=HEAP32[$241+12>>2]|0;
|
|
_nk_shrink_rect($7,$$byval_copy5,$245);
|
|
;HEAP32[$239>>2]=HEAP32[$7>>2]|0;HEAP32[$239+4>>2]=HEAP32[$7+4>>2]|0;HEAP32[$239+8>>2]=HEAP32[$7+8>>2]|0;HEAP32[$239+12>>2]=HEAP32[$7+12>>2]|0;
|
|
break;
|
|
}
|
|
$246 = $win;
|
|
$247 = ((($246)) + 8|0);
|
|
$248 = HEAP32[$247>>2]|0;
|
|
$249 = $248 & 1048576;
|
|
$250 = ($249|0)!=(0);
|
|
$251 = $layout;
|
|
$252 = ((($251)) + 4|0);
|
|
$253 = $win;
|
|
$254 = ((($253)) + 12|0);
|
|
$255 = $style;
|
|
$256 = ((($255)) + 4784|0);
|
|
if ($250) {
|
|
$257 = ((($256)) + 464|0);
|
|
$258 = +HEAPF32[$257>>2];
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$254>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$254+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[$254+8>>2]|0;HEAP32[$$byval_copy6+12>>2]=HEAP32[$254+12>>2]|0;
|
|
_nk_shrink_rect($8,$$byval_copy6,$258);
|
|
;HEAP32[$252>>2]=HEAP32[$8>>2]|0;HEAP32[$252+4>>2]=HEAP32[$8+4>>2]|0;HEAP32[$252+8>>2]=HEAP32[$8+8>>2]|0;HEAP32[$252+12>>2]=HEAP32[$8+12>>2]|0;
|
|
break;
|
|
} else {
|
|
$259 = ((($256)) + 444|0);
|
|
$260 = +HEAPF32[$259>>2];
|
|
;HEAP32[$$byval_copy7>>2]=HEAP32[$254>>2]|0;HEAP32[$$byval_copy7+4>>2]=HEAP32[$254+4>>2]|0;HEAP32[$$byval_copy7+8>>2]=HEAP32[$254+8>>2]|0;HEAP32[$$byval_copy7+12>>2]=HEAP32[$254+12>>2]|0;
|
|
_nk_shrink_rect($9,$$byval_copy7,$260);
|
|
;HEAP32[$252>>2]=HEAP32[$9>>2]|0;HEAP32[$252+4>>2]=HEAP32[$9+4>>2]|0;HEAP32[$252+8>>2]=HEAP32[$9+8>>2]|0;HEAP32[$252+12>>2]=HEAP32[$9+12>>2]|0;
|
|
break;
|
|
}
|
|
} else {
|
|
$261 = $layout;
|
|
$262 = ((($261)) + 4|0);
|
|
$263 = $win;
|
|
$264 = ((($263)) + 12|0);
|
|
;HEAP32[$262>>2]=HEAP32[$264>>2]|0;HEAP32[$262+4>>2]=HEAP32[$264+4>>2]|0;HEAP32[$262+8>>2]=HEAP32[$264+8>>2]|0;HEAP32[$262+12>>2]=HEAP32[$264+12>>2]|0;
|
|
}
|
|
} while(0);
|
|
$265 = $layout;
|
|
$266 = ((($265)) + 4|0);
|
|
$267 = +HEAPF32[$266>>2];
|
|
$268 = $win;
|
|
$269 = ((($268)) + 12|0);
|
|
$270 = +HEAPF32[$269>>2];
|
|
$271 = $267 - $270;
|
|
$272 = $layout;
|
|
$273 = ((($272)) + 52|0);
|
|
HEAPF32[$273>>2] = $271;
|
|
$274 = $layout;
|
|
$275 = ((($274)) + 4|0);
|
|
$276 = +HEAPF32[$275>>2];
|
|
$277 = $layout;
|
|
$278 = ((($277)) + 24|0);
|
|
HEAPF32[$278>>2] = $276;
|
|
$279 = $layout;
|
|
$280 = ((($279)) + 4|0);
|
|
$281 = ((($280)) + 4|0);
|
|
$282 = +HEAPF32[$281>>2];
|
|
$283 = $layout;
|
|
$284 = ((($283)) + 28|0);
|
|
HEAPF32[$284>>2] = $282;
|
|
$285 = $layout;
|
|
$286 = ((($285)) + 4|0);
|
|
$287 = ((($286)) + 8|0);
|
|
$288 = +HEAPF32[$287>>2];
|
|
$289 = $layout;
|
|
$290 = ((($289)) + 36|0);
|
|
HEAPF32[$290>>2] = $288;
|
|
$291 = $layout;
|
|
$292 = ((($291)) + 4|0);
|
|
$293 = ((($292)) + 12|0);
|
|
$294 = +HEAPF32[$293>>2];
|
|
$295 = $layout;
|
|
$296 = ((($295)) + 40|0);
|
|
HEAPF32[$296>>2] = $294;
|
|
$297 = $layout;
|
|
$298 = ((($297)) + 32|0);
|
|
HEAPF32[$298>>2] = 0.0;
|
|
$299 = $layout;
|
|
$300 = ((($299)) + 92|0);
|
|
$301 = ((($300)) + 4|0);
|
|
HEAP32[$301>>2] = 0;
|
|
$302 = $layout;
|
|
$303 = ((($302)) + 92|0);
|
|
$304 = ((($303)) + 12|0);
|
|
HEAP32[$304>>2] = 0;
|
|
$305 = $layout;
|
|
$306 = ((($305)) + 92|0);
|
|
$307 = ((($306)) + 8|0);
|
|
HEAPF32[$307>>2] = 0.0;
|
|
$308 = $layout;
|
|
$309 = ((($308)) + 92|0);
|
|
$310 = ((($309)) + 16|0);
|
|
HEAP32[$310>>2] = 0;
|
|
$311 = $layout;
|
|
$312 = ((($311)) + 92|0);
|
|
$313 = ((($312)) + 20|0);
|
|
HEAPF32[$313>>2] = 0.0;
|
|
$314 = $layout;
|
|
$315 = ((($314)) + 92|0);
|
|
$316 = ((($315)) + 52|0);
|
|
HEAP32[$316>>2] = 0;
|
|
$317 = $win;
|
|
$318 = ((($317)) + 8|0);
|
|
$319 = HEAP32[$318>>2]|0;
|
|
$320 = $layout;
|
|
HEAP32[$320>>2] = $319;
|
|
$321 = $win;
|
|
$322 = ((($321)) + 32|0);
|
|
$out = $322;
|
|
$323 = $win;
|
|
$324 = ((($323)) + 8|0);
|
|
$325 = HEAP32[$324>>2]|0;
|
|
$326 = $325 & 4096;
|
|
$327 = ($326|0)!=(0);
|
|
$328 = $layout;
|
|
$329 = ((($328)) + 48|0);
|
|
HEAPF32[$329>>2] = 0.0;
|
|
if ($327) {
|
|
$330 = $layout;
|
|
$331 = ((($330)) + 92|0);
|
|
$332 = ((($331)) + 8|0);
|
|
HEAPF32[$332>>2] = 0.0;
|
|
} else {
|
|
$333 = ((($item_spacing)) + 4|0);
|
|
$334 = +HEAPF32[$333>>2];
|
|
$335 = ((($window_padding)) + 4|0);
|
|
$336 = +HEAPF32[$335>>2];
|
|
$337 = $334 + $336;
|
|
$338 = $layout;
|
|
$339 = ((($338)) + 92|0);
|
|
$340 = ((($339)) + 8|0);
|
|
HEAPF32[$340>>2] = $337;
|
|
}
|
|
$341 = $win;
|
|
$342 = ((($341)) + 8|0);
|
|
$343 = HEAP32[$342>>2]|0;
|
|
$344 = $343 & 65536;
|
|
$345 = ($344|0)!=(0);
|
|
do {
|
|
if ($345) {
|
|
label = 42;
|
|
} else {
|
|
$346 = $win;
|
|
$347 = ((($346)) + 8|0);
|
|
$348 = HEAP32[$347>>2]|0;
|
|
$349 = $348 & 128;
|
|
$350 = ($349|0)!=(0);
|
|
if ($350) {
|
|
$351 = $win;
|
|
$352 = ((($351)) + 8|0);
|
|
$353 = HEAP32[$352>>2]|0;
|
|
$354 = $353 & 8;
|
|
$355 = ($354|0)!=(0);
|
|
if (!($355)) {
|
|
label = 42;
|
|
break;
|
|
}
|
|
}
|
|
$356 = ((($scaler_size)) + 4|0);
|
|
$357 = +HEAPF32[$356>>2];
|
|
$358 = $style;
|
|
$359 = ((($358)) + 4784|0);
|
|
$360 = ((($359)) + 436|0);
|
|
$361 = ((($360)) + 4|0);
|
|
$362 = +HEAPF32[$361>>2];
|
|
$363 = $357 + $362;
|
|
$364 = $layout;
|
|
$365 = ((($364)) + 44|0);
|
|
HEAPF32[$365>>2] = $363;
|
|
}
|
|
} while(0);
|
|
if ((label|0) == 42) {
|
|
$366 = $layout;
|
|
$367 = ((($366)) + 44|0);
|
|
HEAPF32[$367>>2] = 0.0;
|
|
}
|
|
$368 = $win;
|
|
$369 = ((($368)) + 8|0);
|
|
$370 = HEAP32[$369>>2]|0;
|
|
$371 = $370 & 128;
|
|
$372 = ($371|0)!=(0);
|
|
if (!($372)) {
|
|
$373 = $layout;
|
|
$374 = ((($373)) + 4|0);
|
|
$375 = ((($374)) + 8|0);
|
|
$376 = +HEAPF32[$375>>2];
|
|
$377 = +HEAPF32[$scrollbar_size>>2];
|
|
$378 = $376 - $377;
|
|
$379 = $layout;
|
|
$380 = ((($379)) + 36|0);
|
|
HEAPF32[$380>>2] = $378;
|
|
}
|
|
$381 = $layout;
|
|
$382 = ((($381)) + 4|0);
|
|
$383 = ((($382)) + 12|0);
|
|
$384 = +HEAPF32[$383>>2];
|
|
$385 = $layout;
|
|
$386 = ((($385)) + 48|0);
|
|
$387 = +HEAPF32[$386>>2];
|
|
$388 = ((($item_spacing)) + 4|0);
|
|
$389 = +HEAPF32[$388>>2];
|
|
$390 = $387 + $389;
|
|
$391 = ((($window_padding)) + 4|0);
|
|
$392 = +HEAPF32[$391>>2];
|
|
$393 = $390 + $392;
|
|
$394 = $384 - $393;
|
|
$395 = $layout;
|
|
$396 = ((($395)) + 40|0);
|
|
HEAPF32[$396>>2] = $394;
|
|
$397 = $layout;
|
|
$398 = ((($397)) + 44|0);
|
|
$399 = +HEAPF32[$398>>2];
|
|
$400 = $layout;
|
|
$401 = ((($400)) + 40|0);
|
|
$402 = +HEAPF32[$401>>2];
|
|
$403 = $402 - $399;
|
|
HEAPF32[$401>>2] = $403;
|
|
$404 = $win;
|
|
$405 = $2;
|
|
$406 = (_nk_window_has_header($404,$405)|0);
|
|
$header_active = $406;
|
|
$407 = $header_active;
|
|
$408 = ($407|0)!=(0);
|
|
if ($408) {
|
|
$background = 0;
|
|
$409 = $layout;
|
|
$410 = ((($409)) + 4|0);
|
|
$411 = +HEAPF32[$410>>2];
|
|
HEAPF32[$header>>2] = $411;
|
|
$412 = $layout;
|
|
$413 = ((($412)) + 4|0);
|
|
$414 = ((($413)) + 4|0);
|
|
$415 = +HEAPF32[$414>>2];
|
|
$416 = ((($header)) + 4|0);
|
|
HEAPF32[$416>>2] = $415;
|
|
$417 = $layout;
|
|
$418 = ((($417)) + 4|0);
|
|
$419 = ((($418)) + 8|0);
|
|
$420 = +HEAPF32[$419>>2];
|
|
$421 = ((($header)) + 8|0);
|
|
HEAPF32[$421>>2] = $420;
|
|
$422 = $font;
|
|
$423 = ((($422)) + 4|0);
|
|
$424 = +HEAPF32[$423>>2];
|
|
$425 = $style;
|
|
$426 = ((($425)) + 4784|0);
|
|
$427 = ((($426)) + 344|0);
|
|
$428 = ((($427)) + 4|0);
|
|
$429 = +HEAPF32[$428>>2];
|
|
$430 = 2.0 * $429;
|
|
$431 = $424 + $430;
|
|
$432 = $layout;
|
|
$433 = ((($432)) + 48|0);
|
|
HEAPF32[$433>>2] = $431;
|
|
$434 = $style;
|
|
$435 = ((($434)) + 4784|0);
|
|
$436 = ((($435)) + 352|0);
|
|
$437 = ((($436)) + 4|0);
|
|
$438 = +HEAPF32[$437>>2];
|
|
$439 = 2.0 * $438;
|
|
$440 = $layout;
|
|
$441 = ((($440)) + 48|0);
|
|
$442 = +HEAPF32[$441>>2];
|
|
$443 = $442 + $439;
|
|
HEAPF32[$441>>2] = $443;
|
|
$444 = $layout;
|
|
$445 = ((($444)) + 48|0);
|
|
$446 = +HEAPF32[$445>>2];
|
|
$447 = $layout;
|
|
$448 = ((($447)) + 92|0);
|
|
$449 = ((($448)) + 8|0);
|
|
$450 = +HEAPF32[$449>>2];
|
|
$451 = $450 + $446;
|
|
HEAPF32[$449>>2] = $451;
|
|
$452 = $layout;
|
|
$453 = ((($452)) + 48|0);
|
|
$454 = +HEAPF32[$453>>2];
|
|
$455 = $454 + 0.5;
|
|
$456 = ((($header)) + 12|0);
|
|
HEAPF32[$456>>2] = $455;
|
|
$457 = $layout;
|
|
$458 = ((($457)) + 4|0);
|
|
$459 = ((($458)) + 12|0);
|
|
$460 = +HEAPF32[$459>>2];
|
|
$461 = ((($header)) + 12|0);
|
|
$462 = +HEAPF32[$461>>2];
|
|
$463 = ((($item_spacing)) + 4|0);
|
|
$464 = +HEAPF32[$463>>2];
|
|
$465 = 2.0 * $464;
|
|
$466 = $462 + $465;
|
|
$467 = $460 - $466;
|
|
$468 = $layout;
|
|
$469 = ((($468)) + 40|0);
|
|
HEAPF32[$469>>2] = $467;
|
|
$470 = $layout;
|
|
$471 = ((($470)) + 44|0);
|
|
$472 = +HEAPF32[$471>>2];
|
|
$473 = $layout;
|
|
$474 = ((($473)) + 40|0);
|
|
$475 = +HEAPF32[$474>>2];
|
|
$476 = $475 - $472;
|
|
HEAPF32[$474>>2] = $476;
|
|
$477 = $1;
|
|
$478 = ((($477)) + 11164|0);
|
|
$479 = HEAP32[$478>>2]|0;
|
|
$480 = $win;
|
|
$481 = ($479|0)==($480|0);
|
|
do {
|
|
if ($481) {
|
|
$482 = $style;
|
|
$483 = ((($482)) + 4784|0);
|
|
$484 = ((($483)) + 40|0);
|
|
$background = $484;
|
|
$485 = ((($text)) + 12|0);
|
|
$486 = $style;
|
|
$487 = ((($486)) + 4784|0);
|
|
$488 = ((($487)) + 336|0);
|
|
;HEAP8[$485>>0]=HEAP8[$488>>0]|0;HEAP8[$485+1>>0]=HEAP8[$488+1>>0]|0;HEAP8[$485+2>>0]=HEAP8[$488+2>>0]|0;HEAP8[$485+3>>0]=HEAP8[$488+3>>0]|0;
|
|
} else {
|
|
$489 = $1;
|
|
;HEAP32[$header$byval_copy>>2]=HEAP32[$header>>2]|0;HEAP32[$header$byval_copy+4>>2]=HEAP32[$header+4>>2]|0;HEAP32[$header$byval_copy+8>>2]=HEAP32[$header+8>>2]|0;HEAP32[$header$byval_copy+12>>2]=HEAP32[$header+12>>2]|0;
|
|
$490 = (_nk_input_is_mouse_hovering_rect($489,$header$byval_copy)|0);
|
|
$491 = ($490|0)!=(0);
|
|
$492 = $style;
|
|
$493 = ((($492)) + 4784|0);
|
|
if ($491) {
|
|
$494 = ((($493)) + 20|0);
|
|
$background = $494;
|
|
$495 = ((($text)) + 12|0);
|
|
$496 = $style;
|
|
$497 = ((($496)) + 4784|0);
|
|
$498 = ((($497)) + 332|0);
|
|
;HEAP8[$495>>0]=HEAP8[$498>>0]|0;HEAP8[$495+1>>0]=HEAP8[$498+1>>0]|0;HEAP8[$495+2>>0]=HEAP8[$498+2>>0]|0;HEAP8[$495+3>>0]=HEAP8[$498+3>>0]|0;
|
|
break;
|
|
} else {
|
|
$background = $493;
|
|
$499 = ((($text)) + 12|0);
|
|
$500 = $style;
|
|
$501 = ((($500)) + 4784|0);
|
|
$502 = ((($501)) + 328|0);
|
|
;HEAP8[$499>>0]=HEAP8[$502>>0]|0;HEAP8[$499+1>>0]=HEAP8[$502+1>>0]|0;HEAP8[$499+2>>0]=HEAP8[$502+2>>0]|0;HEAP8[$499+3>>0]=HEAP8[$502+3>>0]|0;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$503 = $background;
|
|
$504 = HEAP32[$503>>2]|0;
|
|
$505 = ($504|0)==(1);
|
|
$506 = ((($text)) + 8|0);
|
|
if ($505) {
|
|
_nk_rgba($10,0,0,0,0);
|
|
;HEAP8[$506>>0]=HEAP8[$10>>0]|0;HEAP8[$506+1>>0]=HEAP8[$10+1>>0]|0;HEAP8[$506+2>>0]=HEAP8[$10+2>>0]|0;HEAP8[$506+3>>0]=HEAP8[$10+3>>0]|0;
|
|
$507 = $win;
|
|
$508 = ((($507)) + 32|0);
|
|
$509 = $background;
|
|
$510 = ((($509)) + 4|0);
|
|
;HEAP32[$header$byval_copy8>>2]=HEAP32[$header>>2]|0;HEAP32[$header$byval_copy8+4>>2]=HEAP32[$header+4>>2]|0;HEAP32[$header$byval_copy8+8>>2]=HEAP32[$header+8>>2]|0;HEAP32[$header$byval_copy8+12>>2]=HEAP32[$header+12>>2]|0;
|
|
_nk_draw_image($508,$header$byval_copy8,$510);
|
|
} else {
|
|
$511 = $background;
|
|
$512 = ((($511)) + 4|0);
|
|
;HEAP8[$506>>0]=HEAP8[$512>>0]|0;HEAP8[$506+1>>0]=HEAP8[$512+1>>0]|0;HEAP8[$506+2>>0]=HEAP8[$512+2>>0]|0;HEAP8[$506+3>>0]=HEAP8[$512+3>>0]|0;
|
|
$513 = $out;
|
|
$514 = $layout;
|
|
$515 = ((($514)) + 4|0);
|
|
$516 = +HEAPF32[$515>>2];
|
|
$517 = $layout;
|
|
$518 = ((($517)) + 4|0);
|
|
$519 = ((($518)) + 4|0);
|
|
$520 = +HEAPF32[$519>>2];
|
|
$521 = $layout;
|
|
$522 = ((($521)) + 4|0);
|
|
$523 = ((($522)) + 8|0);
|
|
$524 = +HEAPF32[$523>>2];
|
|
$525 = $layout;
|
|
$526 = ((($525)) + 48|0);
|
|
$527 = +HEAPF32[$526>>2];
|
|
_nk_rect($11,$516,$520,$524,$527);
|
|
$528 = $background;
|
|
$529 = ((($528)) + 4|0);
|
|
;HEAP32[$$byval_copy9>>2]=HEAP32[$11>>2]|0;HEAP32[$$byval_copy9+4>>2]=HEAP32[$11+4>>2]|0;HEAP32[$$byval_copy9+8>>2]=HEAP32[$11+8>>2]|0;HEAP32[$$byval_copy9+12>>2]=HEAP32[$11+12>>2]|0;
|
|
;HEAP8[$$byval_copy10>>0]=HEAP8[$529>>0]|0;HEAP8[$$byval_copy10+1>>0]=HEAP8[$529+1>>0]|0;HEAP8[$$byval_copy10+2>>0]=HEAP8[$529+2>>0]|0;HEAP8[$$byval_copy10+3>>0]=HEAP8[$529+3>>0]|0;
|
|
_nk_fill_rect($513,$$byval_copy9,0.0,$$byval_copy10);
|
|
}
|
|
$530 = ((($header)) + 4|0);
|
|
$531 = +HEAPF32[$530>>2];
|
|
$532 = $style;
|
|
$533 = ((($532)) + 4784|0);
|
|
$534 = ((($533)) + 344|0);
|
|
$535 = ((($534)) + 4|0);
|
|
$536 = +HEAPF32[$535>>2];
|
|
$537 = $531 + $536;
|
|
$538 = ((($button)) + 4|0);
|
|
HEAPF32[$538>>2] = $537;
|
|
$539 = $layout;
|
|
$540 = ((($539)) + 48|0);
|
|
$541 = +HEAPF32[$540>>2];
|
|
$542 = $style;
|
|
$543 = ((($542)) + 4784|0);
|
|
$544 = ((($543)) + 344|0);
|
|
$545 = ((($544)) + 4|0);
|
|
$546 = +HEAPF32[$545>>2];
|
|
$547 = 2.0 * $546;
|
|
$548 = $541 - $547;
|
|
$549 = ((($button)) + 12|0);
|
|
HEAPF32[$549>>2] = $548;
|
|
$550 = ((($button)) + 12|0);
|
|
$551 = +HEAPF32[$550>>2];
|
|
$552 = ((($button)) + 8|0);
|
|
HEAPF32[$552>>2] = $551;
|
|
$553 = $win;
|
|
$554 = ((($553)) + 8|0);
|
|
$555 = HEAP32[$554>>2]|0;
|
|
$556 = $555 & 16;
|
|
$557 = ($556|0)!=(0);
|
|
do {
|
|
if ($557) {
|
|
HEAP32[$ws>>2] = 0;
|
|
$558 = $style;
|
|
$559 = ((($558)) + 4784|0);
|
|
$560 = ((($559)) + 340|0);
|
|
$561 = HEAP32[$560>>2]|0;
|
|
$562 = ($561|0)==(1);
|
|
if ($562) {
|
|
$563 = ((($header)) + 8|0);
|
|
$564 = +HEAPF32[$563>>2];
|
|
$565 = +HEAPF32[$header>>2];
|
|
$566 = $564 + $565;
|
|
$567 = ((($button)) + 8|0);
|
|
$568 = +HEAPF32[$567>>2];
|
|
$569 = $style;
|
|
$570 = ((($569)) + 4784|0);
|
|
$571 = ((($570)) + 344|0);
|
|
$572 = +HEAPF32[$571>>2];
|
|
$573 = $568 + $572;
|
|
$574 = $566 - $573;
|
|
HEAPF32[$button>>2] = $574;
|
|
$575 = ((($button)) + 8|0);
|
|
$576 = +HEAPF32[$575>>2];
|
|
$577 = $style;
|
|
$578 = ((($577)) + 4784|0);
|
|
$579 = ((($578)) + 360|0);
|
|
$580 = +HEAPF32[$579>>2];
|
|
$581 = $576 + $580;
|
|
$582 = $style;
|
|
$583 = ((($582)) + 4784|0);
|
|
$584 = ((($583)) + 344|0);
|
|
$585 = +HEAPF32[$584>>2];
|
|
$586 = $581 + $585;
|
|
$587 = ((($header)) + 8|0);
|
|
$588 = +HEAPF32[$587>>2];
|
|
$589 = $588 - $586;
|
|
HEAPF32[$587>>2] = $589;
|
|
} else {
|
|
$590 = +HEAPF32[$header>>2];
|
|
$591 = $style;
|
|
$592 = ((($591)) + 4784|0);
|
|
$593 = ((($592)) + 344|0);
|
|
$594 = +HEAPF32[$593>>2];
|
|
$595 = $590 + $594;
|
|
HEAPF32[$button>>2] = $595;
|
|
$596 = ((($button)) + 8|0);
|
|
$597 = +HEAPF32[$596>>2];
|
|
$598 = $style;
|
|
$599 = ((($598)) + 4784|0);
|
|
$600 = ((($599)) + 360|0);
|
|
$601 = +HEAPF32[$600>>2];
|
|
$602 = $597 + $601;
|
|
$603 = $style;
|
|
$604 = ((($603)) + 4784|0);
|
|
$605 = ((($604)) + 344|0);
|
|
$606 = +HEAPF32[$605>>2];
|
|
$607 = $602 + $606;
|
|
$608 = +HEAPF32[$header>>2];
|
|
$609 = $608 + $607;
|
|
HEAPF32[$header>>2] = $609;
|
|
}
|
|
$610 = $win;
|
|
$611 = ((($610)) + 32|0);
|
|
$612 = $style;
|
|
$613 = ((($612)) + 4784|0);
|
|
$614 = ((($613)) + 316|0);
|
|
$615 = HEAP32[$614>>2]|0;
|
|
$616 = $style;
|
|
$617 = ((($616)) + 4784|0);
|
|
$618 = ((($617)) + 60|0);
|
|
$619 = $in;
|
|
$620 = $style;
|
|
;HEAP32[$button$byval_copy>>2]=HEAP32[$button>>2]|0;HEAP32[$button$byval_copy+4>>2]=HEAP32[$button+4>>2]|0;HEAP32[$button$byval_copy+8>>2]=HEAP32[$button+8>>2]|0;HEAP32[$button$byval_copy+12>>2]=HEAP32[$button+12>>2]|0;
|
|
$621 = (_nk_do_button_symbol($ws,$611,$button$byval_copy,$615,0,$618,$619,$620)|0);
|
|
$622 = ($621|0)!=(0);
|
|
if (!($622)) {
|
|
break;
|
|
}
|
|
$623 = $layout;
|
|
$624 = HEAP32[$623>>2]|0;
|
|
$625 = $624 | 2048;
|
|
HEAP32[$623>>2] = $625;
|
|
}
|
|
} while(0);
|
|
$626 = $win;
|
|
$627 = ((($626)) + 8|0);
|
|
$628 = HEAP32[$627>>2]|0;
|
|
$629 = $628 & 32;
|
|
$630 = ($629|0)!=(0);
|
|
do {
|
|
if ($630) {
|
|
HEAP32[$ws1>>2] = 0;
|
|
$631 = $style;
|
|
$632 = ((($631)) + 4784|0);
|
|
$633 = ((($632)) + 340|0);
|
|
$634 = HEAP32[$633>>2]|0;
|
|
$635 = ($634|0)==(1);
|
|
if ($635) {
|
|
$636 = ((($header)) + 8|0);
|
|
$637 = +HEAPF32[$636>>2];
|
|
$638 = +HEAPF32[$header>>2];
|
|
$639 = $637 + $638;
|
|
$640 = ((($button)) + 8|0);
|
|
$641 = +HEAPF32[$640>>2];
|
|
$642 = $639 - $641;
|
|
HEAPF32[$button>>2] = $642;
|
|
$643 = $win;
|
|
$644 = ((($643)) + 8|0);
|
|
$645 = HEAP32[$644>>2]|0;
|
|
$646 = $645 & 16;
|
|
$647 = ($646|0)!=(0);
|
|
if (!($647)) {
|
|
$648 = $style;
|
|
$649 = ((($648)) + 4784|0);
|
|
$650 = ((($649)) + 344|0);
|
|
$651 = +HEAPF32[$650>>2];
|
|
$652 = +HEAPF32[$button>>2];
|
|
$653 = $652 - $651;
|
|
HEAPF32[$button>>2] = $653;
|
|
$654 = $style;
|
|
$655 = ((($654)) + 4784|0);
|
|
$656 = ((($655)) + 344|0);
|
|
$657 = +HEAPF32[$656>>2];
|
|
$658 = ((($header)) + 8|0);
|
|
$659 = +HEAPF32[$658>>2];
|
|
$660 = $659 - $657;
|
|
HEAPF32[$658>>2] = $660;
|
|
}
|
|
$661 = ((($button)) + 8|0);
|
|
$662 = +HEAPF32[$661>>2];
|
|
$663 = $style;
|
|
$664 = ((($663)) + 4784|0);
|
|
$665 = ((($664)) + 360|0);
|
|
$666 = +HEAPF32[$665>>2];
|
|
$667 = $662 + $666;
|
|
$668 = ((($header)) + 8|0);
|
|
$669 = +HEAPF32[$668>>2];
|
|
$670 = $669 - $667;
|
|
HEAPF32[$668>>2] = $670;
|
|
} else {
|
|
$671 = +HEAPF32[$header>>2];
|
|
HEAPF32[$button>>2] = $671;
|
|
$672 = ((($button)) + 8|0);
|
|
$673 = +HEAPF32[$672>>2];
|
|
$674 = $style;
|
|
$675 = ((($674)) + 4784|0);
|
|
$676 = ((($675)) + 360|0);
|
|
$677 = +HEAPF32[$676>>2];
|
|
$678 = $673 + $677;
|
|
$679 = $style;
|
|
$680 = ((($679)) + 4784|0);
|
|
$681 = ((($680)) + 344|0);
|
|
$682 = +HEAPF32[$681>>2];
|
|
$683 = $678 + $682;
|
|
$684 = +HEAPF32[$header>>2];
|
|
$685 = $684 + $683;
|
|
HEAPF32[$header>>2] = $685;
|
|
}
|
|
$686 = $win;
|
|
$687 = ((($686)) + 32|0);
|
|
$688 = $layout;
|
|
$689 = HEAP32[$688>>2]|0;
|
|
$690 = $689 & 4096;
|
|
$691 = ($690|0)!=(0);
|
|
$692 = $style;
|
|
$693 = ((($692)) + 4784|0);
|
|
if ($691) {
|
|
$694 = ((($693)) + 324|0);
|
|
$695 = HEAP32[$694>>2]|0;
|
|
$703 = $695;
|
|
} else {
|
|
$696 = ((($693)) + 320|0);
|
|
$697 = HEAP32[$696>>2]|0;
|
|
$703 = $697;
|
|
}
|
|
$698 = $style;
|
|
$699 = ((($698)) + 4784|0);
|
|
$700 = ((($699)) + 188|0);
|
|
$701 = $in;
|
|
$702 = $style;
|
|
;HEAP32[$button$byval_copy11>>2]=HEAP32[$button>>2]|0;HEAP32[$button$byval_copy11+4>>2]=HEAP32[$button+4>>2]|0;HEAP32[$button$byval_copy11+8>>2]=HEAP32[$button+8>>2]|0;HEAP32[$button$byval_copy11+12>>2]=HEAP32[$button+12>>2]|0;
|
|
$704 = (_nk_do_button_symbol($ws1,$687,$button$byval_copy11,$703,0,$700,$701,$702)|0);
|
|
$705 = ($704|0)!=(0);
|
|
if (!($705)) {
|
|
break;
|
|
}
|
|
$706 = $layout;
|
|
$707 = HEAP32[$706>>2]|0;
|
|
$708 = $707 & 4096;
|
|
$709 = ($708|0)!=(0);
|
|
$710 = $layout;
|
|
$711 = HEAP32[$710>>2]|0;
|
|
$712 = $711 & -4097;
|
|
$713 = $711 | 4096;
|
|
$714 = $709 ? $712 : $713;
|
|
$715 = $layout;
|
|
HEAP32[$715>>2] = $714;
|
|
}
|
|
} while(0);
|
|
$716 = $2;
|
|
$717 = (_nk_strlen($716)|0);
|
|
$text_len = $717;
|
|
;HEAP32[$label>>2]=0|0;HEAP32[$label+4>>2]=0|0;HEAP32[$label+8>>2]=0|0;HEAP32[$label+12>>2]=0|0;
|
|
$718 = $font;
|
|
$719 = ((($718)) + 8|0);
|
|
$720 = HEAP32[$719>>2]|0;
|
|
$721 = $font;
|
|
$722 = $font;
|
|
$723 = ((($722)) + 4|0);
|
|
$724 = +HEAPF32[$723>>2];
|
|
$725 = $2;
|
|
$726 = $text_len;
|
|
;HEAP32[$$byval_copy12>>2]=HEAP32[$721>>2]|0;
|
|
$727 = (+FUNCTION_TABLE_didii[$720 & 15]($$byval_copy12,$724,$725,$726));
|
|
$t = $727;
|
|
$728 = +HEAPF32[$header>>2];
|
|
$729 = $style;
|
|
$730 = ((($729)) + 4784|0);
|
|
$731 = ((($730)) + 344|0);
|
|
$732 = +HEAPF32[$731>>2];
|
|
$733 = $728 + $732;
|
|
HEAPF32[$label>>2] = $733;
|
|
$734 = $style;
|
|
$735 = ((($734)) + 4784|0);
|
|
$736 = ((($735)) + 352|0);
|
|
$737 = +HEAPF32[$736>>2];
|
|
$738 = +HEAPF32[$label>>2];
|
|
$739 = $738 + $737;
|
|
HEAPF32[$label>>2] = $739;
|
|
$740 = ((($header)) + 4|0);
|
|
$741 = +HEAPF32[$740>>2];
|
|
$742 = $style;
|
|
$743 = ((($742)) + 4784|0);
|
|
$744 = ((($743)) + 352|0);
|
|
$745 = ((($744)) + 4|0);
|
|
$746 = +HEAPF32[$745>>2];
|
|
$747 = $741 + $746;
|
|
$748 = ((($label)) + 4|0);
|
|
HEAPF32[$748>>2] = $747;
|
|
$749 = $font;
|
|
$750 = ((($749)) + 4|0);
|
|
$751 = +HEAPF32[$750>>2];
|
|
$752 = $style;
|
|
$753 = ((($752)) + 4784|0);
|
|
$754 = ((($753)) + 352|0);
|
|
$755 = ((($754)) + 4|0);
|
|
$756 = +HEAPF32[$755>>2];
|
|
$757 = 2.0 * $756;
|
|
$758 = $751 + $757;
|
|
$759 = ((($label)) + 12|0);
|
|
HEAPF32[$759>>2] = $758;
|
|
$760 = $t;
|
|
$761 = $style;
|
|
$762 = ((($761)) + 4784|0);
|
|
$763 = ((($762)) + 360|0);
|
|
$764 = +HEAPF32[$763>>2];
|
|
$765 = 2.0 * $764;
|
|
$766 = $760 + $765;
|
|
$767 = ((($label)) + 8|0);
|
|
HEAPF32[$767>>2] = $766;
|
|
_nk_vec2($12,0.0,0.0);
|
|
;HEAP32[$text>>2]=HEAP32[$12>>2]|0;HEAP32[$text+4>>2]=HEAP32[$12+4>>2]|0;
|
|
$768 = $out;
|
|
$769 = $2;
|
|
$770 = $text_len;
|
|
$771 = $font;
|
|
;HEAP32[$label$byval_copy>>2]=HEAP32[$label>>2]|0;HEAP32[$label$byval_copy+4>>2]=HEAP32[$label+4>>2]|0;HEAP32[$label$byval_copy+8>>2]=HEAP32[$label+8>>2]|0;HEAP32[$label$byval_copy+12>>2]=HEAP32[$label+12>>2]|0;
|
|
_nk_widget_text($768,$label$byval_copy,$769,$770,$text,17,$771);
|
|
}
|
|
$772 = $win;
|
|
$773 = ((($772)) + 8|0);
|
|
$774 = HEAP32[$773>>2]|0;
|
|
$775 = $774 & 4096;
|
|
$776 = ($775|0)!=(0);
|
|
if ($776) {
|
|
$777 = $layout;
|
|
$778 = HEAP32[$777>>2]|0;
|
|
$779 = $778 & 4096;
|
|
$780 = ($779|0)!=(0);
|
|
if (!($780)) {
|
|
$781 = ((($item_spacing)) + 4|0);
|
|
$782 = +HEAPF32[$781>>2];
|
|
$783 = 2.0 * $782;
|
|
$784 = $style;
|
|
$785 = ((($784)) + 4784|0);
|
|
$786 = ((($785)) + 444|0);
|
|
$787 = +HEAPF32[$786>>2];
|
|
$788 = $783 + $787;
|
|
$789 = $layout;
|
|
$790 = ((($789)) + 92|0);
|
|
$791 = ((($790)) + 8|0);
|
|
$792 = +HEAPF32[$791>>2];
|
|
$793 = $792 + $788;
|
|
HEAPF32[$791>>2] = $793;
|
|
}
|
|
}
|
|
$794 = $layout;
|
|
$795 = HEAP32[$794>>2]|0;
|
|
$796 = $795 & 4096;
|
|
$797 = ($796|0)!=(0);
|
|
$798 = $layout;
|
|
do {
|
|
if ($797) {
|
|
$799 = ((($798)) + 92|0);
|
|
$800 = ((($799)) + 8|0);
|
|
HEAPF32[$800>>2] = 0.0;
|
|
$801 = $out;
|
|
$802 = $layout;
|
|
$803 = ((($802)) + 4|0);
|
|
$804 = +HEAPF32[$803>>2];
|
|
$805 = $layout;
|
|
$806 = ((($805)) + 4|0);
|
|
$807 = ((($806)) + 4|0);
|
|
$808 = +HEAPF32[$807>>2];
|
|
$809 = $layout;
|
|
$810 = ((($809)) + 4|0);
|
|
$811 = ((($810)) + 8|0);
|
|
$812 = +HEAPF32[$811>>2];
|
|
$813 = $layout;
|
|
$814 = ((($813)) + 92|0);
|
|
$815 = ((($814)) + 8|0);
|
|
$816 = +HEAPF32[$815>>2];
|
|
_nk_rect($13,$804,$808,$812,$816);
|
|
$817 = $style;
|
|
$818 = ((($817)) + 4784|0);
|
|
$819 = ((($818)) + 388|0);
|
|
;HEAP32[$$byval_copy13>>2]=HEAP32[$13>>2]|0;HEAP32[$$byval_copy13+4>>2]=HEAP32[$13+4>>2]|0;HEAP32[$$byval_copy13+8>>2]=HEAP32[$13+8>>2]|0;HEAP32[$$byval_copy13+12>>2]=HEAP32[$13+12>>2]|0;
|
|
;HEAP8[$$byval_copy14>>0]=HEAP8[$819>>0]|0;HEAP8[$$byval_copy14+1>>0]=HEAP8[$819+1>>0]|0;HEAP8[$$byval_copy14+2>>0]=HEAP8[$819+2>>0]|0;HEAP8[$$byval_copy14+3>>0]=HEAP8[$819+3>>0]|0;
|
|
_nk_fill_rect($801,$$byval_copy13,0.0,$$byval_copy14);
|
|
} else {
|
|
$820 = HEAP32[$798>>2]|0;
|
|
$821 = $820 & 64;
|
|
$822 = ($821|0)!=(0);
|
|
if ($822) {
|
|
$850 = $out;
|
|
$851 = $layout;
|
|
$852 = ((($851)) + 4|0);
|
|
$853 = +HEAPF32[$852>>2];
|
|
$854 = $layout;
|
|
$855 = ((($854)) + 4|0);
|
|
$856 = ((($855)) + 4|0);
|
|
$857 = +HEAPF32[$856>>2];
|
|
$858 = $layout;
|
|
$859 = ((($858)) + 4|0);
|
|
$860 = ((($859)) + 8|0);
|
|
$861 = +HEAPF32[$860>>2];
|
|
$862 = $layout;
|
|
$863 = ((($862)) + 92|0);
|
|
$864 = ((($863)) + 8|0);
|
|
$865 = +HEAPF32[$864>>2];
|
|
$866 = ((($window_padding)) + 4|0);
|
|
$867 = +HEAPF32[$866>>2];
|
|
$868 = $865 + $867;
|
|
_nk_rect($14,$853,$857,$861,$868);
|
|
$869 = $style;
|
|
$870 = ((($869)) + 4784|0);
|
|
$871 = ((($870)) + 388|0);
|
|
;HEAP32[$$byval_copy17>>2]=HEAP32[$14>>2]|0;HEAP32[$$byval_copy17+4>>2]=HEAP32[$14+4>>2]|0;HEAP32[$$byval_copy17+8>>2]=HEAP32[$14+8>>2]|0;HEAP32[$$byval_copy17+12>>2]=HEAP32[$14+12>>2]|0;
|
|
;HEAP8[$$byval_copy18>>0]=HEAP8[$871>>0]|0;HEAP8[$$byval_copy18+1>>0]=HEAP8[$871+1>>0]|0;HEAP8[$$byval_copy18+2>>0]=HEAP8[$871+2>>0]|0;HEAP8[$$byval_copy18+3>>0]=HEAP8[$871+3>>0]|0;
|
|
_nk_fill_rect($850,$$byval_copy17,0.0,$$byval_copy18);
|
|
break;
|
|
}
|
|
$823 = $layout;
|
|
$824 = ((($823)) + 4|0);
|
|
;HEAP32[$body>>2]=HEAP32[$824>>2]|0;HEAP32[$body+4>>2]=HEAP32[$824+4>>2]|0;HEAP32[$body+8>>2]=HEAP32[$824+8>>2]|0;HEAP32[$body+12>>2]=HEAP32[$824+12>>2]|0;
|
|
$825 = $header_active;
|
|
$826 = ($825|0)!=(0);
|
|
if ($826) {
|
|
$827 = $layout;
|
|
$828 = ((($827)) + 48|0);
|
|
$829 = +HEAPF32[$828>>2];
|
|
$830 = $829 - 0.5;
|
|
$831 = ((($body)) + 4|0);
|
|
$832 = +HEAPF32[$831>>2];
|
|
$833 = $832 + $830;
|
|
HEAPF32[$831>>2] = $833;
|
|
$834 = $layout;
|
|
$835 = ((($834)) + 48|0);
|
|
$836 = +HEAPF32[$835>>2];
|
|
$837 = ((($body)) + 12|0);
|
|
$838 = +HEAPF32[$837>>2];
|
|
$839 = $838 - $836;
|
|
HEAPF32[$837>>2] = $839;
|
|
}
|
|
$840 = $style;
|
|
$841 = ((($840)) + 4784|0);
|
|
$842 = ((($841)) + 368|0);
|
|
$843 = HEAP32[$842>>2]|0;
|
|
$844 = ($843|0)==(1);
|
|
$845 = $out;
|
|
$846 = $style;
|
|
$847 = ((($846)) + 4784|0);
|
|
$848 = ((($847)) + 368|0);
|
|
$849 = ((($848)) + 4|0);
|
|
if ($844) {
|
|
;HEAP32[$body$byval_copy>>2]=HEAP32[$body>>2]|0;HEAP32[$body$byval_copy+4>>2]=HEAP32[$body+4>>2]|0;HEAP32[$body$byval_copy+8>>2]=HEAP32[$body+8>>2]|0;HEAP32[$body$byval_copy+12>>2]=HEAP32[$body+12>>2]|0;
|
|
_nk_draw_image($845,$body$byval_copy,$849);
|
|
break;
|
|
} else {
|
|
;HEAP32[$body$byval_copy15>>2]=HEAP32[$body>>2]|0;HEAP32[$body$byval_copy15+4>>2]=HEAP32[$body+4>>2]|0;HEAP32[$body$byval_copy15+8>>2]=HEAP32[$body+8>>2]|0;HEAP32[$body$byval_copy15+12>>2]=HEAP32[$body+12>>2]|0;
|
|
;HEAP8[$$byval_copy16>>0]=HEAP8[$849>>0]|0;HEAP8[$$byval_copy16+1>>0]=HEAP8[$849+1>>0]|0;HEAP8[$$byval_copy16+2>>0]=HEAP8[$849+2>>0]|0;HEAP8[$$byval_copy16+3>>0]=HEAP8[$849+3>>0]|0;
|
|
_nk_fill_rect($845,$body$byval_copy15,0.0,$$byval_copy16);
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$872 = $win;
|
|
$873 = ((($872)) + 8|0);
|
|
$874 = HEAP32[$873>>2]|0;
|
|
$875 = $874 & 64;
|
|
$876 = ($875|0)!=(0);
|
|
$877 = $layout;
|
|
$878 = ((($877)) + 4|0);
|
|
$879 = +HEAPF32[$878>>2];
|
|
if ($876) {
|
|
$893 = $layout;
|
|
$894 = ((($893)) + 56|0);
|
|
HEAPF32[$894>>2] = $879;
|
|
$895 = $layout;
|
|
$896 = ((($895)) + 36|0);
|
|
$897 = +HEAPF32[$896>>2];
|
|
$898 = $layout;
|
|
$899 = ((($898)) + 56|0);
|
|
$900 = ((($899)) + 8|0);
|
|
HEAPF32[$900>>2] = $897;
|
|
} else {
|
|
$880 = +HEAPF32[$window_padding>>2];
|
|
$881 = $879 + $880;
|
|
$882 = $layout;
|
|
$883 = ((($882)) + 56|0);
|
|
HEAPF32[$883>>2] = $881;
|
|
$884 = $layout;
|
|
$885 = ((($884)) + 36|0);
|
|
$886 = +HEAPF32[$885>>2];
|
|
$887 = +HEAPF32[$window_padding>>2];
|
|
$888 = 2.0 * $887;
|
|
$889 = $886 - $888;
|
|
$890 = $layout;
|
|
$891 = ((($890)) + 56|0);
|
|
$892 = ((($891)) + 8|0);
|
|
HEAPF32[$892>>2] = $889;
|
|
}
|
|
$901 = $layout;
|
|
$902 = ((($901)) + 4|0);
|
|
$903 = ((($902)) + 12|0);
|
|
$904 = +HEAPF32[$903>>2];
|
|
$905 = $layout;
|
|
$906 = ((($905)) + 44|0);
|
|
$907 = +HEAPF32[$906>>2];
|
|
$908 = $layout;
|
|
$909 = ((($908)) + 48|0);
|
|
$910 = +HEAPF32[$909>>2];
|
|
$911 = $907 + $910;
|
|
$912 = $904 - $911;
|
|
$913 = $layout;
|
|
$914 = ((($913)) + 56|0);
|
|
$915 = ((($914)) + 12|0);
|
|
HEAPF32[$915>>2] = $912;
|
|
$916 = $style;
|
|
$917 = ((($916)) + 4784|0);
|
|
$918 = ((($917)) + 480|0);
|
|
$919 = ((($918)) + 4|0);
|
|
$920 = +HEAPF32[$919>>2];
|
|
$921 = 2.0 * $920;
|
|
$922 = $layout;
|
|
$923 = ((($922)) + 56|0);
|
|
$924 = ((($923)) + 12|0);
|
|
$925 = +HEAPF32[$924>>2];
|
|
$926 = $925 - $921;
|
|
HEAPF32[$924>>2] = $926;
|
|
$927 = $layout;
|
|
$928 = ((($927)) + 4|0);
|
|
$929 = ((($928)) + 4|0);
|
|
$930 = +HEAPF32[$929>>2];
|
|
$931 = $layout;
|
|
$932 = ((($931)) + 56|0);
|
|
$933 = ((($932)) + 4|0);
|
|
HEAPF32[$933>>2] = $930;
|
|
$934 = $win;
|
|
$935 = ((($934)) + 8|0);
|
|
$936 = HEAP32[$935>>2]|0;
|
|
$937 = $936 & 262144;
|
|
$938 = ($937|0)!=(0);
|
|
if (!($938)) {
|
|
$939 = $win;
|
|
$940 = ((($939)) + 8|0);
|
|
$941 = HEAP32[$940>>2]|0;
|
|
$942 = $941 & 524288;
|
|
$943 = ($942|0)!=(0);
|
|
if (!($943)) {
|
|
$944 = $layout;
|
|
$945 = ((($944)) + 48|0);
|
|
$946 = +HEAPF32[$945>>2];
|
|
$947 = $style;
|
|
$948 = ((($947)) + 4784|0);
|
|
$949 = ((($948)) + 480|0);
|
|
$950 = ((($949)) + 4|0);
|
|
$951 = +HEAPF32[$950>>2];
|
|
$952 = $946 + $951;
|
|
$953 = $layout;
|
|
$954 = ((($953)) + 56|0);
|
|
$955 = ((($954)) + 4|0);
|
|
$956 = +HEAPF32[$955>>2];
|
|
$957 = $956 + $952;
|
|
HEAPF32[$955>>2] = $957;
|
|
}
|
|
}
|
|
$958 = $win;
|
|
$959 = ((($958)) + 32|0);
|
|
$960 = ((($959)) + 4|0);
|
|
$961 = $layout;
|
|
$962 = ((($961)) + 56|0);
|
|
$963 = +HEAPF32[$962>>2];
|
|
$964 = $layout;
|
|
$965 = ((($964)) + 56|0);
|
|
$966 = ((($965)) + 4|0);
|
|
$967 = +HEAPF32[$966>>2];
|
|
$968 = $layout;
|
|
$969 = ((($968)) + 56|0);
|
|
$970 = +HEAPF32[$969>>2];
|
|
$971 = $layout;
|
|
$972 = ((($971)) + 56|0);
|
|
$973 = ((($972)) + 8|0);
|
|
$974 = +HEAPF32[$973>>2];
|
|
$975 = $970 + $974;
|
|
$976 = $layout;
|
|
$977 = ((($976)) + 56|0);
|
|
$978 = ((($977)) + 4|0);
|
|
$979 = +HEAPF32[$978>>2];
|
|
$980 = $layout;
|
|
$981 = ((($980)) + 56|0);
|
|
$982 = ((($981)) + 12|0);
|
|
$983 = +HEAPF32[$982>>2];
|
|
$984 = $979 + $983;
|
|
_nk_unify($clip,$960,$963,$967,$975,$984);
|
|
$985 = $out;
|
|
;HEAP32[$clip$byval_copy>>2]=HEAP32[$clip>>2]|0;HEAP32[$clip$byval_copy+4>>2]=HEAP32[$clip+4>>2]|0;HEAP32[$clip$byval_copy+8>>2]=HEAP32[$clip+8>>2]|0;HEAP32[$clip$byval_copy+12>>2]=HEAP32[$clip+12>>2]|0;
|
|
_nk_push_scissor($985,$clip$byval_copy);
|
|
$986 = $layout;
|
|
$987 = ((($986)) + 56|0);
|
|
;HEAP32[$987>>2]=HEAP32[$clip>>2]|0;HEAP32[$987+4>>2]=HEAP32[$clip+4>>2]|0;HEAP32[$987+8>>2]=HEAP32[$clip+8>>2]|0;HEAP32[$987+12>>2]=HEAP32[$clip+12>>2]|0;
|
|
$988 = $layout;
|
|
$989 = ((($988)) + 4|0);
|
|
$990 = +HEAPF32[$989>>2];
|
|
$991 = $win;
|
|
$992 = ((($991)) + 32|0);
|
|
$993 = ((($992)) + 4|0);
|
|
HEAPF32[$993>>2] = $990;
|
|
$994 = $layout;
|
|
$995 = ((($994)) + 36|0);
|
|
$996 = +HEAPF32[$995>>2];
|
|
$997 = $win;
|
|
$998 = ((($997)) + 32|0);
|
|
$999 = ((($998)) + 4|0);
|
|
$1000 = ((($999)) + 8|0);
|
|
HEAPF32[$1000>>2] = $996;
|
|
$1001 = $win;
|
|
$1002 = ((($1001)) + 8|0);
|
|
$1003 = HEAP32[$1002>>2]|0;
|
|
$1004 = $1003 & 128;
|
|
$1005 = ($1004|0)!=(0);
|
|
if (!($1005)) {
|
|
$1006 = +HEAPF32[$scrollbar_size>>2];
|
|
$1007 = $win;
|
|
$1008 = ((($1007)) + 32|0);
|
|
$1009 = ((($1008)) + 4|0);
|
|
$1010 = ((($1009)) + 8|0);
|
|
$1011 = +HEAPF32[$1010>>2];
|
|
$1012 = $1011 + $1006;
|
|
HEAPF32[$1010>>2] = $1012;
|
|
}
|
|
$1013 = $layout;
|
|
$1014 = HEAP32[$1013>>2]|0;
|
|
$1015 = $1014 & 2048;
|
|
$1016 = ($1015|0)!=(0);
|
|
if ($1016) {
|
|
$1023 = 0;
|
|
} else {
|
|
$1017 = $layout;
|
|
$1018 = HEAP32[$1017>>2]|0;
|
|
$1019 = $1018 & 4096;
|
|
$1020 = ($1019|0)!=(0);
|
|
$1021 = $1020 ^ 1;
|
|
$1023 = $1021;
|
|
}
|
|
$1022 = $1023&1;
|
|
$0 = $1022;
|
|
$1024 = $0;
|
|
STACKTOP = sp;return ($1024|0);
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$1024 = $0;
|
|
STACKTOP = sp;return ($1024|0);
|
|
}
|
|
function _nk_end($ctx) {
|
|
$ctx = $ctx|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((14913|0),(13400|0),15104,(28444|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ((($3)) + 11168|0);
|
|
$5 = HEAP32[$4>>2]|0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((28451|0),(13400|0),15105,(28444|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $0;
|
|
$8 = ((($7)) + 11168|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ((($9)) + 72|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = ($11|0)!=(0|0);
|
|
if (!($12)) {
|
|
___assert_fail((28516|0),(13400|0),15106,(28444|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $0;
|
|
$14 = ($13|0)!=(0|0);
|
|
if (!($14)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$15 = $0;
|
|
$16 = ((($15)) + 11168|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = ($17|0)!=(0|0);
|
|
if (!($18)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$19 = $0;
|
|
$20 = ((($19)) + 11168|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = ((($21)) + 8|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$24 = $23 & 2048;
|
|
$25 = ($24|0)!=(0);
|
|
$26 = $0;
|
|
if ($25) {
|
|
$27 = ((($26)) + 11168|0);
|
|
HEAP32[$27>>2] = 0;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
_nk_panel_end($26);
|
|
$28 = $0;
|
|
$29 = ((($28)) + 11168|0);
|
|
HEAP32[$29>>2] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_panel_end($ctx) {
|
|
$ctx = $ctx|0;
|
|
var $$byval_copy = 0, $$byval_copy10 = 0, $$byval_copy11 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0.0, $1001 = 0.0, $1002 = 0, $1003 = 0, $1004 = 0.0, $1005 = 0.0, $1006 = 0.0, $1007 = 0, $1008 = 0, $1009 = 0;
|
|
var $101 = 0.0, $1010 = 0.0, $1011 = 0.0, $1012 = 0.0, $1013 = 0.0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0.0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0.0, $1026 = 0, $1027 = 0.0;
|
|
var $1028 = 0.0, $1029 = 0, $103 = 0, $1030 = 0.0, $1031 = 0, $1032 = 0, $1033 = 0.0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0.0, $1038 = 0, $1039 = 0.0, $104 = 0.0, $1040 = 0.0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0.0, $1045 = 0;
|
|
var $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0;
|
|
var $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0;
|
|
var $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0, $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0;
|
|
var $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0, $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0;
|
|
var $1118 = 0, $1119 = 0, $112 = 0, $1120 = 0, $1121 = 0, $1122 = 0, $1123 = 0, $1124 = 0, $1125 = 0, $1126 = 0, $1127 = 0, $1128 = 0, $1129 = 0, $113 = 0, $1130 = 0, $1131 = 0, $1132 = 0, $1133 = 0, $1134 = 0, $1135 = 0;
|
|
var $1136 = 0, $1137 = 0, $1138 = 0, $1139 = 0, $114 = 0, $1140 = 0, $1141 = 0, $1142 = 0, $1143 = 0, $1144 = 0, $1145 = 0, $1146 = 0, $1147 = 0, $1148 = 0, $1149 = 0, $115 = 0, $1150 = 0, $1151 = 0, $1152 = 0, $1153 = 0;
|
|
var $1154 = 0, $1155 = 0, $1156 = 0, $1157 = 0, $1158 = 0, $1159 = 0, $116 = 0, $1160 = 0, $1161 = 0, $1162 = 0, $1163 = 0, $1164 = 0, $1165 = 0, $1166 = 0, $1167 = 0, $1168 = 0, $1169 = 0, $117 = 0.0, $1170 = 0, $1171 = 0;
|
|
var $1172 = 0, $1173 = 0, $1174 = 0, $1175 = 0, $1176 = 0, $1177 = 0, $1178 = 0, $1179 = 0, $118 = 0, $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0, $119 = 0;
|
|
var $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0, $1194 = 0, $1195 = 0, $1196 = 0, $12 = 0, $120 = 0, $121 = 0.0, $122 = 0, $123 = 0, $124 = 0.0, $125 = 0.0, $126 = 0, $127 = 0.0, $128 = 0.0, $129 = 0, $13 = 0, $130 = 0;
|
|
var $131 = 0, $132 = 0, $133 = 0.0, $134 = 0.0, $135 = 0.0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0;
|
|
var $15 = 0, $150 = 0, $151 = 0, $152 = 0.0, $153 = 0, $154 = 0, $155 = 0.0, $156 = 0.0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0.0, $161 = 0, $162 = 0.0, $163 = 0, $164 = 0, $165 = 0, $166 = 0.0, $167 = 0;
|
|
var $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0.0, $175 = 0, $176 = 0, $177 = 0, $178 = 0.0, $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0, $182 = 0, $183 = 0, $184 = 0.0, $185 = 0;
|
|
var $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0.0, $202 = 0;
|
|
var $203 = 0, $204 = 0.0, $205 = 0.0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0.0, $211 = 0, $212 = 0, $213 = 0.0, $214 = 0.0, $215 = 0, $216 = 0, $217 = 0.0, $218 = 0.0, $219 = 0, $22 = 0, $220 = 0;
|
|
var $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0.0, $235 = 0, $236 = 0, $237 = 0, $238 = 0.0, $239 = 0;
|
|
var $24 = 0, $240 = 0, $241 = 0.0, $242 = 0.0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0.0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0.0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0;
|
|
var $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0.0, $269 = 0, $27 = 0, $270 = 0, $271 = 0.0, $272 = 0.0, $273 = 0, $274 = 0, $275 = 0;
|
|
var $276 = 0.0, $277 = 0, $278 = 0, $279 = 0.0, $28 = 0, $280 = 0.0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0.0, $286 = 0.0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0.0, $291 = 0.0, $292 = 0, $293 = 0;
|
|
var $294 = 0.0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0.0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0.0, $303 = 0, $304 = 0, $305 = 0.0, $306 = 0.0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0.0;
|
|
var $311 = 0.0, $312 = 0.0, $313 = 0, $314 = 0, $315 = 0.0, $316 = 0.0, $317 = 0, $318 = 0.0, $319 = 0.0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0.0, $327 = 0.0, $328 = 0.0, $329 = 0;
|
|
var $33 = 0, $330 = 0, $331 = 0, $332 = 0.0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0.0, $338 = 0, $339 = 0.0, $34 = 0, $340 = 0.0, $341 = 0, $342 = 0, $343 = 0, $344 = 0.0, $345 = 0, $346 = 0, $347 = 0;
|
|
var $348 = 0.0, $349 = 0.0, $35 = 0, $350 = 0, $351 = 0.0, $352 = 0.0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0.0, $359 = 0, $36 = 0, $360 = 0.0, $361 = 0.0, $362 = 0, $363 = 0.0, $364 = 0.0, $365 = 0;
|
|
var $366 = 0, $367 = 0.0, $368 = 0, $369 = 0.0, $37 = 0, $370 = 0.0, $371 = 0, $372 = 0.0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0.0, $382 = 0.0, $383 = 0.0;
|
|
var $384 = 0.0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0.0, $391 = 0.0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0.0, $4 = 0, $40 = 0, $400 = 0.0;
|
|
var $401 = 0.0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0.0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0.0, $416 = 0.0, $417 = 0.0, $418 = 0, $419 = 0;
|
|
var $42 = 0, $420 = 0, $421 = 0.0, $422 = 0, $423 = 0, $424 = 0, $425 = 0.0, $426 = 0.0, $427 = 0, $428 = 0, $429 = 0.0, $43 = 0, $430 = 0.0, $431 = 0, $432 = 0.0, $433 = 0.0, $434 = 0, $435 = 0, $436 = 0.0, $437 = 0;
|
|
var $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0.0, $443 = 0, $444 = 0, $445 = 0.0, $446 = 0, $447 = 0.0, $448 = 0, $449 = 0, $45 = 0, $450 = 0.0, $451 = 0, $452 = 0.0, $453 = 0, $454 = 0, $455 = 0;
|
|
var $456 = 0.0, $457 = 0, $458 = 0, $459 = 0.0, $46 = 0, $460 = 0, $461 = 0.0, $462 = 0, $463 = 0, $464 = 0.0, $465 = 0, $466 = 0.0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0.0, $471 = 0, $472 = 0, $473 = 0;
|
|
var $474 = 0.0, $475 = 0.0, $476 = 0, $477 = 0, $478 = 0, $479 = 0.0, $48 = 0, $480 = 0.0, $481 = 0, $482 = 0.0, $483 = 0, $484 = 0, $485 = 0.0, $486 = 0, $487 = 0.0, $488 = 0.0, $489 = 0.0, $49 = 0, $490 = 0, $491 = 0;
|
|
var $492 = 0.0, $493 = 0.0, $494 = 0.0, $495 = 0.0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0.0, $502 = 0, $503 = 0, $504 = 0.0, $505 = 0.0, $506 = 0.0, $507 = 0, $508 = 0.0, $509 = 0;
|
|
var $51 = 0, $510 = 0, $511 = 0.0, $512 = 0.0, $513 = 0, $514 = 0, $515 = 0.0, $516 = 0.0, $517 = 0, $518 = 0, $519 = 0.0, $52 = 0, $520 = 0.0, $521 = 0.0, $522 = 0.0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0;
|
|
var $528 = 0.0, $529 = 0.0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0.0;
|
|
var $546 = 0.0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0.0, $551 = 0.0, $552 = 0, $553 = 0, $554 = 0.0, $555 = 0.0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0.0, $563 = 0;
|
|
var $564 = 0.0, $565 = 0.0, $566 = 0, $567 = 0, $568 = 0.0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0.0, $573 = 0.0, $574 = 0.0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0;
|
|
var $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0;
|
|
var $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0;
|
|
var $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0.0, $627 = 0, $628 = 0, $629 = 0.0, $63 = 0, $630 = 0.0, $631 = 0.0, $632 = 0, $633 = 0, $634 = 0, $635 = 0.0;
|
|
var $636 = 0, $637 = 0, $638 = 0.0, $639 = 0.0, $64 = 0, $640 = 0, $641 = 0, $642 = 0.0, $643 = 0.0, $644 = 0, $645 = 0, $646 = 0.0, $647 = 0, $648 = 0, $649 = 0, $65 = 0.0, $650 = 0.0, $651 = 0.0, $652 = 0, $653 = 0;
|
|
var $654 = 0.0, $655 = 0.0, $656 = 0, $657 = 0, $658 = 0, $659 = 0.0, $66 = 0, $660 = 0, $661 = 0, $662 = 0.0, $663 = 0.0, $664 = 0, $665 = 0, $666 = 0.0, $667 = 0.0, $668 = 0, $669 = 0, $67 = 0, $670 = 0.0, $671 = 0;
|
|
var $672 = 0, $673 = 0, $674 = 0.0, $675 = 0, $676 = 0, $677 = 0.0, $678 = 0.0, $679 = 0.0, $68 = 0.0, $680 = 0, $681 = 0, $682 = 0, $683 = 0.0, $684 = 0, $685 = 0, $686 = 0.0, $687 = 0.0, $688 = 0.0, $689 = 0, $69 = 0.0;
|
|
var $690 = 0, $691 = 0.0, $692 = 0, $693 = 0, $694 = 0, $695 = 0.0, $696 = 0.0, $697 = 0, $698 = 0, $699 = 0.0, $7 = 0, $70 = 0, $700 = 0.0, $701 = 0, $702 = 0, $703 = 0, $704 = 0.0, $705 = 0, $706 = 0, $707 = 0.0;
|
|
var $708 = 0.0, $709 = 0.0, $71 = 0, $710 = 0, $711 = 0, $712 = 0.0, $713 = 0, $714 = 0, $715 = 0, $716 = 0.0, $717 = 0, $718 = 0, $719 = 0.0, $72 = 0, $720 = 0.0, $721 = 0.0, $722 = 0.0, $723 = 0, $724 = 0, $725 = 0.0;
|
|
var $726 = 0.0, $727 = 0, $728 = 0, $729 = 0.0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0.0, $734 = 0.0, $735 = 0, $736 = 0, $737 = 0.0, $738 = 0.0, $739 = 0.0, $74 = 0, $740 = 0, $741 = 0, $742 = 0.0, $743 = 0.0;
|
|
var $744 = 0, $745 = 0, $746 = 0.0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0.0, $751 = 0, $752 = 0, $753 = 0.0, $754 = 0.0, $755 = 0.0, $756 = 0, $757 = 0, $758 = 0, $759 = 0.0, $76 = 0, $760 = 0, $761 = 0;
|
|
var $762 = 0.0, $763 = 0.0, $764 = 0.0, $765 = 0, $766 = 0, $767 = 0.0, $768 = 0, $769 = 0, $77 = 0, $770 = 0.0, $771 = 0.0, $772 = 0.0, $773 = 0.0, $774 = 0, $775 = 0, $776 = 0.0, $777 = 0.0, $778 = 0, $779 = 0, $78 = 0;
|
|
var $780 = 0.0, $781 = 0, $782 = 0, $783 = 0, $784 = 0.0, $785 = 0, $786 = 0, $787 = 0, $788 = 0.0, $789 = 0.0, $79 = 0, $790 = 0, $791 = 0, $792 = 0.0, $793 = 0.0, $794 = 0, $795 = 0, $796 = 0, $797 = 0.0, $798 = 0;
|
|
var $799 = 0, $8 = 0, $80 = 0.0, $800 = 0.0, $801 = 0.0, $802 = 0.0, $803 = 0, $804 = 0, $805 = 0.0, $806 = 0, $807 = 0, $808 = 0, $809 = 0.0, $81 = 0, $810 = 0.0, $811 = 0, $812 = 0, $813 = 0.0, $814 = 0.0, $815 = 0.0;
|
|
var $816 = 0, $817 = 0, $818 = 0.0, $819 = 0.0, $82 = 0, $820 = 0, $821 = 0, $822 = 0.0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0.0;
|
|
var $834 = 0.0, $835 = 0.0, $836 = 0, $837 = 0.0, $838 = 0.0, $839 = 0.0, $84 = 0.0, $840 = 0.0, $841 = 0, $842 = 0.0, $843 = 0, $844 = 0.0, $845 = 0.0, $846 = 0, $847 = 0, $848 = 0.0, $849 = 0, $85 = 0.0, $850 = 0.0, $851 = 0.0;
|
|
var $852 = 0.0, $853 = 0, $854 = 0, $855 = 0.0, $856 = 0, $857 = 0, $858 = 0, $859 = 0.0, $86 = 0, $860 = 0.0, $861 = 0.0, $862 = 0.0, $863 = 0.0, $864 = 0.0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0;
|
|
var $870 = 0.0, $871 = 0, $872 = 0, $873 = 0.0, $874 = 0.0, $875 = 0, $876 = 0.0, $877 = 0.0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0.0, $882 = 0, $883 = 0, $884 = 0, $885 = 0.0, $886 = 0.0, $887 = 0, $888 = 0.0;
|
|
var $889 = 0.0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0.0, $898 = 0.0, $899 = 0.0, $9 = 0, $90 = 0.0, $900 = 0.0, $901 = 0, $902 = 0, $903 = 0.0, $904 = 0.0, $905 = 0.0;
|
|
var $906 = 0.0, $907 = 0.0, $908 = 0.0, $909 = 0.0, $91 = 0, $910 = 0.0, $911 = 0.0, $912 = 0.0, $913 = 0.0, $914 = 0.0, $915 = 0.0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0;
|
|
var $924 = 0, $925 = 0, $926 = 0.0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0.0, $932 = 0, $933 = 0, $934 = 0, $935 = 0.0, $936 = 0.0, $937 = 0, $938 = 0.0, $939 = 0.0, $94 = 0.0, $940 = 0.0, $941 = 0.0;
|
|
var $942 = 0, $943 = 0.0, $944 = 0.0, $945 = 0, $946 = 0.0, $947 = 0.0, $948 = 0.0, $949 = 0.0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0;
|
|
var $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0;
|
|
var $979 = 0, $98 = 0.0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0.0, $985 = 0, $986 = 0, $987 = 0, $988 = 0.0, $989 = 0.0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0.0, $995 = 0, $996 = 0;
|
|
var $997 = 0, $998 = 0, $999 = 0.0, $border = 0, $border$byval_copy = 0, $border$byval_copy5 = 0, $border$byval_copy6 = 0, $border$byval_copy7 = 0, $border$byval_copy8 = 0, $bounds = 0, $bounds$byval_copy = 0, $bounds1 = 0, $bounds1$byval_copy = 0, $bounds2 = 0, $bounds2$byval_copy = 0, $bounds2$byval_copy4 = 0, $delta = 0, $footer = 0, $footer$byval_copy = 0, $in = 0;
|
|
var $incursor = 0, $item_spacing = 0, $layout = 0, $nk_null_rect$byval_copy = 0, $or$cond = 0, $out = 0, $padding_y = 0.0, $prev_x = 0.0, $prev_y = 0.0, $scaler = 0, $scaler_h = 0.0, $scaler_size = 0, $scaler_w = 0.0, $scaler_x = 0.0, $scaler_y = 0.0, $scroll_has_scrolling = 0, $scroll_inc = 0.0, $scroll_offset = 0.0, $scroll_step = 0.0, $scroll_target = 0.0;
|
|
var $scrollbar_size = 0, $state = 0, $state3 = 0, $style = 0, $window = 0, $window_padding = 0, $window_size = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 416|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy11 = sp + 360|0;
|
|
$$byval_copy10 = sp + 412|0;
|
|
$$byval_copy9 = sp + 344|0;
|
|
$border$byval_copy8 = sp + 408|0;
|
|
$border$byval_copy7 = sp + 404|0;
|
|
$border$byval_copy6 = sp + 400|0;
|
|
$border$byval_copy5 = sp + 396|0;
|
|
$border$byval_copy = sp + 392|0;
|
|
$bounds2$byval_copy4 = sp + 328|0;
|
|
$bounds2$byval_copy = sp + 312|0;
|
|
$$byval_copy3 = sp + 388|0;
|
|
$bounds1$byval_copy = sp + 296|0;
|
|
$$byval_copy2 = sp + 384|0;
|
|
$footer$byval_copy = sp + 280|0;
|
|
$$byval_copy = sp + 380|0;
|
|
$bounds$byval_copy = sp + 264|0;
|
|
$nk_null_rect$byval_copy = sp + 248|0;
|
|
$scrollbar_size = sp + 216|0;
|
|
$scaler_size = sp + 208|0;
|
|
$item_spacing = sp + 200|0;
|
|
$window_padding = sp + 192|0;
|
|
$footer = sp + 176|0;
|
|
$bounds = sp + 160|0;
|
|
$bounds1 = sp + 144|0;
|
|
$bounds2 = sp + 128|0;
|
|
$state = sp + 100|0;
|
|
$state3 = sp + 96|0;
|
|
$border = sp + 376|0;
|
|
$1 = sp + 56|0;
|
|
$delta = sp + 48|0;
|
|
$window_size = sp + 32|0;
|
|
$2 = sp + 16|0;
|
|
$3 = sp + 8|0;
|
|
$4 = sp;
|
|
$0 = $ctx;
|
|
;HEAP32[$footer>>2]=0|0;HEAP32[$footer+4>>2]=0|0;HEAP32[$footer+8>>2]=0|0;HEAP32[$footer+12>>2]=0|0;
|
|
$5 = $0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((14913|0),(13400|0),15761,(31404|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $0;
|
|
$8 = ((($7)) + 11168|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((28537|0),(13400|0),15762,(31404|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $0;
|
|
$12 = ((($11)) + 11168|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ((($13)) + 72|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($15|0)!=(0|0);
|
|
if (!($16)) {
|
|
___assert_fail((28516|0),(13400|0),15763,(31404|0));
|
|
// unreachable;
|
|
}
|
|
$17 = $0;
|
|
$18 = ($17|0)!=(0|0);
|
|
if (!($18)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$19 = $0;
|
|
$20 = ((($19)) + 11168|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = ($21|0)!=(0|0);
|
|
if (!($22)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$23 = $0;
|
|
$24 = ((($23)) + 11168|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = ((($25)) + 72|0);
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = ($27|0)!=(0|0);
|
|
if (!($28)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$29 = $0;
|
|
$30 = ((($29)) + 11168|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$window = $31;
|
|
$32 = $window;
|
|
$33 = ((($32)) + 72|0);
|
|
$34 = HEAP32[$33>>2]|0;
|
|
$layout = $34;
|
|
$35 = $0;
|
|
$36 = ((($35)) + 300|0);
|
|
$style = $36;
|
|
$37 = $window;
|
|
$38 = ((($37)) + 32|0);
|
|
$out = $38;
|
|
$39 = $layout;
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$41 = $40 & 1024;
|
|
$42 = ($41|0)!=(0);
|
|
$43 = $0;
|
|
$44 = $42 ? 0 : $43;
|
|
$in = $44;
|
|
$45 = $layout;
|
|
$46 = HEAP32[$45>>2]|0;
|
|
$47 = $46 & 8192;
|
|
$48 = ($47|0)!=(0);
|
|
if (!($48)) {
|
|
$49 = $out;
|
|
;HEAP32[$nk_null_rect$byval_copy>>2]=HEAP32[8>>2]|0;HEAP32[$nk_null_rect$byval_copy+4>>2]=HEAP32[8+4>>2]|0;HEAP32[$nk_null_rect$byval_copy+8>>2]=HEAP32[8+8>>2]|0;HEAP32[$nk_null_rect$byval_copy+12>>2]=HEAP32[8+12>>2]|0;
|
|
_nk_push_scissor($49,$nk_null_rect$byval_copy);
|
|
}
|
|
$50 = $style;
|
|
$51 = ((($50)) + 4784|0);
|
|
$52 = ((($51)) + 488|0);
|
|
;HEAP32[$item_spacing>>2]=HEAP32[$52>>2]|0;HEAP32[$item_spacing+4>>2]=HEAP32[$52+4>>2]|0;
|
|
$53 = $style;
|
|
$54 = ((($53)) + 4784|0);
|
|
$55 = ((($54)) + 480|0);
|
|
;HEAP32[$window_padding>>2]=HEAP32[$55>>2]|0;HEAP32[$window_padding+4>>2]=HEAP32[$55+4>>2]|0;
|
|
$56 = $style;
|
|
$57 = ((($56)) + 4784|0);
|
|
$58 = ((($57)) + 496|0);
|
|
;HEAP32[$scrollbar_size>>2]=HEAP32[$58>>2]|0;HEAP32[$scrollbar_size+4>>2]=HEAP32[$58+4>>2]|0;
|
|
$59 = $style;
|
|
$60 = ((($59)) + 4784|0);
|
|
$61 = ((($60)) + 472|0);
|
|
;HEAP32[$scaler_size>>2]=HEAP32[$61>>2]|0;HEAP32[$scaler_size+4>>2]=HEAP32[$61+4>>2]|0;
|
|
$62 = $layout;
|
|
$63 = ((($62)) + 92|0);
|
|
$64 = ((($63)) + 8|0);
|
|
$65 = +HEAPF32[$64>>2];
|
|
$66 = $layout;
|
|
$67 = ((($66)) + 28|0);
|
|
$68 = +HEAPF32[$67>>2];
|
|
$69 = $68 + $65;
|
|
HEAPF32[$67>>2] = $69;
|
|
$70 = $layout;
|
|
$71 = HEAP32[$70>>2]|0;
|
|
$72 = $71 & 64;
|
|
$73 = ($72|0)!=(0);
|
|
do {
|
|
if ($73) {
|
|
$74 = $layout;
|
|
$75 = HEAP32[$74>>2]|0;
|
|
$76 = $75 & 4096;
|
|
$77 = ($76|0)!=(0);
|
|
if (!($77)) {
|
|
$78 = $layout;
|
|
$79 = ((($78)) + 28|0);
|
|
$80 = +HEAPF32[$79>>2];
|
|
$81 = $layout;
|
|
$82 = ((($81)) + 4|0);
|
|
$83 = ((($82)) + 4|0);
|
|
$84 = +HEAPF32[$83>>2];
|
|
$85 = $80 - $84;
|
|
$86 = $layout;
|
|
$87 = ((($86)) + 40|0);
|
|
HEAPF32[$87>>2] = $85;
|
|
$88 = $layout;
|
|
$89 = ((($88)) + 40|0);
|
|
$90 = +HEAPF32[$89>>2];
|
|
$91 = $layout;
|
|
$92 = ((($91)) + 4|0);
|
|
$93 = ((($92)) + 12|0);
|
|
$94 = +HEAPF32[$93>>2];
|
|
$95 = $90 < $94;
|
|
$96 = $layout;
|
|
if ($95) {
|
|
$97 = ((($96)) + 40|0);
|
|
$98 = +HEAPF32[$97>>2];
|
|
$104 = $98;
|
|
} else {
|
|
$99 = ((($96)) + 4|0);
|
|
$100 = ((($99)) + 12|0);
|
|
$101 = +HEAPF32[$100>>2];
|
|
$104 = $101;
|
|
}
|
|
$102 = $layout;
|
|
$103 = ((($102)) + 40|0);
|
|
HEAPF32[$103>>2] = $104;
|
|
$105 = $layout;
|
|
$106 = ((($105)) + 20|0);
|
|
$107 = HEAP32[$106>>2]|0;
|
|
$108 = HEAP16[$107>>1]|0;
|
|
$109 = $108&65535;
|
|
$110 = ($109|0)==(0);
|
|
if (!($110)) {
|
|
$111 = $layout;
|
|
$112 = HEAP32[$111>>2]|0;
|
|
$113 = $112 & 128;
|
|
$114 = ($113|0)!=(0);
|
|
if (!($114)) {
|
|
$172 = $window;
|
|
$173 = ((($172)) + 12|0);
|
|
$174 = +HEAPF32[$173>>2];
|
|
HEAPF32[$footer>>2] = $174;
|
|
$175 = $window;
|
|
$176 = ((($175)) + 12|0);
|
|
$177 = ((($176)) + 8|0);
|
|
$178 = +HEAPF32[$177>>2];
|
|
$179 = +HEAPF32[$scrollbar_size>>2];
|
|
$180 = $178 + $179;
|
|
$181 = ((($footer)) + 8|0);
|
|
HEAPF32[$181>>2] = $180;
|
|
$182 = $layout;
|
|
$183 = ((($182)) + 44|0);
|
|
$184 = +HEAPF32[$183>>2];
|
|
$185 = ((($footer)) + 12|0);
|
|
HEAPF32[$185>>2] = $184;
|
|
$186 = $layout;
|
|
$187 = HEAP32[$186>>2]|0;
|
|
$188 = $187 & 262144;
|
|
$189 = ($188|0)!=(0);
|
|
if ($189) {
|
|
label = 25;
|
|
} else {
|
|
$190 = $layout;
|
|
$191 = HEAP32[$190>>2]|0;
|
|
$192 = $191 & 524288;
|
|
$193 = ($192|0)!=(0);
|
|
if ($193) {
|
|
label = 25;
|
|
} else {
|
|
$194 = $layout;
|
|
$195 = HEAP32[$194>>2]|0;
|
|
$196 = $195 & 131072;
|
|
$197 = ($196|0)!=(0);
|
|
if ($197) {
|
|
label = 25;
|
|
} else {
|
|
$207 = $window;
|
|
$208 = ((($207)) + 12|0);
|
|
$209 = ((($208)) + 4|0);
|
|
$210 = +HEAPF32[$209>>2];
|
|
$211 = $layout;
|
|
$212 = ((($211)) + 40|0);
|
|
$213 = +HEAPF32[$212>>2];
|
|
$214 = $210 + $213;
|
|
$215 = $layout;
|
|
$216 = ((($215)) + 44|0);
|
|
$217 = +HEAPF32[$216>>2];
|
|
$218 = $214 + $217;
|
|
$219 = ((($footer)) + 4|0);
|
|
HEAPF32[$219>>2] = $218;
|
|
}
|
|
}
|
|
}
|
|
if ((label|0) == 25) {
|
|
$198 = $window;
|
|
$199 = ((($198)) + 12|0);
|
|
$200 = ((($199)) + 4|0);
|
|
$201 = +HEAPF32[$200>>2];
|
|
$202 = $layout;
|
|
$203 = ((($202)) + 40|0);
|
|
$204 = +HEAPF32[$203>>2];
|
|
$205 = $201 + $204;
|
|
$206 = ((($footer)) + 4|0);
|
|
HEAPF32[$206>>2] = $205;
|
|
}
|
|
$220 = $out;
|
|
$221 = $style;
|
|
$222 = ((($221)) + 4784|0);
|
|
$223 = ((($222)) + 388|0);
|
|
;HEAP32[$footer$byval_copy>>2]=HEAP32[$footer>>2]|0;HEAP32[$footer$byval_copy+4>>2]=HEAP32[$footer+4>>2]|0;HEAP32[$footer$byval_copy+8>>2]=HEAP32[$footer+8>>2]|0;HEAP32[$footer$byval_copy+12>>2]=HEAP32[$footer+12>>2]|0;
|
|
;HEAP8[$$byval_copy2>>0]=HEAP8[$223>>0]|0;HEAP8[$$byval_copy2+1>>0]=HEAP8[$223+1>>0]|0;HEAP8[$$byval_copy2+2>>0]=HEAP8[$223+2>>0]|0;HEAP8[$$byval_copy2+3>>0]=HEAP8[$223+3>>0]|0;
|
|
_nk_fill_rect($220,$footer$byval_copy,0.0,$$byval_copy2);
|
|
$224 = $layout;
|
|
$225 = HEAP32[$224>>2]|0;
|
|
$226 = $225 & 262144;
|
|
$227 = ($226|0)!=(0);
|
|
if ($227) {
|
|
break;
|
|
}
|
|
$228 = $layout;
|
|
$229 = HEAP32[$228>>2]|0;
|
|
$230 = $229 & 524288;
|
|
$231 = ($230|0)!=(0);
|
|
if ($231) {
|
|
break;
|
|
}
|
|
$232 = $layout;
|
|
$233 = ((($232)) + 4|0);
|
|
$234 = +HEAPF32[$233>>2];
|
|
HEAPF32[$bounds1>>2] = $234;
|
|
$235 = $window;
|
|
$236 = ((($235)) + 12|0);
|
|
$237 = ((($236)) + 4|0);
|
|
$238 = +HEAPF32[$237>>2];
|
|
$239 = $layout;
|
|
$240 = ((($239)) + 40|0);
|
|
$241 = +HEAPF32[$240>>2];
|
|
$242 = $238 + $241;
|
|
$243 = ((($bounds1)) + 4|0);
|
|
HEAPF32[$243>>2] = $242;
|
|
$244 = $layout;
|
|
$245 = ((($244)) + 4|0);
|
|
$246 = ((($245)) + 8|0);
|
|
$247 = +HEAPF32[$246>>2];
|
|
$248 = ((($bounds1)) + 8|0);
|
|
HEAPF32[$248>>2] = $247;
|
|
$249 = $layout;
|
|
$250 = ((($249)) + 92|0);
|
|
$251 = ((($250)) + 8|0);
|
|
$252 = +HEAPF32[$251>>2];
|
|
$253 = ((($bounds1)) + 12|0);
|
|
HEAPF32[$253>>2] = $252;
|
|
$254 = $out;
|
|
$255 = $style;
|
|
$256 = ((($255)) + 4784|0);
|
|
$257 = ((($256)) + 388|0);
|
|
;HEAP32[$bounds1$byval_copy>>2]=HEAP32[$bounds1>>2]|0;HEAP32[$bounds1$byval_copy+4>>2]=HEAP32[$bounds1+4>>2]|0;HEAP32[$bounds1$byval_copy+8>>2]=HEAP32[$bounds1+8>>2]|0;HEAP32[$bounds1$byval_copy+12>>2]=HEAP32[$bounds1+12>>2]|0;
|
|
;HEAP8[$$byval_copy3>>0]=HEAP8[$257>>0]|0;HEAP8[$$byval_copy3+1>>0]=HEAP8[$257+1>>0]|0;HEAP8[$$byval_copy3+2>>0]=HEAP8[$257+2>>0]|0;HEAP8[$$byval_copy3+3>>0]=HEAP8[$257+3>>0]|0;
|
|
_nk_fill_rect($254,$bounds1$byval_copy,0.0,$$byval_copy3);
|
|
break;
|
|
}
|
|
}
|
|
$115 = $window;
|
|
$116 = ((($115)) + 12|0);
|
|
$117 = +HEAPF32[$116>>2];
|
|
HEAPF32[$footer>>2] = $117;
|
|
$118 = $window;
|
|
$119 = ((($118)) + 12|0);
|
|
$120 = ((($119)) + 4|0);
|
|
$121 = +HEAPF32[$120>>2];
|
|
$122 = $layout;
|
|
$123 = ((($122)) + 40|0);
|
|
$124 = +HEAPF32[$123>>2];
|
|
$125 = $121 + $124;
|
|
$126 = ((($item_spacing)) + 4|0);
|
|
$127 = +HEAPF32[$126>>2];
|
|
$128 = $125 + $127;
|
|
$129 = ((($footer)) + 4|0);
|
|
HEAPF32[$129>>2] = $128;
|
|
$130 = $window;
|
|
$131 = ((($130)) + 12|0);
|
|
$132 = ((($131)) + 8|0);
|
|
$133 = +HEAPF32[$132>>2];
|
|
$134 = +HEAPF32[$scrollbar_size>>2];
|
|
$135 = $133 + $134;
|
|
$136 = ((($footer)) + 8|0);
|
|
HEAPF32[$136>>2] = $135;
|
|
$137 = $layout;
|
|
$138 = ((($137)) + 44|0);
|
|
HEAPF32[$138>>2] = 0.0;
|
|
$139 = ((($footer)) + 12|0);
|
|
HEAPF32[$139>>2] = 0.0;
|
|
$140 = $layout;
|
|
$141 = ((($140)) + 20|0);
|
|
$142 = HEAP32[$141>>2]|0;
|
|
$143 = HEAP16[$142>>1]|0;
|
|
$144 = $143&65535;
|
|
$145 = ($144|0)==(0);
|
|
if ($145) {
|
|
$146 = $layout;
|
|
$147 = HEAP32[$146>>2]|0;
|
|
$148 = $147 & 128;
|
|
$149 = ($148|0)!=(0);
|
|
if (!($149)) {
|
|
$150 = $layout;
|
|
$151 = ((($150)) + 4|0);
|
|
$152 = +HEAPF32[$151>>2];
|
|
$153 = $layout;
|
|
$154 = ((($153)) + 36|0);
|
|
$155 = +HEAPF32[$154>>2];
|
|
$156 = $152 + $155;
|
|
HEAPF32[$bounds>>2] = $156;
|
|
$157 = $layout;
|
|
$158 = ((($157)) + 56|0);
|
|
$159 = ((($158)) + 4|0);
|
|
$160 = +HEAPF32[$159>>2];
|
|
$161 = ((($bounds)) + 4|0);
|
|
HEAPF32[$161>>2] = $160;
|
|
$162 = +HEAPF32[$scrollbar_size>>2];
|
|
$163 = ((($bounds)) + 8|0);
|
|
HEAPF32[$163>>2] = $162;
|
|
$164 = $layout;
|
|
$165 = ((($164)) + 40|0);
|
|
$166 = +HEAPF32[$165>>2];
|
|
$167 = ((($bounds)) + 12|0);
|
|
HEAPF32[$167>>2] = $166;
|
|
$168 = $out;
|
|
$169 = $style;
|
|
$170 = ((($169)) + 4784|0);
|
|
$171 = ((($170)) + 388|0);
|
|
;HEAP32[$bounds$byval_copy>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
;HEAP8[$$byval_copy>>0]=HEAP8[$171>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$171+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$171+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$171+3>>0]|0;
|
|
_nk_fill_rect($168,$bounds$byval_copy,0.0,$$byval_copy);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$258 = $layout;
|
|
$259 = HEAP32[$258>>2]|0;
|
|
$260 = $259 & 128;
|
|
$261 = ($260|0)!=(0);
|
|
if (!($261)) {
|
|
$262 = $layout;
|
|
$263 = HEAP32[$262>>2]|0;
|
|
$264 = $263 & 4096;
|
|
$265 = ($264|0)!=(0);
|
|
if (!($265)) {
|
|
HEAP32[$state>>2] = 0;
|
|
$266 = $layout;
|
|
$267 = ((($266)) + 4|0);
|
|
$268 = +HEAPF32[$267>>2];
|
|
$269 = $layout;
|
|
$270 = ((($269)) + 36|0);
|
|
$271 = +HEAPF32[$270>>2];
|
|
$272 = $268 + $271;
|
|
HEAPF32[$bounds2>>2] = $272;
|
|
$273 = $layout;
|
|
$274 = ((($273)) + 4|0);
|
|
$275 = ((($274)) + 4|0);
|
|
$276 = +HEAPF32[$275>>2];
|
|
$277 = $layout;
|
|
$278 = ((($277)) + 48|0);
|
|
$279 = +HEAPF32[$278>>2];
|
|
$280 = $276 + $279;
|
|
$281 = $style;
|
|
$282 = ((($281)) + 4784|0);
|
|
$283 = ((($282)) + 480|0);
|
|
$284 = ((($283)) + 4|0);
|
|
$285 = +HEAPF32[$284>>2];
|
|
$286 = $280 + $285;
|
|
$287 = $layout;
|
|
$288 = ((($287)) + 72|0);
|
|
$289 = ((($288)) + 12|0);
|
|
$290 = +HEAPF32[$289>>2];
|
|
$291 = $286 + $290;
|
|
$292 = ((($bounds2)) + 4|0);
|
|
HEAPF32[$292>>2] = $291;
|
|
$293 = ((($scrollbar_size)) + 4|0);
|
|
$294 = +HEAPF32[$293>>2];
|
|
$295 = ((($bounds2)) + 8|0);
|
|
HEAPF32[$295>>2] = $294;
|
|
$296 = $layout;
|
|
$297 = ((($296)) + 4|0);
|
|
$298 = ((($297)) + 12|0);
|
|
$299 = +HEAPF32[$298>>2];
|
|
$300 = $layout;
|
|
$301 = ((($300)) + 44|0);
|
|
$302 = +HEAPF32[$301>>2];
|
|
$303 = $layout;
|
|
$304 = ((($303)) + 48|0);
|
|
$305 = +HEAPF32[$304>>2];
|
|
$306 = $302 + $305;
|
|
$307 = $layout;
|
|
$308 = ((($307)) + 72|0);
|
|
$309 = ((($308)) + 12|0);
|
|
$310 = +HEAPF32[$309>>2];
|
|
$311 = $306 + $310;
|
|
$312 = $299 - $311;
|
|
$313 = ((($bounds2)) + 12|0);
|
|
HEAPF32[$313>>2] = $312;
|
|
$314 = ((($window_padding)) + 4|0);
|
|
$315 = +HEAPF32[$314>>2];
|
|
$316 = 2.0 * $315;
|
|
$317 = ((($bounds2)) + 12|0);
|
|
$318 = +HEAPF32[$317>>2];
|
|
$319 = $318 - $316;
|
|
HEAPF32[$317>>2] = $319;
|
|
$320 = $layout;
|
|
$321 = HEAP32[$320>>2]|0;
|
|
$322 = $321 & 1;
|
|
$323 = ($322|0)!=(0);
|
|
if ($323) {
|
|
$324 = $layout;
|
|
$325 = ((($324)) + 52|0);
|
|
$326 = +HEAPF32[$325>>2];
|
|
$327 = +HEAPF32[$bounds2>>2];
|
|
$328 = $327 - $326;
|
|
HEAPF32[$bounds2>>2] = $328;
|
|
}
|
|
$329 = $layout;
|
|
$330 = ((($329)) + 72|0);
|
|
$331 = ((($330)) + 12|0);
|
|
$332 = +HEAPF32[$331>>2];
|
|
$333 = $332 != 0.0;
|
|
if ($333) {
|
|
$334 = $layout;
|
|
$335 = ((($334)) + 72|0);
|
|
$336 = ((($335)) + 12|0);
|
|
$337 = +HEAPF32[$336>>2];
|
|
$338 = ((($bounds2)) + 4|0);
|
|
$339 = +HEAPF32[$338>>2];
|
|
$340 = $339 + $337;
|
|
HEAPF32[$338>>2] = $340;
|
|
$341 = $layout;
|
|
$342 = ((($341)) + 72|0);
|
|
$343 = ((($342)) + 12|0);
|
|
$344 = +HEAPF32[$343>>2];
|
|
$345 = $layout;
|
|
$346 = ((($345)) + 92|0);
|
|
$347 = ((($346)) + 8|0);
|
|
$348 = +HEAPF32[$347>>2];
|
|
$349 = $344 + $348;
|
|
$350 = ((($bounds2)) + 12|0);
|
|
$351 = +HEAPF32[$350>>2];
|
|
$352 = $351 - $349;
|
|
HEAPF32[$350>>2] = $352;
|
|
}
|
|
$353 = $layout;
|
|
$354 = ((($353)) + 20|0);
|
|
$355 = HEAP32[$354>>2]|0;
|
|
$356 = ((($355)) + 2|0);
|
|
$357 = HEAP16[$356>>1]|0;
|
|
$358 = (+($357&65535));
|
|
$scroll_offset = $358;
|
|
$359 = ((($bounds2)) + 12|0);
|
|
$360 = +HEAPF32[$359>>2];
|
|
$361 = $360 * 0.10000000149011612;
|
|
$scroll_step = $361;
|
|
$362 = ((($bounds2)) + 12|0);
|
|
$363 = +HEAPF32[$362>>2];
|
|
$364 = $363 * 0.0099999997764825821;
|
|
$scroll_inc = $364;
|
|
$365 = $layout;
|
|
$366 = ((($365)) + 28|0);
|
|
$367 = +HEAPF32[$366>>2];
|
|
$368 = ((($bounds2)) + 4|0);
|
|
$369 = +HEAPF32[$368>>2];
|
|
$370 = $367 - $369;
|
|
$371 = (~~(($370)));
|
|
$372 = (+($371|0));
|
|
$scroll_target = $372;
|
|
$373 = $window;
|
|
$374 = $0;
|
|
$375 = ((($374)) + 11164|0);
|
|
$376 = HEAP32[$375>>2]|0;
|
|
$377 = ($373|0)==($376|0);
|
|
$378 = $377&1;
|
|
$scroll_has_scrolling = $378;
|
|
$379 = $out;
|
|
$380 = $scroll_has_scrolling;
|
|
$381 = $scroll_offset;
|
|
$382 = $scroll_target;
|
|
$383 = $scroll_step;
|
|
$384 = $scroll_inc;
|
|
$385 = $0;
|
|
$386 = ((($385)) + 300|0);
|
|
$387 = ((($386)) + 3516|0);
|
|
$388 = $in;
|
|
$389 = $style;
|
|
;HEAP32[$bounds2$byval_copy>>2]=HEAP32[$bounds2>>2]|0;HEAP32[$bounds2$byval_copy+4>>2]=HEAP32[$bounds2+4>>2]|0;HEAP32[$bounds2$byval_copy+8>>2]=HEAP32[$bounds2+8>>2]|0;HEAP32[$bounds2$byval_copy+12>>2]=HEAP32[$bounds2+12>>2]|0;
|
|
$390 = (+_nk_do_scrollbarv($state,$379,$bounds2$byval_copy,$380,$381,$382,$383,$384,$387,$388,$389));
|
|
$scroll_offset = $390;
|
|
$391 = $scroll_offset;
|
|
$392 = (~~(($391))&65535);
|
|
$393 = $layout;
|
|
$394 = ((($393)) + 20|0);
|
|
$395 = HEAP32[$394>>2]|0;
|
|
$396 = ((($395)) + 2|0);
|
|
HEAP16[$396>>1] = $392;
|
|
HEAP32[$state3>>2] = 0;
|
|
$397 = $layout;
|
|
$398 = ((($397)) + 4|0);
|
|
$399 = +HEAPF32[$398>>2];
|
|
$400 = +HEAPF32[$window_padding>>2];
|
|
$401 = $399 + $400;
|
|
HEAPF32[$bounds2>>2] = $401;
|
|
$402 = $layout;
|
|
$403 = HEAP32[$402>>2]|0;
|
|
$404 = $403 & 8192;
|
|
$405 = ($404|0)!=(0);
|
|
do {
|
|
if ($405) {
|
|
$406 = +HEAPF32[$scrollbar_size>>2];
|
|
$407 = ((($bounds2)) + 12|0);
|
|
HEAPF32[$407>>2] = $406;
|
|
$408 = $layout;
|
|
$409 = HEAP32[$408>>2]|0;
|
|
$410 = $409 & 1;
|
|
$411 = ($410|0)!=(0);
|
|
$412 = $layout;
|
|
$413 = ((($412)) + 4|0);
|
|
$414 = ((($413)) + 4|0);
|
|
$415 = +HEAPF32[$414>>2];
|
|
$416 = $415 + 1.0;
|
|
$417 = $411 ? $416 : $415;
|
|
$418 = ((($bounds2)) + 4|0);
|
|
HEAPF32[$418>>2] = $417;
|
|
$419 = $layout;
|
|
$420 = ((($419)) + 48|0);
|
|
$421 = +HEAPF32[$420>>2];
|
|
$422 = $layout;
|
|
$423 = ((($422)) + 72|0);
|
|
$424 = ((($423)) + 12|0);
|
|
$425 = +HEAPF32[$424>>2];
|
|
$426 = $421 + $425;
|
|
$427 = $layout;
|
|
$428 = ((($427)) + 40|0);
|
|
$429 = +HEAPF32[$428>>2];
|
|
$430 = $426 + $429;
|
|
$431 = ((($bounds2)) + 4|0);
|
|
$432 = +HEAPF32[$431>>2];
|
|
$433 = $432 + $430;
|
|
HEAPF32[$431>>2] = $433;
|
|
$434 = $layout;
|
|
$435 = ((($434)) + 36|0);
|
|
$436 = +HEAPF32[$435>>2];
|
|
$437 = ((($bounds2)) + 8|0);
|
|
HEAPF32[$437>>2] = $436;
|
|
} else {
|
|
$438 = $layout;
|
|
$439 = HEAP32[$438>>2]|0;
|
|
$440 = $439 & 64;
|
|
$441 = ($440|0)!=(0);
|
|
$442 = +HEAPF32[$scrollbar_size>>2];
|
|
$443 = $layout;
|
|
$444 = ((($443)) + 44|0);
|
|
$445 = +HEAPF32[$444>>2];
|
|
$446 = $442 < $445;
|
|
if ($441) {
|
|
if ($446) {
|
|
$447 = +HEAPF32[$scrollbar_size>>2];
|
|
$452 = $447;
|
|
} else {
|
|
$448 = $layout;
|
|
$449 = ((($448)) + 44|0);
|
|
$450 = +HEAPF32[$449>>2];
|
|
$452 = $450;
|
|
}
|
|
$451 = ((($bounds2)) + 12|0);
|
|
HEAPF32[$451>>2] = $452;
|
|
$453 = $layout;
|
|
$454 = ((($453)) + 4|0);
|
|
$455 = ((($454)) + 8|0);
|
|
$456 = +HEAPF32[$455>>2];
|
|
$457 = ((($bounds2)) + 8|0);
|
|
HEAPF32[$457>>2] = $456;
|
|
$458 = ((($footer)) + 4|0);
|
|
$459 = +HEAPF32[$458>>2];
|
|
$460 = ((($bounds2)) + 4|0);
|
|
HEAPF32[$460>>2] = $459;
|
|
break;
|
|
}
|
|
if ($446) {
|
|
$461 = +HEAPF32[$scrollbar_size>>2];
|
|
$466 = $461;
|
|
} else {
|
|
$462 = $layout;
|
|
$463 = ((($462)) + 44|0);
|
|
$464 = +HEAPF32[$463>>2];
|
|
$466 = $464;
|
|
}
|
|
$465 = ((($bounds2)) + 12|0);
|
|
HEAPF32[$465>>2] = $466;
|
|
$467 = $layout;
|
|
$468 = ((($467)) + 4|0);
|
|
$469 = ((($468)) + 4|0);
|
|
$470 = +HEAPF32[$469>>2];
|
|
$471 = $window;
|
|
$472 = ((($471)) + 12|0);
|
|
$473 = ((($472)) + 12|0);
|
|
$474 = +HEAPF32[$473>>2];
|
|
$475 = $470 + $474;
|
|
$476 = ((($bounds2)) + 4|0);
|
|
HEAPF32[$476>>2] = $475;
|
|
$477 = $layout;
|
|
$478 = ((($477)) + 44|0);
|
|
$479 = +HEAPF32[$478>>2];
|
|
$480 = +HEAPF32[$scrollbar_size>>2];
|
|
$481 = $479 < $480;
|
|
if ($481) {
|
|
$482 = +HEAPF32[$scrollbar_size>>2];
|
|
$489 = $482;
|
|
} else {
|
|
$483 = $layout;
|
|
$484 = ((($483)) + 44|0);
|
|
$485 = +HEAPF32[$484>>2];
|
|
$489 = $485;
|
|
}
|
|
$486 = ((($bounds2)) + 4|0);
|
|
$487 = +HEAPF32[$486>>2];
|
|
$488 = $487 - $489;
|
|
HEAPF32[$486>>2] = $488;
|
|
$490 = $layout;
|
|
$491 = ((($490)) + 36|0);
|
|
$492 = +HEAPF32[$491>>2];
|
|
$493 = +HEAPF32[$window_padding>>2];
|
|
$494 = 2.0 * $493;
|
|
$495 = $492 - $494;
|
|
$496 = ((($bounds2)) + 8|0);
|
|
HEAPF32[$496>>2] = $495;
|
|
}
|
|
} while(0);
|
|
$497 = $layout;
|
|
$498 = ((($497)) + 20|0);
|
|
$499 = HEAP32[$498>>2]|0;
|
|
$500 = HEAP16[$499>>1]|0;
|
|
$501 = (+($500&65535));
|
|
$scroll_offset = $501;
|
|
$502 = $layout;
|
|
$503 = ((($502)) + 32|0);
|
|
$504 = +HEAPF32[$503>>2];
|
|
$505 = +HEAPF32[$bounds2>>2];
|
|
$506 = $504 - $505;
|
|
$507 = (~~(($506)));
|
|
$508 = (+($507|0));
|
|
$scroll_target = $508;
|
|
$509 = $layout;
|
|
$510 = ((($509)) + 32|0);
|
|
$511 = +HEAPF32[$510>>2];
|
|
$512 = $511 * 0.05000000074505806;
|
|
$scroll_step = $512;
|
|
$513 = $layout;
|
|
$514 = ((($513)) + 32|0);
|
|
$515 = +HEAPF32[$514>>2];
|
|
$516 = $515 * 0.004999999888241291;
|
|
$scroll_inc = $516;
|
|
$scroll_has_scrolling = 0;
|
|
$517 = $out;
|
|
$518 = $scroll_has_scrolling;
|
|
$519 = $scroll_offset;
|
|
$520 = $scroll_target;
|
|
$521 = $scroll_step;
|
|
$522 = $scroll_inc;
|
|
$523 = $0;
|
|
$524 = ((($523)) + 300|0);
|
|
$525 = ((($524)) + 3084|0);
|
|
$526 = $in;
|
|
$527 = $style;
|
|
;HEAP32[$bounds2$byval_copy4>>2]=HEAP32[$bounds2>>2]|0;HEAP32[$bounds2$byval_copy4+4>>2]=HEAP32[$bounds2+4>>2]|0;HEAP32[$bounds2$byval_copy4+8>>2]=HEAP32[$bounds2+8>>2]|0;HEAP32[$bounds2$byval_copy4+12>>2]=HEAP32[$bounds2+12>>2]|0;
|
|
$528 = (+_nk_do_scrollbarh($state3,$517,$bounds2$byval_copy4,$518,$519,$520,$521,$522,$525,$526,$527));
|
|
$scroll_offset = $528;
|
|
$529 = $scroll_offset;
|
|
$530 = (~~(($529))&65535);
|
|
$531 = $layout;
|
|
$532 = ((($531)) + 20|0);
|
|
$533 = HEAP32[$532>>2]|0;
|
|
HEAP16[$533>>1] = $530;
|
|
}
|
|
}
|
|
$534 = $layout;
|
|
$535 = HEAP32[$534>>2]|0;
|
|
$536 = $535 & 1;
|
|
$537 = ($536|0)!=(0);
|
|
if ($537) {
|
|
$538 = $layout;
|
|
$539 = HEAP32[$538>>2]|0;
|
|
$540 = $539 & 4096;
|
|
$541 = ($540|0)!=(0);
|
|
do {
|
|
if ($541) {
|
|
$542 = $style;
|
|
$543 = ((($542)) + 4784|0);
|
|
$544 = ((($543)) + 444|0);
|
|
$545 = +HEAPF32[$544>>2];
|
|
$546 = 2.0 * $545;
|
|
$547 = $window;
|
|
$548 = ((($547)) + 12|0);
|
|
$549 = ((($548)) + 4|0);
|
|
$550 = +HEAPF32[$549>>2];
|
|
$551 = $546 + $550;
|
|
$552 = $layout;
|
|
$553 = ((($552)) + 48|0);
|
|
$554 = +HEAPF32[$553>>2];
|
|
$555 = $551 + $554;
|
|
$574 = $555;
|
|
} else {
|
|
$556 = $layout;
|
|
$557 = HEAP32[$556>>2]|0;
|
|
$558 = $557 & 64;
|
|
$559 = ($558|0)!=(0);
|
|
$560 = $layout;
|
|
if ($559) {
|
|
$561 = ((($560)) + 44|0);
|
|
$562 = +HEAPF32[$561>>2];
|
|
$563 = ((($footer)) + 4|0);
|
|
$564 = +HEAPF32[$563>>2];
|
|
$565 = $562 + $564;
|
|
$574 = $565;
|
|
break;
|
|
} else {
|
|
$566 = ((($560)) + 4|0);
|
|
$567 = ((($566)) + 4|0);
|
|
$568 = +HEAPF32[$567>>2];
|
|
$569 = $layout;
|
|
$570 = ((($569)) + 4|0);
|
|
$571 = ((($570)) + 12|0);
|
|
$572 = +HEAPF32[$571>>2];
|
|
$573 = $568 + $572;
|
|
$574 = $573;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$padding_y = $574;
|
|
$575 = $layout;
|
|
$576 = HEAP32[$575>>2]|0;
|
|
$577 = $576 & 8192;
|
|
$578 = ($577|0)!=(0);
|
|
do {
|
|
if ($578) {
|
|
$582 = $layout;
|
|
$583 = HEAP32[$582>>2]|0;
|
|
$584 = $583 & 262144;
|
|
$585 = ($584|0)!=(0);
|
|
if ($585) {
|
|
$586 = $style;
|
|
$587 = ((($586)) + 4784|0);
|
|
$588 = ((($587)) + 396|0);
|
|
;HEAP8[$border>>0]=HEAP8[$588>>0]|0;HEAP8[$border+1>>0]=HEAP8[$588+1>>0]|0;HEAP8[$border+2>>0]=HEAP8[$588+2>>0]|0;HEAP8[$border+3>>0]=HEAP8[$588+3>>0]|0;
|
|
break;
|
|
}
|
|
$589 = $layout;
|
|
$590 = HEAP32[$589>>2]|0;
|
|
$591 = $590 & 131072;
|
|
$592 = ($591|0)!=(0);
|
|
if ($592) {
|
|
$593 = $style;
|
|
$594 = ((($593)) + 4784|0);
|
|
$595 = ((($594)) + 400|0);
|
|
;HEAP8[$border>>0]=HEAP8[$595>>0]|0;HEAP8[$border+1>>0]=HEAP8[$595+1>>0]|0;HEAP8[$border+2>>0]=HEAP8[$595+2>>0]|0;HEAP8[$border+3>>0]=HEAP8[$595+3>>0]|0;
|
|
break;
|
|
}
|
|
$596 = $layout;
|
|
$597 = HEAP32[$596>>2]|0;
|
|
$598 = $597 & 524288;
|
|
$599 = ($598|0)!=(0);
|
|
if ($599) {
|
|
$600 = $style;
|
|
$601 = ((($600)) + 4784|0);
|
|
$602 = ((($601)) + 404|0);
|
|
;HEAP8[$border>>0]=HEAP8[$602>>0]|0;HEAP8[$border+1>>0]=HEAP8[$602+1>>0]|0;HEAP8[$border+2>>0]=HEAP8[$602+2>>0]|0;HEAP8[$border+3>>0]=HEAP8[$602+3>>0]|0;
|
|
break;
|
|
}
|
|
$603 = $layout;
|
|
$604 = HEAP32[$603>>2]|0;
|
|
$605 = $604 & 16384;
|
|
$606 = ($605|0)!=(0);
|
|
if ($606) {
|
|
$607 = $style;
|
|
$608 = ((($607)) + 4784|0);
|
|
$609 = ((($608)) + 408|0);
|
|
;HEAP8[$border>>0]=HEAP8[$609>>0]|0;HEAP8[$border+1>>0]=HEAP8[$609+1>>0]|0;HEAP8[$border+2>>0]=HEAP8[$609+2>>0]|0;HEAP8[$border+3>>0]=HEAP8[$609+3>>0]|0;
|
|
break;
|
|
}
|
|
$610 = $layout;
|
|
$611 = HEAP32[$610>>2]|0;
|
|
$612 = $611 & 1048576;
|
|
$613 = ($612|0)!=(0);
|
|
$614 = $style;
|
|
$615 = ((($614)) + 4784|0);
|
|
if ($613) {
|
|
$616 = ((($615)) + 412|0);
|
|
;HEAP8[$border>>0]=HEAP8[$616>>0]|0;HEAP8[$border+1>>0]=HEAP8[$616+1>>0]|0;HEAP8[$border+2>>0]=HEAP8[$616+2>>0]|0;HEAP8[$border+3>>0]=HEAP8[$616+3>>0]|0;
|
|
break;
|
|
} else {
|
|
$617 = ((($615)) + 392|0);
|
|
;HEAP8[$border>>0]=HEAP8[$617>>0]|0;HEAP8[$border+1>>0]=HEAP8[$617+1>>0]|0;HEAP8[$border+2>>0]=HEAP8[$617+2>>0]|0;HEAP8[$border+3>>0]=HEAP8[$617+3>>0]|0;
|
|
break;
|
|
}
|
|
} else {
|
|
$579 = $style;
|
|
$580 = ((($579)) + 4784|0);
|
|
$581 = ((($580)) + 392|0);
|
|
;HEAP8[$border>>0]=HEAP8[$581>>0]|0;HEAP8[$border+1>>0]=HEAP8[$581+1>>0]|0;HEAP8[$border+2>>0]=HEAP8[$581+2>>0]|0;HEAP8[$border+3>>0]=HEAP8[$581+3>>0]|0;
|
|
}
|
|
} while(0);
|
|
$618 = $window;
|
|
$619 = ((($618)) + 8|0);
|
|
$620 = HEAP32[$619>>2]|0;
|
|
$621 = $620 & 2;
|
|
$622 = ($621|0)!=(0);
|
|
if ($622) {
|
|
$623 = $out;
|
|
$624 = $window;
|
|
$625 = ((($624)) + 12|0);
|
|
$626 = +HEAPF32[$625>>2];
|
|
$627 = $layout;
|
|
$628 = ((($627)) + 52|0);
|
|
$629 = +HEAPF32[$628>>2];
|
|
$630 = $629 / 2.0;
|
|
$631 = $626 + $630;
|
|
$632 = $window;
|
|
$633 = ((($632)) + 12|0);
|
|
$634 = ((($633)) + 4|0);
|
|
$635 = +HEAPF32[$634>>2];
|
|
$636 = $layout;
|
|
$637 = ((($636)) + 48|0);
|
|
$638 = +HEAPF32[$637>>2];
|
|
$639 = $635 + $638;
|
|
$640 = $layout;
|
|
$641 = ((($640)) + 52|0);
|
|
$642 = +HEAPF32[$641>>2];
|
|
$643 = $639 - $642;
|
|
$644 = $window;
|
|
$645 = ((($644)) + 12|0);
|
|
$646 = +HEAPF32[$645>>2];
|
|
$647 = $window;
|
|
$648 = ((($647)) + 12|0);
|
|
$649 = ((($648)) + 8|0);
|
|
$650 = +HEAPF32[$649>>2];
|
|
$651 = $646 + $650;
|
|
$652 = $layout;
|
|
$653 = ((($652)) + 52|0);
|
|
$654 = +HEAPF32[$653>>2];
|
|
$655 = $651 - $654;
|
|
$656 = $window;
|
|
$657 = ((($656)) + 12|0);
|
|
$658 = ((($657)) + 4|0);
|
|
$659 = +HEAPF32[$658>>2];
|
|
$660 = $layout;
|
|
$661 = ((($660)) + 48|0);
|
|
$662 = +HEAPF32[$661>>2];
|
|
$663 = $659 + $662;
|
|
$664 = $layout;
|
|
$665 = ((($664)) + 52|0);
|
|
$666 = +HEAPF32[$665>>2];
|
|
$667 = $663 - $666;
|
|
$668 = $layout;
|
|
$669 = ((($668)) + 52|0);
|
|
$670 = +HEAPF32[$669>>2];
|
|
;HEAP8[$border$byval_copy>>0]=HEAP8[$border>>0]|0;HEAP8[$border$byval_copy+1>>0]=HEAP8[$border+1>>0]|0;HEAP8[$border$byval_copy+2>>0]=HEAP8[$border+2>>0]|0;HEAP8[$border$byval_copy+3>>0]=HEAP8[$border+3>>0]|0;
|
|
_nk_stroke_line($623,$631,$643,$655,$667,$670,$border$byval_copy);
|
|
}
|
|
$671 = $out;
|
|
$672 = $window;
|
|
$673 = ((($672)) + 12|0);
|
|
$674 = +HEAPF32[$673>>2];
|
|
$675 = $layout;
|
|
$676 = ((($675)) + 52|0);
|
|
$677 = +HEAPF32[$676>>2];
|
|
$678 = $677 / 2.0;
|
|
$679 = $674 + $678;
|
|
$680 = $window;
|
|
$681 = ((($680)) + 12|0);
|
|
$682 = ((($681)) + 4|0);
|
|
$683 = +HEAPF32[$682>>2];
|
|
$684 = $layout;
|
|
$685 = ((($684)) + 52|0);
|
|
$686 = +HEAPF32[$685>>2];
|
|
$687 = $686 / 2.0;
|
|
$688 = $683 + $687;
|
|
$689 = $window;
|
|
$690 = ((($689)) + 12|0);
|
|
$691 = +HEAPF32[$690>>2];
|
|
$692 = $window;
|
|
$693 = ((($692)) + 12|0);
|
|
$694 = ((($693)) + 8|0);
|
|
$695 = +HEAPF32[$694>>2];
|
|
$696 = $691 + $695;
|
|
$697 = $layout;
|
|
$698 = ((($697)) + 52|0);
|
|
$699 = +HEAPF32[$698>>2];
|
|
$700 = $696 - $699;
|
|
$701 = $window;
|
|
$702 = ((($701)) + 12|0);
|
|
$703 = ((($702)) + 4|0);
|
|
$704 = +HEAPF32[$703>>2];
|
|
$705 = $layout;
|
|
$706 = ((($705)) + 52|0);
|
|
$707 = +HEAPF32[$706>>2];
|
|
$708 = $707 / 2.0;
|
|
$709 = $704 + $708;
|
|
$710 = $layout;
|
|
$711 = ((($710)) + 52|0);
|
|
$712 = +HEAPF32[$711>>2];
|
|
;HEAP8[$border$byval_copy5>>0]=HEAP8[$border>>0]|0;HEAP8[$border$byval_copy5+1>>0]=HEAP8[$border+1>>0]|0;HEAP8[$border$byval_copy5+2>>0]=HEAP8[$border+2>>0]|0;HEAP8[$border$byval_copy5+3>>0]=HEAP8[$border+3>>0]|0;
|
|
_nk_stroke_line($671,$679,$688,$700,$709,$712,$border$byval_copy5);
|
|
$713 = $out;
|
|
$714 = $window;
|
|
$715 = ((($714)) + 12|0);
|
|
$716 = +HEAPF32[$715>>2];
|
|
$717 = $layout;
|
|
$718 = ((($717)) + 52|0);
|
|
$719 = +HEAPF32[$718>>2];
|
|
$720 = $719 / 2.0;
|
|
$721 = $716 + $720;
|
|
$722 = $padding_y;
|
|
$723 = $layout;
|
|
$724 = ((($723)) + 52|0);
|
|
$725 = +HEAPF32[$724>>2];
|
|
$726 = $722 - $725;
|
|
$727 = $window;
|
|
$728 = ((($727)) + 12|0);
|
|
$729 = +HEAPF32[$728>>2];
|
|
$730 = $window;
|
|
$731 = ((($730)) + 12|0);
|
|
$732 = ((($731)) + 8|0);
|
|
$733 = +HEAPF32[$732>>2];
|
|
$734 = $729 + $733;
|
|
$735 = $layout;
|
|
$736 = ((($735)) + 52|0);
|
|
$737 = +HEAPF32[$736>>2];
|
|
$738 = $734 - $737;
|
|
$739 = $padding_y;
|
|
$740 = $layout;
|
|
$741 = ((($740)) + 52|0);
|
|
$742 = +HEAPF32[$741>>2];
|
|
$743 = $739 - $742;
|
|
$744 = $layout;
|
|
$745 = ((($744)) + 52|0);
|
|
$746 = +HEAPF32[$745>>2];
|
|
;HEAP8[$border$byval_copy6>>0]=HEAP8[$border>>0]|0;HEAP8[$border$byval_copy6+1>>0]=HEAP8[$border+1>>0]|0;HEAP8[$border$byval_copy6+2>>0]=HEAP8[$border+2>>0]|0;HEAP8[$border$byval_copy6+3>>0]=HEAP8[$border+3>>0]|0;
|
|
_nk_stroke_line($713,$721,$726,$738,$743,$746,$border$byval_copy6);
|
|
$747 = $out;
|
|
$748 = $window;
|
|
$749 = ((($748)) + 12|0);
|
|
$750 = +HEAPF32[$749>>2];
|
|
$751 = $layout;
|
|
$752 = ((($751)) + 52|0);
|
|
$753 = +HEAPF32[$752>>2];
|
|
$754 = $753 / 2.0;
|
|
$755 = $750 + $754;
|
|
$756 = $window;
|
|
$757 = ((($756)) + 12|0);
|
|
$758 = ((($757)) + 4|0);
|
|
$759 = +HEAPF32[$758>>2];
|
|
$760 = $layout;
|
|
$761 = ((($760)) + 52|0);
|
|
$762 = +HEAPF32[$761>>2];
|
|
$763 = $762 / 2.0;
|
|
$764 = $759 + $763;
|
|
$765 = $window;
|
|
$766 = ((($765)) + 12|0);
|
|
$767 = +HEAPF32[$766>>2];
|
|
$768 = $layout;
|
|
$769 = ((($768)) + 52|0);
|
|
$770 = +HEAPF32[$769>>2];
|
|
$771 = $770 / 2.0;
|
|
$772 = $767 + $771;
|
|
$773 = $padding_y;
|
|
$774 = $layout;
|
|
$775 = ((($774)) + 52|0);
|
|
$776 = +HEAPF32[$775>>2];
|
|
$777 = $773 - $776;
|
|
$778 = $layout;
|
|
$779 = ((($778)) + 52|0);
|
|
$780 = +HEAPF32[$779>>2];
|
|
;HEAP8[$border$byval_copy7>>0]=HEAP8[$border>>0]|0;HEAP8[$border$byval_copy7+1>>0]=HEAP8[$border+1>>0]|0;HEAP8[$border$byval_copy7+2>>0]=HEAP8[$border+2>>0]|0;HEAP8[$border$byval_copy7+3>>0]=HEAP8[$border+3>>0]|0;
|
|
_nk_stroke_line($747,$755,$764,$772,$777,$780,$border$byval_copy7);
|
|
$781 = $out;
|
|
$782 = $window;
|
|
$783 = ((($782)) + 12|0);
|
|
$784 = +HEAPF32[$783>>2];
|
|
$785 = $window;
|
|
$786 = ((($785)) + 12|0);
|
|
$787 = ((($786)) + 8|0);
|
|
$788 = +HEAPF32[$787>>2];
|
|
$789 = $784 + $788;
|
|
$790 = $layout;
|
|
$791 = ((($790)) + 52|0);
|
|
$792 = +HEAPF32[$791>>2];
|
|
$793 = $789 - $792;
|
|
$794 = $window;
|
|
$795 = ((($794)) + 12|0);
|
|
$796 = ((($795)) + 4|0);
|
|
$797 = +HEAPF32[$796>>2];
|
|
$798 = $layout;
|
|
$799 = ((($798)) + 52|0);
|
|
$800 = +HEAPF32[$799>>2];
|
|
$801 = $800 / 2.0;
|
|
$802 = $797 + $801;
|
|
$803 = $window;
|
|
$804 = ((($803)) + 12|0);
|
|
$805 = +HEAPF32[$804>>2];
|
|
$806 = $window;
|
|
$807 = ((($806)) + 12|0);
|
|
$808 = ((($807)) + 8|0);
|
|
$809 = +HEAPF32[$808>>2];
|
|
$810 = $805 + $809;
|
|
$811 = $layout;
|
|
$812 = ((($811)) + 52|0);
|
|
$813 = +HEAPF32[$812>>2];
|
|
$814 = $810 - $813;
|
|
$815 = $padding_y;
|
|
$816 = $layout;
|
|
$817 = ((($816)) + 52|0);
|
|
$818 = +HEAPF32[$817>>2];
|
|
$819 = $815 - $818;
|
|
$820 = $layout;
|
|
$821 = ((($820)) + 52|0);
|
|
$822 = +HEAPF32[$821>>2];
|
|
;HEAP8[$border$byval_copy8>>0]=HEAP8[$border>>0]|0;HEAP8[$border$byval_copy8+1>>0]=HEAP8[$border+1>>0]|0;HEAP8[$border$byval_copy8+2>>0]=HEAP8[$border+2>>0]|0;HEAP8[$border$byval_copy8+3>>0]=HEAP8[$border+3>>0]|0;
|
|
_nk_stroke_line($781,$793,$802,$814,$819,$822,$border$byval_copy8);
|
|
}
|
|
$823 = $layout;
|
|
$824 = HEAP32[$823>>2]|0;
|
|
$825 = $824 & 8;
|
|
$826 = ($825|0)!=(0);
|
|
$827 = $in;
|
|
$828 = ($827|0)!=(0|0);
|
|
$or$cond = $826 & $828;
|
|
L106: do {
|
|
if ($or$cond) {
|
|
$829 = $layout;
|
|
$830 = HEAP32[$829>>2]|0;
|
|
$831 = $830 & 4096;
|
|
$832 = ($831|0)!=(0);
|
|
if (!($832)) {
|
|
$833 = +HEAPF32[$scaler_size>>2];
|
|
$834 = +HEAPF32[$window_padding>>2];
|
|
$835 = $833 - $834;
|
|
$836 = 0.0 < $835;
|
|
if ($836) {
|
|
$837 = +HEAPF32[$scaler_size>>2];
|
|
$838 = +HEAPF32[$window_padding>>2];
|
|
$839 = $837 - $838;
|
|
$840 = $839;
|
|
} else {
|
|
$840 = 0.0;
|
|
}
|
|
$scaler_w = $840;
|
|
$841 = ((($scaler_size)) + 4|0);
|
|
$842 = +HEAPF32[$841>>2];
|
|
$843 = ((($window_padding)) + 4|0);
|
|
$844 = +HEAPF32[$843>>2];
|
|
$845 = $842 - $844;
|
|
$846 = 0.0 < $845;
|
|
if ($846) {
|
|
$847 = ((($scaler_size)) + 4|0);
|
|
$848 = +HEAPF32[$847>>2];
|
|
$849 = ((($window_padding)) + 4|0);
|
|
$850 = +HEAPF32[$849>>2];
|
|
$851 = $848 - $850;
|
|
$852 = $851;
|
|
} else {
|
|
$852 = 0.0;
|
|
}
|
|
$scaler_h = $852;
|
|
$853 = $layout;
|
|
$854 = ((($853)) + 4|0);
|
|
$855 = +HEAPF32[$854>>2];
|
|
$856 = $layout;
|
|
$857 = ((($856)) + 4|0);
|
|
$858 = ((($857)) + 8|0);
|
|
$859 = +HEAPF32[$858>>2];
|
|
$860 = $855 + $859;
|
|
$861 = +HEAPF32[$window_padding>>2];
|
|
$862 = $scaler_w;
|
|
$863 = $861 + $862;
|
|
$864 = $860 - $863;
|
|
$scaler_x = $864;
|
|
$865 = $layout;
|
|
$866 = HEAP32[$865>>2]|0;
|
|
$867 = $866 & 64;
|
|
$868 = ($867|0)!=(0);
|
|
if ($868) {
|
|
$869 = ((($footer)) + 4|0);
|
|
$870 = +HEAPF32[$869>>2];
|
|
$871 = $layout;
|
|
$872 = ((($871)) + 44|0);
|
|
$873 = +HEAPF32[$872>>2];
|
|
$874 = $870 + $873;
|
|
$875 = ((($scaler_size)) + 4|0);
|
|
$876 = +HEAPF32[$875>>2];
|
|
$877 = $874 - $876;
|
|
$scaler_y = $877;
|
|
} else {
|
|
$878 = $layout;
|
|
$879 = ((($878)) + 4|0);
|
|
$880 = ((($879)) + 4|0);
|
|
$881 = +HEAPF32[$880>>2];
|
|
$882 = $layout;
|
|
$883 = ((($882)) + 4|0);
|
|
$884 = ((($883)) + 12|0);
|
|
$885 = +HEAPF32[$884>>2];
|
|
$886 = $881 + $885;
|
|
$887 = ((($scaler_size)) + 4|0);
|
|
$888 = +HEAPF32[$887>>2];
|
|
$889 = $886 - $888;
|
|
$scaler_y = $889;
|
|
}
|
|
$890 = $style;
|
|
$891 = ((($890)) + 4784|0);
|
|
$892 = ((($891)) + 416|0);
|
|
$scaler = $892;
|
|
$893 = $scaler;
|
|
$894 = HEAP32[$893>>2]|0;
|
|
$895 = ($894|0)==(1);
|
|
$896 = $out;
|
|
$897 = $scaler_x;
|
|
if ($895) {
|
|
$898 = $scaler_y;
|
|
$899 = $scaler_w;
|
|
$900 = $scaler_h;
|
|
_nk_rect($1,$897,$898,$899,$900);
|
|
$901 = $scaler;
|
|
$902 = ((($901)) + 4|0);
|
|
;HEAP32[$$byval_copy9>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy9+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy9+8>>2]=HEAP32[$1+8>>2]|0;HEAP32[$$byval_copy9+12>>2]=HEAP32[$1+12>>2]|0;
|
|
_nk_draw_image($896,$$byval_copy9,$902);
|
|
} else {
|
|
$903 = $scaler_w;
|
|
$904 = $897 + $903;
|
|
$905 = $scaler_y;
|
|
$906 = $scaler_x;
|
|
$907 = $scaler_w;
|
|
$908 = $906 + $907;
|
|
$909 = $scaler_y;
|
|
$910 = $scaler_h;
|
|
$911 = $909 + $910;
|
|
$912 = $scaler_x;
|
|
$913 = $scaler_y;
|
|
$914 = $scaler_h;
|
|
$915 = $913 + $914;
|
|
$916 = $scaler;
|
|
$917 = ((($916)) + 4|0);
|
|
;HEAP8[$$byval_copy10>>0]=HEAP8[$917>>0]|0;HEAP8[$$byval_copy10+1>>0]=HEAP8[$917+1>>0]|0;HEAP8[$$byval_copy10+2>>0]=HEAP8[$917+2>>0]|0;HEAP8[$$byval_copy10+3>>0]=HEAP8[$917+3>>0]|0;
|
|
_nk_fill_triangle($896,$904,$905,$908,$911,$912,$915,$$byval_copy10);
|
|
}
|
|
$918 = $window;
|
|
$919 = ((($918)) + 8|0);
|
|
$920 = HEAP32[$919>>2]|0;
|
|
$921 = $920 & 1024;
|
|
$922 = ($921|0)!=(0);
|
|
if (!($922)) {
|
|
$923 = $in;
|
|
$924 = ((($923)) + 220|0);
|
|
$925 = ((($924)) + 56|0);
|
|
$926 = +HEAPF32[$925>>2];
|
|
$prev_x = $926;
|
|
$927 = $in;
|
|
$928 = ((($927)) + 220|0);
|
|
$929 = ((($928)) + 56|0);
|
|
$930 = ((($929)) + 4|0);
|
|
$931 = +HEAPF32[$930>>2];
|
|
$prev_y = $931;
|
|
$932 = $style;
|
|
$933 = ((($932)) + 4784|0);
|
|
$934 = ((($933)) + 504|0);
|
|
;HEAP32[$window_size>>2]=HEAP32[$934>>2]|0;HEAP32[$window_size+4>>2]=HEAP32[$934+4>>2]|0;
|
|
$935 = $scaler_x;
|
|
$936 = $prev_x;
|
|
$937 = $935 <= $936;
|
|
do {
|
|
if ($937) {
|
|
$938 = $prev_x;
|
|
$939 = $scaler_x;
|
|
$940 = $scaler_w;
|
|
$941 = $939 + $940;
|
|
$942 = $938 <= $941;
|
|
if (!($942)) {
|
|
$952 = 0;
|
|
break;
|
|
}
|
|
$943 = $scaler_y;
|
|
$944 = $prev_y;
|
|
$945 = $943 <= $944;
|
|
if (!($945)) {
|
|
$952 = 0;
|
|
break;
|
|
}
|
|
$946 = $prev_y;
|
|
$947 = $scaler_y;
|
|
$948 = $scaler_h;
|
|
$949 = $947 + $948;
|
|
$950 = $946 <= $949;
|
|
$952 = $950;
|
|
} else {
|
|
$952 = 0;
|
|
}
|
|
} while(0);
|
|
$951 = $952&1;
|
|
$incursor = $951;
|
|
$953 = $in;
|
|
$954 = (_nk_input_is_mouse_down($953,0)|0);
|
|
$955 = ($954|0)!=(0);
|
|
do {
|
|
if ($955) {
|
|
$956 = $incursor;
|
|
$957 = ($956|0)!=(0);
|
|
if (!($957)) {
|
|
$958 = $window;
|
|
$959 = ((($958)) + 244|0);
|
|
$960 = ((($959)) + 8|0);
|
|
$961 = HEAP32[$960>>2]|0;
|
|
$962 = ($961|0)==(1);
|
|
if (!($962)) {
|
|
break;
|
|
}
|
|
}
|
|
$963 = $window;
|
|
$964 = ((($963)) + 244|0);
|
|
$965 = ((($964)) + 8|0);
|
|
$966 = HEAP32[$965>>2]|0;
|
|
$967 = ($966|0)==(0);
|
|
if ($967) {
|
|
$968 = $window;
|
|
$969 = ((($968)) + 244|0);
|
|
$970 = $window;
|
|
$971 = ((($970)) + 12|0);
|
|
;HEAP32[$$byval_copy11>>2]=HEAP32[$971>>2]|0;HEAP32[$$byval_copy11+4>>2]=HEAP32[$971+4>>2]|0;HEAP32[$$byval_copy11+8>>2]=HEAP32[$971+8>>2]|0;HEAP32[$$byval_copy11+12>>2]=HEAP32[$971+12>>2]|0;
|
|
_nk_rect_size($2,$$byval_copy11);
|
|
;HEAP32[$969>>2]=HEAP32[$2>>2]|0;HEAP32[$969+4>>2]=HEAP32[$2+4>>2]|0;
|
|
}
|
|
$972 = $window;
|
|
$973 = ((($972)) + 244|0);
|
|
$974 = ((($973)) + 8|0);
|
|
HEAP32[$974>>2] = 1;
|
|
$975 = $in;
|
|
$976 = ($975|0)!=(0|0);
|
|
do {
|
|
if ($976) {
|
|
$977 = $in;
|
|
$978 = ((($977)) + 220|0);
|
|
$979 = HEAP32[$978>>2]|0;
|
|
$980 = ($979|0)!=(0);
|
|
if (!($980)) {
|
|
label = 97;
|
|
break;
|
|
}
|
|
$981 = $in;
|
|
$982 = ((($981)) + 220|0);
|
|
$983 = ((($982)) + 48|0);
|
|
$984 = +HEAPF32[$983>>2];
|
|
$985 = $in;
|
|
$986 = ((($985)) + 220|0);
|
|
$987 = ((($986)) + 8|0);
|
|
$988 = +HEAPF32[$987>>2];
|
|
$989 = $984 - $988;
|
|
$990 = $in;
|
|
$991 = ((($990)) + 220|0);
|
|
$992 = ((($991)) + 48|0);
|
|
$993 = ((($992)) + 4|0);
|
|
$994 = +HEAPF32[$993>>2];
|
|
$995 = $in;
|
|
$996 = ((($995)) + 220|0);
|
|
$997 = ((($996)) + 8|0);
|
|
$998 = ((($997)) + 4|0);
|
|
$999 = +HEAPF32[$998>>2];
|
|
$1000 = $994 - $999;
|
|
_nk_vec2($4,$989,$1000);
|
|
;HEAP32[$delta>>2]=HEAP32[$4>>2]|0;HEAP32[$delta+4>>2]=HEAP32[$4+4>>2]|0;
|
|
} else {
|
|
label = 97;
|
|
}
|
|
} while(0);
|
|
if ((label|0) == 97) {
|
|
_nk_vec2($3,0.0,0.0);
|
|
;HEAP32[$delta>>2]=HEAP32[$3>>2]|0;HEAP32[$delta+4>>2]=HEAP32[$3+4>>2]|0;
|
|
}
|
|
$1001 = +HEAPF32[$window_size>>2];
|
|
$1002 = $window;
|
|
$1003 = ((($1002)) + 244|0);
|
|
$1004 = +HEAPF32[$1003>>2];
|
|
$1005 = +HEAPF32[$delta>>2];
|
|
$1006 = $1004 + $1005;
|
|
$1007 = $1001 < $1006;
|
|
if ($1007) {
|
|
$1008 = $window;
|
|
$1009 = ((($1008)) + 244|0);
|
|
$1010 = +HEAPF32[$1009>>2];
|
|
$1011 = +HEAPF32[$delta>>2];
|
|
$1012 = $1010 + $1011;
|
|
$1017 = $1012;
|
|
} else {
|
|
$1013 = +HEAPF32[$window_size>>2];
|
|
$1017 = $1013;
|
|
}
|
|
$1014 = $window;
|
|
$1015 = ((($1014)) + 12|0);
|
|
$1016 = ((($1015)) + 8|0);
|
|
HEAPF32[$1016>>2] = $1017;
|
|
$1018 = $layout;
|
|
$1019 = HEAP32[$1018>>2]|0;
|
|
$1020 = $1019 & 64;
|
|
$1021 = ($1020|0)!=(0);
|
|
if ($1021) {
|
|
break L106;
|
|
}
|
|
$1022 = $window;
|
|
$1023 = ((($1022)) + 244|0);
|
|
$1024 = ((($1023)) + 4|0);
|
|
$1025 = +HEAPF32[$1024>>2];
|
|
$1026 = ((($delta)) + 4|0);
|
|
$1027 = +HEAPF32[$1026>>2];
|
|
$1028 = $1025 + $1027;
|
|
$1029 = ((($window_size)) + 4|0);
|
|
$1030 = +HEAPF32[$1029>>2];
|
|
$1031 = $1028 < $1030;
|
|
if ($1031) {
|
|
$1032 = ((($window_size)) + 4|0);
|
|
$1033 = +HEAPF32[$1032>>2];
|
|
$1044 = $1033;
|
|
} else {
|
|
$1034 = $window;
|
|
$1035 = ((($1034)) + 244|0);
|
|
$1036 = ((($1035)) + 4|0);
|
|
$1037 = +HEAPF32[$1036>>2];
|
|
$1038 = ((($delta)) + 4|0);
|
|
$1039 = +HEAPF32[$1038>>2];
|
|
$1040 = $1037 + $1039;
|
|
$1044 = $1040;
|
|
}
|
|
$1041 = $window;
|
|
$1042 = ((($1041)) + 12|0);
|
|
$1043 = ((($1042)) + 12|0);
|
|
HEAPF32[$1043>>2] = $1044;
|
|
break L106;
|
|
}
|
|
} while(0);
|
|
$1045 = $window;
|
|
$1046 = ((($1045)) + 244|0);
|
|
$1047 = ((($1046)) + 8|0);
|
|
HEAP32[$1047>>2] = 0;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$1048 = $window;
|
|
$1049 = ((($1048)) + 8|0);
|
|
$1050 = HEAP32[$1049>>2]|0;
|
|
$1051 = $1050 & 8192;
|
|
$1052 = ($1051|0)!=(0);
|
|
do {
|
|
if (!($1052)) {
|
|
$1053 = $layout;
|
|
$1054 = HEAP32[$1053>>2]|0;
|
|
$1055 = $1054 & 2048;
|
|
$1056 = ($1055|0)!=(0);
|
|
if ($1056) {
|
|
$1057 = $window;
|
|
$1058 = ((($1057)) + 32|0);
|
|
_nk_command_buffer_reset($1058);
|
|
break;
|
|
} else {
|
|
$1059 = $0;
|
|
$1060 = $window;
|
|
_nk_finish($1059,$1060);
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$1061 = $layout;
|
|
$1062 = HEAP32[$1061>>2]|0;
|
|
$1063 = $1062 & 2097152;
|
|
$1064 = ($1063|0)!=(0);
|
|
if ($1064) {
|
|
$1065 = $layout;
|
|
$1066 = HEAP32[$1065>>2]|0;
|
|
$1067 = $1066 & -1025;
|
|
HEAP32[$1065>>2] = $1067;
|
|
$1068 = $layout;
|
|
$1069 = HEAP32[$1068>>2]|0;
|
|
$1070 = $1069 & -2097153;
|
|
HEAP32[$1068>>2] = $1070;
|
|
}
|
|
$1071 = $layout;
|
|
$1072 = HEAP32[$1071>>2]|0;
|
|
$1073 = $window;
|
|
$1074 = ((($1073)) + 8|0);
|
|
HEAP32[$1074>>2] = $1072;
|
|
$1075 = $window;
|
|
$1076 = ((($1075)) + 76|0);
|
|
$1077 = HEAP32[$1076>>2]|0;
|
|
$1078 = ($1077|0)!=(0);
|
|
if ($1078) {
|
|
$1079 = $window;
|
|
$1080 = ((($1079)) + 76|0);
|
|
$1081 = ((($1080)) + 88|0);
|
|
$1082 = HEAP32[$1081>>2]|0;
|
|
$1083 = $window;
|
|
$1084 = ((($1083)) + 76|0);
|
|
$1085 = ((($1084)) + 84|0);
|
|
$1086 = HEAP32[$1085>>2]|0;
|
|
$1087 = ($1082|0)!=($1086|0);
|
|
if ($1087) {
|
|
$1088 = $window;
|
|
$1089 = ((($1088)) + 76|0);
|
|
$1090 = HEAP32[$1089>>2]|0;
|
|
$1091 = $window;
|
|
$1092 = ((($1091)) + 76|0);
|
|
$1093 = ((($1092)) + 4|0);
|
|
$1094 = HEAP32[$1093>>2]|0;
|
|
$1095 = ($1090|0)==($1094|0);
|
|
if ($1095) {
|
|
$1096 = $window;
|
|
$1097 = ((($1096)) + 76|0);
|
|
_nk_zero($1097,96);
|
|
} else {
|
|
label = 118;
|
|
}
|
|
} else {
|
|
label = 118;
|
|
}
|
|
} else {
|
|
label = 118;
|
|
}
|
|
if ((label|0) == 118) {
|
|
$1098 = $window;
|
|
$1099 = ((($1098)) + 76|0);
|
|
$1100 = ((($1099)) + 84|0);
|
|
$1101 = HEAP32[$1100>>2]|0;
|
|
$1102 = $window;
|
|
$1103 = ((($1102)) + 76|0);
|
|
$1104 = ((($1103)) + 88|0);
|
|
HEAP32[$1104>>2] = $1101;
|
|
$1105 = $window;
|
|
$1106 = ((($1105)) + 76|0);
|
|
$1107 = HEAP32[$1106>>2]|0;
|
|
$1108 = $window;
|
|
$1109 = ((($1108)) + 76|0);
|
|
$1110 = ((($1109)) + 4|0);
|
|
HEAP32[$1110>>2] = $1107;
|
|
$1111 = $window;
|
|
$1112 = ((($1111)) + 76|0);
|
|
$1113 = ((($1112)) + 84|0);
|
|
HEAP32[$1113>>2] = 0;
|
|
}
|
|
$1114 = $window;
|
|
$1115 = ((($1114)) + 204|0);
|
|
$1116 = ((($1115)) + 12|0);
|
|
$1117 = HEAP32[$1116>>2]|0;
|
|
$1118 = ($1117|0)!=(0);
|
|
if ($1118) {
|
|
$1119 = $window;
|
|
$1120 = ((($1119)) + 204|0);
|
|
$1121 = ((($1120)) + 8|0);
|
|
$1122 = HEAP32[$1121>>2]|0;
|
|
$1123 = $window;
|
|
$1124 = ((($1123)) + 204|0);
|
|
$1125 = ((($1124)) + 4|0);
|
|
$1126 = HEAP32[$1125>>2]|0;
|
|
$1127 = ($1122|0)!=($1126|0);
|
|
if ($1127) {
|
|
$1128 = $window;
|
|
$1129 = ((($1128)) + 204|0);
|
|
$1130 = ((($1129)) + 12|0);
|
|
$1131 = HEAP32[$1130>>2]|0;
|
|
$1132 = $window;
|
|
$1133 = ((($1132)) + 204|0);
|
|
$1134 = ((($1133)) + 16|0);
|
|
$1135 = HEAP32[$1134>>2]|0;
|
|
$1136 = ($1131|0)==($1135|0);
|
|
if ($1136) {
|
|
$1137 = $window;
|
|
$1138 = ((($1137)) + 204|0);
|
|
_nk_zero($1138,40);
|
|
} else {
|
|
label = 123;
|
|
}
|
|
} else {
|
|
label = 123;
|
|
}
|
|
} else {
|
|
label = 123;
|
|
}
|
|
if ((label|0) == 123) {
|
|
$1139 = $window;
|
|
$1140 = ((($1139)) + 204|0);
|
|
$1141 = ((($1140)) + 4|0);
|
|
$1142 = HEAP32[$1141>>2]|0;
|
|
$1143 = $window;
|
|
$1144 = ((($1143)) + 204|0);
|
|
$1145 = ((($1144)) + 8|0);
|
|
HEAP32[$1145>>2] = $1142;
|
|
$1146 = $window;
|
|
$1147 = ((($1146)) + 204|0);
|
|
$1148 = ((($1147)) + 12|0);
|
|
$1149 = HEAP32[$1148>>2]|0;
|
|
$1150 = $window;
|
|
$1151 = ((($1150)) + 204|0);
|
|
$1152 = ((($1151)) + 16|0);
|
|
HEAP32[$1152>>2] = $1149;
|
|
$1153 = $window;
|
|
$1154 = ((($1153)) + 204|0);
|
|
$1155 = ((($1154)) + 4|0);
|
|
HEAP32[$1155>>2] = 0;
|
|
}
|
|
$1156 = $window;
|
|
$1157 = ((($1156)) + 172|0);
|
|
$1158 = ((($1157)) + 28|0);
|
|
$1159 = HEAP32[$1158>>2]|0;
|
|
$1160 = ($1159|0)!=(0);
|
|
if ($1160) {
|
|
$1161 = $window;
|
|
$1162 = ((($1161)) + 172|0);
|
|
$1163 = ((($1162)) + 24|0);
|
|
$1164 = HEAP32[$1163>>2]|0;
|
|
$1165 = $window;
|
|
$1166 = ((($1165)) + 172|0);
|
|
$1167 = ((($1166)) + 20|0);
|
|
$1168 = HEAP32[$1167>>2]|0;
|
|
$1169 = ($1164|0)!=($1168|0);
|
|
if ($1169) {
|
|
$1170 = $window;
|
|
$1171 = ((($1170)) + 172|0);
|
|
$1172 = ((($1171)) + 20|0);
|
|
HEAP32[$1172>>2] = 0;
|
|
$1173 = $window;
|
|
$1174 = ((($1173)) + 172|0);
|
|
$1175 = ((($1174)) + 24|0);
|
|
HEAP32[$1175>>2] = 0;
|
|
$1176 = $window;
|
|
$1177 = ((($1176)) + 172|0);
|
|
$1178 = ((($1177)) + 28|0);
|
|
HEAP32[$1178>>2] = 0;
|
|
} else {
|
|
label = 127;
|
|
}
|
|
} else {
|
|
label = 127;
|
|
}
|
|
if ((label|0) == 127) {
|
|
$1179 = $window;
|
|
$1180 = ((($1179)) + 172|0);
|
|
$1181 = ((($1180)) + 20|0);
|
|
$1182 = HEAP32[$1181>>2]|0;
|
|
$1183 = $window;
|
|
$1184 = ((($1183)) + 172|0);
|
|
$1185 = ((($1184)) + 24|0);
|
|
HEAP32[$1185>>2] = $1182;
|
|
$1186 = $window;
|
|
$1187 = ((($1186)) + 172|0);
|
|
$1188 = ((($1187)) + 20|0);
|
|
HEAP32[$1188>>2] = 0;
|
|
}
|
|
$1189 = $window;
|
|
$1190 = ((($1189)) + 172|0);
|
|
$1191 = ((($1190)) + 16|0);
|
|
HEAP32[$1191>>2] = 0;
|
|
$1192 = $layout;
|
|
$1193 = ((($1192)) + 92|0);
|
|
$1194 = ((($1193)) + 52|0);
|
|
$1195 = HEAP32[$1194>>2]|0;
|
|
$1196 = ($1195|0)!=(0);
|
|
if ($1196) {
|
|
___assert_fail((31417|0),(13400|0),16054,(31404|0));
|
|
// unreachable;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_layout_row_dynamic($ctx,$height,$cols) {
|
|
$ctx = $ctx|0;
|
|
$height = +$height;
|
|
$cols = $cols|0;
|
|
var $0 = 0, $1 = 0.0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $height;
|
|
$2 = $cols;
|
|
$3 = $0;
|
|
$4 = $1;
|
|
$5 = $2;
|
|
_nk_row_layout($3,0,$4,$5,0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_row_layout($ctx,$fmt,$height,$cols,$width) {
|
|
$ctx = $ctx|0;
|
|
$fmt = $fmt|0;
|
|
$height = +$height;
|
|
$cols = $cols|0;
|
|
$width = $width|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $7 = 0, $8 = 0, $9 = 0, $win = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $fmt;
|
|
$2 = $height;
|
|
$3 = $cols;
|
|
$4 = $width;
|
|
$5 = $0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((14913|0),(13400|0),16162,(31519|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $0;
|
|
$8 = ((($7)) + 11168|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((28537|0),(13400|0),16163,(31519|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $0;
|
|
$12 = ((($11)) + 11168|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ((($13)) + 72|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($15|0)!=(0|0);
|
|
if (!($16)) {
|
|
___assert_fail((28516|0),(13400|0),16164,(31519|0));
|
|
// unreachable;
|
|
}
|
|
$17 = $0;
|
|
$18 = ($17|0)!=(0|0);
|
|
if (!($18)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$19 = $0;
|
|
$20 = ((($19)) + 11168|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = ($21|0)!=(0|0);
|
|
if (!($22)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$23 = $0;
|
|
$24 = ((($23)) + 11168|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = ((($25)) + 72|0);
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = ($27|0)!=(0|0);
|
|
if (!($28)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$29 = $0;
|
|
$30 = ((($29)) + 11168|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$win = $31;
|
|
$32 = $0;
|
|
$33 = $win;
|
|
$34 = $2;
|
|
$35 = $3;
|
|
_nk_panel_layout($32,$33,$34,$35);
|
|
$36 = $1;
|
|
$37 = ($36|0)==(0);
|
|
$38 = $win;
|
|
$39 = ((($38)) + 72|0);
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$41 = ((($40)) + 92|0);
|
|
if ($37) {
|
|
HEAP32[$41>>2] = 0;
|
|
} else {
|
|
HEAP32[$41>>2] = 4;
|
|
}
|
|
$42 = $4;
|
|
$43 = (+($42|0));
|
|
$44 = $win;
|
|
$45 = ((($44)) + 72|0);
|
|
$46 = HEAP32[$45>>2]|0;
|
|
$47 = ((($46)) + 92|0);
|
|
$48 = ((($47)) + 20|0);
|
|
HEAPF32[$48>>2] = $43;
|
|
$49 = $win;
|
|
$50 = ((($49)) + 72|0);
|
|
$51 = HEAP32[$50>>2]|0;
|
|
$52 = ((($51)) + 92|0);
|
|
$53 = ((($52)) + 16|0);
|
|
HEAP32[$53>>2] = 0;
|
|
$54 = $win;
|
|
$55 = ((($54)) + 72|0);
|
|
$56 = HEAP32[$55>>2]|0;
|
|
$57 = ((($56)) + 92|0);
|
|
$58 = ((($57)) + 28|0);
|
|
HEAPF32[$58>>2] = 0.0;
|
|
$59 = $win;
|
|
$60 = ((($59)) + 72|0);
|
|
$61 = HEAP32[$60>>2]|0;
|
|
$62 = ((($61)) + 92|0);
|
|
$63 = ((($62)) + 32|0);
|
|
HEAPF32[$63>>2] = 0.0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_layout_row_static($ctx,$height,$item_width,$cols) {
|
|
$ctx = $ctx|0;
|
|
$height = +$height;
|
|
$item_width = $item_width|0;
|
|
$cols = $cols|0;
|
|
var $0 = 0, $1 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $height;
|
|
$2 = $item_width;
|
|
$3 = $cols;
|
|
$4 = $0;
|
|
$5 = $1;
|
|
$6 = $3;
|
|
$7 = $2;
|
|
_nk_row_layout($4,1,$5,$6,$7);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_panel_layout($ctx,$win,$height,$cols) {
|
|
$ctx = $ctx|0;
|
|
$win = $win|0;
|
|
$height = +$height;
|
|
$cols = $cols|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
|
|
var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0.0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0;
|
|
var $62 = 0.0, $63 = 0.0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0, $78 = 0, $79 = 0, $8 = 0;
|
|
var $80 = 0.0, $81 = 0, $82 = 0, $83 = 0, $84 = 0.0, $85 = 0.0, $86 = 0, $87 = 0.0, $88 = 0.0, $9 = 0, $color = 0, $color$byval_copy = 0, $item_spacing = 0, $layout = 0, $out = 0, $panel_padding = 0, $style = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$color$byval_copy = sp + 84|0;
|
|
$$byval_copy = sp + 64|0;
|
|
$item_spacing = sp + 24|0;
|
|
$panel_padding = sp + 16|0;
|
|
$color = sp + 80|0;
|
|
$4 = sp;
|
|
$0 = $ctx;
|
|
$1 = $win;
|
|
$2 = $height;
|
|
$3 = $cols;
|
|
$5 = $0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((14913|0),(13400|0),16131,(31533|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $0;
|
|
$8 = ((($7)) + 11168|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((28537|0),(13400|0),16132,(31533|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $0;
|
|
$12 = ((($11)) + 11168|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ((($13)) + 72|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($15|0)!=(0|0);
|
|
if (!($16)) {
|
|
___assert_fail((28516|0),(13400|0),16133,(31533|0));
|
|
// unreachable;
|
|
}
|
|
$17 = $0;
|
|
$18 = ($17|0)!=(0|0);
|
|
if (!($18)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$19 = $0;
|
|
$20 = ((($19)) + 11168|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = ($21|0)!=(0|0);
|
|
if (!($22)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$23 = $0;
|
|
$24 = ((($23)) + 11168|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = ((($25)) + 72|0);
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = ($27|0)!=(0|0);
|
|
if (!($28)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$29 = $1;
|
|
$30 = ((($29)) + 72|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$layout = $31;
|
|
$32 = $0;
|
|
$33 = ((($32)) + 300|0);
|
|
$style = $33;
|
|
$34 = $1;
|
|
$35 = ((($34)) + 32|0);
|
|
$out = $35;
|
|
$36 = $style;
|
|
$37 = ((($36)) + 4784|0);
|
|
$38 = ((($37)) + 388|0);
|
|
;HEAP8[$color>>0]=HEAP8[$38>>0]|0;HEAP8[$color+1>>0]=HEAP8[$38+1>>0]|0;HEAP8[$color+2>>0]=HEAP8[$38+2>>0]|0;HEAP8[$color+3>>0]=HEAP8[$38+3>>0]|0;
|
|
$39 = $style;
|
|
$40 = ((($39)) + 4784|0);
|
|
$41 = ((($40)) + 488|0);
|
|
;HEAP32[$item_spacing>>2]=HEAP32[$41>>2]|0;HEAP32[$item_spacing+4>>2]=HEAP32[$41+4>>2]|0;
|
|
$42 = $style;
|
|
$43 = ((($42)) + 4784|0);
|
|
$44 = ((($43)) + 480|0);
|
|
;HEAP32[$panel_padding>>2]=HEAP32[$44>>2]|0;HEAP32[$panel_padding+4>>2]=HEAP32[$44+4>>2]|0;
|
|
$45 = $layout;
|
|
$46 = ((($45)) + 92|0);
|
|
$47 = ((($46)) + 4|0);
|
|
HEAP32[$47>>2] = 0;
|
|
$48 = $layout;
|
|
$49 = ((($48)) + 92|0);
|
|
$50 = ((($49)) + 8|0);
|
|
$51 = +HEAPF32[$50>>2];
|
|
$52 = $layout;
|
|
$53 = ((($52)) + 28|0);
|
|
$54 = +HEAPF32[$53>>2];
|
|
$55 = $54 + $51;
|
|
HEAPF32[$53>>2] = $55;
|
|
$56 = $3;
|
|
$57 = $layout;
|
|
$58 = ((($57)) + 92|0);
|
|
$59 = ((($58)) + 12|0);
|
|
HEAP32[$59>>2] = $56;
|
|
$60 = $2;
|
|
$61 = ((($item_spacing)) + 4|0);
|
|
$62 = +HEAPF32[$61>>2];
|
|
$63 = $60 + $62;
|
|
$64 = $layout;
|
|
$65 = ((($64)) + 92|0);
|
|
$66 = ((($65)) + 8|0);
|
|
HEAPF32[$66>>2] = $63;
|
|
$67 = $layout;
|
|
$68 = ((($67)) + 92|0);
|
|
$69 = ((($68)) + 28|0);
|
|
HEAPF32[$69>>2] = 0.0;
|
|
$70 = $layout;
|
|
$71 = HEAP32[$70>>2]|0;
|
|
$72 = $71 & 64;
|
|
$73 = ($72|0)!=(0);
|
|
if (!($73)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$74 = $out;
|
|
$75 = $layout;
|
|
$76 = ((($75)) + 4|0);
|
|
$77 = +HEAPF32[$76>>2];
|
|
$78 = $layout;
|
|
$79 = ((($78)) + 28|0);
|
|
$80 = +HEAPF32[$79>>2];
|
|
$81 = $layout;
|
|
$82 = ((($81)) + 4|0);
|
|
$83 = ((($82)) + 8|0);
|
|
$84 = +HEAPF32[$83>>2];
|
|
$85 = $2;
|
|
$86 = ((($panel_padding)) + 4|0);
|
|
$87 = +HEAPF32[$86>>2];
|
|
$88 = $85 + $87;
|
|
_nk_rect($4,$77,$80,$84,$88);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$4+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$4+12>>2]|0;
|
|
;HEAP8[$color$byval_copy>>0]=HEAP8[$color>>0]|0;HEAP8[$color$byval_copy+1>>0]=HEAP8[$color+1>>0]|0;HEAP8[$color$byval_copy+2>>0]=HEAP8[$color+2>>0]|0;HEAP8[$color$byval_copy+3>>0]=HEAP8[$color+3>>0]|0;
|
|
_nk_fill_rect($74,$$byval_copy,0.0,$color$byval_copy);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_widget($bounds,$ctx) {
|
|
$bounds = $bounds|0;
|
|
$ctx = $ctx|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0.0, $102 = 0, $103 = 0, $104 = 0.0, $105 = 0.0, $106 = 0, $107 = 0, $108 = 0.0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0, $112 = 0, $113 = 0.0, $114 = 0.0, $115 = 0;
|
|
var $116 = 0, $117 = 0.0, $118 = 0, $119 = 0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0, $123 = 0.0, $124 = 0, $125 = 0, $126 = 0.0, $127 = 0.0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0.0, $132 = 0, $133 = 0;
|
|
var $134 = 0.0, $135 = 0, $136 = 0, $137 = 0.0, $138 = 0.0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0.0, $143 = 0, $144 = 0, $145 = 0.0, $146 = 0.0, $147 = 0, $148 = 0, $149 = 0.0, $15 = 0, $150 = 0, $151 = 0;
|
|
var $152 = 0.0, $153 = 0.0, $154 = 0, $155 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0;
|
|
var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0, $45 = 0.0, $46 = 0, $47 = 0, $48 = 0.0;
|
|
var $49 = 0.0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0, $57 = 0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0, $61 = 0.0, $62 = 0.0, $63 = 0, $64 = 0, $65 = 0, $66 = 0.0;
|
|
var $67 = 0, $68 = 0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0, $72 = 0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0.0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0, $83 = 0.0, $84 = 0;
|
|
var $85 = 0, $86 = 0.0, $87 = 0.0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0.0, $92 = 0, $93 = 0, $94 = 0.0, $95 = 0, $96 = 0, $97 = 0, $98 = 0.0, $99 = 0, $c = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $bounds;
|
|
$2 = $ctx;
|
|
$c = 0;
|
|
$3 = $2;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
___assert_fail((14913|0),(13400|0),16888,(28550|0));
|
|
// unreachable;
|
|
}
|
|
$5 = $2;
|
|
$6 = ((($5)) + 11168|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((28537|0),(13400|0),16889,(28550|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $2;
|
|
$10 = ((($9)) + 11168|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = ((($11)) + 72|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ($13|0)!=(0|0);
|
|
if (!($14)) {
|
|
___assert_fail((28516|0),(13400|0),16890,(28550|0));
|
|
// unreachable;
|
|
}
|
|
$15 = $2;
|
|
$16 = ($15|0)!=(0|0);
|
|
if ($16) {
|
|
$17 = $2;
|
|
$18 = ((($17)) + 11168|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = ($19|0)!=(0|0);
|
|
if ($20) {
|
|
$21 = $2;
|
|
$22 = ((($21)) + 11168|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$24 = ((($23)) + 72|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = ($25|0)!=(0|0);
|
|
if ($26) {
|
|
$27 = $1;
|
|
$28 = $2;
|
|
_nk_panel_alloc_space($27,$28);
|
|
$29 = $2;
|
|
$30 = ((($29)) + 11168|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = ((($31)) + 72|0);
|
|
$33 = HEAP32[$32>>2]|0;
|
|
$34 = ((($33)) + 56|0);
|
|
$c = $34;
|
|
$35 = $1;
|
|
$36 = +HEAPF32[$35>>2];
|
|
$37 = $c;
|
|
$38 = +HEAPF32[$37>>2];
|
|
$39 = $c;
|
|
$40 = ((($39)) + 8|0);
|
|
$41 = +HEAPF32[$40>>2];
|
|
$42 = $38 + $41;
|
|
$43 = $36 > $42;
|
|
if (!($43)) {
|
|
$44 = $1;
|
|
$45 = +HEAPF32[$44>>2];
|
|
$46 = $1;
|
|
$47 = ((($46)) + 8|0);
|
|
$48 = +HEAPF32[$47>>2];
|
|
$49 = $45 + $48;
|
|
$50 = $c;
|
|
$51 = +HEAPF32[$50>>2];
|
|
$52 = $49 < $51;
|
|
if (!($52)) {
|
|
$53 = $1;
|
|
$54 = ((($53)) + 4|0);
|
|
$55 = +HEAPF32[$54>>2];
|
|
$56 = $c;
|
|
$57 = ((($56)) + 4|0);
|
|
$58 = +HEAPF32[$57>>2];
|
|
$59 = $c;
|
|
$60 = ((($59)) + 12|0);
|
|
$61 = +HEAPF32[$60>>2];
|
|
$62 = $58 + $61;
|
|
$63 = $55 > $62;
|
|
if (!($63)) {
|
|
$64 = $1;
|
|
$65 = ((($64)) + 4|0);
|
|
$66 = +HEAPF32[$65>>2];
|
|
$67 = $1;
|
|
$68 = ((($67)) + 12|0);
|
|
$69 = +HEAPF32[$68>>2];
|
|
$70 = $66 + $69;
|
|
$71 = $c;
|
|
$72 = ((($71)) + 4|0);
|
|
$73 = +HEAPF32[$72>>2];
|
|
$74 = $70 < $73;
|
|
if (!($74)) {
|
|
$75 = $c;
|
|
$76 = +HEAPF32[$75>>2];
|
|
$77 = $1;
|
|
$78 = +HEAPF32[$77>>2];
|
|
$79 = $76 <= $78;
|
|
do {
|
|
if ($79) {
|
|
$80 = $1;
|
|
$81 = +HEAPF32[$80>>2];
|
|
$82 = $c;
|
|
$83 = +HEAPF32[$82>>2];
|
|
$84 = $c;
|
|
$85 = ((($84)) + 8|0);
|
|
$86 = +HEAPF32[$85>>2];
|
|
$87 = $83 + $86;
|
|
$88 = $81 <= $87;
|
|
if ($88) {
|
|
$89 = $c;
|
|
$90 = ((($89)) + 4|0);
|
|
$91 = +HEAPF32[$90>>2];
|
|
$92 = $1;
|
|
$93 = ((($92)) + 4|0);
|
|
$94 = +HEAPF32[$93>>2];
|
|
$95 = $91 <= $94;
|
|
if ($95) {
|
|
$96 = $1;
|
|
$97 = ((($96)) + 4|0);
|
|
$98 = +HEAPF32[$97>>2];
|
|
$99 = $c;
|
|
$100 = ((($99)) + 4|0);
|
|
$101 = +HEAPF32[$100>>2];
|
|
$102 = $c;
|
|
$103 = ((($102)) + 12|0);
|
|
$104 = +HEAPF32[$103>>2];
|
|
$105 = $101 + $104;
|
|
$106 = $98 <= $105;
|
|
if ($106) {
|
|
$107 = $c;
|
|
$108 = +HEAPF32[$107>>2];
|
|
$109 = $1;
|
|
$110 = +HEAPF32[$109>>2];
|
|
$111 = $1;
|
|
$112 = ((($111)) + 8|0);
|
|
$113 = +HEAPF32[$112>>2];
|
|
$114 = $110 + $113;
|
|
$115 = $108 <= $114;
|
|
if ($115) {
|
|
$116 = $1;
|
|
$117 = +HEAPF32[$116>>2];
|
|
$118 = $1;
|
|
$119 = ((($118)) + 8|0);
|
|
$120 = +HEAPF32[$119>>2];
|
|
$121 = $117 + $120;
|
|
$122 = $c;
|
|
$123 = +HEAPF32[$122>>2];
|
|
$124 = $c;
|
|
$125 = ((($124)) + 8|0);
|
|
$126 = +HEAPF32[$125>>2];
|
|
$127 = $123 + $126;
|
|
$128 = $121 <= $127;
|
|
if ($128) {
|
|
$129 = $c;
|
|
$130 = ((($129)) + 4|0);
|
|
$131 = +HEAPF32[$130>>2];
|
|
$132 = $1;
|
|
$133 = ((($132)) + 4|0);
|
|
$134 = +HEAPF32[$133>>2];
|
|
$135 = $1;
|
|
$136 = ((($135)) + 12|0);
|
|
$137 = +HEAPF32[$136>>2];
|
|
$138 = $134 + $137;
|
|
$139 = $131 <= $138;
|
|
if ($139) {
|
|
$140 = $1;
|
|
$141 = ((($140)) + 4|0);
|
|
$142 = +HEAPF32[$141>>2];
|
|
$143 = $1;
|
|
$144 = ((($143)) + 12|0);
|
|
$145 = +HEAPF32[$144>>2];
|
|
$146 = $142 + $145;
|
|
$147 = $c;
|
|
$148 = ((($147)) + 4|0);
|
|
$149 = +HEAPF32[$148>>2];
|
|
$150 = $c;
|
|
$151 = ((($150)) + 12|0);
|
|
$152 = +HEAPF32[$151>>2];
|
|
$153 = $149 + $152;
|
|
$154 = $146 <= $153;
|
|
if (!($154)) {
|
|
break;
|
|
}
|
|
$0 = 1;
|
|
$155 = $0;
|
|
STACKTOP = sp;return ($155|0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$0 = 2;
|
|
$155 = $0;
|
|
STACKTOP = sp;return ($155|0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$155 = $0;
|
|
STACKTOP = sp;return ($155|0);
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$155 = $0;
|
|
STACKTOP = sp;return ($155|0);
|
|
}
|
|
function _nk_panel_alloc_space($bounds,$ctx) {
|
|
$bounds = $bounds|0;
|
|
$ctx = $ctx|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $layout = 0, $win = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $bounds;
|
|
$1 = $ctx;
|
|
$2 = $1;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((14913|0),(13400|0),16596,(31597|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $1;
|
|
$5 = ((($4)) + 11168|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((28537|0),(13400|0),16597,(31597|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $1;
|
|
$9 = ((($8)) + 11168|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = ((($10)) + 72|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ($12|0)!=(0|0);
|
|
if (!($13)) {
|
|
___assert_fail((28516|0),(13400|0),16598,(31597|0));
|
|
// unreachable;
|
|
}
|
|
$14 = $1;
|
|
$15 = ($14|0)!=(0|0);
|
|
if (!($15)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$16 = $1;
|
|
$17 = ((($16)) + 11168|0);
|
|
$18 = HEAP32[$17>>2]|0;
|
|
$19 = ($18|0)!=(0|0);
|
|
if (!($19)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$20 = $1;
|
|
$21 = ((($20)) + 11168|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = ((($22)) + 72|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = ($24|0)!=(0|0);
|
|
if (!($25)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$26 = $1;
|
|
$27 = ((($26)) + 11168|0);
|
|
$28 = HEAP32[$27>>2]|0;
|
|
$win = $28;
|
|
$29 = $win;
|
|
$30 = ((($29)) + 72|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$layout = $31;
|
|
$32 = $layout;
|
|
$33 = ((($32)) + 92|0);
|
|
$34 = ((($33)) + 4|0);
|
|
$35 = HEAP32[$34>>2]|0;
|
|
$36 = $layout;
|
|
$37 = ((($36)) + 92|0);
|
|
$38 = ((($37)) + 12|0);
|
|
$39 = HEAP32[$38>>2]|0;
|
|
$40 = ($35|0)>=($39|0);
|
|
if ($40) {
|
|
$41 = $1;
|
|
$42 = $win;
|
|
_nk_panel_alloc_row($41,$42);
|
|
}
|
|
$43 = $0;
|
|
$44 = $1;
|
|
$45 = $win;
|
|
_nk_layout_widget_space($43,$44,$45,1);
|
|
$46 = $layout;
|
|
$47 = ((($46)) + 92|0);
|
|
$48 = ((($47)) + 4|0);
|
|
$49 = HEAP32[$48>>2]|0;
|
|
$50 = (($49) + 1)|0;
|
|
HEAP32[$48>>2] = $50;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_panel_alloc_row($ctx,$win) {
|
|
$ctx = $ctx|0;
|
|
$win = $win|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
|
|
var $7 = 0, $8 = 0, $9 = 0, $layout = 0, $row_height = 0.0, $spacing = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$spacing = sp + 8|0;
|
|
$0 = $ctx;
|
|
$1 = $win;
|
|
$2 = $1;
|
|
$3 = ((($2)) + 72|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$layout = $4;
|
|
$5 = $0;
|
|
$6 = ((($5)) + 300|0);
|
|
$7 = ((($6)) + 4784|0);
|
|
$8 = ((($7)) + 488|0);
|
|
;HEAP32[$spacing>>2]=HEAP32[$8>>2]|0;HEAP32[$spacing+4>>2]=HEAP32[$8+4>>2]|0;
|
|
$9 = $layout;
|
|
$10 = ((($9)) + 92|0);
|
|
$11 = ((($10)) + 8|0);
|
|
$12 = +HEAPF32[$11>>2];
|
|
$13 = ((($spacing)) + 4|0);
|
|
$14 = +HEAPF32[$13>>2];
|
|
$15 = $12 - $14;
|
|
$row_height = $15;
|
|
$16 = $0;
|
|
$17 = $1;
|
|
$18 = $row_height;
|
|
$19 = $layout;
|
|
$20 = ((($19)) + 92|0);
|
|
$21 = ((($20)) + 12|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
_nk_panel_layout($16,$17,$18,$22);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_text_colored($ctx,$str,$len,$alignment,$color) {
|
|
$ctx = $ctx|0;
|
|
$str = $str|0;
|
|
$len = $len|0;
|
|
$alignment = $alignment|0;
|
|
$color = $color|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $bounds = 0, $bounds$byval_copy = 0, $item_padding = 0, $style = 0, $text = 0, $win = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$bounds$byval_copy = sp + 64|0;
|
|
$item_padding = sp + 32|0;
|
|
$bounds = sp + 16|0;
|
|
$text = sp;
|
|
$0 = $ctx;
|
|
$1 = $str;
|
|
$2 = $len;
|
|
$3 = $alignment;
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((14913|0),(13400|0),16990,(28560|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $0;
|
|
$7 = ((($6)) + 11168|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
___assert_fail((28537|0),(13400|0),16991,(28560|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $0;
|
|
$11 = ((($10)) + 11168|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ((($12)) + 72|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = ($14|0)!=(0|0);
|
|
if (!($15)) {
|
|
___assert_fail((28516|0),(13400|0),16992,(28560|0));
|
|
// unreachable;
|
|
}
|
|
$16 = $0;
|
|
$17 = ($16|0)!=(0|0);
|
|
if (!($17)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$18 = $0;
|
|
$19 = ((($18)) + 11168|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = ($20|0)!=(0|0);
|
|
if (!($21)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$22 = $0;
|
|
$23 = ((($22)) + 11168|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = ((($24)) + 72|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$27 = ($26|0)!=(0|0);
|
|
if (!($27)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$28 = $0;
|
|
$29 = ((($28)) + 11168|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$win = $30;
|
|
$31 = $0;
|
|
$32 = ((($31)) + 300|0);
|
|
$style = $32;
|
|
$33 = $0;
|
|
_nk_panel_alloc_space($bounds,$33);
|
|
$34 = $style;
|
|
$35 = ((($34)) + 20|0);
|
|
$36 = ((($35)) + 4|0);
|
|
;HEAP32[$item_padding>>2]=HEAP32[$36>>2]|0;HEAP32[$item_padding+4>>2]=HEAP32[$36+4>>2]|0;
|
|
$37 = +HEAPF32[$item_padding>>2];
|
|
HEAPF32[$text>>2] = $37;
|
|
$38 = ((($item_padding)) + 4|0);
|
|
$39 = +HEAPF32[$38>>2];
|
|
$40 = ((($text)) + 4|0);
|
|
HEAPF32[$40>>2] = $39;
|
|
$41 = ((($text)) + 8|0);
|
|
$42 = $style;
|
|
$43 = ((($42)) + 4784|0);
|
|
$44 = ((($43)) + 388|0);
|
|
;HEAP8[$41>>0]=HEAP8[$44>>0]|0;HEAP8[$41+1>>0]=HEAP8[$44+1>>0]|0;HEAP8[$41+2>>0]=HEAP8[$44+2>>0]|0;HEAP8[$41+3>>0]=HEAP8[$44+3>>0]|0;
|
|
$45 = ((($text)) + 12|0);
|
|
;HEAP8[$45>>0]=HEAP8[$color>>0]|0;HEAP8[$45+1>>0]=HEAP8[$color+1>>0]|0;HEAP8[$45+2>>0]=HEAP8[$color+2>>0]|0;HEAP8[$45+3>>0]=HEAP8[$color+3>>0]|0;
|
|
$46 = $win;
|
|
$47 = ((($46)) + 32|0);
|
|
$48 = $1;
|
|
$49 = $2;
|
|
$50 = $3;
|
|
$51 = $style;
|
|
;HEAP32[$bounds$byval_copy>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
_nk_widget_text($47,$bounds$byval_copy,$48,$49,$text,$50,$51);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_widget_text($o,$b,$string,$len,$t,$a,$f) {
|
|
$o = $o|0;
|
|
$b = $b|0;
|
|
$string = $string|0;
|
|
$len = $len|0;
|
|
$t = $t|0;
|
|
$a = $a|0;
|
|
$f = $f|0;
|
|
var $$byval_copy = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0, $103 = 0.0, $104 = 0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0, $109 = 0.0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0.0;
|
|
var $113 = 0.0, $114 = 0, $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0;
|
|
var $131 = 0.0, $132 = 0.0, $133 = 0, $134 = 0.0, $135 = 0, $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0, $14 = 0, $140 = 0.0, $141 = 0.0, $142 = 0, $143 = 0.0, $144 = 0, $145 = 0.0, $146 = 0.0, $147 = 0, $148 = 0.0, $149 = 0;
|
|
var $15 = 0.0, $150 = 0.0, $151 = 0.0, $152 = 0, $153 = 0, $154 = 0, $155 = 0.0, $156 = 0, $157 = 0.0, $158 = 0.0, $159 = 0.0, $16 = 0, $160 = 0, $161 = 0.0, $162 = 0.0, $163 = 0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0.0;
|
|
var $168 = 0.0, $169 = 0, $17 = 0, $170 = 0.0, $171 = 0, $172 = 0.0, $173 = 0.0, $174 = 0, $175 = 0.0, $176 = 0.0, $177 = 0.0, $178 = 0.0, $179 = 0.0, $18 = 0.0, $180 = 0, $181 = 0.0, $182 = 0.0, $183 = 0.0, $184 = 0.0, $185 = 0;
|
|
var $186 = 0.0, $187 = 0.0, $188 = 0.0, $189 = 0, $19 = 0.0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0.0, $195 = 0, $196 = 0.0, $197 = 0.0, $198 = 0.0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0.0, $202 = 0.0;
|
|
var $203 = 0.0, $204 = 0, $205 = 0, $206 = 0.0, $207 = 0.0, $208 = 0, $209 = 0.0, $21 = 0, $210 = 0, $211 = 0.0, $212 = 0.0, $213 = 0, $214 = 0, $215 = 0.0, $216 = 0.0, $217 = 0.0, $218 = 0.0, $219 = 0, $22 = 0, $220 = 0;
|
|
var $221 = 0.0, $222 = 0, $223 = 0.0, $224 = 0.0, $225 = 0, $226 = 0, $227 = 0.0, $228 = 0.0, $229 = 0.0, $23 = 0.0, $230 = 0.0, $231 = 0.0, $232 = 0, $233 = 0.0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0.0, $239 = 0;
|
|
var $24 = 0.0, $240 = 0.0, $241 = 0.0, $242 = 0, $243 = 0, $244 = 0.0, $245 = 0.0, $246 = 0, $247 = 0, $248 = 0, $249 = 0.0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0;
|
|
var $258 = 0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0.0;
|
|
var $43 = 0.0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0;
|
|
var $61 = 0, $62 = 0, $63 = 0.0, $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0.0;
|
|
var $8 = 0, $80 = 0, $81 = 0.0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0, $90 = 0, $91 = 0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0, $97 = 0.0;
|
|
var $98 = 0.0, $99 = 0, $label = 0, $label$byval_copy = 0, $or$cond = 0, $text_width = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy3 = sp + 76|0;
|
|
$$byval_copy2 = sp + 72|0;
|
|
$label$byval_copy = sp + 56|0;
|
|
$$byval_copy = sp + 48|0;
|
|
$label = sp + 8|0;
|
|
$0 = $o;
|
|
$1 = $string;
|
|
$2 = $len;
|
|
$3 = $t;
|
|
$4 = $a;
|
|
$5 = $f;
|
|
$6 = $0;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((31618|0),(13400|0),11283,(31620|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $3;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
___assert_fail((31635|0),(13400|0),11284,(31620|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $0;
|
|
$11 = ($10|0)!=(0|0);
|
|
$12 = $3;
|
|
$13 = ($12|0)!=(0|0);
|
|
$or$cond = $11 & $13;
|
|
if (!($or$cond)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$14 = ((($b)) + 12|0);
|
|
$15 = +HEAPF32[$14>>2];
|
|
$16 = $3;
|
|
$17 = ((($16)) + 4|0);
|
|
$18 = +HEAPF32[$17>>2];
|
|
$19 = 2.0 * $18;
|
|
$20 = $15 < $19;
|
|
if ($20) {
|
|
$21 = $3;
|
|
$22 = ((($21)) + 4|0);
|
|
$23 = +HEAPF32[$22>>2];
|
|
$24 = 2.0 * $23;
|
|
$28 = $24;
|
|
} else {
|
|
$25 = ((($b)) + 12|0);
|
|
$26 = +HEAPF32[$25>>2];
|
|
$28 = $26;
|
|
}
|
|
$27 = ((($b)) + 12|0);
|
|
HEAPF32[$27>>2] = $28;
|
|
HEAPF32[$label>>2] = 0.0;
|
|
$29 = ((($label)) + 8|0);
|
|
HEAPF32[$29>>2] = 0.0;
|
|
$30 = ((($b)) + 4|0);
|
|
$31 = +HEAPF32[$30>>2];
|
|
$32 = $3;
|
|
$33 = ((($32)) + 4|0);
|
|
$34 = +HEAPF32[$33>>2];
|
|
$35 = $31 + $34;
|
|
$36 = ((($label)) + 4|0);
|
|
HEAPF32[$36>>2] = $35;
|
|
$37 = ((($b)) + 12|0);
|
|
$38 = +HEAPF32[$37>>2];
|
|
$39 = $3;
|
|
$40 = ((($39)) + 4|0);
|
|
$41 = +HEAPF32[$40>>2];
|
|
$42 = 2.0 * $41;
|
|
$43 = $38 - $42;
|
|
$44 = ((($label)) + 12|0);
|
|
HEAPF32[$44>>2] = $43;
|
|
$45 = $5;
|
|
$46 = ((($45)) + 8|0);
|
|
$47 = HEAP32[$46>>2]|0;
|
|
$48 = $5;
|
|
$49 = $5;
|
|
$50 = ((($49)) + 4|0);
|
|
$51 = +HEAPF32[$50>>2];
|
|
$52 = $1;
|
|
$53 = $2;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$48>>2]|0;
|
|
$54 = (+FUNCTION_TABLE_didii[$47 & 15]($$byval_copy,$51,$52,$53));
|
|
$text_width = $54;
|
|
$55 = $3;
|
|
$56 = +HEAPF32[$55>>2];
|
|
$57 = 2.0 * $56;
|
|
$58 = $text_width;
|
|
$59 = $58 + $57;
|
|
$text_width = $59;
|
|
$60 = $4;
|
|
$61 = $60 & 1;
|
|
$62 = ($61|0)!=(0);
|
|
do {
|
|
if ($62) {
|
|
$63 = +HEAPF32[$b>>2];
|
|
$64 = $3;
|
|
$65 = +HEAPF32[$64>>2];
|
|
$66 = $63 + $65;
|
|
HEAPF32[$label>>2] = $66;
|
|
$67 = ((($b)) + 8|0);
|
|
$68 = +HEAPF32[$67>>2];
|
|
$69 = $3;
|
|
$70 = +HEAPF32[$69>>2];
|
|
$71 = 2.0 * $70;
|
|
$72 = $68 - $71;
|
|
$73 = 0.0 < $72;
|
|
if ($73) {
|
|
$74 = ((($b)) + 8|0);
|
|
$75 = +HEAPF32[$74>>2];
|
|
$76 = $3;
|
|
$77 = +HEAPF32[$76>>2];
|
|
$78 = 2.0 * $77;
|
|
$79 = $75 - $78;
|
|
$81 = $79;
|
|
} else {
|
|
$81 = 0.0;
|
|
}
|
|
$80 = ((($label)) + 8|0);
|
|
HEAPF32[$80>>2] = $81;
|
|
} else {
|
|
$82 = $4;
|
|
$83 = $82 & 2;
|
|
$84 = ($83|0)!=(0);
|
|
if (!($84)) {
|
|
$152 = $4;
|
|
$153 = $152 & 4;
|
|
$154 = ($153|0)!=(0);
|
|
if (!($154)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$155 = +HEAPF32[$b>>2];
|
|
$156 = $3;
|
|
$157 = +HEAPF32[$156>>2];
|
|
$158 = $155 + $157;
|
|
$159 = +HEAPF32[$b>>2];
|
|
$160 = ((($b)) + 8|0);
|
|
$161 = +HEAPF32[$160>>2];
|
|
$162 = $159 + $161;
|
|
$163 = $3;
|
|
$164 = +HEAPF32[$163>>2];
|
|
$165 = 2.0 * $164;
|
|
$166 = $text_width;
|
|
$167 = $165 + $166;
|
|
$168 = $162 - $167;
|
|
$169 = $158 < $168;
|
|
$170 = +HEAPF32[$b>>2];
|
|
if ($169) {
|
|
$171 = ((($b)) + 8|0);
|
|
$172 = +HEAPF32[$171>>2];
|
|
$173 = $170 + $172;
|
|
$174 = $3;
|
|
$175 = +HEAPF32[$174>>2];
|
|
$176 = 2.0 * $175;
|
|
$177 = $text_width;
|
|
$178 = $176 + $177;
|
|
$179 = $173 - $178;
|
|
$183 = $179;
|
|
} else {
|
|
$180 = $3;
|
|
$181 = +HEAPF32[$180>>2];
|
|
$182 = $170 + $181;
|
|
$183 = $182;
|
|
}
|
|
HEAPF32[$label>>2] = $183;
|
|
$184 = $text_width;
|
|
$185 = $3;
|
|
$186 = +HEAPF32[$185>>2];
|
|
$187 = 2.0 * $186;
|
|
$188 = $184 + $187;
|
|
$189 = ((($label)) + 8|0);
|
|
HEAPF32[$189>>2] = $188;
|
|
break;
|
|
}
|
|
$85 = $3;
|
|
$86 = +HEAPF32[$85>>2];
|
|
$87 = 2.0 * $86;
|
|
$88 = $text_width;
|
|
$89 = $87 + $88;
|
|
$90 = 1.0 < $89;
|
|
if ($90) {
|
|
$91 = $3;
|
|
$92 = +HEAPF32[$91>>2];
|
|
$93 = 2.0 * $92;
|
|
$94 = $text_width;
|
|
$95 = $93 + $94;
|
|
$97 = $95;
|
|
} else {
|
|
$97 = 1.0;
|
|
}
|
|
$96 = ((($label)) + 8|0);
|
|
HEAPF32[$96>>2] = $97;
|
|
$98 = +HEAPF32[$b>>2];
|
|
$99 = $3;
|
|
$100 = +HEAPF32[$99>>2];
|
|
$101 = $98 + $100;
|
|
$102 = ((($b)) + 8|0);
|
|
$103 = +HEAPF32[$102>>2];
|
|
$104 = $3;
|
|
$105 = +HEAPF32[$104>>2];
|
|
$106 = 2.0 * $105;
|
|
$107 = $103 - $106;
|
|
$108 = ((($label)) + 8|0);
|
|
$109 = +HEAPF32[$108>>2];
|
|
$110 = $107 - $109;
|
|
$111 = $110 / 2.0;
|
|
$112 = $101 + $111;
|
|
HEAPF32[$label>>2] = $112;
|
|
$113 = +HEAPF32[$b>>2];
|
|
$114 = $3;
|
|
$115 = +HEAPF32[$114>>2];
|
|
$116 = $113 + $115;
|
|
$117 = +HEAPF32[$label>>2];
|
|
$118 = $116 < $117;
|
|
if ($118) {
|
|
$119 = +HEAPF32[$label>>2];
|
|
$124 = $119;
|
|
} else {
|
|
$120 = +HEAPF32[$b>>2];
|
|
$121 = $3;
|
|
$122 = +HEAPF32[$121>>2];
|
|
$123 = $120 + $122;
|
|
$124 = $123;
|
|
}
|
|
HEAPF32[$label>>2] = $124;
|
|
$125 = +HEAPF32[$b>>2];
|
|
$126 = ((($b)) + 8|0);
|
|
$127 = +HEAPF32[$126>>2];
|
|
$128 = $125 + $127;
|
|
$129 = +HEAPF32[$label>>2];
|
|
$130 = ((($label)) + 8|0);
|
|
$131 = +HEAPF32[$130>>2];
|
|
$132 = $129 + $131;
|
|
$133 = $128 < $132;
|
|
if ($133) {
|
|
$134 = +HEAPF32[$b>>2];
|
|
$135 = ((($b)) + 8|0);
|
|
$136 = +HEAPF32[$135>>2];
|
|
$137 = $134 + $136;
|
|
$143 = $137;
|
|
} else {
|
|
$138 = +HEAPF32[$label>>2];
|
|
$139 = ((($label)) + 8|0);
|
|
$140 = +HEAPF32[$139>>2];
|
|
$141 = $138 + $140;
|
|
$143 = $141;
|
|
}
|
|
$142 = ((($label)) + 8|0);
|
|
HEAPF32[$142>>2] = $143;
|
|
$144 = ((($label)) + 8|0);
|
|
$145 = +HEAPF32[$144>>2];
|
|
$146 = +HEAPF32[$label>>2];
|
|
$147 = $145 >= $146;
|
|
if ($147) {
|
|
$148 = +HEAPF32[$label>>2];
|
|
$149 = ((($label)) + 8|0);
|
|
$150 = +HEAPF32[$149>>2];
|
|
$151 = $150 - $148;
|
|
HEAPF32[$149>>2] = $151;
|
|
}
|
|
}
|
|
} while(0);
|
|
$190 = $4;
|
|
$191 = $190 & 16;
|
|
$192 = ($191|0)!=(0);
|
|
if ($192) {
|
|
$193 = ((($b)) + 4|0);
|
|
$194 = +HEAPF32[$193>>2];
|
|
$195 = ((($b)) + 12|0);
|
|
$196 = +HEAPF32[$195>>2];
|
|
$197 = $196 / 2.0;
|
|
$198 = $194 + $197;
|
|
$199 = $5;
|
|
$200 = ((($199)) + 4|0);
|
|
$201 = +HEAPF32[$200>>2];
|
|
$202 = $201 / 2.0;
|
|
$203 = $198 - $202;
|
|
$204 = ((($label)) + 4|0);
|
|
HEAPF32[$204>>2] = $203;
|
|
$205 = ((($b)) + 12|0);
|
|
$206 = +HEAPF32[$205>>2];
|
|
$207 = $206 / 2.0;
|
|
$208 = ((($b)) + 12|0);
|
|
$209 = +HEAPF32[$208>>2];
|
|
$210 = ((($b)) + 12|0);
|
|
$211 = +HEAPF32[$210>>2];
|
|
$212 = $211 / 2.0;
|
|
$213 = $5;
|
|
$214 = ((($213)) + 4|0);
|
|
$215 = +HEAPF32[$214>>2];
|
|
$216 = $215 / 2.0;
|
|
$217 = $212 + $216;
|
|
$218 = $209 - $217;
|
|
$219 = $207 < $218;
|
|
$220 = ((($b)) + 12|0);
|
|
$221 = +HEAPF32[$220>>2];
|
|
if ($219) {
|
|
$222 = ((($b)) + 12|0);
|
|
$223 = +HEAPF32[$222>>2];
|
|
$224 = $223 / 2.0;
|
|
$225 = $5;
|
|
$226 = ((($225)) + 4|0);
|
|
$227 = +HEAPF32[$226>>2];
|
|
$228 = $227 / 2.0;
|
|
$229 = $224 + $228;
|
|
$230 = $221 - $229;
|
|
$233 = $230;
|
|
} else {
|
|
$231 = $221 / 2.0;
|
|
$233 = $231;
|
|
}
|
|
$232 = ((($label)) + 12|0);
|
|
HEAPF32[$232>>2] = $233;
|
|
} else {
|
|
$234 = $4;
|
|
$235 = $234 & 32;
|
|
$236 = ($235|0)!=(0);
|
|
if ($236) {
|
|
$237 = ((($b)) + 4|0);
|
|
$238 = +HEAPF32[$237>>2];
|
|
$239 = ((($b)) + 12|0);
|
|
$240 = +HEAPF32[$239>>2];
|
|
$241 = $238 + $240;
|
|
$242 = $5;
|
|
$243 = ((($242)) + 4|0);
|
|
$244 = +HEAPF32[$243>>2];
|
|
$245 = $241 - $244;
|
|
$246 = ((($label)) + 4|0);
|
|
HEAPF32[$246>>2] = $245;
|
|
$247 = $5;
|
|
$248 = ((($247)) + 4|0);
|
|
$249 = +HEAPF32[$248>>2];
|
|
$250 = ((($label)) + 12|0);
|
|
HEAPF32[$250>>2] = $249;
|
|
}
|
|
}
|
|
$251 = $0;
|
|
$252 = $1;
|
|
$253 = $2;
|
|
$254 = $5;
|
|
$255 = $3;
|
|
$256 = ((($255)) + 8|0);
|
|
$257 = $3;
|
|
$258 = ((($257)) + 12|0);
|
|
;HEAP32[$label$byval_copy>>2]=HEAP32[$label>>2]|0;HEAP32[$label$byval_copy+4>>2]=HEAP32[$label+4>>2]|0;HEAP32[$label$byval_copy+8>>2]=HEAP32[$label+8>>2]|0;HEAP32[$label$byval_copy+12>>2]=HEAP32[$label+12>>2]|0;
|
|
;HEAP8[$$byval_copy2>>0]=HEAP8[$256>>0]|0;HEAP8[$$byval_copy2+1>>0]=HEAP8[$256+1>>0]|0;HEAP8[$$byval_copy2+2>>0]=HEAP8[$256+2>>0]|0;HEAP8[$$byval_copy2+3>>0]=HEAP8[$256+3>>0]|0;
|
|
;HEAP8[$$byval_copy3>>0]=HEAP8[$258>>0]|0;HEAP8[$$byval_copy3+1>>0]=HEAP8[$258+1>>0]|0;HEAP8[$$byval_copy3+2>>0]=HEAP8[$258+2>>0]|0;HEAP8[$$byval_copy3+3>>0]=HEAP8[$258+3>>0]|0;
|
|
_nk_draw_text($251,$label$byval_copy,$252,$253,$254,$$byval_copy2,$$byval_copy3);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_label($ctx,$str,$alignment) {
|
|
$ctx = $ctx|0;
|
|
$str = $str|0;
|
|
$alignment = $alignment|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $str;
|
|
$2 = $alignment;
|
|
$3 = $0;
|
|
$4 = $1;
|
|
$5 = $1;
|
|
$6 = (_nk_strlen($5)|0);
|
|
$7 = $2;
|
|
_nk_text($3,$4,$6,$7);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_text($ctx,$str,$len,$alignment) {
|
|
$ctx = $ctx|0;
|
|
$str = $str|0;
|
|
$len = $len|0;
|
|
$alignment = $alignment|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 16|0;
|
|
$0 = $ctx;
|
|
$1 = $str;
|
|
$2 = $len;
|
|
$3 = $alignment;
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((14913|0),(13400|0),17122,(28576|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $0;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$8 = $0;
|
|
$9 = $1;
|
|
$10 = $2;
|
|
$11 = $3;
|
|
$12 = $0;
|
|
$13 = ((($12)) + 300|0);
|
|
$14 = ((($13)) + 20|0);
|
|
;HEAP8[$$byval_copy>>0]=HEAP8[$14>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$14+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$14+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$14+3>>0]|0;
|
|
_nk_text_colored($8,$9,$10,$11,$$byval_copy);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_button_text($ctx,$title,$len,$behavior) {
|
|
$ctx = $ctx|0;
|
|
$title = $title|0;
|
|
$len = $len|0;
|
|
$behavior = $behavior|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, $bounds = 0, $bounds$byval_copy = 0, $in = 0, $layout = 0, $state = 0, $style = 0, $win = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$bounds$byval_copy = sp + 64|0;
|
|
$bounds = sp + 8|0;
|
|
$1 = $ctx;
|
|
$2 = $title;
|
|
$3 = $len;
|
|
$4 = $behavior;
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((14913|0),(13400|0),17185,(28584|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $1;
|
|
$8 = ((($7)) + 11168|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((28537|0),(13400|0),17186,(28584|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $1;
|
|
$12 = ((($11)) + 11168|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ((($13)) + 72|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($15|0)!=(0|0);
|
|
if (!($16)) {
|
|
___assert_fail((28516|0),(13400|0),17187,(28584|0));
|
|
// unreachable;
|
|
}
|
|
$17 = $1;
|
|
$18 = ($17|0)!=(0|0);
|
|
if ($18) {
|
|
$19 = $1;
|
|
$20 = ((($19)) + 11168|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = ($21|0)!=(0|0);
|
|
if ($22) {
|
|
$23 = $1;
|
|
$24 = ((($23)) + 11168|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = ((($25)) + 72|0);
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = ($27|0)!=(0|0);
|
|
if ($28) {
|
|
$29 = $1;
|
|
$30 = ((($29)) + 11168|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$win = $31;
|
|
$32 = $1;
|
|
$33 = ((($32)) + 300|0);
|
|
$style = $33;
|
|
$34 = $win;
|
|
$35 = ((($34)) + 72|0);
|
|
$36 = HEAP32[$35>>2]|0;
|
|
$layout = $36;
|
|
$37 = $1;
|
|
$38 = (_nk_widget($bounds,$37)|0);
|
|
$state = $38;
|
|
$39 = $state;
|
|
$40 = ($39|0)!=(0);
|
|
if (!($40)) {
|
|
$0 = 0;
|
|
$65 = $0;
|
|
STACKTOP = sp;return ($65|0);
|
|
}
|
|
$41 = $state;
|
|
$42 = ($41|0)==(2);
|
|
if ($42) {
|
|
$48 = 0;
|
|
} else {
|
|
$43 = $layout;
|
|
$44 = HEAP32[$43>>2]|0;
|
|
$45 = $44 & 1024;
|
|
$46 = ($45|0)!=(0);
|
|
if ($46) {
|
|
$48 = 0;
|
|
} else {
|
|
$47 = $1;
|
|
$48 = $47;
|
|
}
|
|
}
|
|
$in = $48;
|
|
$49 = $1;
|
|
$50 = ((($49)) + 5668|0);
|
|
$51 = $win;
|
|
$52 = ((($51)) + 32|0);
|
|
$53 = $2;
|
|
$54 = $3;
|
|
$55 = $style;
|
|
$56 = ((($55)) + 32|0);
|
|
$57 = ((($56)) + 80|0);
|
|
$58 = HEAP32[$57>>2]|0;
|
|
$59 = $4;
|
|
$60 = $style;
|
|
$61 = ((($60)) + 32|0);
|
|
$62 = $in;
|
|
$63 = $style;
|
|
;HEAP32[$bounds$byval_copy>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
$64 = (_nk_do_button_text($50,$52,$bounds$byval_copy,$53,$54,$58,$59,$61,$62,$63)|0);
|
|
$0 = $64;
|
|
$65 = $0;
|
|
STACKTOP = sp;return ($65|0);
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$65 = $0;
|
|
STACKTOP = sp;return ($65|0);
|
|
}
|
|
function _nk_do_button_text($state,$out,$bounds,$string,$len,$align,$behavior,$style,$in,$font) {
|
|
$state = $state|0;
|
|
$out = $out|0;
|
|
$bounds = $bounds|0;
|
|
$string = $string|0;
|
|
$len = $len|0;
|
|
$align = $align|0;
|
|
$behavior = $behavior|0;
|
|
$style = $style|0;
|
|
$in = $in|0;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $$byval_copy6 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
|
|
var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
|
|
var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
|
|
var $61 = 0, $62 = 0, $63 = 0, $7 = 0, $8 = 0, $9 = 0, $bounds$byval_copy = 0, $content = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $ret = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy6 = sp + 84|0;
|
|
$$byval_copy = sp + 80|0;
|
|
$bounds$byval_copy = sp + 64|0;
|
|
$content = sp + 8|0;
|
|
$1 = $state;
|
|
$2 = $out;
|
|
$3 = $string;
|
|
$4 = $len;
|
|
$5 = $align;
|
|
$6 = $behavior;
|
|
$7 = $style;
|
|
$8 = $in;
|
|
$9 = $font;
|
|
$ret = 0;
|
|
$10 = $1;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
___assert_fail((28059|0),(13400|0),11531,(31637|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $7;
|
|
$13 = ($12|0)!=(0|0);
|
|
if (!($13)) {
|
|
___assert_fail((31462|0),(13400|0),11532,(31637|0));
|
|
// unreachable;
|
|
}
|
|
$14 = $2;
|
|
$15 = ($14|0)!=(0|0);
|
|
if (!($15)) {
|
|
___assert_fail((31441|0),(13400|0),11533,(31637|0));
|
|
// unreachable;
|
|
}
|
|
$16 = $3;
|
|
$17 = ($16|0)!=(0|0);
|
|
if (!($17)) {
|
|
___assert_fail((31655|0),(13400|0),11534,(31637|0));
|
|
// unreachable;
|
|
}
|
|
$18 = $9;
|
|
$19 = ($18|0)!=(0|0);
|
|
if (!($19)) {
|
|
___assert_fail((14249|0),(13400|0),11535,(31637|0));
|
|
// unreachable;
|
|
}
|
|
$20 = $2;
|
|
$21 = ($20|0)!=(0|0);
|
|
$22 = $7;
|
|
$23 = ($22|0)!=(0|0);
|
|
$or$cond = $21 & $23;
|
|
$24 = $9;
|
|
$25 = ($24|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $25;
|
|
$26 = $3;
|
|
$27 = ($26|0)!=(0|0);
|
|
$or$cond5 = $or$cond3 & $27;
|
|
if (!($or$cond5)) {
|
|
$0 = 0;
|
|
$63 = $0;
|
|
STACKTOP = sp;return ($63|0);
|
|
}
|
|
$28 = $1;
|
|
$29 = $2;
|
|
$30 = $7;
|
|
$31 = $8;
|
|
$32 = $6;
|
|
;HEAP32[$bounds$byval_copy>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
$33 = (_nk_do_button($28,$29,$bounds$byval_copy,$30,$31,$32,$content)|0);
|
|
$ret = $33;
|
|
$34 = $7;
|
|
$35 = ((($34)) + 120|0);
|
|
$36 = HEAP32[$35>>2]|0;
|
|
$37 = ($36|0)!=(0|0);
|
|
if ($37) {
|
|
$38 = $7;
|
|
$39 = ((($38)) + 120|0);
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$41 = $2;
|
|
$42 = $7;
|
|
$43 = ((($42)) + 116|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$43>>2]|0;
|
|
FUNCTION_TABLE_vii[$40 & 31]($41,$$byval_copy);
|
|
}
|
|
$44 = $2;
|
|
$45 = $1;
|
|
$46 = HEAP32[$45>>2]|0;
|
|
$47 = $7;
|
|
$48 = $3;
|
|
$49 = $4;
|
|
$50 = $5;
|
|
$51 = $9;
|
|
_nk_draw_button_text($44,$bounds,$content,$46,$47,$48,$49,$50,$51);
|
|
$52 = $7;
|
|
$53 = ((($52)) + 124|0);
|
|
$54 = HEAP32[$53>>2]|0;
|
|
$55 = ($54|0)!=(0|0);
|
|
if ($55) {
|
|
$56 = $7;
|
|
$57 = ((($56)) + 124|0);
|
|
$58 = HEAP32[$57>>2]|0;
|
|
$59 = $2;
|
|
$60 = $7;
|
|
$61 = ((($60)) + 116|0);
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$61>>2]|0;
|
|
FUNCTION_TABLE_vii[$58 & 31]($59,$$byval_copy6);
|
|
}
|
|
$62 = $ret;
|
|
$0 = $62;
|
|
$63 = $0;
|
|
STACKTOP = sp;return ($63|0);
|
|
}
|
|
function _nk_button_label($ctx,$title,$behavior) {
|
|
$ctx = $ctx|0;
|
|
$title = $title|0;
|
|
$behavior = $behavior|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $title;
|
|
$2 = $behavior;
|
|
$3 = $0;
|
|
$4 = $1;
|
|
$5 = $1;
|
|
$6 = (_nk_strlen($5)|0);
|
|
$7 = $2;
|
|
$8 = (_nk_button_text($3,$4,$6,$7)|0);
|
|
STACKTOP = sp;return ($8|0);
|
|
}
|
|
function _nk_do_button($state,$out,$r,$style,$in,$behavior,$content) {
|
|
$state = $state|0;
|
|
$out = $out|0;
|
|
$r = $r|0;
|
|
$style = $style|0;
|
|
$in = $in|0;
|
|
$behavior = $behavior|0;
|
|
$content = $content|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0.0;
|
|
var $25 = 0.0, $26 = 0, $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0;
|
|
var $43 = 0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0;
|
|
var $61 = 0, $62 = 0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0, $67 = 0.0, $68 = 0, $69 = 0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0;
|
|
var $8 = 0, $80 = 0, $81 = 0.0, $82 = 0, $83 = 0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0, $88 = 0, $89 = 0.0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0, $97 = 0;
|
|
var $98 = 0, $99 = 0, $bounds = 0, $bounds$byval_copy = 0, $or$cond = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$bounds$byval_copy = sp + 48|0;
|
|
$bounds = sp;
|
|
$1 = $state;
|
|
$2 = $out;
|
|
$3 = $style;
|
|
$4 = $in;
|
|
$5 = $behavior;
|
|
$6 = $content;
|
|
$7 = $3;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((31462|0),(13400|0),11477,(31662|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $1;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((28059|0),(13400|0),11478,(31662|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $2;
|
|
$12 = ($11|0)!=(0|0);
|
|
if (!($12)) {
|
|
___assert_fail((31441|0),(13400|0),11479,(31662|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $2;
|
|
$14 = ($13|0)!=(0|0);
|
|
$15 = $3;
|
|
$16 = ($15|0)!=(0|0);
|
|
$or$cond = $14 & $16;
|
|
if ($or$cond) {
|
|
$17 = +HEAPF32[$r>>2];
|
|
$18 = $3;
|
|
$19 = ((($18)) + 92|0);
|
|
$20 = +HEAPF32[$19>>2];
|
|
$21 = $17 + $20;
|
|
$22 = $3;
|
|
$23 = ((($22)) + 84|0);
|
|
$24 = +HEAPF32[$23>>2];
|
|
$25 = $21 + $24;
|
|
$26 = $6;
|
|
HEAPF32[$26>>2] = $25;
|
|
$27 = ((($r)) + 4|0);
|
|
$28 = +HEAPF32[$27>>2];
|
|
$29 = $3;
|
|
$30 = ((($29)) + 92|0);
|
|
$31 = ((($30)) + 4|0);
|
|
$32 = +HEAPF32[$31>>2];
|
|
$33 = $28 + $32;
|
|
$34 = $3;
|
|
$35 = ((($34)) + 84|0);
|
|
$36 = +HEAPF32[$35>>2];
|
|
$37 = $33 + $36;
|
|
$38 = $6;
|
|
$39 = ((($38)) + 4|0);
|
|
HEAPF32[$39>>2] = $37;
|
|
$40 = ((($r)) + 8|0);
|
|
$41 = +HEAPF32[$40>>2];
|
|
$42 = $3;
|
|
$43 = ((($42)) + 92|0);
|
|
$44 = +HEAPF32[$43>>2];
|
|
$45 = 2.0 * $44;
|
|
$46 = $41 - $45;
|
|
$47 = $3;
|
|
$48 = ((($47)) + 84|0);
|
|
$49 = +HEAPF32[$48>>2];
|
|
$50 = $46 + $49;
|
|
$51 = $6;
|
|
$52 = ((($51)) + 8|0);
|
|
HEAPF32[$52>>2] = $50;
|
|
$53 = ((($r)) + 12|0);
|
|
$54 = +HEAPF32[$53>>2];
|
|
$55 = $3;
|
|
$56 = ((($55)) + 92|0);
|
|
$57 = ((($56)) + 4|0);
|
|
$58 = +HEAPF32[$57>>2];
|
|
$59 = 2.0 * $58;
|
|
$60 = $54 - $59;
|
|
$61 = $3;
|
|
$62 = ((($61)) + 84|0);
|
|
$63 = +HEAPF32[$62>>2];
|
|
$64 = $60 + $63;
|
|
$65 = $6;
|
|
$66 = ((($65)) + 12|0);
|
|
HEAPF32[$66>>2] = $64;
|
|
$67 = +HEAPF32[$r>>2];
|
|
$68 = $3;
|
|
$69 = ((($68)) + 108|0);
|
|
$70 = +HEAPF32[$69>>2];
|
|
$71 = $67 - $70;
|
|
HEAPF32[$bounds>>2] = $71;
|
|
$72 = ((($r)) + 4|0);
|
|
$73 = +HEAPF32[$72>>2];
|
|
$74 = $3;
|
|
$75 = ((($74)) + 108|0);
|
|
$76 = ((($75)) + 4|0);
|
|
$77 = +HEAPF32[$76>>2];
|
|
$78 = $73 - $77;
|
|
$79 = ((($bounds)) + 4|0);
|
|
HEAPF32[$79>>2] = $78;
|
|
$80 = ((($r)) + 8|0);
|
|
$81 = +HEAPF32[$80>>2];
|
|
$82 = $3;
|
|
$83 = ((($82)) + 108|0);
|
|
$84 = +HEAPF32[$83>>2];
|
|
$85 = 2.0 * $84;
|
|
$86 = $81 + $85;
|
|
$87 = ((($bounds)) + 8|0);
|
|
HEAPF32[$87>>2] = $86;
|
|
$88 = ((($r)) + 12|0);
|
|
$89 = +HEAPF32[$88>>2];
|
|
$90 = $3;
|
|
$91 = ((($90)) + 108|0);
|
|
$92 = ((($91)) + 4|0);
|
|
$93 = +HEAPF32[$92>>2];
|
|
$94 = 2.0 * $93;
|
|
$95 = $89 + $94;
|
|
$96 = ((($bounds)) + 12|0);
|
|
HEAPF32[$96>>2] = $95;
|
|
$97 = $1;
|
|
$98 = $4;
|
|
$99 = $5;
|
|
;HEAP32[$bounds$byval_copy>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
$100 = (_nk_button_behavior($97,$bounds$byval_copy,$98,$99)|0);
|
|
$0 = $100;
|
|
$101 = $0;
|
|
STACKTOP = sp;return ($101|0);
|
|
} else {
|
|
$0 = 0;
|
|
$101 = $0;
|
|
STACKTOP = sp;return ($101|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_draw_button($out,$bounds,$state,$style) {
|
|
$out = $out|0;
|
|
$bounds = $bounds|0;
|
|
$state = $state|0;
|
|
$style = $style|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0;
|
|
var $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0;
|
|
var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $background = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy5 = sp + 108|0;
|
|
$$byval_copy4 = sp + 88|0;
|
|
$$byval_copy3 = sp + 72|0;
|
|
$$byval_copy2 = sp + 104|0;
|
|
$$byval_copy1 = sp + 56|0;
|
|
$$byval_copy = sp + 40|0;
|
|
$4 = sp;
|
|
$0 = $out;
|
|
$1 = $bounds;
|
|
$2 = $state;
|
|
$3 = $style;
|
|
$5 = $2;
|
|
$6 = $5 & 16;
|
|
$7 = ($6|0)!=(0);
|
|
do {
|
|
if ($7) {
|
|
$8 = $3;
|
|
$9 = ((($8)) + 20|0);
|
|
$background = $9;
|
|
} else {
|
|
$10 = $2;
|
|
$11 = $10 & 32;
|
|
$12 = ($11|0)!=(0);
|
|
$13 = $3;
|
|
if ($12) {
|
|
$14 = ((($13)) + 40|0);
|
|
$background = $14;
|
|
break;
|
|
} else {
|
|
$background = $13;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$15 = $background;
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = ($16|0)==(1);
|
|
$18 = $0;
|
|
$19 = $1;
|
|
if ($17) {
|
|
$20 = $background;
|
|
$21 = ((($20)) + 4|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$19>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$19+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$19+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$19+12>>2]|0;
|
|
_nk_draw_image($18,$$byval_copy,$21);
|
|
$37 = $background;
|
|
STACKTOP = sp;return ($37|0);
|
|
} else {
|
|
$22 = $3;
|
|
$23 = ((($22)) + 88|0);
|
|
$24 = +HEAPF32[$23>>2];
|
|
$25 = $3;
|
|
$26 = ((($25)) + 60|0);
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$19>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$19+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$19+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$19+12>>2]|0;
|
|
;HEAP8[$$byval_copy2>>0]=HEAP8[$26>>0]|0;HEAP8[$$byval_copy2+1>>0]=HEAP8[$26+1>>0]|0;HEAP8[$$byval_copy2+2>>0]=HEAP8[$26+2>>0]|0;HEAP8[$$byval_copy2+3>>0]=HEAP8[$26+3>>0]|0;
|
|
_nk_fill_rect($18,$$byval_copy1,$24,$$byval_copy2);
|
|
$27 = $0;
|
|
$28 = $1;
|
|
$29 = $3;
|
|
$30 = ((($29)) + 84|0);
|
|
$31 = +HEAPF32[$30>>2];
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$28>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$28+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$28+8>>2]|0;HEAP32[$$byval_copy3+12>>2]=HEAP32[$28+12>>2]|0;
|
|
_nk_shrink_rect($4,$$byval_copy3,$31);
|
|
$32 = $3;
|
|
$33 = ((($32)) + 88|0);
|
|
$34 = +HEAPF32[$33>>2];
|
|
$35 = $background;
|
|
$36 = ((($35)) + 4|0);
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$4+8>>2]|0;HEAP32[$$byval_copy4+12>>2]=HEAP32[$4+12>>2]|0;
|
|
;HEAP8[$$byval_copy5>>0]=HEAP8[$36>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$36+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$36+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$36+3>>0]|0;
|
|
_nk_fill_rect($27,$$byval_copy4,$34,$$byval_copy5);
|
|
$37 = $background;
|
|
STACKTOP = sp;return ($37|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_do_button_symbol($state,$out,$bounds,$symbol,$behavior,$style,$in,$font) {
|
|
$state = $state|0;
|
|
$out = $out|0;
|
|
$bounds = $bounds|0;
|
|
$symbol = $symbol|0;
|
|
$behavior = $behavior|0;
|
|
$style = $style|0;
|
|
$in = $in|0;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $$byval_copy6 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
|
|
var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
|
|
var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
|
|
var $bounds$byval_copy = 0, $content = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $ret = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy6 = sp + 76|0;
|
|
$$byval_copy = sp + 72|0;
|
|
$bounds$byval_copy = sp + 56|0;
|
|
$content = sp;
|
|
$1 = $state;
|
|
$2 = $out;
|
|
$3 = $symbol;
|
|
$4 = $behavior;
|
|
$5 = $style;
|
|
$6 = $in;
|
|
$7 = $font;
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
___assert_fail((28059|0),(13400|0),11579,(31675|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $5;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
___assert_fail((31462|0),(13400|0),11580,(31675|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $7;
|
|
$13 = ($12|0)!=(0|0);
|
|
if (!($13)) {
|
|
___assert_fail((14249|0),(13400|0),11581,(31675|0));
|
|
// unreachable;
|
|
}
|
|
$14 = $2;
|
|
$15 = ($14|0)!=(0|0);
|
|
if (!($15)) {
|
|
___assert_fail((31441|0),(13400|0),11582,(31675|0));
|
|
// unreachable;
|
|
}
|
|
$16 = $2;
|
|
$17 = ($16|0)!=(0|0);
|
|
$18 = $5;
|
|
$19 = ($18|0)!=(0|0);
|
|
$or$cond = $17 & $19;
|
|
$20 = $7;
|
|
$21 = ($20|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $21;
|
|
$22 = $1;
|
|
$23 = ($22|0)!=(0|0);
|
|
$or$cond5 = $or$cond3 & $23;
|
|
if (!($or$cond5)) {
|
|
$0 = 0;
|
|
$57 = $0;
|
|
STACKTOP = sp;return ($57|0);
|
|
}
|
|
$24 = $1;
|
|
$25 = $2;
|
|
$26 = $5;
|
|
$27 = $6;
|
|
$28 = $4;
|
|
;HEAP32[$bounds$byval_copy>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
$29 = (_nk_do_button($24,$25,$bounds$byval_copy,$26,$27,$28,$content)|0);
|
|
$ret = $29;
|
|
$30 = $5;
|
|
$31 = ((($30)) + 120|0);
|
|
$32 = HEAP32[$31>>2]|0;
|
|
$33 = ($32|0)!=(0|0);
|
|
if ($33) {
|
|
$34 = $5;
|
|
$35 = ((($34)) + 120|0);
|
|
$36 = HEAP32[$35>>2]|0;
|
|
$37 = $2;
|
|
$38 = $5;
|
|
$39 = ((($38)) + 116|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$39>>2]|0;
|
|
FUNCTION_TABLE_vii[$36 & 31]($37,$$byval_copy);
|
|
}
|
|
$40 = $2;
|
|
$41 = $1;
|
|
$42 = HEAP32[$41>>2]|0;
|
|
$43 = $5;
|
|
$44 = $3;
|
|
$45 = $7;
|
|
_nk_draw_button_symbol($40,$bounds,$content,$42,$43,$44,$45);
|
|
$46 = $5;
|
|
$47 = ((($46)) + 124|0);
|
|
$48 = HEAP32[$47>>2]|0;
|
|
$49 = ($48|0)!=(0|0);
|
|
if ($49) {
|
|
$50 = $5;
|
|
$51 = ((($50)) + 124|0);
|
|
$52 = HEAP32[$51>>2]|0;
|
|
$53 = $2;
|
|
$54 = $5;
|
|
$55 = ((($54)) + 116|0);
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$55>>2]|0;
|
|
FUNCTION_TABLE_vii[$52 & 31]($53,$$byval_copy6);
|
|
}
|
|
$56 = $ret;
|
|
$0 = $56;
|
|
$57 = $0;
|
|
STACKTOP = sp;return ($57|0);
|
|
}
|
|
function _nk_do_toggle($state,$out,$r,$active,$str,$len,$type,$style,$in,$font) {
|
|
$state = $state|0;
|
|
$out = $out|0;
|
|
$r = $r|0;
|
|
$active = $active|0;
|
|
$str = $str|0;
|
|
$len = $len|0;
|
|
$type = $type|0;
|
|
$style = $style|0;
|
|
$in = $in|0;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $$byval_copy7 = 0, $$sink6 = 0.0, $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0, $102 = 0, $103 = 0.0, $104 = 0, $105 = 0, $106 = 0.0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0;
|
|
var $113 = 0, $114 = 0.0, $115 = 0, $116 = 0, $117 = 0.0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0.0, $122 = 0.0, $123 = 0, $124 = 0.0, $125 = 0, $126 = 0.0, $127 = 0, $128 = 0.0, $129 = 0, $13 = 0, $130 = 0;
|
|
var $131 = 0.0, $132 = 0.0, $133 = 0, $134 = 0.0, $135 = 0, $136 = 0, $137 = 0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0, $141 = 0.0, $142 = 0.0, $143 = 0.0, $144 = 0, $145 = 0, $146 = 0.0, $147 = 0.0, $148 = 0.0, $149 = 0;
|
|
var $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0.0, $154 = 0.0, $155 = 0, $156 = 0.0, $157 = 0.0, $158 = 0, $159 = 0.0, $16 = 0, $160 = 0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0, $165 = 0.0, $166 = 0.0, $167 = 0;
|
|
var $168 = 0.0, $169 = 0.0, $17 = 0, $170 = 0, $171 = 0, $172 = 0.0, $173 = 0.0, $174 = 0.0, $175 = 0.0, $176 = 0, $177 = 0, $178 = 0.0, $179 = 0, $18 = 0, $180 = 0.0, $181 = 0.0, $182 = 0.0, $183 = 0, $184 = 0.0, $185 = 0.0;
|
|
var $186 = 0.0, $187 = 0, $188 = 0.0, $189 = 0, $19 = 0, $190 = 0.0, $191 = 0.0, $192 = 0, $193 = 0, $194 = 0.0, $195 = 0.0, $196 = 0.0, $197 = 0, $198 = 0.0, $199 = 0, $2 = 0, $20 = 0, $200 = 0.0, $201 = 0, $202 = 0.0;
|
|
var $203 = 0.0, $204 = 0.0, $205 = 0, $206 = 0, $207 = 0.0, $208 = 0.0, $209 = 0, $21 = 0, $210 = 0.0, $211 = 0, $212 = 0, $213 = 0.0, $214 = 0.0, $215 = 0.0, $216 = 0, $217 = 0.0, $218 = 0.0, $219 = 0, $22 = 0, $220 = 0.0;
|
|
var $221 = 0.0, $222 = 0, $223 = 0, $224 = 0.0, $225 = 0.0, $226 = 0, $227 = 0.0, $228 = 0.0, $229 = 0, $23 = 0, $230 = 0.0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0;
|
|
var $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0.0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0;
|
|
var $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0;
|
|
var $276 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0.0;
|
|
var $45 = 0, $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0.0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0, $69 = 0.0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0.0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0;
|
|
var $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0, $85 = 0, $86 = 0.0, $87 = 0, $88 = 0, $89 = 0.0, $9 = 0, $90 = 0.0, $91 = 0.0, $92 = 0, $93 = 0, $94 = 0.0, $95 = 0, $96 = 0, $97 = 0, $98 = 0.0, $99 = 0.0;
|
|
var $bounds = 0, $bounds$byval_copy = 0, $cursor = 0, $cursor_pad = 0.0, $label = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $select = 0, $was_active = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy7 = sp + 140|0;
|
|
$$byval_copy = sp + 136|0;
|
|
$bounds$byval_copy = sp + 120|0;
|
|
$bounds = sp + 56|0;
|
|
$select = sp + 40|0;
|
|
$cursor = sp + 24|0;
|
|
$label = sp + 8|0;
|
|
$1 = $state;
|
|
$2 = $out;
|
|
$3 = $active;
|
|
$4 = $str;
|
|
$5 = $len;
|
|
$6 = $type;
|
|
$7 = $style;
|
|
$8 = $in;
|
|
$9 = $font;
|
|
$10 = $7;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
___assert_fail((31462|0),(13400|0),11883,(31695|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $2;
|
|
$13 = ($12|0)!=(0|0);
|
|
if (!($13)) {
|
|
___assert_fail((31441|0),(13400|0),11884,(31695|0));
|
|
// unreachable;
|
|
}
|
|
$14 = $9;
|
|
$15 = ($14|0)!=(0|0);
|
|
if (!($15)) {
|
|
___assert_fail((14249|0),(13400|0),11885,(31695|0));
|
|
// unreachable;
|
|
}
|
|
$16 = $2;
|
|
$17 = ($16|0)!=(0|0);
|
|
$18 = $7;
|
|
$19 = ($18|0)!=(0|0);
|
|
$or$cond = $17 & $19;
|
|
$20 = $9;
|
|
$21 = ($20|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $21;
|
|
$22 = $3;
|
|
$23 = ($22|0)!=(0|0);
|
|
$or$cond5 = $or$cond3 & $23;
|
|
if (!($or$cond5)) {
|
|
$0 = 0;
|
|
$276 = $0;
|
|
STACKTOP = sp;return ($276|0);
|
|
}
|
|
$24 = ((($r)) + 8|0);
|
|
$25 = +HEAPF32[$24>>2];
|
|
$26 = $9;
|
|
$27 = ((($26)) + 4|0);
|
|
$28 = +HEAPF32[$27>>2];
|
|
$29 = $7;
|
|
$30 = ((($29)) + 120|0);
|
|
$31 = +HEAPF32[$30>>2];
|
|
$32 = 2.0 * $31;
|
|
$33 = $28 + $32;
|
|
$34 = $25 < $33;
|
|
if ($34) {
|
|
$35 = $9;
|
|
$36 = ((($35)) + 4|0);
|
|
$37 = +HEAPF32[$36>>2];
|
|
$38 = $7;
|
|
$39 = ((($38)) + 120|0);
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = 2.0 * $40;
|
|
$42 = $37 + $41;
|
|
$46 = $42;
|
|
} else {
|
|
$43 = ((($r)) + 8|0);
|
|
$44 = +HEAPF32[$43>>2];
|
|
$46 = $44;
|
|
}
|
|
$45 = ((($r)) + 8|0);
|
|
HEAPF32[$45>>2] = $46;
|
|
$47 = ((($r)) + 12|0);
|
|
$48 = +HEAPF32[$47>>2];
|
|
$49 = $9;
|
|
$50 = ((($49)) + 4|0);
|
|
$51 = +HEAPF32[$50>>2];
|
|
$52 = $7;
|
|
$53 = ((($52)) + 120|0);
|
|
$54 = ((($53)) + 4|0);
|
|
$55 = +HEAPF32[$54>>2];
|
|
$56 = 2.0 * $55;
|
|
$57 = $51 + $56;
|
|
$58 = $48 < $57;
|
|
if ($58) {
|
|
$59 = $9;
|
|
$60 = ((($59)) + 4|0);
|
|
$61 = +HEAPF32[$60>>2];
|
|
$62 = $7;
|
|
$63 = ((($62)) + 120|0);
|
|
$64 = ((($63)) + 4|0);
|
|
$65 = +HEAPF32[$64>>2];
|
|
$66 = 2.0 * $65;
|
|
$67 = $61 + $66;
|
|
$71 = $67;
|
|
} else {
|
|
$68 = ((($r)) + 12|0);
|
|
$69 = +HEAPF32[$68>>2];
|
|
$71 = $69;
|
|
}
|
|
$70 = ((($r)) + 12|0);
|
|
HEAPF32[$70>>2] = $71;
|
|
$72 = +HEAPF32[$r>>2];
|
|
$73 = $7;
|
|
$74 = ((($73)) + 128|0);
|
|
$75 = +HEAPF32[$74>>2];
|
|
$76 = $72 - $75;
|
|
HEAPF32[$bounds>>2] = $76;
|
|
$77 = ((($r)) + 4|0);
|
|
$78 = +HEAPF32[$77>>2];
|
|
$79 = $7;
|
|
$80 = ((($79)) + 128|0);
|
|
$81 = ((($80)) + 4|0);
|
|
$82 = +HEAPF32[$81>>2];
|
|
$83 = $78 - $82;
|
|
$84 = ((($bounds)) + 4|0);
|
|
HEAPF32[$84>>2] = $83;
|
|
$85 = ((($r)) + 8|0);
|
|
$86 = +HEAPF32[$85>>2];
|
|
$87 = $7;
|
|
$88 = ((($87)) + 128|0);
|
|
$89 = +HEAPF32[$88>>2];
|
|
$90 = 2.0 * $89;
|
|
$91 = $86 + $90;
|
|
$92 = ((($bounds)) + 8|0);
|
|
HEAPF32[$92>>2] = $91;
|
|
$93 = ((($r)) + 12|0);
|
|
$94 = +HEAPF32[$93>>2];
|
|
$95 = $7;
|
|
$96 = ((($95)) + 128|0);
|
|
$97 = ((($96)) + 4|0);
|
|
$98 = +HEAPF32[$97>>2];
|
|
$99 = 2.0 * $98;
|
|
$100 = $94 + $99;
|
|
$101 = ((($bounds)) + 12|0);
|
|
HEAPF32[$101>>2] = $100;
|
|
$102 = ((($r)) + 12|0);
|
|
$103 = +HEAPF32[$102>>2];
|
|
$104 = $9;
|
|
$105 = ((($104)) + 4|0);
|
|
$106 = +HEAPF32[$105>>2];
|
|
$107 = $7;
|
|
$108 = ((($107)) + 120|0);
|
|
$109 = ((($108)) + 4|0);
|
|
$110 = +HEAPF32[$109>>2];
|
|
$111 = $106 + $110;
|
|
$112 = $103 < $111;
|
|
if ($112) {
|
|
$113 = ((($r)) + 12|0);
|
|
$114 = +HEAPF32[$113>>2];
|
|
$124 = $114;
|
|
} else {
|
|
$115 = $9;
|
|
$116 = ((($115)) + 4|0);
|
|
$117 = +HEAPF32[$116>>2];
|
|
$118 = $7;
|
|
$119 = ((($118)) + 120|0);
|
|
$120 = ((($119)) + 4|0);
|
|
$121 = +HEAPF32[$120>>2];
|
|
$122 = $117 + $121;
|
|
$124 = $122;
|
|
}
|
|
$123 = ((($select)) + 8|0);
|
|
HEAPF32[$123>>2] = $124;
|
|
$125 = ((($select)) + 8|0);
|
|
$126 = +HEAPF32[$125>>2];
|
|
$127 = ((($select)) + 12|0);
|
|
HEAPF32[$127>>2] = $126;
|
|
$128 = +HEAPF32[$r>>2];
|
|
$129 = $7;
|
|
$130 = ((($129)) + 120|0);
|
|
$131 = +HEAPF32[$130>>2];
|
|
$132 = $128 + $131;
|
|
HEAPF32[$select>>2] = $132;
|
|
$133 = ((($r)) + 4|0);
|
|
$134 = +HEAPF32[$133>>2];
|
|
$135 = $7;
|
|
$136 = ((($135)) + 120|0);
|
|
$137 = ((($136)) + 4|0);
|
|
$138 = +HEAPF32[$137>>2];
|
|
$139 = $134 + $138;
|
|
$140 = ((($select)) + 8|0);
|
|
$141 = +HEAPF32[$140>>2];
|
|
$142 = $141 / 2.0;
|
|
$143 = $139 + $142;
|
|
$144 = $9;
|
|
$145 = ((($144)) + 4|0);
|
|
$146 = +HEAPF32[$145>>2];
|
|
$147 = $146 / 2.0;
|
|
$148 = $143 - $147;
|
|
$149 = ((($select)) + 4|0);
|
|
HEAPF32[$149>>2] = $148;
|
|
$150 = $6;
|
|
$151 = ($150|0)==(1);
|
|
$152 = ((($select)) + 8|0);
|
|
$153 = +HEAPF32[$152>>2];
|
|
$154 = $153 / 4.0;
|
|
$155 = ((($select)) + 12|0);
|
|
$156 = +HEAPF32[$155>>2];
|
|
$157 = $156 / 6.0;
|
|
$$sink6 = $151 ? $154 : $157;
|
|
$158 = (~~(($$sink6)));
|
|
$159 = (+($158|0));
|
|
$cursor_pad = $159;
|
|
$160 = ((($select)) + 8|0);
|
|
$161 = +HEAPF32[$160>>2];
|
|
$162 = $cursor_pad;
|
|
$163 = $162 * 2.0;
|
|
$164 = $161 < $163;
|
|
$165 = $cursor_pad;
|
|
$166 = $165 * 2.0;
|
|
$167 = ((($select)) + 8|0);
|
|
$168 = +HEAPF32[$167>>2];
|
|
$169 = $164 ? $166 : $168;
|
|
$170 = ((($select)) + 12|0);
|
|
HEAPF32[$170>>2] = $169;
|
|
$171 = ((($select)) + 12|0);
|
|
$172 = +HEAPF32[$171>>2];
|
|
$173 = $cursor_pad;
|
|
$174 = $173 * 2.0;
|
|
$175 = $172 - $174;
|
|
$176 = ((($cursor)) + 12|0);
|
|
HEAPF32[$176>>2] = $175;
|
|
$177 = ((($cursor)) + 12|0);
|
|
$178 = +HEAPF32[$177>>2];
|
|
$179 = ((($cursor)) + 8|0);
|
|
HEAPF32[$179>>2] = $178;
|
|
$180 = +HEAPF32[$select>>2];
|
|
$181 = $cursor_pad;
|
|
$182 = $180 + $181;
|
|
HEAPF32[$cursor>>2] = $182;
|
|
$183 = ((($select)) + 4|0);
|
|
$184 = +HEAPF32[$183>>2];
|
|
$185 = $cursor_pad;
|
|
$186 = $184 + $185;
|
|
$187 = ((($cursor)) + 4|0);
|
|
HEAPF32[$187>>2] = $186;
|
|
$188 = +HEAPF32[$r>>2];
|
|
$189 = ((($select)) + 8|0);
|
|
$190 = +HEAPF32[$189>>2];
|
|
$191 = $188 + $190;
|
|
$192 = $7;
|
|
$193 = ((($192)) + 120|0);
|
|
$194 = +HEAPF32[$193>>2];
|
|
$195 = $194 * 2.0;
|
|
$196 = $191 + $195;
|
|
HEAPF32[$label>>2] = $196;
|
|
$197 = ((($select)) + 4|0);
|
|
$198 = +HEAPF32[$197>>2];
|
|
$199 = ((($label)) + 4|0);
|
|
HEAPF32[$199>>2] = $198;
|
|
$200 = +HEAPF32[$r>>2];
|
|
$201 = ((($r)) + 8|0);
|
|
$202 = +HEAPF32[$201>>2];
|
|
$203 = $200 + $202;
|
|
$204 = +HEAPF32[$label>>2];
|
|
$205 = $7;
|
|
$206 = ((($205)) + 120|0);
|
|
$207 = +HEAPF32[$206>>2];
|
|
$208 = $204 + $207;
|
|
$209 = $203 < $208;
|
|
if ($209) {
|
|
$210 = +HEAPF32[$label>>2];
|
|
$211 = $7;
|
|
$212 = ((($211)) + 120|0);
|
|
$213 = +HEAPF32[$212>>2];
|
|
$214 = $210 + $213;
|
|
$220 = $214;
|
|
} else {
|
|
$215 = +HEAPF32[$r>>2];
|
|
$216 = ((($r)) + 8|0);
|
|
$217 = +HEAPF32[$216>>2];
|
|
$218 = $215 + $217;
|
|
$220 = $218;
|
|
}
|
|
$219 = ((($label)) + 8|0);
|
|
HEAPF32[$219>>2] = $220;
|
|
$221 = +HEAPF32[$label>>2];
|
|
$222 = $7;
|
|
$223 = ((($222)) + 120|0);
|
|
$224 = +HEAPF32[$223>>2];
|
|
$225 = $221 + $224;
|
|
$226 = ((($label)) + 8|0);
|
|
$227 = +HEAPF32[$226>>2];
|
|
$228 = $227 - $225;
|
|
HEAPF32[$226>>2] = $228;
|
|
$229 = ((($select)) + 8|0);
|
|
$230 = +HEAPF32[$229>>2];
|
|
$231 = ((($label)) + 12|0);
|
|
HEAPF32[$231>>2] = $230;
|
|
$232 = $3;
|
|
$233 = HEAP32[$232>>2]|0;
|
|
$was_active = $233;
|
|
$234 = $8;
|
|
$235 = $1;
|
|
$236 = $3;
|
|
$237 = HEAP32[$236>>2]|0;
|
|
;HEAP32[$bounds$byval_copy>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
$238 = (_nk_toggle_behavior($234,$bounds$byval_copy,$235,$237)|0);
|
|
$239 = $3;
|
|
HEAP32[$239>>2] = $238;
|
|
$240 = $7;
|
|
$241 = ((($240)) + 140|0);
|
|
$242 = HEAP32[$241>>2]|0;
|
|
$243 = ($242|0)!=(0|0);
|
|
if ($243) {
|
|
$244 = $7;
|
|
$245 = ((($244)) + 140|0);
|
|
$246 = HEAP32[$245>>2]|0;
|
|
$247 = $2;
|
|
$248 = $7;
|
|
$249 = ((($248)) + 136|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$249>>2]|0;
|
|
FUNCTION_TABLE_vii[$246 & 31]($247,$$byval_copy);
|
|
}
|
|
$250 = $6;
|
|
$251 = ($250|0)==(0);
|
|
$252 = $2;
|
|
$253 = $1;
|
|
$254 = HEAP32[$253>>2]|0;
|
|
$255 = $7;
|
|
$256 = $3;
|
|
$257 = HEAP32[$256>>2]|0;
|
|
$258 = $4;
|
|
$259 = $5;
|
|
$260 = $9;
|
|
if ($251) {
|
|
_nk_draw_checkbox($252,$254,$255,$257,$label,$select,$cursor,$258,$259,$260);
|
|
} else {
|
|
_nk_draw_option($252,$254,$255,$257,$label,$select,$cursor,$258,$259,$260);
|
|
}
|
|
$261 = $7;
|
|
$262 = ((($261)) + 144|0);
|
|
$263 = HEAP32[$262>>2]|0;
|
|
$264 = ($263|0)!=(0|0);
|
|
if ($264) {
|
|
$265 = $7;
|
|
$266 = ((($265)) + 144|0);
|
|
$267 = HEAP32[$266>>2]|0;
|
|
$268 = $2;
|
|
$269 = $7;
|
|
$270 = ((($269)) + 136|0);
|
|
;HEAP32[$$byval_copy7>>2]=HEAP32[$270>>2]|0;
|
|
FUNCTION_TABLE_vii[$267 & 31]($268,$$byval_copy7);
|
|
}
|
|
$271 = $was_active;
|
|
$272 = $3;
|
|
$273 = HEAP32[$272>>2]|0;
|
|
$274 = ($271|0)!=($273|0);
|
|
$275 = $274&1;
|
|
$0 = $275;
|
|
$276 = $0;
|
|
STACKTOP = sp;return ($276|0);
|
|
}
|
|
function _nk_option_text($ctx,$text,$len,$is_active) {
|
|
$ctx = $ctx|0;
|
|
$text = $text|0;
|
|
$len = $len|0;
|
|
$is_active = $is_active|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, $bounds = 0, $bounds$byval_copy = 0, $in = 0, $layout = 0, $state = 0, $style = 0, $win = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$bounds$byval_copy = sp + 64|0;
|
|
$4 = sp + 40|0;
|
|
$bounds = sp + 8|0;
|
|
$1 = $ctx;
|
|
$2 = $text;
|
|
$3 = $len;
|
|
HEAP32[$4>>2] = $is_active;
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((14913|0),(13400|0),17561,(28599|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $1;
|
|
$8 = ((($7)) + 11168|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((28537|0),(13400|0),17562,(28599|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $1;
|
|
$12 = ((($11)) + 11168|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ((($13)) + 72|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($15|0)!=(0|0);
|
|
if (!($16)) {
|
|
___assert_fail((28516|0),(13400|0),17563,(28599|0));
|
|
// unreachable;
|
|
}
|
|
$17 = $1;
|
|
$18 = ($17|0)!=(0|0);
|
|
if ($18) {
|
|
$19 = $1;
|
|
$20 = ((($19)) + 11168|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = ($21|0)!=(0|0);
|
|
if ($22) {
|
|
$23 = $1;
|
|
$24 = ((($23)) + 11168|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = ((($25)) + 72|0);
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = ($27|0)!=(0|0);
|
|
if ($28) {
|
|
$30 = $1;
|
|
$31 = ((($30)) + 11168|0);
|
|
$32 = HEAP32[$31>>2]|0;
|
|
$win = $32;
|
|
$33 = $1;
|
|
$34 = ((($33)) + 300|0);
|
|
$style = $34;
|
|
$35 = $win;
|
|
$36 = ((($35)) + 72|0);
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$layout = $37;
|
|
$38 = $1;
|
|
$39 = (_nk_widget($bounds,$38)|0);
|
|
$state = $39;
|
|
$40 = $state;
|
|
$41 = ($40|0)!=(0);
|
|
$42 = $state;
|
|
if (!($41)) {
|
|
$0 = $42;
|
|
$61 = $0;
|
|
STACKTOP = sp;return ($61|0);
|
|
}
|
|
$43 = ($42|0)==(2);
|
|
if ($43) {
|
|
$49 = 0;
|
|
} else {
|
|
$44 = $layout;
|
|
$45 = HEAP32[$44>>2]|0;
|
|
$46 = $45 & 1024;
|
|
$47 = ($46|0)!=(0);
|
|
if ($47) {
|
|
$49 = 0;
|
|
} else {
|
|
$48 = $1;
|
|
$49 = $48;
|
|
}
|
|
}
|
|
$in = $49;
|
|
$50 = $1;
|
|
$51 = ((($50)) + 5668|0);
|
|
$52 = $win;
|
|
$53 = ((($52)) + 32|0);
|
|
$54 = $2;
|
|
$55 = $3;
|
|
$56 = $style;
|
|
$57 = ((($56)) + 416|0);
|
|
$58 = $in;
|
|
$59 = $style;
|
|
;HEAP32[$bounds$byval_copy>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
(_nk_do_toggle($51,$53,$bounds$byval_copy,$4,$54,$55,1,$57,$58,$59)|0);
|
|
$60 = HEAP32[$4>>2]|0;
|
|
$0 = $60;
|
|
$61 = $0;
|
|
STACKTOP = sp;return ($61|0);
|
|
}
|
|
}
|
|
}
|
|
$29 = HEAP32[$4>>2]|0;
|
|
$0 = $29;
|
|
$61 = $0;
|
|
STACKTOP = sp;return ($61|0);
|
|
}
|
|
function _nk_option_label($ctx,$label,$active) {
|
|
$ctx = $ctx|0;
|
|
$label = $label|0;
|
|
$active = $active|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $label;
|
|
$2 = $active;
|
|
$3 = $0;
|
|
$4 = $1;
|
|
$5 = $1;
|
|
$6 = (_nk_strlen($5)|0);
|
|
$7 = $2;
|
|
$8 = (_nk_option_text($3,$4,$6,$7)|0);
|
|
STACKTOP = sp;return ($8|0);
|
|
}
|
|
function _nk_do_edit($state,$out,$bounds,$flags,$filter,$edit,$style,$in,$font) {
|
|
$state = $state|0;
|
|
$out = $out|0;
|
|
$bounds = $bounds|0;
|
|
$flags = $flags|0;
|
|
$filter = $filter|0;
|
|
$edit = $edit|0;
|
|
$style = $style|0;
|
|
$in = $in|0;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $$byval_copy16 = 0, $$byval_copy18 = 0, $$byval_copy20 = 0, $$byval_copy21 = 0, $$byval_copy23 = 0, $$byval_copy24 = 0, $$byval_copy30 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $1000 = 0.0, $1001 = 0, $1002 = 0, $1003 = 0.0, $1004 = 0.0, $1005 = 0, $1006 = 0.0, $1007 = 0;
|
|
var $1008 = 0.0, $1009 = 0.0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0.0, $1014 = 0.0, $1015 = 0.0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0.0, $1023 = 0, $1024 = 0, $1025 = 0;
|
|
var $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0;
|
|
var $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0.0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0.0, $1053 = 0.0, $1054 = 0, $1055 = 0.0, $1056 = 0, $1057 = 0.0, $1058 = 0.0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0;
|
|
var $1062 = 0.0, $1063 = 0.0, $1064 = 0.0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $1071 = 0.0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0;
|
|
var $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0, $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0.0, $1096 = 0, $1097 = 0, $1098 = 0;
|
|
var $1099 = 0.0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0.0, $1102 = 0.0, $1103 = 0.0, $1104 = 0, $1105 = 0, $1106 = 0.0, $1107 = 0.0, $1108 = 0, $1109 = 0.0, $111 = 0, $1110 = 0, $1111 = 0.0, $1112 = 0.0, $1113 = 0.0, $1114 = 0.0, $1115 = 0.0;
|
|
var $1116 = 0, $1117 = 0.0, $1118 = 0.0, $1119 = 0.0, $112 = 0, $1120 = 0, $1121 = 0, $1122 = 0, $1123 = 0, $1124 = 0.0, $1125 = 0, $1126 = 0.0, $1127 = 0.0, $1128 = 0, $1129 = 0, $113 = 0, $1130 = 0, $1131 = 0, $1132 = 0, $1133 = 0.0;
|
|
var $1134 = 0.0, $1135 = 0.0, $1136 = 0, $1137 = 0, $1138 = 0.0, $1139 = 0.0, $114 = 0, $1140 = 0, $1141 = 0.0, $1142 = 0, $1143 = 0.0, $1144 = 0.0, $1145 = 0, $1146 = 0, $1147 = 0, $1148 = 0.0, $1149 = 0.0, $115 = 0, $1150 = 0, $1151 = 0;
|
|
var $1152 = 0, $1153 = 0, $1154 = 0, $1155 = 0, $1156 = 0, $1157 = 0.0, $1158 = 0, $1159 = 0, $116 = 0, $1160 = 0.0, $1161 = 0, $1162 = 0.0, $1163 = 0, $1164 = 0, $1165 = 0, $1166 = 0, $1167 = 0, $1168 = 0, $1169 = 0, $117 = 0;
|
|
var $1170 = 0, $1171 = 0, $1172 = 0, $1173 = 0, $1174 = 0, $1175 = 0, $1176 = 0, $1177 = 0, $1178 = 0, $1179 = 0, $118 = 0.0, $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0;
|
|
var $1189 = 0, $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0, $1194 = 0, $1195 = 0, $1196 = 0, $1197 = 0, $1198 = 0, $1199 = 0, $12 = 0, $120 = 0, $1200 = 0, $1201 = 0, $1202 = 0.0, $1203 = 0, $1204 = 0, $1205 = 0.0;
|
|
var $1206 = 0.0, $1207 = 0, $1208 = 0.0, $1209 = 0, $121 = 0, $1210 = 0, $1211 = 0, $1212 = 0.0, $1213 = 0.0, $1214 = 0, $1215 = 0, $1216 = 0.0, $1217 = 0, $1218 = 0, $1219 = 0, $122 = 0.0, $1220 = 0, $123 = 0, $124 = 0, $125 = 0;
|
|
var $126 = 0, $127 = 0.0, $128 = 0.0, $129 = 0, $13 = 0, $130 = 0.0, $131 = 0.0, $132 = 0, $133 = 0, $134 = 0.0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0.0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0;
|
|
var $144 = 0, $145 = 0.0, $146 = 0, $147 = 0.0, $148 = 0, $149 = 0.0, $15 = 0, $150 = 0.0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0;
|
|
var $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0;
|
|
var $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0;
|
|
var $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0;
|
|
var $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0.0, $223 = 0.0, $224 = 0.0, $225 = 0, $226 = 0, $227 = 0.0, $228 = 0.0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0;
|
|
var $234 = 0, $235 = 0, $236 = 0.0, $237 = 0, $238 = 0.0, $239 = 0, $24 = 0, $240 = 0.0, $241 = 0.0, $242 = 0.0, $243 = 0.0, $244 = 0, $245 = 0, $246 = 0, $247 = 0.0, $248 = 0.0, $249 = 0.0, $25 = 0, $250 = 0, $251 = 0;
|
|
var $252 = 0, $253 = 0.0, $254 = 0.0, $255 = 0.0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0;
|
|
var $270 = 0, $271 = 0, $272 = 0.0, $273 = 0.0, $274 = 0, $275 = 0.0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0.0, $287 = 0, $288 = 0;
|
|
var $289 = 0, $29 = 0.0, $290 = 0, $291 = 0, $292 = 0.0, $293 = 0, $294 = 0, $295 = 0.0, $296 = 0.0, $297 = 0, $298 = 0.0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0;
|
|
var $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0.0, $316 = 0, $317 = 0, $318 = 0.0, $319 = 0, $32 = 0.0, $320 = 0, $321 = 0, $322 = 0, $323 = 0;
|
|
var $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0.0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0.0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0;
|
|
var $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0.0;
|
|
var $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0.0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0;
|
|
var $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0.0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0;
|
|
var $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0;
|
|
var $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0.0, $430 = 0, $431 = 0;
|
|
var $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0.0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0;
|
|
var $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0;
|
|
var $469 = 0, $47 = 0.0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0.0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0;
|
|
var $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0.0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0.0, $501 = 0, $502 = 0, $503 = 0.0;
|
|
var $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0.0, $510 = 0.0, $511 = 0, $512 = 0.0, $513 = 0.0, $514 = 0.0, $515 = 0, $516 = 0.0, $517 = 0.0, $518 = 0, $519 = 0.0, $52 = 0, $520 = 0.0, $521 = 0;
|
|
var $522 = 0.0, $523 = 0, $524 = 0.0, $525 = 0.0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0.0;
|
|
var $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0.0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0;
|
|
var $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0.0, $571 = 0, $572 = 0, $573 = 0.0, $574 = 0, $575 = 0, $576 = 0;
|
|
var $577 = 0, $578 = 0, $579 = 0, $58 = 0.0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0.0, $59 = 0.0, $590 = 0.0, $591 = 0.0, $592 = 0, $593 = 0, $594 = 0;
|
|
var $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0.0, $600 = 0.0, $601 = 0.0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0.0, $610 = 0, $611 = 0;
|
|
var $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0.0, $62 = 0, $620 = 0.0, $621 = 0.0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0;
|
|
var $630 = 0.0, $631 = 0.0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0.0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0;
|
|
var $649 = 0.0, $65 = 0, $650 = 0.0, $651 = 0.0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0.0, $661 = 0.0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0;
|
|
var $667 = 0.0, $668 = 0.0, $669 = 0, $67 = 0, $670 = 0.0, $671 = 0.0, $672 = 0.0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0.0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0;
|
|
var $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0.0, $690 = 0, $691 = 0, $692 = 0.0, $693 = 0.0, $694 = 0.0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0.0;
|
|
var $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0.0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0.0, $716 = 0.0, $717 = 0.0, $718 = 0, $719 = 0, $72 = 0.0;
|
|
var $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0.0, $73 = 0.0, $730 = 0, $731 = 0.0, $732 = 0.0, $733 = 0.0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0;
|
|
var $739 = 0, $74 = 0.0, $740 = 0, $741 = 0.0, $742 = 0.0, $743 = 0.0, $744 = 0, $745 = 0, $746 = 0.0, $747 = 0, $748 = 0.0, $749 = 0.0, $75 = 0.0, $750 = 0.0, $751 = 0, $752 = 0.0, $753 = 0.0, $754 = 0.0, $755 = 0, $756 = 0.0;
|
|
var $757 = 0.0, $758 = 0, $759 = 0, $76 = 0, $760 = 0.0, $761 = 0, $762 = 0, $763 = 0.0, $764 = 0, $765 = 0.0, $766 = 0.0, $767 = 0, $768 = 0.0, $769 = 0, $77 = 0, $770 = 0.0, $771 = 0.0, $772 = 0, $773 = 0.0, $774 = 0;
|
|
var $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0.0, $783 = 0, $784 = 0, $785 = 0, $786 = 0.0, $787 = 0, $788 = 0, $789 = 0.0, $79 = 0, $790 = 0.0, $791 = 0.0, $792 = 0;
|
|
var $793 = 0, $794 = 0.0, $795 = 0.0, $796 = 0.0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0.0, $801 = 0, $802 = 0.0, $803 = 0, $804 = 0, $805 = 0, $806 = 0.0, $807 = 0, $808 = 0.0, $809 = 0.0, $81 = 0.0;
|
|
var $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0.0, $815 = 0.0, $816 = 0.0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0.0, $824 = 0, $825 = 0.0, $826 = 0.0, $827 = 0, $828 = 0;
|
|
var $829 = 0.0, $83 = 0, $830 = 0.0, $831 = 0, $832 = 0.0, $833 = 0, $834 = 0, $835 = 0, $836 = 0.0, $837 = 0, $838 = 0, $839 = 0.0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0.0, $845 = 0, $846 = 0.0;
|
|
var $847 = 0.0, $848 = 0, $849 = 0.0, $85 = 0.0, $850 = 0.0, $851 = 0, $852 = 0.0, $853 = 0, $854 = 0.0, $855 = 0.0, $856 = 0.0, $857 = 0.0, $858 = 0, $859 = 0, $86 = 0.0, $860 = 0, $861 = 0, $862 = 0.0, $863 = 0, $864 = 0;
|
|
var $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0;
|
|
var $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0;
|
|
var $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0;
|
|
var $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0.0, $929 = 0, $93 = 0.0, $930 = 0, $931 = 0.0, $932 = 0.0, $933 = 0, $934 = 0.0, $935 = 0, $936 = 0;
|
|
var $937 = 0, $938 = 0.0, $939 = 0.0, $94 = 0, $940 = 0, $941 = 0, $942 = 0.0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0;
|
|
var $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0.0, $96 = 0.0, $960 = 0, $961 = 0, $962 = 0.0, $963 = 0.0, $964 = 0, $965 = 0.0, $966 = 0, $967 = 0, $968 = 0, $969 = 0.0, $97 = 0.0, $970 = 0.0, $971 = 0, $972 = 0;
|
|
var $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0.0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0.0, $990 = 0;
|
|
var $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $area = 0, $b = 0, $background = 0, $background12 = 0, $background22 = 0, $background_color = 0, $background_color$byval_copy = 0, $background_color$byval_copy26 = 0, $background_color$byval_copy28 = 0, $background_color23 = 0, $background_color23$byval_copy = 0;
|
|
var $begin = 0, $begin13 = 0, $begin14 = 0, $begin15 = 0, $begin16 = 0, $begin21 = 0, $bounds$byval_copy = 0, $bounds$byval_copy17 = 0, $bounds$byval_copy19 = 0, $bounds$byval_copy22 = 0, $bounds$byval_copy25 = 0, $clip = 0, $clip$byval_copy = 0, $copy = 0, $cursor = 0, $cursor$byval_copy = 0, $cursor_color = 0, $cursor_color$byval_copy = 0, $cursor_color$byval_copy31 = 0, $cursor_follow = 0;
|
|
var $cursor_pos = 0, $cursor_ptr = 0, $cursor_text_color = 0, $cut = 0, $e = 0, $end = 0, $end17 = 0, $glyph_len = 0, $glyph_len18 = 0, $glyph_len2 = 0, $glyph_offset = 0, $glyph_offset4 = 0, $glyph_offset8 = 0, $glyph_width = 0.0, $glyphs = 0, $i = 0, $is_hovered = 0, $l = 0, $l20 = 0, $label = 0;
|
|
var $label$byval_copy = 0, $label$byval_copy32 = 0, $len = 0, $line_width = 0.0, $mouse_x = 0.0, $mouse_y = 0.0, $old_clip = 0, $old_clip$byval_copy = 0, $old_mode = 0, $or$cond = 0, $or$cond11 = 0, $or$cond13 = 0, $or$cond15 = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0, $out_offset = 0, $out_offset5 = 0, $out_offset9 = 0;
|
|
var $paste = 0, $prev_state = 0, $remaining = 0, $remaining11 = 0, $remaining7 = 0, $ret = 0, $row_begin = 0, $row_height = 0.0, $row_size = 0, $row_size10 = 0, $row_size6 = 0, $scroll = 0, $scroll_inc = 0.0, $scroll_increment = 0.0, $scroll_offset = 0.0, $scroll_step = 0.0, $scroll_target = 0.0, $sel_background_color = 0, $sel_background_color$byval_copy = 0, $sel_text_color = 0;
|
|
var $sel_text_color$byval_copy = 0, $select_all = 0, $select_begin_ptr = 0, $select_end_ptr = 0, $selection_begin = 0, $selection_end = 0, $selection_offset_end = 0, $selection_offset_start = 0, $shift_mod = 0, $tab = 0, $text = 0, $text1 = 0, $text_color = 0, $text_color$byval_copy = 0, $text_color$byval_copy27 = 0, $text_color$byval_copy29 = 0, $text_color24 = 0, $text_color24$byval_copy = 0, $text_len = 0, $text_size = 0;
|
|
var $total_lines = 0, $txt = 0, $type = 0, $unicode = 0, $unicode19 = 0, $unicode3 = 0, $ws = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 880|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$old_clip$byval_copy = sp + 752|0;
|
|
$text_color24$byval_copy = sp + 864|0;
|
|
$background_color23$byval_copy = sp + 860|0;
|
|
$label$byval_copy32 = sp + 736|0;
|
|
$cursor_color$byval_copy31 = sp + 856|0;
|
|
$label$byval_copy = sp + 720|0;
|
|
$$byval_copy30 = sp + 712|0;
|
|
$cursor_color$byval_copy = sp + 852|0;
|
|
$cursor$byval_copy = sp + 696|0;
|
|
$text_color$byval_copy29 = sp + 848|0;
|
|
$background_color$byval_copy28 = sp + 844|0;
|
|
$sel_text_color$byval_copy = sp + 840|0;
|
|
$sel_background_color$byval_copy = sp + 836|0;
|
|
$text_color$byval_copy27 = sp + 832|0;
|
|
$background_color$byval_copy26 = sp + 828|0;
|
|
$text_color$byval_copy = sp + 824|0;
|
|
$background_color$byval_copy = sp + 820|0;
|
|
$bounds$byval_copy25 = sp + 680|0;
|
|
$$byval_copy24 = sp + 676|0;
|
|
$$byval_copy23 = sp + 672|0;
|
|
$clip$byval_copy = sp + 656|0;
|
|
$bounds$byval_copy22 = sp + 640|0;
|
|
$$byval_copy21 = sp + 816|0;
|
|
$$byval_copy20 = sp + 624|0;
|
|
$bounds$byval_copy19 = sp + 608|0;
|
|
$$byval_copy18 = sp + 812|0;
|
|
$bounds$byval_copy17 = sp + 592|0;
|
|
$$byval_copy16 = sp + 588|0;
|
|
$$byval_copy = sp + 584|0;
|
|
$bounds$byval_copy = sp + 568|0;
|
|
$area = sp + 512|0;
|
|
$glyph_len = sp + 464|0;
|
|
$unicode = sp + 460|0;
|
|
$clip = sp + 416|0;
|
|
$old_clip = sp + 400|0;
|
|
$9 = sp + 368|0;
|
|
$text_size = sp + 352|0;
|
|
$cursor_pos = sp + 328|0;
|
|
$selection_offset_start = sp + 320|0;
|
|
$selection_offset_end = sp + 312|0;
|
|
$unicode3 = sp + 288|0;
|
|
$glyph_offset = sp + 272|0;
|
|
$out_offset = sp + 264|0;
|
|
$row_size = sp + 256|0;
|
|
$remaining = sp + 248|0;
|
|
$10 = sp + 240|0;
|
|
$glyph_offset4 = sp + 232|0;
|
|
$out_offset5 = sp + 224|0;
|
|
$row_size6 = sp + 216|0;
|
|
$remaining7 = sp + 208|0;
|
|
$11 = sp + 200|0;
|
|
$glyph_offset8 = sp + 192|0;
|
|
$out_offset9 = sp + 184|0;
|
|
$row_size10 = sp + 176|0;
|
|
$remaining11 = sp + 168|0;
|
|
$12 = sp + 160|0;
|
|
$ws = sp + 152|0;
|
|
$scroll = sp + 136|0;
|
|
$background_color = sp + 804|0;
|
|
$text_color = sp + 800|0;
|
|
$sel_background_color = sp + 796|0;
|
|
$sel_text_color = sp + 792|0;
|
|
$cursor_color = sp + 788|0;
|
|
$cursor_text_color = sp + 784|0;
|
|
$13 = sp + 780|0;
|
|
$cursor = sp + 72|0;
|
|
$label = sp + 48|0;
|
|
$txt = sp + 32|0;
|
|
$unicode19 = sp + 24|0;
|
|
$14 = sp + 16|0;
|
|
$background_color23 = sp + 776|0;
|
|
$text_color24 = sp + 772|0;
|
|
$15 = sp + 768|0;
|
|
$1 = $state;
|
|
$2 = $out;
|
|
$3 = $flags;
|
|
$4 = $filter;
|
|
$5 = $edit;
|
|
$6 = $style;
|
|
$7 = $in;
|
|
$8 = $font;
|
|
$ret = 0;
|
|
$prev_state = 0;
|
|
$is_hovered = 0;
|
|
$select_all = 0;
|
|
$cursor_follow = 0;
|
|
$16 = $1;
|
|
$17 = ($16|0)!=(0|0);
|
|
if (!($17)) {
|
|
___assert_fail((28059|0),(13400|0),12787,(31708|0));
|
|
// unreachable;
|
|
}
|
|
$18 = $2;
|
|
$19 = ($18|0)!=(0|0);
|
|
if (!($19)) {
|
|
___assert_fail((31441|0),(13400|0),12788,(31708|0));
|
|
// unreachable;
|
|
}
|
|
$20 = $6;
|
|
$21 = ($20|0)!=(0|0);
|
|
if (!($21)) {
|
|
___assert_fail((31462|0),(13400|0),12789,(31708|0));
|
|
// unreachable;
|
|
}
|
|
$22 = $1;
|
|
$23 = ($22|0)!=(0|0);
|
|
$24 = $2;
|
|
$25 = ($24|0)!=(0|0);
|
|
$or$cond = $23 & $25;
|
|
$26 = $6;
|
|
$27 = ($26|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $27;
|
|
if (!($or$cond3)) {
|
|
$28 = $ret;
|
|
$0 = $28;
|
|
$1220 = $0;
|
|
STACKTOP = sp;return ($1220|0);
|
|
}
|
|
$29 = +HEAPF32[$bounds>>2];
|
|
$30 = $6;
|
|
$31 = ((($30)) + 560|0);
|
|
$32 = +HEAPF32[$31>>2];
|
|
$33 = $29 + $32;
|
|
$34 = $6;
|
|
$35 = ((($34)) + 540|0);
|
|
$36 = +HEAPF32[$35>>2];
|
|
$37 = $33 + $36;
|
|
HEAPF32[$area>>2] = $37;
|
|
$38 = ((($bounds)) + 4|0);
|
|
$39 = +HEAPF32[$38>>2];
|
|
$40 = $6;
|
|
$41 = ((($40)) + 560|0);
|
|
$42 = ((($41)) + 4|0);
|
|
$43 = +HEAPF32[$42>>2];
|
|
$44 = $39 + $43;
|
|
$45 = $6;
|
|
$46 = ((($45)) + 540|0);
|
|
$47 = +HEAPF32[$46>>2];
|
|
$48 = $44 + $47;
|
|
$49 = ((($area)) + 4|0);
|
|
HEAPF32[$49>>2] = $48;
|
|
$50 = ((($bounds)) + 8|0);
|
|
$51 = +HEAPF32[$50>>2];
|
|
$52 = $6;
|
|
$53 = ((($52)) + 560|0);
|
|
$54 = +HEAPF32[$53>>2];
|
|
$55 = 2.0 * $54;
|
|
$56 = $6;
|
|
$57 = ((($56)) + 540|0);
|
|
$58 = +HEAPF32[$57>>2];
|
|
$59 = 2.0 * $58;
|
|
$60 = $55 + $59;
|
|
$61 = $51 - $60;
|
|
$62 = ((($area)) + 8|0);
|
|
HEAPF32[$62>>2] = $61;
|
|
$63 = ((($bounds)) + 12|0);
|
|
$64 = +HEAPF32[$63>>2];
|
|
$65 = $6;
|
|
$66 = ((($65)) + 560|0);
|
|
$67 = ((($66)) + 4|0);
|
|
$68 = +HEAPF32[$67>>2];
|
|
$69 = 2.0 * $68;
|
|
$70 = $6;
|
|
$71 = ((($70)) + 540|0);
|
|
$72 = +HEAPF32[$71>>2];
|
|
$73 = 2.0 * $72;
|
|
$74 = $69 + $73;
|
|
$75 = $64 - $74;
|
|
$76 = ((($area)) + 12|0);
|
|
HEAPF32[$76>>2] = $75;
|
|
$77 = $3;
|
|
$78 = $77 & 2048;
|
|
$79 = ($78|0)!=(0);
|
|
if ($79) {
|
|
$80 = ((($area)) + 12|0);
|
|
$81 = +HEAPF32[$80>>2];
|
|
$82 = $6;
|
|
$83 = ((($82)) + 552|0);
|
|
$84 = ((($83)) + 4|0);
|
|
$85 = +HEAPF32[$84>>2];
|
|
$86 = $81 - $85;
|
|
$87 = ((($area)) + 12|0);
|
|
HEAPF32[$87>>2] = $86;
|
|
}
|
|
$88 = $3;
|
|
$89 = $88 & 2048;
|
|
$90 = ($89|0)!=(0);
|
|
if ($90) {
|
|
$91 = $8;
|
|
$92 = ((($91)) + 4|0);
|
|
$93 = +HEAPF32[$92>>2];
|
|
$94 = $6;
|
|
$95 = ((($94)) + 568|0);
|
|
$96 = +HEAPF32[$95>>2];
|
|
$97 = $93 + $96;
|
|
$100 = $97;
|
|
} else {
|
|
$98 = ((($area)) + 12|0);
|
|
$99 = +HEAPF32[$98>>2];
|
|
$100 = $99;
|
|
}
|
|
$row_height = $100;
|
|
$101 = $5;
|
|
$102 = ((($101)) + 105|0);
|
|
$103 = HEAP8[$102>>0]|0;
|
|
$prev_state = $103;
|
|
$104 = $7;
|
|
;HEAP32[$bounds$byval_copy>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
$105 = (_nk_input_is_mouse_hovering_rect($104,$bounds$byval_copy)|0);
|
|
$106 = $105&255;
|
|
$is_hovered = $106;
|
|
$107 = $7;
|
|
$108 = ($107|0)!=(0|0);
|
|
if ($108) {
|
|
$109 = $7;
|
|
$110 = ((($109)) + 220|0);
|
|
$111 = ((($110)) + 4|0);
|
|
$112 = HEAP32[$111>>2]|0;
|
|
$113 = ($112|0)!=(0);
|
|
if ($113) {
|
|
$114 = $7;
|
|
$115 = ((($114)) + 220|0);
|
|
$116 = HEAP32[$115>>2]|0;
|
|
$117 = ($116|0)!=(0);
|
|
if ($117) {
|
|
$118 = +HEAPF32[$bounds>>2];
|
|
$119 = $7;
|
|
$120 = ((($119)) + 220|0);
|
|
$121 = ((($120)) + 48|0);
|
|
$122 = +HEAPF32[$121>>2];
|
|
$123 = $118 <= $122;
|
|
if ($123) {
|
|
$124 = $7;
|
|
$125 = ((($124)) + 220|0);
|
|
$126 = ((($125)) + 48|0);
|
|
$127 = +HEAPF32[$126>>2];
|
|
$128 = +HEAPF32[$bounds>>2];
|
|
$129 = ((($bounds)) + 8|0);
|
|
$130 = +HEAPF32[$129>>2];
|
|
$131 = $128 + $130;
|
|
$132 = $127 <= $131;
|
|
if ($132) {
|
|
$133 = ((($bounds)) + 4|0);
|
|
$134 = +HEAPF32[$133>>2];
|
|
$135 = $7;
|
|
$136 = ((($135)) + 220|0);
|
|
$137 = ((($136)) + 48|0);
|
|
$138 = ((($137)) + 4|0);
|
|
$139 = +HEAPF32[$138>>2];
|
|
$140 = $134 <= $139;
|
|
if ($140) {
|
|
$141 = $7;
|
|
$142 = ((($141)) + 220|0);
|
|
$143 = ((($142)) + 48|0);
|
|
$144 = ((($143)) + 4|0);
|
|
$145 = +HEAPF32[$144>>2];
|
|
$146 = ((($bounds)) + 4|0);
|
|
$147 = +HEAPF32[$146>>2];
|
|
$148 = ((($bounds)) + 12|0);
|
|
$149 = +HEAPF32[$148>>2];
|
|
$150 = $147 + $149;
|
|
$151 = $145 <= $150;
|
|
$153 = $151;
|
|
} else {
|
|
$153 = 0;
|
|
}
|
|
} else {
|
|
$153 = 0;
|
|
}
|
|
} else {
|
|
$153 = 0;
|
|
}
|
|
$152 = $153&1;
|
|
$154 = $152&255;
|
|
$155 = $5;
|
|
$156 = ((($155)) + 105|0);
|
|
HEAP8[$156>>0] = $154;
|
|
}
|
|
}
|
|
}
|
|
$157 = $prev_state;
|
|
$158 = ($157<<24>>24)!=(0);
|
|
if ($158) {
|
|
label = 28;
|
|
} else {
|
|
$159 = $5;
|
|
$160 = ((($159)) + 105|0);
|
|
$161 = HEAP8[$160>>0]|0;
|
|
$162 = $161&255;
|
|
$163 = ($162|0)!=(0);
|
|
if ($163) {
|
|
$164 = $3;
|
|
$165 = $164 & 2048;
|
|
$166 = ($165|0)!=(0);
|
|
$167 = $166 ? 1 : 0;
|
|
$type = $167;
|
|
$168 = $5;
|
|
$169 = $type;
|
|
$170 = $4;
|
|
_nk_textedit_clear_state($168,$169,$170);
|
|
$171 = $3;
|
|
$172 = $171 & 512;
|
|
$173 = ($172|0)!=(0);
|
|
if ($173) {
|
|
$174 = $5;
|
|
$175 = ((($174)) + 100|0);
|
|
HEAP8[$175>>0] = 1;
|
|
}
|
|
$176 = $3;
|
|
$177 = $176 & 2;
|
|
$178 = ($177|0)!=(0);
|
|
if ($178) {
|
|
$select_all = 1;
|
|
}
|
|
} else {
|
|
label = 28;
|
|
}
|
|
}
|
|
if ((label|0) == 28) {
|
|
$179 = $5;
|
|
$180 = ((($179)) + 105|0);
|
|
$181 = HEAP8[$180>>0]|0;
|
|
$182 = ($181<<24>>24)!=(0);
|
|
if (!($182)) {
|
|
$183 = $5;
|
|
$184 = ((($183)) + 100|0);
|
|
HEAP8[$184>>0] = 0;
|
|
}
|
|
}
|
|
$185 = $5;
|
|
$186 = ((($185)) + 105|0);
|
|
$187 = HEAP8[$186>>0]|0;
|
|
$188 = $187&255;
|
|
$189 = ($188|0)!=(0);
|
|
$190 = $189 ? 1 : 2;
|
|
$ret = $190;
|
|
$191 = $prev_state;
|
|
$192 = $191 << 24 >> 24;
|
|
$193 = $5;
|
|
$194 = ((($193)) + 105|0);
|
|
$195 = HEAP8[$194>>0]|0;
|
|
$196 = $195&255;
|
|
$197 = ($192|0)!=($196|0);
|
|
if ($197) {
|
|
$198 = $5;
|
|
$199 = ((($198)) + 105|0);
|
|
$200 = HEAP8[$199>>0]|0;
|
|
$201 = $200&255;
|
|
$202 = ($201|0)!=(0);
|
|
$203 = $202 ? 4 : 8;
|
|
$204 = $ret;
|
|
$205 = $204 | $203;
|
|
$ret = $205;
|
|
}
|
|
$206 = $5;
|
|
$207 = ((($206)) + 105|0);
|
|
$208 = HEAP8[$207>>0]|0;
|
|
$209 = $208&255;
|
|
$210 = ($209|0)!=(0);
|
|
$211 = $7;
|
|
$212 = ($211|0)!=(0|0);
|
|
$or$cond5 = $210 & $212;
|
|
do {
|
|
if ($or$cond5) {
|
|
$213 = $3;
|
|
$214 = $213 & 1;
|
|
$215 = ($214|0)!=(0);
|
|
if (!($215)) {
|
|
$216 = $7;
|
|
$217 = ((($216)) + 8|0);
|
|
$218 = HEAP32[$217>>2]|0;
|
|
$shift_mod = $218;
|
|
$219 = $7;
|
|
$220 = ((($219)) + 220|0);
|
|
$221 = ((($220)) + 48|0);
|
|
$222 = +HEAPF32[$221>>2];
|
|
$223 = +HEAPF32[$area>>2];
|
|
$224 = $222 - $223;
|
|
$225 = $5;
|
|
$226 = ((($225)) + 80|0);
|
|
$227 = +HEAPF32[$226>>2];
|
|
$228 = $224 + $227;
|
|
$mouse_x = $228;
|
|
$229 = $3;
|
|
$230 = $229 & 2048;
|
|
$231 = ($230|0)!=(0);
|
|
$232 = $7;
|
|
$233 = ((($232)) + 220|0);
|
|
$234 = ((($233)) + 48|0);
|
|
$235 = ((($234)) + 4|0);
|
|
$236 = +HEAPF32[$235>>2];
|
|
$237 = ((($area)) + 4|0);
|
|
$238 = +HEAPF32[$237>>2];
|
|
if ($231) {
|
|
$249 = $236 - $238;
|
|
$250 = $5;
|
|
$251 = ((($250)) + 80|0);
|
|
$252 = ((($251)) + 4|0);
|
|
$253 = +HEAPF32[$252>>2];
|
|
$254 = $249 + $253;
|
|
$255 = $254;
|
|
} else {
|
|
$239 = ((($area)) + 12|0);
|
|
$240 = +HEAPF32[$239>>2];
|
|
$241 = $240 * 0.5;
|
|
$242 = $238 + $241;
|
|
$243 = $236 - $242;
|
|
$244 = $5;
|
|
$245 = ((($244)) + 80|0);
|
|
$246 = ((($245)) + 4|0);
|
|
$247 = +HEAPF32[$246>>2];
|
|
$248 = $243 + $247;
|
|
$255 = $248;
|
|
}
|
|
$mouse_y = $255;
|
|
$256 = $select_all;
|
|
$257 = ($256<<24>>24)!=(0);
|
|
L52: do {
|
|
if ($257) {
|
|
$258 = $5;
|
|
_nk_textedit_select_all($258);
|
|
} else {
|
|
$259 = $is_hovered;
|
|
$260 = $259 << 24 >> 24;
|
|
$261 = ($260|0)!=(0);
|
|
if ($261) {
|
|
$262 = $7;
|
|
$263 = ((($262)) + 220|0);
|
|
$264 = HEAP32[$263>>2]|0;
|
|
$265 = ($264|0)!=(0);
|
|
if ($265) {
|
|
$266 = $7;
|
|
$267 = ((($266)) + 220|0);
|
|
$268 = ((($267)) + 4|0);
|
|
$269 = HEAP32[$268>>2]|0;
|
|
$270 = ($269|0)!=(0);
|
|
if ($270) {
|
|
$271 = $5;
|
|
$272 = $mouse_x;
|
|
$273 = $mouse_y;
|
|
$274 = $8;
|
|
$275 = $row_height;
|
|
_nk_textedit_click($271,$272,$273,$274,$275);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
$276 = $is_hovered;
|
|
$277 = $276 << 24 >> 24;
|
|
$278 = ($277|0)!=(0);
|
|
do {
|
|
if ($278) {
|
|
$279 = $7;
|
|
$280 = ((($279)) + 220|0);
|
|
$281 = HEAP32[$280>>2]|0;
|
|
$282 = ($281|0)!=(0);
|
|
if ($282) {
|
|
$283 = $7;
|
|
$284 = ((($283)) + 220|0);
|
|
$285 = ((($284)) + 64|0);
|
|
$286 = +HEAPF32[$285>>2];
|
|
$287 = $286 != 0.0;
|
|
if (!($287)) {
|
|
$288 = $7;
|
|
$289 = ((($288)) + 220|0);
|
|
$290 = ((($289)) + 64|0);
|
|
$291 = ((($290)) + 4|0);
|
|
$292 = +HEAPF32[$291>>2];
|
|
$293 = $292 != 0.0;
|
|
if (!($293)) {
|
|
break;
|
|
}
|
|
}
|
|
$294 = $5;
|
|
$295 = $mouse_x;
|
|
$296 = $mouse_y;
|
|
$297 = $8;
|
|
$298 = $row_height;
|
|
_nk_textedit_drag($294,$295,$296,$297,$298);
|
|
$cursor_follow = 1;
|
|
break L52;
|
|
}
|
|
}
|
|
} while(0);
|
|
$299 = $is_hovered;
|
|
$300 = $299 << 24 >> 24;
|
|
$301 = ($300|0)!=(0);
|
|
if ($301) {
|
|
$302 = $7;
|
|
$303 = ((($302)) + 220|0);
|
|
$304 = ((($303)) + 32|0);
|
|
$305 = ((($304)) + 4|0);
|
|
$306 = HEAP32[$305>>2]|0;
|
|
$307 = ($306|0)!=(0);
|
|
if ($307) {
|
|
$308 = $7;
|
|
$309 = ((($308)) + 220|0);
|
|
$310 = ((($309)) + 32|0);
|
|
$311 = HEAP32[$310>>2]|0;
|
|
$312 = ($311|0)!=(0);
|
|
if ($312) {
|
|
$313 = $5;
|
|
$314 = $8;
|
|
$315 = $row_height;
|
|
_nk_textedit_key($313,23,0,$314,$315);
|
|
$316 = $5;
|
|
$317 = $8;
|
|
$318 = $row_height;
|
|
_nk_textedit_key($316,24,1,$317,$318);
|
|
$cursor_follow = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$319 = $5;
|
|
$320 = ((($319)) + 100|0);
|
|
$321 = HEAP8[$320>>0]|0;
|
|
$322 = $321&255;
|
|
$old_mode = $322;
|
|
$i = 0;
|
|
while(1) {
|
|
$323 = $i;
|
|
$324 = ($323|0)<(25);
|
|
if (!($324)) {
|
|
break;
|
|
}
|
|
$325 = $i;
|
|
$326 = ($325|0)==(4);
|
|
$327 = $i;
|
|
$328 = ($327|0)==(5);
|
|
$or$cond7 = $326 | $328;
|
|
if (!($or$cond7)) {
|
|
$329 = $7;
|
|
$330 = $i;
|
|
$331 = (_nk_input_is_key_pressed($329,$330)|0);
|
|
$332 = ($331|0)!=(0);
|
|
if ($332) {
|
|
$333 = $5;
|
|
$334 = $i;
|
|
$335 = $shift_mod;
|
|
$336 = $8;
|
|
$337 = $row_height;
|
|
_nk_textedit_key($333,$334,$335,$336,$337);
|
|
$cursor_follow = 1;
|
|
}
|
|
}
|
|
$338 = $i;
|
|
$339 = (($338) + 1)|0;
|
|
$i = $339;
|
|
}
|
|
$340 = $old_mode;
|
|
$341 = $5;
|
|
$342 = ((($341)) + 100|0);
|
|
$343 = HEAP8[$342>>0]|0;
|
|
$344 = $343&255;
|
|
$345 = ($340|0)!=($344|0);
|
|
if ($345) {
|
|
$346 = $7;
|
|
$347 = ((($346)) + 216|0);
|
|
HEAP32[$347>>2] = 0;
|
|
}
|
|
$348 = $4;
|
|
$349 = $5;
|
|
$350 = ((($349)) + 76|0);
|
|
HEAP32[$350>>2] = $348;
|
|
$351 = $7;
|
|
$352 = ((($351)) + 216|0);
|
|
$353 = HEAP32[$352>>2]|0;
|
|
$354 = ($353|0)!=(0);
|
|
if ($354) {
|
|
$355 = $5;
|
|
$356 = $7;
|
|
$357 = ((($356)) + 200|0);
|
|
$358 = $7;
|
|
$359 = ((($358)) + 216|0);
|
|
$360 = HEAP32[$359>>2]|0;
|
|
_nk_textedit_text($355,$357,$360);
|
|
$cursor_follow = 1;
|
|
$361 = $7;
|
|
$362 = ((($361)) + 216|0);
|
|
HEAP32[$362>>2] = 0;
|
|
}
|
|
$363 = $7;
|
|
$364 = (_nk_input_is_key_pressed($363,4)|0);
|
|
$365 = ($364|0)!=(0);
|
|
do {
|
|
if ($365) {
|
|
$cursor_follow = 1;
|
|
$366 = $3;
|
|
$367 = $366 & 128;
|
|
$368 = ($367|0)!=(0);
|
|
$369 = $shift_mod;
|
|
$370 = ($369|0)!=(0);
|
|
$or$cond9 = $368 & $370;
|
|
if ($or$cond9) {
|
|
$371 = $5;
|
|
_nk_textedit_text($371,31719,1);
|
|
break;
|
|
}
|
|
$372 = $3;
|
|
$373 = $372 & 4;
|
|
$374 = ($373|0)!=(0);
|
|
if ($374) {
|
|
$ret = 2;
|
|
$375 = $ret;
|
|
$376 = $375 | 8;
|
|
$ret = $376;
|
|
$377 = $ret;
|
|
$378 = $377 | 16;
|
|
$ret = $378;
|
|
$379 = $5;
|
|
$380 = ((($379)) + 105|0);
|
|
HEAP8[$380>>0] = 0;
|
|
break;
|
|
} else {
|
|
$381 = $5;
|
|
_nk_textedit_text($381,31719,1);
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$382 = $7;
|
|
$383 = (_nk_input_is_key_pressed($382,7)|0);
|
|
$copy = $383;
|
|
$384 = $7;
|
|
$385 = (_nk_input_is_key_pressed($384,8)|0);
|
|
$cut = $385;
|
|
$386 = $copy;
|
|
$387 = ($386|0)!=(0);
|
|
$388 = $cut;
|
|
$389 = ($388|0)!=(0);
|
|
$or$cond11 = $387 | $389;
|
|
do {
|
|
if ($or$cond11) {
|
|
$390 = $3;
|
|
$391 = $390 & 64;
|
|
$392 = ($391|0)!=(0);
|
|
if ($392) {
|
|
$393 = $5;
|
|
$394 = ((($393)) + 92|0);
|
|
$395 = HEAP32[$394>>2]|0;
|
|
$b = $395;
|
|
$396 = $5;
|
|
$397 = ((($396)) + 96|0);
|
|
$398 = HEAP32[$397>>2]|0;
|
|
$e = $398;
|
|
$399 = $b;
|
|
$400 = $e;
|
|
$401 = ($399|0)<($400|0);
|
|
$402 = $b;
|
|
$403 = $e;
|
|
$404 = $401 ? $402 : $403;
|
|
$begin = $404;
|
|
$405 = $b;
|
|
$406 = $e;
|
|
$407 = ($405|0)<($406|0);
|
|
$408 = $e;
|
|
$409 = $b;
|
|
$410 = $407 ? $408 : $409;
|
|
$end = $410;
|
|
$411 = $5;
|
|
$412 = ((($411)) + 12|0);
|
|
$413 = $begin;
|
|
$414 = (_nk_str_at_const($412,$413,$unicode,$glyph_len)|0);
|
|
$text = $414;
|
|
$415 = $5;
|
|
$416 = ((($415)) + 8|0);
|
|
$417 = HEAP32[$416>>2]|0;
|
|
$418 = ($417|0)!=(0|0);
|
|
if ($418) {
|
|
$419 = $5;
|
|
$420 = ((($419)) + 8|0);
|
|
$421 = HEAP32[$420>>2]|0;
|
|
$422 = $5;
|
|
$423 = $text;
|
|
$424 = $end;
|
|
$425 = $begin;
|
|
$426 = (($424) - ($425))|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$422>>2]|0;
|
|
FUNCTION_TABLE_viii[$421 & 31]($$byval_copy,$423,$426);
|
|
}
|
|
$427 = $cut;
|
|
$428 = ($427|0)!=(0);
|
|
if (!($428)) {
|
|
break;
|
|
}
|
|
$429 = $5;
|
|
(_nk_textedit_cut($429)|0);
|
|
$cursor_follow = 1;
|
|
}
|
|
}
|
|
} while(0);
|
|
$430 = $7;
|
|
$431 = (_nk_input_is_key_pressed($430,9)|0);
|
|
$paste = $431;
|
|
$432 = $paste;
|
|
$433 = ($432|0)!=(0);
|
|
do {
|
|
if ($433) {
|
|
$434 = $3;
|
|
$435 = $434 & 64;
|
|
$436 = ($435|0)!=(0);
|
|
if (!($436)) {
|
|
break;
|
|
}
|
|
$437 = $5;
|
|
$438 = ((($437)) + 4|0);
|
|
$439 = HEAP32[$438>>2]|0;
|
|
$440 = ($439|0)!=(0|0);
|
|
if (!($440)) {
|
|
break;
|
|
}
|
|
$441 = $5;
|
|
$442 = ((($441)) + 4|0);
|
|
$443 = HEAP32[$442>>2]|0;
|
|
$444 = $5;
|
|
$445 = $5;
|
|
;HEAP32[$$byval_copy16>>2]=HEAP32[$444>>2]|0;
|
|
FUNCTION_TABLE_vii[$443 & 31]($$byval_copy16,$445);
|
|
$cursor_follow = 1;
|
|
}
|
|
} while(0);
|
|
$446 = $7;
|
|
$447 = (_nk_input_is_key_pressed($446,5)|0);
|
|
$tab = $447;
|
|
$448 = $tab;
|
|
$449 = ($448|0)!=(0);
|
|
if ($449) {
|
|
$450 = $3;
|
|
$451 = $450 & 8;
|
|
$452 = ($451|0)!=(0);
|
|
if (!($452)) {
|
|
break;
|
|
}
|
|
$453 = $5;
|
|
_nk_textedit_text($453,31721,4);
|
|
$cursor_follow = 1;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$454 = $5;
|
|
$455 = ((($454)) + 105|0);
|
|
$456 = HEAP8[$455>>0]|0;
|
|
$457 = ($456<<24>>24)!=(0);
|
|
$458 = $1;
|
|
do {
|
|
if ($457) {
|
|
HEAP32[$458>>2] = 34;
|
|
} else {
|
|
$459 = HEAP32[$458>>2]|0;
|
|
$460 = $459 & 2;
|
|
$461 = ($460|0)!=(0);
|
|
$462 = $1;
|
|
if ($461) {
|
|
HEAP32[$462>>2] = 6;
|
|
break;
|
|
} else {
|
|
HEAP32[$462>>2] = 4;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$463 = $is_hovered;
|
|
$464 = ($463<<24>>24)!=(0);
|
|
if ($464) {
|
|
$465 = $1;
|
|
$466 = HEAP32[$465>>2]|0;
|
|
$467 = $466 | 18;
|
|
HEAP32[$465>>2] = $467;
|
|
}
|
|
$468 = $2;
|
|
$469 = ((($468)) + 4|0);
|
|
;HEAP32[$old_clip>>2]=HEAP32[$469>>2]|0;HEAP32[$old_clip+4>>2]=HEAP32[$469+4>>2]|0;HEAP32[$old_clip+8>>2]=HEAP32[$469+8>>2]|0;HEAP32[$old_clip+12>>2]=HEAP32[$469+12>>2]|0;
|
|
$470 = $5;
|
|
$471 = ((($470)) + 12|0);
|
|
$472 = (_nk_str_get_const($471)|0);
|
|
$text1 = $472;
|
|
$473 = $5;
|
|
$474 = ((($473)) + 12|0);
|
|
$475 = (_nk_str_len_char($474)|0);
|
|
$len = $475;
|
|
$476 = $1;
|
|
$477 = HEAP32[$476>>2]|0;
|
|
$478 = $477 & 32;
|
|
$479 = ($478|0)!=(0);
|
|
do {
|
|
if ($479) {
|
|
$480 = $6;
|
|
$481 = ((($480)) + 40|0);
|
|
$background = $481;
|
|
} else {
|
|
$482 = $1;
|
|
$483 = HEAP32[$482>>2]|0;
|
|
$484 = $483 & 16;
|
|
$485 = ($484|0)!=(0);
|
|
$486 = $6;
|
|
if ($485) {
|
|
$487 = ((($486)) + 20|0);
|
|
$background = $487;
|
|
break;
|
|
} else {
|
|
$background = $486;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$488 = $background;
|
|
$489 = HEAP32[$488>>2]|0;
|
|
$490 = ($489|0)==(0);
|
|
$491 = $2;
|
|
if ($490) {
|
|
$492 = $6;
|
|
$493 = ((($492)) + 544|0);
|
|
$494 = +HEAPF32[$493>>2];
|
|
$495 = $6;
|
|
$496 = ((($495)) + 60|0);
|
|
;HEAP32[$bounds$byval_copy17>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy17+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy17+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy17+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
;HEAP8[$$byval_copy18>>0]=HEAP8[$496>>0]|0;HEAP8[$$byval_copy18+1>>0]=HEAP8[$496+1>>0]|0;HEAP8[$$byval_copy18+2>>0]=HEAP8[$496+2>>0]|0;HEAP8[$$byval_copy18+3>>0]=HEAP8[$496+3>>0]|0;
|
|
_nk_fill_rect($491,$bounds$byval_copy17,$494,$$byval_copy18);
|
|
$497 = $2;
|
|
$498 = $6;
|
|
$499 = ((($498)) + 540|0);
|
|
$500 = +HEAPF32[$499>>2];
|
|
;HEAP32[$bounds$byval_copy19>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy19+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy19+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy19+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
_nk_shrink_rect($9,$bounds$byval_copy19,$500);
|
|
$501 = $6;
|
|
$502 = ((($501)) + 544|0);
|
|
$503 = +HEAPF32[$502>>2];
|
|
$504 = $background;
|
|
$505 = ((($504)) + 4|0);
|
|
;HEAP32[$$byval_copy20>>2]=HEAP32[$9>>2]|0;HEAP32[$$byval_copy20+4>>2]=HEAP32[$9+4>>2]|0;HEAP32[$$byval_copy20+8>>2]=HEAP32[$9+8>>2]|0;HEAP32[$$byval_copy20+12>>2]=HEAP32[$9+12>>2]|0;
|
|
;HEAP8[$$byval_copy21>>0]=HEAP8[$505>>0]|0;HEAP8[$$byval_copy21+1>>0]=HEAP8[$505+1>>0]|0;HEAP8[$$byval_copy21+2>>0]=HEAP8[$505+2>>0]|0;HEAP8[$$byval_copy21+3>>0]=HEAP8[$505+3>>0]|0;
|
|
_nk_fill_rect($497,$$byval_copy20,$503,$$byval_copy21);
|
|
} else {
|
|
$506 = $background;
|
|
$507 = ((($506)) + 4|0);
|
|
;HEAP32[$bounds$byval_copy22>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy22+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy22+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy22+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
_nk_draw_image($491,$bounds$byval_copy22,$507);
|
|
}
|
|
$508 = $6;
|
|
$509 = ((($508)) + 548|0);
|
|
$510 = +HEAPF32[$509>>2];
|
|
$511 = ((($area)) + 8|0);
|
|
$512 = +HEAPF32[$511>>2];
|
|
$513 = $512 - $510;
|
|
HEAPF32[$511>>2] = $513;
|
|
$514 = +HEAPF32[$area>>2];
|
|
$515 = ((($area)) + 4|0);
|
|
$516 = +HEAPF32[$515>>2];
|
|
$517 = +HEAPF32[$area>>2];
|
|
$518 = ((($area)) + 8|0);
|
|
$519 = +HEAPF32[$518>>2];
|
|
$520 = $517 + $519;
|
|
$521 = ((($area)) + 4|0);
|
|
$522 = +HEAPF32[$521>>2];
|
|
$523 = ((($area)) + 12|0);
|
|
$524 = +HEAPF32[$523>>2];
|
|
$525 = $522 + $524;
|
|
_nk_unify($clip,$old_clip,$514,$516,$520,$525);
|
|
$526 = $2;
|
|
;HEAP32[$clip$byval_copy>>2]=HEAP32[$clip>>2]|0;HEAP32[$clip$byval_copy+4>>2]=HEAP32[$clip+4>>2]|0;HEAP32[$clip$byval_copy+8>>2]=HEAP32[$clip+8>>2]|0;HEAP32[$clip$byval_copy+12>>2]=HEAP32[$clip+12>>2]|0;
|
|
_nk_push_scissor($526,$clip$byval_copy);
|
|
$527 = $5;
|
|
$528 = ((($527)) + 105|0);
|
|
$529 = HEAP8[$528>>0]|0;
|
|
$530 = ($529<<24>>24)!=(0);
|
|
L131: do {
|
|
if ($530) {
|
|
$total_lines = 1;
|
|
_nk_vec2($text_size,0.0,0.0);
|
|
$cursor_ptr = 0;
|
|
$select_begin_ptr = 0;
|
|
$select_end_ptr = 0;
|
|
_nk_vec2($cursor_pos,0.0,0.0);
|
|
_nk_vec2($selection_offset_start,0.0,0.0);
|
|
_nk_vec2($selection_offset_end,0.0,0.0);
|
|
$531 = $5;
|
|
$532 = ((($531)) + 92|0);
|
|
$533 = HEAP32[$532>>2]|0;
|
|
$534 = $5;
|
|
$535 = ((($534)) + 96|0);
|
|
$536 = HEAP32[$535>>2]|0;
|
|
$537 = ($533|0)<($536|0);
|
|
$538 = $5;
|
|
if ($537) {
|
|
$539 = ((($538)) + 92|0);
|
|
$540 = HEAP32[$539>>2]|0;
|
|
$543 = $540;
|
|
} else {
|
|
$541 = ((($538)) + 96|0);
|
|
$542 = HEAP32[$541>>2]|0;
|
|
$543 = $542;
|
|
}
|
|
$selection_begin = $543;
|
|
$544 = $5;
|
|
$545 = ((($544)) + 92|0);
|
|
$546 = HEAP32[$545>>2]|0;
|
|
$547 = $5;
|
|
$548 = ((($547)) + 96|0);
|
|
$549 = HEAP32[$548>>2]|0;
|
|
$550 = ($546|0)<($549|0);
|
|
$551 = $5;
|
|
if ($550) {
|
|
$552 = ((($551)) + 96|0);
|
|
$553 = HEAP32[$552>>2]|0;
|
|
$556 = $553;
|
|
} else {
|
|
$554 = ((($551)) + 92|0);
|
|
$555 = HEAP32[$554>>2]|0;
|
|
$556 = $555;
|
|
}
|
|
$selection_end = $556;
|
|
$line_width = 0.0;
|
|
$557 = $text1;
|
|
$558 = ($557|0)!=(0|0);
|
|
$559 = $len;
|
|
$560 = ($559|0)!=(0);
|
|
$or$cond13 = $558 & $560;
|
|
do {
|
|
if ($or$cond13) {
|
|
$glyph_len2 = 0;
|
|
HEAP32[$unicode3>>2] = 0;
|
|
$text_len = 0;
|
|
$glyphs = 0;
|
|
$row_begin = 0;
|
|
$561 = $text1;
|
|
$562 = $len;
|
|
$563 = (_nk_utf_decode($561,$unicode3,$562)|0);
|
|
$glyph_len2 = $563;
|
|
$564 = $8;
|
|
$565 = ((($564)) + 8|0);
|
|
$566 = HEAP32[$565>>2]|0;
|
|
$567 = $8;
|
|
$568 = $8;
|
|
$569 = ((($568)) + 4|0);
|
|
$570 = +HEAPF32[$569>>2];
|
|
$571 = $text1;
|
|
$572 = $glyph_len2;
|
|
;HEAP32[$$byval_copy23>>2]=HEAP32[$567>>2]|0;
|
|
$573 = (+FUNCTION_TABLE_didii[$566 & 15]($$byval_copy23,$570,$571,$572));
|
|
$glyph_width = $573;
|
|
$line_width = 0.0;
|
|
while(1) {
|
|
$574 = $text_len;
|
|
$575 = $len;
|
|
$576 = ($574|0)<($575|0);
|
|
$577 = $glyph_len2;
|
|
$578 = ($577|0)!=(0);
|
|
$579 = $576 ? $578 : 0;
|
|
if (!($579)) {
|
|
break;
|
|
}
|
|
$580 = $cursor_ptr;
|
|
$581 = ($580|0)!=(0|0);
|
|
do {
|
|
if (!($581)) {
|
|
$582 = $glyphs;
|
|
$583 = $5;
|
|
$584 = ((($583)) + 88|0);
|
|
$585 = HEAP32[$584>>2]|0;
|
|
$586 = ($582|0)==($585|0);
|
|
if (!($586)) {
|
|
break;
|
|
}
|
|
$587 = $total_lines;
|
|
$588 = (($587) - 1)|0;
|
|
$589 = (+($588|0));
|
|
$590 = $row_height;
|
|
$591 = $589 * $590;
|
|
$592 = ((($cursor_pos)) + 4|0);
|
|
HEAPF32[$592>>2] = $591;
|
|
$593 = $8;
|
|
$594 = $text1;
|
|
$595 = $row_begin;
|
|
$596 = (($594) + ($595)|0);
|
|
$597 = $text_len;
|
|
$598 = $row_begin;
|
|
$599 = (($597) - ($598))|0;
|
|
$600 = $row_height;
|
|
_nk_text_calculate_text_bounds($10,$593,$596,$599,$600,$remaining,$out_offset,$glyph_offset,1);
|
|
;HEAP32[$row_size>>2]=HEAP32[$10>>2]|0;HEAP32[$row_size+4>>2]=HEAP32[$10+4>>2]|0;
|
|
$601 = +HEAPF32[$row_size>>2];
|
|
HEAPF32[$cursor_pos>>2] = $601;
|
|
$602 = $text1;
|
|
$603 = $text_len;
|
|
$604 = (($602) + ($603)|0);
|
|
$cursor_ptr = $604;
|
|
}
|
|
} while(0);
|
|
$605 = $select_begin_ptr;
|
|
$606 = ($605|0)!=(0|0);
|
|
do {
|
|
if (!($606)) {
|
|
$607 = $5;
|
|
$608 = ((($607)) + 92|0);
|
|
$609 = HEAP32[$608>>2]|0;
|
|
$610 = $5;
|
|
$611 = ((($610)) + 96|0);
|
|
$612 = HEAP32[$611>>2]|0;
|
|
$613 = ($609|0)!=($612|0);
|
|
if (!($613)) {
|
|
break;
|
|
}
|
|
$614 = $glyphs;
|
|
$615 = $selection_begin;
|
|
$616 = ($614|0)==($615|0);
|
|
if (!($616)) {
|
|
break;
|
|
}
|
|
$617 = $total_lines;
|
|
$618 = (($617) - 1)|0;
|
|
$619 = (+($618|0));
|
|
$620 = $row_height;
|
|
$621 = $619 * $620;
|
|
$622 = ((($selection_offset_start)) + 4|0);
|
|
HEAPF32[$622>>2] = $621;
|
|
$623 = $8;
|
|
$624 = $text1;
|
|
$625 = $row_begin;
|
|
$626 = (($624) + ($625)|0);
|
|
$627 = $text_len;
|
|
$628 = $row_begin;
|
|
$629 = (($627) - ($628))|0;
|
|
$630 = $row_height;
|
|
_nk_text_calculate_text_bounds($11,$623,$626,$629,$630,$remaining7,$out_offset5,$glyph_offset4,1);
|
|
;HEAP32[$row_size6>>2]=HEAP32[$11>>2]|0;HEAP32[$row_size6+4>>2]=HEAP32[$11+4>>2]|0;
|
|
$631 = +HEAPF32[$row_size6>>2];
|
|
HEAPF32[$selection_offset_start>>2] = $631;
|
|
$632 = $text1;
|
|
$633 = $text_len;
|
|
$634 = (($632) + ($633)|0);
|
|
$select_begin_ptr = $634;
|
|
}
|
|
} while(0);
|
|
$635 = $select_end_ptr;
|
|
$636 = ($635|0)!=(0|0);
|
|
do {
|
|
if (!($636)) {
|
|
$637 = $5;
|
|
$638 = ((($637)) + 92|0);
|
|
$639 = HEAP32[$638>>2]|0;
|
|
$640 = $5;
|
|
$641 = ((($640)) + 96|0);
|
|
$642 = HEAP32[$641>>2]|0;
|
|
$643 = ($639|0)!=($642|0);
|
|
if (!($643)) {
|
|
break;
|
|
}
|
|
$644 = $glyphs;
|
|
$645 = $selection_end;
|
|
$646 = ($644|0)==($645|0);
|
|
if (!($646)) {
|
|
break;
|
|
}
|
|
$647 = $total_lines;
|
|
$648 = (($647) - 1)|0;
|
|
$649 = (+($648|0));
|
|
$650 = $row_height;
|
|
$651 = $649 * $650;
|
|
$652 = ((($selection_offset_end)) + 4|0);
|
|
HEAPF32[$652>>2] = $651;
|
|
$653 = $8;
|
|
$654 = $text1;
|
|
$655 = $row_begin;
|
|
$656 = (($654) + ($655)|0);
|
|
$657 = $text_len;
|
|
$658 = $row_begin;
|
|
$659 = (($657) - ($658))|0;
|
|
$660 = $row_height;
|
|
_nk_text_calculate_text_bounds($12,$653,$656,$659,$660,$remaining11,$out_offset9,$glyph_offset8,1);
|
|
;HEAP32[$row_size10>>2]=HEAP32[$12>>2]|0;HEAP32[$row_size10+4>>2]=HEAP32[$12+4>>2]|0;
|
|
$661 = +HEAPF32[$row_size10>>2];
|
|
HEAPF32[$selection_offset_end>>2] = $661;
|
|
$662 = $text1;
|
|
$663 = $text_len;
|
|
$664 = (($662) + ($663)|0);
|
|
$select_end_ptr = $664;
|
|
}
|
|
} while(0);
|
|
$665 = HEAP32[$unicode3>>2]|0;
|
|
$666 = ($665|0)==(10);
|
|
if ($666) {
|
|
$667 = +HEAPF32[$text_size>>2];
|
|
$668 = $line_width;
|
|
$669 = $667 < $668;
|
|
$670 = $line_width;
|
|
$671 = +HEAPF32[$text_size>>2];
|
|
$672 = $669 ? $670 : $671;
|
|
HEAPF32[$text_size>>2] = $672;
|
|
$673 = $total_lines;
|
|
$674 = (($673) + 1)|0;
|
|
$total_lines = $674;
|
|
$line_width = 0.0;
|
|
$675 = $text_len;
|
|
$676 = (($675) + 1)|0;
|
|
$text_len = $676;
|
|
$677 = $glyphs;
|
|
$678 = (($677) + 1)|0;
|
|
$glyphs = $678;
|
|
$679 = $text_len;
|
|
$row_begin = $679;
|
|
$680 = $text1;
|
|
$681 = $text_len;
|
|
$682 = (($680) + ($681)|0);
|
|
$683 = $len;
|
|
$684 = $text_len;
|
|
$685 = (($683) - ($684))|0;
|
|
$686 = (_nk_utf_decode($682,$unicode3,$685)|0);
|
|
$glyph_len2 = $686;
|
|
continue;
|
|
} else {
|
|
$687 = $glyphs;
|
|
$688 = (($687) + 1)|0;
|
|
$glyphs = $688;
|
|
$689 = $glyph_len2;
|
|
$690 = $text_len;
|
|
$691 = (($690) + ($689))|0;
|
|
$text_len = $691;
|
|
$692 = $glyph_width;
|
|
$693 = $line_width;
|
|
$694 = $693 + $692;
|
|
$line_width = $694;
|
|
$695 = $8;
|
|
$696 = ((($695)) + 8|0);
|
|
$697 = HEAP32[$696>>2]|0;
|
|
$698 = $8;
|
|
$699 = $8;
|
|
$700 = ((($699)) + 4|0);
|
|
$701 = +HEAPF32[$700>>2];
|
|
$702 = $text1;
|
|
$703 = $text_len;
|
|
$704 = (($702) + ($703)|0);
|
|
$705 = $glyph_len2;
|
|
;HEAP32[$$byval_copy24>>2]=HEAP32[$698>>2]|0;
|
|
$706 = (+FUNCTION_TABLE_didii[$697 & 15]($$byval_copy24,$701,$704,$705));
|
|
$glyph_width = $706;
|
|
$707 = $text1;
|
|
$708 = $text_len;
|
|
$709 = (($707) + ($708)|0);
|
|
$710 = $len;
|
|
$711 = $text_len;
|
|
$712 = (($710) - ($711))|0;
|
|
$713 = (_nk_utf_decode($709,$unicode3,$712)|0);
|
|
$glyph_len2 = $713;
|
|
continue;
|
|
}
|
|
}
|
|
$714 = $total_lines;
|
|
$715 = (+($714|0));
|
|
$716 = $row_height;
|
|
$717 = $715 * $716;
|
|
$718 = ((($text_size)) + 4|0);
|
|
HEAPF32[$718>>2] = $717;
|
|
$719 = $cursor_ptr;
|
|
$720 = ($719|0)!=(0|0);
|
|
if ($720) {
|
|
break;
|
|
}
|
|
$721 = $5;
|
|
$722 = ((($721)) + 88|0);
|
|
$723 = HEAP32[$722>>2]|0;
|
|
$724 = $5;
|
|
$725 = ((($724)) + 12|0);
|
|
$726 = ((($725)) + 60|0);
|
|
$727 = HEAP32[$726>>2]|0;
|
|
$728 = ($723|0)==($727|0);
|
|
if (!($728)) {
|
|
break;
|
|
}
|
|
$729 = $line_width;
|
|
HEAPF32[$cursor_pos>>2] = $729;
|
|
$730 = ((($text_size)) + 4|0);
|
|
$731 = +HEAPF32[$730>>2];
|
|
$732 = $row_height;
|
|
$733 = $731 - $732;
|
|
$734 = ((($cursor_pos)) + 4|0);
|
|
HEAPF32[$734>>2] = $733;
|
|
}
|
|
} while(0);
|
|
$735 = $cursor_follow;
|
|
$736 = ($735<<24>>24)!=(0);
|
|
do {
|
|
if ($736) {
|
|
$737 = $3;
|
|
$738 = $737 & 256;
|
|
$739 = ($738|0)!=(0);
|
|
do {
|
|
if ($739) {
|
|
$776 = $5;
|
|
$777 = ((($776)) + 80|0);
|
|
HEAPF32[$777>>2] = 0.0;
|
|
} else {
|
|
$740 = ((($area)) + 8|0);
|
|
$741 = +HEAPF32[$740>>2];
|
|
$742 = $741 * 0.25;
|
|
$scroll_increment = $742;
|
|
$743 = +HEAPF32[$cursor_pos>>2];
|
|
$744 = $5;
|
|
$745 = ((($744)) + 80|0);
|
|
$746 = +HEAPF32[$745>>2];
|
|
$747 = $743 < $746;
|
|
if ($747) {
|
|
$748 = +HEAPF32[$cursor_pos>>2];
|
|
$749 = $scroll_increment;
|
|
$750 = $748 - $749;
|
|
$751 = 0.0 < $750;
|
|
if ($751) {
|
|
$752 = +HEAPF32[$cursor_pos>>2];
|
|
$753 = $scroll_increment;
|
|
$754 = $752 - $753;
|
|
$756 = $754;
|
|
} else {
|
|
$756 = 0.0;
|
|
}
|
|
$755 = (~~(($756)));
|
|
$757 = (+($755|0));
|
|
$758 = $5;
|
|
$759 = ((($758)) + 80|0);
|
|
HEAPF32[$759>>2] = $757;
|
|
}
|
|
$760 = +HEAPF32[$cursor_pos>>2];
|
|
$761 = $5;
|
|
$762 = ((($761)) + 80|0);
|
|
$763 = +HEAPF32[$762>>2];
|
|
$764 = ((($area)) + 8|0);
|
|
$765 = +HEAPF32[$764>>2];
|
|
$766 = $763 + $765;
|
|
$767 = $760 >= $766;
|
|
if (!($767)) {
|
|
break;
|
|
}
|
|
$768 = +HEAPF32[$cursor_pos>>2];
|
|
$769 = 0.0 < $768;
|
|
$770 = +HEAPF32[$cursor_pos>>2];
|
|
$771 = $769 ? $770 : 0.0;
|
|
$772 = (~~(($771)));
|
|
$773 = (+($772|0));
|
|
$774 = $5;
|
|
$775 = ((($774)) + 80|0);
|
|
HEAPF32[$775>>2] = $773;
|
|
}
|
|
} while(0);
|
|
$778 = $3;
|
|
$779 = $778 & 2048;
|
|
$780 = ($779|0)!=(0);
|
|
if (!($780)) {
|
|
$820 = $5;
|
|
$821 = ((($820)) + 80|0);
|
|
$822 = ((($821)) + 4|0);
|
|
HEAPF32[$822>>2] = 0.0;
|
|
break;
|
|
}
|
|
$781 = ((($cursor_pos)) + 4|0);
|
|
$782 = +HEAPF32[$781>>2];
|
|
$783 = $5;
|
|
$784 = ((($783)) + 80|0);
|
|
$785 = ((($784)) + 4|0);
|
|
$786 = +HEAPF32[$785>>2];
|
|
$787 = $782 < $786;
|
|
if ($787) {
|
|
$788 = ((($cursor_pos)) + 4|0);
|
|
$789 = +HEAPF32[$788>>2];
|
|
$790 = $row_height;
|
|
$791 = $789 - $790;
|
|
$792 = 0.0 < $791;
|
|
if ($792) {
|
|
$793 = ((($cursor_pos)) + 4|0);
|
|
$794 = +HEAPF32[$793>>2];
|
|
$795 = $row_height;
|
|
$796 = $794 - $795;
|
|
$800 = $796;
|
|
} else {
|
|
$800 = 0.0;
|
|
}
|
|
$797 = $5;
|
|
$798 = ((($797)) + 80|0);
|
|
$799 = ((($798)) + 4|0);
|
|
HEAPF32[$799>>2] = $800;
|
|
}
|
|
$801 = ((($cursor_pos)) + 4|0);
|
|
$802 = +HEAPF32[$801>>2];
|
|
$803 = $5;
|
|
$804 = ((($803)) + 80|0);
|
|
$805 = ((($804)) + 4|0);
|
|
$806 = +HEAPF32[$805>>2];
|
|
$807 = ((($area)) + 12|0);
|
|
$808 = +HEAPF32[$807>>2];
|
|
$809 = $806 + $808;
|
|
$810 = $802 >= $809;
|
|
if (!($810)) {
|
|
break;
|
|
}
|
|
$811 = $5;
|
|
$812 = ((($811)) + 80|0);
|
|
$813 = ((($812)) + 4|0);
|
|
$814 = +HEAPF32[$813>>2];
|
|
$815 = $row_height;
|
|
$816 = $814 + $815;
|
|
$817 = $5;
|
|
$818 = ((($817)) + 80|0);
|
|
$819 = ((($818)) + 4|0);
|
|
HEAPF32[$819>>2] = $816;
|
|
}
|
|
} while(0);
|
|
$823 = +HEAPF32[$bounds>>2];
|
|
$824 = ((($bounds)) + 8|0);
|
|
$825 = +HEAPF32[$824>>2];
|
|
$826 = $823 + $825;
|
|
$827 = $6;
|
|
$828 = ((($827)) + 552|0);
|
|
$829 = +HEAPF32[$828>>2];
|
|
$830 = $826 - $829;
|
|
HEAPF32[$scroll>>2] = $830;
|
|
$831 = ((($bounds)) + 4|0);
|
|
$832 = +HEAPF32[$831>>2];
|
|
$833 = ((($scroll)) + 4|0);
|
|
HEAPF32[$833>>2] = $832;
|
|
$834 = $6;
|
|
$835 = ((($834)) + 552|0);
|
|
$836 = +HEAPF32[$835>>2];
|
|
$837 = ((($scroll)) + 8|0);
|
|
HEAPF32[$837>>2] = $836;
|
|
$838 = ((($bounds)) + 12|0);
|
|
$839 = +HEAPF32[$838>>2];
|
|
$840 = ((($scroll)) + 12|0);
|
|
HEAPF32[$840>>2] = $839;
|
|
$841 = $5;
|
|
$842 = ((($841)) + 80|0);
|
|
$843 = ((($842)) + 4|0);
|
|
$844 = +HEAPF32[$843>>2];
|
|
$scroll_offset = $844;
|
|
$845 = ((($scroll)) + 12|0);
|
|
$846 = +HEAPF32[$845>>2];
|
|
$847 = $846 * 0.10000000149011612;
|
|
$scroll_step = $847;
|
|
$848 = ((($scroll)) + 12|0);
|
|
$849 = +HEAPF32[$848>>2];
|
|
$850 = $849 * 0.0099999997764825821;
|
|
$scroll_inc = $850;
|
|
$851 = ((($text_size)) + 4|0);
|
|
$852 = +HEAPF32[$851>>2];
|
|
$scroll_target = $852;
|
|
$853 = $2;
|
|
$854 = $scroll_offset;
|
|
$855 = $scroll_target;
|
|
$856 = $scroll_step;
|
|
$857 = $scroll_inc;
|
|
$858 = $6;
|
|
$859 = ((($858)) + 64|0);
|
|
$860 = $7;
|
|
$861 = $8;
|
|
;HEAP32[$bounds$byval_copy25>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy25+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy25+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy25+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
$862 = (+_nk_do_scrollbarv($ws,$853,$bounds$byval_copy25,0,$854,$855,$856,$857,$859,$860,$861));
|
|
$863 = $5;
|
|
$864 = ((($863)) + 80|0);
|
|
$865 = ((($864)) + 4|0);
|
|
HEAPF32[$865>>2] = $862;
|
|
$866 = $1;
|
|
$867 = HEAP32[$866>>2]|0;
|
|
$868 = $867 & 32;
|
|
$869 = ($868|0)!=(0);
|
|
do {
|
|
if ($869) {
|
|
$870 = $6;
|
|
$871 = ((($870)) + 40|0);
|
|
$background12 = $871;
|
|
$872 = $6;
|
|
$873 = ((($872)) + 520|0);
|
|
;HEAP8[$text_color>>0]=HEAP8[$873>>0]|0;HEAP8[$text_color+1>>0]=HEAP8[$873+1>>0]|0;HEAP8[$text_color+2>>0]=HEAP8[$873+2>>0]|0;HEAP8[$text_color+3>>0]=HEAP8[$873+3>>0]|0;
|
|
$874 = $6;
|
|
$875 = ((($874)) + 536|0);
|
|
;HEAP8[$sel_text_color>>0]=HEAP8[$875>>0]|0;HEAP8[$sel_text_color+1>>0]=HEAP8[$875+1>>0]|0;HEAP8[$sel_text_color+2>>0]=HEAP8[$875+2>>0]|0;HEAP8[$sel_text_color+3>>0]=HEAP8[$875+3>>0]|0;
|
|
$876 = $6;
|
|
$877 = ((($876)) + 528|0);
|
|
;HEAP8[$sel_background_color>>0]=HEAP8[$877>>0]|0;HEAP8[$sel_background_color+1>>0]=HEAP8[$877+1>>0]|0;HEAP8[$sel_background_color+2>>0]=HEAP8[$877+2>>0]|0;HEAP8[$sel_background_color+3>>0]=HEAP8[$877+3>>0]|0;
|
|
$878 = $6;
|
|
$879 = ((($878)) + 500|0);
|
|
;HEAP8[$cursor_color>>0]=HEAP8[$879>>0]|0;HEAP8[$cursor_color+1>>0]=HEAP8[$879+1>>0]|0;HEAP8[$cursor_color+2>>0]=HEAP8[$879+2>>0]|0;HEAP8[$cursor_color+3>>0]=HEAP8[$879+3>>0]|0;
|
|
$880 = $6;
|
|
$881 = ((($880)) + 508|0);
|
|
;HEAP8[$cursor_text_color>>0]=HEAP8[$881>>0]|0;HEAP8[$cursor_text_color+1>>0]=HEAP8[$881+1>>0]|0;HEAP8[$cursor_text_color+2>>0]=HEAP8[$881+2>>0]|0;HEAP8[$cursor_text_color+3>>0]=HEAP8[$881+3>>0]|0;
|
|
} else {
|
|
$882 = $1;
|
|
$883 = HEAP32[$882>>2]|0;
|
|
$884 = $883 & 16;
|
|
$885 = ($884|0)!=(0);
|
|
$886 = $6;
|
|
if ($885) {
|
|
$887 = ((($886)) + 20|0);
|
|
$background12 = $887;
|
|
$888 = $6;
|
|
$889 = ((($888)) + 516|0);
|
|
;HEAP8[$text_color>>0]=HEAP8[$889>>0]|0;HEAP8[$text_color+1>>0]=HEAP8[$889+1>>0]|0;HEAP8[$text_color+2>>0]=HEAP8[$889+2>>0]|0;HEAP8[$text_color+3>>0]=HEAP8[$889+3>>0]|0;
|
|
$890 = $6;
|
|
$891 = ((($890)) + 536|0);
|
|
;HEAP8[$sel_text_color>>0]=HEAP8[$891>>0]|0;HEAP8[$sel_text_color+1>>0]=HEAP8[$891+1>>0]|0;HEAP8[$sel_text_color+2>>0]=HEAP8[$891+2>>0]|0;HEAP8[$sel_text_color+3>>0]=HEAP8[$891+3>>0]|0;
|
|
$892 = $6;
|
|
$893 = ((($892)) + 528|0);
|
|
;HEAP8[$sel_background_color>>0]=HEAP8[$893>>0]|0;HEAP8[$sel_background_color+1>>0]=HEAP8[$893+1>>0]|0;HEAP8[$sel_background_color+2>>0]=HEAP8[$893+2>>0]|0;HEAP8[$sel_background_color+3>>0]=HEAP8[$893+3>>0]|0;
|
|
$894 = $6;
|
|
$895 = ((($894)) + 508|0);
|
|
;HEAP8[$cursor_text_color>>0]=HEAP8[$895>>0]|0;HEAP8[$cursor_text_color+1>>0]=HEAP8[$895+1>>0]|0;HEAP8[$cursor_text_color+2>>0]=HEAP8[$895+2>>0]|0;HEAP8[$cursor_text_color+3>>0]=HEAP8[$895+3>>0]|0;
|
|
$896 = $6;
|
|
$897 = ((($896)) + 500|0);
|
|
;HEAP8[$cursor_color>>0]=HEAP8[$897>>0]|0;HEAP8[$cursor_color+1>>0]=HEAP8[$897+1>>0]|0;HEAP8[$cursor_color+2>>0]=HEAP8[$897+2>>0]|0;HEAP8[$cursor_color+3>>0]=HEAP8[$897+3>>0]|0;
|
|
break;
|
|
} else {
|
|
$background12 = $886;
|
|
$898 = $6;
|
|
$899 = ((($898)) + 512|0);
|
|
;HEAP8[$text_color>>0]=HEAP8[$899>>0]|0;HEAP8[$text_color+1>>0]=HEAP8[$899+1>>0]|0;HEAP8[$text_color+2>>0]=HEAP8[$899+2>>0]|0;HEAP8[$text_color+3>>0]=HEAP8[$899+3>>0]|0;
|
|
$900 = $6;
|
|
$901 = ((($900)) + 532|0);
|
|
;HEAP8[$sel_text_color>>0]=HEAP8[$901>>0]|0;HEAP8[$sel_text_color+1>>0]=HEAP8[$901+1>>0]|0;HEAP8[$sel_text_color+2>>0]=HEAP8[$901+2>>0]|0;HEAP8[$sel_text_color+3>>0]=HEAP8[$901+3>>0]|0;
|
|
$902 = $6;
|
|
$903 = ((($902)) + 524|0);
|
|
;HEAP8[$sel_background_color>>0]=HEAP8[$903>>0]|0;HEAP8[$sel_background_color+1>>0]=HEAP8[$903+1>>0]|0;HEAP8[$sel_background_color+2>>0]=HEAP8[$903+2>>0]|0;HEAP8[$sel_background_color+3>>0]=HEAP8[$903+3>>0]|0;
|
|
$904 = $6;
|
|
$905 = ((($904)) + 496|0);
|
|
;HEAP8[$cursor_color>>0]=HEAP8[$905>>0]|0;HEAP8[$cursor_color+1>>0]=HEAP8[$905+1>>0]|0;HEAP8[$cursor_color+2>>0]=HEAP8[$905+2>>0]|0;HEAP8[$cursor_color+3>>0]=HEAP8[$905+3>>0]|0;
|
|
$906 = $6;
|
|
$907 = ((($906)) + 504|0);
|
|
;HEAP8[$cursor_text_color>>0]=HEAP8[$907>>0]|0;HEAP8[$cursor_text_color+1>>0]=HEAP8[$907+1>>0]|0;HEAP8[$cursor_text_color+2>>0]=HEAP8[$907+2>>0]|0;HEAP8[$cursor_text_color+3>>0]=HEAP8[$907+3>>0]|0;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$908 = $background12;
|
|
$909 = HEAP32[$908>>2]|0;
|
|
$910 = ($909|0)==(1);
|
|
if ($910) {
|
|
_nk_rgba($13,0,0,0,0);
|
|
;HEAP8[$background_color>>0]=HEAP8[$13>>0]|0;HEAP8[$background_color+1>>0]=HEAP8[$13+1>>0]|0;HEAP8[$background_color+2>>0]=HEAP8[$13+2>>0]|0;HEAP8[$background_color+3>>0]=HEAP8[$13+3>>0]|0;
|
|
} else {
|
|
$911 = $background12;
|
|
$912 = ((($911)) + 4|0);
|
|
;HEAP8[$background_color>>0]=HEAP8[$912>>0]|0;HEAP8[$background_color+1>>0]=HEAP8[$912+1>>0]|0;HEAP8[$background_color+2>>0]=HEAP8[$912+2>>0]|0;HEAP8[$background_color+3>>0]=HEAP8[$912+3>>0]|0;
|
|
}
|
|
$913 = $5;
|
|
$914 = ((($913)) + 92|0);
|
|
$915 = HEAP32[$914>>2]|0;
|
|
$916 = $5;
|
|
$917 = ((($916)) + 96|0);
|
|
$918 = HEAP32[$917>>2]|0;
|
|
$919 = ($915|0)==($918|0);
|
|
$920 = $5;
|
|
do {
|
|
if ($919) {
|
|
$921 = ((($920)) + 12|0);
|
|
$922 = (_nk_str_get_const($921)|0);
|
|
$begin13 = $922;
|
|
$923 = $5;
|
|
$924 = ((($923)) + 12|0);
|
|
$925 = (_nk_str_len_char($924)|0);
|
|
$l = $925;
|
|
$926 = $2;
|
|
$927 = $6;
|
|
$928 = +HEAPF32[$area>>2];
|
|
$929 = $5;
|
|
$930 = ((($929)) + 80|0);
|
|
$931 = +HEAPF32[$930>>2];
|
|
$932 = $928 - $931;
|
|
$933 = ((($area)) + 4|0);
|
|
$934 = +HEAPF32[$933>>2];
|
|
$935 = $5;
|
|
$936 = ((($935)) + 80|0);
|
|
$937 = ((($936)) + 4|0);
|
|
$938 = +HEAPF32[$937>>2];
|
|
$939 = $934 - $938;
|
|
$940 = $begin13;
|
|
$941 = $l;
|
|
$942 = $row_height;
|
|
$943 = $8;
|
|
;HEAP8[$background_color$byval_copy>>0]=HEAP8[$background_color>>0]|0;HEAP8[$background_color$byval_copy+1>>0]=HEAP8[$background_color+1>>0]|0;HEAP8[$background_color$byval_copy+2>>0]=HEAP8[$background_color+2>>0]|0;HEAP8[$background_color$byval_copy+3>>0]=HEAP8[$background_color+3>>0]|0;
|
|
;HEAP8[$text_color$byval_copy>>0]=HEAP8[$text_color>>0]|0;HEAP8[$text_color$byval_copy+1>>0]=HEAP8[$text_color+1>>0]|0;HEAP8[$text_color$byval_copy+2>>0]=HEAP8[$text_color+2>>0]|0;HEAP8[$text_color$byval_copy+3>>0]=HEAP8[$text_color+3>>0]|0;
|
|
_nk_edit_draw_text($926,$927,$932,$939,0.0,$940,$941,$942,$943,$background_color$byval_copy,$text_color$byval_copy,0);
|
|
} else {
|
|
$944 = ((($920)) + 92|0);
|
|
$945 = HEAP32[$944>>2]|0;
|
|
$946 = $5;
|
|
$947 = ((($946)) + 96|0);
|
|
$948 = HEAP32[$947>>2]|0;
|
|
$949 = ($945|0)!=($948|0);
|
|
$950 = $selection_begin;
|
|
$951 = ($950|0)>(0);
|
|
$or$cond15 = $949 & $951;
|
|
do {
|
|
if ($or$cond15) {
|
|
$952 = $5;
|
|
$953 = ((($952)) + 12|0);
|
|
$954 = (_nk_str_get_const($953)|0);
|
|
$begin14 = $954;
|
|
$955 = $select_begin_ptr;
|
|
$956 = ($955|0)!=(0|0);
|
|
if ($956) {
|
|
$957 = $2;
|
|
$958 = $6;
|
|
$959 = +HEAPF32[$area>>2];
|
|
$960 = $5;
|
|
$961 = ((($960)) + 80|0);
|
|
$962 = +HEAPF32[$961>>2];
|
|
$963 = $959 - $962;
|
|
$964 = ((($area)) + 4|0);
|
|
$965 = +HEAPF32[$964>>2];
|
|
$966 = $5;
|
|
$967 = ((($966)) + 80|0);
|
|
$968 = ((($967)) + 4|0);
|
|
$969 = +HEAPF32[$968>>2];
|
|
$970 = $965 - $969;
|
|
$971 = $begin14;
|
|
$972 = $select_begin_ptr;
|
|
$973 = $begin14;
|
|
$974 = $972;
|
|
$975 = $973;
|
|
$976 = (($974) - ($975))|0;
|
|
$977 = $row_height;
|
|
$978 = $8;
|
|
;HEAP8[$background_color$byval_copy26>>0]=HEAP8[$background_color>>0]|0;HEAP8[$background_color$byval_copy26+1>>0]=HEAP8[$background_color+1>>0]|0;HEAP8[$background_color$byval_copy26+2>>0]=HEAP8[$background_color+2>>0]|0;HEAP8[$background_color$byval_copy26+3>>0]=HEAP8[$background_color+3>>0]|0;
|
|
;HEAP8[$text_color$byval_copy27>>0]=HEAP8[$text_color>>0]|0;HEAP8[$text_color$byval_copy27+1>>0]=HEAP8[$text_color+1>>0]|0;HEAP8[$text_color$byval_copy27+2>>0]=HEAP8[$text_color+2>>0]|0;HEAP8[$text_color$byval_copy27+3>>0]=HEAP8[$text_color+3>>0]|0;
|
|
_nk_edit_draw_text($957,$958,$963,$970,0.0,$971,$976,$977,$978,$background_color$byval_copy26,$text_color$byval_copy27,0);
|
|
break;
|
|
} else {
|
|
___assert_fail((31726|0),(13400|0),13166,(31708|0));
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$979 = $5;
|
|
$980 = ((($979)) + 92|0);
|
|
$981 = HEAP32[$980>>2]|0;
|
|
$982 = $5;
|
|
$983 = ((($982)) + 96|0);
|
|
$984 = HEAP32[$983>>2]|0;
|
|
$985 = ($981|0)!=($984|0);
|
|
if ($985) {
|
|
$986 = $select_begin_ptr;
|
|
$987 = ($986|0)!=(0|0);
|
|
if (!($987)) {
|
|
___assert_fail((31726|0),(13400|0),13173,(31708|0));
|
|
// unreachable;
|
|
}
|
|
$988 = $select_end_ptr;
|
|
$989 = ($988|0)!=(0|0);
|
|
if (!($989)) {
|
|
$990 = $5;
|
|
$991 = ((($990)) + 12|0);
|
|
$992 = (_nk_str_get_const($991)|0);
|
|
$begin15 = $992;
|
|
$993 = $begin15;
|
|
$994 = $5;
|
|
$995 = ((($994)) + 12|0);
|
|
$996 = (_nk_str_len_char($995)|0);
|
|
$997 = (($993) + ($996)|0);
|
|
$select_end_ptr = $997;
|
|
}
|
|
$998 = $2;
|
|
$999 = $6;
|
|
$1000 = +HEAPF32[$area>>2];
|
|
$1001 = $5;
|
|
$1002 = ((($1001)) + 80|0);
|
|
$1003 = +HEAPF32[$1002>>2];
|
|
$1004 = $1000 - $1003;
|
|
$1005 = ((($area)) + 4|0);
|
|
$1006 = +HEAPF32[$1005>>2];
|
|
$1007 = ((($selection_offset_start)) + 4|0);
|
|
$1008 = +HEAPF32[$1007>>2];
|
|
$1009 = $1006 + $1008;
|
|
$1010 = $5;
|
|
$1011 = ((($1010)) + 80|0);
|
|
$1012 = ((($1011)) + 4|0);
|
|
$1013 = +HEAPF32[$1012>>2];
|
|
$1014 = $1009 - $1013;
|
|
$1015 = +HEAPF32[$selection_offset_start>>2];
|
|
$1016 = $select_begin_ptr;
|
|
$1017 = $select_end_ptr;
|
|
$1018 = $select_begin_ptr;
|
|
$1019 = $1017;
|
|
$1020 = $1018;
|
|
$1021 = (($1019) - ($1020))|0;
|
|
$1022 = $row_height;
|
|
$1023 = $8;
|
|
;HEAP8[$sel_background_color$byval_copy>>0]=HEAP8[$sel_background_color>>0]|0;HEAP8[$sel_background_color$byval_copy+1>>0]=HEAP8[$sel_background_color+1>>0]|0;HEAP8[$sel_background_color$byval_copy+2>>0]=HEAP8[$sel_background_color+2>>0]|0;HEAP8[$sel_background_color$byval_copy+3>>0]=HEAP8[$sel_background_color+3>>0]|0;
|
|
;HEAP8[$sel_text_color$byval_copy>>0]=HEAP8[$sel_text_color>>0]|0;HEAP8[$sel_text_color$byval_copy+1>>0]=HEAP8[$sel_text_color+1>>0]|0;HEAP8[$sel_text_color$byval_copy+2>>0]=HEAP8[$sel_text_color+2>>0]|0;HEAP8[$sel_text_color$byval_copy+3>>0]=HEAP8[$sel_text_color+3>>0]|0;
|
|
_nk_edit_draw_text($998,$999,$1004,$1014,$1015,$1016,$1021,$1022,$1023,$sel_background_color$byval_copy,$sel_text_color$byval_copy,1);
|
|
}
|
|
$1024 = $5;
|
|
$1025 = ((($1024)) + 92|0);
|
|
$1026 = HEAP32[$1025>>2]|0;
|
|
$1027 = $5;
|
|
$1028 = ((($1027)) + 96|0);
|
|
$1029 = HEAP32[$1028>>2]|0;
|
|
$1030 = ($1026|0)!=($1029|0);
|
|
if (!($1030)) {
|
|
break;
|
|
}
|
|
$1031 = $selection_end;
|
|
$1032 = $5;
|
|
$1033 = ((($1032)) + 12|0);
|
|
$1034 = ((($1033)) + 60|0);
|
|
$1035 = HEAP32[$1034>>2]|0;
|
|
$1036 = ($1031|0)<($1035|0);
|
|
if (!($1036)) {
|
|
break;
|
|
}
|
|
$1037 = $select_end_ptr;
|
|
$begin16 = $1037;
|
|
$1038 = $5;
|
|
$1039 = ((($1038)) + 12|0);
|
|
$1040 = (_nk_str_get_const($1039)|0);
|
|
$1041 = $5;
|
|
$1042 = ((($1041)) + 12|0);
|
|
$1043 = (_nk_str_len_char($1042)|0);
|
|
$1044 = (($1040) + ($1043)|0);
|
|
$end17 = $1044;
|
|
$1045 = $select_end_ptr;
|
|
$1046 = ($1045|0)!=(0|0);
|
|
if ($1046) {
|
|
$1047 = $2;
|
|
$1048 = $6;
|
|
$1049 = +HEAPF32[$area>>2];
|
|
$1050 = $5;
|
|
$1051 = ((($1050)) + 80|0);
|
|
$1052 = +HEAPF32[$1051>>2];
|
|
$1053 = $1049 - $1052;
|
|
$1054 = ((($area)) + 4|0);
|
|
$1055 = +HEAPF32[$1054>>2];
|
|
$1056 = ((($selection_offset_end)) + 4|0);
|
|
$1057 = +HEAPF32[$1056>>2];
|
|
$1058 = $1055 + $1057;
|
|
$1059 = $5;
|
|
$1060 = ((($1059)) + 80|0);
|
|
$1061 = ((($1060)) + 4|0);
|
|
$1062 = +HEAPF32[$1061>>2];
|
|
$1063 = $1058 - $1062;
|
|
$1064 = +HEAPF32[$selection_offset_end>>2];
|
|
$1065 = $begin16;
|
|
$1066 = $end17;
|
|
$1067 = $begin16;
|
|
$1068 = $1066;
|
|
$1069 = $1067;
|
|
$1070 = (($1068) - ($1069))|0;
|
|
$1071 = $row_height;
|
|
$1072 = $8;
|
|
;HEAP8[$background_color$byval_copy28>>0]=HEAP8[$background_color>>0]|0;HEAP8[$background_color$byval_copy28+1>>0]=HEAP8[$background_color+1>>0]|0;HEAP8[$background_color$byval_copy28+2>>0]=HEAP8[$background_color+2>>0]|0;HEAP8[$background_color$byval_copy28+3>>0]=HEAP8[$background_color+3>>0]|0;
|
|
;HEAP8[$text_color$byval_copy29>>0]=HEAP8[$text_color>>0]|0;HEAP8[$text_color$byval_copy29+1>>0]=HEAP8[$text_color+1>>0]|0;HEAP8[$text_color$byval_copy29+2>>0]=HEAP8[$text_color+2>>0]|0;HEAP8[$text_color$byval_copy29+3>>0]=HEAP8[$text_color+3>>0]|0;
|
|
_nk_edit_draw_text($1047,$1048,$1053,$1063,$1064,$1065,$1070,$1071,$1072,$background_color$byval_copy28,$text_color$byval_copy29,1);
|
|
break;
|
|
} else {
|
|
___assert_fail((31743|0),(13400|0),13192,(31708|0));
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$1073 = $5;
|
|
$1074 = ((($1073)) + 92|0);
|
|
$1075 = HEAP32[$1074>>2]|0;
|
|
$1076 = $5;
|
|
$1077 = ((($1076)) + 96|0);
|
|
$1078 = HEAP32[$1077>>2]|0;
|
|
$1079 = ($1075|0)==($1078|0);
|
|
if (!($1079)) {
|
|
break;
|
|
}
|
|
$1080 = $5;
|
|
$1081 = ((($1080)) + 88|0);
|
|
$1082 = HEAP32[$1081>>2]|0;
|
|
$1083 = $5;
|
|
$1084 = ((($1083)) + 12|0);
|
|
$1085 = (_nk_str_len($1084)|0);
|
|
$1086 = ($1082|0)>=($1085|0);
|
|
do {
|
|
if (!($1086)) {
|
|
$1087 = $cursor_ptr;
|
|
$1088 = ($1087|0)!=(0|0);
|
|
if ($1088) {
|
|
$1089 = $cursor_ptr;
|
|
$1090 = HEAP8[$1089>>0]|0;
|
|
$1091 = $1090 << 24 >> 24;
|
|
$1092 = ($1091|0)==(10);
|
|
if ($1092) {
|
|
break;
|
|
}
|
|
}
|
|
$1129 = $cursor_ptr;
|
|
$1130 = ($1129|0)!=(0|0);
|
|
if ($1130) {
|
|
$1131 = $cursor_ptr;
|
|
$1132 = (_nk_utf_decode($1131,$unicode19,4)|0);
|
|
$glyph_len18 = $1132;
|
|
$1133 = +HEAPF32[$area>>2];
|
|
$1134 = +HEAPF32[$cursor_pos>>2];
|
|
$1135 = $1133 + $1134;
|
|
$1136 = $5;
|
|
$1137 = ((($1136)) + 80|0);
|
|
$1138 = +HEAPF32[$1137>>2];
|
|
$1139 = $1135 - $1138;
|
|
HEAPF32[$label>>2] = $1139;
|
|
$1140 = ((($area)) + 4|0);
|
|
$1141 = +HEAPF32[$1140>>2];
|
|
$1142 = ((($cursor_pos)) + 4|0);
|
|
$1143 = +HEAPF32[$1142>>2];
|
|
$1144 = $1141 + $1143;
|
|
$1145 = $5;
|
|
$1146 = ((($1145)) + 80|0);
|
|
$1147 = ((($1146)) + 4|0);
|
|
$1148 = +HEAPF32[$1147>>2];
|
|
$1149 = $1144 - $1148;
|
|
$1150 = ((($label)) + 4|0);
|
|
HEAPF32[$1150>>2] = $1149;
|
|
$1151 = $8;
|
|
$1152 = ((($1151)) + 8|0);
|
|
$1153 = HEAP32[$1152>>2]|0;
|
|
$1154 = $8;
|
|
$1155 = $8;
|
|
$1156 = ((($1155)) + 4|0);
|
|
$1157 = +HEAPF32[$1156>>2];
|
|
$1158 = $cursor_ptr;
|
|
$1159 = $glyph_len18;
|
|
;HEAP32[$$byval_copy30>>2]=HEAP32[$1154>>2]|0;
|
|
$1160 = (+FUNCTION_TABLE_didii[$1153 & 15]($$byval_copy30,$1157,$1158,$1159));
|
|
$1161 = ((($label)) + 8|0);
|
|
HEAPF32[$1161>>2] = $1160;
|
|
$1162 = $row_height;
|
|
$1163 = ((($label)) + 12|0);
|
|
HEAPF32[$1163>>2] = $1162;
|
|
_nk_vec2($14,0.0,0.0);
|
|
;HEAP32[$txt>>2]=HEAP32[$14>>2]|0;HEAP32[$txt+4>>2]=HEAP32[$14+4>>2]|0;
|
|
$1164 = ((($txt)) + 8|0);
|
|
;HEAP8[$1164>>0]=HEAP8[$cursor_color>>0]|0;HEAP8[$1164+1>>0]=HEAP8[$cursor_color+1>>0]|0;HEAP8[$1164+2>>0]=HEAP8[$cursor_color+2>>0]|0;HEAP8[$1164+3>>0]=HEAP8[$cursor_color+3>>0]|0;
|
|
$1165 = ((($txt)) + 12|0);
|
|
;HEAP8[$1165>>0]=HEAP8[$cursor_text_color>>0]|0;HEAP8[$1165+1>>0]=HEAP8[$cursor_text_color+1>>0]|0;HEAP8[$1165+2>>0]=HEAP8[$cursor_text_color+2>>0]|0;HEAP8[$1165+3>>0]=HEAP8[$cursor_text_color+3>>0]|0;
|
|
$1166 = $2;
|
|
;HEAP32[$label$byval_copy>>2]=HEAP32[$label>>2]|0;HEAP32[$label$byval_copy+4>>2]=HEAP32[$label+4>>2]|0;HEAP32[$label$byval_copy+8>>2]=HEAP32[$label+8>>2]|0;HEAP32[$label$byval_copy+12>>2]=HEAP32[$label+12>>2]|0;
|
|
;HEAP8[$cursor_color$byval_copy31>>0]=HEAP8[$cursor_color>>0]|0;HEAP8[$cursor_color$byval_copy31+1>>0]=HEAP8[$cursor_color+1>>0]|0;HEAP8[$cursor_color$byval_copy31+2>>0]=HEAP8[$cursor_color+2>>0]|0;HEAP8[$cursor_color$byval_copy31+3>>0]=HEAP8[$cursor_color+3>>0]|0;
|
|
_nk_fill_rect($1166,$label$byval_copy,0.0,$cursor_color$byval_copy31);
|
|
$1167 = $2;
|
|
$1168 = $cursor_ptr;
|
|
$1169 = $glyph_len18;
|
|
$1170 = $8;
|
|
;HEAP32[$label$byval_copy32>>2]=HEAP32[$label>>2]|0;HEAP32[$label$byval_copy32+4>>2]=HEAP32[$label+4>>2]|0;HEAP32[$label$byval_copy32+8>>2]=HEAP32[$label+8>>2]|0;HEAP32[$label$byval_copy32+12>>2]=HEAP32[$label+12>>2]|0;
|
|
_nk_widget_text($1167,$label$byval_copy32,$1168,$1169,$txt,17,$1170);
|
|
break L131;
|
|
} else {
|
|
___assert_fail((31758|0),(13400|0),13222,(31708|0));
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$1093 = $6;
|
|
$1094 = ((($1093)) + 548|0);
|
|
$1095 = +HEAPF32[$1094>>2];
|
|
$1096 = ((($cursor)) + 8|0);
|
|
HEAPF32[$1096>>2] = $1095;
|
|
$1097 = $8;
|
|
$1098 = ((($1097)) + 4|0);
|
|
$1099 = +HEAPF32[$1098>>2];
|
|
$1100 = ((($cursor)) + 12|0);
|
|
HEAPF32[$1100>>2] = $1099;
|
|
$1101 = +HEAPF32[$area>>2];
|
|
$1102 = +HEAPF32[$cursor_pos>>2];
|
|
$1103 = $1101 + $1102;
|
|
$1104 = $5;
|
|
$1105 = ((($1104)) + 80|0);
|
|
$1106 = +HEAPF32[$1105>>2];
|
|
$1107 = $1103 - $1106;
|
|
HEAPF32[$cursor>>2] = $1107;
|
|
$1108 = ((($area)) + 4|0);
|
|
$1109 = +HEAPF32[$1108>>2];
|
|
$1110 = ((($cursor_pos)) + 4|0);
|
|
$1111 = +HEAPF32[$1110>>2];
|
|
$1112 = $1109 + $1111;
|
|
$1113 = $row_height;
|
|
$1114 = $1113 / 2.0;
|
|
$1115 = $1112 + $1114;
|
|
$1116 = ((($cursor)) + 12|0);
|
|
$1117 = +HEAPF32[$1116>>2];
|
|
$1118 = $1117 / 2.0;
|
|
$1119 = $1115 - $1118;
|
|
$1120 = ((($cursor)) + 4|0);
|
|
HEAPF32[$1120>>2] = $1119;
|
|
$1121 = $5;
|
|
$1122 = ((($1121)) + 80|0);
|
|
$1123 = ((($1122)) + 4|0);
|
|
$1124 = +HEAPF32[$1123>>2];
|
|
$1125 = ((($cursor)) + 4|0);
|
|
$1126 = +HEAPF32[$1125>>2];
|
|
$1127 = $1126 - $1124;
|
|
HEAPF32[$1125>>2] = $1127;
|
|
$1128 = $2;
|
|
;HEAP32[$cursor$byval_copy>>2]=HEAP32[$cursor>>2]|0;HEAP32[$cursor$byval_copy+4>>2]=HEAP32[$cursor+4>>2]|0;HEAP32[$cursor$byval_copy+8>>2]=HEAP32[$cursor+8>>2]|0;HEAP32[$cursor$byval_copy+12>>2]=HEAP32[$cursor+12>>2]|0;
|
|
;HEAP8[$cursor_color$byval_copy>>0]=HEAP8[$cursor_color>>0]|0;HEAP8[$cursor_color$byval_copy+1>>0]=HEAP8[$cursor_color+1>>0]|0;HEAP8[$cursor_color$byval_copy+2>>0]=HEAP8[$cursor_color+2>>0]|0;HEAP8[$cursor_color$byval_copy+3>>0]=HEAP8[$cursor_color+3>>0]|0;
|
|
_nk_fill_rect($1128,$cursor$byval_copy,0.0,$cursor_color$byval_copy);
|
|
} else {
|
|
$1171 = $5;
|
|
$1172 = ((($1171)) + 12|0);
|
|
$1173 = (_nk_str_len($1172)|0);
|
|
$l20 = $1173;
|
|
$1174 = $5;
|
|
$1175 = ((($1174)) + 12|0);
|
|
$1176 = (_nk_str_get_const($1175)|0);
|
|
$begin21 = $1176;
|
|
$1177 = $1;
|
|
$1178 = HEAP32[$1177>>2]|0;
|
|
$1179 = $1178 & 32;
|
|
$1180 = ($1179|0)!=(0);
|
|
do {
|
|
if ($1180) {
|
|
$1181 = $6;
|
|
$1182 = ((($1181)) + 40|0);
|
|
$background22 = $1182;
|
|
$1183 = $6;
|
|
$1184 = ((($1183)) + 520|0);
|
|
;HEAP8[$text_color24>>0]=HEAP8[$1184>>0]|0;HEAP8[$text_color24+1>>0]=HEAP8[$1184+1>>0]|0;HEAP8[$text_color24+2>>0]=HEAP8[$1184+2>>0]|0;HEAP8[$text_color24+3>>0]=HEAP8[$1184+3>>0]|0;
|
|
} else {
|
|
$1185 = $1;
|
|
$1186 = HEAP32[$1185>>2]|0;
|
|
$1187 = $1186 & 16;
|
|
$1188 = ($1187|0)!=(0);
|
|
$1189 = $6;
|
|
if ($1188) {
|
|
$1190 = ((($1189)) + 20|0);
|
|
$background22 = $1190;
|
|
$1191 = $6;
|
|
$1192 = ((($1191)) + 516|0);
|
|
;HEAP8[$text_color24>>0]=HEAP8[$1192>>0]|0;HEAP8[$text_color24+1>>0]=HEAP8[$1192+1>>0]|0;HEAP8[$text_color24+2>>0]=HEAP8[$1192+2>>0]|0;HEAP8[$text_color24+3>>0]=HEAP8[$1192+3>>0]|0;
|
|
break;
|
|
} else {
|
|
$background22 = $1189;
|
|
$1193 = $6;
|
|
$1194 = ((($1193)) + 512|0);
|
|
;HEAP8[$text_color24>>0]=HEAP8[$1194>>0]|0;HEAP8[$text_color24+1>>0]=HEAP8[$1194+1>>0]|0;HEAP8[$text_color24+2>>0]=HEAP8[$1194+2>>0]|0;HEAP8[$text_color24+3>>0]=HEAP8[$1194+3>>0]|0;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$1195 = $background22;
|
|
$1196 = HEAP32[$1195>>2]|0;
|
|
$1197 = ($1196|0)==(1);
|
|
if ($1197) {
|
|
_nk_rgba($15,0,0,0,0);
|
|
;HEAP8[$background_color23>>0]=HEAP8[$15>>0]|0;HEAP8[$background_color23+1>>0]=HEAP8[$15+1>>0]|0;HEAP8[$background_color23+2>>0]=HEAP8[$15+2>>0]|0;HEAP8[$background_color23+3>>0]=HEAP8[$15+3>>0]|0;
|
|
} else {
|
|
$1198 = $background22;
|
|
$1199 = ((($1198)) + 4|0);
|
|
;HEAP8[$background_color23>>0]=HEAP8[$1199>>0]|0;HEAP8[$background_color23+1>>0]=HEAP8[$1199+1>>0]|0;HEAP8[$background_color23+2>>0]=HEAP8[$1199+2>>0]|0;HEAP8[$background_color23+3>>0]=HEAP8[$1199+3>>0]|0;
|
|
}
|
|
$1200 = $2;
|
|
$1201 = $6;
|
|
$1202 = +HEAPF32[$area>>2];
|
|
$1203 = $5;
|
|
$1204 = ((($1203)) + 80|0);
|
|
$1205 = +HEAPF32[$1204>>2];
|
|
$1206 = $1202 - $1205;
|
|
$1207 = ((($area)) + 4|0);
|
|
$1208 = +HEAPF32[$1207>>2];
|
|
$1209 = $5;
|
|
$1210 = ((($1209)) + 80|0);
|
|
$1211 = ((($1210)) + 4|0);
|
|
$1212 = +HEAPF32[$1211>>2];
|
|
$1213 = $1208 - $1212;
|
|
$1214 = $begin21;
|
|
$1215 = $l20;
|
|
$1216 = $row_height;
|
|
$1217 = $8;
|
|
;HEAP8[$background_color23$byval_copy>>0]=HEAP8[$background_color23>>0]|0;HEAP8[$background_color23$byval_copy+1>>0]=HEAP8[$background_color23+1>>0]|0;HEAP8[$background_color23$byval_copy+2>>0]=HEAP8[$background_color23+2>>0]|0;HEAP8[$background_color23$byval_copy+3>>0]=HEAP8[$background_color23+3>>0]|0;
|
|
;HEAP8[$text_color24$byval_copy>>0]=HEAP8[$text_color24>>0]|0;HEAP8[$text_color24$byval_copy+1>>0]=HEAP8[$text_color24+1>>0]|0;HEAP8[$text_color24$byval_copy+2>>0]=HEAP8[$text_color24+2>>0]|0;HEAP8[$text_color24$byval_copy+3>>0]=HEAP8[$text_color24+3>>0]|0;
|
|
_nk_edit_draw_text($1200,$1201,$1206,$1213,0.0,$1214,$1215,$1216,$1217,$background_color23$byval_copy,$text_color24$byval_copy,0);
|
|
}
|
|
} while(0);
|
|
$1218 = $2;
|
|
;HEAP32[$old_clip$byval_copy>>2]=HEAP32[$old_clip>>2]|0;HEAP32[$old_clip$byval_copy+4>>2]=HEAP32[$old_clip+4>>2]|0;HEAP32[$old_clip$byval_copy+8>>2]=HEAP32[$old_clip+8>>2]|0;HEAP32[$old_clip$byval_copy+12>>2]=HEAP32[$old_clip+12>>2]|0;
|
|
_nk_push_scissor($1218,$old_clip$byval_copy);
|
|
$1219 = $ret;
|
|
$0 = $1219;
|
|
$1220 = $0;
|
|
STACKTOP = sp;return ($1220|0);
|
|
}
|
|
function _nk_property($ctx,$name,$min,$val,$max,$step,$inc_per_pixel,$filter) {
|
|
$ctx = $ctx|0;
|
|
$name = $name|0;
|
|
$min = +$min;
|
|
$val = +$val;
|
|
$max = +$max;
|
|
$step = +$step;
|
|
$inc_per_pixel = +$inc_per_pixel;
|
|
$filter = $filter|0;
|
|
var $0 = 0.0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0.0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
|
|
var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0.0, $181 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
|
|
var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0, $42 = 0;
|
|
var $43 = 0, $44 = 0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0.0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0.0, $60 = 0;
|
|
var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0.0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0;
|
|
var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0;
|
|
var $98 = 0, $99 = 0, $bounds = 0, $bounds$byval_copy = 0, $buffer = 0, $cursor = 0, $dummy_buffer = 0, $dummy_cursor = 0, $dummy_length = 0, $dummy_state = 0, $hash = 0, $in = 0, $layout = 0, $len = 0, $old_state = 0, $or$cond = 0, $s = 0, $state = 0, $style = 0, $win = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 192|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$bounds$byval_copy = sp + 112|0;
|
|
$bounds = sp + 40|0;
|
|
$dummy_buffer = sp + 128|0;
|
|
$dummy_state = sp + 8|0;
|
|
$dummy_length = sp + 4|0;
|
|
$dummy_cursor = sp;
|
|
$1 = $ctx;
|
|
$2 = $name;
|
|
$3 = $min;
|
|
$4 = $val;
|
|
$5 = $max;
|
|
$6 = $step;
|
|
$7 = $inc_per_pixel;
|
|
$8 = $filter;
|
|
$state = 0;
|
|
$hash = 0;
|
|
$buffer = 0;
|
|
$len = 0;
|
|
$cursor = 0;
|
|
HEAP32[$dummy_state>>2] = 0;
|
|
HEAP32[$dummy_length>>2] = 0;
|
|
HEAP32[$dummy_cursor>>2] = 0;
|
|
$9 = $1;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((14913|0),(13400|0),17853,(31787|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $1;
|
|
$12 = ((($11)) + 11168|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ($13|0)!=(0|0);
|
|
if (!($14)) {
|
|
___assert_fail((28537|0),(13400|0),17854,(31787|0));
|
|
// unreachable;
|
|
}
|
|
$15 = $1;
|
|
$16 = ((($15)) + 11168|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = ((($17)) + 72|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = ($19|0)!=(0|0);
|
|
if (!($20)) {
|
|
___assert_fail((28516|0),(13400|0),17855,(31787|0));
|
|
// unreachable;
|
|
}
|
|
$21 = $1;
|
|
$22 = ($21|0)!=(0|0);
|
|
if ($22) {
|
|
$23 = $1;
|
|
$24 = ((($23)) + 11168|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = ($25|0)!=(0|0);
|
|
if ($26) {
|
|
$27 = $1;
|
|
$28 = ((($27)) + 11168|0);
|
|
$29 = HEAP32[$28>>2]|0;
|
|
$30 = ((($29)) + 72|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = ($31|0)!=(0|0);
|
|
if ($32) {
|
|
$34 = $1;
|
|
$35 = ((($34)) + 11168|0);
|
|
$36 = HEAP32[$35>>2]|0;
|
|
$win = $36;
|
|
$37 = $win;
|
|
$38 = ((($37)) + 72|0);
|
|
$39 = HEAP32[$38>>2]|0;
|
|
$layout = $39;
|
|
$40 = $1;
|
|
$41 = ((($40)) + 300|0);
|
|
$style = $41;
|
|
$42 = $1;
|
|
$43 = (_nk_widget($bounds,$42)|0);
|
|
$s = $43;
|
|
$44 = $s;
|
|
$45 = ($44|0)!=(0);
|
|
if (!($45)) {
|
|
$46 = $4;
|
|
$0 = $46;
|
|
$181 = $0;
|
|
STACKTOP = sp;return (+$181);
|
|
}
|
|
$47 = $s;
|
|
$48 = ($47|0)==(2);
|
|
if ($48) {
|
|
$54 = 0;
|
|
} else {
|
|
$49 = $layout;
|
|
$50 = HEAP32[$49>>2]|0;
|
|
$51 = $50 & 1024;
|
|
$52 = ($51|0)!=(0);
|
|
if ($52) {
|
|
$54 = 0;
|
|
} else {
|
|
$53 = $1;
|
|
$54 = $53;
|
|
}
|
|
}
|
|
$in = $54;
|
|
$55 = $2;
|
|
$56 = HEAP8[$55>>0]|0;
|
|
$57 = $56 << 24 >> 24;
|
|
$58 = ($57|0)==(35);
|
|
$59 = $2;
|
|
$60 = $2;
|
|
$61 = (_nk_strlen($60)|0);
|
|
if ($58) {
|
|
$62 = $win;
|
|
$63 = ((($62)) + 76|0);
|
|
$64 = ((($63)) + 84|0);
|
|
$65 = HEAP32[$64>>2]|0;
|
|
$66 = (($65) + 1)|0;
|
|
HEAP32[$64>>2] = $66;
|
|
$67 = (_nk_murmur_hash($59,$61,$65)|0);
|
|
$hash = $67;
|
|
$68 = $2;
|
|
$69 = ((($68)) + 1|0);
|
|
$2 = $69;
|
|
} else {
|
|
$70 = (_nk_murmur_hash($59,$61,42)|0);
|
|
$hash = $70;
|
|
}
|
|
$71 = $win;
|
|
$72 = ((($71)) + 76|0);
|
|
$73 = HEAP32[$72>>2]|0;
|
|
$74 = ($73|0)!=(0);
|
|
if ($74) {
|
|
$75 = $hash;
|
|
$76 = $win;
|
|
$77 = ((($76)) + 76|0);
|
|
$78 = ((($77)) + 80|0);
|
|
$79 = HEAP32[$78>>2]|0;
|
|
$80 = ($75|0)==($79|0);
|
|
if ($80) {
|
|
$81 = $win;
|
|
$82 = ((($81)) + 76|0);
|
|
$83 = ((($82)) + 8|0);
|
|
$buffer = $83;
|
|
$84 = $win;
|
|
$85 = ((($84)) + 76|0);
|
|
$86 = ((($85)) + 72|0);
|
|
$len = $86;
|
|
$87 = $win;
|
|
$88 = ((($87)) + 76|0);
|
|
$89 = ((($88)) + 76|0);
|
|
$cursor = $89;
|
|
$90 = $win;
|
|
$91 = ((($90)) + 76|0);
|
|
$92 = ((($91)) + 92|0);
|
|
$state = $92;
|
|
} else {
|
|
label = 22;
|
|
}
|
|
} else {
|
|
label = 22;
|
|
}
|
|
if ((label|0) == 22) {
|
|
$buffer = $dummy_buffer;
|
|
$len = $dummy_length;
|
|
$cursor = $dummy_cursor;
|
|
$state = $dummy_state;
|
|
}
|
|
$93 = $state;
|
|
$94 = HEAP32[$93>>2]|0;
|
|
$old_state = $94;
|
|
$95 = $1;
|
|
$96 = ((($95)) + 5668|0);
|
|
$97 = $win;
|
|
$98 = ((($97)) + 32|0);
|
|
$99 = $2;
|
|
$100 = $3;
|
|
$101 = $4;
|
|
$102 = $5;
|
|
$103 = $6;
|
|
$104 = $7;
|
|
$105 = $buffer;
|
|
$106 = $len;
|
|
$107 = $state;
|
|
$108 = $cursor;
|
|
$109 = $style;
|
|
$110 = ((($109)) + 1524|0);
|
|
$111 = $8;
|
|
$112 = $in;
|
|
$113 = $style;
|
|
$114 = $1;
|
|
$115 = ((($114)) + 5844|0);
|
|
;HEAP32[$bounds$byval_copy>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
$116 = (+_nk_do_property($96,$98,$bounds$byval_copy,$99,$100,$101,$102,$103,$104,$105,$106,$107,$108,$110,$111,$112,$113,$115));
|
|
$4 = $116;
|
|
$117 = $in;
|
|
$118 = ($117|0)!=(0|0);
|
|
if ($118) {
|
|
$119 = $state;
|
|
$120 = HEAP32[$119>>2]|0;
|
|
$121 = ($120|0)!=(0);
|
|
if ($121) {
|
|
$122 = $win;
|
|
$123 = ((($122)) + 76|0);
|
|
$124 = HEAP32[$123>>2]|0;
|
|
$125 = ($124|0)!=(0);
|
|
if (!($125)) {
|
|
$126 = $win;
|
|
$127 = ((($126)) + 76|0);
|
|
HEAP32[$127>>2] = 1;
|
|
$128 = $win;
|
|
$129 = ((($128)) + 76|0);
|
|
$130 = ((($129)) + 8|0);
|
|
$131 = $buffer;
|
|
$132 = $len;
|
|
$133 = HEAP32[$132>>2]|0;
|
|
(_nk_memcopy($130,$131,$133)|0);
|
|
$134 = $len;
|
|
$135 = HEAP32[$134>>2]|0;
|
|
$136 = $win;
|
|
$137 = ((($136)) + 76|0);
|
|
$138 = ((($137)) + 72|0);
|
|
HEAP32[$138>>2] = $135;
|
|
$139 = $cursor;
|
|
$140 = HEAP32[$139>>2]|0;
|
|
$141 = $win;
|
|
$142 = ((($141)) + 76|0);
|
|
$143 = ((($142)) + 76|0);
|
|
HEAP32[$143>>2] = $140;
|
|
$144 = $state;
|
|
$145 = HEAP32[$144>>2]|0;
|
|
$146 = $win;
|
|
$147 = ((($146)) + 76|0);
|
|
$148 = ((($147)) + 92|0);
|
|
HEAP32[$148>>2] = $145;
|
|
$149 = $hash;
|
|
$150 = $win;
|
|
$151 = ((($150)) + 76|0);
|
|
$152 = ((($151)) + 80|0);
|
|
HEAP32[$152>>2] = $149;
|
|
$153 = $state;
|
|
$154 = HEAP32[$153>>2]|0;
|
|
$155 = ($154|0)==(2);
|
|
if ($155) {
|
|
$156 = $1;
|
|
$157 = ((($156)) + 220|0);
|
|
$158 = ((($157)) + 76|0);
|
|
HEAP8[$158>>0] = 1;
|
|
$159 = $1;
|
|
$160 = ((($159)) + 220|0);
|
|
$161 = ((($160)) + 77|0);
|
|
HEAP8[$161>>0] = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$162 = $state;
|
|
$163 = HEAP32[$162>>2]|0;
|
|
$164 = ($163|0)==(0);
|
|
$165 = $old_state;
|
|
$166 = ($165|0)!=(0);
|
|
$or$cond = $164 & $166;
|
|
if ($or$cond) {
|
|
$167 = $old_state;
|
|
$168 = ($167|0)==(2);
|
|
if ($168) {
|
|
$169 = $1;
|
|
$170 = ((($169)) + 220|0);
|
|
$171 = ((($170)) + 76|0);
|
|
HEAP8[$171>>0] = 0;
|
|
$172 = $1;
|
|
$173 = ((($172)) + 220|0);
|
|
$174 = ((($173)) + 77|0);
|
|
HEAP8[$174>>0] = 0;
|
|
$175 = $1;
|
|
$176 = ((($175)) + 220|0);
|
|
$177 = ((($176)) + 78|0);
|
|
HEAP8[$177>>0] = 1;
|
|
}
|
|
$178 = $win;
|
|
$179 = ((($178)) + 76|0);
|
|
HEAP32[$179>>2] = 0;
|
|
}
|
|
$180 = $4;
|
|
$0 = $180;
|
|
$181 = $0;
|
|
STACKTOP = sp;return (+$181);
|
|
}
|
|
}
|
|
}
|
|
$33 = $4;
|
|
$0 = $33;
|
|
$181 = $0;
|
|
STACKTOP = sp;return (+$181);
|
|
}
|
|
function _nk_property_int($ctx,$name,$min,$val,$max,$step,$inc_per_pixel) {
|
|
$ctx = $ctx|0;
|
|
$name = $name|0;
|
|
$min = $min|0;
|
|
$val = $val|0;
|
|
$max = $max|0;
|
|
$step = $step|0;
|
|
$inc_per_pixel = $inc_per_pixel|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0;
|
|
var $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
|
|
var $or$cond = 0, $or$cond3 = 0, $value = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $name;
|
|
$2 = $min;
|
|
$3 = $val;
|
|
$4 = $max;
|
|
$5 = $step;
|
|
$6 = $inc_per_pixel;
|
|
$7 = $0;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((14913|0),(13400|0),17933,(28623|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $1;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((28614|0),(13400|0),17934,(28623|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $3;
|
|
$12 = ($11|0)!=(0|0);
|
|
if (!($12)) {
|
|
___assert_fail((28619|0),(13400|0),17935,(28623|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $0;
|
|
$14 = ($13|0)!=(0|0);
|
|
if (!($14)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$15 = $0;
|
|
$16 = ((($15)) + 11168|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = ($17|0)!=(0|0);
|
|
$19 = $1;
|
|
$20 = ($19|0)!=(0|0);
|
|
$or$cond = $18 & $20;
|
|
$21 = $3;
|
|
$22 = ($21|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $22;
|
|
if (!($or$cond3)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$23 = $0;
|
|
$24 = $1;
|
|
$25 = $2;
|
|
$26 = (+($25|0));
|
|
$27 = $3;
|
|
$28 = HEAP32[$27>>2]|0;
|
|
$29 = (+($28|0));
|
|
$30 = $4;
|
|
$31 = (+($30|0));
|
|
$32 = $5;
|
|
$33 = (+($32|0));
|
|
$34 = $6;
|
|
$35 = (+($34|0));
|
|
$36 = (+_nk_property($23,$24,$26,$29,$31,$33,$35,1));
|
|
$value = $36;
|
|
$37 = $value;
|
|
$38 = (~~(($37)));
|
|
$39 = $3;
|
|
HEAP32[$39>>2] = $38;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_propertyi($ctx,$name,$min,$val,$max,$step,$inc_per_pixel) {
|
|
$ctx = $ctx|0;
|
|
$name = $name|0;
|
|
$min = $min|0;
|
|
$val = $val|0;
|
|
$max = $max|0;
|
|
$step = $step|0;
|
|
$inc_per_pixel = $inc_per_pixel|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0.0;
|
|
var $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $value = 0.0, label = 0;
|
|
var sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $ctx;
|
|
$2 = $name;
|
|
$3 = $min;
|
|
$4 = $val;
|
|
$5 = $max;
|
|
$6 = $step;
|
|
$7 = $inc_per_pixel;
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
___assert_fail((14913|0),(13400|0),17957,(28639|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $2;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
___assert_fail((28614|0),(13400|0),17958,(28639|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $1;
|
|
$13 = ($12|0)!=(0|0);
|
|
if ($13) {
|
|
$14 = $1;
|
|
$15 = ((($14)) + 11168|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = ($16|0)!=(0|0);
|
|
$18 = $2;
|
|
$19 = ($18|0)!=(0|0);
|
|
$or$cond = $17 & $19;
|
|
if ($or$cond) {
|
|
$21 = $1;
|
|
$22 = $2;
|
|
$23 = $3;
|
|
$24 = (+($23|0));
|
|
$25 = $4;
|
|
$26 = (+($25|0));
|
|
$27 = $5;
|
|
$28 = (+($27|0));
|
|
$29 = $6;
|
|
$30 = (+($29|0));
|
|
$31 = $7;
|
|
$32 = (+($31|0));
|
|
$33 = (+_nk_property($21,$22,$24,$26,$28,$30,$32,1));
|
|
$value = $33;
|
|
$34 = $value;
|
|
$35 = (~~(($34)));
|
|
$0 = $35;
|
|
$36 = $0;
|
|
STACKTOP = sp;return ($36|0);
|
|
}
|
|
}
|
|
$20 = $4;
|
|
$0 = $20;
|
|
$36 = $0;
|
|
STACKTOP = sp;return ($36|0);
|
|
}
|
|
function _nk_color_pick($ctx,$color,$fmt) {
|
|
$ctx = $ctx|0;
|
|
$color = $color|0;
|
|
$fmt = $fmt|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
|
|
var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
|
|
var $62 = 0, $7 = 0, $8 = 0, $9 = 0, $bounds = 0, $bounds$byval_copy = 0, $config = 0, $in = 0, $layout = 0, $or$cond = 0, $state = 0, $win = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 80|0;
|
|
$bounds$byval_copy = sp + 64|0;
|
|
$bounds = sp + 8|0;
|
|
$4 = sp;
|
|
$1 = $ctx;
|
|
$2 = $color;
|
|
$3 = $fmt;
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((14913|0),(13400|0),17982,(28652|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $2;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((28666|0),(13400|0),17983,(28652|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $1;
|
|
$10 = ((($9)) + 11168|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = ($11|0)!=(0|0);
|
|
if (!($12)) {
|
|
___assert_fail((28537|0),(13400|0),17984,(28652|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $1;
|
|
$14 = ((($13)) + 11168|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ((($15)) + 72|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = ($17|0)!=(0|0);
|
|
if (!($18)) {
|
|
___assert_fail((28516|0),(13400|0),17985,(28652|0));
|
|
// unreachable;
|
|
}
|
|
$19 = $1;
|
|
$20 = ($19|0)!=(0|0);
|
|
if ($20) {
|
|
$21 = $1;
|
|
$22 = ((($21)) + 11168|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$24 = ($23|0)!=(0|0);
|
|
if ($24) {
|
|
$25 = $1;
|
|
$26 = ((($25)) + 11168|0);
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = ((($27)) + 72|0);
|
|
$29 = HEAP32[$28>>2]|0;
|
|
$30 = ($29|0)!=(0|0);
|
|
$31 = $2;
|
|
$32 = ($31|0)!=(0|0);
|
|
$or$cond = $30 & $32;
|
|
if ($or$cond) {
|
|
$33 = $1;
|
|
$34 = ((($33)) + 11168|0);
|
|
$35 = HEAP32[$34>>2]|0;
|
|
$win = $35;
|
|
$36 = $1;
|
|
$37 = ((($36)) + 300|0);
|
|
$config = $37;
|
|
$38 = $win;
|
|
$39 = ((($38)) + 72|0);
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$layout = $40;
|
|
$41 = $1;
|
|
$42 = (_nk_widget($bounds,$41)|0);
|
|
$state = $42;
|
|
$43 = $state;
|
|
$44 = ($43|0)!=(0);
|
|
if (!($44)) {
|
|
$0 = 0;
|
|
$62 = $0;
|
|
STACKTOP = sp;return ($62|0);
|
|
}
|
|
$45 = $state;
|
|
$46 = ($45|0)==(2);
|
|
if ($46) {
|
|
$52 = 0;
|
|
} else {
|
|
$47 = $layout;
|
|
$48 = HEAP32[$47>>2]|0;
|
|
$49 = $48 & 1024;
|
|
$50 = ($49|0)!=(0);
|
|
if ($50) {
|
|
$52 = 0;
|
|
} else {
|
|
$51 = $1;
|
|
$52 = $51;
|
|
}
|
|
}
|
|
$in = $52;
|
|
$53 = $1;
|
|
$54 = ((($53)) + 5668|0);
|
|
$55 = $win;
|
|
$56 = ((($55)) + 32|0);
|
|
$57 = $2;
|
|
$58 = $3;
|
|
_nk_vec2($4,0.0,0.0);
|
|
$59 = $in;
|
|
$60 = $config;
|
|
;HEAP32[$bounds$byval_copy>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;
|
|
$61 = (_nk_do_color_picker($54,$56,$57,$58,$bounds$byval_copy,$$byval_copy,$59,$60)|0);
|
|
$0 = $61;
|
|
$62 = $0;
|
|
STACKTOP = sp;return ($62|0);
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$62 = $0;
|
|
STACKTOP = sp;return ($62|0);
|
|
}
|
|
function _nk_do_color_picker($state,$out,$color,$fmt,$bounds,$padding,$in,$font) {
|
|
$state = $state|0;
|
|
$out = $out|0;
|
|
$color = $color|0;
|
|
$fmt = $fmt|0;
|
|
$bounds = $bounds|0;
|
|
$padding = $padding|0;
|
|
$in = $in|0;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
|
|
var $24 = 0, $25 = 0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0;
|
|
var $42 = 0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0;
|
|
var $60 = 0, $61 = 0.0, $62 = 0, $63 = 0, $64 = 0.0, $65 = 0, $66 = 0, $67 = 0.0, $68 = 0, $69 = 0.0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0, $77 = 0.0, $78 = 0.0;
|
|
var $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0, $82 = 0.0, $83 = 0, $84 = 0.0, $85 = 0, $86 = 0, $87 = 0.0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0;
|
|
var $97 = 0, $98 = 0, $99 = 0, $alpha_bar = 0, $alpha_bar$ = 0, $bar_w = 0.0, $hue_bar = 0, $matrix = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $ret = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 88|0;
|
|
$matrix = sp + 40|0;
|
|
$hue_bar = sp + 24|0;
|
|
$alpha_bar = sp + 8|0;
|
|
$1 = $state;
|
|
$2 = $out;
|
|
$3 = $color;
|
|
$4 = $fmt;
|
|
$5 = $in;
|
|
$6 = $font;
|
|
$ret = 0;
|
|
$7 = $2;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((31441|0),(13400|0),13642,(31799|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $3;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((28666|0),(13400|0),13643,(31799|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $1;
|
|
$12 = ($11|0)!=(0|0);
|
|
if (!($12)) {
|
|
___assert_fail((28059|0),(13400|0),13644,(31799|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $6;
|
|
$14 = ($13|0)!=(0|0);
|
|
if (!($14)) {
|
|
___assert_fail((14249|0),(13400|0),13645,(31799|0));
|
|
// unreachable;
|
|
}
|
|
$15 = $2;
|
|
$16 = ($15|0)!=(0|0);
|
|
$17 = $3;
|
|
$18 = ($17|0)!=(0|0);
|
|
$or$cond = $16 & $18;
|
|
$19 = $1;
|
|
$20 = ($19|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $20;
|
|
$21 = $6;
|
|
$22 = ($21|0)!=(0|0);
|
|
$or$cond5 = $or$cond3 & $22;
|
|
if ($or$cond5) {
|
|
$24 = $6;
|
|
$25 = ((($24)) + 4|0);
|
|
$26 = +HEAPF32[$25>>2];
|
|
$bar_w = $26;
|
|
$27 = +HEAPF32[$padding>>2];
|
|
$28 = +HEAPF32[$bounds>>2];
|
|
$29 = $28 + $27;
|
|
HEAPF32[$bounds>>2] = $29;
|
|
$30 = +HEAPF32[$padding>>2];
|
|
$31 = ((($bounds)) + 4|0);
|
|
$32 = +HEAPF32[$31>>2];
|
|
$33 = $32 + $30;
|
|
HEAPF32[$31>>2] = $33;
|
|
$34 = +HEAPF32[$padding>>2];
|
|
$35 = 2.0 * $34;
|
|
$36 = ((($bounds)) + 8|0);
|
|
$37 = +HEAPF32[$36>>2];
|
|
$38 = $37 - $35;
|
|
HEAPF32[$36>>2] = $38;
|
|
$39 = ((($padding)) + 4|0);
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = 2.0 * $40;
|
|
$42 = ((($bounds)) + 12|0);
|
|
$43 = +HEAPF32[$42>>2];
|
|
$44 = $43 - $41;
|
|
HEAPF32[$42>>2] = $44;
|
|
$45 = +HEAPF32[$bounds>>2];
|
|
HEAPF32[$matrix>>2] = $45;
|
|
$46 = ((($bounds)) + 4|0);
|
|
$47 = +HEAPF32[$46>>2];
|
|
$48 = ((($matrix)) + 4|0);
|
|
HEAPF32[$48>>2] = $47;
|
|
$49 = ((($bounds)) + 12|0);
|
|
$50 = +HEAPF32[$49>>2];
|
|
$51 = ((($matrix)) + 12|0);
|
|
HEAPF32[$51>>2] = $50;
|
|
$52 = ((($bounds)) + 8|0);
|
|
$53 = +HEAPF32[$52>>2];
|
|
$54 = +HEAPF32[$padding>>2];
|
|
$55 = 3.0 * $54;
|
|
$56 = $bar_w;
|
|
$57 = 2.0 * $56;
|
|
$58 = $55 + $57;
|
|
$59 = $53 - $58;
|
|
$60 = ((($matrix)) + 8|0);
|
|
HEAPF32[$60>>2] = $59;
|
|
$61 = $bar_w;
|
|
$62 = ((($hue_bar)) + 8|0);
|
|
HEAPF32[$62>>2] = $61;
|
|
$63 = ((($bounds)) + 4|0);
|
|
$64 = +HEAPF32[$63>>2];
|
|
$65 = ((($hue_bar)) + 4|0);
|
|
HEAPF32[$65>>2] = $64;
|
|
$66 = ((($matrix)) + 12|0);
|
|
$67 = +HEAPF32[$66>>2];
|
|
$68 = ((($hue_bar)) + 12|0);
|
|
HEAPF32[$68>>2] = $67;
|
|
$69 = +HEAPF32[$matrix>>2];
|
|
$70 = ((($matrix)) + 8|0);
|
|
$71 = +HEAPF32[$70>>2];
|
|
$72 = $69 + $71;
|
|
$73 = +HEAPF32[$padding>>2];
|
|
$74 = $72 + $73;
|
|
HEAPF32[$hue_bar>>2] = $74;
|
|
$75 = +HEAPF32[$hue_bar>>2];
|
|
$76 = ((($hue_bar)) + 8|0);
|
|
$77 = +HEAPF32[$76>>2];
|
|
$78 = $75 + $77;
|
|
$79 = +HEAPF32[$padding>>2];
|
|
$80 = $78 + $79;
|
|
HEAPF32[$alpha_bar>>2] = $80;
|
|
$81 = ((($bounds)) + 4|0);
|
|
$82 = +HEAPF32[$81>>2];
|
|
$83 = ((($alpha_bar)) + 4|0);
|
|
HEAPF32[$83>>2] = $82;
|
|
$84 = $bar_w;
|
|
$85 = ((($alpha_bar)) + 8|0);
|
|
HEAPF32[$85>>2] = $84;
|
|
$86 = ((($matrix)) + 12|0);
|
|
$87 = +HEAPF32[$86>>2];
|
|
$88 = ((($alpha_bar)) + 12|0);
|
|
HEAPF32[$88>>2] = $87;
|
|
$89 = $1;
|
|
$90 = $4;
|
|
$91 = ($90|0)==(1);
|
|
$alpha_bar$ = $91 ? $alpha_bar : 0;
|
|
$92 = $3;
|
|
$93 = $5;
|
|
$94 = (_nk_color_picker_behavior($89,$bounds,$matrix,$hue_bar,$alpha_bar$,$92,$93)|0);
|
|
$ret = $94;
|
|
$95 = $2;
|
|
$96 = $4;
|
|
$97 = ($96|0)==(1);
|
|
$98 = $97 ? $alpha_bar : 0;
|
|
$99 = $3;
|
|
;HEAP8[$$byval_copy>>0]=HEAP8[$99>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$99+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$99+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$99+3>>0]|0;
|
|
_nk_draw_color_picker($95,$matrix,$hue_bar,$98,$$byval_copy);
|
|
$100 = $ret;
|
|
$0 = $100;
|
|
$101 = $0;
|
|
STACKTOP = sp;return ($101|0);
|
|
} else {
|
|
$23 = $ret;
|
|
$0 = $23;
|
|
$101 = $0;
|
|
STACKTOP = sp;return ($101|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_color_picker($agg$result,$ctx,$color,$fmt) {
|
|
$agg$result = $agg$result|0;
|
|
$ctx = $ctx|0;
|
|
$color = $color|0;
|
|
$fmt = $fmt|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $fmt;
|
|
$2 = $0;
|
|
$3 = $1;
|
|
(_nk_color_pick($2,$color,$3)|0);
|
|
;HEAP8[$agg$result>>0]=HEAP8[$color>>0]|0;HEAP8[$agg$result+1>>0]=HEAP8[$color+1>>0]|0;HEAP8[$agg$result+2>>0]=HEAP8[$color+2>>0]|0;HEAP8[$agg$result+3>>0]=HEAP8[$color+3>>0]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_shrink_rect($agg$result,$r,$amount) {
|
|
$agg$result = $agg$result|0;
|
|
$r = $r|0;
|
|
$amount = +$amount;
|
|
var $0 = 0.0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0;
|
|
var $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0, $5 = 0, $6 = 0.0;
|
|
var $7 = 0.0, $8 = 0, $9 = 0.0, $res = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$res = sp;
|
|
$0 = $amount;
|
|
$1 = ((($r)) + 8|0);
|
|
$2 = +HEAPF32[$1>>2];
|
|
$3 = $0;
|
|
$4 = 2.0 * $3;
|
|
$5 = $2 < $4;
|
|
$6 = $0;
|
|
$7 = 2.0 * $6;
|
|
$8 = ((($r)) + 8|0);
|
|
$9 = +HEAPF32[$8>>2];
|
|
$10 = $5 ? $7 : $9;
|
|
$11 = ((($r)) + 8|0);
|
|
HEAPF32[$11>>2] = $10;
|
|
$12 = ((($r)) + 12|0);
|
|
$13 = +HEAPF32[$12>>2];
|
|
$14 = $0;
|
|
$15 = 2.0 * $14;
|
|
$16 = $13 < $15;
|
|
$17 = $0;
|
|
$18 = 2.0 * $17;
|
|
$19 = ((($r)) + 12|0);
|
|
$20 = +HEAPF32[$19>>2];
|
|
$21 = $16 ? $18 : $20;
|
|
$22 = ((($r)) + 12|0);
|
|
HEAPF32[$22>>2] = $21;
|
|
$23 = +HEAPF32[$r>>2];
|
|
$24 = $0;
|
|
$25 = $23 + $24;
|
|
HEAPF32[$res>>2] = $25;
|
|
$26 = ((($r)) + 4|0);
|
|
$27 = +HEAPF32[$26>>2];
|
|
$28 = $0;
|
|
$29 = $27 + $28;
|
|
$30 = ((($res)) + 4|0);
|
|
HEAPF32[$30>>2] = $29;
|
|
$31 = ((($r)) + 8|0);
|
|
$32 = +HEAPF32[$31>>2];
|
|
$33 = $0;
|
|
$34 = 2.0 * $33;
|
|
$35 = $32 - $34;
|
|
$36 = ((($res)) + 8|0);
|
|
HEAPF32[$36>>2] = $35;
|
|
$37 = ((($r)) + 12|0);
|
|
$38 = +HEAPF32[$37>>2];
|
|
$39 = $0;
|
|
$40 = 2.0 * $39;
|
|
$41 = $38 - $40;
|
|
$42 = ((($res)) + 12|0);
|
|
HEAPF32[$42>>2] = $41;
|
|
;HEAP32[$agg$result>>2]=HEAP32[$res>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$res+4>>2]|0;HEAP32[$agg$result+8>>2]=HEAP32[$res+8>>2]|0;HEAP32[$agg$result+12>>2]=HEAP32[$res+12>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_unify($clip,$a,$x0,$y0,$x1,$y1) {
|
|
$clip = $clip|0;
|
|
$a = $a|0;
|
|
$x0 = +$x0;
|
|
$y0 = +$y0;
|
|
$x1 = +$x1;
|
|
$y1 = +$y1;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0;
|
|
var $27 = 0.0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0.0;
|
|
var $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0.0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0;
|
|
var $81 = 0, $82 = 0.0, $83 = 0, $84 = 0, $85 = 0.0, $86 = 0, $87 = 0, $88 = 0.0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $clip;
|
|
$1 = $a;
|
|
$2 = $x0;
|
|
$3 = $y0;
|
|
$4 = $x1;
|
|
$5 = $y1;
|
|
$6 = $1;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((13573|0),(13400|0),3930,(31929|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $0;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
___assert_fail((31938|0),(13400|0),3931,(31929|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $1;
|
|
$11 = +HEAPF32[$10>>2];
|
|
$12 = $2;
|
|
$13 = $11 < $12;
|
|
if ($13) {
|
|
$14 = $2;
|
|
$18 = $14;
|
|
} else {
|
|
$15 = $1;
|
|
$16 = +HEAPF32[$15>>2];
|
|
$18 = $16;
|
|
}
|
|
$17 = $0;
|
|
HEAPF32[$17>>2] = $18;
|
|
$19 = $1;
|
|
$20 = ((($19)) + 4|0);
|
|
$21 = +HEAPF32[$20>>2];
|
|
$22 = $3;
|
|
$23 = $21 < $22;
|
|
if ($23) {
|
|
$24 = $3;
|
|
$30 = $24;
|
|
} else {
|
|
$25 = $1;
|
|
$26 = ((($25)) + 4|0);
|
|
$27 = +HEAPF32[$26>>2];
|
|
$30 = $27;
|
|
}
|
|
$28 = $0;
|
|
$29 = ((($28)) + 4|0);
|
|
HEAPF32[$29>>2] = $30;
|
|
$31 = $1;
|
|
$32 = +HEAPF32[$31>>2];
|
|
$33 = $1;
|
|
$34 = ((($33)) + 8|0);
|
|
$35 = +HEAPF32[$34>>2];
|
|
$36 = $32 + $35;
|
|
$37 = $4;
|
|
$38 = $36 < $37;
|
|
if ($38) {
|
|
$39 = $1;
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = $1;
|
|
$42 = ((($41)) + 8|0);
|
|
$43 = +HEAPF32[$42>>2];
|
|
$44 = $40 + $43;
|
|
$49 = $44;
|
|
} else {
|
|
$45 = $4;
|
|
$49 = $45;
|
|
}
|
|
$46 = $0;
|
|
$47 = +HEAPF32[$46>>2];
|
|
$48 = $49 - $47;
|
|
$50 = $0;
|
|
$51 = ((($50)) + 8|0);
|
|
HEAPF32[$51>>2] = $48;
|
|
$52 = $1;
|
|
$53 = ((($52)) + 4|0);
|
|
$54 = +HEAPF32[$53>>2];
|
|
$55 = $1;
|
|
$56 = ((($55)) + 12|0);
|
|
$57 = +HEAPF32[$56>>2];
|
|
$58 = $54 + $57;
|
|
$59 = $5;
|
|
$60 = $58 < $59;
|
|
if ($60) {
|
|
$61 = $1;
|
|
$62 = ((($61)) + 4|0);
|
|
$63 = +HEAPF32[$62>>2];
|
|
$64 = $1;
|
|
$65 = ((($64)) + 12|0);
|
|
$66 = +HEAPF32[$65>>2];
|
|
$67 = $63 + $66;
|
|
$73 = $67;
|
|
} else {
|
|
$68 = $5;
|
|
$73 = $68;
|
|
}
|
|
$69 = $0;
|
|
$70 = ((($69)) + 4|0);
|
|
$71 = +HEAPF32[$70>>2];
|
|
$72 = $73 - $71;
|
|
$74 = $0;
|
|
$75 = ((($74)) + 12|0);
|
|
HEAPF32[$75>>2] = $72;
|
|
$76 = $0;
|
|
$77 = ((($76)) + 8|0);
|
|
$78 = +HEAPF32[$77>>2];
|
|
$79 = 0.0 < $78;
|
|
if ($79) {
|
|
$80 = $0;
|
|
$81 = ((($80)) + 8|0);
|
|
$82 = +HEAPF32[$81>>2];
|
|
$85 = $82;
|
|
} else {
|
|
$85 = 0.0;
|
|
}
|
|
$83 = $0;
|
|
$84 = ((($83)) + 8|0);
|
|
HEAPF32[$84>>2] = $85;
|
|
$86 = $0;
|
|
$87 = ((($86)) + 12|0);
|
|
$88 = +HEAPF32[$87>>2];
|
|
$89 = 0.0 < $88;
|
|
if (!($89)) {
|
|
$95 = 0.0;
|
|
$93 = $0;
|
|
$94 = ((($93)) + 12|0);
|
|
HEAPF32[$94>>2] = $95;
|
|
STACKTOP = sp;return;
|
|
}
|
|
$90 = $0;
|
|
$91 = ((($90)) + 12|0);
|
|
$92 = +HEAPF32[$91>>2];
|
|
$95 = $92;
|
|
$93 = $0;
|
|
$94 = ((($93)) + 12|0);
|
|
HEAPF32[$94>>2] = $95;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_start_popup($ctx,$win) {
|
|
$ctx = $ctx|0;
|
|
$win = $win|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0;
|
|
var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $buf = 0, $iter = 0, $or$cond = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $win;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((14913|0),(13400|0),14584,(31943|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((28440|0),(13400|0),14585,(31943|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $0;
|
|
$7 = ($6|0)!=(0|0);
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
$or$cond = $7 & $9;
|
|
if (!($or$cond)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$10 = $1;
|
|
$11 = ((($10)) + 72|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$iter = $12;
|
|
while(1) {
|
|
$13 = $iter;
|
|
$14 = ((($13)) + 352|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($15|0)!=(0|0);
|
|
$17 = $iter;
|
|
if (!($16)) {
|
|
break;
|
|
}
|
|
$18 = ((($17)) + 352|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$iter = $19;
|
|
}
|
|
$20 = ((($17)) + 328|0);
|
|
$buf = $20;
|
|
$21 = $1;
|
|
$22 = ((($21)) + 32|0);
|
|
$23 = ((($22)) + 32|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = $buf;
|
|
HEAP32[$25>>2] = $24;
|
|
$26 = $1;
|
|
$27 = ((($26)) + 32|0);
|
|
$28 = ((($27)) + 32|0);
|
|
$29 = HEAP32[$28>>2]|0;
|
|
$30 = $buf;
|
|
$31 = ((($30)) + 12|0);
|
|
HEAP32[$31>>2] = $29;
|
|
$32 = $1;
|
|
$33 = ((($32)) + 32|0);
|
|
$34 = ((($33)) + 36|0);
|
|
$35 = HEAP32[$34>>2]|0;
|
|
$36 = $buf;
|
|
$37 = ((($36)) + 4|0);
|
|
HEAP32[$37>>2] = $35;
|
|
$38 = $buf;
|
|
$39 = HEAP32[$38>>2]|0;
|
|
$40 = $buf;
|
|
$41 = ((($40)) + 8|0);
|
|
HEAP32[$41>>2] = $39;
|
|
$42 = $buf;
|
|
$43 = ((($42)) + 16|0);
|
|
HEAP32[$43>>2] = 1;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_popup_end($ctx) {
|
|
$ctx = $ctx|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
|
|
var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
|
|
var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, $nk_null_rect$byval_copy = 0, $popup = 0, $win = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 32|0;
|
|
$nk_null_rect$byval_copy = sp + 16|0;
|
|
$0 = $ctx;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((14913|0),(13400|0),18602,(28718|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ((($3)) + 11168|0);
|
|
$5 = HEAP32[$4>>2]|0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((28537|0),(13400|0),18603,(28718|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $0;
|
|
$8 = ((($7)) + 11168|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ((($9)) + 72|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = ($11|0)!=(0|0);
|
|
if (!($12)) {
|
|
___assert_fail((28516|0),(13400|0),18604,(28718|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $0;
|
|
$14 = ($13|0)!=(0|0);
|
|
if (!($14)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$15 = $0;
|
|
$16 = ((($15)) + 11168|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = ($17|0)!=(0|0);
|
|
if (!($18)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$19 = $0;
|
|
$20 = ((($19)) + 11168|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = ((($21)) + 72|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$24 = ($23|0)!=(0|0);
|
|
if (!($24)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$25 = $0;
|
|
$26 = ((($25)) + 11168|0);
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$popup = $27;
|
|
$28 = $popup;
|
|
$29 = ((($28)) + 272|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$31 = ($30|0)!=(0|0);
|
|
if (!($31)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$32 = $popup;
|
|
$33 = ((($32)) + 272|0);
|
|
$34 = HEAP32[$33>>2]|0;
|
|
$win = $34;
|
|
$35 = $popup;
|
|
$36 = ((($35)) + 8|0);
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$38 = $37 & 2048;
|
|
$39 = ($38|0)!=(0);
|
|
if ($39) {
|
|
$40 = $win;
|
|
$41 = ((($40)) + 72|0);
|
|
$42 = HEAP32[$41>>2]|0;
|
|
$43 = HEAP32[$42>>2]|0;
|
|
$44 = $43 | 2097152;
|
|
HEAP32[$42>>2] = $44;
|
|
$45 = $win;
|
|
$46 = ((($45)) + 172|0);
|
|
$47 = ((($46)) + 12|0);
|
|
HEAP32[$47>>2] = 0;
|
|
}
|
|
$48 = $popup;
|
|
$49 = ((($48)) + 32|0);
|
|
;HEAP32[$nk_null_rect$byval_copy>>2]=HEAP32[8>>2]|0;HEAP32[$nk_null_rect$byval_copy+4>>2]=HEAP32[8+4>>2]|0;HEAP32[$nk_null_rect$byval_copy+8>>2]=HEAP32[8+8>>2]|0;HEAP32[$nk_null_rect$byval_copy+12>>2]=HEAP32[8+12>>2]|0;
|
|
_nk_push_scissor($49,$nk_null_rect$byval_copy);
|
|
$50 = $0;
|
|
_nk_end($50);
|
|
$51 = $win;
|
|
$52 = ((($51)) + 32|0);
|
|
$53 = $popup;
|
|
$54 = ((($53)) + 32|0);
|
|
dest=$52; src=$54; stop=dest+40|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
|
|
$55 = $0;
|
|
$56 = $win;
|
|
_nk_finish_popup($55,$56);
|
|
$57 = $win;
|
|
$58 = $0;
|
|
$59 = ((($58)) + 11168|0);
|
|
HEAP32[$59>>2] = $57;
|
|
$60 = $win;
|
|
$61 = ((($60)) + 32|0);
|
|
$62 = $win;
|
|
$63 = ((($62)) + 72|0);
|
|
$64 = HEAP32[$63>>2]|0;
|
|
$65 = ((($64)) + 56|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$65>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$65+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$65+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$65+12>>2]|0;
|
|
_nk_push_scissor($61,$$byval_copy);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_finish_popup($ctx,$win) {
|
|
$ctx = $ctx|0;
|
|
$win = $win|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $buf = 0, $iter = 0, $or$cond = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $win;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((14913|0),(13400|0),14607,(31958|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((28440|0),(13400|0),14608,(31958|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $0;
|
|
$7 = ($6|0)!=(0|0);
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
$or$cond = $7 & $9;
|
|
if (!($or$cond)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$10 = $1;
|
|
$11 = ((($10)) + 72|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$iter = $12;
|
|
while(1) {
|
|
$13 = $iter;
|
|
$14 = ((($13)) + 352|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($15|0)!=(0|0);
|
|
$17 = $iter;
|
|
if (!($16)) {
|
|
break;
|
|
}
|
|
$18 = ((($17)) + 352|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$iter = $19;
|
|
}
|
|
$20 = ((($17)) + 328|0);
|
|
$buf = $20;
|
|
$21 = $1;
|
|
$22 = ((($21)) + 32|0);
|
|
$23 = ((($22)) + 36|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = $buf;
|
|
$26 = ((($25)) + 8|0);
|
|
HEAP32[$26>>2] = $24;
|
|
$27 = $1;
|
|
$28 = ((($27)) + 32|0);
|
|
$29 = ((($28)) + 32|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$31 = $buf;
|
|
$32 = ((($31)) + 12|0);
|
|
HEAP32[$32>>2] = $30;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_nonblock_begin($layout,$ctx,$flags,$body,$header) {
|
|
$layout = $layout|0;
|
|
$ctx = $ctx|0;
|
|
$flags = $flags|0;
|
|
$body = $body|0;
|
|
$header = $header|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0;
|
|
var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0;
|
|
var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0;
|
|
var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0;
|
|
var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0;
|
|
var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $body$byval_copy = 0, $clicked = 0, $header$byval_copy = 0, $in_body = 0, $in_header = 0, $is_active = 0, $nk_null_rect$byval_copy = 0, $or$cond = 0, $or$cond3 = 0, $popup = 0, $win = 0, dest = 0, label = 0, sp = 0;
|
|
var src = 0, stop = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$nk_null_rect$byval_copy = sp + 72|0;
|
|
$header$byval_copy = sp + 56|0;
|
|
$body$byval_copy = sp + 40|0;
|
|
$1 = $layout;
|
|
$2 = $ctx;
|
|
$3 = $flags;
|
|
$is_active = 1;
|
|
$4 = $2;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((14913|0),(13400|0),18530,(31974|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $2;
|
|
$7 = ((($6)) + 11168|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
___assert_fail((28537|0),(13400|0),18531,(31974|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $2;
|
|
$11 = ((($10)) + 11168|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ((($12)) + 72|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = ($14|0)!=(0|0);
|
|
if (!($15)) {
|
|
___assert_fail((28516|0),(13400|0),18532,(31974|0));
|
|
// unreachable;
|
|
}
|
|
$16 = $2;
|
|
$17 = ($16|0)!=(0|0);
|
|
if ($17) {
|
|
$18 = $2;
|
|
$19 = ((($18)) + 11168|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = ($20|0)!=(0|0);
|
|
if ($21) {
|
|
$22 = $2;
|
|
$23 = ((($22)) + 11168|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = ((($24)) + 72|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$27 = ($26|0)!=(0|0);
|
|
if ($27) {
|
|
$28 = $2;
|
|
$29 = ((($28)) + 11168|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$win = $30;
|
|
$31 = $win;
|
|
$32 = ((($31)) + 8|0);
|
|
$33 = HEAP32[$32>>2]|0;
|
|
$34 = $33 & 32768;
|
|
$35 = ($34|0)!=(0);
|
|
if ($35) {
|
|
___assert_fail((28672|0),(13400|0),18538,(31974|0));
|
|
// unreachable;
|
|
}
|
|
$36 = $win;
|
|
$37 = ((($36)) + 172|0);
|
|
$38 = HEAP32[$37>>2]|0;
|
|
$popup = $38;
|
|
$39 = $popup;
|
|
$40 = ($39|0)!=(0|0);
|
|
$41 = $2;
|
|
if ($40) {
|
|
$50 = (_nk_input_has_mouse_click($41,0)|0);
|
|
$clicked = $50;
|
|
$51 = $2;
|
|
;HEAP32[$body$byval_copy>>2]=HEAP32[$body>>2]|0;HEAP32[$body$byval_copy+4>>2]=HEAP32[$body+4>>2]|0;HEAP32[$body$byval_copy+8>>2]=HEAP32[$body+8>>2]|0;HEAP32[$body$byval_copy+12>>2]=HEAP32[$body+12>>2]|0;
|
|
$52 = (_nk_input_is_mouse_click_in_rect($51,0,$body$byval_copy)|0);
|
|
$in_body = $52;
|
|
$53 = $2;
|
|
;HEAP32[$header$byval_copy>>2]=HEAP32[$header>>2]|0;HEAP32[$header$byval_copy+4>>2]=HEAP32[$header+4>>2]|0;HEAP32[$header$byval_copy+8>>2]=HEAP32[$header+8>>2]|0;HEAP32[$header$byval_copy+12>>2]=HEAP32[$header+12>>2]|0;
|
|
$54 = (_nk_input_is_mouse_click_in_rect($53,0,$header$byval_copy)|0);
|
|
$in_header = $54;
|
|
$55 = $clicked;
|
|
$56 = ($55|0)==(0);
|
|
$57 = $in_body;
|
|
$58 = ($57|0)!=(0);
|
|
$or$cond = $56 | $58;
|
|
$59 = $in_header;
|
|
$60 = ($59|0)!=(0);
|
|
$or$cond3 = $or$cond | $60;
|
|
if (!($or$cond3)) {
|
|
$is_active = 0;
|
|
}
|
|
} else {
|
|
$42 = (_nk_create_window($41)|0);
|
|
$popup = $42;
|
|
$43 = $popup;
|
|
$44 = $win;
|
|
$45 = ((($44)) + 172|0);
|
|
HEAP32[$45>>2] = $43;
|
|
$46 = $popup;
|
|
$47 = ((($46)) + 32|0);
|
|
$48 = $2;
|
|
$49 = ((($48)) + 5596|0);
|
|
_nk_command_buffer_init($47,$49,1);
|
|
}
|
|
$61 = $is_active;
|
|
$62 = ($61|0)!=(0);
|
|
if ($62) {
|
|
$69 = $popup;
|
|
$70 = ((($69)) + 12|0);
|
|
;HEAP32[$70>>2]=HEAP32[$body>>2]|0;HEAP32[$70+4>>2]=HEAP32[$body+4>>2]|0;HEAP32[$70+8>>2]=HEAP32[$body+8>>2]|0;HEAP32[$70+12>>2]=HEAP32[$body+12>>2]|0;
|
|
$71 = $win;
|
|
$72 = $popup;
|
|
$73 = ((($72)) + 272|0);
|
|
HEAP32[$73>>2] = $71;
|
|
$74 = $1;
|
|
$75 = $popup;
|
|
$76 = ((($75)) + 72|0);
|
|
HEAP32[$76>>2] = $74;
|
|
$77 = $3;
|
|
$78 = $popup;
|
|
$79 = ((($78)) + 8|0);
|
|
HEAP32[$79>>2] = $77;
|
|
$80 = $popup;
|
|
$81 = ((($80)) + 8|0);
|
|
$82 = HEAP32[$81>>2]|0;
|
|
$83 = $82 | 32769;
|
|
HEAP32[$81>>2] = $83;
|
|
$84 = $popup;
|
|
$85 = ((($84)) + 8|0);
|
|
$86 = HEAP32[$85>>2]|0;
|
|
$87 = $86 | 8256;
|
|
HEAP32[$85>>2] = $87;
|
|
$88 = $popup;
|
|
$89 = ((($88)) + 8|0);
|
|
$90 = HEAP32[$89>>2]|0;
|
|
$91 = $90 | 65536;
|
|
HEAP32[$89>>2] = $91;
|
|
$92 = $2;
|
|
$93 = ((($92)) + 11180|0);
|
|
$94 = HEAP32[$93>>2]|0;
|
|
$95 = $popup;
|
|
HEAP32[$95>>2] = $94;
|
|
$96 = $win;
|
|
$97 = ((($96)) + 172|0);
|
|
$98 = ((($97)) + 12|0);
|
|
HEAP32[$98>>2] = 1;
|
|
$99 = $2;
|
|
$100 = $win;
|
|
_nk_start_popup($99,$100);
|
|
$101 = $popup;
|
|
$102 = ((($101)) + 32|0);
|
|
$103 = $win;
|
|
$104 = ((($103)) + 32|0);
|
|
dest=$102; src=$104; stop=dest+40|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
|
|
$105 = $popup;
|
|
$106 = ((($105)) + 32|0);
|
|
;HEAP32[$nk_null_rect$byval_copy>>2]=HEAP32[8>>2]|0;HEAP32[$nk_null_rect$byval_copy+4>>2]=HEAP32[8+4>>2]|0;HEAP32[$nk_null_rect$byval_copy+8>>2]=HEAP32[8+8>>2]|0;HEAP32[$nk_null_rect$byval_copy+12>>2]=HEAP32[8+12>>2]|0;
|
|
_nk_push_scissor($106,$nk_null_rect$byval_copy);
|
|
$107 = $popup;
|
|
$108 = $2;
|
|
$109 = ((($108)) + 11168|0);
|
|
HEAP32[$109>>2] = $107;
|
|
$110 = $2;
|
|
(_nk_panel_begin($110,0)|0);
|
|
$111 = $win;
|
|
$112 = ((($111)) + 32|0);
|
|
$113 = $popup;
|
|
$114 = ((($113)) + 32|0);
|
|
dest=$112; src=$114; stop=dest+40|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
|
|
$115 = $win;
|
|
$116 = ((($115)) + 72|0);
|
|
$117 = HEAP32[$116>>2]|0;
|
|
$118 = HEAP32[$117>>2]|0;
|
|
$119 = $118 | 1024;
|
|
HEAP32[$117>>2] = $119;
|
|
$120 = $popup;
|
|
$121 = ((($120)) + 28|0);
|
|
$122 = $1;
|
|
$123 = ((($122)) + 20|0);
|
|
HEAP32[$123>>2] = $121;
|
|
$124 = $is_active;
|
|
$0 = $124;
|
|
$125 = $0;
|
|
STACKTOP = sp;return ($125|0);
|
|
} else {
|
|
$63 = $win;
|
|
$64 = ((($63)) + 72|0);
|
|
$65 = HEAP32[$64>>2]|0;
|
|
$66 = HEAP32[$65>>2]|0;
|
|
$67 = $66 | 2097152;
|
|
HEAP32[$65>>2] = $67;
|
|
$68 = $is_active;
|
|
$0 = $68;
|
|
$125 = $0;
|
|
STACKTOP = sp;return ($125|0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$125 = $0;
|
|
STACKTOP = sp;return ($125|0);
|
|
}
|
|
function _nk_contextual_end($ctx) {
|
|
$ctx = $ctx|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
|
|
var $9 = 0, $popup = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((14913|0),(13400|0),18888,(28731|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ((($3)) + 11168|0);
|
|
$5 = HEAP32[$4>>2]|0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((28537|0),(13400|0),18889,(28731|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $0;
|
|
$8 = ((($7)) + 11168|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$popup = $9;
|
|
$10 = $popup;
|
|
$11 = ((($10)) + 272|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ($12|0)!=(0|0);
|
|
if (!($13)) {
|
|
___assert_fail((28704|0),(13400|0),18891,(28731|0));
|
|
// unreachable;
|
|
}
|
|
$14 = $popup;
|
|
$15 = ((($14)) + 8|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = $16 & 2048;
|
|
$18 = ($17|0)!=(0);
|
|
if (!($18)) {
|
|
$20 = $0;
|
|
_nk_popup_end($20);
|
|
STACKTOP = sp;return;
|
|
}
|
|
$19 = $popup;
|
|
HEAP32[$19>>2] = 0;
|
|
$20 = $0;
|
|
_nk_popup_end($20);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_button_behavior($state,$r,$i,$behavior) {
|
|
$state = $state|0;
|
|
$r = $r|0;
|
|
$i = $i|0;
|
|
$behavior = $behavior|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $r$byval_copy = 0, $r$byval_copy1 = 0, $r$byval_copy2 = 0, $r$byval_copy3 = 0, $ret = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$r$byval_copy3 = sp + 72|0;
|
|
$r$byval_copy2 = sp + 56|0;
|
|
$r$byval_copy1 = sp + 40|0;
|
|
$r$byval_copy = sp + 24|0;
|
|
$1 = $state;
|
|
$2 = $i;
|
|
$3 = $behavior;
|
|
$ret = 0;
|
|
$4 = $1;
|
|
$5 = HEAP32[$4>>2]|0;
|
|
$6 = $5 & 2;
|
|
$7 = ($6|0)!=(0);
|
|
$8 = $1;
|
|
if ($7) {
|
|
HEAP32[$8>>2] = 6;
|
|
} else {
|
|
HEAP32[$8>>2] = 4;
|
|
}
|
|
$9 = $2;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
$0 = 0;
|
|
$45 = $0;
|
|
STACKTOP = sp;return ($45|0);
|
|
}
|
|
$11 = $2;
|
|
;HEAP32[$r$byval_copy>>2]=HEAP32[$r>>2]|0;HEAP32[$r$byval_copy+4>>2]=HEAP32[$r+4>>2]|0;HEAP32[$r$byval_copy+8>>2]=HEAP32[$r+8>>2]|0;HEAP32[$r$byval_copy+12>>2]=HEAP32[$r+12>>2]|0;
|
|
$12 = (_nk_input_is_mouse_hovering_rect($11,$r$byval_copy)|0);
|
|
$13 = ($12|0)!=(0);
|
|
if ($13) {
|
|
$14 = $1;
|
|
HEAP32[$14>>2] = 18;
|
|
$15 = $2;
|
|
$16 = (_nk_input_is_mouse_down($15,0)|0);
|
|
$17 = ($16|0)!=(0);
|
|
if ($17) {
|
|
$18 = $1;
|
|
HEAP32[$18>>2] = 34;
|
|
}
|
|
$19 = $2;
|
|
;HEAP32[$r$byval_copy1>>2]=HEAP32[$r>>2]|0;HEAP32[$r$byval_copy1+4>>2]=HEAP32[$r+4>>2]|0;HEAP32[$r$byval_copy1+8>>2]=HEAP32[$r+8>>2]|0;HEAP32[$r$byval_copy1+12>>2]=HEAP32[$r+12>>2]|0;
|
|
$20 = (_nk_input_has_mouse_click_in_rect($19,0,$r$byval_copy1)|0);
|
|
$21 = ($20|0)!=(0);
|
|
if ($21) {
|
|
$22 = $3;
|
|
$23 = ($22|0)!=(0);
|
|
$24 = $2;
|
|
if ($23) {
|
|
$25 = (_nk_input_is_mouse_down($24,0)|0);
|
|
$27 = $25;
|
|
} else {
|
|
$26 = (_nk_input_is_mouse_pressed($24,0)|0);
|
|
$27 = $26;
|
|
}
|
|
$ret = $27;
|
|
}
|
|
}
|
|
$28 = $1;
|
|
$29 = HEAP32[$28>>2]|0;
|
|
$30 = $29 & 16;
|
|
$31 = ($30|0)!=(0);
|
|
if ($31) {
|
|
$32 = $2;
|
|
;HEAP32[$r$byval_copy2>>2]=HEAP32[$r>>2]|0;HEAP32[$r$byval_copy2+4>>2]=HEAP32[$r+4>>2]|0;HEAP32[$r$byval_copy2+8>>2]=HEAP32[$r+8>>2]|0;HEAP32[$r$byval_copy2+12>>2]=HEAP32[$r+12>>2]|0;
|
|
$33 = (_nk_input_is_mouse_prev_hovering_rect($32,$r$byval_copy2)|0);
|
|
$34 = ($33|0)!=(0);
|
|
if ($34) {
|
|
label = 17;
|
|
} else {
|
|
$35 = $1;
|
|
$36 = HEAP32[$35>>2]|0;
|
|
$37 = $36 | 8;
|
|
HEAP32[$35>>2] = $37;
|
|
}
|
|
} else {
|
|
label = 17;
|
|
}
|
|
if ((label|0) == 17) {
|
|
$38 = $2;
|
|
;HEAP32[$r$byval_copy3>>2]=HEAP32[$r>>2]|0;HEAP32[$r$byval_copy3+4>>2]=HEAP32[$r+4>>2]|0;HEAP32[$r$byval_copy3+8>>2]=HEAP32[$r+8>>2]|0;HEAP32[$r$byval_copy3+12>>2]=HEAP32[$r+12>>2]|0;
|
|
$39 = (_nk_input_is_mouse_prev_hovering_rect($38,$r$byval_copy3)|0);
|
|
$40 = ($39|0)!=(0);
|
|
if ($40) {
|
|
$41 = $1;
|
|
$42 = HEAP32[$41>>2]|0;
|
|
$43 = $42 | 64;
|
|
HEAP32[$41>>2] = $43;
|
|
}
|
|
}
|
|
$44 = $ret;
|
|
$0 = $44;
|
|
$45 = $0;
|
|
STACKTOP = sp;return ($45|0);
|
|
}
|
|
function _nk_draw_button_symbol($out,$bounds,$content,$state,$style,$type,$font) {
|
|
$out = $out|0;
|
|
$bounds = $bounds|0;
|
|
$content = $content|0;
|
|
$state = $state|0;
|
|
$style = $style|0;
|
|
$type = $type|0;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $background = 0, $bg = 0, $bg$byval_copy = 0, $sym = 0, $sym$byval_copy = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$sym$byval_copy = sp + 60|0;
|
|
$bg$byval_copy = sp + 56|0;
|
|
$$byval_copy = sp + 32|0;
|
|
$sym = sp + 52|0;
|
|
$bg = sp + 48|0;
|
|
$0 = $out;
|
|
$1 = $bounds;
|
|
$2 = $content;
|
|
$3 = $state;
|
|
$4 = $style;
|
|
$5 = $type;
|
|
$6 = $font;
|
|
$7 = $0;
|
|
$8 = $1;
|
|
$9 = $3;
|
|
$10 = $4;
|
|
$11 = (_nk_draw_button($7,$8,$9,$10)|0);
|
|
$background = $11;
|
|
$12 = $background;
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ($13|0)==(0);
|
|
if ($14) {
|
|
$15 = $background;
|
|
$16 = ((($15)) + 4|0);
|
|
;HEAP8[$bg>>0]=HEAP8[$16>>0]|0;HEAP8[$bg+1>>0]=HEAP8[$16+1>>0]|0;HEAP8[$bg+2>>0]=HEAP8[$16+2>>0]|0;HEAP8[$bg+3>>0]=HEAP8[$16+3>>0]|0;
|
|
} else {
|
|
$17 = $4;
|
|
$18 = ((($17)) + 64|0);
|
|
;HEAP8[$bg>>0]=HEAP8[$18>>0]|0;HEAP8[$bg+1>>0]=HEAP8[$18+1>>0]|0;HEAP8[$bg+2>>0]=HEAP8[$18+2>>0]|0;HEAP8[$bg+3>>0]=HEAP8[$18+3>>0]|0;
|
|
}
|
|
$19 = $3;
|
|
$20 = $19 & 16;
|
|
$21 = ($20|0)!=(0);
|
|
do {
|
|
if ($21) {
|
|
$22 = $4;
|
|
$23 = ((($22)) + 72|0);
|
|
;HEAP8[$sym>>0]=HEAP8[$23>>0]|0;HEAP8[$sym+1>>0]=HEAP8[$23+1>>0]|0;HEAP8[$sym+2>>0]=HEAP8[$23+2>>0]|0;HEAP8[$sym+3>>0]=HEAP8[$23+3>>0]|0;
|
|
} else {
|
|
$24 = $3;
|
|
$25 = $24 & 32;
|
|
$26 = ($25|0)!=(0);
|
|
$27 = $4;
|
|
if ($26) {
|
|
$28 = ((($27)) + 76|0);
|
|
;HEAP8[$sym>>0]=HEAP8[$28>>0]|0;HEAP8[$sym+1>>0]=HEAP8[$28+1>>0]|0;HEAP8[$sym+2>>0]=HEAP8[$28+2>>0]|0;HEAP8[$sym+3>>0]=HEAP8[$28+3>>0]|0;
|
|
break;
|
|
} else {
|
|
$29 = ((($27)) + 68|0);
|
|
;HEAP8[$sym>>0]=HEAP8[$29>>0]|0;HEAP8[$sym+1>>0]=HEAP8[$29+1>>0]|0;HEAP8[$sym+2>>0]=HEAP8[$29+2>>0]|0;HEAP8[$sym+3>>0]=HEAP8[$29+3>>0]|0;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$30 = $0;
|
|
$31 = $5;
|
|
$32 = $2;
|
|
$33 = $6;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$32>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$32+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$32+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$32+12>>2]|0;
|
|
;HEAP8[$bg$byval_copy>>0]=HEAP8[$bg>>0]|0;HEAP8[$bg$byval_copy+1>>0]=HEAP8[$bg+1>>0]|0;HEAP8[$bg$byval_copy+2>>0]=HEAP8[$bg+2>>0]|0;HEAP8[$bg$byval_copy+3>>0]=HEAP8[$bg+3>>0]|0;
|
|
;HEAP8[$sym$byval_copy>>0]=HEAP8[$sym>>0]|0;HEAP8[$sym$byval_copy+1>>0]=HEAP8[$sym+1>>0]|0;HEAP8[$sym$byval_copy+2>>0]=HEAP8[$sym+2>>0]|0;HEAP8[$sym$byval_copy+3>>0]=HEAP8[$sym+3>>0]|0;
|
|
_nk_draw_symbol($30,$31,$$byval_copy,$bg$byval_copy,$sym$byval_copy,1.0,$33);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_combo_begin($layout,$ctx,$win,$height,$is_clicked,$header) {
|
|
$layout = $layout|0;
|
|
$ctx = $ctx|0;
|
|
$win = $win|0;
|
|
$height = $height|0;
|
|
$is_clicked = $is_clicked|0;
|
|
$header = $header|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0;
|
|
var $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0;
|
|
var $36 = 0.0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0;
|
|
var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0;
|
|
var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0;
|
|
var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $body = 0, $body$byval_copy = 0, $hash = 0, $is_active = 0, $is_open = 0, $or$cond = 0, $or$cond$not = 0, $or$cond11 = 0, $or$cond3 = 0, $or$cond5 = 0;
|
|
var $or$cond7 = 0, $or$cond9 = 0, $popup = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 96|0;
|
|
$body$byval_copy = sp + 80|0;
|
|
$body = sp + 24|0;
|
|
$6 = sp;
|
|
$1 = $layout;
|
|
$2 = $ctx;
|
|
$3 = $win;
|
|
$4 = $height;
|
|
$5 = $is_clicked;
|
|
$is_open = 0;
|
|
$is_active = 0;
|
|
$7 = $2;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
___assert_fail((14913|0),(13400|0),18912,(31992|0));
|
|
// unreachable;
|
|
}
|
|
$9 = $2;
|
|
$10 = ((($9)) + 11168|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = ($11|0)!=(0|0);
|
|
if (!($12)) {
|
|
___assert_fail((28537|0),(13400|0),18913,(31992|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $2;
|
|
$14 = ((($13)) + 11168|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ((($15)) + 72|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = ($17|0)!=(0|0);
|
|
if (!($18)) {
|
|
___assert_fail((28516|0),(13400|0),18914,(31992|0));
|
|
// unreachable;
|
|
}
|
|
$19 = $2;
|
|
$20 = ($19|0)!=(0|0);
|
|
if ($20) {
|
|
$21 = $2;
|
|
$22 = ((($21)) + 11168|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$24 = ($23|0)!=(0|0);
|
|
if ($24) {
|
|
$25 = $2;
|
|
$26 = ((($25)) + 11168|0);
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = ((($27)) + 72|0);
|
|
$29 = HEAP32[$28>>2]|0;
|
|
$30 = ($29|0)!=(0|0);
|
|
if ($30) {
|
|
$31 = $3;
|
|
$32 = ((($31)) + 172|0);
|
|
$33 = HEAP32[$32>>2]|0;
|
|
$popup = $33;
|
|
$34 = +HEAPF32[$header>>2];
|
|
HEAPF32[$body>>2] = $34;
|
|
$35 = ((($header)) + 8|0);
|
|
$36 = +HEAPF32[$35>>2];
|
|
$37 = ((($body)) + 8|0);
|
|
HEAPF32[$37>>2] = $36;
|
|
$38 = ((($header)) + 4|0);
|
|
$39 = +HEAPF32[$38>>2];
|
|
$40 = ((($header)) + 12|0);
|
|
$41 = +HEAPF32[$40>>2];
|
|
$42 = $39 + $41;
|
|
$43 = $42 - 1.0;
|
|
$44 = ((($body)) + 4|0);
|
|
HEAPF32[$44>>2] = $43;
|
|
$45 = $4;
|
|
$46 = (+($45|0));
|
|
$47 = ((($body)) + 12|0);
|
|
HEAPF32[$47>>2] = $46;
|
|
$48 = $3;
|
|
$49 = ((($48)) + 172|0);
|
|
$50 = ((($49)) + 16|0);
|
|
$51 = HEAP32[$50>>2]|0;
|
|
$52 = (($51) + 1)|0;
|
|
HEAP32[$50>>2] = $52;
|
|
$hash = $51;
|
|
$53 = $popup;
|
|
$54 = ($53|0)!=(0|0);
|
|
if ($54) {
|
|
$55 = $popup;
|
|
$56 = ((($55)) + 8|0);
|
|
$57 = HEAP32[$56>>2]|0;
|
|
$58 = $57 & 262144;
|
|
$59 = ($58|0)!=(0);
|
|
$61 = $59;
|
|
} else {
|
|
$61 = 0;
|
|
}
|
|
$60 = $61&1;
|
|
$is_open = $60;
|
|
$62 = $popup;
|
|
$63 = ($62|0)!=(0|0);
|
|
if ($63) {
|
|
$64 = $3;
|
|
$65 = ((($64)) + 172|0);
|
|
$66 = ((($65)) + 8|0);
|
|
$67 = HEAP32[$66>>2]|0;
|
|
$68 = $hash;
|
|
$69 = ($67|0)==($68|0);
|
|
if ($69) {
|
|
$70 = $3;
|
|
$71 = ((($70)) + 172|0);
|
|
$72 = ((($71)) + 4|0);
|
|
$73 = HEAP32[$72>>2]|0;
|
|
$74 = ($73|0)==(262144);
|
|
$76 = $74;
|
|
} else {
|
|
$76 = 0;
|
|
}
|
|
} else {
|
|
$76 = 0;
|
|
}
|
|
$75 = $76&1;
|
|
$is_active = $75;
|
|
$77 = $5;
|
|
$78 = ($77|0)!=(0);
|
|
$79 = $is_open;
|
|
$80 = ($79|0)!=(0);
|
|
$or$cond = $78 & $80;
|
|
$or$cond$not = $or$cond ^ 1;
|
|
$81 = $is_active;
|
|
$82 = ($81|0)!=(0);
|
|
$or$cond3 = $or$cond$not | $82;
|
|
if ($or$cond3) {
|
|
$83 = $is_open;
|
|
$84 = ($83|0)==(0);
|
|
$85 = $is_active;
|
|
$86 = ($85|0)!=(0);
|
|
$or$cond5 = $84 | $86;
|
|
if ($or$cond5) {
|
|
$87 = $is_open;
|
|
$88 = ($87|0)!=(0);
|
|
$89 = $is_active;
|
|
$90 = ($89|0)!=(0);
|
|
$or$cond7 = $88 | $90;
|
|
$91 = $5;
|
|
$92 = ($91|0)!=(0);
|
|
$or$cond9 = $or$cond7 | $92;
|
|
if ($or$cond9) {
|
|
$93 = $1;
|
|
$94 = $2;
|
|
$95 = $5;
|
|
$96 = ($95|0)!=(0);
|
|
$97 = $is_open;
|
|
$98 = ($97|0)!=(0);
|
|
$or$cond11 = $96 & $98;
|
|
if ($or$cond11) {
|
|
_nk_rect($6,0.0,0.0,0.0,0.0);
|
|
} else {
|
|
;HEAP32[$6>>2]=HEAP32[$header>>2]|0;HEAP32[$6+4>>2]=HEAP32[$header+4>>2]|0;HEAP32[$6+8>>2]=HEAP32[$header+8>>2]|0;HEAP32[$6+12>>2]=HEAP32[$header+12>>2]|0;
|
|
}
|
|
;HEAP32[$body$byval_copy>>2]=HEAP32[$body>>2]|0;HEAP32[$body$byval_copy+4>>2]=HEAP32[$body+4>>2]|0;HEAP32[$body$byval_copy+8>>2]=HEAP32[$body+8>>2]|0;HEAP32[$body$byval_copy+12>>2]=HEAP32[$body+12>>2]|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$6+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$6+12>>2]|0;
|
|
$99 = (_nk_nonblock_begin($93,$94,262144,$body$byval_copy,$$byval_copy)|0);
|
|
$100 = ($99|0)!=(0);
|
|
if ($100) {
|
|
$101 = $3;
|
|
$102 = ((($101)) + 172|0);
|
|
$103 = ((($102)) + 4|0);
|
|
HEAP32[$103>>2] = 262144;
|
|
$104 = $hash;
|
|
$105 = $3;
|
|
$106 = ((($105)) + 172|0);
|
|
$107 = ((($106)) + 8|0);
|
|
HEAP32[$107>>2] = $104;
|
|
$0 = 1;
|
|
$108 = $0;
|
|
STACKTOP = sp;return ($108|0);
|
|
} else {
|
|
$0 = 0;
|
|
$108 = $0;
|
|
STACKTOP = sp;return ($108|0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$108 = $0;
|
|
STACKTOP = sp;return ($108|0);
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$108 = $0;
|
|
STACKTOP = sp;return ($108|0);
|
|
}
|
|
function _nk_combo_begin_color($ctx,$layout,$color,$height) {
|
|
$ctx = $ctx|0;
|
|
$layout = $layout|0;
|
|
$color = $color|0;
|
|
$height = $height|0;
|
|
var $$byval_copy = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0.0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0, $112 = 0.0;
|
|
var $113 = 0.0, $114 = 0, $115 = 0.0, $116 = 0.0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0, $123 = 0.0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0;
|
|
var $131 = 0, $132 = 0.0, $133 = 0, $134 = 0.0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0, $142 = 0.0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0.0, $149 = 0.0;
|
|
var $15 = 0, $150 = 0, $151 = 0, $152 = 0.0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0.0, $158 = 0.0, $159 = 0.0, $16 = 0, $160 = 0, $161 = 0, $162 = 0.0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0;
|
|
var $168 = 0.0, $169 = 0.0, $17 = 0, $170 = 0.0, $171 = 0, $172 = 0, $173 = 0.0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0.0, $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0, $182 = 0, $183 = 0.0, $184 = 0, $185 = 0;
|
|
var $186 = 0, $187 = 0, $188 = 0.0, $189 = 0.0, $19 = 0, $190 = 0.0, $191 = 0, $192 = 0.0, $193 = 0, $194 = 0, $195 = 0, $196 = 0.0, $197 = 0.0, $198 = 0.0, $199 = 0.0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0;
|
|
var $203 = 0.0, $204 = 0, $205 = 0, $206 = 0, $207 = 0.0, $208 = 0.0, $209 = 0.0, $21 = 0, $210 = 0.0, $211 = 0.0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0;
|
|
var $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0;
|
|
var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0;
|
|
var $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0;
|
|
var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0;
|
|
var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $background = 0, $bounds = 0, $bounds$byval_copy = 0, $button = 0;
|
|
var $color$byval_copy = 0, $content = 0, $header = 0, $header$byval_copy = 0, $header$byval_copy2 = 0, $header$byval_copy3 = 0, $header$byval_copy4 = 0, $header$byval_copy7 = 0, $in = 0, $is_clicked = 0, $or$cond = 0, $s = 0, $style = 0, $sym = 0, $win = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 272|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$header$byval_copy7 = sp + 232|0;
|
|
$color$byval_copy = sp + 256|0;
|
|
$bounds$byval_copy = sp + 216|0;
|
|
$$byval_copy6 = sp + 252|0;
|
|
$$byval_copy5 = sp + 200|0;
|
|
$header$byval_copy4 = sp + 184|0;
|
|
$$byval_copy = sp + 248|0;
|
|
$header$byval_copy3 = sp + 168|0;
|
|
$header$byval_copy2 = sp + 152|0;
|
|
$header$byval_copy = sp + 136|0;
|
|
$header = sp + 88|0;
|
|
$4 = sp + 56|0;
|
|
$content = sp + 40|0;
|
|
$button = sp + 24|0;
|
|
$bounds = sp + 8|0;
|
|
$1 = $ctx;
|
|
$2 = $layout;
|
|
$3 = $height;
|
|
$is_clicked = 0;
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0|0);
|
|
if (!($6)) {
|
|
___assert_fail((14913|0),(13400|0),19046,(28749|0));
|
|
// unreachable;
|
|
}
|
|
$7 = $1;
|
|
$8 = ((($7)) + 11168|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ($9|0)!=(0|0);
|
|
if (!($10)) {
|
|
___assert_fail((28537|0),(13400|0),19047,(28749|0));
|
|
// unreachable;
|
|
}
|
|
$11 = $1;
|
|
$12 = ((($11)) + 11168|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ((($13)) + 72|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($15|0)!=(0|0);
|
|
if (!($16)) {
|
|
___assert_fail((28516|0),(13400|0),19048,(28749|0));
|
|
// unreachable;
|
|
}
|
|
$17 = $1;
|
|
$18 = ($17|0)!=(0|0);
|
|
if ($18) {
|
|
$19 = $1;
|
|
$20 = ((($19)) + 11168|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
$22 = ($21|0)!=(0|0);
|
|
if ($22) {
|
|
$23 = $1;
|
|
$24 = ((($23)) + 11168|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = ((($25)) + 72|0);
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = ($27|0)!=(0|0);
|
|
if ($28) {
|
|
$29 = $1;
|
|
$30 = ((($29)) + 11168|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$win = $31;
|
|
$32 = $1;
|
|
$33 = ((($32)) + 300|0);
|
|
$style = $33;
|
|
$34 = $1;
|
|
$35 = (_nk_widget($header,$34)|0);
|
|
$s = $35;
|
|
$36 = $s;
|
|
$37 = ($36|0)==(0);
|
|
if ($37) {
|
|
$0 = 0;
|
|
$232 = $0;
|
|
STACKTOP = sp;return ($232|0);
|
|
}
|
|
$38 = $win;
|
|
$39 = ((($38)) + 72|0);
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$41 = HEAP32[$40>>2]|0;
|
|
$42 = $41 & 1024;
|
|
$43 = ($42|0)!=(0);
|
|
$44 = $s;
|
|
$45 = ($44|0)==(2);
|
|
$or$cond = $43 | $45;
|
|
$46 = $1;
|
|
$47 = $or$cond ? 0 : $46;
|
|
$in = $47;
|
|
$48 = $1;
|
|
$49 = ((($48)) + 5668|0);
|
|
$50 = $in;
|
|
;HEAP32[$header$byval_copy>>2]=HEAP32[$header>>2]|0;HEAP32[$header$byval_copy+4>>2]=HEAP32[$header+4>>2]|0;HEAP32[$header$byval_copy+8>>2]=HEAP32[$header+8>>2]|0;HEAP32[$header$byval_copy+12>>2]=HEAP32[$header+12>>2]|0;
|
|
$51 = (_nk_button_behavior($49,$header$byval_copy,$50,0)|0);
|
|
$52 = ($51|0)!=(0);
|
|
if ($52) {
|
|
$is_clicked = 1;
|
|
}
|
|
$53 = $1;
|
|
$54 = ((($53)) + 5668|0);
|
|
$55 = HEAP32[$54>>2]|0;
|
|
$56 = $55 & 32;
|
|
$57 = ($56|0)!=(0);
|
|
do {
|
|
if ($57) {
|
|
$58 = $style;
|
|
$59 = ((($58)) + 4524|0);
|
|
$60 = ((($59)) + 40|0);
|
|
$background = $60;
|
|
} else {
|
|
$61 = $1;
|
|
$62 = ((($61)) + 5668|0);
|
|
$63 = HEAP32[$62>>2]|0;
|
|
$64 = $63 & 16;
|
|
$65 = ($64|0)!=(0);
|
|
$66 = $style;
|
|
$67 = ((($66)) + 4524|0);
|
|
if ($65) {
|
|
$68 = ((($67)) + 20|0);
|
|
$background = $68;
|
|
break;
|
|
} else {
|
|
$background = $67;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$69 = $background;
|
|
$70 = HEAP32[$69>>2]|0;
|
|
$71 = ($70|0)==(1);
|
|
$72 = $win;
|
|
$73 = ((($72)) + 32|0);
|
|
if ($71) {
|
|
$74 = $background;
|
|
$75 = ((($74)) + 4|0);
|
|
;HEAP32[$header$byval_copy2>>2]=HEAP32[$header>>2]|0;HEAP32[$header$byval_copy2+4>>2]=HEAP32[$header+4>>2]|0;HEAP32[$header$byval_copy2+8>>2]=HEAP32[$header+8>>2]|0;HEAP32[$header$byval_copy2+12>>2]=HEAP32[$header+12>>2]|0;
|
|
_nk_draw_image($73,$header$byval_copy2,$75);
|
|
} else {
|
|
$76 = $style;
|
|
$77 = ((($76)) + 4524|0);
|
|
$78 = ((($77)) + 60|0);
|
|
;HEAP32[$header$byval_copy3>>2]=HEAP32[$header>>2]|0;HEAP32[$header$byval_copy3+4>>2]=HEAP32[$header+4>>2]|0;HEAP32[$header$byval_copy3+8>>2]=HEAP32[$header+8>>2]|0;HEAP32[$header$byval_copy3+12>>2]=HEAP32[$header+12>>2]|0;
|
|
;HEAP8[$$byval_copy>>0]=HEAP8[$78>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$78+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$78+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$78+3>>0]|0;
|
|
_nk_fill_rect($73,$header$byval_copy3,0.0,$$byval_copy);
|
|
$79 = $win;
|
|
$80 = ((($79)) + 32|0);
|
|
;HEAP32[$header$byval_copy4>>2]=HEAP32[$header>>2]|0;HEAP32[$header$byval_copy4+4>>2]=HEAP32[$header+4>>2]|0;HEAP32[$header$byval_copy4+8>>2]=HEAP32[$header+8>>2]|0;HEAP32[$header$byval_copy4+12>>2]=HEAP32[$header+12>>2]|0;
|
|
_nk_shrink_rect($4,$header$byval_copy4,1.0);
|
|
$81 = $background;
|
|
$82 = ((($81)) + 4|0);
|
|
;HEAP32[$$byval_copy5>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$4+8>>2]|0;HEAP32[$$byval_copy5+12>>2]=HEAP32[$4+12>>2]|0;
|
|
;HEAP8[$$byval_copy6>>0]=HEAP8[$82>>0]|0;HEAP8[$$byval_copy6+1>>0]=HEAP8[$82+1>>0]|0;HEAP8[$$byval_copy6+2>>0]=HEAP8[$82+2>>0]|0;HEAP8[$$byval_copy6+3>>0]=HEAP8[$82+3>>0]|0;
|
|
_nk_fill_rect($80,$$byval_copy5,0.0,$$byval_copy6);
|
|
}
|
|
$83 = $1;
|
|
$84 = ((($83)) + 5668|0);
|
|
$85 = HEAP32[$84>>2]|0;
|
|
$86 = $85 & 16;
|
|
$87 = ($86|0)!=(0);
|
|
do {
|
|
if ($87) {
|
|
$88 = $style;
|
|
$89 = ((($88)) + 4524|0);
|
|
$90 = ((($89)) + 220|0);
|
|
$91 = HEAP32[$90>>2]|0;
|
|
$sym = $91;
|
|
} else {
|
|
$92 = $is_clicked;
|
|
$93 = ($92|0)!=(0);
|
|
$94 = $style;
|
|
$95 = ((($94)) + 4524|0);
|
|
if ($93) {
|
|
$96 = ((($95)) + 224|0);
|
|
$97 = HEAP32[$96>>2]|0;
|
|
$sym = $97;
|
|
break;
|
|
} else {
|
|
$98 = ((($95)) + 216|0);
|
|
$99 = HEAP32[$98>>2]|0;
|
|
$sym = $99;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$100 = ((($header)) + 12|0);
|
|
$101 = +HEAPF32[$100>>2];
|
|
$102 = $style;
|
|
$103 = ((($102)) + 4524|0);
|
|
$104 = ((($103)) + 244|0);
|
|
$105 = ((($104)) + 4|0);
|
|
$106 = +HEAPF32[$105>>2];
|
|
$107 = 2.0 * $106;
|
|
$108 = $101 - $107;
|
|
$109 = ((($button)) + 8|0);
|
|
HEAPF32[$109>>2] = $108;
|
|
$110 = +HEAPF32[$header>>2];
|
|
$111 = ((($header)) + 8|0);
|
|
$112 = +HEAPF32[$111>>2];
|
|
$113 = $110 + $112;
|
|
$114 = ((($header)) + 12|0);
|
|
$115 = +HEAPF32[$114>>2];
|
|
$116 = $113 - $115;
|
|
$117 = $style;
|
|
$118 = ((($117)) + 4524|0);
|
|
$119 = ((($118)) + 244|0);
|
|
$120 = +HEAPF32[$119>>2];
|
|
$121 = $116 - $120;
|
|
HEAPF32[$button>>2] = $121;
|
|
$122 = ((($header)) + 4|0);
|
|
$123 = +HEAPF32[$122>>2];
|
|
$124 = $style;
|
|
$125 = ((($124)) + 4524|0);
|
|
$126 = ((($125)) + 244|0);
|
|
$127 = ((($126)) + 4|0);
|
|
$128 = +HEAPF32[$127>>2];
|
|
$129 = $123 + $128;
|
|
$130 = ((($button)) + 4|0);
|
|
HEAPF32[$130>>2] = $129;
|
|
$131 = ((($button)) + 8|0);
|
|
$132 = +HEAPF32[$131>>2];
|
|
$133 = ((($button)) + 12|0);
|
|
HEAPF32[$133>>2] = $132;
|
|
$134 = +HEAPF32[$button>>2];
|
|
$135 = $style;
|
|
$136 = ((($135)) + 4524|0);
|
|
$137 = ((($136)) + 88|0);
|
|
$138 = ((($137)) + 92|0);
|
|
$139 = +HEAPF32[$138>>2];
|
|
$140 = $134 + $139;
|
|
HEAPF32[$content>>2] = $140;
|
|
$141 = ((($button)) + 4|0);
|
|
$142 = +HEAPF32[$141>>2];
|
|
$143 = $style;
|
|
$144 = ((($143)) + 4524|0);
|
|
$145 = ((($144)) + 88|0);
|
|
$146 = ((($145)) + 92|0);
|
|
$147 = ((($146)) + 4|0);
|
|
$148 = +HEAPF32[$147>>2];
|
|
$149 = $142 + $148;
|
|
$150 = ((($content)) + 4|0);
|
|
HEAPF32[$150>>2] = $149;
|
|
$151 = ((($button)) + 8|0);
|
|
$152 = +HEAPF32[$151>>2];
|
|
$153 = $style;
|
|
$154 = ((($153)) + 4524|0);
|
|
$155 = ((($154)) + 88|0);
|
|
$156 = ((($155)) + 92|0);
|
|
$157 = +HEAPF32[$156>>2];
|
|
$158 = 2.0 * $157;
|
|
$159 = $152 - $158;
|
|
$160 = ((($content)) + 8|0);
|
|
HEAPF32[$160>>2] = $159;
|
|
$161 = ((($button)) + 12|0);
|
|
$162 = +HEAPF32[$161>>2];
|
|
$163 = $style;
|
|
$164 = ((($163)) + 4524|0);
|
|
$165 = ((($164)) + 88|0);
|
|
$166 = ((($165)) + 92|0);
|
|
$167 = ((($166)) + 4|0);
|
|
$168 = +HEAPF32[$167>>2];
|
|
$169 = 2.0 * $168;
|
|
$170 = $162 - $169;
|
|
$171 = ((($content)) + 12|0);
|
|
HEAPF32[$171>>2] = $170;
|
|
$172 = ((($header)) + 12|0);
|
|
$173 = +HEAPF32[$172>>2];
|
|
$174 = $style;
|
|
$175 = ((($174)) + 4524|0);
|
|
$176 = ((($175)) + 236|0);
|
|
$177 = ((($176)) + 4|0);
|
|
$178 = +HEAPF32[$177>>2];
|
|
$179 = 4.0 * $178;
|
|
$180 = $173 - $179;
|
|
$181 = ((($bounds)) + 12|0);
|
|
HEAPF32[$181>>2] = $180;
|
|
$182 = ((($header)) + 4|0);
|
|
$183 = +HEAPF32[$182>>2];
|
|
$184 = $style;
|
|
$185 = ((($184)) + 4524|0);
|
|
$186 = ((($185)) + 236|0);
|
|
$187 = ((($186)) + 4|0);
|
|
$188 = +HEAPF32[$187>>2];
|
|
$189 = 2.0 * $188;
|
|
$190 = $183 + $189;
|
|
$191 = ((($bounds)) + 4|0);
|
|
HEAPF32[$191>>2] = $190;
|
|
$192 = +HEAPF32[$header>>2];
|
|
$193 = $style;
|
|
$194 = ((($193)) + 4524|0);
|
|
$195 = ((($194)) + 236|0);
|
|
$196 = +HEAPF32[$195>>2];
|
|
$197 = 2.0 * $196;
|
|
$198 = $192 + $197;
|
|
HEAPF32[$bounds>>2] = $198;
|
|
$199 = +HEAPF32[$button>>2];
|
|
$200 = $style;
|
|
$201 = ((($200)) + 4524|0);
|
|
$202 = ((($201)) + 236|0);
|
|
$203 = +HEAPF32[$202>>2];
|
|
$204 = $style;
|
|
$205 = ((($204)) + 4524|0);
|
|
$206 = ((($205)) + 252|0);
|
|
$207 = +HEAPF32[$206>>2];
|
|
$208 = $203 + $207;
|
|
$209 = $199 - $208;
|
|
$210 = +HEAPF32[$bounds>>2];
|
|
$211 = $209 - $210;
|
|
$212 = ((($bounds)) + 8|0);
|
|
HEAPF32[$212>>2] = $211;
|
|
$213 = $win;
|
|
$214 = ((($213)) + 32|0);
|
|
;HEAP32[$bounds$byval_copy>>2]=HEAP32[$bounds>>2]|0;HEAP32[$bounds$byval_copy+4>>2]=HEAP32[$bounds+4>>2]|0;HEAP32[$bounds$byval_copy+8>>2]=HEAP32[$bounds+8>>2]|0;HEAP32[$bounds$byval_copy+12>>2]=HEAP32[$bounds+12>>2]|0;
|
|
;HEAP8[$color$byval_copy>>0]=HEAP8[$color>>0]|0;HEAP8[$color$byval_copy+1>>0]=HEAP8[$color+1>>0]|0;HEAP8[$color$byval_copy+2>>0]=HEAP8[$color+2>>0]|0;HEAP8[$color$byval_copy+3>>0]=HEAP8[$color+3>>0]|0;
|
|
_nk_fill_rect($214,$bounds$byval_copy,0.0,$color$byval_copy);
|
|
$215 = $win;
|
|
$216 = ((($215)) + 32|0);
|
|
$217 = $1;
|
|
$218 = ((($217)) + 5668|0);
|
|
$219 = HEAP32[$218>>2]|0;
|
|
$220 = $1;
|
|
$221 = ((($220)) + 300|0);
|
|
$222 = ((($221)) + 4524|0);
|
|
$223 = ((($222)) + 88|0);
|
|
$224 = $sym;
|
|
$225 = $style;
|
|
_nk_draw_button_symbol($216,$button,$content,$219,$223,$224,$225);
|
|
$226 = $2;
|
|
$227 = $1;
|
|
$228 = $win;
|
|
$229 = $3;
|
|
$230 = $is_clicked;
|
|
;HEAP32[$header$byval_copy7>>2]=HEAP32[$header>>2]|0;HEAP32[$header$byval_copy7+4>>2]=HEAP32[$header+4>>2]|0;HEAP32[$header$byval_copy7+8>>2]=HEAP32[$header+8>>2]|0;HEAP32[$header$byval_copy7+12>>2]=HEAP32[$header+12>>2]|0;
|
|
$231 = (_nk_combo_begin($226,$227,$228,$229,$230,$header$byval_copy7)|0);
|
|
$0 = $231;
|
|
$232 = $0;
|
|
STACKTOP = sp;return ($232|0);
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$232 = $0;
|
|
STACKTOP = sp;return ($232|0);
|
|
}
|
|
function _nk_draw_symbol($out,$type,$content,$background,$foreground,$border_width,$font) {
|
|
$out = $out|0;
|
|
$type = $type|0;
|
|
$content = $content|0;
|
|
$background = $background|0;
|
|
$foreground = $foreground|0;
|
|
$border_width = +$border_width;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $$byval_copy7 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
|
|
var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
|
|
var $43 = 0.0, $44 = 0, $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0.0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $X = 0, $background$byval_copy = 0;
|
|
var $background$byval_copy8 = 0, $content$byval_copy = 0, $content$byval_copy2 = 0, $content$byval_copy3 = 0, $content$byval_copy4 = 0, $content$byval_copy6 = 0, $content$byval_copy9 = 0, $foreground$byval_copy = 0, $foreground$byval_copy10 = 0, $foreground$byval_copy5 = 0, $heading = 0, $or$cond = 0, $points = 0, $text = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 272|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$foreground$byval_copy10 = sp + 256|0;
|
|
$content$byval_copy9 = sp + 224|0;
|
|
$background$byval_copy8 = sp + 252|0;
|
|
$$byval_copy7 = sp + 208|0;
|
|
$content$byval_copy6 = sp + 192|0;
|
|
$foreground$byval_copy5 = sp + 248|0;
|
|
$content$byval_copy4 = sp + 176|0;
|
|
$background$byval_copy = sp + 244|0;
|
|
$$byval_copy = sp + 160|0;
|
|
$content$byval_copy3 = sp + 144|0;
|
|
$foreground$byval_copy = sp + 240|0;
|
|
$content$byval_copy2 = sp + 128|0;
|
|
$content$byval_copy = sp + 112|0;
|
|
$text = sp + 72|0;
|
|
$4 = sp + 64|0;
|
|
$5 = sp + 48|0;
|
|
$6 = sp + 32|0;
|
|
$points = sp;
|
|
$0 = $out;
|
|
$1 = $type;
|
|
$2 = $border_width;
|
|
$3 = $font;
|
|
$7 = $1;
|
|
switch ($7|0) {
|
|
case 12: case 11: case 2: case 1: {
|
|
$8 = $1;
|
|
$9 = ($8|0)==(1);
|
|
if ($9) {
|
|
$15 = 32007;
|
|
} else {
|
|
$10 = $1;
|
|
$11 = ($10|0)==(2);
|
|
if ($11) {
|
|
$15 = 32009;
|
|
} else {
|
|
$12 = $1;
|
|
$13 = ($12|0)==(11);
|
|
$14 = $13 ? 32011 : 32013;
|
|
$15 = $14;
|
|
}
|
|
}
|
|
$X = $15;
|
|
_nk_vec2($4,0.0,0.0);
|
|
;HEAP32[$text>>2]=HEAP32[$4>>2]|0;HEAP32[$text+4>>2]=HEAP32[$4+4>>2]|0;
|
|
$16 = ((($text)) + 8|0);
|
|
;HEAP8[$16>>0]=HEAP8[$background>>0]|0;HEAP8[$16+1>>0]=HEAP8[$background+1>>0]|0;HEAP8[$16+2>>0]=HEAP8[$background+2>>0]|0;HEAP8[$16+3>>0]=HEAP8[$background+3>>0]|0;
|
|
$17 = ((($text)) + 12|0);
|
|
;HEAP8[$17>>0]=HEAP8[$foreground>>0]|0;HEAP8[$17+1>>0]=HEAP8[$foreground+1>>0]|0;HEAP8[$17+2>>0]=HEAP8[$foreground+2>>0]|0;HEAP8[$17+3>>0]=HEAP8[$foreground+3>>0]|0;
|
|
$18 = $0;
|
|
$19 = $X;
|
|
$20 = $3;
|
|
;HEAP32[$content$byval_copy>>2]=HEAP32[$content>>2]|0;HEAP32[$content$byval_copy+4>>2]=HEAP32[$content+4>>2]|0;HEAP32[$content$byval_copy+8>>2]=HEAP32[$content+8>>2]|0;HEAP32[$content$byval_copy+12>>2]=HEAP32[$content+12>>2]|0;
|
|
_nk_widget_text($18,$content$byval_copy,$19,1,$text,18,$20);
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 6: case 5: case 4: case 3: {
|
|
$21 = $1;
|
|
$22 = ($21|0)==(5);
|
|
$23 = $1;
|
|
$24 = ($23|0)==(6);
|
|
$or$cond = $22 | $24;
|
|
$25 = $0;
|
|
if ($or$cond) {
|
|
;HEAP32[$content$byval_copy2>>2]=HEAP32[$content>>2]|0;HEAP32[$content$byval_copy2+4>>2]=HEAP32[$content+4>>2]|0;HEAP32[$content$byval_copy2+8>>2]=HEAP32[$content+8>>2]|0;HEAP32[$content$byval_copy2+12>>2]=HEAP32[$content+12>>2]|0;
|
|
;HEAP8[$foreground$byval_copy>>0]=HEAP8[$foreground>>0]|0;HEAP8[$foreground$byval_copy+1>>0]=HEAP8[$foreground+1>>0]|0;HEAP8[$foreground$byval_copy+2>>0]=HEAP8[$foreground+2>>0]|0;HEAP8[$foreground$byval_copy+3>>0]=HEAP8[$foreground+3>>0]|0;
|
|
_nk_fill_rect($25,$content$byval_copy2,0.0,$foreground$byval_copy);
|
|
$26 = $1;
|
|
$27 = ($26|0)==(6);
|
|
if (!($27)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$28 = $0;
|
|
$29 = $2;
|
|
;HEAP32[$content$byval_copy3>>2]=HEAP32[$content>>2]|0;HEAP32[$content$byval_copy3+4>>2]=HEAP32[$content+4>>2]|0;HEAP32[$content$byval_copy3+8>>2]=HEAP32[$content+8>>2]|0;HEAP32[$content$byval_copy3+12>>2]=HEAP32[$content+12>>2]|0;
|
|
_nk_shrink_rect($5,$content$byval_copy3,$29);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$5+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$5+12>>2]|0;
|
|
;HEAP8[$background$byval_copy>>0]=HEAP8[$background>>0]|0;HEAP8[$background$byval_copy+1>>0]=HEAP8[$background+1>>0]|0;HEAP8[$background$byval_copy+2>>0]=HEAP8[$background+2>>0]|0;HEAP8[$background$byval_copy+3>>0]=HEAP8[$background+3>>0]|0;
|
|
_nk_fill_rect($28,$$byval_copy,0.0,$background$byval_copy);
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
;HEAP32[$content$byval_copy4>>2]=HEAP32[$content>>2]|0;HEAP32[$content$byval_copy4+4>>2]=HEAP32[$content+4>>2]|0;HEAP32[$content$byval_copy4+8>>2]=HEAP32[$content+8>>2]|0;HEAP32[$content$byval_copy4+12>>2]=HEAP32[$content+12>>2]|0;
|
|
;HEAP8[$foreground$byval_copy5>>0]=HEAP8[$foreground>>0]|0;HEAP8[$foreground$byval_copy5+1>>0]=HEAP8[$foreground+1>>0]|0;HEAP8[$foreground$byval_copy5+2>>0]=HEAP8[$foreground+2>>0]|0;HEAP8[$foreground$byval_copy5+3>>0]=HEAP8[$foreground+3>>0]|0;
|
|
_nk_fill_circle($25,$content$byval_copy4,$foreground$byval_copy5);
|
|
$30 = $1;
|
|
$31 = ($30|0)==(4);
|
|
if (!($31)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$32 = $0;
|
|
;HEAP32[$content$byval_copy6>>2]=HEAP32[$content>>2]|0;HEAP32[$content$byval_copy6+4>>2]=HEAP32[$content+4>>2]|0;HEAP32[$content$byval_copy6+8>>2]=HEAP32[$content+8>>2]|0;HEAP32[$content$byval_copy6+12>>2]=HEAP32[$content+12>>2]|0;
|
|
_nk_shrink_rect($6,$content$byval_copy6,1.0);
|
|
;HEAP32[$$byval_copy7>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy7+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$$byval_copy7+8>>2]=HEAP32[$6+8>>2]|0;HEAP32[$$byval_copy7+12>>2]=HEAP32[$6+12>>2]|0;
|
|
;HEAP8[$background$byval_copy8>>0]=HEAP8[$background>>0]|0;HEAP8[$background$byval_copy8+1>>0]=HEAP8[$background+1>>0]|0;HEAP8[$background$byval_copy8+2>>0]=HEAP8[$background+2>>0]|0;HEAP8[$background$byval_copy8+3>>0]=HEAP8[$background+3>>0]|0;
|
|
_nk_fill_circle($32,$$byval_copy7,$background$byval_copy8);
|
|
STACKTOP = sp;return;
|
|
}
|
|
break;
|
|
}
|
|
case 10: case 9: case 8: case 7: {
|
|
$33 = $1;
|
|
$34 = ($33|0)==(10);
|
|
if ($34) {
|
|
$40 = 1;
|
|
} else {
|
|
$35 = $1;
|
|
$36 = ($35|0)==(9);
|
|
if ($36) {
|
|
$40 = 3;
|
|
} else {
|
|
$37 = $1;
|
|
$38 = ($37|0)==(7);
|
|
$39 = $38 ? 0 : 2;
|
|
$40 = $39;
|
|
}
|
|
}
|
|
$heading = $40;
|
|
$41 = $heading;
|
|
;HEAP32[$content$byval_copy9>>2]=HEAP32[$content>>2]|0;HEAP32[$content$byval_copy9+4>>2]=HEAP32[$content+4>>2]|0;HEAP32[$content$byval_copy9+8>>2]=HEAP32[$content+8>>2]|0;HEAP32[$content$byval_copy9+12>>2]=HEAP32[$content+12>>2]|0;
|
|
_nk_triangle_from_direction($points,$content$byval_copy9,0.0,0.0,$41);
|
|
$42 = $0;
|
|
$43 = +HEAPF32[$points>>2];
|
|
$44 = ((($points)) + 4|0);
|
|
$45 = +HEAPF32[$44>>2];
|
|
$46 = ((($points)) + 8|0);
|
|
$47 = +HEAPF32[$46>>2];
|
|
$48 = ((($points)) + 8|0);
|
|
$49 = ((($48)) + 4|0);
|
|
$50 = +HEAPF32[$49>>2];
|
|
$51 = ((($points)) + 16|0);
|
|
$52 = +HEAPF32[$51>>2];
|
|
$53 = ((($points)) + 16|0);
|
|
$54 = ((($53)) + 4|0);
|
|
$55 = +HEAPF32[$54>>2];
|
|
;HEAP8[$foreground$byval_copy10>>0]=HEAP8[$foreground>>0]|0;HEAP8[$foreground$byval_copy10+1>>0]=HEAP8[$foreground+1>>0]|0;HEAP8[$foreground$byval_copy10+2>>0]=HEAP8[$foreground+2>>0]|0;HEAP8[$foreground$byval_copy10+3>>0]=HEAP8[$foreground+3>>0]|0;
|
|
_nk_fill_triangle($42,$43,$45,$47,$50,$52,$55,$foreground$byval_copy10);
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
default: {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
}
|
|
function _nk_combo_end($ctx) {
|
|
$ctx = $ctx|0;
|
|
var $0 = 0, $1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $0;
|
|
_nk_contextual_end($1);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_glfw3_device_create() {
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
|
|
var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $dev = 0, $status = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$status = sp + 4|0;
|
|
$dev = (64);
|
|
$0 = $dev;
|
|
_nk_buffer_init_default($0);
|
|
$1 = (_glCreateProgram()|0);
|
|
$2 = $dev;
|
|
$3 = ((($2)) + 80|0);
|
|
HEAP32[$3>>2] = $1;
|
|
$4 = (_glCreateShader(35633)|0);
|
|
$5 = $dev;
|
|
$6 = ((($5)) + 84|0);
|
|
HEAP32[$6>>2] = $4;
|
|
$7 = (_glCreateShader(35632)|0);
|
|
$8 = $dev;
|
|
$9 = ((($8)) + 88|0);
|
|
HEAP32[$9>>2] = $7;
|
|
$10 = $dev;
|
|
$11 = ((($10)) + 84|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
_glShaderSource(($12|0),1,(36|0),(0|0));
|
|
$13 = $dev;
|
|
$14 = ((($13)) + 88|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
_glShaderSource(($15|0),1,(40|0),(0|0));
|
|
$16 = $dev;
|
|
$17 = ((($16)) + 84|0);
|
|
$18 = HEAP32[$17>>2]|0;
|
|
_glCompileShader(($18|0));
|
|
$19 = $dev;
|
|
$20 = ((($19)) + 88|0);
|
|
$21 = HEAP32[$20>>2]|0;
|
|
_glCompileShader(($21|0));
|
|
$22 = $dev;
|
|
$23 = ((($22)) + 84|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
_glGetShaderiv(($24|0),35713,($status|0));
|
|
$25 = HEAP32[$status>>2]|0;
|
|
$26 = ($25|0)==(1);
|
|
if (!($26)) {
|
|
___assert_fail((29227|0),(29245|0),168,(29266|0));
|
|
// unreachable;
|
|
}
|
|
$27 = $dev;
|
|
$28 = ((($27)) + 88|0);
|
|
$29 = HEAP32[$28>>2]|0;
|
|
_glGetShaderiv(($29|0),35713,($status|0));
|
|
$30 = HEAP32[$status>>2]|0;
|
|
$31 = ($30|0)==(1);
|
|
if (!($31)) {
|
|
___assert_fail((29227|0),(29245|0),170,(29266|0));
|
|
// unreachable;
|
|
}
|
|
$32 = $dev;
|
|
$33 = ((($32)) + 80|0);
|
|
$34 = HEAP32[$33>>2]|0;
|
|
$35 = $dev;
|
|
$36 = ((($35)) + 84|0);
|
|
$37 = HEAP32[$36>>2]|0;
|
|
_glAttachShader(($34|0),($37|0));
|
|
$38 = $dev;
|
|
$39 = ((($38)) + 80|0);
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$41 = $dev;
|
|
$42 = ((($41)) + 88|0);
|
|
$43 = HEAP32[$42>>2]|0;
|
|
_glAttachShader(($40|0),($43|0));
|
|
$44 = $dev;
|
|
$45 = ((($44)) + 80|0);
|
|
$46 = HEAP32[$45>>2]|0;
|
|
_glLinkProgram(($46|0));
|
|
$47 = $dev;
|
|
$48 = ((($47)) + 80|0);
|
|
$49 = HEAP32[$48>>2]|0;
|
|
_glGetProgramiv(($49|0),35714,($status|0));
|
|
$50 = HEAP32[$status>>2]|0;
|
|
$51 = ($50|0)==(1);
|
|
if ($51) {
|
|
$52 = $dev;
|
|
$53 = ((($52)) + 80|0);
|
|
$54 = HEAP32[$53>>2]|0;
|
|
$55 = (_glGetUniformLocation(($54|0),(29289|0))|0);
|
|
$56 = $dev;
|
|
$57 = ((($56)) + 104|0);
|
|
HEAP32[$57>>2] = $55;
|
|
$58 = $dev;
|
|
$59 = ((($58)) + 80|0);
|
|
$60 = HEAP32[$59>>2]|0;
|
|
$61 = (_glGetUniformLocation(($60|0),(29297|0))|0);
|
|
$62 = $dev;
|
|
$63 = ((($62)) + 108|0);
|
|
HEAP32[$63>>2] = $61;
|
|
$64 = $dev;
|
|
$65 = ((($64)) + 80|0);
|
|
$66 = HEAP32[$65>>2]|0;
|
|
$67 = (_glGetAttribLocation(($66|0),(29305|0))|0);
|
|
$68 = $dev;
|
|
$69 = ((($68)) + 92|0);
|
|
HEAP32[$69>>2] = $67;
|
|
$70 = $dev;
|
|
$71 = ((($70)) + 80|0);
|
|
$72 = HEAP32[$71>>2]|0;
|
|
$73 = (_glGetAttribLocation(($72|0),(29314|0))|0);
|
|
$74 = $dev;
|
|
$75 = ((($74)) + 96|0);
|
|
HEAP32[$75>>2] = $73;
|
|
$76 = $dev;
|
|
$77 = ((($76)) + 80|0);
|
|
$78 = HEAP32[$77>>2]|0;
|
|
$79 = (_glGetAttribLocation(($78|0),(29323|0))|0);
|
|
$80 = $dev;
|
|
$81 = ((($80)) + 100|0);
|
|
HEAP32[$81>>2] = $79;
|
|
$82 = $dev;
|
|
$83 = ((($82)) + 116|0);
|
|
HEAP32[$83>>2] = 20;
|
|
$84 = $dev;
|
|
$85 = ((($84)) + 120|0);
|
|
HEAP32[$85>>2] = 0;
|
|
$86 = $dev;
|
|
$87 = ((($86)) + 124|0);
|
|
HEAP32[$87>>2] = 8;
|
|
$88 = $dev;
|
|
$89 = ((($88)) + 128|0);
|
|
HEAP32[$89>>2] = 16;
|
|
$90 = $dev;
|
|
$91 = ((($90)) + 72|0);
|
|
_glGenBuffers(1,($91|0));
|
|
$92 = $dev;
|
|
$93 = ((($92)) + 76|0);
|
|
_glGenBuffers(1,($93|0));
|
|
_glBindTexture(3553,0);
|
|
_glBindBuffer(34962,0);
|
|
_glBindBuffer(34963,0);
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
___assert_fail((29227|0),(29245|0),175,(29266|0));
|
|
// unreachable;
|
|
}
|
|
}
|
|
function _nk_glfw3_device_destroy() {
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $dev = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$dev = (64);
|
|
$0 = $dev;
|
|
$1 = ((($0)) + 80|0);
|
|
$2 = HEAP32[$1>>2]|0;
|
|
$3 = $dev;
|
|
$4 = ((($3)) + 84|0);
|
|
$5 = HEAP32[$4>>2]|0;
|
|
_glDetachShader(($2|0),($5|0));
|
|
$6 = $dev;
|
|
$7 = ((($6)) + 80|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = $dev;
|
|
$10 = ((($9)) + 88|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
_glDetachShader(($8|0),($11|0));
|
|
$12 = $dev;
|
|
$13 = ((($12)) + 84|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
_glDeleteShader(($14|0));
|
|
$15 = $dev;
|
|
$16 = ((($15)) + 88|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
_glDeleteShader(($17|0));
|
|
$18 = $dev;
|
|
$19 = ((($18)) + 80|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
_glDeleteProgram(($20|0));
|
|
$21 = $dev;
|
|
$22 = ((($21)) + 112|0);
|
|
_glDeleteTextures(1,($22|0));
|
|
$23 = $dev;
|
|
$24 = ((($23)) + 72|0);
|
|
_glDeleteBuffers(1,($24|0));
|
|
$25 = $dev;
|
|
$26 = ((($25)) + 76|0);
|
|
_glDeleteBuffers(1,($26|0));
|
|
$27 = $dev;
|
|
_nk_buffer_free($27);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_glfw3_render($AA,$max_vertex_buffer,$max_element_buffer) {
|
|
$AA = $AA|0;
|
|
$max_vertex_buffer = $max_vertex_buffer|0;
|
|
$max_element_buffer = $max_element_buffer|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0.0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0.0, $120 = 0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0.0, $13 = 0.0, $130 = 0, $131 = 0, $132 = 0, $133 = 0.0;
|
|
var $134 = 0.0, $135 = 0, $136 = 0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0.0, $145 = 0.0, $146 = 0.0, $147 = 0, $148 = 0, $149 = 0, $15 = 0.0, $150 = 0, $151 = 0.0;
|
|
var $152 = 0.0, $153 = 0.0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0;
|
|
var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0;
|
|
var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0;
|
|
var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0;
|
|
var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0;
|
|
var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $cmd = 0, $config = 0, $dev = 0, $ebuf = 0, $elements = 0, $offset = 0, $ortho = 0, $vbuf = 0, $vertices = 0, dest = 0, label = 0, sp = 0, stop = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$ortho = sp + 176|0;
|
|
$config = sp + 120|0;
|
|
$vbuf = sp + 60|0;
|
|
$ebuf = sp;
|
|
$0 = $AA;
|
|
$1 = $max_vertex_buffer;
|
|
$2 = $max_element_buffer;
|
|
$dev = (64);
|
|
dest=$ortho; stop=dest+64|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0));
|
|
HEAPF32[$ortho>>2] = 2.0;
|
|
$3 = ((($ortho)) + 16|0);
|
|
$4 = ((($3)) + 4|0);
|
|
HEAPF32[$4>>2] = -2.0;
|
|
$5 = ((($ortho)) + 32|0);
|
|
$6 = ((($5)) + 8|0);
|
|
HEAPF32[$6>>2] = -1.0;
|
|
$7 = ((($ortho)) + 48|0);
|
|
HEAPF32[$7>>2] = -1.0;
|
|
$8 = ((($7)) + 4|0);
|
|
HEAPF32[$8>>2] = 1.0;
|
|
$9 = ((($7)) + 12|0);
|
|
HEAPF32[$9>>2] = 1.0;
|
|
$10 = HEAP32[(48)>>2]|0;
|
|
$11 = (+($10|0));
|
|
$12 = +HEAPF32[$ortho>>2];
|
|
$13 = $12 / $11;
|
|
HEAPF32[$ortho>>2] = $13;
|
|
$14 = HEAP32[(52)>>2]|0;
|
|
$15 = (+($14|0));
|
|
$16 = ((($ortho)) + 16|0);
|
|
$17 = ((($16)) + 4|0);
|
|
$18 = +HEAPF32[$17>>2];
|
|
$19 = $18 / $15;
|
|
HEAPF32[$17>>2] = $19;
|
|
_glEnable(3042);
|
|
_glBlendEquation(32774);
|
|
_glBlendFunc(770,771);
|
|
_glDisable(2884);
|
|
_glDisable(2929);
|
|
_glEnable(3089);
|
|
_glActiveTexture(33984);
|
|
$20 = $dev;
|
|
$21 = ((($20)) + 80|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
_glUseProgram(($22|0));
|
|
$23 = $dev;
|
|
$24 = ((($23)) + 104|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
_glUniform1i(($25|0),0);
|
|
$26 = $dev;
|
|
$27 = ((($26)) + 108|0);
|
|
$28 = HEAP32[$27>>2]|0;
|
|
_glUniformMatrix4fv(($28|0),1,0,($ortho|0));
|
|
$29 = HEAP32[(56)>>2]|0;
|
|
$30 = HEAP32[(60)>>2]|0;
|
|
_glViewport(0,0,($29|0),($30|0));
|
|
$offset = 0;
|
|
$31 = $dev;
|
|
$32 = ((($31)) + 72|0);
|
|
$33 = HEAP32[$32>>2]|0;
|
|
_glBindBuffer(34962,($33|0));
|
|
$34 = $dev;
|
|
$35 = ((($34)) + 76|0);
|
|
$36 = HEAP32[$35>>2]|0;
|
|
_glBindBuffer(34963,($36|0));
|
|
$37 = $dev;
|
|
$38 = ((($37)) + 92|0);
|
|
$39 = HEAP32[$38>>2]|0;
|
|
_glEnableVertexAttribArray(($39|0));
|
|
$40 = $dev;
|
|
$41 = ((($40)) + 96|0);
|
|
$42 = HEAP32[$41>>2]|0;
|
|
_glEnableVertexAttribArray(($42|0));
|
|
$43 = $dev;
|
|
$44 = ((($43)) + 100|0);
|
|
$45 = HEAP32[$44>>2]|0;
|
|
_glEnableVertexAttribArray(($45|0));
|
|
$46 = $dev;
|
|
$47 = ((($46)) + 92|0);
|
|
$48 = HEAP32[$47>>2]|0;
|
|
$49 = $dev;
|
|
$50 = ((($49)) + 116|0);
|
|
$51 = HEAP32[$50>>2]|0;
|
|
$52 = $dev;
|
|
$53 = ((($52)) + 120|0);
|
|
$54 = HEAP32[$53>>2]|0;
|
|
$55 = $54;
|
|
_glVertexAttribPointer(($48|0),2,5126,0,($51|0),($55|0));
|
|
$56 = $dev;
|
|
$57 = ((($56)) + 96|0);
|
|
$58 = HEAP32[$57>>2]|0;
|
|
$59 = $dev;
|
|
$60 = ((($59)) + 116|0);
|
|
$61 = HEAP32[$60>>2]|0;
|
|
$62 = $dev;
|
|
$63 = ((($62)) + 124|0);
|
|
$64 = HEAP32[$63>>2]|0;
|
|
$65 = $64;
|
|
_glVertexAttribPointer(($58|0),2,5126,0,($61|0),($65|0));
|
|
$66 = $dev;
|
|
$67 = ((($66)) + 100|0);
|
|
$68 = HEAP32[$67>>2]|0;
|
|
$69 = $dev;
|
|
$70 = ((($69)) + 116|0);
|
|
$71 = HEAP32[$70>>2]|0;
|
|
$72 = $dev;
|
|
$73 = ((($72)) + 128|0);
|
|
$74 = HEAP32[$73>>2]|0;
|
|
$75 = $74;
|
|
_glVertexAttribPointer(($68|0),4,5121,1,($71|0),($75|0));
|
|
$76 = $dev;
|
|
$77 = ((($76)) + 72|0);
|
|
$78 = HEAP32[$77>>2]|0;
|
|
_glBindBuffer(34962,($78|0));
|
|
$79 = $dev;
|
|
$80 = ((($79)) + 76|0);
|
|
$81 = HEAP32[$80>>2]|0;
|
|
_glBindBuffer(34963,($81|0));
|
|
$82 = $1;
|
|
_glBufferData(34962,($82|0),(0|0),35040);
|
|
$83 = $2;
|
|
_glBufferData(34963,($83|0),(0|0),35040);
|
|
$84 = $1;
|
|
$85 = (_malloc($84)|0);
|
|
$vertices = $85;
|
|
$86 = $2;
|
|
$87 = (_malloc($86)|0);
|
|
$elements = $87;
|
|
dest=$config; stop=dest+36|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0));
|
|
HEAPF32[$config>>2] = 1.0;
|
|
$88 = $0;
|
|
$89 = ((($config)) + 8|0);
|
|
HEAP32[$89>>2] = $88;
|
|
$90 = $0;
|
|
$91 = ((($config)) + 4|0);
|
|
HEAP32[$91>>2] = $90;
|
|
$92 = ((($config)) + 12|0);
|
|
HEAP32[$92>>2] = 22;
|
|
$93 = ((($config)) + 20|0);
|
|
HEAP32[$93>>2] = 22;
|
|
$94 = ((($config)) + 16|0);
|
|
HEAP32[$94>>2] = 22;
|
|
$95 = ((($config)) + 24|0);
|
|
$96 = $dev;
|
|
$97 = ((($96)) + 60|0);
|
|
;HEAP32[$95>>2]=HEAP32[$97>>2]|0;HEAP32[$95+4>>2]=HEAP32[$97+4>>2]|0;HEAP32[$95+8>>2]=HEAP32[$97+8>>2]|0;
|
|
$98 = $vertices;
|
|
$99 = $1;
|
|
_nk_buffer_init_fixed($vbuf,$98,$99);
|
|
$100 = $elements;
|
|
$101 = $2;
|
|
_nk_buffer_init_fixed($ebuf,$100,$101);
|
|
$102 = $dev;
|
|
_nk_convert((196),$102,$vbuf,$ebuf,$config);
|
|
$103 = $1;
|
|
$104 = $vertices;
|
|
_glBufferSubData(34962,0,($103|0),($104|0));
|
|
$105 = $2;
|
|
$106 = $elements;
|
|
_glBufferSubData(34963,0,($105|0),($106|0));
|
|
$107 = $vertices;
|
|
_free($107);
|
|
$108 = $elements;
|
|
_free($108);
|
|
$109 = $dev;
|
|
$110 = (_nk__draw_begin((196),$109)|0);
|
|
$cmd = $110;
|
|
while(1) {
|
|
$111 = $cmd;
|
|
$112 = ($111|0)!=(0|0);
|
|
if (!($112)) {
|
|
break;
|
|
}
|
|
$113 = $cmd;
|
|
$114 = HEAP32[$113>>2]|0;
|
|
$115 = ($114|0)!=(0);
|
|
if ($115) {
|
|
$116 = $cmd;
|
|
$117 = ((($116)) + 20|0);
|
|
$118 = HEAP32[$117>>2]|0;
|
|
_glBindTexture(3553,($118|0));
|
|
$119 = $cmd;
|
|
$120 = ((($119)) + 4|0);
|
|
$121 = +HEAPF32[$120>>2];
|
|
$122 = +HEAPF32[(11452)>>2];
|
|
$123 = $121 * $122;
|
|
$124 = (~~(($123)));
|
|
$125 = HEAP32[(52)>>2]|0;
|
|
$126 = $cmd;
|
|
$127 = ((($126)) + 4|0);
|
|
$128 = ((($127)) + 4|0);
|
|
$129 = +HEAPF32[$128>>2];
|
|
$130 = $cmd;
|
|
$131 = ((($130)) + 4|0);
|
|
$132 = ((($131)) + 12|0);
|
|
$133 = +HEAPF32[$132>>2];
|
|
$134 = $129 + $133;
|
|
$135 = (~~(($134)));
|
|
$136 = (($125) - ($135))|0;
|
|
$137 = (+($136|0));
|
|
$138 = +HEAPF32[(11456)>>2];
|
|
$139 = $137 * $138;
|
|
$140 = (~~(($139)));
|
|
$141 = $cmd;
|
|
$142 = ((($141)) + 4|0);
|
|
$143 = ((($142)) + 8|0);
|
|
$144 = +HEAPF32[$143>>2];
|
|
$145 = +HEAPF32[(11452)>>2];
|
|
$146 = $144 * $145;
|
|
$147 = (~~(($146)));
|
|
$148 = $cmd;
|
|
$149 = ((($148)) + 4|0);
|
|
$150 = ((($149)) + 12|0);
|
|
$151 = +HEAPF32[$150>>2];
|
|
$152 = +HEAPF32[(11456)>>2];
|
|
$153 = $151 * $152;
|
|
$154 = (~~(($153)));
|
|
_glScissor(($124|0),($140|0),($147|0),($154|0));
|
|
$155 = $cmd;
|
|
$156 = HEAP32[$155>>2]|0;
|
|
$157 = $offset;
|
|
_glDrawElements(4,($156|0),5123,($157|0));
|
|
$158 = $cmd;
|
|
$159 = HEAP32[$158>>2]|0;
|
|
$160 = $offset;
|
|
$161 = (($160) + ($159<<1)|0);
|
|
$offset = $161;
|
|
}
|
|
$162 = $cmd;
|
|
$163 = $dev;
|
|
$164 = (_nk__draw_next($162,$163,(196))|0);
|
|
$cmd = $164;
|
|
}
|
|
_nk_clear((196));
|
|
_glUseProgram(0);
|
|
_glBindBuffer(34962,0);
|
|
_glBindBuffer(34963,0);
|
|
_glDisable(3042);
|
|
_glDisable(3089);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_glfw3_char_callback($win,$codepoint) {
|
|
$win = $win|0;
|
|
$codepoint = $codepoint|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $win;
|
|
$1 = $codepoint;
|
|
$2 = HEAP32[(12484)>>2]|0;
|
|
$3 = ($2|0)<(256);
|
|
if (!($3)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$4 = $1;
|
|
$5 = HEAP32[(12484)>>2]|0;
|
|
$6 = (($5) + 1)|0;
|
|
HEAP32[(12484)>>2] = $6;
|
|
$7 = ((11460) + ($5<<2)|0);
|
|
HEAP32[$7>>2] = $4;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_gflw3_scroll_callback($win,$xoff,$yoff) {
|
|
$win = $win|0;
|
|
$xoff = +$xoff;
|
|
$yoff = +$yoff;
|
|
var $0 = 0, $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $win;
|
|
$1 = $xoff;
|
|
$2 = $yoff;
|
|
$3 = $2;
|
|
$4 = $3;
|
|
$5 = +HEAPF32[(12488)>>2];
|
|
$6 = $5 + $4;
|
|
HEAPF32[(12488)>>2] = $6;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_glfw3_init($win,$init_state) {
|
|
$win = $win|0;
|
|
$init_state = $init_state|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$2 = sp;
|
|
$0 = $win;
|
|
$1 = $init_state;
|
|
$3 = $0;
|
|
HEAP32[44>>2] = $3;
|
|
$4 = $1;
|
|
$5 = ($4|0)==(1);
|
|
if ($5) {
|
|
$6 = $0;
|
|
(_glfwSetScrollCallback(($6|0),(13|0))|0);
|
|
$7 = $0;
|
|
(_glfwSetCharCallback(($7|0),(14|0))|0);
|
|
}
|
|
(_nk_init_default((196),0)|0);
|
|
HEAP32[(5860)>>2] = 15;
|
|
HEAP32[(5856)>>2] = 16;
|
|
_nk_handle_ptr($2,0);
|
|
;HEAP32[(5852)>>2]=HEAP32[$2>>2]|0;
|
|
_nk_glfw3_device_create();
|
|
STACKTOP = sp;return ((196)|0);
|
|
}
|
|
function _nk_glfw3_clipbard_copy($usr,$text,$len) {
|
|
$usr = $usr|0;
|
|
$text = $text|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $str = 0, label = 0;
|
|
var sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $text;
|
|
$1 = $len;
|
|
$str = 0;
|
|
$2 = $1;
|
|
$3 = ($2|0)!=(0);
|
|
if (!($3)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$4 = $1;
|
|
$5 = (($4) + 1)|0;
|
|
$6 = (_malloc($5)|0);
|
|
$str = $6;
|
|
$7 = $str;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$9 = $str;
|
|
$10 = $0;
|
|
$11 = $1;
|
|
_memcpy(($9|0),($10|0),($11|0))|0;
|
|
$12 = $1;
|
|
$13 = $str;
|
|
$14 = (($13) + ($12)|0);
|
|
HEAP8[$14>>0] = 0;
|
|
$15 = HEAP32[44>>2]|0;
|
|
$16 = $str;
|
|
_glfwSetClipboardString(($15|0),($16|0));
|
|
$17 = $str;
|
|
_free($17);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_glfw3_clipbard_paste($usr,$edit) {
|
|
$usr = $usr|0;
|
|
$edit = $edit|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $text = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $edit;
|
|
$1 = HEAP32[44>>2]|0;
|
|
$2 = (_glfwGetClipboardString(($1|0))|0);
|
|
$text = $2;
|
|
$3 = $text;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$6 = $text;
|
|
$7 = $text;
|
|
$8 = (_nk_strlen($7)|0);
|
|
(_nk_textedit_paste($5,$6,$8)|0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_glfw3_font_stash_begin($atlas) {
|
|
$atlas = $atlas|0;
|
|
var $0 = 0, $1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $atlas;
|
|
_nk_font_atlas_init_default((11380));
|
|
_nk_font_atlas_begin((11380));
|
|
$1 = $0;
|
|
HEAP32[$1>>2] = (11380);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_glfw3_font_stash_end() {
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $h = 0, $image = 0, $w = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 16|0;
|
|
$w = sp + 8|0;
|
|
$h = sp + 4|0;
|
|
$0 = sp;
|
|
$1 = (_nk_font_atlas_bake((11380),$w,$h,1)|0);
|
|
$image = $1;
|
|
$2 = $image;
|
|
$3 = HEAP32[$w>>2]|0;
|
|
$4 = HEAP32[$h>>2]|0;
|
|
_nk_glfw3_device_upload_atlas($2,$3,$4);
|
|
$5 = HEAP32[(176)>>2]|0;
|
|
_nk_handle_id($0,$5);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;
|
|
_nk_font_atlas_end((11380),$$byval_copy,(124));
|
|
$6 = HEAP32[(11428)>>2]|0;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$8 = HEAP32[(11428)>>2]|0;
|
|
_nk_style_set_font((196),$8);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_glfw3_device_upload_atlas($image,$width,$height) {
|
|
$image = $image|0;
|
|
$width = $width|0;
|
|
$height = $height|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $dev = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $image;
|
|
$1 = $width;
|
|
$2 = $height;
|
|
$dev = (64);
|
|
$3 = $dev;
|
|
$4 = ((($3)) + 112|0);
|
|
_glGenTextures(1,($4|0));
|
|
$5 = $dev;
|
|
$6 = ((($5)) + 112|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
_glBindTexture(3553,($7|0));
|
|
_glTexParameteri(3553,10241,9729);
|
|
_glTexParameteri(3553,10240,9729);
|
|
$8 = $1;
|
|
$9 = $2;
|
|
$10 = $0;
|
|
_glTexImage2D(3553,0,6408,($8|0),($9|0),0,6408,5121,($10|0));
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_glfw3_new_frame() {
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0.0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0.0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0.0, $151 = 0;
|
|
var $152 = 0.0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0.0, $164 = 0.0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0.0, $17 = 0;
|
|
var $170 = 0.0, $171 = 0, $172 = 0, $173 = 0, $174 = 0.0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0.0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0.0;
|
|
var $189 = 0, $19 = 0, $190 = 0.0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0.0, $198 = 0, $199 = 0.0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
|
|
var $206 = 0.0, $207 = 0, $208 = 0.0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0;
|
|
var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0;
|
|
var $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0.0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0;
|
|
var $67 = 0, $68 = 0, $69 = 0, $7 = 0.0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0;
|
|
var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0.0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $ctx = 0, $i = 0, $win = 0, $x = 0;
|
|
var $y = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$x = sp + 8|0;
|
|
$y = sp;
|
|
$ctx = (196);
|
|
$0 = HEAP32[44>>2]|0;
|
|
$win = $0;
|
|
$1 = $win;
|
|
_glfwGetWindowSize(($1|0),((48)|0),((52)|0));
|
|
$2 = $win;
|
|
_glfwGetFramebufferSize(($2|0),((56)|0),((60)|0));
|
|
$3 = HEAP32[(56)>>2]|0;
|
|
$4 = (+($3|0));
|
|
$5 = HEAP32[(48)>>2]|0;
|
|
$6 = (+($5|0));
|
|
$7 = $4 / $6;
|
|
HEAPF32[(11452)>>2] = $7;
|
|
$8 = HEAP32[(60)>>2]|0;
|
|
$9 = (+($8|0));
|
|
$10 = HEAP32[(52)>>2]|0;
|
|
$11 = (+($10|0));
|
|
$12 = $9 / $11;
|
|
HEAPF32[(11456)>>2] = $12;
|
|
$13 = $ctx;
|
|
_nk_input_begin($13);
|
|
$i = 0;
|
|
while(1) {
|
|
$14 = $i;
|
|
$15 = HEAP32[(12484)>>2]|0;
|
|
$16 = ($14|0)<($15|0);
|
|
$17 = $ctx;
|
|
if (!($16)) {
|
|
break;
|
|
}
|
|
$18 = $i;
|
|
$19 = ((11460) + ($18<<2)|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
_nk_input_unicode($17,$20);
|
|
$21 = $i;
|
|
$22 = (($21) + 1)|0;
|
|
$i = $22;
|
|
}
|
|
$23 = ((($17)) + 220|0);
|
|
$24 = ((($23)) + 76|0);
|
|
$25 = HEAP8[$24>>0]|0;
|
|
$26 = ($25<<24>>24)!=(0);
|
|
if ($26) {
|
|
$27 = HEAP32[44>>2]|0;
|
|
_glfwSetInputMode(($27|0),208897,212994);
|
|
} else {
|
|
$28 = $ctx;
|
|
$29 = ((($28)) + 220|0);
|
|
$30 = ((($29)) + 78|0);
|
|
$31 = HEAP8[$30>>0]|0;
|
|
$32 = ($31<<24>>24)!=(0);
|
|
if ($32) {
|
|
$33 = HEAP32[44>>2]|0;
|
|
_glfwSetInputMode(($33|0),208897,212993);
|
|
}
|
|
}
|
|
$34 = $ctx;
|
|
$35 = $win;
|
|
$36 = (_glfwGetKey(($35|0),261)|0);
|
|
$37 = ($36|0)==(1);
|
|
$38 = $37&1;
|
|
_nk_input_key($34,3,$38);
|
|
$39 = $ctx;
|
|
$40 = $win;
|
|
$41 = (_glfwGetKey(($40|0),257)|0);
|
|
$42 = ($41|0)==(1);
|
|
$43 = $42&1;
|
|
_nk_input_key($39,4,$43);
|
|
$44 = $ctx;
|
|
$45 = $win;
|
|
$46 = (_glfwGetKey(($45|0),258)|0);
|
|
$47 = ($46|0)==(1);
|
|
$48 = $47&1;
|
|
_nk_input_key($44,5,$48);
|
|
$49 = $ctx;
|
|
$50 = $win;
|
|
$51 = (_glfwGetKey(($50|0),259)|0);
|
|
$52 = ($51|0)==(1);
|
|
$53 = $52&1;
|
|
_nk_input_key($49,6,$53);
|
|
$54 = $ctx;
|
|
$55 = $win;
|
|
$56 = (_glfwGetKey(($55|0),265)|0);
|
|
$57 = ($56|0)==(1);
|
|
$58 = $57&1;
|
|
_nk_input_key($54,10,$58);
|
|
$59 = $ctx;
|
|
$60 = $win;
|
|
$61 = (_glfwGetKey(($60|0),264)|0);
|
|
$62 = ($61|0)==(1);
|
|
$63 = $62&1;
|
|
_nk_input_key($59,11,$63);
|
|
$64 = $ctx;
|
|
$65 = $win;
|
|
$66 = (_glfwGetKey(($65|0),268)|0);
|
|
$67 = ($66|0)==(1);
|
|
$68 = $67&1;
|
|
_nk_input_key($64,19,$68);
|
|
$69 = $ctx;
|
|
$70 = $win;
|
|
$71 = (_glfwGetKey(($70|0),269)|0);
|
|
$72 = ($71|0)==(1);
|
|
$73 = $72&1;
|
|
_nk_input_key($69,20,$73);
|
|
$74 = $ctx;
|
|
$75 = $win;
|
|
$76 = (_glfwGetKey(($75|0),340)|0);
|
|
$77 = ($76|0)==(1);
|
|
if ($77) {
|
|
$82 = 1;
|
|
} else {
|
|
$78 = $win;
|
|
$79 = (_glfwGetKey(($78|0),344)|0);
|
|
$80 = ($79|0)==(1);
|
|
$82 = $80;
|
|
}
|
|
$81 = $82&1;
|
|
_nk_input_key($74,1,$81);
|
|
$83 = $win;
|
|
$84 = (_glfwGetKey(($83|0),341)|0);
|
|
$85 = ($84|0)==(1);
|
|
if ($85) {
|
|
label = 12;
|
|
} else {
|
|
$86 = $win;
|
|
$87 = (_glfwGetKey(($86|0),345)|0);
|
|
$88 = ($87|0)==(1);
|
|
if ($88) {
|
|
label = 12;
|
|
} else {
|
|
$134 = $ctx;
|
|
$135 = $win;
|
|
$136 = (_glfwGetKey(($135|0),263)|0);
|
|
$137 = ($136|0)==(1);
|
|
$138 = $137&1;
|
|
_nk_input_key($134,12,$138);
|
|
$139 = $ctx;
|
|
$140 = $win;
|
|
$141 = (_glfwGetKey(($140|0),262)|0);
|
|
$142 = ($141|0)==(1);
|
|
$143 = $142&1;
|
|
_nk_input_key($139,13,$143);
|
|
$144 = $ctx;
|
|
_nk_input_key($144,7,0);
|
|
$145 = $ctx;
|
|
_nk_input_key($145,9,0);
|
|
$146 = $ctx;
|
|
_nk_input_key($146,8,0);
|
|
$147 = $ctx;
|
|
_nk_input_key($147,1,0);
|
|
}
|
|
}
|
|
if ((label|0) == 12) {
|
|
$89 = $ctx;
|
|
$90 = $win;
|
|
$91 = (_glfwGetKey(($90|0),67)|0);
|
|
$92 = ($91|0)==(1);
|
|
$93 = $92&1;
|
|
_nk_input_key($89,7,$93);
|
|
$94 = $ctx;
|
|
$95 = $win;
|
|
$96 = (_glfwGetKey(($95|0),80)|0);
|
|
$97 = ($96|0)==(1);
|
|
$98 = $97&1;
|
|
_nk_input_key($94,9,$98);
|
|
$99 = $ctx;
|
|
$100 = $win;
|
|
$101 = (_glfwGetKey(($100|0),88)|0);
|
|
$102 = ($101|0)==(1);
|
|
$103 = $102&1;
|
|
_nk_input_key($99,8,$103);
|
|
$104 = $ctx;
|
|
$105 = $win;
|
|
$106 = (_glfwGetKey(($105|0),90)|0);
|
|
$107 = ($106|0)==(1);
|
|
$108 = $107&1;
|
|
_nk_input_key($104,21,$108);
|
|
$109 = $ctx;
|
|
$110 = $win;
|
|
$111 = (_glfwGetKey(($110|0),82)|0);
|
|
$112 = ($111|0)==(1);
|
|
$113 = $112&1;
|
|
_nk_input_key($109,22,$113);
|
|
$114 = $ctx;
|
|
$115 = $win;
|
|
$116 = (_glfwGetKey(($115|0),263)|0);
|
|
$117 = ($116|0)==(1);
|
|
$118 = $117&1;
|
|
_nk_input_key($114,23,$118);
|
|
$119 = $ctx;
|
|
$120 = $win;
|
|
$121 = (_glfwGetKey(($120|0),262)|0);
|
|
$122 = ($121|0)==(1);
|
|
$123 = $122&1;
|
|
_nk_input_key($119,24,$123);
|
|
$124 = $ctx;
|
|
$125 = $win;
|
|
$126 = (_glfwGetKey(($125|0),66)|0);
|
|
$127 = ($126|0)==(1);
|
|
$128 = $127&1;
|
|
_nk_input_key($124,17,$128);
|
|
$129 = $ctx;
|
|
$130 = $win;
|
|
$131 = (_glfwGetKey(($130|0),69)|0);
|
|
$132 = ($131|0)==(1);
|
|
$133 = $132&1;
|
|
_nk_input_key($129,18,$133);
|
|
}
|
|
$148 = $win;
|
|
_glfwGetCursorPos(($148|0),($x|0),($y|0));
|
|
$149 = $ctx;
|
|
$150 = +HEAPF64[$x>>3];
|
|
$151 = (~~(($150)));
|
|
$152 = +HEAPF64[$y>>3];
|
|
$153 = (~~(($152)));
|
|
_nk_input_motion($149,$151,$153);
|
|
$154 = $ctx;
|
|
$155 = ((($154)) + 220|0);
|
|
$156 = ((($155)) + 77|0);
|
|
$157 = HEAP8[$156>>0]|0;
|
|
$158 = ($157<<24>>24)!=(0);
|
|
if (!($158)) {
|
|
$187 = $ctx;
|
|
$188 = +HEAPF64[$x>>3];
|
|
$189 = (~~(($188)));
|
|
$190 = +HEAPF64[$y>>3];
|
|
$191 = (~~(($190)));
|
|
$192 = $win;
|
|
$193 = (_glfwGetMouseButton(($192|0),0)|0);
|
|
$194 = ($193|0)==(1);
|
|
$195 = $194&1;
|
|
_nk_input_button($187,0,$189,$191,$195);
|
|
$196 = $ctx;
|
|
$197 = +HEAPF64[$x>>3];
|
|
$198 = (~~(($197)));
|
|
$199 = +HEAPF64[$y>>3];
|
|
$200 = (~~(($199)));
|
|
$201 = $win;
|
|
$202 = (_glfwGetMouseButton(($201|0),2)|0);
|
|
$203 = ($202|0)==(1);
|
|
$204 = $203&1;
|
|
_nk_input_button($196,1,$198,$200,$204);
|
|
$205 = $ctx;
|
|
$206 = +HEAPF64[$x>>3];
|
|
$207 = (~~(($206)));
|
|
$208 = +HEAPF64[$y>>3];
|
|
$209 = (~~(($208)));
|
|
$210 = $win;
|
|
$211 = (_glfwGetMouseButton(($210|0),1)|0);
|
|
$212 = ($211|0)==(1);
|
|
$213 = $212&1;
|
|
_nk_input_button($205,2,$207,$209,$213);
|
|
$214 = $ctx;
|
|
$215 = +HEAPF32[(12488)>>2];
|
|
_nk_input_scroll($214,$215);
|
|
_nk_input_end((196));
|
|
HEAP32[(12484)>>2] = 0;
|
|
HEAPF32[(12488)>>2] = 0.0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
$159 = HEAP32[44>>2]|0;
|
|
$160 = $ctx;
|
|
$161 = ((($160)) + 220|0);
|
|
$162 = ((($161)) + 56|0);
|
|
$163 = +HEAPF32[$162>>2];
|
|
$164 = $163;
|
|
$165 = $ctx;
|
|
$166 = ((($165)) + 220|0);
|
|
$167 = ((($166)) + 56|0);
|
|
$168 = ((($167)) + 4|0);
|
|
$169 = +HEAPF32[$168>>2];
|
|
$170 = $169;
|
|
_glfwSetCursorPos(($159|0),(+$164),(+$170));
|
|
$171 = $ctx;
|
|
$172 = ((($171)) + 220|0);
|
|
$173 = ((($172)) + 56|0);
|
|
$174 = +HEAPF32[$173>>2];
|
|
$175 = $ctx;
|
|
$176 = ((($175)) + 220|0);
|
|
$177 = ((($176)) + 48|0);
|
|
HEAPF32[$177>>2] = $174;
|
|
$178 = $ctx;
|
|
$179 = ((($178)) + 220|0);
|
|
$180 = ((($179)) + 56|0);
|
|
$181 = ((($180)) + 4|0);
|
|
$182 = +HEAPF32[$181>>2];
|
|
$183 = $ctx;
|
|
$184 = ((($183)) + 220|0);
|
|
$185 = ((($184)) + 48|0);
|
|
$186 = ((($185)) + 4|0);
|
|
HEAPF32[$186>>2] = $182;
|
|
$187 = $ctx;
|
|
$188 = +HEAPF64[$x>>3];
|
|
$189 = (~~(($188)));
|
|
$190 = +HEAPF64[$y>>3];
|
|
$191 = (~~(($190)));
|
|
$192 = $win;
|
|
$193 = (_glfwGetMouseButton(($192|0),0)|0);
|
|
$194 = ($193|0)==(1);
|
|
$195 = $194&1;
|
|
_nk_input_button($187,0,$189,$191,$195);
|
|
$196 = $ctx;
|
|
$197 = +HEAPF64[$x>>3];
|
|
$198 = (~~(($197)));
|
|
$199 = +HEAPF64[$y>>3];
|
|
$200 = (~~(($199)));
|
|
$201 = $win;
|
|
$202 = (_glfwGetMouseButton(($201|0),2)|0);
|
|
$203 = ($202|0)==(1);
|
|
$204 = $203&1;
|
|
_nk_input_button($196,1,$198,$200,$204);
|
|
$205 = $ctx;
|
|
$206 = +HEAPF64[$x>>3];
|
|
$207 = (~~(($206)));
|
|
$208 = +HEAPF64[$y>>3];
|
|
$209 = (~~(($208)));
|
|
$210 = $win;
|
|
$211 = (_glfwGetMouseButton(($210|0),1)|0);
|
|
$212 = ($211|0)==(1);
|
|
$213 = $212&1;
|
|
_nk_input_button($205,2,$207,$209,$213);
|
|
$214 = $ctx;
|
|
$215 = +HEAPF32[(12488)>>2];
|
|
_nk_input_scroll($214,$215);
|
|
_nk_input_end((196));
|
|
HEAP32[(12484)>>2] = 0;
|
|
HEAPF32[(12488)>>2] = 0.0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_glfw3_shutdown() {
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
_nk_font_atlas_clear((11380));
|
|
_nk_free((196));
|
|
_nk_glfw3_device_destroy();
|
|
_memset((44|0),0,12448)|0;
|
|
return;
|
|
}
|
|
function _render() {
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
|
|
var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0.0;
|
|
var $62 = 0, $63 = 0.0, $64 = 0, $65 = 0.0, $66 = 0, $7 = 0, $8 = 0, $9 = 0, $background$byval_copy = 0, $background$byval_copy1 = 0, $background$byval_copy2 = 0, $bg = 0, $combo = 0, $layout = 0, $vararg_buffer = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 800|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$background$byval_copy2 = sp + 788|0;
|
|
$background$byval_copy1 = sp + 784|0;
|
|
$background$byval_copy = sp + 780|0;
|
|
$$byval_copy = sp + 760|0;
|
|
$vararg_buffer = sp;
|
|
$layout = sp + 400|0;
|
|
$0 = sp + 384|0;
|
|
$combo = sp + 24|0;
|
|
$1 = sp + 776|0;
|
|
$bg = sp + 8|0;
|
|
_glfwPollEvents();
|
|
_nk_glfw3_new_frame();
|
|
$2 = HEAP32[12508>>2]|0;
|
|
_nk_rect($0,50.0,50.0,230.0,250.0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$0+12>>2]|0;
|
|
$3 = (_nk_begin($2,$layout,29329,$$byval_copy,301)|0);
|
|
$4 = ($3|0)!=(0);
|
|
if ($4) {
|
|
$5 = HEAP32[12508>>2]|0;
|
|
_nk_layout_row_static($5,30.0,80,1);
|
|
$6 = HEAP32[12508>>2]|0;
|
|
$7 = (_nk_button_label($6,29334,0)|0);
|
|
$8 = ($7|0)!=(0);
|
|
if ($8) {
|
|
$9 = HEAP32[12664>>2]|0;
|
|
(_fprintf($9,29341,$vararg_buffer)|0);
|
|
}
|
|
$10 = HEAP32[12508>>2]|0;
|
|
_nk_layout_row_dynamic($10,30.0,2);
|
|
$11 = HEAP32[12508>>2]|0;
|
|
$12 = HEAP32[12512>>2]|0;
|
|
$13 = ($12|0)==(0);
|
|
$14 = $13&1;
|
|
$15 = (_nk_option_label($11,29357,$14)|0);
|
|
$16 = ($15|0)!=(0);
|
|
if ($16) {
|
|
HEAP32[12512>>2] = 0;
|
|
}
|
|
$17 = HEAP32[12508>>2]|0;
|
|
$18 = HEAP32[12512>>2]|0;
|
|
$19 = ($18|0)==(1);
|
|
$20 = $19&1;
|
|
$21 = (_nk_option_label($17,29362,$20)|0);
|
|
$22 = ($21|0)!=(0);
|
|
if ($22) {
|
|
HEAP32[12512>>2] = 1;
|
|
}
|
|
$23 = HEAP32[12508>>2]|0;
|
|
_nk_layout_row_dynamic($23,25.0,1);
|
|
$24 = HEAP32[12508>>2]|0;
|
|
_nk_property_int($24,29367,0,12516,100,10,1);
|
|
$25 = HEAP32[12508>>2]|0;
|
|
_nk_layout_row_dynamic($25,20.0,1);
|
|
$26 = HEAP32[12508>>2]|0;
|
|
_nk_label($26,29380,17);
|
|
$27 = HEAP32[12508>>2]|0;
|
|
_nk_layout_row_dynamic($27,25.0,1);
|
|
$28 = HEAP32[12508>>2]|0;
|
|
;HEAP8[$background$byval_copy>>0]=HEAP8[29392>>0]|0;HEAP8[$background$byval_copy+1>>0]=HEAP8[29392+1>>0]|0;HEAP8[$background$byval_copy+2>>0]=HEAP8[29392+2>>0]|0;HEAP8[$background$byval_copy+3>>0]=HEAP8[29392+3>>0]|0;
|
|
$29 = (_nk_combo_begin_color($28,$combo,$background$byval_copy,400)|0);
|
|
$30 = ($29|0)!=(0);
|
|
if ($30) {
|
|
$31 = HEAP32[12508>>2]|0;
|
|
_nk_layout_row_dynamic($31,120.0,1);
|
|
$32 = HEAP32[12508>>2]|0;
|
|
;HEAP8[$background$byval_copy1>>0]=HEAP8[29392>>0]|0;HEAP8[$background$byval_copy1+1>>0]=HEAP8[29392+1>>0]|0;HEAP8[$background$byval_copy1+2>>0]=HEAP8[29392+2>>0]|0;HEAP8[$background$byval_copy1+3>>0]=HEAP8[29392+3>>0]|0;
|
|
_nk_color_picker($1,$32,$background$byval_copy1,1);
|
|
;HEAP8[29392>>0]=HEAP8[$1>>0]|0;HEAP8[29392+1>>0]=HEAP8[$1+1>>0]|0;HEAP8[29392+2>>0]=HEAP8[$1+2>>0]|0;HEAP8[29392+3>>0]=HEAP8[$1+3>>0]|0;
|
|
$33 = HEAP32[12508>>2]|0;
|
|
_nk_layout_row_dynamic($33,25.0,1);
|
|
$34 = HEAP32[12508>>2]|0;
|
|
$35 = HEAP8[29392>>0]|0;
|
|
$36 = $35&255;
|
|
$37 = (_nk_propertyi($34,29396,0,$36,255,1,1)|0);
|
|
$38 = $37&255;
|
|
HEAP8[29392>>0] = $38;
|
|
$39 = HEAP32[12508>>2]|0;
|
|
$40 = HEAP8[(29393)>>0]|0;
|
|
$41 = $40&255;
|
|
$42 = (_nk_propertyi($39,29400,0,$41,255,1,1)|0);
|
|
$43 = $42&255;
|
|
HEAP8[(29393)>>0] = $43;
|
|
$44 = HEAP32[12508>>2]|0;
|
|
$45 = HEAP8[(29394)>>0]|0;
|
|
$46 = $45&255;
|
|
$47 = (_nk_propertyi($44,29404,0,$46,255,1,1)|0);
|
|
$48 = $47&255;
|
|
HEAP8[(29394)>>0] = $48;
|
|
$49 = HEAP32[12508>>2]|0;
|
|
$50 = HEAP8[(29395)>>0]|0;
|
|
$51 = $50&255;
|
|
$52 = (_nk_propertyi($49,29408,0,$51,255,1,1)|0);
|
|
$53 = $52&255;
|
|
HEAP8[(29395)>>0] = $53;
|
|
$54 = HEAP32[12508>>2]|0;
|
|
_nk_combo_end($54);
|
|
}
|
|
}
|
|
$55 = HEAP32[12508>>2]|0;
|
|
_nk_end($55);
|
|
;HEAP8[$background$byval_copy2>>0]=HEAP8[29392>>0]|0;HEAP8[$background$byval_copy2+1>>0]=HEAP8[29392+1>>0]|0;HEAP8[$background$byval_copy2+2>>0]=HEAP8[29392+2>>0]|0;HEAP8[$background$byval_copy2+3>>0]=HEAP8[29392+3>>0]|0;
|
|
_nk_color_fv($bg,$background$byval_copy2);
|
|
$56 = HEAP32[12520>>2]|0;
|
|
_glfwGetWindowSize(($56|0),(12500|0),(12504|0));
|
|
$57 = HEAP32[12500>>2]|0;
|
|
$58 = HEAP32[12504>>2]|0;
|
|
_glViewport(0,0,($57|0),($58|0));
|
|
_glClear(16384);
|
|
$59 = +HEAPF32[$bg>>2];
|
|
$60 = ((($bg)) + 4|0);
|
|
$61 = +HEAPF32[$60>>2];
|
|
$62 = ((($bg)) + 8|0);
|
|
$63 = +HEAPF32[$62>>2];
|
|
$64 = ((($bg)) + 12|0);
|
|
$65 = +HEAPF32[$64>>2];
|
|
_glClearColor((+$59),(+$61),(+$63),(+$65));
|
|
_nk_glfw3_render(1,524288,131072);
|
|
$66 = HEAP32[12520>>2]|0;
|
|
_glfwSwapBuffers(($66|0));
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _error_callback($error,$description) {
|
|
$error = $error|0;
|
|
$description = $description|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$vararg_buffer = sp;
|
|
$0 = $error;
|
|
$1 = $description;
|
|
$2 = HEAP32[12660>>2]|0;
|
|
$3 = $0;
|
|
$4 = $1;
|
|
HEAP32[$vararg_buffer>>2] = $3;
|
|
$vararg_ptr1 = ((($vararg_buffer)) + 4|0);
|
|
HEAP32[$vararg_ptr1>>2] = $4;
|
|
(_fprintf($2,29412,$vararg_buffer)|0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _windowSizeCallback($window,$width,$height) {
|
|
$window = $window|0;
|
|
$width = $width|0;
|
|
$height = $height|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $isInFullscreen = 0, $or$cond = 0, $or$cond3 = 0, $vararg_buffer = 0, $vararg_buffer4 = 0, label = 0;
|
|
var sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$vararg_buffer4 = sp + 8|0;
|
|
$vararg_buffer = sp;
|
|
$0 = $window;
|
|
$1 = $width;
|
|
$2 = $height;
|
|
$3 = _emscripten_asm_const_0(0)|0;
|
|
$isInFullscreen = $3;
|
|
$4 = $isInFullscreen;
|
|
$5 = ($4|0)==(0);
|
|
$6 = HEAP32[12496>>2]|0;
|
|
$7 = ($6|0)!=(0);
|
|
$or$cond = $5 | $7;
|
|
if (!($or$cond)) {
|
|
(_printf(29565,$vararg_buffer)|0);
|
|
$8 = $isInFullscreen;
|
|
HEAP32[12496>>2] = $8;
|
|
}
|
|
$9 = HEAP32[12496>>2]|0;
|
|
$10 = ($9|0)==(0);
|
|
$11 = $isInFullscreen;
|
|
$12 = ($11|0)!=(0);
|
|
$or$cond3 = $10 | $12;
|
|
if ($or$cond3) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
(_printf(29612,$vararg_buffer4)|0);
|
|
HEAP32[12492>>2] = 1;
|
|
$13 = $isInFullscreen;
|
|
HEAP32[12496>>2] = $13;
|
|
_emscripten_cancel_main_loop();
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _main() {
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $atlas = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$vararg_buffer1 = sp + 8|0;
|
|
$vararg_buffer = sp;
|
|
$atlas = sp + 12|0;
|
|
$1 = sp + 20|0;
|
|
$0 = 0;
|
|
(_glfwSetErrorCallback((17|0))|0);
|
|
$2 = (_glfwInit()|0);
|
|
$3 = ($2|0)!=(0);
|
|
if (!($3)) {
|
|
HEAP32[12492>>2] = 0;
|
|
(_printf(29648,$vararg_buffer)|0);
|
|
$0 = -1;
|
|
$11 = $0;
|
|
STACKTOP = sp;return ($11|0);
|
|
}
|
|
_glfwWindowHint(131075,1);
|
|
$4 = (_glfwCreateWindow(1024,1024,(29687|0),(0|0),(0|0))|0);
|
|
HEAP32[12520>>2] = $4;
|
|
$5 = HEAP32[12520>>2]|0;
|
|
$6 = ($5|0)!=(0|0);
|
|
if ($6) {
|
|
$7 = HEAP32[12520>>2]|0;
|
|
_glfwMakeContextCurrent(($7|0));
|
|
$8 = HEAP32[12520>>2]|0;
|
|
(_glfwSetWindowSizeCallback(($8|0),(18|0))|0);
|
|
$9 = HEAP32[12520>>2]|0;
|
|
$10 = (_nk_glfw3_init($9,1)|0);
|
|
HEAP32[12508>>2] = $10;
|
|
_nk_glfw3_font_stash_begin($atlas);
|
|
_nk_glfw3_font_stash_end();
|
|
_nk_rgb($1,190,205,255);
|
|
;HEAP8[29392>>0]=HEAP8[$1>>0]|0;HEAP8[29392+1>>0]=HEAP8[$1+1>>0]|0;HEAP8[29392+2>>0]=HEAP8[$1+2>>0]|0;HEAP8[29392+3>>0]=HEAP8[$1+3>>0]|0;
|
|
_emscripten_set_main_loop((19|0),0,1);
|
|
_nk_glfw3_shutdown();
|
|
_glfwTerminate();
|
|
$0 = 0;
|
|
$11 = $0;
|
|
STACKTOP = sp;return ($11|0);
|
|
} else {
|
|
HEAP32[12492>>2] = 0;
|
|
(_printf(29648,$vararg_buffer1)|0);
|
|
_glfwTerminate();
|
|
$0 = -1;
|
|
$11 = $0;
|
|
STACKTOP = sp;return ($11|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_memset($ptr,$c0,$size) {
|
|
$ptr = $ptr|0;
|
|
$c0 = $c0|0;
|
|
$size = $size|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, $c = 0, $dst = 0, $t = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ptr;
|
|
$1 = $c0;
|
|
$2 = $size;
|
|
$3 = $0;
|
|
$dst = $3;
|
|
$c = 0;
|
|
$t = 0;
|
|
$4 = $1;
|
|
$5 = $4&255;
|
|
$6 = $5&255;
|
|
$c = $6;
|
|
$7 = ($6|0)!=(0);
|
|
if ($7) {
|
|
$8 = $c;
|
|
$9 = $8 << 8;
|
|
$10 = $c;
|
|
$11 = $9 | $10;
|
|
$c = $11;
|
|
$12 = $c;
|
|
$13 = $12 << 16;
|
|
$14 = $c;
|
|
$15 = $13 | $14;
|
|
$c = $15;
|
|
}
|
|
$16 = $0;
|
|
$dst = $16;
|
|
$17 = $2;
|
|
$18 = ($17>>>0)<(12);
|
|
if ($18) {
|
|
while(1) {
|
|
$19 = $2;
|
|
$20 = (($19) + -1)|0;
|
|
$2 = $20;
|
|
$21 = ($19|0)!=(0);
|
|
if (!($21)) {
|
|
break;
|
|
}
|
|
$22 = $1;
|
|
$23 = $22&255;
|
|
$24 = $dst;
|
|
$25 = ((($24)) + 1|0);
|
|
$dst = $25;
|
|
HEAP8[$24>>0] = $23;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
$26 = $dst;
|
|
$27 = $26;
|
|
$28 = $27 & 3;
|
|
$t = $28;
|
|
$29 = ($28|0)!=(0);
|
|
if ($29) {
|
|
$30 = $t;
|
|
$31 = (4 - ($30))|0;
|
|
$t = $31;
|
|
$32 = $t;
|
|
$33 = $2;
|
|
$34 = (($33) - ($32))|0;
|
|
$2 = $34;
|
|
while(1) {
|
|
$35 = $1;
|
|
$36 = $35&255;
|
|
$37 = $dst;
|
|
$38 = ((($37)) + 1|0);
|
|
$dst = $38;
|
|
HEAP8[$37>>0] = $36;
|
|
$39 = $t;
|
|
$40 = (($39) + -1)|0;
|
|
$t = $40;
|
|
$41 = ($40|0)!=(0);
|
|
if (!($41)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
$42 = $2;
|
|
$43 = (($42>>>0) / 4)&-1;
|
|
$t = $43;
|
|
while(1) {
|
|
$44 = $c;
|
|
$45 = $dst;
|
|
HEAP32[$45>>2] = $44;
|
|
$46 = $dst;
|
|
$47 = ((($46)) + 4|0);
|
|
$dst = $47;
|
|
$48 = $t;
|
|
$49 = (($48) + -1)|0;
|
|
$t = $49;
|
|
$50 = ($49|0)!=(0);
|
|
if (!($50)) {
|
|
break;
|
|
}
|
|
}
|
|
$51 = $2;
|
|
$52 = $51 & 3;
|
|
$t = $52;
|
|
$53 = $t;
|
|
$54 = ($53|0)!=(0);
|
|
if (!($54)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
while(1) {
|
|
$55 = $1;
|
|
$56 = $55&255;
|
|
$57 = $dst;
|
|
$58 = ((($57)) + 1|0);
|
|
$dst = $58;
|
|
HEAP8[$57>>0] = $56;
|
|
$59 = $t;
|
|
$60 = (($59) + -1)|0;
|
|
$t = $60;
|
|
$61 = ($60|0)!=(0);
|
|
if (!($61)) {
|
|
break;
|
|
}
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_buffer_align($unaligned,$align,$alignment,$type) {
|
|
$unaligned = $unaligned|0;
|
|
$align = $align|0;
|
|
$alignment = $alignment|0;
|
|
$type = $type|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cond = 0, $memory = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $unaligned;
|
|
$1 = $align;
|
|
$2 = $alignment;
|
|
$3 = $type;
|
|
$memory = 0;
|
|
$4 = $3;
|
|
$cond = ($4|0)==(1);
|
|
$5 = $1;
|
|
$6 = ($5|0)!=(0);
|
|
$7 = $0;
|
|
if ($cond) {
|
|
if ($6) {
|
|
$24 = $7;
|
|
$25 = $1;
|
|
$26 = (($25) - 1)|0;
|
|
$27 = $26 ^ -1;
|
|
$28 = $24 & $27;
|
|
$29 = $28;
|
|
$memory = $29;
|
|
$30 = $0;
|
|
$31 = $memory;
|
|
$32 = $30;
|
|
$33 = $31;
|
|
$34 = (($32) - ($33))|0;
|
|
$35 = $2;
|
|
HEAP32[$35>>2] = $34;
|
|
$37 = $memory;
|
|
STACKTOP = sp;return ($37|0);
|
|
} else {
|
|
$memory = $7;
|
|
$36 = $2;
|
|
HEAP32[$36>>2] = 0;
|
|
$37 = $memory;
|
|
STACKTOP = sp;return ($37|0);
|
|
}
|
|
} else {
|
|
if ($6) {
|
|
$8 = $1;
|
|
$9 = (($8) - 1)|0;
|
|
$10 = (($7) + ($9)|0);
|
|
$11 = $10;
|
|
$12 = $1;
|
|
$13 = (($12) - 1)|0;
|
|
$14 = $13 ^ -1;
|
|
$15 = $11 & $14;
|
|
$16 = $15;
|
|
$memory = $16;
|
|
$17 = $memory;
|
|
$18 = $0;
|
|
$19 = $17;
|
|
$20 = $18;
|
|
$21 = (($19) - ($20))|0;
|
|
$22 = $2;
|
|
HEAP32[$22>>2] = $21;
|
|
$37 = $memory;
|
|
STACKTOP = sp;return ($37|0);
|
|
} else {
|
|
$memory = $7;
|
|
$23 = $2;
|
|
HEAP32[$23>>2] = 0;
|
|
$37 = $memory;
|
|
STACKTOP = sp;return ($37|0);
|
|
}
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_buffer_realloc($b,$capacity,$size) {
|
|
$b = $b|0;
|
|
$capacity = $capacity|0;
|
|
$size = $size|0;
|
|
var $$byval_copy = 0, $$byval_copy2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
|
|
var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
|
|
var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
|
|
var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0;
|
|
var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $back_size = 0, $buffer_size = 0;
|
|
var $dst = 0, $or$cond = 0, $src = 0, $temp = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy2 = sp + 40|0;
|
|
$$byval_copy = sp + 36|0;
|
|
$1 = $b;
|
|
$2 = $capacity;
|
|
$3 = $size;
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((13556|0),(13400|0),4305,(29847|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $3;
|
|
$7 = ($6|0)!=(0|0);
|
|
if (!($7)) {
|
|
___assert_fail((13611|0),(13400|0),4306,(29847|0));
|
|
// unreachable;
|
|
}
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
$10 = $3;
|
|
$11 = ($10|0)!=(0|0);
|
|
$or$cond = $9 & $11;
|
|
if ($or$cond) {
|
|
$12 = $1;
|
|
$13 = ((($12)) + 16|0);
|
|
$14 = ((($13)) + 4|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($15|0)!=(0|0);
|
|
if ($16) {
|
|
$17 = $1;
|
|
$18 = ((($17)) + 16|0);
|
|
$19 = ((($18)) + 8|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = ($20|0)!=(0|0);
|
|
if ($21) {
|
|
$22 = $1;
|
|
$23 = ((($22)) + 32|0);
|
|
$24 = ((($23)) + 4|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$buffer_size = $25;
|
|
$26 = $1;
|
|
$27 = ((($26)) + 16|0);
|
|
$28 = ((($27)) + 4|0);
|
|
$29 = HEAP32[$28>>2]|0;
|
|
$30 = $1;
|
|
$31 = ((($30)) + 16|0);
|
|
$32 = $1;
|
|
$33 = ((($32)) + 32|0);
|
|
$34 = HEAP32[$33>>2]|0;
|
|
$35 = $2;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$31>>2]|0;
|
|
$36 = (FUNCTION_TABLE_iiii[$29 & 7]($$byval_copy,$34,$35)|0);
|
|
$temp = $36;
|
|
$37 = $temp;
|
|
$38 = ($37|0)!=(0|0);
|
|
if (!($38)) {
|
|
___assert_fail((15034|0),(13400|0),4312,(29847|0));
|
|
// unreachable;
|
|
}
|
|
$39 = $temp;
|
|
$40 = ($39|0)!=(0|0);
|
|
if (!($40)) {
|
|
$0 = 0;
|
|
$95 = $0;
|
|
STACKTOP = sp;return ($95|0);
|
|
}
|
|
$41 = $2;
|
|
$42 = $3;
|
|
HEAP32[$42>>2] = $41;
|
|
$43 = $temp;
|
|
$44 = $1;
|
|
$45 = ((($44)) + 32|0);
|
|
$46 = HEAP32[$45>>2]|0;
|
|
$47 = ($43|0)!=($46|0);
|
|
if ($47) {
|
|
$48 = $temp;
|
|
$49 = $1;
|
|
$50 = ((($49)) + 32|0);
|
|
$51 = HEAP32[$50>>2]|0;
|
|
$52 = $buffer_size;
|
|
(_nk_memcopy($48,$51,$52)|0);
|
|
$53 = $1;
|
|
$54 = ((($53)) + 16|0);
|
|
$55 = ((($54)) + 8|0);
|
|
$56 = HEAP32[$55>>2]|0;
|
|
$57 = $1;
|
|
$58 = ((($57)) + 16|0);
|
|
$59 = $1;
|
|
$60 = ((($59)) + 32|0);
|
|
$61 = HEAP32[$60>>2]|0;
|
|
;HEAP32[$$byval_copy2>>2]=HEAP32[$58>>2]|0;
|
|
FUNCTION_TABLE_vii[$56 & 31]($$byval_copy2,$61);
|
|
}
|
|
$62 = $1;
|
|
$63 = ((($62)) + 56|0);
|
|
$64 = HEAP32[$63>>2]|0;
|
|
$65 = $buffer_size;
|
|
$66 = ($64|0)==($65|0);
|
|
if ($66) {
|
|
$67 = $2;
|
|
$68 = $1;
|
|
$69 = ((($68)) + 56|0);
|
|
HEAP32[$69>>2] = $67;
|
|
$70 = $temp;
|
|
$0 = $70;
|
|
$95 = $0;
|
|
STACKTOP = sp;return ($95|0);
|
|
} else {
|
|
$71 = $buffer_size;
|
|
$72 = $1;
|
|
$73 = ((($72)) + 56|0);
|
|
$74 = HEAP32[$73>>2]|0;
|
|
$75 = (($71) - ($74))|0;
|
|
$back_size = $75;
|
|
$76 = $temp;
|
|
$77 = $2;
|
|
$78 = $back_size;
|
|
$79 = (($77) - ($78))|0;
|
|
$80 = (($76) + ($79)|0);
|
|
$dst = $80;
|
|
$81 = $temp;
|
|
$82 = $1;
|
|
$83 = ((($82)) + 56|0);
|
|
$84 = HEAP32[$83>>2]|0;
|
|
$85 = (($81) + ($84)|0);
|
|
$src = $85;
|
|
$86 = $dst;
|
|
$87 = $src;
|
|
$88 = $back_size;
|
|
(_nk_memcopy($86,$87,$88)|0);
|
|
$89 = $2;
|
|
$90 = $back_size;
|
|
$91 = (($89) - ($90))|0;
|
|
$92 = $1;
|
|
$93 = ((($92)) + 56|0);
|
|
HEAP32[$93>>2] = $91;
|
|
$94 = $temp;
|
|
$0 = $94;
|
|
$95 = $0;
|
|
STACKTOP = sp;return ($95|0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$95 = $0;
|
|
STACKTOP = sp;return ($95|0);
|
|
}
|
|
function _nk_draw_list_push_command($list,$clip,$texture) {
|
|
$list = $list|0;
|
|
$clip = $clip|0;
|
|
$texture = $texture|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cmd = 0, $memory = 0, $total = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $list;
|
|
$2 = $1;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((14300|0),(13400|0),5574,(29974|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $1;
|
|
$5 = ((($4)) + 40|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$7 = (_nk_buffer_alloc($6,1,24,4)|0);
|
|
$cmd = $7;
|
|
$8 = $cmd;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
$0 = 0;
|
|
$44 = $0;
|
|
STACKTOP = sp;return ($44|0);
|
|
}
|
|
$10 = $1;
|
|
$11 = ((($10)) + 64|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ($12|0)!=(0);
|
|
if (!($13)) {
|
|
$14 = $1;
|
|
$15 = ((($14)) + 40|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = (_nk_buffer_memory($16)|0);
|
|
$memory = $17;
|
|
$18 = $1;
|
|
$19 = ((($18)) + 40|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = (_nk_buffer_total($20)|0);
|
|
$total = $21;
|
|
$22 = $memory;
|
|
$23 = $total;
|
|
$24 = (($22) + ($23)|0);
|
|
$memory = $24;
|
|
$25 = $memory;
|
|
$26 = $cmd;
|
|
$27 = $25;
|
|
$28 = $26;
|
|
$29 = (($27) - ($28))|0;
|
|
$30 = $1;
|
|
$31 = ((($30)) + 60|0);
|
|
HEAP32[$31>>2] = $29;
|
|
}
|
|
$32 = $cmd;
|
|
HEAP32[$32>>2] = 0;
|
|
$33 = $cmd;
|
|
$34 = ((($33)) + 4|0);
|
|
;HEAP32[$34>>2]=HEAP32[$clip>>2]|0;HEAP32[$34+4>>2]=HEAP32[$clip+4>>2]|0;HEAP32[$34+8>>2]=HEAP32[$clip+8>>2]|0;HEAP32[$34+12>>2]=HEAP32[$clip+12>>2]|0;
|
|
$35 = $cmd;
|
|
$36 = ((($35)) + 20|0);
|
|
;HEAP32[$36>>2]=HEAP32[$texture>>2]|0;
|
|
$37 = $1;
|
|
$38 = ((($37)) + 64|0);
|
|
$39 = HEAP32[$38>>2]|0;
|
|
$40 = (($39) + 1)|0;
|
|
HEAP32[$38>>2] = $40;
|
|
$41 = $1;
|
|
$42 = ((($41)) + 24|0);
|
|
;HEAP32[$42>>2]=HEAP32[$clip>>2]|0;HEAP32[$42+4>>2]=HEAP32[$clip+4>>2]|0;HEAP32[$42+8>>2]=HEAP32[$clip+8>>2]|0;HEAP32[$42+12>>2]=HEAP32[$clip+12>>2]|0;
|
|
$43 = $cmd;
|
|
$0 = $43;
|
|
$44 = $0;
|
|
STACKTOP = sp;return ($44|0);
|
|
}
|
|
function _nk_tt__find_table($data,$fontstart,$tag) {
|
|
$data = $data|0;
|
|
$fontstart = $fontstart|0;
|
|
$tag = $tag|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $loc = 0, $num_tables = 0, $tabledir = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $data;
|
|
$2 = $fontstart;
|
|
$3 = $tag;
|
|
$4 = $1;
|
|
$5 = $2;
|
|
$6 = (($4) + ($5)|0);
|
|
$7 = ((($6)) + 4|0);
|
|
$8 = (_nk_ttUSHORT($7)|0);
|
|
$9 = $8&65535;
|
|
$num_tables = $9;
|
|
$10 = $2;
|
|
$11 = (($10) + 12)|0;
|
|
$tabledir = $11;
|
|
$i = 0;
|
|
while(1) {
|
|
$12 = $i;
|
|
$13 = $num_tables;
|
|
$14 = ($12|0)<($13|0);
|
|
if (!($14)) {
|
|
label = 9;
|
|
break;
|
|
}
|
|
$15 = $tabledir;
|
|
$16 = $i;
|
|
$17 = $16<<4;
|
|
$18 = (($15) + ($17))|0;
|
|
$loc = $18;
|
|
$19 = $1;
|
|
$20 = $loc;
|
|
$21 = (($19) + ($20)|0);
|
|
$22 = HEAP8[$21>>0]|0;
|
|
$23 = $22&255;
|
|
$24 = $3;
|
|
$25 = HEAP8[$24>>0]|0;
|
|
$26 = $25 << 24 >> 24;
|
|
$27 = ($23|0)==($26|0);
|
|
if ($27) {
|
|
$28 = $1;
|
|
$29 = $loc;
|
|
$30 = (($28) + ($29)|0);
|
|
$31 = ((($30)) + 1|0);
|
|
$32 = HEAP8[$31>>0]|0;
|
|
$33 = $32&255;
|
|
$34 = $3;
|
|
$35 = ((($34)) + 1|0);
|
|
$36 = HEAP8[$35>>0]|0;
|
|
$37 = $36 << 24 >> 24;
|
|
$38 = ($33|0)==($37|0);
|
|
if ($38) {
|
|
$39 = $1;
|
|
$40 = $loc;
|
|
$41 = (($39) + ($40)|0);
|
|
$42 = ((($41)) + 2|0);
|
|
$43 = HEAP8[$42>>0]|0;
|
|
$44 = $43&255;
|
|
$45 = $3;
|
|
$46 = ((($45)) + 2|0);
|
|
$47 = HEAP8[$46>>0]|0;
|
|
$48 = $47 << 24 >> 24;
|
|
$49 = ($44|0)==($48|0);
|
|
if ($49) {
|
|
$50 = $1;
|
|
$51 = $loc;
|
|
$52 = (($50) + ($51)|0);
|
|
$53 = ((($52)) + 3|0);
|
|
$54 = HEAP8[$53>>0]|0;
|
|
$55 = $54&255;
|
|
$56 = $3;
|
|
$57 = ((($56)) + 3|0);
|
|
$58 = HEAP8[$57>>0]|0;
|
|
$59 = $58 << 24 >> 24;
|
|
$60 = ($55|0)==($59|0);
|
|
if ($60) {
|
|
label = 7;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$66 = $i;
|
|
$67 = (($66) + 1)|0;
|
|
$i = $67;
|
|
}
|
|
if ((label|0) == 7) {
|
|
$61 = $1;
|
|
$62 = $loc;
|
|
$63 = (($61) + ($62)|0);
|
|
$64 = ((($63)) + 8|0);
|
|
$65 = (_nk_ttULONG($64)|0);
|
|
$0 = $65;
|
|
$68 = $0;
|
|
STACKTOP = sp;return ($68|0);
|
|
}
|
|
else if ((label|0) == 9) {
|
|
$0 = 0;
|
|
$68 = $0;
|
|
STACKTOP = sp;return ($68|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_ttUSHORT($p) {
|
|
$p = $p|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $p;
|
|
$1 = $0;
|
|
$2 = HEAP8[$1>>0]|0;
|
|
$3 = $2&255;
|
|
$4 = $3<<8;
|
|
$5 = $0;
|
|
$6 = ((($5)) + 1|0);
|
|
$7 = HEAP8[$6>>0]|0;
|
|
$8 = $7&255;
|
|
$9 = (($4) + ($8))|0;
|
|
$10 = $9&65535;
|
|
STACKTOP = sp;return ($10|0);
|
|
}
|
|
function _nk_ttULONG($p) {
|
|
$p = $p|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $p;
|
|
$1 = $0;
|
|
$2 = HEAP8[$1>>0]|0;
|
|
$3 = $2&255;
|
|
$4 = $3 << 24;
|
|
$5 = $0;
|
|
$6 = ((($5)) + 1|0);
|
|
$7 = HEAP8[$6>>0]|0;
|
|
$8 = $7&255;
|
|
$9 = $8 << 16;
|
|
$10 = (($4) + ($9))|0;
|
|
$11 = $0;
|
|
$12 = ((($11)) + 2|0);
|
|
$13 = HEAP8[$12>>0]|0;
|
|
$14 = $13&255;
|
|
$15 = $14 << 8;
|
|
$16 = (($10) + ($15))|0;
|
|
$17 = $0;
|
|
$18 = ((($17)) + 3|0);
|
|
$19 = HEAP8[$18>>0]|0;
|
|
$20 = $19&255;
|
|
$21 = (($16) + ($20))|0;
|
|
STACKTOP = sp;return ($21|0);
|
|
}
|
|
function _nk_rp_init_target($context,$width,$height,$nodes,$num_nodes) {
|
|
$context = $context|0;
|
|
$width = $width|0;
|
|
$height = $height|0;
|
|
$nodes = $nodes|0;
|
|
$num_nodes = $num_nodes|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $or$cond = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $context;
|
|
$1 = $width;
|
|
$2 = $height;
|
|
$3 = $nodes;
|
|
$4 = $num_nodes;
|
|
$5 = $1;
|
|
$6 = ($5|0)<=(65535);
|
|
$7 = $2;
|
|
$8 = ($7|0)<=(65535);
|
|
$or$cond = $6 & $8;
|
|
if (!($or$cond)) {
|
|
___assert_fail((30204|0),(13400|0),6676,(30240|0));
|
|
// unreachable;
|
|
}
|
|
$i = 0;
|
|
while(1) {
|
|
$9 = $i;
|
|
$10 = $4;
|
|
$11 = (($10) - 1)|0;
|
|
$12 = ($9|0)<($11|0);
|
|
$13 = $i;
|
|
if (!($12)) {
|
|
break;
|
|
}
|
|
$14 = (($13) + 1)|0;
|
|
$15 = $3;
|
|
$16 = (($15) + ($14<<3)|0);
|
|
$17 = $i;
|
|
$18 = $3;
|
|
$19 = (($18) + ($17<<3)|0);
|
|
$20 = ((($19)) + 4|0);
|
|
HEAP32[$20>>2] = $16;
|
|
$21 = $i;
|
|
$22 = (($21) + 1)|0;
|
|
$i = $22;
|
|
}
|
|
$23 = $3;
|
|
$24 = (($23) + ($13<<3)|0);
|
|
$25 = ((($24)) + 4|0);
|
|
HEAP32[$25>>2] = 0;
|
|
$26 = $0;
|
|
$27 = ((($26)) + 12|0);
|
|
HEAP32[$27>>2] = 1;
|
|
$28 = $0;
|
|
$29 = ((($28)) + 16|0);
|
|
HEAP32[$29>>2] = 0;
|
|
$30 = $3;
|
|
$31 = $0;
|
|
$32 = ((($31)) + 28|0);
|
|
HEAP32[$32>>2] = $30;
|
|
$33 = $0;
|
|
$34 = ((($33)) + 32|0);
|
|
$35 = $0;
|
|
$36 = ((($35)) + 24|0);
|
|
HEAP32[$36>>2] = $34;
|
|
$37 = $1;
|
|
$38 = $0;
|
|
HEAP32[$38>>2] = $37;
|
|
$39 = $2;
|
|
$40 = $0;
|
|
$41 = ((($40)) + 4|0);
|
|
HEAP32[$41>>2] = $39;
|
|
$42 = $4;
|
|
$43 = $0;
|
|
$44 = ((($43)) + 20|0);
|
|
HEAP32[$44>>2] = $42;
|
|
$45 = $0;
|
|
_nk_rp_setup_allow_out_of_mem($45,0);
|
|
$46 = $0;
|
|
$47 = ((($46)) + 32|0);
|
|
HEAP16[$47>>1] = 0;
|
|
$48 = $0;
|
|
$49 = ((($48)) + 32|0);
|
|
$50 = ((($49)) + 2|0);
|
|
HEAP16[$50>>1] = 0;
|
|
$51 = $0;
|
|
$52 = ((($51)) + 32|0);
|
|
$53 = ((($52)) + 8|0);
|
|
$54 = $0;
|
|
$55 = ((($54)) + 32|0);
|
|
$56 = ((($55)) + 4|0);
|
|
HEAP32[$56>>2] = $53;
|
|
$57 = $1;
|
|
$58 = $57&65535;
|
|
$59 = $0;
|
|
$60 = ((($59)) + 32|0);
|
|
$61 = ((($60)) + 8|0);
|
|
HEAP16[$61>>1] = $58;
|
|
$62 = $0;
|
|
$63 = ((($62)) + 32|0);
|
|
$64 = ((($63)) + 8|0);
|
|
$65 = ((($64)) + 2|0);
|
|
HEAP16[$65>>1] = -1;
|
|
$66 = $0;
|
|
$67 = ((($66)) + 32|0);
|
|
$68 = ((($67)) + 8|0);
|
|
$69 = ((($68)) + 4|0);
|
|
HEAP32[$69>>2] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_rp_setup_allow_out_of_mem($context,$allow_out_of_mem) {
|
|
$context = $context|0;
|
|
$allow_out_of_mem = $allow_out_of_mem|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $context;
|
|
$1 = $allow_out_of_mem;
|
|
$2 = $1;
|
|
$3 = ($2|0)!=(0);
|
|
$4 = $0;
|
|
if ($3) {
|
|
$5 = ((($4)) + 8|0);
|
|
HEAP32[$5>>2] = 1;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$6 = HEAP32[$4>>2]|0;
|
|
$7 = $0;
|
|
$8 = ((($7)) + 20|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = (($6) + ($9))|0;
|
|
$11 = (($10) - 1)|0;
|
|
$12 = $0;
|
|
$13 = ((($12)) + 20|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = (($11|0) / ($14|0))&-1;
|
|
$16 = $0;
|
|
$17 = ((($16)) + 8|0);
|
|
HEAP32[$17>>2] = $15;
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_rp_qsort($array,$len,$cmp) {
|
|
$array = $array|0;
|
|
$len = $len|0;
|
|
$cmp = $cmp|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $7 = 0, $8 = 0, $9 = 0, $left = 0, $pivot = 0, $pos = 0, $right = 0, $seed = 0, $stack = 0, $tmp = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 320|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$stack = sp + 40|0;
|
|
$pivot = sp + 16|0;
|
|
$tmp = sp;
|
|
$0 = $array;
|
|
$1 = $len;
|
|
$2 = $cmp;
|
|
$left = 0;
|
|
$pos = 0;
|
|
$3 = $1;
|
|
$4 = (($3>>>0) / 2)&-1;
|
|
$5 = ($4*69069)|0;
|
|
$6 = (($5) + 1)|0;
|
|
$seed = $6;
|
|
while(1) {
|
|
$7 = $left;
|
|
$8 = (($7) + 1)|0;
|
|
$9 = $1;
|
|
$10 = ($8>>>0)<($9>>>0);
|
|
$11 = $pos;
|
|
if (!($10)) {
|
|
$63 = ($11|0)==(0);
|
|
if ($63) {
|
|
break;
|
|
}
|
|
$64 = $1;
|
|
$left = $64;
|
|
$65 = $pos;
|
|
$66 = (($65) + -1)|0;
|
|
$pos = $66;
|
|
$67 = (($stack) + ($66<<2)|0);
|
|
$68 = HEAP32[$67>>2]|0;
|
|
$1 = $68;
|
|
continue;
|
|
}
|
|
$12 = ($11|0)==(64);
|
|
if ($12) {
|
|
$pos = 0;
|
|
$13 = HEAP32[$stack>>2]|0;
|
|
$1 = $13;
|
|
}
|
|
$14 = $left;
|
|
$15 = $seed;
|
|
$16 = $1;
|
|
$17 = $left;
|
|
$18 = (($16) - ($17))|0;
|
|
$19 = (($15>>>0) % ($18>>>0))&-1;
|
|
$20 = (($14) + ($19))|0;
|
|
$21 = $0;
|
|
$22 = (($21) + ($20<<4)|0);
|
|
;HEAP32[$pivot>>2]=HEAP32[$22>>2]|0;HEAP32[$pivot+4>>2]=HEAP32[$22+4>>2]|0;HEAP32[$pivot+8>>2]=HEAP32[$22+8>>2]|0;HEAP32[$pivot+12>>2]=HEAP32[$22+12>>2]|0;
|
|
$23 = $seed;
|
|
$24 = ($23*69069)|0;
|
|
$25 = (($24) + 1)|0;
|
|
$seed = $25;
|
|
$26 = $1;
|
|
$27 = $pos;
|
|
$28 = (($27) + 1)|0;
|
|
$pos = $28;
|
|
$29 = (($stack) + ($27<<2)|0);
|
|
HEAP32[$29>>2] = $26;
|
|
$30 = $left;
|
|
$31 = (($30) - 1)|0;
|
|
$right = $31;
|
|
while(1) {
|
|
$32 = $2;
|
|
$33 = $right;
|
|
$34 = (($33) + 1)|0;
|
|
$right = $34;
|
|
$35 = $0;
|
|
$36 = (($35) + ($34<<4)|0);
|
|
$37 = (FUNCTION_TABLE_iii[$32 & 15]($36,$pivot)|0);
|
|
$38 = ($37|0)<(0);
|
|
if ($38) {
|
|
continue;
|
|
}
|
|
while(1) {
|
|
$39 = $2;
|
|
$40 = $1;
|
|
$41 = (($40) + -1)|0;
|
|
$1 = $41;
|
|
$42 = $0;
|
|
$43 = (($42) + ($41<<4)|0);
|
|
$44 = (FUNCTION_TABLE_iii[$39 & 15]($pivot,$43)|0);
|
|
$45 = ($44|0)<(0);
|
|
if (!($45)) {
|
|
break;
|
|
}
|
|
}
|
|
$46 = $right;
|
|
$47 = $1;
|
|
$48 = ($46>>>0)>=($47>>>0);
|
|
if ($48) {
|
|
break;
|
|
}
|
|
$49 = $right;
|
|
$50 = $0;
|
|
$51 = (($50) + ($49<<4)|0);
|
|
;HEAP32[$tmp>>2]=HEAP32[$51>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$51+4>>2]|0;HEAP32[$tmp+8>>2]=HEAP32[$51+8>>2]|0;HEAP32[$tmp+12>>2]=HEAP32[$51+12>>2]|0;
|
|
$52 = $right;
|
|
$53 = $0;
|
|
$54 = (($53) + ($52<<4)|0);
|
|
$55 = $1;
|
|
$56 = $0;
|
|
$57 = (($56) + ($55<<4)|0);
|
|
;HEAP32[$54>>2]=HEAP32[$57>>2]|0;HEAP32[$54+4>>2]=HEAP32[$57+4>>2]|0;HEAP32[$54+8>>2]=HEAP32[$57+8>>2]|0;HEAP32[$54+12>>2]=HEAP32[$57+12>>2]|0;
|
|
$58 = $1;
|
|
$59 = $0;
|
|
$60 = (($59) + ($58<<4)|0);
|
|
;HEAP32[$60>>2]=HEAP32[$tmp>>2]|0;HEAP32[$60+4>>2]=HEAP32[$tmp+4>>2]|0;HEAP32[$60+8>>2]=HEAP32[$tmp+8>>2]|0;HEAP32[$60+12>>2]=HEAP32[$tmp+12>>2]|0;
|
|
}
|
|
$61 = $1;
|
|
$62 = (($61) + 1)|0;
|
|
$1 = $62;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_rect_height_compare($a,$b) {
|
|
$a = $a|0;
|
|
$b = $b|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0;
|
|
var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $p = 0, $q = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $a;
|
|
$2 = $b;
|
|
$3 = $1;
|
|
$p = $3;
|
|
$4 = $2;
|
|
$q = $4;
|
|
$5 = $p;
|
|
$6 = ((($5)) + 6|0);
|
|
$7 = HEAP16[$6>>1]|0;
|
|
$8 = $7&65535;
|
|
$9 = $q;
|
|
$10 = ((($9)) + 6|0);
|
|
$11 = HEAP16[$10>>1]|0;
|
|
$12 = $11&65535;
|
|
$13 = ($8|0)>($12|0);
|
|
if ($13) {
|
|
$0 = -1;
|
|
$43 = $0;
|
|
STACKTOP = sp;return ($43|0);
|
|
}
|
|
$14 = $p;
|
|
$15 = ((($14)) + 6|0);
|
|
$16 = HEAP16[$15>>1]|0;
|
|
$17 = $16&65535;
|
|
$18 = $q;
|
|
$19 = ((($18)) + 6|0);
|
|
$20 = HEAP16[$19>>1]|0;
|
|
$21 = $20&65535;
|
|
$22 = ($17|0)<($21|0);
|
|
if ($22) {
|
|
$0 = 1;
|
|
$43 = $0;
|
|
STACKTOP = sp;return ($43|0);
|
|
}
|
|
$23 = $p;
|
|
$24 = ((($23)) + 4|0);
|
|
$25 = HEAP16[$24>>1]|0;
|
|
$26 = $25&65535;
|
|
$27 = $q;
|
|
$28 = ((($27)) + 4|0);
|
|
$29 = HEAP16[$28>>1]|0;
|
|
$30 = $29&65535;
|
|
$31 = ($26|0)>($30|0);
|
|
if ($31) {
|
|
$42 = -1;
|
|
} else {
|
|
$32 = $p;
|
|
$33 = ((($32)) + 4|0);
|
|
$34 = HEAP16[$33>>1]|0;
|
|
$35 = $34&65535;
|
|
$36 = $q;
|
|
$37 = ((($36)) + 4|0);
|
|
$38 = HEAP16[$37>>1]|0;
|
|
$39 = $38&65535;
|
|
$40 = ($35|0)<($39|0);
|
|
$41 = $40&1;
|
|
$42 = $41;
|
|
}
|
|
$0 = $42;
|
|
$43 = $0;
|
|
STACKTOP = sp;return ($43|0);
|
|
}
|
|
function _nk_rp__skyline_pack_rectangle($agg$result,$context,$width,$height) {
|
|
$agg$result = $agg$result|0;
|
|
$context = $context|0;
|
|
$width = $width|0;
|
|
$height = $height|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
|
|
var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $cur = 0, $next = 0;
|
|
var $next1 = 0, $node = 0, $res = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$res = sp + 16|0;
|
|
$0 = $context;
|
|
$1 = $width;
|
|
$2 = $height;
|
|
$3 = $0;
|
|
$4 = $1;
|
|
$5 = $2;
|
|
_nk_rp__skyline_find_best_pos($res,$3,$4,$5);
|
|
$6 = ((($res)) + 8|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = ($7|0)==(0|0);
|
|
if (!($8)) {
|
|
$9 = ((($res)) + 4|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = $2;
|
|
$12 = (($10) + ($11))|0;
|
|
$13 = $0;
|
|
$14 = ((($13)) + 4|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($12|0)>($15|0);
|
|
if (!($16)) {
|
|
$17 = $0;
|
|
$18 = ((($17)) + 28|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = ($19|0)==(0|0);
|
|
if (!($20)) {
|
|
$22 = $0;
|
|
$23 = ((($22)) + 28|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$node = $24;
|
|
$25 = HEAP32[$res>>2]|0;
|
|
$26 = $25&65535;
|
|
$27 = $node;
|
|
HEAP16[$27>>1] = $26;
|
|
$28 = ((($res)) + 4|0);
|
|
$29 = HEAP32[$28>>2]|0;
|
|
$30 = $2;
|
|
$31 = (($29) + ($30))|0;
|
|
$32 = $31&65535;
|
|
$33 = $node;
|
|
$34 = ((($33)) + 2|0);
|
|
HEAP16[$34>>1] = $32;
|
|
$35 = $node;
|
|
$36 = ((($35)) + 4|0);
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$38 = $0;
|
|
$39 = ((($38)) + 28|0);
|
|
HEAP32[$39>>2] = $37;
|
|
$40 = ((($res)) + 8|0);
|
|
$41 = HEAP32[$40>>2]|0;
|
|
$42 = HEAP32[$41>>2]|0;
|
|
$cur = $42;
|
|
$43 = $cur;
|
|
$44 = HEAP16[$43>>1]|0;
|
|
$45 = $44&65535;
|
|
$46 = HEAP32[$res>>2]|0;
|
|
$47 = ($45|0)<($46|0);
|
|
if ($47) {
|
|
$48 = $cur;
|
|
$49 = ((($48)) + 4|0);
|
|
$50 = HEAP32[$49>>2]|0;
|
|
$next = $50;
|
|
$51 = $node;
|
|
$52 = $cur;
|
|
$53 = ((($52)) + 4|0);
|
|
HEAP32[$53>>2] = $51;
|
|
$54 = $next;
|
|
$cur = $54;
|
|
} else {
|
|
$55 = $node;
|
|
$56 = ((($res)) + 8|0);
|
|
$57 = HEAP32[$56>>2]|0;
|
|
HEAP32[$57>>2] = $55;
|
|
}
|
|
while(1) {
|
|
$58 = $cur;
|
|
$59 = ((($58)) + 4|0);
|
|
$60 = HEAP32[$59>>2]|0;
|
|
$61 = ($60|0)!=(0|0);
|
|
if ($61) {
|
|
$62 = $cur;
|
|
$63 = ((($62)) + 4|0);
|
|
$64 = HEAP32[$63>>2]|0;
|
|
$65 = HEAP16[$64>>1]|0;
|
|
$66 = $65&65535;
|
|
$67 = HEAP32[$res>>2]|0;
|
|
$68 = $1;
|
|
$69 = (($67) + ($68))|0;
|
|
$70 = ($66|0)<=($69|0);
|
|
$97 = $70;
|
|
} else {
|
|
$97 = 0;
|
|
}
|
|
$71 = $cur;
|
|
if (!($97)) {
|
|
break;
|
|
}
|
|
$72 = ((($71)) + 4|0);
|
|
$73 = HEAP32[$72>>2]|0;
|
|
$next1 = $73;
|
|
$74 = $0;
|
|
$75 = ((($74)) + 28|0);
|
|
$76 = HEAP32[$75>>2]|0;
|
|
$77 = $cur;
|
|
$78 = ((($77)) + 4|0);
|
|
HEAP32[$78>>2] = $76;
|
|
$79 = $cur;
|
|
$80 = $0;
|
|
$81 = ((($80)) + 28|0);
|
|
HEAP32[$81>>2] = $79;
|
|
$82 = $next1;
|
|
$cur = $82;
|
|
}
|
|
$83 = $node;
|
|
$84 = ((($83)) + 4|0);
|
|
HEAP32[$84>>2] = $71;
|
|
$85 = $cur;
|
|
$86 = HEAP16[$85>>1]|0;
|
|
$87 = $86&65535;
|
|
$88 = HEAP32[$res>>2]|0;
|
|
$89 = $1;
|
|
$90 = (($88) + ($89))|0;
|
|
$91 = ($87|0)<($90|0);
|
|
if ($91) {
|
|
$92 = HEAP32[$res>>2]|0;
|
|
$93 = $1;
|
|
$94 = (($92) + ($93))|0;
|
|
$95 = $94&65535;
|
|
$96 = $cur;
|
|
HEAP16[$96>>1] = $95;
|
|
}
|
|
;HEAP32[$agg$result>>2]=HEAP32[$res>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$res+4>>2]|0;HEAP32[$agg$result+8>>2]=HEAP32[$res+8>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
}
|
|
$21 = ((($res)) + 8|0);
|
|
HEAP32[$21>>2] = 0;
|
|
;HEAP32[$agg$result>>2]=HEAP32[$res>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$res+4>>2]|0;HEAP32[$agg$result+8>>2]=HEAP32[$res+8>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_rect_original_order($a,$b) {
|
|
$a = $a|0;
|
|
$b = $b|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
|
|
var $p = 0, $q = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $a;
|
|
$1 = $b;
|
|
$2 = $0;
|
|
$p = $2;
|
|
$3 = $1;
|
|
$q = $3;
|
|
$4 = $p;
|
|
$5 = ((($4)) + 12|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$7 = $q;
|
|
$8 = ((($7)) + 12|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ($6|0)<($9|0);
|
|
if ($10) {
|
|
$19 = -1;
|
|
STACKTOP = sp;return ($19|0);
|
|
}
|
|
$11 = $p;
|
|
$12 = ((($11)) + 12|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = $q;
|
|
$15 = ((($14)) + 12|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = ($13|0)>($16|0);
|
|
$18 = $17&1;
|
|
$19 = $18;
|
|
STACKTOP = sp;return ($19|0);
|
|
}
|
|
function _nk_rp__skyline_find_best_pos($agg$result,$c,$width,$height) {
|
|
$agg$result = $agg$result|0;
|
|
$c = $c|0;
|
|
$width = $width|0;
|
|
$height = $height|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
|
|
var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0;
|
|
var $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0;
|
|
var $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0;
|
|
var $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0;
|
|
var $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $best = 0, $best_waste = 0, $best_x = 0, $best_y = 0, $fr = 0, $node = 0;
|
|
var $prev = 0, $tail = 0, $waste = 0, $waste2 = 0, $xpos = 0, $y = 0, $y1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$fr = sp + 36|0;
|
|
$waste = sp + 12|0;
|
|
$waste2 = sp;
|
|
$0 = $c;
|
|
$1 = $width;
|
|
$2 = $height;
|
|
$best_waste = 1073741824;
|
|
$best_y = 1073741824;
|
|
$best = 0;
|
|
$3 = $1;
|
|
$4 = $0;
|
|
$5 = ((($4)) + 8|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$7 = (($3) + ($6))|0;
|
|
$8 = (($7) - 1)|0;
|
|
$1 = $8;
|
|
$9 = $1;
|
|
$10 = $0;
|
|
$11 = ((($10)) + 8|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = (($9|0) % ($12|0))&-1;
|
|
$14 = $1;
|
|
$15 = (($14) - ($13))|0;
|
|
$1 = $15;
|
|
$16 = $1;
|
|
$17 = $0;
|
|
$18 = ((($17)) + 8|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = (($16|0) % ($19|0))&-1;
|
|
$21 = ($20|0)==(0);
|
|
if (!($21)) {
|
|
___assert_fail((30320|0),(13400|0),6755,(30342|0));
|
|
// unreachable;
|
|
}
|
|
$22 = $0;
|
|
$23 = ((($22)) + 24|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$node = $24;
|
|
$25 = $0;
|
|
$26 = ((($25)) + 24|0);
|
|
$prev = $26;
|
|
while(1) {
|
|
$27 = $node;
|
|
$28 = HEAP16[$27>>1]|0;
|
|
$29 = $28&65535;
|
|
$30 = $1;
|
|
$31 = (($29) + ($30))|0;
|
|
$32 = $0;
|
|
$33 = HEAP32[$32>>2]|0;
|
|
$34 = ($31|0)<=($33|0);
|
|
if (!($34)) {
|
|
break;
|
|
}
|
|
$35 = $0;
|
|
$36 = $node;
|
|
$37 = $node;
|
|
$38 = HEAP16[$37>>1]|0;
|
|
$39 = $38&65535;
|
|
$40 = $1;
|
|
$41 = (_nk_rp__skyline_find_min_y($35,$36,$39,$40,$waste)|0);
|
|
$y = $41;
|
|
$42 = $0;
|
|
$43 = ((($42)) + 16|0);
|
|
$44 = HEAP32[$43>>2]|0;
|
|
$45 = ($44|0)==(0);
|
|
$46 = $y;
|
|
do {
|
|
if ($45) {
|
|
$47 = $best_y;
|
|
$48 = ($46|0)<($47|0);
|
|
if ($48) {
|
|
$49 = $y;
|
|
$best_y = $49;
|
|
$50 = $prev;
|
|
$best = $50;
|
|
}
|
|
} else {
|
|
$51 = $2;
|
|
$52 = (($46) + ($51))|0;
|
|
$53 = $0;
|
|
$54 = ((($53)) + 4|0);
|
|
$55 = HEAP32[$54>>2]|0;
|
|
$56 = ($52|0)<=($55|0);
|
|
if ($56) {
|
|
$57 = $y;
|
|
$58 = $best_y;
|
|
$59 = ($57|0)<($58|0);
|
|
if (!($59)) {
|
|
$60 = $y;
|
|
$61 = $best_y;
|
|
$62 = ($60|0)==($61|0);
|
|
if (!($62)) {
|
|
break;
|
|
}
|
|
$63 = HEAP32[$waste>>2]|0;
|
|
$64 = $best_waste;
|
|
$65 = ($63|0)<($64|0);
|
|
if (!($65)) {
|
|
break;
|
|
}
|
|
}
|
|
$66 = $y;
|
|
$best_y = $66;
|
|
$67 = HEAP32[$waste>>2]|0;
|
|
$best_waste = $67;
|
|
$68 = $prev;
|
|
$best = $68;
|
|
}
|
|
}
|
|
} while(0);
|
|
$69 = $node;
|
|
$70 = ((($69)) + 4|0);
|
|
$prev = $70;
|
|
$71 = $node;
|
|
$72 = ((($71)) + 4|0);
|
|
$73 = HEAP32[$72>>2]|0;
|
|
$node = $73;
|
|
}
|
|
$74 = $best;
|
|
$75 = ($74|0)==(0|0);
|
|
if ($75) {
|
|
$80 = 0;
|
|
} else {
|
|
$76 = $best;
|
|
$77 = HEAP32[$76>>2]|0;
|
|
$78 = HEAP16[$77>>1]|0;
|
|
$79 = $78&65535;
|
|
$80 = $79;
|
|
}
|
|
$best_x = $80;
|
|
$81 = $0;
|
|
$82 = ((($81)) + 16|0);
|
|
$83 = HEAP32[$82>>2]|0;
|
|
$84 = ($83|0)==(1);
|
|
if (!($84)) {
|
|
$169 = $best;
|
|
$170 = ((($fr)) + 8|0);
|
|
HEAP32[$170>>2] = $169;
|
|
$171 = $best_x;
|
|
HEAP32[$fr>>2] = $171;
|
|
$172 = $best_y;
|
|
$173 = ((($fr)) + 4|0);
|
|
HEAP32[$173>>2] = $172;
|
|
;HEAP32[$agg$result>>2]=HEAP32[$fr>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$fr+4>>2]|0;HEAP32[$agg$result+8>>2]=HEAP32[$fr+8>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
$85 = $0;
|
|
$86 = ((($85)) + 24|0);
|
|
$87 = HEAP32[$86>>2]|0;
|
|
$tail = $87;
|
|
$88 = $0;
|
|
$89 = ((($88)) + 24|0);
|
|
$90 = HEAP32[$89>>2]|0;
|
|
$node = $90;
|
|
$91 = $0;
|
|
$92 = ((($91)) + 24|0);
|
|
$prev = $92;
|
|
while(1) {
|
|
$93 = $tail;
|
|
$94 = HEAP16[$93>>1]|0;
|
|
$95 = $94&65535;
|
|
$96 = $1;
|
|
$97 = ($95|0)<($96|0);
|
|
if (!($97)) {
|
|
break;
|
|
}
|
|
$98 = $tail;
|
|
$99 = ((($98)) + 4|0);
|
|
$100 = HEAP32[$99>>2]|0;
|
|
$tail = $100;
|
|
}
|
|
L27: while(1) {
|
|
$101 = $tail;
|
|
$102 = ($101|0)!=(0|0);
|
|
if (!($102)) {
|
|
label = 39;
|
|
break;
|
|
}
|
|
$103 = $tail;
|
|
$104 = HEAP16[$103>>1]|0;
|
|
$105 = $104&65535;
|
|
$106 = $1;
|
|
$107 = (($105) - ($106))|0;
|
|
$xpos = $107;
|
|
$108 = $xpos;
|
|
$109 = ($108|0)>=(0);
|
|
if (!($109)) {
|
|
label = 22;
|
|
break;
|
|
}
|
|
while(1) {
|
|
$110 = $node;
|
|
$111 = ((($110)) + 4|0);
|
|
$112 = HEAP32[$111>>2]|0;
|
|
$113 = HEAP16[$112>>1]|0;
|
|
$114 = $113&65535;
|
|
$115 = $xpos;
|
|
$116 = ($114|0)<=($115|0);
|
|
$117 = $node;
|
|
$118 = ((($117)) + 4|0);
|
|
if (!($116)) {
|
|
break;
|
|
}
|
|
$prev = $118;
|
|
$119 = $node;
|
|
$120 = ((($119)) + 4|0);
|
|
$121 = HEAP32[$120>>2]|0;
|
|
$node = $121;
|
|
}
|
|
$122 = HEAP32[$118>>2]|0;
|
|
$123 = HEAP16[$122>>1]|0;
|
|
$124 = $123&65535;
|
|
$125 = $xpos;
|
|
$126 = ($124|0)>($125|0);
|
|
if (!($126)) {
|
|
label = 28;
|
|
break;
|
|
}
|
|
$127 = $node;
|
|
$128 = HEAP16[$127>>1]|0;
|
|
$129 = $128&65535;
|
|
$130 = $xpos;
|
|
$131 = ($129|0)<=($130|0);
|
|
if (!($131)) {
|
|
label = 28;
|
|
break;
|
|
}
|
|
$132 = $0;
|
|
$133 = $node;
|
|
$134 = $xpos;
|
|
$135 = $1;
|
|
$136 = (_nk_rp__skyline_find_min_y($132,$133,$134,$135,$waste2)|0);
|
|
$y1 = $136;
|
|
$137 = $y1;
|
|
$138 = $2;
|
|
$139 = (($137) + ($138))|0;
|
|
$140 = $0;
|
|
$141 = ((($140)) + 4|0);
|
|
$142 = HEAP32[$141>>2]|0;
|
|
$143 = ($139|0)<($142|0);
|
|
do {
|
|
if ($143) {
|
|
$144 = $y1;
|
|
$145 = $best_y;
|
|
$146 = ($144|0)<=($145|0);
|
|
if ($146) {
|
|
$147 = $y1;
|
|
$148 = $best_y;
|
|
$149 = ($147|0)<($148|0);
|
|
if (!($149)) {
|
|
$150 = HEAP32[$waste2>>2]|0;
|
|
$151 = $best_waste;
|
|
$152 = ($150|0)<($151|0);
|
|
if (!($152)) {
|
|
$153 = HEAP32[$waste2>>2]|0;
|
|
$154 = $best_waste;
|
|
$155 = ($153|0)==($154|0);
|
|
if (!($155)) {
|
|
break;
|
|
}
|
|
$156 = $xpos;
|
|
$157 = $best_x;
|
|
$158 = ($156|0)<($157|0);
|
|
if (!($158)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
$159 = $xpos;
|
|
$best_x = $159;
|
|
$160 = $y1;
|
|
$161 = $best_y;
|
|
$162 = ($160|0)<=($161|0);
|
|
if (!($162)) {
|
|
label = 36;
|
|
break L27;
|
|
}
|
|
$163 = $y1;
|
|
$best_y = $163;
|
|
$164 = HEAP32[$waste2>>2]|0;
|
|
$best_waste = $164;
|
|
$165 = $prev;
|
|
$best = $165;
|
|
}
|
|
}
|
|
} while(0);
|
|
$166 = $tail;
|
|
$167 = ((($166)) + 4|0);
|
|
$168 = HEAP32[$167>>2]|0;
|
|
$tail = $168;
|
|
}
|
|
if ((label|0) == 22) {
|
|
___assert_fail((30371|0),(13400|0),6813,(30342|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 28) {
|
|
___assert_fail((30381|0),(13400|0),6819,(30342|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 36) {
|
|
___assert_fail((30421|0),(13400|0),6825,(30342|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 39) {
|
|
$169 = $best;
|
|
$170 = ((($fr)) + 8|0);
|
|
HEAP32[$170>>2] = $169;
|
|
$171 = $best_x;
|
|
HEAP32[$fr>>2] = $171;
|
|
$172 = $best_y;
|
|
$173 = ((($fr)) + 4|0);
|
|
HEAP32[$173>>2] = $172;
|
|
;HEAP32[$agg$result>>2]=HEAP32[$fr>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$fr+4>>2]|0;HEAP32[$agg$result+8>>2]=HEAP32[$fr+8>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_rp__skyline_find_min_y($c,$first,$x0,$width,$pwaste) {
|
|
$c = $c|0;
|
|
$first = $first|0;
|
|
$x0 = $x0|0;
|
|
$width = $width|0;
|
|
$pwaste = $pwaste|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0;
|
|
var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0;
|
|
var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0;
|
|
var $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0;
|
|
var $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0;
|
|
var $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $min_y = 0, $node = 0, $under_width = 0, $visited_width = 0, $waste_area = 0, $x1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $c;
|
|
$1 = $first;
|
|
$2 = $x0;
|
|
$3 = $width;
|
|
$4 = $pwaste;
|
|
$5 = $1;
|
|
$node = $5;
|
|
$6 = $2;
|
|
$7 = $3;
|
|
$8 = (($6) + ($7))|0;
|
|
$x1 = $8;
|
|
$9 = $1;
|
|
$10 = HEAP16[$9>>1]|0;
|
|
$11 = $10&65535;
|
|
$12 = $2;
|
|
$13 = ($11|0)<=($12|0);
|
|
if (!($13)) {
|
|
___assert_fail((30433|0),(13400|0),6708,(30448|0));
|
|
// unreachable;
|
|
}
|
|
$14 = $node;
|
|
$15 = ((($14)) + 4|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = HEAP16[$16>>1]|0;
|
|
$18 = $17&65535;
|
|
$19 = $2;
|
|
$20 = ($18|0)>($19|0);
|
|
if (!($20)) {
|
|
___assert_fail((30474|0),(13400|0),6711,(30448|0));
|
|
// unreachable;
|
|
}
|
|
$21 = $node;
|
|
$22 = HEAP16[$21>>1]|0;
|
|
$23 = $22&65535;
|
|
$24 = $2;
|
|
$25 = ($23|0)<=($24|0);
|
|
if (!($25)) {
|
|
___assert_fail((30493|0),(13400|0),6713,(30448|0));
|
|
// unreachable;
|
|
}
|
|
$min_y = 0;
|
|
$waste_area = 0;
|
|
$visited_width = 0;
|
|
while(1) {
|
|
$26 = $node;
|
|
$27 = HEAP16[$26>>1]|0;
|
|
$28 = $27&65535;
|
|
$29 = $x1;
|
|
$30 = ($28|0)<($29|0);
|
|
if (!($30)) {
|
|
break;
|
|
}
|
|
$31 = $node;
|
|
$32 = ((($31)) + 2|0);
|
|
$33 = HEAP16[$32>>1]|0;
|
|
$34 = $33&65535;
|
|
$35 = $min_y;
|
|
$36 = ($34|0)>($35|0);
|
|
do {
|
|
if ($36) {
|
|
$37 = $visited_width;
|
|
$38 = $node;
|
|
$39 = ((($38)) + 2|0);
|
|
$40 = HEAP16[$39>>1]|0;
|
|
$41 = $40&65535;
|
|
$42 = $min_y;
|
|
$43 = (($41) - ($42))|0;
|
|
$44 = Math_imul($37, $43)|0;
|
|
$45 = $waste_area;
|
|
$46 = (($45) + ($44))|0;
|
|
$waste_area = $46;
|
|
$47 = $node;
|
|
$48 = ((($47)) + 2|0);
|
|
$49 = HEAP16[$48>>1]|0;
|
|
$50 = $49&65535;
|
|
$min_y = $50;
|
|
$51 = $node;
|
|
$52 = HEAP16[$51>>1]|0;
|
|
$53 = $52&65535;
|
|
$54 = $2;
|
|
$55 = ($53|0)<($54|0);
|
|
$56 = $node;
|
|
$57 = ((($56)) + 4|0);
|
|
$58 = HEAP32[$57>>2]|0;
|
|
$59 = HEAP16[$58>>1]|0;
|
|
$60 = $59&65535;
|
|
if ($55) {
|
|
$61 = $2;
|
|
$62 = (($60) - ($61))|0;
|
|
$63 = $visited_width;
|
|
$64 = (($63) + ($62))|0;
|
|
$visited_width = $64;
|
|
break;
|
|
} else {
|
|
$65 = $node;
|
|
$66 = HEAP16[$65>>1]|0;
|
|
$67 = $66&65535;
|
|
$68 = (($60) - ($67))|0;
|
|
$69 = $visited_width;
|
|
$70 = (($69) + ($68))|0;
|
|
$visited_width = $70;
|
|
break;
|
|
}
|
|
} else {
|
|
$71 = $node;
|
|
$72 = ((($71)) + 4|0);
|
|
$73 = HEAP32[$72>>2]|0;
|
|
$74 = HEAP16[$73>>1]|0;
|
|
$75 = $74&65535;
|
|
$76 = $node;
|
|
$77 = HEAP16[$76>>1]|0;
|
|
$78 = $77&65535;
|
|
$79 = (($75) - ($78))|0;
|
|
$under_width = $79;
|
|
$80 = $under_width;
|
|
$81 = $visited_width;
|
|
$82 = (($80) + ($81))|0;
|
|
$83 = $3;
|
|
$84 = ($82|0)>($83|0);
|
|
if ($84) {
|
|
$85 = $3;
|
|
$86 = $visited_width;
|
|
$87 = (($85) - ($86))|0;
|
|
$under_width = $87;
|
|
}
|
|
$88 = $under_width;
|
|
$89 = $min_y;
|
|
$90 = $node;
|
|
$91 = ((($90)) + 2|0);
|
|
$92 = HEAP16[$91>>1]|0;
|
|
$93 = $92&65535;
|
|
$94 = (($89) - ($93))|0;
|
|
$95 = Math_imul($88, $94)|0;
|
|
$96 = $waste_area;
|
|
$97 = (($96) + ($95))|0;
|
|
$waste_area = $97;
|
|
$98 = $under_width;
|
|
$99 = $visited_width;
|
|
$100 = (($99) + ($98))|0;
|
|
$visited_width = $100;
|
|
}
|
|
} while(0);
|
|
$101 = $node;
|
|
$102 = ((($101)) + 4|0);
|
|
$103 = HEAP32[$102>>2]|0;
|
|
$node = $103;
|
|
}
|
|
$104 = $waste_area;
|
|
$105 = $4;
|
|
HEAP32[$105>>2] = $104;
|
|
$106 = $min_y;
|
|
STACKTOP = sp;return ($106|0);
|
|
}
|
|
function _nk_tt_ScaleForMappingEmToPixels($info,$pixels) {
|
|
$info = $info|0;
|
|
$pixels = +$pixels;
|
|
var $0 = 0, $1 = 0.0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $unitsPerEm = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $info;
|
|
$1 = $pixels;
|
|
$2 = $0;
|
|
$3 = HEAP32[$2>>2]|0;
|
|
$4 = $0;
|
|
$5 = ((($4)) + 16|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$7 = (($3) + ($6)|0);
|
|
$8 = ((($7)) + 18|0);
|
|
$9 = (_nk_ttUSHORT($8)|0);
|
|
$10 = $9&65535;
|
|
$unitsPerEm = $10;
|
|
$11 = $1;
|
|
$12 = $unitsPerEm;
|
|
$13 = (+($12|0));
|
|
$14 = $11 / $13;
|
|
STACKTOP = sp;return (+$14);
|
|
}
|
|
function _nk_tt_FindGlyphIndex($info,$unicode_codepoint) {
|
|
$info = $info|0;
|
|
$unicode_codepoint = $unicode_codepoint|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
|
|
var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
|
|
var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
|
|
var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
|
|
var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0;
|
|
var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0;
|
|
var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0;
|
|
var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0;
|
|
var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $32 = 0, $33 = 0, $34 = 0;
|
|
var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0;
|
|
var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0;
|
|
var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0;
|
|
var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $bytes = 0, $count = 0, $data = 0, $end = 0, $endCount = 0, $end_char = 0, $entrySelector = 0, $first = 0, $format = 0;
|
|
var $high = 0, $index_map = 0, $item = 0, $low = 0, $mid = 0, $ngroups = 0, $offset = 0, $rangeShift = 0, $search = 0, $searchRange = 0, $segcount = 0, $start = 0, $start_char = 0, $start_glyph = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $info;
|
|
$2 = $unicode_codepoint;
|
|
$3 = $1;
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$data = $4;
|
|
$5 = $1;
|
|
$6 = ((($5)) + 36|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$index_map = $7;
|
|
$8 = $data;
|
|
$9 = $index_map;
|
|
$10 = (($8) + ($9)|0);
|
|
$11 = (_nk_ttUSHORT($10)|0);
|
|
$format = $11;
|
|
$12 = $format;
|
|
$13 = $12&65535;
|
|
$14 = ($13|0)==(0);
|
|
if ($14) {
|
|
$15 = $data;
|
|
$16 = $index_map;
|
|
$17 = (($15) + ($16)|0);
|
|
$18 = ((($17)) + 2|0);
|
|
$19 = (_nk_ttUSHORT($18)|0);
|
|
$20 = $19&65535;
|
|
$bytes = $20;
|
|
$21 = $2;
|
|
$22 = $bytes;
|
|
$23 = (($22) - 6)|0;
|
|
$24 = ($21|0)<($23|0);
|
|
if ($24) {
|
|
$25 = $data;
|
|
$26 = $index_map;
|
|
$27 = (($25) + ($26)|0);
|
|
$28 = ((($27)) + 6|0);
|
|
$29 = $2;
|
|
$30 = (($28) + ($29)|0);
|
|
$31 = HEAP8[$30>>0]|0;
|
|
$32 = $31&255;
|
|
$0 = $32;
|
|
$310 = $0;
|
|
STACKTOP = sp;return ($310|0);
|
|
} else {
|
|
$0 = 0;
|
|
$310 = $0;
|
|
STACKTOP = sp;return ($310|0);
|
|
}
|
|
}
|
|
$33 = $format;
|
|
$34 = $33&65535;
|
|
$35 = ($34|0)==(6);
|
|
if ($35) {
|
|
$36 = $data;
|
|
$37 = $index_map;
|
|
$38 = (($36) + ($37)|0);
|
|
$39 = ((($38)) + 6|0);
|
|
$40 = (_nk_ttUSHORT($39)|0);
|
|
$41 = $40&65535;
|
|
$first = $41;
|
|
$42 = $data;
|
|
$43 = $index_map;
|
|
$44 = (($42) + ($43)|0);
|
|
$45 = ((($44)) + 8|0);
|
|
$46 = (_nk_ttUSHORT($45)|0);
|
|
$47 = $46&65535;
|
|
$count = $47;
|
|
$48 = $2;
|
|
$49 = $first;
|
|
$50 = ($48>>>0)>=($49>>>0);
|
|
if ($50) {
|
|
$51 = $2;
|
|
$52 = $first;
|
|
$53 = $count;
|
|
$54 = (($52) + ($53))|0;
|
|
$55 = ($51>>>0)<($54>>>0);
|
|
if ($55) {
|
|
$56 = $data;
|
|
$57 = $index_map;
|
|
$58 = (($56) + ($57)|0);
|
|
$59 = ((($58)) + 10|0);
|
|
$60 = $2;
|
|
$61 = $first;
|
|
$62 = (($60) - ($61))|0;
|
|
$63 = $62<<1;
|
|
$64 = (($59) + ($63)|0);
|
|
$65 = (_nk_ttUSHORT($64)|0);
|
|
$66 = $65&65535;
|
|
$0 = $66;
|
|
$310 = $0;
|
|
STACKTOP = sp;return ($310|0);
|
|
}
|
|
}
|
|
$0 = 0;
|
|
$310 = $0;
|
|
STACKTOP = sp;return ($310|0);
|
|
}
|
|
$67 = $format;
|
|
$68 = $67&65535;
|
|
$69 = ($68|0)==(2);
|
|
if ($69) {
|
|
___assert_fail((30507|0),(13400|0),7243,(30509|0));
|
|
// unreachable;
|
|
}
|
|
$70 = $format;
|
|
$71 = $70&65535;
|
|
$72 = ($71|0)==(4);
|
|
if (!($72)) {
|
|
$246 = $format;
|
|
$247 = $246&65535;
|
|
$248 = ($247|0)==(12);
|
|
if (!($248)) {
|
|
$249 = $format;
|
|
$250 = $249&65535;
|
|
$251 = ($250|0)==(13);
|
|
if (!($251)) {
|
|
___assert_fail((30507|0),(13400|0),7314,(30509|0));
|
|
// unreachable;
|
|
}
|
|
}
|
|
$252 = $data;
|
|
$253 = $index_map;
|
|
$254 = (($252) + ($253)|0);
|
|
$255 = ((($254)) + 12|0);
|
|
$256 = (_nk_ttULONG($255)|0);
|
|
$ngroups = $256;
|
|
$low = 0;
|
|
$257 = $ngroups;
|
|
$high = $257;
|
|
while(1) {
|
|
$258 = $low;
|
|
$259 = $high;
|
|
$260 = ($258|0)<($259|0);
|
|
if (!($260)) {
|
|
label = 40;
|
|
break;
|
|
}
|
|
$261 = $low;
|
|
$262 = $high;
|
|
$263 = $low;
|
|
$264 = (($262) - ($263))|0;
|
|
$265 = $264 >> 1;
|
|
$266 = (($261) + ($265))|0;
|
|
$mid = $266;
|
|
$267 = $data;
|
|
$268 = $index_map;
|
|
$269 = (($267) + ($268)|0);
|
|
$270 = ((($269)) + 16|0);
|
|
$271 = $mid;
|
|
$272 = ($271*12)|0;
|
|
$273 = (($270) + ($272)|0);
|
|
$274 = (_nk_ttULONG($273)|0);
|
|
$start_char = $274;
|
|
$275 = $data;
|
|
$276 = $index_map;
|
|
$277 = (($275) + ($276)|0);
|
|
$278 = ((($277)) + 16|0);
|
|
$279 = $mid;
|
|
$280 = ($279*12)|0;
|
|
$281 = (($278) + ($280)|0);
|
|
$282 = ((($281)) + 4|0);
|
|
$283 = (_nk_ttULONG($282)|0);
|
|
$end_char = $283;
|
|
$284 = $2;
|
|
$285 = $start_char;
|
|
$286 = ($284>>>0)<($285>>>0);
|
|
if ($286) {
|
|
$287 = $mid;
|
|
$high = $287;
|
|
continue;
|
|
}
|
|
$288 = $2;
|
|
$289 = $end_char;
|
|
$290 = ($288>>>0)>($289>>>0);
|
|
if (!($290)) {
|
|
break;
|
|
}
|
|
$291 = $mid;
|
|
$292 = (($291) + 1)|0;
|
|
$low = $292;
|
|
}
|
|
if ((label|0) == 40) {
|
|
$0 = 0;
|
|
$310 = $0;
|
|
STACKTOP = sp;return ($310|0);
|
|
}
|
|
$293 = $data;
|
|
$294 = $index_map;
|
|
$295 = (($293) + ($294)|0);
|
|
$296 = ((($295)) + 16|0);
|
|
$297 = $mid;
|
|
$298 = ($297*12)|0;
|
|
$299 = (($296) + ($298)|0);
|
|
$300 = ((($299)) + 8|0);
|
|
$301 = (_nk_ttULONG($300)|0);
|
|
$start_glyph = $301;
|
|
$302 = $format;
|
|
$303 = $302&65535;
|
|
$304 = ($303|0)==(12);
|
|
$305 = $start_glyph;
|
|
if ($304) {
|
|
$306 = $2;
|
|
$307 = (($305) + ($306))|0;
|
|
$308 = $start_char;
|
|
$309 = (($307) - ($308))|0;
|
|
$0 = $309;
|
|
$310 = $0;
|
|
STACKTOP = sp;return ($310|0);
|
|
} else {
|
|
$0 = $305;
|
|
$310 = $0;
|
|
STACKTOP = sp;return ($310|0);
|
|
}
|
|
}
|
|
$73 = $data;
|
|
$74 = $index_map;
|
|
$75 = (($73) + ($74)|0);
|
|
$76 = ((($75)) + 6|0);
|
|
$77 = (_nk_ttUSHORT($76)|0);
|
|
$78 = $77&65535;
|
|
$79 = $78 >> 1;
|
|
$80 = $79&65535;
|
|
$segcount = $80;
|
|
$81 = $data;
|
|
$82 = $index_map;
|
|
$83 = (($81) + ($82)|0);
|
|
$84 = ((($83)) + 8|0);
|
|
$85 = (_nk_ttUSHORT($84)|0);
|
|
$86 = $85&65535;
|
|
$87 = $86 >> 1;
|
|
$88 = $87&65535;
|
|
$searchRange = $88;
|
|
$89 = $data;
|
|
$90 = $index_map;
|
|
$91 = (($89) + ($90)|0);
|
|
$92 = ((($91)) + 10|0);
|
|
$93 = (_nk_ttUSHORT($92)|0);
|
|
$entrySelector = $93;
|
|
$94 = $data;
|
|
$95 = $index_map;
|
|
$96 = (($94) + ($95)|0);
|
|
$97 = ((($96)) + 12|0);
|
|
$98 = (_nk_ttUSHORT($97)|0);
|
|
$99 = $98&65535;
|
|
$100 = $99 >> 1;
|
|
$101 = $100&65535;
|
|
$rangeShift = $101;
|
|
$102 = $index_map;
|
|
$103 = (($102) + 14)|0;
|
|
$endCount = $103;
|
|
$104 = $endCount;
|
|
$search = $104;
|
|
$105 = $2;
|
|
$106 = ($105|0)>(65535);
|
|
if ($106) {
|
|
$0 = 0;
|
|
$310 = $0;
|
|
STACKTOP = sp;return ($310|0);
|
|
}
|
|
$107 = $2;
|
|
$108 = $data;
|
|
$109 = $search;
|
|
$110 = (($108) + ($109)|0);
|
|
$111 = $rangeShift;
|
|
$112 = $111&65535;
|
|
$113 = $112<<1;
|
|
$114 = (($110) + ($113)|0);
|
|
$115 = (_nk_ttUSHORT($114)|0);
|
|
$116 = $115&65535;
|
|
$117 = ($107|0)>=($116|0);
|
|
if ($117) {
|
|
$118 = $rangeShift;
|
|
$119 = $118&65535;
|
|
$120 = $119<<1;
|
|
$121 = $search;
|
|
$122 = (($121) + ($120))|0;
|
|
$search = $122;
|
|
}
|
|
$123 = $search;
|
|
$124 = (($123) - 2)|0;
|
|
$search = $124;
|
|
while(1) {
|
|
$125 = $entrySelector;
|
|
$126 = ($125<<16>>16)!=(0);
|
|
if (!($126)) {
|
|
break;
|
|
}
|
|
$127 = $searchRange;
|
|
$128 = $127&65535;
|
|
$129 = $128 >> 1;
|
|
$130 = $129&65535;
|
|
$searchRange = $130;
|
|
$131 = $data;
|
|
$132 = $search;
|
|
$133 = (($131) + ($132)|0);
|
|
$134 = $searchRange;
|
|
$135 = $134&65535;
|
|
$136 = $135<<1;
|
|
$137 = (($133) + ($136)|0);
|
|
$138 = (_nk_ttUSHORT($137)|0);
|
|
$end = $138;
|
|
$139 = $2;
|
|
$140 = $end;
|
|
$141 = $140&65535;
|
|
$142 = ($139|0)>($141|0);
|
|
if ($142) {
|
|
$143 = $searchRange;
|
|
$144 = $143&65535;
|
|
$145 = $144<<1;
|
|
$146 = $search;
|
|
$147 = (($146) + ($145))|0;
|
|
$search = $147;
|
|
}
|
|
$148 = $entrySelector;
|
|
$149 = (($148) + -1)<<16>>16;
|
|
$entrySelector = $149;
|
|
}
|
|
$150 = $search;
|
|
$151 = (($150) + 2)|0;
|
|
$search = $151;
|
|
$152 = $search;
|
|
$153 = $endCount;
|
|
$154 = (($152) - ($153))|0;
|
|
$155 = $154 >>> 1;
|
|
$156 = $155&65535;
|
|
$item = $156;
|
|
$157 = $2;
|
|
$158 = $data;
|
|
$159 = $endCount;
|
|
$160 = (($158) + ($159)|0);
|
|
$161 = $item;
|
|
$162 = $161&65535;
|
|
$163 = $162<<1;
|
|
$164 = (($160) + ($163)|0);
|
|
$165 = (_nk_ttUSHORT($164)|0);
|
|
$166 = $165&65535;
|
|
$167 = ($157|0)<=($166|0);
|
|
if (!($167)) {
|
|
___assert_fail((30530|0),(13400|0),7279,(30509|0));
|
|
// unreachable;
|
|
}
|
|
$168 = $data;
|
|
$169 = $index_map;
|
|
$170 = (($168) + ($169)|0);
|
|
$171 = ((($170)) + 14|0);
|
|
$172 = $segcount;
|
|
$173 = $172&65535;
|
|
$174 = $173<<1;
|
|
$175 = (($171) + ($174)|0);
|
|
$176 = ((($175)) + 2|0);
|
|
$177 = $item;
|
|
$178 = $177&65535;
|
|
$179 = $178<<1;
|
|
$180 = (($176) + ($179)|0);
|
|
$181 = (_nk_ttUSHORT($180)|0);
|
|
$start = $181;
|
|
$182 = $2;
|
|
$183 = $start;
|
|
$184 = $183&65535;
|
|
$185 = ($182|0)<($184|0);
|
|
if ($185) {
|
|
$0 = 0;
|
|
$310 = $0;
|
|
STACKTOP = sp;return ($310|0);
|
|
}
|
|
$186 = $data;
|
|
$187 = $index_map;
|
|
$188 = (($186) + ($187)|0);
|
|
$189 = ((($188)) + 14|0);
|
|
$190 = $segcount;
|
|
$191 = $190&65535;
|
|
$192 = ($191*6)|0;
|
|
$193 = (($189) + ($192)|0);
|
|
$194 = ((($193)) + 2|0);
|
|
$195 = $item;
|
|
$196 = $195&65535;
|
|
$197 = $196<<1;
|
|
$198 = (($194) + ($197)|0);
|
|
$199 = (_nk_ttUSHORT($198)|0);
|
|
$offset = $199;
|
|
$200 = $offset;
|
|
$201 = $200&65535;
|
|
$202 = ($201|0)==(0);
|
|
if ($202) {
|
|
$203 = $2;
|
|
$204 = $data;
|
|
$205 = $index_map;
|
|
$206 = (($204) + ($205)|0);
|
|
$207 = ((($206)) + 14|0);
|
|
$208 = $segcount;
|
|
$209 = $208&65535;
|
|
$210 = $209<<2;
|
|
$211 = (($207) + ($210)|0);
|
|
$212 = ((($211)) + 2|0);
|
|
$213 = $item;
|
|
$214 = $213&65535;
|
|
$215 = $214<<1;
|
|
$216 = (($212) + ($215)|0);
|
|
$217 = (_nk_ttSHORT($216)|0);
|
|
$218 = $217 << 16 >> 16;
|
|
$219 = (($203) + ($218))|0;
|
|
$220 = $219&65535;
|
|
$221 = $220&65535;
|
|
$0 = $221;
|
|
$310 = $0;
|
|
STACKTOP = sp;return ($310|0);
|
|
} else {
|
|
$222 = $data;
|
|
$223 = $offset;
|
|
$224 = $223&65535;
|
|
$225 = (($222) + ($224)|0);
|
|
$226 = $2;
|
|
$227 = $start;
|
|
$228 = $227&65535;
|
|
$229 = (($226) - ($228))|0;
|
|
$230 = $229<<1;
|
|
$231 = (($225) + ($230)|0);
|
|
$232 = $index_map;
|
|
$233 = (($231) + ($232)|0);
|
|
$234 = ((($233)) + 14|0);
|
|
$235 = $segcount;
|
|
$236 = $235&65535;
|
|
$237 = ($236*6)|0;
|
|
$238 = (($234) + ($237)|0);
|
|
$239 = ((($238)) + 2|0);
|
|
$240 = $item;
|
|
$241 = $240&65535;
|
|
$242 = $241<<1;
|
|
$243 = (($239) + ($242)|0);
|
|
$244 = (_nk_ttUSHORT($243)|0);
|
|
$245 = $244&65535;
|
|
$0 = $245;
|
|
$310 = $0;
|
|
STACKTOP = sp;return ($310|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_tt_GetGlyphBitmapBoxSubpixel($font,$glyph,$scale_x,$scale_y,$shift_x,$shift_y,$ix0,$iy0,$ix1,$iy1) {
|
|
$font = $font|0;
|
|
$glyph = $glyph|0;
|
|
$scale_x = +$scale_x;
|
|
$scale_y = +$scale_y;
|
|
$shift_x = +$shift_x;
|
|
$shift_y = +$shift_y;
|
|
$ix0 = $ix0|0;
|
|
$iy0 = $iy0|0;
|
|
$ix1 = $ix1|0;
|
|
$iy1 = $iy1|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0;
|
|
var $63 = 0.0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, $x0 = 0, $x1 = 0, $y0 = 0, $y1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$x0 = sp + 12|0;
|
|
$y0 = sp + 8|0;
|
|
$x1 = sp + 4|0;
|
|
$y1 = sp;
|
|
$0 = $font;
|
|
$1 = $glyph;
|
|
$2 = $scale_x;
|
|
$3 = $scale_y;
|
|
$4 = $shift_x;
|
|
$5 = $shift_y;
|
|
$6 = $ix0;
|
|
$7 = $iy0;
|
|
$8 = $ix1;
|
|
$9 = $iy1;
|
|
$10 = $0;
|
|
$11 = $1;
|
|
$12 = (_nk_tt_GetGlyphBox($10,$11,$x0,$y0,$x1,$y1)|0);
|
|
$13 = ($12|0)!=(0);
|
|
$14 = $6;
|
|
$15 = ($14|0)!=(0|0);
|
|
if ($13) {
|
|
if ($15) {
|
|
$26 = HEAP32[$x0>>2]|0;
|
|
$27 = (+($26|0));
|
|
$28 = $2;
|
|
$29 = $27 * $28;
|
|
$30 = $4;
|
|
$31 = $29 + $30;
|
|
$32 = (_nk_ifloor($31)|0);
|
|
$33 = $6;
|
|
HEAP32[$33>>2] = $32;
|
|
}
|
|
$34 = $7;
|
|
$35 = ($34|0)!=(0|0);
|
|
if ($35) {
|
|
$36 = HEAP32[$y1>>2]|0;
|
|
$37 = (0 - ($36))|0;
|
|
$38 = (+($37|0));
|
|
$39 = $3;
|
|
$40 = $38 * $39;
|
|
$41 = $5;
|
|
$42 = $40 + $41;
|
|
$43 = (_nk_ifloor($42)|0);
|
|
$44 = $7;
|
|
HEAP32[$44>>2] = $43;
|
|
}
|
|
$45 = $8;
|
|
$46 = ($45|0)!=(0|0);
|
|
if ($46) {
|
|
$47 = HEAP32[$x1>>2]|0;
|
|
$48 = (+($47|0));
|
|
$49 = $2;
|
|
$50 = $48 * $49;
|
|
$51 = $4;
|
|
$52 = $50 + $51;
|
|
$53 = (_nk_iceil($52)|0);
|
|
$54 = $8;
|
|
HEAP32[$54>>2] = $53;
|
|
}
|
|
$55 = $9;
|
|
$56 = ($55|0)!=(0|0);
|
|
if (!($56)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$57 = HEAP32[$y0>>2]|0;
|
|
$58 = (0 - ($57))|0;
|
|
$59 = (+($58|0));
|
|
$60 = $3;
|
|
$61 = $59 * $60;
|
|
$62 = $5;
|
|
$63 = $61 + $62;
|
|
$64 = (_nk_iceil($63)|0);
|
|
$65 = $9;
|
|
HEAP32[$65>>2] = $64;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
if ($15) {
|
|
$16 = $6;
|
|
HEAP32[$16>>2] = 0;
|
|
}
|
|
$17 = $7;
|
|
$18 = ($17|0)!=(0|0);
|
|
if ($18) {
|
|
$19 = $7;
|
|
HEAP32[$19>>2] = 0;
|
|
}
|
|
$20 = $8;
|
|
$21 = ($20|0)!=(0|0);
|
|
if ($21) {
|
|
$22 = $8;
|
|
HEAP32[$22>>2] = 0;
|
|
}
|
|
$23 = $9;
|
|
$24 = ($23|0)!=(0|0);
|
|
if (!($24)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$25 = $9;
|
|
HEAP32[$25>>2] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_ttSHORT($p) {
|
|
$p = $p|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $p;
|
|
$1 = $0;
|
|
$2 = HEAP8[$1>>0]|0;
|
|
$3 = $2&255;
|
|
$4 = $3<<8;
|
|
$5 = $0;
|
|
$6 = ((($5)) + 1|0);
|
|
$7 = HEAP8[$6>>0]|0;
|
|
$8 = $7&255;
|
|
$9 = (($4) + ($8))|0;
|
|
$10 = $9&65535;
|
|
STACKTOP = sp;return ($10|0);
|
|
}
|
|
function _nk_tt_GetGlyphBox($info,$glyph_index,$x0,$y0,$x1,$y1) {
|
|
$info = $info|0;
|
|
$glyph_index = $glyph_index|0;
|
|
$x0 = $x0|0;
|
|
$y0 = $y0|0;
|
|
$x1 = $x1|0;
|
|
$y1 = $y1|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $g = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $info;
|
|
$2 = $glyph_index;
|
|
$3 = $x0;
|
|
$4 = $y0;
|
|
$5 = $x1;
|
|
$6 = $y1;
|
|
$7 = $1;
|
|
$8 = $2;
|
|
$9 = (_nk_tt__GetGlyfOffset($7,$8)|0);
|
|
$g = $9;
|
|
$10 = $g;
|
|
$11 = ($10|0)<(0);
|
|
if ($11) {
|
|
$0 = 0;
|
|
$52 = $0;
|
|
STACKTOP = sp;return ($52|0);
|
|
}
|
|
$12 = $3;
|
|
$13 = ($12|0)!=(0|0);
|
|
if ($13) {
|
|
$14 = $1;
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = $g;
|
|
$17 = (($15) + ($16)|0);
|
|
$18 = ((($17)) + 2|0);
|
|
$19 = (_nk_ttSHORT($18)|0);
|
|
$20 = $19 << 16 >> 16;
|
|
$21 = $3;
|
|
HEAP32[$21>>2] = $20;
|
|
}
|
|
$22 = $4;
|
|
$23 = ($22|0)!=(0|0);
|
|
if ($23) {
|
|
$24 = $1;
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = $g;
|
|
$27 = (($25) + ($26)|0);
|
|
$28 = ((($27)) + 4|0);
|
|
$29 = (_nk_ttSHORT($28)|0);
|
|
$30 = $29 << 16 >> 16;
|
|
$31 = $4;
|
|
HEAP32[$31>>2] = $30;
|
|
}
|
|
$32 = $5;
|
|
$33 = ($32|0)!=(0|0);
|
|
if ($33) {
|
|
$34 = $1;
|
|
$35 = HEAP32[$34>>2]|0;
|
|
$36 = $g;
|
|
$37 = (($35) + ($36)|0);
|
|
$38 = ((($37)) + 6|0);
|
|
$39 = (_nk_ttSHORT($38)|0);
|
|
$40 = $39 << 16 >> 16;
|
|
$41 = $5;
|
|
HEAP32[$41>>2] = $40;
|
|
}
|
|
$42 = $6;
|
|
$43 = ($42|0)!=(0|0);
|
|
if ($43) {
|
|
$44 = $1;
|
|
$45 = HEAP32[$44>>2]|0;
|
|
$46 = $g;
|
|
$47 = (($45) + ($46)|0);
|
|
$48 = ((($47)) + 8|0);
|
|
$49 = (_nk_ttSHORT($48)|0);
|
|
$50 = $49 << 16 >> 16;
|
|
$51 = $6;
|
|
HEAP32[$51>>2] = $50;
|
|
}
|
|
$0 = 1;
|
|
$52 = $0;
|
|
STACKTOP = sp;return ($52|0);
|
|
}
|
|
function _nk_ifloor($x) {
|
|
$x = +$x;
|
|
var $0 = 0.0, $1 = 0.0, $10 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $x;
|
|
$1 = $0;
|
|
$2 = (~~(($1)));
|
|
$3 = $0;
|
|
$4 = $3;
|
|
$5 = $4 < 0.0;
|
|
$6 = $5 ? 1 : 0;
|
|
$7 = (($2) - ($6))|0;
|
|
$8 = (+($7|0));
|
|
$0 = $8;
|
|
$9 = $0;
|
|
$10 = (~~(($9)));
|
|
STACKTOP = sp;return ($10|0);
|
|
}
|
|
function _nk_iceil($x) {
|
|
$x = +$x;
|
|
var $0 = 0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, $i = 0, $r = 0.0, $t = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $x;
|
|
$2 = $1;
|
|
$3 = $2 >= 0.0;
|
|
$4 = $1;
|
|
$5 = (~~(($4)));
|
|
if ($3) {
|
|
$i = $5;
|
|
$6 = $i;
|
|
$0 = $6;
|
|
$16 = $0;
|
|
STACKTOP = sp;return ($16|0);
|
|
} else {
|
|
$t = $5;
|
|
$7 = $1;
|
|
$8 = $t;
|
|
$9 = (+($8|0));
|
|
$10 = $7 - $9;
|
|
$r = $10;
|
|
$11 = $r;
|
|
$12 = $11 > 0.0;
|
|
$13 = $t;
|
|
$14 = (($13) + 1)|0;
|
|
$15 = $12 ? $14 : $13;
|
|
$0 = $15;
|
|
$16 = $0;
|
|
STACKTOP = sp;return ($16|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_tt__GetGlyfOffset($info,$glyph_index) {
|
|
$info = $info|0;
|
|
$glyph_index = $glyph_index|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $8 = 0, $9 = 0, $g1 = 0, $g2 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $info;
|
|
$2 = $glyph_index;
|
|
$3 = $2;
|
|
$4 = $1;
|
|
$5 = ((($4)) + 8|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$7 = ($3|0)>=($6|0);
|
|
if ($7) {
|
|
$0 = -1;
|
|
$73 = $0;
|
|
STACKTOP = sp;return ($73|0);
|
|
}
|
|
$8 = $1;
|
|
$9 = ((($8)) + 40|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = ($10|0)>=(2);
|
|
if ($11) {
|
|
$0 = -1;
|
|
$73 = $0;
|
|
STACKTOP = sp;return ($73|0);
|
|
}
|
|
$12 = $1;
|
|
$13 = ((($12)) + 40|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = ($14|0)==(0);
|
|
$16 = $1;
|
|
$17 = ((($16)) + 20|0);
|
|
$18 = HEAP32[$17>>2]|0;
|
|
$19 = $1;
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = $1;
|
|
$22 = ((($21)) + 12|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$24 = (($20) + ($23)|0);
|
|
$25 = $2;
|
|
if ($15) {
|
|
$26 = $25<<1;
|
|
$27 = (($24) + ($26)|0);
|
|
$28 = (_nk_ttUSHORT($27)|0);
|
|
$29 = $28&65535;
|
|
$30 = $29<<1;
|
|
$31 = (($18) + ($30))|0;
|
|
$g1 = $31;
|
|
$32 = $1;
|
|
$33 = ((($32)) + 20|0);
|
|
$34 = HEAP32[$33>>2]|0;
|
|
$35 = $1;
|
|
$36 = HEAP32[$35>>2]|0;
|
|
$37 = $1;
|
|
$38 = ((($37)) + 12|0);
|
|
$39 = HEAP32[$38>>2]|0;
|
|
$40 = (($36) + ($39)|0);
|
|
$41 = $2;
|
|
$42 = $41<<1;
|
|
$43 = (($40) + ($42)|0);
|
|
$44 = ((($43)) + 2|0);
|
|
$45 = (_nk_ttUSHORT($44)|0);
|
|
$46 = $45&65535;
|
|
$47 = $46<<1;
|
|
$48 = (($34) + ($47))|0;
|
|
$g2 = $48;
|
|
} else {
|
|
$49 = $25<<2;
|
|
$50 = (($24) + ($49)|0);
|
|
$51 = (_nk_ttULONG($50)|0);
|
|
$52 = (($18) + ($51))|0;
|
|
$g1 = $52;
|
|
$53 = $1;
|
|
$54 = ((($53)) + 20|0);
|
|
$55 = HEAP32[$54>>2]|0;
|
|
$56 = $1;
|
|
$57 = HEAP32[$56>>2]|0;
|
|
$58 = $1;
|
|
$59 = ((($58)) + 12|0);
|
|
$60 = HEAP32[$59>>2]|0;
|
|
$61 = (($57) + ($60)|0);
|
|
$62 = $2;
|
|
$63 = $62<<2;
|
|
$64 = (($61) + ($63)|0);
|
|
$65 = ((($64)) + 4|0);
|
|
$66 = (_nk_ttULONG($65)|0);
|
|
$67 = (($55) + ($66))|0;
|
|
$g2 = $67;
|
|
}
|
|
$68 = $g1;
|
|
$69 = $g2;
|
|
$70 = ($68|0)==($69|0);
|
|
$71 = $g1;
|
|
$72 = $70 ? -1 : $71;
|
|
$0 = $72;
|
|
$73 = $0;
|
|
STACKTOP = sp;return ($73|0);
|
|
}
|
|
function _nk_tt__oversample_shift($oversample) {
|
|
$oversample = $oversample|0;
|
|
var $0 = 0.0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $oversample;
|
|
$2 = $1;
|
|
$3 = ($2|0)!=(0);
|
|
if ($3) {
|
|
$4 = $1;
|
|
$5 = (($4) - 1)|0;
|
|
$6 = (0 - ($5))|0;
|
|
$7 = (+($6|0));
|
|
$8 = $1;
|
|
$9 = (+($8|0));
|
|
$10 = 2.0 * $9;
|
|
$11 = $7 / $10;
|
|
$0 = $11;
|
|
$12 = $0;
|
|
STACKTOP = sp;return (+$12);
|
|
} else {
|
|
$0 = 0.0;
|
|
$12 = $0;
|
|
STACKTOP = sp;return (+$12);
|
|
}
|
|
return +(0.0);
|
|
}
|
|
function _nk_tt_GetGlyphHMetrics($info,$glyph_index,$advanceWidth,$leftSideBearing) {
|
|
$info = $info|0;
|
|
$glyph_index = $glyph_index|0;
|
|
$advanceWidth = $advanceWidth|0;
|
|
$leftSideBearing = $leftSideBearing|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $9 = 0;
|
|
var $numOfLongHorMetrics = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $info;
|
|
$1 = $glyph_index;
|
|
$2 = $advanceWidth;
|
|
$3 = $leftSideBearing;
|
|
$4 = $0;
|
|
$5 = HEAP32[$4>>2]|0;
|
|
$6 = $0;
|
|
$7 = ((($6)) + 24|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = (($5) + ($8)|0);
|
|
$10 = ((($9)) + 34|0);
|
|
$11 = (_nk_ttUSHORT($10)|0);
|
|
$numOfLongHorMetrics = $11;
|
|
$12 = $1;
|
|
$13 = $numOfLongHorMetrics;
|
|
$14 = $13&65535;
|
|
$15 = ($12|0)<($14|0);
|
|
$16 = $2;
|
|
$17 = ($16|0)!=(0|0);
|
|
if ($15) {
|
|
if ($17) {
|
|
$18 = $0;
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = $0;
|
|
$21 = ((($20)) + 28|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = (($19) + ($22)|0);
|
|
$24 = $1;
|
|
$25 = $24<<2;
|
|
$26 = (($23) + ($25)|0);
|
|
$27 = (_nk_ttSHORT($26)|0);
|
|
$28 = $27 << 16 >> 16;
|
|
$29 = $2;
|
|
HEAP32[$29>>2] = $28;
|
|
}
|
|
$30 = $3;
|
|
$31 = ($30|0)!=(0|0);
|
|
if (!($31)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$32 = $0;
|
|
$33 = HEAP32[$32>>2]|0;
|
|
$34 = $0;
|
|
$35 = ((($34)) + 28|0);
|
|
$36 = HEAP32[$35>>2]|0;
|
|
$37 = (($33) + ($36)|0);
|
|
$38 = $1;
|
|
$39 = $38<<2;
|
|
$40 = (($37) + ($39)|0);
|
|
$41 = ((($40)) + 2|0);
|
|
$42 = (_nk_ttSHORT($41)|0);
|
|
$43 = $42 << 16 >> 16;
|
|
$44 = $3;
|
|
HEAP32[$44>>2] = $43;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
if ($17) {
|
|
$45 = $0;
|
|
$46 = HEAP32[$45>>2]|0;
|
|
$47 = $0;
|
|
$48 = ((($47)) + 28|0);
|
|
$49 = HEAP32[$48>>2]|0;
|
|
$50 = (($46) + ($49)|0);
|
|
$51 = $numOfLongHorMetrics;
|
|
$52 = $51&65535;
|
|
$53 = (($52) - 1)|0;
|
|
$54 = $53<<2;
|
|
$55 = (($50) + ($54)|0);
|
|
$56 = (_nk_ttSHORT($55)|0);
|
|
$57 = $56 << 16 >> 16;
|
|
$58 = $2;
|
|
HEAP32[$58>>2] = $57;
|
|
}
|
|
$59 = $3;
|
|
$60 = ($59|0)!=(0|0);
|
|
if (!($60)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$61 = $0;
|
|
$62 = HEAP32[$61>>2]|0;
|
|
$63 = $0;
|
|
$64 = ((($63)) + 28|0);
|
|
$65 = HEAP32[$64>>2]|0;
|
|
$66 = (($62) + ($65)|0);
|
|
$67 = $numOfLongHorMetrics;
|
|
$68 = $67&65535;
|
|
$69 = $68<<2;
|
|
$70 = (($66) + ($69)|0);
|
|
$71 = $1;
|
|
$72 = $numOfLongHorMetrics;
|
|
$73 = $72&65535;
|
|
$74 = (($71) - ($73))|0;
|
|
$75 = $74<<1;
|
|
$76 = (($70) + ($75)|0);
|
|
$77 = (_nk_ttSHORT($76)|0);
|
|
$78 = $77 << 16 >> 16;
|
|
$79 = $3;
|
|
HEAP32[$79>>2] = $78;
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_tt_GetGlyphBitmapBox($font,$glyph,$scale_x,$scale_y,$ix0,$iy0,$ix1,$iy1) {
|
|
$font = $font|0;
|
|
$glyph = $glyph|0;
|
|
$scale_x = +$scale_x;
|
|
$scale_y = +$scale_y;
|
|
$ix0 = $ix0|0;
|
|
$iy0 = $iy0|0;
|
|
$ix1 = $ix1|0;
|
|
$iy1 = $iy1|0;
|
|
var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $font;
|
|
$1 = $glyph;
|
|
$2 = $scale_x;
|
|
$3 = $scale_y;
|
|
$4 = $ix0;
|
|
$5 = $iy0;
|
|
$6 = $ix1;
|
|
$7 = $iy1;
|
|
$8 = $0;
|
|
$9 = $1;
|
|
$10 = $2;
|
|
$11 = $3;
|
|
$12 = $4;
|
|
$13 = $5;
|
|
$14 = $6;
|
|
$15 = $7;
|
|
_nk_tt_GetGlyphBitmapBoxSubpixel($8,$9,$10,$11,0.0,0.0,$12,$13,$14,$15);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_tt_MakeGlyphBitmapSubpixel($info,$output,$out_w,$out_h,$out_stride,$scale_x,$scale_y,$shift_x,$shift_y,$glyph,$alloc) {
|
|
$info = $info|0;
|
|
$output = $output|0;
|
|
$out_w = $out_w|0;
|
|
$out_h = $out_h|0;
|
|
$out_stride = $out_stride|0;
|
|
$scale_x = +$scale_x;
|
|
$scale_y = +$scale_y;
|
|
$shift_x = +$shift_x;
|
|
$shift_y = +$shift_y;
|
|
$glyph = $glyph|0;
|
|
$alloc = $alloc|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
|
|
var $44 = 0, $45 = 0, $46 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, $gbm = 0, $ix0 = 0, $iy0 = 0, $num_verts = 0, $vertices = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 76|0;
|
|
$ix0 = sp + 28|0;
|
|
$iy0 = sp + 24|0;
|
|
$vertices = sp + 20|0;
|
|
$gbm = sp;
|
|
$0 = $info;
|
|
$1 = $output;
|
|
$2 = $out_w;
|
|
$3 = $out_h;
|
|
$4 = $out_stride;
|
|
$5 = $scale_x;
|
|
$6 = $scale_y;
|
|
$7 = $shift_x;
|
|
$8 = $shift_y;
|
|
$9 = $glyph;
|
|
$10 = $alloc;
|
|
$11 = $0;
|
|
$12 = $10;
|
|
$13 = $9;
|
|
$14 = (_nk_tt_GetGlyphShape($11,$12,$13,$vertices)|0);
|
|
$num_verts = $14;
|
|
$15 = $0;
|
|
$16 = $9;
|
|
$17 = $5;
|
|
$18 = $6;
|
|
$19 = $7;
|
|
$20 = $8;
|
|
_nk_tt_GetGlyphBitmapBoxSubpixel($15,$16,$17,$18,$19,$20,$ix0,$iy0,0,0);
|
|
$21 = $1;
|
|
$22 = ((($gbm)) + 12|0);
|
|
HEAP32[$22>>2] = $21;
|
|
$23 = $2;
|
|
HEAP32[$gbm>>2] = $23;
|
|
$24 = $3;
|
|
$25 = ((($gbm)) + 4|0);
|
|
HEAP32[$25>>2] = $24;
|
|
$26 = $4;
|
|
$27 = ((($gbm)) + 8|0);
|
|
HEAP32[$27>>2] = $26;
|
|
$28 = HEAP32[$gbm>>2]|0;
|
|
$29 = ($28|0)!=(0);
|
|
if ($29) {
|
|
$30 = ((($gbm)) + 4|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = ($31|0)!=(0);
|
|
if ($32) {
|
|
$33 = HEAP32[$vertices>>2]|0;
|
|
$34 = $num_verts;
|
|
$35 = $5;
|
|
$36 = $6;
|
|
$37 = $7;
|
|
$38 = $8;
|
|
$39 = HEAP32[$ix0>>2]|0;
|
|
$40 = HEAP32[$iy0>>2]|0;
|
|
$41 = $10;
|
|
_nk_tt_Rasterize($gbm,0.34999999403953552,$33,$34,$35,$36,$37,$38,$39,$40,1,$41);
|
|
}
|
|
}
|
|
$42 = $10;
|
|
$43 = ((($42)) + 8|0);
|
|
$44 = HEAP32[$43>>2]|0;
|
|
$45 = $10;
|
|
$46 = HEAP32[$vertices>>2]|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$45>>2]|0;
|
|
FUNCTION_TABLE_vii[$44 & 31]($$byval_copy,$46);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_tt__h_prefilter($pixels,$w,$h,$stride_in_bytes,$kernel_width) {
|
|
$pixels = $pixels|0;
|
|
$w = $w|0;
|
|
$h = $h|0;
|
|
$stride_in_bytes = $stride_in_bytes|0;
|
|
$kernel_width = $kernel_width|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
|
|
var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
|
|
var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
|
|
var $206 = 0, $207 = 0, $208 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0;
|
|
var $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0;
|
|
var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0;
|
|
var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0;
|
|
var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $buffer = 0, $i = 0, $j = 0, $safe_w = 0, $total = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$buffer = sp + 40|0;
|
|
$0 = $pixels;
|
|
$1 = $w;
|
|
$2 = $h;
|
|
$3 = $stride_in_bytes;
|
|
$4 = $kernel_width;
|
|
$5 = $1;
|
|
$6 = $4;
|
|
$7 = (($5) - ($6))|0;
|
|
$safe_w = $7;
|
|
$j = 0;
|
|
L1: while(1) {
|
|
$8 = $j;
|
|
$9 = $2;
|
|
$10 = ($8|0)<($9|0);
|
|
if (!($10)) {
|
|
label = 24;
|
|
break;
|
|
}
|
|
$11 = $4;
|
|
_nk_memset($buffer,0,$11);
|
|
$total = 0;
|
|
$12 = $4;
|
|
L4: do {
|
|
switch ($12|0) {
|
|
case 2: {
|
|
$i = 0;
|
|
while(1) {
|
|
$13 = $i;
|
|
$14 = $safe_w;
|
|
$15 = ($13|0)<=($14|0);
|
|
if (!($15)) {
|
|
break L4;
|
|
}
|
|
$16 = $i;
|
|
$17 = $0;
|
|
$18 = (($17) + ($16)|0);
|
|
$19 = HEAP8[$18>>0]|0;
|
|
$20 = $19&255;
|
|
$21 = $i;
|
|
$22 = $21 & 7;
|
|
$23 = (($buffer) + ($22)|0);
|
|
$24 = HEAP8[$23>>0]|0;
|
|
$25 = $24&255;
|
|
$26 = (($20) - ($25))|0;
|
|
$27 = $total;
|
|
$28 = (($27) + ($26))|0;
|
|
$total = $28;
|
|
$29 = $i;
|
|
$30 = $0;
|
|
$31 = (($30) + ($29)|0);
|
|
$32 = HEAP8[$31>>0]|0;
|
|
$33 = $i;
|
|
$34 = $4;
|
|
$35 = (($33) + ($34))|0;
|
|
$36 = $35 & 7;
|
|
$37 = (($buffer) + ($36)|0);
|
|
HEAP8[$37>>0] = $32;
|
|
$38 = $total;
|
|
$39 = (($38>>>0) / 2)&-1;
|
|
$40 = $39&255;
|
|
$41 = $i;
|
|
$42 = $0;
|
|
$43 = (($42) + ($41)|0);
|
|
HEAP8[$43>>0] = $40;
|
|
$44 = $i;
|
|
$45 = (($44) + 1)|0;
|
|
$i = $45;
|
|
}
|
|
break;
|
|
}
|
|
case 3: {
|
|
$i = 0;
|
|
while(1) {
|
|
$46 = $i;
|
|
$47 = $safe_w;
|
|
$48 = ($46|0)<=($47|0);
|
|
if (!($48)) {
|
|
break L4;
|
|
}
|
|
$49 = $i;
|
|
$50 = $0;
|
|
$51 = (($50) + ($49)|0);
|
|
$52 = HEAP8[$51>>0]|0;
|
|
$53 = $52&255;
|
|
$54 = $i;
|
|
$55 = $54 & 7;
|
|
$56 = (($buffer) + ($55)|0);
|
|
$57 = HEAP8[$56>>0]|0;
|
|
$58 = $57&255;
|
|
$59 = (($53) - ($58))|0;
|
|
$60 = $total;
|
|
$61 = (($60) + ($59))|0;
|
|
$total = $61;
|
|
$62 = $i;
|
|
$63 = $0;
|
|
$64 = (($63) + ($62)|0);
|
|
$65 = HEAP8[$64>>0]|0;
|
|
$66 = $i;
|
|
$67 = $4;
|
|
$68 = (($66) + ($67))|0;
|
|
$69 = $68 & 7;
|
|
$70 = (($buffer) + ($69)|0);
|
|
HEAP8[$70>>0] = $65;
|
|
$71 = $total;
|
|
$72 = (($71>>>0) / 3)&-1;
|
|
$73 = $72&255;
|
|
$74 = $i;
|
|
$75 = $0;
|
|
$76 = (($75) + ($74)|0);
|
|
HEAP8[$76>>0] = $73;
|
|
$77 = $i;
|
|
$78 = (($77) + 1)|0;
|
|
$i = $78;
|
|
}
|
|
break;
|
|
}
|
|
case 4: {
|
|
$i = 0;
|
|
while(1) {
|
|
$79 = $i;
|
|
$80 = $safe_w;
|
|
$81 = ($79|0)<=($80|0);
|
|
if (!($81)) {
|
|
break L4;
|
|
}
|
|
$82 = $i;
|
|
$83 = $0;
|
|
$84 = (($83) + ($82)|0);
|
|
$85 = HEAP8[$84>>0]|0;
|
|
$86 = $85&255;
|
|
$87 = $i;
|
|
$88 = $87 & 7;
|
|
$89 = (($buffer) + ($88)|0);
|
|
$90 = HEAP8[$89>>0]|0;
|
|
$91 = $90&255;
|
|
$92 = (($86) - ($91))|0;
|
|
$93 = $total;
|
|
$94 = (($93) + ($92))|0;
|
|
$total = $94;
|
|
$95 = $i;
|
|
$96 = $0;
|
|
$97 = (($96) + ($95)|0);
|
|
$98 = HEAP8[$97>>0]|0;
|
|
$99 = $i;
|
|
$100 = $4;
|
|
$101 = (($99) + ($100))|0;
|
|
$102 = $101 & 7;
|
|
$103 = (($buffer) + ($102)|0);
|
|
HEAP8[$103>>0] = $98;
|
|
$104 = $total;
|
|
$105 = (($104>>>0) / 4)&-1;
|
|
$106 = $105&255;
|
|
$107 = $i;
|
|
$108 = $0;
|
|
$109 = (($108) + ($107)|0);
|
|
HEAP8[$109>>0] = $106;
|
|
$110 = $i;
|
|
$111 = (($110) + 1)|0;
|
|
$i = $111;
|
|
}
|
|
break;
|
|
}
|
|
case 5: {
|
|
$i = 0;
|
|
while(1) {
|
|
$112 = $i;
|
|
$113 = $safe_w;
|
|
$114 = ($112|0)<=($113|0);
|
|
if (!($114)) {
|
|
break L4;
|
|
}
|
|
$115 = $i;
|
|
$116 = $0;
|
|
$117 = (($116) + ($115)|0);
|
|
$118 = HEAP8[$117>>0]|0;
|
|
$119 = $118&255;
|
|
$120 = $i;
|
|
$121 = $120 & 7;
|
|
$122 = (($buffer) + ($121)|0);
|
|
$123 = HEAP8[$122>>0]|0;
|
|
$124 = $123&255;
|
|
$125 = (($119) - ($124))|0;
|
|
$126 = $total;
|
|
$127 = (($126) + ($125))|0;
|
|
$total = $127;
|
|
$128 = $i;
|
|
$129 = $0;
|
|
$130 = (($129) + ($128)|0);
|
|
$131 = HEAP8[$130>>0]|0;
|
|
$132 = $i;
|
|
$133 = $4;
|
|
$134 = (($132) + ($133))|0;
|
|
$135 = $134 & 7;
|
|
$136 = (($buffer) + ($135)|0);
|
|
HEAP8[$136>>0] = $131;
|
|
$137 = $total;
|
|
$138 = (($137>>>0) / 5)&-1;
|
|
$139 = $138&255;
|
|
$140 = $i;
|
|
$141 = $0;
|
|
$142 = (($141) + ($140)|0);
|
|
HEAP8[$142>>0] = $139;
|
|
$143 = $i;
|
|
$144 = (($143) + 1)|0;
|
|
$i = $144;
|
|
}
|
|
break;
|
|
}
|
|
default: {
|
|
$i = 0;
|
|
while(1) {
|
|
$145 = $i;
|
|
$146 = $safe_w;
|
|
$147 = ($145|0)<=($146|0);
|
|
if (!($147)) {
|
|
break L4;
|
|
}
|
|
$148 = $i;
|
|
$149 = $0;
|
|
$150 = (($149) + ($148)|0);
|
|
$151 = HEAP8[$150>>0]|0;
|
|
$152 = $151&255;
|
|
$153 = $i;
|
|
$154 = $153 & 7;
|
|
$155 = (($buffer) + ($154)|0);
|
|
$156 = HEAP8[$155>>0]|0;
|
|
$157 = $156&255;
|
|
$158 = (($152) - ($157))|0;
|
|
$159 = $total;
|
|
$160 = (($159) + ($158))|0;
|
|
$total = $160;
|
|
$161 = $i;
|
|
$162 = $0;
|
|
$163 = (($162) + ($161)|0);
|
|
$164 = HEAP8[$163>>0]|0;
|
|
$165 = $i;
|
|
$166 = $4;
|
|
$167 = (($165) + ($166))|0;
|
|
$168 = $167 & 7;
|
|
$169 = (($buffer) + ($168)|0);
|
|
HEAP8[$169>>0] = $164;
|
|
$170 = $total;
|
|
$171 = $4;
|
|
$172 = (($170>>>0) / ($171>>>0))&-1;
|
|
$173 = $172&255;
|
|
$174 = $i;
|
|
$175 = $0;
|
|
$176 = (($175) + ($174)|0);
|
|
HEAP8[$176>>0] = $173;
|
|
$177 = $i;
|
|
$178 = (($177) + 1)|0;
|
|
$i = $178;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
while(1) {
|
|
$179 = $i;
|
|
$180 = $1;
|
|
$181 = ($179|0)<($180|0);
|
|
if (!($181)) {
|
|
break;
|
|
}
|
|
$182 = $i;
|
|
$183 = $0;
|
|
$184 = (($183) + ($182)|0);
|
|
$185 = HEAP8[$184>>0]|0;
|
|
$186 = $185&255;
|
|
$187 = ($186|0)==(0);
|
|
if (!($187)) {
|
|
label = 21;
|
|
break L1;
|
|
}
|
|
$188 = $i;
|
|
$189 = $188 & 7;
|
|
$190 = (($buffer) + ($189)|0);
|
|
$191 = HEAP8[$190>>0]|0;
|
|
$192 = $191&255;
|
|
$193 = $total;
|
|
$194 = (($193) - ($192))|0;
|
|
$total = $194;
|
|
$195 = $total;
|
|
$196 = $4;
|
|
$197 = (($195>>>0) / ($196>>>0))&-1;
|
|
$198 = $197&255;
|
|
$199 = $i;
|
|
$200 = $0;
|
|
$201 = (($200) + ($199)|0);
|
|
HEAP8[$201>>0] = $198;
|
|
$202 = $i;
|
|
$203 = (($202) + 1)|0;
|
|
$i = $203;
|
|
}
|
|
$204 = $3;
|
|
$205 = $0;
|
|
$206 = (($205) + ($204)|0);
|
|
$0 = $206;
|
|
$207 = $j;
|
|
$208 = (($207) + 1)|0;
|
|
$j = $208;
|
|
}
|
|
if ((label|0) == 21) {
|
|
___assert_fail((30938|0),(13400|0),8443,(30953|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 24) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_tt__v_prefilter($pixels,$w,$h,$stride_in_bytes,$kernel_width) {
|
|
$pixels = $pixels|0;
|
|
$w = $w|0;
|
|
$h = $h|0;
|
|
$stride_in_bytes = $stride_in_bytes|0;
|
|
$kernel_width = $kernel_width|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
|
|
var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
|
|
var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
|
|
var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
|
|
var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0;
|
|
var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
|
|
var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
|
|
var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0;
|
|
var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0;
|
|
var $98 = 0, $99 = 0, $buffer = 0, $i = 0, $j = 0, $safe_h = 0, $total = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$buffer = sp + 40|0;
|
|
$0 = $pixels;
|
|
$1 = $w;
|
|
$2 = $h;
|
|
$3 = $stride_in_bytes;
|
|
$4 = $kernel_width;
|
|
$5 = $2;
|
|
$6 = $4;
|
|
$7 = (($5) - ($6))|0;
|
|
$safe_h = $7;
|
|
$j = 0;
|
|
L1: while(1) {
|
|
$8 = $j;
|
|
$9 = $1;
|
|
$10 = ($8|0)<($9|0);
|
|
if (!($10)) {
|
|
label = 24;
|
|
break;
|
|
}
|
|
$11 = $4;
|
|
_nk_memset($buffer,0,$11);
|
|
$total = 0;
|
|
$12 = $4;
|
|
L4: do {
|
|
switch ($12|0) {
|
|
case 2: {
|
|
$i = 0;
|
|
while(1) {
|
|
$13 = $i;
|
|
$14 = $safe_h;
|
|
$15 = ($13|0)<=($14|0);
|
|
if (!($15)) {
|
|
break L4;
|
|
}
|
|
$16 = $i;
|
|
$17 = $3;
|
|
$18 = Math_imul($16, $17)|0;
|
|
$19 = $0;
|
|
$20 = (($19) + ($18)|0);
|
|
$21 = HEAP8[$20>>0]|0;
|
|
$22 = $21&255;
|
|
$23 = $i;
|
|
$24 = $23 & 7;
|
|
$25 = (($buffer) + ($24)|0);
|
|
$26 = HEAP8[$25>>0]|0;
|
|
$27 = $26&255;
|
|
$28 = (($22) - ($27))|0;
|
|
$29 = $total;
|
|
$30 = (($29) + ($28))|0;
|
|
$total = $30;
|
|
$31 = $i;
|
|
$32 = $3;
|
|
$33 = Math_imul($31, $32)|0;
|
|
$34 = $0;
|
|
$35 = (($34) + ($33)|0);
|
|
$36 = HEAP8[$35>>0]|0;
|
|
$37 = $i;
|
|
$38 = $4;
|
|
$39 = (($37) + ($38))|0;
|
|
$40 = $39 & 7;
|
|
$41 = (($buffer) + ($40)|0);
|
|
HEAP8[$41>>0] = $36;
|
|
$42 = $total;
|
|
$43 = (($42>>>0) / 2)&-1;
|
|
$44 = $43&255;
|
|
$45 = $i;
|
|
$46 = $3;
|
|
$47 = Math_imul($45, $46)|0;
|
|
$48 = $0;
|
|
$49 = (($48) + ($47)|0);
|
|
HEAP8[$49>>0] = $44;
|
|
$50 = $i;
|
|
$51 = (($50) + 1)|0;
|
|
$i = $51;
|
|
}
|
|
break;
|
|
}
|
|
case 3: {
|
|
$i = 0;
|
|
while(1) {
|
|
$52 = $i;
|
|
$53 = $safe_h;
|
|
$54 = ($52|0)<=($53|0);
|
|
if (!($54)) {
|
|
break L4;
|
|
}
|
|
$55 = $i;
|
|
$56 = $3;
|
|
$57 = Math_imul($55, $56)|0;
|
|
$58 = $0;
|
|
$59 = (($58) + ($57)|0);
|
|
$60 = HEAP8[$59>>0]|0;
|
|
$61 = $60&255;
|
|
$62 = $i;
|
|
$63 = $62 & 7;
|
|
$64 = (($buffer) + ($63)|0);
|
|
$65 = HEAP8[$64>>0]|0;
|
|
$66 = $65&255;
|
|
$67 = (($61) - ($66))|0;
|
|
$68 = $total;
|
|
$69 = (($68) + ($67))|0;
|
|
$total = $69;
|
|
$70 = $i;
|
|
$71 = $3;
|
|
$72 = Math_imul($70, $71)|0;
|
|
$73 = $0;
|
|
$74 = (($73) + ($72)|0);
|
|
$75 = HEAP8[$74>>0]|0;
|
|
$76 = $i;
|
|
$77 = $4;
|
|
$78 = (($76) + ($77))|0;
|
|
$79 = $78 & 7;
|
|
$80 = (($buffer) + ($79)|0);
|
|
HEAP8[$80>>0] = $75;
|
|
$81 = $total;
|
|
$82 = (($81>>>0) / 3)&-1;
|
|
$83 = $82&255;
|
|
$84 = $i;
|
|
$85 = $3;
|
|
$86 = Math_imul($84, $85)|0;
|
|
$87 = $0;
|
|
$88 = (($87) + ($86)|0);
|
|
HEAP8[$88>>0] = $83;
|
|
$89 = $i;
|
|
$90 = (($89) + 1)|0;
|
|
$i = $90;
|
|
}
|
|
break;
|
|
}
|
|
case 4: {
|
|
$i = 0;
|
|
while(1) {
|
|
$91 = $i;
|
|
$92 = $safe_h;
|
|
$93 = ($91|0)<=($92|0);
|
|
if (!($93)) {
|
|
break L4;
|
|
}
|
|
$94 = $i;
|
|
$95 = $3;
|
|
$96 = Math_imul($94, $95)|0;
|
|
$97 = $0;
|
|
$98 = (($97) + ($96)|0);
|
|
$99 = HEAP8[$98>>0]|0;
|
|
$100 = $99&255;
|
|
$101 = $i;
|
|
$102 = $101 & 7;
|
|
$103 = (($buffer) + ($102)|0);
|
|
$104 = HEAP8[$103>>0]|0;
|
|
$105 = $104&255;
|
|
$106 = (($100) - ($105))|0;
|
|
$107 = $total;
|
|
$108 = (($107) + ($106))|0;
|
|
$total = $108;
|
|
$109 = $i;
|
|
$110 = $3;
|
|
$111 = Math_imul($109, $110)|0;
|
|
$112 = $0;
|
|
$113 = (($112) + ($111)|0);
|
|
$114 = HEAP8[$113>>0]|0;
|
|
$115 = $i;
|
|
$116 = $4;
|
|
$117 = (($115) + ($116))|0;
|
|
$118 = $117 & 7;
|
|
$119 = (($buffer) + ($118)|0);
|
|
HEAP8[$119>>0] = $114;
|
|
$120 = $total;
|
|
$121 = (($120>>>0) / 4)&-1;
|
|
$122 = $121&255;
|
|
$123 = $i;
|
|
$124 = $3;
|
|
$125 = Math_imul($123, $124)|0;
|
|
$126 = $0;
|
|
$127 = (($126) + ($125)|0);
|
|
HEAP8[$127>>0] = $122;
|
|
$128 = $i;
|
|
$129 = (($128) + 1)|0;
|
|
$i = $129;
|
|
}
|
|
break;
|
|
}
|
|
case 5: {
|
|
$i = 0;
|
|
while(1) {
|
|
$130 = $i;
|
|
$131 = $safe_h;
|
|
$132 = ($130|0)<=($131|0);
|
|
if (!($132)) {
|
|
break L4;
|
|
}
|
|
$133 = $i;
|
|
$134 = $3;
|
|
$135 = Math_imul($133, $134)|0;
|
|
$136 = $0;
|
|
$137 = (($136) + ($135)|0);
|
|
$138 = HEAP8[$137>>0]|0;
|
|
$139 = $138&255;
|
|
$140 = $i;
|
|
$141 = $140 & 7;
|
|
$142 = (($buffer) + ($141)|0);
|
|
$143 = HEAP8[$142>>0]|0;
|
|
$144 = $143&255;
|
|
$145 = (($139) - ($144))|0;
|
|
$146 = $total;
|
|
$147 = (($146) + ($145))|0;
|
|
$total = $147;
|
|
$148 = $i;
|
|
$149 = $3;
|
|
$150 = Math_imul($148, $149)|0;
|
|
$151 = $0;
|
|
$152 = (($151) + ($150)|0);
|
|
$153 = HEAP8[$152>>0]|0;
|
|
$154 = $i;
|
|
$155 = $4;
|
|
$156 = (($154) + ($155))|0;
|
|
$157 = $156 & 7;
|
|
$158 = (($buffer) + ($157)|0);
|
|
HEAP8[$158>>0] = $153;
|
|
$159 = $total;
|
|
$160 = (($159>>>0) / 5)&-1;
|
|
$161 = $160&255;
|
|
$162 = $i;
|
|
$163 = $3;
|
|
$164 = Math_imul($162, $163)|0;
|
|
$165 = $0;
|
|
$166 = (($165) + ($164)|0);
|
|
HEAP8[$166>>0] = $161;
|
|
$167 = $i;
|
|
$168 = (($167) + 1)|0;
|
|
$i = $168;
|
|
}
|
|
break;
|
|
}
|
|
default: {
|
|
$i = 0;
|
|
while(1) {
|
|
$169 = $i;
|
|
$170 = $safe_h;
|
|
$171 = ($169|0)<=($170|0);
|
|
if (!($171)) {
|
|
break L4;
|
|
}
|
|
$172 = $i;
|
|
$173 = $3;
|
|
$174 = Math_imul($172, $173)|0;
|
|
$175 = $0;
|
|
$176 = (($175) + ($174)|0);
|
|
$177 = HEAP8[$176>>0]|0;
|
|
$178 = $177&255;
|
|
$179 = $i;
|
|
$180 = $179 & 7;
|
|
$181 = (($buffer) + ($180)|0);
|
|
$182 = HEAP8[$181>>0]|0;
|
|
$183 = $182&255;
|
|
$184 = (($178) - ($183))|0;
|
|
$185 = $total;
|
|
$186 = (($185) + ($184))|0;
|
|
$total = $186;
|
|
$187 = $i;
|
|
$188 = $3;
|
|
$189 = Math_imul($187, $188)|0;
|
|
$190 = $0;
|
|
$191 = (($190) + ($189)|0);
|
|
$192 = HEAP8[$191>>0]|0;
|
|
$193 = $i;
|
|
$194 = $4;
|
|
$195 = (($193) + ($194))|0;
|
|
$196 = $195 & 7;
|
|
$197 = (($buffer) + ($196)|0);
|
|
HEAP8[$197>>0] = $192;
|
|
$198 = $total;
|
|
$199 = $4;
|
|
$200 = (($198>>>0) / ($199>>>0))&-1;
|
|
$201 = $200&255;
|
|
$202 = $i;
|
|
$203 = $3;
|
|
$204 = Math_imul($202, $203)|0;
|
|
$205 = $0;
|
|
$206 = (($205) + ($204)|0);
|
|
HEAP8[$206>>0] = $201;
|
|
$207 = $i;
|
|
$208 = (($207) + 1)|0;
|
|
$i = $208;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
while(1) {
|
|
$209 = $i;
|
|
$210 = $2;
|
|
$211 = ($209|0)<($210|0);
|
|
if (!($211)) {
|
|
break;
|
|
}
|
|
$212 = $i;
|
|
$213 = $3;
|
|
$214 = Math_imul($212, $213)|0;
|
|
$215 = $0;
|
|
$216 = (($215) + ($214)|0);
|
|
$217 = HEAP8[$216>>0]|0;
|
|
$218 = $217&255;
|
|
$219 = ($218|0)==(0);
|
|
if (!($219)) {
|
|
label = 21;
|
|
break L1;
|
|
}
|
|
$220 = $i;
|
|
$221 = $220 & 7;
|
|
$222 = (($buffer) + ($221)|0);
|
|
$223 = HEAP8[$222>>0]|0;
|
|
$224 = $223&255;
|
|
$225 = $total;
|
|
$226 = (($225) - ($224))|0;
|
|
$total = $226;
|
|
$227 = $total;
|
|
$228 = $4;
|
|
$229 = (($227>>>0) / ($228>>>0))&-1;
|
|
$230 = $229&255;
|
|
$231 = $i;
|
|
$232 = $3;
|
|
$233 = Math_imul($231, $232)|0;
|
|
$234 = $0;
|
|
$235 = (($234) + ($233)|0);
|
|
HEAP8[$235>>0] = $230;
|
|
$236 = $i;
|
|
$237 = (($236) + 1)|0;
|
|
$i = $237;
|
|
}
|
|
$238 = $0;
|
|
$239 = ((($238)) + 1|0);
|
|
$0 = $239;
|
|
$240 = $j;
|
|
$241 = (($240) + 1)|0;
|
|
$j = $241;
|
|
}
|
|
if ((label|0) == 21) {
|
|
___assert_fail((30972|0),(13400|0),8507,(31003|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 24) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_tt_GetGlyphShape($info,$alloc,$glyph_index,$pvertices) {
|
|
$info = $info|0;
|
|
$alloc = $alloc|0;
|
|
$glyph_index = $glyph_index|0;
|
|
$pvertices = $pvertices|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0;
|
|
var $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0;
|
|
var $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0;
|
|
var $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0;
|
|
var $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0;
|
|
var $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0;
|
|
var $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0;
|
|
var $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0;
|
|
var $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0;
|
|
var $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0;
|
|
var $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0;
|
|
var $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0;
|
|
var $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0;
|
|
var $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0;
|
|
var $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0;
|
|
var $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0;
|
|
var $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0;
|
|
var $4 = 0, $40 = 0, $400 = 0, $401 = 0.0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0.0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0.0, $413 = 0, $414 = 0, $415 = 0, $416 = 0;
|
|
var $417 = 0, $418 = 0.0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0.0, $43 = 0, $430 = 0.0, $431 = 0, $432 = 0, $433 = 0, $434 = 0;
|
|
var $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0.0, $444 = 0.0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0.0;
|
|
var $453 = 0.0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0.0, $465 = 0.0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0;
|
|
var $471 = 0.0, $472 = 0.0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0.0, $48 = 0, $480 = 0.0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0.0, $488 = 0.0, $489 = 0;
|
|
var $49 = 0, $490 = 0, $491 = 0, $492 = 0.0, $493 = 0.0, $494 = 0.0, $495 = 0, $496 = 0.0, $497 = 0, $498 = 0.0, $499 = 0.0, $5 = 0, $50 = 0, $500 = 0.0, $501 = 0.0, $502 = 0, $503 = 0.0, $504 = 0, $505 = 0.0, $506 = 0.0;
|
|
var $507 = 0, $508 = 0.0, $509 = 0, $51 = 0, $510 = 0.0, $511 = 0.0, $512 = 0.0, $513 = 0.0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0;
|
|
var $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0.0, $533 = 0.0, $534 = 0, $535 = 0, $536 = 0.0, $537 = 0.0, $538 = 0, $539 = 0.0, $54 = 0, $540 = 0, $541 = 0, $542 = 0.0;
|
|
var $543 = 0.0, $544 = 0.0, $545 = 0, $546 = 0.0, $547 = 0.0, $548 = 0.0, $549 = 0, $55 = 0, $550 = 0, $551 = 0.0, $552 = 0, $553 = 0.0, $554 = 0, $555 = 0, $556 = 0.0, $557 = 0.0, $558 = 0, $559 = 0.0, $56 = 0, $560 = 0;
|
|
var $561 = 0, $562 = 0.0, $563 = 0.0, $564 = 0.0, $565 = 0, $566 = 0.0, $567 = 0.0, $568 = 0.0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0.0, $579 = 0.0;
|
|
var $58 = 0, $580 = 0, $581 = 0, $582 = 0.0, $583 = 0.0, $584 = 0, $585 = 0.0, $586 = 0, $587 = 0, $588 = 0.0, $589 = 0.0, $59 = 0, $590 = 0.0, $591 = 0, $592 = 0.0, $593 = 0.0, $594 = 0.0, $595 = 0, $596 = 0, $597 = 0;
|
|
var $598 = 0.0, $599 = 0, $6 = 0, $60 = 0, $600 = 0.0, $601 = 0, $602 = 0, $603 = 0.0, $604 = 0.0, $605 = 0, $606 = 0.0, $607 = 0, $608 = 0, $609 = 0.0, $61 = 0, $610 = 0.0, $611 = 0.0, $612 = 0, $613 = 0.0, $614 = 0.0;
|
|
var $615 = 0.0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0;
|
|
var $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0;
|
|
var $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0;
|
|
var $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0;
|
|
var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0;
|
|
var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $comp = 0, $comp_num_verts = 0, $comp_verts = 0, $cx = 0, $cy = 0, $data = 0, $dx = 0, $dy = 0, $endPtsOfContours = 0, $flagcount = 0;
|
|
var $flags = 0, $flags1 = 0, $g = 0, $gidx = 0, $i = 0, $i2 = 0, $ins = 0, $j = 0, $m = 0, $m3 = 0.0, $more = 0, $mtx = 0, $n = 0, $n4 = 0.0, $next_move = 0, $num_vertices = 0, $numberOfContours = 0, $off = 0, $points = 0, $scx = 0;
|
|
var $scy = 0, $start_off = 0, $sx = 0, $sy = 0, $tmp = 0, $v = 0, $vertices = 0, $was_off = 0, $x = 0, $x5 = 0, $y = 0, $y6 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 224|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy5 = sp + 196|0;
|
|
$$byval_copy4 = sp + 192|0;
|
|
$$byval_copy3 = sp + 188|0;
|
|
$$byval_copy2 = sp + 184|0;
|
|
$$byval_copy1 = sp + 180|0;
|
|
$$byval_copy = sp + 176|0;
|
|
$comp_verts = sp + 44|0;
|
|
$mtx = sp + 16|0;
|
|
$1 = $info;
|
|
$2 = $alloc;
|
|
$3 = $glyph_index;
|
|
$4 = $pvertices;
|
|
$5 = $1;
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$data = $6;
|
|
$vertices = 0;
|
|
$num_vertices = 0;
|
|
$7 = $1;
|
|
$8 = $3;
|
|
$9 = (_nk_tt__GetGlyfOffset($7,$8)|0);
|
|
$g = $9;
|
|
$10 = $4;
|
|
HEAP32[$10>>2] = 0;
|
|
$11 = $g;
|
|
$12 = ($11|0)<(0);
|
|
if ($12) {
|
|
$0 = 0;
|
|
$683 = $0;
|
|
STACKTOP = sp;return ($683|0);
|
|
}
|
|
$13 = $data;
|
|
$14 = $g;
|
|
$15 = (($13) + ($14)|0);
|
|
$16 = (_nk_ttSHORT($15)|0);
|
|
$numberOfContours = $16;
|
|
$17 = $numberOfContours;
|
|
$18 = $17 << 16 >> 16;
|
|
$19 = ($18|0)>(0);
|
|
L5: do {
|
|
if ($19) {
|
|
$flags = 0;
|
|
$j = 0;
|
|
$was_off = 0;
|
|
$start_off = 0;
|
|
$20 = $data;
|
|
$21 = $g;
|
|
$22 = (($20) + ($21)|0);
|
|
$23 = ((($22)) + 10|0);
|
|
$endPtsOfContours = $23;
|
|
$24 = $data;
|
|
$25 = $g;
|
|
$26 = (($24) + ($25)|0);
|
|
$27 = ((($26)) + 10|0);
|
|
$28 = $numberOfContours;
|
|
$29 = $28 << 16 >> 16;
|
|
$30 = $29<<1;
|
|
$31 = (($27) + ($30)|0);
|
|
$32 = (_nk_ttUSHORT($31)|0);
|
|
$33 = $32&65535;
|
|
$ins = $33;
|
|
$34 = $data;
|
|
$35 = $g;
|
|
$36 = (($34) + ($35)|0);
|
|
$37 = ((($36)) + 10|0);
|
|
$38 = $numberOfContours;
|
|
$39 = $38 << 16 >> 16;
|
|
$40 = $39<<1;
|
|
$41 = (($37) + ($40)|0);
|
|
$42 = ((($41)) + 2|0);
|
|
$43 = $ins;
|
|
$44 = (($42) + ($43)|0);
|
|
$points = $44;
|
|
$45 = $endPtsOfContours;
|
|
$46 = $numberOfContours;
|
|
$47 = $46 << 16 >> 16;
|
|
$48 = $47<<1;
|
|
$49 = (($45) + ($48)|0);
|
|
$50 = ((($49)) + -2|0);
|
|
$51 = (_nk_ttUSHORT($50)|0);
|
|
$52 = $51&65535;
|
|
$53 = (1 + ($52))|0;
|
|
$n = $53;
|
|
$54 = $n;
|
|
$55 = $numberOfContours;
|
|
$56 = $55 << 16 >> 16;
|
|
$57 = $56<<1;
|
|
$58 = (($54) + ($57))|0;
|
|
$m = $58;
|
|
$59 = $2;
|
|
$60 = ((($59)) + 4|0);
|
|
$61 = HEAP32[$60>>2]|0;
|
|
$62 = $2;
|
|
$63 = $m;
|
|
$64 = ($63*10)|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$62>>2]|0;
|
|
$65 = (FUNCTION_TABLE_iiii[$61 & 7]($$byval_copy,0,$64)|0);
|
|
$vertices = $65;
|
|
$66 = $vertices;
|
|
$67 = ($66|0)==(0|0);
|
|
if ($67) {
|
|
$0 = 0;
|
|
$683 = $0;
|
|
STACKTOP = sp;return ($683|0);
|
|
}
|
|
$next_move = 0;
|
|
$flagcount = 0;
|
|
$68 = $m;
|
|
$69 = $n;
|
|
$70 = (($68) - ($69))|0;
|
|
$off = $70;
|
|
$i = 0;
|
|
while(1) {
|
|
$71 = $i;
|
|
$72 = $n;
|
|
$73 = ($71|0)<($72|0);
|
|
if (!($73)) {
|
|
break;
|
|
}
|
|
$74 = $flagcount;
|
|
$75 = $74&255;
|
|
$76 = ($75|0)==(0);
|
|
if ($76) {
|
|
$77 = $points;
|
|
$78 = ((($77)) + 1|0);
|
|
$points = $78;
|
|
$79 = HEAP8[$77>>0]|0;
|
|
$flags = $79;
|
|
$80 = $flags;
|
|
$81 = $80&255;
|
|
$82 = $81 & 8;
|
|
$83 = ($82|0)!=(0);
|
|
if ($83) {
|
|
$84 = $points;
|
|
$85 = ((($84)) + 1|0);
|
|
$points = $85;
|
|
$86 = HEAP8[$84>>0]|0;
|
|
$flagcount = $86;
|
|
}
|
|
} else {
|
|
$87 = $flagcount;
|
|
$88 = (($87) + -1)<<24>>24;
|
|
$flagcount = $88;
|
|
}
|
|
$89 = $flags;
|
|
$90 = $off;
|
|
$91 = $i;
|
|
$92 = (($90) + ($91))|0;
|
|
$93 = $vertices;
|
|
$94 = (($93) + (($92*10)|0)|0);
|
|
$95 = ((($94)) + 8|0);
|
|
HEAP8[$95>>0] = $89;
|
|
$96 = $i;
|
|
$97 = (($96) + 1)|0;
|
|
$i = $97;
|
|
}
|
|
$x = 0;
|
|
$i = 0;
|
|
while(1) {
|
|
$98 = $i;
|
|
$99 = $n;
|
|
$100 = ($98|0)<($99|0);
|
|
if (!($100)) {
|
|
break;
|
|
}
|
|
$101 = $off;
|
|
$102 = $i;
|
|
$103 = (($101) + ($102))|0;
|
|
$104 = $vertices;
|
|
$105 = (($104) + (($103*10)|0)|0);
|
|
$106 = ((($105)) + 8|0);
|
|
$107 = HEAP8[$106>>0]|0;
|
|
$flags = $107;
|
|
$108 = $flags;
|
|
$109 = $108&255;
|
|
$110 = $109 & 2;
|
|
$111 = ($110|0)!=(0);
|
|
if ($111) {
|
|
$112 = $points;
|
|
$113 = ((($112)) + 1|0);
|
|
$points = $113;
|
|
$114 = HEAP8[$112>>0]|0;
|
|
$115 = $114&255;
|
|
$dx = $115;
|
|
$116 = $flags;
|
|
$117 = $116&255;
|
|
$118 = $117 & 16;
|
|
$119 = ($118|0)!=(0);
|
|
$120 = $dx;
|
|
$121 = $120 << 16 >> 16;
|
|
$122 = (0 - ($121))|0;
|
|
$123 = $119 ? $121 : $122;
|
|
$124 = $x;
|
|
$125 = (($124) + ($123))|0;
|
|
$x = $125;
|
|
} else {
|
|
$126 = $flags;
|
|
$127 = $126&255;
|
|
$128 = $127 & 16;
|
|
$129 = ($128|0)!=(0);
|
|
if (!($129)) {
|
|
$130 = $x;
|
|
$131 = $points;
|
|
$132 = HEAP8[$131>>0]|0;
|
|
$133 = $132&255;
|
|
$134 = $133<<8;
|
|
$135 = $points;
|
|
$136 = ((($135)) + 1|0);
|
|
$137 = HEAP8[$136>>0]|0;
|
|
$138 = $137&255;
|
|
$139 = (($134) + ($138))|0;
|
|
$140 = $139&65535;
|
|
$141 = $140 << 16 >> 16;
|
|
$142 = (($130) + ($141))|0;
|
|
$x = $142;
|
|
$143 = $points;
|
|
$144 = ((($143)) + 2|0);
|
|
$points = $144;
|
|
}
|
|
}
|
|
$145 = $x;
|
|
$146 = $145&65535;
|
|
$147 = $off;
|
|
$148 = $i;
|
|
$149 = (($147) + ($148))|0;
|
|
$150 = $vertices;
|
|
$151 = (($150) + (($149*10)|0)|0);
|
|
HEAP16[$151>>1] = $146;
|
|
$152 = $i;
|
|
$153 = (($152) + 1)|0;
|
|
$i = $153;
|
|
}
|
|
$y = 0;
|
|
$i = 0;
|
|
while(1) {
|
|
$154 = $i;
|
|
$155 = $n;
|
|
$156 = ($154|0)<($155|0);
|
|
if (!($156)) {
|
|
break;
|
|
}
|
|
$157 = $off;
|
|
$158 = $i;
|
|
$159 = (($157) + ($158))|0;
|
|
$160 = $vertices;
|
|
$161 = (($160) + (($159*10)|0)|0);
|
|
$162 = ((($161)) + 8|0);
|
|
$163 = HEAP8[$162>>0]|0;
|
|
$flags = $163;
|
|
$164 = $flags;
|
|
$165 = $164&255;
|
|
$166 = $165 & 4;
|
|
$167 = ($166|0)!=(0);
|
|
if ($167) {
|
|
$168 = $points;
|
|
$169 = ((($168)) + 1|0);
|
|
$points = $169;
|
|
$170 = HEAP8[$168>>0]|0;
|
|
$171 = $170&255;
|
|
$dy = $171;
|
|
$172 = $flags;
|
|
$173 = $172&255;
|
|
$174 = $173 & 32;
|
|
$175 = ($174|0)!=(0);
|
|
$176 = $dy;
|
|
$177 = $176 << 16 >> 16;
|
|
$178 = (0 - ($177))|0;
|
|
$179 = $175 ? $177 : $178;
|
|
$180 = $y;
|
|
$181 = (($180) + ($179))|0;
|
|
$y = $181;
|
|
} else {
|
|
$182 = $flags;
|
|
$183 = $182&255;
|
|
$184 = $183 & 32;
|
|
$185 = ($184|0)!=(0);
|
|
if (!($185)) {
|
|
$186 = $y;
|
|
$187 = $points;
|
|
$188 = HEAP8[$187>>0]|0;
|
|
$189 = $188&255;
|
|
$190 = $189<<8;
|
|
$191 = $points;
|
|
$192 = ((($191)) + 1|0);
|
|
$193 = HEAP8[$192>>0]|0;
|
|
$194 = $193&255;
|
|
$195 = (($190) + ($194))|0;
|
|
$196 = $195&65535;
|
|
$197 = $196 << 16 >> 16;
|
|
$198 = (($186) + ($197))|0;
|
|
$y = $198;
|
|
$199 = $points;
|
|
$200 = ((($199)) + 2|0);
|
|
$points = $200;
|
|
}
|
|
}
|
|
$201 = $y;
|
|
$202 = $201&65535;
|
|
$203 = $off;
|
|
$204 = $i;
|
|
$205 = (($203) + ($204))|0;
|
|
$206 = $vertices;
|
|
$207 = (($206) + (($205*10)|0)|0);
|
|
$208 = ((($207)) + 2|0);
|
|
HEAP16[$208>>1] = $202;
|
|
$209 = $i;
|
|
$210 = (($209) + 1)|0;
|
|
$i = $210;
|
|
}
|
|
$num_vertices = 0;
|
|
$scy = 0;
|
|
$scx = 0;
|
|
$cy = 0;
|
|
$cx = 0;
|
|
$sy = 0;
|
|
$sx = 0;
|
|
$i = 0;
|
|
while(1) {
|
|
$211 = $i;
|
|
$212 = $n;
|
|
$213 = ($211|0)<($212|0);
|
|
if (!($213)) {
|
|
break;
|
|
}
|
|
$214 = $off;
|
|
$215 = $i;
|
|
$216 = (($214) + ($215))|0;
|
|
$217 = $vertices;
|
|
$218 = (($217) + (($216*10)|0)|0);
|
|
$219 = ((($218)) + 8|0);
|
|
$220 = HEAP8[$219>>0]|0;
|
|
$flags = $220;
|
|
$221 = $off;
|
|
$222 = $i;
|
|
$223 = (($221) + ($222))|0;
|
|
$224 = $vertices;
|
|
$225 = (($224) + (($223*10)|0)|0);
|
|
$226 = HEAP16[$225>>1]|0;
|
|
$227 = $226 << 16 >> 16;
|
|
$x = $227;
|
|
$228 = $off;
|
|
$229 = $i;
|
|
$230 = (($228) + ($229))|0;
|
|
$231 = $vertices;
|
|
$232 = (($231) + (($230*10)|0)|0);
|
|
$233 = ((($232)) + 2|0);
|
|
$234 = HEAP16[$233>>1]|0;
|
|
$235 = $234 << 16 >> 16;
|
|
$y = $235;
|
|
$236 = $next_move;
|
|
$237 = $i;
|
|
$238 = ($236|0)==($237|0);
|
|
do {
|
|
if ($238) {
|
|
$239 = $i;
|
|
$240 = ($239|0)!=(0);
|
|
if ($240) {
|
|
$241 = $vertices;
|
|
$242 = $num_vertices;
|
|
$243 = $was_off;
|
|
$244 = $start_off;
|
|
$245 = $sx;
|
|
$246 = $sy;
|
|
$247 = $scx;
|
|
$248 = $scy;
|
|
$249 = $cx;
|
|
$250 = $cy;
|
|
$251 = (_stbtt__close_shape($241,$242,$243,$244,$245,$246,$247,$248,$249,$250)|0);
|
|
$num_vertices = $251;
|
|
}
|
|
$252 = $flags;
|
|
$253 = $252&255;
|
|
$254 = $253 & 1;
|
|
$255 = ($254|0)!=(0);
|
|
$256 = $255 ^ 1;
|
|
$257 = $256&1;
|
|
$start_off = $257;
|
|
$258 = $start_off;
|
|
$259 = ($258|0)!=(0);
|
|
$260 = $x;
|
|
do {
|
|
if ($259) {
|
|
$scx = $260;
|
|
$261 = $y;
|
|
$scy = $261;
|
|
$262 = $off;
|
|
$263 = $i;
|
|
$264 = (($262) + ($263))|0;
|
|
$265 = (($264) + 1)|0;
|
|
$266 = $vertices;
|
|
$267 = (($266) + (($265*10)|0)|0);
|
|
$268 = ((($267)) + 8|0);
|
|
$269 = HEAP8[$268>>0]|0;
|
|
$270 = $269&255;
|
|
$271 = $270 & 1;
|
|
$272 = ($271|0)!=(0);
|
|
if ($272) {
|
|
$296 = $off;
|
|
$297 = $i;
|
|
$298 = (($296) + ($297))|0;
|
|
$299 = (($298) + 1)|0;
|
|
$300 = $vertices;
|
|
$301 = (($300) + (($299*10)|0)|0);
|
|
$302 = HEAP16[$301>>1]|0;
|
|
$303 = $302 << 16 >> 16;
|
|
$sx = $303;
|
|
$304 = $off;
|
|
$305 = $i;
|
|
$306 = (($304) + ($305))|0;
|
|
$307 = (($306) + 1)|0;
|
|
$308 = $vertices;
|
|
$309 = (($308) + (($307*10)|0)|0);
|
|
$310 = ((($309)) + 2|0);
|
|
$311 = HEAP16[$310>>1]|0;
|
|
$312 = $311 << 16 >> 16;
|
|
$sy = $312;
|
|
$313 = $i;
|
|
$314 = (($313) + 1)|0;
|
|
$i = $314;
|
|
break;
|
|
} else {
|
|
$273 = $x;
|
|
$274 = $off;
|
|
$275 = $i;
|
|
$276 = (($274) + ($275))|0;
|
|
$277 = (($276) + 1)|0;
|
|
$278 = $vertices;
|
|
$279 = (($278) + (($277*10)|0)|0);
|
|
$280 = HEAP16[$279>>1]|0;
|
|
$281 = $280 << 16 >> 16;
|
|
$282 = (($273) + ($281))|0;
|
|
$283 = $282 >> 1;
|
|
$sx = $283;
|
|
$284 = $y;
|
|
$285 = $off;
|
|
$286 = $i;
|
|
$287 = (($285) + ($286))|0;
|
|
$288 = (($287) + 1)|0;
|
|
$289 = $vertices;
|
|
$290 = (($289) + (($288*10)|0)|0);
|
|
$291 = ((($290)) + 2|0);
|
|
$292 = HEAP16[$291>>1]|0;
|
|
$293 = $292 << 16 >> 16;
|
|
$294 = (($284) + ($293))|0;
|
|
$295 = $294 >> 1;
|
|
$sy = $295;
|
|
break;
|
|
}
|
|
} else {
|
|
$sx = $260;
|
|
$315 = $y;
|
|
$sy = $315;
|
|
}
|
|
} while(0);
|
|
$316 = $num_vertices;
|
|
$317 = (($316) + 1)|0;
|
|
$num_vertices = $317;
|
|
$318 = $vertices;
|
|
$319 = (($318) + (($316*10)|0)|0);
|
|
$320 = $sx;
|
|
$321 = $sy;
|
|
_nk_tt_setvertex($319,1,$320,$321,0,0);
|
|
$was_off = 0;
|
|
$322 = $endPtsOfContours;
|
|
$323 = $j;
|
|
$324 = $323<<1;
|
|
$325 = (($322) + ($324)|0);
|
|
$326 = (_nk_ttUSHORT($325)|0);
|
|
$327 = $326&65535;
|
|
$328 = (1 + ($327))|0;
|
|
$next_move = $328;
|
|
$329 = $j;
|
|
$330 = (($329) + 1)|0;
|
|
$j = $330;
|
|
} else {
|
|
$331 = $flags;
|
|
$332 = $331&255;
|
|
$333 = $332 & 1;
|
|
$334 = ($333|0)!=(0);
|
|
$335 = $was_off;
|
|
$336 = ($335|0)!=(0);
|
|
if (!($334)) {
|
|
if ($336) {
|
|
$337 = $num_vertices;
|
|
$338 = (($337) + 1)|0;
|
|
$num_vertices = $338;
|
|
$339 = $vertices;
|
|
$340 = (($339) + (($337*10)|0)|0);
|
|
$341 = $cx;
|
|
$342 = $x;
|
|
$343 = (($341) + ($342))|0;
|
|
$344 = $343 >> 1;
|
|
$345 = $cy;
|
|
$346 = $y;
|
|
$347 = (($345) + ($346))|0;
|
|
$348 = $347 >> 1;
|
|
$349 = $cx;
|
|
$350 = $cy;
|
|
_nk_tt_setvertex($340,3,$344,$348,$349,$350);
|
|
}
|
|
$351 = $x;
|
|
$cx = $351;
|
|
$352 = $y;
|
|
$cy = $352;
|
|
$was_off = 1;
|
|
break;
|
|
}
|
|
$353 = $num_vertices;
|
|
$354 = (($353) + 1)|0;
|
|
$num_vertices = $354;
|
|
$355 = $vertices;
|
|
$356 = (($355) + (($353*10)|0)|0);
|
|
$357 = $x;
|
|
$358 = $y;
|
|
if ($336) {
|
|
$359 = $cx;
|
|
$360 = $cy;
|
|
_nk_tt_setvertex($356,3,$357,$358,$359,$360);
|
|
} else {
|
|
_nk_tt_setvertex($356,2,$357,$358,0,0);
|
|
}
|
|
$was_off = 0;
|
|
}
|
|
} while(0);
|
|
$361 = $i;
|
|
$362 = (($361) + 1)|0;
|
|
$i = $362;
|
|
}
|
|
$363 = $vertices;
|
|
$364 = $num_vertices;
|
|
$365 = $was_off;
|
|
$366 = $start_off;
|
|
$367 = $sx;
|
|
$368 = $sy;
|
|
$369 = $scx;
|
|
$370 = $scy;
|
|
$371 = $cx;
|
|
$372 = $cy;
|
|
$373 = (_stbtt__close_shape($363,$364,$365,$366,$367,$368,$369,$370,$371,$372)|0);
|
|
$num_vertices = $373;
|
|
} else {
|
|
$374 = $numberOfContours;
|
|
$375 = $374 << 16 >> 16;
|
|
$376 = ($375|0)==(-1);
|
|
if (!($376)) {
|
|
$677 = $numberOfContours;
|
|
$678 = $677 << 16 >> 16;
|
|
$679 = ($678|0)<(0);
|
|
if (!($679)) {
|
|
break;
|
|
}
|
|
___assert_fail((30507|0),(13400|0),7592,(30589|0));
|
|
// unreachable;
|
|
}
|
|
$more = 1;
|
|
$377 = $data;
|
|
$378 = $g;
|
|
$379 = (($377) + ($378)|0);
|
|
$380 = ((($379)) + 10|0);
|
|
$comp = $380;
|
|
$num_vertices = 0;
|
|
$vertices = 0;
|
|
while(1) {
|
|
$381 = $more;
|
|
$382 = ($381|0)!=(0);
|
|
if (!($382)) {
|
|
break L5;
|
|
}
|
|
$comp_num_verts = 0;
|
|
HEAP32[$comp_verts>>2] = 0;
|
|
$tmp = 0;
|
|
;HEAP32[$mtx>>2]=HEAP32[12564>>2]|0;HEAP32[$mtx+4>>2]=HEAP32[12564+4>>2]|0;HEAP32[$mtx+8>>2]=HEAP32[12564+8>>2]|0;HEAP32[$mtx+12>>2]=HEAP32[12564+12>>2]|0;HEAP32[$mtx+16>>2]=HEAP32[12564+16>>2]|0;HEAP32[$mtx+20>>2]=HEAP32[12564+20>>2]|0;
|
|
$383 = $comp;
|
|
$384 = (_nk_ttSHORT($383)|0);
|
|
$flags1 = $384;
|
|
$385 = $comp;
|
|
$386 = ((($385)) + 2|0);
|
|
$comp = $386;
|
|
$387 = $comp;
|
|
$388 = (_nk_ttSHORT($387)|0);
|
|
$gidx = $388;
|
|
$389 = $comp;
|
|
$390 = ((($389)) + 2|0);
|
|
$comp = $390;
|
|
$391 = $flags1;
|
|
$392 = $391&65535;
|
|
$393 = $392 & 2;
|
|
$394 = ($393|0)!=(0);
|
|
if (!($394)) {
|
|
label = 55;
|
|
break;
|
|
}
|
|
$395 = $flags1;
|
|
$396 = $395&65535;
|
|
$397 = $396 & 1;
|
|
$398 = ($397|0)!=(0);
|
|
$399 = $comp;
|
|
if ($398) {
|
|
$400 = (_nk_ttSHORT($399)|0);
|
|
$401 = (+($400<<16>>16));
|
|
$402 = ((($mtx)) + 16|0);
|
|
HEAPF32[$402>>2] = $401;
|
|
$403 = $comp;
|
|
$404 = ((($403)) + 2|0);
|
|
$comp = $404;
|
|
$405 = $comp;
|
|
$406 = (_nk_ttSHORT($405)|0);
|
|
$407 = (+($406<<16>>16));
|
|
$408 = ((($mtx)) + 20|0);
|
|
HEAPF32[$408>>2] = $407;
|
|
$409 = $comp;
|
|
$410 = ((($409)) + 2|0);
|
|
$comp = $410;
|
|
} else {
|
|
$411 = HEAP8[$399>>0]|0;
|
|
$412 = (+($411<<24>>24));
|
|
$413 = ((($mtx)) + 16|0);
|
|
HEAPF32[$413>>2] = $412;
|
|
$414 = $comp;
|
|
$415 = ((($414)) + 1|0);
|
|
$comp = $415;
|
|
$416 = $comp;
|
|
$417 = HEAP8[$416>>0]|0;
|
|
$418 = (+($417<<24>>24));
|
|
$419 = ((($mtx)) + 20|0);
|
|
HEAPF32[$419>>2] = $418;
|
|
$420 = $comp;
|
|
$421 = ((($420)) + 1|0);
|
|
$comp = $421;
|
|
}
|
|
$422 = $flags1;
|
|
$423 = $422&65535;
|
|
$424 = $423 & 8;
|
|
$425 = ($424|0)!=(0);
|
|
do {
|
|
if ($425) {
|
|
$426 = $comp;
|
|
$427 = (_nk_ttSHORT($426)|0);
|
|
$428 = $427 << 16 >> 16;
|
|
$429 = (+($428|0));
|
|
$430 = $429 / 16384.0;
|
|
$431 = ((($mtx)) + 12|0);
|
|
HEAPF32[$431>>2] = $430;
|
|
HEAPF32[$mtx>>2] = $430;
|
|
$432 = $comp;
|
|
$433 = ((($432)) + 2|0);
|
|
$comp = $433;
|
|
$434 = ((($mtx)) + 8|0);
|
|
HEAPF32[$434>>2] = 0.0;
|
|
$435 = ((($mtx)) + 4|0);
|
|
HEAPF32[$435>>2] = 0.0;
|
|
} else {
|
|
$436 = $flags1;
|
|
$437 = $436&65535;
|
|
$438 = $437 & 64;
|
|
$439 = ($438|0)!=(0);
|
|
if ($439) {
|
|
$440 = $comp;
|
|
$441 = (_nk_ttSHORT($440)|0);
|
|
$442 = $441 << 16 >> 16;
|
|
$443 = (+($442|0));
|
|
$444 = $443 / 16384.0;
|
|
HEAPF32[$mtx>>2] = $444;
|
|
$445 = $comp;
|
|
$446 = ((($445)) + 2|0);
|
|
$comp = $446;
|
|
$447 = ((($mtx)) + 8|0);
|
|
HEAPF32[$447>>2] = 0.0;
|
|
$448 = ((($mtx)) + 4|0);
|
|
HEAPF32[$448>>2] = 0.0;
|
|
$449 = $comp;
|
|
$450 = (_nk_ttSHORT($449)|0);
|
|
$451 = $450 << 16 >> 16;
|
|
$452 = (+($451|0));
|
|
$453 = $452 / 16384.0;
|
|
$454 = ((($mtx)) + 12|0);
|
|
HEAPF32[$454>>2] = $453;
|
|
$455 = $comp;
|
|
$456 = ((($455)) + 2|0);
|
|
$comp = $456;
|
|
break;
|
|
}
|
|
$457 = $flags1;
|
|
$458 = $457&65535;
|
|
$459 = $458 & 128;
|
|
$460 = ($459|0)!=(0);
|
|
if ($460) {
|
|
$461 = $comp;
|
|
$462 = (_nk_ttSHORT($461)|0);
|
|
$463 = $462 << 16 >> 16;
|
|
$464 = (+($463|0));
|
|
$465 = $464 / 16384.0;
|
|
HEAPF32[$mtx>>2] = $465;
|
|
$466 = $comp;
|
|
$467 = ((($466)) + 2|0);
|
|
$comp = $467;
|
|
$468 = $comp;
|
|
$469 = (_nk_ttSHORT($468)|0);
|
|
$470 = $469 << 16 >> 16;
|
|
$471 = (+($470|0));
|
|
$472 = $471 / 16384.0;
|
|
$473 = ((($mtx)) + 4|0);
|
|
HEAPF32[$473>>2] = $472;
|
|
$474 = $comp;
|
|
$475 = ((($474)) + 2|0);
|
|
$comp = $475;
|
|
$476 = $comp;
|
|
$477 = (_nk_ttSHORT($476)|0);
|
|
$478 = $477 << 16 >> 16;
|
|
$479 = (+($478|0));
|
|
$480 = $479 / 16384.0;
|
|
$481 = ((($mtx)) + 8|0);
|
|
HEAPF32[$481>>2] = $480;
|
|
$482 = $comp;
|
|
$483 = ((($482)) + 2|0);
|
|
$comp = $483;
|
|
$484 = $comp;
|
|
$485 = (_nk_ttSHORT($484)|0);
|
|
$486 = $485 << 16 >> 16;
|
|
$487 = (+($486|0));
|
|
$488 = $487 / 16384.0;
|
|
$489 = ((($mtx)) + 12|0);
|
|
HEAPF32[$489>>2] = $488;
|
|
$490 = $comp;
|
|
$491 = ((($490)) + 2|0);
|
|
$comp = $491;
|
|
}
|
|
}
|
|
} while(0);
|
|
$492 = +HEAPF32[$mtx>>2];
|
|
$493 = +HEAPF32[$mtx>>2];
|
|
$494 = $492 * $493;
|
|
$495 = ((($mtx)) + 4|0);
|
|
$496 = +HEAPF32[$495>>2];
|
|
$497 = ((($mtx)) + 4|0);
|
|
$498 = +HEAPF32[$497>>2];
|
|
$499 = $496 * $498;
|
|
$500 = $494 + $499;
|
|
$501 = (+_nk_sqrt($500));
|
|
$m3 = $501;
|
|
$502 = ((($mtx)) + 8|0);
|
|
$503 = +HEAPF32[$502>>2];
|
|
$504 = ((($mtx)) + 8|0);
|
|
$505 = +HEAPF32[$504>>2];
|
|
$506 = $503 * $505;
|
|
$507 = ((($mtx)) + 12|0);
|
|
$508 = +HEAPF32[$507>>2];
|
|
$509 = ((($mtx)) + 12|0);
|
|
$510 = +HEAPF32[$509>>2];
|
|
$511 = $508 * $510;
|
|
$512 = $506 + $511;
|
|
$513 = (+_nk_sqrt($512));
|
|
$n4 = $513;
|
|
$514 = $1;
|
|
$515 = $2;
|
|
$516 = $gidx;
|
|
$517 = $516&65535;
|
|
$518 = (_nk_tt_GetGlyphShape($514,$515,$517,$comp_verts)|0);
|
|
$comp_num_verts = $518;
|
|
$519 = $comp_num_verts;
|
|
$520 = ($519|0)>(0);
|
|
if ($520) {
|
|
$i2 = 0;
|
|
while(1) {
|
|
$521 = $i2;
|
|
$522 = $comp_num_verts;
|
|
$523 = ($521|0)<($522|0);
|
|
if (!($523)) {
|
|
break;
|
|
}
|
|
$524 = $i2;
|
|
$525 = HEAP32[$comp_verts>>2]|0;
|
|
$526 = (($525) + (($524*10)|0)|0);
|
|
$v = $526;
|
|
$527 = $v;
|
|
$528 = HEAP16[$527>>1]|0;
|
|
$x5 = $528;
|
|
$529 = $v;
|
|
$530 = ((($529)) + 2|0);
|
|
$531 = HEAP16[$530>>1]|0;
|
|
$y6 = $531;
|
|
$532 = $m3;
|
|
$533 = +HEAPF32[$mtx>>2];
|
|
$534 = $x5;
|
|
$535 = $534 << 16 >> 16;
|
|
$536 = (+($535|0));
|
|
$537 = $533 * $536;
|
|
$538 = ((($mtx)) + 8|0);
|
|
$539 = +HEAPF32[$538>>2];
|
|
$540 = $y6;
|
|
$541 = $540 << 16 >> 16;
|
|
$542 = (+($541|0));
|
|
$543 = $539 * $542;
|
|
$544 = $537 + $543;
|
|
$545 = ((($mtx)) + 16|0);
|
|
$546 = +HEAPF32[$545>>2];
|
|
$547 = $544 + $546;
|
|
$548 = $532 * $547;
|
|
$549 = (~~(($548)));
|
|
$550 = $v;
|
|
HEAP16[$550>>1] = $549;
|
|
$551 = $n4;
|
|
$552 = ((($mtx)) + 4|0);
|
|
$553 = +HEAPF32[$552>>2];
|
|
$554 = $x5;
|
|
$555 = $554 << 16 >> 16;
|
|
$556 = (+($555|0));
|
|
$557 = $553 * $556;
|
|
$558 = ((($mtx)) + 12|0);
|
|
$559 = +HEAPF32[$558>>2];
|
|
$560 = $y6;
|
|
$561 = $560 << 16 >> 16;
|
|
$562 = (+($561|0));
|
|
$563 = $559 * $562;
|
|
$564 = $557 + $563;
|
|
$565 = ((($mtx)) + 20|0);
|
|
$566 = +HEAPF32[$565>>2];
|
|
$567 = $564 + $566;
|
|
$568 = $551 * $567;
|
|
$569 = (~~(($568)));
|
|
$570 = $v;
|
|
$571 = ((($570)) + 2|0);
|
|
HEAP16[$571>>1] = $569;
|
|
$572 = $v;
|
|
$573 = ((($572)) + 4|0);
|
|
$574 = HEAP16[$573>>1]|0;
|
|
$x5 = $574;
|
|
$575 = $v;
|
|
$576 = ((($575)) + 6|0);
|
|
$577 = HEAP16[$576>>1]|0;
|
|
$y6 = $577;
|
|
$578 = $m3;
|
|
$579 = +HEAPF32[$mtx>>2];
|
|
$580 = $x5;
|
|
$581 = $580 << 16 >> 16;
|
|
$582 = (+($581|0));
|
|
$583 = $579 * $582;
|
|
$584 = ((($mtx)) + 8|0);
|
|
$585 = +HEAPF32[$584>>2];
|
|
$586 = $y6;
|
|
$587 = $586 << 16 >> 16;
|
|
$588 = (+($587|0));
|
|
$589 = $585 * $588;
|
|
$590 = $583 + $589;
|
|
$591 = ((($mtx)) + 16|0);
|
|
$592 = +HEAPF32[$591>>2];
|
|
$593 = $590 + $592;
|
|
$594 = $578 * $593;
|
|
$595 = (~~(($594)));
|
|
$596 = $v;
|
|
$597 = ((($596)) + 4|0);
|
|
HEAP16[$597>>1] = $595;
|
|
$598 = $n4;
|
|
$599 = ((($mtx)) + 4|0);
|
|
$600 = +HEAPF32[$599>>2];
|
|
$601 = $x5;
|
|
$602 = $601 << 16 >> 16;
|
|
$603 = (+($602|0));
|
|
$604 = $600 * $603;
|
|
$605 = ((($mtx)) + 12|0);
|
|
$606 = +HEAPF32[$605>>2];
|
|
$607 = $y6;
|
|
$608 = $607 << 16 >> 16;
|
|
$609 = (+($608|0));
|
|
$610 = $606 * $609;
|
|
$611 = $604 + $610;
|
|
$612 = ((($mtx)) + 20|0);
|
|
$613 = +HEAPF32[$612>>2];
|
|
$614 = $611 + $613;
|
|
$615 = $598 * $614;
|
|
$616 = (~~(($615)));
|
|
$617 = $v;
|
|
$618 = ((($617)) + 6|0);
|
|
HEAP16[$618>>1] = $616;
|
|
$619 = $i2;
|
|
$620 = (($619) + 1)|0;
|
|
$i2 = $620;
|
|
}
|
|
$621 = $2;
|
|
$622 = ((($621)) + 4|0);
|
|
$623 = HEAP32[$622>>2]|0;
|
|
$624 = $2;
|
|
$625 = $num_vertices;
|
|
$626 = $comp_num_verts;
|
|
$627 = (($625) + ($626))|0;
|
|
$628 = ($627*10)|0;
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$624>>2]|0;
|
|
$629 = (FUNCTION_TABLE_iiii[$623 & 7]($$byval_copy1,0,$628)|0);
|
|
$tmp = $629;
|
|
$630 = $tmp;
|
|
$631 = ($630|0)!=(0|0);
|
|
if (!($631)) {
|
|
break;
|
|
}
|
|
$646 = $num_vertices;
|
|
$647 = ($646|0)>(0);
|
|
if ($647) {
|
|
$648 = $tmp;
|
|
$649 = $vertices;
|
|
$650 = $num_vertices;
|
|
$651 = ($650*10)|0;
|
|
(_nk_memcopy($648,$649,$651)|0);
|
|
}
|
|
$652 = $tmp;
|
|
$653 = $num_vertices;
|
|
$654 = (($652) + (($653*10)|0)|0);
|
|
$655 = HEAP32[$comp_verts>>2]|0;
|
|
$656 = $comp_num_verts;
|
|
$657 = ($656*10)|0;
|
|
(_nk_memcopy($654,$655,$657)|0);
|
|
$658 = $vertices;
|
|
$659 = ($658|0)!=(0|0);
|
|
if ($659) {
|
|
$660 = $2;
|
|
$661 = ((($660)) + 8|0);
|
|
$662 = HEAP32[$661>>2]|0;
|
|
$663 = $2;
|
|
$664 = $vertices;
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$663>>2]|0;
|
|
FUNCTION_TABLE_vii[$662 & 31]($$byval_copy4,$664);
|
|
}
|
|
$665 = $tmp;
|
|
$vertices = $665;
|
|
$666 = $2;
|
|
$667 = ((($666)) + 8|0);
|
|
$668 = HEAP32[$667>>2]|0;
|
|
$669 = $2;
|
|
$670 = HEAP32[$comp_verts>>2]|0;
|
|
;HEAP32[$$byval_copy5>>2]=HEAP32[$669>>2]|0;
|
|
FUNCTION_TABLE_vii[$668 & 31]($$byval_copy5,$670);
|
|
$671 = $comp_num_verts;
|
|
$672 = $num_vertices;
|
|
$673 = (($672) + ($671))|0;
|
|
$num_vertices = $673;
|
|
}
|
|
$674 = $flags1;
|
|
$675 = $674&65535;
|
|
$676 = $675 & 32;
|
|
$more = $676;
|
|
}
|
|
if ((label|0) == 55) {
|
|
___assert_fail((30507|0),(13400|0),7537,(30589|0));
|
|
// unreachable;
|
|
}
|
|
$632 = $vertices;
|
|
$633 = ($632|0)!=(0|0);
|
|
if ($633) {
|
|
$634 = $2;
|
|
$635 = ((($634)) + 8|0);
|
|
$636 = HEAP32[$635>>2]|0;
|
|
$637 = $2;
|
|
$638 = $vertices;
|
|
;HEAP32[$$byval_copy2>>2]=HEAP32[$637>>2]|0;
|
|
FUNCTION_TABLE_vii[$636 & 31]($$byval_copy2,$638);
|
|
}
|
|
$639 = HEAP32[$comp_verts>>2]|0;
|
|
$640 = ($639|0)!=(0|0);
|
|
if ($640) {
|
|
$641 = $2;
|
|
$642 = ((($641)) + 8|0);
|
|
$643 = HEAP32[$642>>2]|0;
|
|
$644 = $2;
|
|
$645 = HEAP32[$comp_verts>>2]|0;
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$644>>2]|0;
|
|
FUNCTION_TABLE_vii[$643 & 31]($$byval_copy3,$645);
|
|
}
|
|
$0 = 0;
|
|
$683 = $0;
|
|
STACKTOP = sp;return ($683|0);
|
|
}
|
|
} while(0);
|
|
$680 = $vertices;
|
|
$681 = $4;
|
|
HEAP32[$681>>2] = $680;
|
|
$682 = $num_vertices;
|
|
$0 = $682;
|
|
$683 = $0;
|
|
STACKTOP = sp;return ($683|0);
|
|
}
|
|
function _nk_tt_Rasterize($result,$flatness_in_pixels,$vertices,$num_verts,$scale_x,$scale_y,$shift_x,$shift_y,$x_off,$y_off,$invert,$alloc) {
|
|
$result = $result|0;
|
|
$flatness_in_pixels = +$flatness_in_pixels;
|
|
$vertices = $vertices|0;
|
|
$num_verts = $num_verts|0;
|
|
$scale_x = +$scale_x;
|
|
$scale_y = +$scale_y;
|
|
$shift_x = +$shift_x;
|
|
$shift_y = +$shift_y;
|
|
$x_off = $x_off|0;
|
|
$y_off = $y_off|0;
|
|
$invert = $invert|0;
|
|
$alloc = $alloc|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0;
|
|
var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0, $42 = 0;
|
|
var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0.0, $50 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $scale = 0.0, $winding_count = 0, $winding_lengths = 0, $windings = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy1 = sp + 68|0;
|
|
$$byval_copy = sp + 64|0;
|
|
$winding_count = sp + 8|0;
|
|
$winding_lengths = sp + 4|0;
|
|
$0 = $result;
|
|
$1 = $flatness_in_pixels;
|
|
$2 = $vertices;
|
|
$3 = $num_verts;
|
|
$4 = $scale_x;
|
|
$5 = $scale_y;
|
|
$6 = $shift_x;
|
|
$7 = $shift_y;
|
|
$8 = $x_off;
|
|
$9 = $y_off;
|
|
$10 = $invert;
|
|
$11 = $alloc;
|
|
$12 = $4;
|
|
$13 = $5;
|
|
$14 = $12 > $13;
|
|
$15 = $5;
|
|
$16 = $4;
|
|
$17 = $14 ? $15 : $16;
|
|
$scale = $17;
|
|
$18 = $2;
|
|
$19 = $3;
|
|
$20 = $1;
|
|
$21 = $scale;
|
|
$22 = $20 / $21;
|
|
$23 = $11;
|
|
$24 = (_nk_tt_FlattenCurves($18,$19,$22,$winding_lengths,$winding_count,$23)|0);
|
|
$windings = $24;
|
|
$25 = $11;
|
|
$26 = ($25|0)!=(0|0);
|
|
if (!($26)) {
|
|
___assert_fail((15055|0),(13400|0),8301,(30609|0));
|
|
// unreachable;
|
|
}
|
|
$27 = $windings;
|
|
$28 = ($27|0)!=(0|0);
|
|
if (!($28)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$29 = $0;
|
|
$30 = $windings;
|
|
$31 = HEAP32[$winding_lengths>>2]|0;
|
|
$32 = HEAP32[$winding_count>>2]|0;
|
|
$33 = $4;
|
|
$34 = $5;
|
|
$35 = $6;
|
|
$36 = $7;
|
|
$37 = $8;
|
|
$38 = $9;
|
|
$39 = $10;
|
|
$40 = $11;
|
|
_nk_tt__rasterize($29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40);
|
|
$41 = $11;
|
|
$42 = ((($41)) + 8|0);
|
|
$43 = HEAP32[$42>>2]|0;
|
|
$44 = $11;
|
|
$45 = HEAP32[$winding_lengths>>2]|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$44>>2]|0;
|
|
FUNCTION_TABLE_vii[$43 & 31]($$byval_copy,$45);
|
|
$46 = $11;
|
|
$47 = ((($46)) + 8|0);
|
|
$48 = HEAP32[$47>>2]|0;
|
|
$49 = $11;
|
|
$50 = $windings;
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$49>>2]|0;
|
|
FUNCTION_TABLE_vii[$48 & 31]($$byval_copy1,$50);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _stbtt__close_shape($vertices,$num_vertices,$was_off,$start_off,$sx,$sy,$scx,$scy,$cx,$cy) {
|
|
$vertices = $vertices|0;
|
|
$num_vertices = $num_vertices|0;
|
|
$was_off = $was_off|0;
|
|
$start_off = $start_off|0;
|
|
$sx = $sx|0;
|
|
$sy = $sy|0;
|
|
$scx = $scx|0;
|
|
$scy = $scy|0;
|
|
$cx = $cx|0;
|
|
$cy = $cy|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $vertices;
|
|
$1 = $num_vertices;
|
|
$2 = $was_off;
|
|
$3 = $start_off;
|
|
$4 = $sx;
|
|
$5 = $sy;
|
|
$6 = $scx;
|
|
$7 = $scy;
|
|
$8 = $cx;
|
|
$9 = $cy;
|
|
$10 = $3;
|
|
$11 = ($10|0)!=(0);
|
|
$12 = $2;
|
|
$13 = ($12|0)!=(0);
|
|
if ($11) {
|
|
if ($13) {
|
|
$14 = $1;
|
|
$15 = (($14) + 1)|0;
|
|
$1 = $15;
|
|
$16 = $0;
|
|
$17 = (($16) + (($14*10)|0)|0);
|
|
$18 = $8;
|
|
$19 = $6;
|
|
$20 = (($18) + ($19))|0;
|
|
$21 = $20 >> 1;
|
|
$22 = $9;
|
|
$23 = $7;
|
|
$24 = (($22) + ($23))|0;
|
|
$25 = $24 >> 1;
|
|
$26 = $8;
|
|
$27 = $9;
|
|
_nk_tt_setvertex($17,3,$21,$25,$26,$27);
|
|
}
|
|
$28 = $1;
|
|
$29 = (($28) + 1)|0;
|
|
$1 = $29;
|
|
$30 = $0;
|
|
$31 = (($30) + (($28*10)|0)|0);
|
|
$32 = $4;
|
|
$33 = $5;
|
|
$34 = $6;
|
|
$35 = $7;
|
|
_nk_tt_setvertex($31,3,$32,$33,$34,$35);
|
|
$44 = $1;
|
|
STACKTOP = sp;return ($44|0);
|
|
}
|
|
$36 = $1;
|
|
$37 = (($36) + 1)|0;
|
|
$1 = $37;
|
|
$38 = $0;
|
|
$39 = (($38) + (($36*10)|0)|0);
|
|
$40 = $4;
|
|
$41 = $5;
|
|
if ($13) {
|
|
$42 = $8;
|
|
$43 = $9;
|
|
_nk_tt_setvertex($39,3,$40,$41,$42,$43);
|
|
$44 = $1;
|
|
STACKTOP = sp;return ($44|0);
|
|
} else {
|
|
_nk_tt_setvertex($39,2,$40,$41,0,0);
|
|
$44 = $1;
|
|
STACKTOP = sp;return ($44|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_tt_setvertex($v,$type,$x,$y,$cx,$cy) {
|
|
$v = $v|0;
|
|
$type = $type|0;
|
|
$x = $x|0;
|
|
$y = $y|0;
|
|
$cx = $cx|0;
|
|
$cy = $cy|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0;
|
|
var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $v;
|
|
$1 = $type;
|
|
$2 = $x;
|
|
$3 = $y;
|
|
$4 = $cx;
|
|
$5 = $cy;
|
|
$6 = $1;
|
|
$7 = $0;
|
|
$8 = ((($7)) + 8|0);
|
|
HEAP8[$8>>0] = $6;
|
|
$9 = $2;
|
|
$10 = $9&65535;
|
|
$11 = $0;
|
|
HEAP16[$11>>1] = $10;
|
|
$12 = $3;
|
|
$13 = $12&65535;
|
|
$14 = $0;
|
|
$15 = ((($14)) + 2|0);
|
|
HEAP16[$15>>1] = $13;
|
|
$16 = $4;
|
|
$17 = $16&65535;
|
|
$18 = $0;
|
|
$19 = ((($18)) + 4|0);
|
|
HEAP16[$19>>1] = $17;
|
|
$20 = $5;
|
|
$21 = $20&65535;
|
|
$22 = $0;
|
|
$23 = ((($22)) + 6|0);
|
|
HEAP16[$23>>1] = $21;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_sqrt($x) {
|
|
$x = +$x;
|
|
var $0 = 0.0, $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $x;
|
|
$1 = $0;
|
|
$2 = $0;
|
|
$3 = (+_nk_inv_sqrt($2));
|
|
$4 = $1 * $3;
|
|
STACKTOP = sp;return (+$4);
|
|
}
|
|
function _nk_tt_FlattenCurves($vertices,$num_verts,$objspace_flatness,$contour_lengths,$num_contours,$alloc) {
|
|
$vertices = $vertices|0;
|
|
$num_verts = $num_verts|0;
|
|
$objspace_flatness = +$objspace_flatness;
|
|
$contour_lengths = $contour_lengths|0;
|
|
$num_contours = $num_contours|0;
|
|
$alloc = $alloc|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0, $102 = 0, $103 = 0, $104 = 0.0, $105 = 0.0, $106 = 0, $107 = 0.0, $108 = 0.0, $109 = 0, $11 = 0, $110 = 0, $111 = 0;
|
|
var $112 = 0, $113 = 0, $114 = 0.0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0.0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0.0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0;
|
|
var $130 = 0, $131 = 0.0, $132 = 0.0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0.0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0.0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0;
|
|
var $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0;
|
|
var $167 = 0, $168 = 0, $169 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0;
|
|
var $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0;
|
|
var $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0;
|
|
var $69 = 0, $7 = 0.0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0.0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0.0, $85 = 0, $86 = 0;
|
|
var $87 = 0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0.0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $i = 0, $n = 0, $num_points = 0, $objspace_flatness_squared = 0.0, $pass = 0, $points = 0;
|
|
var $start = 0, $x = 0.0, $y = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy3 = sp + 76|0;
|
|
$$byval_copy2 = sp + 72|0;
|
|
$$byval_copy1 = sp + 68|0;
|
|
$$byval_copy = sp + 64|0;
|
|
$num_points = sp + 28|0;
|
|
$1 = $vertices;
|
|
$2 = $num_verts;
|
|
$3 = $objspace_flatness;
|
|
$4 = $contour_lengths;
|
|
$5 = $num_contours;
|
|
$6 = $alloc;
|
|
$points = 0;
|
|
HEAP32[$num_points>>2] = 0;
|
|
$7 = $3;
|
|
$8 = $3;
|
|
$9 = $7 * $8;
|
|
$objspace_flatness_squared = $9;
|
|
$n = 0;
|
|
$start = 0;
|
|
$i = 0;
|
|
while(1) {
|
|
$10 = $i;
|
|
$11 = $2;
|
|
$12 = ($10|0)<($11|0);
|
|
if (!($12)) {
|
|
break;
|
|
}
|
|
$13 = $i;
|
|
$14 = $1;
|
|
$15 = (($14) + (($13*10)|0)|0);
|
|
$16 = ((($15)) + 8|0);
|
|
$17 = HEAP8[$16>>0]|0;
|
|
$18 = $17&255;
|
|
$19 = ($18|0)==(1);
|
|
if ($19) {
|
|
$20 = $n;
|
|
$21 = (($20) + 1)|0;
|
|
$n = $21;
|
|
}
|
|
$22 = $i;
|
|
$23 = (($22) + 1)|0;
|
|
$i = $23;
|
|
}
|
|
$24 = $n;
|
|
$25 = $5;
|
|
HEAP32[$25>>2] = $24;
|
|
$26 = $n;
|
|
$27 = ($26|0)==(0);
|
|
if ($27) {
|
|
$0 = 0;
|
|
$169 = $0;
|
|
STACKTOP = sp;return ($169|0);
|
|
}
|
|
$28 = $6;
|
|
$29 = ((($28)) + 4|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$31 = $6;
|
|
$32 = $n;
|
|
$33 = $32<<2;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$31>>2]|0;
|
|
$34 = (FUNCTION_TABLE_iiii[$30 & 7]($$byval_copy,0,$33)|0);
|
|
$35 = $4;
|
|
HEAP32[$35>>2] = $34;
|
|
$36 = $4;
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$38 = ($37|0)==(0|0);
|
|
if ($38) {
|
|
$39 = $5;
|
|
HEAP32[$39>>2] = 0;
|
|
$0 = 0;
|
|
$169 = $0;
|
|
STACKTOP = sp;return ($169|0);
|
|
}
|
|
$pass = 0;
|
|
while(1) {
|
|
$40 = $pass;
|
|
$41 = ($40|0)<(2);
|
|
if (!($41)) {
|
|
label = 24;
|
|
break;
|
|
}
|
|
$x = 0.0;
|
|
$y = 0.0;
|
|
$42 = $pass;
|
|
$43 = ($42|0)==(1);
|
|
if ($43) {
|
|
$44 = $6;
|
|
$45 = ((($44)) + 4|0);
|
|
$46 = HEAP32[$45>>2]|0;
|
|
$47 = $6;
|
|
$48 = HEAP32[$num_points>>2]|0;
|
|
$49 = $48<<3;
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$47>>2]|0;
|
|
$50 = (FUNCTION_TABLE_iiii[$46 & 7]($$byval_copy1,0,$49)|0);
|
|
$points = $50;
|
|
$51 = $points;
|
|
$52 = ($51|0)==(0|0);
|
|
if ($52) {
|
|
label = 25;
|
|
break;
|
|
}
|
|
}
|
|
HEAP32[$num_points>>2] = 0;
|
|
$n = -1;
|
|
$i = 0;
|
|
while(1) {
|
|
$53 = $i;
|
|
$54 = $2;
|
|
$55 = ($53|0)<($54|0);
|
|
if (!($55)) {
|
|
break;
|
|
}
|
|
$56 = $i;
|
|
$57 = $1;
|
|
$58 = (($57) + (($56*10)|0)|0);
|
|
$59 = ((($58)) + 8|0);
|
|
$60 = HEAP8[$59>>0]|0;
|
|
$61 = $60&255;
|
|
switch ($61|0) {
|
|
case 1: {
|
|
$62 = $n;
|
|
$63 = ($62|0)>=(0);
|
|
if ($63) {
|
|
$64 = HEAP32[$num_points>>2]|0;
|
|
$65 = $start;
|
|
$66 = (($64) - ($65))|0;
|
|
$67 = $n;
|
|
$68 = $4;
|
|
$69 = HEAP32[$68>>2]|0;
|
|
$70 = (($69) + ($67<<2)|0);
|
|
HEAP32[$70>>2] = $66;
|
|
}
|
|
$71 = $n;
|
|
$72 = (($71) + 1)|0;
|
|
$n = $72;
|
|
$73 = HEAP32[$num_points>>2]|0;
|
|
$start = $73;
|
|
$74 = $i;
|
|
$75 = $1;
|
|
$76 = (($75) + (($74*10)|0)|0);
|
|
$77 = HEAP16[$76>>1]|0;
|
|
$78 = (+($77<<16>>16));
|
|
$x = $78;
|
|
$79 = $i;
|
|
$80 = $1;
|
|
$81 = (($80) + (($79*10)|0)|0);
|
|
$82 = ((($81)) + 2|0);
|
|
$83 = HEAP16[$82>>1]|0;
|
|
$84 = (+($83<<16>>16));
|
|
$y = $84;
|
|
$85 = $points;
|
|
$86 = HEAP32[$num_points>>2]|0;
|
|
$87 = (($86) + 1)|0;
|
|
HEAP32[$num_points>>2] = $87;
|
|
$88 = $x;
|
|
$89 = $y;
|
|
_nk_tt__add_point($85,$86,$88,$89);
|
|
break;
|
|
}
|
|
case 2: {
|
|
$90 = $i;
|
|
$91 = $1;
|
|
$92 = (($91) + (($90*10)|0)|0);
|
|
$93 = HEAP16[$92>>1]|0;
|
|
$94 = (+($93<<16>>16));
|
|
$x = $94;
|
|
$95 = $i;
|
|
$96 = $1;
|
|
$97 = (($96) + (($95*10)|0)|0);
|
|
$98 = ((($97)) + 2|0);
|
|
$99 = HEAP16[$98>>1]|0;
|
|
$100 = (+($99<<16>>16));
|
|
$y = $100;
|
|
$101 = $points;
|
|
$102 = HEAP32[$num_points>>2]|0;
|
|
$103 = (($102) + 1)|0;
|
|
HEAP32[$num_points>>2] = $103;
|
|
$104 = $x;
|
|
$105 = $y;
|
|
_nk_tt__add_point($101,$102,$104,$105);
|
|
break;
|
|
}
|
|
case 3: {
|
|
$106 = $points;
|
|
$107 = $x;
|
|
$108 = $y;
|
|
$109 = $i;
|
|
$110 = $1;
|
|
$111 = (($110) + (($109*10)|0)|0);
|
|
$112 = ((($111)) + 4|0);
|
|
$113 = HEAP16[$112>>1]|0;
|
|
$114 = (+($113<<16>>16));
|
|
$115 = $i;
|
|
$116 = $1;
|
|
$117 = (($116) + (($115*10)|0)|0);
|
|
$118 = ((($117)) + 6|0);
|
|
$119 = HEAP16[$118>>1]|0;
|
|
$120 = (+($119<<16>>16));
|
|
$121 = $i;
|
|
$122 = $1;
|
|
$123 = (($122) + (($121*10)|0)|0);
|
|
$124 = HEAP16[$123>>1]|0;
|
|
$125 = (+($124<<16>>16));
|
|
$126 = $i;
|
|
$127 = $1;
|
|
$128 = (($127) + (($126*10)|0)|0);
|
|
$129 = ((($128)) + 2|0);
|
|
$130 = HEAP16[$129>>1]|0;
|
|
$131 = (+($130<<16>>16));
|
|
$132 = $objspace_flatness_squared;
|
|
(_nk_tt__tesselate_curve($106,$num_points,$107,$108,$114,$120,$125,$131,$132,0)|0);
|
|
$133 = $i;
|
|
$134 = $1;
|
|
$135 = (($134) + (($133*10)|0)|0);
|
|
$136 = HEAP16[$135>>1]|0;
|
|
$137 = (+($136<<16>>16));
|
|
$x = $137;
|
|
$138 = $i;
|
|
$139 = $1;
|
|
$140 = (($139) + (($138*10)|0)|0);
|
|
$141 = ((($140)) + 2|0);
|
|
$142 = HEAP16[$141>>1]|0;
|
|
$143 = (+($142<<16>>16));
|
|
$y = $143;
|
|
break;
|
|
}
|
|
default: {
|
|
}
|
|
}
|
|
$144 = $i;
|
|
$145 = (($144) + 1)|0;
|
|
$i = $145;
|
|
}
|
|
$146 = HEAP32[$num_points>>2]|0;
|
|
$147 = $start;
|
|
$148 = (($146) - ($147))|0;
|
|
$149 = $n;
|
|
$150 = $4;
|
|
$151 = HEAP32[$150>>2]|0;
|
|
$152 = (($151) + ($149<<2)|0);
|
|
HEAP32[$152>>2] = $148;
|
|
$153 = $pass;
|
|
$154 = (($153) + 1)|0;
|
|
$pass = $154;
|
|
}
|
|
if ((label|0) == 24) {
|
|
$155 = $points;
|
|
$0 = $155;
|
|
$169 = $0;
|
|
STACKTOP = sp;return ($169|0);
|
|
}
|
|
else if ((label|0) == 25) {
|
|
$156 = $6;
|
|
$157 = ((($156)) + 8|0);
|
|
$158 = HEAP32[$157>>2]|0;
|
|
$159 = $6;
|
|
$160 = $points;
|
|
;HEAP32[$$byval_copy2>>2]=HEAP32[$159>>2]|0;
|
|
FUNCTION_TABLE_vii[$158 & 31]($$byval_copy2,$160);
|
|
$161 = $6;
|
|
$162 = ((($161)) + 8|0);
|
|
$163 = HEAP32[$162>>2]|0;
|
|
$164 = $6;
|
|
$165 = $4;
|
|
$166 = HEAP32[$165>>2]|0;
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$164>>2]|0;
|
|
FUNCTION_TABLE_vii[$163 & 31]($$byval_copy3,$166);
|
|
$167 = $4;
|
|
HEAP32[$167>>2] = 0;
|
|
$168 = $5;
|
|
HEAP32[$168>>2] = 0;
|
|
$0 = 0;
|
|
$169 = $0;
|
|
STACKTOP = sp;return ($169|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_tt__rasterize($result,$pts,$wcount,$windings,$scale_x,$scale_y,$shift_x,$shift_y,$off_x,$off_y,$invert,$alloc) {
|
|
$result = $result|0;
|
|
$pts = $pts|0;
|
|
$wcount = $wcount|0;
|
|
$windings = $windings|0;
|
|
$scale_x = +$scale_x;
|
|
$scale_y = +$scale_y;
|
|
$shift_x = +$shift_x;
|
|
$shift_y = +$shift_y;
|
|
$off_x = $off_x|0;
|
|
$off_y = $off_y|0;
|
|
$invert = $invert|0;
|
|
$alloc = $alloc|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0.0;
|
|
var $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0.0, $131 = 0.0;
|
|
var $132 = 0.0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0.0, $140 = 0, $141 = 0.0, $142 = 0.0, $143 = 0.0, $144 = 0.0, $145 = 0.0, $146 = 0, $147 = 0.0, $148 = 0.0, $149 = 0, $15 = 0.0;
|
|
var $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0.0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0;
|
|
var $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0;
|
|
var $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0;
|
|
var $5 = 0.0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0.0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0.0;
|
|
var $68 = 0, $69 = 0, $7 = 0.0, $70 = 0, $71 = 0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0.0, $85 = 0;
|
|
var $86 = 0, $87 = 0, $88 = 0, $89 = 0.0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $a = 0, $b = 0, $e = 0, $i = 0, $j = 0;
|
|
var $k = 0, $m = 0, $n = 0, $p = 0, $vsubsample = 0, $y_scale_inv = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy1 = sp + 96|0;
|
|
$$byval_copy = sp + 92|0;
|
|
$0 = $result;
|
|
$1 = $pts;
|
|
$2 = $wcount;
|
|
$3 = $windings;
|
|
$4 = $scale_x;
|
|
$5 = $scale_y;
|
|
$6 = $shift_x;
|
|
$7 = $shift_y;
|
|
$8 = $off_x;
|
|
$9 = $off_y;
|
|
$10 = $invert;
|
|
$11 = $alloc;
|
|
$12 = $10;
|
|
$13 = ($12|0)!=(0);
|
|
$14 = $5;
|
|
$15 = -$14;
|
|
$16 = $13 ? $15 : $14;
|
|
$y_scale_inv = $16;
|
|
$vsubsample = 1;
|
|
$n = 0;
|
|
$i = 0;
|
|
while(1) {
|
|
$17 = $i;
|
|
$18 = $3;
|
|
$19 = ($17|0)<($18|0);
|
|
if (!($19)) {
|
|
break;
|
|
}
|
|
$20 = $i;
|
|
$21 = $2;
|
|
$22 = (($21) + ($20<<2)|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$24 = $n;
|
|
$25 = (($24) + ($23))|0;
|
|
$n = $25;
|
|
$26 = $i;
|
|
$27 = (($26) + 1)|0;
|
|
$i = $27;
|
|
}
|
|
$28 = $11;
|
|
$29 = ((($28)) + 4|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$31 = $11;
|
|
$32 = $n;
|
|
$33 = (($32) + 1)|0;
|
|
$34 = ($33*20)|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$31>>2]|0;
|
|
$35 = (FUNCTION_TABLE_iiii[$30 & 7]($$byval_copy,0,$34)|0);
|
|
$e = $35;
|
|
$36 = $e;
|
|
$37 = ($36|0)==(0|0);
|
|
if ($37) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$n = 0;
|
|
$m = 0;
|
|
$i = 0;
|
|
while(1) {
|
|
$38 = $i;
|
|
$39 = $3;
|
|
$40 = ($38|0)<($39|0);
|
|
if (!($40)) {
|
|
break;
|
|
}
|
|
$41 = $1;
|
|
$42 = $m;
|
|
$43 = (($41) + ($42<<3)|0);
|
|
$p = $43;
|
|
$44 = $i;
|
|
$45 = $2;
|
|
$46 = (($45) + ($44<<2)|0);
|
|
$47 = HEAP32[$46>>2]|0;
|
|
$48 = $m;
|
|
$49 = (($48) + ($47))|0;
|
|
$m = $49;
|
|
$50 = $i;
|
|
$51 = $2;
|
|
$52 = (($51) + ($50<<2)|0);
|
|
$53 = HEAP32[$52>>2]|0;
|
|
$54 = (($53) - 1)|0;
|
|
$j = $54;
|
|
$k = 0;
|
|
while(1) {
|
|
$55 = $k;
|
|
$56 = $i;
|
|
$57 = $2;
|
|
$58 = (($57) + ($56<<2)|0);
|
|
$59 = HEAP32[$58>>2]|0;
|
|
$60 = ($55|0)<($59|0);
|
|
if (!($60)) {
|
|
break;
|
|
}
|
|
$61 = $k;
|
|
$a = $61;
|
|
$62 = $j;
|
|
$b = $62;
|
|
$63 = $j;
|
|
$64 = $p;
|
|
$65 = (($64) + ($63<<3)|0);
|
|
$66 = ((($65)) + 4|0);
|
|
$67 = +HEAPF32[$66>>2];
|
|
$68 = $k;
|
|
$69 = $p;
|
|
$70 = (($69) + ($68<<3)|0);
|
|
$71 = ((($70)) + 4|0);
|
|
$72 = +HEAPF32[$71>>2];
|
|
$73 = $67 == $72;
|
|
if (!($73)) {
|
|
$74 = $n;
|
|
$75 = $e;
|
|
$76 = (($75) + (($74*20)|0)|0);
|
|
$77 = ((($76)) + 16|0);
|
|
HEAP32[$77>>2] = 0;
|
|
$78 = $10;
|
|
$79 = ($78|0)!=(0);
|
|
$80 = $j;
|
|
$81 = $p;
|
|
$82 = (($81) + ($80<<3)|0);
|
|
$83 = ((($82)) + 4|0);
|
|
$84 = +HEAPF32[$83>>2];
|
|
$85 = $k;
|
|
$86 = $p;
|
|
$87 = (($86) + ($85<<3)|0);
|
|
$88 = ((($87)) + 4|0);
|
|
$89 = +HEAPF32[$88>>2];
|
|
if ($79) {
|
|
$90 = $84 > $89;
|
|
if ($90) {
|
|
label = 13;
|
|
}
|
|
} else {
|
|
$91 = $84 < $89;
|
|
if ($91) {
|
|
label = 13;
|
|
}
|
|
}
|
|
if ((label|0) == 13) {
|
|
label = 0;
|
|
$92 = $n;
|
|
$93 = $e;
|
|
$94 = (($93) + (($92*20)|0)|0);
|
|
$95 = ((($94)) + 16|0);
|
|
HEAP32[$95>>2] = 1;
|
|
$96 = $j;
|
|
$a = $96;
|
|
$97 = $k;
|
|
$b = $97;
|
|
}
|
|
$98 = $a;
|
|
$99 = $p;
|
|
$100 = (($99) + ($98<<3)|0);
|
|
$101 = +HEAPF32[$100>>2];
|
|
$102 = $4;
|
|
$103 = $101 * $102;
|
|
$104 = $6;
|
|
$105 = $103 + $104;
|
|
$106 = $n;
|
|
$107 = $e;
|
|
$108 = (($107) + (($106*20)|0)|0);
|
|
HEAPF32[$108>>2] = $105;
|
|
$109 = $a;
|
|
$110 = $p;
|
|
$111 = (($110) + ($109<<3)|0);
|
|
$112 = ((($111)) + 4|0);
|
|
$113 = +HEAPF32[$112>>2];
|
|
$114 = $y_scale_inv;
|
|
$115 = $113 * $114;
|
|
$116 = $7;
|
|
$117 = $115 + $116;
|
|
$118 = $vsubsample;
|
|
$119 = (+($118|0));
|
|
$120 = $117 * $119;
|
|
$121 = $n;
|
|
$122 = $e;
|
|
$123 = (($122) + (($121*20)|0)|0);
|
|
$124 = ((($123)) + 4|0);
|
|
HEAPF32[$124>>2] = $120;
|
|
$125 = $b;
|
|
$126 = $p;
|
|
$127 = (($126) + ($125<<3)|0);
|
|
$128 = +HEAPF32[$127>>2];
|
|
$129 = $4;
|
|
$130 = $128 * $129;
|
|
$131 = $6;
|
|
$132 = $130 + $131;
|
|
$133 = $n;
|
|
$134 = $e;
|
|
$135 = (($134) + (($133*20)|0)|0);
|
|
$136 = ((($135)) + 8|0);
|
|
HEAPF32[$136>>2] = $132;
|
|
$137 = $b;
|
|
$138 = $p;
|
|
$139 = (($138) + ($137<<3)|0);
|
|
$140 = ((($139)) + 4|0);
|
|
$141 = +HEAPF32[$140>>2];
|
|
$142 = $y_scale_inv;
|
|
$143 = $141 * $142;
|
|
$144 = $7;
|
|
$145 = $143 + $144;
|
|
$146 = $vsubsample;
|
|
$147 = (+($146|0));
|
|
$148 = $145 * $147;
|
|
$149 = $n;
|
|
$150 = $e;
|
|
$151 = (($150) + (($149*20)|0)|0);
|
|
$152 = ((($151)) + 12|0);
|
|
HEAPF32[$152>>2] = $148;
|
|
$153 = $n;
|
|
$154 = (($153) + 1)|0;
|
|
$n = $154;
|
|
}
|
|
$155 = $k;
|
|
$156 = (($155) + 1)|0;
|
|
$k = $156;
|
|
$j = $155;
|
|
}
|
|
$157 = $i;
|
|
$158 = (($157) + 1)|0;
|
|
$i = $158;
|
|
}
|
|
$159 = $e;
|
|
$160 = $n;
|
|
_nk_tt__sort_edges($159,$160);
|
|
$161 = $0;
|
|
$162 = $e;
|
|
$163 = $n;
|
|
$164 = $vsubsample;
|
|
$165 = $8;
|
|
$166 = $9;
|
|
$167 = $11;
|
|
_nk_tt__rasterize_sorted_edges($161,$162,$163,$164,$165,$166,$167);
|
|
$168 = $11;
|
|
$169 = ((($168)) + 8|0);
|
|
$170 = HEAP32[$169>>2]|0;
|
|
$171 = $11;
|
|
$172 = $e;
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$171>>2]|0;
|
|
FUNCTION_TABLE_vii[$170 & 31]($$byval_copy1,$172);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_tt__add_point($points,$n,$x,$y) {
|
|
$points = $points|0;
|
|
$n = $n|0;
|
|
$x = +$x;
|
|
$y = +$y;
|
|
var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $points;
|
|
$1 = $n;
|
|
$2 = $x;
|
|
$3 = $y;
|
|
$4 = $0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$6 = $2;
|
|
$7 = $1;
|
|
$8 = $0;
|
|
$9 = (($8) + ($7<<3)|0);
|
|
HEAPF32[$9>>2] = $6;
|
|
$10 = $3;
|
|
$11 = $1;
|
|
$12 = $0;
|
|
$13 = (($12) + ($11<<3)|0);
|
|
$14 = ((($13)) + 4|0);
|
|
HEAPF32[$14>>2] = $10;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_tt__tesselate_curve($points,$num_points,$x0,$y0,$x1,$y1,$x2,$y2,$objspace_flatness_squared,$n) {
|
|
$points = $points|0;
|
|
$num_points = $num_points|0;
|
|
$x0 = +$x0;
|
|
$y0 = +$y0;
|
|
$x1 = +$x1;
|
|
$y1 = +$y1;
|
|
$x2 = +$x2;
|
|
$y2 = +$y2;
|
|
$objspace_flatness_squared = +$objspace_flatness_squared;
|
|
$n = $n|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0;
|
|
var $27 = 0.0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0;
|
|
var $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0.0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0.0, $60 = 0.0, $61 = 0.0, $62 = 0.0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0.0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0.0, $80 = 0;
|
|
var $81 = 0, $82 = 0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0.0, $dx = 0.0, $dy = 0.0, $mx = 0.0, $my = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $points;
|
|
$2 = $num_points;
|
|
$3 = $x0;
|
|
$4 = $y0;
|
|
$5 = $x1;
|
|
$6 = $y1;
|
|
$7 = $x2;
|
|
$8 = $y2;
|
|
$9 = $objspace_flatness_squared;
|
|
$10 = $n;
|
|
$11 = $3;
|
|
$12 = $5;
|
|
$13 = 2.0 * $12;
|
|
$14 = $11 + $13;
|
|
$15 = $7;
|
|
$16 = $14 + $15;
|
|
$17 = $16 / 4.0;
|
|
$mx = $17;
|
|
$18 = $4;
|
|
$19 = $6;
|
|
$20 = 2.0 * $19;
|
|
$21 = $18 + $20;
|
|
$22 = $8;
|
|
$23 = $21 + $22;
|
|
$24 = $23 / 4.0;
|
|
$my = $24;
|
|
$25 = $3;
|
|
$26 = $7;
|
|
$27 = $25 + $26;
|
|
$28 = $27 / 2.0;
|
|
$29 = $mx;
|
|
$30 = $28 - $29;
|
|
$dx = $30;
|
|
$31 = $4;
|
|
$32 = $8;
|
|
$33 = $31 + $32;
|
|
$34 = $33 / 2.0;
|
|
$35 = $my;
|
|
$36 = $34 - $35;
|
|
$dy = $36;
|
|
$37 = $10;
|
|
$38 = ($37|0)>(16);
|
|
if ($38) {
|
|
$0 = 1;
|
|
$89 = $0;
|
|
STACKTOP = sp;return ($89|0);
|
|
}
|
|
$39 = $dx;
|
|
$40 = $dx;
|
|
$41 = $39 * $40;
|
|
$42 = $dy;
|
|
$43 = $dy;
|
|
$44 = $42 * $43;
|
|
$45 = $41 + $44;
|
|
$46 = $9;
|
|
$47 = $45 > $46;
|
|
$48 = $1;
|
|
$49 = $2;
|
|
if ($47) {
|
|
$50 = $3;
|
|
$51 = $4;
|
|
$52 = $3;
|
|
$53 = $5;
|
|
$54 = $52 + $53;
|
|
$55 = $54 / 2.0;
|
|
$56 = $4;
|
|
$57 = $6;
|
|
$58 = $56 + $57;
|
|
$59 = $58 / 2.0;
|
|
$60 = $mx;
|
|
$61 = $my;
|
|
$62 = $9;
|
|
$63 = $10;
|
|
$64 = (($63) + 1)|0;
|
|
(_nk_tt__tesselate_curve($48,$49,$50,$51,$55,$59,$60,$61,$62,$64)|0);
|
|
$65 = $1;
|
|
$66 = $2;
|
|
$67 = $mx;
|
|
$68 = $my;
|
|
$69 = $5;
|
|
$70 = $7;
|
|
$71 = $69 + $70;
|
|
$72 = $71 / 2.0;
|
|
$73 = $6;
|
|
$74 = $8;
|
|
$75 = $73 + $74;
|
|
$76 = $75 / 2.0;
|
|
$77 = $7;
|
|
$78 = $8;
|
|
$79 = $9;
|
|
$80 = $10;
|
|
$81 = (($80) + 1)|0;
|
|
(_nk_tt__tesselate_curve($65,$66,$67,$68,$72,$76,$77,$78,$79,$81)|0);
|
|
} else {
|
|
$82 = HEAP32[$49>>2]|0;
|
|
$83 = $7;
|
|
$84 = $8;
|
|
_nk_tt__add_point($48,$82,$83,$84);
|
|
$85 = $2;
|
|
$86 = HEAP32[$85>>2]|0;
|
|
$87 = (($86) + 1)|0;
|
|
$88 = $2;
|
|
HEAP32[$88>>2] = $87;
|
|
}
|
|
$0 = 1;
|
|
$89 = $0;
|
|
STACKTOP = sp;return ($89|0);
|
|
}
|
|
function _nk_tt__sort_edges($p,$n) {
|
|
$p = $p|0;
|
|
$n = $n|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $p;
|
|
$1 = $n;
|
|
$2 = $0;
|
|
$3 = $1;
|
|
_nk_tt__sort_edges_quicksort($2,$3);
|
|
$4 = $0;
|
|
$5 = $1;
|
|
_nk_tt__sort_edges_ins_sort($4,$5);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_tt__rasterize_sorted_edges($result,$e,$n,$vsubsample,$off_x,$off_y,$alloc) {
|
|
$result = $result|0;
|
|
$e = $e|0;
|
|
$n = $n|0;
|
|
$vsubsample = $vsubsample|0;
|
|
$off_x = $off_x|0;
|
|
$off_y = $off_y|0;
|
|
$alloc = $alloc|0;
|
|
var $$ = 0, $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0;
|
|
var $113 = 0, $114 = 0, $115 = 0.0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0, $127 = 0, $128 = 0, $129 = 0.0, $13 = 0, $130 = 0.0;
|
|
var $131 = 0.0, $132 = 0.0, $133 = 0, $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0;
|
|
var $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0.0, $166 = 0, $167 = 0;
|
|
var $168 = 0.0, $169 = 0.0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $19 = 0, $2 = 0, $20 = 0;
|
|
var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0;
|
|
var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0;
|
|
var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0.0, $65 = 0.0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0;
|
|
var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0.0, $83 = 0, $84 = 0, $85 = 0, $86 = 0.0, $87 = 0, $88 = 0, $89 = 0.0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0.0;
|
|
var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0.0, $active = 0, $hh = 0, $i = 0, $j = 0, $k = 0.0, $m = 0, $scan_y_bottom = 0.0, $scan_y_top = 0.0, $scanline = 0, $scanline2 = 0, $scanline_data = 0, $step = 0, $sum = 0.0, $y = 0;
|
|
var $z = 0, $z1 = 0, $z2 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 640|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy1 = sp + 632|0;
|
|
$$byval_copy = sp + 628|0;
|
|
$hh = sp + 576|0;
|
|
$active = sp + 572|0;
|
|
$scanline_data = sp + 44|0;
|
|
$0 = $result;
|
|
$1 = $e;
|
|
$2 = $n;
|
|
$3 = $vsubsample;
|
|
$4 = $off_x;
|
|
$5 = $off_y;
|
|
$6 = $alloc;
|
|
HEAP32[$active>>2] = 0;
|
|
$j = 0;
|
|
_nk_zero($hh,24);
|
|
$7 = $6;
|
|
;HEAP32[$hh>>2]=HEAP32[$7>>2]|0;HEAP32[$hh+4>>2]=HEAP32[$7+4>>2]|0;HEAP32[$hh+8>>2]=HEAP32[$7+8>>2]|0;
|
|
$8 = $0;
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = ($9|0)>(64);
|
|
if ($10) {
|
|
$11 = $6;
|
|
$12 = ((($11)) + 4|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = $6;
|
|
$15 = $0;
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = $16<<1;
|
|
$18 = (($17) + 1)|0;
|
|
$19 = $18<<2;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$14>>2]|0;
|
|
$20 = (FUNCTION_TABLE_iiii[$13 & 7]($$byval_copy,0,$19)|0);
|
|
$scanline = $20;
|
|
} else {
|
|
$scanline = $scanline_data;
|
|
}
|
|
$21 = $scanline;
|
|
$22 = $0;
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$24 = (($21) + ($23<<2)|0);
|
|
$scanline2 = $24;
|
|
$25 = $5;
|
|
$y = $25;
|
|
$26 = $5;
|
|
$27 = $0;
|
|
$28 = ((($27)) + 4|0);
|
|
$29 = HEAP32[$28>>2]|0;
|
|
$30 = (($26) + ($29))|0;
|
|
$31 = (+($30|0));
|
|
$32 = $31 + 1.0;
|
|
$33 = $2;
|
|
$34 = $1;
|
|
$35 = (($34) + (($33*20)|0)|0);
|
|
$36 = ((($35)) + 4|0);
|
|
HEAPF32[$36>>2] = $32;
|
|
L5: while(1) {
|
|
$37 = $j;
|
|
$38 = $0;
|
|
$39 = ((($38)) + 4|0);
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$41 = ($37|0)<($40|0);
|
|
if (!($41)) {
|
|
label = 29;
|
|
break;
|
|
}
|
|
$42 = $y;
|
|
$43 = (+($42|0));
|
|
$44 = $43 + 0.0;
|
|
$scan_y_top = $44;
|
|
$45 = $y;
|
|
$46 = (+($45|0));
|
|
$47 = $46 + 1.0;
|
|
$scan_y_bottom = $47;
|
|
$step = $active;
|
|
$48 = $scanline;
|
|
$49 = $0;
|
|
$50 = HEAP32[$49>>2]|0;
|
|
$51 = $50<<2;
|
|
_nk_memset($48,0,$51);
|
|
$52 = $scanline2;
|
|
$53 = $0;
|
|
$54 = HEAP32[$53>>2]|0;
|
|
$55 = (($54) + 1)|0;
|
|
$56 = $55<<2;
|
|
_nk_memset($52,0,$56);
|
|
while(1) {
|
|
$57 = $step;
|
|
$58 = HEAP32[$57>>2]|0;
|
|
$59 = ($58|0)!=(0|0);
|
|
if (!($59)) {
|
|
break;
|
|
}
|
|
$60 = $step;
|
|
$61 = HEAP32[$60>>2]|0;
|
|
$z = $61;
|
|
$62 = $z;
|
|
$63 = ((($62)) + 24|0);
|
|
$64 = +HEAPF32[$63>>2];
|
|
$65 = $scan_y_top;
|
|
$66 = $64 <= $65;
|
|
if (!($66)) {
|
|
$77 = $step;
|
|
$78 = HEAP32[$77>>2]|0;
|
|
$step = $78;
|
|
continue;
|
|
}
|
|
$67 = $z;
|
|
$68 = HEAP32[$67>>2]|0;
|
|
$69 = $step;
|
|
HEAP32[$69>>2] = $68;
|
|
$70 = $z;
|
|
$71 = ((($70)) + 16|0);
|
|
$72 = +HEAPF32[$71>>2];
|
|
$73 = $72 != 0.0;
|
|
if (!($73)) {
|
|
label = 10;
|
|
break L5;
|
|
}
|
|
$74 = $z;
|
|
$75 = ((($74)) + 16|0);
|
|
HEAPF32[$75>>2] = 0.0;
|
|
$76 = $z;
|
|
_nk_tt__hheap_free($hh,$76);
|
|
}
|
|
while(1) {
|
|
$79 = $1;
|
|
$80 = ((($79)) + 4|0);
|
|
$81 = +HEAPF32[$80>>2];
|
|
$82 = $scan_y_bottom;
|
|
$83 = $81 <= $82;
|
|
if (!($83)) {
|
|
break;
|
|
}
|
|
$84 = $1;
|
|
$85 = ((($84)) + 4|0);
|
|
$86 = +HEAPF32[$85>>2];
|
|
$87 = $1;
|
|
$88 = ((($87)) + 12|0);
|
|
$89 = +HEAPF32[$88>>2];
|
|
$90 = $86 != $89;
|
|
if ($90) {
|
|
$91 = $1;
|
|
$92 = $4;
|
|
$93 = $scan_y_top;
|
|
$94 = (_nk_tt__new_active($hh,$91,$92,$93)|0);
|
|
$z1 = $94;
|
|
$95 = $z1;
|
|
$96 = ($95|0)!=(0|0);
|
|
if ($96) {
|
|
$97 = $z1;
|
|
$98 = ((($97)) + 24|0);
|
|
$99 = +HEAPF32[$98>>2];
|
|
$100 = $scan_y_top;
|
|
$101 = $99 >= $100;
|
|
if (!($101)) {
|
|
label = 17;
|
|
break L5;
|
|
}
|
|
$102 = HEAP32[$active>>2]|0;
|
|
$103 = $z1;
|
|
HEAP32[$103>>2] = $102;
|
|
$104 = $z1;
|
|
HEAP32[$active>>2] = $104;
|
|
}
|
|
}
|
|
$105 = $1;
|
|
$106 = ((($105)) + 20|0);
|
|
$1 = $106;
|
|
}
|
|
$107 = HEAP32[$active>>2]|0;
|
|
$108 = ($107|0)!=(0|0);
|
|
if ($108) {
|
|
$109 = $scanline;
|
|
$110 = $scanline2;
|
|
$111 = ((($110)) + 4|0);
|
|
$112 = $0;
|
|
$113 = HEAP32[$112>>2]|0;
|
|
$114 = HEAP32[$active>>2]|0;
|
|
$115 = $scan_y_top;
|
|
_nk_tt__fill_active_edges_new($109,$111,$113,$114,$115);
|
|
}
|
|
$sum = 0.0;
|
|
$i = 0;
|
|
while(1) {
|
|
$116 = $i;
|
|
$117 = $0;
|
|
$118 = HEAP32[$117>>2]|0;
|
|
$119 = ($116|0)<($118|0);
|
|
if (!($119)) {
|
|
break;
|
|
}
|
|
$120 = $i;
|
|
$121 = $scanline2;
|
|
$122 = (($121) + ($120<<2)|0);
|
|
$123 = +HEAPF32[$122>>2];
|
|
$124 = $sum;
|
|
$125 = $124 + $123;
|
|
$sum = $125;
|
|
$126 = $i;
|
|
$127 = $scanline;
|
|
$128 = (($127) + ($126<<2)|0);
|
|
$129 = +HEAPF32[$128>>2];
|
|
$130 = $sum;
|
|
$131 = $129 + $130;
|
|
$k = $131;
|
|
$132 = $k;
|
|
$133 = $132 < 0.0;
|
|
$134 = $k;
|
|
$135 = -$134;
|
|
$136 = $133 ? $135 : $134;
|
|
$137 = $136 * 255.0;
|
|
$138 = $137 + 0.5;
|
|
$k = $138;
|
|
$139 = $k;
|
|
$140 = (~~(($139)));
|
|
$m = $140;
|
|
$141 = $m;
|
|
$142 = ($141|0)>(255);
|
|
$$ = $142 ? 255 : $140;
|
|
$m = $$;
|
|
$143 = $m;
|
|
$144 = $143&255;
|
|
$145 = $j;
|
|
$146 = $0;
|
|
$147 = ((($146)) + 8|0);
|
|
$148 = HEAP32[$147>>2]|0;
|
|
$149 = Math_imul($145, $148)|0;
|
|
$150 = $i;
|
|
$151 = (($149) + ($150))|0;
|
|
$152 = $0;
|
|
$153 = ((($152)) + 12|0);
|
|
$154 = HEAP32[$153>>2]|0;
|
|
$155 = (($154) + ($151)|0);
|
|
HEAP8[$155>>0] = $144;
|
|
$156 = $i;
|
|
$157 = (($156) + 1)|0;
|
|
$i = $157;
|
|
}
|
|
$step = $active;
|
|
while(1) {
|
|
$158 = $step;
|
|
$159 = HEAP32[$158>>2]|0;
|
|
$160 = ($159|0)!=(0|0);
|
|
if (!($160)) {
|
|
break;
|
|
}
|
|
$161 = $step;
|
|
$162 = HEAP32[$161>>2]|0;
|
|
$z2 = $162;
|
|
$163 = $z2;
|
|
$164 = ((($163)) + 8|0);
|
|
$165 = +HEAPF32[$164>>2];
|
|
$166 = $z2;
|
|
$167 = ((($166)) + 4|0);
|
|
$168 = +HEAPF32[$167>>2];
|
|
$169 = $168 + $165;
|
|
HEAPF32[$167>>2] = $169;
|
|
$170 = $step;
|
|
$171 = HEAP32[$170>>2]|0;
|
|
$step = $171;
|
|
}
|
|
$172 = $y;
|
|
$173 = (($172) + 1)|0;
|
|
$y = $173;
|
|
$174 = $j;
|
|
$175 = (($174) + 1)|0;
|
|
$j = $175;
|
|
}
|
|
if ((label|0) == 10) {
|
|
___assert_fail((30625|0),(13400|0),7969,(30638|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 17) {
|
|
___assert_fail((30668|0),(13400|0),7982,(30638|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 29) {
|
|
_nk_tt__hheap_cleanup($hh);
|
|
$176 = $scanline;
|
|
$177 = ($176|0)!=($scanline_data|0);
|
|
if (!($177)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$178 = $6;
|
|
$179 = ((($178)) + 8|0);
|
|
$180 = HEAP32[$179>>2]|0;
|
|
$181 = $6;
|
|
$182 = $scanline;
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$181>>2]|0;
|
|
FUNCTION_TABLE_vii[$180 & 31]($$byval_copy1,$182);
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_tt__sort_edges_quicksort($p,$n) {
|
|
$p = $p|0;
|
|
$n = $n|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0.0, $130 = 0, $14 = 0, $15 = 0, $16 = 0;
|
|
var $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0;
|
|
var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0;
|
|
var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0;
|
|
var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0.0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0.0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0.0;
|
|
var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $c = 0, $c01 = 0, $c12 = 0, $i = 0, $j = 0, $m = 0, $t = 0, $z = 0, label = 0;
|
|
var sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$t = sp + 28|0;
|
|
$0 = $p;
|
|
$1 = $n;
|
|
while(1) {
|
|
$2 = $1;
|
|
$3 = ($2|0)>(12);
|
|
if (!($3)) {
|
|
break;
|
|
}
|
|
$4 = $1;
|
|
$5 = $4 >> 1;
|
|
$m = $5;
|
|
$6 = $0;
|
|
$7 = ((($6)) + 4|0);
|
|
$8 = +HEAPF32[$7>>2];
|
|
$9 = $m;
|
|
$10 = $0;
|
|
$11 = (($10) + (($9*20)|0)|0);
|
|
$12 = ((($11)) + 4|0);
|
|
$13 = +HEAPF32[$12>>2];
|
|
$14 = $8 < $13;
|
|
$15 = $14&1;
|
|
$c01 = $15;
|
|
$16 = $m;
|
|
$17 = $0;
|
|
$18 = (($17) + (($16*20)|0)|0);
|
|
$19 = ((($18)) + 4|0);
|
|
$20 = +HEAPF32[$19>>2];
|
|
$21 = $1;
|
|
$22 = (($21) - 1)|0;
|
|
$23 = $0;
|
|
$24 = (($23) + (($22*20)|0)|0);
|
|
$25 = ((($24)) + 4|0);
|
|
$26 = +HEAPF32[$25>>2];
|
|
$27 = $20 < $26;
|
|
$28 = $27&1;
|
|
$c12 = $28;
|
|
$29 = $c01;
|
|
$30 = $c12;
|
|
$31 = ($29|0)!=($30|0);
|
|
if ($31) {
|
|
$32 = $0;
|
|
$33 = ((($32)) + 4|0);
|
|
$34 = +HEAPF32[$33>>2];
|
|
$35 = $1;
|
|
$36 = (($35) - 1)|0;
|
|
$37 = $0;
|
|
$38 = (($37) + (($36*20)|0)|0);
|
|
$39 = ((($38)) + 4|0);
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = $34 < $40;
|
|
$42 = $41&1;
|
|
$c = $42;
|
|
$43 = $c;
|
|
$44 = $c12;
|
|
$45 = ($43|0)==($44|0);
|
|
$46 = $1;
|
|
$47 = (($46) - 1)|0;
|
|
$48 = $45 ? 0 : $47;
|
|
$z = $48;
|
|
$49 = $z;
|
|
$50 = $0;
|
|
$51 = (($50) + (($49*20)|0)|0);
|
|
;HEAP32[$t>>2]=HEAP32[$51>>2]|0;HEAP32[$t+4>>2]=HEAP32[$51+4>>2]|0;HEAP32[$t+8>>2]=HEAP32[$51+8>>2]|0;HEAP32[$t+12>>2]=HEAP32[$51+12>>2]|0;HEAP32[$t+16>>2]=HEAP32[$51+16>>2]|0;
|
|
$52 = $z;
|
|
$53 = $0;
|
|
$54 = (($53) + (($52*20)|0)|0);
|
|
$55 = $m;
|
|
$56 = $0;
|
|
$57 = (($56) + (($55*20)|0)|0);
|
|
;HEAP32[$54>>2]=HEAP32[$57>>2]|0;HEAP32[$54+4>>2]=HEAP32[$57+4>>2]|0;HEAP32[$54+8>>2]=HEAP32[$57+8>>2]|0;HEAP32[$54+12>>2]=HEAP32[$57+12>>2]|0;HEAP32[$54+16>>2]=HEAP32[$57+16>>2]|0;
|
|
$58 = $m;
|
|
$59 = $0;
|
|
$60 = (($59) + (($58*20)|0)|0);
|
|
;HEAP32[$60>>2]=HEAP32[$t>>2]|0;HEAP32[$60+4>>2]=HEAP32[$t+4>>2]|0;HEAP32[$60+8>>2]=HEAP32[$t+8>>2]|0;HEAP32[$60+12>>2]=HEAP32[$t+12>>2]|0;HEAP32[$60+16>>2]=HEAP32[$t+16>>2]|0;
|
|
}
|
|
$61 = $0;
|
|
;HEAP32[$t>>2]=HEAP32[$61>>2]|0;HEAP32[$t+4>>2]=HEAP32[$61+4>>2]|0;HEAP32[$t+8>>2]=HEAP32[$61+8>>2]|0;HEAP32[$t+12>>2]=HEAP32[$61+12>>2]|0;HEAP32[$t+16>>2]=HEAP32[$61+16>>2]|0;
|
|
$62 = $0;
|
|
$63 = $m;
|
|
$64 = $0;
|
|
$65 = (($64) + (($63*20)|0)|0);
|
|
;HEAP32[$62>>2]=HEAP32[$65>>2]|0;HEAP32[$62+4>>2]=HEAP32[$65+4>>2]|0;HEAP32[$62+8>>2]=HEAP32[$65+8>>2]|0;HEAP32[$62+12>>2]=HEAP32[$65+12>>2]|0;HEAP32[$62+16>>2]=HEAP32[$65+16>>2]|0;
|
|
$66 = $m;
|
|
$67 = $0;
|
|
$68 = (($67) + (($66*20)|0)|0);
|
|
;HEAP32[$68>>2]=HEAP32[$t>>2]|0;HEAP32[$68+4>>2]=HEAP32[$t+4>>2]|0;HEAP32[$68+8>>2]=HEAP32[$t+8>>2]|0;HEAP32[$68+12>>2]=HEAP32[$t+12>>2]|0;HEAP32[$68+16>>2]=HEAP32[$t+16>>2]|0;
|
|
$i = 1;
|
|
$69 = $1;
|
|
$70 = (($69) - 1)|0;
|
|
$j = $70;
|
|
while(1) {
|
|
$71 = $i;
|
|
$72 = $0;
|
|
$73 = (($72) + (($71*20)|0)|0);
|
|
$74 = ((($73)) + 4|0);
|
|
$75 = +HEAPF32[$74>>2];
|
|
$76 = $0;
|
|
$77 = ((($76)) + 4|0);
|
|
$78 = +HEAPF32[$77>>2];
|
|
$79 = $75 < $78;
|
|
if ($79) {
|
|
$80 = $i;
|
|
$81 = (($80) + 1)|0;
|
|
$i = $81;
|
|
continue;
|
|
}
|
|
while(1) {
|
|
$82 = $0;
|
|
$83 = ((($82)) + 4|0);
|
|
$84 = +HEAPF32[$83>>2];
|
|
$85 = $j;
|
|
$86 = $0;
|
|
$87 = (($86) + (($85*20)|0)|0);
|
|
$88 = ((($87)) + 4|0);
|
|
$89 = +HEAPF32[$88>>2];
|
|
$90 = $84 < $89;
|
|
if (!($90)) {
|
|
break;
|
|
}
|
|
$91 = $j;
|
|
$92 = (($91) + -1)|0;
|
|
$j = $92;
|
|
}
|
|
$93 = $i;
|
|
$94 = $j;
|
|
$95 = ($93|0)>=($94|0);
|
|
if ($95) {
|
|
break;
|
|
}
|
|
$96 = $i;
|
|
$97 = $0;
|
|
$98 = (($97) + (($96*20)|0)|0);
|
|
;HEAP32[$t>>2]=HEAP32[$98>>2]|0;HEAP32[$t+4>>2]=HEAP32[$98+4>>2]|0;HEAP32[$t+8>>2]=HEAP32[$98+8>>2]|0;HEAP32[$t+12>>2]=HEAP32[$98+12>>2]|0;HEAP32[$t+16>>2]=HEAP32[$98+16>>2]|0;
|
|
$99 = $i;
|
|
$100 = $0;
|
|
$101 = (($100) + (($99*20)|0)|0);
|
|
$102 = $j;
|
|
$103 = $0;
|
|
$104 = (($103) + (($102*20)|0)|0);
|
|
;HEAP32[$101>>2]=HEAP32[$104>>2]|0;HEAP32[$101+4>>2]=HEAP32[$104+4>>2]|0;HEAP32[$101+8>>2]=HEAP32[$104+8>>2]|0;HEAP32[$101+12>>2]=HEAP32[$104+12>>2]|0;HEAP32[$101+16>>2]=HEAP32[$104+16>>2]|0;
|
|
$105 = $j;
|
|
$106 = $0;
|
|
$107 = (($106) + (($105*20)|0)|0);
|
|
;HEAP32[$107>>2]=HEAP32[$t>>2]|0;HEAP32[$107+4>>2]=HEAP32[$t+4>>2]|0;HEAP32[$107+8>>2]=HEAP32[$t+8>>2]|0;HEAP32[$107+12>>2]=HEAP32[$t+12>>2]|0;HEAP32[$107+16>>2]=HEAP32[$t+16>>2]|0;
|
|
$108 = $i;
|
|
$109 = (($108) + 1)|0;
|
|
$i = $109;
|
|
$110 = $j;
|
|
$111 = (($110) + -1)|0;
|
|
$j = $111;
|
|
}
|
|
$112 = $j;
|
|
$113 = $1;
|
|
$114 = $i;
|
|
$115 = (($113) - ($114))|0;
|
|
$116 = ($112|0)<($115|0);
|
|
$117 = $0;
|
|
if ($116) {
|
|
$118 = $j;
|
|
_nk_tt__sort_edges_quicksort($117,$118);
|
|
$119 = $0;
|
|
$120 = $i;
|
|
$121 = (($119) + (($120*20)|0)|0);
|
|
$0 = $121;
|
|
$122 = $1;
|
|
$123 = $i;
|
|
$124 = (($122) - ($123))|0;
|
|
$1 = $124;
|
|
continue;
|
|
} else {
|
|
$125 = $i;
|
|
$126 = (($117) + (($125*20)|0)|0);
|
|
$127 = $1;
|
|
$128 = $i;
|
|
$129 = (($127) - ($128))|0;
|
|
_nk_tt__sort_edges_quicksort($126,$129);
|
|
$130 = $j;
|
|
$1 = $130;
|
|
continue;
|
|
}
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_tt__sort_edges_ins_sort($p,$n) {
|
|
$p = $p|0;
|
|
$n = $n|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, $a = 0, $b = 0, $c = 0, $i = 0, $j = 0, $t = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$t = sp + 12|0;
|
|
$0 = $p;
|
|
$1 = $n;
|
|
$i = 1;
|
|
while(1) {
|
|
$2 = $i;
|
|
$3 = $1;
|
|
$4 = ($2|0)<($3|0);
|
|
if (!($4)) {
|
|
break;
|
|
}
|
|
$5 = $i;
|
|
$6 = $0;
|
|
$7 = (($6) + (($5*20)|0)|0);
|
|
;HEAP32[$t>>2]=HEAP32[$7>>2]|0;HEAP32[$t+4>>2]=HEAP32[$7+4>>2]|0;HEAP32[$t+8>>2]=HEAP32[$7+8>>2]|0;HEAP32[$t+12>>2]=HEAP32[$7+12>>2]|0;HEAP32[$t+16>>2]=HEAP32[$7+16>>2]|0;
|
|
$a = $t;
|
|
$8 = $i;
|
|
$j = $8;
|
|
while(1) {
|
|
$9 = $j;
|
|
$10 = ($9|0)>(0);
|
|
if (!($10)) {
|
|
break;
|
|
}
|
|
$11 = $j;
|
|
$12 = (($11) - 1)|0;
|
|
$13 = $0;
|
|
$14 = (($13) + (($12*20)|0)|0);
|
|
$b = $14;
|
|
$15 = $a;
|
|
$16 = ((($15)) + 4|0);
|
|
$17 = +HEAPF32[$16>>2];
|
|
$18 = $b;
|
|
$19 = ((($18)) + 4|0);
|
|
$20 = +HEAPF32[$19>>2];
|
|
$21 = $17 < $20;
|
|
$22 = $21&1;
|
|
$c = $22;
|
|
$23 = $c;
|
|
$24 = ($23|0)!=(0);
|
|
if (!($24)) {
|
|
break;
|
|
}
|
|
$25 = $j;
|
|
$26 = $0;
|
|
$27 = (($26) + (($25*20)|0)|0);
|
|
$28 = $j;
|
|
$29 = (($28) - 1)|0;
|
|
$30 = $0;
|
|
$31 = (($30) + (($29*20)|0)|0);
|
|
;HEAP32[$27>>2]=HEAP32[$31>>2]|0;HEAP32[$27+4>>2]=HEAP32[$31+4>>2]|0;HEAP32[$27+8>>2]=HEAP32[$31+8>>2]|0;HEAP32[$27+12>>2]=HEAP32[$31+12>>2]|0;HEAP32[$27+16>>2]=HEAP32[$31+16>>2]|0;
|
|
$32 = $j;
|
|
$33 = (($32) + -1)|0;
|
|
$j = $33;
|
|
}
|
|
$34 = $i;
|
|
$35 = $j;
|
|
$36 = ($34|0)!=($35|0);
|
|
if ($36) {
|
|
$37 = $j;
|
|
$38 = $0;
|
|
$39 = (($38) + (($37*20)|0)|0);
|
|
;HEAP32[$39>>2]=HEAP32[$t>>2]|0;HEAP32[$39+4>>2]=HEAP32[$t+4>>2]|0;HEAP32[$39+8>>2]=HEAP32[$t+8>>2]|0;HEAP32[$39+12>>2]=HEAP32[$t+12>>2]|0;HEAP32[$39+16>>2]=HEAP32[$t+16>>2]|0;
|
|
}
|
|
$40 = $i;
|
|
$41 = (($40) + 1)|0;
|
|
$i = $41;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_tt__hheap_free($hh,$p) {
|
|
$hh = $hh|0;
|
|
$p = $p|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $hh;
|
|
$1 = $p;
|
|
$2 = $0;
|
|
$3 = ((($2)) + 16|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$5 = $1;
|
|
HEAP32[$5>>2] = $4;
|
|
$6 = $1;
|
|
$7 = $0;
|
|
$8 = ((($7)) + 16|0);
|
|
HEAP32[$8>>2] = $6;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_tt__new_active($hh,$e,$off_x,$start_point) {
|
|
$hh = $hh|0;
|
|
$e = $e|0;
|
|
$off_x = $off_x|0;
|
|
$start_point = +$start_point;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0;
|
|
var $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0.0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0.0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $8 = 0, $9 = 0.0, $dxdy = 0.0, $z = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $hh;
|
|
$2 = $e;
|
|
$3 = $off_x;
|
|
$4 = $start_point;
|
|
$5 = $1;
|
|
$6 = (_nk_tt__hheap_alloc($5,28)|0);
|
|
$z = $6;
|
|
$7 = $2;
|
|
$8 = ((($7)) + 8|0);
|
|
$9 = +HEAPF32[$8>>2];
|
|
$10 = $2;
|
|
$11 = +HEAPF32[$10>>2];
|
|
$12 = $9 - $11;
|
|
$13 = $2;
|
|
$14 = ((($13)) + 12|0);
|
|
$15 = +HEAPF32[$14>>2];
|
|
$16 = $2;
|
|
$17 = ((($16)) + 4|0);
|
|
$18 = +HEAPF32[$17>>2];
|
|
$19 = $15 - $18;
|
|
$20 = $12 / $19;
|
|
$dxdy = $20;
|
|
$21 = $z;
|
|
$22 = ($21|0)!=(0|0);
|
|
if ($22) {
|
|
$24 = $dxdy;
|
|
$25 = $z;
|
|
$26 = ((($25)) + 8|0);
|
|
HEAPF32[$26>>2] = $24;
|
|
$27 = $dxdy;
|
|
$28 = $27 != 0.0;
|
|
$29 = $dxdy;
|
|
$30 = 1.0 / $29;
|
|
$31 = $28 ? $30 : 0.0;
|
|
$32 = $z;
|
|
$33 = ((($32)) + 12|0);
|
|
HEAPF32[$33>>2] = $31;
|
|
$34 = $2;
|
|
$35 = +HEAPF32[$34>>2];
|
|
$36 = $dxdy;
|
|
$37 = $4;
|
|
$38 = $2;
|
|
$39 = ((($38)) + 4|0);
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = $37 - $40;
|
|
$42 = $36 * $41;
|
|
$43 = $35 + $42;
|
|
$44 = $z;
|
|
$45 = ((($44)) + 4|0);
|
|
HEAPF32[$45>>2] = $43;
|
|
$46 = $3;
|
|
$47 = (+($46|0));
|
|
$48 = $z;
|
|
$49 = ((($48)) + 4|0);
|
|
$50 = +HEAPF32[$49>>2];
|
|
$51 = $50 - $47;
|
|
HEAPF32[$49>>2] = $51;
|
|
$52 = $2;
|
|
$53 = ((($52)) + 16|0);
|
|
$54 = HEAP32[$53>>2]|0;
|
|
$55 = ($54|0)!=(0);
|
|
$56 = $55 ? 1.0 : -1.0;
|
|
$57 = $z;
|
|
$58 = ((($57)) + 16|0);
|
|
HEAPF32[$58>>2] = $56;
|
|
$59 = $2;
|
|
$60 = ((($59)) + 4|0);
|
|
$61 = +HEAPF32[$60>>2];
|
|
$62 = $z;
|
|
$63 = ((($62)) + 20|0);
|
|
HEAPF32[$63>>2] = $61;
|
|
$64 = $2;
|
|
$65 = ((($64)) + 12|0);
|
|
$66 = +HEAPF32[$65>>2];
|
|
$67 = $z;
|
|
$68 = ((($67)) + 24|0);
|
|
HEAPF32[$68>>2] = $66;
|
|
$69 = $z;
|
|
HEAP32[$69>>2] = 0;
|
|
$70 = $z;
|
|
$0 = $70;
|
|
$71 = $0;
|
|
STACKTOP = sp;return ($71|0);
|
|
} else {
|
|
$23 = $z;
|
|
$0 = $23;
|
|
$71 = $0;
|
|
STACKTOP = sp;return ($71|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_tt__fill_active_edges_new($scanline,$scanline_fill,$len,$e,$y_top) {
|
|
$scanline = $scanline|0;
|
|
$scanline_fill = $scanline_fill|0;
|
|
$len = $len|0;
|
|
$e = $e|0;
|
|
$y_top = +$y_top;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0, $104 = 0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0, $11 = 0.0, $110 = 0.0, $111 = 0, $112 = 0.0, $113 = 0, $114 = 0.0, $115 = 0;
|
|
var $116 = 0.0, $117 = 0, $118 = 0.0, $119 = 0, $12 = 0.0, $120 = 0.0, $121 = 0, $122 = 0.0, $123 = 0, $124 = 0, $125 = 0.0, $126 = 0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0.0, $138 = 0.0, $139 = 0, $14 = 0, $140 = 0.0, $141 = 0.0, $142 = 0.0, $143 = 0, $144 = 0.0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0.0, $149 = 0.0, $15 = 0, $150 = 0.0, $151 = 0.0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0.0, $156 = 0.0, $157 = 0, $158 = 0, $159 = 0.0, $16 = 0.0, $160 = 0.0, $161 = 0.0, $162 = 0, $163 = 0, $164 = 0, $165 = 0.0, $166 = 0.0, $167 = 0.0, $168 = 0, $169 = 0.0, $17 = 0;
|
|
var $170 = 0.0, $171 = 0.0, $172 = 0.0, $173 = 0.0, $174 = 0.0, $175 = 0.0, $176 = 0.0, $177 = 0.0, $178 = 0.0, $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0.0, $182 = 0.0, $183 = 0.0, $184 = 0.0, $185 = 0.0, $186 = 0.0, $187 = 0.0, $188 = 0.0;
|
|
var $189 = 0.0, $19 = 0, $190 = 0.0, $191 = 0.0, $192 = 0.0, $193 = 0, $194 = 0.0, $195 = 0, $196 = 0, $197 = 0.0, $198 = 0.0, $199 = 0.0, $2 = 0, $20 = 0.0, $200 = 0.0, $201 = 0.0, $202 = 0.0, $203 = 0.0, $204 = 0.0, $205 = 0;
|
|
var $206 = 0, $207 = 0.0, $208 = 0.0, $209 = 0.0, $21 = 0.0, $210 = 0.0, $211 = 0.0, $212 = 0.0, $213 = 0.0, $214 = 0.0, $215 = 0, $216 = 0.0, $217 = 0.0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0.0, $223 = 0.0;
|
|
var $224 = 0.0, $225 = 0.0, $226 = 0.0, $227 = 0, $228 = 0, $229 = 0, $23 = 0.0, $230 = 0.0, $231 = 0.0, $232 = 0.0, $233 = 0.0, $234 = 0.0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0.0, $241 = 0.0;
|
|
var $242 = 0.0, $243 = 0.0, $244 = 0, $245 = 0, $246 = 0, $247 = 0.0, $248 = 0.0, $249 = 0.0, $25 = 0.0, $250 = 0.0, $251 = 0.0, $252 = 0, $253 = 0, $254 = 0.0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0.0, $26 = 0;
|
|
var $260 = 0.0, $261 = 0.0, $262 = 0.0, $263 = 0.0, $264 = 0.0, $265 = 0, $266 = 0, $267 = 0, $268 = 0.0, $269 = 0.0, $27 = 0, $270 = 0, $271 = 0.0, $272 = 0.0, $273 = 0.0, $274 = 0.0, $275 = 0.0, $276 = 0.0, $277 = 0.0, $278 = 0.0;
|
|
var $279 = 0.0, $28 = 0.0, $280 = 0.0, $281 = 0.0, $282 = 0, $283 = 0, $284 = 0, $285 = 0.0, $286 = 0.0, $287 = 0.0, $288 = 0.0, $289 = 0.0, $29 = 0, $290 = 0.0, $291 = 0.0, $292 = 0, $293 = 0, $294 = 0, $295 = 0.0, $296 = 0.0;
|
|
var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0.0, $301 = 0, $302 = 0.0, $303 = 0, $304 = 0, $305 = 0.0, $306 = 0.0, $307 = 0.0, $308 = 0, $309 = 0.0, $31 = 0.0, $310 = 0.0, $311 = 0.0, $312 = 0.0, $313 = 0.0;
|
|
var $314 = 0.0, $315 = 0.0, $316 = 0, $317 = 0.0, $318 = 0.0, $319 = 0.0, $32 = 0.0, $320 = 0.0, $321 = 0.0, $322 = 0.0, $323 = 0.0, $324 = 0.0, $325 = 0.0, $326 = 0.0, $327 = 0, $328 = 0.0, $329 = 0.0, $33 = 0.0, $330 = 0, $331 = 0;
|
|
var $332 = 0, $333 = 0, $334 = 0.0, $335 = 0.0, $336 = 0.0, $337 = 0.0, $338 = 0, $339 = 0, $34 = 0.0, $340 = 0, $341 = 0.0, $342 = 0.0, $343 = 0.0, $344 = 0.0, $345 = 0, $346 = 0, $347 = 0, $348 = 0.0, $349 = 0.0, $35 = 0;
|
|
var $350 = 0.0, $351 = 0.0, $352 = 0.0, $353 = 0.0, $354 = 0, $355 = 0.0, $356 = 0.0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0.0, $362 = 0.0, $363 = 0.0, $364 = 0.0, $365 = 0, $366 = 0, $367 = 0, $368 = 0.0;
|
|
var $369 = 0.0, $37 = 0.0, $370 = 0.0, $371 = 0.0, $372 = 0, $373 = 0, $374 = 0, $375 = 0.0, $376 = 0.0, $377 = 0.0, $378 = 0.0, $379 = 0.0, $38 = 0, $380 = 0.0, $381 = 0, $382 = 0.0, $383 = 0.0, $384 = 0, $385 = 0, $386 = 0;
|
|
var $387 = 0, $388 = 0.0, $389 = 0.0, $39 = 0, $390 = 0.0, $391 = 0.0, $392 = 0, $393 = 0, $394 = 0, $395 = 0.0, $396 = 0.0, $397 = 0.0, $398 = 0.0, $399 = 0.0, $4 = 0.0, $40 = 0, $400 = 0.0, $401 = 0, $402 = 0.0, $403 = 0.0;
|
|
var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0.0, $409 = 0.0, $41 = 0.0, $410 = 0.0, $411 = 0.0, $412 = 0, $413 = 0, $414 = 0, $415 = 0.0, $416 = 0.0, $417 = 0.0, $418 = 0.0, $419 = 0.0, $42 = 0.0, $420 = 0.0, $421 = 0;
|
|
var $422 = 0.0, $423 = 0.0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0.0, $429 = 0.0, $43 = 0.0, $430 = 0.0, $431 = 0.0, $432 = 0, $433 = 0, $434 = 0, $435 = 0.0, $436 = 0.0, $437 = 0.0, $438 = 0.0, $439 = 0.0, $44 = 0.0;
|
|
var $440 = 0.0, $441 = 0, $442 = 0.0, $443 = 0.0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0.0, $449 = 0.0, $45 = 0, $450 = 0.0, $451 = 0.0, $452 = 0, $453 = 0, $454 = 0, $455 = 0.0, $456 = 0.0, $457 = 0.0, $458 = 0.0;
|
|
var $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0.0, $463 = 0.0, $464 = 0.0, $465 = 0.0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0;
|
|
var $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0, $6 = 0.0, $60 = 0.0, $61 = 0, $62 = 0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0, $67 = 0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0, $71 = 0;
|
|
var $72 = 0, $73 = 0.0, $74 = 0.0, $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0, $79 = 0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0, $87 = 0.0, $88 = 0.0, $89 = 0, $9 = 0;
|
|
var $90 = 0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0.0, $95 = 0.0, $96 = 0, $97 = 0, $98 = 0.0, $99 = 0.0, $area = 0.0, $dx = 0.0, $dy = 0.0, $height = 0.0, $or$cond = 0, $sign = 0.0, $step = 0.0, $t = 0.0, $x = 0, $x0 = 0.0;
|
|
var $x01 = 0.0, $x1 = 0, $x15 = 0.0, $x2 = 0, $x23 = 0, $x26 = 0.0, $x3 = 0.0, $x4 = 0, $x_bottom = 0.0, $x_top = 0.0, $xb = 0.0, $y0 = 0.0, $y1 = 0.0, $y2 = 0.0, $y3 = 0.0, $y_bottom = 0.0, $y_crossing = 0.0, $ya = 0.0, $yb = 0.0, label = 0;
|
|
var sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $scanline;
|
|
$1 = $scanline_fill;
|
|
$2 = $len;
|
|
$3 = $e;
|
|
$4 = $y_top;
|
|
$5 = $4;
|
|
$6 = $5 + 1.0;
|
|
$y_bottom = $6;
|
|
L1: while(1) {
|
|
$7 = $3;
|
|
$8 = ($7|0)!=(0|0);
|
|
if (!($8)) {
|
|
label = 56;
|
|
break;
|
|
}
|
|
$9 = $3;
|
|
$10 = ((($9)) + 24|0);
|
|
$11 = +HEAPF32[$10>>2];
|
|
$12 = $4;
|
|
$13 = $11 >= $12;
|
|
if (!($13)) {
|
|
label = 4;
|
|
break;
|
|
}
|
|
$14 = $3;
|
|
$15 = ((($14)) + 8|0);
|
|
$16 = +HEAPF32[$15>>2];
|
|
$17 = $16 == 0.0;
|
|
$18 = $3;
|
|
$19 = ((($18)) + 4|0);
|
|
$20 = +HEAPF32[$19>>2];
|
|
L5: do {
|
|
if ($17) {
|
|
$x0 = $20;
|
|
$21 = $x0;
|
|
$22 = $2;
|
|
$23 = (+($22|0));
|
|
$24 = $21 < $23;
|
|
if ($24) {
|
|
$25 = $x0;
|
|
$26 = $25 >= 0.0;
|
|
if ($26) {
|
|
$27 = $0;
|
|
$28 = $x0;
|
|
$29 = (~~(($28)));
|
|
$30 = $3;
|
|
$31 = $x0;
|
|
$32 = $4;
|
|
$33 = $x0;
|
|
$34 = $y_bottom;
|
|
_nk_tt__handle_clipped_edge($27,$29,$30,$31,$32,$33,$34);
|
|
$35 = $1;
|
|
$36 = ((($35)) + -4|0);
|
|
$37 = $x0;
|
|
$38 = (~~(($37)));
|
|
$39 = (($38) + 1)|0;
|
|
$40 = $3;
|
|
$41 = $x0;
|
|
$42 = $4;
|
|
$43 = $x0;
|
|
$44 = $y_bottom;
|
|
_nk_tt__handle_clipped_edge($36,$39,$40,$41,$42,$43,$44);
|
|
break;
|
|
} else {
|
|
$45 = $1;
|
|
$46 = ((($45)) + -4|0);
|
|
$47 = $3;
|
|
$48 = $x0;
|
|
$49 = $4;
|
|
$50 = $x0;
|
|
$51 = $y_bottom;
|
|
_nk_tt__handle_clipped_edge($46,0,$47,$48,$49,$50,$51);
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
$x01 = $20;
|
|
$52 = $3;
|
|
$53 = ((($52)) + 8|0);
|
|
$54 = +HEAPF32[$53>>2];
|
|
$dx = $54;
|
|
$55 = $x01;
|
|
$56 = $dx;
|
|
$57 = $55 + $56;
|
|
$xb = $57;
|
|
$58 = $3;
|
|
$59 = ((($58)) + 12|0);
|
|
$60 = +HEAPF32[$59>>2];
|
|
$dy = $60;
|
|
$61 = $3;
|
|
$62 = ((($61)) + 20|0);
|
|
$63 = +HEAPF32[$62>>2];
|
|
$64 = $y_bottom;
|
|
$65 = $63 <= $64;
|
|
if (!($65)) {
|
|
label = 12;
|
|
break L1;
|
|
}
|
|
$66 = $3;
|
|
$67 = ((($66)) + 24|0);
|
|
$68 = +HEAPF32[$67>>2];
|
|
$69 = $4;
|
|
$70 = $68 >= $69;
|
|
if (!($70)) {
|
|
label = 12;
|
|
break L1;
|
|
}
|
|
$71 = $3;
|
|
$72 = ((($71)) + 20|0);
|
|
$73 = +HEAPF32[$72>>2];
|
|
$74 = $4;
|
|
$75 = $73 > $74;
|
|
$76 = $x01;
|
|
if ($75) {
|
|
$77 = $dx;
|
|
$78 = $3;
|
|
$79 = ((($78)) + 20|0);
|
|
$80 = +HEAPF32[$79>>2];
|
|
$81 = $4;
|
|
$82 = $80 - $81;
|
|
$83 = $77 * $82;
|
|
$84 = $76 + $83;
|
|
$x_top = $84;
|
|
$85 = $3;
|
|
$86 = ((($85)) + 20|0);
|
|
$87 = +HEAPF32[$86>>2];
|
|
$y0 = $87;
|
|
} else {
|
|
$x_top = $76;
|
|
$88 = $4;
|
|
$y0 = $88;
|
|
}
|
|
$89 = $3;
|
|
$90 = ((($89)) + 24|0);
|
|
$91 = +HEAPF32[$90>>2];
|
|
$92 = $y_bottom;
|
|
$93 = $91 < $92;
|
|
if ($93) {
|
|
$94 = $x01;
|
|
$95 = $dx;
|
|
$96 = $3;
|
|
$97 = ((($96)) + 24|0);
|
|
$98 = +HEAPF32[$97>>2];
|
|
$99 = $4;
|
|
$100 = $98 - $99;
|
|
$101 = $95 * $100;
|
|
$102 = $94 + $101;
|
|
$x_bottom = $102;
|
|
$103 = $3;
|
|
$104 = ((($103)) + 24|0);
|
|
$105 = +HEAPF32[$104>>2];
|
|
$y1 = $105;
|
|
} else {
|
|
$106 = $xb;
|
|
$x_bottom = $106;
|
|
$107 = $y_bottom;
|
|
$y1 = $107;
|
|
}
|
|
$108 = $x_top;
|
|
$109 = $108 >= 0.0;
|
|
$110 = $x_bottom;
|
|
$111 = $110 >= 0.0;
|
|
$or$cond = $109 & $111;
|
|
if ($or$cond) {
|
|
$112 = $x_top;
|
|
$113 = $2;
|
|
$114 = (+($113|0));
|
|
$115 = $112 < $114;
|
|
if ($115) {
|
|
$116 = $x_bottom;
|
|
$117 = $2;
|
|
$118 = (+($117|0));
|
|
$119 = $116 < $118;
|
|
if ($119) {
|
|
$120 = $x_top;
|
|
$121 = (~~(($120)));
|
|
$122 = $x_bottom;
|
|
$123 = (~~(($122)));
|
|
$124 = ($121|0)==($123|0);
|
|
$125 = $x_top;
|
|
if ($124) {
|
|
$126 = (~~(($125)));
|
|
$x = $126;
|
|
$127 = $y1;
|
|
$128 = $y0;
|
|
$129 = $127 - $128;
|
|
$height = $129;
|
|
$130 = $x;
|
|
$131 = ($130|0)>=(0);
|
|
if (!($131)) {
|
|
label = 25;
|
|
break L1;
|
|
}
|
|
$132 = $x;
|
|
$133 = $2;
|
|
$134 = ($132|0)<($133|0);
|
|
if (!($134)) {
|
|
label = 25;
|
|
break L1;
|
|
}
|
|
$135 = $3;
|
|
$136 = ((($135)) + 16|0);
|
|
$137 = +HEAPF32[$136>>2];
|
|
$138 = $x_top;
|
|
$139 = $x;
|
|
$140 = (+($139|0));
|
|
$141 = $138 - $140;
|
|
$142 = $x_bottom;
|
|
$143 = $x;
|
|
$144 = (+($143|0));
|
|
$145 = $142 - $144;
|
|
$146 = $141 + $145;
|
|
$147 = $146 / 2.0;
|
|
$148 = 1.0 - $147;
|
|
$149 = $137 * $148;
|
|
$150 = $height;
|
|
$151 = $149 * $150;
|
|
$152 = $x;
|
|
$153 = $0;
|
|
$154 = (($153) + ($152<<2)|0);
|
|
$155 = +HEAPF32[$154>>2];
|
|
$156 = $155 + $151;
|
|
HEAPF32[$154>>2] = $156;
|
|
$157 = $3;
|
|
$158 = ((($157)) + 16|0);
|
|
$159 = +HEAPF32[$158>>2];
|
|
$160 = $height;
|
|
$161 = $159 * $160;
|
|
$162 = $x;
|
|
$163 = $1;
|
|
$164 = (($163) + ($162<<2)|0);
|
|
$165 = +HEAPF32[$164>>2];
|
|
$166 = $165 + $161;
|
|
HEAPF32[$164>>2] = $166;
|
|
break;
|
|
}
|
|
$167 = $x_bottom;
|
|
$168 = $125 > $167;
|
|
if ($168) {
|
|
$169 = $y_bottom;
|
|
$170 = $y0;
|
|
$171 = $4;
|
|
$172 = $170 - $171;
|
|
$173 = $169 - $172;
|
|
$y0 = $173;
|
|
$174 = $y_bottom;
|
|
$175 = $y1;
|
|
$176 = $4;
|
|
$177 = $175 - $176;
|
|
$178 = $174 - $177;
|
|
$y1 = $178;
|
|
$179 = $y0;
|
|
$t = $179;
|
|
$180 = $y1;
|
|
$y0 = $180;
|
|
$181 = $t;
|
|
$y1 = $181;
|
|
$182 = $x_bottom;
|
|
$t = $182;
|
|
$183 = $x_top;
|
|
$x_bottom = $183;
|
|
$184 = $t;
|
|
$x_top = $184;
|
|
$185 = $dx;
|
|
$186 = -$185;
|
|
$dx = $186;
|
|
$187 = $dy;
|
|
$188 = -$187;
|
|
$dy = $188;
|
|
$189 = $x01;
|
|
$t = $189;
|
|
$190 = $xb;
|
|
$x01 = $190;
|
|
$191 = $t;
|
|
$xb = $191;
|
|
}
|
|
$192 = $x_top;
|
|
$193 = (~~(($192)));
|
|
$x1 = $193;
|
|
$194 = $x_bottom;
|
|
$195 = (~~(($194)));
|
|
$x23 = $195;
|
|
$196 = $x1;
|
|
$197 = (+($196|0));
|
|
$198 = $197 + 1.0;
|
|
$199 = $x01;
|
|
$200 = $198 - $199;
|
|
$201 = $dy;
|
|
$202 = $200 * $201;
|
|
$203 = $4;
|
|
$204 = $202 + $203;
|
|
$y_crossing = $204;
|
|
$205 = $3;
|
|
$206 = ((($205)) + 16|0);
|
|
$207 = +HEAPF32[$206>>2];
|
|
$sign = $207;
|
|
$208 = $sign;
|
|
$209 = $y_crossing;
|
|
$210 = $y0;
|
|
$211 = $209 - $210;
|
|
$212 = $208 * $211;
|
|
$area = $212;
|
|
$213 = $area;
|
|
$214 = $x_top;
|
|
$215 = $x1;
|
|
$216 = (+($215|0));
|
|
$217 = $214 - $216;
|
|
$218 = $x1;
|
|
$219 = (($218) + 1)|0;
|
|
$220 = $x1;
|
|
$221 = (($219) - ($220))|0;
|
|
$222 = (+($221|0));
|
|
$223 = $217 + $222;
|
|
$224 = $223 / 2.0;
|
|
$225 = 1.0 - $224;
|
|
$226 = $213 * $225;
|
|
$227 = $x1;
|
|
$228 = $0;
|
|
$229 = (($228) + ($227<<2)|0);
|
|
$230 = +HEAPF32[$229>>2];
|
|
$231 = $230 + $226;
|
|
HEAPF32[$229>>2] = $231;
|
|
$232 = $sign;
|
|
$233 = $dy;
|
|
$234 = $232 * $233;
|
|
$step = $234;
|
|
$235 = $x1;
|
|
$236 = (($235) + 1)|0;
|
|
$x2 = $236;
|
|
while(1) {
|
|
$237 = $x2;
|
|
$238 = $x23;
|
|
$239 = ($237|0)<($238|0);
|
|
if (!($239)) {
|
|
break;
|
|
}
|
|
$240 = $area;
|
|
$241 = $step;
|
|
$242 = $241 / 2.0;
|
|
$243 = $240 + $242;
|
|
$244 = $x2;
|
|
$245 = $0;
|
|
$246 = (($245) + ($244<<2)|0);
|
|
$247 = +HEAPF32[$246>>2];
|
|
$248 = $247 + $243;
|
|
HEAPF32[$246>>2] = $248;
|
|
$249 = $step;
|
|
$250 = $area;
|
|
$251 = $250 + $249;
|
|
$area = $251;
|
|
$252 = $x2;
|
|
$253 = (($252) + 1)|0;
|
|
$x2 = $253;
|
|
}
|
|
$254 = $dy;
|
|
$255 = $x23;
|
|
$256 = $x1;
|
|
$257 = (($256) + 1)|0;
|
|
$258 = (($255) - ($257))|0;
|
|
$259 = (+($258|0));
|
|
$260 = $254 * $259;
|
|
$261 = $y_crossing;
|
|
$262 = $261 + $260;
|
|
$y_crossing = $262;
|
|
$263 = $area;
|
|
$264 = $sign;
|
|
$265 = $x23;
|
|
$266 = $x23;
|
|
$267 = (($265) - ($266))|0;
|
|
$268 = (+($267|0));
|
|
$269 = $x_bottom;
|
|
$270 = $x23;
|
|
$271 = (+($270|0));
|
|
$272 = $269 - $271;
|
|
$273 = $268 + $272;
|
|
$274 = $273 / 2.0;
|
|
$275 = 1.0 - $274;
|
|
$276 = $264 * $275;
|
|
$277 = $y1;
|
|
$278 = $y_crossing;
|
|
$279 = $277 - $278;
|
|
$280 = $276 * $279;
|
|
$281 = $263 + $280;
|
|
$282 = $x23;
|
|
$283 = $0;
|
|
$284 = (($283) + ($282<<2)|0);
|
|
$285 = +HEAPF32[$284>>2];
|
|
$286 = $285 + $281;
|
|
HEAPF32[$284>>2] = $286;
|
|
$287 = $sign;
|
|
$288 = $y1;
|
|
$289 = $y0;
|
|
$290 = $288 - $289;
|
|
$291 = $287 * $290;
|
|
$292 = $x23;
|
|
$293 = $1;
|
|
$294 = (($293) + ($292<<2)|0);
|
|
$295 = +HEAPF32[$294>>2];
|
|
$296 = $295 + $291;
|
|
HEAPF32[$294>>2] = $296;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
$x4 = 0;
|
|
while(1) {
|
|
$297 = $x4;
|
|
$298 = $2;
|
|
$299 = ($297|0)<($298|0);
|
|
if (!($299)) {
|
|
break L5;
|
|
}
|
|
$300 = $4;
|
|
$ya = $300;
|
|
$301 = $x4;
|
|
$302 = (+($301|0));
|
|
$x15 = $302;
|
|
$303 = $x4;
|
|
$304 = (($303) + 1)|0;
|
|
$305 = (+($304|0));
|
|
$x26 = $305;
|
|
$306 = $xb;
|
|
$x3 = $306;
|
|
$307 = $y_bottom;
|
|
$y3 = $307;
|
|
$308 = $x4;
|
|
$309 = (+($308|0));
|
|
$310 = $x01;
|
|
$311 = $309 - $310;
|
|
$312 = $dx;
|
|
$313 = $311 / $312;
|
|
$314 = $4;
|
|
$315 = $313 + $314;
|
|
$yb = $315;
|
|
$316 = $x4;
|
|
$317 = (+($316|0));
|
|
$318 = $317 + 1.0;
|
|
$319 = $x01;
|
|
$320 = $318 - $319;
|
|
$321 = $dx;
|
|
$322 = $320 / $321;
|
|
$323 = $4;
|
|
$324 = $322 + $323;
|
|
$y2 = $324;
|
|
$325 = $x01;
|
|
$326 = $x15;
|
|
$327 = $325 < $326;
|
|
if ($327) {
|
|
$328 = $x3;
|
|
$329 = $x26;
|
|
$330 = $328 > $329;
|
|
if ($330) {
|
|
$331 = $0;
|
|
$332 = $x4;
|
|
$333 = $3;
|
|
$334 = $x01;
|
|
$335 = $ya;
|
|
$336 = $x15;
|
|
$337 = $yb;
|
|
_nk_tt__handle_clipped_edge($331,$332,$333,$334,$335,$336,$337);
|
|
$338 = $0;
|
|
$339 = $x4;
|
|
$340 = $3;
|
|
$341 = $x15;
|
|
$342 = $yb;
|
|
$343 = $x26;
|
|
$344 = $y2;
|
|
_nk_tt__handle_clipped_edge($338,$339,$340,$341,$342,$343,$344);
|
|
$345 = $0;
|
|
$346 = $x4;
|
|
$347 = $3;
|
|
$348 = $x26;
|
|
$349 = $y2;
|
|
$350 = $x3;
|
|
$351 = $y3;
|
|
_nk_tt__handle_clipped_edge($345,$346,$347,$348,$349,$350,$351);
|
|
} else {
|
|
label = 38;
|
|
}
|
|
} else {
|
|
label = 38;
|
|
}
|
|
L45: do {
|
|
if ((label|0) == 38) {
|
|
label = 0;
|
|
$352 = $x3;
|
|
$353 = $x15;
|
|
$354 = $352 < $353;
|
|
if ($354) {
|
|
$355 = $x01;
|
|
$356 = $x26;
|
|
$357 = $355 > $356;
|
|
if ($357) {
|
|
$358 = $0;
|
|
$359 = $x4;
|
|
$360 = $3;
|
|
$361 = $x01;
|
|
$362 = $ya;
|
|
$363 = $x26;
|
|
$364 = $y2;
|
|
_nk_tt__handle_clipped_edge($358,$359,$360,$361,$362,$363,$364);
|
|
$365 = $0;
|
|
$366 = $x4;
|
|
$367 = $3;
|
|
$368 = $x26;
|
|
$369 = $y2;
|
|
$370 = $x15;
|
|
$371 = $yb;
|
|
_nk_tt__handle_clipped_edge($365,$366,$367,$368,$369,$370,$371);
|
|
$372 = $0;
|
|
$373 = $x4;
|
|
$374 = $3;
|
|
$375 = $x15;
|
|
$376 = $yb;
|
|
$377 = $x3;
|
|
$378 = $y3;
|
|
_nk_tt__handle_clipped_edge($372,$373,$374,$375,$376,$377,$378);
|
|
break;
|
|
}
|
|
}
|
|
$379 = $x01;
|
|
$380 = $x15;
|
|
$381 = $379 < $380;
|
|
if ($381) {
|
|
$382 = $x3;
|
|
$383 = $x15;
|
|
$384 = $382 > $383;
|
|
if ($384) {
|
|
$385 = $0;
|
|
$386 = $x4;
|
|
$387 = $3;
|
|
$388 = $x01;
|
|
$389 = $ya;
|
|
$390 = $x15;
|
|
$391 = $yb;
|
|
_nk_tt__handle_clipped_edge($385,$386,$387,$388,$389,$390,$391);
|
|
$392 = $0;
|
|
$393 = $x4;
|
|
$394 = $3;
|
|
$395 = $x15;
|
|
$396 = $yb;
|
|
$397 = $x3;
|
|
$398 = $y3;
|
|
_nk_tt__handle_clipped_edge($392,$393,$394,$395,$396,$397,$398);
|
|
break;
|
|
}
|
|
}
|
|
$399 = $x3;
|
|
$400 = $x15;
|
|
$401 = $399 < $400;
|
|
if ($401) {
|
|
$402 = $x01;
|
|
$403 = $x15;
|
|
$404 = $402 > $403;
|
|
if ($404) {
|
|
$405 = $0;
|
|
$406 = $x4;
|
|
$407 = $3;
|
|
$408 = $x01;
|
|
$409 = $ya;
|
|
$410 = $x15;
|
|
$411 = $yb;
|
|
_nk_tt__handle_clipped_edge($405,$406,$407,$408,$409,$410,$411);
|
|
$412 = $0;
|
|
$413 = $x4;
|
|
$414 = $3;
|
|
$415 = $x15;
|
|
$416 = $yb;
|
|
$417 = $x3;
|
|
$418 = $y3;
|
|
_nk_tt__handle_clipped_edge($412,$413,$414,$415,$416,$417,$418);
|
|
break;
|
|
}
|
|
}
|
|
$419 = $x01;
|
|
$420 = $x26;
|
|
$421 = $419 < $420;
|
|
if ($421) {
|
|
$422 = $x3;
|
|
$423 = $x26;
|
|
$424 = $422 > $423;
|
|
if ($424) {
|
|
$425 = $0;
|
|
$426 = $x4;
|
|
$427 = $3;
|
|
$428 = $x01;
|
|
$429 = $ya;
|
|
$430 = $x26;
|
|
$431 = $y2;
|
|
_nk_tt__handle_clipped_edge($425,$426,$427,$428,$429,$430,$431);
|
|
$432 = $0;
|
|
$433 = $x4;
|
|
$434 = $3;
|
|
$435 = $x26;
|
|
$436 = $y2;
|
|
$437 = $x3;
|
|
$438 = $y3;
|
|
_nk_tt__handle_clipped_edge($432,$433,$434,$435,$436,$437,$438);
|
|
break;
|
|
}
|
|
}
|
|
$439 = $x3;
|
|
$440 = $x26;
|
|
$441 = $439 < $440;
|
|
do {
|
|
if ($441) {
|
|
$442 = $x01;
|
|
$443 = $x26;
|
|
$444 = $442 > $443;
|
|
if (!($444)) {
|
|
break;
|
|
}
|
|
$445 = $0;
|
|
$446 = $x4;
|
|
$447 = $3;
|
|
$448 = $x01;
|
|
$449 = $ya;
|
|
$450 = $x26;
|
|
$451 = $y2;
|
|
_nk_tt__handle_clipped_edge($445,$446,$447,$448,$449,$450,$451);
|
|
$452 = $0;
|
|
$453 = $x4;
|
|
$454 = $3;
|
|
$455 = $x26;
|
|
$456 = $y2;
|
|
$457 = $x3;
|
|
$458 = $y3;
|
|
_nk_tt__handle_clipped_edge($452,$453,$454,$455,$456,$457,$458);
|
|
break L45;
|
|
}
|
|
} while(0);
|
|
$459 = $0;
|
|
$460 = $x4;
|
|
$461 = $3;
|
|
$462 = $x01;
|
|
$463 = $ya;
|
|
$464 = $x3;
|
|
$465 = $y3;
|
|
_nk_tt__handle_clipped_edge($459,$460,$461,$462,$463,$464,$465);
|
|
}
|
|
} while(0);
|
|
$466 = $x4;
|
|
$467 = (($466) + 1)|0;
|
|
$x4 = $467;
|
|
}
|
|
}
|
|
} while(0);
|
|
$468 = $3;
|
|
$469 = HEAP32[$468>>2]|0;
|
|
$3 = $469;
|
|
}
|
|
if ((label|0) == 4) {
|
|
___assert_fail((30688|0),(13400|0),7779,(30703|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 12) {
|
|
___assert_fail((30732|0),(13400|0),7797,(30703|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 25) {
|
|
___assert_fail((30768|0),(13400|0),7826,(30703|0));
|
|
// unreachable;
|
|
}
|
|
else if ((label|0) == 56) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_tt__hheap_cleanup($hh) {
|
|
$hh = $hh|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, $n = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 12|0;
|
|
$0 = $hh;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 12|0);
|
|
$3 = HEAP32[$2>>2]|0;
|
|
$c = $3;
|
|
while(1) {
|
|
$4 = $c;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
break;
|
|
}
|
|
$6 = $c;
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$n = $7;
|
|
$8 = $0;
|
|
$9 = ((($8)) + 8|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = $0;
|
|
$12 = $c;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$11>>2]|0;
|
|
FUNCTION_TABLE_vii[$10 & 31]($$byval_copy,$12);
|
|
$13 = $n;
|
|
$c = $13;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_tt__hheap_alloc($hh,$size) {
|
|
$hh = $hh|0;
|
|
$size = $size|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
|
|
var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
|
|
var $c = 0, $count = 0, $p = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 24|0;
|
|
$1 = $hh;
|
|
$2 = $size;
|
|
$3 = $1;
|
|
$4 = ((($3)) + 16|0);
|
|
$5 = HEAP32[$4>>2]|0;
|
|
$6 = ($5|0)!=(0|0);
|
|
$7 = $1;
|
|
if ($6) {
|
|
$8 = ((($7)) + 16|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$p = $9;
|
|
$10 = $p;
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = $1;
|
|
$13 = ((($12)) + 16|0);
|
|
HEAP32[$13>>2] = $11;
|
|
$14 = $p;
|
|
$0 = $14;
|
|
$58 = $0;
|
|
STACKTOP = sp;return ($58|0);
|
|
}
|
|
$15 = ((($7)) + 20|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = ($16|0)==(0);
|
|
do {
|
|
if ($17) {
|
|
$18 = $2;
|
|
$19 = ($18>>>0)<(32);
|
|
if ($19) {
|
|
$23 = 2000;
|
|
} else {
|
|
$20 = $2;
|
|
$21 = ($20>>>0)<(128);
|
|
$22 = $21 ? 800 : 100;
|
|
$23 = $22;
|
|
}
|
|
$count = $23;
|
|
$24 = $1;
|
|
$25 = ((($24)) + 4|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$27 = $1;
|
|
$28 = $2;
|
|
$29 = $count;
|
|
$30 = Math_imul($28, $29)|0;
|
|
$31 = (4 + ($30))|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$27>>2]|0;
|
|
$32 = (FUNCTION_TABLE_iiii[$26 & 7]($$byval_copy,0,$31)|0);
|
|
$c = $32;
|
|
$33 = $c;
|
|
$34 = ($33|0)==(0|0);
|
|
if (!($34)) {
|
|
$35 = $1;
|
|
$36 = ((($35)) + 12|0);
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$38 = $c;
|
|
HEAP32[$38>>2] = $37;
|
|
$39 = $c;
|
|
$40 = $1;
|
|
$41 = ((($40)) + 12|0);
|
|
HEAP32[$41>>2] = $39;
|
|
$42 = $count;
|
|
$43 = $1;
|
|
$44 = ((($43)) + 20|0);
|
|
HEAP32[$44>>2] = $42;
|
|
break;
|
|
}
|
|
$0 = 0;
|
|
$58 = $0;
|
|
STACKTOP = sp;return ($58|0);
|
|
}
|
|
} while(0);
|
|
$45 = $1;
|
|
$46 = ((($45)) + 20|0);
|
|
$47 = HEAP32[$46>>2]|0;
|
|
$48 = (($47) + -1)|0;
|
|
HEAP32[$46>>2] = $48;
|
|
$49 = $1;
|
|
$50 = ((($49)) + 12|0);
|
|
$51 = HEAP32[$50>>2]|0;
|
|
$52 = $2;
|
|
$53 = $1;
|
|
$54 = ((($53)) + 20|0);
|
|
$55 = HEAP32[$54>>2]|0;
|
|
$56 = Math_imul($52, $55)|0;
|
|
$57 = (($51) + ($56)|0);
|
|
$0 = $57;
|
|
$58 = $0;
|
|
STACKTOP = sp;return ($58|0);
|
|
}
|
|
function _nk_tt__handle_clipped_edge($scanline,$x,$e,$x0,$y0,$x1,$y1) {
|
|
$scanline = $scanline|0;
|
|
$x = $x|0;
|
|
$e = $e|0;
|
|
$x0 = +$x0;
|
|
$y0 = +$y0;
|
|
$x1 = +$x1;
|
|
$y1 = +$y1;
|
|
var $0 = 0, $1 = 0, $10 = 0.0, $100 = 0.0, $101 = 0, $102 = 0.0, $103 = 0, $104 = 0, $105 = 0.0, $106 = 0, $107 = 0.0, $108 = 0, $109 = 0, $11 = 0.0, $110 = 0.0, $111 = 0, $112 = 0.0, $113 = 0, $114 = 0.0, $115 = 0;
|
|
var $116 = 0, $117 = 0.0, $118 = 0, $119 = 0.0, $12 = 0, $120 = 0, $121 = 0.0, $122 = 0, $123 = 0.0, $124 = 0, $125 = 0.0, $126 = 0, $127 = 0, $128 = 0, $129 = 0.0, $13 = 0, $130 = 0.0, $131 = 0.0, $132 = 0.0, $133 = 0.0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0, $141 = 0, $142 = 0.0, $143 = 0, $144 = 0.0, $145 = 0, $146 = 0, $147 = 0.0, $148 = 0, $149 = 0.0, $15 = 0.0, $150 = 0, $151 = 0.0;
|
|
var $152 = 0, $153 = 0.0, $154 = 0, $155 = 0, $156 = 0.0, $157 = 0, $158 = 0.0, $159 = 0, $16 = 0, $160 = 0.0, $161 = 0, $162 = 0.0, $163 = 0, $164 = 0, $165 = 0.0, $166 = 0, $167 = 0, $168 = 0, $169 = 0.0, $17 = 0;
|
|
var $170 = 0.0, $171 = 0.0, $172 = 0.0, $173 = 0.0, $174 = 0.0, $175 = 0, $176 = 0.0, $177 = 0.0, $178 = 0.0, $179 = 0, $18 = 0.0, $180 = 0.0, $181 = 0.0, $182 = 0.0, $183 = 0.0, $184 = 0.0, $185 = 0.0, $186 = 0, $187 = 0, $188 = 0;
|
|
var $189 = 0.0, $19 = 0, $190 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0.0, $29 = 0, $3 = 0.0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0;
|
|
var $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0, $51 = 0, $52 = 0.0;
|
|
var $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0, $58 = 0.0, $59 = 0.0, $6 = 0.0, $60 = 0.0, $61 = 0, $62 = 0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0.0, $70 = 0.0;
|
|
var $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0.0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0.0, $80 = 0.0, $81 = 0, $82 = 0, $83 = 0.0, $84 = 0, $85 = 0.0, $86 = 0, $87 = 0, $88 = 0.0, $89 = 0;
|
|
var $9 = 0, $90 = 0.0, $91 = 0, $92 = 0.0, $93 = 0, $94 = 0.0, $95 = 0, $96 = 0.0, $97 = 0, $98 = 0.0, $99 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $scanline;
|
|
$1 = $x;
|
|
$2 = $e;
|
|
$3 = $x0;
|
|
$4 = $y0;
|
|
$5 = $x1;
|
|
$6 = $y1;
|
|
$7 = $4;
|
|
$8 = $6;
|
|
$9 = $7 == $8;
|
|
if ($9) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$10 = $4;
|
|
$11 = $6;
|
|
$12 = $10 < $11;
|
|
if (!($12)) {
|
|
___assert_fail((30786|0),(13400|0),7741,(30794|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $2;
|
|
$14 = ((($13)) + 20|0);
|
|
$15 = +HEAPF32[$14>>2];
|
|
$16 = $2;
|
|
$17 = ((($16)) + 24|0);
|
|
$18 = +HEAPF32[$17>>2];
|
|
$19 = $15 <= $18;
|
|
if (!($19)) {
|
|
___assert_fail((30821|0),(13400|0),7742,(30794|0));
|
|
// unreachable;
|
|
}
|
|
$20 = $4;
|
|
$21 = $2;
|
|
$22 = ((($21)) + 24|0);
|
|
$23 = +HEAPF32[$22>>2];
|
|
$24 = $20 > $23;
|
|
if ($24) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$25 = $6;
|
|
$26 = $2;
|
|
$27 = ((($26)) + 20|0);
|
|
$28 = +HEAPF32[$27>>2];
|
|
$29 = $25 < $28;
|
|
if ($29) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$30 = $4;
|
|
$31 = $2;
|
|
$32 = ((($31)) + 20|0);
|
|
$33 = +HEAPF32[$32>>2];
|
|
$34 = $30 < $33;
|
|
if ($34) {
|
|
$35 = $5;
|
|
$36 = $3;
|
|
$37 = $35 - $36;
|
|
$38 = $2;
|
|
$39 = ((($38)) + 20|0);
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = $4;
|
|
$42 = $40 - $41;
|
|
$43 = $37 * $42;
|
|
$44 = $6;
|
|
$45 = $4;
|
|
$46 = $44 - $45;
|
|
$47 = $43 / $46;
|
|
$48 = $3;
|
|
$49 = $48 + $47;
|
|
$3 = $49;
|
|
$50 = $2;
|
|
$51 = ((($50)) + 20|0);
|
|
$52 = +HEAPF32[$51>>2];
|
|
$4 = $52;
|
|
}
|
|
$53 = $6;
|
|
$54 = $2;
|
|
$55 = ((($54)) + 24|0);
|
|
$56 = +HEAPF32[$55>>2];
|
|
$57 = $53 > $56;
|
|
if ($57) {
|
|
$58 = $5;
|
|
$59 = $3;
|
|
$60 = $58 - $59;
|
|
$61 = $2;
|
|
$62 = ((($61)) + 24|0);
|
|
$63 = +HEAPF32[$62>>2];
|
|
$64 = $6;
|
|
$65 = $63 - $64;
|
|
$66 = $60 * $65;
|
|
$67 = $6;
|
|
$68 = $4;
|
|
$69 = $67 - $68;
|
|
$70 = $66 / $69;
|
|
$71 = $5;
|
|
$72 = $71 + $70;
|
|
$5 = $72;
|
|
$73 = $2;
|
|
$74 = ((($73)) + 24|0);
|
|
$75 = +HEAPF32[$74>>2];
|
|
$6 = $75;
|
|
}
|
|
$76 = $3;
|
|
$77 = $1;
|
|
$78 = (+($77|0));
|
|
$79 = $76 == $78;
|
|
do {
|
|
if ($79) {
|
|
$80 = $5;
|
|
$81 = $1;
|
|
$82 = (($81) + 1)|0;
|
|
$83 = (+($82|0));
|
|
$84 = $80 <= $83;
|
|
if ($84) {
|
|
break;
|
|
} else {
|
|
___assert_fail((30836|0),(13400|0),7754,(30794|0));
|
|
// unreachable;
|
|
}
|
|
} else {
|
|
$85 = $3;
|
|
$86 = $1;
|
|
$87 = (($86) + 1)|0;
|
|
$88 = (+($87|0));
|
|
$89 = $85 == $88;
|
|
if ($89) {
|
|
$90 = $5;
|
|
$91 = $1;
|
|
$92 = (+($91|0));
|
|
$93 = $90 >= $92;
|
|
if ($93) {
|
|
break;
|
|
} else {
|
|
___assert_fail((30846|0),(13400|0),7755,(30794|0));
|
|
// unreachable;
|
|
}
|
|
}
|
|
$94 = $3;
|
|
$95 = $1;
|
|
$96 = (+($95|0));
|
|
$97 = $94 <= $96;
|
|
if ($97) {
|
|
$98 = $5;
|
|
$99 = $1;
|
|
$100 = (+($99|0));
|
|
$101 = $98 <= $100;
|
|
if ($101) {
|
|
break;
|
|
} else {
|
|
___assert_fail((30854|0),(13400|0),7756,(30794|0));
|
|
// unreachable;
|
|
}
|
|
}
|
|
$102 = $3;
|
|
$103 = $1;
|
|
$104 = (($103) + 1)|0;
|
|
$105 = (+($104|0));
|
|
$106 = $102 >= $105;
|
|
$107 = $5;
|
|
$108 = $1;
|
|
if ($106) {
|
|
$109 = (($108) + 1)|0;
|
|
$110 = (+($109|0));
|
|
$111 = $107 >= $110;
|
|
if ($111) {
|
|
break;
|
|
} else {
|
|
___assert_fail((30862|0),(13400|0),7757,(30794|0));
|
|
// unreachable;
|
|
}
|
|
}
|
|
$112 = (+($108|0));
|
|
$113 = $107 >= $112;
|
|
if (!($113)) {
|
|
___assert_fail((30872|0),(13400|0),7758,(30794|0));
|
|
// unreachable;
|
|
}
|
|
$114 = $5;
|
|
$115 = $1;
|
|
$116 = (($115) + 1)|0;
|
|
$117 = (+($116|0));
|
|
$118 = $114 <= $117;
|
|
if ($118) {
|
|
break;
|
|
} else {
|
|
___assert_fail((30872|0),(13400|0),7758,(30794|0));
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$119 = $3;
|
|
$120 = $1;
|
|
$121 = (+($120|0));
|
|
$122 = $119 <= $121;
|
|
if ($122) {
|
|
$123 = $5;
|
|
$124 = $1;
|
|
$125 = (+($124|0));
|
|
$126 = $123 <= $125;
|
|
if ($126) {
|
|
$127 = $2;
|
|
$128 = ((($127)) + 16|0);
|
|
$129 = +HEAPF32[$128>>2];
|
|
$130 = $6;
|
|
$131 = $4;
|
|
$132 = $130 - $131;
|
|
$133 = $129 * $132;
|
|
$134 = $1;
|
|
$135 = $0;
|
|
$136 = (($135) + ($134<<2)|0);
|
|
$137 = +HEAPF32[$136>>2];
|
|
$138 = $137 + $133;
|
|
HEAPF32[$136>>2] = $138;
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
$139 = $3;
|
|
$140 = $1;
|
|
$141 = (($140) + 1)|0;
|
|
$142 = (+($141|0));
|
|
$143 = $139 >= $142;
|
|
if ($143) {
|
|
$144 = $5;
|
|
$145 = $1;
|
|
$146 = (($145) + 1)|0;
|
|
$147 = (+($146|0));
|
|
$148 = $144 >= $147;
|
|
if ($148) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
$149 = $3;
|
|
$150 = $1;
|
|
$151 = (+($150|0));
|
|
$152 = $149 >= $151;
|
|
if (!($152)) {
|
|
___assert_fail((30893|0),(13400|0),7764,(30794|0));
|
|
// unreachable;
|
|
}
|
|
$153 = $3;
|
|
$154 = $1;
|
|
$155 = (($154) + 1)|0;
|
|
$156 = (+($155|0));
|
|
$157 = $153 <= $156;
|
|
if (!($157)) {
|
|
___assert_fail((30893|0),(13400|0),7764,(30794|0));
|
|
// unreachable;
|
|
}
|
|
$158 = $5;
|
|
$159 = $1;
|
|
$160 = (+($159|0));
|
|
$161 = $158 >= $160;
|
|
if (!($161)) {
|
|
___assert_fail((30893|0),(13400|0),7764,(30794|0));
|
|
// unreachable;
|
|
}
|
|
$162 = $5;
|
|
$163 = $1;
|
|
$164 = (($163) + 1)|0;
|
|
$165 = (+($164|0));
|
|
$166 = $162 <= $165;
|
|
if (!($166)) {
|
|
___assert_fail((30893|0),(13400|0),7764,(30794|0));
|
|
// unreachable;
|
|
}
|
|
$167 = $2;
|
|
$168 = ((($167)) + 16|0);
|
|
$169 = +HEAPF32[$168>>2];
|
|
$170 = $6;
|
|
$171 = $4;
|
|
$172 = $170 - $171;
|
|
$173 = $169 * $172;
|
|
$174 = $3;
|
|
$175 = $1;
|
|
$176 = (+($175|0));
|
|
$177 = $174 - $176;
|
|
$178 = $5;
|
|
$179 = $1;
|
|
$180 = (+($179|0));
|
|
$181 = $178 - $180;
|
|
$182 = $177 + $181;
|
|
$183 = $182 / 2.0;
|
|
$184 = 1.0 - $183;
|
|
$185 = $173 * $184;
|
|
$186 = $1;
|
|
$187 = $0;
|
|
$188 = (($187) + ($186<<2)|0);
|
|
$189 = +HEAPF32[$188>>2];
|
|
$190 = $189 + $185;
|
|
HEAPF32[$188>>2] = $190;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_decompress_token($i) {
|
|
$i = $i|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
|
|
var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
|
|
var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
|
|
var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
|
|
var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0;
|
|
var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $26 = 0, $27 = 0, $28 = 0;
|
|
var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0;
|
|
var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0;
|
|
var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0;
|
|
var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $i;
|
|
$1 = $0;
|
|
$2 = HEAP8[$1>>0]|0;
|
|
$3 = $2&255;
|
|
$4 = ($3|0)>=(32);
|
|
$5 = $0;
|
|
$6 = HEAP8[$5>>0]|0;
|
|
$7 = $6&255;
|
|
if ($4) {
|
|
$8 = ($7|0)>=(128);
|
|
if ($8) {
|
|
$9 = HEAP32[12604>>2]|0;
|
|
$10 = $0;
|
|
$11 = ((($10)) + 1|0);
|
|
$12 = HEAP8[$11>>0]|0;
|
|
$13 = $12&255;
|
|
$14 = (0 - ($13))|0;
|
|
$15 = (($9) + ($14)|0);
|
|
$16 = ((($15)) + -1|0);
|
|
$17 = $0;
|
|
$18 = HEAP8[$17>>0]|0;
|
|
$19 = $18&255;
|
|
$20 = (($19) - 128)|0;
|
|
$21 = (($20) + 1)|0;
|
|
_nk__match($16,$21);
|
|
$22 = $0;
|
|
$23 = ((($22)) + 2|0);
|
|
$0 = $23;
|
|
$257 = $0;
|
|
STACKTOP = sp;return ($257|0);
|
|
}
|
|
$24 = $0;
|
|
$25 = HEAP8[$24>>0]|0;
|
|
$26 = $25&255;
|
|
$27 = ($26|0)>=(64);
|
|
if ($27) {
|
|
$28 = HEAP32[12604>>2]|0;
|
|
$29 = $0;
|
|
$30 = HEAP8[$29>>0]|0;
|
|
$31 = $30&255;
|
|
$32 = $31 << 8;
|
|
$33 = $0;
|
|
$34 = ((($33)) + 1|0);
|
|
$35 = HEAP8[$34>>0]|0;
|
|
$36 = $35&255;
|
|
$37 = (($32) + ($36))|0;
|
|
$38 = (($37) - 16384)|0;
|
|
$39 = (($38) + 1)|0;
|
|
$40 = (0 - ($39))|0;
|
|
$41 = (($28) + ($40)|0);
|
|
$42 = $0;
|
|
$43 = ((($42)) + 2|0);
|
|
$44 = HEAP8[$43>>0]|0;
|
|
$45 = $44&255;
|
|
$46 = (($45) + 1)|0;
|
|
_nk__match($41,$46);
|
|
$47 = $0;
|
|
$48 = ((($47)) + 3|0);
|
|
$0 = $48;
|
|
$257 = $0;
|
|
STACKTOP = sp;return ($257|0);
|
|
} else {
|
|
$49 = $0;
|
|
$50 = ((($49)) + 1|0);
|
|
$51 = $0;
|
|
$52 = HEAP8[$51>>0]|0;
|
|
$53 = $52&255;
|
|
$54 = (($53) - 32)|0;
|
|
$55 = (($54) + 1)|0;
|
|
_nk__lit($50,$55);
|
|
$56 = $0;
|
|
$57 = HEAP8[$56>>0]|0;
|
|
$58 = $57&255;
|
|
$59 = (($58) - 32)|0;
|
|
$60 = (($59) + 1)|0;
|
|
$61 = (1 + ($60))|0;
|
|
$62 = $0;
|
|
$63 = (($62) + ($61)|0);
|
|
$0 = $63;
|
|
$257 = $0;
|
|
STACKTOP = sp;return ($257|0);
|
|
}
|
|
}
|
|
$64 = ($7|0)>=(24);
|
|
if ($64) {
|
|
$65 = HEAP32[12604>>2]|0;
|
|
$66 = $0;
|
|
$67 = HEAP8[$66>>0]|0;
|
|
$68 = $67&255;
|
|
$69 = $68 << 16;
|
|
$70 = $0;
|
|
$71 = ((($70)) + 1|0);
|
|
$72 = HEAP8[$71>>0]|0;
|
|
$73 = $72&255;
|
|
$74 = $73 << 8;
|
|
$75 = $0;
|
|
$76 = ((($75)) + 2|0);
|
|
$77 = HEAP8[$76>>0]|0;
|
|
$78 = $77&255;
|
|
$79 = (($74) + ($78))|0;
|
|
$80 = (($69) + ($79))|0;
|
|
$81 = (($80) - 1572864)|0;
|
|
$82 = (($81) + 1)|0;
|
|
$83 = (0 - ($82))|0;
|
|
$84 = (($65) + ($83)|0);
|
|
$85 = $0;
|
|
$86 = ((($85)) + 3|0);
|
|
$87 = HEAP8[$86>>0]|0;
|
|
$88 = $87&255;
|
|
$89 = (($88) + 1)|0;
|
|
_nk__match($84,$89);
|
|
$90 = $0;
|
|
$91 = ((($90)) + 4|0);
|
|
$0 = $91;
|
|
$257 = $0;
|
|
STACKTOP = sp;return ($257|0);
|
|
}
|
|
$92 = $0;
|
|
$93 = HEAP8[$92>>0]|0;
|
|
$94 = $93&255;
|
|
$95 = ($94|0)>=(16);
|
|
if ($95) {
|
|
$96 = HEAP32[12604>>2]|0;
|
|
$97 = $0;
|
|
$98 = HEAP8[$97>>0]|0;
|
|
$99 = $98&255;
|
|
$100 = $99 << 16;
|
|
$101 = $0;
|
|
$102 = ((($101)) + 1|0);
|
|
$103 = HEAP8[$102>>0]|0;
|
|
$104 = $103&255;
|
|
$105 = $104 << 8;
|
|
$106 = $0;
|
|
$107 = ((($106)) + 2|0);
|
|
$108 = HEAP8[$107>>0]|0;
|
|
$109 = $108&255;
|
|
$110 = (($105) + ($109))|0;
|
|
$111 = (($100) + ($110))|0;
|
|
$112 = (($111) - 1048576)|0;
|
|
$113 = (($112) + 1)|0;
|
|
$114 = (0 - ($113))|0;
|
|
$115 = (($96) + ($114)|0);
|
|
$116 = $0;
|
|
$117 = ((($116)) + 3|0);
|
|
$118 = HEAP8[$117>>0]|0;
|
|
$119 = $118&255;
|
|
$120 = $119 << 8;
|
|
$121 = $0;
|
|
$122 = ((($121)) + 4|0);
|
|
$123 = HEAP8[$122>>0]|0;
|
|
$124 = $123&255;
|
|
$125 = (($120) + ($124))|0;
|
|
$126 = (($125) + 1)|0;
|
|
_nk__match($115,$126);
|
|
$127 = $0;
|
|
$128 = ((($127)) + 5|0);
|
|
$0 = $128;
|
|
$257 = $0;
|
|
STACKTOP = sp;return ($257|0);
|
|
}
|
|
$129 = $0;
|
|
$130 = HEAP8[$129>>0]|0;
|
|
$131 = $130&255;
|
|
$132 = ($131|0)>=(8);
|
|
$133 = $0;
|
|
if ($132) {
|
|
$134 = ((($133)) + 2|0);
|
|
$135 = $0;
|
|
$136 = HEAP8[$135>>0]|0;
|
|
$137 = $136&255;
|
|
$138 = $137 << 8;
|
|
$139 = $0;
|
|
$140 = ((($139)) + 1|0);
|
|
$141 = HEAP8[$140>>0]|0;
|
|
$142 = $141&255;
|
|
$143 = (($138) + ($142))|0;
|
|
$144 = (($143) - 2048)|0;
|
|
$145 = (($144) + 1)|0;
|
|
_nk__lit($134,$145);
|
|
$146 = $0;
|
|
$147 = HEAP8[$146>>0]|0;
|
|
$148 = $147&255;
|
|
$149 = $148 << 8;
|
|
$150 = $0;
|
|
$151 = ((($150)) + 1|0);
|
|
$152 = HEAP8[$151>>0]|0;
|
|
$153 = $152&255;
|
|
$154 = (($149) + ($153))|0;
|
|
$155 = (($154) - 2048)|0;
|
|
$156 = (($155) + 1)|0;
|
|
$157 = (2 + ($156))|0;
|
|
$158 = $0;
|
|
$159 = (($158) + ($157)|0);
|
|
$0 = $159;
|
|
$257 = $0;
|
|
STACKTOP = sp;return ($257|0);
|
|
}
|
|
$160 = HEAP8[$133>>0]|0;
|
|
$161 = $160&255;
|
|
$162 = ($161|0)==(7);
|
|
$163 = $0;
|
|
if ($162) {
|
|
$164 = ((($163)) + 3|0);
|
|
$165 = $0;
|
|
$166 = ((($165)) + 1|0);
|
|
$167 = HEAP8[$166>>0]|0;
|
|
$168 = $167&255;
|
|
$169 = $168 << 8;
|
|
$170 = $0;
|
|
$171 = ((($170)) + 2|0);
|
|
$172 = HEAP8[$171>>0]|0;
|
|
$173 = $172&255;
|
|
$174 = (($169) + ($173))|0;
|
|
$175 = (($174) + 1)|0;
|
|
_nk__lit($164,$175);
|
|
$176 = $0;
|
|
$177 = ((($176)) + 1|0);
|
|
$178 = HEAP8[$177>>0]|0;
|
|
$179 = $178&255;
|
|
$180 = $179 << 8;
|
|
$181 = $0;
|
|
$182 = ((($181)) + 2|0);
|
|
$183 = HEAP8[$182>>0]|0;
|
|
$184 = $183&255;
|
|
$185 = (($180) + ($184))|0;
|
|
$186 = (($185) + 1)|0;
|
|
$187 = (3 + ($186))|0;
|
|
$188 = $0;
|
|
$189 = (($188) + ($187)|0);
|
|
$0 = $189;
|
|
$257 = $0;
|
|
STACKTOP = sp;return ($257|0);
|
|
}
|
|
$190 = HEAP8[$163>>0]|0;
|
|
$191 = $190&255;
|
|
$192 = ($191|0)==(6);
|
|
if ($192) {
|
|
$193 = HEAP32[12604>>2]|0;
|
|
$194 = $0;
|
|
$195 = ((($194)) + 1|0);
|
|
$196 = HEAP8[$195>>0]|0;
|
|
$197 = $196&255;
|
|
$198 = $197 << 16;
|
|
$199 = $0;
|
|
$200 = ((($199)) + 2|0);
|
|
$201 = HEAP8[$200>>0]|0;
|
|
$202 = $201&255;
|
|
$203 = $202 << 8;
|
|
$204 = $0;
|
|
$205 = ((($204)) + 3|0);
|
|
$206 = HEAP8[$205>>0]|0;
|
|
$207 = $206&255;
|
|
$208 = (($203) + ($207))|0;
|
|
$209 = (($198) + ($208))|0;
|
|
$210 = (($209) + 1)|0;
|
|
$211 = (0 - ($210))|0;
|
|
$212 = (($193) + ($211)|0);
|
|
$213 = $0;
|
|
$214 = ((($213)) + 4|0);
|
|
$215 = HEAP8[$214>>0]|0;
|
|
$216 = $215&255;
|
|
$217 = (($216) + 1)|0;
|
|
_nk__match($212,$217);
|
|
$218 = $0;
|
|
$219 = ((($218)) + 5|0);
|
|
$0 = $219;
|
|
$257 = $0;
|
|
STACKTOP = sp;return ($257|0);
|
|
}
|
|
$220 = $0;
|
|
$221 = HEAP8[$220>>0]|0;
|
|
$222 = $221&255;
|
|
$223 = ($222|0)==(4);
|
|
if (!($223)) {
|
|
$257 = $0;
|
|
STACKTOP = sp;return ($257|0);
|
|
}
|
|
$224 = HEAP32[12604>>2]|0;
|
|
$225 = $0;
|
|
$226 = ((($225)) + 1|0);
|
|
$227 = HEAP8[$226>>0]|0;
|
|
$228 = $227&255;
|
|
$229 = $228 << 16;
|
|
$230 = $0;
|
|
$231 = ((($230)) + 2|0);
|
|
$232 = HEAP8[$231>>0]|0;
|
|
$233 = $232&255;
|
|
$234 = $233 << 8;
|
|
$235 = $0;
|
|
$236 = ((($235)) + 3|0);
|
|
$237 = HEAP8[$236>>0]|0;
|
|
$238 = $237&255;
|
|
$239 = (($234) + ($238))|0;
|
|
$240 = (($229) + ($239))|0;
|
|
$241 = (($240) + 1)|0;
|
|
$242 = (0 - ($241))|0;
|
|
$243 = (($224) + ($242)|0);
|
|
$244 = $0;
|
|
$245 = ((($244)) + 4|0);
|
|
$246 = HEAP8[$245>>0]|0;
|
|
$247 = $246&255;
|
|
$248 = $247 << 8;
|
|
$249 = $0;
|
|
$250 = ((($249)) + 5|0);
|
|
$251 = HEAP8[$250>>0]|0;
|
|
$252 = $251&255;
|
|
$253 = (($248) + ($252))|0;
|
|
$254 = (($253) + 1)|0;
|
|
_nk__match($243,$254);
|
|
$255 = $0;
|
|
$256 = ((($255)) + 6|0);
|
|
$0 = $256;
|
|
$257 = $0;
|
|
STACKTOP = sp;return ($257|0);
|
|
}
|
|
function _nk_adler32($adler32,$buffer,$buflen) {
|
|
$adler32 = $adler32|0;
|
|
$buffer = $buffer|0;
|
|
$buflen = $buflen|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $12 = 0;
|
|
var $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0;
|
|
var $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0;
|
|
var $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0;
|
|
var $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0;
|
|
var $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $ADLER_MOD = 0, $blocklen = 0, $i = 0, $s1 = 0, $s2 = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $adler32;
|
|
$1 = $buffer;
|
|
$2 = $buflen;
|
|
$ADLER_MOD = 65521;
|
|
$3 = $0;
|
|
$4 = $3 & 65535;
|
|
$s1 = $4;
|
|
$5 = $0;
|
|
$6 = $5 >>> 16;
|
|
$s2 = $6;
|
|
$7 = $2;
|
|
$8 = (($7>>>0) % 5552)&-1;
|
|
$blocklen = $8;
|
|
while(1) {
|
|
$9 = $2;
|
|
$10 = ($9|0)!=(0);
|
|
if (!($10)) {
|
|
break;
|
|
}
|
|
$i = 0;
|
|
while(1) {
|
|
$11 = $i;
|
|
$12 = (($11) + 7)|0;
|
|
$13 = $blocklen;
|
|
$14 = ($12>>>0)<($13>>>0);
|
|
if (!($14)) {
|
|
break;
|
|
}
|
|
$15 = $1;
|
|
$16 = HEAP8[$15>>0]|0;
|
|
$17 = $16&255;
|
|
$18 = $s1;
|
|
$19 = (($18) + ($17))|0;
|
|
$s1 = $19;
|
|
$20 = $s1;
|
|
$21 = $s2;
|
|
$22 = (($21) + ($20))|0;
|
|
$s2 = $22;
|
|
$23 = $1;
|
|
$24 = ((($23)) + 1|0);
|
|
$25 = HEAP8[$24>>0]|0;
|
|
$26 = $25&255;
|
|
$27 = $s1;
|
|
$28 = (($27) + ($26))|0;
|
|
$s1 = $28;
|
|
$29 = $s1;
|
|
$30 = $s2;
|
|
$31 = (($30) + ($29))|0;
|
|
$s2 = $31;
|
|
$32 = $1;
|
|
$33 = ((($32)) + 2|0);
|
|
$34 = HEAP8[$33>>0]|0;
|
|
$35 = $34&255;
|
|
$36 = $s1;
|
|
$37 = (($36) + ($35))|0;
|
|
$s1 = $37;
|
|
$38 = $s1;
|
|
$39 = $s2;
|
|
$40 = (($39) + ($38))|0;
|
|
$s2 = $40;
|
|
$41 = $1;
|
|
$42 = ((($41)) + 3|0);
|
|
$43 = HEAP8[$42>>0]|0;
|
|
$44 = $43&255;
|
|
$45 = $s1;
|
|
$46 = (($45) + ($44))|0;
|
|
$s1 = $46;
|
|
$47 = $s1;
|
|
$48 = $s2;
|
|
$49 = (($48) + ($47))|0;
|
|
$s2 = $49;
|
|
$50 = $1;
|
|
$51 = ((($50)) + 4|0);
|
|
$52 = HEAP8[$51>>0]|0;
|
|
$53 = $52&255;
|
|
$54 = $s1;
|
|
$55 = (($54) + ($53))|0;
|
|
$s1 = $55;
|
|
$56 = $s1;
|
|
$57 = $s2;
|
|
$58 = (($57) + ($56))|0;
|
|
$s2 = $58;
|
|
$59 = $1;
|
|
$60 = ((($59)) + 5|0);
|
|
$61 = HEAP8[$60>>0]|0;
|
|
$62 = $61&255;
|
|
$63 = $s1;
|
|
$64 = (($63) + ($62))|0;
|
|
$s1 = $64;
|
|
$65 = $s1;
|
|
$66 = $s2;
|
|
$67 = (($66) + ($65))|0;
|
|
$s2 = $67;
|
|
$68 = $1;
|
|
$69 = ((($68)) + 6|0);
|
|
$70 = HEAP8[$69>>0]|0;
|
|
$71 = $70&255;
|
|
$72 = $s1;
|
|
$73 = (($72) + ($71))|0;
|
|
$s1 = $73;
|
|
$74 = $s1;
|
|
$75 = $s2;
|
|
$76 = (($75) + ($74))|0;
|
|
$s2 = $76;
|
|
$77 = $1;
|
|
$78 = ((($77)) + 7|0);
|
|
$79 = HEAP8[$78>>0]|0;
|
|
$80 = $79&255;
|
|
$81 = $s1;
|
|
$82 = (($81) + ($80))|0;
|
|
$s1 = $82;
|
|
$83 = $s1;
|
|
$84 = $s2;
|
|
$85 = (($84) + ($83))|0;
|
|
$s2 = $85;
|
|
$86 = $1;
|
|
$87 = ((($86)) + 8|0);
|
|
$1 = $87;
|
|
$88 = $i;
|
|
$89 = (($88) + 8)|0;
|
|
$i = $89;
|
|
}
|
|
while(1) {
|
|
$90 = $i;
|
|
$91 = $blocklen;
|
|
$92 = ($90>>>0)<($91>>>0);
|
|
if (!($92)) {
|
|
break;
|
|
}
|
|
$93 = $1;
|
|
$94 = ((($93)) + 1|0);
|
|
$1 = $94;
|
|
$95 = HEAP8[$93>>0]|0;
|
|
$96 = $95&255;
|
|
$97 = $s1;
|
|
$98 = (($97) + ($96))|0;
|
|
$s1 = $98;
|
|
$99 = $s1;
|
|
$100 = $s2;
|
|
$101 = (($100) + ($99))|0;
|
|
$s2 = $101;
|
|
$102 = $i;
|
|
$103 = (($102) + 1)|0;
|
|
$i = $103;
|
|
}
|
|
$104 = $s1;
|
|
$105 = (($104>>>0) % 65521)&-1;
|
|
$s1 = $105;
|
|
$106 = $s2;
|
|
$107 = (($106>>>0) % 65521)&-1;
|
|
$s2 = $107;
|
|
$108 = $blocklen;
|
|
$109 = $2;
|
|
$110 = (($109) - ($108))|0;
|
|
$2 = $110;
|
|
$blocklen = 5552;
|
|
}
|
|
$111 = $s2;
|
|
$112 = $111 << 16;
|
|
$113 = $s1;
|
|
$114 = (($112) + ($113))|0;
|
|
STACKTOP = sp;return ($114|0);
|
|
}
|
|
function _nk__match($data,$length) {
|
|
$data = $data|0;
|
|
$length = $length|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $data;
|
|
$1 = $length;
|
|
$2 = HEAP32[12604>>2]|0;
|
|
$3 = $1;
|
|
$4 = (($2) + ($3)|0);
|
|
$5 = HEAP32[12596>>2]|0;
|
|
$6 = ($4>>>0)<=($5>>>0);
|
|
if (!($6)) {
|
|
___assert_fail((31138|0),(13400|0),9349,(31171|0));
|
|
// unreachable;
|
|
}
|
|
$7 = HEAP32[12604>>2]|0;
|
|
$8 = $1;
|
|
$9 = (($7) + ($8)|0);
|
|
$10 = HEAP32[12596>>2]|0;
|
|
$11 = ($9>>>0)>($10>>>0);
|
|
if ($11) {
|
|
$12 = $1;
|
|
$13 = HEAP32[12604>>2]|0;
|
|
$14 = (($13) + ($12)|0);
|
|
HEAP32[12604>>2] = $14;
|
|
STACKTOP = sp;return;
|
|
}
|
|
$15 = $0;
|
|
$16 = HEAP32[12600>>2]|0;
|
|
$17 = ($15>>>0)<($16>>>0);
|
|
if ($17) {
|
|
$18 = HEAP32[12596>>2]|0;
|
|
$19 = ((($18)) + 1|0);
|
|
HEAP32[12604>>2] = $19;
|
|
STACKTOP = sp;return;
|
|
}
|
|
while(1) {
|
|
$20 = $1;
|
|
$21 = (($20) + -1)|0;
|
|
$1 = $21;
|
|
$22 = ($20|0)!=(0);
|
|
if (!($22)) {
|
|
break;
|
|
}
|
|
$23 = $0;
|
|
$24 = ((($23)) + 1|0);
|
|
$0 = $24;
|
|
$25 = HEAP8[$23>>0]|0;
|
|
$26 = HEAP32[12604>>2]|0;
|
|
$27 = ((($26)) + 1|0);
|
|
HEAP32[12604>>2] = $27;
|
|
HEAP8[$26>>0] = $25;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk__lit($data,$length) {
|
|
$data = $data|0;
|
|
$length = $length|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0;
|
|
var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $data;
|
|
$1 = $length;
|
|
$2 = HEAP32[12604>>2]|0;
|
|
$3 = $1;
|
|
$4 = (($2) + ($3)|0);
|
|
$5 = HEAP32[12596>>2]|0;
|
|
$6 = ($4>>>0)<=($5>>>0);
|
|
if (!($6)) {
|
|
___assert_fail((31138|0),(13400|0),9358,(31181|0));
|
|
// unreachable;
|
|
}
|
|
$7 = HEAP32[12604>>2]|0;
|
|
$8 = $1;
|
|
$9 = (($7) + ($8)|0);
|
|
$10 = HEAP32[12596>>2]|0;
|
|
$11 = ($9>>>0)>($10>>>0);
|
|
if ($11) {
|
|
$12 = $1;
|
|
$13 = HEAP32[12604>>2]|0;
|
|
$14 = (($13) + ($12)|0);
|
|
HEAP32[12604>>2] = $14;
|
|
STACKTOP = sp;return;
|
|
}
|
|
$15 = $0;
|
|
$16 = HEAP32[12588>>2]|0;
|
|
$17 = ($15>>>0)<($16>>>0);
|
|
if ($17) {
|
|
$18 = HEAP32[12596>>2]|0;
|
|
$19 = ((($18)) + 1|0);
|
|
HEAP32[12604>>2] = $19;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$20 = HEAP32[12604>>2]|0;
|
|
$21 = $0;
|
|
$22 = $1;
|
|
(_nk_memcopy($20,$21,$22)|0);
|
|
$23 = $1;
|
|
$24 = HEAP32[12604>>2]|0;
|
|
$25 = (($24) + ($23)|0);
|
|
HEAP32[12604>>2] = $25;
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_decode_85_byte($c) {
|
|
$c = $c|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $c;
|
|
$1 = $0;
|
|
$2 = $1 << 24 >> 24;
|
|
$3 = ($2|0)>=(92);
|
|
$4 = $0;
|
|
$5 = $4 << 24 >> 24;
|
|
$6 = (($5) - 36)|0;
|
|
$7 = (($5) - 35)|0;
|
|
$8 = $3 ? $6 : $7;
|
|
STACKTOP = sp;return ($8|0);
|
|
}
|
|
function _nk_textedit_createundo($state,$pos,$insert_len,$delete_len) {
|
|
$state = $state|0;
|
|
$pos = $pos|0;
|
|
$insert_len = $insert_len|0;
|
|
$delete_len = $delete_len|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $r = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $state;
|
|
$2 = $pos;
|
|
$3 = $insert_len;
|
|
$4 = $delete_len;
|
|
$5 = $1;
|
|
$6 = $3;
|
|
$7 = (_nk_textedit_create_undo_record($5,$6)|0);
|
|
$r = $7;
|
|
$8 = $r;
|
|
$9 = ($8|0)==(0|0);
|
|
if ($9) {
|
|
$0 = 0;
|
|
$45 = $0;
|
|
STACKTOP = sp;return ($45|0);
|
|
}
|
|
$10 = $2;
|
|
$11 = $r;
|
|
HEAP32[$11>>2] = $10;
|
|
$12 = $3;
|
|
$13 = $12&65535;
|
|
$14 = $r;
|
|
$15 = ((($14)) + 4|0);
|
|
HEAP16[$15>>1] = $13;
|
|
$16 = $4;
|
|
$17 = $16&65535;
|
|
$18 = $r;
|
|
$19 = ((($18)) + 6|0);
|
|
HEAP16[$19>>1] = $17;
|
|
$20 = $3;
|
|
$21 = ($20|0)==(0);
|
|
if ($21) {
|
|
$22 = $r;
|
|
$23 = ((($22)) + 8|0);
|
|
HEAP16[$23>>1] = -1;
|
|
$0 = 0;
|
|
$45 = $0;
|
|
STACKTOP = sp;return ($45|0);
|
|
} else {
|
|
$24 = $1;
|
|
$25 = ((($24)) + 5188|0);
|
|
$26 = HEAP16[$25>>1]|0;
|
|
$27 = $r;
|
|
$28 = ((($27)) + 8|0);
|
|
HEAP16[$28>>1] = $26;
|
|
$29 = $1;
|
|
$30 = ((($29)) + 5188|0);
|
|
$31 = HEAP16[$30>>1]|0;
|
|
$32 = $31 << 16 >> 16;
|
|
$33 = $3;
|
|
$34 = (($32) + ($33))|0;
|
|
$35 = $34&65535;
|
|
$36 = $1;
|
|
$37 = ((($36)) + 5188|0);
|
|
HEAP16[$37>>1] = $35;
|
|
$38 = $r;
|
|
$39 = ((($38)) + 8|0);
|
|
$40 = HEAP16[$39>>1]|0;
|
|
$41 = $40 << 16 >> 16;
|
|
$42 = $1;
|
|
$43 = ((($42)) + 1188|0);
|
|
$44 = (($43) + ($41<<2)|0);
|
|
$0 = $44;
|
|
$45 = $0;
|
|
STACKTOP = sp;return ($45|0);
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_textedit_create_undo_record($state,$numchars) {
|
|
$state = $state|0;
|
|
$numchars = $numchars|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $state;
|
|
$2 = $numchars;
|
|
$3 = $1;
|
|
_nk_textedit_flush_redo($3);
|
|
$4 = $1;
|
|
$5 = ((($4)) + 5184|0);
|
|
$6 = HEAP16[$5>>1]|0;
|
|
$7 = $6 << 16 >> 16;
|
|
$8 = ($7|0)==(99);
|
|
if ($8) {
|
|
$9 = $1;
|
|
_nk_textedit_discard_undo($9);
|
|
}
|
|
$10 = $2;
|
|
$11 = ($10|0)>(999);
|
|
if ($11) {
|
|
$12 = $1;
|
|
$13 = ((($12)) + 5184|0);
|
|
HEAP16[$13>>1] = 0;
|
|
$14 = $1;
|
|
$15 = ((($14)) + 5188|0);
|
|
HEAP16[$15>>1] = 0;
|
|
$0 = 0;
|
|
$30 = $0;
|
|
STACKTOP = sp;return ($30|0);
|
|
}
|
|
while(1) {
|
|
$16 = $1;
|
|
$17 = ((($16)) + 5188|0);
|
|
$18 = HEAP16[$17>>1]|0;
|
|
$19 = $18 << 16 >> 16;
|
|
$20 = $2;
|
|
$21 = (($19) + ($20))|0;
|
|
$22 = ($21|0)>(999);
|
|
$23 = $1;
|
|
if (!($22)) {
|
|
break;
|
|
}
|
|
_nk_textedit_discard_undo($23);
|
|
}
|
|
$24 = ((($23)) + 5184|0);
|
|
$25 = HEAP16[$24>>1]|0;
|
|
$26 = (($25) + 1)<<16>>16;
|
|
HEAP16[$24>>1] = $26;
|
|
$27 = $25 << 16 >> 16;
|
|
$28 = $1;
|
|
$29 = (($28) + (($27*12)|0)|0);
|
|
$0 = $29;
|
|
$30 = $0;
|
|
STACKTOP = sp;return ($30|0);
|
|
}
|
|
function _nk_textedit_flush_redo($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 5186|0);
|
|
HEAP16[$2>>1] = 99;
|
|
$3 = $0;
|
|
$4 = ((($3)) + 5190|0);
|
|
HEAP16[$4>>1] = 999;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_discard_undo($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $8 = 0, $9 = 0, $i = 0, $n = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 5184|0);
|
|
$3 = HEAP16[$2>>1]|0;
|
|
$4 = $3 << 16 >> 16;
|
|
$5 = ($4|0)>(0);
|
|
if (!($5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$6 = $0;
|
|
$7 = ((($6)) + 8|0);
|
|
$8 = HEAP16[$7>>1]|0;
|
|
$9 = $8 << 16 >> 16;
|
|
$10 = ($9|0)>=(0);
|
|
L4: do {
|
|
if ($10) {
|
|
$11 = $0;
|
|
$12 = ((($11)) + 4|0);
|
|
$13 = HEAP16[$12>>1]|0;
|
|
$14 = $13 << 16 >> 16;
|
|
$n = $14;
|
|
$15 = $0;
|
|
$16 = ((($15)) + 5188|0);
|
|
$17 = HEAP16[$16>>1]|0;
|
|
$18 = $17 << 16 >> 16;
|
|
$19 = $n;
|
|
$20 = (($18) - ($19))|0;
|
|
$21 = $20&65535;
|
|
$22 = $0;
|
|
$23 = ((($22)) + 5188|0);
|
|
HEAP16[$23>>1] = $21;
|
|
$24 = $0;
|
|
$25 = ((($24)) + 1188|0);
|
|
$26 = $0;
|
|
$27 = ((($26)) + 1188|0);
|
|
$28 = $n;
|
|
$29 = (($27) + ($28<<2)|0);
|
|
$30 = $0;
|
|
$31 = ((($30)) + 5188|0);
|
|
$32 = HEAP16[$31>>1]|0;
|
|
$33 = $32 << 16 >> 16;
|
|
$34 = $33<<2;
|
|
(_nk_memcopy($25,$29,$34)|0);
|
|
$i = 0;
|
|
while(1) {
|
|
$35 = $i;
|
|
$36 = $0;
|
|
$37 = ((($36)) + 5184|0);
|
|
$38 = HEAP16[$37>>1]|0;
|
|
$39 = $38 << 16 >> 16;
|
|
$40 = ($35|0)<($39|0);
|
|
if (!($40)) {
|
|
break L4;
|
|
}
|
|
$41 = $i;
|
|
$42 = $0;
|
|
$43 = (($42) + (($41*12)|0)|0);
|
|
$44 = ((($43)) + 8|0);
|
|
$45 = HEAP16[$44>>1]|0;
|
|
$46 = $45 << 16 >> 16;
|
|
$47 = ($46|0)>=(0);
|
|
if ($47) {
|
|
$48 = $i;
|
|
$49 = $0;
|
|
$50 = (($49) + (($48*12)|0)|0);
|
|
$51 = ((($50)) + 8|0);
|
|
$52 = HEAP16[$51>>1]|0;
|
|
$53 = $52 << 16 >> 16;
|
|
$54 = $n;
|
|
$55 = (($53) - ($54))|0;
|
|
$56 = $55&65535;
|
|
$57 = $i;
|
|
$58 = $0;
|
|
$59 = (($58) + (($57*12)|0)|0);
|
|
$60 = ((($59)) + 8|0);
|
|
HEAP16[$60>>1] = $56;
|
|
}
|
|
$61 = $i;
|
|
$62 = (($61) + 1)|0;
|
|
$i = $62;
|
|
}
|
|
}
|
|
} while(0);
|
|
$63 = $0;
|
|
$64 = ((($63)) + 5184|0);
|
|
$65 = HEAP16[$64>>1]|0;
|
|
$66 = (($65) + -1)<<16>>16;
|
|
HEAP16[$64>>1] = $66;
|
|
$67 = $0;
|
|
$68 = $0;
|
|
$69 = ((($68)) + 12|0);
|
|
$70 = $0;
|
|
$71 = ((($70)) + 5184|0);
|
|
$72 = HEAP16[$71>>1]|0;
|
|
$73 = $72 << 16 >> 16;
|
|
$74 = ($73*12)|0;
|
|
(_nk_memcopy($67,$69,$74)|0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_free_page_element($ctx,$elem) {
|
|
$ctx = $ctx|0;
|
|
$elem = $elem|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $elem;
|
|
$2 = $0;
|
|
$3 = ((($2)) + 11172|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if ($5) {
|
|
$9 = $0;
|
|
$10 = ((($9)) + 11172|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = $1;
|
|
$13 = ((($12)) + 284|0);
|
|
HEAP32[$13>>2] = $11;
|
|
$14 = $1;
|
|
$15 = $0;
|
|
$16 = ((($15)) + 11172|0);
|
|
HEAP32[$16>>2] = $14;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$6 = $1;
|
|
$7 = $0;
|
|
$8 = ((($7)) + 11172|0);
|
|
HEAP32[$8>>2] = $6;
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_create_page_element($ctx) {
|
|
$ctx = $ctx|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $elem = 0, label = 0;
|
|
var sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $ctx;
|
|
$2 = $1;
|
|
$3 = ((($2)) + 11172|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$5 = ($4|0)!=(0|0);
|
|
$6 = $1;
|
|
do {
|
|
if ($5) {
|
|
$7 = ((($6)) + 11172|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$elem = $8;
|
|
$9 = $elem;
|
|
$10 = ((($9)) + 284|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = $1;
|
|
$13 = ((($12)) + 11172|0);
|
|
HEAP32[$13>>2] = $11;
|
|
} else {
|
|
$14 = ((($6)) + 11152|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = ($15|0)!=(0|0);
|
|
$17 = $1;
|
|
if ($16) {
|
|
$18 = ((($17)) + 11152|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = (_nk_pool_alloc($19)|0);
|
|
$elem = $20;
|
|
$21 = $elem;
|
|
$22 = ($21|0)!=(0|0);
|
|
if (!($22)) {
|
|
___assert_fail((31232|0),(13400|0),14732,(31237|0));
|
|
// unreachable;
|
|
}
|
|
$23 = $elem;
|
|
$24 = ($23|0)!=(0|0);
|
|
if ($24) {
|
|
break;
|
|
}
|
|
$0 = 0;
|
|
$37 = $0;
|
|
STACKTOP = sp;return ($37|0);
|
|
} else {
|
|
$25 = ((($17)) + 5596|0);
|
|
$26 = (_nk_buffer_alloc($25,1,292,4)|0);
|
|
$elem = $26;
|
|
$27 = $elem;
|
|
$28 = ($27|0)!=(0|0);
|
|
if (!($28)) {
|
|
___assert_fail((31232|0),(13400|0),14739,(31237|0));
|
|
// unreachable;
|
|
}
|
|
$29 = $elem;
|
|
$30 = ($29|0)!=(0|0);
|
|
if ($30) {
|
|
break;
|
|
}
|
|
$0 = 0;
|
|
$37 = $0;
|
|
STACKTOP = sp;return ($37|0);
|
|
}
|
|
}
|
|
} while(0);
|
|
$31 = $elem;
|
|
_nk_zero($31,292);
|
|
$32 = $elem;
|
|
$33 = ((($32)) + 284|0);
|
|
HEAP32[$33>>2] = 0;
|
|
$34 = $elem;
|
|
$35 = ((($34)) + 288|0);
|
|
HEAP32[$35>>2] = 0;
|
|
$36 = $elem;
|
|
$0 = $36;
|
|
$37 = $0;
|
|
STACKTOP = sp;return ($37|0);
|
|
}
|
|
function _nk_pool_alloc($pool) {
|
|
$pool = $pool|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
|
|
var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
|
|
var $page = 0, $size = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 16|0;
|
|
$1 = $pool;
|
|
$2 = $1;
|
|
$3 = ((($2)) + 20|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$5 = ($4|0)!=(0|0);
|
|
if ($5) {
|
|
$6 = $1;
|
|
$7 = ((($6)) + 20|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = $1;
|
|
$11 = ((($10)) + 28|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ($9>>>0)>=($12>>>0);
|
|
if ($13) {
|
|
label = 3;
|
|
}
|
|
} else {
|
|
label = 3;
|
|
}
|
|
do {
|
|
if ((label|0) == 3) {
|
|
$14 = $1;
|
|
$15 = ((($14)) + 12|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = ($16|0)==(0);
|
|
if (!($17)) {
|
|
$size = 300;
|
|
$31 = $size;
|
|
$32 = (($31) + 4544)|0;
|
|
$size = $32;
|
|
$33 = $1;
|
|
$34 = ((($33)) + 4|0);
|
|
$35 = HEAP32[$34>>2]|0;
|
|
$36 = $1;
|
|
$37 = $size;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$36>>2]|0;
|
|
$38 = (FUNCTION_TABLE_iiii[$35 & 7]($$byval_copy,0,$37)|0);
|
|
$page = $38;
|
|
$39 = $page;
|
|
HEAP32[$39>>2] = 0;
|
|
$40 = $1;
|
|
$41 = ((($40)) + 20|0);
|
|
$42 = HEAP32[$41>>2]|0;
|
|
$43 = $page;
|
|
$44 = ((($43)) + 4|0);
|
|
HEAP32[$44>>2] = $42;
|
|
$45 = $page;
|
|
$46 = $1;
|
|
$47 = ((($46)) + 20|0);
|
|
HEAP32[$47>>2] = $45;
|
|
break;
|
|
}
|
|
$18 = $1;
|
|
$19 = ((($18)) + 20|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = ($20|0)!=(0|0);
|
|
$22 = $1;
|
|
$23 = ((($22)) + 20|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
if ($21) {
|
|
$26 = HEAP32[$24>>2]|0;
|
|
$27 = $1;
|
|
$28 = ((($27)) + 28|0);
|
|
$29 = HEAP32[$28>>2]|0;
|
|
$30 = ($26>>>0)<($29>>>0);
|
|
if (!($30)) {
|
|
___assert_fail((31286|0),(13400|0),14362,(31272|0));
|
|
// unreachable;
|
|
}
|
|
$0 = 0;
|
|
$58 = $0;
|
|
STACKTOP = sp;return ($58|0);
|
|
} else {
|
|
$25 = ($24|0)!=(0|0);
|
|
if (!($25)) {
|
|
___assert_fail((31260|0),(13400|0),14359,(31272|0));
|
|
// unreachable;
|
|
}
|
|
$0 = 0;
|
|
$58 = $0;
|
|
STACKTOP = sp;return ($58|0);
|
|
}
|
|
}
|
|
} while(0);
|
|
$48 = $1;
|
|
$49 = ((($48)) + 20|0);
|
|
$50 = HEAP32[$49>>2]|0;
|
|
$51 = HEAP32[$50>>2]|0;
|
|
$52 = (($51) + 1)|0;
|
|
HEAP32[$50>>2] = $52;
|
|
$53 = $1;
|
|
$54 = ((($53)) + 20|0);
|
|
$55 = HEAP32[$54>>2]|0;
|
|
$56 = ((($55)) + 8|0);
|
|
$57 = (($56) + (($51*292)|0)|0);
|
|
$0 = $57;
|
|
$58 = $0;
|
|
STACKTOP = sp;return ($58|0);
|
|
}
|
|
function _nk_window_has_header($win,$title) {
|
|
$win = $win|0;
|
|
$title = $title|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $active = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $win;
|
|
$1 = $title;
|
|
$active = 0;
|
|
$2 = $0;
|
|
$3 = ((($2)) + 8|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$5 = $4 & 48;
|
|
$active = $5;
|
|
$6 = $active;
|
|
$7 = ($6|0)!=(0);
|
|
if ($7) {
|
|
$14 = 1;
|
|
} else {
|
|
$8 = $0;
|
|
$9 = ((($8)) + 8|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = $10 & 256;
|
|
$12 = ($11|0)!=(0);
|
|
$14 = $12;
|
|
}
|
|
$13 = $14&1;
|
|
$active = $13;
|
|
$15 = $active;
|
|
$16 = ($15|0)!=(0);
|
|
if ($16) {
|
|
$17 = $0;
|
|
$18 = ((($17)) + 8|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = $19 & 2048;
|
|
$21 = ($20|0)!=(0);
|
|
if ($21) {
|
|
$25 = 0;
|
|
} else {
|
|
$22 = $1;
|
|
$23 = ($22|0)!=(0|0);
|
|
$25 = $23;
|
|
}
|
|
} else {
|
|
$25 = 0;
|
|
}
|
|
$24 = $25&1;
|
|
$active = $24;
|
|
$26 = $active;
|
|
STACKTOP = sp;return ($26|0);
|
|
}
|
|
function _nk_do_scrollbarv($state,$out,$scroll,$has_scrolling,$offset,$target,$step,$button_pixel_inc,$style,$in,$font) {
|
|
$state = $state|0;
|
|
$out = $out|0;
|
|
$scroll = $scroll|0;
|
|
$has_scrolling = $has_scrolling|0;
|
|
$offset = +$offset;
|
|
$target = +$target;
|
|
$step = +$step;
|
|
$button_pixel_inc = +$button_pixel_inc;
|
|
$style = $style|0;
|
|
$in = $in|0;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $$byval_copy3 = 0, $0 = 0.0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0, $107 = 0.0, $108 = 0, $109 = 0.0, $11 = 0, $110 = 0.0, $111 = 0, $112 = 0.0, $113 = 0;
|
|
var $114 = 0.0, $115 = 0, $116 = 0.0, $117 = 0, $118 = 0.0, $119 = 0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0, $125 = 0.0, $126 = 0.0, $127 = 0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0, $131 = 0.0;
|
|
var $132 = 0.0, $133 = 0, $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0, $141 = 0.0, $142 = 0.0, $143 = 0, $144 = 0.0, $145 = 0.0, $146 = 0.0, $147 = 0, $148 = 0.0, $149 = 0.0, $15 = 0;
|
|
var $150 = 0.0, $151 = 0.0, $152 = 0.0, $153 = 0.0, $154 = 0.0, $155 = 0, $156 = 0.0, $157 = 0.0, $158 = 0, $159 = 0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0, $163 = 0, $164 = 0, $165 = 0.0, $166 = 0.0, $167 = 0.0, $168 = 0.0;
|
|
var $169 = 0, $17 = 0, $170 = 0, $171 = 0.0, $172 = 0.0, $173 = 0, $174 = 0.0, $175 = 0.0, $176 = 0.0, $177 = 0, $178 = 0, $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0, $182 = 0, $183 = 0, $184 = 0.0, $185 = 0.0, $186 = 0;
|
|
var $187 = 0, $188 = 0.0, $189 = 0, $19 = 0, $190 = 0, $191 = 0.0, $192 = 0.0, $193 = 0, $194 = 0, $195 = 0.0, $196 = 0.0, $197 = 0.0, $198 = 0.0, $199 = 0, $2 = 0, $20 = 0, $200 = 0.0, $201 = 0, $202 = 0, $203 = 0.0;
|
|
var $204 = 0.0, $205 = 0, $206 = 0, $207 = 0.0, $208 = 0.0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0.0, $213 = 0.0, $214 = 0.0, $215 = 0.0, $216 = 0.0, $217 = 0.0, $218 = 0.0, $219 = 0, $22 = 0.0, $220 = 0.0, $221 = 0.0;
|
|
var $222 = 0, $223 = 0.0, $224 = 0.0, $225 = 0.0, $226 = 0, $227 = 0, $228 = 0.0, $229 = 0.0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0.0, $234 = 0.0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0;
|
|
var $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0.0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0;
|
|
var $259 = 0, $26 = 0.0, $260 = 0.0, $261 = 0.0, $27 = 0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0;
|
|
var $41 = 0.0, $42 = 0, $43 = 0.0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0.0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0, $57 = 0.0, $58 = 0, $59 = 0.0;
|
|
var $6 = 0.0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0, $69 = 0.0, $7 = 0.0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0;
|
|
var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0, $85 = 0.0, $86 = 0, $87 = 0.0, $88 = 0.0, $89 = 0, $9 = 0, $90 = 0.0, $91 = 0.0, $92 = 0, $93 = 0, $94 = 0, $95 = 0;
|
|
var $96 = 0, $97 = 0, $98 = 0, $99 = 0, $button = 0, $button$byval_copy = 0, $button$byval_copy2 = 0, $cursor = 0, $cursor$byval_copy = 0, $or$cond = 0, $scroll$byval_copy = 0, $scroll_h = 0.0, $scroll_off = 0.0, $scroll_offset = 0.0, $scroll_ratio = 0.0, $scroll_step = 0.0, $ws = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 176|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy3 = sp + 172|0;
|
|
$$byval_copy = sp + 168|0;
|
|
$cursor$byval_copy = sp + 152|0;
|
|
$scroll$byval_copy = sp + 136|0;
|
|
$button$byval_copy2 = sp + 120|0;
|
|
$button$byval_copy = sp + 104|0;
|
|
$cursor = sp + 40|0;
|
|
$ws = sp + 20|0;
|
|
$button = sp;
|
|
$1 = $state;
|
|
$2 = $out;
|
|
$3 = $has_scrolling;
|
|
$4 = $offset;
|
|
$5 = $target;
|
|
$6 = $step;
|
|
$7 = $button_pixel_inc;
|
|
$8 = $style;
|
|
$9 = $in;
|
|
$10 = $font;
|
|
$11 = $2;
|
|
$12 = ($11|0)!=(0|0);
|
|
if (!($12)) {
|
|
___assert_fail((31441|0),(13400|0),12487,(31445|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $8;
|
|
$14 = ($13|0)!=(0|0);
|
|
if (!($14)) {
|
|
___assert_fail((31462|0),(13400|0),12488,(31445|0));
|
|
// unreachable;
|
|
}
|
|
$15 = $1;
|
|
$16 = ($15|0)!=(0|0);
|
|
if (!($16)) {
|
|
___assert_fail((28059|0),(13400|0),12489,(31445|0));
|
|
// unreachable;
|
|
}
|
|
$17 = $2;
|
|
$18 = ($17|0)!=(0|0);
|
|
$19 = $8;
|
|
$20 = ($19|0)!=(0|0);
|
|
$or$cond = $18 & $20;
|
|
if (!($or$cond)) {
|
|
$0 = 0.0;
|
|
$261 = $0;
|
|
STACKTOP = sp;return (+$261);
|
|
}
|
|
$21 = ((($scroll)) + 8|0);
|
|
$22 = +HEAPF32[$21>>2];
|
|
$23 = $22 < 1.0;
|
|
$24 = ((($scroll)) + 8|0);
|
|
$25 = +HEAPF32[$24>>2];
|
|
$26 = $23 ? 1.0 : $25;
|
|
$27 = ((($scroll)) + 8|0);
|
|
HEAPF32[$27>>2] = $26;
|
|
$28 = ((($scroll)) + 12|0);
|
|
$29 = +HEAPF32[$28>>2];
|
|
$30 = ((($scroll)) + 8|0);
|
|
$31 = +HEAPF32[$30>>2];
|
|
$32 = 2.0 * $31;
|
|
$33 = $29 < $32;
|
|
$34 = ((($scroll)) + 8|0);
|
|
$35 = +HEAPF32[$34>>2];
|
|
$36 = 2.0 * $35;
|
|
$37 = ((($scroll)) + 12|0);
|
|
$38 = +HEAPF32[$37>>2];
|
|
$39 = $33 ? $36 : $38;
|
|
$40 = ((($scroll)) + 12|0);
|
|
HEAPF32[$40>>2] = $39;
|
|
$41 = $5;
|
|
$42 = ((($scroll)) + 12|0);
|
|
$43 = +HEAPF32[$42>>2];
|
|
$44 = $41 <= $43;
|
|
if ($44) {
|
|
$0 = 0.0;
|
|
$261 = $0;
|
|
STACKTOP = sp;return (+$261);
|
|
}
|
|
$45 = $8;
|
|
$46 = ((($45)) + 152|0);
|
|
$47 = HEAP32[$46>>2]|0;
|
|
$48 = ($47|0)!=(0);
|
|
if ($48) {
|
|
$49 = +HEAPF32[$scroll>>2];
|
|
HEAPF32[$button>>2] = $49;
|
|
$50 = ((($scroll)) + 8|0);
|
|
$51 = +HEAPF32[$50>>2];
|
|
$52 = ((($button)) + 8|0);
|
|
HEAPF32[$52>>2] = $51;
|
|
$53 = ((($scroll)) + 8|0);
|
|
$54 = +HEAPF32[$53>>2];
|
|
$55 = ((($button)) + 12|0);
|
|
HEAPF32[$55>>2] = $54;
|
|
$56 = ((($scroll)) + 12|0);
|
|
$57 = +HEAPF32[$56>>2];
|
|
$58 = ((($button)) + 12|0);
|
|
$59 = +HEAPF32[$58>>2];
|
|
$60 = 2.0 * $59;
|
|
$61 = $57 - $60;
|
|
$scroll_h = $61;
|
|
$62 = $6;
|
|
$63 = $7;
|
|
$64 = $62 < $63;
|
|
$65 = $6;
|
|
$66 = $7;
|
|
$67 = $64 ? $65 : $66;
|
|
$scroll_step = $67;
|
|
$68 = ((($scroll)) + 4|0);
|
|
$69 = +HEAPF32[$68>>2];
|
|
$70 = ((($button)) + 4|0);
|
|
HEAPF32[$70>>2] = $69;
|
|
$71 = $2;
|
|
$72 = $8;
|
|
$73 = ((($72)) + 416|0);
|
|
$74 = HEAP32[$73>>2]|0;
|
|
$75 = $8;
|
|
$76 = ((($75)) + 284|0);
|
|
$77 = $9;
|
|
$78 = $10;
|
|
;HEAP32[$button$byval_copy>>2]=HEAP32[$button>>2]|0;HEAP32[$button$byval_copy+4>>2]=HEAP32[$button+4>>2]|0;HEAP32[$button$byval_copy+8>>2]=HEAP32[$button+8>>2]|0;HEAP32[$button$byval_copy+12>>2]=HEAP32[$button+12>>2]|0;
|
|
$79 = (_nk_do_button_symbol($ws,$71,$button$byval_copy,$74,1,$76,$77,$78)|0);
|
|
$80 = ($79|0)!=(0);
|
|
if ($80) {
|
|
$81 = $4;
|
|
$82 = $scroll_step;
|
|
$83 = $81 - $82;
|
|
$4 = $83;
|
|
}
|
|
$84 = ((($scroll)) + 4|0);
|
|
$85 = +HEAPF32[$84>>2];
|
|
$86 = ((($scroll)) + 12|0);
|
|
$87 = +HEAPF32[$86>>2];
|
|
$88 = $85 + $87;
|
|
$89 = ((($button)) + 12|0);
|
|
$90 = +HEAPF32[$89>>2];
|
|
$91 = $88 - $90;
|
|
$92 = ((($button)) + 4|0);
|
|
HEAPF32[$92>>2] = $91;
|
|
$93 = $2;
|
|
$94 = $8;
|
|
$95 = ((($94)) + 412|0);
|
|
$96 = HEAP32[$95>>2]|0;
|
|
$97 = $8;
|
|
$98 = ((($97)) + 156|0);
|
|
$99 = $9;
|
|
$100 = $10;
|
|
;HEAP32[$button$byval_copy2>>2]=HEAP32[$button>>2]|0;HEAP32[$button$byval_copy2+4>>2]=HEAP32[$button+4>>2]|0;HEAP32[$button$byval_copy2+8>>2]=HEAP32[$button+8>>2]|0;HEAP32[$button$byval_copy2+12>>2]=HEAP32[$button+12>>2]|0;
|
|
$101 = (_nk_do_button_symbol($ws,$93,$button$byval_copy2,$96,1,$98,$99,$100)|0);
|
|
$102 = ($101|0)!=(0);
|
|
if ($102) {
|
|
$103 = $4;
|
|
$104 = $scroll_step;
|
|
$105 = $103 + $104;
|
|
$4 = $105;
|
|
}
|
|
$106 = ((($scroll)) + 4|0);
|
|
$107 = +HEAPF32[$106>>2];
|
|
$108 = ((($button)) + 12|0);
|
|
$109 = +HEAPF32[$108>>2];
|
|
$110 = $107 + $109;
|
|
$111 = ((($scroll)) + 4|0);
|
|
HEAPF32[$111>>2] = $110;
|
|
$112 = $scroll_h;
|
|
$113 = ((($scroll)) + 12|0);
|
|
HEAPF32[$113>>2] = $112;
|
|
}
|
|
$114 = $6;
|
|
$115 = ((($scroll)) + 12|0);
|
|
$116 = +HEAPF32[$115>>2];
|
|
$117 = $114 < $116;
|
|
$118 = $6;
|
|
$119 = ((($scroll)) + 12|0);
|
|
$120 = +HEAPF32[$119>>2];
|
|
$121 = $117 ? $118 : $120;
|
|
$scroll_step = $121;
|
|
$122 = $4;
|
|
$123 = $5;
|
|
$124 = ((($scroll)) + 12|0);
|
|
$125 = +HEAPF32[$124>>2];
|
|
$126 = $123 - $125;
|
|
$127 = $122 < $126;
|
|
if ($127) {
|
|
$128 = $4;
|
|
$134 = $128;
|
|
} else {
|
|
$129 = $5;
|
|
$130 = ((($scroll)) + 12|0);
|
|
$131 = +HEAPF32[$130>>2];
|
|
$132 = $129 - $131;
|
|
$134 = $132;
|
|
}
|
|
$133 = $134 < 0.0;
|
|
do {
|
|
if ($133) {
|
|
$146 = 0.0;
|
|
} else {
|
|
$135 = $4;
|
|
$136 = $5;
|
|
$137 = ((($scroll)) + 12|0);
|
|
$138 = +HEAPF32[$137>>2];
|
|
$139 = $136 - $138;
|
|
$140 = $135 < $139;
|
|
if ($140) {
|
|
$141 = $4;
|
|
$146 = $141;
|
|
break;
|
|
} else {
|
|
$142 = $5;
|
|
$143 = ((($scroll)) + 12|0);
|
|
$144 = +HEAPF32[$143>>2];
|
|
$145 = $142 - $144;
|
|
$146 = $145;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$scroll_offset = $146;
|
|
$147 = ((($scroll)) + 12|0);
|
|
$148 = +HEAPF32[$147>>2];
|
|
$149 = $5;
|
|
$150 = $148 / $149;
|
|
$scroll_ratio = $150;
|
|
$151 = $scroll_offset;
|
|
$152 = $5;
|
|
$153 = $151 / $152;
|
|
$scroll_off = $153;
|
|
$154 = $scroll_ratio;
|
|
$155 = ((($scroll)) + 12|0);
|
|
$156 = +HEAPF32[$155>>2];
|
|
$157 = $154 * $156;
|
|
$158 = $8;
|
|
$159 = ((($158)) + 128|0);
|
|
$160 = +HEAPF32[$159>>2];
|
|
$161 = 2.0 * $160;
|
|
$162 = $8;
|
|
$163 = ((($162)) + 144|0);
|
|
$164 = ((($163)) + 4|0);
|
|
$165 = +HEAPF32[$164>>2];
|
|
$166 = 2.0 * $165;
|
|
$167 = $161 + $166;
|
|
$168 = $157 - $167;
|
|
$169 = ((($cursor)) + 12|0);
|
|
HEAPF32[$169>>2] = $168;
|
|
$170 = ((($scroll)) + 4|0);
|
|
$171 = +HEAPF32[$170>>2];
|
|
$172 = $scroll_off;
|
|
$173 = ((($scroll)) + 12|0);
|
|
$174 = +HEAPF32[$173>>2];
|
|
$175 = $172 * $174;
|
|
$176 = $171 + $175;
|
|
$177 = $8;
|
|
$178 = ((($177)) + 128|0);
|
|
$179 = +HEAPF32[$178>>2];
|
|
$180 = $176 + $179;
|
|
$181 = $8;
|
|
$182 = ((($181)) + 144|0);
|
|
$183 = ((($182)) + 4|0);
|
|
$184 = +HEAPF32[$183>>2];
|
|
$185 = $180 + $184;
|
|
$186 = ((($cursor)) + 4|0);
|
|
HEAPF32[$186>>2] = $185;
|
|
$187 = ((($scroll)) + 8|0);
|
|
$188 = +HEAPF32[$187>>2];
|
|
$189 = $8;
|
|
$190 = ((($189)) + 128|0);
|
|
$191 = +HEAPF32[$190>>2];
|
|
$192 = 2.0 * $191;
|
|
$193 = $8;
|
|
$194 = ((($193)) + 144|0);
|
|
$195 = +HEAPF32[$194>>2];
|
|
$196 = 2.0 * $195;
|
|
$197 = $192 + $196;
|
|
$198 = $188 - $197;
|
|
$199 = ((($cursor)) + 8|0);
|
|
HEAPF32[$199>>2] = $198;
|
|
$200 = +HEAPF32[$scroll>>2];
|
|
$201 = $8;
|
|
$202 = ((($201)) + 128|0);
|
|
$203 = +HEAPF32[$202>>2];
|
|
$204 = $200 + $203;
|
|
$205 = $8;
|
|
$206 = ((($205)) + 144|0);
|
|
$207 = +HEAPF32[$206>>2];
|
|
$208 = $204 + $207;
|
|
HEAPF32[$cursor>>2] = $208;
|
|
$209 = $1;
|
|
$210 = $9;
|
|
$211 = $3;
|
|
$212 = $scroll_offset;
|
|
$213 = $5;
|
|
$214 = $scroll_step;
|
|
;HEAP32[$scroll$byval_copy>>2]=HEAP32[$scroll>>2]|0;HEAP32[$scroll$byval_copy+4>>2]=HEAP32[$scroll+4>>2]|0;HEAP32[$scroll$byval_copy+8>>2]=HEAP32[$scroll+8>>2]|0;HEAP32[$scroll$byval_copy+12>>2]=HEAP32[$scroll+12>>2]|0;
|
|
;HEAP32[$cursor$byval_copy>>2]=HEAP32[$cursor>>2]|0;HEAP32[$cursor$byval_copy+4>>2]=HEAP32[$cursor+4>>2]|0;HEAP32[$cursor$byval_copy+8>>2]=HEAP32[$cursor+8>>2]|0;HEAP32[$cursor$byval_copy+12>>2]=HEAP32[$cursor+12>>2]|0;
|
|
$215 = (+_nk_scrollbar_behavior($209,$210,$211,$scroll$byval_copy,$cursor$byval_copy,$212,$213,$214,0));
|
|
$scroll_offset = $215;
|
|
$216 = $scroll_offset;
|
|
$217 = $5;
|
|
$218 = $216 / $217;
|
|
$scroll_off = $218;
|
|
$219 = ((($scroll)) + 4|0);
|
|
$220 = +HEAPF32[$219>>2];
|
|
$221 = $scroll_off;
|
|
$222 = ((($scroll)) + 12|0);
|
|
$223 = +HEAPF32[$222>>2];
|
|
$224 = $221 * $223;
|
|
$225 = $220 + $224;
|
|
$226 = $8;
|
|
$227 = ((($226)) + 136|0);
|
|
$228 = +HEAPF32[$227>>2];
|
|
$229 = $225 + $228;
|
|
$230 = $8;
|
|
$231 = ((($230)) + 144|0);
|
|
$232 = ((($231)) + 4|0);
|
|
$233 = +HEAPF32[$232>>2];
|
|
$234 = $229 + $233;
|
|
$235 = ((($cursor)) + 4|0);
|
|
HEAPF32[$235>>2] = $234;
|
|
$236 = $8;
|
|
$237 = ((($236)) + 424|0);
|
|
$238 = HEAP32[$237>>2]|0;
|
|
$239 = ($238|0)!=(0|0);
|
|
if ($239) {
|
|
$240 = $8;
|
|
$241 = ((($240)) + 424|0);
|
|
$242 = HEAP32[$241>>2]|0;
|
|
$243 = $2;
|
|
$244 = $8;
|
|
$245 = ((($244)) + 420|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$245>>2]|0;
|
|
FUNCTION_TABLE_vii[$242 & 31]($243,$$byval_copy);
|
|
}
|
|
$246 = $2;
|
|
$247 = $1;
|
|
$248 = HEAP32[$247>>2]|0;
|
|
$249 = $8;
|
|
_nk_draw_scrollbar($246,$248,$249,$scroll,$cursor);
|
|
$250 = $8;
|
|
$251 = ((($250)) + 428|0);
|
|
$252 = HEAP32[$251>>2]|0;
|
|
$253 = ($252|0)!=(0|0);
|
|
if ($253) {
|
|
$254 = $8;
|
|
$255 = ((($254)) + 428|0);
|
|
$256 = HEAP32[$255>>2]|0;
|
|
$257 = $2;
|
|
$258 = $8;
|
|
$259 = ((($258)) + 420|0);
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$259>>2]|0;
|
|
FUNCTION_TABLE_vii[$256 & 31]($257,$$byval_copy3);
|
|
}
|
|
$260 = $scroll_offset;
|
|
$0 = $260;
|
|
$261 = $0;
|
|
STACKTOP = sp;return (+$261);
|
|
}
|
|
function _nk_do_scrollbarh($state,$out,$scroll,$has_scrolling,$offset,$target,$step,$button_pixel_inc,$style,$in,$font) {
|
|
$state = $state|0;
|
|
$out = $out|0;
|
|
$scroll = $scroll|0;
|
|
$has_scrolling = $has_scrolling|0;
|
|
$offset = +$offset;
|
|
$target = +$target;
|
|
$step = +$step;
|
|
$button_pixel_inc = +$button_pixel_inc;
|
|
$style = $style|0;
|
|
$in = $in|0;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $$byval_copy3 = 0, $0 = 0.0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0, $108 = 0.0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0, $112 = 0.0, $113 = 0;
|
|
var $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0, $122 = 0.0, $123 = 0.0, $124 = 0, $125 = 0.0, $126 = 0.0, $127 = 0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0.0, $131 = 0;
|
|
var $132 = 0.0, $133 = 0.0, $134 = 0, $135 = 0.0, $136 = 0.0, $137 = 0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0, $142 = 0.0, $143 = 0.0, $144 = 0.0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0.0, $149 = 0, $15 = 0;
|
|
var $150 = 0.0, $151 = 0.0, $152 = 0, $153 = 0, $154 = 0.0, $155 = 0.0, $156 = 0, $157 = 0, $158 = 0.0, $159 = 0.0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0, $163 = 0.0, $164 = 0.0, $165 = 0, $166 = 0.0, $167 = 0.0, $168 = 0.0;
|
|
var $169 = 0, $17 = 0, $170 = 0, $171 = 0.0, $172 = 0.0, $173 = 0, $174 = 0, $175 = 0.0, $176 = 0.0, $177 = 0, $178 = 0.0, $179 = 0, $18 = 0, $180 = 0, $181 = 0.0, $182 = 0.0, $183 = 0, $184 = 0, $185 = 0, $186 = 0.0;
|
|
var $187 = 0.0, $188 = 0.0, $189 = 0.0, $19 = 0, $190 = 0, $191 = 0, $192 = 0.0, $193 = 0, $194 = 0, $195 = 0.0, $196 = 0.0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0.0, $200 = 0.0, $201 = 0.0, $202 = 0, $203 = 0;
|
|
var $204 = 0, $205 = 0, $206 = 0.0, $207 = 0.0, $208 = 0.0, $209 = 0.0, $21 = 0, $210 = 0.0, $211 = 0.0, $212 = 0.0, $213 = 0.0, $214 = 0.0, $215 = 0, $216 = 0.0, $217 = 0.0, $218 = 0.0, $219 = 0, $22 = 0, $220 = 0, $221 = 0;
|
|
var $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0.0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0.0;
|
|
var $240 = 0, $241 = 0, $242 = 0, $243 = 0.0, $244 = 0.0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0;
|
|
var $39 = 0.0, $4 = 0.0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0, $5 = 0.0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0, $56 = 0;
|
|
var $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0.0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0.0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0;
|
|
var $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0, $84 = 0.0, $85 = 0.0, $86 = 0, $87 = 0.0, $88 = 0.0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0;
|
|
var $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0.0, $button = 0, $button$byval_copy = 0, $button$byval_copy2 = 0, $cursor = 0, $cursor$byval_copy = 0, $or$cond = 0, $scroll$byval_copy = 0, $scroll_off = 0.0, $scroll_offset = 0.0, $scroll_ratio = 0.0, $scroll_step = 0.0, $scroll_w = 0.0, $ws = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 176|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy3 = sp + 172|0;
|
|
$$byval_copy = sp + 168|0;
|
|
$cursor$byval_copy = sp + 152|0;
|
|
$scroll$byval_copy = sp + 136|0;
|
|
$button$byval_copy2 = sp + 120|0;
|
|
$button$byval_copy = sp + 104|0;
|
|
$cursor = sp + 40|0;
|
|
$ws = sp + 20|0;
|
|
$button = sp;
|
|
$1 = $state;
|
|
$2 = $out;
|
|
$3 = $has_scrolling;
|
|
$4 = $offset;
|
|
$5 = $target;
|
|
$6 = $step;
|
|
$7 = $button_pixel_inc;
|
|
$8 = $style;
|
|
$9 = $in;
|
|
$10 = $font;
|
|
$11 = $2;
|
|
$12 = ($11|0)!=(0|0);
|
|
if (!($12)) {
|
|
___assert_fail((31441|0),(13400|0),12562,(31468|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $8;
|
|
$14 = ($13|0)!=(0|0);
|
|
if (!($14)) {
|
|
___assert_fail((31462|0),(13400|0),12563,(31468|0));
|
|
// unreachable;
|
|
}
|
|
$15 = $2;
|
|
$16 = ($15|0)!=(0|0);
|
|
$17 = $8;
|
|
$18 = ($17|0)!=(0|0);
|
|
$or$cond = $16 & $18;
|
|
if (!($or$cond)) {
|
|
$0 = 0.0;
|
|
$244 = $0;
|
|
STACKTOP = sp;return (+$244);
|
|
}
|
|
$19 = ((($scroll)) + 12|0);
|
|
$20 = +HEAPF32[$19>>2];
|
|
$21 = $20 < 1.0;
|
|
$22 = ((($scroll)) + 12|0);
|
|
$23 = +HEAPF32[$22>>2];
|
|
$24 = $21 ? 1.0 : $23;
|
|
$25 = ((($scroll)) + 12|0);
|
|
HEAPF32[$25>>2] = $24;
|
|
$26 = ((($scroll)) + 8|0);
|
|
$27 = +HEAPF32[$26>>2];
|
|
$28 = ((($scroll)) + 12|0);
|
|
$29 = +HEAPF32[$28>>2];
|
|
$30 = 2.0 * $29;
|
|
$31 = $27 < $30;
|
|
$32 = ((($scroll)) + 12|0);
|
|
$33 = +HEAPF32[$32>>2];
|
|
$34 = 2.0 * $33;
|
|
$35 = ((($scroll)) + 8|0);
|
|
$36 = +HEAPF32[$35>>2];
|
|
$37 = $31 ? $34 : $36;
|
|
$38 = ((($scroll)) + 8|0);
|
|
HEAPF32[$38>>2] = $37;
|
|
$39 = $5;
|
|
$40 = ((($scroll)) + 8|0);
|
|
$41 = +HEAPF32[$40>>2];
|
|
$42 = $39 <= $41;
|
|
if ($42) {
|
|
$0 = 0.0;
|
|
$244 = $0;
|
|
STACKTOP = sp;return (+$244);
|
|
}
|
|
$43 = $8;
|
|
$44 = ((($43)) + 152|0);
|
|
$45 = HEAP32[$44>>2]|0;
|
|
$46 = ($45|0)!=(0);
|
|
if ($46) {
|
|
$47 = ((($scroll)) + 4|0);
|
|
$48 = +HEAPF32[$47>>2];
|
|
$49 = ((($button)) + 4|0);
|
|
HEAPF32[$49>>2] = $48;
|
|
$50 = ((($scroll)) + 12|0);
|
|
$51 = +HEAPF32[$50>>2];
|
|
$52 = ((($button)) + 8|0);
|
|
HEAPF32[$52>>2] = $51;
|
|
$53 = ((($scroll)) + 12|0);
|
|
$54 = +HEAPF32[$53>>2];
|
|
$55 = ((($button)) + 12|0);
|
|
HEAPF32[$55>>2] = $54;
|
|
$56 = ((($scroll)) + 8|0);
|
|
$57 = +HEAPF32[$56>>2];
|
|
$58 = ((($button)) + 8|0);
|
|
$59 = +HEAPF32[$58>>2];
|
|
$60 = 2.0 * $59;
|
|
$61 = $57 - $60;
|
|
$scroll_w = $61;
|
|
$62 = $6;
|
|
$63 = $7;
|
|
$64 = $62 < $63;
|
|
$65 = $6;
|
|
$66 = $7;
|
|
$67 = $64 ? $65 : $66;
|
|
$scroll_step = $67;
|
|
$68 = +HEAPF32[$scroll>>2];
|
|
HEAPF32[$button>>2] = $68;
|
|
$69 = $2;
|
|
$70 = $8;
|
|
$71 = ((($70)) + 416|0);
|
|
$72 = HEAP32[$71>>2]|0;
|
|
$73 = $8;
|
|
$74 = ((($73)) + 284|0);
|
|
$75 = $9;
|
|
$76 = $10;
|
|
;HEAP32[$button$byval_copy>>2]=HEAP32[$button>>2]|0;HEAP32[$button$byval_copy+4>>2]=HEAP32[$button+4>>2]|0;HEAP32[$button$byval_copy+8>>2]=HEAP32[$button+8>>2]|0;HEAP32[$button$byval_copy+12>>2]=HEAP32[$button+12>>2]|0;
|
|
$77 = (_nk_do_button_symbol($ws,$69,$button$byval_copy,$72,1,$74,$75,$76)|0);
|
|
$78 = ($77|0)!=(0);
|
|
if ($78) {
|
|
$79 = $4;
|
|
$80 = $scroll_step;
|
|
$81 = $79 - $80;
|
|
$4 = $81;
|
|
}
|
|
$82 = +HEAPF32[$scroll>>2];
|
|
$83 = ((($scroll)) + 8|0);
|
|
$84 = +HEAPF32[$83>>2];
|
|
$85 = $82 + $84;
|
|
$86 = ((($button)) + 8|0);
|
|
$87 = +HEAPF32[$86>>2];
|
|
$88 = $85 - $87;
|
|
HEAPF32[$button>>2] = $88;
|
|
$89 = $2;
|
|
$90 = $8;
|
|
$91 = ((($90)) + 412|0);
|
|
$92 = HEAP32[$91>>2]|0;
|
|
$93 = $8;
|
|
$94 = ((($93)) + 156|0);
|
|
$95 = $9;
|
|
$96 = $10;
|
|
;HEAP32[$button$byval_copy2>>2]=HEAP32[$button>>2]|0;HEAP32[$button$byval_copy2+4>>2]=HEAP32[$button+4>>2]|0;HEAP32[$button$byval_copy2+8>>2]=HEAP32[$button+8>>2]|0;HEAP32[$button$byval_copy2+12>>2]=HEAP32[$button+12>>2]|0;
|
|
$97 = (_nk_do_button_symbol($ws,$89,$button$byval_copy2,$92,1,$94,$95,$96)|0);
|
|
$98 = ($97|0)!=(0);
|
|
if ($98) {
|
|
$99 = $4;
|
|
$100 = $scroll_step;
|
|
$101 = $99 + $100;
|
|
$4 = $101;
|
|
}
|
|
$102 = +HEAPF32[$scroll>>2];
|
|
$103 = ((($button)) + 8|0);
|
|
$104 = +HEAPF32[$103>>2];
|
|
$105 = $102 + $104;
|
|
HEAPF32[$scroll>>2] = $105;
|
|
$106 = $scroll_w;
|
|
$107 = ((($scroll)) + 8|0);
|
|
HEAPF32[$107>>2] = $106;
|
|
}
|
|
$108 = $6;
|
|
$109 = ((($scroll)) + 8|0);
|
|
$110 = +HEAPF32[$109>>2];
|
|
$111 = $108 < $110;
|
|
$112 = $6;
|
|
$113 = ((($scroll)) + 8|0);
|
|
$114 = +HEAPF32[$113>>2];
|
|
$115 = $111 ? $112 : $114;
|
|
$scroll_step = $115;
|
|
$116 = $4;
|
|
$117 = $5;
|
|
$118 = ((($scroll)) + 8|0);
|
|
$119 = +HEAPF32[$118>>2];
|
|
$120 = $117 - $119;
|
|
$121 = $116 < $120;
|
|
if ($121) {
|
|
$122 = $4;
|
|
$128 = $122;
|
|
} else {
|
|
$123 = $5;
|
|
$124 = ((($scroll)) + 8|0);
|
|
$125 = +HEAPF32[$124>>2];
|
|
$126 = $123 - $125;
|
|
$128 = $126;
|
|
}
|
|
$127 = $128 < 0.0;
|
|
do {
|
|
if ($127) {
|
|
$140 = 0.0;
|
|
} else {
|
|
$129 = $4;
|
|
$130 = $5;
|
|
$131 = ((($scroll)) + 8|0);
|
|
$132 = +HEAPF32[$131>>2];
|
|
$133 = $130 - $132;
|
|
$134 = $129 < $133;
|
|
if ($134) {
|
|
$135 = $4;
|
|
$140 = $135;
|
|
break;
|
|
} else {
|
|
$136 = $5;
|
|
$137 = ((($scroll)) + 8|0);
|
|
$138 = +HEAPF32[$137>>2];
|
|
$139 = $136 - $138;
|
|
$140 = $139;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$scroll_offset = $140;
|
|
$141 = ((($scroll)) + 8|0);
|
|
$142 = +HEAPF32[$141>>2];
|
|
$143 = $5;
|
|
$144 = $142 / $143;
|
|
$scroll_ratio = $144;
|
|
$145 = $scroll_offset;
|
|
$146 = $5;
|
|
$147 = $145 / $146;
|
|
$scroll_off = $147;
|
|
$148 = $scroll_ratio;
|
|
$149 = ((($scroll)) + 8|0);
|
|
$150 = +HEAPF32[$149>>2];
|
|
$151 = $148 * $150;
|
|
$152 = $8;
|
|
$153 = ((($152)) + 128|0);
|
|
$154 = +HEAPF32[$153>>2];
|
|
$155 = 2.0 * $154;
|
|
$156 = $8;
|
|
$157 = ((($156)) + 144|0);
|
|
$158 = +HEAPF32[$157>>2];
|
|
$159 = 2.0 * $158;
|
|
$160 = $155 + $159;
|
|
$161 = $151 - $160;
|
|
$162 = ((($cursor)) + 8|0);
|
|
HEAPF32[$162>>2] = $161;
|
|
$163 = +HEAPF32[$scroll>>2];
|
|
$164 = $scroll_off;
|
|
$165 = ((($scroll)) + 8|0);
|
|
$166 = +HEAPF32[$165>>2];
|
|
$167 = $164 * $166;
|
|
$168 = $163 + $167;
|
|
$169 = $8;
|
|
$170 = ((($169)) + 128|0);
|
|
$171 = +HEAPF32[$170>>2];
|
|
$172 = $168 + $171;
|
|
$173 = $8;
|
|
$174 = ((($173)) + 144|0);
|
|
$175 = +HEAPF32[$174>>2];
|
|
$176 = $172 + $175;
|
|
HEAPF32[$cursor>>2] = $176;
|
|
$177 = ((($scroll)) + 12|0);
|
|
$178 = +HEAPF32[$177>>2];
|
|
$179 = $8;
|
|
$180 = ((($179)) + 128|0);
|
|
$181 = +HEAPF32[$180>>2];
|
|
$182 = 2.0 * $181;
|
|
$183 = $8;
|
|
$184 = ((($183)) + 144|0);
|
|
$185 = ((($184)) + 4|0);
|
|
$186 = +HEAPF32[$185>>2];
|
|
$187 = 2.0 * $186;
|
|
$188 = $182 + $187;
|
|
$189 = $178 - $188;
|
|
$190 = ((($cursor)) + 12|0);
|
|
HEAPF32[$190>>2] = $189;
|
|
$191 = ((($scroll)) + 4|0);
|
|
$192 = +HEAPF32[$191>>2];
|
|
$193 = $8;
|
|
$194 = ((($193)) + 128|0);
|
|
$195 = +HEAPF32[$194>>2];
|
|
$196 = $192 + $195;
|
|
$197 = $8;
|
|
$198 = ((($197)) + 144|0);
|
|
$199 = ((($198)) + 4|0);
|
|
$200 = +HEAPF32[$199>>2];
|
|
$201 = $196 + $200;
|
|
$202 = ((($cursor)) + 4|0);
|
|
HEAPF32[$202>>2] = $201;
|
|
$203 = $1;
|
|
$204 = $9;
|
|
$205 = $3;
|
|
$206 = $scroll_offset;
|
|
$207 = $5;
|
|
$208 = $scroll_step;
|
|
;HEAP32[$scroll$byval_copy>>2]=HEAP32[$scroll>>2]|0;HEAP32[$scroll$byval_copy+4>>2]=HEAP32[$scroll+4>>2]|0;HEAP32[$scroll$byval_copy+8>>2]=HEAP32[$scroll+8>>2]|0;HEAP32[$scroll$byval_copy+12>>2]=HEAP32[$scroll+12>>2]|0;
|
|
;HEAP32[$cursor$byval_copy>>2]=HEAP32[$cursor>>2]|0;HEAP32[$cursor$byval_copy+4>>2]=HEAP32[$cursor+4>>2]|0;HEAP32[$cursor$byval_copy+8>>2]=HEAP32[$cursor+8>>2]|0;HEAP32[$cursor$byval_copy+12>>2]=HEAP32[$cursor+12>>2]|0;
|
|
$209 = (+_nk_scrollbar_behavior($203,$204,$205,$scroll$byval_copy,$cursor$byval_copy,$206,$207,$208,1));
|
|
$scroll_offset = $209;
|
|
$210 = $scroll_offset;
|
|
$211 = $5;
|
|
$212 = $210 / $211;
|
|
$scroll_off = $212;
|
|
$213 = +HEAPF32[$scroll>>2];
|
|
$214 = $scroll_off;
|
|
$215 = ((($scroll)) + 8|0);
|
|
$216 = +HEAPF32[$215>>2];
|
|
$217 = $214 * $216;
|
|
$218 = $213 + $217;
|
|
HEAPF32[$cursor>>2] = $218;
|
|
$219 = $8;
|
|
$220 = ((($219)) + 424|0);
|
|
$221 = HEAP32[$220>>2]|0;
|
|
$222 = ($221|0)!=(0|0);
|
|
if ($222) {
|
|
$223 = $8;
|
|
$224 = ((($223)) + 424|0);
|
|
$225 = HEAP32[$224>>2]|0;
|
|
$226 = $2;
|
|
$227 = $8;
|
|
$228 = ((($227)) + 420|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$228>>2]|0;
|
|
FUNCTION_TABLE_vii[$225 & 31]($226,$$byval_copy);
|
|
}
|
|
$229 = $2;
|
|
$230 = $1;
|
|
$231 = HEAP32[$230>>2]|0;
|
|
$232 = $8;
|
|
_nk_draw_scrollbar($229,$231,$232,$scroll,$cursor);
|
|
$233 = $8;
|
|
$234 = ((($233)) + 428|0);
|
|
$235 = HEAP32[$234>>2]|0;
|
|
$236 = ($235|0)!=(0|0);
|
|
if ($236) {
|
|
$237 = $8;
|
|
$238 = ((($237)) + 428|0);
|
|
$239 = HEAP32[$238>>2]|0;
|
|
$240 = $2;
|
|
$241 = $8;
|
|
$242 = ((($241)) + 420|0);
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$242>>2]|0;
|
|
FUNCTION_TABLE_vii[$239 & 31]($240,$$byval_copy3);
|
|
}
|
|
$243 = $scroll_offset;
|
|
$0 = $243;
|
|
$244 = $0;
|
|
STACKTOP = sp;return (+$244);
|
|
}
|
|
function _nk_command_buffer_reset($buffer) {
|
|
$buffer = $buffer|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $buffer;
|
|
$1 = $0;
|
|
$2 = ($1|0)!=(0|0);
|
|
if (!($2)) {
|
|
___assert_fail((13445|0),(13400|0),4988,(31485|0));
|
|
// unreachable;
|
|
}
|
|
$3 = $0;
|
|
$4 = ($3|0)!=(0|0);
|
|
if (!($4)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$5 = $0;
|
|
$6 = ((($5)) + 28|0);
|
|
HEAP32[$6>>2] = 0;
|
|
$7 = $0;
|
|
$8 = ((($7)) + 32|0);
|
|
HEAP32[$8>>2] = 0;
|
|
$9 = $0;
|
|
$10 = ((($9)) + 36|0);
|
|
HEAP32[$10>>2] = 0;
|
|
$11 = $0;
|
|
$12 = ((($11)) + 4|0);
|
|
;HEAP32[$12>>2]=HEAP32[8>>2]|0;HEAP32[$12+4>>2]=HEAP32[8+4>>2]|0;HEAP32[$12+8>>2]=HEAP32[8+8>>2]|0;HEAP32[$12+12>>2]=HEAP32[8+12>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_finish($ctx,$win) {
|
|
$ctx = $ctx|0;
|
|
$win = $win|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
|
|
var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $8 = 0, $9 = 0, $buf = 0, $last = 0, $memory = 0, $or$cond = 0;
|
|
var $parent_last = 0, $sublast = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $ctx;
|
|
$1 = $win;
|
|
$2 = $0;
|
|
$3 = ($2|0)!=(0|0);
|
|
if (!($3)) {
|
|
___assert_fail((14913|0),(13400|0),14630,(31509|0));
|
|
// unreachable;
|
|
}
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((28440|0),(13400|0),14631,(31509|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $0;
|
|
$7 = ($6|0)!=(0|0);
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
$or$cond = $7 & $9;
|
|
if (!($or$cond)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$10 = $0;
|
|
$11 = ((($10)) + 5596|0);
|
|
$12 = ((($11)) + 44|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = $1;
|
|
$15 = ((($14)) + 32|0);
|
|
$16 = ((($15)) + 32|0);
|
|
HEAP32[$16>>2] = $13;
|
|
$17 = $1;
|
|
$18 = ((($17)) + 72|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = ((($19)) + 328|0);
|
|
$21 = ((($20)) + 16|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = ($22|0)!=(0);
|
|
if (!($23)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$24 = $1;
|
|
$25 = ((($24)) + 72|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$27 = ((($26)) + 328|0);
|
|
$buf = $27;
|
|
$28 = $0;
|
|
$29 = ((($28)) + 5596|0);
|
|
$30 = ((($29)) + 32|0);
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$memory = $31;
|
|
$32 = $memory;
|
|
$33 = $buf;
|
|
$34 = ((($33)) + 4|0);
|
|
$35 = HEAP32[$34>>2]|0;
|
|
$36 = (($32) + ($35)|0);
|
|
$parent_last = $36;
|
|
$37 = $memory;
|
|
$38 = $buf;
|
|
$39 = ((($38)) + 8|0);
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$41 = (($37) + ($40)|0);
|
|
$sublast = $41;
|
|
$42 = $memory;
|
|
$43 = $1;
|
|
$44 = ((($43)) + 32|0);
|
|
$45 = ((($44)) + 36|0);
|
|
$46 = HEAP32[$45>>2]|0;
|
|
$47 = (($42) + ($46)|0);
|
|
$last = $47;
|
|
$48 = $buf;
|
|
$49 = ((($48)) + 12|0);
|
|
$50 = HEAP32[$49>>2]|0;
|
|
$51 = $parent_last;
|
|
$52 = ((($51)) + 4|0);
|
|
HEAP32[$52>>2] = $50;
|
|
$53 = $last;
|
|
$54 = ((($53)) + 4|0);
|
|
$55 = HEAP32[$54>>2]|0;
|
|
$56 = $sublast;
|
|
$57 = ((($56)) + 4|0);
|
|
HEAP32[$57>>2] = $55;
|
|
$58 = $buf;
|
|
$59 = HEAP32[$58>>2]|0;
|
|
$60 = $last;
|
|
$61 = ((($60)) + 4|0);
|
|
HEAP32[$61>>2] = $59;
|
|
$62 = $buf;
|
|
$63 = ((($62)) + 8|0);
|
|
$64 = HEAP32[$63>>2]|0;
|
|
$65 = $1;
|
|
$66 = ((($65)) + 32|0);
|
|
$67 = ((($66)) + 36|0);
|
|
HEAP32[$67>>2] = $64;
|
|
$68 = $buf;
|
|
$69 = ((($68)) + 12|0);
|
|
$70 = HEAP32[$69>>2]|0;
|
|
$71 = $1;
|
|
$72 = ((($71)) + 32|0);
|
|
$73 = ((($72)) + 32|0);
|
|
HEAP32[$73>>2] = $70;
|
|
$74 = $buf;
|
|
$75 = ((($74)) + 16|0);
|
|
HEAP32[$75>>2] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_scrollbar_behavior($state,$in,$has_scrolling,$scroll,$cursor,$scroll_offset,$target,$scroll_step,$o) {
|
|
$state = $state|0;
|
|
$in = $in|0;
|
|
$has_scrolling = $has_scrolling|0;
|
|
$scroll = $scroll|0;
|
|
$cursor = $cursor|0;
|
|
$scroll_offset = +$scroll_offset;
|
|
$target = +$target;
|
|
$scroll_step = +$scroll_step;
|
|
$o = $o|0;
|
|
var $0 = 0.0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0, $106 = 0.0, $107 = 0.0, $108 = 0, $109 = 0.0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0.0, $113 = 0, $114 = 0.0, $115 = 0.0;
|
|
var $116 = 0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0, $123 = 0.0, $124 = 0.0, $125 = 0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0, $131 = 0.0, $132 = 0.0, $133 = 0.0;
|
|
var $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0.0, $138 = 0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0.0, $142 = 0.0, $143 = 0, $144 = 0.0, $145 = 0.0, $146 = 0.0, $147 = 0, $148 = 0, $149 = 0, $15 = 0.0, $150 = 0, $151 = 0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0.0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0.0, $161 = 0, $162 = 0.0, $163 = 0.0, $164 = 0, $165 = 0, $166 = 0, $167 = 0.0, $168 = 0.0, $169 = 0.0, $17 = 0;
|
|
var $170 = 0.0, $171 = 0, $172 = 0, $173 = 0.0, $174 = 0.0, $175 = 0, $176 = 0.0, $177 = 0.0, $178 = 0, $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0, $182 = 0.0, $183 = 0.0, $184 = 0, $185 = 0.0, $186 = 0.0, $187 = 0.0, $188 = 0;
|
|
var $189 = 0.0, $19 = 0, $190 = 0.0, $191 = 0, $192 = 0.0, $193 = 0.0, $194 = 0, $195 = 0.0, $196 = 0.0, $197 = 0.0, $198 = 0, $199 = 0.0, $2 = 0, $20 = 0, $200 = 0.0, $201 = 0, $202 = 0.0, $203 = 0.0, $204 = 0, $205 = 0.0;
|
|
var $206 = 0.0, $207 = 0, $208 = 0.0, $209 = 0.0, $21 = 0, $210 = 0.0, $211 = 0, $212 = 0.0, $213 = 0.0, $214 = 0, $215 = 0.0, $216 = 0.0, $217 = 0, $218 = 0.0, $219 = 0.0, $22 = 0, $220 = 0.0, $221 = 0, $222 = 0, $223 = 0;
|
|
var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0.0, $238 = 0.0, $24 = 0, $25 = 0, $26 = 0, $27 = 0;
|
|
var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0.0;
|
|
var $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0.0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0;
|
|
var $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0;
|
|
var $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0.0, $95 = 0.0, $96 = 0, $97 = 0.0, $98 = 0.0, $99 = 0.0, $cursor$byval_copy = 0;
|
|
var $cursor_x = 0.0, $cursor_y = 0.0, $delta = 0.0, $left_mouse_click_in_cursor = 0, $left_mouse_down = 0, $or$cond = 0, $pixel = 0.0, $scroll$byval_copy = 0, $scroll$byval_copy2 = 0, $scroll$byval_copy3 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$scroll$byval_copy3 = sp + 104|0;
|
|
$scroll$byval_copy2 = sp + 88|0;
|
|
$scroll$byval_copy = sp + 72|0;
|
|
$cursor$byval_copy = sp + 56|0;
|
|
$1 = $state;
|
|
$2 = $in;
|
|
$3 = $has_scrolling;
|
|
$4 = $scroll_offset;
|
|
$5 = $target;
|
|
$6 = $scroll_step;
|
|
$7 = $o;
|
|
$8 = $1;
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$10 = $9 & 2;
|
|
$11 = ($10|0)!=(0);
|
|
$12 = $1;
|
|
if ($11) {
|
|
HEAP32[$12>>2] = 6;
|
|
} else {
|
|
HEAP32[$12>>2] = 4;
|
|
}
|
|
$13 = $2;
|
|
$14 = ($13|0)!=(0|0);
|
|
if (!($14)) {
|
|
$15 = $4;
|
|
$0 = $15;
|
|
$238 = $0;
|
|
STACKTOP = sp;return (+$238);
|
|
}
|
|
$16 = $2;
|
|
$17 = ((($16)) + 220|0);
|
|
$18 = HEAP32[$17>>2]|0;
|
|
$left_mouse_down = $18;
|
|
$19 = $2;
|
|
;HEAP32[$cursor$byval_copy>>2]=HEAP32[$cursor>>2]|0;HEAP32[$cursor$byval_copy+4>>2]=HEAP32[$cursor+4>>2]|0;HEAP32[$cursor$byval_copy+8>>2]=HEAP32[$cursor+8>>2]|0;HEAP32[$cursor$byval_copy+12>>2]=HEAP32[$cursor+12>>2]|0;
|
|
$20 = (_nk_input_has_mouse_click_down_in_rect($19,0,$cursor$byval_copy,1)|0);
|
|
$left_mouse_click_in_cursor = $20;
|
|
$21 = $2;
|
|
;HEAP32[$scroll$byval_copy>>2]=HEAP32[$scroll>>2]|0;HEAP32[$scroll$byval_copy+4>>2]=HEAP32[$scroll+4>>2]|0;HEAP32[$scroll$byval_copy+8>>2]=HEAP32[$scroll+8>>2]|0;HEAP32[$scroll$byval_copy+12>>2]=HEAP32[$scroll+12>>2]|0;
|
|
$22 = (_nk_input_is_mouse_hovering_rect($21,$scroll$byval_copy)|0);
|
|
$23 = ($22|0)!=(0);
|
|
if ($23) {
|
|
$24 = $1;
|
|
HEAP32[$24>>2] = 18;
|
|
}
|
|
$25 = $left_mouse_down;
|
|
$26 = ($25|0)!=(0);
|
|
$27 = $left_mouse_click_in_cursor;
|
|
$28 = ($27|0)!=(0);
|
|
$or$cond = $26 & $28;
|
|
do {
|
|
if ($or$cond) {
|
|
$29 = $1;
|
|
HEAP32[$29>>2] = 34;
|
|
$30 = $7;
|
|
$31 = ($30|0)==(0);
|
|
$32 = $2;
|
|
$33 = ((($32)) + 220|0);
|
|
$34 = ((($33)) + 64|0);
|
|
if ($31) {
|
|
$35 = ((($34)) + 4|0);
|
|
$36 = +HEAPF32[$35>>2];
|
|
$pixel = $36;
|
|
$37 = $pixel;
|
|
$38 = ((($scroll)) + 12|0);
|
|
$39 = +HEAPF32[$38>>2];
|
|
$40 = $37 / $39;
|
|
$41 = $5;
|
|
$42 = $40 * $41;
|
|
$delta = $42;
|
|
$43 = $4;
|
|
$44 = $delta;
|
|
$45 = $43 + $44;
|
|
$46 = $5;
|
|
$47 = ((($scroll)) + 12|0);
|
|
$48 = +HEAPF32[$47>>2];
|
|
$49 = $46 - $48;
|
|
$50 = $45 < $49;
|
|
if ($50) {
|
|
$51 = $4;
|
|
$52 = $delta;
|
|
$53 = $51 + $52;
|
|
$59 = $53;
|
|
} else {
|
|
$54 = $5;
|
|
$55 = ((($scroll)) + 12|0);
|
|
$56 = +HEAPF32[$55>>2];
|
|
$57 = $54 - $56;
|
|
$59 = $57;
|
|
}
|
|
$58 = $59 < 0.0;
|
|
do {
|
|
if ($58) {
|
|
$75 = 0.0;
|
|
} else {
|
|
$60 = $4;
|
|
$61 = $delta;
|
|
$62 = $60 + $61;
|
|
$63 = $5;
|
|
$64 = ((($scroll)) + 12|0);
|
|
$65 = +HEAPF32[$64>>2];
|
|
$66 = $63 - $65;
|
|
$67 = $62 < $66;
|
|
if ($67) {
|
|
$68 = $4;
|
|
$69 = $delta;
|
|
$70 = $68 + $69;
|
|
$75 = $70;
|
|
break;
|
|
} else {
|
|
$71 = $5;
|
|
$72 = ((($scroll)) + 12|0);
|
|
$73 = +HEAPF32[$72>>2];
|
|
$74 = $71 - $73;
|
|
$75 = $74;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$4 = $75;
|
|
$76 = ((($scroll)) + 4|0);
|
|
$77 = +HEAPF32[$76>>2];
|
|
$78 = $4;
|
|
$79 = $5;
|
|
$80 = $78 / $79;
|
|
$81 = ((($scroll)) + 12|0);
|
|
$82 = +HEAPF32[$81>>2];
|
|
$83 = $80 * $82;
|
|
$84 = $77 + $83;
|
|
$cursor_y = $84;
|
|
$85 = $cursor_y;
|
|
$86 = ((($cursor)) + 12|0);
|
|
$87 = +HEAPF32[$86>>2];
|
|
$88 = $87 / 2.0;
|
|
$89 = $85 + $88;
|
|
$90 = $2;
|
|
$91 = ((($90)) + 220|0);
|
|
$92 = ((($91)) + 8|0);
|
|
$93 = ((($92)) + 4|0);
|
|
HEAPF32[$93>>2] = $89;
|
|
break;
|
|
} else {
|
|
$94 = +HEAPF32[$34>>2];
|
|
$pixel = $94;
|
|
$95 = $pixel;
|
|
$96 = ((($scroll)) + 8|0);
|
|
$97 = +HEAPF32[$96>>2];
|
|
$98 = $95 / $97;
|
|
$99 = $5;
|
|
$100 = $98 * $99;
|
|
$delta = $100;
|
|
$101 = $4;
|
|
$102 = $delta;
|
|
$103 = $101 + $102;
|
|
$104 = $5;
|
|
$105 = ((($scroll)) + 8|0);
|
|
$106 = +HEAPF32[$105>>2];
|
|
$107 = $104 - $106;
|
|
$108 = $103 < $107;
|
|
if ($108) {
|
|
$109 = $4;
|
|
$110 = $delta;
|
|
$111 = $109 + $110;
|
|
$117 = $111;
|
|
} else {
|
|
$112 = $5;
|
|
$113 = ((($scroll)) + 8|0);
|
|
$114 = +HEAPF32[$113>>2];
|
|
$115 = $112 - $114;
|
|
$117 = $115;
|
|
}
|
|
$116 = $117 < 0.0;
|
|
do {
|
|
if ($116) {
|
|
$133 = 0.0;
|
|
} else {
|
|
$118 = $4;
|
|
$119 = $delta;
|
|
$120 = $118 + $119;
|
|
$121 = $5;
|
|
$122 = ((($scroll)) + 8|0);
|
|
$123 = +HEAPF32[$122>>2];
|
|
$124 = $121 - $123;
|
|
$125 = $120 < $124;
|
|
if ($125) {
|
|
$126 = $4;
|
|
$127 = $delta;
|
|
$128 = $126 + $127;
|
|
$133 = $128;
|
|
break;
|
|
} else {
|
|
$129 = $5;
|
|
$130 = ((($scroll)) + 8|0);
|
|
$131 = +HEAPF32[$130>>2];
|
|
$132 = $129 - $131;
|
|
$133 = $132;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$4 = $133;
|
|
$134 = +HEAPF32[$scroll>>2];
|
|
$135 = $4;
|
|
$136 = $5;
|
|
$137 = $135 / $136;
|
|
$138 = ((($scroll)) + 8|0);
|
|
$139 = +HEAPF32[$138>>2];
|
|
$140 = $137 * $139;
|
|
$141 = $134 + $140;
|
|
$cursor_x = $141;
|
|
$142 = $cursor_x;
|
|
$143 = ((($cursor)) + 8|0);
|
|
$144 = +HEAPF32[$143>>2];
|
|
$145 = $144 / 2.0;
|
|
$146 = $142 + $145;
|
|
$147 = $2;
|
|
$148 = ((($147)) + 220|0);
|
|
$149 = ((($148)) + 8|0);
|
|
HEAPF32[$149>>2] = $146;
|
|
break;
|
|
}
|
|
} else {
|
|
$150 = $3;
|
|
$151 = ($150|0)!=(0);
|
|
if ($151) {
|
|
$152 = $2;
|
|
$153 = ((($152)) + 220|0);
|
|
$154 = ((($153)) + 72|0);
|
|
$155 = +HEAPF32[$154>>2];
|
|
$156 = $155 < 0.0;
|
|
if (!($156)) {
|
|
$157 = $2;
|
|
$158 = ((($157)) + 220|0);
|
|
$159 = ((($158)) + 72|0);
|
|
$160 = +HEAPF32[$159>>2];
|
|
$161 = $160 > 0.0;
|
|
if (!($161)) {
|
|
break;
|
|
}
|
|
}
|
|
$162 = $4;
|
|
$163 = $6;
|
|
$164 = $2;
|
|
$165 = ((($164)) + 220|0);
|
|
$166 = ((($165)) + 72|0);
|
|
$167 = +HEAPF32[$166>>2];
|
|
$168 = -$167;
|
|
$169 = $163 * $168;
|
|
$170 = $162 + $169;
|
|
$4 = $170;
|
|
$171 = $7;
|
|
$172 = ($171|0)==(0);
|
|
$173 = $4;
|
|
$174 = $5;
|
|
if ($172) {
|
|
$175 = ((($scroll)) + 12|0);
|
|
$176 = +HEAPF32[$175>>2];
|
|
$177 = $174 - $176;
|
|
$178 = $173 < $177;
|
|
if ($178) {
|
|
$179 = $4;
|
|
$185 = $179;
|
|
} else {
|
|
$180 = $5;
|
|
$181 = ((($scroll)) + 12|0);
|
|
$182 = +HEAPF32[$181>>2];
|
|
$183 = $180 - $182;
|
|
$185 = $183;
|
|
}
|
|
$184 = $185 < 0.0;
|
|
do {
|
|
if ($184) {
|
|
$197 = 0.0;
|
|
} else {
|
|
$186 = $4;
|
|
$187 = $5;
|
|
$188 = ((($scroll)) + 12|0);
|
|
$189 = +HEAPF32[$188>>2];
|
|
$190 = $187 - $189;
|
|
$191 = $186 < $190;
|
|
if ($191) {
|
|
$192 = $4;
|
|
$197 = $192;
|
|
break;
|
|
} else {
|
|
$193 = $5;
|
|
$194 = ((($scroll)) + 12|0);
|
|
$195 = +HEAPF32[$194>>2];
|
|
$196 = $193 - $195;
|
|
$197 = $196;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$4 = $197;
|
|
break;
|
|
} else {
|
|
$198 = ((($scroll)) + 8|0);
|
|
$199 = +HEAPF32[$198>>2];
|
|
$200 = $174 - $199;
|
|
$201 = $173 < $200;
|
|
if ($201) {
|
|
$202 = $4;
|
|
$208 = $202;
|
|
} else {
|
|
$203 = $5;
|
|
$204 = ((($scroll)) + 8|0);
|
|
$205 = +HEAPF32[$204>>2];
|
|
$206 = $203 - $205;
|
|
$208 = $206;
|
|
}
|
|
$207 = $208 < 0.0;
|
|
do {
|
|
if ($207) {
|
|
$220 = 0.0;
|
|
} else {
|
|
$209 = $4;
|
|
$210 = $5;
|
|
$211 = ((($scroll)) + 8|0);
|
|
$212 = +HEAPF32[$211>>2];
|
|
$213 = $210 - $212;
|
|
$214 = $209 < $213;
|
|
if ($214) {
|
|
$215 = $4;
|
|
$220 = $215;
|
|
break;
|
|
} else {
|
|
$216 = $5;
|
|
$217 = ((($scroll)) + 8|0);
|
|
$218 = +HEAPF32[$217>>2];
|
|
$219 = $216 - $218;
|
|
$220 = $219;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$4 = $220;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$221 = $1;
|
|
$222 = HEAP32[$221>>2]|0;
|
|
$223 = $222 & 16;
|
|
$224 = ($223|0)!=(0);
|
|
if ($224) {
|
|
$225 = $2;
|
|
;HEAP32[$scroll$byval_copy2>>2]=HEAP32[$scroll>>2]|0;HEAP32[$scroll$byval_copy2+4>>2]=HEAP32[$scroll+4>>2]|0;HEAP32[$scroll$byval_copy2+8>>2]=HEAP32[$scroll+8>>2]|0;HEAP32[$scroll$byval_copy2+12>>2]=HEAP32[$scroll+12>>2]|0;
|
|
$226 = (_nk_input_is_mouse_prev_hovering_rect($225,$scroll$byval_copy2)|0);
|
|
$227 = ($226|0)!=(0);
|
|
if ($227) {
|
|
label = 49;
|
|
} else {
|
|
$228 = $1;
|
|
$229 = HEAP32[$228>>2]|0;
|
|
$230 = $229 | 8;
|
|
HEAP32[$228>>2] = $230;
|
|
}
|
|
} else {
|
|
label = 49;
|
|
}
|
|
if ((label|0) == 49) {
|
|
$231 = $2;
|
|
;HEAP32[$scroll$byval_copy3>>2]=HEAP32[$scroll>>2]|0;HEAP32[$scroll$byval_copy3+4>>2]=HEAP32[$scroll+4>>2]|0;HEAP32[$scroll$byval_copy3+8>>2]=HEAP32[$scroll+8>>2]|0;HEAP32[$scroll$byval_copy3+12>>2]=HEAP32[$scroll+12>>2]|0;
|
|
$232 = (_nk_input_is_mouse_prev_hovering_rect($231,$scroll$byval_copy3)|0);
|
|
$233 = ($232|0)!=(0);
|
|
if ($233) {
|
|
$234 = $1;
|
|
$235 = HEAP32[$234>>2]|0;
|
|
$236 = $235 | 64;
|
|
HEAP32[$234>>2] = $236;
|
|
}
|
|
}
|
|
$237 = $4;
|
|
$0 = $237;
|
|
$238 = $0;
|
|
STACKTOP = sp;return (+$238);
|
|
}
|
|
function _nk_draw_scrollbar($out,$state,$style,$bounds,$scroll) {
|
|
$out = $out|0;
|
|
$state = $state|0;
|
|
$style = $style|0;
|
|
$bounds = $bounds|0;
|
|
$scroll = $scroll|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy10 = 0, $$byval_copy11 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $$byval_copy7 = 0, $$byval_copy8 = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0;
|
|
var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0;
|
|
var $34 = 0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0;
|
|
var $52 = 0.0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0.0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $7 = 0, $8 = 0, $9 = 0, $background = 0;
|
|
var $cursor = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 208|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy11 = sp + 176|0;
|
|
$$byval_copy10 = sp + 204|0;
|
|
$$byval_copy9 = sp + 160|0;
|
|
$$byval_copy8 = sp + 144|0;
|
|
$$byval_copy7 = sp + 200|0;
|
|
$$byval_copy6 = sp + 128|0;
|
|
$$byval_copy5 = sp + 112|0;
|
|
$$byval_copy4 = sp + 196|0;
|
|
$$byval_copy3 = sp + 96|0;
|
|
$$byval_copy2 = sp + 80|0;
|
|
$$byval_copy1 = sp + 192|0;
|
|
$$byval_copy = sp + 64|0;
|
|
$5 = sp + 16|0;
|
|
$6 = sp;
|
|
$0 = $out;
|
|
$1 = $state;
|
|
$2 = $style;
|
|
$3 = $bounds;
|
|
$4 = $scroll;
|
|
$7 = $1;
|
|
$8 = $7 & 32;
|
|
$9 = ($8|0)!=(0);
|
|
do {
|
|
if ($9) {
|
|
$10 = $2;
|
|
$11 = ((($10)) + 40|0);
|
|
$background = $11;
|
|
$12 = $2;
|
|
$13 = ((($12)) + 104|0);
|
|
$cursor = $13;
|
|
} else {
|
|
$14 = $1;
|
|
$15 = $14 & 16;
|
|
$16 = ($15|0)!=(0);
|
|
$17 = $2;
|
|
if ($16) {
|
|
$18 = ((($17)) + 20|0);
|
|
$background = $18;
|
|
$19 = $2;
|
|
$20 = ((($19)) + 84|0);
|
|
$cursor = $20;
|
|
break;
|
|
} else {
|
|
$background = $17;
|
|
$21 = $2;
|
|
$22 = ((($21)) + 64|0);
|
|
$cursor = $22;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$23 = $background;
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = ($24|0)==(0);
|
|
$26 = $0;
|
|
$27 = $3;
|
|
if ($25) {
|
|
$28 = $2;
|
|
$29 = ((($28)) + 132|0);
|
|
$30 = +HEAPF32[$29>>2];
|
|
$31 = $2;
|
|
$32 = ((($31)) + 60|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$27>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$27+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$27+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$27+12>>2]|0;
|
|
;HEAP8[$$byval_copy1>>0]=HEAP8[$32>>0]|0;HEAP8[$$byval_copy1+1>>0]=HEAP8[$32+1>>0]|0;HEAP8[$$byval_copy1+2>>0]=HEAP8[$32+2>>0]|0;HEAP8[$$byval_copy1+3>>0]=HEAP8[$32+3>>0]|0;
|
|
_nk_fill_rect($26,$$byval_copy,$30,$$byval_copy1);
|
|
$33 = $0;
|
|
$34 = $3;
|
|
$35 = $2;
|
|
$36 = ((($35)) + 128|0);
|
|
$37 = +HEAPF32[$36>>2];
|
|
;HEAP32[$$byval_copy2>>2]=HEAP32[$34>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$34+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$34+8>>2]|0;HEAP32[$$byval_copy2+12>>2]=HEAP32[$34+12>>2]|0;
|
|
_nk_shrink_rect($5,$$byval_copy2,$37);
|
|
$38 = $2;
|
|
$39 = ((($38)) + 132|0);
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = $background;
|
|
$42 = ((($41)) + 4|0);
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$5+8>>2]|0;HEAP32[$$byval_copy3+12>>2]=HEAP32[$5+12>>2]|0;
|
|
;HEAP8[$$byval_copy4>>0]=HEAP8[$42>>0]|0;HEAP8[$$byval_copy4+1>>0]=HEAP8[$42+1>>0]|0;HEAP8[$$byval_copy4+2>>0]=HEAP8[$42+2>>0]|0;HEAP8[$$byval_copy4+3>>0]=HEAP8[$42+3>>0]|0;
|
|
_nk_fill_rect($33,$$byval_copy3,$40,$$byval_copy4);
|
|
} else {
|
|
$43 = $background;
|
|
$44 = ((($43)) + 4|0);
|
|
;HEAP32[$$byval_copy5>>2]=HEAP32[$27>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$27+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$27+8>>2]|0;HEAP32[$$byval_copy5+12>>2]=HEAP32[$27+12>>2]|0;
|
|
_nk_draw_image($26,$$byval_copy5,$44);
|
|
}
|
|
$45 = $background;
|
|
$46 = HEAP32[$45>>2]|0;
|
|
$47 = ($46|0)==(0);
|
|
$48 = $0;
|
|
$49 = $4;
|
|
if ($47) {
|
|
$50 = $2;
|
|
$51 = ((($50)) + 140|0);
|
|
$52 = +HEAPF32[$51>>2];
|
|
$53 = $2;
|
|
$54 = ((($53)) + 124|0);
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$49>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$49+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[$49+8>>2]|0;HEAP32[$$byval_copy6+12>>2]=HEAP32[$49+12>>2]|0;
|
|
;HEAP8[$$byval_copy7>>0]=HEAP8[$54>>0]|0;HEAP8[$$byval_copy7+1>>0]=HEAP8[$54+1>>0]|0;HEAP8[$$byval_copy7+2>>0]=HEAP8[$54+2>>0]|0;HEAP8[$$byval_copy7+3>>0]=HEAP8[$54+3>>0]|0;
|
|
_nk_fill_rect($48,$$byval_copy6,$52,$$byval_copy7);
|
|
$55 = $0;
|
|
$56 = $4;
|
|
$57 = $2;
|
|
$58 = ((($57)) + 136|0);
|
|
$59 = +HEAPF32[$58>>2];
|
|
;HEAP32[$$byval_copy8>>2]=HEAP32[$56>>2]|0;HEAP32[$$byval_copy8+4>>2]=HEAP32[$56+4>>2]|0;HEAP32[$$byval_copy8+8>>2]=HEAP32[$56+8>>2]|0;HEAP32[$$byval_copy8+12>>2]=HEAP32[$56+12>>2]|0;
|
|
_nk_shrink_rect($6,$$byval_copy8,$59);
|
|
$60 = $2;
|
|
$61 = ((($60)) + 140|0);
|
|
$62 = +HEAPF32[$61>>2];
|
|
$63 = $cursor;
|
|
$64 = ((($63)) + 4|0);
|
|
;HEAP32[$$byval_copy9>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy9+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$$byval_copy9+8>>2]=HEAP32[$6+8>>2]|0;HEAP32[$$byval_copy9+12>>2]=HEAP32[$6+12>>2]|0;
|
|
;HEAP8[$$byval_copy10>>0]=HEAP8[$64>>0]|0;HEAP8[$$byval_copy10+1>>0]=HEAP8[$64+1>>0]|0;HEAP8[$$byval_copy10+2>>0]=HEAP8[$64+2>>0]|0;HEAP8[$$byval_copy10+3>>0]=HEAP8[$64+3>>0]|0;
|
|
_nk_fill_rect($55,$$byval_copy9,$62,$$byval_copy10);
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$65 = $cursor;
|
|
$66 = ((($65)) + 4|0);
|
|
;HEAP32[$$byval_copy11>>2]=HEAP32[$49>>2]|0;HEAP32[$$byval_copy11+4>>2]=HEAP32[$49+4>>2]|0;HEAP32[$$byval_copy11+8>>2]=HEAP32[$49+8>>2]|0;HEAP32[$$byval_copy11+12>>2]=HEAP32[$49+12>>2]|0;
|
|
_nk_draw_image($48,$$byval_copy11,$66);
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_layout_widget_space($bounds,$ctx,$win,$modify) {
|
|
$bounds = $bounds|0;
|
|
$ctx = $ctx|0;
|
|
$win = $win|0;
|
|
$modify = $modify|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0, $103 = 0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0, $113 = 0, $114 = 0, $115 = 0.0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0.0, $127 = 0, $128 = 0, $129 = 0.0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0.0;
|
|
var $134 = 0.0, $135 = 0.0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0.0, $143 = 0, $144 = 0.0, $145 = 0.0, $146 = 0, $147 = 0, $148 = 0.0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
|
|
var $152 = 0.0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0.0, $158 = 0.0, $159 = 0.0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0.0, $169 = 0, $17 = 0;
|
|
var $170 = 0, $171 = 0.0, $172 = 0.0, $173 = 0, $174 = 0, $175 = 0.0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0.0, $181 = 0.0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0.0, $188 = 0;
|
|
var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0.0, $193 = 0.0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
|
|
var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0.0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0.0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0.0;
|
|
var $224 = 0.0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0.0, $23 = 0, $230 = 0.0, $231 = 0.0, $232 = 0.0, $233 = 0.0, $234 = 0.0, $235 = 0, $236 = 0, $237 = 0, $238 = 0.0, $239 = 0, $24 = 0, $240 = 0, $241 = 0.0;
|
|
var $242 = 0, $243 = 0, $244 = 0, $245 = 0.0, $246 = 0.0, $247 = 0.0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0.0, $252 = 0.0, $253 = 0, $254 = 0, $255 = 0, $256 = 0.0, $257 = 0, $258 = 0, $259 = 0, $26 = 0;
|
|
var $260 = 0, $261 = 0.0, $262 = 0.0, $263 = 0.0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0.0, $269 = 0.0, $27 = 0, $270 = 0.0, $271 = 0, $272 = 0, $273 = 0, $274 = 0.0, $275 = 0, $276 = 0, $277 = 0, $278 = 0.0;
|
|
var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0.0, $284 = 0.0, $285 = 0.0, $286 = 0, $287 = 0, $288 = 0.0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0.0, $293 = 0.0, $294 = 0, $295 = 0, $296 = 0;
|
|
var $297 = 0, $298 = 0, $299 = 0.0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0.0, $304 = 0.0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0.0, $311 = 0, $312 = 0, $313 = 0;
|
|
var $314 = 0.0, $315 = 0, $316 = 0, $317 = 0.0, $318 = 0.0, $319 = 0, $32 = 0, $320 = 0, $321 = 0.0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0.0, $327 = 0, $328 = 0, $329 = 0.0, $33 = 0, $330 = 0.0, $331 = 0;
|
|
var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0.0, $339 = 0, $34 = 0, $340 = 0.0, $341 = 0.0, $342 = 0, $343 = 0, $344 = 0.0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0.0, $35 = 0;
|
|
var $350 = 0.0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0.0, $36 = 0, $360 = 0, $361 = 0, $362 = 0.0, $363 = 0.0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0.0;
|
|
var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0.0, $376 = 0.0, $377 = 0.0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0;
|
|
var $387 = 0.0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0.0, $392 = 0, $393 = 0, $394 = 0.0, $395 = 0, $396 = 0, $397 = 0, $398 = 0.0, $399 = 0.0, $4 = 0, $40 = 0, $400 = 0.0, $401 = 0, $402 = 0, $403 = 0;
|
|
var $404 = 0, $405 = 0, $406 = 0.0, $407 = 0, $408 = 0.0, $409 = 0.0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0.0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0.0;
|
|
var $422 = 0.0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0.0, $428 = 0.0, $429 = 0.0, $43 = 0, $430 = 0.0, $431 = 0.0, $432 = 0.0, $433 = 0.0, $434 = 0, $435 = 0, $436 = 0.0, $437 = 0, $438 = 0, $439 = 0.0, $44 = 0.0;
|
|
var $440 = 0.0, $441 = 0, $442 = 0, $443 = 0.0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0.0, $449 = 0, $45 = 0.0, $450 = 0, $451 = 0.0, $452 = 0.0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0;
|
|
var $459 = 0, $46 = 0, $460 = 0.0, $461 = 0, $462 = 0.0, $463 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0;
|
|
var $6 = 0, $60 = 0.0, $61 = 0, $62 = 0, $63 = 0, $64 = 0.0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0.0, $77 = 0.0;
|
|
var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0, $87 = 0, $88 = 0.0, $89 = 0.0, $9 = 0, $90 = 0.0, $91 = 0, $92 = 0, $93 = 0, $94 = 0.0, $95 = 0;
|
|
var $96 = 0, $97 = 0, $98 = 0, $99 = 0.0, $item_offset = 0.0, $item_spacing = 0.0, $item_width = 0.0, $layout = 0, $or$cond = 0, $or$cond3 = 0, $padding = 0, $panel_padding = 0.0, $panel_space = 0.0, $panel_spacing = 0.0, $ratio = 0.0, $spacing = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$spacing = sp + 16|0;
|
|
$padding = sp + 8|0;
|
|
$0 = $bounds;
|
|
$1 = $ctx;
|
|
$2 = $win;
|
|
$3 = $modify;
|
|
$item_offset = 0.0;
|
|
$item_width = 0.0;
|
|
$item_spacing = 0.0;
|
|
$4 = $1;
|
|
$5 = ($4|0)!=(0|0);
|
|
if (!($5)) {
|
|
___assert_fail((14913|0),(13400|0),16478,(31549|0));
|
|
// unreachable;
|
|
}
|
|
$6 = $1;
|
|
$7 = ((($6)) + 11168|0);
|
|
$8 = HEAP32[$7>>2]|0;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
___assert_fail((28537|0),(13400|0),16479,(31549|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $1;
|
|
$11 = ((($10)) + 11168|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ((($12)) + 72|0);
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$15 = ($14|0)!=(0|0);
|
|
if (!($15)) {
|
|
___assert_fail((28516|0),(13400|0),16480,(31549|0));
|
|
// unreachable;
|
|
}
|
|
$16 = $1;
|
|
$17 = ($16|0)!=(0|0);
|
|
if (!($17)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$18 = $1;
|
|
$19 = ((($18)) + 11168|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = ($20|0)!=(0|0);
|
|
if (!($21)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$22 = $1;
|
|
$23 = ((($22)) + 11168|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = ((($24)) + 72|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$27 = ($26|0)!=(0|0);
|
|
if (!($27)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$28 = $1;
|
|
$29 = ((($28)) + 11168|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$2 = $30;
|
|
$31 = $2;
|
|
$32 = ((($31)) + 72|0);
|
|
$33 = HEAP32[$32>>2]|0;
|
|
$layout = $33;
|
|
$34 = $0;
|
|
$35 = ($34|0)!=(0|0);
|
|
if (!($35)) {
|
|
___assert_fail((31572|0),(13400|0),16486,(31549|0));
|
|
// unreachable;
|
|
}
|
|
$36 = $1;
|
|
$37 = ((($36)) + 300|0);
|
|
$38 = ((($37)) + 4784|0);
|
|
$39 = ((($38)) + 488|0);
|
|
;HEAP32[$spacing>>2]=HEAP32[$39>>2]|0;HEAP32[$spacing+4>>2]=HEAP32[$39+4>>2]|0;
|
|
$40 = $1;
|
|
$41 = ((($40)) + 300|0);
|
|
$42 = ((($41)) + 4784|0);
|
|
$43 = ((($42)) + 480|0);
|
|
;HEAP32[$padding>>2]=HEAP32[$43>>2]|0;HEAP32[$padding+4>>2]=HEAP32[$43+4>>2]|0;
|
|
$44 = +HEAPF32[$padding>>2];
|
|
$45 = 2.0 * $44;
|
|
$panel_padding = $45;
|
|
$46 = $layout;
|
|
$47 = ((($46)) + 92|0);
|
|
$48 = ((($47)) + 12|0);
|
|
$49 = HEAP32[$48>>2]|0;
|
|
$50 = (($49) - 1)|0;
|
|
$51 = (+($50|0));
|
|
$52 = +HEAPF32[$spacing>>2];
|
|
$53 = $51 * $52;
|
|
$panel_spacing = $53;
|
|
$54 = $layout;
|
|
$55 = ((($54)) + 36|0);
|
|
$56 = +HEAPF32[$55>>2];
|
|
$57 = $panel_padding;
|
|
$58 = $56 - $57;
|
|
$59 = $panel_spacing;
|
|
$60 = $58 - $59;
|
|
$panel_space = $60;
|
|
$61 = $layout;
|
|
$62 = ((($61)) + 92|0);
|
|
$63 = HEAP32[$62>>2]|0;
|
|
switch ($63|0) {
|
|
case 0: {
|
|
$64 = $panel_space;
|
|
$65 = $layout;
|
|
$66 = ((($65)) + 92|0);
|
|
$67 = ((($66)) + 12|0);
|
|
$68 = HEAP32[$67>>2]|0;
|
|
$69 = (+($68|0));
|
|
$70 = $64 / $69;
|
|
$item_width = $70;
|
|
$71 = $layout;
|
|
$72 = ((($71)) + 92|0);
|
|
$73 = ((($72)) + 4|0);
|
|
$74 = HEAP32[$73>>2]|0;
|
|
$75 = (+($74|0));
|
|
$76 = $item_width;
|
|
$77 = $75 * $76;
|
|
$item_offset = $77;
|
|
$78 = $layout;
|
|
$79 = ((($78)) + 92|0);
|
|
$80 = ((($79)) + 4|0);
|
|
$81 = HEAP32[$80>>2]|0;
|
|
$82 = (+($81|0));
|
|
$83 = +HEAPF32[$spacing>>2];
|
|
$84 = $82 * $83;
|
|
$item_spacing = $84;
|
|
break;
|
|
}
|
|
case 1: {
|
|
$85 = $layout;
|
|
$86 = ((($85)) + 92|0);
|
|
$87 = ((($86)) + 20|0);
|
|
$88 = +HEAPF32[$87>>2];
|
|
$89 = $panel_space;
|
|
$90 = $88 * $89;
|
|
$item_width = $90;
|
|
$91 = $layout;
|
|
$92 = ((($91)) + 92|0);
|
|
$93 = ((($92)) + 28|0);
|
|
$94 = +HEAPF32[$93>>2];
|
|
$item_offset = $94;
|
|
$95 = $layout;
|
|
$96 = ((($95)) + 92|0);
|
|
$97 = ((($96)) + 4|0);
|
|
$98 = HEAP32[$97>>2]|0;
|
|
$99 = (+($98|0));
|
|
$100 = +HEAPF32[$spacing>>2];
|
|
$101 = $99 * $100;
|
|
$item_spacing = $101;
|
|
$102 = $3;
|
|
$103 = ($102|0)!=(0);
|
|
if ($103) {
|
|
$104 = $item_width;
|
|
$105 = +HEAPF32[$spacing>>2];
|
|
$106 = $104 + $105;
|
|
$107 = $layout;
|
|
$108 = ((($107)) + 92|0);
|
|
$109 = ((($108)) + 28|0);
|
|
$110 = +HEAPF32[$109>>2];
|
|
$111 = $110 + $106;
|
|
HEAPF32[$109>>2] = $111;
|
|
$112 = $layout;
|
|
$113 = ((($112)) + 92|0);
|
|
$114 = ((($113)) + 20|0);
|
|
$115 = +HEAPF32[$114>>2];
|
|
$116 = $layout;
|
|
$117 = ((($116)) + 92|0);
|
|
$118 = ((($117)) + 32|0);
|
|
$119 = +HEAPF32[$118>>2];
|
|
$120 = $119 + $115;
|
|
HEAPF32[$118>>2] = $120;
|
|
$121 = $layout;
|
|
$122 = ((($121)) + 92|0);
|
|
$123 = ((($122)) + 4|0);
|
|
HEAP32[$123>>2] = 0;
|
|
}
|
|
break;
|
|
}
|
|
case 2: {
|
|
$124 = $layout;
|
|
$125 = ((($124)) + 24|0);
|
|
$126 = +HEAPF32[$125>>2];
|
|
$127 = $layout;
|
|
$128 = ((($127)) + 36|0);
|
|
$129 = +HEAPF32[$128>>2];
|
|
$130 = $layout;
|
|
$131 = ((($130)) + 92|0);
|
|
$132 = ((($131)) + 36|0);
|
|
$133 = +HEAPF32[$132>>2];
|
|
$134 = $129 * $133;
|
|
$135 = $126 + $134;
|
|
$136 = $0;
|
|
HEAPF32[$136>>2] = $135;
|
|
$137 = $layout;
|
|
$138 = ((($137)) + 20|0);
|
|
$139 = HEAP32[$138>>2]|0;
|
|
$140 = HEAP16[$139>>1]|0;
|
|
$141 = $140&65535;
|
|
$142 = (+($141|0));
|
|
$143 = $0;
|
|
$144 = +HEAPF32[$143>>2];
|
|
$145 = $144 - $142;
|
|
HEAPF32[$143>>2] = $145;
|
|
$146 = $layout;
|
|
$147 = ((($146)) + 28|0);
|
|
$148 = +HEAPF32[$147>>2];
|
|
$149 = $layout;
|
|
$150 = ((($149)) + 92|0);
|
|
$151 = ((($150)) + 8|0);
|
|
$152 = +HEAPF32[$151>>2];
|
|
$153 = $layout;
|
|
$154 = ((($153)) + 92|0);
|
|
$155 = ((($154)) + 36|0);
|
|
$156 = ((($155)) + 4|0);
|
|
$157 = +HEAPF32[$156>>2];
|
|
$158 = $152 * $157;
|
|
$159 = $148 + $158;
|
|
$160 = $0;
|
|
$161 = ((($160)) + 4|0);
|
|
HEAPF32[$161>>2] = $159;
|
|
$162 = $layout;
|
|
$163 = ((($162)) + 20|0);
|
|
$164 = HEAP32[$163>>2]|0;
|
|
$165 = ((($164)) + 2|0);
|
|
$166 = HEAP16[$165>>1]|0;
|
|
$167 = $166&65535;
|
|
$168 = (+($167|0));
|
|
$169 = $0;
|
|
$170 = ((($169)) + 4|0);
|
|
$171 = +HEAPF32[$170>>2];
|
|
$172 = $171 - $168;
|
|
HEAPF32[$170>>2] = $172;
|
|
$173 = $layout;
|
|
$174 = ((($173)) + 36|0);
|
|
$175 = +HEAPF32[$174>>2];
|
|
$176 = $layout;
|
|
$177 = ((($176)) + 92|0);
|
|
$178 = ((($177)) + 36|0);
|
|
$179 = ((($178)) + 8|0);
|
|
$180 = +HEAPF32[$179>>2];
|
|
$181 = $175 * $180;
|
|
$182 = $0;
|
|
$183 = ((($182)) + 8|0);
|
|
HEAPF32[$183>>2] = $181;
|
|
$184 = $layout;
|
|
$185 = ((($184)) + 92|0);
|
|
$186 = ((($185)) + 8|0);
|
|
$187 = +HEAPF32[$186>>2];
|
|
$188 = $layout;
|
|
$189 = ((($188)) + 92|0);
|
|
$190 = ((($189)) + 36|0);
|
|
$191 = ((($190)) + 12|0);
|
|
$192 = +HEAPF32[$191>>2];
|
|
$193 = $187 * $192;
|
|
$194 = $0;
|
|
$195 = ((($194)) + 12|0);
|
|
HEAPF32[$195>>2] = $193;
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 3: {
|
|
$196 = $layout;
|
|
$197 = ((($196)) + 92|0);
|
|
$198 = ((($197)) + 16|0);
|
|
$199 = HEAP32[$198>>2]|0;
|
|
$200 = ($199|0)!=(0|0);
|
|
if (!($200)) {
|
|
___assert_fail((31579|0),(13400|0),16530,(31549|0));
|
|
// unreachable;
|
|
}
|
|
$201 = $layout;
|
|
$202 = ((($201)) + 92|0);
|
|
$203 = ((($202)) + 4|0);
|
|
$204 = HEAP32[$203>>2]|0;
|
|
$205 = $layout;
|
|
$206 = ((($205)) + 92|0);
|
|
$207 = ((($206)) + 16|0);
|
|
$208 = HEAP32[$207>>2]|0;
|
|
$209 = (($208) + ($204<<2)|0);
|
|
$210 = +HEAPF32[$209>>2];
|
|
$211 = $210 < 0.0;
|
|
$212 = $layout;
|
|
$213 = ((($212)) + 92|0);
|
|
if ($211) {
|
|
$214 = ((($213)) + 20|0);
|
|
$215 = +HEAPF32[$214>>2];
|
|
$224 = $215;
|
|
} else {
|
|
$216 = ((($213)) + 4|0);
|
|
$217 = HEAP32[$216>>2]|0;
|
|
$218 = $layout;
|
|
$219 = ((($218)) + 92|0);
|
|
$220 = ((($219)) + 16|0);
|
|
$221 = HEAP32[$220>>2]|0;
|
|
$222 = (($221) + ($217<<2)|0);
|
|
$223 = +HEAPF32[$222>>2];
|
|
$224 = $223;
|
|
}
|
|
$ratio = $224;
|
|
$225 = $layout;
|
|
$226 = ((($225)) + 92|0);
|
|
$227 = ((($226)) + 4|0);
|
|
$228 = HEAP32[$227>>2]|0;
|
|
$229 = (+($228|0));
|
|
$230 = +HEAPF32[$spacing>>2];
|
|
$231 = $229 * $230;
|
|
$item_spacing = $231;
|
|
$232 = $ratio;
|
|
$233 = $panel_space;
|
|
$234 = $232 * $233;
|
|
$item_width = $234;
|
|
$235 = $layout;
|
|
$236 = ((($235)) + 92|0);
|
|
$237 = ((($236)) + 28|0);
|
|
$238 = +HEAPF32[$237>>2];
|
|
$item_offset = $238;
|
|
$239 = $3;
|
|
$240 = ($239|0)!=(0);
|
|
if ($240) {
|
|
$241 = $item_width;
|
|
$242 = $layout;
|
|
$243 = ((($242)) + 92|0);
|
|
$244 = ((($243)) + 28|0);
|
|
$245 = +HEAPF32[$244>>2];
|
|
$246 = $245 + $241;
|
|
HEAPF32[$244>>2] = $246;
|
|
$247 = $ratio;
|
|
$248 = $layout;
|
|
$249 = ((($248)) + 92|0);
|
|
$250 = ((($249)) + 32|0);
|
|
$251 = +HEAPF32[$250>>2];
|
|
$252 = $251 + $247;
|
|
HEAPF32[$250>>2] = $252;
|
|
}
|
|
break;
|
|
}
|
|
case 4: {
|
|
$253 = $layout;
|
|
$254 = ((($253)) + 92|0);
|
|
$255 = ((($254)) + 20|0);
|
|
$256 = +HEAPF32[$255>>2];
|
|
$item_width = $256;
|
|
$257 = $layout;
|
|
$258 = ((($257)) + 92|0);
|
|
$259 = ((($258)) + 4|0);
|
|
$260 = HEAP32[$259>>2]|0;
|
|
$261 = (+($260|0));
|
|
$262 = $item_width;
|
|
$263 = $261 * $262;
|
|
$item_offset = $263;
|
|
$264 = $layout;
|
|
$265 = ((($264)) + 92|0);
|
|
$266 = ((($265)) + 4|0);
|
|
$267 = HEAP32[$266>>2]|0;
|
|
$268 = (+($267|0));
|
|
$269 = +HEAPF32[$spacing>>2];
|
|
$270 = $268 * $269;
|
|
$item_spacing = $270;
|
|
break;
|
|
}
|
|
case 5: {
|
|
$271 = $layout;
|
|
$272 = ((($271)) + 92|0);
|
|
$273 = ((($272)) + 20|0);
|
|
$274 = +HEAPF32[$273>>2];
|
|
$item_width = $274;
|
|
$275 = $layout;
|
|
$276 = ((($275)) + 92|0);
|
|
$277 = ((($276)) + 28|0);
|
|
$278 = +HEAPF32[$277>>2];
|
|
$item_offset = $278;
|
|
$279 = $layout;
|
|
$280 = ((($279)) + 92|0);
|
|
$281 = ((($280)) + 4|0);
|
|
$282 = HEAP32[$281>>2]|0;
|
|
$283 = (+($282|0));
|
|
$284 = +HEAPF32[$spacing>>2];
|
|
$285 = $283 * $284;
|
|
$item_spacing = $285;
|
|
$286 = $3;
|
|
$287 = ($286|0)!=(0);
|
|
if ($287) {
|
|
$288 = $item_width;
|
|
$289 = $layout;
|
|
$290 = ((($289)) + 92|0);
|
|
$291 = ((($290)) + 28|0);
|
|
$292 = +HEAPF32[$291>>2];
|
|
$293 = $292 + $288;
|
|
HEAPF32[$291>>2] = $293;
|
|
$294 = $layout;
|
|
$295 = ((($294)) + 92|0);
|
|
$296 = ((($295)) + 4|0);
|
|
HEAP32[$296>>2] = 0;
|
|
}
|
|
break;
|
|
}
|
|
case 6: {
|
|
$297 = $layout;
|
|
$298 = ((($297)) + 24|0);
|
|
$299 = +HEAPF32[$298>>2];
|
|
$300 = $layout;
|
|
$301 = ((($300)) + 92|0);
|
|
$302 = ((($301)) + 36|0);
|
|
$303 = +HEAPF32[$302>>2];
|
|
$304 = $299 + $303;
|
|
$305 = $0;
|
|
HEAPF32[$305>>2] = $304;
|
|
$306 = $layout;
|
|
$307 = ((($306)) + 92|0);
|
|
$308 = ((($307)) + 36|0);
|
|
$309 = ((($308)) + 8|0);
|
|
$310 = +HEAPF32[$309>>2];
|
|
$311 = $0;
|
|
$312 = ((($311)) + 8|0);
|
|
HEAPF32[$312>>2] = $310;
|
|
$313 = $0;
|
|
$314 = +HEAPF32[$313>>2];
|
|
$315 = $0;
|
|
$316 = ((($315)) + 8|0);
|
|
$317 = +HEAPF32[$316>>2];
|
|
$318 = $314 + $317;
|
|
$319 = $layout;
|
|
$320 = ((($319)) + 32|0);
|
|
$321 = +HEAPF32[$320>>2];
|
|
$322 = $318 > $321;
|
|
$323 = $3;
|
|
$324 = ($323|0)!=(0);
|
|
$or$cond = $322 & $324;
|
|
if ($or$cond) {
|
|
$325 = $0;
|
|
$326 = +HEAPF32[$325>>2];
|
|
$327 = $0;
|
|
$328 = ((($327)) + 8|0);
|
|
$329 = +HEAPF32[$328>>2];
|
|
$330 = $326 + $329;
|
|
$331 = $layout;
|
|
$332 = ((($331)) + 32|0);
|
|
HEAPF32[$332>>2] = $330;
|
|
}
|
|
$333 = $layout;
|
|
$334 = ((($333)) + 20|0);
|
|
$335 = HEAP32[$334>>2]|0;
|
|
$336 = HEAP16[$335>>1]|0;
|
|
$337 = $336&65535;
|
|
$338 = (+($337|0));
|
|
$339 = $0;
|
|
$340 = +HEAPF32[$339>>2];
|
|
$341 = $340 - $338;
|
|
HEAPF32[$339>>2] = $341;
|
|
$342 = $layout;
|
|
$343 = ((($342)) + 28|0);
|
|
$344 = +HEAPF32[$343>>2];
|
|
$345 = $layout;
|
|
$346 = ((($345)) + 92|0);
|
|
$347 = ((($346)) + 36|0);
|
|
$348 = ((($347)) + 4|0);
|
|
$349 = +HEAPF32[$348>>2];
|
|
$350 = $344 + $349;
|
|
$351 = $0;
|
|
$352 = ((($351)) + 4|0);
|
|
HEAPF32[$352>>2] = $350;
|
|
$353 = $layout;
|
|
$354 = ((($353)) + 20|0);
|
|
$355 = HEAP32[$354>>2]|0;
|
|
$356 = ((($355)) + 2|0);
|
|
$357 = HEAP16[$356>>1]|0;
|
|
$358 = $357&65535;
|
|
$359 = (+($358|0));
|
|
$360 = $0;
|
|
$361 = ((($360)) + 4|0);
|
|
$362 = +HEAPF32[$361>>2];
|
|
$363 = $362 - $359;
|
|
HEAPF32[$361>>2] = $363;
|
|
$364 = $layout;
|
|
$365 = ((($364)) + 92|0);
|
|
$366 = ((($365)) + 36|0);
|
|
$367 = ((($366)) + 12|0);
|
|
$368 = +HEAPF32[$367>>2];
|
|
$369 = $0;
|
|
$370 = ((($369)) + 12|0);
|
|
HEAPF32[$370>>2] = $368;
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 7: {
|
|
$371 = $layout;
|
|
$372 = ((($371)) + 92|0);
|
|
$373 = ((($372)) + 4|0);
|
|
$374 = HEAP32[$373>>2]|0;
|
|
$375 = (+($374|0));
|
|
$376 = +HEAPF32[$spacing>>2];
|
|
$377 = $375 * $376;
|
|
$item_spacing = $377;
|
|
$378 = $layout;
|
|
$379 = ((($378)) + 92|0);
|
|
$380 = ((($379)) + 4|0);
|
|
$381 = HEAP32[$380>>2]|0;
|
|
$382 = $layout;
|
|
$383 = ((($382)) + 92|0);
|
|
$384 = ((($383)) + 16|0);
|
|
$385 = HEAP32[$384>>2]|0;
|
|
$386 = (($385) + ($381<<2)|0);
|
|
$387 = +HEAPF32[$386>>2];
|
|
$item_width = $387;
|
|
$388 = $layout;
|
|
$389 = ((($388)) + 92|0);
|
|
$390 = ((($389)) + 28|0);
|
|
$391 = +HEAPF32[$390>>2];
|
|
$item_offset = $391;
|
|
$392 = $3;
|
|
$393 = ($392|0)!=(0);
|
|
if ($393) {
|
|
$394 = $item_width;
|
|
$395 = $layout;
|
|
$396 = ((($395)) + 92|0);
|
|
$397 = ((($396)) + 28|0);
|
|
$398 = +HEAPF32[$397>>2];
|
|
$399 = $398 + $394;
|
|
HEAPF32[$397>>2] = $399;
|
|
}
|
|
break;
|
|
}
|
|
default: {
|
|
___assert_fail((30507|0),(13400|0),16577,(31549|0));
|
|
// unreachable;
|
|
}
|
|
}
|
|
$400 = $item_width;
|
|
$401 = $0;
|
|
$402 = ((($401)) + 8|0);
|
|
HEAPF32[$402>>2] = $400;
|
|
$403 = $layout;
|
|
$404 = ((($403)) + 92|0);
|
|
$405 = ((($404)) + 8|0);
|
|
$406 = +HEAPF32[$405>>2];
|
|
$407 = ((($spacing)) + 4|0);
|
|
$408 = +HEAPF32[$407>>2];
|
|
$409 = $406 - $408;
|
|
$410 = $0;
|
|
$411 = ((($410)) + 12|0);
|
|
HEAPF32[$411>>2] = $409;
|
|
$412 = $layout;
|
|
$413 = ((($412)) + 28|0);
|
|
$414 = +HEAPF32[$413>>2];
|
|
$415 = $layout;
|
|
$416 = ((($415)) + 20|0);
|
|
$417 = HEAP32[$416>>2]|0;
|
|
$418 = ((($417)) + 2|0);
|
|
$419 = HEAP16[$418>>1]|0;
|
|
$420 = $419&65535;
|
|
$421 = (+($420|0));
|
|
$422 = $414 - $421;
|
|
$423 = $0;
|
|
$424 = ((($423)) + 4|0);
|
|
HEAPF32[$424>>2] = $422;
|
|
$425 = $layout;
|
|
$426 = ((($425)) + 24|0);
|
|
$427 = +HEAPF32[$426>>2];
|
|
$428 = $item_offset;
|
|
$429 = $427 + $428;
|
|
$430 = $item_spacing;
|
|
$431 = $429 + $430;
|
|
$432 = +HEAPF32[$padding>>2];
|
|
$433 = $431 + $432;
|
|
$434 = $0;
|
|
HEAPF32[$434>>2] = $433;
|
|
$435 = $0;
|
|
$436 = +HEAPF32[$435>>2];
|
|
$437 = $0;
|
|
$438 = ((($437)) + 8|0);
|
|
$439 = +HEAPF32[$438>>2];
|
|
$440 = $436 + $439;
|
|
$441 = $layout;
|
|
$442 = ((($441)) + 32|0);
|
|
$443 = +HEAPF32[$442>>2];
|
|
$444 = $440 > $443;
|
|
$445 = $3;
|
|
$446 = ($445|0)!=(0);
|
|
$or$cond3 = $444 & $446;
|
|
if ($or$cond3) {
|
|
$447 = $0;
|
|
$448 = +HEAPF32[$447>>2];
|
|
$449 = $0;
|
|
$450 = ((($449)) + 8|0);
|
|
$451 = +HEAPF32[$450>>2];
|
|
$452 = $448 + $451;
|
|
$453 = $layout;
|
|
$454 = ((($453)) + 32|0);
|
|
HEAPF32[$454>>2] = $452;
|
|
}
|
|
$455 = $layout;
|
|
$456 = ((($455)) + 20|0);
|
|
$457 = HEAP32[$456>>2]|0;
|
|
$458 = HEAP16[$457>>1]|0;
|
|
$459 = $458&65535;
|
|
$460 = (+($459|0));
|
|
$461 = $0;
|
|
$462 = +HEAPF32[$461>>2];
|
|
$463 = $462 - $460;
|
|
HEAPF32[$461>>2] = $463;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_button_text($out,$bounds,$content,$state,$style,$txt,$len,$text_alignment,$font) {
|
|
$out = $out|0;
|
|
$bounds = $bounds|0;
|
|
$content = $content|0;
|
|
$state = $state|0;
|
|
$style = $style|0;
|
|
$txt = $txt|0;
|
|
$len = $len|0;
|
|
$text_alignment = $text_alignment|0;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0;
|
|
var $7 = 0, $8 = 0, $9 = 0, $background = 0, $text = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 72|0;
|
|
$text = sp + 16|0;
|
|
$9 = sp;
|
|
$0 = $out;
|
|
$1 = $bounds;
|
|
$2 = $content;
|
|
$3 = $state;
|
|
$4 = $style;
|
|
$5 = $txt;
|
|
$6 = $len;
|
|
$7 = $text_alignment;
|
|
$8 = $font;
|
|
$10 = $0;
|
|
$11 = $1;
|
|
$12 = $3;
|
|
$13 = $4;
|
|
$14 = (_nk_draw_button($10,$11,$12,$13)|0);
|
|
$background = $14;
|
|
$15 = $background;
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = ($16|0)==(0);
|
|
$18 = ((($text)) + 8|0);
|
|
if ($17) {
|
|
$19 = $background;
|
|
$20 = ((($19)) + 4|0);
|
|
;HEAP8[$18>>0]=HEAP8[$20>>0]|0;HEAP8[$18+1>>0]=HEAP8[$20+1>>0]|0;HEAP8[$18+2>>0]=HEAP8[$20+2>>0]|0;HEAP8[$18+3>>0]=HEAP8[$20+3>>0]|0;
|
|
} else {
|
|
$21 = $4;
|
|
$22 = ((($21)) + 64|0);
|
|
;HEAP8[$18>>0]=HEAP8[$22>>0]|0;HEAP8[$18+1>>0]=HEAP8[$22+1>>0]|0;HEAP8[$18+2>>0]=HEAP8[$22+2>>0]|0;HEAP8[$18+3>>0]=HEAP8[$22+3>>0]|0;
|
|
}
|
|
$23 = $3;
|
|
$24 = $23 & 16;
|
|
$25 = ($24|0)!=(0);
|
|
do {
|
|
if ($25) {
|
|
$26 = ((($text)) + 12|0);
|
|
$27 = $4;
|
|
$28 = ((($27)) + 72|0);
|
|
;HEAP8[$26>>0]=HEAP8[$28>>0]|0;HEAP8[$26+1>>0]=HEAP8[$28+1>>0]|0;HEAP8[$26+2>>0]=HEAP8[$28+2>>0]|0;HEAP8[$26+3>>0]=HEAP8[$28+3>>0]|0;
|
|
} else {
|
|
$29 = $3;
|
|
$30 = $29 & 32;
|
|
$31 = ($30|0)!=(0);
|
|
$32 = ((($text)) + 12|0);
|
|
$33 = $4;
|
|
if ($31) {
|
|
$34 = ((($33)) + 76|0);
|
|
;HEAP8[$32>>0]=HEAP8[$34>>0]|0;HEAP8[$32+1>>0]=HEAP8[$34+1>>0]|0;HEAP8[$32+2>>0]=HEAP8[$34+2>>0]|0;HEAP8[$32+3>>0]=HEAP8[$34+3>>0]|0;
|
|
break;
|
|
} else {
|
|
$35 = ((($33)) + 68|0);
|
|
;HEAP8[$32>>0]=HEAP8[$35>>0]|0;HEAP8[$32+1>>0]=HEAP8[$35+1>>0]|0;HEAP8[$32+2>>0]=HEAP8[$35+2>>0]|0;HEAP8[$32+3>>0]=HEAP8[$35+3>>0]|0;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
_nk_vec2($9,0.0,0.0);
|
|
;HEAP32[$text>>2]=HEAP32[$9>>2]|0;HEAP32[$text+4>>2]=HEAP32[$9+4>>2]|0;
|
|
$36 = $0;
|
|
$37 = $2;
|
|
$38 = $5;
|
|
$39 = $6;
|
|
$40 = $7;
|
|
$41 = $8;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$37>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$37+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$37+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$37+12>>2]|0;
|
|
_nk_widget_text($36,$$byval_copy,$38,$39,$text,$40,$41);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_toggle_behavior($in,$select,$state,$active) {
|
|
$in = $in|0;
|
|
$select = $select|0;
|
|
$state = $state|0;
|
|
$active = $active|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $select$byval_copy = 0, $select$byval_copy1 = 0, $select$byval_copy2 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$select$byval_copy2 = sp + 48|0;
|
|
$select$byval_copy1 = sp + 32|0;
|
|
$select$byval_copy = sp + 16|0;
|
|
$0 = $in;
|
|
$1 = $state;
|
|
$2 = $active;
|
|
$3 = $1;
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$5 = $4 & 2;
|
|
$6 = ($5|0)!=(0);
|
|
$7 = $1;
|
|
if ($6) {
|
|
HEAP32[$7>>2] = 6;
|
|
} else {
|
|
HEAP32[$7>>2] = 4;
|
|
}
|
|
$8 = $1;
|
|
$9 = $0;
|
|
;HEAP32[$select$byval_copy>>2]=HEAP32[$select>>2]|0;HEAP32[$select$byval_copy+4>>2]=HEAP32[$select+4>>2]|0;HEAP32[$select$byval_copy+8>>2]=HEAP32[$select+8>>2]|0;HEAP32[$select$byval_copy+12>>2]=HEAP32[$select+12>>2]|0;
|
|
$10 = (_nk_button_behavior($8,$select$byval_copy,$9,0)|0);
|
|
$11 = ($10|0)!=(0);
|
|
if ($11) {
|
|
$12 = $1;
|
|
HEAP32[$12>>2] = 34;
|
|
$13 = $2;
|
|
$14 = ($13|0)!=(0);
|
|
$15 = $14 ^ 1;
|
|
$16 = $15&1;
|
|
$2 = $16;
|
|
}
|
|
$17 = $1;
|
|
$18 = HEAP32[$17>>2]|0;
|
|
$19 = $18 & 16;
|
|
$20 = ($19|0)!=(0);
|
|
if ($20) {
|
|
$21 = $0;
|
|
;HEAP32[$select$byval_copy1>>2]=HEAP32[$select>>2]|0;HEAP32[$select$byval_copy1+4>>2]=HEAP32[$select+4>>2]|0;HEAP32[$select$byval_copy1+8>>2]=HEAP32[$select+8>>2]|0;HEAP32[$select$byval_copy1+12>>2]=HEAP32[$select+12>>2]|0;
|
|
$22 = (_nk_input_is_mouse_prev_hovering_rect($21,$select$byval_copy1)|0);
|
|
$23 = ($22|0)!=(0);
|
|
if (!($23)) {
|
|
$24 = $1;
|
|
$25 = HEAP32[$24>>2]|0;
|
|
$26 = $25 | 8;
|
|
HEAP32[$24>>2] = $26;
|
|
$33 = $2;
|
|
STACKTOP = sp;return ($33|0);
|
|
}
|
|
}
|
|
$27 = $0;
|
|
;HEAP32[$select$byval_copy2>>2]=HEAP32[$select>>2]|0;HEAP32[$select$byval_copy2+4>>2]=HEAP32[$select+4>>2]|0;HEAP32[$select$byval_copy2+8>>2]=HEAP32[$select+8>>2]|0;HEAP32[$select$byval_copy2+12>>2]=HEAP32[$select+12>>2]|0;
|
|
$28 = (_nk_input_is_mouse_prev_hovering_rect($27,$select$byval_copy2)|0);
|
|
$29 = ($28|0)!=(0);
|
|
if (!($29)) {
|
|
$33 = $2;
|
|
STACKTOP = sp;return ($33|0);
|
|
}
|
|
$30 = $1;
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = $31 | 64;
|
|
HEAP32[$30>>2] = $32;
|
|
$33 = $2;
|
|
STACKTOP = sp;return ($33|0);
|
|
}
|
|
function _nk_draw_checkbox($out,$state,$style,$active,$label,$selector,$cursors,$string,$len,$font) {
|
|
$out = $out|0;
|
|
$state = $state|0;
|
|
$style = $style|0;
|
|
$active = $active|0;
|
|
$label = $label|0;
|
|
$selector = $selector|0;
|
|
$cursors = $cursors|0;
|
|
$string = $string|0;
|
|
$len = $len|0;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0;
|
|
var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0;
|
|
var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0;
|
|
var $57 = 0, $58 = 0, $59 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $background = 0, $cursor = 0, $text = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy6 = sp + 128|0;
|
|
$$byval_copy5 = sp + 148|0;
|
|
$$byval_copy4 = sp + 112|0;
|
|
$$byval_copy3 = sp + 96|0;
|
|
$$byval_copy2 = sp + 144|0;
|
|
$$byval_copy1 = sp + 80|0;
|
|
$$byval_copy = sp + 64|0;
|
|
$text = sp;
|
|
$0 = $out;
|
|
$1 = $state;
|
|
$2 = $style;
|
|
$3 = $active;
|
|
$4 = $label;
|
|
$5 = $selector;
|
|
$6 = $cursors;
|
|
$7 = $string;
|
|
$8 = $len;
|
|
$9 = $font;
|
|
$10 = $1;
|
|
$11 = $10 & 16;
|
|
$12 = ($11|0)!=(0);
|
|
do {
|
|
if ($12) {
|
|
$13 = $2;
|
|
$14 = ((($13)) + 20|0);
|
|
$background = $14;
|
|
$15 = $2;
|
|
$16 = ((($15)) + 80|0);
|
|
$cursor = $16;
|
|
$17 = ((($text)) + 12|0);
|
|
$18 = $2;
|
|
$19 = ((($18)) + 104|0);
|
|
;HEAP8[$17>>0]=HEAP8[$19>>0]|0;HEAP8[$17+1>>0]=HEAP8[$19+1>>0]|0;HEAP8[$17+2>>0]=HEAP8[$19+2>>0]|0;HEAP8[$17+3>>0]=HEAP8[$19+3>>0]|0;
|
|
} else {
|
|
$20 = $1;
|
|
$21 = $20 & 32;
|
|
$22 = ($21|0)!=(0);
|
|
$23 = $2;
|
|
if ($22) {
|
|
$24 = ((($23)) + 20|0);
|
|
$background = $24;
|
|
$25 = $2;
|
|
$26 = ((($25)) + 80|0);
|
|
$cursor = $26;
|
|
$27 = ((($text)) + 12|0);
|
|
$28 = $2;
|
|
$29 = ((($28)) + 108|0);
|
|
;HEAP8[$27>>0]=HEAP8[$29>>0]|0;HEAP8[$27+1>>0]=HEAP8[$29+1>>0]|0;HEAP8[$27+2>>0]=HEAP8[$29+2>>0]|0;HEAP8[$27+3>>0]=HEAP8[$29+3>>0]|0;
|
|
break;
|
|
} else {
|
|
$background = $23;
|
|
$30 = $2;
|
|
$31 = ((($30)) + 60|0);
|
|
$cursor = $31;
|
|
$32 = ((($text)) + 12|0);
|
|
$33 = $2;
|
|
$34 = ((($33)) + 100|0);
|
|
;HEAP8[$32>>0]=HEAP8[$34>>0]|0;HEAP8[$32+1>>0]=HEAP8[$34+1>>0]|0;HEAP8[$32+2>>0]=HEAP8[$34+2>>0]|0;HEAP8[$32+3>>0]=HEAP8[$34+3>>0]|0;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$35 = $background;
|
|
$36 = HEAP32[$35>>2]|0;
|
|
$37 = ($36|0)==(1);
|
|
$38 = $0;
|
|
$39 = $5;
|
|
$40 = $background;
|
|
$41 = ((($40)) + 4|0);
|
|
if ($37) {
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$39>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$39+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$39+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$39+12>>2]|0;
|
|
_nk_draw_image($38,$$byval_copy,$41);
|
|
} else {
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$39>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$39+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$39+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$39+12>>2]|0;
|
|
;HEAP8[$$byval_copy2>>0]=HEAP8[$41>>0]|0;HEAP8[$$byval_copy2+1>>0]=HEAP8[$41+1>>0]|0;HEAP8[$$byval_copy2+2>>0]=HEAP8[$41+2>>0]|0;HEAP8[$$byval_copy2+3>>0]=HEAP8[$41+3>>0]|0;
|
|
_nk_fill_rect($38,$$byval_copy1,0.0,$$byval_copy2);
|
|
}
|
|
$42 = $3;
|
|
$43 = ($42|0)!=(0);
|
|
do {
|
|
if ($43) {
|
|
$44 = $cursor;
|
|
$45 = HEAP32[$44>>2]|0;
|
|
$46 = ($45|0)==(1);
|
|
$47 = $0;
|
|
$48 = $6;
|
|
$49 = $cursor;
|
|
$50 = ((($49)) + 4|0);
|
|
if ($46) {
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$48>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$48+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$48+8>>2]|0;HEAP32[$$byval_copy3+12>>2]=HEAP32[$48+12>>2]|0;
|
|
_nk_draw_image($47,$$byval_copy3,$50);
|
|
break;
|
|
} else {
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$48>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$48+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$48+8>>2]|0;HEAP32[$$byval_copy4+12>>2]=HEAP32[$48+12>>2]|0;
|
|
;HEAP8[$$byval_copy5>>0]=HEAP8[$50>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$50+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$50+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$50+3>>0]|0;
|
|
_nk_fill_rect($47,$$byval_copy4,0.0,$$byval_copy5);
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
HEAPF32[$text>>2] = 0.0;
|
|
$51 = ((($text)) + 4|0);
|
|
HEAPF32[$51>>2] = 0.0;
|
|
$52 = ((($text)) + 8|0);
|
|
$53 = $2;
|
|
$54 = ((($53)) + 112|0);
|
|
;HEAP8[$52>>0]=HEAP8[$54>>0]|0;HEAP8[$52+1>>0]=HEAP8[$54+1>>0]|0;HEAP8[$52+2>>0]=HEAP8[$54+2>>0]|0;HEAP8[$52+3>>0]=HEAP8[$54+3>>0]|0;
|
|
$55 = $0;
|
|
$56 = $4;
|
|
$57 = $7;
|
|
$58 = $8;
|
|
$59 = $9;
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$56>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$56+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[$56+8>>2]|0;HEAP32[$$byval_copy6+12>>2]=HEAP32[$56+12>>2]|0;
|
|
_nk_widget_text($55,$$byval_copy6,$57,$58,$text,17,$59);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_draw_option($out,$state,$style,$active,$label,$selector,$cursors,$string,$len,$font) {
|
|
$out = $out|0;
|
|
$state = $state|0;
|
|
$style = $style|0;
|
|
$active = $active|0;
|
|
$label = $label|0;
|
|
$selector = $selector|0;
|
|
$cursors = $cursors|0;
|
|
$string = $string|0;
|
|
$len = $len|0;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0;
|
|
var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0;
|
|
var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0;
|
|
var $57 = 0, $58 = 0, $59 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $background = 0, $cursor = 0, $text = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy6 = sp + 128|0;
|
|
$$byval_copy5 = sp + 148|0;
|
|
$$byval_copy4 = sp + 112|0;
|
|
$$byval_copy3 = sp + 96|0;
|
|
$$byval_copy2 = sp + 144|0;
|
|
$$byval_copy1 = sp + 80|0;
|
|
$$byval_copy = sp + 64|0;
|
|
$text = sp;
|
|
$0 = $out;
|
|
$1 = $state;
|
|
$2 = $style;
|
|
$3 = $active;
|
|
$4 = $label;
|
|
$5 = $selector;
|
|
$6 = $cursors;
|
|
$7 = $string;
|
|
$8 = $len;
|
|
$9 = $font;
|
|
$10 = $1;
|
|
$11 = $10 & 16;
|
|
$12 = ($11|0)!=(0);
|
|
do {
|
|
if ($12) {
|
|
$13 = $2;
|
|
$14 = ((($13)) + 20|0);
|
|
$background = $14;
|
|
$15 = $2;
|
|
$16 = ((($15)) + 80|0);
|
|
$cursor = $16;
|
|
$17 = ((($text)) + 12|0);
|
|
$18 = $2;
|
|
$19 = ((($18)) + 104|0);
|
|
;HEAP8[$17>>0]=HEAP8[$19>>0]|0;HEAP8[$17+1>>0]=HEAP8[$19+1>>0]|0;HEAP8[$17+2>>0]=HEAP8[$19+2>>0]|0;HEAP8[$17+3>>0]=HEAP8[$19+3>>0]|0;
|
|
} else {
|
|
$20 = $1;
|
|
$21 = $20 & 32;
|
|
$22 = ($21|0)!=(0);
|
|
$23 = $2;
|
|
if ($22) {
|
|
$24 = ((($23)) + 20|0);
|
|
$background = $24;
|
|
$25 = $2;
|
|
$26 = ((($25)) + 80|0);
|
|
$cursor = $26;
|
|
$27 = ((($text)) + 12|0);
|
|
$28 = $2;
|
|
$29 = ((($28)) + 108|0);
|
|
;HEAP8[$27>>0]=HEAP8[$29>>0]|0;HEAP8[$27+1>>0]=HEAP8[$29+1>>0]|0;HEAP8[$27+2>>0]=HEAP8[$29+2>>0]|0;HEAP8[$27+3>>0]=HEAP8[$29+3>>0]|0;
|
|
break;
|
|
} else {
|
|
$background = $23;
|
|
$30 = $2;
|
|
$31 = ((($30)) + 60|0);
|
|
$cursor = $31;
|
|
$32 = ((($text)) + 12|0);
|
|
$33 = $2;
|
|
$34 = ((($33)) + 100|0);
|
|
;HEAP8[$32>>0]=HEAP8[$34>>0]|0;HEAP8[$32+1>>0]=HEAP8[$34+1>>0]|0;HEAP8[$32+2>>0]=HEAP8[$34+2>>0]|0;HEAP8[$32+3>>0]=HEAP8[$34+3>>0]|0;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$35 = $background;
|
|
$36 = HEAP32[$35>>2]|0;
|
|
$37 = ($36|0)==(1);
|
|
$38 = $0;
|
|
$39 = $5;
|
|
$40 = $background;
|
|
$41 = ((($40)) + 4|0);
|
|
if ($37) {
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$39>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$39+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$39+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$39+12>>2]|0;
|
|
_nk_draw_image($38,$$byval_copy,$41);
|
|
} else {
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$39>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$39+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$39+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$39+12>>2]|0;
|
|
;HEAP8[$$byval_copy2>>0]=HEAP8[$41>>0]|0;HEAP8[$$byval_copy2+1>>0]=HEAP8[$41+1>>0]|0;HEAP8[$$byval_copy2+2>>0]=HEAP8[$41+2>>0]|0;HEAP8[$$byval_copy2+3>>0]=HEAP8[$41+3>>0]|0;
|
|
_nk_fill_circle($38,$$byval_copy1,$$byval_copy2);
|
|
}
|
|
$42 = $3;
|
|
$43 = ($42|0)!=(0);
|
|
do {
|
|
if ($43) {
|
|
$44 = $cursor;
|
|
$45 = HEAP32[$44>>2]|0;
|
|
$46 = ($45|0)==(1);
|
|
$47 = $0;
|
|
$48 = $6;
|
|
$49 = $cursor;
|
|
$50 = ((($49)) + 4|0);
|
|
if ($46) {
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$48>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$48+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$48+8>>2]|0;HEAP32[$$byval_copy3+12>>2]=HEAP32[$48+12>>2]|0;
|
|
_nk_draw_image($47,$$byval_copy3,$50);
|
|
break;
|
|
} else {
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$48>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$48+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$48+8>>2]|0;HEAP32[$$byval_copy4+12>>2]=HEAP32[$48+12>>2]|0;
|
|
;HEAP8[$$byval_copy5>>0]=HEAP8[$50>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$50+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$50+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$50+3>>0]|0;
|
|
_nk_fill_circle($47,$$byval_copy4,$$byval_copy5);
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
HEAPF32[$text>>2] = 0.0;
|
|
$51 = ((($text)) + 4|0);
|
|
HEAPF32[$51>>2] = 0.0;
|
|
$52 = ((($text)) + 8|0);
|
|
$53 = $2;
|
|
$54 = ((($53)) + 112|0);
|
|
;HEAP8[$52>>0]=HEAP8[$54>>0]|0;HEAP8[$52+1>>0]=HEAP8[$54+1>>0]|0;HEAP8[$52+2>>0]=HEAP8[$54+2>>0]|0;HEAP8[$52+3>>0]=HEAP8[$54+3>>0]|0;
|
|
$55 = $0;
|
|
$56 = $4;
|
|
$57 = $7;
|
|
$58 = $8;
|
|
$59 = $9;
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$56>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$56+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[$56+8>>2]|0;HEAP32[$$byval_copy6+12>>2]=HEAP32[$56+12>>2]|0;
|
|
_nk_widget_text($55,$$byval_copy6,$57,$58,$text,17,$59);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_click($state,$x,$y,$font,$row_height) {
|
|
$state = $state|0;
|
|
$x = +$x;
|
|
$y = +$y;
|
|
$font = $font|0;
|
|
$row_height = +$row_height;
|
|
var $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0.0;
|
|
var $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $x;
|
|
$2 = $y;
|
|
$3 = $font;
|
|
$4 = $row_height;
|
|
$5 = $0;
|
|
$6 = $1;
|
|
$7 = $2;
|
|
$8 = $3;
|
|
$9 = $4;
|
|
$10 = (_nk_textedit_locate_coord($5,$6,$7,$8,$9)|0);
|
|
$11 = $0;
|
|
$12 = ((($11)) + 88|0);
|
|
HEAP32[$12>>2] = $10;
|
|
$13 = $0;
|
|
$14 = ((($13)) + 88|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = $0;
|
|
$17 = ((($16)) + 92|0);
|
|
HEAP32[$17>>2] = $15;
|
|
$18 = $0;
|
|
$19 = ((($18)) + 88|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = $0;
|
|
$22 = ((($21)) + 96|0);
|
|
HEAP32[$22>>2] = $20;
|
|
$23 = $0;
|
|
$24 = ((($23)) + 103|0);
|
|
HEAP8[$24>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_drag($state,$x,$y,$font,$row_height) {
|
|
$state = $state|0;
|
|
$x = +$x;
|
|
$y = +$y;
|
|
$font = $font|0;
|
|
$row_height = +$row_height;
|
|
var $0 = 0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0.0, $p = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $x;
|
|
$2 = $y;
|
|
$3 = $font;
|
|
$4 = $row_height;
|
|
$5 = $0;
|
|
$6 = $1;
|
|
$7 = $2;
|
|
$8 = $3;
|
|
$9 = $4;
|
|
$10 = (_nk_textedit_locate_coord($5,$6,$7,$8,$9)|0);
|
|
$p = $10;
|
|
$11 = $0;
|
|
$12 = ((($11)) + 92|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = $0;
|
|
$15 = ((($14)) + 96|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = ($13|0)==($16|0);
|
|
if ($17) {
|
|
$18 = $0;
|
|
$19 = ((($18)) + 88|0);
|
|
$20 = HEAP32[$19>>2]|0;
|
|
$21 = $0;
|
|
$22 = ((($21)) + 92|0);
|
|
HEAP32[$22>>2] = $20;
|
|
}
|
|
$23 = $p;
|
|
$24 = $0;
|
|
$25 = ((($24)) + 96|0);
|
|
HEAP32[$25>>2] = $23;
|
|
$26 = $0;
|
|
$27 = ((($26)) + 88|0);
|
|
HEAP32[$27>>2] = $23;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_key($state,$key,$shift_mod,$font,$row_height) {
|
|
$state = $state|0;
|
|
$key = $key|0;
|
|
$shift_mod = $shift_mod|0;
|
|
$font = $font|0;
|
|
$row_height = +$row_height;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
|
|
var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0.0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0.0, $188 = 0.0;
|
|
var $189 = 0.0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0.0, $203 = 0, $204 = 0.0, $205 = 0;
|
|
var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0.0, $214 = 0.0, $215 = 0.0, $216 = 0.0, $217 = 0.0, $218 = 0.0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
|
|
var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0.0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0;
|
|
var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0;
|
|
var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0.0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0.0, $278 = 0.0;
|
|
var $279 = 0.0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0.0, $289 = 0, $29 = 0, $290 = 0.0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0;
|
|
var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0.0, $301 = 0.0, $302 = 0.0, $303 = 0.0, $304 = 0.0, $305 = 0.0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0;
|
|
var $314 = 0, $315 = 0, $316 = 0.0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0;
|
|
var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0;
|
|
var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0;
|
|
var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0;
|
|
var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0.0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0;
|
|
var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0;
|
|
var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0;
|
|
var $440 = 0, $441 = 0.0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0;
|
|
var $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0;
|
|
var $477 = 0.0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0;
|
|
var $495 = 0, $496 = 0, $497 = 0.0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0;
|
|
var $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0;
|
|
var $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0.0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0;
|
|
var $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
|
|
var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0;
|
|
var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0;
|
|
var $99 = 0, $dx = 0.0, $dx7 = 0.0, $find = 0, $find1 = 0, $find10 = 0, $find11 = 0, $find8 = 0, $find9 = 0, $goal_x = 0.0, $goal_x6 = 0.0, $i = 0, $i3 = 0, $n = 0, $row = 0, $row2 = 0, $sel = 0, $sel4 = 0, $start = 0, $x = 0.0;
|
|
var $x5 = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 272|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$find = sp + 216|0;
|
|
$row = sp + 192|0;
|
|
$find1 = sp + 144|0;
|
|
$row2 = sp + 120|0;
|
|
$find8 = sp + 72|0;
|
|
$find9 = sp + 48|0;
|
|
$find10 = sp + 24|0;
|
|
$find11 = sp;
|
|
$0 = $state;
|
|
$1 = $key;
|
|
$2 = $shift_mod;
|
|
$3 = $font;
|
|
$4 = $row_height;
|
|
L1: while(1) {
|
|
$5 = $1;
|
|
switch ($5|0) {
|
|
case 18: {
|
|
label = 98;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 17: {
|
|
label = 89;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 20: {
|
|
label = 86;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 19: {
|
|
label = 83;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 6: {
|
|
label = 78;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 3: {
|
|
label = 73;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 24: {
|
|
label = 34;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 21: {
|
|
label = 3;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 22: {
|
|
label = 4;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 14: {
|
|
label = 5;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 15: {
|
|
label = 7;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 16: {
|
|
label = 9;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 12: {
|
|
label = 12;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 13: {
|
|
label = 21;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 23: {
|
|
label = 27;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 10: {
|
|
$239 = $2;
|
|
$sel4 = $239;
|
|
$240 = $0;
|
|
$241 = ((($240)) + 104|0);
|
|
$242 = HEAP8[$241>>0]|0;
|
|
$243 = ($242<<24>>24)!=(0);
|
|
if (!($243)) {
|
|
label = 59;
|
|
break L1;
|
|
}
|
|
$1 = 12;
|
|
continue L1;
|
|
break;
|
|
}
|
|
case 11: {
|
|
$151 = $2;
|
|
$sel = $151;
|
|
$152 = $0;
|
|
$153 = ((($152)) + 104|0);
|
|
$154 = HEAP8[$153>>0]|0;
|
|
$155 = ($154<<24>>24)!=(0);
|
|
if (!($155)) {
|
|
label = 43;
|
|
break L1;
|
|
}
|
|
$1 = 13;
|
|
continue L1;
|
|
break;
|
|
}
|
|
default: {
|
|
label = 106;
|
|
break L1;
|
|
}
|
|
}
|
|
}
|
|
switch (label|0) {
|
|
case 3: {
|
|
$6 = $0;
|
|
_nk_textedit_undo($6);
|
|
$7 = $0;
|
|
$8 = ((($7)) + 103|0);
|
|
HEAP8[$8>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 4: {
|
|
$9 = $0;
|
|
_nk_textedit_redo($9);
|
|
$10 = $0;
|
|
$11 = ((($10)) + 103|0);
|
|
HEAP8[$11>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 5: {
|
|
$12 = $0;
|
|
$13 = ((($12)) + 100|0);
|
|
$14 = HEAP8[$13>>0]|0;
|
|
$15 = $14&255;
|
|
$16 = ($15|0)==(0);
|
|
if (!($16)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$17 = $0;
|
|
$18 = ((($17)) + 100|0);
|
|
HEAP8[$18>>0] = 1;
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 7: {
|
|
$19 = $0;
|
|
$20 = ((($19)) + 100|0);
|
|
$21 = HEAP8[$20>>0]|0;
|
|
$22 = $21&255;
|
|
$23 = ($22|0)==(0);
|
|
if (!($23)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$24 = $0;
|
|
$25 = ((($24)) + 100|0);
|
|
HEAP8[$25>>0] = 2;
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 9: {
|
|
$26 = $0;
|
|
$27 = ((($26)) + 100|0);
|
|
$28 = HEAP8[$27>>0]|0;
|
|
$29 = $28&255;
|
|
$30 = ($29|0)==(1);
|
|
if (!($30)) {
|
|
$31 = $0;
|
|
$32 = ((($31)) + 100|0);
|
|
$33 = HEAP8[$32>>0]|0;
|
|
$34 = $33&255;
|
|
$35 = ($34|0)==(2);
|
|
if (!($35)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
$36 = $0;
|
|
$37 = ((($36)) + 100|0);
|
|
HEAP8[$37>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 12: {
|
|
$38 = $2;
|
|
$39 = ($38|0)!=(0);
|
|
$40 = $0;
|
|
if ($39) {
|
|
_nk_textedit_clamp($40);
|
|
$41 = $0;
|
|
_nk_textedit_prep_selection_at_cursor($41);
|
|
$42 = $0;
|
|
$43 = ((($42)) + 96|0);
|
|
$44 = HEAP32[$43>>2]|0;
|
|
$45 = ($44|0)>(0);
|
|
if ($45) {
|
|
$46 = $0;
|
|
$47 = ((($46)) + 96|0);
|
|
$48 = HEAP32[$47>>2]|0;
|
|
$49 = (($48) + -1)|0;
|
|
HEAP32[$47>>2] = $49;
|
|
}
|
|
$50 = $0;
|
|
$51 = ((($50)) + 96|0);
|
|
$52 = HEAP32[$51>>2]|0;
|
|
$53 = $0;
|
|
$54 = ((($53)) + 88|0);
|
|
HEAP32[$54>>2] = $52;
|
|
$55 = $0;
|
|
$56 = ((($55)) + 103|0);
|
|
HEAP8[$56>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
$57 = ((($40)) + 92|0);
|
|
$58 = HEAP32[$57>>2]|0;
|
|
$59 = $0;
|
|
$60 = ((($59)) + 96|0);
|
|
$61 = HEAP32[$60>>2]|0;
|
|
$62 = ($58|0)!=($61|0);
|
|
$63 = $0;
|
|
if ($62) {
|
|
_nk_textedit_move_to_first($63);
|
|
} else {
|
|
$64 = ((($63)) + 88|0);
|
|
$65 = HEAP32[$64>>2]|0;
|
|
$66 = ($65|0)>(0);
|
|
if ($66) {
|
|
$67 = $0;
|
|
$68 = ((($67)) + 88|0);
|
|
$69 = HEAP32[$68>>2]|0;
|
|
$70 = (($69) + -1)|0;
|
|
HEAP32[$68>>2] = $70;
|
|
}
|
|
}
|
|
$71 = $0;
|
|
$72 = ((($71)) + 103|0);
|
|
HEAP8[$72>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 21: {
|
|
$73 = $2;
|
|
$74 = ($73|0)!=(0);
|
|
$75 = $0;
|
|
if ($74) {
|
|
_nk_textedit_prep_selection_at_cursor($75);
|
|
$76 = $0;
|
|
$77 = ((($76)) + 96|0);
|
|
$78 = HEAP32[$77>>2]|0;
|
|
$79 = (($78) + 1)|0;
|
|
HEAP32[$77>>2] = $79;
|
|
$80 = $0;
|
|
_nk_textedit_clamp($80);
|
|
$81 = $0;
|
|
$82 = ((($81)) + 96|0);
|
|
$83 = HEAP32[$82>>2]|0;
|
|
$84 = $0;
|
|
$85 = ((($84)) + 88|0);
|
|
HEAP32[$85>>2] = $83;
|
|
$86 = $0;
|
|
$87 = ((($86)) + 103|0);
|
|
HEAP8[$87>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
$88 = ((($75)) + 92|0);
|
|
$89 = HEAP32[$88>>2]|0;
|
|
$90 = $0;
|
|
$91 = ((($90)) + 96|0);
|
|
$92 = HEAP32[$91>>2]|0;
|
|
$93 = ($89|0)!=($92|0);
|
|
$94 = $0;
|
|
if ($93) {
|
|
_nk_textedit_move_to_last($94);
|
|
} else {
|
|
$95 = ((($94)) + 88|0);
|
|
$96 = HEAP32[$95>>2]|0;
|
|
$97 = (($96) + 1)|0;
|
|
HEAP32[$95>>2] = $97;
|
|
}
|
|
$98 = $0;
|
|
_nk_textedit_clamp($98);
|
|
$99 = $0;
|
|
$100 = ((($99)) + 103|0);
|
|
HEAP8[$100>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 27: {
|
|
$101 = $2;
|
|
$102 = ($101|0)!=(0);
|
|
$103 = $0;
|
|
$104 = ((($103)) + 92|0);
|
|
$105 = HEAP32[$104>>2]|0;
|
|
$106 = $0;
|
|
$107 = ((($106)) + 96|0);
|
|
$108 = HEAP32[$107>>2]|0;
|
|
$109 = ($105|0)!=($108|0);
|
|
if ($102) {
|
|
if (!($109)) {
|
|
$110 = $0;
|
|
_nk_textedit_prep_selection_at_cursor($110);
|
|
}
|
|
$111 = $0;
|
|
$112 = (_nk_textedit_move_to_word_previous($111)|0);
|
|
$113 = $0;
|
|
$114 = ((($113)) + 88|0);
|
|
HEAP32[$114>>2] = $112;
|
|
$115 = $0;
|
|
$116 = ((($115)) + 88|0);
|
|
$117 = HEAP32[$116>>2]|0;
|
|
$118 = $0;
|
|
$119 = ((($118)) + 96|0);
|
|
HEAP32[$119>>2] = $117;
|
|
$120 = $0;
|
|
_nk_textedit_clamp($120);
|
|
STACKTOP = sp;return;
|
|
}
|
|
$121 = $0;
|
|
if ($109) {
|
|
_nk_textedit_move_to_first($121);
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$122 = (_nk_textedit_move_to_word_previous($121)|0);
|
|
$123 = $0;
|
|
$124 = ((($123)) + 88|0);
|
|
HEAP32[$124>>2] = $122;
|
|
$125 = $0;
|
|
_nk_textedit_clamp($125);
|
|
STACKTOP = sp;return;
|
|
}
|
|
break;
|
|
}
|
|
case 34: {
|
|
$126 = $2;
|
|
$127 = ($126|0)!=(0);
|
|
$128 = $0;
|
|
$129 = ((($128)) + 92|0);
|
|
$130 = HEAP32[$129>>2]|0;
|
|
$131 = $0;
|
|
$132 = ((($131)) + 96|0);
|
|
$133 = HEAP32[$132>>2]|0;
|
|
$134 = ($130|0)!=($133|0);
|
|
if ($127) {
|
|
if (!($134)) {
|
|
$135 = $0;
|
|
_nk_textedit_prep_selection_at_cursor($135);
|
|
}
|
|
$136 = $0;
|
|
$137 = (_nk_textedit_move_to_word_next($136)|0);
|
|
$138 = $0;
|
|
$139 = ((($138)) + 88|0);
|
|
HEAP32[$139>>2] = $137;
|
|
$140 = $0;
|
|
$141 = ((($140)) + 88|0);
|
|
$142 = HEAP32[$141>>2]|0;
|
|
$143 = $0;
|
|
$144 = ((($143)) + 96|0);
|
|
HEAP32[$144>>2] = $142;
|
|
$145 = $0;
|
|
_nk_textedit_clamp($145);
|
|
STACKTOP = sp;return;
|
|
}
|
|
$146 = $0;
|
|
if ($134) {
|
|
_nk_textedit_move_to_last($146);
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$147 = (_nk_textedit_move_to_word_next($146)|0);
|
|
$148 = $0;
|
|
$149 = ((($148)) + 88|0);
|
|
HEAP32[$149>>2] = $147;
|
|
$150 = $0;
|
|
_nk_textedit_clamp($150);
|
|
STACKTOP = sp;return;
|
|
}
|
|
break;
|
|
}
|
|
case 43: {
|
|
$156 = $sel;
|
|
$157 = ($156|0)!=(0);
|
|
$158 = $0;
|
|
if ($157) {
|
|
_nk_textedit_prep_selection_at_cursor($158);
|
|
} else {
|
|
$159 = ((($158)) + 92|0);
|
|
$160 = HEAP32[$159>>2]|0;
|
|
$161 = $0;
|
|
$162 = ((($161)) + 96|0);
|
|
$163 = HEAP32[$162>>2]|0;
|
|
$164 = ($160|0)!=($163|0);
|
|
if ($164) {
|
|
$165 = $0;
|
|
_nk_textedit_move_to_last($165);
|
|
}
|
|
}
|
|
$166 = $0;
|
|
_nk_textedit_clamp($166);
|
|
$167 = $0;
|
|
$168 = $0;
|
|
$169 = ((($168)) + 88|0);
|
|
$170 = HEAP32[$169>>2]|0;
|
|
$171 = $0;
|
|
$172 = ((($171)) + 104|0);
|
|
$173 = HEAP8[$172>>0]|0;
|
|
$174 = $173&255;
|
|
$175 = $3;
|
|
$176 = $4;
|
|
_nk_textedit_find_charpos($find,$167,$170,$174,$175,$176);
|
|
$177 = ((($find)) + 16|0);
|
|
$178 = HEAP32[$177>>2]|0;
|
|
$179 = ($178|0)!=(0);
|
|
if (!($179)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$180 = $0;
|
|
$181 = ((($180)) + 103|0);
|
|
$182 = HEAP8[$181>>0]|0;
|
|
$183 = $182&255;
|
|
$184 = ($183|0)!=(0);
|
|
if ($184) {
|
|
$185 = $0;
|
|
$186 = ((($185)) + 108|0);
|
|
$187 = +HEAPF32[$186>>2];
|
|
$189 = $187;
|
|
} else {
|
|
$188 = +HEAPF32[$find>>2];
|
|
$189 = $188;
|
|
}
|
|
$goal_x = $189;
|
|
$190 = ((($find)) + 12|0);
|
|
$191 = HEAP32[$190>>2]|0;
|
|
$192 = ((($find)) + 16|0);
|
|
$193 = HEAP32[$192>>2]|0;
|
|
$194 = (($191) + ($193))|0;
|
|
$start = $194;
|
|
$195 = $start;
|
|
$196 = $0;
|
|
$197 = ((($196)) + 88|0);
|
|
HEAP32[$197>>2] = $195;
|
|
$198 = $0;
|
|
$199 = $0;
|
|
$200 = ((($199)) + 88|0);
|
|
$201 = HEAP32[$200>>2]|0;
|
|
$202 = $4;
|
|
$203 = $3;
|
|
_nk_textedit_layout_row($row,$198,$201,$202,$203);
|
|
$204 = +HEAPF32[$row>>2];
|
|
$x = $204;
|
|
$i = 0;
|
|
while(1) {
|
|
$205 = $i;
|
|
$206 = ((($row)) + 20|0);
|
|
$207 = HEAP32[$206>>2]|0;
|
|
$208 = ($205|0)<($207|0);
|
|
if (!($208)) {
|
|
break;
|
|
}
|
|
$209 = $0;
|
|
$210 = $start;
|
|
$211 = $i;
|
|
$212 = $3;
|
|
$213 = (+_nk_textedit_get_width($209,$210,$211,$212));
|
|
$dx = $213;
|
|
$214 = $dx;
|
|
$215 = $x;
|
|
$216 = $215 + $214;
|
|
$x = $216;
|
|
$217 = $x;
|
|
$218 = $goal_x;
|
|
$219 = $217 > $218;
|
|
if ($219) {
|
|
break;
|
|
}
|
|
$220 = $0;
|
|
$221 = ((($220)) + 88|0);
|
|
$222 = HEAP32[$221>>2]|0;
|
|
$223 = (($222) + 1)|0;
|
|
HEAP32[$221>>2] = $223;
|
|
$224 = $i;
|
|
$225 = (($224) + 1)|0;
|
|
$i = $225;
|
|
}
|
|
$226 = $0;
|
|
_nk_textedit_clamp($226);
|
|
$227 = $0;
|
|
$228 = ((($227)) + 103|0);
|
|
HEAP8[$228>>0] = 1;
|
|
$229 = $goal_x;
|
|
$230 = $0;
|
|
$231 = ((($230)) + 108|0);
|
|
HEAPF32[$231>>2] = $229;
|
|
$232 = $sel;
|
|
$233 = ($232|0)!=(0);
|
|
if (!($233)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$234 = $0;
|
|
$235 = ((($234)) + 88|0);
|
|
$236 = HEAP32[$235>>2]|0;
|
|
$237 = $0;
|
|
$238 = ((($237)) + 96|0);
|
|
HEAP32[$238>>2] = $236;
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 59: {
|
|
$244 = $sel4;
|
|
$245 = ($244|0)!=(0);
|
|
$246 = $0;
|
|
if ($245) {
|
|
_nk_textedit_prep_selection_at_cursor($246);
|
|
} else {
|
|
$247 = ((($246)) + 92|0);
|
|
$248 = HEAP32[$247>>2]|0;
|
|
$249 = $0;
|
|
$250 = ((($249)) + 96|0);
|
|
$251 = HEAP32[$250>>2]|0;
|
|
$252 = ($248|0)!=($251|0);
|
|
if ($252) {
|
|
$253 = $0;
|
|
_nk_textedit_move_to_first($253);
|
|
}
|
|
}
|
|
$254 = $0;
|
|
_nk_textedit_clamp($254);
|
|
$255 = $0;
|
|
$256 = $0;
|
|
$257 = ((($256)) + 88|0);
|
|
$258 = HEAP32[$257>>2]|0;
|
|
$259 = $0;
|
|
$260 = ((($259)) + 104|0);
|
|
$261 = HEAP8[$260>>0]|0;
|
|
$262 = $261&255;
|
|
$263 = $3;
|
|
$264 = $4;
|
|
_nk_textedit_find_charpos($find1,$255,$258,$262,$263,$264);
|
|
$265 = ((($find1)) + 20|0);
|
|
$266 = HEAP32[$265>>2]|0;
|
|
$267 = ((($find1)) + 12|0);
|
|
$268 = HEAP32[$267>>2]|0;
|
|
$269 = ($266|0)!=($268|0);
|
|
if (!($269)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$270 = $0;
|
|
$271 = ((($270)) + 103|0);
|
|
$272 = HEAP8[$271>>0]|0;
|
|
$273 = $272&255;
|
|
$274 = ($273|0)!=(0);
|
|
if ($274) {
|
|
$275 = $0;
|
|
$276 = ((($275)) + 108|0);
|
|
$277 = +HEAPF32[$276>>2];
|
|
$279 = $277;
|
|
} else {
|
|
$278 = +HEAPF32[$find1>>2];
|
|
$279 = $278;
|
|
}
|
|
$goal_x6 = $279;
|
|
$280 = ((($find1)) + 20|0);
|
|
$281 = HEAP32[$280>>2]|0;
|
|
$282 = $0;
|
|
$283 = ((($282)) + 88|0);
|
|
HEAP32[$283>>2] = $281;
|
|
$284 = $0;
|
|
$285 = $0;
|
|
$286 = ((($285)) + 88|0);
|
|
$287 = HEAP32[$286>>2]|0;
|
|
$288 = $4;
|
|
$289 = $3;
|
|
_nk_textedit_layout_row($row2,$284,$287,$288,$289);
|
|
$290 = +HEAPF32[$row2>>2];
|
|
$x5 = $290;
|
|
$i3 = 0;
|
|
while(1) {
|
|
$291 = $i3;
|
|
$292 = ((($row2)) + 20|0);
|
|
$293 = HEAP32[$292>>2]|0;
|
|
$294 = ($291|0)<($293|0);
|
|
if (!($294)) {
|
|
break;
|
|
}
|
|
$295 = $0;
|
|
$296 = ((($find1)) + 20|0);
|
|
$297 = HEAP32[$296>>2]|0;
|
|
$298 = $i3;
|
|
$299 = $3;
|
|
$300 = (+_nk_textedit_get_width($295,$297,$298,$299));
|
|
$dx7 = $300;
|
|
$301 = $dx7;
|
|
$302 = $x5;
|
|
$303 = $302 + $301;
|
|
$x5 = $303;
|
|
$304 = $x5;
|
|
$305 = $goal_x6;
|
|
$306 = $304 > $305;
|
|
if ($306) {
|
|
break;
|
|
}
|
|
$307 = $0;
|
|
$308 = ((($307)) + 88|0);
|
|
$309 = HEAP32[$308>>2]|0;
|
|
$310 = (($309) + 1)|0;
|
|
HEAP32[$308>>2] = $310;
|
|
$311 = $i3;
|
|
$312 = (($311) + 1)|0;
|
|
$i3 = $312;
|
|
}
|
|
$313 = $0;
|
|
_nk_textedit_clamp($313);
|
|
$314 = $0;
|
|
$315 = ((($314)) + 103|0);
|
|
HEAP8[$315>>0] = 1;
|
|
$316 = $goal_x6;
|
|
$317 = $0;
|
|
$318 = ((($317)) + 108|0);
|
|
HEAPF32[$318>>2] = $316;
|
|
$319 = $sel4;
|
|
$320 = ($319|0)!=(0);
|
|
if (!($320)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$321 = $0;
|
|
$322 = ((($321)) + 88|0);
|
|
$323 = HEAP32[$322>>2]|0;
|
|
$324 = $0;
|
|
$325 = ((($324)) + 96|0);
|
|
HEAP32[$325>>2] = $323;
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 73: {
|
|
$326 = $0;
|
|
$327 = ((($326)) + 92|0);
|
|
$328 = HEAP32[$327>>2]|0;
|
|
$329 = $0;
|
|
$330 = ((($329)) + 96|0);
|
|
$331 = HEAP32[$330>>2]|0;
|
|
$332 = ($328|0)!=($331|0);
|
|
$333 = $0;
|
|
if ($332) {
|
|
_nk_textedit_delete_selection($333);
|
|
} else {
|
|
$334 = ((($333)) + 12|0);
|
|
$335 = ((($334)) + 60|0);
|
|
$336 = HEAP32[$335>>2]|0;
|
|
$n = $336;
|
|
$337 = $0;
|
|
$338 = ((($337)) + 88|0);
|
|
$339 = HEAP32[$338>>2]|0;
|
|
$340 = $n;
|
|
$341 = ($339|0)<($340|0);
|
|
if ($341) {
|
|
$342 = $0;
|
|
$343 = $0;
|
|
$344 = ((($343)) + 88|0);
|
|
$345 = HEAP32[$344>>2]|0;
|
|
_nk_textedit_delete($342,$345,1);
|
|
}
|
|
}
|
|
$346 = $0;
|
|
$347 = ((($346)) + 103|0);
|
|
HEAP8[$347>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 78: {
|
|
$348 = $0;
|
|
$349 = ((($348)) + 92|0);
|
|
$350 = HEAP32[$349>>2]|0;
|
|
$351 = $0;
|
|
$352 = ((($351)) + 96|0);
|
|
$353 = HEAP32[$352>>2]|0;
|
|
$354 = ($350|0)!=($353|0);
|
|
$355 = $0;
|
|
if ($354) {
|
|
_nk_textedit_delete_selection($355);
|
|
} else {
|
|
_nk_textedit_clamp($355);
|
|
$356 = $0;
|
|
$357 = ((($356)) + 88|0);
|
|
$358 = HEAP32[$357>>2]|0;
|
|
$359 = ($358|0)>(0);
|
|
if ($359) {
|
|
$360 = $0;
|
|
$361 = $0;
|
|
$362 = ((($361)) + 88|0);
|
|
$363 = HEAP32[$362>>2]|0;
|
|
$364 = (($363) - 1)|0;
|
|
_nk_textedit_delete($360,$364,1);
|
|
$365 = $0;
|
|
$366 = ((($365)) + 88|0);
|
|
$367 = HEAP32[$366>>2]|0;
|
|
$368 = (($367) + -1)|0;
|
|
HEAP32[$366>>2] = $368;
|
|
}
|
|
}
|
|
$369 = $0;
|
|
$370 = ((($369)) + 103|0);
|
|
HEAP8[$370>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 83: {
|
|
$371 = $2;
|
|
$372 = ($371|0)!=(0);
|
|
$373 = $0;
|
|
if ($372) {
|
|
_nk_textedit_prep_selection_at_cursor($373);
|
|
$374 = $0;
|
|
$375 = ((($374)) + 96|0);
|
|
HEAP32[$375>>2] = 0;
|
|
$376 = $0;
|
|
$377 = ((($376)) + 88|0);
|
|
HEAP32[$377>>2] = 0;
|
|
$378 = $0;
|
|
$379 = ((($378)) + 103|0);
|
|
HEAP8[$379>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$380 = ((($373)) + 96|0);
|
|
HEAP32[$380>>2] = 0;
|
|
$381 = $0;
|
|
$382 = ((($381)) + 92|0);
|
|
HEAP32[$382>>2] = 0;
|
|
$383 = $0;
|
|
$384 = ((($383)) + 88|0);
|
|
HEAP32[$384>>2] = 0;
|
|
$385 = $0;
|
|
$386 = ((($385)) + 103|0);
|
|
HEAP8[$386>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
break;
|
|
}
|
|
case 86: {
|
|
$387 = $2;
|
|
$388 = ($387|0)!=(0);
|
|
$389 = $0;
|
|
if ($388) {
|
|
_nk_textedit_prep_selection_at_cursor($389);
|
|
$390 = $0;
|
|
$391 = ((($390)) + 12|0);
|
|
$392 = ((($391)) + 60|0);
|
|
$393 = HEAP32[$392>>2]|0;
|
|
$394 = $0;
|
|
$395 = ((($394)) + 96|0);
|
|
HEAP32[$395>>2] = $393;
|
|
$396 = $0;
|
|
$397 = ((($396)) + 88|0);
|
|
HEAP32[$397>>2] = $393;
|
|
$398 = $0;
|
|
$399 = ((($398)) + 103|0);
|
|
HEAP8[$399>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$400 = ((($389)) + 12|0);
|
|
$401 = ((($400)) + 60|0);
|
|
$402 = HEAP32[$401>>2]|0;
|
|
$403 = $0;
|
|
$404 = ((($403)) + 88|0);
|
|
HEAP32[$404>>2] = $402;
|
|
$405 = $0;
|
|
$406 = ((($405)) + 96|0);
|
|
HEAP32[$406>>2] = 0;
|
|
$407 = $0;
|
|
$408 = ((($407)) + 92|0);
|
|
HEAP32[$408>>2] = 0;
|
|
$409 = $0;
|
|
$410 = ((($409)) + 103|0);
|
|
HEAP8[$410>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
break;
|
|
}
|
|
case 89: {
|
|
$411 = $2;
|
|
$412 = ($411|0)!=(0);
|
|
$413 = $0;
|
|
if ($412) {
|
|
_nk_textedit_clamp($413);
|
|
$414 = $0;
|
|
_nk_textedit_prep_selection_at_cursor($414);
|
|
$415 = $0;
|
|
$416 = ((($415)) + 12|0);
|
|
$417 = ((($416)) + 60|0);
|
|
$418 = HEAP32[$417>>2]|0;
|
|
$419 = ($418|0)!=(0);
|
|
if ($419) {
|
|
$420 = $0;
|
|
$421 = ((($420)) + 88|0);
|
|
$422 = HEAP32[$421>>2]|0;
|
|
$423 = $0;
|
|
$424 = ((($423)) + 12|0);
|
|
$425 = ((($424)) + 60|0);
|
|
$426 = HEAP32[$425>>2]|0;
|
|
$427 = ($422|0)==($426|0);
|
|
if ($427) {
|
|
$428 = $0;
|
|
$429 = ((($428)) + 88|0);
|
|
$430 = HEAP32[$429>>2]|0;
|
|
$431 = (($430) + -1)|0;
|
|
HEAP32[$429>>2] = $431;
|
|
}
|
|
}
|
|
$432 = $0;
|
|
$433 = $0;
|
|
$434 = ((($433)) + 88|0);
|
|
$435 = HEAP32[$434>>2]|0;
|
|
$436 = $0;
|
|
$437 = ((($436)) + 104|0);
|
|
$438 = HEAP8[$437>>0]|0;
|
|
$439 = $438&255;
|
|
$440 = $3;
|
|
$441 = $4;
|
|
_nk_textedit_find_charpos($find8,$432,$435,$439,$440,$441);
|
|
$442 = ((($find8)) + 12|0);
|
|
$443 = HEAP32[$442>>2]|0;
|
|
$444 = $0;
|
|
$445 = ((($444)) + 96|0);
|
|
HEAP32[$445>>2] = $443;
|
|
$446 = $0;
|
|
$447 = ((($446)) + 88|0);
|
|
HEAP32[$447>>2] = $443;
|
|
$448 = $0;
|
|
$449 = ((($448)) + 103|0);
|
|
HEAP8[$449>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$450 = ((($413)) + 12|0);
|
|
$451 = ((($450)) + 60|0);
|
|
$452 = HEAP32[$451>>2]|0;
|
|
$453 = ($452|0)!=(0);
|
|
if ($453) {
|
|
$454 = $0;
|
|
$455 = ((($454)) + 88|0);
|
|
$456 = HEAP32[$455>>2]|0;
|
|
$457 = $0;
|
|
$458 = ((($457)) + 12|0);
|
|
$459 = ((($458)) + 60|0);
|
|
$460 = HEAP32[$459>>2]|0;
|
|
$461 = ($456|0)==($460|0);
|
|
if ($461) {
|
|
$462 = $0;
|
|
$463 = ((($462)) + 88|0);
|
|
$464 = HEAP32[$463>>2]|0;
|
|
$465 = (($464) + -1)|0;
|
|
HEAP32[$463>>2] = $465;
|
|
}
|
|
}
|
|
$466 = $0;
|
|
_nk_textedit_clamp($466);
|
|
$467 = $0;
|
|
_nk_textedit_move_to_first($467);
|
|
$468 = $0;
|
|
$469 = $0;
|
|
$470 = ((($469)) + 88|0);
|
|
$471 = HEAP32[$470>>2]|0;
|
|
$472 = $0;
|
|
$473 = ((($472)) + 104|0);
|
|
$474 = HEAP8[$473>>0]|0;
|
|
$475 = $474&255;
|
|
$476 = $3;
|
|
$477 = $4;
|
|
_nk_textedit_find_charpos($find9,$468,$471,$475,$476,$477);
|
|
$478 = ((($find9)) + 12|0);
|
|
$479 = HEAP32[$478>>2]|0;
|
|
$480 = $0;
|
|
$481 = ((($480)) + 88|0);
|
|
HEAP32[$481>>2] = $479;
|
|
$482 = $0;
|
|
$483 = ((($482)) + 103|0);
|
|
HEAP8[$483>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
break;
|
|
}
|
|
case 98: {
|
|
$484 = $2;
|
|
$485 = ($484|0)!=(0);
|
|
$486 = $0;
|
|
_nk_textedit_clamp($486);
|
|
$487 = $0;
|
|
if ($485) {
|
|
_nk_textedit_prep_selection_at_cursor($487);
|
|
$488 = $0;
|
|
$489 = $0;
|
|
$490 = ((($489)) + 88|0);
|
|
$491 = HEAP32[$490>>2]|0;
|
|
$492 = $0;
|
|
$493 = ((($492)) + 104|0);
|
|
$494 = HEAP8[$493>>0]|0;
|
|
$495 = $494&255;
|
|
$496 = $3;
|
|
$497 = $4;
|
|
_nk_textedit_find_charpos($find10,$488,$491,$495,$496,$497);
|
|
$498 = $0;
|
|
$499 = ((($498)) + 103|0);
|
|
HEAP8[$499>>0] = 0;
|
|
$500 = ((($find10)) + 12|0);
|
|
$501 = HEAP32[$500>>2]|0;
|
|
$502 = ((($find10)) + 16|0);
|
|
$503 = HEAP32[$502>>2]|0;
|
|
$504 = (($501) + ($503))|0;
|
|
$505 = $0;
|
|
$506 = ((($505)) + 88|0);
|
|
HEAP32[$506>>2] = $504;
|
|
$507 = ((($find10)) + 16|0);
|
|
$508 = HEAP32[$507>>2]|0;
|
|
$509 = ($508|0)>(0);
|
|
if ($509) {
|
|
$510 = $0;
|
|
$511 = ((($510)) + 12|0);
|
|
$512 = $0;
|
|
$513 = ((($512)) + 88|0);
|
|
$514 = HEAP32[$513>>2]|0;
|
|
$515 = (($514) - 1)|0;
|
|
$516 = (_nk_str_rune_at($511,$515)|0);
|
|
$517 = ($516|0)==(10);
|
|
if ($517) {
|
|
$518 = $0;
|
|
$519 = ((($518)) + 88|0);
|
|
$520 = HEAP32[$519>>2]|0;
|
|
$521 = (($520) + -1)|0;
|
|
HEAP32[$519>>2] = $521;
|
|
}
|
|
}
|
|
$522 = $0;
|
|
$523 = ((($522)) + 88|0);
|
|
$524 = HEAP32[$523>>2]|0;
|
|
$525 = $0;
|
|
$526 = ((($525)) + 96|0);
|
|
HEAP32[$526>>2] = $524;
|
|
STACKTOP = sp;return;
|
|
}
|
|
_nk_textedit_move_to_first($487);
|
|
$527 = $0;
|
|
$528 = $0;
|
|
$529 = ((($528)) + 88|0);
|
|
$530 = HEAP32[$529>>2]|0;
|
|
$531 = $0;
|
|
$532 = ((($531)) + 104|0);
|
|
$533 = HEAP8[$532>>0]|0;
|
|
$534 = $533&255;
|
|
$535 = $3;
|
|
$536 = $4;
|
|
_nk_textedit_find_charpos($find11,$527,$530,$534,$535,$536);
|
|
$537 = $0;
|
|
$538 = ((($537)) + 103|0);
|
|
HEAP8[$538>>0] = 0;
|
|
$539 = ((($find11)) + 12|0);
|
|
$540 = HEAP32[$539>>2]|0;
|
|
$541 = ((($find11)) + 16|0);
|
|
$542 = HEAP32[$541>>2]|0;
|
|
$543 = (($540) + ($542))|0;
|
|
$544 = $0;
|
|
$545 = ((($544)) + 88|0);
|
|
HEAP32[$545>>2] = $543;
|
|
$546 = ((($find11)) + 16|0);
|
|
$547 = HEAP32[$546>>2]|0;
|
|
$548 = ($547|0)>(0);
|
|
if (!($548)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$549 = $0;
|
|
$550 = ((($549)) + 12|0);
|
|
$551 = $0;
|
|
$552 = ((($551)) + 88|0);
|
|
$553 = HEAP32[$552>>2]|0;
|
|
$554 = (($553) - 1)|0;
|
|
$555 = (_nk_str_rune_at($550,$554)|0);
|
|
$556 = ($555|0)==(10);
|
|
if (!($556)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$557 = $0;
|
|
$558 = ((($557)) + 88|0);
|
|
$559 = HEAP32[$558>>2]|0;
|
|
$560 = (($559) + -1)|0;
|
|
HEAP32[$558>>2] = $560;
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
case 106: {
|
|
STACKTOP = sp;return;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
function _nk_text_calculate_text_bounds($agg$result,$font,$begin,$byte_len,$row_height,$remaining,$out_offset,$glyphs,$op) {
|
|
$agg$result = $agg$result|0;
|
|
$font = $font|0;
|
|
$begin = $begin|0;
|
|
$byte_len = $byte_len|0;
|
|
$row_height = +$row_height;
|
|
$remaining = $remaining|0;
|
|
$out_offset = $out_offset|0;
|
|
$glyphs = $glyphs|0;
|
|
$op = $op|0;
|
|
var $$byval_copy = 0, $$byval_copy4 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0, $111 = 0.0, $112 = 0, $113 = 0;
|
|
var $114 = 0, $115 = 0.0, $116 = 0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0, $122 = 0, $123 = 0.0, $124 = 0, $125 = 0.0, $126 = 0, $127 = 0.0, $128 = 0.0, $129 = 0, $13 = 0, $130 = 0, $131 = 0;
|
|
var $132 = 0, $133 = 0, $134 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0.0, $29 = 0;
|
|
var $3 = 0.0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0.0;
|
|
var $48 = 0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0;
|
|
var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0;
|
|
var $84 = 0, $85 = 0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0, $9 = 0.0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0.0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $glyph_len = 0, $glyph_width = 0.0, $line_height = 0.0;
|
|
var $line_width = 0.0, $or$cond = 0, $or$cond$not = 0, $or$cond3 = 0, $text_len = 0, $text_size = 0, $unicode = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy4 = sp + 80|0;
|
|
$$byval_copy = sp + 76|0;
|
|
$text_size = sp + 32|0;
|
|
$unicode = sp + 12|0;
|
|
$8 = sp;
|
|
$0 = $font;
|
|
$1 = $begin;
|
|
$2 = $byte_len;
|
|
$3 = $row_height;
|
|
$4 = $remaining;
|
|
$5 = $out_offset;
|
|
$6 = $glyphs;
|
|
$7 = $op;
|
|
$9 = $3;
|
|
$line_height = $9;
|
|
_nk_vec2($text_size,0.0,0.0);
|
|
$line_width = 0.0;
|
|
$glyph_len = 0;
|
|
HEAP32[$unicode>>2] = 0;
|
|
$text_len = 0;
|
|
$10 = $1;
|
|
$11 = ($10|0)==(0|0);
|
|
$12 = $2;
|
|
$13 = ($12|0)<=(0);
|
|
$or$cond = $11 | $13;
|
|
$or$cond$not = $or$cond ^ 1;
|
|
$14 = $0;
|
|
$15 = ($14|0)!=(0|0);
|
|
$or$cond3 = $or$cond$not & $15;
|
|
if (!($or$cond3)) {
|
|
$16 = $3;
|
|
_nk_vec2($agg$result,0.0,$16);
|
|
STACKTOP = sp;return;
|
|
}
|
|
$17 = $1;
|
|
$18 = $2;
|
|
$19 = (_nk_utf_decode($17,$unicode,$18)|0);
|
|
$glyph_len = $19;
|
|
$20 = $glyph_len;
|
|
$21 = ($20|0)!=(0);
|
|
if (!($21)) {
|
|
;HEAP32[$agg$result>>2]=HEAP32[$text_size>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$text_size+4>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
$22 = $0;
|
|
$23 = ((($22)) + 8|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = $0;
|
|
$26 = $0;
|
|
$27 = ((($26)) + 4|0);
|
|
$28 = +HEAPF32[$27>>2];
|
|
$29 = $1;
|
|
$30 = $glyph_len;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$25>>2]|0;
|
|
$31 = (+FUNCTION_TABLE_didii[$24 & 15]($$byval_copy,$28,$29,$30));
|
|
$glyph_width = $31;
|
|
$32 = $6;
|
|
HEAP32[$32>>2] = 0;
|
|
while(1) {
|
|
$33 = $text_len;
|
|
$34 = $2;
|
|
$35 = ($33|0)<($34|0);
|
|
$36 = $glyph_len;
|
|
$37 = ($36|0)!=(0);
|
|
$38 = $35 ? $37 : 0;
|
|
if (!($38)) {
|
|
break;
|
|
}
|
|
$39 = HEAP32[$unicode>>2]|0;
|
|
$40 = ($39|0)==(10);
|
|
if ($40) {
|
|
$41 = +HEAPF32[$text_size>>2];
|
|
$42 = $line_width;
|
|
$43 = $41 < $42;
|
|
$44 = $line_width;
|
|
$45 = +HEAPF32[$text_size>>2];
|
|
$46 = $43 ? $44 : $45;
|
|
HEAPF32[$text_size>>2] = $46;
|
|
$47 = $line_height;
|
|
$48 = ((($text_size)) + 4|0);
|
|
$49 = +HEAPF32[$48>>2];
|
|
$50 = $49 + $47;
|
|
HEAPF32[$48>>2] = $50;
|
|
$line_width = 0.0;
|
|
$51 = $6;
|
|
$52 = HEAP32[$51>>2]|0;
|
|
$53 = (($52) + 1)|0;
|
|
HEAP32[$51>>2] = $53;
|
|
$54 = $7;
|
|
$55 = ($54|0)==(1);
|
|
if ($55) {
|
|
break;
|
|
}
|
|
$56 = $text_len;
|
|
$57 = (($56) + 1)|0;
|
|
$text_len = $57;
|
|
$58 = $1;
|
|
$59 = $text_len;
|
|
$60 = (($58) + ($59)|0);
|
|
$61 = $2;
|
|
$62 = $text_len;
|
|
$63 = (($61) - ($62))|0;
|
|
$64 = (_nk_utf_decode($60,$unicode,$63)|0);
|
|
$glyph_len = $64;
|
|
continue;
|
|
}
|
|
$65 = HEAP32[$unicode>>2]|0;
|
|
$66 = ($65|0)==(13);
|
|
if ($66) {
|
|
$67 = $text_len;
|
|
$68 = (($67) + 1)|0;
|
|
$text_len = $68;
|
|
$69 = $6;
|
|
$70 = HEAP32[$69>>2]|0;
|
|
$71 = (($70) + 1)|0;
|
|
HEAP32[$69>>2] = $71;
|
|
$72 = $1;
|
|
$73 = $text_len;
|
|
$74 = (($72) + ($73)|0);
|
|
$75 = $2;
|
|
$76 = $text_len;
|
|
$77 = (($75) - ($76))|0;
|
|
$78 = (_nk_utf_decode($74,$unicode,$77)|0);
|
|
$glyph_len = $78;
|
|
continue;
|
|
} else {
|
|
$79 = $6;
|
|
$80 = HEAP32[$79>>2]|0;
|
|
$81 = (($80) + 1)|0;
|
|
$82 = $6;
|
|
HEAP32[$82>>2] = $81;
|
|
$83 = $glyph_len;
|
|
$84 = $text_len;
|
|
$85 = (($84) + ($83))|0;
|
|
$text_len = $85;
|
|
$86 = $glyph_width;
|
|
$87 = $line_width;
|
|
$88 = $87 + $86;
|
|
$line_width = $88;
|
|
$89 = $0;
|
|
$90 = ((($89)) + 8|0);
|
|
$91 = HEAP32[$90>>2]|0;
|
|
$92 = $0;
|
|
$93 = $0;
|
|
$94 = ((($93)) + 4|0);
|
|
$95 = +HEAPF32[$94>>2];
|
|
$96 = $1;
|
|
$97 = $text_len;
|
|
$98 = (($96) + ($97)|0);
|
|
$99 = $glyph_len;
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$92>>2]|0;
|
|
$100 = (+FUNCTION_TABLE_didii[$91 & 15]($$byval_copy4,$95,$98,$99));
|
|
$glyph_width = $100;
|
|
$101 = $1;
|
|
$102 = $text_len;
|
|
$103 = (($101) + ($102)|0);
|
|
$104 = $2;
|
|
$105 = $text_len;
|
|
$106 = (($104) - ($105))|0;
|
|
$107 = (_nk_utf_decode($103,$unicode,$106)|0);
|
|
$glyph_len = $107;
|
|
continue;
|
|
}
|
|
}
|
|
$108 = +HEAPF32[$text_size>>2];
|
|
$109 = $line_width;
|
|
$110 = $108 < $109;
|
|
if ($110) {
|
|
$111 = $line_width;
|
|
HEAPF32[$text_size>>2] = $111;
|
|
}
|
|
$112 = $5;
|
|
$113 = ($112|0)!=(0|0);
|
|
if ($113) {
|
|
$114 = $5;
|
|
$115 = $line_width;
|
|
$116 = ((($text_size)) + 4|0);
|
|
$117 = +HEAPF32[$116>>2];
|
|
$118 = $line_height;
|
|
$119 = $117 + $118;
|
|
_nk_vec2($8,$115,$119);
|
|
;HEAP32[$114>>2]=HEAP32[$8>>2]|0;HEAP32[$114+4>>2]=HEAP32[$8+4>>2]|0;
|
|
}
|
|
$120 = $line_width;
|
|
$121 = $120 > 0.0;
|
|
if ($121) {
|
|
label = 19;
|
|
} else {
|
|
$122 = ((($text_size)) + 4|0);
|
|
$123 = +HEAPF32[$122>>2];
|
|
$124 = $123 == 0.0;
|
|
if ($124) {
|
|
label = 19;
|
|
}
|
|
}
|
|
if ((label|0) == 19) {
|
|
$125 = $line_height;
|
|
$126 = ((($text_size)) + 4|0);
|
|
$127 = +HEAPF32[$126>>2];
|
|
$128 = $127 + $125;
|
|
HEAPF32[$126>>2] = $128;
|
|
}
|
|
$129 = $4;
|
|
$130 = ($129|0)!=(0|0);
|
|
if ($130) {
|
|
$131 = $1;
|
|
$132 = $text_len;
|
|
$133 = (($131) + ($132)|0);
|
|
$134 = $4;
|
|
HEAP32[$134>>2] = $133;
|
|
}
|
|
;HEAP32[$agg$result>>2]=HEAP32[$text_size>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$text_size+4>>2]|0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_edit_draw_text($out,$style,$pos_x,$pos_y,$x_offset,$text,$byte_len,$row_height,$font,$background,$foreground,$is_selected) {
|
|
$out = $out|0;
|
|
$style = $style|0;
|
|
$pos_x = +$pos_x;
|
|
$pos_y = +$pos_y;
|
|
$x_offset = +$x_offset;
|
|
$text = $text|0;
|
|
$byte_len = $byte_len|0;
|
|
$row_height = +$row_height;
|
|
$font = $font|0;
|
|
$background = $background|0;
|
|
$foreground = $foreground|0;
|
|
$is_selected = $is_selected|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0.0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0.0;
|
|
var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0.0, $126 = 0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0, $131 = 0.0, $132 = 0;
|
|
var $133 = 0.0, $134 = 0, $135 = 0.0, $136 = 0, $137 = 0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0;
|
|
var $151 = 0, $152 = 0, $153 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0;
|
|
var $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0.0, $46 = 0.0, $47 = 0.0, $48 = 0, $49 = 0.0;
|
|
var $5 = 0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0;
|
|
var $68 = 0, $69 = 0, $7 = 0.0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0, $83 = 0, $84 = 0, $85 = 0;
|
|
var $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $background$byval_copy = 0, $background$byval_copy7 = 0, $glyph_len = 0, $glyph_width = 0.0, $label = 0;
|
|
var $label$byval_copy = 0, $label$byval_copy6 = 0, $label1 = 0, $label1$byval_copy = 0, $label1$byval_copy8 = 0, $line = 0, $line_count = 0, $line_offset = 0.0, $line_width = 0.0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $text_len = 0, $txt = 0, $unicode = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 208|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$label1$byval_copy8 = sp + 184|0;
|
|
$background$byval_copy7 = sp + 204|0;
|
|
$label1$byval_copy = sp + 168|0;
|
|
$$byval_copy = sp + 160|0;
|
|
$label$byval_copy6 = sp + 144|0;
|
|
$background$byval_copy = sp + 200|0;
|
|
$label$byval_copy = sp + 128|0;
|
|
$unicode = sp + 80|0;
|
|
$txt = sp + 40|0;
|
|
$10 = sp + 32|0;
|
|
$label = sp + 16|0;
|
|
$label1 = sp;
|
|
$0 = $out;
|
|
$1 = $style;
|
|
$2 = $pos_x;
|
|
$3 = $pos_y;
|
|
$4 = $x_offset;
|
|
$5 = $text;
|
|
$6 = $byte_len;
|
|
$7 = $row_height;
|
|
$8 = $font;
|
|
$9 = $is_selected;
|
|
$11 = $0;
|
|
$12 = ($11|0)!=(0|0);
|
|
if (!($12)) {
|
|
___assert_fail((31441|0),(13400|0),12699,(31769|0));
|
|
// unreachable;
|
|
}
|
|
$13 = $8;
|
|
$14 = ($13|0)!=(0|0);
|
|
if (!($14)) {
|
|
___assert_fail((14249|0),(13400|0),12700,(31769|0));
|
|
// unreachable;
|
|
}
|
|
$15 = $1;
|
|
$16 = ($15|0)!=(0|0);
|
|
if (!($16)) {
|
|
___assert_fail((31462|0),(13400|0),12701,(31769|0));
|
|
// unreachable;
|
|
}
|
|
$17 = $5;
|
|
$18 = ($17|0)!=(0|0);
|
|
$19 = $6;
|
|
$20 = ($19|0)!=(0);
|
|
$or$cond = $18 & $20;
|
|
$21 = $0;
|
|
$22 = ($21|0)!=(0|0);
|
|
$or$cond3 = $or$cond & $22;
|
|
$23 = $1;
|
|
$24 = ($23|0)!=(0|0);
|
|
$or$cond5 = $or$cond3 & $24;
|
|
if (!($or$cond5)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$glyph_len = 0;
|
|
HEAP32[$unicode>>2] = 0;
|
|
$text_len = 0;
|
|
$line_width = 0.0;
|
|
$25 = $5;
|
|
$line = $25;
|
|
$line_offset = 0.0;
|
|
$line_count = 0;
|
|
_nk_vec2($10,0.0,0.0);
|
|
;HEAP32[$txt>>2]=HEAP32[$10>>2]|0;HEAP32[$txt+4>>2]=HEAP32[$10+4>>2]|0;
|
|
$26 = ((($txt)) + 8|0);
|
|
;HEAP8[$26>>0]=HEAP8[$background>>0]|0;HEAP8[$26+1>>0]=HEAP8[$background+1>>0]|0;HEAP8[$26+2>>0]=HEAP8[$background+2>>0]|0;HEAP8[$26+3>>0]=HEAP8[$background+3>>0]|0;
|
|
$27 = ((($txt)) + 12|0);
|
|
;HEAP8[$27>>0]=HEAP8[$foreground>>0]|0;HEAP8[$27+1>>0]=HEAP8[$foreground+1>>0]|0;HEAP8[$27+2>>0]=HEAP8[$foreground+2>>0]|0;HEAP8[$27+3>>0]=HEAP8[$foreground+3>>0]|0;
|
|
$28 = $5;
|
|
$29 = $text_len;
|
|
$30 = (($28) + ($29)|0);
|
|
$31 = $6;
|
|
$32 = $text_len;
|
|
$33 = (($31) - ($32))|0;
|
|
$34 = (_nk_utf_decode($30,$unicode,$33)|0);
|
|
$glyph_len = $34;
|
|
$35 = $glyph_len;
|
|
$36 = ($35|0)!=(0);
|
|
if (!($36)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
while(1) {
|
|
$37 = $text_len;
|
|
$38 = $6;
|
|
$39 = ($37|0)<($38|0);
|
|
$40 = $glyph_len;
|
|
$41 = ($40|0)!=(0);
|
|
$42 = $39 ? $41 : 0;
|
|
if (!($42)) {
|
|
break;
|
|
}
|
|
$43 = HEAP32[$unicode>>2]|0;
|
|
$44 = ($43|0)==(10);
|
|
if (!($44)) {
|
|
$89 = HEAP32[$unicode>>2]|0;
|
|
$90 = ($89|0)==(13);
|
|
if ($90) {
|
|
$91 = $text_len;
|
|
$92 = (($91) + 1)|0;
|
|
$text_len = $92;
|
|
$93 = $5;
|
|
$94 = $text_len;
|
|
$95 = (($93) + ($94)|0);
|
|
$96 = $6;
|
|
$97 = $text_len;
|
|
$98 = (($96) - ($97))|0;
|
|
$99 = (_nk_utf_decode($95,$unicode,$98)|0);
|
|
$glyph_len = $99;
|
|
continue;
|
|
} else {
|
|
$100 = $8;
|
|
$101 = ((($100)) + 8|0);
|
|
$102 = HEAP32[$101>>2]|0;
|
|
$103 = $8;
|
|
$104 = $8;
|
|
$105 = ((($104)) + 4|0);
|
|
$106 = +HEAPF32[$105>>2];
|
|
$107 = $5;
|
|
$108 = $text_len;
|
|
$109 = (($107) + ($108)|0);
|
|
$110 = $glyph_len;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$103>>2]|0;
|
|
$111 = (+FUNCTION_TABLE_didii[$102 & 15]($$byval_copy,$106,$109,$110));
|
|
$glyph_width = $111;
|
|
$112 = $glyph_width;
|
|
$113 = $line_width;
|
|
$114 = $113 + $112;
|
|
$line_width = $114;
|
|
$115 = $glyph_len;
|
|
$116 = $text_len;
|
|
$117 = (($116) + ($115))|0;
|
|
$text_len = $117;
|
|
$118 = $5;
|
|
$119 = $text_len;
|
|
$120 = (($118) + ($119)|0);
|
|
$121 = $6;
|
|
$122 = $text_len;
|
|
$123 = (($121) - ($122))|0;
|
|
$124 = (_nk_utf_decode($120,$unicode,$123)|0);
|
|
$glyph_len = $124;
|
|
continue;
|
|
}
|
|
}
|
|
$45 = $3;
|
|
$46 = $line_offset;
|
|
$47 = $45 + $46;
|
|
$48 = ((($label)) + 4|0);
|
|
HEAPF32[$48>>2] = $47;
|
|
$49 = $7;
|
|
$50 = ((($label)) + 12|0);
|
|
HEAPF32[$50>>2] = $49;
|
|
$51 = $line_width;
|
|
$52 = ((($label)) + 8|0);
|
|
HEAPF32[$52>>2] = $51;
|
|
$53 = $2;
|
|
HEAPF32[$label>>2] = $53;
|
|
$54 = $line_count;
|
|
$55 = ($54|0)!=(0);
|
|
if (!($55)) {
|
|
$56 = $4;
|
|
$57 = +HEAPF32[$label>>2];
|
|
$58 = $57 + $56;
|
|
HEAPF32[$label>>2] = $58;
|
|
}
|
|
$59 = $9;
|
|
$60 = ($59|0)!=(0);
|
|
if ($60) {
|
|
$61 = $0;
|
|
;HEAP32[$label$byval_copy>>2]=HEAP32[$label>>2]|0;HEAP32[$label$byval_copy+4>>2]=HEAP32[$label+4>>2]|0;HEAP32[$label$byval_copy+8>>2]=HEAP32[$label+8>>2]|0;HEAP32[$label$byval_copy+12>>2]=HEAP32[$label+12>>2]|0;
|
|
;HEAP8[$background$byval_copy>>0]=HEAP8[$background>>0]|0;HEAP8[$background$byval_copy+1>>0]=HEAP8[$background+1>>0]|0;HEAP8[$background$byval_copy+2>>0]=HEAP8[$background+2>>0]|0;HEAP8[$background$byval_copy+3>>0]=HEAP8[$background+3>>0]|0;
|
|
_nk_fill_rect($61,$label$byval_copy,0.0,$background$byval_copy);
|
|
}
|
|
$62 = $0;
|
|
$63 = $line;
|
|
$64 = $5;
|
|
$65 = $text_len;
|
|
$66 = (($64) + ($65)|0);
|
|
$67 = $line;
|
|
$68 = $66;
|
|
$69 = $67;
|
|
$70 = (($68) - ($69))|0;
|
|
$71 = $8;
|
|
;HEAP32[$label$byval_copy6>>2]=HEAP32[$label>>2]|0;HEAP32[$label$byval_copy6+4>>2]=HEAP32[$label+4>>2]|0;HEAP32[$label$byval_copy6+8>>2]=HEAP32[$label+8>>2]|0;HEAP32[$label$byval_copy6+12>>2]=HEAP32[$label+12>>2]|0;
|
|
_nk_widget_text($62,$label$byval_copy6,$63,$70,$txt,18,$71);
|
|
$72 = $text_len;
|
|
$73 = (($72) + 1)|0;
|
|
$text_len = $73;
|
|
$74 = $line_count;
|
|
$75 = (($74) + 1)|0;
|
|
$line_count = $75;
|
|
$line_width = 0.0;
|
|
$76 = $5;
|
|
$77 = $text_len;
|
|
$78 = (($76) + ($77)|0);
|
|
$line = $78;
|
|
$79 = $7;
|
|
$80 = $line_offset;
|
|
$81 = $80 + $79;
|
|
$line_offset = $81;
|
|
$82 = $5;
|
|
$83 = $text_len;
|
|
$84 = (($82) + ($83)|0);
|
|
$85 = $6;
|
|
$86 = $text_len;
|
|
$87 = (($85) - ($86))|0;
|
|
$88 = (_nk_utf_decode($84,$unicode,$87)|0);
|
|
$glyph_len = $88;
|
|
}
|
|
$125 = $line_width;
|
|
$126 = $125 > 0.0;
|
|
if (!($126)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$127 = $3;
|
|
$128 = $line_offset;
|
|
$129 = $127 + $128;
|
|
$130 = ((($label1)) + 4|0);
|
|
HEAPF32[$130>>2] = $129;
|
|
$131 = $7;
|
|
$132 = ((($label1)) + 12|0);
|
|
HEAPF32[$132>>2] = $131;
|
|
$133 = $line_width;
|
|
$134 = ((($label1)) + 8|0);
|
|
HEAPF32[$134>>2] = $133;
|
|
$135 = $2;
|
|
HEAPF32[$label1>>2] = $135;
|
|
$136 = $line_count;
|
|
$137 = ($136|0)!=(0);
|
|
if (!($137)) {
|
|
$138 = $4;
|
|
$139 = +HEAPF32[$label1>>2];
|
|
$140 = $139 + $138;
|
|
HEAPF32[$label1>>2] = $140;
|
|
}
|
|
$141 = $9;
|
|
$142 = ($141|0)!=(0);
|
|
if ($142) {
|
|
$143 = $0;
|
|
;HEAP32[$label1$byval_copy>>2]=HEAP32[$label1>>2]|0;HEAP32[$label1$byval_copy+4>>2]=HEAP32[$label1+4>>2]|0;HEAP32[$label1$byval_copy+8>>2]=HEAP32[$label1+8>>2]|0;HEAP32[$label1$byval_copy+12>>2]=HEAP32[$label1+12>>2]|0;
|
|
;HEAP8[$background$byval_copy7>>0]=HEAP8[$background>>0]|0;HEAP8[$background$byval_copy7+1>>0]=HEAP8[$background+1>>0]|0;HEAP8[$background$byval_copy7+2>>0]=HEAP8[$background+2>>0]|0;HEAP8[$background$byval_copy7+3>>0]=HEAP8[$background+3>>0]|0;
|
|
_nk_fill_rect($143,$label1$byval_copy,0.0,$background$byval_copy7);
|
|
}
|
|
$144 = $0;
|
|
$145 = $line;
|
|
$146 = $5;
|
|
$147 = $text_len;
|
|
$148 = (($146) + ($147)|0);
|
|
$149 = $line;
|
|
$150 = $148;
|
|
$151 = $149;
|
|
$152 = (($150) - ($151))|0;
|
|
$153 = $8;
|
|
;HEAP32[$label1$byval_copy8>>2]=HEAP32[$label1>>2]|0;HEAP32[$label1$byval_copy8+4>>2]=HEAP32[$label1+4>>2]|0;HEAP32[$label1$byval_copy8+8>>2]=HEAP32[$label1+8>>2]|0;HEAP32[$label1$byval_copy8+12>>2]=HEAP32[$label1+12>>2]|0;
|
|
_nk_widget_text($144,$label1$byval_copy8,$145,$152,$txt,17,$153);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_locate_coord($edit,$x,$y,$font,$row_height) {
|
|
$edit = $edit|0;
|
|
$x = +$x;
|
|
$y = +$y;
|
|
$font = $font|0;
|
|
$row_height = +$row_height;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0.0, $20 = 0, $21 = 0;
|
|
var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0, $3 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0;
|
|
var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0.0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0, $57 = 0.0, $58 = 0;
|
|
var $59 = 0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0, $75 = 0.0, $76 = 0.0;
|
|
var $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0;
|
|
var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $base_y = 0.0, $i = 0, $k = 0, $n = 0, $prev_x = 0.0, $r = 0, $w = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$r = sp + 24|0;
|
|
$1 = $edit;
|
|
$2 = $x;
|
|
$3 = $y;
|
|
$4 = $font;
|
|
$5 = $row_height;
|
|
$6 = $1;
|
|
$7 = ((($6)) + 12|0);
|
|
$8 = ((($7)) + 60|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$n = $9;
|
|
$base_y = 0.0;
|
|
$i = 0;
|
|
$10 = ((($r)) + 4|0);
|
|
HEAPF32[$10>>2] = 0.0;
|
|
HEAPF32[$r>>2] = 0.0;
|
|
$11 = ((($r)) + 16|0);
|
|
HEAPF32[$11>>2] = 0.0;
|
|
$12 = ((($r)) + 12|0);
|
|
HEAPF32[$12>>2] = 0.0;
|
|
$13 = ((($r)) + 20|0);
|
|
HEAP32[$13>>2] = 0;
|
|
while(1) {
|
|
$14 = $i;
|
|
$15 = $n;
|
|
$16 = ($14|0)<($15|0);
|
|
if (!($16)) {
|
|
label = 10;
|
|
break;
|
|
}
|
|
$17 = $1;
|
|
$18 = $i;
|
|
$19 = $5;
|
|
$20 = $4;
|
|
_nk_textedit_layout_row($r,$17,$18,$19,$20);
|
|
$21 = ((($r)) + 20|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = ($22|0)<=(0);
|
|
if ($23) {
|
|
label = 4;
|
|
break;
|
|
}
|
|
$25 = $i;
|
|
$26 = ($25|0)==(0);
|
|
if ($26) {
|
|
$27 = $3;
|
|
$28 = $base_y;
|
|
$29 = ((($r)) + 12|0);
|
|
$30 = +HEAPF32[$29>>2];
|
|
$31 = $28 + $30;
|
|
$32 = $27 < $31;
|
|
if ($32) {
|
|
label = 7;
|
|
break;
|
|
}
|
|
}
|
|
$33 = $3;
|
|
$34 = $base_y;
|
|
$35 = ((($r)) + 16|0);
|
|
$36 = +HEAPF32[$35>>2];
|
|
$37 = $34 + $36;
|
|
$38 = $33 < $37;
|
|
if ($38) {
|
|
label = 10;
|
|
break;
|
|
}
|
|
$39 = ((($r)) + 20|0);
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$41 = $i;
|
|
$42 = (($41) + ($40))|0;
|
|
$i = $42;
|
|
$43 = ((($r)) + 8|0);
|
|
$44 = +HEAPF32[$43>>2];
|
|
$45 = $base_y;
|
|
$46 = $45 + $44;
|
|
$base_y = $46;
|
|
}
|
|
if ((label|0) == 4) {
|
|
$24 = $n;
|
|
$0 = $24;
|
|
$104 = $0;
|
|
STACKTOP = sp;return ($104|0);
|
|
}
|
|
else if ((label|0) == 7) {
|
|
$0 = 0;
|
|
$104 = $0;
|
|
STACKTOP = sp;return ($104|0);
|
|
}
|
|
else if ((label|0) == 10) {
|
|
$47 = $i;
|
|
$48 = $n;
|
|
$49 = ($47|0)>=($48|0);
|
|
if ($49) {
|
|
$50 = $n;
|
|
$0 = $50;
|
|
$104 = $0;
|
|
STACKTOP = sp;return ($104|0);
|
|
}
|
|
$51 = $2;
|
|
$52 = +HEAPF32[$r>>2];
|
|
$53 = $51 < $52;
|
|
if ($53) {
|
|
$54 = $i;
|
|
$0 = $54;
|
|
$104 = $0;
|
|
STACKTOP = sp;return ($104|0);
|
|
}
|
|
$55 = $2;
|
|
$56 = ((($r)) + 4|0);
|
|
$57 = +HEAPF32[$56>>2];
|
|
$58 = $55 < $57;
|
|
L19: do {
|
|
if ($58) {
|
|
$59 = $i;
|
|
$k = $59;
|
|
$60 = +HEAPF32[$r>>2];
|
|
$prev_x = $60;
|
|
$i = 0;
|
|
while(1) {
|
|
$61 = $i;
|
|
$62 = ((($r)) + 20|0);
|
|
$63 = HEAP32[$62>>2]|0;
|
|
$64 = ($61|0)<($63|0);
|
|
if (!($64)) {
|
|
break L19;
|
|
}
|
|
$65 = $1;
|
|
$66 = $k;
|
|
$67 = $i;
|
|
$68 = $4;
|
|
$69 = (+_nk_textedit_get_width($65,$66,$67,$68));
|
|
$w = $69;
|
|
$70 = $2;
|
|
$71 = $prev_x;
|
|
$72 = $w;
|
|
$73 = $71 + $72;
|
|
$74 = $70 < $73;
|
|
if ($74) {
|
|
break;
|
|
}
|
|
$85 = $w;
|
|
$86 = $prev_x;
|
|
$87 = $86 + $85;
|
|
$prev_x = $87;
|
|
$88 = $i;
|
|
$89 = (($88) + 1)|0;
|
|
$i = $89;
|
|
}
|
|
$75 = $2;
|
|
$76 = $prev_x;
|
|
$77 = $w;
|
|
$78 = $77 / 2.0;
|
|
$79 = $76 + $78;
|
|
$80 = $75 < $79;
|
|
$81 = $k;
|
|
$82 = $i;
|
|
$83 = (($81) + ($82))|0;
|
|
if ($80) {
|
|
$0 = $83;
|
|
$104 = $0;
|
|
STACKTOP = sp;return ($104|0);
|
|
} else {
|
|
$84 = (($83) + 1)|0;
|
|
$0 = $84;
|
|
$104 = $0;
|
|
STACKTOP = sp;return ($104|0);
|
|
}
|
|
}
|
|
} while(0);
|
|
$90 = $1;
|
|
$91 = ((($90)) + 12|0);
|
|
$92 = $i;
|
|
$93 = ((($r)) + 20|0);
|
|
$94 = HEAP32[$93>>2]|0;
|
|
$95 = (($92) + ($94))|0;
|
|
$96 = (($95) - 1)|0;
|
|
$97 = (_nk_str_rune_at($91,$96)|0);
|
|
$98 = ($97|0)==(10);
|
|
$99 = $i;
|
|
$100 = ((($r)) + 20|0);
|
|
$101 = HEAP32[$100>>2]|0;
|
|
$102 = (($99) + ($101))|0;
|
|
if ($98) {
|
|
$103 = (($102) - 1)|0;
|
|
$0 = $103;
|
|
$104 = $0;
|
|
STACKTOP = sp;return ($104|0);
|
|
} else {
|
|
$0 = $102;
|
|
$104 = $0;
|
|
STACKTOP = sp;return ($104|0);
|
|
}
|
|
}
|
|
return (0)|0;
|
|
}
|
|
function _nk_textedit_layout_row($r,$edit,$line_start_id,$row_height,$font) {
|
|
$r = $r|0;
|
|
$edit = $edit|0;
|
|
$line_start_id = $line_start_id|0;
|
|
$row_height = +$row_height;
|
|
$font = $font|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0.0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, $end = 0, $glyphs = 0, $l = 0, $len = 0, $remaining = 0, $size = 0, $text = 0, $unicode = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$l = sp + 32|0;
|
|
$glyphs = sp + 28|0;
|
|
$unicode = sp + 24|0;
|
|
$remaining = sp + 20|0;
|
|
$size = sp;
|
|
$0 = $r;
|
|
$1 = $edit;
|
|
$2 = $line_start_id;
|
|
$3 = $row_height;
|
|
$4 = $font;
|
|
HEAP32[$glyphs>>2] = 0;
|
|
$5 = $1;
|
|
$6 = ((($5)) + 12|0);
|
|
$7 = (_nk_str_len_char($6)|0);
|
|
$len = $7;
|
|
$8 = $1;
|
|
$9 = ((($8)) + 12|0);
|
|
$10 = (_nk_str_get_const($9)|0);
|
|
$11 = $len;
|
|
$12 = (($10) + ($11)|0);
|
|
$end = $12;
|
|
$13 = $1;
|
|
$14 = ((($13)) + 12|0);
|
|
$15 = $2;
|
|
$16 = (_nk_str_at_const($14,$15,$unicode,$l)|0);
|
|
$text = $16;
|
|
$17 = $4;
|
|
$18 = $text;
|
|
$19 = $end;
|
|
$20 = $text;
|
|
$21 = $19;
|
|
$22 = $20;
|
|
$23 = (($21) - ($22))|0;
|
|
$24 = $3;
|
|
_nk_text_calculate_text_bounds($size,$17,$18,$23,$24,$remaining,0,$glyphs,1);
|
|
$25 = $0;
|
|
HEAPF32[$25>>2] = 0.0;
|
|
$26 = +HEAPF32[$size>>2];
|
|
$27 = $0;
|
|
$28 = ((($27)) + 4|0);
|
|
HEAPF32[$28>>2] = $26;
|
|
$29 = ((($size)) + 4|0);
|
|
$30 = +HEAPF32[$29>>2];
|
|
$31 = $0;
|
|
$32 = ((($31)) + 8|0);
|
|
HEAPF32[$32>>2] = $30;
|
|
$33 = $0;
|
|
$34 = ((($33)) + 12|0);
|
|
HEAPF32[$34>>2] = 0.0;
|
|
$35 = ((($size)) + 4|0);
|
|
$36 = +HEAPF32[$35>>2];
|
|
$37 = $0;
|
|
$38 = ((($37)) + 16|0);
|
|
HEAPF32[$38>>2] = $36;
|
|
$39 = HEAP32[$glyphs>>2]|0;
|
|
$40 = $0;
|
|
$41 = ((($40)) + 20|0);
|
|
HEAP32[$41>>2] = $39;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_get_width($edit,$line_start,$char_id,$font) {
|
|
$edit = $edit|0;
|
|
$line_start = $line_start|0;
|
|
$char_id = $char_id|0;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
|
|
var $9 = 0, $len = 0, $str = 0, $unicode = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy = sp + 28|0;
|
|
$len = sp + 8|0;
|
|
$unicode = sp + 4|0;
|
|
$0 = $edit;
|
|
$1 = $line_start;
|
|
$2 = $char_id;
|
|
$3 = $font;
|
|
HEAP32[$len>>2] = 0;
|
|
HEAP32[$unicode>>2] = 0;
|
|
$4 = $0;
|
|
$5 = ((($4)) + 12|0);
|
|
$6 = $1;
|
|
$7 = $2;
|
|
$8 = (($6) + ($7))|0;
|
|
$9 = (_nk_str_at_const($5,$8,$unicode,$len)|0);
|
|
$str = $9;
|
|
$10 = $3;
|
|
$11 = ((($10)) + 8|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = $3;
|
|
$14 = $3;
|
|
$15 = ((($14)) + 4|0);
|
|
$16 = +HEAPF32[$15>>2];
|
|
$17 = $str;
|
|
$18 = HEAP32[$len>>2]|0;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$13>>2]|0;
|
|
$19 = (+FUNCTION_TABLE_didii[$12 & 15]($$byval_copy,$16,$17,$18));
|
|
STACKTOP = sp;return (+$19);
|
|
}
|
|
function _nk_textedit_prep_selection_at_cursor($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0;
|
|
var sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 92|0);
|
|
$3 = HEAP32[$2>>2]|0;
|
|
$4 = $0;
|
|
$5 = ((($4)) + 96|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$7 = ($3|0)!=($6|0);
|
|
$8 = $0;
|
|
if ($7) {
|
|
$15 = ((($8)) + 96|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = $0;
|
|
$18 = ((($17)) + 88|0);
|
|
HEAP32[$18>>2] = $16;
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$9 = ((($8)) + 88|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = $0;
|
|
$12 = ((($11)) + 96|0);
|
|
HEAP32[$12>>2] = $10;
|
|
$13 = $0;
|
|
$14 = ((($13)) + 92|0);
|
|
HEAP32[$14>>2] = $10;
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_textedit_move_to_first($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
|
|
var $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 92|0);
|
|
$3 = HEAP32[$2>>2]|0;
|
|
$4 = $0;
|
|
$5 = ((($4)) + 96|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$7 = ($3|0)!=($6|0);
|
|
if (!($7)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$8 = $0;
|
|
_nk_textedit_sortselection($8);
|
|
$9 = $0;
|
|
$10 = ((($9)) + 92|0);
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = $0;
|
|
$13 = ((($12)) + 88|0);
|
|
HEAP32[$13>>2] = $11;
|
|
$14 = $0;
|
|
$15 = ((($14)) + 92|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = $0;
|
|
$18 = ((($17)) + 96|0);
|
|
HEAP32[$18>>2] = $16;
|
|
$19 = $0;
|
|
$20 = ((($19)) + 103|0);
|
|
HEAP8[$20>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_move_to_last($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 92|0);
|
|
$3 = HEAP32[$2>>2]|0;
|
|
$4 = $0;
|
|
$5 = ((($4)) + 96|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$7 = ($3|0)!=($6|0);
|
|
if (!($7)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$8 = $0;
|
|
_nk_textedit_sortselection($8);
|
|
$9 = $0;
|
|
_nk_textedit_clamp($9);
|
|
$10 = $0;
|
|
$11 = ((($10)) + 96|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = $0;
|
|
$14 = ((($13)) + 88|0);
|
|
HEAP32[$14>>2] = $12;
|
|
$15 = $0;
|
|
$16 = ((($15)) + 96|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = $0;
|
|
$19 = ((($18)) + 92|0);
|
|
HEAP32[$19>>2] = $17;
|
|
$20 = $0;
|
|
$21 = ((($20)) + 103|0);
|
|
HEAP8[$21>>0] = 0;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_move_to_word_previous($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 88|0);
|
|
$3 = HEAP32[$2>>2]|0;
|
|
$4 = (($3) - 1)|0;
|
|
$c = $4;
|
|
while(1) {
|
|
$5 = $c;
|
|
$6 = ($5|0)>=(0);
|
|
if ($6) {
|
|
$7 = $0;
|
|
$8 = $c;
|
|
$9 = (_nk_is_word_boundary($7,$8)|0);
|
|
$10 = ($9|0)!=(0);
|
|
$11 = $10 ^ 1;
|
|
$16 = $11;
|
|
} else {
|
|
$16 = 0;
|
|
}
|
|
$12 = $c;
|
|
if (!($16)) {
|
|
break;
|
|
}
|
|
$13 = (($12) + -1)|0;
|
|
$c = $13;
|
|
}
|
|
$14 = ($12|0)<(0);
|
|
if (!($14)) {
|
|
$15 = $c;
|
|
STACKTOP = sp;return ($15|0);
|
|
}
|
|
$c = 0;
|
|
$15 = $c;
|
|
STACKTOP = sp;return ($15|0);
|
|
}
|
|
function _nk_textedit_move_to_word_next($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0;
|
|
var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, $len = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 12|0);
|
|
$3 = ((($2)) + 60|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$len = $4;
|
|
$5 = $0;
|
|
$6 = ((($5)) + 88|0);
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$8 = (($7) + 1)|0;
|
|
$c = $8;
|
|
while(1) {
|
|
$9 = $c;
|
|
$10 = $len;
|
|
$11 = ($9|0)<($10|0);
|
|
if ($11) {
|
|
$12 = $0;
|
|
$13 = $c;
|
|
$14 = (_nk_is_word_boundary($12,$13)|0);
|
|
$15 = ($14|0)!=(0);
|
|
$16 = $15 ^ 1;
|
|
$23 = $16;
|
|
} else {
|
|
$23 = 0;
|
|
}
|
|
$17 = $c;
|
|
if (!($23)) {
|
|
break;
|
|
}
|
|
$18 = (($17) + 1)|0;
|
|
$c = $18;
|
|
}
|
|
$19 = $len;
|
|
$20 = ($17|0)>($19|0);
|
|
if (!($20)) {
|
|
$22 = $c;
|
|
STACKTOP = sp;return ($22|0);
|
|
}
|
|
$21 = $len;
|
|
$c = $21;
|
|
$22 = $c;
|
|
STACKTOP = sp;return ($22|0);
|
|
}
|
|
function _nk_textedit_find_charpos($find,$state,$n,$single_line,$font,$row_height) {
|
|
$find = $find|0;
|
|
$state = $state|0;
|
|
$n = $n|0;
|
|
$single_line = $single_line|0;
|
|
$font = $font|0;
|
|
$row_height = +$row_height;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0, $112 = 0.0, $113 = 0.0, $114 = 0, $115 = 0;
|
|
var $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0;
|
|
var $30 = 0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0.0, $46 = 0, $47 = 0, $48 = 0;
|
|
var $49 = 0, $5 = 0.0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0.0, $65 = 0, $66 = 0;
|
|
var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0.0, $83 = 0, $84 = 0;
|
|
var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0.0, $91 = 0, $92 = 0.0, $93 = 0.0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0.0, $first = 0, $i = 0, $prev_start = 0, $r = 0;
|
|
var $z = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$r = sp + 16|0;
|
|
$0 = $find;
|
|
$1 = $state;
|
|
$2 = $n;
|
|
$3 = $single_line;
|
|
$4 = $font;
|
|
$5 = $row_height;
|
|
$prev_start = 0;
|
|
$6 = $1;
|
|
$7 = ((($6)) + 12|0);
|
|
$8 = ((($7)) + 60|0);
|
|
$9 = HEAP32[$8>>2]|0;
|
|
$z = $9;
|
|
$i = 0;
|
|
$10 = $2;
|
|
$11 = $z;
|
|
$12 = ($10|0)==($11|0);
|
|
if (!($12)) {
|
|
$60 = $0;
|
|
$61 = ((($60)) + 4|0);
|
|
HEAPF32[$61>>2] = 0.0;
|
|
while(1) {
|
|
$62 = $1;
|
|
$63 = $i;
|
|
$64 = $5;
|
|
$65 = $4;
|
|
_nk_textedit_layout_row($r,$62,$63,$64,$65);
|
|
$66 = $2;
|
|
$67 = $i;
|
|
$68 = ((($r)) + 20|0);
|
|
$69 = HEAP32[$68>>2]|0;
|
|
$70 = (($67) + ($69))|0;
|
|
$71 = ($66|0)<($70|0);
|
|
$72 = $i;
|
|
if ($71) {
|
|
break;
|
|
}
|
|
$prev_start = $72;
|
|
$73 = ((($r)) + 20|0);
|
|
$74 = HEAP32[$73>>2]|0;
|
|
$75 = $i;
|
|
$76 = (($75) + ($74))|0;
|
|
$i = $76;
|
|
$77 = ((($r)) + 8|0);
|
|
$78 = +HEAPF32[$77>>2];
|
|
$79 = $0;
|
|
$80 = ((($79)) + 4|0);
|
|
$81 = +HEAPF32[$80>>2];
|
|
$82 = $81 + $78;
|
|
HEAPF32[$80>>2] = $82;
|
|
}
|
|
$first = $72;
|
|
$83 = $0;
|
|
$84 = ((($83)) + 12|0);
|
|
HEAP32[$84>>2] = $72;
|
|
$85 = ((($r)) + 20|0);
|
|
$86 = HEAP32[$85>>2]|0;
|
|
$87 = $0;
|
|
$88 = ((($87)) + 16|0);
|
|
HEAP32[$88>>2] = $86;
|
|
$89 = ((($r)) + 16|0);
|
|
$90 = +HEAPF32[$89>>2];
|
|
$91 = ((($r)) + 12|0);
|
|
$92 = +HEAPF32[$91>>2];
|
|
$93 = $90 - $92;
|
|
$94 = $0;
|
|
$95 = ((($94)) + 8|0);
|
|
HEAPF32[$95>>2] = $93;
|
|
$96 = $prev_start;
|
|
$97 = $0;
|
|
$98 = ((($97)) + 20|0);
|
|
HEAP32[$98>>2] = $96;
|
|
$99 = +HEAPF32[$r>>2];
|
|
$100 = $0;
|
|
HEAPF32[$100>>2] = $99;
|
|
$i = 0;
|
|
while(1) {
|
|
$101 = $first;
|
|
$102 = $i;
|
|
$103 = (($101) + ($102))|0;
|
|
$104 = $2;
|
|
$105 = ($103|0)<($104|0);
|
|
if (!($105)) {
|
|
break;
|
|
}
|
|
$106 = $1;
|
|
$107 = $first;
|
|
$108 = $i;
|
|
$109 = $4;
|
|
$110 = (+_nk_textedit_get_width($106,$107,$108,$109));
|
|
$111 = $0;
|
|
$112 = +HEAPF32[$111>>2];
|
|
$113 = $112 + $110;
|
|
HEAPF32[$111>>2] = $113;
|
|
$114 = $i;
|
|
$115 = (($114) + 1)|0;
|
|
$i = $115;
|
|
}
|
|
STACKTOP = sp;return;
|
|
}
|
|
$13 = $3;
|
|
$14 = ($13|0)!=(0);
|
|
if ($14) {
|
|
$15 = $1;
|
|
$16 = $5;
|
|
$17 = $4;
|
|
_nk_textedit_layout_row($r,$15,0,$16,$17);
|
|
$18 = $0;
|
|
$19 = ((($18)) + 4|0);
|
|
HEAPF32[$19>>2] = 0.0;
|
|
$20 = $0;
|
|
$21 = ((($20)) + 12|0);
|
|
HEAP32[$21>>2] = 0;
|
|
$22 = $z;
|
|
$23 = $0;
|
|
$24 = ((($23)) + 16|0);
|
|
HEAP32[$24>>2] = $22;
|
|
$25 = ((($r)) + 16|0);
|
|
$26 = +HEAPF32[$25>>2];
|
|
$27 = ((($r)) + 12|0);
|
|
$28 = +HEAPF32[$27>>2];
|
|
$29 = $26 - $28;
|
|
$30 = $0;
|
|
$31 = ((($30)) + 8|0);
|
|
HEAPF32[$31>>2] = $29;
|
|
$32 = ((($r)) + 4|0);
|
|
$33 = +HEAPF32[$32>>2];
|
|
$34 = $0;
|
|
HEAPF32[$34>>2] = $33;
|
|
STACKTOP = sp;return;
|
|
}
|
|
$35 = $0;
|
|
$36 = ((($35)) + 4|0);
|
|
HEAPF32[$36>>2] = 0.0;
|
|
$37 = $0;
|
|
HEAPF32[$37>>2] = 0.0;
|
|
$38 = $0;
|
|
$39 = ((($38)) + 8|0);
|
|
HEAPF32[$39>>2] = 1.0;
|
|
while(1) {
|
|
$40 = $i;
|
|
$41 = $z;
|
|
$42 = ($40|0)<($41|0);
|
|
if (!($42)) {
|
|
break;
|
|
}
|
|
$43 = $1;
|
|
$44 = $i;
|
|
$45 = $5;
|
|
$46 = $4;
|
|
_nk_textedit_layout_row($r,$43,$44,$45,$46);
|
|
$47 = $i;
|
|
$prev_start = $47;
|
|
$48 = ((($r)) + 20|0);
|
|
$49 = HEAP32[$48>>2]|0;
|
|
$50 = $i;
|
|
$51 = (($50) + ($49))|0;
|
|
$i = $51;
|
|
}
|
|
$52 = $i;
|
|
$53 = $0;
|
|
$54 = ((($53)) + 12|0);
|
|
HEAP32[$54>>2] = $52;
|
|
$55 = $0;
|
|
$56 = ((($55)) + 16|0);
|
|
HEAP32[$56>>2] = 0;
|
|
$57 = $prev_start;
|
|
$58 = $0;
|
|
$59 = ((($58)) + 20|0);
|
|
HEAP32[$59>>2] = $57;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_textedit_sortselection($state) {
|
|
$state = $state|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $temp = 0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $state;
|
|
$1 = $0;
|
|
$2 = ((($1)) + 96|0);
|
|
$3 = HEAP32[$2>>2]|0;
|
|
$4 = $0;
|
|
$5 = ((($4)) + 92|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$7 = ($3|0)<($6|0);
|
|
if (!($7)) {
|
|
STACKTOP = sp;return;
|
|
}
|
|
$8 = $0;
|
|
$9 = ((($8)) + 96|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$temp = $10;
|
|
$11 = $0;
|
|
$12 = ((($11)) + 92|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = $0;
|
|
$15 = ((($14)) + 96|0);
|
|
HEAP32[$15>>2] = $13;
|
|
$16 = $temp;
|
|
$17 = $0;
|
|
$18 = ((($17)) + 92|0);
|
|
HEAP32[$18>>2] = $16;
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _nk_is_word_boundary($state,$idx) {
|
|
$state = $state|0;
|
|
$idx = $idx|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, $len = 0, $or$cond = 0;
|
|
var $or$cond11 = 0, $or$cond13 = 0, $or$cond15 = 0, $or$cond17 = 0, $or$cond19 = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$len = sp + 4|0;
|
|
$c = sp;
|
|
$1 = $state;
|
|
$2 = $idx;
|
|
$3 = $2;
|
|
$4 = ($3|0)<=(0);
|
|
if ($4) {
|
|
$0 = 1;
|
|
$36 = $0;
|
|
STACKTOP = sp;return ($36|0);
|
|
}
|
|
$5 = $1;
|
|
$6 = ((($5)) + 12|0);
|
|
$7 = $2;
|
|
$8 = (_nk_str_at_rune($6,$7,$c,$len)|0);
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
$0 = 1;
|
|
$36 = $0;
|
|
STACKTOP = sp;return ($36|0);
|
|
}
|
|
$10 = HEAP32[$c>>2]|0;
|
|
$11 = ($10|0)==(32);
|
|
$12 = HEAP32[$c>>2]|0;
|
|
$13 = ($12|0)==(9);
|
|
$or$cond = $11 | $13;
|
|
$14 = HEAP32[$c>>2]|0;
|
|
$15 = ($14|0)==(12288);
|
|
$or$cond3 = $or$cond | $15;
|
|
$16 = HEAP32[$c>>2]|0;
|
|
$17 = ($16|0)==(44);
|
|
$or$cond5 = $or$cond3 | $17;
|
|
$18 = HEAP32[$c>>2]|0;
|
|
$19 = ($18|0)==(59);
|
|
$or$cond7 = $or$cond5 | $19;
|
|
$20 = HEAP32[$c>>2]|0;
|
|
$21 = ($20|0)==(40);
|
|
$or$cond9 = $or$cond7 | $21;
|
|
$22 = HEAP32[$c>>2]|0;
|
|
$23 = ($22|0)==(41);
|
|
$or$cond11 = $or$cond9 | $23;
|
|
$24 = HEAP32[$c>>2]|0;
|
|
$25 = ($24|0)==(123);
|
|
$or$cond13 = $or$cond11 | $25;
|
|
$26 = HEAP32[$c>>2]|0;
|
|
$27 = ($26|0)==(125);
|
|
$or$cond15 = $or$cond13 | $27;
|
|
$28 = HEAP32[$c>>2]|0;
|
|
$29 = ($28|0)==(91);
|
|
$or$cond17 = $or$cond15 | $29;
|
|
$30 = HEAP32[$c>>2]|0;
|
|
$31 = ($30|0)==(93);
|
|
$or$cond19 = $or$cond17 | $31;
|
|
if ($or$cond19) {
|
|
$35 = 1;
|
|
} else {
|
|
$32 = HEAP32[$c>>2]|0;
|
|
$33 = ($32|0)==(124);
|
|
$35 = $33;
|
|
}
|
|
$34 = $35&1;
|
|
$0 = $34;
|
|
$36 = $0;
|
|
STACKTOP = sp;return ($36|0);
|
|
}
|
|
function _nk_do_property($ws,$out,$property,$name,$min,$val,$max,$step,$inc_per_pixel,$buffer,$len,$state,$cursor,$style,$filter,$in,$font,$text_edit) {
|
|
$ws = $ws|0;
|
|
$out = $out|0;
|
|
$property = $property|0;
|
|
$name = $name|0;
|
|
$min = +$min;
|
|
$val = +$val;
|
|
$max = +$max;
|
|
$step = +$step;
|
|
$inc_per_pixel = +$inc_per_pixel;
|
|
$buffer = $buffer|0;
|
|
$len = $len|0;
|
|
$state = $state|0;
|
|
$cursor = $cursor|0;
|
|
$style = $style|0;
|
|
$filter = $filter|0;
|
|
$in = $in|0;
|
|
$font = $font|0;
|
|
$text_edit = $text_edit|0;
|
|
var $$byval_copy = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $$byval_copy7 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0, $104 = 0, $105 = 0.0, $106 = 0, $107 = 0, $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0;
|
|
var $111 = 0, $112 = 0, $113 = 0.0, $114 = 0.0, $115 = 0, $116 = 0, $117 = 0.0, $118 = 0, $119 = 0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0, $123 = 0, $124 = 0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0;
|
|
var $13 = 0, $130 = 0, $131 = 0.0, $132 = 0, $133 = 0, $134 = 0.0, $135 = 0, $136 = 0, $137 = 0.0, $138 = 0, $139 = 0.0, $14 = 0, $140 = 0, $141 = 0.0, $142 = 0.0, $143 = 0, $144 = 0.0, $145 = 0, $146 = 0, $147 = 0.0;
|
|
var $148 = 0.0, $149 = 0.0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0.0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0.0, $164 = 0, $165 = 0;
|
|
var $166 = 0, $167 = 0.0, $168 = 0.0, $169 = 0.0, $17 = 0.0, $170 = 0, $171 = 0, $172 = 0.0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0.0, $180 = 0.0, $181 = 0, $182 = 0.0, $183 = 0.0;
|
|
var $184 = 0, $185 = 0, $186 = 0.0, $187 = 0.0, $188 = 0.0, $189 = 0, $19 = 0, $190 = 0, $191 = 0.0, $192 = 0.0, $193 = 0.0, $194 = 0, $195 = 0.0, $196 = 0.0, $197 = 0.0, $198 = 0, $199 = 0, $2 = 0, $20 = 0.0, $200 = 0.0;
|
|
var $201 = 0.0, $202 = 0.0, $203 = 0, $204 = 0.0, $205 = 0.0, $206 = 0.0, $207 = 0, $208 = 0.0, $209 = 0.0, $21 = 0.0, $210 = 0, $211 = 0.0, $212 = 0, $213 = 0, $214 = 0.0, $215 = 0.0, $216 = 0.0, $217 = 0, $218 = 0.0, $219 = 0;
|
|
var $22 = 0.0, $220 = 0, $221 = 0.0, $222 = 0.0, $223 = 0, $224 = 0, $225 = 0.0, $226 = 0, $227 = 0, $228 = 0.0, $229 = 0.0, $23 = 0.0, $230 = 0.0, $231 = 0, $232 = 0.0, $233 = 0.0, $234 = 0, $235 = 0.0, $236 = 0.0, $237 = 0.0;
|
|
var $238 = 0, $239 = 0.0, $24 = 0.0, $240 = 0, $241 = 0.0, $242 = 0.0, $243 = 0, $244 = 0.0, $245 = 0, $246 = 0, $247 = 0.0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0;
|
|
var $256 = 0.0, $257 = 0.0, $258 = 0.0, $259 = 0.0, $26 = 0.0, $260 = 0.0, $261 = 0.0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0.0, $270 = 0, $271 = 0, $272 = 0, $273 = 0;
|
|
var $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0.0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0.0, $290 = 0, $291 = 0;
|
|
var $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0.0, $30 = 0.0, $300 = 0.0, $301 = 0.0, $302 = 0.0, $303 = 0.0, $304 = 0, $305 = 0.0, $306 = 0.0, $307 = 0.0, $308 = 0.0, $309 = 0.0;
|
|
var $31 = 0, $310 = 0, $311 = 0.0, $312 = 0.0, $313 = 0.0, $314 = 0.0, $315 = 0.0, $316 = 0.0, $317 = 0, $318 = 0.0, $319 = 0.0, $32 = 0.0, $320 = 0.0, $321 = 0.0, $322 = 0.0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0;
|
|
var $328 = 0, $329 = 0, $33 = 0.0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0.0, $335 = 0.0, $336 = 0.0, $337 = 0.0, $338 = 0, $339 = 0.0, $34 = 0.0, $340 = 0.0, $341 = 0.0, $342 = 0.0, $343 = 0.0, $344 = 0, $345 = 0.0;
|
|
var $346 = 0.0, $347 = 0.0, $348 = 0.0, $349 = 0.0, $35 = 0.0, $350 = 0.0, $351 = 0, $352 = 0.0, $353 = 0.0, $354 = 0.0, $355 = 0.0, $356 = 0.0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0;
|
|
var $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0.0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0.0, $380 = 0, $381 = 0;
|
|
var $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0.0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0.0;
|
|
var $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0.0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0;
|
|
var $418 = 0, $419 = 0, $42 = 0.0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0.0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0;
|
|
var $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0.0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0;
|
|
var $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0.0, $470 = 0, $471 = 0;
|
|
var $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0.0, $480 = 0.0, $481 = 0.0, $482 = 0, $483 = 0.0, $484 = 0.0, $485 = 0.0, $486 = 0.0, $487 = 0, $488 = 0.0, $489 = 0.0, $49 = 0;
|
|
var $490 = 0.0, $491 = 0, $492 = 0.0, $493 = 0.0, $494 = 0.0, $495 = 0.0, $496 = 0.0, $5 = 0.0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0, $6 = 0.0, $60 = 0.0;
|
|
var $61 = 0.0, $62 = 0, $63 = 0.0, $64 = 0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0, $69 = 0.0, $7 = 0.0, $70 = 0.0, $71 = 0.0, $72 = 0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0, $77 = 0, $78 = 0, $79 = 0;
|
|
var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0.0, $86 = 0, $87 = 0, $88 = 0.0, $89 = 0.0, $9 = 0, $90 = 0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0.0, $96 = 0.0, $97 = 0.0;
|
|
var $98 = 0, $99 = 0, $active = 0, $dst = 0, $edit = 0, $edit$byval_copy = 0, $edit$byval_copy8 = 0, $empty = 0, $empty$byval_copy = 0, $label = 0, $label$byval_copy = 0, $left = 0, $left$byval_copy = 0, $length = 0, $name_len = 0, $num_len = 0, $old = 0, $or$cond = 0, $or$cond3 = 0, $property$byval_copy = 0;
|
|
var $property_max = 0.0, $property_min = 0.0, $property_value = 0, $right = 0, $right$byval_copy = 0, $size = 0.0, $string = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 384|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$edit$byval_copy8 = sp + 304|0;
|
|
$right$byval_copy = sp + 288|0;
|
|
$left$byval_copy = sp + 272|0;
|
|
$$byval_copy7 = sp + 268|0;
|
|
$$byval_copy6 = sp + 264|0;
|
|
$empty$byval_copy = sp + 248|0;
|
|
$edit$byval_copy = sp + 232|0;
|
|
$label$byval_copy = sp + 216|0;
|
|
$property$byval_copy = sp + 200|0;
|
|
$$byval_copy5 = sp + 196|0;
|
|
$$byval_copy4 = sp + 192|0;
|
|
$$byval_copy = sp + 188|0;
|
|
$num_len = sp + 108|0;
|
|
$string = sp + 320|0;
|
|
$property_value = sp + 88|0;
|
|
$left = sp + 64|0;
|
|
$right = sp + 48|0;
|
|
$label = sp + 32|0;
|
|
$edit = sp + 16|0;
|
|
$empty = sp;
|
|
$0 = $ws;
|
|
$1 = $out;
|
|
$2 = $name;
|
|
$3 = $min;
|
|
$4 = $val;
|
|
$5 = $max;
|
|
$6 = $step;
|
|
$7 = $inc_per_pixel;
|
|
$8 = $buffer;
|
|
$9 = $len;
|
|
$10 = $state;
|
|
$11 = $cursor;
|
|
$12 = $style;
|
|
$13 = $filter;
|
|
$14 = $in;
|
|
$15 = $font;
|
|
$16 = $text_edit;
|
|
$dst = 0;
|
|
$17 = $3;
|
|
$18 = $5;
|
|
$19 = $17 < $18;
|
|
$20 = $5;
|
|
$21 = $3;
|
|
$22 = $19 ? $20 : $21;
|
|
$property_max = $22;
|
|
$23 = $3;
|
|
$24 = $5;
|
|
$25 = $23 < $24;
|
|
$26 = $3;
|
|
$27 = $5;
|
|
$28 = $25 ? $26 : $27;
|
|
$property_min = $28;
|
|
$29 = $4;
|
|
$30 = $property_max;
|
|
$31 = $29 < $30;
|
|
$32 = $4;
|
|
$33 = $property_max;
|
|
$34 = $31 ? $32 : $33;
|
|
$35 = $property_min;
|
|
$36 = $34 < $35;
|
|
if ($36) {
|
|
$37 = $property_min;
|
|
$44 = $37;
|
|
} else {
|
|
$38 = $4;
|
|
$39 = $property_max;
|
|
$40 = $38 < $39;
|
|
$41 = $4;
|
|
$42 = $property_max;
|
|
$43 = $40 ? $41 : $42;
|
|
$44 = $43;
|
|
}
|
|
HEAPF32[$property_value>>2] = $44;
|
|
$45 = $15;
|
|
$46 = ((($45)) + 4|0);
|
|
$47 = +HEAPF32[$46>>2];
|
|
$48 = $47 / 2.0;
|
|
$49 = ((($left)) + 12|0);
|
|
HEAPF32[$49>>2] = $48;
|
|
$50 = ((($left)) + 12|0);
|
|
$51 = +HEAPF32[$50>>2];
|
|
$52 = ((($left)) + 8|0);
|
|
HEAPF32[$52>>2] = $51;
|
|
$53 = +HEAPF32[$property>>2];
|
|
$54 = $12;
|
|
$55 = ((($54)) + 84|0);
|
|
$56 = +HEAPF32[$55>>2];
|
|
$57 = $53 + $56;
|
|
$58 = $12;
|
|
$59 = ((($58)) + 92|0);
|
|
$60 = +HEAPF32[$59>>2];
|
|
$61 = $57 + $60;
|
|
HEAPF32[$left>>2] = $61;
|
|
$62 = ((($property)) + 4|0);
|
|
$63 = +HEAPF32[$62>>2];
|
|
$64 = $12;
|
|
$65 = ((($64)) + 84|0);
|
|
$66 = +HEAPF32[$65>>2];
|
|
$67 = $63 + $66;
|
|
$68 = ((($property)) + 12|0);
|
|
$69 = +HEAPF32[$68>>2];
|
|
$70 = $69 / 2.0;
|
|
$71 = $67 + $70;
|
|
$72 = ((($left)) + 12|0);
|
|
$73 = +HEAPF32[$72>>2];
|
|
$74 = $73 / 2.0;
|
|
$75 = $71 - $74;
|
|
$76 = ((($left)) + 4|0);
|
|
HEAPF32[$76>>2] = $75;
|
|
$77 = $2;
|
|
$78 = (_nk_strlen($77)|0);
|
|
$name_len = $78;
|
|
$79 = $15;
|
|
$80 = ((($79)) + 8|0);
|
|
$81 = HEAP32[$80>>2]|0;
|
|
$82 = $15;
|
|
$83 = $15;
|
|
$84 = ((($83)) + 4|0);
|
|
$85 = +HEAPF32[$84>>2];
|
|
$86 = $2;
|
|
$87 = $name_len;
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$82>>2]|0;
|
|
$88 = (+FUNCTION_TABLE_didii[$81 & 15]($$byval_copy,$85,$86,$87));
|
|
$size = $88;
|
|
$89 = +HEAPF32[$left>>2];
|
|
$90 = ((($left)) + 8|0);
|
|
$91 = +HEAPF32[$90>>2];
|
|
$92 = $89 + $91;
|
|
$93 = $12;
|
|
$94 = ((($93)) + 92|0);
|
|
$95 = +HEAPF32[$94>>2];
|
|
$96 = $92 + $95;
|
|
HEAPF32[$label>>2] = $96;
|
|
$97 = $size;
|
|
$98 = $12;
|
|
$99 = ((($98)) + 92|0);
|
|
$100 = +HEAPF32[$99>>2];
|
|
$101 = 2.0 * $100;
|
|
$102 = $97 + $101;
|
|
$103 = ((($label)) + 8|0);
|
|
HEAPF32[$103>>2] = $102;
|
|
$104 = ((($property)) + 4|0);
|
|
$105 = +HEAPF32[$104>>2];
|
|
$106 = $12;
|
|
$107 = ((($106)) + 84|0);
|
|
$108 = +HEAPF32[$107>>2];
|
|
$109 = $105 + $108;
|
|
$110 = $12;
|
|
$111 = ((($110)) + 92|0);
|
|
$112 = ((($111)) + 4|0);
|
|
$113 = +HEAPF32[$112>>2];
|
|
$114 = $109 + $113;
|
|
$115 = ((($label)) + 4|0);
|
|
HEAPF32[$115>>2] = $114;
|
|
$116 = ((($property)) + 12|0);
|
|
$117 = +HEAPF32[$116>>2];
|
|
$118 = $12;
|
|
$119 = ((($118)) + 84|0);
|
|
$120 = +HEAPF32[$119>>2];
|
|
$121 = 2.0 * $120;
|
|
$122 = $12;
|
|
$123 = ((($122)) + 92|0);
|
|
$124 = ((($123)) + 4|0);
|
|
$125 = +HEAPF32[$124>>2];
|
|
$126 = 2.0 * $125;
|
|
$127 = $121 + $126;
|
|
$128 = $117 - $127;
|
|
$129 = ((($label)) + 12|0);
|
|
HEAPF32[$129>>2] = $128;
|
|
$130 = ((($left)) + 4|0);
|
|
$131 = +HEAPF32[$130>>2];
|
|
$132 = ((($right)) + 4|0);
|
|
HEAPF32[$132>>2] = $131;
|
|
$133 = ((($left)) + 8|0);
|
|
$134 = +HEAPF32[$133>>2];
|
|
$135 = ((($right)) + 8|0);
|
|
HEAPF32[$135>>2] = $134;
|
|
$136 = ((($left)) + 12|0);
|
|
$137 = +HEAPF32[$136>>2];
|
|
$138 = ((($right)) + 12|0);
|
|
HEAPF32[$138>>2] = $137;
|
|
$139 = +HEAPF32[$property>>2];
|
|
$140 = ((($property)) + 8|0);
|
|
$141 = +HEAPF32[$140>>2];
|
|
$142 = $139 + $141;
|
|
$143 = ((($right)) + 8|0);
|
|
$144 = +HEAPF32[$143>>2];
|
|
$145 = $12;
|
|
$146 = ((($145)) + 92|0);
|
|
$147 = +HEAPF32[$146>>2];
|
|
$148 = $144 + $147;
|
|
$149 = $142 - $148;
|
|
HEAPF32[$right>>2] = $149;
|
|
$150 = $10;
|
|
$151 = HEAP32[$150>>2]|0;
|
|
$152 = ($151|0)==(1);
|
|
if ($152) {
|
|
$153 = $15;
|
|
$154 = ((($153)) + 8|0);
|
|
$155 = HEAP32[$154>>2]|0;
|
|
$156 = $15;
|
|
$157 = $15;
|
|
$158 = ((($157)) + 4|0);
|
|
$159 = +HEAPF32[$158>>2];
|
|
$160 = $8;
|
|
$161 = $9;
|
|
$162 = HEAP32[$161>>2]|0;
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$156>>2]|0;
|
|
$163 = (+FUNCTION_TABLE_didii[$155 & 15]($$byval_copy4,$159,$160,$162));
|
|
$size = $163;
|
|
$164 = $12;
|
|
$165 = ((($164)) + 100|0);
|
|
$166 = ((($165)) + 548|0);
|
|
$167 = +HEAPF32[$166>>2];
|
|
$168 = $size;
|
|
$169 = $168 + $167;
|
|
$size = $169;
|
|
$170 = $9;
|
|
$length = $170;
|
|
$171 = $8;
|
|
$dst = $171;
|
|
} else {
|
|
$172 = +HEAPF32[$property_value>>2];
|
|
(_nk_ftos($string,$172)|0);
|
|
$173 = (_nk_string_float_limit($string,2)|0);
|
|
HEAP32[$num_len>>2] = $173;
|
|
$174 = $15;
|
|
$175 = ((($174)) + 8|0);
|
|
$176 = HEAP32[$175>>2]|0;
|
|
$177 = $15;
|
|
$178 = $15;
|
|
$179 = ((($178)) + 4|0);
|
|
$180 = +HEAPF32[$179>>2];
|
|
$181 = HEAP32[$num_len>>2]|0;
|
|
;HEAP32[$$byval_copy5>>2]=HEAP32[$177>>2]|0;
|
|
$182 = (+FUNCTION_TABLE_didii[$176 & 15]($$byval_copy5,$180,$string,$181));
|
|
$size = $182;
|
|
$dst = $string;
|
|
$length = $num_len;
|
|
}
|
|
$183 = $size;
|
|
$184 = $12;
|
|
$185 = ((($184)) + 92|0);
|
|
$186 = +HEAPF32[$185>>2];
|
|
$187 = 2.0 * $186;
|
|
$188 = $183 + $187;
|
|
$189 = ((($edit)) + 8|0);
|
|
HEAPF32[$189>>2] = $188;
|
|
$190 = ((($edit)) + 8|0);
|
|
$191 = +HEAPF32[$190>>2];
|
|
$192 = +HEAPF32[$right>>2];
|
|
$193 = +HEAPF32[$label>>2];
|
|
$194 = ((($label)) + 8|0);
|
|
$195 = +HEAPF32[$194>>2];
|
|
$196 = $193 + $195;
|
|
$197 = $192 - $196;
|
|
$198 = $191 < $197;
|
|
if ($198) {
|
|
$199 = ((($edit)) + 8|0);
|
|
$200 = +HEAPF32[$199>>2];
|
|
$208 = $200;
|
|
} else {
|
|
$201 = +HEAPF32[$right>>2];
|
|
$202 = +HEAPF32[$label>>2];
|
|
$203 = ((($label)) + 8|0);
|
|
$204 = +HEAPF32[$203>>2];
|
|
$205 = $202 + $204;
|
|
$206 = $201 - $205;
|
|
$208 = $206;
|
|
}
|
|
$207 = ((($edit)) + 8|0);
|
|
HEAPF32[$207>>2] = $208;
|
|
$209 = +HEAPF32[$right>>2];
|
|
$210 = ((($edit)) + 8|0);
|
|
$211 = +HEAPF32[$210>>2];
|
|
$212 = $12;
|
|
$213 = ((($212)) + 92|0);
|
|
$214 = +HEAPF32[$213>>2];
|
|
$215 = $211 + $214;
|
|
$216 = $209 - $215;
|
|
HEAPF32[$edit>>2] = $216;
|
|
$217 = ((($property)) + 4|0);
|
|
$218 = +HEAPF32[$217>>2];
|
|
$219 = $12;
|
|
$220 = ((($219)) + 84|0);
|
|
$221 = +HEAPF32[$220>>2];
|
|
$222 = $218 + $221;
|
|
$223 = ((($edit)) + 4|0);
|
|
HEAPF32[$223>>2] = $222;
|
|
$224 = ((($property)) + 12|0);
|
|
$225 = +HEAPF32[$224>>2];
|
|
$226 = $12;
|
|
$227 = ((($226)) + 84|0);
|
|
$228 = +HEAPF32[$227>>2];
|
|
$229 = 2.0 * $228;
|
|
$230 = $225 - $229;
|
|
$231 = ((($edit)) + 12|0);
|
|
HEAPF32[$231>>2] = $230;
|
|
$232 = +HEAPF32[$edit>>2];
|
|
$233 = +HEAPF32[$label>>2];
|
|
$234 = ((($label)) + 8|0);
|
|
$235 = +HEAPF32[$234>>2];
|
|
$236 = $233 + $235;
|
|
$237 = $232 - $236;
|
|
$238 = ((($empty)) + 8|0);
|
|
HEAPF32[$238>>2] = $237;
|
|
$239 = +HEAPF32[$label>>2];
|
|
$240 = ((($label)) + 8|0);
|
|
$241 = +HEAPF32[$240>>2];
|
|
$242 = $239 + $241;
|
|
HEAPF32[$empty>>2] = $242;
|
|
$243 = ((($property)) + 4|0);
|
|
$244 = +HEAPF32[$243>>2];
|
|
$245 = ((($empty)) + 4|0);
|
|
HEAPF32[$245>>2] = $244;
|
|
$246 = ((($property)) + 12|0);
|
|
$247 = +HEAPF32[$246>>2];
|
|
$248 = ((($empty)) + 12|0);
|
|
HEAPF32[$248>>2] = $247;
|
|
$249 = $10;
|
|
$250 = HEAP32[$249>>2]|0;
|
|
$251 = ($250|0)==(1);
|
|
$252 = $251&1;
|
|
$old = $252;
|
|
$253 = $0;
|
|
$254 = $14;
|
|
$255 = $10;
|
|
$256 = $property_min;
|
|
$257 = +HEAPF32[$property_value>>2];
|
|
$258 = $property_max;
|
|
$259 = $6;
|
|
$260 = $7;
|
|
;HEAP32[$property$byval_copy>>2]=HEAP32[$property>>2]|0;HEAP32[$property$byval_copy+4>>2]=HEAP32[$property+4>>2]|0;HEAP32[$property$byval_copy+8>>2]=HEAP32[$property+8>>2]|0;HEAP32[$property$byval_copy+12>>2]=HEAP32[$property+12>>2]|0;
|
|
;HEAP32[$label$byval_copy>>2]=HEAP32[$label>>2]|0;HEAP32[$label$byval_copy+4>>2]=HEAP32[$label+4>>2]|0;HEAP32[$label$byval_copy+8>>2]=HEAP32[$label+8>>2]|0;HEAP32[$label$byval_copy+12>>2]=HEAP32[$label+12>>2]|0;
|
|
;HEAP32[$edit$byval_copy>>2]=HEAP32[$edit>>2]|0;HEAP32[$edit$byval_copy+4>>2]=HEAP32[$edit+4>>2]|0;HEAP32[$edit$byval_copy+8>>2]=HEAP32[$edit+8>>2]|0;HEAP32[$edit$byval_copy+12>>2]=HEAP32[$edit+12>>2]|0;
|
|
;HEAP32[$empty$byval_copy>>2]=HEAP32[$empty>>2]|0;HEAP32[$empty$byval_copy+4>>2]=HEAP32[$empty+4>>2]|0;HEAP32[$empty$byval_copy+8>>2]=HEAP32[$empty+8>>2]|0;HEAP32[$empty$byval_copy+12>>2]=HEAP32[$empty+12>>2]|0;
|
|
$261 = (+_nk_property_behavior($253,$254,$property$byval_copy,$label$byval_copy,$edit$byval_copy,$empty$byval_copy,$255,$256,$257,$258,$259,$260));
|
|
HEAPF32[$property_value>>2] = $261;
|
|
$262 = $12;
|
|
$263 = ((($262)) + 932|0);
|
|
$264 = HEAP32[$263>>2]|0;
|
|
$265 = ($264|0)!=(0|0);
|
|
if ($265) {
|
|
$266 = $12;
|
|
$267 = ((($266)) + 932|0);
|
|
$268 = HEAP32[$267>>2]|0;
|
|
$269 = $1;
|
|
$270 = $12;
|
|
$271 = ((($270)) + 928|0);
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$271>>2]|0;
|
|
FUNCTION_TABLE_vii[$268 & 31]($269,$$byval_copy6);
|
|
}
|
|
$272 = $1;
|
|
$273 = $12;
|
|
$274 = $0;
|
|
$275 = HEAP32[$274>>2]|0;
|
|
$276 = $2;
|
|
$277 = $name_len;
|
|
$278 = $15;
|
|
_nk_draw_property($272,$273,$property,$label,$275,$276,$277,$278);
|
|
$279 = $12;
|
|
$280 = ((($279)) + 936|0);
|
|
$281 = HEAP32[$280>>2]|0;
|
|
$282 = ($281|0)!=(0|0);
|
|
if ($282) {
|
|
$283 = $12;
|
|
$284 = ((($283)) + 936|0);
|
|
$285 = HEAP32[$284>>2]|0;
|
|
$286 = $1;
|
|
$287 = $12;
|
|
$288 = ((($287)) + 928|0);
|
|
;HEAP32[$$byval_copy7>>2]=HEAP32[$288>>2]|0;
|
|
FUNCTION_TABLE_vii[$285 & 31]($286,$$byval_copy7);
|
|
}
|
|
$289 = $0;
|
|
$290 = $1;
|
|
$291 = $12;
|
|
$292 = ((($291)) + 76|0);
|
|
$293 = HEAP32[$292>>2]|0;
|
|
$294 = $12;
|
|
$295 = ((($294)) + 800|0);
|
|
$296 = $14;
|
|
$297 = $15;
|
|
;HEAP32[$left$byval_copy>>2]=HEAP32[$left>>2]|0;HEAP32[$left$byval_copy+4>>2]=HEAP32[$left+4>>2]|0;HEAP32[$left$byval_copy+8>>2]=HEAP32[$left+8>>2]|0;HEAP32[$left$byval_copy+12>>2]=HEAP32[$left+12>>2]|0;
|
|
$298 = (_nk_do_button_symbol($289,$290,$left$byval_copy,$293,0,$295,$296,$297)|0);
|
|
$299 = ($298|0)!=(0);
|
|
if ($299) {
|
|
$300 = +HEAPF32[$property_value>>2];
|
|
$301 = $6;
|
|
$302 = $300 - $301;
|
|
$303 = $5;
|
|
$304 = $302 < $303;
|
|
if ($304) {
|
|
$305 = +HEAPF32[$property_value>>2];
|
|
$306 = $6;
|
|
$307 = $305 - $306;
|
|
$311 = $307;
|
|
} else {
|
|
$308 = $5;
|
|
$311 = $308;
|
|
}
|
|
$309 = $3;
|
|
$310 = $311 < $309;
|
|
do {
|
|
if ($310) {
|
|
$312 = $3;
|
|
$322 = $312;
|
|
} else {
|
|
$313 = +HEAPF32[$property_value>>2];
|
|
$314 = $6;
|
|
$315 = $313 - $314;
|
|
$316 = $5;
|
|
$317 = $315 < $316;
|
|
if ($317) {
|
|
$318 = +HEAPF32[$property_value>>2];
|
|
$319 = $6;
|
|
$320 = $318 - $319;
|
|
$322 = $320;
|
|
break;
|
|
} else {
|
|
$321 = $5;
|
|
$322 = $321;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
HEAPF32[$property_value>>2] = $322;
|
|
}
|
|
$323 = $0;
|
|
$324 = $1;
|
|
$325 = $12;
|
|
$326 = ((($325)) + 80|0);
|
|
$327 = HEAP32[$326>>2]|0;
|
|
$328 = $12;
|
|
$329 = ((($328)) + 672|0);
|
|
$330 = $14;
|
|
$331 = $15;
|
|
;HEAP32[$right$byval_copy>>2]=HEAP32[$right>>2]|0;HEAP32[$right$byval_copy+4>>2]=HEAP32[$right+4>>2]|0;HEAP32[$right$byval_copy+8>>2]=HEAP32[$right+8>>2]|0;HEAP32[$right$byval_copy+12>>2]=HEAP32[$right+12>>2]|0;
|
|
$332 = (_nk_do_button_symbol($323,$324,$right$byval_copy,$327,0,$329,$330,$331)|0);
|
|
$333 = ($332|0)!=(0);
|
|
if ($333) {
|
|
$334 = +HEAPF32[$property_value>>2];
|
|
$335 = $6;
|
|
$336 = $334 + $335;
|
|
$337 = $5;
|
|
$338 = $336 < $337;
|
|
if ($338) {
|
|
$339 = +HEAPF32[$property_value>>2];
|
|
$340 = $6;
|
|
$341 = $339 + $340;
|
|
$345 = $341;
|
|
} else {
|
|
$342 = $5;
|
|
$345 = $342;
|
|
}
|
|
$343 = $3;
|
|
$344 = $345 < $343;
|
|
do {
|
|
if ($344) {
|
|
$346 = $3;
|
|
$356 = $346;
|
|
} else {
|
|
$347 = +HEAPF32[$property_value>>2];
|
|
$348 = $6;
|
|
$349 = $347 + $348;
|
|
$350 = $5;
|
|
$351 = $349 < $350;
|
|
if ($351) {
|
|
$352 = +HEAPF32[$property_value>>2];
|
|
$353 = $6;
|
|
$354 = $352 + $353;
|
|
$356 = $354;
|
|
break;
|
|
} else {
|
|
$355 = $5;
|
|
$356 = $355;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
HEAPF32[$property_value>>2] = $356;
|
|
}
|
|
$357 = $10;
|
|
$358 = HEAP32[$357>>2]|0;
|
|
$359 = ($358|0)==(1);
|
|
$360 = $359&1;
|
|
$active = $360;
|
|
$361 = $old;
|
|
$362 = ($361|0)!=(1);
|
|
$363 = $active;
|
|
$364 = ($363|0)!=(0);
|
|
$or$cond = $362 & $364;
|
|
if ($or$cond) {
|
|
$365 = $8;
|
|
$366 = $dst;
|
|
$367 = $length;
|
|
$368 = HEAP32[$367>>2]|0;
|
|
(_nk_memcopy($365,$366,$368)|0);
|
|
$369 = $8;
|
|
$370 = $length;
|
|
$371 = HEAP32[$370>>2]|0;
|
|
$372 = (_nk_utf_len($369,$371)|0);
|
|
$373 = $11;
|
|
HEAP32[$373>>2] = $372;
|
|
$374 = $length;
|
|
$375 = HEAP32[$374>>2]|0;
|
|
$376 = $9;
|
|
HEAP32[$376>>2] = $375;
|
|
$377 = $9;
|
|
$length = $377;
|
|
$378 = $8;
|
|
$dst = $378;
|
|
}
|
|
$379 = $16;
|
|
$380 = $13;
|
|
$381 = (12608 + ($380<<2)|0);
|
|
$382 = HEAP32[$381>>2]|0;
|
|
_nk_textedit_clear_state($379,0,$382);
|
|
$383 = $active;
|
|
$384 = $383&255;
|
|
$385 = $16;
|
|
$386 = ((($385)) + 105|0);
|
|
HEAP8[$386>>0] = $384;
|
|
$387 = $length;
|
|
$388 = HEAP32[$387>>2]|0;
|
|
$389 = $16;
|
|
$390 = ((($389)) + 12|0);
|
|
$391 = ((($390)) + 60|0);
|
|
HEAP32[$391>>2] = $388;
|
|
$392 = $11;
|
|
$393 = HEAP32[$392>>2]|0;
|
|
$394 = $length;
|
|
$395 = HEAP32[$394>>2]|0;
|
|
$396 = ($393|0)<($395|0);
|
|
if ($396) {
|
|
$397 = $11;
|
|
$398 = HEAP32[$397>>2]|0;
|
|
$401 = $398;
|
|
} else {
|
|
$399 = $length;
|
|
$400 = HEAP32[$399>>2]|0;
|
|
$401 = $400;
|
|
}
|
|
$402 = ($401|0)<(0);
|
|
do {
|
|
if ($402) {
|
|
$414 = 0;
|
|
} else {
|
|
$403 = $11;
|
|
$404 = HEAP32[$403>>2]|0;
|
|
$405 = $length;
|
|
$406 = HEAP32[$405>>2]|0;
|
|
$407 = ($404|0)<($406|0);
|
|
if ($407) {
|
|
$408 = $11;
|
|
$409 = HEAP32[$408>>2]|0;
|
|
$414 = $409;
|
|
break;
|
|
} else {
|
|
$410 = $length;
|
|
$411 = HEAP32[$410>>2]|0;
|
|
$414 = $411;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$412 = $16;
|
|
$413 = ((($412)) + 88|0);
|
|
HEAP32[$413>>2] = $414;
|
|
$415 = $length;
|
|
$416 = HEAP32[$415>>2]|0;
|
|
$417 = $16;
|
|
$418 = ((($417)) + 12|0);
|
|
$419 = ((($418)) + 44|0);
|
|
HEAP32[$419>>2] = $416;
|
|
$420 = $16;
|
|
$421 = ((($420)) + 12|0);
|
|
$422 = ((($421)) + 32|0);
|
|
$423 = ((($422)) + 4|0);
|
|
HEAP32[$423>>2] = 64;
|
|
$424 = $dst;
|
|
$425 = $16;
|
|
$426 = ((($425)) + 12|0);
|
|
$427 = ((($426)) + 32|0);
|
|
HEAP32[$427>>2] = $424;
|
|
$428 = $16;
|
|
$429 = ((($428)) + 12|0);
|
|
$430 = ((($429)) + 56|0);
|
|
HEAP32[$430>>2] = 64;
|
|
$431 = $16;
|
|
$432 = ((($431)) + 100|0);
|
|
HEAP8[$432>>0] = 1;
|
|
$433 = $0;
|
|
$434 = $1;
|
|
$435 = $13;
|
|
$436 = (12608 + ($435<<2)|0);
|
|
$437 = HEAP32[$436>>2]|0;
|
|
$438 = $16;
|
|
$439 = $12;
|
|
$440 = ((($439)) + 100|0);
|
|
$441 = $10;
|
|
$442 = HEAP32[$441>>2]|0;
|
|
$443 = ($442|0)==(1);
|
|
$444 = $14;
|
|
$445 = $443 ? $444 : 0;
|
|
$446 = $15;
|
|
;HEAP32[$edit$byval_copy8>>2]=HEAP32[$edit>>2]|0;HEAP32[$edit$byval_copy8+4>>2]=HEAP32[$edit+4>>2]|0;HEAP32[$edit$byval_copy8+8>>2]=HEAP32[$edit+8>>2]|0;HEAP32[$edit$byval_copy8+12>>2]=HEAP32[$edit+12>>2]|0;
|
|
(_nk_do_edit($433,$434,$edit$byval_copy8,512,$437,$438,$440,$445,$446)|0);
|
|
$447 = $16;
|
|
$448 = ((($447)) + 12|0);
|
|
$449 = ((($448)) + 60|0);
|
|
$450 = HEAP32[$449>>2]|0;
|
|
$451 = $length;
|
|
HEAP32[$451>>2] = $450;
|
|
$452 = $16;
|
|
$453 = ((($452)) + 105|0);
|
|
$454 = HEAP8[$453>>0]|0;
|
|
$455 = $454&255;
|
|
$active = $455;
|
|
$456 = $16;
|
|
$457 = ((($456)) + 88|0);
|
|
$458 = HEAP32[$457>>2]|0;
|
|
$459 = $11;
|
|
HEAP32[$459>>2] = $458;
|
|
$460 = $active;
|
|
$461 = ($460|0)!=(0);
|
|
if ($461) {
|
|
$462 = $14;
|
|
$463 = (_nk_input_is_key_pressed($462,4)|0);
|
|
$464 = ($463|0)!=(0);
|
|
if ($464) {
|
|
$465 = $active;
|
|
$466 = ($465|0)!=(0);
|
|
$467 = $466 ^ 1;
|
|
$468 = $467&1;
|
|
$active = $468;
|
|
}
|
|
}
|
|
$469 = $old;
|
|
$470 = ($469|0)==(0);
|
|
$471 = $active;
|
|
$472 = ($471|0)!=(0);
|
|
$or$cond3 = $470 | $472;
|
|
if ($or$cond3) {
|
|
$496 = +HEAPF32[$property_value>>2];
|
|
STACKTOP = sp;return (+$496);
|
|
}
|
|
$473 = $10;
|
|
HEAP32[$473>>2] = 0;
|
|
$474 = $9;
|
|
$475 = HEAP32[$474>>2]|0;
|
|
$476 = $8;
|
|
$477 = (($476) + ($475)|0);
|
|
HEAP8[$477>>0] = 0;
|
|
$478 = $8;
|
|
(_nk_string_float_limit($478,2)|0);
|
|
$479 = $8;
|
|
(_nk_strtof($property_value,$479)|0);
|
|
$480 = +HEAPF32[$property_value>>2];
|
|
$481 = $5;
|
|
$482 = $480 < $481;
|
|
$483 = +HEAPF32[$property_value>>2];
|
|
$484 = $5;
|
|
$485 = $482 ? $483 : $484;
|
|
$486 = $3;
|
|
$487 = $485 < $486;
|
|
if ($487) {
|
|
$488 = $3;
|
|
$495 = $488;
|
|
} else {
|
|
$489 = +HEAPF32[$property_value>>2];
|
|
$490 = $5;
|
|
$491 = $489 < $490;
|
|
$492 = +HEAPF32[$property_value>>2];
|
|
$493 = $5;
|
|
$494 = $491 ? $492 : $493;
|
|
$495 = $494;
|
|
}
|
|
HEAPF32[$property_value>>2] = $495;
|
|
$496 = +HEAPF32[$property_value>>2];
|
|
STACKTOP = sp;return (+$496);
|
|
}
|
|
function _nk_ftos($s,$n) {
|
|
$s = $s|0;
|
|
$n = +$n;
|
|
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
|
|
var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
|
|
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0.0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0.0, $150 = 0, $151 = 0;
|
|
var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0.0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0;
|
|
var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0.0, $40 = 0.0;
|
|
var $41 = 0.0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0;
|
|
var $6 = 0, $60 = 0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0, $77 = 0;
|
|
var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0.0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0;
|
|
var $96 = 0, $97 = 0, $98 = 0, $99 = 0, $c = 0, $digit = 0, $i = 0, $j = 0, $m = 0, $m1 = 0, $neg = 0, $or$cond = 0, $or$cond3 = 0, $t = 0.0, $useExp = 0, $weight = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$1 = $s;
|
|
$2 = $n;
|
|
$useExp = 0;
|
|
$digit = 0;
|
|
$m = 0;
|
|
$m1 = 0;
|
|
$3 = $1;
|
|
$c = $3;
|
|
$neg = 0;
|
|
$4 = $2;
|
|
$5 = $4 == 0.0;
|
|
if ($5) {
|
|
$6 = $1;
|
|
HEAP8[$6>>0] = 48;
|
|
$7 = $1;
|
|
$8 = ((($7)) + 1|0);
|
|
HEAP8[$8>>0] = 0;
|
|
$0 = 1;
|
|
$163 = $0;
|
|
STACKTOP = sp;return ($163|0);
|
|
}
|
|
$9 = $2;
|
|
$10 = $9 < 0.0;
|
|
$11 = $10&1;
|
|
$neg = $11;
|
|
$12 = $neg;
|
|
$13 = ($12|0)!=(0);
|
|
if ($13) {
|
|
$14 = $2;
|
|
$15 = -$14;
|
|
$2 = $15;
|
|
}
|
|
$16 = $2;
|
|
$17 = (_nk_log10($16)|0);
|
|
$m = $17;
|
|
$18 = $m;
|
|
$19 = ($18|0)>=(14);
|
|
if ($19) {
|
|
$27 = 1;
|
|
} else {
|
|
$20 = $neg;
|
|
$21 = ($20|0)!=(0);
|
|
$22 = $m;
|
|
$23 = ($22|0)>=(9);
|
|
$or$cond = $21 & $23;
|
|
if ($or$cond) {
|
|
$27 = 1;
|
|
} else {
|
|
$24 = $m;
|
|
$25 = ($24|0)<=(-9);
|
|
$27 = $25;
|
|
}
|
|
}
|
|
$26 = $27&1;
|
|
$useExp = $26;
|
|
$28 = $neg;
|
|
$29 = ($28|0)!=(0);
|
|
if ($29) {
|
|
$30 = $c;
|
|
$31 = ((($30)) + 1|0);
|
|
$c = $31;
|
|
HEAP8[$30>>0] = 45;
|
|
}
|
|
$32 = $useExp;
|
|
$33 = ($32|0)!=(0);
|
|
if ($33) {
|
|
$34 = $m;
|
|
$35 = ($34|0)<(0);
|
|
if ($35) {
|
|
$36 = $m;
|
|
$37 = (($36) - 1)|0;
|
|
$m = $37;
|
|
}
|
|
$38 = $2;
|
|
$39 = $m;
|
|
$40 = (+_nk_pow(10.0,$39));
|
|
$41 = $38 / $40;
|
|
$2 = $41;
|
|
$42 = $m;
|
|
$m1 = $42;
|
|
$m = 0;
|
|
}
|
|
$43 = $m;
|
|
$44 = (+($43|0));
|
|
$45 = $44 < 1.0;
|
|
if ($45) {
|
|
$m = 0;
|
|
}
|
|
while(1) {
|
|
$46 = $2;
|
|
$47 = $46 > 9.9999998245167004E-15;
|
|
$48 = $m;
|
|
$49 = ($48|0)>=(0);
|
|
$50 = $47 ? 1 : $49;
|
|
if (!($50)) {
|
|
break;
|
|
}
|
|
$51 = $m;
|
|
$52 = (+_nk_pow(10.0,$51));
|
|
$weight = $52;
|
|
$53 = $weight;
|
|
$54 = $53 > 0.0;
|
|
if ($54) {
|
|
$55 = $2;
|
|
$56 = $weight;
|
|
$57 = $55 / $56;
|
|
$t = $57;
|
|
$58 = $t;
|
|
$59 = (_nk_ifloor($58)|0);
|
|
$digit = $59;
|
|
$60 = $digit;
|
|
$61 = (+($60|0));
|
|
$62 = $weight;
|
|
$63 = $61 * $62;
|
|
$64 = $2;
|
|
$65 = $64 - $63;
|
|
$2 = $65;
|
|
$66 = $digit;
|
|
$67 = $66&255;
|
|
$68 = $67 << 24 >> 24;
|
|
$69 = (48 + ($68))|0;
|
|
$70 = $69&255;
|
|
$71 = $c;
|
|
$72 = ((($71)) + 1|0);
|
|
$c = $72;
|
|
HEAP8[$71>>0] = $70;
|
|
}
|
|
$73 = $m;
|
|
$74 = ($73|0)==(0);
|
|
$75 = $2;
|
|
$76 = $75 > 0.0;
|
|
$or$cond3 = $74 & $76;
|
|
if ($or$cond3) {
|
|
$77 = $c;
|
|
$78 = ((($77)) + 1|0);
|
|
$c = $78;
|
|
HEAP8[$77>>0] = 46;
|
|
}
|
|
$79 = $m;
|
|
$80 = (($79) + -1)|0;
|
|
$m = $80;
|
|
}
|
|
$81 = $useExp;
|
|
$82 = ($81|0)!=(0);
|
|
if ($82) {
|
|
$83 = $c;
|
|
$84 = ((($83)) + 1|0);
|
|
$c = $84;
|
|
HEAP8[$83>>0] = 101;
|
|
$85 = $m1;
|
|
$86 = ($85|0)>(0);
|
|
$87 = $c;
|
|
$88 = ((($87)) + 1|0);
|
|
$c = $88;
|
|
if ($86) {
|
|
HEAP8[$87>>0] = 43;
|
|
} else {
|
|
HEAP8[$87>>0] = 45;
|
|
$89 = $m1;
|
|
$90 = (0 - ($89))|0;
|
|
$m1 = $90;
|
|
}
|
|
$m = 0;
|
|
while(1) {
|
|
$91 = $m1;
|
|
$92 = ($91|0)>(0);
|
|
if (!($92)) {
|
|
break;
|
|
}
|
|
$93 = $m1;
|
|
$94 = (($93|0) % 10)&-1;
|
|
$95 = $94&255;
|
|
$96 = $95 << 24 >> 24;
|
|
$97 = (48 + ($96))|0;
|
|
$98 = $97&255;
|
|
$99 = $c;
|
|
$100 = ((($99)) + 1|0);
|
|
$c = $100;
|
|
HEAP8[$99>>0] = $98;
|
|
$101 = $m1;
|
|
$102 = (($101|0) / 10)&-1;
|
|
$m1 = $102;
|
|
$103 = $m;
|
|
$104 = (($103) + 1)|0;
|
|
$m = $104;
|
|
}
|
|
$105 = $m;
|
|
$106 = $c;
|
|
$107 = (0 - ($105))|0;
|
|
$108 = (($106) + ($107)|0);
|
|
$c = $108;
|
|
$i = 0;
|
|
$109 = $m;
|
|
$110 = (($109) - 1)|0;
|
|
$j = $110;
|
|
while(1) {
|
|
$111 = $i;
|
|
$112 = $j;
|
|
$113 = ($111|0)<($112|0);
|
|
if (!($113)) {
|
|
break;
|
|
}
|
|
$114 = $j;
|
|
$115 = $c;
|
|
$116 = (($115) + ($114)|0);
|
|
$117 = HEAP8[$116>>0]|0;
|
|
$118 = $117 << 24 >> 24;
|
|
$119 = $i;
|
|
$120 = $c;
|
|
$121 = (($120) + ($119)|0);
|
|
$122 = HEAP8[$121>>0]|0;
|
|
$123 = $122 << 24 >> 24;
|
|
$124 = $123 ^ $118;
|
|
$125 = $124&255;
|
|
HEAP8[$121>>0] = $125;
|
|
$126 = $i;
|
|
$127 = $c;
|
|
$128 = (($127) + ($126)|0);
|
|
$129 = HEAP8[$128>>0]|0;
|
|
$130 = $129 << 24 >> 24;
|
|
$131 = $j;
|
|
$132 = $c;
|
|
$133 = (($132) + ($131)|0);
|
|
$134 = HEAP8[$133>>0]|0;
|
|
$135 = $134 << 24 >> 24;
|
|
$136 = $135 ^ $130;
|
|
$137 = $136&255;
|
|
HEAP8[$133>>0] = $137;
|
|
$138 = $j;
|
|
$139 = $c;
|
|
$140 = (($139) + ($138)|0);
|
|
$141 = HEAP8[$140>>0]|0;
|
|
$142 = $141 << 24 >> 24;
|
|
$143 = $i;
|
|
$144 = $c;
|
|
$145 = (($144) + ($143)|0);
|
|
$146 = HEAP8[$145>>0]|0;
|
|
$147 = $146 << 24 >> 24;
|
|
$148 = $147 ^ $142;
|
|
$149 = $148&255;
|
|
HEAP8[$145>>0] = $149;
|
|
$150 = $i;
|
|
$151 = (($150) + 1)|0;
|
|
$i = $151;
|
|
$152 = $j;
|
|
$153 = (($152) + -1)|0;
|
|
$j = $153;
|
|
}
|
|
$154 = $m;
|
|
$155 = $c;
|
|
$156 = (($155) + ($154)|0);
|
|
$c = $156;
|
|
}
|
|
$157 = $c;
|
|
HEAP8[$157>>0] = 0;
|
|
$158 = $c;
|
|
$159 = $1;
|
|
$160 = $158;
|
|
$161 = $159;
|
|
$162 = (($160) - ($161))|0;
|
|
$0 = $162;
|
|
$163 = $0;
|
|
STACKTOP = sp;return ($163|0);
|
|
}
|
|
function _nk_string_float_limit($string,$prec) {
|
|
$string = $string|0;
|
|
$prec = $prec|0;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, $dot = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $string;
|
|
$1 = $prec;
|
|
$dot = 0;
|
|
$2 = $0;
|
|
$c = $2;
|
|
while(1) {
|
|
$3 = $c;
|
|
$4 = HEAP8[$3>>0]|0;
|
|
$5 = ($4<<24>>24)!=(0);
|
|
if (!($5)) {
|
|
label = 10;
|
|
break;
|
|
}
|
|
$6 = $c;
|
|
$7 = HEAP8[$6>>0]|0;
|
|
$8 = $7 << 24 >> 24;
|
|
$9 = ($8|0)==(46);
|
|
if ($9) {
|
|
$dot = 1;
|
|
$10 = $c;
|
|
$11 = ((($10)) + 1|0);
|
|
$c = $11;
|
|
continue;
|
|
}
|
|
$12 = $dot;
|
|
$13 = $1;
|
|
$14 = (($13) + 1)|0;
|
|
$15 = ($12|0)==($14|0);
|
|
if ($15) {
|
|
break;
|
|
}
|
|
$17 = $dot;
|
|
$18 = ($17|0)>(0);
|
|
if ($18) {
|
|
$19 = $dot;
|
|
$20 = (($19) + 1)|0;
|
|
$dot = $20;
|
|
}
|
|
$21 = $c;
|
|
$22 = ((($21)) + 1|0);
|
|
$c = $22;
|
|
}
|
|
if ((label|0) == 10) {
|
|
$23 = $c;
|
|
$24 = $0;
|
|
$25 = $23;
|
|
$26 = $24;
|
|
$27 = (($25) - ($26))|0;
|
|
STACKTOP = sp;return ($27|0);
|
|
}
|
|
$16 = $c;
|
|
HEAP8[$16>>0] = 0;
|
|
$23 = $c;
|
|
$24 = $0;
|
|
$25 = $23;
|
|
$26 = $24;
|
|
$27 = (($25) - ($26))|0;
|
|
STACKTOP = sp;return ($27|0);
|
|
}
|
|
function _nk_property_behavior($ws,$in,$property,$label,$edit,$empty,$state,$min,$value,$max,$step,$inc_per_pixel) {
|
|
$ws = $ws|0;
|
|
$in = $in|0;
|
|
$property = $property|0;
|
|
$label = $label|0;
|
|
$edit = $edit|0;
|
|
$empty = $empty|0;
|
|
$state = $state|0;
|
|
$min = +$min;
|
|
$value = +$value;
|
|
$max = +$max;
|
|
$step = +$step;
|
|
$inc_per_pixel = +$inc_per_pixel;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0;
|
|
var $8 = 0, $9 = 0, $edit$byval_copy = 0, $empty$byval_copy = 0, $label$byval_copy = 0, $property$byval_copy = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$property$byval_copy = sp + 80|0;
|
|
$empty$byval_copy = sp + 64|0;
|
|
$label$byval_copy = sp + 48|0;
|
|
$edit$byval_copy = sp + 32|0;
|
|
$0 = $ws;
|
|
$1 = $in;
|
|
$2 = $state;
|
|
$3 = $min;
|
|
$4 = $value;
|
|
$5 = $max;
|
|
$6 = $step;
|
|
$7 = $inc_per_pixel;
|
|
$8 = $1;
|
|
$9 = ($8|0)!=(0|0);
|
|
do {
|
|
if ($9) {
|
|
$10 = $2;
|
|
$11 = HEAP32[$10>>2]|0;
|
|
$12 = ($11|0)==(0);
|
|
if ($12) {
|
|
$13 = $0;
|
|
$14 = $1;
|
|
;HEAP32[$edit$byval_copy>>2]=HEAP32[$edit>>2]|0;HEAP32[$edit$byval_copy+4>>2]=HEAP32[$edit+4>>2]|0;HEAP32[$edit$byval_copy+8>>2]=HEAP32[$edit+8>>2]|0;HEAP32[$edit$byval_copy+12>>2]=HEAP32[$edit+12>>2]|0;
|
|
$15 = (_nk_button_behavior($13,$edit$byval_copy,$14,0)|0);
|
|
$16 = ($15|0)!=(0);
|
|
if ($16) {
|
|
$17 = $2;
|
|
HEAP32[$17>>2] = 1;
|
|
break;
|
|
}
|
|
$18 = $1;
|
|
;HEAP32[$label$byval_copy>>2]=HEAP32[$label>>2]|0;HEAP32[$label$byval_copy+4>>2]=HEAP32[$label+4>>2]|0;HEAP32[$label$byval_copy+8>>2]=HEAP32[$label+8>>2]|0;HEAP32[$label$byval_copy+12>>2]=HEAP32[$label+12>>2]|0;
|
|
$19 = (_nk_input_is_mouse_click_down_in_rect($18,0,$label$byval_copy,1)|0);
|
|
$20 = ($19|0)!=(0);
|
|
if ($20) {
|
|
$21 = $2;
|
|
HEAP32[$21>>2] = 2;
|
|
break;
|
|
}
|
|
$22 = $1;
|
|
;HEAP32[$empty$byval_copy>>2]=HEAP32[$empty>>2]|0;HEAP32[$empty$byval_copy+4>>2]=HEAP32[$empty+4>>2]|0;HEAP32[$empty$byval_copy+8>>2]=HEAP32[$empty+8>>2]|0;HEAP32[$empty$byval_copy+12>>2]=HEAP32[$empty+12>>2]|0;
|
|
$23 = (_nk_input_is_mouse_click_down_in_rect($22,0,$empty$byval_copy,1)|0);
|
|
$24 = ($23|0)!=(0);
|
|
if ($24) {
|
|
$25 = $2;
|
|
HEAP32[$25>>2] = 2;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$26 = $2;
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$28 = ($27|0)==(2);
|
|
if (!($28)) {
|
|
$41 = $4;
|
|
STACKTOP = sp;return (+$41);
|
|
}
|
|
$29 = $0;
|
|
$30 = $1;
|
|
$31 = $3;
|
|
$32 = $4;
|
|
$33 = $5;
|
|
$34 = $7;
|
|
;HEAP32[$property$byval_copy>>2]=HEAP32[$property>>2]|0;HEAP32[$property$byval_copy+4>>2]=HEAP32[$property+4>>2]|0;HEAP32[$property$byval_copy+8>>2]=HEAP32[$property+8>>2]|0;HEAP32[$property$byval_copy+12>>2]=HEAP32[$property+12>>2]|0;
|
|
$35 = (+_nk_drag_behavior($29,$30,$property$byval_copy,$31,$32,$33,$34));
|
|
$4 = $35;
|
|
$36 = $0;
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$38 = $37 & 32;
|
|
$39 = ($38|0)!=(0);
|
|
if ($39) {
|
|
$41 = $4;
|
|
STACKTOP = sp;return (+$41);
|
|
}
|
|
$40 = $2;
|
|
HEAP32[$40>>2] = 0;
|
|
$41 = $4;
|
|
STACKTOP = sp;return (+$41);
|
|
}
|
|
function _nk_draw_property($out,$style,$bounds,$label,$state,$name,$len,$font) {
|
|
$out = $out|0;
|
|
$style = $style|0;
|
|
$bounds = $bounds|0;
|
|
$label = $label|0;
|
|
$state = $state|0;
|
|
$name = $name|0;
|
|
$len = $len|0;
|
|
$font = $font|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0;
|
|
var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0;
|
|
var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0.0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0;
|
|
var $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $7 = 0, $8 = 0, $9 = 0, $background = 0, $text = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 176|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy6 = sp + 144|0;
|
|
$$byval_copy5 = sp + 168|0;
|
|
$$byval_copy4 = sp + 128|0;
|
|
$$byval_copy3 = sp + 112|0;
|
|
$$byval_copy2 = sp + 164|0;
|
|
$$byval_copy1 = sp + 96|0;
|
|
$$byval_copy = sp + 80|0;
|
|
$text = sp + 32|0;
|
|
$8 = sp + 160|0;
|
|
$9 = sp + 8|0;
|
|
$10 = sp;
|
|
$0 = $out;
|
|
$1 = $style;
|
|
$2 = $bounds;
|
|
$3 = $label;
|
|
$4 = $state;
|
|
$5 = $name;
|
|
$6 = $len;
|
|
$7 = $font;
|
|
$11 = $4;
|
|
$12 = $11 & 32;
|
|
$13 = ($12|0)!=(0);
|
|
do {
|
|
if ($13) {
|
|
$14 = $1;
|
|
$15 = ((($14)) + 40|0);
|
|
$background = $15;
|
|
$16 = ((($text)) + 12|0);
|
|
$17 = $1;
|
|
$18 = ((($17)) + 72|0);
|
|
;HEAP8[$16>>0]=HEAP8[$18>>0]|0;HEAP8[$16+1>>0]=HEAP8[$18+1>>0]|0;HEAP8[$16+2>>0]=HEAP8[$18+2>>0]|0;HEAP8[$16+3>>0]=HEAP8[$18+3>>0]|0;
|
|
} else {
|
|
$19 = $4;
|
|
$20 = $19 & 16;
|
|
$21 = ($20|0)!=(0);
|
|
$22 = $1;
|
|
if ($21) {
|
|
$23 = ((($22)) + 20|0);
|
|
$background = $23;
|
|
$24 = ((($text)) + 12|0);
|
|
$25 = $1;
|
|
$26 = ((($25)) + 68|0);
|
|
;HEAP8[$24>>0]=HEAP8[$26>>0]|0;HEAP8[$24+1>>0]=HEAP8[$26+1>>0]|0;HEAP8[$24+2>>0]=HEAP8[$26+2>>0]|0;HEAP8[$24+3>>0]=HEAP8[$26+3>>0]|0;
|
|
break;
|
|
} else {
|
|
$background = $22;
|
|
$27 = ((($text)) + 12|0);
|
|
$28 = $1;
|
|
$29 = ((($28)) + 64|0);
|
|
;HEAP8[$27>>0]=HEAP8[$29>>0]|0;HEAP8[$27+1>>0]=HEAP8[$29+1>>0]|0;HEAP8[$27+2>>0]=HEAP8[$29+2>>0]|0;HEAP8[$27+3>>0]=HEAP8[$29+3>>0]|0;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$30 = $background;
|
|
$31 = HEAP32[$30>>2]|0;
|
|
$32 = ($31|0)==(1);
|
|
if ($32) {
|
|
$33 = $0;
|
|
$34 = $2;
|
|
$35 = $background;
|
|
$36 = ((($35)) + 4|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$34>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$34+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$34+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$34+12>>2]|0;
|
|
_nk_draw_image($33,$$byval_copy,$36);
|
|
$37 = ((($text)) + 8|0);
|
|
_nk_rgba($8,0,0,0,0);
|
|
;HEAP8[$37>>0]=HEAP8[$8>>0]|0;HEAP8[$37+1>>0]=HEAP8[$8+1>>0]|0;HEAP8[$37+2>>0]=HEAP8[$8+2>>0]|0;HEAP8[$37+3>>0]=HEAP8[$8+3>>0]|0;
|
|
_nk_vec2($10,0.0,0.0);
|
|
;HEAP32[$text>>2]=HEAP32[$10>>2]|0;HEAP32[$text+4>>2]=HEAP32[$10+4>>2]|0;
|
|
$58 = $0;
|
|
$59 = $3;
|
|
$60 = $5;
|
|
$61 = $6;
|
|
$62 = $7;
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$59>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$59+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[$59+8>>2]|0;HEAP32[$$byval_copy6+12>>2]=HEAP32[$59+12>>2]|0;
|
|
_nk_widget_text($58,$$byval_copy6,$60,$61,$text,18,$62);
|
|
STACKTOP = sp;return;
|
|
} else {
|
|
$38 = ((($text)) + 8|0);
|
|
$39 = $background;
|
|
$40 = ((($39)) + 4|0);
|
|
;HEAP8[$38>>0]=HEAP8[$40>>0]|0;HEAP8[$38+1>>0]=HEAP8[$40+1>>0]|0;HEAP8[$38+2>>0]=HEAP8[$40+2>>0]|0;HEAP8[$38+3>>0]=HEAP8[$40+3>>0]|0;
|
|
$41 = $0;
|
|
$42 = $2;
|
|
$43 = $1;
|
|
$44 = ((($43)) + 88|0);
|
|
$45 = +HEAPF32[$44>>2];
|
|
$46 = $1;
|
|
$47 = ((($46)) + 60|0);
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$42>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$42+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$42+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$42+12>>2]|0;
|
|
;HEAP8[$$byval_copy2>>0]=HEAP8[$47>>0]|0;HEAP8[$$byval_copy2+1>>0]=HEAP8[$47+1>>0]|0;HEAP8[$$byval_copy2+2>>0]=HEAP8[$47+2>>0]|0;HEAP8[$$byval_copy2+3>>0]=HEAP8[$47+3>>0]|0;
|
|
_nk_fill_rect($41,$$byval_copy1,$45,$$byval_copy2);
|
|
$48 = $0;
|
|
$49 = $2;
|
|
$50 = $1;
|
|
$51 = ((($50)) + 84|0);
|
|
$52 = +HEAPF32[$51>>2];
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$49>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$49+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$49+8>>2]|0;HEAP32[$$byval_copy3+12>>2]=HEAP32[$49+12>>2]|0;
|
|
_nk_shrink_rect($9,$$byval_copy3,$52);
|
|
$53 = $1;
|
|
$54 = ((($53)) + 88|0);
|
|
$55 = +HEAPF32[$54>>2];
|
|
$56 = $background;
|
|
$57 = ((($56)) + 4|0);
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$9>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$9+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$9+8>>2]|0;HEAP32[$$byval_copy4+12>>2]=HEAP32[$9+12>>2]|0;
|
|
;HEAP8[$$byval_copy5>>0]=HEAP8[$57>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$57+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$57+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$57+3>>0]|0;
|
|
_nk_fill_rect($48,$$byval_copy4,$55,$$byval_copy5);
|
|
_nk_vec2($10,0.0,0.0);
|
|
;HEAP32[$text>>2]=HEAP32[$10>>2]|0;HEAP32[$text+4>>2]=HEAP32[$10+4>>2]|0;
|
|
$58 = $0;
|
|
$59 = $3;
|
|
$60 = $5;
|
|
$61 = $6;
|
|
$62 = $7;
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$59>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$59+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[$59+8>>2]|0;HEAP32[$$byval_copy6+12>>2]=HEAP32[$59+12>>2]|0;
|
|
_nk_widget_text($58,$$byval_copy6,$60,$61,$text,18,$62);
|
|
STACKTOP = sp;return;
|
|
}
|
|
}
|
|
function _nk_log10($n) {
|
|
$n = +$n;
|
|
var $$sink = 0.0, $0 = 0.0, $1 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0;
|
|
var $8 = 0, $9 = 0, $exp = 0, $neg = 0, $ret = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $n;
|
|
$exp = 0;
|
|
$1 = $0;
|
|
$2 = $1 < 0.0;
|
|
$3 = $2 ? 1 : 0;
|
|
$neg = $3;
|
|
$4 = $neg;
|
|
$5 = ($4|0)!=(0);
|
|
$6 = $0;
|
|
$7 = -$6;
|
|
$$sink = $5 ? $7 : $6;
|
|
$8 = (~~(($$sink)));
|
|
$ret = $8;
|
|
while(1) {
|
|
$9 = $ret;
|
|
$10 = (($9|0) / 10)&-1;
|
|
$11 = ($10|0)>(0);
|
|
if (!($11)) {
|
|
break;
|
|
}
|
|
$12 = $ret;
|
|
$13 = (($12|0) / 10)&-1;
|
|
$ret = $13;
|
|
$14 = $exp;
|
|
$15 = (($14) + 1)|0;
|
|
$exp = $15;
|
|
}
|
|
$16 = $neg;
|
|
$17 = ($16|0)!=(0);
|
|
if (!($17)) {
|
|
$20 = $exp;
|
|
STACKTOP = sp;return ($20|0);
|
|
}
|
|
$18 = $exp;
|
|
$19 = (0 - ($18))|0;
|
|
$exp = $19;
|
|
$20 = $exp;
|
|
STACKTOP = sp;return ($20|0);
|
|
}
|
|
function _nk_pow($x,$n) {
|
|
$x = +$x;
|
|
$n = $n|0;
|
|
var $0 = 0.0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0.0;
|
|
var $27 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $plus = 0, $r = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$0 = $x;
|
|
$1 = $n;
|
|
$r = 1.0;
|
|
$2 = $1;
|
|
$3 = ($2|0)>=(0);
|
|
$4 = $3&1;
|
|
$plus = $4;
|
|
$5 = $plus;
|
|
$6 = ($5|0)!=(0);
|
|
$7 = $1;
|
|
$8 = (0 - ($7))|0;
|
|
$9 = $6 ? $7 : $8;
|
|
$1 = $9;
|
|
while(1) {
|
|
$10 = $1;
|
|
$11 = ($10|0)>(0);
|
|
if (!($11)) {
|
|
break;
|
|
}
|
|
$12 = $1;
|
|
$13 = $12 & 1;
|
|
$14 = ($13|0)==(1);
|
|
if ($14) {
|
|
$15 = $0;
|
|
$16 = $r;
|
|
$17 = $16 * $15;
|
|
$r = $17;
|
|
}
|
|
$18 = $1;
|
|
$19 = (($18|0) / 2)&-1;
|
|
$1 = $19;
|
|
$20 = $0;
|
|
$21 = $0;
|
|
$22 = $21 * $20;
|
|
$0 = $22;
|
|
}
|
|
$23 = $plus;
|
|
$24 = ($23|0)!=(0);
|
|
$25 = $r;
|
|
$26 = 1.0 / $25;
|
|
$27 = $24 ? $25 : $26;
|
|
STACKTOP = sp;return (+$27);
|
|
}
|
|
function _nk_drag_behavior($state,$in,$drag,$min,$val,$max,$inc_per_pixel) {
|
|
$state = $state|0;
|
|
$in = $in|0;
|
|
$drag = $drag|0;
|
|
$min = +$min;
|
|
$val = +$val;
|
|
$max = +$max;
|
|
$inc_per_pixel = +$inc_per_pixel;
|
|
var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
|
|
var $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0;
|
|
var $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
|
|
var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0.0, $8 = 0, $9 = 0, $delta = 0.0, $drag$byval_copy = 0;
|
|
var $drag$byval_copy2 = 0, $drag$byval_copy3 = 0, $drag$byval_copy4 = 0, $left_mouse_click_in_cursor = 0, $left_mouse_down = 0, $or$cond = 0, $pixels = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$drag$byval_copy4 = sp + 88|0;
|
|
$drag$byval_copy3 = sp + 72|0;
|
|
$drag$byval_copy2 = sp + 56|0;
|
|
$drag$byval_copy = sp + 40|0;
|
|
$0 = $state;
|
|
$1 = $in;
|
|
$2 = $min;
|
|
$3 = $val;
|
|
$4 = $max;
|
|
$5 = $inc_per_pixel;
|
|
$6 = $1;
|
|
$7 = ($6|0)!=(0|0);
|
|
if ($7) {
|
|
$8 = $1;
|
|
$9 = ((($8)) + 220|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = ($10|0)!=(0);
|
|
$13 = $11;
|
|
} else {
|
|
$13 = 0;
|
|
}
|
|
$12 = $13&1;
|
|
$left_mouse_down = $12;
|
|
$14 = $1;
|
|
$15 = ($14|0)!=(0|0);
|
|
if ($15) {
|
|
$16 = $1;
|
|
;HEAP32[$drag$byval_copy>>2]=HEAP32[$drag>>2]|0;HEAP32[$drag$byval_copy+4>>2]=HEAP32[$drag+4>>2]|0;HEAP32[$drag$byval_copy+8>>2]=HEAP32[$drag+8>>2]|0;HEAP32[$drag$byval_copy+12>>2]=HEAP32[$drag+12>>2]|0;
|
|
$17 = (_nk_input_has_mouse_click_down_in_rect($16,0,$drag$byval_copy,1)|0);
|
|
$18 = ($17|0)!=(0);
|
|
$20 = $18;
|
|
} else {
|
|
$20 = 0;
|
|
}
|
|
$19 = $20&1;
|
|
$left_mouse_click_in_cursor = $19;
|
|
$21 = $0;
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$23 = $22 & 2;
|
|
$24 = ($23|0)!=(0);
|
|
$25 = $0;
|
|
if ($24) {
|
|
HEAP32[$25>>2] = 6;
|
|
} else {
|
|
HEAP32[$25>>2] = 4;
|
|
}
|
|
$26 = $1;
|
|
;HEAP32[$drag$byval_copy2>>2]=HEAP32[$drag>>2]|0;HEAP32[$drag$byval_copy2+4>>2]=HEAP32[$drag+4>>2]|0;HEAP32[$drag$byval_copy2+8>>2]=HEAP32[$drag+8>>2]|0;HEAP32[$drag$byval_copy2+12>>2]=HEAP32[$drag+12>>2]|0;
|
|
$27 = (_nk_input_is_mouse_hovering_rect($26,$drag$byval_copy2)|0);
|
|
$28 = ($27|0)!=(0);
|
|
if ($28) {
|
|
$29 = $0;
|
|
HEAP32[$29>>2] = 18;
|
|
}
|
|
$30 = $left_mouse_down;
|
|
$31 = ($30|0)!=(0);
|
|
$32 = $left_mouse_click_in_cursor;
|
|
$33 = ($32|0)!=(0);
|
|
$or$cond = $31 & $33;
|
|
if ($or$cond) {
|
|
$34 = $1;
|
|
$35 = ((($34)) + 220|0);
|
|
$36 = ((($35)) + 64|0);
|
|
$37 = +HEAPF32[$36>>2];
|
|
$pixels = $37;
|
|
$38 = $pixels;
|
|
$39 = $5;
|
|
$40 = $38 * $39;
|
|
$delta = $40;
|
|
$41 = $delta;
|
|
$42 = $3;
|
|
$43 = $42 + $41;
|
|
$3 = $43;
|
|
$44 = $3;
|
|
$45 = $4;
|
|
$46 = $44 < $45;
|
|
$47 = $3;
|
|
$48 = $4;
|
|
$49 = $46 ? $47 : $48;
|
|
$50 = $2;
|
|
$51 = $49 < $50;
|
|
if ($51) {
|
|
$52 = $2;
|
|
$59 = $52;
|
|
} else {
|
|
$53 = $3;
|
|
$54 = $4;
|
|
$55 = $53 < $54;
|
|
$56 = $3;
|
|
$57 = $4;
|
|
$58 = $55 ? $56 : $57;
|
|
$59 = $58;
|
|
}
|
|
$3 = $59;
|
|
$60 = $0;
|
|
HEAP32[$60>>2] = 34;
|
|
}
|
|
$61 = $0;
|
|
$62 = HEAP32[$61>>2]|0;
|
|
$63 = $62 & 16;
|
|
$64 = ($63|0)!=(0);
|
|
if ($64) {
|
|
$65 = $1;
|
|
;HEAP32[$drag$byval_copy3>>2]=HEAP32[$drag>>2]|0;HEAP32[$drag$byval_copy3+4>>2]=HEAP32[$drag+4>>2]|0;HEAP32[$drag$byval_copy3+8>>2]=HEAP32[$drag+8>>2]|0;HEAP32[$drag$byval_copy3+12>>2]=HEAP32[$drag+12>>2]|0;
|
|
$66 = (_nk_input_is_mouse_prev_hovering_rect($65,$drag$byval_copy3)|0);
|
|
$67 = ($66|0)!=(0);
|
|
if (!($67)) {
|
|
$68 = $0;
|
|
$69 = HEAP32[$68>>2]|0;
|
|
$70 = $69 | 8;
|
|
HEAP32[$68>>2] = $70;
|
|
$77 = $3;
|
|
STACKTOP = sp;return (+$77);
|
|
}
|
|
}
|
|
$71 = $1;
|
|
;HEAP32[$drag$byval_copy4>>2]=HEAP32[$drag>>2]|0;HEAP32[$drag$byval_copy4+4>>2]=HEAP32[$drag+4>>2]|0;HEAP32[$drag$byval_copy4+8>>2]=HEAP32[$drag+8>>2]|0;HEAP32[$drag$byval_copy4+12>>2]=HEAP32[$drag+12>>2]|0;
|
|
$72 = (_nk_input_is_mouse_prev_hovering_rect($71,$drag$byval_copy4)|0);
|
|
$73 = ($72|0)!=(0);
|
|
if (!($73)) {
|
|
$77 = $3;
|
|
STACKTOP = sp;return (+$77);
|
|
}
|
|
$74 = $0;
|
|
$75 = HEAP32[$74>>2]|0;
|
|
$76 = $75 | 64;
|
|
HEAP32[$74>>2] = $76;
|
|
$77 = $3;
|
|
STACKTOP = sp;return (+$77);
|
|
}
|
|
function _nk_color_picker_behavior($state,$bounds,$matrix,$hue_bar,$alpha_bar,$color,$in) {
|
|
$state = $state|0;
|
|
$bounds = $bounds|0;
|
|
$matrix = $matrix|0;
|
|
$hue_bar = $hue_bar|0;
|
|
$alpha_bar = $alpha_bar|0;
|
|
$color = $color|0;
|
|
$in = $in|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0, $106 = 0.0, $107 = 0, $108 = 0, $109 = 0;
|
|
var $11 = 0, $110 = 0, $111 = 0.0, $112 = 0, $113 = 0, $114 = 0.0, $115 = 0.0, $116 = 0, $117 = 0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0.0, $127 = 0;
|
|
var $128 = 0, $129 = 0.0, $13 = 0, $130 = 0.0, $131 = 0, $132 = 0, $133 = 0.0, $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0.0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0;
|
|
var $146 = 0, $147 = 0, $148 = 0.0, $149 = 0, $15 = 0, $150 = 0, $151 = 0.0, $152 = 0.0, $153 = 0, $154 = 0, $155 = 0.0, $156 = 0.0, $157 = 0.0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0.0;
|
|
var $164 = 0, $165 = 0, $166 = 0.0, $167 = 0.0, $168 = 0, $169 = 0, $17 = 0, $170 = 0.0, $171 = 0.0, $172 = 0.0, $173 = 0, $174 = 0.0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0.0, $18 = 0, $180 = 0, $181 = 0;
|
|
var $182 = 0.0, $183 = 0.0, $184 = 0, $185 = 0, $186 = 0.0, $187 = 0.0, $188 = 0.0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0.0, $195 = 0, $196 = 0, $197 = 0.0, $198 = 0.0, $199 = 0, $2 = 0;
|
|
var $20 = 0, $200 = 0, $201 = 0.0, $202 = 0.0, $203 = 0.0, $204 = 0.0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0.0, $217 = 0;
|
|
var $218 = 0, $219 = 0.0, $22 = 0, $220 = 0.0, $221 = 0, $222 = 0, $223 = 0.0, $224 = 0.0, $225 = 0.0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0.0, $232 = 0, $233 = 0, $234 = 0.0, $235 = 0.0;
|
|
var $236 = 0, $237 = 0, $238 = 0.0, $239 = 0.0, $24 = 0, $240 = 0.0, $241 = 0, $242 = 0.0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0.0, $248 = 0, $249 = 0, $25 = 0.0, $250 = 0.0, $251 = 0.0, $252 = 0, $253 = 0;
|
|
var $254 = 0.0, $255 = 0.0, $256 = 0.0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0.0, $263 = 0, $264 = 0, $265 = 0.0, $266 = 0.0, $267 = 0, $268 = 0, $269 = 0.0, $27 = 0.0, $270 = 0.0, $271 = 0.0;
|
|
var $272 = 0.0, $273 = 0.0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0.0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0.0, $288 = 0.0, $289 = 0, $29 = 0;
|
|
var $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0;
|
|
var $308 = 0, $309 = 0, $31 = 0.0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0.0;
|
|
var $41 = 0.0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0.0, $53 = 0, $54 = 0.0, $55 = 0.0, $56 = 0, $57 = 0, $58 = 0.0, $59 = 0.0;
|
|
var $6 = 0, $60 = 0.0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0.0, $66 = 0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0, $75 = 0.0, $76 = 0, $77 = 0;
|
|
var $78 = 0, $79 = 0, $8 = 0, $80 = 0.0, $81 = 0, $82 = 0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0.0;
|
|
var $96 = 0, $97 = 0, $98 = 0.0, $99 = 0.0, $hsv_changed = 0, $hsva = 0, $value_changed = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy6 = sp + 136|0;
|
|
$$byval_copy5 = sp + 120|0;
|
|
$$byval_copy4 = sp + 104|0;
|
|
$$byval_copy3 = sp + 88|0;
|
|
$$byval_copy2 = sp + 72|0;
|
|
$$byval_copy1 = sp + 56|0;
|
|
$$byval_copy = sp + 156|0;
|
|
$hsva = sp + 8|0;
|
|
$7 = sp + 152|0;
|
|
$0 = $state;
|
|
$1 = $bounds;
|
|
$2 = $matrix;
|
|
$3 = $hue_bar;
|
|
$4 = $alpha_bar;
|
|
$5 = $color;
|
|
$6 = $in;
|
|
$value_changed = 0;
|
|
$hsv_changed = 0;
|
|
$8 = $0;
|
|
$9 = ($8|0)!=(0|0);
|
|
if (!($9)) {
|
|
___assert_fail((28059|0),(13400|0),13522,(31818|0));
|
|
// unreachable;
|
|
}
|
|
$10 = $2;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
___assert_fail((31843|0),(13400|0),13523,(31818|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $3;
|
|
$13 = ($12|0)!=(0|0);
|
|
if (!($13)) {
|
|
___assert_fail((31850|0),(13400|0),13524,(31818|0));
|
|
// unreachable;
|
|
}
|
|
$14 = $5;
|
|
$15 = ($14|0)!=(0|0);
|
|
if (!($15)) {
|
|
___assert_fail((28666|0),(13400|0),13525,(31818|0));
|
|
// unreachable;
|
|
}
|
|
$16 = $5;
|
|
;HEAP8[$$byval_copy>>0]=HEAP8[$16>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$16+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$16+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$16+3>>0]|0;
|
|
_nk_color_hsva_fv($hsva,$$byval_copy);
|
|
$17 = $0;
|
|
$18 = $2;
|
|
$19 = $6;
|
|
;HEAP32[$$byval_copy1>>2]=HEAP32[$18>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$18+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$18+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$18+12>>2]|0;
|
|
$20 = (_nk_button_behavior($17,$$byval_copy1,$19,1)|0);
|
|
$21 = ($20|0)!=(0);
|
|
if ($21) {
|
|
$22 = $6;
|
|
$23 = ((($22)) + 220|0);
|
|
$24 = ((($23)) + 48|0);
|
|
$25 = +HEAPF32[$24>>2];
|
|
$26 = $2;
|
|
$27 = +HEAPF32[$26>>2];
|
|
$28 = $25 - $27;
|
|
$29 = $2;
|
|
$30 = ((($29)) + 8|0);
|
|
$31 = +HEAPF32[$30>>2];
|
|
$32 = $31 - 1.0;
|
|
$33 = $28 / $32;
|
|
$34 = 1.0 < $33;
|
|
if ($34) {
|
|
$48 = 1.0;
|
|
} else {
|
|
$35 = $6;
|
|
$36 = ((($35)) + 220|0);
|
|
$37 = ((($36)) + 48|0);
|
|
$38 = +HEAPF32[$37>>2];
|
|
$39 = $2;
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = $38 - $40;
|
|
$42 = $2;
|
|
$43 = ((($42)) + 8|0);
|
|
$44 = +HEAPF32[$43>>2];
|
|
$45 = $44 - 1.0;
|
|
$46 = $41 / $45;
|
|
$48 = $46;
|
|
}
|
|
$47 = 0.0 < $48;
|
|
if ($47) {
|
|
$49 = $6;
|
|
$50 = ((($49)) + 220|0);
|
|
$51 = ((($50)) + 48|0);
|
|
$52 = +HEAPF32[$51>>2];
|
|
$53 = $2;
|
|
$54 = +HEAPF32[$53>>2];
|
|
$55 = $52 - $54;
|
|
$56 = $2;
|
|
$57 = ((($56)) + 8|0);
|
|
$58 = +HEAPF32[$57>>2];
|
|
$59 = $58 - 1.0;
|
|
$60 = $55 / $59;
|
|
$61 = 1.0 < $60;
|
|
if ($61) {
|
|
$75 = 1.0;
|
|
} else {
|
|
$62 = $6;
|
|
$63 = ((($62)) + 220|0);
|
|
$64 = ((($63)) + 48|0);
|
|
$65 = +HEAPF32[$64>>2];
|
|
$66 = $2;
|
|
$67 = +HEAPF32[$66>>2];
|
|
$68 = $65 - $67;
|
|
$69 = $2;
|
|
$70 = ((($69)) + 8|0);
|
|
$71 = +HEAPF32[$70>>2];
|
|
$72 = $71 - 1.0;
|
|
$73 = $68 / $72;
|
|
$75 = $73;
|
|
}
|
|
} else {
|
|
$75 = 0.0;
|
|
}
|
|
$74 = ((($hsva)) + 4|0);
|
|
HEAPF32[$74>>2] = $75;
|
|
$76 = $6;
|
|
$77 = ((($76)) + 220|0);
|
|
$78 = ((($77)) + 48|0);
|
|
$79 = ((($78)) + 4|0);
|
|
$80 = +HEAPF32[$79>>2];
|
|
$81 = $2;
|
|
$82 = ((($81)) + 4|0);
|
|
$83 = +HEAPF32[$82>>2];
|
|
$84 = $80 - $83;
|
|
$85 = $2;
|
|
$86 = ((($85)) + 12|0);
|
|
$87 = +HEAPF32[$86>>2];
|
|
$88 = $87 - 1.0;
|
|
$89 = $84 / $88;
|
|
$90 = 1.0 < $89;
|
|
if ($90) {
|
|
$106 = 1.0;
|
|
} else {
|
|
$91 = $6;
|
|
$92 = ((($91)) + 220|0);
|
|
$93 = ((($92)) + 48|0);
|
|
$94 = ((($93)) + 4|0);
|
|
$95 = +HEAPF32[$94>>2];
|
|
$96 = $2;
|
|
$97 = ((($96)) + 4|0);
|
|
$98 = +HEAPF32[$97>>2];
|
|
$99 = $95 - $98;
|
|
$100 = $2;
|
|
$101 = ((($100)) + 12|0);
|
|
$102 = +HEAPF32[$101>>2];
|
|
$103 = $102 - 1.0;
|
|
$104 = $99 / $103;
|
|
$106 = $104;
|
|
}
|
|
$105 = 0.0 < $106;
|
|
if ($105) {
|
|
$107 = $6;
|
|
$108 = ((($107)) + 220|0);
|
|
$109 = ((($108)) + 48|0);
|
|
$110 = ((($109)) + 4|0);
|
|
$111 = +HEAPF32[$110>>2];
|
|
$112 = $2;
|
|
$113 = ((($112)) + 4|0);
|
|
$114 = +HEAPF32[$113>>2];
|
|
$115 = $111 - $114;
|
|
$116 = $2;
|
|
$117 = ((($116)) + 12|0);
|
|
$118 = +HEAPF32[$117>>2];
|
|
$119 = $118 - 1.0;
|
|
$120 = $115 / $119;
|
|
$121 = 1.0 < $120;
|
|
if ($121) {
|
|
$137 = 1.0;
|
|
} else {
|
|
$122 = $6;
|
|
$123 = ((($122)) + 220|0);
|
|
$124 = ((($123)) + 48|0);
|
|
$125 = ((($124)) + 4|0);
|
|
$126 = +HEAPF32[$125>>2];
|
|
$127 = $2;
|
|
$128 = ((($127)) + 4|0);
|
|
$129 = +HEAPF32[$128>>2];
|
|
$130 = $126 - $129;
|
|
$131 = $2;
|
|
$132 = ((($131)) + 12|0);
|
|
$133 = +HEAPF32[$132>>2];
|
|
$134 = $133 - 1.0;
|
|
$135 = $130 / $134;
|
|
$137 = $135;
|
|
}
|
|
} else {
|
|
$137 = 0.0;
|
|
}
|
|
$136 = 1.0 - $137;
|
|
$138 = ((($hsva)) + 8|0);
|
|
HEAPF32[$138>>2] = $136;
|
|
$hsv_changed = 1;
|
|
$value_changed = 1;
|
|
}
|
|
$139 = $0;
|
|
$140 = $3;
|
|
$141 = $6;
|
|
;HEAP32[$$byval_copy2>>2]=HEAP32[$140>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$140+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$140+8>>2]|0;HEAP32[$$byval_copy2+12>>2]=HEAP32[$140+12>>2]|0;
|
|
$142 = (_nk_button_behavior($139,$$byval_copy2,$141,1)|0);
|
|
$143 = ($142|0)!=(0);
|
|
if ($143) {
|
|
$144 = $6;
|
|
$145 = ((($144)) + 220|0);
|
|
$146 = ((($145)) + 48|0);
|
|
$147 = ((($146)) + 4|0);
|
|
$148 = +HEAPF32[$147>>2];
|
|
$149 = $3;
|
|
$150 = ((($149)) + 4|0);
|
|
$151 = +HEAPF32[$150>>2];
|
|
$152 = $148 - $151;
|
|
$153 = $3;
|
|
$154 = ((($153)) + 12|0);
|
|
$155 = +HEAPF32[$154>>2];
|
|
$156 = $155 - 1.0;
|
|
$157 = $152 / $156;
|
|
$158 = 1.0 < $157;
|
|
if ($158) {
|
|
$174 = 1.0;
|
|
} else {
|
|
$159 = $6;
|
|
$160 = ((($159)) + 220|0);
|
|
$161 = ((($160)) + 48|0);
|
|
$162 = ((($161)) + 4|0);
|
|
$163 = +HEAPF32[$162>>2];
|
|
$164 = $3;
|
|
$165 = ((($164)) + 4|0);
|
|
$166 = +HEAPF32[$165>>2];
|
|
$167 = $163 - $166;
|
|
$168 = $3;
|
|
$169 = ((($168)) + 12|0);
|
|
$170 = +HEAPF32[$169>>2];
|
|
$171 = $170 - 1.0;
|
|
$172 = $167 / $171;
|
|
$174 = $172;
|
|
}
|
|
$173 = 0.0 < $174;
|
|
if ($173) {
|
|
$175 = $6;
|
|
$176 = ((($175)) + 220|0);
|
|
$177 = ((($176)) + 48|0);
|
|
$178 = ((($177)) + 4|0);
|
|
$179 = +HEAPF32[$178>>2];
|
|
$180 = $3;
|
|
$181 = ((($180)) + 4|0);
|
|
$182 = +HEAPF32[$181>>2];
|
|
$183 = $179 - $182;
|
|
$184 = $3;
|
|
$185 = ((($184)) + 12|0);
|
|
$186 = +HEAPF32[$185>>2];
|
|
$187 = $186 - 1.0;
|
|
$188 = $183 / $187;
|
|
$189 = 1.0 < $188;
|
|
if ($189) {
|
|
$204 = 1.0;
|
|
} else {
|
|
$190 = $6;
|
|
$191 = ((($190)) + 220|0);
|
|
$192 = ((($191)) + 48|0);
|
|
$193 = ((($192)) + 4|0);
|
|
$194 = +HEAPF32[$193>>2];
|
|
$195 = $3;
|
|
$196 = ((($195)) + 4|0);
|
|
$197 = +HEAPF32[$196>>2];
|
|
$198 = $194 - $197;
|
|
$199 = $3;
|
|
$200 = ((($199)) + 12|0);
|
|
$201 = +HEAPF32[$200>>2];
|
|
$202 = $201 - 1.0;
|
|
$203 = $198 / $202;
|
|
$204 = $203;
|
|
}
|
|
} else {
|
|
$204 = 0.0;
|
|
}
|
|
HEAPF32[$hsva>>2] = $204;
|
|
$hsv_changed = 1;
|
|
$value_changed = 1;
|
|
}
|
|
$205 = $4;
|
|
$206 = ($205|0)!=(0|0);
|
|
if ($206) {
|
|
$207 = $0;
|
|
$208 = $4;
|
|
$209 = $6;
|
|
;HEAP32[$$byval_copy3>>2]=HEAP32[$208>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$208+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$208+8>>2]|0;HEAP32[$$byval_copy3+12>>2]=HEAP32[$208+12>>2]|0;
|
|
$210 = (_nk_button_behavior($207,$$byval_copy3,$209,1)|0);
|
|
$211 = ($210|0)!=(0);
|
|
if ($211) {
|
|
$212 = $6;
|
|
$213 = ((($212)) + 220|0);
|
|
$214 = ((($213)) + 48|0);
|
|
$215 = ((($214)) + 4|0);
|
|
$216 = +HEAPF32[$215>>2];
|
|
$217 = $4;
|
|
$218 = ((($217)) + 4|0);
|
|
$219 = +HEAPF32[$218>>2];
|
|
$220 = $216 - $219;
|
|
$221 = $4;
|
|
$222 = ((($221)) + 12|0);
|
|
$223 = +HEAPF32[$222>>2];
|
|
$224 = $223 - 1.0;
|
|
$225 = $220 / $224;
|
|
$226 = 1.0 < $225;
|
|
if ($226) {
|
|
$242 = 1.0;
|
|
} else {
|
|
$227 = $6;
|
|
$228 = ((($227)) + 220|0);
|
|
$229 = ((($228)) + 48|0);
|
|
$230 = ((($229)) + 4|0);
|
|
$231 = +HEAPF32[$230>>2];
|
|
$232 = $4;
|
|
$233 = ((($232)) + 4|0);
|
|
$234 = +HEAPF32[$233>>2];
|
|
$235 = $231 - $234;
|
|
$236 = $4;
|
|
$237 = ((($236)) + 12|0);
|
|
$238 = +HEAPF32[$237>>2];
|
|
$239 = $238 - 1.0;
|
|
$240 = $235 / $239;
|
|
$242 = $240;
|
|
}
|
|
$241 = 0.0 < $242;
|
|
if ($241) {
|
|
$243 = $6;
|
|
$244 = ((($243)) + 220|0);
|
|
$245 = ((($244)) + 48|0);
|
|
$246 = ((($245)) + 4|0);
|
|
$247 = +HEAPF32[$246>>2];
|
|
$248 = $4;
|
|
$249 = ((($248)) + 4|0);
|
|
$250 = +HEAPF32[$249>>2];
|
|
$251 = $247 - $250;
|
|
$252 = $4;
|
|
$253 = ((($252)) + 12|0);
|
|
$254 = +HEAPF32[$253>>2];
|
|
$255 = $254 - 1.0;
|
|
$256 = $251 / $255;
|
|
$257 = 1.0 < $256;
|
|
if ($257) {
|
|
$273 = 1.0;
|
|
} else {
|
|
$258 = $6;
|
|
$259 = ((($258)) + 220|0);
|
|
$260 = ((($259)) + 48|0);
|
|
$261 = ((($260)) + 4|0);
|
|
$262 = +HEAPF32[$261>>2];
|
|
$263 = $4;
|
|
$264 = ((($263)) + 4|0);
|
|
$265 = +HEAPF32[$264>>2];
|
|
$266 = $262 - $265;
|
|
$267 = $4;
|
|
$268 = ((($267)) + 12|0);
|
|
$269 = +HEAPF32[$268>>2];
|
|
$270 = $269 - 1.0;
|
|
$271 = $266 / $270;
|
|
$273 = $271;
|
|
}
|
|
} else {
|
|
$273 = 0.0;
|
|
}
|
|
$272 = 1.0 - $273;
|
|
$274 = ((($hsva)) + 12|0);
|
|
HEAPF32[$274>>2] = $272;
|
|
$value_changed = 1;
|
|
}
|
|
}
|
|
$275 = $0;
|
|
$276 = HEAP32[$275>>2]|0;
|
|
$277 = $276 & 2;
|
|
$278 = ($277|0)!=(0);
|
|
$279 = $0;
|
|
if ($278) {
|
|
HEAP32[$279>>2] = 6;
|
|
} else {
|
|
HEAP32[$279>>2] = 4;
|
|
}
|
|
$280 = $hsv_changed;
|
|
$281 = ($280|0)!=(0);
|
|
if ($281) {
|
|
$282 = $5;
|
|
_nk_hsva_fv($7,$hsva);
|
|
;HEAP8[$282>>0]=HEAP8[$7>>0]|0;HEAP8[$282+1>>0]=HEAP8[$7+1>>0]|0;HEAP8[$282+2>>0]=HEAP8[$7+2>>0]|0;HEAP8[$282+3>>0]=HEAP8[$7+3>>0]|0;
|
|
$283 = $0;
|
|
HEAP32[$283>>2] = 34;
|
|
}
|
|
$284 = $value_changed;
|
|
$285 = ($284|0)!=(0);
|
|
if ($285) {
|
|
$286 = ((($hsva)) + 12|0);
|
|
$287 = +HEAPF32[$286>>2];
|
|
$288 = $287 * 255.0;
|
|
$289 = (~~(($288))&255);
|
|
$290 = $5;
|
|
$291 = ((($290)) + 3|0);
|
|
HEAP8[$291>>0] = $289;
|
|
$292 = $0;
|
|
HEAP32[$292>>2] = 34;
|
|
}
|
|
$293 = $6;
|
|
$294 = $1;
|
|
;HEAP32[$$byval_copy4>>2]=HEAP32[$294>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$294+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$294+8>>2]|0;HEAP32[$$byval_copy4+12>>2]=HEAP32[$294+12>>2]|0;
|
|
$295 = (_nk_input_is_mouse_hovering_rect($293,$$byval_copy4)|0);
|
|
$296 = ($295|0)!=(0);
|
|
if ($296) {
|
|
$297 = $0;
|
|
HEAP32[$297>>2] = 18;
|
|
}
|
|
$298 = $0;
|
|
$299 = HEAP32[$298>>2]|0;
|
|
$300 = $299 & 16;
|
|
$301 = ($300|0)!=(0);
|
|
if ($301) {
|
|
$302 = $6;
|
|
$303 = $1;
|
|
;HEAP32[$$byval_copy5>>2]=HEAP32[$303>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$303+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$303+8>>2]|0;HEAP32[$$byval_copy5+12>>2]=HEAP32[$303+12>>2]|0;
|
|
$304 = (_nk_input_is_mouse_prev_hovering_rect($302,$$byval_copy5)|0);
|
|
$305 = ($304|0)!=(0);
|
|
if (!($305)) {
|
|
$306 = $0;
|
|
$307 = HEAP32[$306>>2]|0;
|
|
$308 = $307 | 8;
|
|
HEAP32[$306>>2] = $308;
|
|
$316 = $value_changed;
|
|
STACKTOP = sp;return ($316|0);
|
|
}
|
|
}
|
|
$309 = $6;
|
|
$310 = $1;
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$310>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$310+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[$310+8>>2]|0;HEAP32[$$byval_copy6+12>>2]=HEAP32[$310+12>>2]|0;
|
|
$311 = (_nk_input_is_mouse_prev_hovering_rect($309,$$byval_copy6)|0);
|
|
$312 = ($311|0)!=(0);
|
|
if (!($312)) {
|
|
$316 = $value_changed;
|
|
STACKTOP = sp;return ($316|0);
|
|
}
|
|
$313 = $0;
|
|
$314 = HEAP32[$313>>2]|0;
|
|
$315 = $314 | 64;
|
|
HEAP32[$313>>2] = $315;
|
|
$316 = $value_changed;
|
|
STACKTOP = sp;return ($316|0);
|
|
}
|
|
function _nk_draw_color_picker($o,$matrix,$hue_bar,$alpha_bar,$color) {
|
|
$o = $o|0;
|
|
$matrix = $matrix|0;
|
|
$hue_bar = $hue_bar|0;
|
|
$alpha_bar = $alpha_bar|0;
|
|
$color = $color|0;
|
|
var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy10 = 0, $$byval_copy14 = 0, $$byval_copy2 = 0, $$byval_copy20 = 0, $$byval_copy21 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0, $104 = 0;
|
|
var $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0, $115 = 0.0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0.0;
|
|
var $123 = 0, $124 = 0.0, $125 = 0, $126 = 0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0.0, $131 = 0.0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0.0, $138 = 0, $139 = 0.0, $14 = 0, $140 = 0;
|
|
var $141 = 0.0, $142 = 0.0, $143 = 0, $144 = 0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0.0, $149 = 0, $15 = 0, $150 = 0.0, $151 = 0, $152 = 0, $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0, $157 = 0, $158 = 0.0, $159 = 0.0;
|
|
var $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0, $163 = 0.0, $164 = 0, $165 = 0, $166 = 0.0, $167 = 0.0, $168 = 0, $169 = 0.0, $17 = 0, $170 = 0.0, $171 = 0.0, $172 = 0, $173 = 0.0, $174 = 0, $175 = 0.0, $176 = 0.0, $177 = 0;
|
|
var $178 = 0.0, $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0, $182 = 0.0, $183 = 0, $184 = 0.0, $185 = 0, $186 = 0.0, $187 = 0.0, $188 = 0.0, $189 = 0, $19 = 0, $190 = 0.0, $191 = 0.0, $192 = 0, $193 = 0.0, $194 = 0, $195 = 0.0;
|
|
var $196 = 0.0, $197 = 0.0, $198 = 0, $199 = 0.0, $2 = 0, $20 = 0, $200 = 0.0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0;
|
|
var $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0.0, $38 = 0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0;
|
|
var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0.0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0.0, $67 = 0, $68 = 0, $69 = 0.0;
|
|
var $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0.0, $85 = 0.0, $86 = 0, $87 = 0;
|
|
var $88 = 0, $89 = 0.0, $9 = 0, $90 = 0.0, $91 = 0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0.0, $96 = 0.0, $97 = 0, $98 = 0, $99 = 0, $S = 0.0, $V = 0.0, $alpha = 0.0, $color$byval_copy = 0, $crosshair_size = 0.0, $hsva = 0, $i = 0;
|
|
var $line_y = 0.0, $nk_draw_color_picker$black$byval_copy = 0, $nk_draw_color_picker$black$byval_copy16 = 0, $nk_draw_color_picker$black$byval_copy17 = 0, $nk_draw_color_picker$black$byval_copy8 = 0, $nk_draw_color_picker$black_trans$byval_copy = 0, $nk_draw_color_picker$black_trans$byval_copy15 = 0, $nk_draw_color_picker$white$byval_copy = 0, $nk_draw_color_picker$white$byval_copy11 = 0, $nk_draw_color_picker$white$byval_copy13 = 0, $nk_draw_color_picker$white$byval_copy18 = 0, $nk_draw_color_picker$white$byval_copy19 = 0, $nk_draw_color_picker$white$byval_copy7 = 0, $p = 0, $temp = 0, $temp$byval_copy = 0, $temp$byval_copy12 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 272|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$$byval_copy21 = sp + 264|0;
|
|
$$byval_copy20 = sp + 260|0;
|
|
$nk_draw_color_picker$white$byval_copy19 = sp + 256|0;
|
|
$nk_draw_color_picker$white$byval_copy18 = sp + 252|0;
|
|
$nk_draw_color_picker$black$byval_copy17 = sp + 248|0;
|
|
$nk_draw_color_picker$black$byval_copy16 = sp + 244|0;
|
|
$nk_draw_color_picker$black_trans$byval_copy15 = sp + 240|0;
|
|
$nk_draw_color_picker$black_trans$byval_copy = sp + 236|0;
|
|
$$byval_copy14 = sp + 136|0;
|
|
$nk_draw_color_picker$white$byval_copy13 = sp + 232|0;
|
|
$temp$byval_copy12 = sp + 228|0;
|
|
$temp$byval_copy = sp + 224|0;
|
|
$nk_draw_color_picker$white$byval_copy11 = sp + 220|0;
|
|
$$byval_copy10 = sp + 120|0;
|
|
$$byval_copy9 = sp + 216|0;
|
|
$nk_draw_color_picker$black$byval_copy8 = sp + 212|0;
|
|
$nk_draw_color_picker$black$byval_copy = sp + 208|0;
|
|
$nk_draw_color_picker$white$byval_copy7 = sp + 204|0;
|
|
$nk_draw_color_picker$white$byval_copy = sp + 200|0;
|
|
$$byval_copy6 = sp + 104|0;
|
|
$$byval_copy5 = sp + 196|0;
|
|
$$byval_copy4 = sp + 192|0;
|
|
$$byval_copy3 = sp + 188|0;
|
|
$$byval_copy2 = sp + 184|0;
|
|
$$byval_copy1 = sp + 180|0;
|
|
$$byval_copy = sp + 88|0;
|
|
$color$byval_copy = sp + 176|0;
|
|
$temp = sp + 172|0;
|
|
$hsva = sp + 48|0;
|
|
$4 = sp + 24|0;
|
|
$5 = sp + 168|0;
|
|
$6 = sp + 164|0;
|
|
$7 = sp + 160|0;
|
|
$p = sp + 8|0;
|
|
$8 = sp + 156|0;
|
|
$9 = sp + 152|0;
|
|
$0 = $o;
|
|
$1 = $matrix;
|
|
$2 = $hue_bar;
|
|
$3 = $alpha_bar;
|
|
$crosshair_size = 7.0;
|
|
$10 = $0;
|
|
$11 = ($10|0)!=(0|0);
|
|
if (!($11)) {
|
|
___assert_fail((31618|0),(13400|0),13584,(31870|0));
|
|
// unreachable;
|
|
}
|
|
$12 = $1;
|
|
$13 = ($12|0)!=(0|0);
|
|
if (!($13)) {
|
|
___assert_fail((31843|0),(13400|0),13585,(31870|0));
|
|
// unreachable;
|
|
}
|
|
$14 = $2;
|
|
$15 = ($14|0)!=(0|0);
|
|
if (!($15)) {
|
|
___assert_fail((31850|0),(13400|0),13586,(31870|0));
|
|
// unreachable;
|
|
}
|
|
$16 = $3;
|
|
$17 = ($16|0)!=(0|0);
|
|
if (!($17)) {
|
|
___assert_fail((31891|0),(13400|0),13587,(31870|0));
|
|
// unreachable;
|
|
}
|
|
;HEAP8[$color$byval_copy>>0]=HEAP8[$color>>0]|0;HEAP8[$color$byval_copy+1>>0]=HEAP8[$color+1>>0]|0;HEAP8[$color$byval_copy+2>>0]=HEAP8[$color+2>>0]|0;HEAP8[$color$byval_copy+3>>0]=HEAP8[$color+3>>0]|0;
|
|
_nk_color_hsv_fv($hsva,$color$byval_copy);
|
|
$i = 0;
|
|
while(1) {
|
|
$18 = $i;
|
|
$19 = ($18|0)<(6);
|
|
if (!($19)) {
|
|
break;
|
|
}
|
|
$20 = $0;
|
|
$21 = $2;
|
|
$22 = +HEAPF32[$21>>2];
|
|
$23 = $2;
|
|
$24 = ((($23)) + 4|0);
|
|
$25 = +HEAPF32[$24>>2];
|
|
$26 = $i;
|
|
$27 = (+($26|0));
|
|
$28 = $2;
|
|
$29 = ((($28)) + 12|0);
|
|
$30 = +HEAPF32[$29>>2];
|
|
$31 = $30 / 6.0;
|
|
$32 = $27 * $31;
|
|
$33 = $25 + $32;
|
|
$34 = $33 + 0.5;
|
|
$35 = $2;
|
|
$36 = ((($35)) + 8|0);
|
|
$37 = +HEAPF32[$36>>2];
|
|
$38 = $2;
|
|
$39 = ((($38)) + 12|0);
|
|
$40 = +HEAPF32[$39>>2];
|
|
$41 = $40 / 6.0;
|
|
$42 = $41 + 0.5;
|
|
_nk_rect($4,$22,$34,$37,$42);
|
|
$43 = $i;
|
|
$44 = (31901 + ($43<<2)|0);
|
|
$45 = $i;
|
|
$46 = (31901 + ($45<<2)|0);
|
|
$47 = $i;
|
|
$48 = (($47) + 1)|0;
|
|
$49 = (31901 + ($48<<2)|0);
|
|
$50 = $i;
|
|
$51 = (($50) + 1)|0;
|
|
$52 = (31901 + ($51<<2)|0);
|
|
;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$4+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$4+12>>2]|0;
|
|
;HEAP8[$$byval_copy1>>0]=HEAP8[$44>>0]|0;HEAP8[$$byval_copy1+1>>0]=HEAP8[$44+1>>0]|0;HEAP8[$$byval_copy1+2>>0]=HEAP8[$44+2>>0]|0;HEAP8[$$byval_copy1+3>>0]=HEAP8[$44+3>>0]|0;
|
|
;HEAP8[$$byval_copy2>>0]=HEAP8[$46>>0]|0;HEAP8[$$byval_copy2+1>>0]=HEAP8[$46+1>>0]|0;HEAP8[$$byval_copy2+2>>0]=HEAP8[$46+2>>0]|0;HEAP8[$$byval_copy2+3>>0]=HEAP8[$46+3>>0]|0;
|
|
;HEAP8[$$byval_copy3>>0]=HEAP8[$49>>0]|0;HEAP8[$$byval_copy3+1>>0]=HEAP8[$49+1>>0]|0;HEAP8[$$byval_copy3+2>>0]=HEAP8[$49+2>>0]|0;HEAP8[$$byval_copy3+3>>0]=HEAP8[$49+3>>0]|0;
|
|
;HEAP8[$$byval_copy4>>0]=HEAP8[$52>>0]|0;HEAP8[$$byval_copy4+1>>0]=HEAP8[$52+1>>0]|0;HEAP8[$$byval_copy4+2>>0]=HEAP8[$52+2>>0]|0;HEAP8[$$byval_copy4+3>>0]=HEAP8[$52+3>>0]|0;
|
|
_nk_fill_rect_multi_color($20,$$byval_copy,$$byval_copy1,$$byval_copy2,$$byval_copy3,$$byval_copy4);
|
|
$53 = $i;
|
|
$54 = (($53) + 1)|0;
|
|
$i = $54;
|
|
}
|
|
$55 = $2;
|
|
$56 = ((($55)) + 4|0);
|
|
$57 = +HEAPF32[$56>>2];
|
|
$58 = +HEAPF32[$hsva>>2];
|
|
$59 = $1;
|
|
$60 = ((($59)) + 12|0);
|
|
$61 = +HEAPF32[$60>>2];
|
|
$62 = $58 * $61;
|
|
$63 = $57 + $62;
|
|
$64 = $63 + 0.5;
|
|
$65 = (~~(($64)));
|
|
$66 = (+($65|0));
|
|
$line_y = $66;
|
|
$67 = $0;
|
|
$68 = $2;
|
|
$69 = +HEAPF32[$68>>2];
|
|
$70 = $69 - 1.0;
|
|
$71 = $line_y;
|
|
$72 = $2;
|
|
$73 = +HEAPF32[$72>>2];
|
|
$74 = $2;
|
|
$75 = ((($74)) + 8|0);
|
|
$76 = +HEAPF32[$75>>2];
|
|
$77 = $73 + $76;
|
|
$78 = $77 + 2.0;
|
|
$79 = $line_y;
|
|
_nk_rgb($5,255,255,255);
|
|
;HEAP8[$$byval_copy5>>0]=HEAP8[$5>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$5+3>>0]|0;
|
|
_nk_stroke_line($67,$70,$71,$78,$79,1.0,$$byval_copy5);
|
|
$80 = $3;
|
|
$81 = ($80|0)!=(0|0);
|
|
if ($81) {
|
|
$82 = ((($color)) + 3|0);
|
|
$83 = HEAP8[$82>>0]|0;
|
|
$84 = (+($83&255));
|
|
$85 = $84 / 255.0;
|
|
$86 = 1.0 < $85;
|
|
if ($86) {
|
|
$92 = 1.0;
|
|
} else {
|
|
$87 = ((($color)) + 3|0);
|
|
$88 = HEAP8[$87>>0]|0;
|
|
$89 = (+($88&255));
|
|
$90 = $89 / 255.0;
|
|
$92 = $90;
|
|
}
|
|
$91 = 0.0 < $92;
|
|
if ($91) {
|
|
$93 = ((($color)) + 3|0);
|
|
$94 = HEAP8[$93>>0]|0;
|
|
$95 = (+($94&255));
|
|
$96 = $95 / 255.0;
|
|
$97 = 1.0 < $96;
|
|
if ($97) {
|
|
$102 = 1.0;
|
|
} else {
|
|
$98 = ((($color)) + 3|0);
|
|
$99 = HEAP8[$98>>0]|0;
|
|
$100 = (+($99&255));
|
|
$101 = $100 / 255.0;
|
|
$102 = $101;
|
|
}
|
|
} else {
|
|
$102 = 0.0;
|
|
}
|
|
$alpha = $102;
|
|
$103 = $3;
|
|
$104 = ((($103)) + 4|0);
|
|
$105 = +HEAPF32[$104>>2];
|
|
$106 = $alpha;
|
|
$107 = 1.0 - $106;
|
|
$108 = $1;
|
|
$109 = ((($108)) + 12|0);
|
|
$110 = +HEAPF32[$109>>2];
|
|
$111 = $107 * $110;
|
|
$112 = $105 + $111;
|
|
$113 = $112 + 0.5;
|
|
$114 = (~~(($113)));
|
|
$115 = (+($114|0));
|
|
$line_y = $115;
|
|
$116 = $0;
|
|
$117 = $3;
|
|
;HEAP32[$$byval_copy6>>2]=HEAP32[$117>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$117+4>>2]|0;HEAP32[$$byval_copy6+8>>2]=HEAP32[$117+8>>2]|0;HEAP32[$$byval_copy6+12>>2]=HEAP32[$117+12>>2]|0;
|
|
;HEAP8[$nk_draw_color_picker$white$byval_copy>>0]=HEAP8[31862>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy+1>>0]=HEAP8[31862+1>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy+2>>0]=HEAP8[31862+2>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy+3>>0]=HEAP8[31862+3>>0]|0;
|
|
;HEAP8[$nk_draw_color_picker$white$byval_copy7>>0]=HEAP8[31862>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy7+1>>0]=HEAP8[31862+1>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy7+2>>0]=HEAP8[31862+2>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy7+3>>0]=HEAP8[31862+3>>0]|0;
|
|
;HEAP8[$nk_draw_color_picker$black$byval_copy>>0]=HEAP8[31858>>0]|0;HEAP8[$nk_draw_color_picker$black$byval_copy+1>>0]=HEAP8[31858+1>>0]|0;HEAP8[$nk_draw_color_picker$black$byval_copy+2>>0]=HEAP8[31858+2>>0]|0;HEAP8[$nk_draw_color_picker$black$byval_copy+3>>0]=HEAP8[31858+3>>0]|0;
|
|
;HEAP8[$nk_draw_color_picker$black$byval_copy8>>0]=HEAP8[31858>>0]|0;HEAP8[$nk_draw_color_picker$black$byval_copy8+1>>0]=HEAP8[31858+1>>0]|0;HEAP8[$nk_draw_color_picker$black$byval_copy8+2>>0]=HEAP8[31858+2>>0]|0;HEAP8[$nk_draw_color_picker$black$byval_copy8+3>>0]=HEAP8[31858+3>>0]|0;
|
|
_nk_fill_rect_multi_color($116,$$byval_copy6,$nk_draw_color_picker$white$byval_copy,$nk_draw_color_picker$white$byval_copy7,$nk_draw_color_picker$black$byval_copy,$nk_draw_color_picker$black$byval_copy8);
|
|
$118 = $0;
|
|
$119 = $3;
|
|
$120 = +HEAPF32[$119>>2];
|
|
$121 = $120 - 1.0;
|
|
$122 = $line_y;
|
|
$123 = $3;
|
|
$124 = +HEAPF32[$123>>2];
|
|
$125 = $3;
|
|
$126 = ((($125)) + 8|0);
|
|
$127 = +HEAPF32[$126>>2];
|
|
$128 = $124 + $127;
|
|
$129 = $128 + 2.0;
|
|
$130 = $line_y;
|
|
_nk_rgb($6,255,255,255);
|
|
;HEAP8[$$byval_copy9>>0]=HEAP8[$6>>0]|0;HEAP8[$$byval_copy9+1>>0]=HEAP8[$6+1>>0]|0;HEAP8[$$byval_copy9+2>>0]=HEAP8[$6+2>>0]|0;HEAP8[$$byval_copy9+3>>0]=HEAP8[$6+3>>0]|0;
|
|
_nk_stroke_line($118,$121,$122,$129,$130,1.0,$$byval_copy9);
|
|
}
|
|
$131 = +HEAPF32[$hsva>>2];
|
|
_nk_hsv_f($7,$131,1.0,1.0);
|
|
;HEAP8[$temp>>0]=HEAP8[$7>>0]|0;HEAP8[$temp+1>>0]=HEAP8[$7+1>>0]|0;HEAP8[$temp+2>>0]=HEAP8[$7+2>>0]|0;HEAP8[$temp+3>>0]=HEAP8[$7+3>>0]|0;
|
|
$132 = $0;
|
|
$133 = $1;
|
|
;HEAP32[$$byval_copy10>>2]=HEAP32[$133>>2]|0;HEAP32[$$byval_copy10+4>>2]=HEAP32[$133+4>>2]|0;HEAP32[$$byval_copy10+8>>2]=HEAP32[$133+8>>2]|0;HEAP32[$$byval_copy10+12>>2]=HEAP32[$133+12>>2]|0;
|
|
;HEAP8[$nk_draw_color_picker$white$byval_copy11>>0]=HEAP8[31862>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy11+1>>0]=HEAP8[31862+1>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy11+2>>0]=HEAP8[31862+2>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy11+3>>0]=HEAP8[31862+3>>0]|0;
|
|
;HEAP8[$temp$byval_copy>>0]=HEAP8[$temp>>0]|0;HEAP8[$temp$byval_copy+1>>0]=HEAP8[$temp+1>>0]|0;HEAP8[$temp$byval_copy+2>>0]=HEAP8[$temp+2>>0]|0;HEAP8[$temp$byval_copy+3>>0]=HEAP8[$temp+3>>0]|0;
|
|
;HEAP8[$temp$byval_copy12>>0]=HEAP8[$temp>>0]|0;HEAP8[$temp$byval_copy12+1>>0]=HEAP8[$temp+1>>0]|0;HEAP8[$temp$byval_copy12+2>>0]=HEAP8[$temp+2>>0]|0;HEAP8[$temp$byval_copy12+3>>0]=HEAP8[$temp+3>>0]|0;
|
|
;HEAP8[$nk_draw_color_picker$white$byval_copy13>>0]=HEAP8[31862>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy13+1>>0]=HEAP8[31862+1>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy13+2>>0]=HEAP8[31862+2>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy13+3>>0]=HEAP8[31862+3>>0]|0;
|
|
_nk_fill_rect_multi_color($132,$$byval_copy10,$nk_draw_color_picker$white$byval_copy11,$temp$byval_copy,$temp$byval_copy12,$nk_draw_color_picker$white$byval_copy13);
|
|
$134 = $0;
|
|
$135 = $1;
|
|
;HEAP32[$$byval_copy14>>2]=HEAP32[$135>>2]|0;HEAP32[$$byval_copy14+4>>2]=HEAP32[$135+4>>2]|0;HEAP32[$$byval_copy14+8>>2]=HEAP32[$135+8>>2]|0;HEAP32[$$byval_copy14+12>>2]=HEAP32[$135+12>>2]|0;
|
|
;HEAP8[$nk_draw_color_picker$black_trans$byval_copy>>0]=HEAP8[31866>>0]|0;HEAP8[$nk_draw_color_picker$black_trans$byval_copy+1>>0]=HEAP8[31866+1>>0]|0;HEAP8[$nk_draw_color_picker$black_trans$byval_copy+2>>0]=HEAP8[31866+2>>0]|0;HEAP8[$nk_draw_color_picker$black_trans$byval_copy+3>>0]=HEAP8[31866+3>>0]|0;
|
|
;HEAP8[$nk_draw_color_picker$black_trans$byval_copy15>>0]=HEAP8[31866>>0]|0;HEAP8[$nk_draw_color_picker$black_trans$byval_copy15+1>>0]=HEAP8[31866+1>>0]|0;HEAP8[$nk_draw_color_picker$black_trans$byval_copy15+2>>0]=HEAP8[31866+2>>0]|0;HEAP8[$nk_draw_color_picker$black_trans$byval_copy15+3>>0]=HEAP8[31866+3>>0]|0;
|
|
;HEAP8[$nk_draw_color_picker$black$byval_copy16>>0]=HEAP8[31858>>0]|0;HEAP8[$nk_draw_color_picker$black$byval_copy16+1>>0]=HEAP8[31858+1>>0]|0;HEAP8[$nk_draw_color_picker$black$byval_copy16+2>>0]=HEAP8[31858+2>>0]|0;HEAP8[$nk_draw_color_picker$black$byval_copy16+3>>0]=HEAP8[31858+3>>0]|0;
|
|
;HEAP8[$nk_draw_color_picker$black$byval_copy17>>0]=HEAP8[31858>>0]|0;HEAP8[$nk_draw_color_picker$black$byval_copy17+1>>0]=HEAP8[31858+1>>0]|0;HEAP8[$nk_draw_color_picker$black$byval_copy17+2>>0]=HEAP8[31858+2>>0]|0;HEAP8[$nk_draw_color_picker$black$byval_copy17+3>>0]=HEAP8[31858+3>>0]|0;
|
|
_nk_fill_rect_multi_color($134,$$byval_copy14,$nk_draw_color_picker$black_trans$byval_copy,$nk_draw_color_picker$black_trans$byval_copy15,$nk_draw_color_picker$black$byval_copy16,$nk_draw_color_picker$black$byval_copy17);
|
|
$136 = ((($hsva)) + 4|0);
|
|
$137 = +HEAPF32[$136>>2];
|
|
$S = $137;
|
|
$138 = ((($hsva)) + 8|0);
|
|
$139 = +HEAPF32[$138>>2];
|
|
$V = $139;
|
|
$140 = $1;
|
|
$141 = +HEAPF32[$140>>2];
|
|
$142 = $S;
|
|
$143 = $1;
|
|
$144 = ((($143)) + 8|0);
|
|
$145 = +HEAPF32[$144>>2];
|
|
$146 = $142 * $145;
|
|
$147 = $141 + $146;
|
|
$148 = $147 + 0.5;
|
|
$149 = (~~(($148)));
|
|
$150 = (+($149|0));
|
|
HEAPF32[$p>>2] = $150;
|
|
$151 = $1;
|
|
$152 = ((($151)) + 4|0);
|
|
$153 = +HEAPF32[$152>>2];
|
|
$154 = $V;
|
|
$155 = 1.0 - $154;
|
|
$156 = $1;
|
|
$157 = ((($156)) + 12|0);
|
|
$158 = +HEAPF32[$157>>2];
|
|
$159 = $155 * $158;
|
|
$160 = $153 + $159;
|
|
$161 = $160 + 0.5;
|
|
$162 = (~~(($161)));
|
|
$163 = (+($162|0));
|
|
$164 = ((($p)) + 4|0);
|
|
HEAPF32[$164>>2] = $163;
|
|
$165 = $0;
|
|
$166 = +HEAPF32[$p>>2];
|
|
$167 = $166 - 7.0;
|
|
$168 = ((($p)) + 4|0);
|
|
$169 = +HEAPF32[$168>>2];
|
|
$170 = +HEAPF32[$p>>2];
|
|
$171 = $170 - 2.0;
|
|
$172 = ((($p)) + 4|0);
|
|
$173 = +HEAPF32[$172>>2];
|
|
;HEAP8[$nk_draw_color_picker$white$byval_copy18>>0]=HEAP8[31862>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy18+1>>0]=HEAP8[31862+1>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy18+2>>0]=HEAP8[31862+2>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy18+3>>0]=HEAP8[31862+3>>0]|0;
|
|
_nk_stroke_line($165,$167,$169,$171,$173,1.0,$nk_draw_color_picker$white$byval_copy18);
|
|
$174 = $0;
|
|
$175 = +HEAPF32[$p>>2];
|
|
$176 = $175 + 7.0;
|
|
$177 = ((($p)) + 4|0);
|
|
$178 = +HEAPF32[$177>>2];
|
|
$179 = +HEAPF32[$p>>2];
|
|
$180 = $179 + 2.0;
|
|
$181 = ((($p)) + 4|0);
|
|
$182 = +HEAPF32[$181>>2];
|
|
;HEAP8[$nk_draw_color_picker$white$byval_copy19>>0]=HEAP8[31862>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy19+1>>0]=HEAP8[31862+1>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy19+2>>0]=HEAP8[31862+2>>0]|0;HEAP8[$nk_draw_color_picker$white$byval_copy19+3>>0]=HEAP8[31862+3>>0]|0;
|
|
_nk_stroke_line($174,$176,$178,$180,$182,1.0,$nk_draw_color_picker$white$byval_copy19);
|
|
$183 = $0;
|
|
$184 = +HEAPF32[$p>>2];
|
|
$185 = ((($p)) + 4|0);
|
|
$186 = +HEAPF32[$185>>2];
|
|
$187 = $186 + 7.0;
|
|
$188 = +HEAPF32[$p>>2];
|
|
$189 = ((($p)) + 4|0);
|
|
$190 = +HEAPF32[$189>>2];
|
|
$191 = $190 + 2.0;
|
|
_nk_rgb($8,255,255,255);
|
|
;HEAP8[$$byval_copy20>>0]=HEAP8[$8>>0]|0;HEAP8[$$byval_copy20+1>>0]=HEAP8[$8+1>>0]|0;HEAP8[$$byval_copy20+2>>0]=HEAP8[$8+2>>0]|0;HEAP8[$$byval_copy20+3>>0]=HEAP8[$8+3>>0]|0;
|
|
_nk_stroke_line($183,$184,$187,$188,$191,1.0,$$byval_copy20);
|
|
$192 = $0;
|
|
$193 = +HEAPF32[$p>>2];
|
|
$194 = ((($p)) + 4|0);
|
|
$195 = +HEAPF32[$194>>2];
|
|
$196 = $195 - 7.0;
|
|
$197 = +HEAPF32[$p>>2];
|
|
$198 = ((($p)) + 4|0);
|
|
$199 = +HEAPF32[$198>>2];
|
|
$200 = $199 - 2.0;
|
|
_nk_rgb($9,255,255,255);
|
|
;HEAP8[$$byval_copy21>>0]=HEAP8[$9>>0]|0;HEAP8[$$byval_copy21+1>>0]=HEAP8[$9+1>>0]|0;HEAP8[$$byval_copy21+2>>0]=HEAP8[$9+2>>0]|0;HEAP8[$$byval_copy21+3>>0]=HEAP8[$9+3>>0]|0;
|
|
_nk_stroke_line($192,$193,$196,$197,$200,1.0,$$byval_copy21);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _strerror($e) {
|
|
$e = $e|0;
|
|
var $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i$03 = 0, $i$03$lcssa = 0, $i$12 = 0, $s$0$lcssa = 0, $s$01 = 0, $s$1 = 0, label = 0;
|
|
var sp = 0;
|
|
sp = STACKTOP;
|
|
$i$03 = 0;
|
|
while(1) {
|
|
$1 = (32015 + ($i$03)|0);
|
|
$2 = HEAP8[$1>>0]|0;
|
|
$3 = $2&255;
|
|
$4 = ($3|0)==($e|0);
|
|
if ($4) {
|
|
$i$03$lcssa = $i$03;
|
|
label = 2;
|
|
break;
|
|
}
|
|
$5 = (($i$03) + 1)|0;
|
|
$6 = ($5|0)==(87);
|
|
if ($6) {
|
|
$i$12 = 87;$s$01 = 32103;
|
|
label = 5;
|
|
break;
|
|
} else {
|
|
$i$03 = $5;
|
|
}
|
|
}
|
|
if ((label|0) == 2) {
|
|
$0 = ($i$03$lcssa|0)==(0);
|
|
if ($0) {
|
|
$s$0$lcssa = 32103;
|
|
} else {
|
|
$i$12 = $i$03$lcssa;$s$01 = 32103;
|
|
label = 5;
|
|
}
|
|
}
|
|
if ((label|0) == 5) {
|
|
while(1) {
|
|
label = 0;
|
|
$s$1 = $s$01;
|
|
while(1) {
|
|
$7 = HEAP8[$s$1>>0]|0;
|
|
$8 = ($7<<24>>24)==(0);
|
|
$9 = ((($s$1)) + 1|0);
|
|
if ($8) {
|
|
$$lcssa = $9;
|
|
break;
|
|
} else {
|
|
$s$1 = $9;
|
|
}
|
|
}
|
|
$10 = (($i$12) + -1)|0;
|
|
$11 = ($10|0)==(0);
|
|
if ($11) {
|
|
$s$0$lcssa = $$lcssa;
|
|
break;
|
|
} else {
|
|
$i$12 = $10;$s$01 = $$lcssa;
|
|
label = 5;
|
|
}
|
|
}
|
|
}
|
|
return ($s$0$lcssa|0);
|
|
}
|
|
function ___errno_location() {
|
|
var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$0 = HEAP32[12616>>2]|0;
|
|
$1 = ($0|0)==(0|0);
|
|
if ($1) {
|
|
$$0 = 12672;
|
|
} else {
|
|
$2 = (_pthread_self()|0);
|
|
$3 = ((($2)) + 60|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$$0 = $4;
|
|
}
|
|
return ($$0|0);
|
|
}
|
|
function ___syscall_ret($r) {
|
|
$r = $r|0;
|
|
var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$0 = ($r>>>0)>(4294963200);
|
|
if ($0) {
|
|
$1 = (0 - ($r))|0;
|
|
$2 = (___errno_location()|0);
|
|
HEAP32[$2>>2] = $1;
|
|
$$0 = -1;
|
|
} else {
|
|
$$0 = $r;
|
|
}
|
|
return ($$0|0);
|
|
}
|
|
function _frexp($x,$e) {
|
|
$x = +$x;
|
|
$e = $e|0;
|
|
var $$0 = 0.0, $$01 = 0.0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $storemerge = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
HEAPF64[tempDoublePtr>>3] = $x;$0 = HEAP32[tempDoublePtr>>2]|0;
|
|
$1 = HEAP32[tempDoublePtr+4>>2]|0;
|
|
$2 = (_bitshift64Lshr(($0|0),($1|0),52)|0);
|
|
$3 = tempRet0;
|
|
$4 = $2 & 2047;
|
|
switch ($4|0) {
|
|
case 0: {
|
|
$5 = $x != 0.0;
|
|
if ($5) {
|
|
$6 = $x * 1.8446744073709552E+19;
|
|
$7 = (+_frexp($6,$e));
|
|
$8 = HEAP32[$e>>2]|0;
|
|
$9 = (($8) + -64)|0;
|
|
$$01 = $7;$storemerge = $9;
|
|
} else {
|
|
$$01 = $x;$storemerge = 0;
|
|
}
|
|
HEAP32[$e>>2] = $storemerge;
|
|
$$0 = $$01;
|
|
break;
|
|
}
|
|
case 2047: {
|
|
$$0 = $x;
|
|
break;
|
|
}
|
|
default: {
|
|
$10 = (($4) + -1022)|0;
|
|
HEAP32[$e>>2] = $10;
|
|
$11 = $1 & -2146435073;
|
|
$12 = $11 | 1071644672;
|
|
HEAP32[tempDoublePtr>>2] = $0;HEAP32[tempDoublePtr+4>>2] = $12;$13 = +HEAPF64[tempDoublePtr>>3];
|
|
$$0 = $13;
|
|
}
|
|
}
|
|
return (+$$0);
|
|
}
|
|
function _frexpl($x,$e) {
|
|
$x = +$x;
|
|
$e = $e|0;
|
|
var $0 = 0.0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$0 = (+_frexp($x,$e));
|
|
return (+$0);
|
|
}
|
|
function _wcrtomb($s,$wc,$st) {
|
|
$s = $s|0;
|
|
$wc = $wc|0;
|
|
$st = $st|0;
|
|
var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
|
|
var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
|
|
var $44 = 0, $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$0 = ($s|0)==(0|0);
|
|
do {
|
|
if ($0) {
|
|
$$0 = 1;
|
|
} else {
|
|
$1 = ($wc>>>0)<(128);
|
|
if ($1) {
|
|
$2 = $wc&255;
|
|
HEAP8[$s>>0] = $2;
|
|
$$0 = 1;
|
|
break;
|
|
}
|
|
$3 = ($wc>>>0)<(2048);
|
|
if ($3) {
|
|
$4 = $wc >>> 6;
|
|
$5 = $4 | 192;
|
|
$6 = $5&255;
|
|
$7 = ((($s)) + 1|0);
|
|
HEAP8[$s>>0] = $6;
|
|
$8 = $wc & 63;
|
|
$9 = $8 | 128;
|
|
$10 = $9&255;
|
|
HEAP8[$7>>0] = $10;
|
|
$$0 = 2;
|
|
break;
|
|
}
|
|
$11 = ($wc>>>0)<(55296);
|
|
$12 = $wc & -8192;
|
|
$13 = ($12|0)==(57344);
|
|
$or$cond = $11 | $13;
|
|
if ($or$cond) {
|
|
$14 = $wc >>> 12;
|
|
$15 = $14 | 224;
|
|
$16 = $15&255;
|
|
$17 = ((($s)) + 1|0);
|
|
HEAP8[$s>>0] = $16;
|
|
$18 = $wc >>> 6;
|
|
$19 = $18 & 63;
|
|
$20 = $19 | 128;
|
|
$21 = $20&255;
|
|
$22 = ((($s)) + 2|0);
|
|
HEAP8[$17>>0] = $21;
|
|
$23 = $wc & 63;
|
|
$24 = $23 | 128;
|
|
$25 = $24&255;
|
|
HEAP8[$22>>0] = $25;
|
|
$$0 = 3;
|
|
break;
|
|
}
|
|
$26 = (($wc) + -65536)|0;
|
|
$27 = ($26>>>0)<(1048576);
|
|
if ($27) {
|
|
$28 = $wc >>> 18;
|
|
$29 = $28 | 240;
|
|
$30 = $29&255;
|
|
$31 = ((($s)) + 1|0);
|
|
HEAP8[$s>>0] = $30;
|
|
$32 = $wc >>> 12;
|
|
$33 = $32 & 63;
|
|
$34 = $33 | 128;
|
|
$35 = $34&255;
|
|
$36 = ((($s)) + 2|0);
|
|
HEAP8[$31>>0] = $35;
|
|
$37 = $wc >>> 6;
|
|
$38 = $37 & 63;
|
|
$39 = $38 | 128;
|
|
$40 = $39&255;
|
|
$41 = ((($s)) + 3|0);
|
|
HEAP8[$36>>0] = $40;
|
|
$42 = $wc & 63;
|
|
$43 = $42 | 128;
|
|
$44 = $43&255;
|
|
HEAP8[$41>>0] = $44;
|
|
$$0 = 4;
|
|
break;
|
|
} else {
|
|
$45 = (___errno_location()|0);
|
|
HEAP32[$45>>2] = 84;
|
|
$$0 = -1;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
return ($$0|0);
|
|
}
|
|
function _wctomb($s,$wc) {
|
|
$s = $s|0;
|
|
$wc = $wc|0;
|
|
var $$0 = 0, $0 = 0, $1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$0 = ($s|0)==(0|0);
|
|
if ($0) {
|
|
$$0 = 0;
|
|
} else {
|
|
$1 = (_wcrtomb($s,$wc,0)|0);
|
|
$$0 = $1;
|
|
}
|
|
return ($$0|0);
|
|
}
|
|
function _fflush($f) {
|
|
$f = $f|0;
|
|
var $$0 = 0, $$01 = 0, $$012 = 0, $$014 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0;
|
|
var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, $r$0$lcssa = 0, $r$03 = 0, $r$1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$0 = ($f|0)==(0|0);
|
|
do {
|
|
if ($0) {
|
|
$7 = HEAP32[12668>>2]|0;
|
|
$8 = ($7|0)==(0|0);
|
|
if ($8) {
|
|
$27 = 0;
|
|
} else {
|
|
$9 = HEAP32[12668>>2]|0;
|
|
$10 = (_fflush($9)|0);
|
|
$27 = $10;
|
|
}
|
|
___lock(((12644)|0));
|
|
$$012 = HEAP32[(12640)>>2]|0;
|
|
$11 = ($$012|0)==(0|0);
|
|
if ($11) {
|
|
$r$0$lcssa = $27;
|
|
} else {
|
|
$$014 = $$012;$r$03 = $27;
|
|
while(1) {
|
|
$12 = ((($$014)) + 76|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ($13|0)>(-1);
|
|
if ($14) {
|
|
$15 = (___lockfile($$014)|0);
|
|
$23 = $15;
|
|
} else {
|
|
$23 = 0;
|
|
}
|
|
$16 = ((($$014)) + 20|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
$18 = ((($$014)) + 28|0);
|
|
$19 = HEAP32[$18>>2]|0;
|
|
$20 = ($17>>>0)>($19>>>0);
|
|
if ($20) {
|
|
$21 = (___fflush_unlocked($$014)|0);
|
|
$22 = $21 | $r$03;
|
|
$r$1 = $22;
|
|
} else {
|
|
$r$1 = $r$03;
|
|
}
|
|
$24 = ($23|0)==(0);
|
|
if (!($24)) {
|
|
___unlockfile($$014);
|
|
}
|
|
$25 = ((($$014)) + 56|0);
|
|
$$01 = HEAP32[$25>>2]|0;
|
|
$26 = ($$01|0)==(0|0);
|
|
if ($26) {
|
|
$r$0$lcssa = $r$1;
|
|
break;
|
|
} else {
|
|
$$014 = $$01;$r$03 = $r$1;
|
|
}
|
|
}
|
|
}
|
|
___unlock(((12644)|0));
|
|
$$0 = $r$0$lcssa;
|
|
} else {
|
|
$1 = ((($f)) + 76|0);
|
|
$2 = HEAP32[$1>>2]|0;
|
|
$3 = ($2|0)>(-1);
|
|
if (!($3)) {
|
|
$4 = (___fflush_unlocked($f)|0);
|
|
$$0 = $4;
|
|
break;
|
|
}
|
|
$5 = (___lockfile($f)|0);
|
|
$phitmp = ($5|0)==(0);
|
|
$6 = (___fflush_unlocked($f)|0);
|
|
if ($phitmp) {
|
|
$$0 = $6;
|
|
} else {
|
|
___unlockfile($f);
|
|
$$0 = $6;
|
|
}
|
|
}
|
|
} while(0);
|
|
return ($$0|0);
|
|
}
|
|
function _fprintf($f,$fmt,$varargs) {
|
|
$f = $f|0;
|
|
$fmt = $fmt|0;
|
|
$varargs = $varargs|0;
|
|
var $0 = 0, $ap = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$ap = sp;
|
|
HEAP32[$ap>>2] = $varargs;
|
|
$0 = (_vfprintf($f,$fmt,$ap)|0);
|
|
STACKTOP = sp;return ($0|0);
|
|
}
|
|
function ___fwritex($s,$l,$f) {
|
|
$s = $s|0;
|
|
$l = $l|0;
|
|
$f = $f|0;
|
|
var $$0 = 0, $$01 = 0, $$02 = 0, $$pre = 0, $$pre6 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0;
|
|
var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i$0 = 0, $i$0$lcssa10 = 0;
|
|
var $i$1 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$0 = ((($f)) + 16|0);
|
|
$1 = HEAP32[$0>>2]|0;
|
|
$2 = ($1|0)==(0|0);
|
|
if ($2) {
|
|
$3 = (___towrite($f)|0);
|
|
$4 = ($3|0)==(0);
|
|
if ($4) {
|
|
$$pre = HEAP32[$0>>2]|0;
|
|
$7 = $$pre;
|
|
label = 4;
|
|
} else {
|
|
$$0 = 0;
|
|
}
|
|
} else {
|
|
$7 = $1;
|
|
label = 4;
|
|
}
|
|
L4: do {
|
|
if ((label|0) == 4) {
|
|
$5 = ((($f)) + 20|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
$8 = $7;
|
|
$9 = $6;
|
|
$10 = (($8) - ($9))|0;
|
|
$11 = ($10>>>0)<($l>>>0);
|
|
if ($11) {
|
|
$12 = ((($f)) + 36|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = (FUNCTION_TABLE_iiii[$13 & 7]($f,$s,$l)|0);
|
|
$$0 = $14;
|
|
break;
|
|
}
|
|
$15 = ((($f)) + 75|0);
|
|
$16 = HEAP8[$15>>0]|0;
|
|
$17 = ($16<<24>>24)>(-1);
|
|
L9: do {
|
|
if ($17) {
|
|
$i$0 = $l;
|
|
while(1) {
|
|
$18 = ($i$0|0)==(0);
|
|
if ($18) {
|
|
$$01 = $l;$$02 = $s;$29 = $6;$i$1 = 0;
|
|
break L9;
|
|
}
|
|
$19 = (($i$0) + -1)|0;
|
|
$20 = (($s) + ($19)|0);
|
|
$21 = HEAP8[$20>>0]|0;
|
|
$22 = ($21<<24>>24)==(10);
|
|
if ($22) {
|
|
$i$0$lcssa10 = $i$0;
|
|
break;
|
|
} else {
|
|
$i$0 = $19;
|
|
}
|
|
}
|
|
$23 = ((($f)) + 36|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = (FUNCTION_TABLE_iiii[$24 & 7]($f,$s,$i$0$lcssa10)|0);
|
|
$26 = ($25>>>0)<($i$0$lcssa10>>>0);
|
|
if ($26) {
|
|
$$0 = $i$0$lcssa10;
|
|
break L4;
|
|
}
|
|
$27 = (($s) + ($i$0$lcssa10)|0);
|
|
$28 = (($l) - ($i$0$lcssa10))|0;
|
|
$$pre6 = HEAP32[$5>>2]|0;
|
|
$$01 = $28;$$02 = $27;$29 = $$pre6;$i$1 = $i$0$lcssa10;
|
|
} else {
|
|
$$01 = $l;$$02 = $s;$29 = $6;$i$1 = 0;
|
|
}
|
|
} while(0);
|
|
_memcpy(($29|0),($$02|0),($$01|0))|0;
|
|
$30 = HEAP32[$5>>2]|0;
|
|
$31 = (($30) + ($$01)|0);
|
|
HEAP32[$5>>2] = $31;
|
|
$32 = (($i$1) + ($$01))|0;
|
|
$$0 = $32;
|
|
}
|
|
} while(0);
|
|
return ($$0|0);
|
|
}
|
|
function _printf($fmt,$varargs) {
|
|
$fmt = $fmt|0;
|
|
$varargs = $varargs|0;
|
|
var $0 = 0, $1 = 0, $ap = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$ap = sp;
|
|
HEAP32[$ap>>2] = $varargs;
|
|
$0 = HEAP32[12664>>2]|0;
|
|
$1 = (_vfprintf($0,$fmt,$ap)|0);
|
|
STACKTOP = sp;return ($1|0);
|
|
}
|
|
function _vfprintf($f,$fmt,$ap) {
|
|
$f = $f|0;
|
|
$fmt = $fmt|0;
|
|
$ap = $ap|0;
|
|
var $$ = 0, $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
|
|
var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ap2 = 0, $internal_buf = 0, $nl_arg = 0, $nl_type = 0;
|
|
var $ret$1 = 0, $ret$1$ = 0, $vacopy_currentptr = 0, dest = 0, label = 0, sp = 0, stop = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 224|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$ap2 = sp + 120|0;
|
|
$nl_type = sp + 80|0;
|
|
$nl_arg = sp;
|
|
$internal_buf = sp + 136|0;
|
|
dest=$nl_type; stop=dest+40|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0));
|
|
$vacopy_currentptr = HEAP32[$ap>>2]|0;
|
|
HEAP32[$ap2>>2] = $vacopy_currentptr;
|
|
$0 = (_printf_core(0,$fmt,$ap2,$nl_arg,$nl_type)|0);
|
|
$1 = ($0|0)<(0);
|
|
if ($1) {
|
|
$$0 = -1;
|
|
} else {
|
|
$2 = ((($f)) + 76|0);
|
|
$3 = HEAP32[$2>>2]|0;
|
|
$4 = ($3|0)>(-1);
|
|
if ($4) {
|
|
$5 = (___lockfile($f)|0);
|
|
$32 = $5;
|
|
} else {
|
|
$32 = 0;
|
|
}
|
|
$6 = HEAP32[$f>>2]|0;
|
|
$7 = $6 & 32;
|
|
$8 = ((($f)) + 74|0);
|
|
$9 = HEAP8[$8>>0]|0;
|
|
$10 = ($9<<24>>24)<(1);
|
|
if ($10) {
|
|
$11 = $6 & -33;
|
|
HEAP32[$f>>2] = $11;
|
|
}
|
|
$12 = ((($f)) + 48|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ($13|0)==(0);
|
|
if ($14) {
|
|
$16 = ((($f)) + 44|0);
|
|
$17 = HEAP32[$16>>2]|0;
|
|
HEAP32[$16>>2] = $internal_buf;
|
|
$18 = ((($f)) + 28|0);
|
|
HEAP32[$18>>2] = $internal_buf;
|
|
$19 = ((($f)) + 20|0);
|
|
HEAP32[$19>>2] = $internal_buf;
|
|
HEAP32[$12>>2] = 80;
|
|
$20 = ((($internal_buf)) + 80|0);
|
|
$21 = ((($f)) + 16|0);
|
|
HEAP32[$21>>2] = $20;
|
|
$22 = (_printf_core($f,$fmt,$ap2,$nl_arg,$nl_type)|0);
|
|
$23 = ($17|0)==(0|0);
|
|
if ($23) {
|
|
$ret$1 = $22;
|
|
} else {
|
|
$24 = ((($f)) + 36|0);
|
|
$25 = HEAP32[$24>>2]|0;
|
|
(FUNCTION_TABLE_iiii[$25 & 7]($f,0,0)|0);
|
|
$26 = HEAP32[$19>>2]|0;
|
|
$27 = ($26|0)==(0|0);
|
|
$$ = $27 ? -1 : $22;
|
|
HEAP32[$16>>2] = $17;
|
|
HEAP32[$12>>2] = 0;
|
|
HEAP32[$21>>2] = 0;
|
|
HEAP32[$18>>2] = 0;
|
|
HEAP32[$19>>2] = 0;
|
|
$ret$1 = $$;
|
|
}
|
|
} else {
|
|
$15 = (_printf_core($f,$fmt,$ap2,$nl_arg,$nl_type)|0);
|
|
$ret$1 = $15;
|
|
}
|
|
$28 = HEAP32[$f>>2]|0;
|
|
$29 = $28 & 32;
|
|
$30 = ($29|0)==(0);
|
|
$ret$1$ = $30 ? $ret$1 : -1;
|
|
$31 = $28 | $7;
|
|
HEAP32[$f>>2] = $31;
|
|
$33 = ($32|0)==(0);
|
|
if (!($33)) {
|
|
___unlockfile($f);
|
|
}
|
|
$$0 = $ret$1$;
|
|
}
|
|
STACKTOP = sp;return ($$0|0);
|
|
}
|
|
function ___lockfile($f) {
|
|
$f = $f|0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
return 0;
|
|
}
|
|
function ___unlockfile($f) {
|
|
$f = $f|0;
|
|
var label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
return;
|
|
}
|
|
function ___stdio_close($f) {
|
|
$f = $f|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $vararg_buffer = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$vararg_buffer = sp;
|
|
$0 = ((($f)) + 60|0);
|
|
$1 = HEAP32[$0>>2]|0;
|
|
HEAP32[$vararg_buffer>>2] = $1;
|
|
$2 = (___syscall6(6,($vararg_buffer|0))|0);
|
|
$3 = (___syscall_ret($2)|0);
|
|
STACKTOP = sp;return ($3|0);
|
|
}
|
|
function ___stdio_seek($f,$off,$whence) {
|
|
$f = $f|0;
|
|
$off = $off|0;
|
|
$whence = $whence|0;
|
|
var $$pre = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $ret = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0, $vararg_ptr4 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$vararg_buffer = sp;
|
|
$ret = sp + 20|0;
|
|
$0 = ((($f)) + 60|0);
|
|
$1 = HEAP32[$0>>2]|0;
|
|
HEAP32[$vararg_buffer>>2] = $1;
|
|
$vararg_ptr1 = ((($vararg_buffer)) + 4|0);
|
|
HEAP32[$vararg_ptr1>>2] = 0;
|
|
$vararg_ptr2 = ((($vararg_buffer)) + 8|0);
|
|
HEAP32[$vararg_ptr2>>2] = $off;
|
|
$vararg_ptr3 = ((($vararg_buffer)) + 12|0);
|
|
HEAP32[$vararg_ptr3>>2] = $ret;
|
|
$vararg_ptr4 = ((($vararg_buffer)) + 16|0);
|
|
HEAP32[$vararg_ptr4>>2] = $whence;
|
|
$2 = (___syscall140(140,($vararg_buffer|0))|0);
|
|
$3 = (___syscall_ret($2)|0);
|
|
$4 = ($3|0)<(0);
|
|
if ($4) {
|
|
HEAP32[$ret>>2] = -1;
|
|
$5 = -1;
|
|
} else {
|
|
$$pre = HEAP32[$ret>>2]|0;
|
|
$5 = $$pre;
|
|
}
|
|
STACKTOP = sp;return ($5|0);
|
|
}
|
|
function ___stdio_write($f,$buf,$len) {
|
|
$f = $f|0;
|
|
$buf = $buf|0;
|
|
$len = $len|0;
|
|
var $$0 = 0, $$phi$trans$insert = 0, $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
|
|
var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
|
|
var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cnt$0 = 0, $cnt$1 = 0, $iov$0 = 0, $iov$0$lcssa11 = 0, $iov$1 = 0, $iovcnt$0 = 0;
|
|
var $iovcnt$0$lcssa12 = 0, $iovcnt$1 = 0, $iovs = 0, $rem$0 = 0, $vararg_buffer = 0, $vararg_buffer3 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr6 = 0, $vararg_ptr7 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$vararg_buffer3 = sp + 16|0;
|
|
$vararg_buffer = sp;
|
|
$iovs = sp + 32|0;
|
|
$0 = ((($f)) + 28|0);
|
|
$1 = HEAP32[$0>>2]|0;
|
|
HEAP32[$iovs>>2] = $1;
|
|
$2 = ((($iovs)) + 4|0);
|
|
$3 = ((($f)) + 20|0);
|
|
$4 = HEAP32[$3>>2]|0;
|
|
$5 = $4;
|
|
$6 = (($5) - ($1))|0;
|
|
HEAP32[$2>>2] = $6;
|
|
$7 = ((($iovs)) + 8|0);
|
|
HEAP32[$7>>2] = $buf;
|
|
$8 = ((($iovs)) + 12|0);
|
|
HEAP32[$8>>2] = $len;
|
|
$9 = (($6) + ($len))|0;
|
|
$10 = ((($f)) + 60|0);
|
|
$11 = ((($f)) + 44|0);
|
|
$iov$0 = $iovs;$iovcnt$0 = 2;$rem$0 = $9;
|
|
while(1) {
|
|
$12 = HEAP32[12616>>2]|0;
|
|
$13 = ($12|0)==(0|0);
|
|
if ($13) {
|
|
$17 = HEAP32[$10>>2]|0;
|
|
HEAP32[$vararg_buffer3>>2] = $17;
|
|
$vararg_ptr6 = ((($vararg_buffer3)) + 4|0);
|
|
HEAP32[$vararg_ptr6>>2] = $iov$0;
|
|
$vararg_ptr7 = ((($vararg_buffer3)) + 8|0);
|
|
HEAP32[$vararg_ptr7>>2] = $iovcnt$0;
|
|
$18 = (___syscall146(146,($vararg_buffer3|0))|0);
|
|
$19 = (___syscall_ret($18)|0);
|
|
$cnt$0 = $19;
|
|
} else {
|
|
_pthread_cleanup_push((20|0),($f|0));
|
|
$14 = HEAP32[$10>>2]|0;
|
|
HEAP32[$vararg_buffer>>2] = $14;
|
|
$vararg_ptr1 = ((($vararg_buffer)) + 4|0);
|
|
HEAP32[$vararg_ptr1>>2] = $iov$0;
|
|
$vararg_ptr2 = ((($vararg_buffer)) + 8|0);
|
|
HEAP32[$vararg_ptr2>>2] = $iovcnt$0;
|
|
$15 = (___syscall146(146,($vararg_buffer|0))|0);
|
|
$16 = (___syscall_ret($15)|0);
|
|
_pthread_cleanup_pop(0);
|
|
$cnt$0 = $16;
|
|
}
|
|
$20 = ($rem$0|0)==($cnt$0|0);
|
|
if ($20) {
|
|
label = 6;
|
|
break;
|
|
}
|
|
$27 = ($cnt$0|0)<(0);
|
|
if ($27) {
|
|
$iov$0$lcssa11 = $iov$0;$iovcnt$0$lcssa12 = $iovcnt$0;
|
|
label = 8;
|
|
break;
|
|
}
|
|
$35 = (($rem$0) - ($cnt$0))|0;
|
|
$36 = ((($iov$0)) + 4|0);
|
|
$37 = HEAP32[$36>>2]|0;
|
|
$38 = ($cnt$0>>>0)>($37>>>0);
|
|
if ($38) {
|
|
$39 = HEAP32[$11>>2]|0;
|
|
HEAP32[$0>>2] = $39;
|
|
HEAP32[$3>>2] = $39;
|
|
$40 = (($cnt$0) - ($37))|0;
|
|
$41 = ((($iov$0)) + 8|0);
|
|
$42 = (($iovcnt$0) + -1)|0;
|
|
$$phi$trans$insert = ((($iov$0)) + 12|0);
|
|
$$pre = HEAP32[$$phi$trans$insert>>2]|0;
|
|
$50 = $$pre;$cnt$1 = $40;$iov$1 = $41;$iovcnt$1 = $42;
|
|
} else {
|
|
$43 = ($iovcnt$0|0)==(2);
|
|
if ($43) {
|
|
$44 = HEAP32[$0>>2]|0;
|
|
$45 = (($44) + ($cnt$0)|0);
|
|
HEAP32[$0>>2] = $45;
|
|
$50 = $37;$cnt$1 = $cnt$0;$iov$1 = $iov$0;$iovcnt$1 = 2;
|
|
} else {
|
|
$50 = $37;$cnt$1 = $cnt$0;$iov$1 = $iov$0;$iovcnt$1 = $iovcnt$0;
|
|
}
|
|
}
|
|
$46 = HEAP32[$iov$1>>2]|0;
|
|
$47 = (($46) + ($cnt$1)|0);
|
|
HEAP32[$iov$1>>2] = $47;
|
|
$48 = ((($iov$1)) + 4|0);
|
|
$49 = (($50) - ($cnt$1))|0;
|
|
HEAP32[$48>>2] = $49;
|
|
$iov$0 = $iov$1;$iovcnt$0 = $iovcnt$1;$rem$0 = $35;
|
|
}
|
|
if ((label|0) == 6) {
|
|
$21 = HEAP32[$11>>2]|0;
|
|
$22 = ((($f)) + 48|0);
|
|
$23 = HEAP32[$22>>2]|0;
|
|
$24 = (($21) + ($23)|0);
|
|
$25 = ((($f)) + 16|0);
|
|
HEAP32[$25>>2] = $24;
|
|
$26 = $21;
|
|
HEAP32[$0>>2] = $26;
|
|
HEAP32[$3>>2] = $26;
|
|
$$0 = $len;
|
|
}
|
|
else if ((label|0) == 8) {
|
|
$28 = ((($f)) + 16|0);
|
|
HEAP32[$28>>2] = 0;
|
|
HEAP32[$0>>2] = 0;
|
|
HEAP32[$3>>2] = 0;
|
|
$29 = HEAP32[$f>>2]|0;
|
|
$30 = $29 | 32;
|
|
HEAP32[$f>>2] = $30;
|
|
$31 = ($iovcnt$0$lcssa12|0)==(2);
|
|
if ($31) {
|
|
$$0 = 0;
|
|
} else {
|
|
$32 = ((($iov$0$lcssa11)) + 4|0);
|
|
$33 = HEAP32[$32>>2]|0;
|
|
$34 = (($len) - ($33))|0;
|
|
$$0 = $34;
|
|
}
|
|
}
|
|
STACKTOP = sp;return ($$0|0);
|
|
}
|
|
function ___stdout_write($f,$buf,$len) {
|
|
$f = $f|0;
|
|
$buf = $buf|0;
|
|
$len = $len|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $tio = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$vararg_buffer = sp;
|
|
$tio = sp + 12|0;
|
|
$0 = ((($f)) + 36|0);
|
|
HEAP32[$0>>2] = 4;
|
|
$1 = HEAP32[$f>>2]|0;
|
|
$2 = $1 & 64;
|
|
$3 = ($2|0)==(0);
|
|
if ($3) {
|
|
$4 = ((($f)) + 60|0);
|
|
$5 = HEAP32[$4>>2]|0;
|
|
HEAP32[$vararg_buffer>>2] = $5;
|
|
$vararg_ptr1 = ((($vararg_buffer)) + 4|0);
|
|
HEAP32[$vararg_ptr1>>2] = 21505;
|
|
$vararg_ptr2 = ((($vararg_buffer)) + 8|0);
|
|
HEAP32[$vararg_ptr2>>2] = $tio;
|
|
$6 = (___syscall54(54,($vararg_buffer|0))|0);
|
|
$7 = ($6|0)==(0);
|
|
if (!($7)) {
|
|
$8 = ((($f)) + 75|0);
|
|
HEAP8[$8>>0] = -1;
|
|
}
|
|
}
|
|
$9 = (___stdio_write($f,$buf,$len)|0);
|
|
STACKTOP = sp;return ($9|0);
|
|
}
|
|
function ___towrite($f) {
|
|
$f = $f|0;
|
|
var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$0 = ((($f)) + 74|0);
|
|
$1 = HEAP8[$0>>0]|0;
|
|
$2 = $1 << 24 >> 24;
|
|
$3 = (($2) + 255)|0;
|
|
$4 = $3 | $2;
|
|
$5 = $4&255;
|
|
HEAP8[$0>>0] = $5;
|
|
$6 = HEAP32[$f>>2]|0;
|
|
$7 = $6 & 8;
|
|
$8 = ($7|0)==(0);
|
|
if ($8) {
|
|
$10 = ((($f)) + 8|0);
|
|
HEAP32[$10>>2] = 0;
|
|
$11 = ((($f)) + 4|0);
|
|
HEAP32[$11>>2] = 0;
|
|
$12 = ((($f)) + 44|0);
|
|
$13 = HEAP32[$12>>2]|0;
|
|
$14 = ((($f)) + 28|0);
|
|
HEAP32[$14>>2] = $13;
|
|
$15 = ((($f)) + 20|0);
|
|
HEAP32[$15>>2] = $13;
|
|
$16 = $13;
|
|
$17 = ((($f)) + 48|0);
|
|
$18 = HEAP32[$17>>2]|0;
|
|
$19 = (($16) + ($18)|0);
|
|
$20 = ((($f)) + 16|0);
|
|
HEAP32[$20>>2] = $19;
|
|
$$0 = 0;
|
|
} else {
|
|
$9 = $6 | 32;
|
|
HEAP32[$f>>2] = $9;
|
|
$$0 = -1;
|
|
}
|
|
return ($$0|0);
|
|
}
|
|
function _memchr($src,$c,$n) {
|
|
$src = $src|0;
|
|
$c = $c|0;
|
|
$n = $n|0;
|
|
var $$0$lcssa = 0, $$0$lcssa44 = 0, $$019 = 0, $$1$lcssa = 0, $$110 = 0, $$110$lcssa = 0, $$24 = 0, $$3 = 0, $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0;
|
|
var $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0;
|
|
var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond18 = 0, $s$0$lcssa = 0, $s$0$lcssa43 = 0, $s$020 = 0, $s$15 = 0, $s$2 = 0, $w$0$lcssa = 0, $w$011 = 0, $w$011$lcssa = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$0 = $c & 255;
|
|
$1 = $src;
|
|
$2 = $1 & 3;
|
|
$3 = ($2|0)!=(0);
|
|
$4 = ($n|0)!=(0);
|
|
$or$cond18 = $4 & $3;
|
|
L1: do {
|
|
if ($or$cond18) {
|
|
$5 = $c&255;
|
|
$$019 = $n;$s$020 = $src;
|
|
while(1) {
|
|
$6 = HEAP8[$s$020>>0]|0;
|
|
$7 = ($6<<24>>24)==($5<<24>>24);
|
|
if ($7) {
|
|
$$0$lcssa44 = $$019;$s$0$lcssa43 = $s$020;
|
|
label = 6;
|
|
break L1;
|
|
}
|
|
$8 = ((($s$020)) + 1|0);
|
|
$9 = (($$019) + -1)|0;
|
|
$10 = $8;
|
|
$11 = $10 & 3;
|
|
$12 = ($11|0)!=(0);
|
|
$13 = ($9|0)!=(0);
|
|
$or$cond = $13 & $12;
|
|
if ($or$cond) {
|
|
$$019 = $9;$s$020 = $8;
|
|
} else {
|
|
$$0$lcssa = $9;$$lcssa = $13;$s$0$lcssa = $8;
|
|
label = 5;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
$$0$lcssa = $n;$$lcssa = $4;$s$0$lcssa = $src;
|
|
label = 5;
|
|
}
|
|
} while(0);
|
|
if ((label|0) == 5) {
|
|
if ($$lcssa) {
|
|
$$0$lcssa44 = $$0$lcssa;$s$0$lcssa43 = $s$0$lcssa;
|
|
label = 6;
|
|
} else {
|
|
$$3 = 0;$s$2 = $s$0$lcssa;
|
|
}
|
|
}
|
|
L8: do {
|
|
if ((label|0) == 6) {
|
|
$14 = HEAP8[$s$0$lcssa43>>0]|0;
|
|
$15 = $c&255;
|
|
$16 = ($14<<24>>24)==($15<<24>>24);
|
|
if ($16) {
|
|
$$3 = $$0$lcssa44;$s$2 = $s$0$lcssa43;
|
|
} else {
|
|
$17 = Math_imul($0, 16843009)|0;
|
|
$18 = ($$0$lcssa44>>>0)>(3);
|
|
L11: do {
|
|
if ($18) {
|
|
$$110 = $$0$lcssa44;$w$011 = $s$0$lcssa43;
|
|
while(1) {
|
|
$19 = HEAP32[$w$011>>2]|0;
|
|
$20 = $19 ^ $17;
|
|
$21 = (($20) + -16843009)|0;
|
|
$22 = $20 & -2139062144;
|
|
$23 = $22 ^ -2139062144;
|
|
$24 = $23 & $21;
|
|
$25 = ($24|0)==(0);
|
|
if (!($25)) {
|
|
$$110$lcssa = $$110;$w$011$lcssa = $w$011;
|
|
break;
|
|
}
|
|
$26 = ((($w$011)) + 4|0);
|
|
$27 = (($$110) + -4)|0;
|
|
$28 = ($27>>>0)>(3);
|
|
if ($28) {
|
|
$$110 = $27;$w$011 = $26;
|
|
} else {
|
|
$$1$lcssa = $27;$w$0$lcssa = $26;
|
|
label = 11;
|
|
break L11;
|
|
}
|
|
}
|
|
$$24 = $$110$lcssa;$s$15 = $w$011$lcssa;
|
|
} else {
|
|
$$1$lcssa = $$0$lcssa44;$w$0$lcssa = $s$0$lcssa43;
|
|
label = 11;
|
|
}
|
|
} while(0);
|
|
if ((label|0) == 11) {
|
|
$29 = ($$1$lcssa|0)==(0);
|
|
if ($29) {
|
|
$$3 = 0;$s$2 = $w$0$lcssa;
|
|
break;
|
|
} else {
|
|
$$24 = $$1$lcssa;$s$15 = $w$0$lcssa;
|
|
}
|
|
}
|
|
while(1) {
|
|
$30 = HEAP8[$s$15>>0]|0;
|
|
$31 = ($30<<24>>24)==($15<<24>>24);
|
|
if ($31) {
|
|
$$3 = $$24;$s$2 = $s$15;
|
|
break L8;
|
|
}
|
|
$32 = ((($s$15)) + 1|0);
|
|
$33 = (($$24) + -1)|0;
|
|
$34 = ($33|0)==(0);
|
|
if ($34) {
|
|
$$3 = 0;$s$2 = $32;
|
|
break;
|
|
} else {
|
|
$$24 = $33;$s$15 = $32;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$35 = ($$3|0)!=(0);
|
|
$36 = $35 ? $s$2 : 0;
|
|
return ($36|0);
|
|
}
|
|
function ___fflush_unlocked($f) {
|
|
$f = $f|0;
|
|
var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
|
|
var $9 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$0 = ((($f)) + 20|0);
|
|
$1 = HEAP32[$0>>2]|0;
|
|
$2 = ((($f)) + 28|0);
|
|
$3 = HEAP32[$2>>2]|0;
|
|
$4 = ($1>>>0)>($3>>>0);
|
|
if ($4) {
|
|
$5 = ((($f)) + 36|0);
|
|
$6 = HEAP32[$5>>2]|0;
|
|
(FUNCTION_TABLE_iiii[$6 & 7]($f,0,0)|0);
|
|
$7 = HEAP32[$0>>2]|0;
|
|
$8 = ($7|0)==(0|0);
|
|
if ($8) {
|
|
$$0 = -1;
|
|
} else {
|
|
label = 3;
|
|
}
|
|
} else {
|
|
label = 3;
|
|
}
|
|
if ((label|0) == 3) {
|
|
$9 = ((($f)) + 4|0);
|
|
$10 = HEAP32[$9>>2]|0;
|
|
$11 = ((($f)) + 8|0);
|
|
$12 = HEAP32[$11>>2]|0;
|
|
$13 = ($10>>>0)<($12>>>0);
|
|
if ($13) {
|
|
$14 = ((($f)) + 40|0);
|
|
$15 = HEAP32[$14>>2]|0;
|
|
$16 = $10;
|
|
$17 = $12;
|
|
$18 = (($16) - ($17))|0;
|
|
(FUNCTION_TABLE_iiii[$15 & 7]($f,$18,1)|0);
|
|
}
|
|
$19 = ((($f)) + 16|0);
|
|
HEAP32[$19>>2] = 0;
|
|
HEAP32[$2>>2] = 0;
|
|
HEAP32[$0>>2] = 0;
|
|
HEAP32[$11>>2] = 0;
|
|
HEAP32[$9>>2] = 0;
|
|
$$0 = 0;
|
|
}
|
|
return ($$0|0);
|
|
}
|
|
function _printf_core($f,$fmt,$ap,$nl_arg,$nl_type) {
|
|
$f = $f|0;
|
|
$fmt = $fmt|0;
|
|
$ap = $ap|0;
|
|
$nl_arg = $nl_arg|0;
|
|
$nl_type = $nl_type|0;
|
|
var $$ = 0, $$$i = 0, $$0 = 0, $$0$i = 0, $$0$lcssa$i = 0, $$012$i = 0, $$013$i = 0, $$03$i33 = 0, $$07$i = 0.0, $$1$i = 0.0, $$114$i = 0, $$2$i = 0.0, $$20$i = 0.0, $$21$i = 0, $$210$$22$i = 0, $$210$$24$i = 0, $$210$i = 0, $$23$i = 0, $$3$i = 0.0, $$31$i = 0;
|
|
var $$311$i = 0, $$4$i = 0.0, $$412$lcssa$i = 0, $$41276$i = 0, $$5$lcssa$i = 0, $$51 = 0, $$587$i = 0, $$a$3$i = 0, $$a$3185$i = 0, $$a$3186$i = 0, $$fl$4 = 0, $$l10n$0 = 0, $$lcssa = 0, $$lcssa159$i = 0, $$lcssa318 = 0, $$lcssa323 = 0, $$lcssa324 = 0, $$lcssa325 = 0, $$lcssa326 = 0, $$lcssa327 = 0;
|
|
var $$lcssa329 = 0, $$lcssa339 = 0, $$lcssa342 = 0.0, $$lcssa344 = 0, $$neg52$i = 0, $$neg53$i = 0, $$p$$i = 0, $$p$0 = 0, $$p$5 = 0, $$p$i = 0, $$pn$i = 0, $$pr$i = 0, $$pr47$i = 0, $$pre = 0, $$pre$i = 0, $$pre$phi184$iZ2D = 0, $$pre179$i = 0, $$pre182$i = 0, $$pre183$i = 0, $$pre193 = 0;
|
|
var $$sum$i = 0, $$sum15$i = 0, $$sum16$i = 0, $$z$3$i = 0, $$z$4$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0;
|
|
var $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0;
|
|
var $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0;
|
|
var $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0;
|
|
var $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0;
|
|
var $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0;
|
|
var $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0;
|
|
var $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0;
|
|
var $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0;
|
|
var $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0;
|
|
var $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0;
|
|
var $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0;
|
|
var $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0;
|
|
var $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0;
|
|
var $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0.0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0.0;
|
|
var $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0;
|
|
var $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0.0, $392 = 0.0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0;
|
|
var $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0.0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0.0, $412 = 0.0, $413 = 0.0, $414 = 0.0, $415 = 0.0, $416 = 0.0, $417 = 0;
|
|
var $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0;
|
|
var $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0.0, $443 = 0.0, $444 = 0.0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0;
|
|
var $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0;
|
|
var $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0.0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0.0, $486 = 0.0, $487 = 0.0, $488 = 0, $489 = 0, $49 = 0;
|
|
var $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0;
|
|
var $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0;
|
|
var $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0;
|
|
var $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0;
|
|
var $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0;
|
|
var $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0.0, $597 = 0.0, $598 = 0;
|
|
var $599 = 0.0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0;
|
|
var $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0;
|
|
var $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0;
|
|
var $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0;
|
|
var $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0;
|
|
var $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0;
|
|
var $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0;
|
|
var $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0;
|
|
var $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0;
|
|
var $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0;
|
|
var $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0;
|
|
var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0;
|
|
var $98 = 0, $99 = 0, $a$0 = 0, $a$1 = 0, $a$1$lcssa$i = 0, $a$1147$i = 0, $a$2 = 0, $a$2$ph$i = 0, $a$3$lcssa$i = 0, $a$3134$i = 0, $a$5$lcssa$i = 0, $a$5109$i = 0, $a$6$i = 0, $a$7$i = 0, $a$8$ph$i = 0, $arg = 0, $arglist_current = 0, $arglist_current2 = 0, $arglist_next = 0, $arglist_next3 = 0;
|
|
var $argpos$0 = 0, $big$i = 0, $buf = 0, $buf$i = 0, $carry$0140$i = 0, $carry3$0128$i = 0, $cnt$0 = 0, $cnt$1 = 0, $cnt$1$lcssa = 0, $d$0$i = 0, $d$0139$i = 0, $d$0141$i = 0, $d$1127$i = 0, $d$2$lcssa$i = 0, $d$2108$i = 0, $d$3$i = 0, $d$482$i = 0, $d$575$i = 0, $d$686$i = 0, $e$0123$i = 0;
|
|
var $e$1$i = 0, $e$2104$i = 0, $e$3$i = 0, $e$4$ph$i = 0, $e2$i = 0, $ebuf0$i = 0, $estr$0$i = 0, $estr$1$lcssa$i = 0, $estr$193$i = 0, $estr$2$i = 0, $exitcond$i = 0, $expanded = 0, $expanded10 = 0, $expanded11 = 0, $expanded13 = 0, $expanded14 = 0, $expanded15 = 0, $expanded4 = 0, $expanded6 = 0, $expanded7 = 0;
|
|
var $expanded8 = 0, $fl$0109 = 0, $fl$062 = 0, $fl$1 = 0, $fl$1$ = 0, $fl$3 = 0, $fl$4 = 0, $fl$6 = 0, $fmt39$lcssa = 0, $fmt39101 = 0, $fmt40 = 0, $fmt41 = 0, $fmt42 = 0, $fmt44 = 0, $fmt44$lcssa321 = 0, $fmt45 = 0, $i$0$lcssa = 0, $i$0$lcssa200 = 0, $i$0114 = 0, $i$0122$i = 0;
|
|
var $i$03$i = 0, $i$03$i25 = 0, $i$1$lcssa$i = 0, $i$1116$i = 0, $i$1125 = 0, $i$2100 = 0, $i$2100$lcssa = 0, $i$2103$i = 0, $i$398 = 0, $i$399$i = 0, $isdigit = 0, $isdigit$i = 0, $isdigit$i27 = 0, $isdigit10 = 0, $isdigit12 = 0, $isdigit2$i = 0, $isdigit2$i23 = 0, $isdigittmp = 0, $isdigittmp$ = 0, $isdigittmp$i = 0;
|
|
var $isdigittmp$i26 = 0, $isdigittmp1$i = 0, $isdigittmp1$i22 = 0, $isdigittmp11 = 0, $isdigittmp4$i = 0, $isdigittmp4$i24 = 0, $isdigittmp9 = 0, $j$0$i = 0, $j$0115$i = 0, $j$0117$i = 0, $j$1100$i = 0, $j$2$i = 0, $l$0 = 0, $l$0$i = 0, $l$1$i = 0, $l$1113 = 0, $l$2 = 0, $l10n$0 = 0, $l10n$0$lcssa = 0, $l10n$0$phi = 0;
|
|
var $l10n$1 = 0, $l10n$2 = 0, $l10n$3 = 0, $mb = 0, $notlhs$i = 0, $notrhs$i = 0, $or$cond = 0, $or$cond$i = 0, $or$cond15 = 0, $or$cond17 = 0, $or$cond20 = 0, $or$cond240 = 0, $or$cond29$i = 0, $or$cond3$not$i = 0, $or$cond6$i = 0, $p$0 = 0, $p$1 = 0, $p$2 = 0, $p$2$ = 0, $p$3 = 0;
|
|
var $p$4198 = 0, $p$5 = 0, $pl$0 = 0, $pl$0$i = 0, $pl$1 = 0, $pl$1$i = 0, $pl$2 = 0, $prefix$0 = 0, $prefix$0$$i = 0, $prefix$0$i = 0, $prefix$1 = 0, $prefix$2 = 0, $r$0$a$8$i = 0, $re$169$i = 0, $round$068$i = 0.0, $round6$1$i = 0.0, $s$0$i = 0, $s$1$i = 0, $s$1$i$lcssa = 0, $s1$0$i = 0;
|
|
var $s7$079$i = 0, $s7$1$i = 0, $s8$0$lcssa$i = 0, $s8$070$i = 0, $s9$0$i = 0, $s9$183$i = 0, $s9$2$i = 0, $small$0$i = 0.0, $small$1$i = 0.0, $st$0 = 0, $st$0$lcssa322 = 0, $storemerge = 0, $storemerge13 = 0, $storemerge8108 = 0, $storemerge860 = 0, $sum = 0, $t$0 = 0, $t$1 = 0, $w$$i = 0, $w$0 = 0;
|
|
var $w$1 = 0, $w$2 = 0, $w$30$i = 0, $wc = 0, $ws$0115 = 0, $ws$1126 = 0, $z$0$i = 0, $z$0$lcssa = 0, $z$0102 = 0, $z$1 = 0, $z$1$lcssa$i = 0, $z$1146$i = 0, $z$2 = 0, $z$2$i = 0, $z$2$i$lcssa = 0, $z$3$lcssa$i = 0, $z$3133$i = 0, $z$4$i = 0, $z$6$$i = 0, $z$6$i = 0;
|
|
var $z$6$i$lcssa = 0, $z$6$ph$i = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 624|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$big$i = sp + 24|0;
|
|
$e2$i = sp + 16|0;
|
|
$buf$i = sp + 588|0;
|
|
$ebuf0$i = sp + 576|0;
|
|
$arg = sp;
|
|
$buf = sp + 536|0;
|
|
$wc = sp + 8|0;
|
|
$mb = sp + 528|0;
|
|
$0 = ($f|0)!=(0|0);
|
|
$1 = ((($buf)) + 40|0);
|
|
$2 = $1;
|
|
$3 = ((($buf)) + 39|0);
|
|
$4 = ((($wc)) + 4|0);
|
|
$5 = ((($ebuf0$i)) + 12|0);
|
|
$6 = ((($ebuf0$i)) + 11|0);
|
|
$7 = $buf$i;
|
|
$8 = $5;
|
|
$9 = (($8) - ($7))|0;
|
|
$10 = (-2 - ($7))|0;
|
|
$11 = (($8) + 2)|0;
|
|
$12 = ((($big$i)) + 288|0);
|
|
$13 = ((($buf$i)) + 9|0);
|
|
$14 = $13;
|
|
$15 = ((($buf$i)) + 8|0);
|
|
$cnt$0 = 0;$fmt41 = $fmt;$l$0 = 0;$l10n$0 = 0;
|
|
L1: while(1) {
|
|
$16 = ($cnt$0|0)>(-1);
|
|
do {
|
|
if ($16) {
|
|
$17 = (2147483647 - ($cnt$0))|0;
|
|
$18 = ($l$0|0)>($17|0);
|
|
if ($18) {
|
|
$19 = (___errno_location()|0);
|
|
HEAP32[$19>>2] = 75;
|
|
$cnt$1 = -1;
|
|
break;
|
|
} else {
|
|
$20 = (($l$0) + ($cnt$0))|0;
|
|
$cnt$1 = $20;
|
|
break;
|
|
}
|
|
} else {
|
|
$cnt$1 = $cnt$0;
|
|
}
|
|
} while(0);
|
|
$21 = HEAP8[$fmt41>>0]|0;
|
|
$22 = ($21<<24>>24)==(0);
|
|
if ($22) {
|
|
$cnt$1$lcssa = $cnt$1;$l10n$0$lcssa = $l10n$0;
|
|
label = 245;
|
|
break;
|
|
} else {
|
|
$23 = $21;$fmt40 = $fmt41;
|
|
}
|
|
L9: while(1) {
|
|
switch ($23<<24>>24) {
|
|
case 37: {
|
|
$fmt39101 = $fmt40;$z$0102 = $fmt40;
|
|
label = 9;
|
|
break L9;
|
|
break;
|
|
}
|
|
case 0: {
|
|
$fmt39$lcssa = $fmt40;$z$0$lcssa = $fmt40;
|
|
break L9;
|
|
break;
|
|
}
|
|
default: {
|
|
}
|
|
}
|
|
$24 = ((($fmt40)) + 1|0);
|
|
$$pre = HEAP8[$24>>0]|0;
|
|
$23 = $$pre;$fmt40 = $24;
|
|
}
|
|
L12: do {
|
|
if ((label|0) == 9) {
|
|
while(1) {
|
|
label = 0;
|
|
$25 = ((($fmt39101)) + 1|0);
|
|
$26 = HEAP8[$25>>0]|0;
|
|
$27 = ($26<<24>>24)==(37);
|
|
if (!($27)) {
|
|
$fmt39$lcssa = $fmt39101;$z$0$lcssa = $z$0102;
|
|
break L12;
|
|
}
|
|
$28 = ((($z$0102)) + 1|0);
|
|
$29 = ((($fmt39101)) + 2|0);
|
|
$30 = HEAP8[$29>>0]|0;
|
|
$31 = ($30<<24>>24)==(37);
|
|
if ($31) {
|
|
$fmt39101 = $29;$z$0102 = $28;
|
|
label = 9;
|
|
} else {
|
|
$fmt39$lcssa = $29;$z$0$lcssa = $28;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$32 = $z$0$lcssa;
|
|
$33 = $fmt41;
|
|
$34 = (($32) - ($33))|0;
|
|
if ($0) {
|
|
$35 = HEAP32[$f>>2]|0;
|
|
$36 = $35 & 32;
|
|
$37 = ($36|0)==(0);
|
|
if ($37) {
|
|
(___fwritex($fmt41,$34,$f)|0);
|
|
}
|
|
}
|
|
$38 = ($z$0$lcssa|0)==($fmt41|0);
|
|
if (!($38)) {
|
|
$l10n$0$phi = $l10n$0;$cnt$0 = $cnt$1;$fmt41 = $fmt39$lcssa;$l$0 = $34;$l10n$0 = $l10n$0$phi;
|
|
continue;
|
|
}
|
|
$39 = ((($fmt39$lcssa)) + 1|0);
|
|
$40 = HEAP8[$39>>0]|0;
|
|
$41 = $40 << 24 >> 24;
|
|
$isdigittmp = (($41) + -48)|0;
|
|
$isdigit = ($isdigittmp>>>0)<(10);
|
|
if ($isdigit) {
|
|
$42 = ((($fmt39$lcssa)) + 2|0);
|
|
$43 = HEAP8[$42>>0]|0;
|
|
$44 = ($43<<24>>24)==(36);
|
|
$45 = ((($fmt39$lcssa)) + 3|0);
|
|
$$51 = $44 ? $45 : $39;
|
|
$$l10n$0 = $44 ? 1 : $l10n$0;
|
|
$isdigittmp$ = $44 ? $isdigittmp : -1;
|
|
$$pre193 = HEAP8[$$51>>0]|0;
|
|
$47 = $$pre193;$argpos$0 = $isdigittmp$;$l10n$1 = $$l10n$0;$storemerge = $$51;
|
|
} else {
|
|
$47 = $40;$argpos$0 = -1;$l10n$1 = $l10n$0;$storemerge = $39;
|
|
}
|
|
$46 = $47 << 24 >> 24;
|
|
$48 = $46 & -32;
|
|
$49 = ($48|0)==(32);
|
|
L25: do {
|
|
if ($49) {
|
|
$51 = $46;$56 = $47;$fl$0109 = 0;$storemerge8108 = $storemerge;
|
|
while(1) {
|
|
$50 = (($51) + -32)|0;
|
|
$52 = 1 << $50;
|
|
$53 = $52 & 75913;
|
|
$54 = ($53|0)==(0);
|
|
if ($54) {
|
|
$65 = $56;$fl$062 = $fl$0109;$storemerge860 = $storemerge8108;
|
|
break L25;
|
|
}
|
|
$55 = $56 << 24 >> 24;
|
|
$57 = (($55) + -32)|0;
|
|
$58 = 1 << $57;
|
|
$59 = $58 | $fl$0109;
|
|
$60 = ((($storemerge8108)) + 1|0);
|
|
$61 = HEAP8[$60>>0]|0;
|
|
$62 = $61 << 24 >> 24;
|
|
$63 = $62 & -32;
|
|
$64 = ($63|0)==(32);
|
|
if ($64) {
|
|
$51 = $62;$56 = $61;$fl$0109 = $59;$storemerge8108 = $60;
|
|
} else {
|
|
$65 = $61;$fl$062 = $59;$storemerge860 = $60;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
$65 = $47;$fl$062 = 0;$storemerge860 = $storemerge;
|
|
}
|
|
} while(0);
|
|
$66 = ($65<<24>>24)==(42);
|
|
do {
|
|
if ($66) {
|
|
$67 = ((($storemerge860)) + 1|0);
|
|
$68 = HEAP8[$67>>0]|0;
|
|
$69 = $68 << 24 >> 24;
|
|
$isdigittmp11 = (($69) + -48)|0;
|
|
$isdigit12 = ($isdigittmp11>>>0)<(10);
|
|
if ($isdigit12) {
|
|
$70 = ((($storemerge860)) + 2|0);
|
|
$71 = HEAP8[$70>>0]|0;
|
|
$72 = ($71<<24>>24)==(36);
|
|
if ($72) {
|
|
$73 = (($nl_type) + ($isdigittmp11<<2)|0);
|
|
HEAP32[$73>>2] = 10;
|
|
$74 = HEAP8[$67>>0]|0;
|
|
$75 = $74 << 24 >> 24;
|
|
$76 = (($75) + -48)|0;
|
|
$77 = (($nl_arg) + ($76<<3)|0);
|
|
$78 = $77;
|
|
$79 = $78;
|
|
$80 = HEAP32[$79>>2]|0;
|
|
$81 = (($78) + 4)|0;
|
|
$82 = $81;
|
|
$83 = HEAP32[$82>>2]|0;
|
|
$84 = ((($storemerge860)) + 3|0);
|
|
$l10n$2 = 1;$storemerge13 = $84;$w$0 = $80;
|
|
} else {
|
|
label = 24;
|
|
}
|
|
} else {
|
|
label = 24;
|
|
}
|
|
if ((label|0) == 24) {
|
|
label = 0;
|
|
$85 = ($l10n$1|0)==(0);
|
|
if (!($85)) {
|
|
$$0 = -1;
|
|
break L1;
|
|
}
|
|
if (!($0)) {
|
|
$fl$1 = $fl$062;$fmt42 = $67;$l10n$3 = 0;$w$1 = 0;
|
|
break;
|
|
}
|
|
$arglist_current = HEAP32[$ap>>2]|0;
|
|
$86 = $arglist_current;
|
|
$87 = ((0) + 4|0);
|
|
$expanded4 = $87;
|
|
$expanded = (($expanded4) - 1)|0;
|
|
$88 = (($86) + ($expanded))|0;
|
|
$89 = ((0) + 4|0);
|
|
$expanded8 = $89;
|
|
$expanded7 = (($expanded8) - 1)|0;
|
|
$expanded6 = $expanded7 ^ -1;
|
|
$90 = $88 & $expanded6;
|
|
$91 = $90;
|
|
$92 = HEAP32[$91>>2]|0;
|
|
$arglist_next = ((($91)) + 4|0);
|
|
HEAP32[$ap>>2] = $arglist_next;
|
|
$l10n$2 = 0;$storemerge13 = $67;$w$0 = $92;
|
|
}
|
|
$93 = ($w$0|0)<(0);
|
|
if ($93) {
|
|
$94 = $fl$062 | 8192;
|
|
$95 = (0 - ($w$0))|0;
|
|
$fl$1 = $94;$fmt42 = $storemerge13;$l10n$3 = $l10n$2;$w$1 = $95;
|
|
} else {
|
|
$fl$1 = $fl$062;$fmt42 = $storemerge13;$l10n$3 = $l10n$2;$w$1 = $w$0;
|
|
}
|
|
} else {
|
|
$96 = $65 << 24 >> 24;
|
|
$isdigittmp1$i = (($96) + -48)|0;
|
|
$isdigit2$i = ($isdigittmp1$i>>>0)<(10);
|
|
if ($isdigit2$i) {
|
|
$100 = $storemerge860;$i$03$i = 0;$isdigittmp4$i = $isdigittmp1$i;
|
|
while(1) {
|
|
$97 = ($i$03$i*10)|0;
|
|
$98 = (($97) + ($isdigittmp4$i))|0;
|
|
$99 = ((($100)) + 1|0);
|
|
$101 = HEAP8[$99>>0]|0;
|
|
$102 = $101 << 24 >> 24;
|
|
$isdigittmp$i = (($102) + -48)|0;
|
|
$isdigit$i = ($isdigittmp$i>>>0)<(10);
|
|
if ($isdigit$i) {
|
|
$100 = $99;$i$03$i = $98;$isdigittmp4$i = $isdigittmp$i;
|
|
} else {
|
|
$$lcssa = $98;$$lcssa318 = $99;
|
|
break;
|
|
}
|
|
}
|
|
$103 = ($$lcssa|0)<(0);
|
|
if ($103) {
|
|
$$0 = -1;
|
|
break L1;
|
|
} else {
|
|
$fl$1 = $fl$062;$fmt42 = $$lcssa318;$l10n$3 = $l10n$1;$w$1 = $$lcssa;
|
|
}
|
|
} else {
|
|
$fl$1 = $fl$062;$fmt42 = $storemerge860;$l10n$3 = $l10n$1;$w$1 = 0;
|
|
}
|
|
}
|
|
} while(0);
|
|
$104 = HEAP8[$fmt42>>0]|0;
|
|
$105 = ($104<<24>>24)==(46);
|
|
L46: do {
|
|
if ($105) {
|
|
$106 = ((($fmt42)) + 1|0);
|
|
$107 = HEAP8[$106>>0]|0;
|
|
$108 = ($107<<24>>24)==(42);
|
|
if (!($108)) {
|
|
$135 = $107 << 24 >> 24;
|
|
$isdigittmp1$i22 = (($135) + -48)|0;
|
|
$isdigit2$i23 = ($isdigittmp1$i22>>>0)<(10);
|
|
if ($isdigit2$i23) {
|
|
$139 = $106;$i$03$i25 = 0;$isdigittmp4$i24 = $isdigittmp1$i22;
|
|
} else {
|
|
$fmt45 = $106;$p$0 = 0;
|
|
break;
|
|
}
|
|
while(1) {
|
|
$136 = ($i$03$i25*10)|0;
|
|
$137 = (($136) + ($isdigittmp4$i24))|0;
|
|
$138 = ((($139)) + 1|0);
|
|
$140 = HEAP8[$138>>0]|0;
|
|
$141 = $140 << 24 >> 24;
|
|
$isdigittmp$i26 = (($141) + -48)|0;
|
|
$isdigit$i27 = ($isdigittmp$i26>>>0)<(10);
|
|
if ($isdigit$i27) {
|
|
$139 = $138;$i$03$i25 = $137;$isdigittmp4$i24 = $isdigittmp$i26;
|
|
} else {
|
|
$fmt45 = $138;$p$0 = $137;
|
|
break L46;
|
|
}
|
|
}
|
|
}
|
|
$109 = ((($fmt42)) + 2|0);
|
|
$110 = HEAP8[$109>>0]|0;
|
|
$111 = $110 << 24 >> 24;
|
|
$isdigittmp9 = (($111) + -48)|0;
|
|
$isdigit10 = ($isdigittmp9>>>0)<(10);
|
|
if ($isdigit10) {
|
|
$112 = ((($fmt42)) + 3|0);
|
|
$113 = HEAP8[$112>>0]|0;
|
|
$114 = ($113<<24>>24)==(36);
|
|
if ($114) {
|
|
$115 = (($nl_type) + ($isdigittmp9<<2)|0);
|
|
HEAP32[$115>>2] = 10;
|
|
$116 = HEAP8[$109>>0]|0;
|
|
$117 = $116 << 24 >> 24;
|
|
$118 = (($117) + -48)|0;
|
|
$119 = (($nl_arg) + ($118<<3)|0);
|
|
$120 = $119;
|
|
$121 = $120;
|
|
$122 = HEAP32[$121>>2]|0;
|
|
$123 = (($120) + 4)|0;
|
|
$124 = $123;
|
|
$125 = HEAP32[$124>>2]|0;
|
|
$126 = ((($fmt42)) + 4|0);
|
|
$fmt45 = $126;$p$0 = $122;
|
|
break;
|
|
}
|
|
}
|
|
$127 = ($l10n$3|0)==(0);
|
|
if (!($127)) {
|
|
$$0 = -1;
|
|
break L1;
|
|
}
|
|
if ($0) {
|
|
$arglist_current2 = HEAP32[$ap>>2]|0;
|
|
$128 = $arglist_current2;
|
|
$129 = ((0) + 4|0);
|
|
$expanded11 = $129;
|
|
$expanded10 = (($expanded11) - 1)|0;
|
|
$130 = (($128) + ($expanded10))|0;
|
|
$131 = ((0) + 4|0);
|
|
$expanded15 = $131;
|
|
$expanded14 = (($expanded15) - 1)|0;
|
|
$expanded13 = $expanded14 ^ -1;
|
|
$132 = $130 & $expanded13;
|
|
$133 = $132;
|
|
$134 = HEAP32[$133>>2]|0;
|
|
$arglist_next3 = ((($133)) + 4|0);
|
|
HEAP32[$ap>>2] = $arglist_next3;
|
|
$fmt45 = $109;$p$0 = $134;
|
|
} else {
|
|
$fmt45 = $109;$p$0 = 0;
|
|
}
|
|
} else {
|
|
$fmt45 = $fmt42;$p$0 = -1;
|
|
}
|
|
} while(0);
|
|
$fmt44 = $fmt45;$st$0 = 0;
|
|
while(1) {
|
|
$142 = HEAP8[$fmt44>>0]|0;
|
|
$143 = $142 << 24 >> 24;
|
|
$144 = (($143) + -65)|0;
|
|
$145 = ($144>>>0)>(57);
|
|
if ($145) {
|
|
$$0 = -1;
|
|
break L1;
|
|
}
|
|
$146 = ((($fmt44)) + 1|0);
|
|
$147 = ((34947 + (($st$0*58)|0)|0) + ($144)|0);
|
|
$148 = HEAP8[$147>>0]|0;
|
|
$149 = $148&255;
|
|
$150 = (($149) + -1)|0;
|
|
$151 = ($150>>>0)<(8);
|
|
if ($151) {
|
|
$fmt44 = $146;$st$0 = $149;
|
|
} else {
|
|
$$lcssa323 = $146;$$lcssa324 = $148;$$lcssa325 = $149;$fmt44$lcssa321 = $fmt44;$st$0$lcssa322 = $st$0;
|
|
break;
|
|
}
|
|
}
|
|
$152 = ($$lcssa324<<24>>24)==(0);
|
|
if ($152) {
|
|
$$0 = -1;
|
|
break;
|
|
}
|
|
$153 = ($$lcssa324<<24>>24)==(19);
|
|
$154 = ($argpos$0|0)>(-1);
|
|
do {
|
|
if ($153) {
|
|
if ($154) {
|
|
$$0 = -1;
|
|
break L1;
|
|
} else {
|
|
label = 52;
|
|
}
|
|
} else {
|
|
if ($154) {
|
|
$155 = (($nl_type) + ($argpos$0<<2)|0);
|
|
HEAP32[$155>>2] = $$lcssa325;
|
|
$156 = (($nl_arg) + ($argpos$0<<3)|0);
|
|
$157 = $156;
|
|
$158 = $157;
|
|
$159 = HEAP32[$158>>2]|0;
|
|
$160 = (($157) + 4)|0;
|
|
$161 = $160;
|
|
$162 = HEAP32[$161>>2]|0;
|
|
$163 = $arg;
|
|
$164 = $163;
|
|
HEAP32[$164>>2] = $159;
|
|
$165 = (($163) + 4)|0;
|
|
$166 = $165;
|
|
HEAP32[$166>>2] = $162;
|
|
label = 52;
|
|
break;
|
|
}
|
|
if (!($0)) {
|
|
$$0 = 0;
|
|
break L1;
|
|
}
|
|
_pop_arg($arg,$$lcssa325,$ap);
|
|
}
|
|
} while(0);
|
|
if ((label|0) == 52) {
|
|
label = 0;
|
|
if (!($0)) {
|
|
$cnt$0 = $cnt$1;$fmt41 = $$lcssa323;$l$0 = $34;$l10n$0 = $l10n$3;
|
|
continue;
|
|
}
|
|
}
|
|
$167 = HEAP8[$fmt44$lcssa321>>0]|0;
|
|
$168 = $167 << 24 >> 24;
|
|
$169 = ($st$0$lcssa322|0)!=(0);
|
|
$170 = $168 & 15;
|
|
$171 = ($170|0)==(3);
|
|
$or$cond15 = $169 & $171;
|
|
$172 = $168 & -33;
|
|
$t$0 = $or$cond15 ? $172 : $168;
|
|
$173 = $fl$1 & 8192;
|
|
$174 = ($173|0)==(0);
|
|
$175 = $fl$1 & -65537;
|
|
$fl$1$ = $174 ? $fl$1 : $175;
|
|
L75: do {
|
|
switch ($t$0|0) {
|
|
case 110: {
|
|
switch ($st$0$lcssa322|0) {
|
|
case 0: {
|
|
$182 = HEAP32[$arg>>2]|0;
|
|
HEAP32[$182>>2] = $cnt$1;
|
|
$cnt$0 = $cnt$1;$fmt41 = $$lcssa323;$l$0 = $34;$l10n$0 = $l10n$3;
|
|
continue L1;
|
|
break;
|
|
}
|
|
case 1: {
|
|
$183 = HEAP32[$arg>>2]|0;
|
|
HEAP32[$183>>2] = $cnt$1;
|
|
$cnt$0 = $cnt$1;$fmt41 = $$lcssa323;$l$0 = $34;$l10n$0 = $l10n$3;
|
|
continue L1;
|
|
break;
|
|
}
|
|
case 2: {
|
|
$184 = ($cnt$1|0)<(0);
|
|
$185 = $184 << 31 >> 31;
|
|
$186 = HEAP32[$arg>>2]|0;
|
|
$187 = $186;
|
|
$188 = $187;
|
|
HEAP32[$188>>2] = $cnt$1;
|
|
$189 = (($187) + 4)|0;
|
|
$190 = $189;
|
|
HEAP32[$190>>2] = $185;
|
|
$cnt$0 = $cnt$1;$fmt41 = $$lcssa323;$l$0 = $34;$l10n$0 = $l10n$3;
|
|
continue L1;
|
|
break;
|
|
}
|
|
case 3: {
|
|
$191 = $cnt$1&65535;
|
|
$192 = HEAP32[$arg>>2]|0;
|
|
HEAP16[$192>>1] = $191;
|
|
$cnt$0 = $cnt$1;$fmt41 = $$lcssa323;$l$0 = $34;$l10n$0 = $l10n$3;
|
|
continue L1;
|
|
break;
|
|
}
|
|
case 4: {
|
|
$193 = $cnt$1&255;
|
|
$194 = HEAP32[$arg>>2]|0;
|
|
HEAP8[$194>>0] = $193;
|
|
$cnt$0 = $cnt$1;$fmt41 = $$lcssa323;$l$0 = $34;$l10n$0 = $l10n$3;
|
|
continue L1;
|
|
break;
|
|
}
|
|
case 6: {
|
|
$195 = HEAP32[$arg>>2]|0;
|
|
HEAP32[$195>>2] = $cnt$1;
|
|
$cnt$0 = $cnt$1;$fmt41 = $$lcssa323;$l$0 = $34;$l10n$0 = $l10n$3;
|
|
continue L1;
|
|
break;
|
|
}
|
|
case 7: {
|
|
$196 = ($cnt$1|0)<(0);
|
|
$197 = $196 << 31 >> 31;
|
|
$198 = HEAP32[$arg>>2]|0;
|
|
$199 = $198;
|
|
$200 = $199;
|
|
HEAP32[$200>>2] = $cnt$1;
|
|
$201 = (($199) + 4)|0;
|
|
$202 = $201;
|
|
HEAP32[$202>>2] = $197;
|
|
$cnt$0 = $cnt$1;$fmt41 = $$lcssa323;$l$0 = $34;$l10n$0 = $l10n$3;
|
|
continue L1;
|
|
break;
|
|
}
|
|
default: {
|
|
$cnt$0 = $cnt$1;$fmt41 = $$lcssa323;$l$0 = $34;$l10n$0 = $l10n$3;
|
|
continue L1;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
case 112: {
|
|
$203 = ($p$0>>>0)>(8);
|
|
$204 = $203 ? $p$0 : 8;
|
|
$205 = $fl$1$ | 8;
|
|
$fl$3 = $205;$p$1 = $204;$t$1 = 120;
|
|
label = 64;
|
|
break;
|
|
}
|
|
case 88: case 120: {
|
|
$fl$3 = $fl$1$;$p$1 = $p$0;$t$1 = $t$0;
|
|
label = 64;
|
|
break;
|
|
}
|
|
case 111: {
|
|
$243 = $arg;
|
|
$244 = $243;
|
|
$245 = HEAP32[$244>>2]|0;
|
|
$246 = (($243) + 4)|0;
|
|
$247 = $246;
|
|
$248 = HEAP32[$247>>2]|0;
|
|
$249 = ($245|0)==(0);
|
|
$250 = ($248|0)==(0);
|
|
$251 = $249 & $250;
|
|
if ($251) {
|
|
$$0$lcssa$i = $1;
|
|
} else {
|
|
$$03$i33 = $1;$253 = $245;$257 = $248;
|
|
while(1) {
|
|
$252 = $253 & 7;
|
|
$254 = $252 | 48;
|
|
$255 = $254&255;
|
|
$256 = ((($$03$i33)) + -1|0);
|
|
HEAP8[$256>>0] = $255;
|
|
$258 = (_bitshift64Lshr(($253|0),($257|0),3)|0);
|
|
$259 = tempRet0;
|
|
$260 = ($258|0)==(0);
|
|
$261 = ($259|0)==(0);
|
|
$262 = $260 & $261;
|
|
if ($262) {
|
|
$$0$lcssa$i = $256;
|
|
break;
|
|
} else {
|
|
$$03$i33 = $256;$253 = $258;$257 = $259;
|
|
}
|
|
}
|
|
}
|
|
$263 = $fl$1$ & 8;
|
|
$264 = ($263|0)==(0);
|
|
if ($264) {
|
|
$a$0 = $$0$lcssa$i;$fl$4 = $fl$1$;$p$2 = $p$0;$pl$1 = 0;$prefix$1 = 35427;
|
|
label = 77;
|
|
} else {
|
|
$265 = $$0$lcssa$i;
|
|
$266 = (($2) - ($265))|0;
|
|
$267 = (($266) + 1)|0;
|
|
$268 = ($p$0|0)<($267|0);
|
|
$$p$0 = $268 ? $267 : $p$0;
|
|
$a$0 = $$0$lcssa$i;$fl$4 = $fl$1$;$p$2 = $$p$0;$pl$1 = 0;$prefix$1 = 35427;
|
|
label = 77;
|
|
}
|
|
break;
|
|
}
|
|
case 105: case 100: {
|
|
$269 = $arg;
|
|
$270 = $269;
|
|
$271 = HEAP32[$270>>2]|0;
|
|
$272 = (($269) + 4)|0;
|
|
$273 = $272;
|
|
$274 = HEAP32[$273>>2]|0;
|
|
$275 = ($274|0)<(0);
|
|
if ($275) {
|
|
$276 = (_i64Subtract(0,0,($271|0),($274|0))|0);
|
|
$277 = tempRet0;
|
|
$278 = $arg;
|
|
$279 = $278;
|
|
HEAP32[$279>>2] = $276;
|
|
$280 = (($278) + 4)|0;
|
|
$281 = $280;
|
|
HEAP32[$281>>2] = $277;
|
|
$286 = $276;$287 = $277;$pl$0 = 1;$prefix$0 = 35427;
|
|
label = 76;
|
|
break L75;
|
|
}
|
|
$282 = $fl$1$ & 2048;
|
|
$283 = ($282|0)==(0);
|
|
if ($283) {
|
|
$284 = $fl$1$ & 1;
|
|
$285 = ($284|0)==(0);
|
|
$$ = $285 ? 35427 : (35429);
|
|
$286 = $271;$287 = $274;$pl$0 = $284;$prefix$0 = $$;
|
|
label = 76;
|
|
} else {
|
|
$286 = $271;$287 = $274;$pl$0 = 1;$prefix$0 = (35428);
|
|
label = 76;
|
|
}
|
|
break;
|
|
}
|
|
case 117: {
|
|
$176 = $arg;
|
|
$177 = $176;
|
|
$178 = HEAP32[$177>>2]|0;
|
|
$179 = (($176) + 4)|0;
|
|
$180 = $179;
|
|
$181 = HEAP32[$180>>2]|0;
|
|
$286 = $178;$287 = $181;$pl$0 = 0;$prefix$0 = 35427;
|
|
label = 76;
|
|
break;
|
|
}
|
|
case 99: {
|
|
$307 = $arg;
|
|
$308 = $307;
|
|
$309 = HEAP32[$308>>2]|0;
|
|
$310 = (($307) + 4)|0;
|
|
$311 = $310;
|
|
$312 = HEAP32[$311>>2]|0;
|
|
$313 = $309&255;
|
|
HEAP8[$3>>0] = $313;
|
|
$a$2 = $3;$fl$6 = $175;$p$5 = 1;$pl$2 = 0;$prefix$2 = 35427;$z$2 = $1;
|
|
break;
|
|
}
|
|
case 109: {
|
|
$314 = (___errno_location()|0);
|
|
$315 = HEAP32[$314>>2]|0;
|
|
$316 = (_strerror($315)|0);
|
|
$a$1 = $316;
|
|
label = 82;
|
|
break;
|
|
}
|
|
case 115: {
|
|
$317 = HEAP32[$arg>>2]|0;
|
|
$318 = ($317|0)!=(0|0);
|
|
$319 = $318 ? $317 : 35437;
|
|
$a$1 = $319;
|
|
label = 82;
|
|
break;
|
|
}
|
|
case 67: {
|
|
$326 = $arg;
|
|
$327 = $326;
|
|
$328 = HEAP32[$327>>2]|0;
|
|
$329 = (($326) + 4)|0;
|
|
$330 = $329;
|
|
$331 = HEAP32[$330>>2]|0;
|
|
HEAP32[$wc>>2] = $328;
|
|
HEAP32[$4>>2] = 0;
|
|
HEAP32[$arg>>2] = $wc;
|
|
$p$4198 = -1;
|
|
label = 86;
|
|
break;
|
|
}
|
|
case 83: {
|
|
$332 = ($p$0|0)==(0);
|
|
if ($332) {
|
|
_pad($f,32,$w$1,0,$fl$1$);
|
|
$i$0$lcssa200 = 0;
|
|
label = 98;
|
|
} else {
|
|
$p$4198 = $p$0;
|
|
label = 86;
|
|
}
|
|
break;
|
|
}
|
|
case 65: case 71: case 70: case 69: case 97: case 103: case 102: case 101: {
|
|
$359 = +HEAPF64[$arg>>3];
|
|
HEAP32[$e2$i>>2] = 0;
|
|
HEAPF64[tempDoublePtr>>3] = $359;$360 = HEAP32[tempDoublePtr>>2]|0;
|
|
$361 = HEAP32[tempDoublePtr+4>>2]|0;
|
|
$362 = ($361|0)<(0);
|
|
if ($362) {
|
|
$363 = -$359;
|
|
$$07$i = $363;$pl$0$i = 1;$prefix$0$i = 35444;
|
|
} else {
|
|
$364 = $fl$1$ & 2048;
|
|
$365 = ($364|0)==(0);
|
|
if ($365) {
|
|
$366 = $fl$1$ & 1;
|
|
$367 = ($366|0)==(0);
|
|
$$$i = $367 ? (35445) : (35450);
|
|
$$07$i = $359;$pl$0$i = $366;$prefix$0$i = $$$i;
|
|
} else {
|
|
$$07$i = $359;$pl$0$i = 1;$prefix$0$i = (35447);
|
|
}
|
|
}
|
|
HEAPF64[tempDoublePtr>>3] = $$07$i;$368 = HEAP32[tempDoublePtr>>2]|0;
|
|
$369 = HEAP32[tempDoublePtr+4>>2]|0;
|
|
$370 = $369 & 2146435072;
|
|
$371 = ($370>>>0)<(2146435072);
|
|
$372 = (0)<(0);
|
|
$373 = ($370|0)==(2146435072);
|
|
$374 = $373 & $372;
|
|
$375 = $371 | $374;
|
|
do {
|
|
if ($375) {
|
|
$391 = (+_frexpl($$07$i,$e2$i));
|
|
$392 = $391 * 2.0;
|
|
$393 = $392 != 0.0;
|
|
if ($393) {
|
|
$394 = HEAP32[$e2$i>>2]|0;
|
|
$395 = (($394) + -1)|0;
|
|
HEAP32[$e2$i>>2] = $395;
|
|
}
|
|
$396 = $t$0 | 32;
|
|
$397 = ($396|0)==(97);
|
|
if ($397) {
|
|
$398 = $t$0 & 32;
|
|
$399 = ($398|0)==(0);
|
|
$400 = ((($prefix$0$i)) + 9|0);
|
|
$prefix$0$$i = $399 ? $prefix$0$i : $400;
|
|
$401 = $pl$0$i | 2;
|
|
$402 = ($p$0>>>0)>(11);
|
|
$403 = (12 - ($p$0))|0;
|
|
$404 = ($403|0)==(0);
|
|
$405 = $402 | $404;
|
|
do {
|
|
if ($405) {
|
|
$$1$i = $392;
|
|
} else {
|
|
$re$169$i = $403;$round$068$i = 8.0;
|
|
while(1) {
|
|
$406 = (($re$169$i) + -1)|0;
|
|
$407 = $round$068$i * 16.0;
|
|
$408 = ($406|0)==(0);
|
|
if ($408) {
|
|
$$lcssa342 = $407;
|
|
break;
|
|
} else {
|
|
$re$169$i = $406;$round$068$i = $407;
|
|
}
|
|
}
|
|
$409 = HEAP8[$prefix$0$$i>>0]|0;
|
|
$410 = ($409<<24>>24)==(45);
|
|
if ($410) {
|
|
$411 = -$392;
|
|
$412 = $411 - $$lcssa342;
|
|
$413 = $$lcssa342 + $412;
|
|
$414 = -$413;
|
|
$$1$i = $414;
|
|
break;
|
|
} else {
|
|
$415 = $392 + $$lcssa342;
|
|
$416 = $415 - $$lcssa342;
|
|
$$1$i = $416;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$417 = HEAP32[$e2$i>>2]|0;
|
|
$418 = ($417|0)<(0);
|
|
$419 = (0 - ($417))|0;
|
|
$420 = $418 ? $419 : $417;
|
|
$421 = ($420|0)<(0);
|
|
$422 = $421 << 31 >> 31;
|
|
$423 = (_fmt_u($420,$422,$5)|0);
|
|
$424 = ($423|0)==($5|0);
|
|
if ($424) {
|
|
HEAP8[$6>>0] = 48;
|
|
$estr$0$i = $6;
|
|
} else {
|
|
$estr$0$i = $423;
|
|
}
|
|
$425 = $417 >> 31;
|
|
$426 = $425 & 2;
|
|
$427 = (($426) + 43)|0;
|
|
$428 = $427&255;
|
|
$429 = ((($estr$0$i)) + -1|0);
|
|
HEAP8[$429>>0] = $428;
|
|
$430 = (($t$0) + 15)|0;
|
|
$431 = $430&255;
|
|
$432 = ((($estr$0$i)) + -2|0);
|
|
HEAP8[$432>>0] = $431;
|
|
$notrhs$i = ($p$0|0)<(1);
|
|
$433 = $fl$1$ & 8;
|
|
$434 = ($433|0)==(0);
|
|
$$2$i = $$1$i;$s$0$i = $buf$i;
|
|
while(1) {
|
|
$435 = (~~(($$2$i)));
|
|
$436 = (35411 + ($435)|0);
|
|
$437 = HEAP8[$436>>0]|0;
|
|
$438 = $437&255;
|
|
$439 = $438 | $398;
|
|
$440 = $439&255;
|
|
$441 = ((($s$0$i)) + 1|0);
|
|
HEAP8[$s$0$i>>0] = $440;
|
|
$442 = (+($435|0));
|
|
$443 = $$2$i - $442;
|
|
$444 = $443 * 16.0;
|
|
$445 = $441;
|
|
$446 = (($445) - ($7))|0;
|
|
$447 = ($446|0)==(1);
|
|
do {
|
|
if ($447) {
|
|
$notlhs$i = $444 == 0.0;
|
|
$or$cond3$not$i = $notrhs$i & $notlhs$i;
|
|
$or$cond$i = $434 & $or$cond3$not$i;
|
|
if ($or$cond$i) {
|
|
$s$1$i = $441;
|
|
break;
|
|
}
|
|
$448 = ((($s$0$i)) + 2|0);
|
|
HEAP8[$441>>0] = 46;
|
|
$s$1$i = $448;
|
|
} else {
|
|
$s$1$i = $441;
|
|
}
|
|
} while(0);
|
|
$449 = $444 != 0.0;
|
|
if ($449) {
|
|
$$2$i = $444;$s$0$i = $s$1$i;
|
|
} else {
|
|
$s$1$i$lcssa = $s$1$i;
|
|
break;
|
|
}
|
|
}
|
|
$450 = ($p$0|0)!=(0);
|
|
$$pre182$i = $s$1$i$lcssa;
|
|
$451 = (($10) + ($$pre182$i))|0;
|
|
$452 = ($451|0)<($p$0|0);
|
|
$or$cond240 = $450 & $452;
|
|
$453 = $432;
|
|
$454 = (($11) + ($p$0))|0;
|
|
$455 = (($454) - ($453))|0;
|
|
$456 = $432;
|
|
$457 = (($9) - ($456))|0;
|
|
$458 = (($457) + ($$pre182$i))|0;
|
|
$l$0$i = $or$cond240 ? $455 : $458;
|
|
$459 = (($l$0$i) + ($401))|0;
|
|
_pad($f,32,$w$1,$459,$fl$1$);
|
|
$460 = HEAP32[$f>>2]|0;
|
|
$461 = $460 & 32;
|
|
$462 = ($461|0)==(0);
|
|
if ($462) {
|
|
(___fwritex($prefix$0$$i,$401,$f)|0);
|
|
}
|
|
$463 = $fl$1$ ^ 65536;
|
|
_pad($f,48,$w$1,$459,$463);
|
|
$464 = (($$pre182$i) - ($7))|0;
|
|
$465 = HEAP32[$f>>2]|0;
|
|
$466 = $465 & 32;
|
|
$467 = ($466|0)==(0);
|
|
if ($467) {
|
|
(___fwritex($buf$i,$464,$f)|0);
|
|
}
|
|
$468 = $432;
|
|
$469 = (($8) - ($468))|0;
|
|
$sum = (($464) + ($469))|0;
|
|
$470 = (($l$0$i) - ($sum))|0;
|
|
_pad($f,48,$470,0,0);
|
|
$471 = HEAP32[$f>>2]|0;
|
|
$472 = $471 & 32;
|
|
$473 = ($472|0)==(0);
|
|
if ($473) {
|
|
(___fwritex($432,$469,$f)|0);
|
|
}
|
|
$474 = $fl$1$ ^ 8192;
|
|
_pad($f,32,$w$1,$459,$474);
|
|
$475 = ($459|0)<($w$1|0);
|
|
$w$$i = $475 ? $w$1 : $459;
|
|
$$0$i = $w$$i;
|
|
break;
|
|
}
|
|
$476 = ($p$0|0)<(0);
|
|
$$p$i = $476 ? 6 : $p$0;
|
|
if ($393) {
|
|
$477 = $392 * 268435456.0;
|
|
$478 = HEAP32[$e2$i>>2]|0;
|
|
$479 = (($478) + -28)|0;
|
|
HEAP32[$e2$i>>2] = $479;
|
|
$$3$i = $477;$480 = $479;
|
|
} else {
|
|
$$pre179$i = HEAP32[$e2$i>>2]|0;
|
|
$$3$i = $392;$480 = $$pre179$i;
|
|
}
|
|
$481 = ($480|0)<(0);
|
|
$$31$i = $481 ? $big$i : $12;
|
|
$482 = $$31$i;
|
|
$$4$i = $$3$i;$z$0$i = $$31$i;
|
|
while(1) {
|
|
$483 = (~~(($$4$i))>>>0);
|
|
HEAP32[$z$0$i>>2] = $483;
|
|
$484 = ((($z$0$i)) + 4|0);
|
|
$485 = (+($483>>>0));
|
|
$486 = $$4$i - $485;
|
|
$487 = $486 * 1.0E+9;
|
|
$488 = $487 != 0.0;
|
|
if ($488) {
|
|
$$4$i = $487;$z$0$i = $484;
|
|
} else {
|
|
$$lcssa326 = $484;
|
|
break;
|
|
}
|
|
}
|
|
$$pr$i = HEAP32[$e2$i>>2]|0;
|
|
$489 = ($$pr$i|0)>(0);
|
|
if ($489) {
|
|
$490 = $$pr$i;$a$1147$i = $$31$i;$z$1146$i = $$lcssa326;
|
|
while(1) {
|
|
$491 = ($490|0)>(29);
|
|
$492 = $491 ? 29 : $490;
|
|
$d$0139$i = ((($z$1146$i)) + -4|0);
|
|
$493 = ($d$0139$i>>>0)<($a$1147$i>>>0);
|
|
do {
|
|
if ($493) {
|
|
$a$2$ph$i = $a$1147$i;
|
|
} else {
|
|
$carry$0140$i = 0;$d$0141$i = $d$0139$i;
|
|
while(1) {
|
|
$494 = HEAP32[$d$0141$i>>2]|0;
|
|
$495 = (_bitshift64Shl(($494|0),0,($492|0))|0);
|
|
$496 = tempRet0;
|
|
$497 = (_i64Add(($495|0),($496|0),($carry$0140$i|0),0)|0);
|
|
$498 = tempRet0;
|
|
$499 = (___uremdi3(($497|0),($498|0),1000000000,0)|0);
|
|
$500 = tempRet0;
|
|
HEAP32[$d$0141$i>>2] = $499;
|
|
$501 = (___udivdi3(($497|0),($498|0),1000000000,0)|0);
|
|
$502 = tempRet0;
|
|
$d$0$i = ((($d$0141$i)) + -4|0);
|
|
$503 = ($d$0$i>>>0)<($a$1147$i>>>0);
|
|
if ($503) {
|
|
$$lcssa327 = $501;
|
|
break;
|
|
} else {
|
|
$carry$0140$i = $501;$d$0141$i = $d$0$i;
|
|
}
|
|
}
|
|
$504 = ($$lcssa327|0)==(0);
|
|
if ($504) {
|
|
$a$2$ph$i = $a$1147$i;
|
|
break;
|
|
}
|
|
$505 = ((($a$1147$i)) + -4|0);
|
|
HEAP32[$505>>2] = $$lcssa327;
|
|
$a$2$ph$i = $505;
|
|
}
|
|
} while(0);
|
|
$z$2$i = $z$1146$i;
|
|
while(1) {
|
|
$506 = ($z$2$i>>>0)>($a$2$ph$i>>>0);
|
|
if (!($506)) {
|
|
$z$2$i$lcssa = $z$2$i;
|
|
break;
|
|
}
|
|
$507 = ((($z$2$i)) + -4|0);
|
|
$508 = HEAP32[$507>>2]|0;
|
|
$509 = ($508|0)==(0);
|
|
if ($509) {
|
|
$z$2$i = $507;
|
|
} else {
|
|
$z$2$i$lcssa = $z$2$i;
|
|
break;
|
|
}
|
|
}
|
|
$510 = HEAP32[$e2$i>>2]|0;
|
|
$511 = (($510) - ($492))|0;
|
|
HEAP32[$e2$i>>2] = $511;
|
|
$512 = ($511|0)>(0);
|
|
if ($512) {
|
|
$490 = $511;$a$1147$i = $a$2$ph$i;$z$1146$i = $z$2$i$lcssa;
|
|
} else {
|
|
$$pr47$i = $511;$a$1$lcssa$i = $a$2$ph$i;$z$1$lcssa$i = $z$2$i$lcssa;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
$$pr47$i = $$pr$i;$a$1$lcssa$i = $$31$i;$z$1$lcssa$i = $$lcssa326;
|
|
}
|
|
$513 = ($$pr47$i|0)<(0);
|
|
if ($513) {
|
|
$514 = (($$p$i) + 25)|0;
|
|
$515 = (($514|0) / 9)&-1;
|
|
$516 = (($515) + 1)|0;
|
|
$517 = ($396|0)==(102);
|
|
$519 = $$pr47$i;$a$3134$i = $a$1$lcssa$i;$z$3133$i = $z$1$lcssa$i;
|
|
while(1) {
|
|
$518 = (0 - ($519))|0;
|
|
$520 = ($518|0)>(9);
|
|
$521 = $520 ? 9 : $518;
|
|
$522 = ($a$3134$i>>>0)<($z$3133$i>>>0);
|
|
do {
|
|
if ($522) {
|
|
$526 = 1 << $521;
|
|
$527 = (($526) + -1)|0;
|
|
$528 = 1000000000 >>> $521;
|
|
$carry3$0128$i = 0;$d$1127$i = $a$3134$i;
|
|
while(1) {
|
|
$529 = HEAP32[$d$1127$i>>2]|0;
|
|
$530 = $529 & $527;
|
|
$531 = $529 >>> $521;
|
|
$532 = (($531) + ($carry3$0128$i))|0;
|
|
HEAP32[$d$1127$i>>2] = $532;
|
|
$533 = Math_imul($530, $528)|0;
|
|
$534 = ((($d$1127$i)) + 4|0);
|
|
$535 = ($534>>>0)<($z$3133$i>>>0);
|
|
if ($535) {
|
|
$carry3$0128$i = $533;$d$1127$i = $534;
|
|
} else {
|
|
$$lcssa329 = $533;
|
|
break;
|
|
}
|
|
}
|
|
$536 = HEAP32[$a$3134$i>>2]|0;
|
|
$537 = ($536|0)==(0);
|
|
$538 = ((($a$3134$i)) + 4|0);
|
|
$$a$3$i = $537 ? $538 : $a$3134$i;
|
|
$539 = ($$lcssa329|0)==(0);
|
|
if ($539) {
|
|
$$a$3186$i = $$a$3$i;$z$4$i = $z$3133$i;
|
|
break;
|
|
}
|
|
$540 = ((($z$3133$i)) + 4|0);
|
|
HEAP32[$z$3133$i>>2] = $$lcssa329;
|
|
$$a$3186$i = $$a$3$i;$z$4$i = $540;
|
|
} else {
|
|
$523 = HEAP32[$a$3134$i>>2]|0;
|
|
$524 = ($523|0)==(0);
|
|
$525 = ((($a$3134$i)) + 4|0);
|
|
$$a$3185$i = $524 ? $525 : $a$3134$i;
|
|
$$a$3186$i = $$a$3185$i;$z$4$i = $z$3133$i;
|
|
}
|
|
} while(0);
|
|
$541 = $517 ? $$31$i : $$a$3186$i;
|
|
$542 = $z$4$i;
|
|
$543 = $541;
|
|
$544 = (($542) - ($543))|0;
|
|
$545 = $544 >> 2;
|
|
$546 = ($545|0)>($516|0);
|
|
$547 = (($541) + ($516<<2)|0);
|
|
$$z$4$i = $546 ? $547 : $z$4$i;
|
|
$548 = HEAP32[$e2$i>>2]|0;
|
|
$549 = (($548) + ($521))|0;
|
|
HEAP32[$e2$i>>2] = $549;
|
|
$550 = ($549|0)<(0);
|
|
if ($550) {
|
|
$519 = $549;$a$3134$i = $$a$3186$i;$z$3133$i = $$z$4$i;
|
|
} else {
|
|
$a$3$lcssa$i = $$a$3186$i;$z$3$lcssa$i = $$z$4$i;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
$a$3$lcssa$i = $a$1$lcssa$i;$z$3$lcssa$i = $z$1$lcssa$i;
|
|
}
|
|
$551 = ($a$3$lcssa$i>>>0)<($z$3$lcssa$i>>>0);
|
|
do {
|
|
if ($551) {
|
|
$552 = $a$3$lcssa$i;
|
|
$553 = (($482) - ($552))|0;
|
|
$554 = $553 >> 2;
|
|
$555 = ($554*9)|0;
|
|
$556 = HEAP32[$a$3$lcssa$i>>2]|0;
|
|
$557 = ($556>>>0)<(10);
|
|
if ($557) {
|
|
$e$1$i = $555;
|
|
break;
|
|
} else {
|
|
$e$0123$i = $555;$i$0122$i = 10;
|
|
}
|
|
while(1) {
|
|
$558 = ($i$0122$i*10)|0;
|
|
$559 = (($e$0123$i) + 1)|0;
|
|
$560 = ($556>>>0)<($558>>>0);
|
|
if ($560) {
|
|
$e$1$i = $559;
|
|
break;
|
|
} else {
|
|
$e$0123$i = $559;$i$0122$i = $558;
|
|
}
|
|
}
|
|
} else {
|
|
$e$1$i = 0;
|
|
}
|
|
} while(0);
|
|
$561 = ($396|0)!=(102);
|
|
$562 = $561 ? $e$1$i : 0;
|
|
$563 = (($$p$i) - ($562))|0;
|
|
$564 = ($396|0)==(103);
|
|
$565 = ($$p$i|0)!=(0);
|
|
$566 = $565 & $564;
|
|
$$neg52$i = $566 << 31 >> 31;
|
|
$567 = (($563) + ($$neg52$i))|0;
|
|
$568 = $z$3$lcssa$i;
|
|
$569 = (($568) - ($482))|0;
|
|
$570 = $569 >> 2;
|
|
$571 = ($570*9)|0;
|
|
$572 = (($571) + -9)|0;
|
|
$573 = ($567|0)<($572|0);
|
|
if ($573) {
|
|
$574 = (($567) + 9216)|0;
|
|
$575 = (($574|0) / 9)&-1;
|
|
$$sum$i = (($575) + -1023)|0;
|
|
$576 = (($$31$i) + ($$sum$i<<2)|0);
|
|
$577 = (($574|0) % 9)&-1;
|
|
$j$0115$i = (($577) + 1)|0;
|
|
$578 = ($j$0115$i|0)<(9);
|
|
if ($578) {
|
|
$i$1116$i = 10;$j$0117$i = $j$0115$i;
|
|
while(1) {
|
|
$579 = ($i$1116$i*10)|0;
|
|
$j$0$i = (($j$0117$i) + 1)|0;
|
|
$exitcond$i = ($j$0$i|0)==(9);
|
|
if ($exitcond$i) {
|
|
$i$1$lcssa$i = $579;
|
|
break;
|
|
} else {
|
|
$i$1116$i = $579;$j$0117$i = $j$0$i;
|
|
}
|
|
}
|
|
} else {
|
|
$i$1$lcssa$i = 10;
|
|
}
|
|
$580 = HEAP32[$576>>2]|0;
|
|
$581 = (($580>>>0) % ($i$1$lcssa$i>>>0))&-1;
|
|
$582 = ($581|0)==(0);
|
|
if ($582) {
|
|
$$sum15$i = (($575) + -1022)|0;
|
|
$583 = (($$31$i) + ($$sum15$i<<2)|0);
|
|
$584 = ($583|0)==($z$3$lcssa$i|0);
|
|
if ($584) {
|
|
$a$7$i = $a$3$lcssa$i;$d$3$i = $576;$e$3$i = $e$1$i;
|
|
} else {
|
|
label = 163;
|
|
}
|
|
} else {
|
|
label = 163;
|
|
}
|
|
do {
|
|
if ((label|0) == 163) {
|
|
label = 0;
|
|
$585 = (($580>>>0) / ($i$1$lcssa$i>>>0))&-1;
|
|
$586 = $585 & 1;
|
|
$587 = ($586|0)==(0);
|
|
$$20$i = $587 ? 9007199254740992.0 : 9007199254740994.0;
|
|
$588 = (($i$1$lcssa$i|0) / 2)&-1;
|
|
$589 = ($581>>>0)<($588>>>0);
|
|
do {
|
|
if ($589) {
|
|
$small$0$i = 0.5;
|
|
} else {
|
|
$590 = ($581|0)==($588|0);
|
|
if ($590) {
|
|
$$sum16$i = (($575) + -1022)|0;
|
|
$591 = (($$31$i) + ($$sum16$i<<2)|0);
|
|
$592 = ($591|0)==($z$3$lcssa$i|0);
|
|
if ($592) {
|
|
$small$0$i = 1.0;
|
|
break;
|
|
}
|
|
}
|
|
$small$0$i = 1.5;
|
|
}
|
|
} while(0);
|
|
$593 = ($pl$0$i|0)==(0);
|
|
do {
|
|
if ($593) {
|
|
$round6$1$i = $$20$i;$small$1$i = $small$0$i;
|
|
} else {
|
|
$594 = HEAP8[$prefix$0$i>>0]|0;
|
|
$595 = ($594<<24>>24)==(45);
|
|
if (!($595)) {
|
|
$round6$1$i = $$20$i;$small$1$i = $small$0$i;
|
|
break;
|
|
}
|
|
$596 = -$$20$i;
|
|
$597 = -$small$0$i;
|
|
$round6$1$i = $596;$small$1$i = $597;
|
|
}
|
|
} while(0);
|
|
$598 = (($580) - ($581))|0;
|
|
HEAP32[$576>>2] = $598;
|
|
$599 = $round6$1$i + $small$1$i;
|
|
$600 = $599 != $round6$1$i;
|
|
if (!($600)) {
|
|
$a$7$i = $a$3$lcssa$i;$d$3$i = $576;$e$3$i = $e$1$i;
|
|
break;
|
|
}
|
|
$601 = (($598) + ($i$1$lcssa$i))|0;
|
|
HEAP32[$576>>2] = $601;
|
|
$602 = ($601>>>0)>(999999999);
|
|
if ($602) {
|
|
$a$5109$i = $a$3$lcssa$i;$d$2108$i = $576;
|
|
while(1) {
|
|
$603 = ((($d$2108$i)) + -4|0);
|
|
HEAP32[$d$2108$i>>2] = 0;
|
|
$604 = ($603>>>0)<($a$5109$i>>>0);
|
|
if ($604) {
|
|
$605 = ((($a$5109$i)) + -4|0);
|
|
HEAP32[$605>>2] = 0;
|
|
$a$6$i = $605;
|
|
} else {
|
|
$a$6$i = $a$5109$i;
|
|
}
|
|
$606 = HEAP32[$603>>2]|0;
|
|
$607 = (($606) + 1)|0;
|
|
HEAP32[$603>>2] = $607;
|
|
$608 = ($607>>>0)>(999999999);
|
|
if ($608) {
|
|
$a$5109$i = $a$6$i;$d$2108$i = $603;
|
|
} else {
|
|
$a$5$lcssa$i = $a$6$i;$d$2$lcssa$i = $603;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
$a$5$lcssa$i = $a$3$lcssa$i;$d$2$lcssa$i = $576;
|
|
}
|
|
$609 = $a$5$lcssa$i;
|
|
$610 = (($482) - ($609))|0;
|
|
$611 = $610 >> 2;
|
|
$612 = ($611*9)|0;
|
|
$613 = HEAP32[$a$5$lcssa$i>>2]|0;
|
|
$614 = ($613>>>0)<(10);
|
|
if ($614) {
|
|
$a$7$i = $a$5$lcssa$i;$d$3$i = $d$2$lcssa$i;$e$3$i = $612;
|
|
break;
|
|
} else {
|
|
$e$2104$i = $612;$i$2103$i = 10;
|
|
}
|
|
while(1) {
|
|
$615 = ($i$2103$i*10)|0;
|
|
$616 = (($e$2104$i) + 1)|0;
|
|
$617 = ($613>>>0)<($615>>>0);
|
|
if ($617) {
|
|
$a$7$i = $a$5$lcssa$i;$d$3$i = $d$2$lcssa$i;$e$3$i = $616;
|
|
break;
|
|
} else {
|
|
$e$2104$i = $616;$i$2103$i = $615;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$618 = ((($d$3$i)) + 4|0);
|
|
$619 = ($z$3$lcssa$i>>>0)>($618>>>0);
|
|
$$z$3$i = $619 ? $618 : $z$3$lcssa$i;
|
|
$a$8$ph$i = $a$7$i;$e$4$ph$i = $e$3$i;$z$6$ph$i = $$z$3$i;
|
|
} else {
|
|
$a$8$ph$i = $a$3$lcssa$i;$e$4$ph$i = $e$1$i;$z$6$ph$i = $z$3$lcssa$i;
|
|
}
|
|
$620 = (0 - ($e$4$ph$i))|0;
|
|
$z$6$i = $z$6$ph$i;
|
|
while(1) {
|
|
$621 = ($z$6$i>>>0)>($a$8$ph$i>>>0);
|
|
if (!($621)) {
|
|
$$lcssa159$i = 0;$z$6$i$lcssa = $z$6$i;
|
|
break;
|
|
}
|
|
$622 = ((($z$6$i)) + -4|0);
|
|
$623 = HEAP32[$622>>2]|0;
|
|
$624 = ($623|0)==(0);
|
|
if ($624) {
|
|
$z$6$i = $622;
|
|
} else {
|
|
$$lcssa159$i = 1;$z$6$i$lcssa = $z$6$i;
|
|
break;
|
|
}
|
|
}
|
|
do {
|
|
if ($564) {
|
|
$625 = $565&1;
|
|
$626 = $625 ^ 1;
|
|
$$p$$i = (($626) + ($$p$i))|0;
|
|
$627 = ($$p$$i|0)>($e$4$ph$i|0);
|
|
$628 = ($e$4$ph$i|0)>(-5);
|
|
$or$cond6$i = $627 & $628;
|
|
if ($or$cond6$i) {
|
|
$629 = (($t$0) + -1)|0;
|
|
$$neg53$i = (($$p$$i) + -1)|0;
|
|
$630 = (($$neg53$i) - ($e$4$ph$i))|0;
|
|
$$013$i = $629;$$210$i = $630;
|
|
} else {
|
|
$631 = (($t$0) + -2)|0;
|
|
$632 = (($$p$$i) + -1)|0;
|
|
$$013$i = $631;$$210$i = $632;
|
|
}
|
|
$633 = $fl$1$ & 8;
|
|
$634 = ($633|0)==(0);
|
|
if (!($634)) {
|
|
$$114$i = $$013$i;$$311$i = $$210$i;$$pre$phi184$iZ2D = $633;
|
|
break;
|
|
}
|
|
do {
|
|
if ($$lcssa159$i) {
|
|
$635 = ((($z$6$i$lcssa)) + -4|0);
|
|
$636 = HEAP32[$635>>2]|0;
|
|
$637 = ($636|0)==(0);
|
|
if ($637) {
|
|
$j$2$i = 9;
|
|
break;
|
|
}
|
|
$638 = (($636>>>0) % 10)&-1;
|
|
$639 = ($638|0)==(0);
|
|
if ($639) {
|
|
$i$399$i = 10;$j$1100$i = 0;
|
|
} else {
|
|
$j$2$i = 0;
|
|
break;
|
|
}
|
|
while(1) {
|
|
$640 = ($i$399$i*10)|0;
|
|
$641 = (($j$1100$i) + 1)|0;
|
|
$642 = (($636>>>0) % ($640>>>0))&-1;
|
|
$643 = ($642|0)==(0);
|
|
if ($643) {
|
|
$i$399$i = $640;$j$1100$i = $641;
|
|
} else {
|
|
$j$2$i = $641;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
$j$2$i = 9;
|
|
}
|
|
} while(0);
|
|
$644 = $$013$i | 32;
|
|
$645 = ($644|0)==(102);
|
|
$646 = $z$6$i$lcssa;
|
|
$647 = (($646) - ($482))|0;
|
|
$648 = $647 >> 2;
|
|
$649 = ($648*9)|0;
|
|
$650 = (($649) + -9)|0;
|
|
if ($645) {
|
|
$651 = (($650) - ($j$2$i))|0;
|
|
$652 = ($651|0)<(0);
|
|
$$21$i = $652 ? 0 : $651;
|
|
$653 = ($$210$i|0)<($$21$i|0);
|
|
$$210$$22$i = $653 ? $$210$i : $$21$i;
|
|
$$114$i = $$013$i;$$311$i = $$210$$22$i;$$pre$phi184$iZ2D = 0;
|
|
break;
|
|
} else {
|
|
$654 = (($650) + ($e$4$ph$i))|0;
|
|
$655 = (($654) - ($j$2$i))|0;
|
|
$656 = ($655|0)<(0);
|
|
$$23$i = $656 ? 0 : $655;
|
|
$657 = ($$210$i|0)<($$23$i|0);
|
|
$$210$$24$i = $657 ? $$210$i : $$23$i;
|
|
$$114$i = $$013$i;$$311$i = $$210$$24$i;$$pre$phi184$iZ2D = 0;
|
|
break;
|
|
}
|
|
} else {
|
|
$$pre183$i = $fl$1$ & 8;
|
|
$$114$i = $t$0;$$311$i = $$p$i;$$pre$phi184$iZ2D = $$pre183$i;
|
|
}
|
|
} while(0);
|
|
$658 = $$311$i | $$pre$phi184$iZ2D;
|
|
$659 = ($658|0)!=(0);
|
|
$660 = $659&1;
|
|
$661 = $$114$i | 32;
|
|
$662 = ($661|0)==(102);
|
|
if ($662) {
|
|
$663 = ($e$4$ph$i|0)>(0);
|
|
$664 = $663 ? $e$4$ph$i : 0;
|
|
$$pn$i = $664;$estr$2$i = 0;
|
|
} else {
|
|
$665 = ($e$4$ph$i|0)<(0);
|
|
$666 = $665 ? $620 : $e$4$ph$i;
|
|
$667 = ($666|0)<(0);
|
|
$668 = $667 << 31 >> 31;
|
|
$669 = (_fmt_u($666,$668,$5)|0);
|
|
$670 = $669;
|
|
$671 = (($8) - ($670))|0;
|
|
$672 = ($671|0)<(2);
|
|
if ($672) {
|
|
$estr$193$i = $669;
|
|
while(1) {
|
|
$673 = ((($estr$193$i)) + -1|0);
|
|
HEAP8[$673>>0] = 48;
|
|
$674 = $673;
|
|
$675 = (($8) - ($674))|0;
|
|
$676 = ($675|0)<(2);
|
|
if ($676) {
|
|
$estr$193$i = $673;
|
|
} else {
|
|
$estr$1$lcssa$i = $673;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
$estr$1$lcssa$i = $669;
|
|
}
|
|
$677 = $e$4$ph$i >> 31;
|
|
$678 = $677 & 2;
|
|
$679 = (($678) + 43)|0;
|
|
$680 = $679&255;
|
|
$681 = ((($estr$1$lcssa$i)) + -1|0);
|
|
HEAP8[$681>>0] = $680;
|
|
$682 = $$114$i&255;
|
|
$683 = ((($estr$1$lcssa$i)) + -2|0);
|
|
HEAP8[$683>>0] = $682;
|
|
$684 = $683;
|
|
$685 = (($8) - ($684))|0;
|
|
$$pn$i = $685;$estr$2$i = $683;
|
|
}
|
|
$686 = (($pl$0$i) + 1)|0;
|
|
$687 = (($686) + ($$311$i))|0;
|
|
$l$1$i = (($687) + ($660))|0;
|
|
$688 = (($l$1$i) + ($$pn$i))|0;
|
|
_pad($f,32,$w$1,$688,$fl$1$);
|
|
$689 = HEAP32[$f>>2]|0;
|
|
$690 = $689 & 32;
|
|
$691 = ($690|0)==(0);
|
|
if ($691) {
|
|
(___fwritex($prefix$0$i,$pl$0$i,$f)|0);
|
|
}
|
|
$692 = $fl$1$ ^ 65536;
|
|
_pad($f,48,$w$1,$688,$692);
|
|
do {
|
|
if ($662) {
|
|
$693 = ($a$8$ph$i>>>0)>($$31$i>>>0);
|
|
$r$0$a$8$i = $693 ? $$31$i : $a$8$ph$i;
|
|
$d$482$i = $r$0$a$8$i;
|
|
while(1) {
|
|
$694 = HEAP32[$d$482$i>>2]|0;
|
|
$695 = (_fmt_u($694,0,$13)|0);
|
|
$696 = ($d$482$i|0)==($r$0$a$8$i|0);
|
|
do {
|
|
if ($696) {
|
|
$700 = ($695|0)==($13|0);
|
|
if (!($700)) {
|
|
$s7$1$i = $695;
|
|
break;
|
|
}
|
|
HEAP8[$15>>0] = 48;
|
|
$s7$1$i = $15;
|
|
} else {
|
|
$697 = ($695>>>0)>($buf$i>>>0);
|
|
if ($697) {
|
|
$s7$079$i = $695;
|
|
} else {
|
|
$s7$1$i = $695;
|
|
break;
|
|
}
|
|
while(1) {
|
|
$698 = ((($s7$079$i)) + -1|0);
|
|
HEAP8[$698>>0] = 48;
|
|
$699 = ($698>>>0)>($buf$i>>>0);
|
|
if ($699) {
|
|
$s7$079$i = $698;
|
|
} else {
|
|
$s7$1$i = $698;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$701 = HEAP32[$f>>2]|0;
|
|
$702 = $701 & 32;
|
|
$703 = ($702|0)==(0);
|
|
if ($703) {
|
|
$704 = $s7$1$i;
|
|
$705 = (($14) - ($704))|0;
|
|
(___fwritex($s7$1$i,$705,$f)|0);
|
|
}
|
|
$706 = ((($d$482$i)) + 4|0);
|
|
$707 = ($706>>>0)>($$31$i>>>0);
|
|
if ($707) {
|
|
$$lcssa339 = $706;
|
|
break;
|
|
} else {
|
|
$d$482$i = $706;
|
|
}
|
|
}
|
|
$708 = ($658|0)==(0);
|
|
do {
|
|
if (!($708)) {
|
|
$709 = HEAP32[$f>>2]|0;
|
|
$710 = $709 & 32;
|
|
$711 = ($710|0)==(0);
|
|
if (!($711)) {
|
|
break;
|
|
}
|
|
(___fwritex(35479,1,$f)|0);
|
|
}
|
|
} while(0);
|
|
$712 = ($$lcssa339>>>0)<($z$6$i$lcssa>>>0);
|
|
$713 = ($$311$i|0)>(0);
|
|
$714 = $713 & $712;
|
|
if ($714) {
|
|
$$41276$i = $$311$i;$d$575$i = $$lcssa339;
|
|
while(1) {
|
|
$715 = HEAP32[$d$575$i>>2]|0;
|
|
$716 = (_fmt_u($715,0,$13)|0);
|
|
$717 = ($716>>>0)>($buf$i>>>0);
|
|
if ($717) {
|
|
$s8$070$i = $716;
|
|
while(1) {
|
|
$718 = ((($s8$070$i)) + -1|0);
|
|
HEAP8[$718>>0] = 48;
|
|
$719 = ($718>>>0)>($buf$i>>>0);
|
|
if ($719) {
|
|
$s8$070$i = $718;
|
|
} else {
|
|
$s8$0$lcssa$i = $718;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
$s8$0$lcssa$i = $716;
|
|
}
|
|
$720 = HEAP32[$f>>2]|0;
|
|
$721 = $720 & 32;
|
|
$722 = ($721|0)==(0);
|
|
if ($722) {
|
|
$723 = ($$41276$i|0)>(9);
|
|
$724 = $723 ? 9 : $$41276$i;
|
|
(___fwritex($s8$0$lcssa$i,$724,$f)|0);
|
|
}
|
|
$725 = ((($d$575$i)) + 4|0);
|
|
$726 = (($$41276$i) + -9)|0;
|
|
$727 = ($725>>>0)<($z$6$i$lcssa>>>0);
|
|
$728 = ($$41276$i|0)>(9);
|
|
$729 = $728 & $727;
|
|
if ($729) {
|
|
$$41276$i = $726;$d$575$i = $725;
|
|
} else {
|
|
$$412$lcssa$i = $726;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
$$412$lcssa$i = $$311$i;
|
|
}
|
|
$730 = (($$412$lcssa$i) + 9)|0;
|
|
_pad($f,48,$730,9,0);
|
|
} else {
|
|
$731 = ((($a$8$ph$i)) + 4|0);
|
|
$z$6$$i = $$lcssa159$i ? $z$6$i$lcssa : $731;
|
|
$732 = ($$311$i|0)>(-1);
|
|
if ($732) {
|
|
$733 = ($$pre$phi184$iZ2D|0)==(0);
|
|
$$587$i = $$311$i;$d$686$i = $a$8$ph$i;
|
|
while(1) {
|
|
$734 = HEAP32[$d$686$i>>2]|0;
|
|
$735 = (_fmt_u($734,0,$13)|0);
|
|
$736 = ($735|0)==($13|0);
|
|
if ($736) {
|
|
HEAP8[$15>>0] = 48;
|
|
$s9$0$i = $15;
|
|
} else {
|
|
$s9$0$i = $735;
|
|
}
|
|
$737 = ($d$686$i|0)==($a$8$ph$i|0);
|
|
do {
|
|
if ($737) {
|
|
$741 = ((($s9$0$i)) + 1|0);
|
|
$742 = HEAP32[$f>>2]|0;
|
|
$743 = $742 & 32;
|
|
$744 = ($743|0)==(0);
|
|
if ($744) {
|
|
(___fwritex($s9$0$i,1,$f)|0);
|
|
}
|
|
$745 = ($$587$i|0)<(1);
|
|
$or$cond29$i = $733 & $745;
|
|
if ($or$cond29$i) {
|
|
$s9$2$i = $741;
|
|
break;
|
|
}
|
|
$746 = HEAP32[$f>>2]|0;
|
|
$747 = $746 & 32;
|
|
$748 = ($747|0)==(0);
|
|
if (!($748)) {
|
|
$s9$2$i = $741;
|
|
break;
|
|
}
|
|
(___fwritex(35479,1,$f)|0);
|
|
$s9$2$i = $741;
|
|
} else {
|
|
$738 = ($s9$0$i>>>0)>($buf$i>>>0);
|
|
if ($738) {
|
|
$s9$183$i = $s9$0$i;
|
|
} else {
|
|
$s9$2$i = $s9$0$i;
|
|
break;
|
|
}
|
|
while(1) {
|
|
$739 = ((($s9$183$i)) + -1|0);
|
|
HEAP8[$739>>0] = 48;
|
|
$740 = ($739>>>0)>($buf$i>>>0);
|
|
if ($740) {
|
|
$s9$183$i = $739;
|
|
} else {
|
|
$s9$2$i = $739;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$749 = $s9$2$i;
|
|
$750 = (($14) - ($749))|0;
|
|
$751 = HEAP32[$f>>2]|0;
|
|
$752 = $751 & 32;
|
|
$753 = ($752|0)==(0);
|
|
if ($753) {
|
|
$754 = ($$587$i|0)>($750|0);
|
|
$755 = $754 ? $750 : $$587$i;
|
|
(___fwritex($s9$2$i,$755,$f)|0);
|
|
}
|
|
$756 = (($$587$i) - ($750))|0;
|
|
$757 = ((($d$686$i)) + 4|0);
|
|
$758 = ($757>>>0)<($z$6$$i>>>0);
|
|
$759 = ($756|0)>(-1);
|
|
$760 = $758 & $759;
|
|
if ($760) {
|
|
$$587$i = $756;$d$686$i = $757;
|
|
} else {
|
|
$$5$lcssa$i = $756;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
$$5$lcssa$i = $$311$i;
|
|
}
|
|
$761 = (($$5$lcssa$i) + 18)|0;
|
|
_pad($f,48,$761,18,0);
|
|
$762 = HEAP32[$f>>2]|0;
|
|
$763 = $762 & 32;
|
|
$764 = ($763|0)==(0);
|
|
if (!($764)) {
|
|
break;
|
|
}
|
|
$765 = $estr$2$i;
|
|
$766 = (($8) - ($765))|0;
|
|
(___fwritex($estr$2$i,$766,$f)|0);
|
|
}
|
|
} while(0);
|
|
$767 = $fl$1$ ^ 8192;
|
|
_pad($f,32,$w$1,$688,$767);
|
|
$768 = ($688|0)<($w$1|0);
|
|
$w$30$i = $768 ? $w$1 : $688;
|
|
$$0$i = $w$30$i;
|
|
} else {
|
|
$376 = $t$0 & 32;
|
|
$377 = ($376|0)!=(0);
|
|
$378 = $377 ? 35463 : 35467;
|
|
$379 = ($$07$i != $$07$i) | (0.0 != 0.0);
|
|
$380 = $377 ? 35471 : 35475;
|
|
$pl$1$i = $379 ? 0 : $pl$0$i;
|
|
$s1$0$i = $379 ? $380 : $378;
|
|
$381 = (($pl$1$i) + 3)|0;
|
|
_pad($f,32,$w$1,$381,$175);
|
|
$382 = HEAP32[$f>>2]|0;
|
|
$383 = $382 & 32;
|
|
$384 = ($383|0)==(0);
|
|
if ($384) {
|
|
(___fwritex($prefix$0$i,$pl$1$i,$f)|0);
|
|
$$pre$i = HEAP32[$f>>2]|0;
|
|
$386 = $$pre$i;
|
|
} else {
|
|
$386 = $382;
|
|
}
|
|
$385 = $386 & 32;
|
|
$387 = ($385|0)==(0);
|
|
if ($387) {
|
|
(___fwritex($s1$0$i,3,$f)|0);
|
|
}
|
|
$388 = $fl$1$ ^ 8192;
|
|
_pad($f,32,$w$1,$381,$388);
|
|
$389 = ($381|0)<($w$1|0);
|
|
$390 = $389 ? $w$1 : $381;
|
|
$$0$i = $390;
|
|
}
|
|
} while(0);
|
|
$cnt$0 = $cnt$1;$fmt41 = $$lcssa323;$l$0 = $$0$i;$l10n$0 = $l10n$3;
|
|
continue L1;
|
|
break;
|
|
}
|
|
default: {
|
|
$a$2 = $fmt41;$fl$6 = $fl$1$;$p$5 = $p$0;$pl$2 = 0;$prefix$2 = 35427;$z$2 = $1;
|
|
}
|
|
}
|
|
} while(0);
|
|
L313: do {
|
|
if ((label|0) == 64) {
|
|
label = 0;
|
|
$206 = $arg;
|
|
$207 = $206;
|
|
$208 = HEAP32[$207>>2]|0;
|
|
$209 = (($206) + 4)|0;
|
|
$210 = $209;
|
|
$211 = HEAP32[$210>>2]|0;
|
|
$212 = $t$1 & 32;
|
|
$213 = ($208|0)==(0);
|
|
$214 = ($211|0)==(0);
|
|
$215 = $213 & $214;
|
|
if ($215) {
|
|
$a$0 = $1;$fl$4 = $fl$3;$p$2 = $p$1;$pl$1 = 0;$prefix$1 = 35427;
|
|
label = 77;
|
|
} else {
|
|
$$012$i = $1;$217 = $208;$224 = $211;
|
|
while(1) {
|
|
$216 = $217 & 15;
|
|
$218 = (35411 + ($216)|0);
|
|
$219 = HEAP8[$218>>0]|0;
|
|
$220 = $219&255;
|
|
$221 = $220 | $212;
|
|
$222 = $221&255;
|
|
$223 = ((($$012$i)) + -1|0);
|
|
HEAP8[$223>>0] = $222;
|
|
$225 = (_bitshift64Lshr(($217|0),($224|0),4)|0);
|
|
$226 = tempRet0;
|
|
$227 = ($225|0)==(0);
|
|
$228 = ($226|0)==(0);
|
|
$229 = $227 & $228;
|
|
if ($229) {
|
|
$$lcssa344 = $223;
|
|
break;
|
|
} else {
|
|
$$012$i = $223;$217 = $225;$224 = $226;
|
|
}
|
|
}
|
|
$230 = $arg;
|
|
$231 = $230;
|
|
$232 = HEAP32[$231>>2]|0;
|
|
$233 = (($230) + 4)|0;
|
|
$234 = $233;
|
|
$235 = HEAP32[$234>>2]|0;
|
|
$236 = ($232|0)==(0);
|
|
$237 = ($235|0)==(0);
|
|
$238 = $236 & $237;
|
|
$239 = $fl$3 & 8;
|
|
$240 = ($239|0)==(0);
|
|
$or$cond17 = $240 | $238;
|
|
if ($or$cond17) {
|
|
$a$0 = $$lcssa344;$fl$4 = $fl$3;$p$2 = $p$1;$pl$1 = 0;$prefix$1 = 35427;
|
|
label = 77;
|
|
} else {
|
|
$241 = $t$1 >> 4;
|
|
$242 = (35427 + ($241)|0);
|
|
$a$0 = $$lcssa344;$fl$4 = $fl$3;$p$2 = $p$1;$pl$1 = 2;$prefix$1 = $242;
|
|
label = 77;
|
|
}
|
|
}
|
|
}
|
|
else if ((label|0) == 76) {
|
|
label = 0;
|
|
$288 = (_fmt_u($286,$287,$1)|0);
|
|
$a$0 = $288;$fl$4 = $fl$1$;$p$2 = $p$0;$pl$1 = $pl$0;$prefix$1 = $prefix$0;
|
|
label = 77;
|
|
}
|
|
else if ((label|0) == 82) {
|
|
label = 0;
|
|
$320 = (_memchr($a$1,0,$p$0)|0);
|
|
$321 = ($320|0)==(0|0);
|
|
$322 = $320;
|
|
$323 = $a$1;
|
|
$324 = (($322) - ($323))|0;
|
|
$325 = (($a$1) + ($p$0)|0);
|
|
$z$1 = $321 ? $325 : $320;
|
|
$p$3 = $321 ? $p$0 : $324;
|
|
$a$2 = $a$1;$fl$6 = $175;$p$5 = $p$3;$pl$2 = 0;$prefix$2 = 35427;$z$2 = $z$1;
|
|
}
|
|
else if ((label|0) == 86) {
|
|
label = 0;
|
|
$333 = HEAP32[$arg>>2]|0;
|
|
$i$0114 = 0;$l$1113 = 0;$ws$0115 = $333;
|
|
while(1) {
|
|
$334 = HEAP32[$ws$0115>>2]|0;
|
|
$335 = ($334|0)==(0);
|
|
if ($335) {
|
|
$i$0$lcssa = $i$0114;$l$2 = $l$1113;
|
|
break;
|
|
}
|
|
$336 = (_wctomb($mb,$334)|0);
|
|
$337 = ($336|0)<(0);
|
|
$338 = (($p$4198) - ($i$0114))|0;
|
|
$339 = ($336>>>0)>($338>>>0);
|
|
$or$cond20 = $337 | $339;
|
|
if ($or$cond20) {
|
|
$i$0$lcssa = $i$0114;$l$2 = $336;
|
|
break;
|
|
}
|
|
$340 = ((($ws$0115)) + 4|0);
|
|
$341 = (($336) + ($i$0114))|0;
|
|
$342 = ($p$4198>>>0)>($341>>>0);
|
|
if ($342) {
|
|
$i$0114 = $341;$l$1113 = $336;$ws$0115 = $340;
|
|
} else {
|
|
$i$0$lcssa = $341;$l$2 = $336;
|
|
break;
|
|
}
|
|
}
|
|
$343 = ($l$2|0)<(0);
|
|
if ($343) {
|
|
$$0 = -1;
|
|
break L1;
|
|
}
|
|
_pad($f,32,$w$1,$i$0$lcssa,$fl$1$);
|
|
$344 = ($i$0$lcssa|0)==(0);
|
|
if ($344) {
|
|
$i$0$lcssa200 = 0;
|
|
label = 98;
|
|
} else {
|
|
$345 = HEAP32[$arg>>2]|0;
|
|
$i$1125 = 0;$ws$1126 = $345;
|
|
while(1) {
|
|
$346 = HEAP32[$ws$1126>>2]|0;
|
|
$347 = ($346|0)==(0);
|
|
if ($347) {
|
|
$i$0$lcssa200 = $i$0$lcssa;
|
|
label = 98;
|
|
break L313;
|
|
}
|
|
$348 = ((($ws$1126)) + 4|0);
|
|
$349 = (_wctomb($mb,$346)|0);
|
|
$350 = (($349) + ($i$1125))|0;
|
|
$351 = ($350|0)>($i$0$lcssa|0);
|
|
if ($351) {
|
|
$i$0$lcssa200 = $i$0$lcssa;
|
|
label = 98;
|
|
break L313;
|
|
}
|
|
$352 = HEAP32[$f>>2]|0;
|
|
$353 = $352 & 32;
|
|
$354 = ($353|0)==(0);
|
|
if ($354) {
|
|
(___fwritex($mb,$349,$f)|0);
|
|
}
|
|
$355 = ($350>>>0)<($i$0$lcssa>>>0);
|
|
if ($355) {
|
|
$i$1125 = $350;$ws$1126 = $348;
|
|
} else {
|
|
$i$0$lcssa200 = $i$0$lcssa;
|
|
label = 98;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
if ((label|0) == 98) {
|
|
label = 0;
|
|
$356 = $fl$1$ ^ 8192;
|
|
_pad($f,32,$w$1,$i$0$lcssa200,$356);
|
|
$357 = ($w$1|0)>($i$0$lcssa200|0);
|
|
$358 = $357 ? $w$1 : $i$0$lcssa200;
|
|
$cnt$0 = $cnt$1;$fmt41 = $$lcssa323;$l$0 = $358;$l10n$0 = $l10n$3;
|
|
continue;
|
|
}
|
|
if ((label|0) == 77) {
|
|
label = 0;
|
|
$289 = ($p$2|0)>(-1);
|
|
$290 = $fl$4 & -65537;
|
|
$$fl$4 = $289 ? $290 : $fl$4;
|
|
$291 = $arg;
|
|
$292 = $291;
|
|
$293 = HEAP32[$292>>2]|0;
|
|
$294 = (($291) + 4)|0;
|
|
$295 = $294;
|
|
$296 = HEAP32[$295>>2]|0;
|
|
$297 = ($293|0)!=(0);
|
|
$298 = ($296|0)!=(0);
|
|
$299 = $297 | $298;
|
|
$300 = ($p$2|0)!=(0);
|
|
$or$cond = $300 | $299;
|
|
if ($or$cond) {
|
|
$301 = $a$0;
|
|
$302 = (($2) - ($301))|0;
|
|
$303 = $299&1;
|
|
$304 = $303 ^ 1;
|
|
$305 = (($304) + ($302))|0;
|
|
$306 = ($p$2|0)>($305|0);
|
|
$p$2$ = $306 ? $p$2 : $305;
|
|
$a$2 = $a$0;$fl$6 = $$fl$4;$p$5 = $p$2$;$pl$2 = $pl$1;$prefix$2 = $prefix$1;$z$2 = $1;
|
|
} else {
|
|
$a$2 = $1;$fl$6 = $$fl$4;$p$5 = 0;$pl$2 = $pl$1;$prefix$2 = $prefix$1;$z$2 = $1;
|
|
}
|
|
}
|
|
$769 = $z$2;
|
|
$770 = $a$2;
|
|
$771 = (($769) - ($770))|0;
|
|
$772 = ($p$5|0)<($771|0);
|
|
$$p$5 = $772 ? $771 : $p$5;
|
|
$773 = (($pl$2) + ($$p$5))|0;
|
|
$774 = ($w$1|0)<($773|0);
|
|
$w$2 = $774 ? $773 : $w$1;
|
|
_pad($f,32,$w$2,$773,$fl$6);
|
|
$775 = HEAP32[$f>>2]|0;
|
|
$776 = $775 & 32;
|
|
$777 = ($776|0)==(0);
|
|
if ($777) {
|
|
(___fwritex($prefix$2,$pl$2,$f)|0);
|
|
}
|
|
$778 = $fl$6 ^ 65536;
|
|
_pad($f,48,$w$2,$773,$778);
|
|
_pad($f,48,$$p$5,$771,0);
|
|
$779 = HEAP32[$f>>2]|0;
|
|
$780 = $779 & 32;
|
|
$781 = ($780|0)==(0);
|
|
if ($781) {
|
|
(___fwritex($a$2,$771,$f)|0);
|
|
}
|
|
$782 = $fl$6 ^ 8192;
|
|
_pad($f,32,$w$2,$773,$782);
|
|
$cnt$0 = $cnt$1;$fmt41 = $$lcssa323;$l$0 = $w$2;$l10n$0 = $l10n$3;
|
|
}
|
|
L348: do {
|
|
if ((label|0) == 245) {
|
|
$783 = ($f|0)==(0|0);
|
|
if ($783) {
|
|
$784 = ($l10n$0$lcssa|0)==(0);
|
|
if ($784) {
|
|
$$0 = 0;
|
|
} else {
|
|
$i$2100 = 1;
|
|
while(1) {
|
|
$785 = (($nl_type) + ($i$2100<<2)|0);
|
|
$786 = HEAP32[$785>>2]|0;
|
|
$787 = ($786|0)==(0);
|
|
if ($787) {
|
|
$i$2100$lcssa = $i$2100;
|
|
break;
|
|
}
|
|
$789 = (($nl_arg) + ($i$2100<<3)|0);
|
|
_pop_arg($789,$786,$ap);
|
|
$790 = (($i$2100) + 1)|0;
|
|
$791 = ($790|0)<(10);
|
|
if ($791) {
|
|
$i$2100 = $790;
|
|
} else {
|
|
$$0 = 1;
|
|
break L348;
|
|
}
|
|
}
|
|
$788 = ($i$2100$lcssa|0)<(10);
|
|
if ($788) {
|
|
$i$398 = $i$2100$lcssa;
|
|
while(1) {
|
|
$794 = (($nl_type) + ($i$398<<2)|0);
|
|
$795 = HEAP32[$794>>2]|0;
|
|
$796 = ($795|0)==(0);
|
|
$792 = (($i$398) + 1)|0;
|
|
if (!($796)) {
|
|
$$0 = -1;
|
|
break L348;
|
|
}
|
|
$793 = ($792|0)<(10);
|
|
if ($793) {
|
|
$i$398 = $792;
|
|
} else {
|
|
$$0 = 1;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
$$0 = 1;
|
|
}
|
|
}
|
|
} else {
|
|
$$0 = $cnt$1$lcssa;
|
|
}
|
|
}
|
|
} while(0);
|
|
STACKTOP = sp;return ($$0|0);
|
|
}
|
|
function _cleanup526($p) {
|
|
$p = $p|0;
|
|
var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$0 = ((($p)) + 68|0);
|
|
$1 = HEAP32[$0>>2]|0;
|
|
$2 = ($1|0)==(0);
|
|
if ($2) {
|
|
___unlockfile($p);
|
|
}
|
|
return;
|
|
}
|
|
function _pop_arg($arg,$type,$ap) {
|
|
$arg = $arg|0;
|
|
$type = $type|0;
|
|
$ap = $ap|0;
|
|
var $$mask = 0, $$mask1 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0.0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0.0;
|
|
var $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0;
|
|
var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0;
|
|
var $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0;
|
|
var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0;
|
|
var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $arglist_current = 0, $arglist_current11 = 0, $arglist_current14 = 0, $arglist_current17 = 0;
|
|
var $arglist_current2 = 0, $arglist_current20 = 0, $arglist_current23 = 0, $arglist_current26 = 0, $arglist_current5 = 0, $arglist_current8 = 0, $arglist_next = 0, $arglist_next12 = 0, $arglist_next15 = 0, $arglist_next18 = 0, $arglist_next21 = 0, $arglist_next24 = 0, $arglist_next27 = 0, $arglist_next3 = 0, $arglist_next6 = 0, $arglist_next9 = 0, $expanded = 0, $expanded28 = 0, $expanded30 = 0, $expanded31 = 0;
|
|
var $expanded32 = 0, $expanded34 = 0, $expanded35 = 0, $expanded37 = 0, $expanded38 = 0, $expanded39 = 0, $expanded41 = 0, $expanded42 = 0, $expanded44 = 0, $expanded45 = 0, $expanded46 = 0, $expanded48 = 0, $expanded49 = 0, $expanded51 = 0, $expanded52 = 0, $expanded53 = 0, $expanded55 = 0, $expanded56 = 0, $expanded58 = 0, $expanded59 = 0;
|
|
var $expanded60 = 0, $expanded62 = 0, $expanded63 = 0, $expanded65 = 0, $expanded66 = 0, $expanded67 = 0, $expanded69 = 0, $expanded70 = 0, $expanded72 = 0, $expanded73 = 0, $expanded74 = 0, $expanded76 = 0, $expanded77 = 0, $expanded79 = 0, $expanded80 = 0, $expanded81 = 0, $expanded83 = 0, $expanded84 = 0, $expanded86 = 0, $expanded87 = 0;
|
|
var $expanded88 = 0, $expanded90 = 0, $expanded91 = 0, $expanded93 = 0, $expanded94 = 0, $expanded95 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$0 = ($type>>>0)>(20);
|
|
L1: do {
|
|
if (!($0)) {
|
|
do {
|
|
switch ($type|0) {
|
|
case 9: {
|
|
$arglist_current = HEAP32[$ap>>2]|0;
|
|
$1 = $arglist_current;
|
|
$2 = ((0) + 4|0);
|
|
$expanded28 = $2;
|
|
$expanded = (($expanded28) - 1)|0;
|
|
$3 = (($1) + ($expanded))|0;
|
|
$4 = ((0) + 4|0);
|
|
$expanded32 = $4;
|
|
$expanded31 = (($expanded32) - 1)|0;
|
|
$expanded30 = $expanded31 ^ -1;
|
|
$5 = $3 & $expanded30;
|
|
$6 = $5;
|
|
$7 = HEAP32[$6>>2]|0;
|
|
$arglist_next = ((($6)) + 4|0);
|
|
HEAP32[$ap>>2] = $arglist_next;
|
|
HEAP32[$arg>>2] = $7;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 10: {
|
|
$arglist_current2 = HEAP32[$ap>>2]|0;
|
|
$8 = $arglist_current2;
|
|
$9 = ((0) + 4|0);
|
|
$expanded35 = $9;
|
|
$expanded34 = (($expanded35) - 1)|0;
|
|
$10 = (($8) + ($expanded34))|0;
|
|
$11 = ((0) + 4|0);
|
|
$expanded39 = $11;
|
|
$expanded38 = (($expanded39) - 1)|0;
|
|
$expanded37 = $expanded38 ^ -1;
|
|
$12 = $10 & $expanded37;
|
|
$13 = $12;
|
|
$14 = HEAP32[$13>>2]|0;
|
|
$arglist_next3 = ((($13)) + 4|0);
|
|
HEAP32[$ap>>2] = $arglist_next3;
|
|
$15 = ($14|0)<(0);
|
|
$16 = $15 << 31 >> 31;
|
|
$17 = $arg;
|
|
$18 = $17;
|
|
HEAP32[$18>>2] = $14;
|
|
$19 = (($17) + 4)|0;
|
|
$20 = $19;
|
|
HEAP32[$20>>2] = $16;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 11: {
|
|
$arglist_current5 = HEAP32[$ap>>2]|0;
|
|
$21 = $arglist_current5;
|
|
$22 = ((0) + 4|0);
|
|
$expanded42 = $22;
|
|
$expanded41 = (($expanded42) - 1)|0;
|
|
$23 = (($21) + ($expanded41))|0;
|
|
$24 = ((0) + 4|0);
|
|
$expanded46 = $24;
|
|
$expanded45 = (($expanded46) - 1)|0;
|
|
$expanded44 = $expanded45 ^ -1;
|
|
$25 = $23 & $expanded44;
|
|
$26 = $25;
|
|
$27 = HEAP32[$26>>2]|0;
|
|
$arglist_next6 = ((($26)) + 4|0);
|
|
HEAP32[$ap>>2] = $arglist_next6;
|
|
$28 = $arg;
|
|
$29 = $28;
|
|
HEAP32[$29>>2] = $27;
|
|
$30 = (($28) + 4)|0;
|
|
$31 = $30;
|
|
HEAP32[$31>>2] = 0;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 12: {
|
|
$arglist_current8 = HEAP32[$ap>>2]|0;
|
|
$32 = $arglist_current8;
|
|
$33 = ((0) + 8|0);
|
|
$expanded49 = $33;
|
|
$expanded48 = (($expanded49) - 1)|0;
|
|
$34 = (($32) + ($expanded48))|0;
|
|
$35 = ((0) + 8|0);
|
|
$expanded53 = $35;
|
|
$expanded52 = (($expanded53) - 1)|0;
|
|
$expanded51 = $expanded52 ^ -1;
|
|
$36 = $34 & $expanded51;
|
|
$37 = $36;
|
|
$38 = $37;
|
|
$39 = $38;
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$41 = (($38) + 4)|0;
|
|
$42 = $41;
|
|
$43 = HEAP32[$42>>2]|0;
|
|
$arglist_next9 = ((($37)) + 8|0);
|
|
HEAP32[$ap>>2] = $arglist_next9;
|
|
$44 = $arg;
|
|
$45 = $44;
|
|
HEAP32[$45>>2] = $40;
|
|
$46 = (($44) + 4)|0;
|
|
$47 = $46;
|
|
HEAP32[$47>>2] = $43;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 13: {
|
|
$arglist_current11 = HEAP32[$ap>>2]|0;
|
|
$48 = $arglist_current11;
|
|
$49 = ((0) + 4|0);
|
|
$expanded56 = $49;
|
|
$expanded55 = (($expanded56) - 1)|0;
|
|
$50 = (($48) + ($expanded55))|0;
|
|
$51 = ((0) + 4|0);
|
|
$expanded60 = $51;
|
|
$expanded59 = (($expanded60) - 1)|0;
|
|
$expanded58 = $expanded59 ^ -1;
|
|
$52 = $50 & $expanded58;
|
|
$53 = $52;
|
|
$54 = HEAP32[$53>>2]|0;
|
|
$arglist_next12 = ((($53)) + 4|0);
|
|
HEAP32[$ap>>2] = $arglist_next12;
|
|
$55 = $54&65535;
|
|
$56 = $55 << 16 >> 16;
|
|
$57 = ($56|0)<(0);
|
|
$58 = $57 << 31 >> 31;
|
|
$59 = $arg;
|
|
$60 = $59;
|
|
HEAP32[$60>>2] = $56;
|
|
$61 = (($59) + 4)|0;
|
|
$62 = $61;
|
|
HEAP32[$62>>2] = $58;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 14: {
|
|
$arglist_current14 = HEAP32[$ap>>2]|0;
|
|
$63 = $arglist_current14;
|
|
$64 = ((0) + 4|0);
|
|
$expanded63 = $64;
|
|
$expanded62 = (($expanded63) - 1)|0;
|
|
$65 = (($63) + ($expanded62))|0;
|
|
$66 = ((0) + 4|0);
|
|
$expanded67 = $66;
|
|
$expanded66 = (($expanded67) - 1)|0;
|
|
$expanded65 = $expanded66 ^ -1;
|
|
$67 = $65 & $expanded65;
|
|
$68 = $67;
|
|
$69 = HEAP32[$68>>2]|0;
|
|
$arglist_next15 = ((($68)) + 4|0);
|
|
HEAP32[$ap>>2] = $arglist_next15;
|
|
$$mask1 = $69 & 65535;
|
|
$70 = $arg;
|
|
$71 = $70;
|
|
HEAP32[$71>>2] = $$mask1;
|
|
$72 = (($70) + 4)|0;
|
|
$73 = $72;
|
|
HEAP32[$73>>2] = 0;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 15: {
|
|
$arglist_current17 = HEAP32[$ap>>2]|0;
|
|
$74 = $arglist_current17;
|
|
$75 = ((0) + 4|0);
|
|
$expanded70 = $75;
|
|
$expanded69 = (($expanded70) - 1)|0;
|
|
$76 = (($74) + ($expanded69))|0;
|
|
$77 = ((0) + 4|0);
|
|
$expanded74 = $77;
|
|
$expanded73 = (($expanded74) - 1)|0;
|
|
$expanded72 = $expanded73 ^ -1;
|
|
$78 = $76 & $expanded72;
|
|
$79 = $78;
|
|
$80 = HEAP32[$79>>2]|0;
|
|
$arglist_next18 = ((($79)) + 4|0);
|
|
HEAP32[$ap>>2] = $arglist_next18;
|
|
$81 = $80&255;
|
|
$82 = $81 << 24 >> 24;
|
|
$83 = ($82|0)<(0);
|
|
$84 = $83 << 31 >> 31;
|
|
$85 = $arg;
|
|
$86 = $85;
|
|
HEAP32[$86>>2] = $82;
|
|
$87 = (($85) + 4)|0;
|
|
$88 = $87;
|
|
HEAP32[$88>>2] = $84;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 16: {
|
|
$arglist_current20 = HEAP32[$ap>>2]|0;
|
|
$89 = $arglist_current20;
|
|
$90 = ((0) + 4|0);
|
|
$expanded77 = $90;
|
|
$expanded76 = (($expanded77) - 1)|0;
|
|
$91 = (($89) + ($expanded76))|0;
|
|
$92 = ((0) + 4|0);
|
|
$expanded81 = $92;
|
|
$expanded80 = (($expanded81) - 1)|0;
|
|
$expanded79 = $expanded80 ^ -1;
|
|
$93 = $91 & $expanded79;
|
|
$94 = $93;
|
|
$95 = HEAP32[$94>>2]|0;
|
|
$arglist_next21 = ((($94)) + 4|0);
|
|
HEAP32[$ap>>2] = $arglist_next21;
|
|
$$mask = $95 & 255;
|
|
$96 = $arg;
|
|
$97 = $96;
|
|
HEAP32[$97>>2] = $$mask;
|
|
$98 = (($96) + 4)|0;
|
|
$99 = $98;
|
|
HEAP32[$99>>2] = 0;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 17: {
|
|
$arglist_current23 = HEAP32[$ap>>2]|0;
|
|
$100 = $arglist_current23;
|
|
$101 = ((0) + 8|0);
|
|
$expanded84 = $101;
|
|
$expanded83 = (($expanded84) - 1)|0;
|
|
$102 = (($100) + ($expanded83))|0;
|
|
$103 = ((0) + 8|0);
|
|
$expanded88 = $103;
|
|
$expanded87 = (($expanded88) - 1)|0;
|
|
$expanded86 = $expanded87 ^ -1;
|
|
$104 = $102 & $expanded86;
|
|
$105 = $104;
|
|
$106 = +HEAPF64[$105>>3];
|
|
$arglist_next24 = ((($105)) + 8|0);
|
|
HEAP32[$ap>>2] = $arglist_next24;
|
|
HEAPF64[$arg>>3] = $106;
|
|
break L1;
|
|
break;
|
|
}
|
|
case 18: {
|
|
$arglist_current26 = HEAP32[$ap>>2]|0;
|
|
$107 = $arglist_current26;
|
|
$108 = ((0) + 8|0);
|
|
$expanded91 = $108;
|
|
$expanded90 = (($expanded91) - 1)|0;
|
|
$109 = (($107) + ($expanded90))|0;
|
|
$110 = ((0) + 8|0);
|
|
$expanded95 = $110;
|
|
$expanded94 = (($expanded95) - 1)|0;
|
|
$expanded93 = $expanded94 ^ -1;
|
|
$111 = $109 & $expanded93;
|
|
$112 = $111;
|
|
$113 = +HEAPF64[$112>>3];
|
|
$arglist_next27 = ((($112)) + 8|0);
|
|
HEAP32[$ap>>2] = $arglist_next27;
|
|
HEAPF64[$arg>>3] = $113;
|
|
break L1;
|
|
break;
|
|
}
|
|
default: {
|
|
break L1;
|
|
}
|
|
}
|
|
} while(0);
|
|
}
|
|
} while(0);
|
|
return;
|
|
}
|
|
function _fmt_u($0,$1,$s) {
|
|
$0 = $0|0;
|
|
$1 = $1|0;
|
|
$s = $s|0;
|
|
var $$0$lcssa = 0, $$01$lcssa$off0 = 0, $$05 = 0, $$1$lcssa = 0, $$12 = 0, $$lcssa20 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0;
|
|
var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $y$03 = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$2 = ($1>>>0)>(0);
|
|
$3 = ($0>>>0)>(4294967295);
|
|
$4 = ($1|0)==(0);
|
|
$5 = $4 & $3;
|
|
$6 = $2 | $5;
|
|
if ($6) {
|
|
$$05 = $s;$7 = $0;$8 = $1;
|
|
while(1) {
|
|
$9 = (___uremdi3(($7|0),($8|0),10,0)|0);
|
|
$10 = tempRet0;
|
|
$11 = $9 | 48;
|
|
$12 = $11&255;
|
|
$13 = ((($$05)) + -1|0);
|
|
HEAP8[$13>>0] = $12;
|
|
$14 = (___udivdi3(($7|0),($8|0),10,0)|0);
|
|
$15 = tempRet0;
|
|
$16 = ($8>>>0)>(9);
|
|
$17 = ($7>>>0)>(4294967295);
|
|
$18 = ($8|0)==(9);
|
|
$19 = $18 & $17;
|
|
$20 = $16 | $19;
|
|
if ($20) {
|
|
$$05 = $13;$7 = $14;$8 = $15;
|
|
} else {
|
|
$$lcssa20 = $13;$28 = $14;$29 = $15;
|
|
break;
|
|
}
|
|
}
|
|
$$0$lcssa = $$lcssa20;$$01$lcssa$off0 = $28;
|
|
} else {
|
|
$$0$lcssa = $s;$$01$lcssa$off0 = $0;
|
|
}
|
|
$21 = ($$01$lcssa$off0|0)==(0);
|
|
if ($21) {
|
|
$$1$lcssa = $$0$lcssa;
|
|
} else {
|
|
$$12 = $$0$lcssa;$y$03 = $$01$lcssa$off0;
|
|
while(1) {
|
|
$22 = (($y$03>>>0) % 10)&-1;
|
|
$23 = $22 | 48;
|
|
$24 = $23&255;
|
|
$25 = ((($$12)) + -1|0);
|
|
HEAP8[$25>>0] = $24;
|
|
$26 = (($y$03>>>0) / 10)&-1;
|
|
$27 = ($y$03>>>0)<(10);
|
|
if ($27) {
|
|
$$1$lcssa = $25;
|
|
break;
|
|
} else {
|
|
$$12 = $25;$y$03 = $26;
|
|
}
|
|
}
|
|
}
|
|
return ($$1$lcssa|0);
|
|
}
|
|
function _pad($f,$c,$w,$l,$fl) {
|
|
$f = $f|0;
|
|
$c = $c|0;
|
|
$w = $w|0;
|
|
$l = $l|0;
|
|
$fl = $fl|0;
|
|
var $$0$lcssa6 = 0, $$02 = 0, $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
|
|
var $8 = 0, $9 = 0, $or$cond = 0, $pad = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
|
|
$pad = sp;
|
|
$0 = $fl & 73728;
|
|
$1 = ($0|0)==(0);
|
|
$2 = ($w|0)>($l|0);
|
|
$or$cond = $2 & $1;
|
|
do {
|
|
if ($or$cond) {
|
|
$3 = (($w) - ($l))|0;
|
|
$4 = ($3>>>0)>(256);
|
|
$5 = $4 ? 256 : $3;
|
|
_memset(($pad|0),($c|0),($5|0))|0;
|
|
$6 = ($3>>>0)>(255);
|
|
$7 = HEAP32[$f>>2]|0;
|
|
$8 = $7 & 32;
|
|
$9 = ($8|0)==(0);
|
|
if ($6) {
|
|
$10 = (($w) - ($l))|0;
|
|
$$02 = $3;$17 = $7;$18 = $9;
|
|
while(1) {
|
|
if ($18) {
|
|
(___fwritex($pad,256,$f)|0);
|
|
$$pre = HEAP32[$f>>2]|0;
|
|
$14 = $$pre;
|
|
} else {
|
|
$14 = $17;
|
|
}
|
|
$11 = (($$02) + -256)|0;
|
|
$12 = ($11>>>0)>(255);
|
|
$13 = $14 & 32;
|
|
$15 = ($13|0)==(0);
|
|
if ($12) {
|
|
$$02 = $11;$17 = $14;$18 = $15;
|
|
} else {
|
|
break;
|
|
}
|
|
}
|
|
$16 = $10 & 255;
|
|
if ($15) {
|
|
$$0$lcssa6 = $16;
|
|
} else {
|
|
break;
|
|
}
|
|
} else {
|
|
if ($9) {
|
|
$$0$lcssa6 = $3;
|
|
} else {
|
|
break;
|
|
}
|
|
}
|
|
(___fwritex($pad,$$0$lcssa6,$f)|0);
|
|
}
|
|
} while(0);
|
|
STACKTOP = sp;return;
|
|
}
|
|
function _malloc($bytes) {
|
|
$bytes = $bytes|0;
|
|
var $$3$i = 0, $$lcssa = 0, $$lcssa211 = 0, $$lcssa215 = 0, $$lcssa216 = 0, $$lcssa217 = 0, $$lcssa219 = 0, $$lcssa222 = 0, $$lcssa224 = 0, $$lcssa226 = 0, $$lcssa228 = 0, $$lcssa230 = 0, $$lcssa232 = 0, $$pre = 0, $$pre$i = 0, $$pre$i$i = 0, $$pre$i22$i = 0, $$pre$i25 = 0, $$pre$phi$i$iZ2D = 0, $$pre$phi$i23$iZ2D = 0;
|
|
var $$pre$phi$i26Z2D = 0, $$pre$phi$iZ2D = 0, $$pre$phi58$i$iZ2D = 0, $$pre$phiZ2D = 0, $$pre105 = 0, $$pre106 = 0, $$pre14$i$i = 0, $$pre43$i = 0, $$pre56$i$i = 0, $$pre57$i$i = 0, $$pre8$i = 0, $$rsize$0$i = 0, $$rsize$3$i = 0, $$sum = 0, $$sum$i$i = 0, $$sum$i$i$i = 0, $$sum$i13$i = 0, $$sum$i14$i = 0, $$sum$i17$i = 0, $$sum$i19$i = 0;
|
|
var $$sum$i2334 = 0, $$sum$i32 = 0, $$sum$i35 = 0, $$sum1 = 0, $$sum1$i = 0, $$sum1$i$i = 0, $$sum1$i15$i = 0, $$sum1$i20$i = 0, $$sum1$i24 = 0, $$sum10 = 0, $$sum10$i = 0, $$sum10$i$i = 0, $$sum11$i = 0, $$sum11$i$i = 0, $$sum1112 = 0, $$sum112$i = 0, $$sum113$i = 0, $$sum114$i = 0, $$sum115$i = 0, $$sum116$i = 0;
|
|
var $$sum117$i = 0, $$sum118$i = 0, $$sum119$i = 0, $$sum12$i = 0, $$sum12$i$i = 0, $$sum120$i = 0, $$sum121$i = 0, $$sum122$i = 0, $$sum123$i = 0, $$sum124$i = 0, $$sum125$i = 0, $$sum13$i = 0, $$sum13$i$i = 0, $$sum14$i$i = 0, $$sum15$i = 0, $$sum15$i$i = 0, $$sum16$i = 0, $$sum16$i$i = 0, $$sum17$i = 0, $$sum17$i$i = 0;
|
|
var $$sum18$i = 0, $$sum1819$i$i = 0, $$sum2 = 0, $$sum2$i = 0, $$sum2$i$i = 0, $$sum2$i$i$i = 0, $$sum2$i16$i = 0, $$sum2$i18$i = 0, $$sum2$i21$i = 0, $$sum20$i$i = 0, $$sum21$i$i = 0, $$sum22$i$i = 0, $$sum23$i$i = 0, $$sum24$i$i = 0, $$sum25$i$i = 0, $$sum27$i$i = 0, $$sum28$i$i = 0, $$sum29$i$i = 0, $$sum3$i = 0, $$sum3$i27 = 0;
|
|
var $$sum30$i$i = 0, $$sum3132$i$i = 0, $$sum34$i$i = 0, $$sum3536$i$i = 0, $$sum3738$i$i = 0, $$sum39$i$i = 0, $$sum4 = 0, $$sum4$i = 0, $$sum4$i$i = 0, $$sum4$i28 = 0, $$sum40$i$i = 0, $$sum41$i$i = 0, $$sum42$i$i = 0, $$sum5$i = 0, $$sum5$i$i = 0, $$sum56 = 0, $$sum6$i = 0, $$sum67$i$i = 0, $$sum7$i = 0, $$sum8$i = 0;
|
|
var $$sum9 = 0, $$sum9$i = 0, $$sum9$i$i = 0, $$tsize$1$i = 0, $$v$0$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0;
|
|
var $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0;
|
|
var $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0;
|
|
var $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0;
|
|
var $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0;
|
|
var $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0;
|
|
var $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0;
|
|
var $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0;
|
|
var $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0;
|
|
var $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0;
|
|
var $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0;
|
|
var $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0;
|
|
var $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0;
|
|
var $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0;
|
|
var $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0;
|
|
var $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0;
|
|
var $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0;
|
|
var $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0;
|
|
var $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0;
|
|
var $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0;
|
|
var $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0;
|
|
var $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0;
|
|
var $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0;
|
|
var $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0;
|
|
var $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0;
|
|
var $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0;
|
|
var $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0;
|
|
var $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0;
|
|
var $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0;
|
|
var $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0;
|
|
var $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0;
|
|
var $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0;
|
|
var $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0;
|
|
var $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0;
|
|
var $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0;
|
|
var $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0;
|
|
var $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0;
|
|
var $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0;
|
|
var $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0;
|
|
var $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0;
|
|
var $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0;
|
|
var $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0;
|
|
var $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0;
|
|
var $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0;
|
|
var $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0;
|
|
var $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0;
|
|
var $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0;
|
|
var $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0;
|
|
var $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0;
|
|
var $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0;
|
|
var $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0;
|
|
var $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0;
|
|
var $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0;
|
|
var $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $F$0$i$i = 0, $F1$0$i = 0, $F4$0 = 0, $F4$0$i$i = 0;
|
|
var $F5$0$i = 0, $I1$0$i$i = 0, $I7$0$i = 0, $I7$0$i$i = 0, $K12$029$i = 0, $K2$07$i$i = 0, $K8$051$i$i = 0, $R$0$i = 0, $R$0$i$i = 0, $R$0$i$i$lcssa = 0, $R$0$i$lcssa = 0, $R$0$i18 = 0, $R$0$i18$lcssa = 0, $R$1$i = 0, $R$1$i$i = 0, $R$1$i20 = 0, $RP$0$i = 0, $RP$0$i$i = 0, $RP$0$i$i$lcssa = 0, $RP$0$i$lcssa = 0;
|
|
var $RP$0$i17 = 0, $RP$0$i17$lcssa = 0, $T$0$lcssa$i = 0, $T$0$lcssa$i$i = 0, $T$0$lcssa$i25$i = 0, $T$028$i = 0, $T$028$i$lcssa = 0, $T$050$i$i = 0, $T$050$i$i$lcssa = 0, $T$06$i$i = 0, $T$06$i$i$lcssa = 0, $br$0$ph$i = 0, $cond$i = 0, $cond$i$i = 0, $cond$i21 = 0, $exitcond$i$i = 0, $i$02$i$i = 0, $idx$0$i = 0, $mem$0 = 0, $nb$0 = 0;
|
|
var $not$$i = 0, $not$$i$i = 0, $not$$i26$i = 0, $oldfirst$0$i$i = 0, $or$cond$i = 0, $or$cond$i30 = 0, $or$cond1$i = 0, $or$cond19$i = 0, $or$cond2$i = 0, $or$cond3$i = 0, $or$cond5$i = 0, $or$cond57$i = 0, $or$cond6$i = 0, $or$cond8$i = 0, $or$cond9$i = 0, $qsize$0$i$i = 0, $rsize$0$i = 0, $rsize$0$i$lcssa = 0, $rsize$0$i15 = 0, $rsize$1$i = 0;
|
|
var $rsize$2$i = 0, $rsize$3$lcssa$i = 0, $rsize$331$i = 0, $rst$0$i = 0, $rst$1$i = 0, $sizebits$0$i = 0, $sp$0$i$i = 0, $sp$0$i$i$i = 0, $sp$084$i = 0, $sp$084$i$lcssa = 0, $sp$183$i = 0, $sp$183$i$lcssa = 0, $ssize$0$$i = 0, $ssize$0$i = 0, $ssize$1$ph$i = 0, $ssize$2$i = 0, $t$0$i = 0, $t$0$i14 = 0, $t$1$i = 0, $t$2$ph$i = 0;
|
|
var $t$2$v$3$i = 0, $t$230$i = 0, $tbase$255$i = 0, $tsize$0$ph$i = 0, $tsize$0323944$i = 0, $tsize$1$i = 0, $tsize$254$i = 0, $v$0$i = 0, $v$0$i$lcssa = 0, $v$0$i16 = 0, $v$1$i = 0, $v$2$i = 0, $v$3$lcssa$i = 0, $v$3$ph$i = 0, $v$332$i = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$0 = ($bytes>>>0)<(245);
|
|
do {
|
|
if ($0) {
|
|
$1 = ($bytes>>>0)<(11);
|
|
$2 = (($bytes) + 11)|0;
|
|
$3 = $2 & -8;
|
|
$4 = $1 ? 16 : $3;
|
|
$5 = $4 >>> 3;
|
|
$6 = HEAP32[12900>>2]|0;
|
|
$7 = $6 >>> $5;
|
|
$8 = $7 & 3;
|
|
$9 = ($8|0)==(0);
|
|
if (!($9)) {
|
|
$10 = $7 & 1;
|
|
$11 = $10 ^ 1;
|
|
$12 = (($11) + ($5))|0;
|
|
$13 = $12 << 1;
|
|
$14 = (12940 + ($13<<2)|0);
|
|
$$sum10 = (($13) + 2)|0;
|
|
$15 = (12940 + ($$sum10<<2)|0);
|
|
$16 = HEAP32[$15>>2]|0;
|
|
$17 = ((($16)) + 8|0);
|
|
$18 = HEAP32[$17>>2]|0;
|
|
$19 = ($14|0)==($18|0);
|
|
do {
|
|
if ($19) {
|
|
$20 = 1 << $12;
|
|
$21 = $20 ^ -1;
|
|
$22 = $6 & $21;
|
|
HEAP32[12900>>2] = $22;
|
|
} else {
|
|
$23 = HEAP32[(12916)>>2]|0;
|
|
$24 = ($18>>>0)<($23>>>0);
|
|
if ($24) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$25 = ((($18)) + 12|0);
|
|
$26 = HEAP32[$25>>2]|0;
|
|
$27 = ($26|0)==($16|0);
|
|
if ($27) {
|
|
HEAP32[$25>>2] = $14;
|
|
HEAP32[$15>>2] = $18;
|
|
break;
|
|
} else {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$28 = $12 << 3;
|
|
$29 = $28 | 3;
|
|
$30 = ((($16)) + 4|0);
|
|
HEAP32[$30>>2] = $29;
|
|
$$sum1112 = $28 | 4;
|
|
$31 = (($16) + ($$sum1112)|0);
|
|
$32 = HEAP32[$31>>2]|0;
|
|
$33 = $32 | 1;
|
|
HEAP32[$31>>2] = $33;
|
|
$mem$0 = $17;
|
|
return ($mem$0|0);
|
|
}
|
|
$34 = HEAP32[(12908)>>2]|0;
|
|
$35 = ($4>>>0)>($34>>>0);
|
|
if ($35) {
|
|
$36 = ($7|0)==(0);
|
|
if (!($36)) {
|
|
$37 = $7 << $5;
|
|
$38 = 2 << $5;
|
|
$39 = (0 - ($38))|0;
|
|
$40 = $38 | $39;
|
|
$41 = $37 & $40;
|
|
$42 = (0 - ($41))|0;
|
|
$43 = $41 & $42;
|
|
$44 = (($43) + -1)|0;
|
|
$45 = $44 >>> 12;
|
|
$46 = $45 & 16;
|
|
$47 = $44 >>> $46;
|
|
$48 = $47 >>> 5;
|
|
$49 = $48 & 8;
|
|
$50 = $49 | $46;
|
|
$51 = $47 >>> $49;
|
|
$52 = $51 >>> 2;
|
|
$53 = $52 & 4;
|
|
$54 = $50 | $53;
|
|
$55 = $51 >>> $53;
|
|
$56 = $55 >>> 1;
|
|
$57 = $56 & 2;
|
|
$58 = $54 | $57;
|
|
$59 = $55 >>> $57;
|
|
$60 = $59 >>> 1;
|
|
$61 = $60 & 1;
|
|
$62 = $58 | $61;
|
|
$63 = $59 >>> $61;
|
|
$64 = (($62) + ($63))|0;
|
|
$65 = $64 << 1;
|
|
$66 = (12940 + ($65<<2)|0);
|
|
$$sum4 = (($65) + 2)|0;
|
|
$67 = (12940 + ($$sum4<<2)|0);
|
|
$68 = HEAP32[$67>>2]|0;
|
|
$69 = ((($68)) + 8|0);
|
|
$70 = HEAP32[$69>>2]|0;
|
|
$71 = ($66|0)==($70|0);
|
|
do {
|
|
if ($71) {
|
|
$72 = 1 << $64;
|
|
$73 = $72 ^ -1;
|
|
$74 = $6 & $73;
|
|
HEAP32[12900>>2] = $74;
|
|
$88 = $34;
|
|
} else {
|
|
$75 = HEAP32[(12916)>>2]|0;
|
|
$76 = ($70>>>0)<($75>>>0);
|
|
if ($76) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$77 = ((($70)) + 12|0);
|
|
$78 = HEAP32[$77>>2]|0;
|
|
$79 = ($78|0)==($68|0);
|
|
if ($79) {
|
|
HEAP32[$77>>2] = $66;
|
|
HEAP32[$67>>2] = $70;
|
|
$$pre = HEAP32[(12908)>>2]|0;
|
|
$88 = $$pre;
|
|
break;
|
|
} else {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$80 = $64 << 3;
|
|
$81 = (($80) - ($4))|0;
|
|
$82 = $4 | 3;
|
|
$83 = ((($68)) + 4|0);
|
|
HEAP32[$83>>2] = $82;
|
|
$84 = (($68) + ($4)|0);
|
|
$85 = $81 | 1;
|
|
$$sum56 = $4 | 4;
|
|
$86 = (($68) + ($$sum56)|0);
|
|
HEAP32[$86>>2] = $85;
|
|
$87 = (($68) + ($80)|0);
|
|
HEAP32[$87>>2] = $81;
|
|
$89 = ($88|0)==(0);
|
|
if (!($89)) {
|
|
$90 = HEAP32[(12920)>>2]|0;
|
|
$91 = $88 >>> 3;
|
|
$92 = $91 << 1;
|
|
$93 = (12940 + ($92<<2)|0);
|
|
$94 = HEAP32[12900>>2]|0;
|
|
$95 = 1 << $91;
|
|
$96 = $94 & $95;
|
|
$97 = ($96|0)==(0);
|
|
if ($97) {
|
|
$98 = $94 | $95;
|
|
HEAP32[12900>>2] = $98;
|
|
$$pre105 = (($92) + 2)|0;
|
|
$$pre106 = (12940 + ($$pre105<<2)|0);
|
|
$$pre$phiZ2D = $$pre106;$F4$0 = $93;
|
|
} else {
|
|
$$sum9 = (($92) + 2)|0;
|
|
$99 = (12940 + ($$sum9<<2)|0);
|
|
$100 = HEAP32[$99>>2]|0;
|
|
$101 = HEAP32[(12916)>>2]|0;
|
|
$102 = ($100>>>0)<($101>>>0);
|
|
if ($102) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$$pre$phiZ2D = $99;$F4$0 = $100;
|
|
}
|
|
}
|
|
HEAP32[$$pre$phiZ2D>>2] = $90;
|
|
$103 = ((($F4$0)) + 12|0);
|
|
HEAP32[$103>>2] = $90;
|
|
$104 = ((($90)) + 8|0);
|
|
HEAP32[$104>>2] = $F4$0;
|
|
$105 = ((($90)) + 12|0);
|
|
HEAP32[$105>>2] = $93;
|
|
}
|
|
HEAP32[(12908)>>2] = $81;
|
|
HEAP32[(12920)>>2] = $84;
|
|
$mem$0 = $69;
|
|
return ($mem$0|0);
|
|
}
|
|
$106 = HEAP32[(12904)>>2]|0;
|
|
$107 = ($106|0)==(0);
|
|
if ($107) {
|
|
$nb$0 = $4;
|
|
} else {
|
|
$108 = (0 - ($106))|0;
|
|
$109 = $106 & $108;
|
|
$110 = (($109) + -1)|0;
|
|
$111 = $110 >>> 12;
|
|
$112 = $111 & 16;
|
|
$113 = $110 >>> $112;
|
|
$114 = $113 >>> 5;
|
|
$115 = $114 & 8;
|
|
$116 = $115 | $112;
|
|
$117 = $113 >>> $115;
|
|
$118 = $117 >>> 2;
|
|
$119 = $118 & 4;
|
|
$120 = $116 | $119;
|
|
$121 = $117 >>> $119;
|
|
$122 = $121 >>> 1;
|
|
$123 = $122 & 2;
|
|
$124 = $120 | $123;
|
|
$125 = $121 >>> $123;
|
|
$126 = $125 >>> 1;
|
|
$127 = $126 & 1;
|
|
$128 = $124 | $127;
|
|
$129 = $125 >>> $127;
|
|
$130 = (($128) + ($129))|0;
|
|
$131 = (13204 + ($130<<2)|0);
|
|
$132 = HEAP32[$131>>2]|0;
|
|
$133 = ((($132)) + 4|0);
|
|
$134 = HEAP32[$133>>2]|0;
|
|
$135 = $134 & -8;
|
|
$136 = (($135) - ($4))|0;
|
|
$rsize$0$i = $136;$t$0$i = $132;$v$0$i = $132;
|
|
while(1) {
|
|
$137 = ((($t$0$i)) + 16|0);
|
|
$138 = HEAP32[$137>>2]|0;
|
|
$139 = ($138|0)==(0|0);
|
|
if ($139) {
|
|
$140 = ((($t$0$i)) + 20|0);
|
|
$141 = HEAP32[$140>>2]|0;
|
|
$142 = ($141|0)==(0|0);
|
|
if ($142) {
|
|
$rsize$0$i$lcssa = $rsize$0$i;$v$0$i$lcssa = $v$0$i;
|
|
break;
|
|
} else {
|
|
$144 = $141;
|
|
}
|
|
} else {
|
|
$144 = $138;
|
|
}
|
|
$143 = ((($144)) + 4|0);
|
|
$145 = HEAP32[$143>>2]|0;
|
|
$146 = $145 & -8;
|
|
$147 = (($146) - ($4))|0;
|
|
$148 = ($147>>>0)<($rsize$0$i>>>0);
|
|
$$rsize$0$i = $148 ? $147 : $rsize$0$i;
|
|
$$v$0$i = $148 ? $144 : $v$0$i;
|
|
$rsize$0$i = $$rsize$0$i;$t$0$i = $144;$v$0$i = $$v$0$i;
|
|
}
|
|
$149 = HEAP32[(12916)>>2]|0;
|
|
$150 = ($v$0$i$lcssa>>>0)<($149>>>0);
|
|
if ($150) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$151 = (($v$0$i$lcssa) + ($4)|0);
|
|
$152 = ($v$0$i$lcssa>>>0)<($151>>>0);
|
|
if (!($152)) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$153 = ((($v$0$i$lcssa)) + 24|0);
|
|
$154 = HEAP32[$153>>2]|0;
|
|
$155 = ((($v$0$i$lcssa)) + 12|0);
|
|
$156 = HEAP32[$155>>2]|0;
|
|
$157 = ($156|0)==($v$0$i$lcssa|0);
|
|
do {
|
|
if ($157) {
|
|
$167 = ((($v$0$i$lcssa)) + 20|0);
|
|
$168 = HEAP32[$167>>2]|0;
|
|
$169 = ($168|0)==(0|0);
|
|
if ($169) {
|
|
$170 = ((($v$0$i$lcssa)) + 16|0);
|
|
$171 = HEAP32[$170>>2]|0;
|
|
$172 = ($171|0)==(0|0);
|
|
if ($172) {
|
|
$R$1$i = 0;
|
|
break;
|
|
} else {
|
|
$R$0$i = $171;$RP$0$i = $170;
|
|
}
|
|
} else {
|
|
$R$0$i = $168;$RP$0$i = $167;
|
|
}
|
|
while(1) {
|
|
$173 = ((($R$0$i)) + 20|0);
|
|
$174 = HEAP32[$173>>2]|0;
|
|
$175 = ($174|0)==(0|0);
|
|
if (!($175)) {
|
|
$R$0$i = $174;$RP$0$i = $173;
|
|
continue;
|
|
}
|
|
$176 = ((($R$0$i)) + 16|0);
|
|
$177 = HEAP32[$176>>2]|0;
|
|
$178 = ($177|0)==(0|0);
|
|
if ($178) {
|
|
$R$0$i$lcssa = $R$0$i;$RP$0$i$lcssa = $RP$0$i;
|
|
break;
|
|
} else {
|
|
$R$0$i = $177;$RP$0$i = $176;
|
|
}
|
|
}
|
|
$179 = ($RP$0$i$lcssa>>>0)<($149>>>0);
|
|
if ($179) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
HEAP32[$RP$0$i$lcssa>>2] = 0;
|
|
$R$1$i = $R$0$i$lcssa;
|
|
break;
|
|
}
|
|
} else {
|
|
$158 = ((($v$0$i$lcssa)) + 8|0);
|
|
$159 = HEAP32[$158>>2]|0;
|
|
$160 = ($159>>>0)<($149>>>0);
|
|
if ($160) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$161 = ((($159)) + 12|0);
|
|
$162 = HEAP32[$161>>2]|0;
|
|
$163 = ($162|0)==($v$0$i$lcssa|0);
|
|
if (!($163)) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$164 = ((($156)) + 8|0);
|
|
$165 = HEAP32[$164>>2]|0;
|
|
$166 = ($165|0)==($v$0$i$lcssa|0);
|
|
if ($166) {
|
|
HEAP32[$161>>2] = $156;
|
|
HEAP32[$164>>2] = $159;
|
|
$R$1$i = $156;
|
|
break;
|
|
} else {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$180 = ($154|0)==(0|0);
|
|
do {
|
|
if (!($180)) {
|
|
$181 = ((($v$0$i$lcssa)) + 28|0);
|
|
$182 = HEAP32[$181>>2]|0;
|
|
$183 = (13204 + ($182<<2)|0);
|
|
$184 = HEAP32[$183>>2]|0;
|
|
$185 = ($v$0$i$lcssa|0)==($184|0);
|
|
if ($185) {
|
|
HEAP32[$183>>2] = $R$1$i;
|
|
$cond$i = ($R$1$i|0)==(0|0);
|
|
if ($cond$i) {
|
|
$186 = 1 << $182;
|
|
$187 = $186 ^ -1;
|
|
$188 = HEAP32[(12904)>>2]|0;
|
|
$189 = $188 & $187;
|
|
HEAP32[(12904)>>2] = $189;
|
|
break;
|
|
}
|
|
} else {
|
|
$190 = HEAP32[(12916)>>2]|0;
|
|
$191 = ($154>>>0)<($190>>>0);
|
|
if ($191) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$192 = ((($154)) + 16|0);
|
|
$193 = HEAP32[$192>>2]|0;
|
|
$194 = ($193|0)==($v$0$i$lcssa|0);
|
|
if ($194) {
|
|
HEAP32[$192>>2] = $R$1$i;
|
|
} else {
|
|
$195 = ((($154)) + 20|0);
|
|
HEAP32[$195>>2] = $R$1$i;
|
|
}
|
|
$196 = ($R$1$i|0)==(0|0);
|
|
if ($196) {
|
|
break;
|
|
}
|
|
}
|
|
$197 = HEAP32[(12916)>>2]|0;
|
|
$198 = ($R$1$i>>>0)<($197>>>0);
|
|
if ($198) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$199 = ((($R$1$i)) + 24|0);
|
|
HEAP32[$199>>2] = $154;
|
|
$200 = ((($v$0$i$lcssa)) + 16|0);
|
|
$201 = HEAP32[$200>>2]|0;
|
|
$202 = ($201|0)==(0|0);
|
|
do {
|
|
if (!($202)) {
|
|
$203 = ($201>>>0)<($197>>>0);
|
|
if ($203) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$204 = ((($R$1$i)) + 16|0);
|
|
HEAP32[$204>>2] = $201;
|
|
$205 = ((($201)) + 24|0);
|
|
HEAP32[$205>>2] = $R$1$i;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$206 = ((($v$0$i$lcssa)) + 20|0);
|
|
$207 = HEAP32[$206>>2]|0;
|
|
$208 = ($207|0)==(0|0);
|
|
if (!($208)) {
|
|
$209 = HEAP32[(12916)>>2]|0;
|
|
$210 = ($207>>>0)<($209>>>0);
|
|
if ($210) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$211 = ((($R$1$i)) + 20|0);
|
|
HEAP32[$211>>2] = $207;
|
|
$212 = ((($207)) + 24|0);
|
|
HEAP32[$212>>2] = $R$1$i;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$213 = ($rsize$0$i$lcssa>>>0)<(16);
|
|
if ($213) {
|
|
$214 = (($rsize$0$i$lcssa) + ($4))|0;
|
|
$215 = $214 | 3;
|
|
$216 = ((($v$0$i$lcssa)) + 4|0);
|
|
HEAP32[$216>>2] = $215;
|
|
$$sum4$i = (($214) + 4)|0;
|
|
$217 = (($v$0$i$lcssa) + ($$sum4$i)|0);
|
|
$218 = HEAP32[$217>>2]|0;
|
|
$219 = $218 | 1;
|
|
HEAP32[$217>>2] = $219;
|
|
} else {
|
|
$220 = $4 | 3;
|
|
$221 = ((($v$0$i$lcssa)) + 4|0);
|
|
HEAP32[$221>>2] = $220;
|
|
$222 = $rsize$0$i$lcssa | 1;
|
|
$$sum$i35 = $4 | 4;
|
|
$223 = (($v$0$i$lcssa) + ($$sum$i35)|0);
|
|
HEAP32[$223>>2] = $222;
|
|
$$sum1$i = (($rsize$0$i$lcssa) + ($4))|0;
|
|
$224 = (($v$0$i$lcssa) + ($$sum1$i)|0);
|
|
HEAP32[$224>>2] = $rsize$0$i$lcssa;
|
|
$225 = HEAP32[(12908)>>2]|0;
|
|
$226 = ($225|0)==(0);
|
|
if (!($226)) {
|
|
$227 = HEAP32[(12920)>>2]|0;
|
|
$228 = $225 >>> 3;
|
|
$229 = $228 << 1;
|
|
$230 = (12940 + ($229<<2)|0);
|
|
$231 = HEAP32[12900>>2]|0;
|
|
$232 = 1 << $228;
|
|
$233 = $231 & $232;
|
|
$234 = ($233|0)==(0);
|
|
if ($234) {
|
|
$235 = $231 | $232;
|
|
HEAP32[12900>>2] = $235;
|
|
$$pre$i = (($229) + 2)|0;
|
|
$$pre8$i = (12940 + ($$pre$i<<2)|0);
|
|
$$pre$phi$iZ2D = $$pre8$i;$F1$0$i = $230;
|
|
} else {
|
|
$$sum3$i = (($229) + 2)|0;
|
|
$236 = (12940 + ($$sum3$i<<2)|0);
|
|
$237 = HEAP32[$236>>2]|0;
|
|
$238 = HEAP32[(12916)>>2]|0;
|
|
$239 = ($237>>>0)<($238>>>0);
|
|
if ($239) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$$pre$phi$iZ2D = $236;$F1$0$i = $237;
|
|
}
|
|
}
|
|
HEAP32[$$pre$phi$iZ2D>>2] = $227;
|
|
$240 = ((($F1$0$i)) + 12|0);
|
|
HEAP32[$240>>2] = $227;
|
|
$241 = ((($227)) + 8|0);
|
|
HEAP32[$241>>2] = $F1$0$i;
|
|
$242 = ((($227)) + 12|0);
|
|
HEAP32[$242>>2] = $230;
|
|
}
|
|
HEAP32[(12908)>>2] = $rsize$0$i$lcssa;
|
|
HEAP32[(12920)>>2] = $151;
|
|
}
|
|
$243 = ((($v$0$i$lcssa)) + 8|0);
|
|
$mem$0 = $243;
|
|
return ($mem$0|0);
|
|
}
|
|
} else {
|
|
$nb$0 = $4;
|
|
}
|
|
} else {
|
|
$244 = ($bytes>>>0)>(4294967231);
|
|
if ($244) {
|
|
$nb$0 = -1;
|
|
} else {
|
|
$245 = (($bytes) + 11)|0;
|
|
$246 = $245 & -8;
|
|
$247 = HEAP32[(12904)>>2]|0;
|
|
$248 = ($247|0)==(0);
|
|
if ($248) {
|
|
$nb$0 = $246;
|
|
} else {
|
|
$249 = (0 - ($246))|0;
|
|
$250 = $245 >>> 8;
|
|
$251 = ($250|0)==(0);
|
|
if ($251) {
|
|
$idx$0$i = 0;
|
|
} else {
|
|
$252 = ($246>>>0)>(16777215);
|
|
if ($252) {
|
|
$idx$0$i = 31;
|
|
} else {
|
|
$253 = (($250) + 1048320)|0;
|
|
$254 = $253 >>> 16;
|
|
$255 = $254 & 8;
|
|
$256 = $250 << $255;
|
|
$257 = (($256) + 520192)|0;
|
|
$258 = $257 >>> 16;
|
|
$259 = $258 & 4;
|
|
$260 = $259 | $255;
|
|
$261 = $256 << $259;
|
|
$262 = (($261) + 245760)|0;
|
|
$263 = $262 >>> 16;
|
|
$264 = $263 & 2;
|
|
$265 = $260 | $264;
|
|
$266 = (14 - ($265))|0;
|
|
$267 = $261 << $264;
|
|
$268 = $267 >>> 15;
|
|
$269 = (($266) + ($268))|0;
|
|
$270 = $269 << 1;
|
|
$271 = (($269) + 7)|0;
|
|
$272 = $246 >>> $271;
|
|
$273 = $272 & 1;
|
|
$274 = $273 | $270;
|
|
$idx$0$i = $274;
|
|
}
|
|
}
|
|
$275 = (13204 + ($idx$0$i<<2)|0);
|
|
$276 = HEAP32[$275>>2]|0;
|
|
$277 = ($276|0)==(0|0);
|
|
L123: do {
|
|
if ($277) {
|
|
$rsize$2$i = $249;$t$1$i = 0;$v$2$i = 0;
|
|
label = 86;
|
|
} else {
|
|
$278 = ($idx$0$i|0)==(31);
|
|
$279 = $idx$0$i >>> 1;
|
|
$280 = (25 - ($279))|0;
|
|
$281 = $278 ? 0 : $280;
|
|
$282 = $246 << $281;
|
|
$rsize$0$i15 = $249;$rst$0$i = 0;$sizebits$0$i = $282;$t$0$i14 = $276;$v$0$i16 = 0;
|
|
while(1) {
|
|
$283 = ((($t$0$i14)) + 4|0);
|
|
$284 = HEAP32[$283>>2]|0;
|
|
$285 = $284 & -8;
|
|
$286 = (($285) - ($246))|0;
|
|
$287 = ($286>>>0)<($rsize$0$i15>>>0);
|
|
if ($287) {
|
|
$288 = ($285|0)==($246|0);
|
|
if ($288) {
|
|
$rsize$331$i = $286;$t$230$i = $t$0$i14;$v$332$i = $t$0$i14;
|
|
label = 90;
|
|
break L123;
|
|
} else {
|
|
$rsize$1$i = $286;$v$1$i = $t$0$i14;
|
|
}
|
|
} else {
|
|
$rsize$1$i = $rsize$0$i15;$v$1$i = $v$0$i16;
|
|
}
|
|
$289 = ((($t$0$i14)) + 20|0);
|
|
$290 = HEAP32[$289>>2]|0;
|
|
$291 = $sizebits$0$i >>> 31;
|
|
$292 = (((($t$0$i14)) + 16|0) + ($291<<2)|0);
|
|
$293 = HEAP32[$292>>2]|0;
|
|
$294 = ($290|0)==(0|0);
|
|
$295 = ($290|0)==($293|0);
|
|
$or$cond19$i = $294 | $295;
|
|
$rst$1$i = $or$cond19$i ? $rst$0$i : $290;
|
|
$296 = ($293|0)==(0|0);
|
|
$297 = $sizebits$0$i << 1;
|
|
if ($296) {
|
|
$rsize$2$i = $rsize$1$i;$t$1$i = $rst$1$i;$v$2$i = $v$1$i;
|
|
label = 86;
|
|
break;
|
|
} else {
|
|
$rsize$0$i15 = $rsize$1$i;$rst$0$i = $rst$1$i;$sizebits$0$i = $297;$t$0$i14 = $293;$v$0$i16 = $v$1$i;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
if ((label|0) == 86) {
|
|
$298 = ($t$1$i|0)==(0|0);
|
|
$299 = ($v$2$i|0)==(0|0);
|
|
$or$cond$i = $298 & $299;
|
|
if ($or$cond$i) {
|
|
$300 = 2 << $idx$0$i;
|
|
$301 = (0 - ($300))|0;
|
|
$302 = $300 | $301;
|
|
$303 = $247 & $302;
|
|
$304 = ($303|0)==(0);
|
|
if ($304) {
|
|
$nb$0 = $246;
|
|
break;
|
|
}
|
|
$305 = (0 - ($303))|0;
|
|
$306 = $303 & $305;
|
|
$307 = (($306) + -1)|0;
|
|
$308 = $307 >>> 12;
|
|
$309 = $308 & 16;
|
|
$310 = $307 >>> $309;
|
|
$311 = $310 >>> 5;
|
|
$312 = $311 & 8;
|
|
$313 = $312 | $309;
|
|
$314 = $310 >>> $312;
|
|
$315 = $314 >>> 2;
|
|
$316 = $315 & 4;
|
|
$317 = $313 | $316;
|
|
$318 = $314 >>> $316;
|
|
$319 = $318 >>> 1;
|
|
$320 = $319 & 2;
|
|
$321 = $317 | $320;
|
|
$322 = $318 >>> $320;
|
|
$323 = $322 >>> 1;
|
|
$324 = $323 & 1;
|
|
$325 = $321 | $324;
|
|
$326 = $322 >>> $324;
|
|
$327 = (($325) + ($326))|0;
|
|
$328 = (13204 + ($327<<2)|0);
|
|
$329 = HEAP32[$328>>2]|0;
|
|
$t$2$ph$i = $329;$v$3$ph$i = 0;
|
|
} else {
|
|
$t$2$ph$i = $t$1$i;$v$3$ph$i = $v$2$i;
|
|
}
|
|
$330 = ($t$2$ph$i|0)==(0|0);
|
|
if ($330) {
|
|
$rsize$3$lcssa$i = $rsize$2$i;$v$3$lcssa$i = $v$3$ph$i;
|
|
} else {
|
|
$rsize$331$i = $rsize$2$i;$t$230$i = $t$2$ph$i;$v$332$i = $v$3$ph$i;
|
|
label = 90;
|
|
}
|
|
}
|
|
if ((label|0) == 90) {
|
|
while(1) {
|
|
label = 0;
|
|
$331 = ((($t$230$i)) + 4|0);
|
|
$332 = HEAP32[$331>>2]|0;
|
|
$333 = $332 & -8;
|
|
$334 = (($333) - ($246))|0;
|
|
$335 = ($334>>>0)<($rsize$331$i>>>0);
|
|
$$rsize$3$i = $335 ? $334 : $rsize$331$i;
|
|
$t$2$v$3$i = $335 ? $t$230$i : $v$332$i;
|
|
$336 = ((($t$230$i)) + 16|0);
|
|
$337 = HEAP32[$336>>2]|0;
|
|
$338 = ($337|0)==(0|0);
|
|
if (!($338)) {
|
|
$rsize$331$i = $$rsize$3$i;$t$230$i = $337;$v$332$i = $t$2$v$3$i;
|
|
label = 90;
|
|
continue;
|
|
}
|
|
$339 = ((($t$230$i)) + 20|0);
|
|
$340 = HEAP32[$339>>2]|0;
|
|
$341 = ($340|0)==(0|0);
|
|
if ($341) {
|
|
$rsize$3$lcssa$i = $$rsize$3$i;$v$3$lcssa$i = $t$2$v$3$i;
|
|
break;
|
|
} else {
|
|
$rsize$331$i = $$rsize$3$i;$t$230$i = $340;$v$332$i = $t$2$v$3$i;
|
|
label = 90;
|
|
}
|
|
}
|
|
}
|
|
$342 = ($v$3$lcssa$i|0)==(0|0);
|
|
if ($342) {
|
|
$nb$0 = $246;
|
|
} else {
|
|
$343 = HEAP32[(12908)>>2]|0;
|
|
$344 = (($343) - ($246))|0;
|
|
$345 = ($rsize$3$lcssa$i>>>0)<($344>>>0);
|
|
if ($345) {
|
|
$346 = HEAP32[(12916)>>2]|0;
|
|
$347 = ($v$3$lcssa$i>>>0)<($346>>>0);
|
|
if ($347) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$348 = (($v$3$lcssa$i) + ($246)|0);
|
|
$349 = ($v$3$lcssa$i>>>0)<($348>>>0);
|
|
if (!($349)) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$350 = ((($v$3$lcssa$i)) + 24|0);
|
|
$351 = HEAP32[$350>>2]|0;
|
|
$352 = ((($v$3$lcssa$i)) + 12|0);
|
|
$353 = HEAP32[$352>>2]|0;
|
|
$354 = ($353|0)==($v$3$lcssa$i|0);
|
|
do {
|
|
if ($354) {
|
|
$364 = ((($v$3$lcssa$i)) + 20|0);
|
|
$365 = HEAP32[$364>>2]|0;
|
|
$366 = ($365|0)==(0|0);
|
|
if ($366) {
|
|
$367 = ((($v$3$lcssa$i)) + 16|0);
|
|
$368 = HEAP32[$367>>2]|0;
|
|
$369 = ($368|0)==(0|0);
|
|
if ($369) {
|
|
$R$1$i20 = 0;
|
|
break;
|
|
} else {
|
|
$R$0$i18 = $368;$RP$0$i17 = $367;
|
|
}
|
|
} else {
|
|
$R$0$i18 = $365;$RP$0$i17 = $364;
|
|
}
|
|
while(1) {
|
|
$370 = ((($R$0$i18)) + 20|0);
|
|
$371 = HEAP32[$370>>2]|0;
|
|
$372 = ($371|0)==(0|0);
|
|
if (!($372)) {
|
|
$R$0$i18 = $371;$RP$0$i17 = $370;
|
|
continue;
|
|
}
|
|
$373 = ((($R$0$i18)) + 16|0);
|
|
$374 = HEAP32[$373>>2]|0;
|
|
$375 = ($374|0)==(0|0);
|
|
if ($375) {
|
|
$R$0$i18$lcssa = $R$0$i18;$RP$0$i17$lcssa = $RP$0$i17;
|
|
break;
|
|
} else {
|
|
$R$0$i18 = $374;$RP$0$i17 = $373;
|
|
}
|
|
}
|
|
$376 = ($RP$0$i17$lcssa>>>0)<($346>>>0);
|
|
if ($376) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
HEAP32[$RP$0$i17$lcssa>>2] = 0;
|
|
$R$1$i20 = $R$0$i18$lcssa;
|
|
break;
|
|
}
|
|
} else {
|
|
$355 = ((($v$3$lcssa$i)) + 8|0);
|
|
$356 = HEAP32[$355>>2]|0;
|
|
$357 = ($356>>>0)<($346>>>0);
|
|
if ($357) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$358 = ((($356)) + 12|0);
|
|
$359 = HEAP32[$358>>2]|0;
|
|
$360 = ($359|0)==($v$3$lcssa$i|0);
|
|
if (!($360)) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$361 = ((($353)) + 8|0);
|
|
$362 = HEAP32[$361>>2]|0;
|
|
$363 = ($362|0)==($v$3$lcssa$i|0);
|
|
if ($363) {
|
|
HEAP32[$358>>2] = $353;
|
|
HEAP32[$361>>2] = $356;
|
|
$R$1$i20 = $353;
|
|
break;
|
|
} else {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$377 = ($351|0)==(0|0);
|
|
do {
|
|
if (!($377)) {
|
|
$378 = ((($v$3$lcssa$i)) + 28|0);
|
|
$379 = HEAP32[$378>>2]|0;
|
|
$380 = (13204 + ($379<<2)|0);
|
|
$381 = HEAP32[$380>>2]|0;
|
|
$382 = ($v$3$lcssa$i|0)==($381|0);
|
|
if ($382) {
|
|
HEAP32[$380>>2] = $R$1$i20;
|
|
$cond$i21 = ($R$1$i20|0)==(0|0);
|
|
if ($cond$i21) {
|
|
$383 = 1 << $379;
|
|
$384 = $383 ^ -1;
|
|
$385 = HEAP32[(12904)>>2]|0;
|
|
$386 = $385 & $384;
|
|
HEAP32[(12904)>>2] = $386;
|
|
break;
|
|
}
|
|
} else {
|
|
$387 = HEAP32[(12916)>>2]|0;
|
|
$388 = ($351>>>0)<($387>>>0);
|
|
if ($388) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$389 = ((($351)) + 16|0);
|
|
$390 = HEAP32[$389>>2]|0;
|
|
$391 = ($390|0)==($v$3$lcssa$i|0);
|
|
if ($391) {
|
|
HEAP32[$389>>2] = $R$1$i20;
|
|
} else {
|
|
$392 = ((($351)) + 20|0);
|
|
HEAP32[$392>>2] = $R$1$i20;
|
|
}
|
|
$393 = ($R$1$i20|0)==(0|0);
|
|
if ($393) {
|
|
break;
|
|
}
|
|
}
|
|
$394 = HEAP32[(12916)>>2]|0;
|
|
$395 = ($R$1$i20>>>0)<($394>>>0);
|
|
if ($395) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$396 = ((($R$1$i20)) + 24|0);
|
|
HEAP32[$396>>2] = $351;
|
|
$397 = ((($v$3$lcssa$i)) + 16|0);
|
|
$398 = HEAP32[$397>>2]|0;
|
|
$399 = ($398|0)==(0|0);
|
|
do {
|
|
if (!($399)) {
|
|
$400 = ($398>>>0)<($394>>>0);
|
|
if ($400) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$401 = ((($R$1$i20)) + 16|0);
|
|
HEAP32[$401>>2] = $398;
|
|
$402 = ((($398)) + 24|0);
|
|
HEAP32[$402>>2] = $R$1$i20;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$403 = ((($v$3$lcssa$i)) + 20|0);
|
|
$404 = HEAP32[$403>>2]|0;
|
|
$405 = ($404|0)==(0|0);
|
|
if (!($405)) {
|
|
$406 = HEAP32[(12916)>>2]|0;
|
|
$407 = ($404>>>0)<($406>>>0);
|
|
if ($407) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$408 = ((($R$1$i20)) + 20|0);
|
|
HEAP32[$408>>2] = $404;
|
|
$409 = ((($404)) + 24|0);
|
|
HEAP32[$409>>2] = $R$1$i20;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$410 = ($rsize$3$lcssa$i>>>0)<(16);
|
|
L199: do {
|
|
if ($410) {
|
|
$411 = (($rsize$3$lcssa$i) + ($246))|0;
|
|
$412 = $411 | 3;
|
|
$413 = ((($v$3$lcssa$i)) + 4|0);
|
|
HEAP32[$413>>2] = $412;
|
|
$$sum18$i = (($411) + 4)|0;
|
|
$414 = (($v$3$lcssa$i) + ($$sum18$i)|0);
|
|
$415 = HEAP32[$414>>2]|0;
|
|
$416 = $415 | 1;
|
|
HEAP32[$414>>2] = $416;
|
|
} else {
|
|
$417 = $246 | 3;
|
|
$418 = ((($v$3$lcssa$i)) + 4|0);
|
|
HEAP32[$418>>2] = $417;
|
|
$419 = $rsize$3$lcssa$i | 1;
|
|
$$sum$i2334 = $246 | 4;
|
|
$420 = (($v$3$lcssa$i) + ($$sum$i2334)|0);
|
|
HEAP32[$420>>2] = $419;
|
|
$$sum1$i24 = (($rsize$3$lcssa$i) + ($246))|0;
|
|
$421 = (($v$3$lcssa$i) + ($$sum1$i24)|0);
|
|
HEAP32[$421>>2] = $rsize$3$lcssa$i;
|
|
$422 = $rsize$3$lcssa$i >>> 3;
|
|
$423 = ($rsize$3$lcssa$i>>>0)<(256);
|
|
if ($423) {
|
|
$424 = $422 << 1;
|
|
$425 = (12940 + ($424<<2)|0);
|
|
$426 = HEAP32[12900>>2]|0;
|
|
$427 = 1 << $422;
|
|
$428 = $426 & $427;
|
|
$429 = ($428|0)==(0);
|
|
if ($429) {
|
|
$430 = $426 | $427;
|
|
HEAP32[12900>>2] = $430;
|
|
$$pre$i25 = (($424) + 2)|0;
|
|
$$pre43$i = (12940 + ($$pre$i25<<2)|0);
|
|
$$pre$phi$i26Z2D = $$pre43$i;$F5$0$i = $425;
|
|
} else {
|
|
$$sum17$i = (($424) + 2)|0;
|
|
$431 = (12940 + ($$sum17$i<<2)|0);
|
|
$432 = HEAP32[$431>>2]|0;
|
|
$433 = HEAP32[(12916)>>2]|0;
|
|
$434 = ($432>>>0)<($433>>>0);
|
|
if ($434) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$$pre$phi$i26Z2D = $431;$F5$0$i = $432;
|
|
}
|
|
}
|
|
HEAP32[$$pre$phi$i26Z2D>>2] = $348;
|
|
$435 = ((($F5$0$i)) + 12|0);
|
|
HEAP32[$435>>2] = $348;
|
|
$$sum15$i = (($246) + 8)|0;
|
|
$436 = (($v$3$lcssa$i) + ($$sum15$i)|0);
|
|
HEAP32[$436>>2] = $F5$0$i;
|
|
$$sum16$i = (($246) + 12)|0;
|
|
$437 = (($v$3$lcssa$i) + ($$sum16$i)|0);
|
|
HEAP32[$437>>2] = $425;
|
|
break;
|
|
}
|
|
$438 = $rsize$3$lcssa$i >>> 8;
|
|
$439 = ($438|0)==(0);
|
|
if ($439) {
|
|
$I7$0$i = 0;
|
|
} else {
|
|
$440 = ($rsize$3$lcssa$i>>>0)>(16777215);
|
|
if ($440) {
|
|
$I7$0$i = 31;
|
|
} else {
|
|
$441 = (($438) + 1048320)|0;
|
|
$442 = $441 >>> 16;
|
|
$443 = $442 & 8;
|
|
$444 = $438 << $443;
|
|
$445 = (($444) + 520192)|0;
|
|
$446 = $445 >>> 16;
|
|
$447 = $446 & 4;
|
|
$448 = $447 | $443;
|
|
$449 = $444 << $447;
|
|
$450 = (($449) + 245760)|0;
|
|
$451 = $450 >>> 16;
|
|
$452 = $451 & 2;
|
|
$453 = $448 | $452;
|
|
$454 = (14 - ($453))|0;
|
|
$455 = $449 << $452;
|
|
$456 = $455 >>> 15;
|
|
$457 = (($454) + ($456))|0;
|
|
$458 = $457 << 1;
|
|
$459 = (($457) + 7)|0;
|
|
$460 = $rsize$3$lcssa$i >>> $459;
|
|
$461 = $460 & 1;
|
|
$462 = $461 | $458;
|
|
$I7$0$i = $462;
|
|
}
|
|
}
|
|
$463 = (13204 + ($I7$0$i<<2)|0);
|
|
$$sum2$i = (($246) + 28)|0;
|
|
$464 = (($v$3$lcssa$i) + ($$sum2$i)|0);
|
|
HEAP32[$464>>2] = $I7$0$i;
|
|
$$sum3$i27 = (($246) + 16)|0;
|
|
$465 = (($v$3$lcssa$i) + ($$sum3$i27)|0);
|
|
$$sum4$i28 = (($246) + 20)|0;
|
|
$466 = (($v$3$lcssa$i) + ($$sum4$i28)|0);
|
|
HEAP32[$466>>2] = 0;
|
|
HEAP32[$465>>2] = 0;
|
|
$467 = HEAP32[(12904)>>2]|0;
|
|
$468 = 1 << $I7$0$i;
|
|
$469 = $467 & $468;
|
|
$470 = ($469|0)==(0);
|
|
if ($470) {
|
|
$471 = $467 | $468;
|
|
HEAP32[(12904)>>2] = $471;
|
|
HEAP32[$463>>2] = $348;
|
|
$$sum5$i = (($246) + 24)|0;
|
|
$472 = (($v$3$lcssa$i) + ($$sum5$i)|0);
|
|
HEAP32[$472>>2] = $463;
|
|
$$sum6$i = (($246) + 12)|0;
|
|
$473 = (($v$3$lcssa$i) + ($$sum6$i)|0);
|
|
HEAP32[$473>>2] = $348;
|
|
$$sum7$i = (($246) + 8)|0;
|
|
$474 = (($v$3$lcssa$i) + ($$sum7$i)|0);
|
|
HEAP32[$474>>2] = $348;
|
|
break;
|
|
}
|
|
$475 = HEAP32[$463>>2]|0;
|
|
$476 = ((($475)) + 4|0);
|
|
$477 = HEAP32[$476>>2]|0;
|
|
$478 = $477 & -8;
|
|
$479 = ($478|0)==($rsize$3$lcssa$i|0);
|
|
L217: do {
|
|
if ($479) {
|
|
$T$0$lcssa$i = $475;
|
|
} else {
|
|
$480 = ($I7$0$i|0)==(31);
|
|
$481 = $I7$0$i >>> 1;
|
|
$482 = (25 - ($481))|0;
|
|
$483 = $480 ? 0 : $482;
|
|
$484 = $rsize$3$lcssa$i << $483;
|
|
$K12$029$i = $484;$T$028$i = $475;
|
|
while(1) {
|
|
$491 = $K12$029$i >>> 31;
|
|
$492 = (((($T$028$i)) + 16|0) + ($491<<2)|0);
|
|
$487 = HEAP32[$492>>2]|0;
|
|
$493 = ($487|0)==(0|0);
|
|
if ($493) {
|
|
$$lcssa232 = $492;$T$028$i$lcssa = $T$028$i;
|
|
break;
|
|
}
|
|
$485 = $K12$029$i << 1;
|
|
$486 = ((($487)) + 4|0);
|
|
$488 = HEAP32[$486>>2]|0;
|
|
$489 = $488 & -8;
|
|
$490 = ($489|0)==($rsize$3$lcssa$i|0);
|
|
if ($490) {
|
|
$T$0$lcssa$i = $487;
|
|
break L217;
|
|
} else {
|
|
$K12$029$i = $485;$T$028$i = $487;
|
|
}
|
|
}
|
|
$494 = HEAP32[(12916)>>2]|0;
|
|
$495 = ($$lcssa232>>>0)<($494>>>0);
|
|
if ($495) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
HEAP32[$$lcssa232>>2] = $348;
|
|
$$sum11$i = (($246) + 24)|0;
|
|
$496 = (($v$3$lcssa$i) + ($$sum11$i)|0);
|
|
HEAP32[$496>>2] = $T$028$i$lcssa;
|
|
$$sum12$i = (($246) + 12)|0;
|
|
$497 = (($v$3$lcssa$i) + ($$sum12$i)|0);
|
|
HEAP32[$497>>2] = $348;
|
|
$$sum13$i = (($246) + 8)|0;
|
|
$498 = (($v$3$lcssa$i) + ($$sum13$i)|0);
|
|
HEAP32[$498>>2] = $348;
|
|
break L199;
|
|
}
|
|
}
|
|
} while(0);
|
|
$499 = ((($T$0$lcssa$i)) + 8|0);
|
|
$500 = HEAP32[$499>>2]|0;
|
|
$501 = HEAP32[(12916)>>2]|0;
|
|
$502 = ($500>>>0)>=($501>>>0);
|
|
$not$$i = ($T$0$lcssa$i>>>0)>=($501>>>0);
|
|
$503 = $502 & $not$$i;
|
|
if ($503) {
|
|
$504 = ((($500)) + 12|0);
|
|
HEAP32[$504>>2] = $348;
|
|
HEAP32[$499>>2] = $348;
|
|
$$sum8$i = (($246) + 8)|0;
|
|
$505 = (($v$3$lcssa$i) + ($$sum8$i)|0);
|
|
HEAP32[$505>>2] = $500;
|
|
$$sum9$i = (($246) + 12)|0;
|
|
$506 = (($v$3$lcssa$i) + ($$sum9$i)|0);
|
|
HEAP32[$506>>2] = $T$0$lcssa$i;
|
|
$$sum10$i = (($246) + 24)|0;
|
|
$507 = (($v$3$lcssa$i) + ($$sum10$i)|0);
|
|
HEAP32[$507>>2] = 0;
|
|
break;
|
|
} else {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$508 = ((($v$3$lcssa$i)) + 8|0);
|
|
$mem$0 = $508;
|
|
return ($mem$0|0);
|
|
} else {
|
|
$nb$0 = $246;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$509 = HEAP32[(12908)>>2]|0;
|
|
$510 = ($509>>>0)<($nb$0>>>0);
|
|
if (!($510)) {
|
|
$511 = (($509) - ($nb$0))|0;
|
|
$512 = HEAP32[(12920)>>2]|0;
|
|
$513 = ($511>>>0)>(15);
|
|
if ($513) {
|
|
$514 = (($512) + ($nb$0)|0);
|
|
HEAP32[(12920)>>2] = $514;
|
|
HEAP32[(12908)>>2] = $511;
|
|
$515 = $511 | 1;
|
|
$$sum2 = (($nb$0) + 4)|0;
|
|
$516 = (($512) + ($$sum2)|0);
|
|
HEAP32[$516>>2] = $515;
|
|
$517 = (($512) + ($509)|0);
|
|
HEAP32[$517>>2] = $511;
|
|
$518 = $nb$0 | 3;
|
|
$519 = ((($512)) + 4|0);
|
|
HEAP32[$519>>2] = $518;
|
|
} else {
|
|
HEAP32[(12908)>>2] = 0;
|
|
HEAP32[(12920)>>2] = 0;
|
|
$520 = $509 | 3;
|
|
$521 = ((($512)) + 4|0);
|
|
HEAP32[$521>>2] = $520;
|
|
$$sum1 = (($509) + 4)|0;
|
|
$522 = (($512) + ($$sum1)|0);
|
|
$523 = HEAP32[$522>>2]|0;
|
|
$524 = $523 | 1;
|
|
HEAP32[$522>>2] = $524;
|
|
}
|
|
$525 = ((($512)) + 8|0);
|
|
$mem$0 = $525;
|
|
return ($mem$0|0);
|
|
}
|
|
$526 = HEAP32[(12912)>>2]|0;
|
|
$527 = ($526>>>0)>($nb$0>>>0);
|
|
if ($527) {
|
|
$528 = (($526) - ($nb$0))|0;
|
|
HEAP32[(12912)>>2] = $528;
|
|
$529 = HEAP32[(12924)>>2]|0;
|
|
$530 = (($529) + ($nb$0)|0);
|
|
HEAP32[(12924)>>2] = $530;
|
|
$531 = $528 | 1;
|
|
$$sum = (($nb$0) + 4)|0;
|
|
$532 = (($529) + ($$sum)|0);
|
|
HEAP32[$532>>2] = $531;
|
|
$533 = $nb$0 | 3;
|
|
$534 = ((($529)) + 4|0);
|
|
HEAP32[$534>>2] = $533;
|
|
$535 = ((($529)) + 8|0);
|
|
$mem$0 = $535;
|
|
return ($mem$0|0);
|
|
}
|
|
$536 = HEAP32[13372>>2]|0;
|
|
$537 = ($536|0)==(0);
|
|
do {
|
|
if ($537) {
|
|
$538 = (_sysconf(30)|0);
|
|
$539 = (($538) + -1)|0;
|
|
$540 = $539 & $538;
|
|
$541 = ($540|0)==(0);
|
|
if ($541) {
|
|
HEAP32[(13380)>>2] = $538;
|
|
HEAP32[(13376)>>2] = $538;
|
|
HEAP32[(13384)>>2] = -1;
|
|
HEAP32[(13388)>>2] = -1;
|
|
HEAP32[(13392)>>2] = 0;
|
|
HEAP32[(13344)>>2] = 0;
|
|
$542 = (_time((0|0))|0);
|
|
$543 = $542 & -16;
|
|
$544 = $543 ^ 1431655768;
|
|
HEAP32[13372>>2] = $544;
|
|
break;
|
|
} else {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$545 = (($nb$0) + 48)|0;
|
|
$546 = HEAP32[(13380)>>2]|0;
|
|
$547 = (($nb$0) + 47)|0;
|
|
$548 = (($546) + ($547))|0;
|
|
$549 = (0 - ($546))|0;
|
|
$550 = $548 & $549;
|
|
$551 = ($550>>>0)>($nb$0>>>0);
|
|
if (!($551)) {
|
|
$mem$0 = 0;
|
|
return ($mem$0|0);
|
|
}
|
|
$552 = HEAP32[(13340)>>2]|0;
|
|
$553 = ($552|0)==(0);
|
|
if (!($553)) {
|
|
$554 = HEAP32[(13332)>>2]|0;
|
|
$555 = (($554) + ($550))|0;
|
|
$556 = ($555>>>0)<=($554>>>0);
|
|
$557 = ($555>>>0)>($552>>>0);
|
|
$or$cond1$i = $556 | $557;
|
|
if ($or$cond1$i) {
|
|
$mem$0 = 0;
|
|
return ($mem$0|0);
|
|
}
|
|
}
|
|
$558 = HEAP32[(13344)>>2]|0;
|
|
$559 = $558 & 4;
|
|
$560 = ($559|0)==(0);
|
|
L258: do {
|
|
if ($560) {
|
|
$561 = HEAP32[(12924)>>2]|0;
|
|
$562 = ($561|0)==(0|0);
|
|
L260: do {
|
|
if ($562) {
|
|
label = 174;
|
|
} else {
|
|
$sp$0$i$i = (13348);
|
|
while(1) {
|
|
$563 = HEAP32[$sp$0$i$i>>2]|0;
|
|
$564 = ($563>>>0)>($561>>>0);
|
|
if (!($564)) {
|
|
$565 = ((($sp$0$i$i)) + 4|0);
|
|
$566 = HEAP32[$565>>2]|0;
|
|
$567 = (($563) + ($566)|0);
|
|
$568 = ($567>>>0)>($561>>>0);
|
|
if ($568) {
|
|
$$lcssa228 = $sp$0$i$i;$$lcssa230 = $565;
|
|
break;
|
|
}
|
|
}
|
|
$569 = ((($sp$0$i$i)) + 8|0);
|
|
$570 = HEAP32[$569>>2]|0;
|
|
$571 = ($570|0)==(0|0);
|
|
if ($571) {
|
|
label = 174;
|
|
break L260;
|
|
} else {
|
|
$sp$0$i$i = $570;
|
|
}
|
|
}
|
|
$594 = HEAP32[(12912)>>2]|0;
|
|
$595 = (($548) - ($594))|0;
|
|
$596 = $595 & $549;
|
|
$597 = ($596>>>0)<(2147483647);
|
|
if ($597) {
|
|
$598 = (_sbrk(($596|0))|0);
|
|
$599 = HEAP32[$$lcssa228>>2]|0;
|
|
$600 = HEAP32[$$lcssa230>>2]|0;
|
|
$601 = (($599) + ($600)|0);
|
|
$602 = ($598|0)==($601|0);
|
|
$$3$i = $602 ? $596 : 0;
|
|
if ($602) {
|
|
$603 = ($598|0)==((-1)|0);
|
|
if ($603) {
|
|
$tsize$0323944$i = $$3$i;
|
|
} else {
|
|
$tbase$255$i = $598;$tsize$254$i = $$3$i;
|
|
label = 194;
|
|
break L258;
|
|
}
|
|
} else {
|
|
$br$0$ph$i = $598;$ssize$1$ph$i = $596;$tsize$0$ph$i = $$3$i;
|
|
label = 184;
|
|
}
|
|
} else {
|
|
$tsize$0323944$i = 0;
|
|
}
|
|
}
|
|
} while(0);
|
|
do {
|
|
if ((label|0) == 174) {
|
|
$572 = (_sbrk(0)|0);
|
|
$573 = ($572|0)==((-1)|0);
|
|
if ($573) {
|
|
$tsize$0323944$i = 0;
|
|
} else {
|
|
$574 = $572;
|
|
$575 = HEAP32[(13376)>>2]|0;
|
|
$576 = (($575) + -1)|0;
|
|
$577 = $576 & $574;
|
|
$578 = ($577|0)==(0);
|
|
if ($578) {
|
|
$ssize$0$i = $550;
|
|
} else {
|
|
$579 = (($576) + ($574))|0;
|
|
$580 = (0 - ($575))|0;
|
|
$581 = $579 & $580;
|
|
$582 = (($550) - ($574))|0;
|
|
$583 = (($582) + ($581))|0;
|
|
$ssize$0$i = $583;
|
|
}
|
|
$584 = HEAP32[(13332)>>2]|0;
|
|
$585 = (($584) + ($ssize$0$i))|0;
|
|
$586 = ($ssize$0$i>>>0)>($nb$0>>>0);
|
|
$587 = ($ssize$0$i>>>0)<(2147483647);
|
|
$or$cond$i30 = $586 & $587;
|
|
if ($or$cond$i30) {
|
|
$588 = HEAP32[(13340)>>2]|0;
|
|
$589 = ($588|0)==(0);
|
|
if (!($589)) {
|
|
$590 = ($585>>>0)<=($584>>>0);
|
|
$591 = ($585>>>0)>($588>>>0);
|
|
$or$cond2$i = $590 | $591;
|
|
if ($or$cond2$i) {
|
|
$tsize$0323944$i = 0;
|
|
break;
|
|
}
|
|
}
|
|
$592 = (_sbrk(($ssize$0$i|0))|0);
|
|
$593 = ($592|0)==($572|0);
|
|
$ssize$0$$i = $593 ? $ssize$0$i : 0;
|
|
if ($593) {
|
|
$tbase$255$i = $572;$tsize$254$i = $ssize$0$$i;
|
|
label = 194;
|
|
break L258;
|
|
} else {
|
|
$br$0$ph$i = $592;$ssize$1$ph$i = $ssize$0$i;$tsize$0$ph$i = $ssize$0$$i;
|
|
label = 184;
|
|
}
|
|
} else {
|
|
$tsize$0323944$i = 0;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
L280: do {
|
|
if ((label|0) == 184) {
|
|
$604 = (0 - ($ssize$1$ph$i))|0;
|
|
$605 = ($br$0$ph$i|0)!=((-1)|0);
|
|
$606 = ($ssize$1$ph$i>>>0)<(2147483647);
|
|
$or$cond5$i = $606 & $605;
|
|
$607 = ($545>>>0)>($ssize$1$ph$i>>>0);
|
|
$or$cond6$i = $607 & $or$cond5$i;
|
|
do {
|
|
if ($or$cond6$i) {
|
|
$608 = HEAP32[(13380)>>2]|0;
|
|
$609 = (($547) - ($ssize$1$ph$i))|0;
|
|
$610 = (($609) + ($608))|0;
|
|
$611 = (0 - ($608))|0;
|
|
$612 = $610 & $611;
|
|
$613 = ($612>>>0)<(2147483647);
|
|
if ($613) {
|
|
$614 = (_sbrk(($612|0))|0);
|
|
$615 = ($614|0)==((-1)|0);
|
|
if ($615) {
|
|
(_sbrk(($604|0))|0);
|
|
$tsize$0323944$i = $tsize$0$ph$i;
|
|
break L280;
|
|
} else {
|
|
$616 = (($612) + ($ssize$1$ph$i))|0;
|
|
$ssize$2$i = $616;
|
|
break;
|
|
}
|
|
} else {
|
|
$ssize$2$i = $ssize$1$ph$i;
|
|
}
|
|
} else {
|
|
$ssize$2$i = $ssize$1$ph$i;
|
|
}
|
|
} while(0);
|
|
$617 = ($br$0$ph$i|0)==((-1)|0);
|
|
if ($617) {
|
|
$tsize$0323944$i = $tsize$0$ph$i;
|
|
} else {
|
|
$tbase$255$i = $br$0$ph$i;$tsize$254$i = $ssize$2$i;
|
|
label = 194;
|
|
break L258;
|
|
}
|
|
}
|
|
} while(0);
|
|
$618 = HEAP32[(13344)>>2]|0;
|
|
$619 = $618 | 4;
|
|
HEAP32[(13344)>>2] = $619;
|
|
$tsize$1$i = $tsize$0323944$i;
|
|
label = 191;
|
|
} else {
|
|
$tsize$1$i = 0;
|
|
label = 191;
|
|
}
|
|
} while(0);
|
|
if ((label|0) == 191) {
|
|
$620 = ($550>>>0)<(2147483647);
|
|
if ($620) {
|
|
$621 = (_sbrk(($550|0))|0);
|
|
$622 = (_sbrk(0)|0);
|
|
$623 = ($621|0)!=((-1)|0);
|
|
$624 = ($622|0)!=((-1)|0);
|
|
$or$cond3$i = $623 & $624;
|
|
$625 = ($621>>>0)<($622>>>0);
|
|
$or$cond8$i = $625 & $or$cond3$i;
|
|
if ($or$cond8$i) {
|
|
$626 = $622;
|
|
$627 = $621;
|
|
$628 = (($626) - ($627))|0;
|
|
$629 = (($nb$0) + 40)|0;
|
|
$630 = ($628>>>0)>($629>>>0);
|
|
$$tsize$1$i = $630 ? $628 : $tsize$1$i;
|
|
if ($630) {
|
|
$tbase$255$i = $621;$tsize$254$i = $$tsize$1$i;
|
|
label = 194;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if ((label|0) == 194) {
|
|
$631 = HEAP32[(13332)>>2]|0;
|
|
$632 = (($631) + ($tsize$254$i))|0;
|
|
HEAP32[(13332)>>2] = $632;
|
|
$633 = HEAP32[(13336)>>2]|0;
|
|
$634 = ($632>>>0)>($633>>>0);
|
|
if ($634) {
|
|
HEAP32[(13336)>>2] = $632;
|
|
}
|
|
$635 = HEAP32[(12924)>>2]|0;
|
|
$636 = ($635|0)==(0|0);
|
|
L299: do {
|
|
if ($636) {
|
|
$637 = HEAP32[(12916)>>2]|0;
|
|
$638 = ($637|0)==(0|0);
|
|
$639 = ($tbase$255$i>>>0)<($637>>>0);
|
|
$or$cond9$i = $638 | $639;
|
|
if ($or$cond9$i) {
|
|
HEAP32[(12916)>>2] = $tbase$255$i;
|
|
}
|
|
HEAP32[(13348)>>2] = $tbase$255$i;
|
|
HEAP32[(13352)>>2] = $tsize$254$i;
|
|
HEAP32[(13360)>>2] = 0;
|
|
$640 = HEAP32[13372>>2]|0;
|
|
HEAP32[(12936)>>2] = $640;
|
|
HEAP32[(12932)>>2] = -1;
|
|
$i$02$i$i = 0;
|
|
while(1) {
|
|
$641 = $i$02$i$i << 1;
|
|
$642 = (12940 + ($641<<2)|0);
|
|
$$sum$i$i = (($641) + 3)|0;
|
|
$643 = (12940 + ($$sum$i$i<<2)|0);
|
|
HEAP32[$643>>2] = $642;
|
|
$$sum1$i$i = (($641) + 2)|0;
|
|
$644 = (12940 + ($$sum1$i$i<<2)|0);
|
|
HEAP32[$644>>2] = $642;
|
|
$645 = (($i$02$i$i) + 1)|0;
|
|
$exitcond$i$i = ($645|0)==(32);
|
|
if ($exitcond$i$i) {
|
|
break;
|
|
} else {
|
|
$i$02$i$i = $645;
|
|
}
|
|
}
|
|
$646 = (($tsize$254$i) + -40)|0;
|
|
$647 = ((($tbase$255$i)) + 8|0);
|
|
$648 = $647;
|
|
$649 = $648 & 7;
|
|
$650 = ($649|0)==(0);
|
|
$651 = (0 - ($648))|0;
|
|
$652 = $651 & 7;
|
|
$653 = $650 ? 0 : $652;
|
|
$654 = (($tbase$255$i) + ($653)|0);
|
|
$655 = (($646) - ($653))|0;
|
|
HEAP32[(12924)>>2] = $654;
|
|
HEAP32[(12912)>>2] = $655;
|
|
$656 = $655 | 1;
|
|
$$sum$i13$i = (($653) + 4)|0;
|
|
$657 = (($tbase$255$i) + ($$sum$i13$i)|0);
|
|
HEAP32[$657>>2] = $656;
|
|
$$sum2$i$i = (($tsize$254$i) + -36)|0;
|
|
$658 = (($tbase$255$i) + ($$sum2$i$i)|0);
|
|
HEAP32[$658>>2] = 40;
|
|
$659 = HEAP32[(13388)>>2]|0;
|
|
HEAP32[(12928)>>2] = $659;
|
|
} else {
|
|
$sp$084$i = (13348);
|
|
while(1) {
|
|
$660 = HEAP32[$sp$084$i>>2]|0;
|
|
$661 = ((($sp$084$i)) + 4|0);
|
|
$662 = HEAP32[$661>>2]|0;
|
|
$663 = (($660) + ($662)|0);
|
|
$664 = ($tbase$255$i|0)==($663|0);
|
|
if ($664) {
|
|
$$lcssa222 = $660;$$lcssa224 = $661;$$lcssa226 = $662;$sp$084$i$lcssa = $sp$084$i;
|
|
label = 204;
|
|
break;
|
|
}
|
|
$665 = ((($sp$084$i)) + 8|0);
|
|
$666 = HEAP32[$665>>2]|0;
|
|
$667 = ($666|0)==(0|0);
|
|
if ($667) {
|
|
break;
|
|
} else {
|
|
$sp$084$i = $666;
|
|
}
|
|
}
|
|
if ((label|0) == 204) {
|
|
$668 = ((($sp$084$i$lcssa)) + 12|0);
|
|
$669 = HEAP32[$668>>2]|0;
|
|
$670 = $669 & 8;
|
|
$671 = ($670|0)==(0);
|
|
if ($671) {
|
|
$672 = ($635>>>0)>=($$lcssa222>>>0);
|
|
$673 = ($635>>>0)<($tbase$255$i>>>0);
|
|
$or$cond57$i = $673 & $672;
|
|
if ($or$cond57$i) {
|
|
$674 = (($$lcssa226) + ($tsize$254$i))|0;
|
|
HEAP32[$$lcssa224>>2] = $674;
|
|
$675 = HEAP32[(12912)>>2]|0;
|
|
$676 = (($675) + ($tsize$254$i))|0;
|
|
$677 = ((($635)) + 8|0);
|
|
$678 = $677;
|
|
$679 = $678 & 7;
|
|
$680 = ($679|0)==(0);
|
|
$681 = (0 - ($678))|0;
|
|
$682 = $681 & 7;
|
|
$683 = $680 ? 0 : $682;
|
|
$684 = (($635) + ($683)|0);
|
|
$685 = (($676) - ($683))|0;
|
|
HEAP32[(12924)>>2] = $684;
|
|
HEAP32[(12912)>>2] = $685;
|
|
$686 = $685 | 1;
|
|
$$sum$i17$i = (($683) + 4)|0;
|
|
$687 = (($635) + ($$sum$i17$i)|0);
|
|
HEAP32[$687>>2] = $686;
|
|
$$sum2$i18$i = (($676) + 4)|0;
|
|
$688 = (($635) + ($$sum2$i18$i)|0);
|
|
HEAP32[$688>>2] = 40;
|
|
$689 = HEAP32[(13388)>>2]|0;
|
|
HEAP32[(12928)>>2] = $689;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
$690 = HEAP32[(12916)>>2]|0;
|
|
$691 = ($tbase$255$i>>>0)<($690>>>0);
|
|
if ($691) {
|
|
HEAP32[(12916)>>2] = $tbase$255$i;
|
|
$755 = $tbase$255$i;
|
|
} else {
|
|
$755 = $690;
|
|
}
|
|
$692 = (($tbase$255$i) + ($tsize$254$i)|0);
|
|
$sp$183$i = (13348);
|
|
while(1) {
|
|
$693 = HEAP32[$sp$183$i>>2]|0;
|
|
$694 = ($693|0)==($692|0);
|
|
if ($694) {
|
|
$$lcssa219 = $sp$183$i;$sp$183$i$lcssa = $sp$183$i;
|
|
label = 212;
|
|
break;
|
|
}
|
|
$695 = ((($sp$183$i)) + 8|0);
|
|
$696 = HEAP32[$695>>2]|0;
|
|
$697 = ($696|0)==(0|0);
|
|
if ($697) {
|
|
$sp$0$i$i$i = (13348);
|
|
break;
|
|
} else {
|
|
$sp$183$i = $696;
|
|
}
|
|
}
|
|
if ((label|0) == 212) {
|
|
$698 = ((($sp$183$i$lcssa)) + 12|0);
|
|
$699 = HEAP32[$698>>2]|0;
|
|
$700 = $699 & 8;
|
|
$701 = ($700|0)==(0);
|
|
if ($701) {
|
|
HEAP32[$$lcssa219>>2] = $tbase$255$i;
|
|
$702 = ((($sp$183$i$lcssa)) + 4|0);
|
|
$703 = HEAP32[$702>>2]|0;
|
|
$704 = (($703) + ($tsize$254$i))|0;
|
|
HEAP32[$702>>2] = $704;
|
|
$705 = ((($tbase$255$i)) + 8|0);
|
|
$706 = $705;
|
|
$707 = $706 & 7;
|
|
$708 = ($707|0)==(0);
|
|
$709 = (0 - ($706))|0;
|
|
$710 = $709 & 7;
|
|
$711 = $708 ? 0 : $710;
|
|
$712 = (($tbase$255$i) + ($711)|0);
|
|
$$sum112$i = (($tsize$254$i) + 8)|0;
|
|
$713 = (($tbase$255$i) + ($$sum112$i)|0);
|
|
$714 = $713;
|
|
$715 = $714 & 7;
|
|
$716 = ($715|0)==(0);
|
|
$717 = (0 - ($714))|0;
|
|
$718 = $717 & 7;
|
|
$719 = $716 ? 0 : $718;
|
|
$$sum113$i = (($719) + ($tsize$254$i))|0;
|
|
$720 = (($tbase$255$i) + ($$sum113$i)|0);
|
|
$721 = $720;
|
|
$722 = $712;
|
|
$723 = (($721) - ($722))|0;
|
|
$$sum$i19$i = (($711) + ($nb$0))|0;
|
|
$724 = (($tbase$255$i) + ($$sum$i19$i)|0);
|
|
$725 = (($723) - ($nb$0))|0;
|
|
$726 = $nb$0 | 3;
|
|
$$sum1$i20$i = (($711) + 4)|0;
|
|
$727 = (($tbase$255$i) + ($$sum1$i20$i)|0);
|
|
HEAP32[$727>>2] = $726;
|
|
$728 = ($720|0)==($635|0);
|
|
L324: do {
|
|
if ($728) {
|
|
$729 = HEAP32[(12912)>>2]|0;
|
|
$730 = (($729) + ($725))|0;
|
|
HEAP32[(12912)>>2] = $730;
|
|
HEAP32[(12924)>>2] = $724;
|
|
$731 = $730 | 1;
|
|
$$sum42$i$i = (($$sum$i19$i) + 4)|0;
|
|
$732 = (($tbase$255$i) + ($$sum42$i$i)|0);
|
|
HEAP32[$732>>2] = $731;
|
|
} else {
|
|
$733 = HEAP32[(12920)>>2]|0;
|
|
$734 = ($720|0)==($733|0);
|
|
if ($734) {
|
|
$735 = HEAP32[(12908)>>2]|0;
|
|
$736 = (($735) + ($725))|0;
|
|
HEAP32[(12908)>>2] = $736;
|
|
HEAP32[(12920)>>2] = $724;
|
|
$737 = $736 | 1;
|
|
$$sum40$i$i = (($$sum$i19$i) + 4)|0;
|
|
$738 = (($tbase$255$i) + ($$sum40$i$i)|0);
|
|
HEAP32[$738>>2] = $737;
|
|
$$sum41$i$i = (($736) + ($$sum$i19$i))|0;
|
|
$739 = (($tbase$255$i) + ($$sum41$i$i)|0);
|
|
HEAP32[$739>>2] = $736;
|
|
break;
|
|
}
|
|
$$sum2$i21$i = (($tsize$254$i) + 4)|0;
|
|
$$sum114$i = (($$sum2$i21$i) + ($719))|0;
|
|
$740 = (($tbase$255$i) + ($$sum114$i)|0);
|
|
$741 = HEAP32[$740>>2]|0;
|
|
$742 = $741 & 3;
|
|
$743 = ($742|0)==(1);
|
|
if ($743) {
|
|
$744 = $741 & -8;
|
|
$745 = $741 >>> 3;
|
|
$746 = ($741>>>0)<(256);
|
|
L332: do {
|
|
if ($746) {
|
|
$$sum3738$i$i = $719 | 8;
|
|
$$sum124$i = (($$sum3738$i$i) + ($tsize$254$i))|0;
|
|
$747 = (($tbase$255$i) + ($$sum124$i)|0);
|
|
$748 = HEAP32[$747>>2]|0;
|
|
$$sum39$i$i = (($tsize$254$i) + 12)|0;
|
|
$$sum125$i = (($$sum39$i$i) + ($719))|0;
|
|
$749 = (($tbase$255$i) + ($$sum125$i)|0);
|
|
$750 = HEAP32[$749>>2]|0;
|
|
$751 = $745 << 1;
|
|
$752 = (12940 + ($751<<2)|0);
|
|
$753 = ($748|0)==($752|0);
|
|
do {
|
|
if (!($753)) {
|
|
$754 = ($748>>>0)<($755>>>0);
|
|
if ($754) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$756 = ((($748)) + 12|0);
|
|
$757 = HEAP32[$756>>2]|0;
|
|
$758 = ($757|0)==($720|0);
|
|
if ($758) {
|
|
break;
|
|
}
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
} while(0);
|
|
$759 = ($750|0)==($748|0);
|
|
if ($759) {
|
|
$760 = 1 << $745;
|
|
$761 = $760 ^ -1;
|
|
$762 = HEAP32[12900>>2]|0;
|
|
$763 = $762 & $761;
|
|
HEAP32[12900>>2] = $763;
|
|
break;
|
|
}
|
|
$764 = ($750|0)==($752|0);
|
|
do {
|
|
if ($764) {
|
|
$$pre57$i$i = ((($750)) + 8|0);
|
|
$$pre$phi58$i$iZ2D = $$pre57$i$i;
|
|
} else {
|
|
$765 = ($750>>>0)<($755>>>0);
|
|
if ($765) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$766 = ((($750)) + 8|0);
|
|
$767 = HEAP32[$766>>2]|0;
|
|
$768 = ($767|0)==($720|0);
|
|
if ($768) {
|
|
$$pre$phi58$i$iZ2D = $766;
|
|
break;
|
|
}
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
} while(0);
|
|
$769 = ((($748)) + 12|0);
|
|
HEAP32[$769>>2] = $750;
|
|
HEAP32[$$pre$phi58$i$iZ2D>>2] = $748;
|
|
} else {
|
|
$$sum34$i$i = $719 | 24;
|
|
$$sum115$i = (($$sum34$i$i) + ($tsize$254$i))|0;
|
|
$770 = (($tbase$255$i) + ($$sum115$i)|0);
|
|
$771 = HEAP32[$770>>2]|0;
|
|
$$sum5$i$i = (($tsize$254$i) + 12)|0;
|
|
$$sum116$i = (($$sum5$i$i) + ($719))|0;
|
|
$772 = (($tbase$255$i) + ($$sum116$i)|0);
|
|
$773 = HEAP32[$772>>2]|0;
|
|
$774 = ($773|0)==($720|0);
|
|
do {
|
|
if ($774) {
|
|
$$sum67$i$i = $719 | 16;
|
|
$$sum122$i = (($$sum2$i21$i) + ($$sum67$i$i))|0;
|
|
$784 = (($tbase$255$i) + ($$sum122$i)|0);
|
|
$785 = HEAP32[$784>>2]|0;
|
|
$786 = ($785|0)==(0|0);
|
|
if ($786) {
|
|
$$sum123$i = (($$sum67$i$i) + ($tsize$254$i))|0;
|
|
$787 = (($tbase$255$i) + ($$sum123$i)|0);
|
|
$788 = HEAP32[$787>>2]|0;
|
|
$789 = ($788|0)==(0|0);
|
|
if ($789) {
|
|
$R$1$i$i = 0;
|
|
break;
|
|
} else {
|
|
$R$0$i$i = $788;$RP$0$i$i = $787;
|
|
}
|
|
} else {
|
|
$R$0$i$i = $785;$RP$0$i$i = $784;
|
|
}
|
|
while(1) {
|
|
$790 = ((($R$0$i$i)) + 20|0);
|
|
$791 = HEAP32[$790>>2]|0;
|
|
$792 = ($791|0)==(0|0);
|
|
if (!($792)) {
|
|
$R$0$i$i = $791;$RP$0$i$i = $790;
|
|
continue;
|
|
}
|
|
$793 = ((($R$0$i$i)) + 16|0);
|
|
$794 = HEAP32[$793>>2]|0;
|
|
$795 = ($794|0)==(0|0);
|
|
if ($795) {
|
|
$R$0$i$i$lcssa = $R$0$i$i;$RP$0$i$i$lcssa = $RP$0$i$i;
|
|
break;
|
|
} else {
|
|
$R$0$i$i = $794;$RP$0$i$i = $793;
|
|
}
|
|
}
|
|
$796 = ($RP$0$i$i$lcssa>>>0)<($755>>>0);
|
|
if ($796) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
HEAP32[$RP$0$i$i$lcssa>>2] = 0;
|
|
$R$1$i$i = $R$0$i$i$lcssa;
|
|
break;
|
|
}
|
|
} else {
|
|
$$sum3536$i$i = $719 | 8;
|
|
$$sum117$i = (($$sum3536$i$i) + ($tsize$254$i))|0;
|
|
$775 = (($tbase$255$i) + ($$sum117$i)|0);
|
|
$776 = HEAP32[$775>>2]|0;
|
|
$777 = ($776>>>0)<($755>>>0);
|
|
if ($777) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$778 = ((($776)) + 12|0);
|
|
$779 = HEAP32[$778>>2]|0;
|
|
$780 = ($779|0)==($720|0);
|
|
if (!($780)) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$781 = ((($773)) + 8|0);
|
|
$782 = HEAP32[$781>>2]|0;
|
|
$783 = ($782|0)==($720|0);
|
|
if ($783) {
|
|
HEAP32[$778>>2] = $773;
|
|
HEAP32[$781>>2] = $776;
|
|
$R$1$i$i = $773;
|
|
break;
|
|
} else {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$797 = ($771|0)==(0|0);
|
|
if ($797) {
|
|
break;
|
|
}
|
|
$$sum30$i$i = (($tsize$254$i) + 28)|0;
|
|
$$sum118$i = (($$sum30$i$i) + ($719))|0;
|
|
$798 = (($tbase$255$i) + ($$sum118$i)|0);
|
|
$799 = HEAP32[$798>>2]|0;
|
|
$800 = (13204 + ($799<<2)|0);
|
|
$801 = HEAP32[$800>>2]|0;
|
|
$802 = ($720|0)==($801|0);
|
|
do {
|
|
if ($802) {
|
|
HEAP32[$800>>2] = $R$1$i$i;
|
|
$cond$i$i = ($R$1$i$i|0)==(0|0);
|
|
if (!($cond$i$i)) {
|
|
break;
|
|
}
|
|
$803 = 1 << $799;
|
|
$804 = $803 ^ -1;
|
|
$805 = HEAP32[(12904)>>2]|0;
|
|
$806 = $805 & $804;
|
|
HEAP32[(12904)>>2] = $806;
|
|
break L332;
|
|
} else {
|
|
$807 = HEAP32[(12916)>>2]|0;
|
|
$808 = ($771>>>0)<($807>>>0);
|
|
if ($808) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$809 = ((($771)) + 16|0);
|
|
$810 = HEAP32[$809>>2]|0;
|
|
$811 = ($810|0)==($720|0);
|
|
if ($811) {
|
|
HEAP32[$809>>2] = $R$1$i$i;
|
|
} else {
|
|
$812 = ((($771)) + 20|0);
|
|
HEAP32[$812>>2] = $R$1$i$i;
|
|
}
|
|
$813 = ($R$1$i$i|0)==(0|0);
|
|
if ($813) {
|
|
break L332;
|
|
}
|
|
}
|
|
} while(0);
|
|
$814 = HEAP32[(12916)>>2]|0;
|
|
$815 = ($R$1$i$i>>>0)<($814>>>0);
|
|
if ($815) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$816 = ((($R$1$i$i)) + 24|0);
|
|
HEAP32[$816>>2] = $771;
|
|
$$sum3132$i$i = $719 | 16;
|
|
$$sum119$i = (($$sum3132$i$i) + ($tsize$254$i))|0;
|
|
$817 = (($tbase$255$i) + ($$sum119$i)|0);
|
|
$818 = HEAP32[$817>>2]|0;
|
|
$819 = ($818|0)==(0|0);
|
|
do {
|
|
if (!($819)) {
|
|
$820 = ($818>>>0)<($814>>>0);
|
|
if ($820) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$821 = ((($R$1$i$i)) + 16|0);
|
|
HEAP32[$821>>2] = $818;
|
|
$822 = ((($818)) + 24|0);
|
|
HEAP32[$822>>2] = $R$1$i$i;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$$sum120$i = (($$sum2$i21$i) + ($$sum3132$i$i))|0;
|
|
$823 = (($tbase$255$i) + ($$sum120$i)|0);
|
|
$824 = HEAP32[$823>>2]|0;
|
|
$825 = ($824|0)==(0|0);
|
|
if ($825) {
|
|
break;
|
|
}
|
|
$826 = HEAP32[(12916)>>2]|0;
|
|
$827 = ($824>>>0)<($826>>>0);
|
|
if ($827) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$828 = ((($R$1$i$i)) + 20|0);
|
|
HEAP32[$828>>2] = $824;
|
|
$829 = ((($824)) + 24|0);
|
|
HEAP32[$829>>2] = $R$1$i$i;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$$sum9$i$i = $744 | $719;
|
|
$$sum121$i = (($$sum9$i$i) + ($tsize$254$i))|0;
|
|
$830 = (($tbase$255$i) + ($$sum121$i)|0);
|
|
$831 = (($744) + ($725))|0;
|
|
$oldfirst$0$i$i = $830;$qsize$0$i$i = $831;
|
|
} else {
|
|
$oldfirst$0$i$i = $720;$qsize$0$i$i = $725;
|
|
}
|
|
$832 = ((($oldfirst$0$i$i)) + 4|0);
|
|
$833 = HEAP32[$832>>2]|0;
|
|
$834 = $833 & -2;
|
|
HEAP32[$832>>2] = $834;
|
|
$835 = $qsize$0$i$i | 1;
|
|
$$sum10$i$i = (($$sum$i19$i) + 4)|0;
|
|
$836 = (($tbase$255$i) + ($$sum10$i$i)|0);
|
|
HEAP32[$836>>2] = $835;
|
|
$$sum11$i$i = (($qsize$0$i$i) + ($$sum$i19$i))|0;
|
|
$837 = (($tbase$255$i) + ($$sum11$i$i)|0);
|
|
HEAP32[$837>>2] = $qsize$0$i$i;
|
|
$838 = $qsize$0$i$i >>> 3;
|
|
$839 = ($qsize$0$i$i>>>0)<(256);
|
|
if ($839) {
|
|
$840 = $838 << 1;
|
|
$841 = (12940 + ($840<<2)|0);
|
|
$842 = HEAP32[12900>>2]|0;
|
|
$843 = 1 << $838;
|
|
$844 = $842 & $843;
|
|
$845 = ($844|0)==(0);
|
|
do {
|
|
if ($845) {
|
|
$846 = $842 | $843;
|
|
HEAP32[12900>>2] = $846;
|
|
$$pre$i22$i = (($840) + 2)|0;
|
|
$$pre56$i$i = (12940 + ($$pre$i22$i<<2)|0);
|
|
$$pre$phi$i23$iZ2D = $$pre56$i$i;$F4$0$i$i = $841;
|
|
} else {
|
|
$$sum29$i$i = (($840) + 2)|0;
|
|
$847 = (12940 + ($$sum29$i$i<<2)|0);
|
|
$848 = HEAP32[$847>>2]|0;
|
|
$849 = HEAP32[(12916)>>2]|0;
|
|
$850 = ($848>>>0)<($849>>>0);
|
|
if (!($850)) {
|
|
$$pre$phi$i23$iZ2D = $847;$F4$0$i$i = $848;
|
|
break;
|
|
}
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
} while(0);
|
|
HEAP32[$$pre$phi$i23$iZ2D>>2] = $724;
|
|
$851 = ((($F4$0$i$i)) + 12|0);
|
|
HEAP32[$851>>2] = $724;
|
|
$$sum27$i$i = (($$sum$i19$i) + 8)|0;
|
|
$852 = (($tbase$255$i) + ($$sum27$i$i)|0);
|
|
HEAP32[$852>>2] = $F4$0$i$i;
|
|
$$sum28$i$i = (($$sum$i19$i) + 12)|0;
|
|
$853 = (($tbase$255$i) + ($$sum28$i$i)|0);
|
|
HEAP32[$853>>2] = $841;
|
|
break;
|
|
}
|
|
$854 = $qsize$0$i$i >>> 8;
|
|
$855 = ($854|0)==(0);
|
|
do {
|
|
if ($855) {
|
|
$I7$0$i$i = 0;
|
|
} else {
|
|
$856 = ($qsize$0$i$i>>>0)>(16777215);
|
|
if ($856) {
|
|
$I7$0$i$i = 31;
|
|
break;
|
|
}
|
|
$857 = (($854) + 1048320)|0;
|
|
$858 = $857 >>> 16;
|
|
$859 = $858 & 8;
|
|
$860 = $854 << $859;
|
|
$861 = (($860) + 520192)|0;
|
|
$862 = $861 >>> 16;
|
|
$863 = $862 & 4;
|
|
$864 = $863 | $859;
|
|
$865 = $860 << $863;
|
|
$866 = (($865) + 245760)|0;
|
|
$867 = $866 >>> 16;
|
|
$868 = $867 & 2;
|
|
$869 = $864 | $868;
|
|
$870 = (14 - ($869))|0;
|
|
$871 = $865 << $868;
|
|
$872 = $871 >>> 15;
|
|
$873 = (($870) + ($872))|0;
|
|
$874 = $873 << 1;
|
|
$875 = (($873) + 7)|0;
|
|
$876 = $qsize$0$i$i >>> $875;
|
|
$877 = $876 & 1;
|
|
$878 = $877 | $874;
|
|
$I7$0$i$i = $878;
|
|
}
|
|
} while(0);
|
|
$879 = (13204 + ($I7$0$i$i<<2)|0);
|
|
$$sum12$i$i = (($$sum$i19$i) + 28)|0;
|
|
$880 = (($tbase$255$i) + ($$sum12$i$i)|0);
|
|
HEAP32[$880>>2] = $I7$0$i$i;
|
|
$$sum13$i$i = (($$sum$i19$i) + 16)|0;
|
|
$881 = (($tbase$255$i) + ($$sum13$i$i)|0);
|
|
$$sum14$i$i = (($$sum$i19$i) + 20)|0;
|
|
$882 = (($tbase$255$i) + ($$sum14$i$i)|0);
|
|
HEAP32[$882>>2] = 0;
|
|
HEAP32[$881>>2] = 0;
|
|
$883 = HEAP32[(12904)>>2]|0;
|
|
$884 = 1 << $I7$0$i$i;
|
|
$885 = $883 & $884;
|
|
$886 = ($885|0)==(0);
|
|
if ($886) {
|
|
$887 = $883 | $884;
|
|
HEAP32[(12904)>>2] = $887;
|
|
HEAP32[$879>>2] = $724;
|
|
$$sum15$i$i = (($$sum$i19$i) + 24)|0;
|
|
$888 = (($tbase$255$i) + ($$sum15$i$i)|0);
|
|
HEAP32[$888>>2] = $879;
|
|
$$sum16$i$i = (($$sum$i19$i) + 12)|0;
|
|
$889 = (($tbase$255$i) + ($$sum16$i$i)|0);
|
|
HEAP32[$889>>2] = $724;
|
|
$$sum17$i$i = (($$sum$i19$i) + 8)|0;
|
|
$890 = (($tbase$255$i) + ($$sum17$i$i)|0);
|
|
HEAP32[$890>>2] = $724;
|
|
break;
|
|
}
|
|
$891 = HEAP32[$879>>2]|0;
|
|
$892 = ((($891)) + 4|0);
|
|
$893 = HEAP32[$892>>2]|0;
|
|
$894 = $893 & -8;
|
|
$895 = ($894|0)==($qsize$0$i$i|0);
|
|
L418: do {
|
|
if ($895) {
|
|
$T$0$lcssa$i25$i = $891;
|
|
} else {
|
|
$896 = ($I7$0$i$i|0)==(31);
|
|
$897 = $I7$0$i$i >>> 1;
|
|
$898 = (25 - ($897))|0;
|
|
$899 = $896 ? 0 : $898;
|
|
$900 = $qsize$0$i$i << $899;
|
|
$K8$051$i$i = $900;$T$050$i$i = $891;
|
|
while(1) {
|
|
$907 = $K8$051$i$i >>> 31;
|
|
$908 = (((($T$050$i$i)) + 16|0) + ($907<<2)|0);
|
|
$903 = HEAP32[$908>>2]|0;
|
|
$909 = ($903|0)==(0|0);
|
|
if ($909) {
|
|
$$lcssa = $908;$T$050$i$i$lcssa = $T$050$i$i;
|
|
break;
|
|
}
|
|
$901 = $K8$051$i$i << 1;
|
|
$902 = ((($903)) + 4|0);
|
|
$904 = HEAP32[$902>>2]|0;
|
|
$905 = $904 & -8;
|
|
$906 = ($905|0)==($qsize$0$i$i|0);
|
|
if ($906) {
|
|
$T$0$lcssa$i25$i = $903;
|
|
break L418;
|
|
} else {
|
|
$K8$051$i$i = $901;$T$050$i$i = $903;
|
|
}
|
|
}
|
|
$910 = HEAP32[(12916)>>2]|0;
|
|
$911 = ($$lcssa>>>0)<($910>>>0);
|
|
if ($911) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
HEAP32[$$lcssa>>2] = $724;
|
|
$$sum23$i$i = (($$sum$i19$i) + 24)|0;
|
|
$912 = (($tbase$255$i) + ($$sum23$i$i)|0);
|
|
HEAP32[$912>>2] = $T$050$i$i$lcssa;
|
|
$$sum24$i$i = (($$sum$i19$i) + 12)|0;
|
|
$913 = (($tbase$255$i) + ($$sum24$i$i)|0);
|
|
HEAP32[$913>>2] = $724;
|
|
$$sum25$i$i = (($$sum$i19$i) + 8)|0;
|
|
$914 = (($tbase$255$i) + ($$sum25$i$i)|0);
|
|
HEAP32[$914>>2] = $724;
|
|
break L324;
|
|
}
|
|
}
|
|
} while(0);
|
|
$915 = ((($T$0$lcssa$i25$i)) + 8|0);
|
|
$916 = HEAP32[$915>>2]|0;
|
|
$917 = HEAP32[(12916)>>2]|0;
|
|
$918 = ($916>>>0)>=($917>>>0);
|
|
$not$$i26$i = ($T$0$lcssa$i25$i>>>0)>=($917>>>0);
|
|
$919 = $918 & $not$$i26$i;
|
|
if ($919) {
|
|
$920 = ((($916)) + 12|0);
|
|
HEAP32[$920>>2] = $724;
|
|
HEAP32[$915>>2] = $724;
|
|
$$sum20$i$i = (($$sum$i19$i) + 8)|0;
|
|
$921 = (($tbase$255$i) + ($$sum20$i$i)|0);
|
|
HEAP32[$921>>2] = $916;
|
|
$$sum21$i$i = (($$sum$i19$i) + 12)|0;
|
|
$922 = (($tbase$255$i) + ($$sum21$i$i)|0);
|
|
HEAP32[$922>>2] = $T$0$lcssa$i25$i;
|
|
$$sum22$i$i = (($$sum$i19$i) + 24)|0;
|
|
$923 = (($tbase$255$i) + ($$sum22$i$i)|0);
|
|
HEAP32[$923>>2] = 0;
|
|
break;
|
|
} else {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$$sum1819$i$i = $711 | 8;
|
|
$924 = (($tbase$255$i) + ($$sum1819$i$i)|0);
|
|
$mem$0 = $924;
|
|
return ($mem$0|0);
|
|
} else {
|
|
$sp$0$i$i$i = (13348);
|
|
}
|
|
}
|
|
while(1) {
|
|
$925 = HEAP32[$sp$0$i$i$i>>2]|0;
|
|
$926 = ($925>>>0)>($635>>>0);
|
|
if (!($926)) {
|
|
$927 = ((($sp$0$i$i$i)) + 4|0);
|
|
$928 = HEAP32[$927>>2]|0;
|
|
$929 = (($925) + ($928)|0);
|
|
$930 = ($929>>>0)>($635>>>0);
|
|
if ($930) {
|
|
$$lcssa215 = $925;$$lcssa216 = $928;$$lcssa217 = $929;
|
|
break;
|
|
}
|
|
}
|
|
$931 = ((($sp$0$i$i$i)) + 8|0);
|
|
$932 = HEAP32[$931>>2]|0;
|
|
$sp$0$i$i$i = $932;
|
|
}
|
|
$$sum$i14$i = (($$lcssa216) + -47)|0;
|
|
$$sum1$i15$i = (($$lcssa216) + -39)|0;
|
|
$933 = (($$lcssa215) + ($$sum1$i15$i)|0);
|
|
$934 = $933;
|
|
$935 = $934 & 7;
|
|
$936 = ($935|0)==(0);
|
|
$937 = (0 - ($934))|0;
|
|
$938 = $937 & 7;
|
|
$939 = $936 ? 0 : $938;
|
|
$$sum2$i16$i = (($$sum$i14$i) + ($939))|0;
|
|
$940 = (($$lcssa215) + ($$sum2$i16$i)|0);
|
|
$941 = ((($635)) + 16|0);
|
|
$942 = ($940>>>0)<($941>>>0);
|
|
$943 = $942 ? $635 : $940;
|
|
$944 = ((($943)) + 8|0);
|
|
$945 = (($tsize$254$i) + -40)|0;
|
|
$946 = ((($tbase$255$i)) + 8|0);
|
|
$947 = $946;
|
|
$948 = $947 & 7;
|
|
$949 = ($948|0)==(0);
|
|
$950 = (0 - ($947))|0;
|
|
$951 = $950 & 7;
|
|
$952 = $949 ? 0 : $951;
|
|
$953 = (($tbase$255$i) + ($952)|0);
|
|
$954 = (($945) - ($952))|0;
|
|
HEAP32[(12924)>>2] = $953;
|
|
HEAP32[(12912)>>2] = $954;
|
|
$955 = $954 | 1;
|
|
$$sum$i$i$i = (($952) + 4)|0;
|
|
$956 = (($tbase$255$i) + ($$sum$i$i$i)|0);
|
|
HEAP32[$956>>2] = $955;
|
|
$$sum2$i$i$i = (($tsize$254$i) + -36)|0;
|
|
$957 = (($tbase$255$i) + ($$sum2$i$i$i)|0);
|
|
HEAP32[$957>>2] = 40;
|
|
$958 = HEAP32[(13388)>>2]|0;
|
|
HEAP32[(12928)>>2] = $958;
|
|
$959 = ((($943)) + 4|0);
|
|
HEAP32[$959>>2] = 27;
|
|
;HEAP32[$944>>2]=HEAP32[(13348)>>2]|0;HEAP32[$944+4>>2]=HEAP32[(13348)+4>>2]|0;HEAP32[$944+8>>2]=HEAP32[(13348)+8>>2]|0;HEAP32[$944+12>>2]=HEAP32[(13348)+12>>2]|0;
|
|
HEAP32[(13348)>>2] = $tbase$255$i;
|
|
HEAP32[(13352)>>2] = $tsize$254$i;
|
|
HEAP32[(13360)>>2] = 0;
|
|
HEAP32[(13356)>>2] = $944;
|
|
$960 = ((($943)) + 28|0);
|
|
HEAP32[$960>>2] = 7;
|
|
$961 = ((($943)) + 32|0);
|
|
$962 = ($961>>>0)<($$lcssa217>>>0);
|
|
if ($962) {
|
|
$964 = $960;
|
|
while(1) {
|
|
$963 = ((($964)) + 4|0);
|
|
HEAP32[$963>>2] = 7;
|
|
$965 = ((($964)) + 8|0);
|
|
$966 = ($965>>>0)<($$lcssa217>>>0);
|
|
if ($966) {
|
|
$964 = $963;
|
|
} else {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
$967 = ($943|0)==($635|0);
|
|
if (!($967)) {
|
|
$968 = $943;
|
|
$969 = $635;
|
|
$970 = (($968) - ($969))|0;
|
|
$971 = HEAP32[$959>>2]|0;
|
|
$972 = $971 & -2;
|
|
HEAP32[$959>>2] = $972;
|
|
$973 = $970 | 1;
|
|
$974 = ((($635)) + 4|0);
|
|
HEAP32[$974>>2] = $973;
|
|
HEAP32[$943>>2] = $970;
|
|
$975 = $970 >>> 3;
|
|
$976 = ($970>>>0)<(256);
|
|
if ($976) {
|
|
$977 = $975 << 1;
|
|
$978 = (12940 + ($977<<2)|0);
|
|
$979 = HEAP32[12900>>2]|0;
|
|
$980 = 1 << $975;
|
|
$981 = $979 & $980;
|
|
$982 = ($981|0)==(0);
|
|
if ($982) {
|
|
$983 = $979 | $980;
|
|
HEAP32[12900>>2] = $983;
|
|
$$pre$i$i = (($977) + 2)|0;
|
|
$$pre14$i$i = (12940 + ($$pre$i$i<<2)|0);
|
|
$$pre$phi$i$iZ2D = $$pre14$i$i;$F$0$i$i = $978;
|
|
} else {
|
|
$$sum4$i$i = (($977) + 2)|0;
|
|
$984 = (12940 + ($$sum4$i$i<<2)|0);
|
|
$985 = HEAP32[$984>>2]|0;
|
|
$986 = HEAP32[(12916)>>2]|0;
|
|
$987 = ($985>>>0)<($986>>>0);
|
|
if ($987) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$$pre$phi$i$iZ2D = $984;$F$0$i$i = $985;
|
|
}
|
|
}
|
|
HEAP32[$$pre$phi$i$iZ2D>>2] = $635;
|
|
$988 = ((($F$0$i$i)) + 12|0);
|
|
HEAP32[$988>>2] = $635;
|
|
$989 = ((($635)) + 8|0);
|
|
HEAP32[$989>>2] = $F$0$i$i;
|
|
$990 = ((($635)) + 12|0);
|
|
HEAP32[$990>>2] = $978;
|
|
break;
|
|
}
|
|
$991 = $970 >>> 8;
|
|
$992 = ($991|0)==(0);
|
|
if ($992) {
|
|
$I1$0$i$i = 0;
|
|
} else {
|
|
$993 = ($970>>>0)>(16777215);
|
|
if ($993) {
|
|
$I1$0$i$i = 31;
|
|
} else {
|
|
$994 = (($991) + 1048320)|0;
|
|
$995 = $994 >>> 16;
|
|
$996 = $995 & 8;
|
|
$997 = $991 << $996;
|
|
$998 = (($997) + 520192)|0;
|
|
$999 = $998 >>> 16;
|
|
$1000 = $999 & 4;
|
|
$1001 = $1000 | $996;
|
|
$1002 = $997 << $1000;
|
|
$1003 = (($1002) + 245760)|0;
|
|
$1004 = $1003 >>> 16;
|
|
$1005 = $1004 & 2;
|
|
$1006 = $1001 | $1005;
|
|
$1007 = (14 - ($1006))|0;
|
|
$1008 = $1002 << $1005;
|
|
$1009 = $1008 >>> 15;
|
|
$1010 = (($1007) + ($1009))|0;
|
|
$1011 = $1010 << 1;
|
|
$1012 = (($1010) + 7)|0;
|
|
$1013 = $970 >>> $1012;
|
|
$1014 = $1013 & 1;
|
|
$1015 = $1014 | $1011;
|
|
$I1$0$i$i = $1015;
|
|
}
|
|
}
|
|
$1016 = (13204 + ($I1$0$i$i<<2)|0);
|
|
$1017 = ((($635)) + 28|0);
|
|
HEAP32[$1017>>2] = $I1$0$i$i;
|
|
$1018 = ((($635)) + 20|0);
|
|
HEAP32[$1018>>2] = 0;
|
|
HEAP32[$941>>2] = 0;
|
|
$1019 = HEAP32[(12904)>>2]|0;
|
|
$1020 = 1 << $I1$0$i$i;
|
|
$1021 = $1019 & $1020;
|
|
$1022 = ($1021|0)==(0);
|
|
if ($1022) {
|
|
$1023 = $1019 | $1020;
|
|
HEAP32[(12904)>>2] = $1023;
|
|
HEAP32[$1016>>2] = $635;
|
|
$1024 = ((($635)) + 24|0);
|
|
HEAP32[$1024>>2] = $1016;
|
|
$1025 = ((($635)) + 12|0);
|
|
HEAP32[$1025>>2] = $635;
|
|
$1026 = ((($635)) + 8|0);
|
|
HEAP32[$1026>>2] = $635;
|
|
break;
|
|
}
|
|
$1027 = HEAP32[$1016>>2]|0;
|
|
$1028 = ((($1027)) + 4|0);
|
|
$1029 = HEAP32[$1028>>2]|0;
|
|
$1030 = $1029 & -8;
|
|
$1031 = ($1030|0)==($970|0);
|
|
L459: do {
|
|
if ($1031) {
|
|
$T$0$lcssa$i$i = $1027;
|
|
} else {
|
|
$1032 = ($I1$0$i$i|0)==(31);
|
|
$1033 = $I1$0$i$i >>> 1;
|
|
$1034 = (25 - ($1033))|0;
|
|
$1035 = $1032 ? 0 : $1034;
|
|
$1036 = $970 << $1035;
|
|
$K2$07$i$i = $1036;$T$06$i$i = $1027;
|
|
while(1) {
|
|
$1043 = $K2$07$i$i >>> 31;
|
|
$1044 = (((($T$06$i$i)) + 16|0) + ($1043<<2)|0);
|
|
$1039 = HEAP32[$1044>>2]|0;
|
|
$1045 = ($1039|0)==(0|0);
|
|
if ($1045) {
|
|
$$lcssa211 = $1044;$T$06$i$i$lcssa = $T$06$i$i;
|
|
break;
|
|
}
|
|
$1037 = $K2$07$i$i << 1;
|
|
$1038 = ((($1039)) + 4|0);
|
|
$1040 = HEAP32[$1038>>2]|0;
|
|
$1041 = $1040 & -8;
|
|
$1042 = ($1041|0)==($970|0);
|
|
if ($1042) {
|
|
$T$0$lcssa$i$i = $1039;
|
|
break L459;
|
|
} else {
|
|
$K2$07$i$i = $1037;$T$06$i$i = $1039;
|
|
}
|
|
}
|
|
$1046 = HEAP32[(12916)>>2]|0;
|
|
$1047 = ($$lcssa211>>>0)<($1046>>>0);
|
|
if ($1047) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
HEAP32[$$lcssa211>>2] = $635;
|
|
$1048 = ((($635)) + 24|0);
|
|
HEAP32[$1048>>2] = $T$06$i$i$lcssa;
|
|
$1049 = ((($635)) + 12|0);
|
|
HEAP32[$1049>>2] = $635;
|
|
$1050 = ((($635)) + 8|0);
|
|
HEAP32[$1050>>2] = $635;
|
|
break L299;
|
|
}
|
|
}
|
|
} while(0);
|
|
$1051 = ((($T$0$lcssa$i$i)) + 8|0);
|
|
$1052 = HEAP32[$1051>>2]|0;
|
|
$1053 = HEAP32[(12916)>>2]|0;
|
|
$1054 = ($1052>>>0)>=($1053>>>0);
|
|
$not$$i$i = ($T$0$lcssa$i$i>>>0)>=($1053>>>0);
|
|
$1055 = $1054 & $not$$i$i;
|
|
if ($1055) {
|
|
$1056 = ((($1052)) + 12|0);
|
|
HEAP32[$1056>>2] = $635;
|
|
HEAP32[$1051>>2] = $635;
|
|
$1057 = ((($635)) + 8|0);
|
|
HEAP32[$1057>>2] = $1052;
|
|
$1058 = ((($635)) + 12|0);
|
|
HEAP32[$1058>>2] = $T$0$lcssa$i$i;
|
|
$1059 = ((($635)) + 24|0);
|
|
HEAP32[$1059>>2] = 0;
|
|
break;
|
|
} else {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$1060 = HEAP32[(12912)>>2]|0;
|
|
$1061 = ($1060>>>0)>($nb$0>>>0);
|
|
if ($1061) {
|
|
$1062 = (($1060) - ($nb$0))|0;
|
|
HEAP32[(12912)>>2] = $1062;
|
|
$1063 = HEAP32[(12924)>>2]|0;
|
|
$1064 = (($1063) + ($nb$0)|0);
|
|
HEAP32[(12924)>>2] = $1064;
|
|
$1065 = $1062 | 1;
|
|
$$sum$i32 = (($nb$0) + 4)|0;
|
|
$1066 = (($1063) + ($$sum$i32)|0);
|
|
HEAP32[$1066>>2] = $1065;
|
|
$1067 = $nb$0 | 3;
|
|
$1068 = ((($1063)) + 4|0);
|
|
HEAP32[$1068>>2] = $1067;
|
|
$1069 = ((($1063)) + 8|0);
|
|
$mem$0 = $1069;
|
|
return ($mem$0|0);
|
|
}
|
|
}
|
|
$1070 = (___errno_location()|0);
|
|
HEAP32[$1070>>2] = 12;
|
|
$mem$0 = 0;
|
|
return ($mem$0|0);
|
|
}
|
|
function _free($mem) {
|
|
$mem = $mem|0;
|
|
var $$lcssa = 0, $$pre = 0, $$pre$phi59Z2D = 0, $$pre$phi61Z2D = 0, $$pre$phiZ2D = 0, $$pre57 = 0, $$pre58 = 0, $$pre60 = 0, $$sum = 0, $$sum11 = 0, $$sum12 = 0, $$sum13 = 0, $$sum14 = 0, $$sum1718 = 0, $$sum19 = 0, $$sum2 = 0, $$sum20 = 0, $$sum22 = 0, $$sum23 = 0, $$sum24 = 0;
|
|
var $$sum25 = 0, $$sum26 = 0, $$sum27 = 0, $$sum28 = 0, $$sum29 = 0, $$sum3 = 0, $$sum30 = 0, $$sum31 = 0, $$sum5 = 0, $$sum67 = 0, $$sum8 = 0, $$sum9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0;
|
|
var $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0;
|
|
var $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0;
|
|
var $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0;
|
|
var $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0;
|
|
var $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0;
|
|
var $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0;
|
|
var $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0;
|
|
var $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0;
|
|
var $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0;
|
|
var $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0;
|
|
var $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0;
|
|
var $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0;
|
|
var $321 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0;
|
|
var $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0;
|
|
var $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0;
|
|
var $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $F16$0 = 0, $I18$0 = 0, $K19$052 = 0, $R$0 = 0, $R$0$lcssa = 0, $R$1 = 0;
|
|
var $R7$0 = 0, $R7$0$lcssa = 0, $R7$1 = 0, $RP$0 = 0, $RP$0$lcssa = 0, $RP9$0 = 0, $RP9$0$lcssa = 0, $T$0$lcssa = 0, $T$051 = 0, $T$051$lcssa = 0, $cond = 0, $cond47 = 0, $not$ = 0, $p$0 = 0, $psize$0 = 0, $psize$1 = 0, $sp$0$i = 0, $sp$0$in$i = 0, label = 0, sp = 0;
|
|
sp = STACKTOP;
|
|
$0 = ($mem|0)==(0|0);
|
|
if ($0) {
|
|
return;
|
|
}
|
|
$1 = ((($mem)) + -8|0);
|
|
$2 = HEAP32[(12916)>>2]|0;
|
|
$3 = ($1>>>0)<($2>>>0);
|
|
if ($3) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$4 = ((($mem)) + -4|0);
|
|
$5 = HEAP32[$4>>2]|0;
|
|
$6 = $5 & 3;
|
|
$7 = ($6|0)==(1);
|
|
if ($7) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$8 = $5 & -8;
|
|
$$sum = (($8) + -8)|0;
|
|
$9 = (($mem) + ($$sum)|0);
|
|
$10 = $5 & 1;
|
|
$11 = ($10|0)==(0);
|
|
do {
|
|
if ($11) {
|
|
$12 = HEAP32[$1>>2]|0;
|
|
$13 = ($6|0)==(0);
|
|
if ($13) {
|
|
return;
|
|
}
|
|
$$sum2 = (-8 - ($12))|0;
|
|
$14 = (($mem) + ($$sum2)|0);
|
|
$15 = (($12) + ($8))|0;
|
|
$16 = ($14>>>0)<($2>>>0);
|
|
if ($16) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$17 = HEAP32[(12920)>>2]|0;
|
|
$18 = ($14|0)==($17|0);
|
|
if ($18) {
|
|
$$sum3 = (($8) + -4)|0;
|
|
$103 = (($mem) + ($$sum3)|0);
|
|
$104 = HEAP32[$103>>2]|0;
|
|
$105 = $104 & 3;
|
|
$106 = ($105|0)==(3);
|
|
if (!($106)) {
|
|
$p$0 = $14;$psize$0 = $15;
|
|
break;
|
|
}
|
|
HEAP32[(12908)>>2] = $15;
|
|
$107 = $104 & -2;
|
|
HEAP32[$103>>2] = $107;
|
|
$108 = $15 | 1;
|
|
$$sum20 = (($$sum2) + 4)|0;
|
|
$109 = (($mem) + ($$sum20)|0);
|
|
HEAP32[$109>>2] = $108;
|
|
HEAP32[$9>>2] = $15;
|
|
return;
|
|
}
|
|
$19 = $12 >>> 3;
|
|
$20 = ($12>>>0)<(256);
|
|
if ($20) {
|
|
$$sum30 = (($$sum2) + 8)|0;
|
|
$21 = (($mem) + ($$sum30)|0);
|
|
$22 = HEAP32[$21>>2]|0;
|
|
$$sum31 = (($$sum2) + 12)|0;
|
|
$23 = (($mem) + ($$sum31)|0);
|
|
$24 = HEAP32[$23>>2]|0;
|
|
$25 = $19 << 1;
|
|
$26 = (12940 + ($25<<2)|0);
|
|
$27 = ($22|0)==($26|0);
|
|
if (!($27)) {
|
|
$28 = ($22>>>0)<($2>>>0);
|
|
if ($28) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$29 = ((($22)) + 12|0);
|
|
$30 = HEAP32[$29>>2]|0;
|
|
$31 = ($30|0)==($14|0);
|
|
if (!($31)) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
$32 = ($24|0)==($22|0);
|
|
if ($32) {
|
|
$33 = 1 << $19;
|
|
$34 = $33 ^ -1;
|
|
$35 = HEAP32[12900>>2]|0;
|
|
$36 = $35 & $34;
|
|
HEAP32[12900>>2] = $36;
|
|
$p$0 = $14;$psize$0 = $15;
|
|
break;
|
|
}
|
|
$37 = ($24|0)==($26|0);
|
|
if ($37) {
|
|
$$pre60 = ((($24)) + 8|0);
|
|
$$pre$phi61Z2D = $$pre60;
|
|
} else {
|
|
$38 = ($24>>>0)<($2>>>0);
|
|
if ($38) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$39 = ((($24)) + 8|0);
|
|
$40 = HEAP32[$39>>2]|0;
|
|
$41 = ($40|0)==($14|0);
|
|
if ($41) {
|
|
$$pre$phi61Z2D = $39;
|
|
} else {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
$42 = ((($22)) + 12|0);
|
|
HEAP32[$42>>2] = $24;
|
|
HEAP32[$$pre$phi61Z2D>>2] = $22;
|
|
$p$0 = $14;$psize$0 = $15;
|
|
break;
|
|
}
|
|
$$sum22 = (($$sum2) + 24)|0;
|
|
$43 = (($mem) + ($$sum22)|0);
|
|
$44 = HEAP32[$43>>2]|0;
|
|
$$sum23 = (($$sum2) + 12)|0;
|
|
$45 = (($mem) + ($$sum23)|0);
|
|
$46 = HEAP32[$45>>2]|0;
|
|
$47 = ($46|0)==($14|0);
|
|
do {
|
|
if ($47) {
|
|
$$sum25 = (($$sum2) + 20)|0;
|
|
$57 = (($mem) + ($$sum25)|0);
|
|
$58 = HEAP32[$57>>2]|0;
|
|
$59 = ($58|0)==(0|0);
|
|
if ($59) {
|
|
$$sum24 = (($$sum2) + 16)|0;
|
|
$60 = (($mem) + ($$sum24)|0);
|
|
$61 = HEAP32[$60>>2]|0;
|
|
$62 = ($61|0)==(0|0);
|
|
if ($62) {
|
|
$R$1 = 0;
|
|
break;
|
|
} else {
|
|
$R$0 = $61;$RP$0 = $60;
|
|
}
|
|
} else {
|
|
$R$0 = $58;$RP$0 = $57;
|
|
}
|
|
while(1) {
|
|
$63 = ((($R$0)) + 20|0);
|
|
$64 = HEAP32[$63>>2]|0;
|
|
$65 = ($64|0)==(0|0);
|
|
if (!($65)) {
|
|
$R$0 = $64;$RP$0 = $63;
|
|
continue;
|
|
}
|
|
$66 = ((($R$0)) + 16|0);
|
|
$67 = HEAP32[$66>>2]|0;
|
|
$68 = ($67|0)==(0|0);
|
|
if ($68) {
|
|
$R$0$lcssa = $R$0;$RP$0$lcssa = $RP$0;
|
|
break;
|
|
} else {
|
|
$R$0 = $67;$RP$0 = $66;
|
|
}
|
|
}
|
|
$69 = ($RP$0$lcssa>>>0)<($2>>>0);
|
|
if ($69) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
HEAP32[$RP$0$lcssa>>2] = 0;
|
|
$R$1 = $R$0$lcssa;
|
|
break;
|
|
}
|
|
} else {
|
|
$$sum29 = (($$sum2) + 8)|0;
|
|
$48 = (($mem) + ($$sum29)|0);
|
|
$49 = HEAP32[$48>>2]|0;
|
|
$50 = ($49>>>0)<($2>>>0);
|
|
if ($50) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$51 = ((($49)) + 12|0);
|
|
$52 = HEAP32[$51>>2]|0;
|
|
$53 = ($52|0)==($14|0);
|
|
if (!($53)) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$54 = ((($46)) + 8|0);
|
|
$55 = HEAP32[$54>>2]|0;
|
|
$56 = ($55|0)==($14|0);
|
|
if ($56) {
|
|
HEAP32[$51>>2] = $46;
|
|
HEAP32[$54>>2] = $49;
|
|
$R$1 = $46;
|
|
break;
|
|
} else {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$70 = ($44|0)==(0|0);
|
|
if ($70) {
|
|
$p$0 = $14;$psize$0 = $15;
|
|
} else {
|
|
$$sum26 = (($$sum2) + 28)|0;
|
|
$71 = (($mem) + ($$sum26)|0);
|
|
$72 = HEAP32[$71>>2]|0;
|
|
$73 = (13204 + ($72<<2)|0);
|
|
$74 = HEAP32[$73>>2]|0;
|
|
$75 = ($14|0)==($74|0);
|
|
if ($75) {
|
|
HEAP32[$73>>2] = $R$1;
|
|
$cond = ($R$1|0)==(0|0);
|
|
if ($cond) {
|
|
$76 = 1 << $72;
|
|
$77 = $76 ^ -1;
|
|
$78 = HEAP32[(12904)>>2]|0;
|
|
$79 = $78 & $77;
|
|
HEAP32[(12904)>>2] = $79;
|
|
$p$0 = $14;$psize$0 = $15;
|
|
break;
|
|
}
|
|
} else {
|
|
$80 = HEAP32[(12916)>>2]|0;
|
|
$81 = ($44>>>0)<($80>>>0);
|
|
if ($81) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$82 = ((($44)) + 16|0);
|
|
$83 = HEAP32[$82>>2]|0;
|
|
$84 = ($83|0)==($14|0);
|
|
if ($84) {
|
|
HEAP32[$82>>2] = $R$1;
|
|
} else {
|
|
$85 = ((($44)) + 20|0);
|
|
HEAP32[$85>>2] = $R$1;
|
|
}
|
|
$86 = ($R$1|0)==(0|0);
|
|
if ($86) {
|
|
$p$0 = $14;$psize$0 = $15;
|
|
break;
|
|
}
|
|
}
|
|
$87 = HEAP32[(12916)>>2]|0;
|
|
$88 = ($R$1>>>0)<($87>>>0);
|
|
if ($88) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$89 = ((($R$1)) + 24|0);
|
|
HEAP32[$89>>2] = $44;
|
|
$$sum27 = (($$sum2) + 16)|0;
|
|
$90 = (($mem) + ($$sum27)|0);
|
|
$91 = HEAP32[$90>>2]|0;
|
|
$92 = ($91|0)==(0|0);
|
|
do {
|
|
if (!($92)) {
|
|
$93 = ($91>>>0)<($87>>>0);
|
|
if ($93) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$94 = ((($R$1)) + 16|0);
|
|
HEAP32[$94>>2] = $91;
|
|
$95 = ((($91)) + 24|0);
|
|
HEAP32[$95>>2] = $R$1;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$$sum28 = (($$sum2) + 20)|0;
|
|
$96 = (($mem) + ($$sum28)|0);
|
|
$97 = HEAP32[$96>>2]|0;
|
|
$98 = ($97|0)==(0|0);
|
|
if ($98) {
|
|
$p$0 = $14;$psize$0 = $15;
|
|
} else {
|
|
$99 = HEAP32[(12916)>>2]|0;
|
|
$100 = ($97>>>0)<($99>>>0);
|
|
if ($100) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$101 = ((($R$1)) + 20|0);
|
|
HEAP32[$101>>2] = $97;
|
|
$102 = ((($97)) + 24|0);
|
|
HEAP32[$102>>2] = $R$1;
|
|
$p$0 = $14;$psize$0 = $15;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
$p$0 = $1;$psize$0 = $8;
|
|
}
|
|
} while(0);
|
|
$110 = ($p$0>>>0)<($9>>>0);
|
|
if (!($110)) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$$sum19 = (($8) + -4)|0;
|
|
$111 = (($mem) + ($$sum19)|0);
|
|
$112 = HEAP32[$111>>2]|0;
|
|
$113 = $112 & 1;
|
|
$114 = ($113|0)==(0);
|
|
if ($114) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$115 = $112 & 2;
|
|
$116 = ($115|0)==(0);
|
|
if ($116) {
|
|
$117 = HEAP32[(12924)>>2]|0;
|
|
$118 = ($9|0)==($117|0);
|
|
if ($118) {
|
|
$119 = HEAP32[(12912)>>2]|0;
|
|
$120 = (($119) + ($psize$0))|0;
|
|
HEAP32[(12912)>>2] = $120;
|
|
HEAP32[(12924)>>2] = $p$0;
|
|
$121 = $120 | 1;
|
|
$122 = ((($p$0)) + 4|0);
|
|
HEAP32[$122>>2] = $121;
|
|
$123 = HEAP32[(12920)>>2]|0;
|
|
$124 = ($p$0|0)==($123|0);
|
|
if (!($124)) {
|
|
return;
|
|
}
|
|
HEAP32[(12920)>>2] = 0;
|
|
HEAP32[(12908)>>2] = 0;
|
|
return;
|
|
}
|
|
$125 = HEAP32[(12920)>>2]|0;
|
|
$126 = ($9|0)==($125|0);
|
|
if ($126) {
|
|
$127 = HEAP32[(12908)>>2]|0;
|
|
$128 = (($127) + ($psize$0))|0;
|
|
HEAP32[(12908)>>2] = $128;
|
|
HEAP32[(12920)>>2] = $p$0;
|
|
$129 = $128 | 1;
|
|
$130 = ((($p$0)) + 4|0);
|
|
HEAP32[$130>>2] = $129;
|
|
$131 = (($p$0) + ($128)|0);
|
|
HEAP32[$131>>2] = $128;
|
|
return;
|
|
}
|
|
$132 = $112 & -8;
|
|
$133 = (($132) + ($psize$0))|0;
|
|
$134 = $112 >>> 3;
|
|
$135 = ($112>>>0)<(256);
|
|
do {
|
|
if ($135) {
|
|
$136 = (($mem) + ($8)|0);
|
|
$137 = HEAP32[$136>>2]|0;
|
|
$$sum1718 = $8 | 4;
|
|
$138 = (($mem) + ($$sum1718)|0);
|
|
$139 = HEAP32[$138>>2]|0;
|
|
$140 = $134 << 1;
|
|
$141 = (12940 + ($140<<2)|0);
|
|
$142 = ($137|0)==($141|0);
|
|
if (!($142)) {
|
|
$143 = HEAP32[(12916)>>2]|0;
|
|
$144 = ($137>>>0)<($143>>>0);
|
|
if ($144) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$145 = ((($137)) + 12|0);
|
|
$146 = HEAP32[$145>>2]|0;
|
|
$147 = ($146|0)==($9|0);
|
|
if (!($147)) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
$148 = ($139|0)==($137|0);
|
|
if ($148) {
|
|
$149 = 1 << $134;
|
|
$150 = $149 ^ -1;
|
|
$151 = HEAP32[12900>>2]|0;
|
|
$152 = $151 & $150;
|
|
HEAP32[12900>>2] = $152;
|
|
break;
|
|
}
|
|
$153 = ($139|0)==($141|0);
|
|
if ($153) {
|
|
$$pre58 = ((($139)) + 8|0);
|
|
$$pre$phi59Z2D = $$pre58;
|
|
} else {
|
|
$154 = HEAP32[(12916)>>2]|0;
|
|
$155 = ($139>>>0)<($154>>>0);
|
|
if ($155) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$156 = ((($139)) + 8|0);
|
|
$157 = HEAP32[$156>>2]|0;
|
|
$158 = ($157|0)==($9|0);
|
|
if ($158) {
|
|
$$pre$phi59Z2D = $156;
|
|
} else {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
$159 = ((($137)) + 12|0);
|
|
HEAP32[$159>>2] = $139;
|
|
HEAP32[$$pre$phi59Z2D>>2] = $137;
|
|
} else {
|
|
$$sum5 = (($8) + 16)|0;
|
|
$160 = (($mem) + ($$sum5)|0);
|
|
$161 = HEAP32[$160>>2]|0;
|
|
$$sum67 = $8 | 4;
|
|
$162 = (($mem) + ($$sum67)|0);
|
|
$163 = HEAP32[$162>>2]|0;
|
|
$164 = ($163|0)==($9|0);
|
|
do {
|
|
if ($164) {
|
|
$$sum9 = (($8) + 12)|0;
|
|
$175 = (($mem) + ($$sum9)|0);
|
|
$176 = HEAP32[$175>>2]|0;
|
|
$177 = ($176|0)==(0|0);
|
|
if ($177) {
|
|
$$sum8 = (($8) + 8)|0;
|
|
$178 = (($mem) + ($$sum8)|0);
|
|
$179 = HEAP32[$178>>2]|0;
|
|
$180 = ($179|0)==(0|0);
|
|
if ($180) {
|
|
$R7$1 = 0;
|
|
break;
|
|
} else {
|
|
$R7$0 = $179;$RP9$0 = $178;
|
|
}
|
|
} else {
|
|
$R7$0 = $176;$RP9$0 = $175;
|
|
}
|
|
while(1) {
|
|
$181 = ((($R7$0)) + 20|0);
|
|
$182 = HEAP32[$181>>2]|0;
|
|
$183 = ($182|0)==(0|0);
|
|
if (!($183)) {
|
|
$R7$0 = $182;$RP9$0 = $181;
|
|
continue;
|
|
}
|
|
$184 = ((($R7$0)) + 16|0);
|
|
$185 = HEAP32[$184>>2]|0;
|
|
$186 = ($185|0)==(0|0);
|
|
if ($186) {
|
|
$R7$0$lcssa = $R7$0;$RP9$0$lcssa = $RP9$0;
|
|
break;
|
|
} else {
|
|
$R7$0 = $185;$RP9$0 = $184;
|
|
}
|
|
}
|
|
$187 = HEAP32[(12916)>>2]|0;
|
|
$188 = ($RP9$0$lcssa>>>0)<($187>>>0);
|
|
if ($188) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
HEAP32[$RP9$0$lcssa>>2] = 0;
|
|
$R7$1 = $R7$0$lcssa;
|
|
break;
|
|
}
|
|
} else {
|
|
$165 = (($mem) + ($8)|0);
|
|
$166 = HEAP32[$165>>2]|0;
|
|
$167 = HEAP32[(12916)>>2]|0;
|
|
$168 = ($166>>>0)<($167>>>0);
|
|
if ($168) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$169 = ((($166)) + 12|0);
|
|
$170 = HEAP32[$169>>2]|0;
|
|
$171 = ($170|0)==($9|0);
|
|
if (!($171)) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$172 = ((($163)) + 8|0);
|
|
$173 = HEAP32[$172>>2]|0;
|
|
$174 = ($173|0)==($9|0);
|
|
if ($174) {
|
|
HEAP32[$169>>2] = $163;
|
|
HEAP32[$172>>2] = $166;
|
|
$R7$1 = $163;
|
|
break;
|
|
} else {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$189 = ($161|0)==(0|0);
|
|
if (!($189)) {
|
|
$$sum12 = (($8) + 20)|0;
|
|
$190 = (($mem) + ($$sum12)|0);
|
|
$191 = HEAP32[$190>>2]|0;
|
|
$192 = (13204 + ($191<<2)|0);
|
|
$193 = HEAP32[$192>>2]|0;
|
|
$194 = ($9|0)==($193|0);
|
|
if ($194) {
|
|
HEAP32[$192>>2] = $R7$1;
|
|
$cond47 = ($R7$1|0)==(0|0);
|
|
if ($cond47) {
|
|
$195 = 1 << $191;
|
|
$196 = $195 ^ -1;
|
|
$197 = HEAP32[(12904)>>2]|0;
|
|
$198 = $197 & $196;
|
|
HEAP32[(12904)>>2] = $198;
|
|
break;
|
|
}
|
|
} else {
|
|
$199 = HEAP32[(12916)>>2]|0;
|
|
$200 = ($161>>>0)<($199>>>0);
|
|
if ($200) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$201 = ((($161)) + 16|0);
|
|
$202 = HEAP32[$201>>2]|0;
|
|
$203 = ($202|0)==($9|0);
|
|
if ($203) {
|
|
HEAP32[$201>>2] = $R7$1;
|
|
} else {
|
|
$204 = ((($161)) + 20|0);
|
|
HEAP32[$204>>2] = $R7$1;
|
|
}
|
|
$205 = ($R7$1|0)==(0|0);
|
|
if ($205) {
|
|
break;
|
|
}
|
|
}
|
|
$206 = HEAP32[(12916)>>2]|0;
|
|
$207 = ($R7$1>>>0)<($206>>>0);
|
|
if ($207) {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
$208 = ((($R7$1)) + 24|0);
|
|
HEAP32[$208>>2] = $161;
|
|
$$sum13 = (($8) + 8)|0;
|
|
$209 = (($mem) + ($$sum13)|0);
|
|
$210 = HEAP32[$209>>2]|0;
|
|
$211 = ($210|0)==(0|0);
|
|
do {
|
|
if (!($211)) {
|
|
$212 = ($210>>>0)<($206>>>0);
|
|
if ($212) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$213 = ((($R7$1)) + 16|0);
|
|
HEAP32[$213>>2] = $210;
|
|
$214 = ((($210)) + 24|0);
|
|
HEAP32[$214>>2] = $R7$1;
|
|
break;
|
|
}
|
|
}
|
|
} while(0);
|
|
$$sum14 = (($8) + 12)|0;
|
|
$215 = (($mem) + ($$sum14)|0);
|
|
$216 = HEAP32[$215>>2]|0;
|
|
$217 = ($216|0)==(0|0);
|
|
if (!($217)) {
|
|
$218 = HEAP32[(12916)>>2]|0;
|
|
$219 = ($216>>>0)<($218>>>0);
|
|
if ($219) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$220 = ((($R7$1)) + 20|0);
|
|
HEAP32[$220>>2] = $216;
|
|
$221 = ((($216)) + 24|0);
|
|
HEAP32[$221>>2] = $R7$1;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} while(0);
|
|
$222 = $133 | 1;
|
|
$223 = ((($p$0)) + 4|0);
|
|
HEAP32[$223>>2] = $222;
|
|
$224 = (($p$0) + ($133)|0);
|
|
HEAP32[$224>>2] = $133;
|
|
$225 = HEAP32[(12920)>>2]|0;
|
|
$226 = ($p$0|0)==($225|0);
|
|
if ($226) {
|
|
HEAP32[(12908)>>2] = $133;
|
|
return;
|
|
} else {
|
|
$psize$1 = $133;
|
|
}
|
|
} else {
|
|
$227 = $112 & -2;
|
|
HEAP32[$111>>2] = $227;
|
|
$228 = $psize$0 | 1;
|
|
$229 = ((($p$0)) + 4|0);
|
|
HEAP32[$229>>2] = $228;
|
|
$230 = (($p$0) + ($psize$0)|0);
|
|
HEAP32[$230>>2] = $psize$0;
|
|
$psize$1 = $psize$0;
|
|
}
|
|
$231 = $psize$1 >>> 3;
|
|
$232 = ($psize$1>>>0)<(256);
|
|
if ($232) {
|
|
$233 = $231 << 1;
|
|
$234 = (12940 + ($233<<2)|0);
|
|
$235 = HEAP32[12900>>2]|0;
|
|
$236 = 1 << $231;
|
|
$237 = $235 & $236;
|
|
$238 = ($237|0)==(0);
|
|
if ($238) {
|
|
$239 = $235 | $236;
|
|
HEAP32[12900>>2] = $239;
|
|
$$pre = (($233) + 2)|0;
|
|
$$pre57 = (12940 + ($$pre<<2)|0);
|
|
$$pre$phiZ2D = $$pre57;$F16$0 = $234;
|
|
} else {
|
|
$$sum11 = (($233) + 2)|0;
|
|
$240 = (12940 + ($$sum11<<2)|0);
|
|
$241 = HEAP32[$240>>2]|0;
|
|
$242 = HEAP32[(12916)>>2]|0;
|
|
$243 = ($241>>>0)<($242>>>0);
|
|
if ($243) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
$$pre$phiZ2D = $240;$F16$0 = $241;
|
|
}
|
|
}
|
|
HEAP32[$$pre$phiZ2D>>2] = $p$0;
|
|
$244 = ((($F16$0)) + 12|0);
|
|
HEAP32[$244>>2] = $p$0;
|
|
$245 = ((($p$0)) + 8|0);
|
|
HEAP32[$245>>2] = $F16$0;
|
|
$246 = ((($p$0)) + 12|0);
|
|
HEAP32[$246>>2] = $234;
|
|
return;
|
|
}
|
|
$247 = $psize$1 >>> 8;
|
|
$248 = ($247|0)==(0);
|
|
if ($248) {
|
|
$I18$0 = 0;
|
|
} else {
|
|
$249 = ($psize$1>>>0)>(16777215);
|
|
if ($249) {
|
|
$I18$0 = 31;
|
|
} else {
|
|
$250 = (($247) + 1048320)|0;
|
|
$251 = $250 >>> 16;
|
|
$252 = $251 & 8;
|
|
$253 = $247 << $252;
|
|
$254 = (($253) + 520192)|0;
|
|
$255 = $254 >>> 16;
|
|
$256 = $255 & 4;
|
|
$257 = $256 | $252;
|
|
$258 = $253 << $256;
|
|
$259 = (($258) + 245760)|0;
|
|
$260 = $259 >>> 16;
|
|
$261 = $260 & 2;
|
|
$262 = $257 | $261;
|
|
$263 = (14 - ($262))|0;
|
|
$264 = $258 << $261;
|
|
$265 = $264 >>> 15;
|
|
$266 = (($263) + ($265))|0;
|
|
$267 = $266 << 1;
|
|
$268 = (($266) + 7)|0;
|
|
$269 = $psize$1 >>> $268;
|
|
$270 = $269 & 1;
|
|
$271 = $270 | $267;
|
|
$I18$0 = $271;
|
|
}
|
|
}
|
|
$272 = (13204 + ($I18$0<<2)|0);
|
|
$273 = ((($p$0)) + 28|0);
|
|
HEAP32[$273>>2] = $I18$0;
|
|
$274 = ((($p$0)) + 16|0);
|
|
$275 = ((($p$0)) + 20|0);
|
|
HEAP32[$275>>2] = 0;
|
|
HEAP32[$274>>2] = 0;
|
|
$276 = HEAP32[(12904)>>2]|0;
|
|
$277 = 1 << $I18$0;
|
|
$278 = $276 & $277;
|
|
$279 = ($278|0)==(0);
|
|
L199: do {
|
|
if ($279) {
|
|
$280 = $276 | $277;
|
|
HEAP32[(12904)>>2] = $280;
|
|
HEAP32[$272>>2] = $p$0;
|
|
$281 = ((($p$0)) + 24|0);
|
|
HEAP32[$281>>2] = $272;
|
|
$282 = ((($p$0)) + 12|0);
|
|
HEAP32[$282>>2] = $p$0;
|
|
$283 = ((($p$0)) + 8|0);
|
|
HEAP32[$283>>2] = $p$0;
|
|
} else {
|
|
$284 = HEAP32[$272>>2]|0;
|
|
$285 = ((($284)) + 4|0);
|
|
$286 = HEAP32[$285>>2]|0;
|
|
$287 = $286 & -8;
|
|
$288 = ($287|0)==($psize$1|0);
|
|
L202: do {
|
|
if ($288) {
|
|
$T$0$lcssa = $284;
|
|
} else {
|
|
$289 = ($I18$0|0)==(31);
|
|
$290 = $I18$0 >>> 1;
|
|
$291 = (25 - ($290))|0;
|
|
$292 = $289 ? 0 : $291;
|
|
$293 = $psize$1 << $292;
|
|
$K19$052 = $293;$T$051 = $284;
|
|
while(1) {
|
|
$300 = $K19$052 >>> 31;
|
|
$301 = (((($T$051)) + 16|0) + ($300<<2)|0);
|
|
$296 = HEAP32[$301>>2]|0;
|
|
$302 = ($296|0)==(0|0);
|
|
if ($302) {
|
|
$$lcssa = $301;$T$051$lcssa = $T$051;
|
|
break;
|
|
}
|
|
$294 = $K19$052 << 1;
|
|
$295 = ((($296)) + 4|0);
|
|
$297 = HEAP32[$295>>2]|0;
|
|
$298 = $297 & -8;
|
|
$299 = ($298|0)==($psize$1|0);
|
|
if ($299) {
|
|
$T$0$lcssa = $296;
|
|
break L202;
|
|
} else {
|
|
$K19$052 = $294;$T$051 = $296;
|
|
}
|
|
}
|
|
$303 = HEAP32[(12916)>>2]|0;
|
|
$304 = ($$lcssa>>>0)<($303>>>0);
|
|
if ($304) {
|
|
_abort();
|
|
// unreachable;
|
|
} else {
|
|
HEAP32[$$lcssa>>2] = $p$0;
|
|
$305 = ((($p$0)) + 24|0);
|
|
HEAP32[$305>>2] = $T$051$lcssa;
|
|
$306 = ((($p$0)) + 12|0);
|
|
HEAP32[$306>>2] = $p$0;
|
|
$307 = ((($p$0)) + 8|0);
|
|
HEAP32[$307>>2] = $p$0;
|
|
break L199;
|
|
}
|
|
}
|
|
} while(0);
|
|
$308 = ((($T$0$lcssa)) + 8|0);
|
|
$309 = HEAP32[$308>>2]|0;
|
|
$310 = HEAP32[(12916)>>2]|0;
|
|
$311 = ($309>>>0)>=($310>>>0);
|
|
$not$ = ($T$0$lcssa>>>0)>=($310>>>0);
|
|
$312 = $311 & $not$;
|
|
if ($312) {
|
|
$313 = ((($309)) + 12|0);
|
|
HEAP32[$313>>2] = $p$0;
|
|
HEAP32[$308>>2] = $p$0;
|
|
$314 = ((($p$0)) + 8|0);
|
|
HEAP32[$314>>2] = $309;
|
|
$315 = ((($p$0)) + 12|0);
|
|
HEAP32[$315>>2] = $T$0$lcssa;
|
|
$316 = ((($p$0)) + 24|0);
|
|
HEAP32[$316>>2] = 0;
|
|
break;
|
|
} else {
|
|
_abort();
|
|
// unreachable;
|
|
}
|
|
}
|
|
} while(0);
|
|
$317 = HEAP32[(12932)>>2]|0;
|
|
$318 = (($317) + -1)|0;
|
|
HEAP32[(12932)>>2] = $318;
|
|
$319 = ($318|0)==(0);
|
|
if ($319) {
|
|
$sp$0$in$i = (13356);
|
|
} else {
|
|
return;
|
|
}
|
|
while(1) {
|
|
$sp$0$i = HEAP32[$sp$0$in$i>>2]|0;
|
|
$320 = ($sp$0$i|0)==(0|0);
|
|
$321 = ((($sp$0$i)) + 8|0);
|
|
if ($320) {
|
|
break;
|
|
} else {
|
|
$sp$0$in$i = $321;
|
|
}
|
|
}
|
|
HEAP32[(12932)>>2] = -1;
|
|
return;
|
|
}
|
|
function runPostSets() {
|
|
}
|
|
function _i64Subtract(a, b, c, d) {
|
|
a = a|0; b = b|0; c = c|0; d = d|0;
|
|
var l = 0, h = 0;
|
|
l = (a - c)>>>0;
|
|
h = (b - d)>>>0;
|
|
h = (b - d - (((c>>>0) > (a>>>0))|0))>>>0; // Borrow one from high word to low word on underflow.
|
|
return ((tempRet0 = h,l|0)|0);
|
|
}
|
|
function _i64Add(a, b, c, d) {
|
|
/*
|
|
x = a + b*2^32
|
|
y = c + d*2^32
|
|
result = l + h*2^32
|
|
*/
|
|
a = a|0; b = b|0; c = c|0; d = d|0;
|
|
var l = 0, h = 0;
|
|
l = (a + c)>>>0;
|
|
h = (b + d + (((l>>>0) < (a>>>0))|0))>>>0; // Add carry from low word to high word on overflow.
|
|
return ((tempRet0 = h,l|0)|0);
|
|
}
|
|
function _bitshift64Lshr(low, high, bits) {
|
|
low = low|0; high = high|0; bits = bits|0;
|
|
var ander = 0;
|
|
if ((bits|0) < 32) {
|
|
ander = ((1 << bits) - 1)|0;
|
|
tempRet0 = high >>> bits;
|
|
return (low >>> bits) | ((high&ander) << (32 - bits));
|
|
}
|
|
tempRet0 = 0;
|
|
return (high >>> (bits - 32))|0;
|
|
}
|
|
function _memcpy(dest, src, num) {
|
|
dest = dest|0; src = src|0; num = num|0;
|
|
var ret = 0;
|
|
if ((num|0) >= 4096) return _emscripten_memcpy_big(dest|0, src|0, num|0)|0;
|
|
ret = dest|0;
|
|
if ((dest&3) == (src&3)) {
|
|
while (dest & 3) {
|
|
if ((num|0) == 0) return ret|0;
|
|
HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0);
|
|
dest = (dest+1)|0;
|
|
src = (src+1)|0;
|
|
num = (num-1)|0;
|
|
}
|
|
while ((num|0) >= 4) {
|
|
HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0);
|
|
dest = (dest+4)|0;
|
|
src = (src+4)|0;
|
|
num = (num-4)|0;
|
|
}
|
|
}
|
|
while ((num|0) > 0) {
|
|
HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0);
|
|
dest = (dest+1)|0;
|
|
src = (src+1)|0;
|
|
num = (num-1)|0;
|
|
}
|
|
return ret|0;
|
|
}
|
|
function _memset(ptr, value, num) {
|
|
ptr = ptr|0; value = value|0; num = num|0;
|
|
var stop = 0, value4 = 0, stop4 = 0, unaligned = 0;
|
|
stop = (ptr + num)|0;
|
|
if ((num|0) >= 20) {
|
|
// This is unaligned, but quite large, so work hard to get to aligned settings
|
|
value = value & 0xff;
|
|
unaligned = ptr & 3;
|
|
value4 = value | (value << 8) | (value << 16) | (value << 24);
|
|
stop4 = stop & ~3;
|
|
if (unaligned) {
|
|
unaligned = (ptr + 4 - unaligned)|0;
|
|
while ((ptr|0) < (unaligned|0)) { // no need to check for stop, since we have large num
|
|
HEAP8[((ptr)>>0)]=value;
|
|
ptr = (ptr+1)|0;
|
|
}
|
|
}
|
|
while ((ptr|0) < (stop4|0)) {
|
|
HEAP32[((ptr)>>2)]=value4;
|
|
ptr = (ptr+4)|0;
|
|
}
|
|
}
|
|
while ((ptr|0) < (stop|0)) {
|
|
HEAP8[((ptr)>>0)]=value;
|
|
ptr = (ptr+1)|0;
|
|
}
|
|
return (ptr-num)|0;
|
|
}
|
|
function _bitshift64Shl(low, high, bits) {
|
|
low = low|0; high = high|0; bits = bits|0;
|
|
var ander = 0;
|
|
if ((bits|0) < 32) {
|
|
ander = ((1 << bits) - 1)|0;
|
|
tempRet0 = (high << bits) | ((low&(ander << (32 - bits))) >>> (32 - bits));
|
|
return low << bits;
|
|
}
|
|
tempRet0 = low << (bits - 32);
|
|
return 0;
|
|
}
|
|
function _bitshift64Ashr(low, high, bits) {
|
|
low = low|0; high = high|0; bits = bits|0;
|
|
var ander = 0;
|
|
if ((bits|0) < 32) {
|
|
ander = ((1 << bits) - 1)|0;
|
|
tempRet0 = high >> bits;
|
|
return (low >>> bits) | ((high&ander) << (32 - bits));
|
|
}
|
|
tempRet0 = (high|0) < 0 ? -1 : 0;
|
|
return (high >> (bits - 32))|0;
|
|
}
|
|
function _llvm_cttz_i32(x) {
|
|
x = x|0;
|
|
var ret = 0;
|
|
ret = ((HEAP8[(((cttz_i8)+(x & 0xff))>>0)])|0);
|
|
if ((ret|0) < 8) return ret|0;
|
|
ret = ((HEAP8[(((cttz_i8)+((x >> 8)&0xff))>>0)])|0);
|
|
if ((ret|0) < 8) return (ret + 8)|0;
|
|
ret = ((HEAP8[(((cttz_i8)+((x >> 16)&0xff))>>0)])|0);
|
|
if ((ret|0) < 8) return (ret + 16)|0;
|
|
return (((HEAP8[(((cttz_i8)+(x >>> 24))>>0)])|0) + 24)|0;
|
|
}
|
|
|
|
// ======== compiled code from system/lib/compiler-rt , see readme therein
|
|
function ___muldsi3($a, $b) {
|
|
$a = $a | 0;
|
|
$b = $b | 0;
|
|
var $1 = 0, $2 = 0, $3 = 0, $6 = 0, $8 = 0, $11 = 0, $12 = 0;
|
|
$1 = $a & 65535;
|
|
$2 = $b & 65535;
|
|
$3 = Math_imul($2, $1) | 0;
|
|
$6 = $a >>> 16;
|
|
$8 = ($3 >>> 16) + (Math_imul($2, $6) | 0) | 0;
|
|
$11 = $b >>> 16;
|
|
$12 = Math_imul($11, $1) | 0;
|
|
return (tempRet0 = (($8 >>> 16) + (Math_imul($11, $6) | 0) | 0) + ((($8 & 65535) + $12 | 0) >>> 16) | 0, 0 | ($8 + $12 << 16 | $3 & 65535)) | 0;
|
|
}
|
|
function ___divdi3($a$0, $a$1, $b$0, $b$1) {
|
|
$a$0 = $a$0 | 0;
|
|
$a$1 = $a$1 | 0;
|
|
$b$0 = $b$0 | 0;
|
|
$b$1 = $b$1 | 0;
|
|
var $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $7$0 = 0, $7$1 = 0, $8$0 = 0, $10$0 = 0;
|
|
$1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1;
|
|
$1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1;
|
|
$2$0 = $b$1 >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1;
|
|
$2$1 = (($b$1 | 0) < 0 ? -1 : 0) >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1;
|
|
$4$0 = _i64Subtract($1$0 ^ $a$0, $1$1 ^ $a$1, $1$0, $1$1) | 0;
|
|
$4$1 = tempRet0;
|
|
$6$0 = _i64Subtract($2$0 ^ $b$0, $2$1 ^ $b$1, $2$0, $2$1) | 0;
|
|
$7$0 = $2$0 ^ $1$0;
|
|
$7$1 = $2$1 ^ $1$1;
|
|
$8$0 = ___udivmoddi4($4$0, $4$1, $6$0, tempRet0, 0) | 0;
|
|
$10$0 = _i64Subtract($8$0 ^ $7$0, tempRet0 ^ $7$1, $7$0, $7$1) | 0;
|
|
return $10$0 | 0;
|
|
}
|
|
function ___remdi3($a$0, $a$1, $b$0, $b$1) {
|
|
$a$0 = $a$0 | 0;
|
|
$a$1 = $a$1 | 0;
|
|
$b$0 = $b$0 | 0;
|
|
$b$1 = $b$1 | 0;
|
|
var $rem = 0, $1$0 = 0, $1$1 = 0, $2$0 = 0, $2$1 = 0, $4$0 = 0, $4$1 = 0, $6$0 = 0, $10$0 = 0, $10$1 = 0, __stackBase__ = 0;
|
|
__stackBase__ = STACKTOP;
|
|
STACKTOP = STACKTOP + 16 | 0;
|
|
$rem = __stackBase__ | 0;
|
|
$1$0 = $a$1 >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1;
|
|
$1$1 = (($a$1 | 0) < 0 ? -1 : 0) >> 31 | (($a$1 | 0) < 0 ? -1 : 0) << 1;
|
|
$2$0 = $b$1 >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1;
|
|
$2$1 = (($b$1 | 0) < 0 ? -1 : 0) >> 31 | (($b$1 | 0) < 0 ? -1 : 0) << 1;
|
|
$4$0 = _i64Subtract($1$0 ^ $a$0, $1$1 ^ $a$1, $1$0, $1$1) | 0;
|
|
$4$1 = tempRet0;
|
|
$6$0 = _i64Subtract($2$0 ^ $b$0, $2$1 ^ $b$1, $2$0, $2$1) | 0;
|
|
___udivmoddi4($4$0, $4$1, $6$0, tempRet0, $rem) | 0;
|
|
$10$0 = _i64Subtract(HEAP32[$rem >> 2] ^ $1$0, HEAP32[$rem + 4 >> 2] ^ $1$1, $1$0, $1$1) | 0;
|
|
$10$1 = tempRet0;
|
|
STACKTOP = __stackBase__;
|
|
return (tempRet0 = $10$1, $10$0) | 0;
|
|
}
|
|
function ___muldi3($a$0, $a$1, $b$0, $b$1) {
|
|
$a$0 = $a$0 | 0;
|
|
$a$1 = $a$1 | 0;
|
|
$b$0 = $b$0 | 0;
|
|
$b$1 = $b$1 | 0;
|
|
var $x_sroa_0_0_extract_trunc = 0, $y_sroa_0_0_extract_trunc = 0, $1$0 = 0, $1$1 = 0, $2 = 0;
|
|
$x_sroa_0_0_extract_trunc = $a$0;
|
|
$y_sroa_0_0_extract_trunc = $b$0;
|
|
$1$0 = ___muldsi3($x_sroa_0_0_extract_trunc, $y_sroa_0_0_extract_trunc) | 0;
|
|
$1$1 = tempRet0;
|
|
$2 = Math_imul($a$1, $y_sroa_0_0_extract_trunc) | 0;
|
|
return (tempRet0 = ((Math_imul($b$1, $x_sroa_0_0_extract_trunc) | 0) + $2 | 0) + $1$1 | $1$1 & 0, 0 | $1$0 & -1) | 0;
|
|
}
|
|
function ___udivdi3($a$0, $a$1, $b$0, $b$1) {
|
|
$a$0 = $a$0 | 0;
|
|
$a$1 = $a$1 | 0;
|
|
$b$0 = $b$0 | 0;
|
|
$b$1 = $b$1 | 0;
|
|
var $1$0 = 0;
|
|
$1$0 = ___udivmoddi4($a$0, $a$1, $b$0, $b$1, 0) | 0;
|
|
return $1$0 | 0;
|
|
}
|
|
function ___uremdi3($a$0, $a$1, $b$0, $b$1) {
|
|
$a$0 = $a$0 | 0;
|
|
$a$1 = $a$1 | 0;
|
|
$b$0 = $b$0 | 0;
|
|
$b$1 = $b$1 | 0;
|
|
var $rem = 0, __stackBase__ = 0;
|
|
__stackBase__ = STACKTOP;
|
|
STACKTOP = STACKTOP + 16 | 0;
|
|
$rem = __stackBase__ | 0;
|
|
___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) | 0;
|
|
STACKTOP = __stackBase__;
|
|
return (tempRet0 = HEAP32[$rem + 4 >> 2] | 0, HEAP32[$rem >> 2] | 0) | 0;
|
|
}
|
|
function ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) {
|
|
$a$0 = $a$0 | 0;
|
|
$a$1 = $a$1 | 0;
|
|
$b$0 = $b$0 | 0;
|
|
$b$1 = $b$1 | 0;
|
|
$rem = $rem | 0;
|
|
var $n_sroa_0_0_extract_trunc = 0, $n_sroa_1_4_extract_shift$0 = 0, $n_sroa_1_4_extract_trunc = 0, $d_sroa_0_0_extract_trunc = 0, $d_sroa_1_4_extract_shift$0 = 0, $d_sroa_1_4_extract_trunc = 0, $4 = 0, $17 = 0, $37 = 0, $49 = 0, $51 = 0, $57 = 0, $58 = 0, $66 = 0, $78 = 0, $86 = 0, $88 = 0, $89 = 0, $91 = 0, $92 = 0, $95 = 0, $105 = 0, $117 = 0, $119 = 0, $125 = 0, $126 = 0, $130 = 0, $q_sroa_1_1_ph = 0, $q_sroa_0_1_ph = 0, $r_sroa_1_1_ph = 0, $r_sroa_0_1_ph = 0, $sr_1_ph = 0, $d_sroa_0_0_insert_insert99$0 = 0, $d_sroa_0_0_insert_insert99$1 = 0, $137$0 = 0, $137$1 = 0, $carry_0203 = 0, $sr_1202 = 0, $r_sroa_0_1201 = 0, $r_sroa_1_1200 = 0, $q_sroa_0_1199 = 0, $q_sroa_1_1198 = 0, $147 = 0, $149 = 0, $r_sroa_0_0_insert_insert42$0 = 0, $r_sroa_0_0_insert_insert42$1 = 0, $150$1 = 0, $151$0 = 0, $152 = 0, $154$0 = 0, $r_sroa_0_0_extract_trunc = 0, $r_sroa_1_4_extract_trunc = 0, $155 = 0, $carry_0_lcssa$0 = 0, $carry_0_lcssa$1 = 0, $r_sroa_0_1_lcssa = 0, $r_sroa_1_1_lcssa = 0, $q_sroa_0_1_lcssa = 0, $q_sroa_1_1_lcssa = 0, $q_sroa_0_0_insert_ext75$0 = 0, $q_sroa_0_0_insert_ext75$1 = 0, $q_sroa_0_0_insert_insert77$1 = 0, $_0$0 = 0, $_0$1 = 0;
|
|
$n_sroa_0_0_extract_trunc = $a$0;
|
|
$n_sroa_1_4_extract_shift$0 = $a$1;
|
|
$n_sroa_1_4_extract_trunc = $n_sroa_1_4_extract_shift$0;
|
|
$d_sroa_0_0_extract_trunc = $b$0;
|
|
$d_sroa_1_4_extract_shift$0 = $b$1;
|
|
$d_sroa_1_4_extract_trunc = $d_sroa_1_4_extract_shift$0;
|
|
if (($n_sroa_1_4_extract_trunc | 0) == 0) {
|
|
$4 = ($rem | 0) != 0;
|
|
if (($d_sroa_1_4_extract_trunc | 0) == 0) {
|
|
if ($4) {
|
|
HEAP32[$rem >> 2] = ($n_sroa_0_0_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0);
|
|
HEAP32[$rem + 4 >> 2] = 0;
|
|
}
|
|
$_0$1 = 0;
|
|
$_0$0 = ($n_sroa_0_0_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0;
|
|
return (tempRet0 = $_0$1, $_0$0) | 0;
|
|
} else {
|
|
if (!$4) {
|
|
$_0$1 = 0;
|
|
$_0$0 = 0;
|
|
return (tempRet0 = $_0$1, $_0$0) | 0;
|
|
}
|
|
HEAP32[$rem >> 2] = $a$0 & -1;
|
|
HEAP32[$rem + 4 >> 2] = $a$1 & 0;
|
|
$_0$1 = 0;
|
|
$_0$0 = 0;
|
|
return (tempRet0 = $_0$1, $_0$0) | 0;
|
|
}
|
|
}
|
|
$17 = ($d_sroa_1_4_extract_trunc | 0) == 0;
|
|
do {
|
|
if (($d_sroa_0_0_extract_trunc | 0) == 0) {
|
|
if ($17) {
|
|
if (($rem | 0) != 0) {
|
|
HEAP32[$rem >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0);
|
|
HEAP32[$rem + 4 >> 2] = 0;
|
|
}
|
|
$_0$1 = 0;
|
|
$_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0;
|
|
return (tempRet0 = $_0$1, $_0$0) | 0;
|
|
}
|
|
if (($n_sroa_0_0_extract_trunc | 0) == 0) {
|
|
if (($rem | 0) != 0) {
|
|
HEAP32[$rem >> 2] = 0;
|
|
HEAP32[$rem + 4 >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_1_4_extract_trunc >>> 0);
|
|
}
|
|
$_0$1 = 0;
|
|
$_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_1_4_extract_trunc >>> 0) >>> 0;
|
|
return (tempRet0 = $_0$1, $_0$0) | 0;
|
|
}
|
|
$37 = $d_sroa_1_4_extract_trunc - 1 | 0;
|
|
if (($37 & $d_sroa_1_4_extract_trunc | 0) == 0) {
|
|
if (($rem | 0) != 0) {
|
|
HEAP32[$rem >> 2] = 0 | $a$0 & -1;
|
|
HEAP32[$rem + 4 >> 2] = $37 & $n_sroa_1_4_extract_trunc | $a$1 & 0;
|
|
}
|
|
$_0$1 = 0;
|
|
$_0$0 = $n_sroa_1_4_extract_trunc >>> ((_llvm_cttz_i32($d_sroa_1_4_extract_trunc | 0) | 0) >>> 0);
|
|
return (tempRet0 = $_0$1, $_0$0) | 0;
|
|
}
|
|
$49 = Math_clz32($d_sroa_1_4_extract_trunc | 0) | 0;
|
|
$51 = $49 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0;
|
|
if ($51 >>> 0 <= 30) {
|
|
$57 = $51 + 1 | 0;
|
|
$58 = 31 - $51 | 0;
|
|
$sr_1_ph = $57;
|
|
$r_sroa_0_1_ph = $n_sroa_1_4_extract_trunc << $58 | $n_sroa_0_0_extract_trunc >>> ($57 >>> 0);
|
|
$r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($57 >>> 0);
|
|
$q_sroa_0_1_ph = 0;
|
|
$q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $58;
|
|
break;
|
|
}
|
|
if (($rem | 0) == 0) {
|
|
$_0$1 = 0;
|
|
$_0$0 = 0;
|
|
return (tempRet0 = $_0$1, $_0$0) | 0;
|
|
}
|
|
HEAP32[$rem >> 2] = 0 | $a$0 & -1;
|
|
HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0;
|
|
$_0$1 = 0;
|
|
$_0$0 = 0;
|
|
return (tempRet0 = $_0$1, $_0$0) | 0;
|
|
} else {
|
|
if (!$17) {
|
|
$117 = Math_clz32($d_sroa_1_4_extract_trunc | 0) | 0;
|
|
$119 = $117 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0;
|
|
if ($119 >>> 0 <= 31) {
|
|
$125 = $119 + 1 | 0;
|
|
$126 = 31 - $119 | 0;
|
|
$130 = $119 - 31 >> 31;
|
|
$sr_1_ph = $125;
|
|
$r_sroa_0_1_ph = $n_sroa_0_0_extract_trunc >>> ($125 >>> 0) & $130 | $n_sroa_1_4_extract_trunc << $126;
|
|
$r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($125 >>> 0) & $130;
|
|
$q_sroa_0_1_ph = 0;
|
|
$q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $126;
|
|
break;
|
|
}
|
|
if (($rem | 0) == 0) {
|
|
$_0$1 = 0;
|
|
$_0$0 = 0;
|
|
return (tempRet0 = $_0$1, $_0$0) | 0;
|
|
}
|
|
HEAP32[$rem >> 2] = 0 | $a$0 & -1;
|
|
HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0;
|
|
$_0$1 = 0;
|
|
$_0$0 = 0;
|
|
return (tempRet0 = $_0$1, $_0$0) | 0;
|
|
}
|
|
$66 = $d_sroa_0_0_extract_trunc - 1 | 0;
|
|
if (($66 & $d_sroa_0_0_extract_trunc | 0) != 0) {
|
|
$86 = (Math_clz32($d_sroa_0_0_extract_trunc | 0) | 0) + 33 | 0;
|
|
$88 = $86 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0;
|
|
$89 = 64 - $88 | 0;
|
|
$91 = 32 - $88 | 0;
|
|
$92 = $91 >> 31;
|
|
$95 = $88 - 32 | 0;
|
|
$105 = $95 >> 31;
|
|
$sr_1_ph = $88;
|
|
$r_sroa_0_1_ph = $91 - 1 >> 31 & $n_sroa_1_4_extract_trunc >>> ($95 >>> 0) | ($n_sroa_1_4_extract_trunc << $91 | $n_sroa_0_0_extract_trunc >>> ($88 >>> 0)) & $105;
|
|
$r_sroa_1_1_ph = $105 & $n_sroa_1_4_extract_trunc >>> ($88 >>> 0);
|
|
$q_sroa_0_1_ph = $n_sroa_0_0_extract_trunc << $89 & $92;
|
|
$q_sroa_1_1_ph = ($n_sroa_1_4_extract_trunc << $89 | $n_sroa_0_0_extract_trunc >>> ($95 >>> 0)) & $92 | $n_sroa_0_0_extract_trunc << $91 & $88 - 33 >> 31;
|
|
break;
|
|
}
|
|
if (($rem | 0) != 0) {
|
|
HEAP32[$rem >> 2] = $66 & $n_sroa_0_0_extract_trunc;
|
|
HEAP32[$rem + 4 >> 2] = 0;
|
|
}
|
|
if (($d_sroa_0_0_extract_trunc | 0) == 1) {
|
|
$_0$1 = $n_sroa_1_4_extract_shift$0 | $a$1 & 0;
|
|
$_0$0 = 0 | $a$0 & -1;
|
|
return (tempRet0 = $_0$1, $_0$0) | 0;
|
|
} else {
|
|
$78 = _llvm_cttz_i32($d_sroa_0_0_extract_trunc | 0) | 0;
|
|
$_0$1 = 0 | $n_sroa_1_4_extract_trunc >>> ($78 >>> 0);
|
|
$_0$0 = $n_sroa_1_4_extract_trunc << 32 - $78 | $n_sroa_0_0_extract_trunc >>> ($78 >>> 0) | 0;
|
|
return (tempRet0 = $_0$1, $_0$0) | 0;
|
|
}
|
|
}
|
|
} while (0);
|
|
if (($sr_1_ph | 0) == 0) {
|
|
$q_sroa_1_1_lcssa = $q_sroa_1_1_ph;
|
|
$q_sroa_0_1_lcssa = $q_sroa_0_1_ph;
|
|
$r_sroa_1_1_lcssa = $r_sroa_1_1_ph;
|
|
$r_sroa_0_1_lcssa = $r_sroa_0_1_ph;
|
|
$carry_0_lcssa$1 = 0;
|
|
$carry_0_lcssa$0 = 0;
|
|
} else {
|
|
$d_sroa_0_0_insert_insert99$0 = 0 | $b$0 & -1;
|
|
$d_sroa_0_0_insert_insert99$1 = $d_sroa_1_4_extract_shift$0 | $b$1 & 0;
|
|
$137$0 = _i64Add($d_sroa_0_0_insert_insert99$0 | 0, $d_sroa_0_0_insert_insert99$1 | 0, -1, -1) | 0;
|
|
$137$1 = tempRet0;
|
|
$q_sroa_1_1198 = $q_sroa_1_1_ph;
|
|
$q_sroa_0_1199 = $q_sroa_0_1_ph;
|
|
$r_sroa_1_1200 = $r_sroa_1_1_ph;
|
|
$r_sroa_0_1201 = $r_sroa_0_1_ph;
|
|
$sr_1202 = $sr_1_ph;
|
|
$carry_0203 = 0;
|
|
while (1) {
|
|
$147 = $q_sroa_0_1199 >>> 31 | $q_sroa_1_1198 << 1;
|
|
$149 = $carry_0203 | $q_sroa_0_1199 << 1;
|
|
$r_sroa_0_0_insert_insert42$0 = 0 | ($r_sroa_0_1201 << 1 | $q_sroa_1_1198 >>> 31);
|
|
$r_sroa_0_0_insert_insert42$1 = $r_sroa_0_1201 >>> 31 | $r_sroa_1_1200 << 1 | 0;
|
|
_i64Subtract($137$0, $137$1, $r_sroa_0_0_insert_insert42$0, $r_sroa_0_0_insert_insert42$1) | 0;
|
|
$150$1 = tempRet0;
|
|
$151$0 = $150$1 >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1;
|
|
$152 = $151$0 & 1;
|
|
$154$0 = _i64Subtract($r_sroa_0_0_insert_insert42$0, $r_sroa_0_0_insert_insert42$1, $151$0 & $d_sroa_0_0_insert_insert99$0, ((($150$1 | 0) < 0 ? -1 : 0) >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1) & $d_sroa_0_0_insert_insert99$1) | 0;
|
|
$r_sroa_0_0_extract_trunc = $154$0;
|
|
$r_sroa_1_4_extract_trunc = tempRet0;
|
|
$155 = $sr_1202 - 1 | 0;
|
|
if (($155 | 0) == 0) {
|
|
break;
|
|
} else {
|
|
$q_sroa_1_1198 = $147;
|
|
$q_sroa_0_1199 = $149;
|
|
$r_sroa_1_1200 = $r_sroa_1_4_extract_trunc;
|
|
$r_sroa_0_1201 = $r_sroa_0_0_extract_trunc;
|
|
$sr_1202 = $155;
|
|
$carry_0203 = $152;
|
|
}
|
|
}
|
|
$q_sroa_1_1_lcssa = $147;
|
|
$q_sroa_0_1_lcssa = $149;
|
|
$r_sroa_1_1_lcssa = $r_sroa_1_4_extract_trunc;
|
|
$r_sroa_0_1_lcssa = $r_sroa_0_0_extract_trunc;
|
|
$carry_0_lcssa$1 = 0;
|
|
$carry_0_lcssa$0 = $152;
|
|
}
|
|
$q_sroa_0_0_insert_ext75$0 = $q_sroa_0_1_lcssa;
|
|
$q_sroa_0_0_insert_ext75$1 = 0;
|
|
$q_sroa_0_0_insert_insert77$1 = $q_sroa_1_1_lcssa | $q_sroa_0_0_insert_ext75$1;
|
|
if (($rem | 0) != 0) {
|
|
HEAP32[$rem >> 2] = 0 | $r_sroa_0_1_lcssa;
|
|
HEAP32[$rem + 4 >> 2] = $r_sroa_1_1_lcssa | 0;
|
|
}
|
|
$_0$1 = (0 | $q_sroa_0_0_insert_ext75$0) >>> 31 | $q_sroa_0_0_insert_insert77$1 << 1 | ($q_sroa_0_0_insert_ext75$1 << 1 | $q_sroa_0_0_insert_ext75$0 >>> 31) & 0 | $carry_0_lcssa$1;
|
|
$_0$0 = ($q_sroa_0_0_insert_ext75$0 << 1 | 0 >>> 31) & -2 | $carry_0_lcssa$0;
|
|
return (tempRet0 = $_0$1, $_0$0) | 0;
|
|
}
|
|
// =======================================================================
|
|
|
|
|
|
|
|
|
|
function dynCall_iiii(index,a1,a2,a3) {
|
|
index = index|0;
|
|
a1=a1|0; a2=a2|0; a3=a3|0;
|
|
return FUNCTION_TABLE_iiii[index&7](a1|0,a2|0,a3|0)|0;
|
|
}
|
|
|
|
|
|
function dynCall_vi(index,a1) {
|
|
index = index|0;
|
|
a1=a1|0;
|
|
FUNCTION_TABLE_vi[index&31](a1|0);
|
|
}
|
|
|
|
|
|
function dynCall_vii(index,a1,a2) {
|
|
index = index|0;
|
|
a1=a1|0; a2=a2|0;
|
|
FUNCTION_TABLE_vii[index&31](a1|0,a2|0);
|
|
}
|
|
|
|
|
|
function dynCall_vidd(index,a1,a2,a3) {
|
|
index = index|0;
|
|
a1=a1|0; a2=+a2; a3=+a3;
|
|
FUNCTION_TABLE_vidd[index&15](a1|0,+a2,+a3);
|
|
}
|
|
|
|
|
|
function dynCall_ii(index,a1) {
|
|
index = index|0;
|
|
a1=a1|0;
|
|
return FUNCTION_TABLE_ii[index&3](a1|0)|0;
|
|
}
|
|
|
|
|
|
function dynCall_didii(index,a1,a2,a3,a4) {
|
|
index = index|0;
|
|
a1=a1|0; a2=+a2; a3=a3|0; a4=a4|0;
|
|
return +FUNCTION_TABLE_didii[index&15](a1|0,+a2,a3|0,a4|0);
|
|
}
|
|
|
|
|
|
function dynCall_viii(index,a1,a2,a3) {
|
|
index = index|0;
|
|
a1=a1|0; a2=a2|0; a3=a3|0;
|
|
FUNCTION_TABLE_viii[index&31](a1|0,a2|0,a3|0);
|
|
}
|
|
|
|
|
|
function dynCall_v(index) {
|
|
index = index|0;
|
|
|
|
FUNCTION_TABLE_v[index&31]();
|
|
}
|
|
|
|
|
|
function dynCall_iii(index,a1,a2) {
|
|
index = index|0;
|
|
a1=a1|0; a2=a2|0;
|
|
return FUNCTION_TABLE_iii[index&15](a1|0,a2|0)|0;
|
|
}
|
|
|
|
|
|
function dynCall_vidiii(index,a1,a2,a3,a4,a5) {
|
|
index = index|0;
|
|
a1=a1|0; a2=+a2; a3=a3|0; a4=a4|0; a5=a5|0;
|
|
FUNCTION_TABLE_vidiii[index&15](a1|0,+a2,a3|0,a4|0,a5|0);
|
|
}
|
|
|
|
function b0(p0,p1,p2) {
|
|
p0 = p0|0;p1 = p1|0;p2 = p2|0; nullFunc_iiii(0);return 0;
|
|
}
|
|
function b1(p0) {
|
|
p0 = p0|0; nullFunc_vi(1);
|
|
}
|
|
function b2(p0,p1) {
|
|
p0 = p0|0;p1 = p1|0; nullFunc_vii(2);
|
|
}
|
|
function b3(p0,p1,p2) {
|
|
p0 = p0|0;p1 = +p1;p2 = +p2; nullFunc_vidd(3);
|
|
}
|
|
function b4(p0) {
|
|
p0 = p0|0; nullFunc_ii(4);return 0;
|
|
}
|
|
function b5(p0,p1,p2,p3) {
|
|
p0 = p0|0;p1 = +p1;p2 = p2|0;p3 = p3|0; nullFunc_didii(5);return +0;
|
|
}
|
|
function b6(p0,p1,p2) {
|
|
p0 = p0|0;p1 = p1|0;p2 = p2|0; nullFunc_viii(6);
|
|
}
|
|
function b7() {
|
|
; nullFunc_v(7);
|
|
}
|
|
function b8(p0,p1) {
|
|
p0 = p0|0;p1 = p1|0; nullFunc_iii(8);return 0;
|
|
}
|
|
function b9(p0,p1,p2,p3,p4) {
|
|
p0 = p0|0;p1 = +p1;p2 = p2|0;p3 = p3|0;p4 = p4|0; nullFunc_vidiii(9);
|
|
}
|
|
|
|
// EMSCRIPTEN_END_FUNCS
|
|
var FUNCTION_TABLE_iiii = [b0,b0,b0,b0,___stdio_write,___stdio_seek,___stdout_write,_nk_malloc];
|
|
var FUNCTION_TABLE_vi = [b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,_cleanup526,b1,b1,b1,b1,b1,b1,b1,b1
|
|
,b1,b1,b1];
|
|
var FUNCTION_TABLE_vii = [b2,b2,b2,b2,b2,b2,b2,b2,_nk_mfree,b2,b2,b2,b2,b2,_nk_glfw3_char_callback,b2,_nk_glfw3_clipbard_paste,_error_callback,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2
|
|
,b2,b2,b2];
|
|
var FUNCTION_TABLE_vidd = [b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,_nk_gflw3_scroll_callback,b3,b3];
|
|
var FUNCTION_TABLE_ii = [b4,b4,b4,___stdio_close];
|
|
var FUNCTION_TABLE_didii = [b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,_nk_font_text_width,b5,b5,b5,b5];
|
|
var FUNCTION_TABLE_viii = [b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,_nk_glfw3_clipbard_copy,b6,b6,_windowSizeCallback,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6
|
|
,b6,b6,b6];
|
|
var FUNCTION_TABLE_v = [b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,_render,b7,b7,b7,b7,b7,b7,b7,b7,b7
|
|
,b7,b7,b7];
|
|
var FUNCTION_TABLE_iii = [b8,_nk_filter_decimal,_nk_filter_float,b8,b8,b8,b8,b8,b8,_nk_rect_height_compare,_nk_rect_original_order,b8,b8,b8,b8,b8];
|
|
var FUNCTION_TABLE_vidiii = [b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,_nk_font_query_font_glyph,b9,b9,b9];
|
|
|
|
return { _i64Subtract: _i64Subtract, _free: _free, _main: _main, _i64Add: _i64Add, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, _bitshift64Lshr: _bitshift64Lshr, _fflush: _fflush, ___errno_location: ___errno_location, _bitshift64Shl: _bitshift64Shl, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, establishStackSpace: establishStackSpace, setThrew: setThrew, setTempRet0: setTempRet0, getTempRet0: getTempRet0, dynCall_iiii: dynCall_iiii, dynCall_vi: dynCall_vi, dynCall_vii: dynCall_vii, dynCall_vidd: dynCall_vidd, dynCall_ii: dynCall_ii, dynCall_didii: dynCall_didii, dynCall_viii: dynCall_viii, dynCall_v: dynCall_v, dynCall_iii: dynCall_iii, dynCall_vidiii: dynCall_vidiii };
|
|
})
|
|
// EMSCRIPTEN_END_ASM
|
|
(Module.asmGlobalArg, Module.asmLibraryArg, buffer);
|
|
var real__i64Subtract = asm["_i64Subtract"]; asm["_i64Subtract"] = function() {
|
|
assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. 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__i64Subtract.apply(null, arguments);
|
|
};
|
|
|
|
var real__free = asm["_free"]; asm["_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 real__free.apply(null, arguments);
|
|
};
|
|
|
|
var real__main = asm["_main"]; asm["_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 real__main.apply(null, arguments);
|
|
};
|
|
|
|
var real__i64Add = asm["_i64Add"]; asm["_i64Add"] = function() {
|
|
assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. 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__i64Add.apply(null, arguments);
|
|
};
|
|
|
|
var real__malloc = asm["_malloc"]; asm["_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 real__malloc.apply(null, arguments);
|
|
};
|
|
|
|
var real__bitshift64Lshr = asm["_bitshift64Lshr"]; asm["_bitshift64Lshr"] = function() {
|
|
assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. 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__bitshift64Lshr.apply(null, arguments);
|
|
};
|
|
|
|
var real__fflush = asm["_fflush"]; asm["_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 real__fflush.apply(null, arguments);
|
|
};
|
|
|
|
var real____errno_location = asm["___errno_location"]; asm["___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 real____errno_location.apply(null, arguments);
|
|
};
|
|
|
|
var real__bitshift64Shl = asm["_bitshift64Shl"]; asm["_bitshift64Shl"] = function() {
|
|
assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. 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__bitshift64Shl.apply(null, arguments);
|
|
};
|
|
var _i64Subtract = Module["_i64Subtract"] = asm["_i64Subtract"];
|
|
var _free = Module["_free"] = asm["_free"];
|
|
var _main = Module["_main"] = asm["_main"];
|
|
var _i64Add = Module["_i64Add"] = asm["_i64Add"];
|
|
var _memset = Module["_memset"] = asm["_memset"];
|
|
var runPostSets = Module["runPostSets"] = asm["runPostSets"];
|
|
var _malloc = Module["_malloc"] = asm["_malloc"];
|
|
var _memcpy = Module["_memcpy"] = asm["_memcpy"];
|
|
var _bitshift64Lshr = Module["_bitshift64Lshr"] = asm["_bitshift64Lshr"];
|
|
var _fflush = Module["_fflush"] = asm["_fflush"];
|
|
var ___errno_location = Module["___errno_location"] = asm["___errno_location"];
|
|
var _bitshift64Shl = Module["_bitshift64Shl"] = asm["_bitshift64Shl"];
|
|
var dynCall_iiii = Module["dynCall_iiii"] = asm["dynCall_iiii"];
|
|
var dynCall_vi = Module["dynCall_vi"] = asm["dynCall_vi"];
|
|
var dynCall_vii = Module["dynCall_vii"] = asm["dynCall_vii"];
|
|
var dynCall_vidd = Module["dynCall_vidd"] = asm["dynCall_vidd"];
|
|
var dynCall_ii = Module["dynCall_ii"] = asm["dynCall_ii"];
|
|
var dynCall_didii = Module["dynCall_didii"] = asm["dynCall_didii"];
|
|
var dynCall_viii = Module["dynCall_viii"] = asm["dynCall_viii"];
|
|
var dynCall_v = Module["dynCall_v"] = asm["dynCall_v"];
|
|
var dynCall_iii = Module["dynCall_iii"] = asm["dynCall_iii"];
|
|
var dynCall_vidiii = Module["dynCall_vidiii"] = asm["dynCall_vidiii"];
|
|
;
|
|
|
|
Runtime.stackAlloc = asm['stackAlloc'];
|
|
Runtime.stackSave = asm['stackSave'];
|
|
Runtime.stackRestore = asm['stackRestore'];
|
|
Runtime.establishStackSpace = asm['establishStackSpace'];
|
|
|
|
Runtime.setTempRet0 = asm['setTempRet0'];
|
|
Runtime.getTempRet0 = asm['getTempRet0'];
|
|
|
|
|
|
|
|
// === Auto-generated postamble setup entry stuff ===
|
|
|
|
|
|
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 initialStackTop;
|
|
var preloadStartTime = null;
|
|
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 (!Module['calledRun']) run();
|
|
if (!Module['calledRun']) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled
|
|
}
|
|
|
|
Module['callMain'] = Module.callMain = function callMain(args) {
|
|
assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on __ATMAIN__)');
|
|
assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called');
|
|
|
|
args = args || [];
|
|
|
|
ensureInitRuntime();
|
|
|
|
var argc = args.length+1;
|
|
function pad() {
|
|
for (var i = 0; i < 4-1; i++) {
|
|
argv.push(0);
|
|
}
|
|
}
|
|
var argv = [allocate(intArrayFromString(Module['thisProgram']), 'i8', ALLOC_NORMAL) ];
|
|
pad();
|
|
for (var i = 0; i < argc-1; i = i + 1) {
|
|
argv.push(allocate(intArrayFromString(args[i]), 'i8', ALLOC_NORMAL));
|
|
pad();
|
|
}
|
|
argv.push(0);
|
|
argv = allocate(argv, 'i32', ALLOC_NORMAL);
|
|
|
|
|
|
try {
|
|
|
|
var ret = Module['_main'](argc, argv, 0);
|
|
|
|
|
|
// 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
|
|
Module['noExitRuntime'] = true;
|
|
return;
|
|
} else {
|
|
if (e && typeof e === 'object' && e.stack) Module.printErr('exception thrown: ' + [e, e.stack]);
|
|
throw e;
|
|
}
|
|
} finally {
|
|
calledMain = true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
function run(args) {
|
|
args = args || Module['arguments'];
|
|
|
|
if (preloadStartTime === null) preloadStartTime = Date.now();
|
|
|
|
if (runDependencies > 0) {
|
|
Module.printErr('run() called, but dependencies remain, so not running');
|
|
return;
|
|
}
|
|
|
|
preRun();
|
|
|
|
if (runDependencies > 0) return; // a preRun added a dependency, run will be called later
|
|
if (Module['calledRun']) return; // run may have just been called through dependencies being fulfilled just in this very frame
|
|
|
|
function doRun() {
|
|
if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening
|
|
Module['calledRun'] = true;
|
|
|
|
if (ABORT) return;
|
|
|
|
ensureInitRuntime();
|
|
|
|
preMain();
|
|
|
|
if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) {
|
|
Module.printErr('pre-main prep time: ' + (Date.now() - preloadStartTime) + ' ms');
|
|
}
|
|
|
|
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'] = Module.run = run;
|
|
|
|
function exit(status, implicit) {
|
|
if (implicit && Module['noExitRuntime']) {
|
|
Module.printErr('exit(' + status + ') implicitly called by end of main(), but noExitRuntime, so not exiting the runtime (you can use emscripten_force_exit, if you want to force a true shutdown)');
|
|
return;
|
|
}
|
|
|
|
if (Module['noExitRuntime']) {
|
|
Module.printErr('exit(' + status + ') called, but noExitRuntime, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)');
|
|
} else {
|
|
|
|
ABORT = true;
|
|
EXITSTATUS = status;
|
|
STACKTOP = initialStackTop;
|
|
|
|
exitRuntime();
|
|
|
|
if (Module['onExit']) Module['onExit'](status);
|
|
}
|
|
|
|
if (ENVIRONMENT_IS_NODE) {
|
|
// Work around a node.js bug where stdout buffer is not flushed at process exit:
|
|
// Instead of process.exit() directly, wait for stdout flush event.
|
|
// See https://github.com/joyent/node/issues/1669 and https://github.com/kripken/emscripten/issues/2582
|
|
// Workaround is based on https://github.com/RReverser/acorn/commit/50ab143cecc9ed71a2d66f78b4aec3bb2e9844f6
|
|
process['stdout']['once']('drain', function () {
|
|
process['exit'](status);
|
|
});
|
|
console.log(' '); // Make sure to print something to force the drain event to occur, in case the stdout buffer was empty.
|
|
// Work around another node bug where sometimes 'drain' is never fired - make another effort
|
|
// to emit the exit status, after a significant delay (if node hasn't fired drain by then, give up)
|
|
setTimeout(function() {
|
|
process['exit'](status);
|
|
}, 500);
|
|
} else
|
|
if (ENVIRONMENT_IS_SHELL && typeof quit === 'function') {
|
|
quit(status);
|
|
}
|
|
// if we reach here, we must throw an exception to halt the current execution
|
|
throw new ExitStatus(status);
|
|
}
|
|
Module['exit'] = Module.exit = exit;
|
|
|
|
var abortDecorators = [];
|
|
|
|
function abort(what) {
|
|
if (what !== undefined) {
|
|
Module.print(what);
|
|
Module.printErr(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'] = Module.abort = abort;
|
|
|
|
// {{PRE_RUN_ADDITIONS}}
|
|
|
|
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;
|
|
}
|
|
|
|
|
|
run();
|
|
|
|
// {{POST_RUN_ADDITIONS}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// {{MODULE_ADDITIONS}}
|
|
|
|
|
|
|