Advertisement
rg443

shoco.js

Nov 13th, 2016
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function e(a) {
  2.     throw a;
  3. }
  4. var i = void 0,
  5.     j = !0,
  6.     l = null,
  7.     m = !1;
  8.  
  9. function n() {
  10.     return function() {}
  11. }
  12. var p = {
  13.         preRun: function() {
  14.             var a = p.cwrap("shoco_compress", "number", ["string", "number", "number", "number"]),
  15.                 b = p.cwrap("shoco_decompress", "number", ["number", "number", "number", "number"]),
  16.                 c = {
  17.                     compress: function(b) {
  18.                         var c = p._malloc(8 * b.length),
  19.                             c = new Uint8Array(p.HEAPU8.buffer, c, 8 * b.length),
  20.                             b = a(b, 0, c.byteOffset, c.byteLength),
  21.                             b = new Uint8Array(c.subarray(0, b));
  22.                         p._free(c.byteOffset);
  23.                         return b
  24.                     },
  25.                     decompress: function(a) {
  26.                         var c = p._malloc(8 * a.length),
  27.                             c = new Uint8Array(p.HEAPU8.buffer, c, 8 * a.length),
  28.                             g = p._malloc(a.length),
  29.                             g = new Uint8Array(p.HEAPU8.buffer, g, a.length);
  30.                         g.set(new Uint8Array(a.buffer));
  31.                         a = b(g.byteOffset, a.length, c.byteOffset, c.byteLength);
  32.                         a = decodeURIComponent(escape(String.fromCharCode.apply(l, c.subarray(0, a))));
  33.                         p._free(g.byteOffset);
  34.                         p._free(c.byteOffset);
  35.                         return a
  36.                     }
  37.                 };
  38.             "undefined" !== typeof module ? module.Wd = c : window.shoco = c
  39.         }
  40.     },
  41.     aa = {},
  42.     q;
  43. for (q in p) p.hasOwnProperty(q) && (aa[q] = p[q]);
  44. var ba = "object" === typeof process && "function" === typeof require,
  45.     ca = "object" === typeof window,
  46.     da = "function" === typeof importScripts,
  47.     fa = !ca && !ba && !da;
  48. if (ba) {
  49.     p.print || (p.print = function(a) {
  50.         process.stdout.write(a + "\n")
  51.     });
  52.     p.printErr || (p.printErr = function(a) {
  53.         process.stderr.write(a + "\n")
  54.     });
  55.     var ga = require("fs"),
  56.         ha = require("path");
  57.     p.read = function(a, b) {
  58.         var a = ha.normalize(a),
  59.             c = ga.readFileSync(a);
  60.         !c && a != ha.resolve(a) && (a = path.join(__dirname, "..", "src", a), c = ga.readFileSync(a));
  61.         c && !b && (c = c.toString());
  62.         return c
  63.     };
  64.     p.readBinary = function(a) {
  65.         return p.read(a, j)
  66.     };
  67.     p.load = function(a) {
  68.         ia(read(a))
  69.     };
  70.     p.arguments = process.argv.slice(2);
  71.     module.exports = p
  72. } else fa ? (p.print || (p.print =
  73.     print), "undefined" != typeof printErr && (p.printErr = printErr), p.read = "undefined" != typeof read ? read : function() {
  74.     e("no read() available (jsc?)")
  75. }, p.readBinary = function(a) {
  76.     return read(a, "binary")
  77. }, "undefined" != typeof scriptArgs ? p.arguments = scriptArgs : "undefined" != typeof arguments && (p.arguments = arguments), this.Module = p, eval("if (typeof gc === 'function' && gc.toString().indexOf('[native code]') > 0) var gc = undefined")) : ca || da ? (p.read = function(a) {
  78.         var b = new XMLHttpRequest;
  79.         b.open("GET", a, m);
  80.         b.send(l);
  81.         return b.responseText
  82.     },
  83.     "undefined" != typeof arguments && (p.arguments = arguments), "undefined" !== typeof console ? (p.print || (p.print = function(a) {
  84.         console.log(a)
  85.     }), p.printErr || (p.printErr = function(a) {
  86.         console.log(a)
  87.     })) : p.print || (p.print = n()), ca ? window.Module = p : p.load = importScripts) : e("Unknown runtime environment. Where are we?");
  88.  
  89. function ia(a) {
  90.     eval.call(l, a)
  91. }
  92. "undefined" == !p.load && p.read && (p.load = function(a) {
  93.     ia(p.read(a))
  94. });
  95. p.print || (p.print = n());
  96. p.printErr || (p.printErr = p.print);
  97. p.arguments || (p.arguments = []);
  98. p.print = p.print;
  99. p.I = p.printErr;
  100. p.preRun = [];
  101. p.postRun = [];
  102. for (q in aa) aa.hasOwnProperty(q) && (p[q] = aa[q]);
  103. var v = {
  104.     Xa: function() {
  105.         return r
  106.     },
  107.     Wa: function(a) {
  108.         r = a
  109.     },
  110.     Xd: function(a, b) {
  111.         b = b || 4;
  112.         return 1 == b ? a : isNumber(a) && isNumber(b) ? Math.ceil(a / b) * b : isNumber(b) && isPowerOfTwo(b) ? "(((" + a + ")+" + (b - 1) + ")&" + -b + ")" : "Math.ceil((" + a + ")/" + b + ")*" + b
  113.     },
  114.     vb: function(a) {
  115.         return a in v.ib || a in v.gb
  116.     },
  117.     wb: function(a) {
  118.         return "*" == a[a.length - 1]
  119.     },
  120.     xb: function(a) {
  121.         return isPointerType(a) ? m : isArrayType(a) || /<?\{ ?[^}]* ?\}>?/.test(a) ? j : "%" == a[0]
  122.     },
  123.     ib: {
  124.         i1: 0,
  125.         i8: 0,
  126.         i16: 0,
  127.         i32: 0,
  128.         i64: 0
  129.     },
  130.     gb: {
  131.         "float": 0,
  132.         "double": 0
  133.     },
  134.     ne: function(a, b) {
  135.         return (a | 0 | b | 0) + 4294967296 *
  136.             (Math.round(a / 4294967296) | Math.round(b / 4294967296))
  137.     },
  138.     Od: function(a, b) {
  139.         return ((a | 0) & (b | 0)) + 4294967296 * (Math.round(a / 4294967296) & Math.round(b / 4294967296))
  140.     },
  141.     te: function(a, b) {
  142.         return ((a | 0) ^ (b | 0)) + 4294967296 * (Math.round(a / 4294967296) ^ Math.round(b / 4294967296))
  143.     },
  144.     pa: function(a) {
  145.         switch (a) {
  146.             case "i1":
  147.             case "i8":
  148.                 return 1;
  149.             case "i16":
  150.                 return 2;
  151.             case "i32":
  152.                 return 4;
  153.             case "i64":
  154.                 return 8;
  155.             case "float":
  156.                 return 4;
  157.             case "double":
  158.                 return 8;
  159.             default:
  160.                 return "*" === a[a.length - 1] ? v.D : "i" === a[0] ? (a = parseInt(a.substr(1)), w(0 === a % 8), a /
  161.                     8) : 0
  162.         }
  163.     },
  164.     qb: function(a) {
  165.         return Math.max(v.pa(a), v.D)
  166.     },
  167.     ob: function(a, b) {
  168.         var c = {};
  169.         return b ? a.filter(function(a) {
  170.             return c[a[b]] ? m : c[a[b]] = j
  171.         }) : a.filter(function(a) {
  172.             return c[a] ? m : c[a] = j
  173.         })
  174.     },
  175.     set: function() {
  176.         for (var a = "object" === typeof arguments[0] ? arguments[0] : arguments, b = {}, c = 0; c < a.length; c++) b[a[c]] = 0;
  177.         return b
  178.     },
  179.     Ed: 8,
  180.     oa: function(a, b, c) {
  181.         return !c && ("i64" == a || "double" == a) ? 8 : !a ? Math.min(b, 8) : Math.min(b || (a ? v.qb(a) : 0), v.D)
  182.     },
  183.     mb: function(a) {
  184.         a.u = 0;
  185.         a.N = 0;
  186.         var b = [],
  187.             c = -1,
  188.             d = 0;
  189.         a.Ma = a.la.map(function(f) {
  190.             d++;
  191.             var g, h;
  192.             v.vb(f) ||
  193.                 v.wb(f) ? (g = v.pa(f), h = v.oa(f, g)) : v.xb(f) ? "0" === f[1] ? (g = 0, h = Types.types[f] ? v.oa(l, Types.types[f].N) : a.N || QUANTUM_SIZE) : (g = Types.types[f].u, h = v.oa(l, Types.types[f].N)) : "b" == f[0] ? (g = f.substr(1) | 0, h = 1) : "<" === f[0] ? g = h = Types.types[f].u : "i" === f[0] ? (g = h = parseInt(f.substr(1)) / 8, w(0 === g % 1, "cannot handle non-byte-size field " + f)) : w(m, "invalid type for calculateStructAlignment");
  194.             a.oe && (h = 1);
  195.             a.N = Math.max(a.N, h);
  196.             f = v.M(a.u, h);
  197.             a.u = f + g;
  198.             0 <= c && b.push(f - c);
  199.             return c = f
  200.         });
  201.         a.Sa && "[" === a.Sa[0] && (a.u = parseInt(a.Sa.substr(1)) *
  202.             a.u / 2);
  203.         a.u = v.M(a.u, a.N);
  204.         0 == b.length ? a.La = a.u : 1 == v.ob(b).length && (a.La = b[0]);
  205.         a.je = 1 != a.La;
  206.         return a.Ma
  207.     },
  208.     pb: function(a, b, c) {
  209.         var d, f;
  210.         if (b) {
  211.             c = c || 0;
  212.             d = ("undefined" === typeof Types ? v.se : Types.types)[b];
  213.             if (!d) return l;
  214.             if (d.la.length != a.length) return printErr("Number of named fields must match the type for " + b + ": possibly duplicate struct names. Cannot return structInfo"), l;
  215.             f = d.Ma
  216.         } else d = {
  217.             la: a.map(function(a) {
  218.                 return a[0]
  219.             })
  220.         }, f = v.mb(d);
  221.         var g = {
  222.             Gd: d.u
  223.         };
  224.         b ? a.forEach(function(a, b) {
  225.             if ("string" === typeof a) g[a] = f[b] +
  226.                 c;
  227.             else {
  228.                 var s, u;
  229.                 for (u in a) s = u;
  230.                 g[s] = v.pb(a[s], d.la[b], f[b])
  231.             }
  232.         }) : a.forEach(function(a, b) {
  233.             g[a[1]] = f[b]
  234.         });
  235.         return g
  236.     },
  237.     ja: function(a, b, c) {
  238.         return c && c.length ? (c.splice || (c = Array.prototype.slice.call(c)), c.splice(0, 0, b), p["dynCall_" + a].apply(l, c)) : p["dynCall_" + a].call(l, b)
  239.     },
  240.     W: [],
  241.     Hd: function(a) {
  242.         for (var b = 0; b < v.W.length; b++)
  243.             if (!v.W[b]) return v.W[b] = a, 2 * (1 + b);
  244.         e("Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.")
  245.     },
  246.     qe: function(a) {
  247.         v.W[(a - 2) / 2] = l
  248.     },
  249.     Yd: function(a, b) {
  250.         v.ia ||
  251.             (v.ia = {});
  252.         var c = v.ia[a];
  253.         if (c) return c;
  254.         for (var c = [], d = 0; d < b; d++) c.push(String.fromCharCode(36) + d);
  255.         d = ja(a);
  256.         '"' === d[0] && (d.indexOf('"', 1) === d.length - 1 ? d = d.substr(1, d.length - 2) : z("invalid EM_ASM input |" + d + "|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)"));
  257.         try {
  258.             var f = eval("(function(" + c.join(",") + "){ " + d + " })")
  259.         } catch (g) {
  260.             p.I("error in executing inline EM_ASM code: " + g + " on: \n\n" + d + "\n\nwith args |" + c + "| (make sure to use the right one out of EM_ASM, EM_ASM_ARGS, etc.)"),
  261.                 e(g)
  262.         }
  263.         return v.ia[a] = f
  264.     },
  265.     S: function(a) {
  266.         v.S.va || (v.S.va = {});
  267.         v.S.va[a] || (v.S.va[a] = 1, p.I(a))
  268.     },
  269.     na: {},
  270.     $d: function(a, b) {
  271.         w(b);
  272.         v.na[a] || (v.na[a] = function() {
  273.             return v.ja(b, a, arguments)
  274.         });
  275.         return v.na[a]
  276.     },
  277.     ga: function() {
  278.         var a = [],
  279.             b = 0;
  280.         this.sa = function(c) {
  281.             c &= 255;
  282.             if (0 == a.length) {
  283.                 if (0 == (c & 128)) return String.fromCharCode(c);
  284.                 a.push(c);
  285.                 b = 192 == (c & 224) ? 1 : 224 == (c & 240) ? 2 : 3;
  286.                 return ""
  287.             }
  288.             if (b && (a.push(c), b--, 0 < b)) return "";
  289.             var c = a[0],
  290.                 d = a[1],
  291.                 f = a[2],
  292.                 g = a[3];
  293.             2 == a.length ? c = String.fromCharCode((c & 31) << 6 | d & 63) : 3 == a.length ? c = String.fromCharCode((c &
  294.                 15) << 12 | (d & 63) << 6 | f & 63) : (c = (c & 7) << 18 | (d & 63) << 12 | (f & 63) << 6 | g & 63, c = String.fromCharCode(Math.floor((c - 65536) / 1024) + 55296, (c - 65536) % 1024 + 56320));
  295.             a.length = 0;
  296.             return c
  297.         };
  298.         this.Bb = function(a) {
  299.             for (var a = unescape(encodeURIComponent(a)), b = [], f = 0; f < a.length; f++) b.push(a.charCodeAt(f));
  300.             return b
  301.         }
  302.     },
  303.     Zd: function() {
  304.         e("You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work")
  305.     },
  306.     wa: function(a) {
  307.         var b = r;
  308.         r = r + a | 0;
  309.         r = r + 7 & -8;
  310.         return b
  311.     },
  312.     Ya: function(a) {
  313.         var b = B;
  314.         B =
  315.             B + a | 0;
  316.         B = B + 7 & -8;
  317.         return b
  318.     },
  319.     Ja: function(a) {
  320.         var b = C;
  321.         C = C + a | 0;
  322.         C = C + 7 & -8;
  323.         C >= D && z("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value " + D + ", (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.");
  324.         return b
  325.     },
  326.     M: function(a, b) {
  327.         return Math.ceil(a / (b ? b : 8)) * (b ? b : 8)
  328.     },
  329.     he: function(a, b, c) {
  330.         return c ? +(a >>> 0) + 4294967296 * +(b >>> 0) : +(a >>> 0) + 4294967296 * +(b | 0)
  331.     },
  332.     hb: 8,
  333.     D: 4,
  334.     Fd: 0
  335. };
  336. p.Runtime = v;
  337. var ka = m,
  338.     F, la;
  339.  
  340. function w(a, b) {
  341.     a || z("Assertion failed: " + b)
  342. }
  343. p.ccall = function(a, b, c, d) {
  344.     return ma(na(a), b, c, d)
  345. };
  346.  
  347. function na(a) {
  348.     try {
  349.         var b = p["_" + a];
  350.         b || (b = eval("_" + a))
  351.     } catch (c) {}
  352.     w(b, "Cannot call unknown function " + a + " (perhaps LLVM optimizations or closure removed it?)");
  353.     return b
  354. }
  355.  
  356. function ma(a, b, c, d) {
  357.     function f(a, b) {
  358.         if ("string" == b) {
  359.             if (a === l || a === i || 0 === a) return 0;
  360.             a = G(a);
  361.             b = "array"
  362.         }
  363.         if ("array" == b) {
  364.             g || (g = v.Xa());
  365.             var c = v.wa(a.length);
  366.             oa(a, c);
  367.             return c
  368.         }
  369.         return a
  370.     }
  371.     var g = 0,
  372.         h = 0,
  373.         d = d ? d.map(function(a) {
  374.             return f(a, c[h++])
  375.         }) : [];
  376.     a = a.apply(l, d);
  377.     "string" == b ? b = ja(a) : (w("array" != b), b = a);
  378.     g && v.Wa(g);
  379.     return b
  380. }
  381. p.cwrap = function(a, b, c) {
  382.     var d = na(a);
  383.     return function() {
  384.         return ma(d, b, c, Array.prototype.slice.call(arguments))
  385.     }
  386. };
  387.  
  388. function pa(a, b, c) {
  389.     c = c || "i8";
  390.     "*" === c.charAt(c.length - 1) && (c = "i32");
  391.     switch (c) {
  392.         case "i1":
  393.             H[a] = b;
  394.             break;
  395.         case "i8":
  396.             H[a] = b;
  397.             break;
  398.         case "i16":
  399.             I[a >> 1] = b;
  400.             break;
  401.         case "i32":
  402.             J[a >> 2] = b;
  403.             break;
  404.         case "i64":
  405.             la = [b >>> 0, (F = b, 1 <= +qa(F) ? 0 < F ? (ra(+sa(F / 4294967296), 4294967295) | 0) >>> 0 : ~~+ta((F - +(~~F >>> 0)) / 4294967296) >>> 0 : 0)];
  406.             J[a >> 2] = la[0];
  407.             J[a + 4 >> 2] = la[1];
  408.             break;
  409.         case "float":
  410.             ua[a >> 2] = b;
  411.             break;
  412.         case "double":
  413.             va[a >> 3] = b;
  414.             break;
  415.         default:
  416.             z("invalid type for setValue: " + c)
  417.     }
  418. }
  419. p.setValue = pa;
  420. p.getValue = function(a, b) {
  421.     b = b || "i8";
  422.     "*" === b.charAt(b.length - 1) && (b = "i32");
  423.     switch (b) {
  424.         case "i1":
  425.             return H[a];
  426.         case "i8":
  427.             return H[a];
  428.         case "i16":
  429.             return I[a >> 1];
  430.         case "i32":
  431.             return J[a >> 2];
  432.         case "i64":
  433.             return J[a >> 2];
  434.         case "float":
  435.             return ua[a >> 2];
  436.         case "double":
  437.             return va[a >> 3];
  438.         default:
  439.             z("invalid type for setValue: " + b)
  440.     }
  441.     return l
  442. };
  443. var L = 2,
  444.     wa = 4;
  445. p.ALLOC_NORMAL = 0;
  446. p.ALLOC_STACK = 1;
  447. p.ALLOC_STATIC = L;
  448. p.ALLOC_DYNAMIC = 3;
  449. p.ALLOC_NONE = wa;
  450.  
  451. function M(a, b, c, d) {
  452.     var f, g;
  453.     "number" === typeof a ? (f = j, g = a) : (f = m, g = a.length);
  454.     var h = "string" === typeof b ? b : l,
  455.         c = c == wa ? d : [xa, v.wa, v.Ya, v.Ja][c === i ? L : c](Math.max(g, h ? 1 : b.length));
  456.     if (f) {
  457.         d = c;
  458.         w(0 == (c & 3));
  459.         for (a = c + (g & -4); d < a; d += 4) J[d >> 2] = 0;
  460.         for (a = c + g; d < a;) H[d++ | 0] = 0;
  461.         return c
  462.     }
  463.     if ("i8" === h) return a.subarray || a.slice ? N.set(a, c) : N.set(new Uint8Array(a), c), c;
  464.     for (var d = 0, x, s; d < g;) {
  465.         var u = a[d];
  466.         "function" === typeof u && (u = v.ae(u));
  467.         f = h || b[d];
  468.         0 === f ? d++ : ("i64" == f && (f = "i32"), pa(c + d, u, f), s !== f && (x = v.pa(f), s = f), d += x)
  469.     }
  470.     return c
  471. }
  472. p.allocate = M;
  473.  
  474. function ja(a, b) {
  475.     for (var c = m, d, f = 0;;) {
  476.         d = N[a + f | 0];
  477.         if (128 <= d) c = j;
  478.         else if (0 == d && !b) break;
  479.         f++;
  480.         if (b && f == b) break
  481.     }
  482.     b || (b = f);
  483.     var g = "";
  484.     if (!c) {
  485.         for (; 0 < b;) d = String.fromCharCode.apply(String, N.subarray(a, a + Math.min(b, 1024))), g = g ? g + d : d, a += 1024, b -= 1024;
  486.         return g
  487.     }
  488.     c = new v.ga;
  489.     for (f = 0; f < b; f++) d = N[a + f | 0], g += c.sa(d);
  490.     return g
  491. }
  492. p.Pointer_stringify = ja;
  493. p.UTF16ToString = function(a) {
  494.     for (var b = 0, c = "";;) {
  495.         var d = I[a + 2 * b >> 1];
  496.         if (0 == d) return c;
  497.         ++b;
  498.         c += String.fromCharCode(d)
  499.     }
  500. };
  501. p.stringToUTF16 = function(a, b) {
  502.     for (var c = 0; c < a.length; ++c) I[b + 2 * c >> 1] = a.charCodeAt(c);
  503.     I[b + 2 * a.length >> 1] = 0
  504. };
  505. p.UTF32ToString = function(a) {
  506.     for (var b = 0, c = "";;) {
  507.         var d = J[a + 4 * b >> 2];
  508.         if (0 == d) return c;
  509.         ++b;
  510.         65536 <= d ? (d -= 65536, c += String.fromCharCode(55296 | d >> 10, 56320 | d & 1023)) : c += String.fromCharCode(d)
  511.     }
  512. };
  513. p.stringToUTF32 = function(a, b) {
  514.     for (var c = 0, d = 0; d < a.length; ++d) {
  515.         var f = a.charCodeAt(d);
  516.         if (55296 <= f && 57343 >= f) var g = a.charCodeAt(++d),
  517.             f = 65536 + ((f & 1023) << 10) | g & 1023;
  518.         J[b + 4 * c >> 2] = f;
  519.         ++c
  520.     }
  521.     J[b + 4 * c >> 2] = 0
  522. };
  523.  
  524. function ya(a) {
  525.     function b(h, s, u) {
  526.         var s = s || Infinity,
  527.             t = "",
  528.             A = [],
  529.             k;
  530.         if ("N" === a[c]) {
  531.             c++;
  532.             "K" === a[c] && c++;
  533.             for (k = [];
  534.                 "E" !== a[c];)
  535.                 if ("S" === a[c]) {
  536.                     c++;
  537.                     var y = a.indexOf("_", c);
  538.                     k.push(f[a.substring(c, y) || 0] || "?");
  539.                     c = y + 1
  540.                 } else if ("C" === a[c]) k.push(k[k.length - 1]), c += 2;
  541.             else {
  542.                 var y = parseInt(a.substr(c)),
  543.                     E = y.toString().length;
  544.                 if (!y || !E) {
  545.                     c--;
  546.                     break
  547.                 }
  548.                 var ea = a.substr(c + E, y);
  549.                 k.push(ea);
  550.                 f.push(ea);
  551.                 c += E + y
  552.             }
  553.             c++;
  554.             k = k.join("::");
  555.             s--;
  556.             if (0 === s) return h ? [k] : k
  557.         } else if (("K" === a[c] || g && "L" === a[c]) && c++, y = parseInt(a.substr(c))) E = y.toString().length,
  558.             k = a.substr(c + E, y), c += E + y;
  559.         g = m;
  560.         "I" === a[c] ? (c++, y = b(j), E = b(j, 1, j), t += E[0] + " " + k + "<" + y.join(", ") + ">") : t = k;
  561.         a: for (; c < a.length && 0 < s--;)
  562.             if (k = a[c++], k in d) A.push(d[k]);
  563.             else switch (k) {
  564.                 case "P":
  565.                     A.push(b(j, 1, j)[0] + "*");
  566.                     break;
  567.                 case "R":
  568.                     A.push(b(j, 1, j)[0] + "&");
  569.                     break;
  570.                 case "L":
  571.                     c++;
  572.                     y = a.indexOf("E", c) - c;
  573.                     A.push(a.substr(c, y));
  574.                     c += y + 2;
  575.                     break;
  576.                 case "A":
  577.                     y = parseInt(a.substr(c));
  578.                     c += y.toString().length;
  579.                     "_" !== a[c] && e("?");
  580.                     c++;
  581.                     A.push(b(j, 1, j)[0] + " [" + y + "]");
  582.                     break;
  583.                 case "E":
  584.                     break a;
  585.                 default:
  586.                     t += "?" + k;
  587.                     break a
  588.             }!u && (1 === A.length && "void" ===
  589.                 A[0]) && (A = []);
  590.         return h ? (t && A.push(t + "?"), A) : t + ("(" + A.join(", ") + ")")
  591.     }
  592.     var c = 3,
  593.         d = {
  594.             v: "void",
  595.             b: "bool",
  596.             c: "char",
  597.             s: "short",
  598.             i: "int",
  599.             l: "long",
  600.             f: "float",
  601.             d: "double",
  602.             w: "wchar_t",
  603.             a: "signed char",
  604.             h: "unsigned char",
  605.             t: "unsigned short",
  606.             j: "unsigned int",
  607.             m: "unsigned long",
  608.             x: "long long",
  609.             y: "unsigned long long",
  610.             z: "..."
  611.         },
  612.         f = [],
  613.         g = j;
  614.     try {
  615.         if ("Object._main" == a || "_main" == a) return "main()";
  616.         "number" === typeof a && (a = ja(a));
  617.         if ("_" !== a[0] || "_" !== a[1] || "Z" !== a[2]) return a;
  618.         switch (a[3]) {
  619.             case "n":
  620.                 return "operator new()";
  621.             case "d":
  622.                 return "operator delete()"
  623.         }
  624.         return b()
  625.     } catch (h) {
  626.         return a
  627.     }
  628. }
  629.  
  630. function za() {
  631.     var a = Error().stack;
  632.     return a ? a.replace(/__Z[\w\d_]+/g, function(a) {
  633.         var c = ya(a);
  634.         return a === c ? a : a + " [" + c + "]"
  635.     }) : "(no stack trace available)"
  636. }
  637. for (var H, N, I, Aa, J, Ba, ua, va, Ca = 0, B = 0, Da = 0, r = 0, Ea = 0, Fa = 0, C = 0, Ga = p.TOTAL_STACK || 5242880, D = p.TOTAL_MEMORY || 16777216, O = 4096; O < D || O < 2 * Ga;) O = 16777216 > O ? 2 * O : O + 16777216;
  638. O !== D && (p.I("increasing TOTAL_MEMORY to " + O + " to be more reasonable"), D = O);
  639. w("undefined" !== typeof Int32Array && "undefined" !== typeof Float64Array && !!(new Int32Array(1)).subarray && !!(new Int32Array(1)).set, "JS engine does not provide full typed array support");
  640. var P = new ArrayBuffer(D);
  641. H = new Int8Array(P);
  642. I = new Int16Array(P);
  643. J = new Int32Array(P);
  644. N = new Uint8Array(P);
  645. Aa = new Uint16Array(P);
  646. Ba = new Uint32Array(P);
  647. ua = new Float32Array(P);
  648. va = new Float64Array(P);
  649. J[0] = 255;
  650. w(255 === N[0] && 0 === N[3], "Typed arrays 2 must be run on a little-endian system");
  651. p.HEAP = i;
  652. p.HEAP8 = H;
  653. p.HEAP16 = I;
  654. p.HEAP32 = J;
  655. p.HEAPU8 = N;
  656. p.HEAPU16 = Aa;
  657. p.HEAPU32 = Ba;
  658. p.HEAPF32 = ua;
  659. p.HEAPF64 = va;
  660.  
  661. function Q(a) {
  662.     for (; 0 < a.length;) {
  663.         var b = a.shift();
  664.         if ("function" == typeof b) b();
  665.         else {
  666.             var c = b.Q;
  667.             "number" === typeof c ? b.ha === i ? v.ja("v", c) : v.ja("vi", c, [b.ha]) : c(b.ha === i ? l : b.ha)
  668.         }
  669.     }
  670. }
  671. var Ha = [],
  672.     Ia = [],
  673.     Ja = [],
  674.     Ka = [],
  675.     La = [],
  676.     Ma = m;
  677.  
  678. function Na(a) {
  679.     Ha.unshift(a)
  680. }
  681. p.addOnPreRun = p.Md = Na;
  682. p.addOnInit = p.Jd = function(a) {
  683.     Ia.unshift(a)
  684. };
  685. p.addOnPreMain = p.Ld = function(a) {
  686.     Ja.unshift(a)
  687. };
  688. p.addOnExit = p.Id = function(a) {
  689.     Ka.unshift(a)
  690. };
  691.  
  692. function Pa(a) {
  693.     La.unshift(a)
  694. }
  695. p.addOnPostRun = p.Kd = Pa;
  696.  
  697. function G(a, b, c) {
  698.     a = (new v.ga).Bb(a);
  699.     c && (a.length = c);
  700.     b || a.push(0);
  701.     return a
  702. }
  703. p.intArrayFromString = G;
  704. p.intArrayToString = function(a) {
  705.     for (var b = [], c = 0; c < a.length; c++) {
  706.         var d = a[c];
  707.         255 < d && (d &= 255);
  708.         b.push(String.fromCharCode(d))
  709.     }
  710.     return b.join("""i8", wa, v.hb);
  711. var Ua = v.M(M(12, "i8", L), 8);
  712. w(0 == Ua % 8);
  713.  
  714. function xa(a) {
  715.     return v.Ja(a + 8) + 8 & 4294967288
  716. }
  717. p._malloc = xa;
  718. var S = {
  719.         O: 1,
  720.         T: 2,
  721.         rd: 3,
  722.         mc: 4,
  723.         C: 5,
  724.         Ea: 6,
  725.         Gb: 7,
  726.         Kc: 8,
  727.         bb: 9,
  728.         Ub: 10,
  729.         za: 11,
  730.         Bd: 11,
  731.         eb: 12,
  732.         ab: 13,
  733.         fc: 14,
  734.         Wc: 15,
  735.         Aa: 16,
  736.         Ba: 17,
  737.         Cd: 18,
  738.         Ca: 19,
  739.         fb: 20,
  740.         da: 21,
  741.         L: 22,
  742.         Fc: 23,
  743.         cb: 24,
  744.         ad: 25,
  745.         yd: 26,
  746.         gc: 27,
  747.         Sc: 28,
  748.         fa: 29,
  749.         od: 30,
  750.         yc: 31,
  751.         gd: 32,
  752.         cc: 33,
  753.         ld: 34,
  754.         Oc: 42,
  755.         jc: 43,
  756.         Vb: 44,
  757.         pc: 45,
  758.         qc: 46,
  759.         rc: 47,
  760.         xc: 48,
  761.         zd: 49,
  762.         Ic: 50,
  763.         oc: 51,
  764.         $b: 35,
  765.         Lc: 37,
  766.         Mb: 52,
  767.         Pb: 53,
  768.         Dd: 54,
  769.         Gc: 55,
  770.         Qb: 56,
  771.         Rb: 57,
  772.         ac: 35,
  773.         Sb: 59,
  774.         Uc: 60,
  775.         Jc: 61,
  776.         vd: 62,
  777.         Tc: 63,
  778.         Pc: 64,
  779.         Qc: 65,
  780.         nd: 66,
  781.         Mc: 67,
  782.         Jb: 68,
  783.         sd: 69,
  784.         Wb: 70,
  785.         hd: 71,
  786.         Ac: 72,
  787.         dc: 73,
  788.         Ob: 74,
  789.         bd: 76,
  790.         Nb: 77,
  791.         md: 78,
  792.         sc: 79,
  793.         tc: 80,
  794.         wc: 81,
  795.         vc: 82,
  796.         uc: 83,
  797.         Vc: 38,
  798.         Da: 39,
  799.         Bc: 36,
  800.         ea: 40,
  801.         cd: 95,
  802.         fd: 96,
  803.         Zb: 104,
  804.         Hc: 105,
  805.         Kb: 97,
  806.         kd: 91,
  807.         Zc: 88,
  808.         Rc: 92,
  809.         pd: 108,
  810.         Yb: 111,
  811.         Hb: 98,
  812.         Xb: 103,
  813.         Ec: 101,
  814.         Cc: 100,
  815.         wd: 110,
  816.         hc: 112,
  817.         ic: 113,
  818.         lc: 115,
  819.         Lb: 114,
  820.         bc: 89,
  821.         zc: 90,
  822.         jd: 93,
  823.         qd: 94,
  824.         Ib: 99,
  825.         Dc: 102,
  826.         nc: 106,
  827.         Xc: 107,
  828.         xd: 109,
  829.         Ad: 87,
  830.         ec: 122,
  831.         td: 116,
  832.         $c: 95,
  833.         Nc: 123,
  834.         kc: 84,
  835.         dd: 75,
  836.         Tb: 125,
  837.         Yc: 131,
  838.         ed: 130,
  839.         ud: 86
  840.     },
  841.     Va = {
  842.         "0": "Success",
  843.         1: "Not super-user",
  844.         2: "No such file or directory",
  845.         3: "No such process",
  846.         4: "Interrupted system call",
  847.         5: "I/O error",
  848.         6: "No such device or address",
  849.         7: "Arg list too long",
  850.         8: "Exec format error",
  851.         9: "Bad file number",
  852.         10: "No children",
  853.         11: "No more processes",
  854.         12: "Not enough core",
  855.         13: "Permission denied",
  856.         14: "Bad address",
  857.         15: "Block device required",
  858.         16: "Mount device busy",
  859.         17: "File exists",
  860.         18: "Cross-device link",
  861.         19: "No such device",
  862.         20: "Not a directory",
  863.         21: "Is a directory",
  864.         22: "Invalid argument",
  865.         23: "Too many open files in system",
  866.         24: "Too many open files",
  867.         25: "Not a typewriter",
  868.         26: "Text file busy",
  869.         27: "File too large",
  870.         28: "No space left on device",
  871.         29: "Illegal seek",
  872.         30: "Read only file system",
  873.         31: "Too many links",
  874.         32: "Broken pipe",
  875.         33: "Math arg out of domain of func",
  876.         34: "Math result not representable",
  877.         35: "File locking deadlock error",
  878.         36: "File or path name too long",
  879.         37: "No record locks available",
  880.         38: "Function not implemented",
  881.         39: "Directory not empty",
  882.         40: "Too many symbolic links",
  883.         42: "No message of desired type",
  884.         43: "Identifier removed",
  885.         44: "Channel number out of range",
  886.         45: "Level 2 not synchronized",
  887.         46: "Level 3 halted",
  888.         47: "Level 3 reset",
  889.         48: "Link number out of range",
  890.         49: "Protocol driver not attached",
  891.         50: "No CSI structure available",
  892.         51: "Level 2 halted",
  893.         52: "Invalid exchange",
  894.         53: "Invalid request descriptor",
  895.         54: "Exchange full",
  896.         55: "No anode",
  897.         56: "Invalid request code",
  898.         57: "Invalid slot",
  899.         59: "Bad font file fmt",
  900.         60: "Device not a stream",
  901.         61: "No data (for no delay io)",
  902.         62: "Timer expired",
  903.         63: "Out of streams resources",
  904.         64: "Machine is not on the network",
  905.         65: "Package not installed",
  906.         66: "The object is remote",
  907.         67: "The link has been severed",
  908.         68: "Advertise error",
  909.         69: "Srmount error",
  910.         70: "Communication error on send",
  911.         71: "Protocol error",
  912.         72: "Multihop attempted",
  913.         73: "Cross mount point (not really error)",
  914.         74: "Trying to read unreadable message",
  915.         75: "Value too large for defined data type",
  916.         76: "Given log. name not unique",
  917.         77: "f.d. invalid for this operation",
  918.         78: "Remote address changed",
  919.         79: "Can   access a needed shared lib",
  920.         80: "Accessing a corrupted shared lib",
  921.         81: ".lib section in a.out corrupted",
  922.         82: "Attempting to link in too many libs",
  923.         83: "Attempting to exec a shared library",
  924.         84: "Illegal byte sequence",
  925.         86: "Streams pipe error",
  926.         87: "Too many users",
  927.         88: "Socket operation on non-socket",
  928.         89: "Destination address required",
  929.         90: "Message too long",
  930.         91: "Protocol wrong type for socket",
  931.         92: "Protocol not available",
  932.         93: "Unknown protocol",
  933.         94: "Socket type not supported",
  934.         95: "Not supported",
  935.         96: "Protocol family not supported",
  936.         97: "Address family not supported by protocol family",
  937.         98: "Address already in use",
  938.         99: "Address not available",
  939.         100: "Network interface is not configured",
  940.         101: "Network is unreachable",
  941.         102: "Connection reset by network",
  942.         103: "Connection aborted",
  943.         104: "Connection reset by peer",
  944.         105: "No buffer space available",
  945.         106: "Socket is already connected",
  946.         107: "Socket is not connected",
  947.         108: "Can't send after socket shutdown",
  948.         109: "Too many references",
  949.         110: "Connection timed out",
  950.         111: "Connection refused",
  951.         112: "Host is down",
  952.         113: "Host is unreachable",
  953.         114: "Socket already connected",
  954.         115: "Connection already in progress",
  955.         116: "Stale file handle",
  956.         122: "Quota exceeded",
  957.         123: "No medium (in tape drive)",
  958.         125: "Operation canceled",
  959.         130: "Previous owner died",
  960.         131: "State not recoverable"
  961.     },
  962.     Wa = 0;
  963.  
  964. function Xa(a) {
  965.     return J[Wa >> 2] = a
  966. }
  967. var Ya = [];
  968.  
  969. function Za(a, b) {
  970.     Ya[a] = {
  971.         input: [],
  972.         H: [],
  973.         R: b
  974.     };
  975.     $a[a] = {
  976.         k: ab
  977.     }
  978. }
  979. var ab = {
  980.         open: function(a) {
  981.             var b = Ya[a.e.$];
  982.             b || e(new T(S.Ca));
  983.             a.p = b;
  984.             a.seekable = m
  985.         },
  986.         close: function(a) {
  987.             a.p.H.length && a.p.R.Z(a.p, 10)
  988.         },
  989.         J: function(a, b, c, d) {
  990.             (!a.p || !a.p.R.Pa) && e(new T(S.Ea));
  991.             for (var f = 0, g = 0; g < d; g++) {
  992.                 var h;
  993.                 try {
  994.                     h = a.p.R.Pa(a.p)
  995.                 } catch (x) {
  996.                     e(new T(S.C))
  997.                 }
  998.                 h === i && 0 === f && e(new T(S.za));
  999.                 if (h === l || h === i) break;
  1000.                 f++;
  1001.                 b[c + g] = h
  1002.             }
  1003.             f && (a.e.timestamp = Date.now());
  1004.             return f
  1005.         },
  1006.         write: function(a, b, c, d) {
  1007.             (!a.p || !a.p.R.Z) && e(new T(S.Ea));
  1008.             for (var f = 0; f < d; f++) try {
  1009.                 a.p.R.Z(a.p, b[c + f])
  1010.             } catch (g) {
  1011.                 e(new T(S.C))
  1012.             }
  1013.             d && (a.e.timestamp =
  1014.                 Date.now());
  1015.             return f
  1016.         }
  1017.     },
  1018.     U = {
  1019.         A: l,
  1020.         $a: 1,
  1021.         ca: 2,
  1022.         ya: 3,
  1023.         G: function() {
  1024.             return U.createNode(l, "/", 16895, 0)
  1025.         },
  1026.         createNode: function(a, b, c, d) {
  1027.             (24576 === (c & 61440) || 4096 === (c & 61440)) && e(new T(S.O));
  1028.             U.A || (U.A = {
  1029.                 dir: {
  1030.                     e: {
  1031.                         B: U.g.B,
  1032.                         o: U.g.o,
  1033.                         ra: U.g.ra,
  1034.                         X: U.g.X,
  1035.                         rename: U.g.rename,
  1036.                         Za: U.g.Za,
  1037.                         Va: U.g.Va,
  1038.                         Ua: U.g.Ua,
  1039.                         ba: U.g.ba
  1040.                     },
  1041.                     K: {
  1042.                         F: U.k.F
  1043.                     }
  1044.                 },
  1045.                 file: {
  1046.                     e: {
  1047.                         B: U.g.B,
  1048.                         o: U.g.o
  1049.                     },
  1050.                     K: {
  1051.                         F: U.k.F,
  1052.                         J: U.k.J,
  1053.                         write: U.k.write,
  1054.                         Fa: U.k.Fa,
  1055.                         Ra: U.k.Ra
  1056.                     }
  1057.                 },
  1058.                 link: {
  1059.                     e: {
  1060.                         B: U.g.B,
  1061.                         o: U.g.o,
  1062.                         aa: U.g.aa
  1063.                     },
  1064.                     K: {}
  1065.                 },
  1066.                 Ia: {
  1067.                     e: {
  1068.                         B: U.g.B,
  1069.                         o: U.g.o
  1070.                     },
  1071.                     K: bb
  1072.                 }
  1073.             });
  1074.             cb || (cb = function(a, b, c, d) {
  1075.                 a || (a = this);
  1076.                 this.parent =
  1077.                     a;
  1078.                 this.G = a.G;
  1079.                 this.Y = l;
  1080.                 this.id = db++;
  1081.                 this.name = b;
  1082.                 this.mode = c;
  1083.                 this.g = {};
  1084.                 this.k = {};
  1085.                 this.$ = d
  1086.             }, cb.prototype = {}, Object.defineProperties(cb.prototype, {
  1087.                 J: {
  1088.                     get: function() {
  1089.                         return 365 === (this.mode & 365)
  1090.                     },
  1091.                     set: function(a) {
  1092.                         a ? this.mode |= 365 : this.mode &= -366
  1093.                     }
  1094.                 },
  1095.                 write: {
  1096.                     get: function() {
  1097.                         return 146 === (this.mode & 146)
  1098.                     },
  1099.                     set: function(a) {
  1100.                         a ? this.mode |= 146 : this.mode &= -147
  1101.                     }
  1102.                 },
  1103.                 ub: {
  1104.                     get: function() {
  1105.                         return 16384 === (this.mode & 61440)
  1106.                     }
  1107.                 },
  1108.                 tb: {
  1109.                     get: function() {
  1110.                         return 8192 === (this.mode & 61440)
  1111.                     }
  1112.                 }
  1113.             }));
  1114.             c = new cb(a, b, c, d);
  1115.             d = eb(c.parent.id, c.name);
  1116.             c.Ab =
  1117.                 fb[d];
  1118.             fb[d] = c;
  1119.             16384 === (c.mode & 61440) ? (c.g = U.A.dir.e, c.k = U.A.dir.K, c.n = {}) : 32768 === (c.mode & 61440) ? (c.g = U.A.file.e, c.k = U.A.file.K, c.n = [], c.V = U.ca) : 40960 === (c.mode & 61440) ? (c.g = U.A.link.e, c.k = U.A.link.K) : 8192 === (c.mode & 61440) && (c.g = U.A.Ia.e, c.k = U.A.Ia.K);
  1120.             c.timestamp = Date.now();
  1121.             a && (a.n[b] = c);
  1122.             return c
  1123.         },
  1124.         ka: function(a) {
  1125.             a.V !== U.ca && (a.n = Array.prototype.slice.call(a.n), a.V = U.ca)
  1126.         },
  1127.         g: {
  1128.             B: function(a) {
  1129.                 var b = {};
  1130.                 b.Td = 8192 === (a.mode & 61440) ? a.id : 1;
  1131.                 b.de = a.id;
  1132.                 b.mode = a.mode;
  1133.                 b.ke = 1;
  1134.                 b.uid = 0;
  1135.                 b.be = 0;
  1136.                 b.$ = a.$;
  1137.                 b.size = 16384 ===
  1138.                     (a.mode & 61440) ? 4096 : 32768 === (a.mode & 61440) ? a.n.length : 40960 === (a.mode & 61440) ? a.link.length : 0;
  1139.                 b.Pd = new Date(a.timestamp);
  1140.                 b.ie = new Date(a.timestamp);
  1141.                 b.Sd = new Date(a.timestamp);
  1142.                 b.lb = 4096;
  1143.                 b.Qd = Math.ceil(b.size / b.lb);
  1144.                 return b
  1145.             },
  1146.             o: function(a, b) {
  1147.                 b.mode !== i && (a.mode = b.mode);
  1148.                 b.timestamp !== i && (a.timestamp = b.timestamp);
  1149.                 if (b.size !== i) {
  1150.                     U.ka(a);
  1151.                     var c = a.n;
  1152.                     if (b.size < c.length) c.length = b.size;
  1153.                     else
  1154.                         for (; b.size > c.length;) c.push(0)
  1155.                 }
  1156.             },
  1157.             ra: function() {
  1158.                 e(gb[S.T])
  1159.             },
  1160.             X: function(a, b, c, d) {
  1161.                 return U.createNode(a, b, c, d)
  1162.             },
  1163.             rename: function(a,
  1164.                 b, c) {
  1165.                 if (16384 === (a.mode & 61440)) {
  1166.                     var d;
  1167.                     try {
  1168.                         d = hb(b, c)
  1169.                     } catch (f) {}
  1170.                     if (d)
  1171.                         for (var g in d.n) e(new T(S.Da))
  1172.                 }
  1173.                 delete a.parent.n[a.name];
  1174.                 a.name = c;
  1175.                 b.n[c] = a;
  1176.                 a.parent = b
  1177.             },
  1178.             Za: function(a, b) {
  1179.                 delete a.n[b]
  1180.             },
  1181.             Va: function(a, b) {
  1182.                 var c = hb(a, b),
  1183.                     d;
  1184.                 for (d in c.n) e(new T(S.Da));
  1185.                 delete a.n[b]
  1186.             },
  1187.             Ua: function(a) {
  1188.                 var b = [".", ".."],
  1189.                     c;
  1190.                 for (c in a.n) a.n.hasOwnProperty(c) && b.push(c);
  1191.                 return b
  1192.             },
  1193.             ba: function(a, b, c) {
  1194.                 a = U.createNode(a, b, 41471, 0);
  1195.                 a.link = c;
  1196.                 return a
  1197.             },
  1198.             aa: function(a) {
  1199.                 40960 !== (a.mode & 61440) && e(new T(S.L));
  1200.                 return a.link
  1201.             }
  1202.         },
  1203.         k: {
  1204.             J: function(a,
  1205.                 b, c, d, f) {
  1206.                 a = a.e.n;
  1207.                 if (f >= a.length) return 0;
  1208.                 d = Math.min(a.length - f, d);
  1209.                 w(0 <= d);
  1210.                 if (8 < d && a.subarray) b.set(a.subarray(f, f + d), c);
  1211.                 else
  1212.                     for (var g = 0; g < d; g++) b[c + g] = a[f + g];
  1213.                 return d
  1214.             },
  1215.             write: function(a, b, c, d, f, g) {
  1216.                 var h = a.e;
  1217.                 h.timestamp = Date.now();
  1218.                 a = h.n;
  1219.                 if (d && 0 === a.length && 0 === f && b.subarray) return g && 0 === c ? (h.n = b, h.V = b.buffer === H.buffer ? U.$a : U.ya) : (h.n = new Uint8Array(b.subarray(c, c + d)), h.V = U.ya), d;
  1220.                 U.ka(h);
  1221.                 for (a = h.n; a.length < f;) a.push(0);
  1222.                 for (g = 0; g < d; g++) a[f + g] = b[c + g];
  1223.                 return d
  1224.             },
  1225.             F: function(a, b, c) {
  1226.                 1 === c ? b += a.position :
  1227.                     2 === c && 32768 === (a.e.mode & 61440) && (b += a.e.n.length);
  1228.                 0 > b && e(new T(S.L));
  1229.                 a.Eb = [];
  1230.                 return a.position = b
  1231.             },
  1232.             Fa: function(a, b, c) {
  1233.                 U.ka(a.e);
  1234.                 a = a.e.n;
  1235.                 for (b += c; b > a.length;) a.push(0)
  1236.             },
  1237.             Ra: function(a, b, c, d, f, g, h) {
  1238.                 32768 !== (a.e.mode & 61440) && e(new T(S.Ca));
  1239.                 a = a.e.n;
  1240.                 if (!(h & 2) && (a.buffer === b || a.buffer === b.buffer)) f = m, d = a.byteOffset;
  1241.                 else {
  1242.                     if (0 < f || f + d < a.length) a = a.subarray ? a.subarray(f, f + d) : Array.prototype.slice.call(a, f, f + d);
  1243.                     f = j;
  1244.                     (d = xa(d)) || e(new T(S.eb));
  1245.                     b.set(a, d)
  1246.                 }
  1247.                 return {
  1248.                     pe: d,
  1249.                     Nd: f
  1250.                 }
  1251.             }
  1252.         }
  1253.     },
  1254.     ib = M(1, "i32*", L),
  1255.     jb = M(1, "i32*", L),
  1256.     kb =
  1257.     M(1, "i32*", L),
  1258.     lb = l,
  1259.     $a = [l],
  1260.     mb = [],
  1261.     db = 1,
  1262.     fb = l,
  1263.     nb = j,
  1264.     T = l,
  1265.     gb = {};
  1266.  
  1267. function V(a, b) {
  1268.     var a = ob("/", a),
  1269.         b = b || {},
  1270.         c = {
  1271.             Na: j,
  1272.             ta: 0
  1273.         },
  1274.         d;
  1275.     for (d in c) b[d] === i && (b[d] = c[d]);
  1276.     8 < b.ta && e(new T(S.ea));
  1277.     var c = pb(a.split("/").filter(function(a) {
  1278.             return !!a
  1279.         }), m),
  1280.         f = lb,
  1281.         g = "/";
  1282.     for (d = 0; d < c.length; d++) {
  1283.         var h = d === c.length - 1;
  1284.         if (h && b.parent) break;
  1285.         f = hb(f, c[d]);
  1286.         g = W(g + "/" + c[d]);
  1287.         if (f.Y && (!h || h && b.Na)) f = f.Y.root;
  1288.         if (!h || b.ma)
  1289.             for (h = 0; 40960 === (f.mode & 61440);) {
  1290.                 f = V(g).e;
  1291.                 f.g.aa || e(new T(S.L));
  1292.                 var f = f.g.aa(f),
  1293.                     x = ob;
  1294.                 var s = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(g).slice(1),
  1295.                     g = s[0],
  1296.                     s = s[1];
  1297.                 !g && !s ? g = "." : (s && (s = s.substr(0, s.length - 1)), g += s);
  1298.                 g = x(g, f);
  1299.                 f = V(g, {
  1300.                     ta: b.ta
  1301.                 }).e;
  1302.                 40 < h++ && e(new T(S.ea))
  1303.             }
  1304.     }
  1305.     return {
  1306.         path: g,
  1307.         e: f
  1308.     }
  1309. }
  1310.  
  1311. function X(a) {
  1312.     for (var b;;) {
  1313.         if (a === a.parent) return a = a.G.yb, !b ? a : "/" !== a[a.length - 1] ? a + "/" + b : a + b;
  1314.         b = b ? a.name + "/" + b : a.name;
  1315.         a = a.parent
  1316.     }
  1317. }
  1318.  
  1319. function eb(a, b) {
  1320.     for (var c = 0, d = 0; d < b.length; d++) c = (c << 5) - c + b.charCodeAt(d) | 0;
  1321.     return (a + c >>> 0) % fb.length
  1322. }
  1323.  
  1324. function hb(a, b) {
  1325.     var c = qb(a, "x");
  1326.     c && e(new T(c));
  1327.     for (c = fb[eb(a.id, b)]; c; c = c.Ab) {
  1328.         var d = c.name;
  1329.         if (c.parent.id === a.id && d === b) return c
  1330.     }
  1331.     return a.g.ra(a, b)
  1332. }
  1333. var rb = {
  1334.     r: 0,
  1335.     rs: 1052672,
  1336.     "r+": 2,
  1337.     w: 577,
  1338.     wx: 705,
  1339.     xw: 705,
  1340.     "w+": 578,
  1341.     "wx+": 706,
  1342.     "xw+": 706,
  1343.     a: 1089,
  1344.     ax: 1217,
  1345.     xa: 1217,
  1346.     "a+": 1090,
  1347.     "ax+": 1218,
  1348.     "xa+": 1218
  1349. };
  1350.  
  1351. function qb(a, b) {
  1352.     return nb ? 0 : -1 !== b.indexOf("r") && !(a.mode & 292) || -1 !== b.indexOf("w") && !(a.mode & 146) || -1 !== b.indexOf("x") && !(a.mode & 73) ? S.ab : 0
  1353. }
  1354.  
  1355. function sb(a, b) {
  1356.     try {
  1357.         return hb(a, b), S.Ba
  1358.     } catch (c) {}
  1359.     return qb(a, "wx")
  1360. }
  1361. var bb = {
  1362.     open: function(a) {
  1363.         a.k = $a[a.e.$].k;
  1364.         a.k.open && a.k.open(a)
  1365.     },
  1366.     F: function() {
  1367.         e(new T(S.fa))
  1368.     }
  1369. };
  1370.  
  1371. function tb(a, b, c) {
  1372.     var d = V(a, {
  1373.             parent: j
  1374.         }).e,
  1375.         a = ub(a),
  1376.         f = sb(d, a);
  1377.     f && e(new T(f));
  1378.     d.g.X || e(new T(S.O));
  1379.     return d.g.X(d, a, b, c)
  1380. }
  1381.  
  1382. function vb(a, b) {
  1383.     b = (b !== i ? b : 438) & 4095;
  1384.     b |= 32768;
  1385.     return tb(a, b, 0)
  1386. }
  1387.  
  1388. function wb(a, b) {
  1389.     b = (b !== i ? b : 511) & 1023;
  1390.     b |= 16384;
  1391.     return tb(a, b, 0)
  1392. }
  1393.  
  1394. function xb(a, b, c) {
  1395.     "undefined" === typeof c && (c = b, b = 438);
  1396.     return tb(a, b | 8192, c)
  1397. }
  1398.  
  1399. function yb(a, b) {
  1400.     var c = V(b, {
  1401.             parent: j
  1402.         }).e,
  1403.         d = ub(b),
  1404.         f = sb(c, d);
  1405.     f && e(new T(f));
  1406.     c.g.ba || e(new T(S.O));
  1407.     return c.g.ba(c, d, a)
  1408. }
  1409.  
  1410. function zb(a, b) {
  1411.     var c;
  1412.     c = "string" === typeof a ? V(a, {
  1413.         ma: j
  1414.     }).e : a;
  1415.     c.g.o || e(new T(S.O));
  1416.     c.g.o(c, {
  1417.         mode: b & 4095 | c.mode & -4096,
  1418.         timestamp: Date.now()
  1419.     })
  1420. }
  1421.  
  1422. function Ab(a, b) {
  1423.     var c, d;
  1424.     "string" === typeof b ? (d = rb[b], "undefined" === typeof d && e(Error("Unknown file open mode: " + b))) : d = b;
  1425.     b = d;
  1426.     c = b & 64 ? ("undefined" === typeof c ? 438 : c) & 4095 | 32768 : 0;
  1427.     var f;
  1428.     if ("object" === typeof a) f = a;
  1429.     else {
  1430.         a = W(a);
  1431.         try {
  1432.             f = V(a, {
  1433.                 ma: !(b & 131072)
  1434.             }).e
  1435.         } catch (g) {}
  1436.     }
  1437.     b & 64 && (f ? b & 128 && e(new T(S.Ba)) : f = tb(a, c, 0));
  1438.     f || e(new T(S.T));
  1439.     8192 === (f.mode & 61440) && (b &= -513);
  1440.     f ? 40960 === (f.mode & 61440) ? c = S.ea : 16384 === (f.mode & 61440) && (0 !== (b & 2097155) || b & 512) ? c = S.da : (c = ["r", "w", "rw"][b & 2097155], b & 512 && (c += "w"), c = qb(f, c)) :
  1441.         c = S.T;
  1442.     c && e(new T(c));
  1443.     b & 512 && (c = f, c = "string" === typeof c ? V(c, {
  1444.         ma: j
  1445.     }).e : c, c.g.o || e(new T(S.O)), 16384 === (c.mode & 61440) && e(new T(S.da)), 32768 !== (c.mode & 61440) && e(new T(S.L)), (d = qb(c, "w")) && e(new T(d)), c.g.o(c, {
  1446.         size: 0,
  1447.         timestamp: Date.now()
  1448.     }));
  1449.     var b = b & -641,
  1450.         h;
  1451.     f = {
  1452.         e: f,
  1453.         path: X(f),
  1454.         P: b,
  1455.         seekable: j,
  1456.         position: 0,
  1457.         k: f.k,
  1458.         Eb: [],
  1459.         error: m
  1460.     };
  1461.     Bb || (Bb = n(), Bb.prototype = {}, Object.defineProperties(Bb.prototype, {
  1462.         object: {
  1463.             get: function() {
  1464.                 return this.e
  1465.             },
  1466.             set: function(a) {
  1467.                 this.e = a
  1468.             }
  1469.         },
  1470.         fe: {
  1471.             get: function() {
  1472.                 return 1 !== (this.P & 2097155)
  1473.             }
  1474.         },
  1475.         ge: {
  1476.             get: function() {
  1477.                 return 0 !==
  1478.                     (this.P & 2097155)
  1479.             }
  1480.         },
  1481.         ee: {
  1482.             get: function() {
  1483.                 return this.P & 1024
  1484.             }
  1485.         }
  1486.     }));
  1487.     c = new Bb;
  1488.     for (var x in f) c[x] = f[x];
  1489.     f = c;
  1490.     a: {
  1491.         x = i || 4096;
  1492.         for (c = i || 0; c <= x; c++)
  1493.             if (!mb[c]) {
  1494.                 h = c;
  1495.                 break a
  1496.             }
  1497.         e(new T(S.cb))
  1498.     }
  1499.     f.q = h;
  1500.     h = mb[h] = f;
  1501.     h.k.open && h.k.open(h);
  1502.     p.logReadFiles && !(b & 1) && (Cb || (Cb = {}), a in Cb || (Cb[a] = 1, p.printErr("read file: " + a)));
  1503.     return h
  1504. }
  1505.  
  1506. function Db(a) {
  1507.     try {
  1508.         a.k.close && a.k.close(a)
  1509.     } catch (b) {
  1510.         e(b)
  1511.     } finally {
  1512.         mb[a.q] = l
  1513.     }
  1514. }
  1515.  
  1516. function Eb() {
  1517.     T || (T = function(a) {
  1518.         this.Ud = a;
  1519.         for (var b in S)
  1520.             if (S[b] === a) {
  1521.                 this.code = b;
  1522.                 break
  1523.             }
  1524.         this.message = Va[a]
  1525.     }, T.prototype = Error(), [S.T].forEach(function(a) {
  1526.         gb[a] = new T(a);
  1527.         gb[a].stack = "<generic error, no stack>"
  1528.     }))
  1529. }
  1530. var Fb;
  1531.  
  1532. function Gb(a, b) {
  1533.     var c = 0;
  1534.     a && (c |= 365);
  1535.     b && (c |= 146);
  1536.     return c
  1537. }
  1538.  
  1539. function Hb(a, b, c, d, f, g) {
  1540.     a = b ? W(("string" === typeof a ? a : X(a)) + "/" + b) : a;
  1541.     d = Gb(d, f);
  1542.     f = vb(a, d);
  1543.     if (c) {
  1544.         if ("string" === typeof c) {
  1545.             for (var a = Array(c.length), b = 0, h = c.length; b < h; ++b) a[b] = c.charCodeAt(b);
  1546.             c = a
  1547.         }
  1548.         zb(f, d | 146);
  1549.         var a = Ab(f, "w"),
  1550.             b = c,
  1551.             h = c.length,
  1552.             x = 0;
  1553.         (0 > h || 0 > x) && e(new T(S.L));
  1554.         0 === (a.P & 2097155) && e(new T(S.bb));
  1555.         16384 === (a.e.mode & 61440) && e(new T(S.da));
  1556.         a.k.write || e(new T(S.L));
  1557.         c = j;
  1558.         "undefined" === typeof x ? (x = a.position, c = m) : a.seekable || e(new T(S.fa));
  1559.         a.P & 1024 && ((!a.seekable || !a.k.F) && e(new T(S.fa)), a.k.F(a, 0, 2));
  1560.         g = a.k.write(a, b, 0, h, x, g);
  1561.         c || (a.position += g);
  1562.         Db(a);
  1563.         zb(f, d)
  1564.     }
  1565.     return f
  1566. }
  1567.  
  1568. function Y(a, b, c, d) {
  1569.     a = W(("string" === typeof a ? a : X(a)) + "/" + b);
  1570.     b = Gb(!!c, !!d);
  1571.     Y.Qa || (Y.Qa = 64);
  1572.     var f;
  1573.     f = Y.Qa++ << 8 | 0;
  1574.     $a[f] = {
  1575.         k: {
  1576.             open: function(a) {
  1577.                 a.seekable = m
  1578.             },
  1579.             close: function() {
  1580.                 d && (d.buffer && d.buffer.length) && d(10)
  1581.             },
  1582.             J: function(a, b, d, f) {
  1583.                 for (var u = 0, t = 0; t < f; t++) {
  1584.                     var A;
  1585.                     try {
  1586.                         A = c()
  1587.                     } catch (k) {
  1588.                         e(new T(S.C))
  1589.                     }
  1590.                     A === i && 0 === u && e(new T(S.za));
  1591.                     if (A === l || A === i) break;
  1592.                     u++;
  1593.                     b[d + t] = A
  1594.                 }
  1595.                 u && (a.e.timestamp = Date.now());
  1596.                 return u
  1597.             },
  1598.             write: function(a, b, c, f) {
  1599.                 for (var u = 0; u < f; u++) try {
  1600.                     d(b[c + u])
  1601.                 } catch (t) {
  1602.                     e(new T(S.C))
  1603.                 }
  1604.                 f && (a.e.timestamp = Date.now());
  1605.                 return u
  1606.             }
  1607.         }
  1608.     };
  1609.     return xb(a, b, f)
  1610. }
  1611.  
  1612. function Ib(a) {
  1613.     if (a.tb || a.ub || a.link || a.n) return j;
  1614.     var b = j;
  1615.     "undefined" !== typeof XMLHttpRequest && e(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."));
  1616.     if (p.read) try {
  1617.         a.n = G(p.read(a.url), j)
  1618.     } catch (c) {
  1619.         b = m
  1620.     } else e(Error("Cannot load without read() or XMLHttpRequest."));
  1621.     b || Xa(S.C);
  1622.     return b
  1623. }
  1624. var cb, Bb, Cb;
  1625.  
  1626. function pb(a, b) {
  1627.     for (var c = 0, d = a.length - 1; 0 <= d; d--) {
  1628.         var f = a[d];
  1629.         "." === f ? a.splice(d, 1) : ".." === f ? (a.splice(d, 1), c++) : c && (a.splice(d, 1), c--)
  1630.     }
  1631.     if (b)
  1632.         for (; c--; c) a.unshift("..");
  1633.     return a
  1634. }
  1635.  
  1636. function W(a) {
  1637.     var b = "/" === a.charAt(0),
  1638.         c = "/" === a.substr(-1),
  1639.         a = pb(a.split("/").filter(function(a) {
  1640.             return !!a
  1641.         }), !b).join("/");
  1642.     !a && !b && (a = ".");
  1643.     a && c && (a += "/");
  1644.     return (b ? "/" : "") + a
  1645. }
  1646.  
  1647. function ub(a) {
  1648.     if ("/" === a) return "/";
  1649.     var b = a.lastIndexOf("/");
  1650.     return -1 === b ? a : a.substr(b + 1)
  1651. }
  1652.  
  1653. function ob() {
  1654.     for (var a = "", b = m, c = arguments.length - 1; - 1 <= c && !b; c--) {
  1655.         var d = 0 <= c ? arguments[c] : "/";
  1656.         "string" !== typeof d && e(new TypeError("Arguments to path.resolve must be strings"));
  1657.         d && (a = d + "/" + a, b = "/" === d.charAt(0))
  1658.     }
  1659.     a = pb(a.split("/").filter(function(a) {
  1660.         return !!a
  1661.     }), !b).join("/");
  1662.     return (b ? "/" : "") + a || "."
  1663. }
  1664. var Jb = m,
  1665.     Kb = m,
  1666.     Lb = m,
  1667.     Mb = m,
  1668.     Nb = i,
  1669.     Ob = i;
  1670.  
  1671. function Pb(a) {
  1672.     return {
  1673.         jpg: "image/jpeg",
  1674.         jpeg: "image/jpeg",
  1675.         png: "image/png",
  1676.         bmp: "image/bmp",
  1677.         ogg: "audio/ogg",
  1678.         wav: "audio/wav",
  1679.         mp3: "audio/mpeg"
  1680.     }[a.substr(a.lastIndexOf(".") + 1)]
  1681. }
  1682. var Qb = [];
  1683.  
  1684. function Rb() {
  1685.     var a = p.canvas;
  1686.     Qb.forEach(function(b) {
  1687.         b(a.width, a.height)
  1688.     })
  1689. }
  1690.  
  1691. function Sb(a, b, c) {
  1692.     b && c ? (a.Fb = b, a.sb = c) : (b = a.Fb, c = a.sb);
  1693.     var d = b,
  1694.         f = c;
  1695.     p.forcedAspectRatio && 0 < p.forcedAspectRatio && (d / f < p.forcedAspectRatio ? d = Math.round(f * p.forcedAspectRatio) : f = Math.round(d / p.forcedAspectRatio));
  1696.     if ((document.webkitFullScreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.mozFullscreenElement || document.fullScreenElement || document.fullscreenElement || document.msFullScreenElement || document.msFullscreenElement || document.webkitCurrentFullScreenElement) ===
  1697.         a.parentNode && "undefined" != typeof screen) var g = Math.min(screen.width / d, screen.height / f),
  1698.         d = Math.round(d * g),
  1699.         f = Math.round(f * g);
  1700.     Ob ? (a.width != d && (a.width = d), a.height != f && (a.height = f), "undefined" != typeof a.style && (a.style.removeProperty("width"), a.style.removeProperty("height"))) : (a.width != b && (a.width = b), a.height != c && (a.height = c), "undefined" != typeof a.style && (d != b || f != c ? (a.style.setProperty("width", d + "px", "important"), a.style.setProperty("height", f + "px", "important")) : (a.style.removeProperty("width"), a.style.removeProperty("height"))))
  1701. }
  1702. var Tb, Ub, Vb, Wb;
  1703. p._memset = Xb;
  1704. p._strlen = Yb;
  1705. p._memcpy = Zb;
  1706.  
  1707. function $b() {}
  1708. p._free = $b;
  1709. p.requestFullScreen = function(a, b) {
  1710.     function c() {
  1711.         Kb = m;
  1712.         var a = d.parentNode;
  1713.         (document.webkitFullScreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.mozFullscreenElement || document.fullScreenElement || document.fullscreenElement || document.msFullScreenElement || document.msFullscreenElement || document.webkitCurrentFullScreenElement) === a ? (d.Ha = document.cancelFullScreen || document.mozCancelFullScreen || document.webkitCancelFullScreen || document.msExitFullscreen || document.exitFullscreen ||
  1714.             n(), d.Ha = d.Ha.bind(document), Nb && d.ua(), Kb = j, Ob && ("undefined" != typeof SDL && (a = Ba[SDL.screen + 0 * v.D >> 2], J[SDL.screen + 0 * v.D >> 2] = a | 8388608), Rb())) : (a.parentNode.insertBefore(d, a), a.parentNode.removeChild(a), Ob && ("undefined" != typeof SDL && (a = Ba[SDL.screen + 0 * v.D >> 2], J[SDL.screen + 0 * v.D >> 2] = a & -8388609), Rb()));
  1715.         if (p.onFullScreen) p.onFullScreen(Kb);
  1716.         Sb(d)
  1717.     }
  1718.     Nb = a;
  1719.     Ob = b;
  1720.     "undefined" === typeof Nb && (Nb = j);
  1721.     "undefined" === typeof Ob && (Ob = m);
  1722.     var d = p.canvas;
  1723.     Mb || (Mb = j, document.addEventListener("fullscreenchange", c, m), document.addEventListener("mozfullscreenchange",
  1724.         c, m), document.addEventListener("webkitfullscreenchange", c, m), document.addEventListener("MSFullscreenChange", c, m));
  1725.     var f = document.createElement("div");
  1726.     d.parentNode.insertBefore(f, d);
  1727.     f.appendChild(d);
  1728.     f.Cb = f.requestFullScreen || f.mozRequestFullScreen || f.msRequestFullscreen || (f.webkitRequestFullScreen ? function() {
  1729.         f.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)
  1730.     } : l);
  1731.     f.Cb()
  1732. };
  1733. p.requestAnimationFrame = function(a) {
  1734.     "undefined" === typeof window ? setTimeout(a, 1E3 / 60) : (window.requestAnimationFrame || (window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame || window.setTimeout), window.requestAnimationFrame(a))
  1735. };
  1736. p.setCanvasSize = function(a, b, c) {
  1737.     Sb(p.canvas, a, b);
  1738.     c || Rb()
  1739. };
  1740. p.pauseMainLoop = n();
  1741. p.resumeMainLoop = function() {
  1742.     Jb && (Jb = m, l())
  1743. };
  1744. p.getUserMedia = function() {
  1745.     window.Oa || (window.Oa = navigator.getUserMedia || navigator.mozGetUserMedia);
  1746.     window.Oa(i)
  1747. };
  1748. Eb();
  1749. var fb = Array(4096),
  1750.     ac = U,
  1751.     bc = "/",
  1752.     cc = "/" === bc,
  1753.     dc = !bc,
  1754.     Z;
  1755. cc && lb && e(new T(S.Aa));
  1756. if (!cc && !dc) {
  1757.     var ec = V(bc, {
  1758.             Na: m
  1759.         }),
  1760.         bc = ec.path;
  1761.     Z = ec.e;
  1762.     Z.Y && e(new T(S.Aa));
  1763.     16384 !== (Z.mode & 61440) && e(new T(S.fb))
  1764. }
  1765. var fc = {
  1766.         type: ac,
  1767.         me: {},
  1768.         yb: bc,
  1769.         zb: []
  1770.     },
  1771.     gc = ac.G(fc);
  1772. gc.G = fc;
  1773. fc.root = gc;
  1774. cc ? lb = gc : Z && (Z.Y = fc, Z.G && Z.G.zb.push(fc));
  1775. wb("/tmp");
  1776. wb("/dev");
  1777. $a[259] = {
  1778.     k: {
  1779.         J: function() {
  1780.             return 0
  1781.         },
  1782.         write: function() {
  1783.             return 0
  1784.         }
  1785.     }
  1786. };
  1787. xb("/dev/null", 259);
  1788. Za(1280, {
  1789.     Pa: function(a) {
  1790.         if (!a.input.length) {
  1791.             var b = l;
  1792.             if (ba) {
  1793.                 if (b = process.stdin.read(), !b) {
  1794.                     if (process.stdin._readableState && process.stdin._readableState.ended) return l;
  1795.                     return
  1796.                 }
  1797.             } else "undefined" != typeof window && "function" == typeof window.prompt ? (b = window.prompt("Input: "), b !== l && (b += "\n")) : "function" == typeof readline && (b = readline(), b !== l && (b += "\n"));
  1798.             if (!b) return l;
  1799.             a.input = G(b, j)
  1800.         }
  1801.         return a.input.shift()
  1802.     },
  1803.     Z: function(a, b) {
  1804.         b === l || 10 === b ? (p.print(a.H.join("")), a.H = []) : a.H.push(hc.sa(b))
  1805.     }
  1806. });
  1807. Za(1536, {
  1808.     Z: function(a, b) {
  1809.         b === l || 10 === b ? (p.printErr(a.H.join("")), a.H = []) : a.H.push(hc.sa(b))
  1810.     }
  1811. });
  1812. xb("/dev/tty", 1280);
  1813. xb("/dev/tty1", 1536);
  1814. wb("/dev/shm");
  1815. wb("/dev/shm/tmp");
  1816. Ia.unshift({
  1817.     Q: function() {
  1818.         if (!p.noFSInit && !Fb) {
  1819.             w(!Fb, "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)");
  1820.             Fb = j;
  1821.             Eb();
  1822.             p.stdin = p.stdin;
  1823.             p.stdout = p.stdout;
  1824.             p.stderr = p.stderr;
  1825.             p.stdin ? Y("/dev", "stdin", p.stdin) : yb("/dev/tty", "/dev/stdin");
  1826.             p.stdout ? Y("/dev", "stdout", l, p.stdout) : yb("/dev/tty", "/dev/stdout");
  1827.             p.stderr ? Y("/dev", "stderr", l, p.stderr) : yb("/dev/tty1", "/dev/stderr");
  1828.             var a = Ab("/dev/stdin",
  1829.                 "r");
  1830.             J[ib >> 2] = a ? a.q + 1 : 0;
  1831.             w(0 === a.q, "invalid handle for stdin (" + a.q + ")");
  1832.             a = Ab("/dev/stdout", "w");
  1833.             J[jb >> 2] = a ? a.q + 1 : 0;
  1834.             w(1 === a.q, "invalid handle for stdout (" + a.q + ")");
  1835.             a = Ab("/dev/stderr", "w");
  1836.             J[kb >> 2] = a ? a.q + 1 : 0;
  1837.             w(2 === a.q, "invalid handle for stderr (" + a.q + ")")
  1838.         }
  1839.     }
  1840. });
  1841. Ja.push({
  1842.     Q: function() {
  1843.         nb = m
  1844.     }
  1845. });
  1846. Ka.push({
  1847.     Q: function() {
  1848.         Fb = m;
  1849.         for (var a = 0; a < mb.length; a++) {
  1850.             var b = mb[a];
  1851.             b && Db(b)
  1852.         }
  1853.     }
  1854. });
  1855. p.FS_createFolder = function(a, b, c, d) {
  1856.     a = W(("string" === typeof a ? a : X(a)) + "/" + b);
  1857.     return wb(a, Gb(c, d))
  1858. };
  1859. p.FS_createPath = function(a, b) {
  1860.     for (var a = "string" === typeof a ? a : X(a), c = b.split("/").reverse(); c.length;) {
  1861.         var d = c.pop();
  1862.         if (d) {
  1863.             var f = W(a + "/" + d);
  1864.             try {
  1865.                 wb(f)
  1866.             } catch (g) {}
  1867.             a = f
  1868.         }
  1869.     }
  1870.     return f
  1871. };
  1872. p.FS_createDataFile = Hb;
  1873. p.FS_createPreloadedFile = function(a, b, c, d, f, g, h, x, s) {
  1874.     function u() {
  1875.         Lb = document.pointerLockElement === k || document.mozPointerLockElement === k || document.webkitPointerLockElement === k || document.msPointerLockElement === k
  1876.     }
  1877.  
  1878.     function t(c) {
  1879.         function t(c) {
  1880.             x || Hb(a, b, c, d, f, s);
  1881.             g && g();
  1882.             Ta()
  1883.         }
  1884.         var k = m;
  1885.         p.preloadPlugins.forEach(function(a) {
  1886.             !k && a.canHandle(y) && (a.handle(c, y, t, function() {
  1887.                 h && h();
  1888.                 Ta()
  1889.             }), k = j)
  1890.         });
  1891.         k || t(c)
  1892.     }
  1893.     p.preloadPlugins || (p.preloadPlugins = []);
  1894.     if (!Tb && !da) {
  1895.         Tb = j;
  1896.         try {
  1897.             new Blob, Ub = j
  1898.         } catch (A) {
  1899.             Ub = m, console.log("warning: no blob constructor, cannot create blobs with mimetypes")
  1900.         }
  1901.         Vb =
  1902.             "undefined" != typeof MozBlobBuilder ? MozBlobBuilder : "undefined" != typeof WebKitBlobBuilder ? WebKitBlobBuilder : !Ub ? console.log("warning: no BlobBuilder") : l;
  1903.         Wb = "undefined" != typeof window ? window.URL ? window.URL : window.webkitURL : i;
  1904.         !p.Ta && "undefined" === typeof Wb && (console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."), p.Ta = j);
  1905.         p.preloadPlugins.push({
  1906.             canHandle: function(a) {
  1907.                 return !p.Ta && /\.(jpg|jpeg|png|bmp)$/i.test(a)
  1908.             },
  1909.             handle: function(a, b,
  1910.                 c, d) {
  1911.                 var f = l;
  1912.                 if (Ub) try {
  1913.                     f = new Blob([a], {
  1914.                         type: Pb(b)
  1915.                     }), f.size !== a.length && (f = new Blob([(new Uint8Array(a)).buffer], {
  1916.                         type: Pb(b)
  1917.                     }))
  1918.                 } catch (g) {
  1919.                     v.S("Blob constructor present but fails: " + g + "; falling back to blob builder")
  1920.                 }
  1921.                 f || (f = new Vb, f.append((new Uint8Array(a)).buffer), f = f.getBlob());
  1922.                 var h = Wb.createObjectURL(f),
  1923.                     t = new Image;
  1924.                 t.onload = function() {
  1925.                     w(t.complete, "Image " + b + " could not be decoded");
  1926.                     var d = document.createElement("canvas");
  1927.                     d.width = t.width;
  1928.                     d.height = t.height;
  1929.                     d.getContext("2d").drawImage(t, 0, 0);
  1930.                     p.preloadedImages[b] =
  1931.                         d;
  1932.                     Wb.revokeObjectURL(h);
  1933.                     c && c(a)
  1934.                 };
  1935.                 t.onerror = function() {
  1936.                     console.log("Image " + h + " could not be decoded");
  1937.                     d && d()
  1938.                 };
  1939.                 t.src = h
  1940.             }
  1941.         });
  1942.         p.preloadPlugins.push({
  1943.             canHandle: function(a) {
  1944.                 return !p.le && a.substr(-4) in {
  1945.                     ".ogg": 1,
  1946.                     ".wav": 1,
  1947.                     ".mp3": 1
  1948.                 }
  1949.             },
  1950.             handle: function(a, b, c, d) {
  1951.                 function f(d) {
  1952.                     h || (h = j, p.preloadedAudios[b] = d, c && c(a))
  1953.                 }
  1954.  
  1955.                 function g() {
  1956.                     h || (h = j, p.preloadedAudios[b] = new Audio, d && d())
  1957.                 }
  1958.                 var h = m;
  1959.                 if (Ub) {
  1960.                     try {
  1961.                         var t = new Blob([a], {
  1962.                             type: Pb(b)
  1963.                         })
  1964.                     } catch (k) {
  1965.                         return g()
  1966.                     }
  1967.                     var t = Wb.createObjectURL(t),
  1968.                         s = new Audio;
  1969.                     s.addEventListener("canplaythrough",
  1970.                         function() {
  1971.                             f(s)
  1972.                         }, m);
  1973.                     s.onerror = function() {
  1974.                         if (!h) {
  1975.                             console.log("warning: browser could not fully decode audio " + b + ", trying slower base64 approach");
  1976.                             for (var c = "", d = 0, g = 0, t = 0; t < a.length; t++) {
  1977.                                 d = d << 8 | a[t];
  1978.                                 for (g += 8; 6 <= g;) var k = d >> g - 6 & 63,
  1979.                                     g = g - 6,
  1980.                                     c = c + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [k]
  1981.                             }
  1982.                             2 == g ? (c += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [(d & 3) << 4], c += "==") : 4 == g && (c += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [(d & 15) << 2], c += "=");
  1983.                             s.src = "data:audio/x-" + b.substr(-3) + ";base64," + c;
  1984.                             f(s)
  1985.                         }
  1986.                     };
  1987.                     s.src = t;
  1988.                     setTimeout(function() {
  1989.                         ka || f(s)
  1990.                     }, 1E4)
  1991.                 } else return g()
  1992.             }
  1993.         });
  1994.         var k = p.canvas;
  1995.         k.ua = k.requestPointerLock || k.mozRequestPointerLock || k.webkitRequestPointerLock || k.msRequestPointerLock || n();
  1996.         k.Ka = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock || document.msExitPointerLock || n();
  1997.         k.Ka = k.Ka.bind(document);
  1998.         document.addEventListener("pointerlockchange", u, m);
  1999.         document.addEventListener("mozpointerlockchange", u, m);
  2000.         document.addEventListener("webkitpointerlockchange",
  2001.             u, m);
  2002.         document.addEventListener("mspointerlockchange", u, m);
  2003.         p.elementPointerLock && k.addEventListener("click", function(a) {
  2004.             !Lb && k.ua && (k.ua(), a.preventDefault())
  2005.         }, m)
  2006.     }
  2007.     var y = b ? ob(W(a + "/" + b)) : a;
  2008.     Sa();
  2009.     if ("string" == typeof c) {
  2010.         var E = h,
  2011.             ea = function() {
  2012.                 E ? E() : e('Loading data file "' + c + '" failed.')
  2013.             },
  2014.             K = new XMLHttpRequest;
  2015.         K.open("GET", c, j);
  2016.         K.responseType = "arraybuffer";
  2017.         K.onload = function() {
  2018.             if (200 == K.status || 0 == K.status && K.response) {
  2019.                 var a = K.response;
  2020.                 w(a, 'Loading data file "' + c + '" failed (no arrayBuffer).');
  2021.                 a = new Uint8Array(a);
  2022.                 t(a);
  2023.                 Ta()
  2024.             } else ea()
  2025.         };
  2026.         K.onerror = ea;
  2027.         K.send(l);
  2028.         Sa()
  2029.     } else t(c)
  2030. };
  2031. p.FS_createLazyFile = function(a, b, c, d, f) {
  2032.     var g, h;
  2033.  
  2034.     function x() {
  2035.         this.qa = m;
  2036.         this.U = []
  2037.     }
  2038.     x.prototype.get = function(a) {
  2039.         if (!(a > this.length - 1 || 0 > a)) {
  2040.             var b = a % this.nb;
  2041.             return this.rb(Math.floor(a / this.nb))[b]
  2042.         }
  2043.     };
  2044.     x.prototype.Db = function(a) {
  2045.         this.rb = a
  2046.     };
  2047.     x.prototype.Ga = function() {
  2048.         var a = new XMLHttpRequest;
  2049.         a.open("HEAD", c, m);
  2050.         a.send(l);
  2051.         200 <= a.status && 300 > a.status || 304 === a.status || e(Error("Couldn't load " + c + ". Status: " + a.status));
  2052.         var b = Number(a.getResponseHeader("Content-length")),
  2053.             d, f = 1048576;
  2054.         if (!((d = a.getResponseHeader("Accept-Ranges")) &&
  2055.                 "bytes" === d)) f = b;
  2056.         var g = this;
  2057.         g.Db(function(a) {
  2058.             var d = a * f,
  2059.                 h = (a + 1) * f - 1,
  2060.                 h = Math.min(h, b - 1);
  2061.             if ("undefined" === typeof g.U[a]) {
  2062.                 var t = g.U;
  2063.                 d > h && e(Error("invalid range (" + d + ", " + h + ") or no bytes requested!"));
  2064.                 h > b - 1 && e(Error("only " + b + " bytes available! programmer error!"));
  2065.                 var k = new XMLHttpRequest;
  2066.                 k.open("GET", c, m);
  2067.                 b !== f && k.setRequestHeader("Range", "bytes=" + d + "-" + h);
  2068.                 "undefined" != typeof Uint8Array && (k.responseType = "arraybuffer");
  2069.                 k.overrideMimeType && k.overrideMimeType("text/plain; charset=x-user-defined");
  2070.                 k.send(l);
  2071.                 200 <= k.status && 300 > k.status || 304 === k.status || e(Error("Couldn't load " + c + ". Status: " + k.status));
  2072.                 d = k.response !== i ? new Uint8Array(k.response || []) : G(k.responseText || "", j);
  2073.                 t[a] = d
  2074.             }
  2075.             "undefined" === typeof g.U[a] && e(Error("doXHR failed!"));
  2076.             return g.U[a]
  2077.         });
  2078.         this.kb = b;
  2079.         this.jb = f;
  2080.         this.qa = j
  2081.     };
  2082.     "undefined" !== typeof XMLHttpRequest ? (da || e("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"), g = new x, Object.defineProperty(g, "length", {
  2083.         get: function() {
  2084.             this.qa ||
  2085.                 this.Ga();
  2086.             return this.kb
  2087.         }
  2088.     }), Object.defineProperty(g, "chunkSize", {
  2089.         get: function() {
  2090.             this.qa || this.Ga();
  2091.             return this.jb
  2092.         }
  2093.     }), h = i) : (h = c, g = i);
  2094.     var s, a = W(("string" === typeof a ? a : X(a)) + "/" + b);
  2095.     s = vb(a, Gb(d, f));
  2096.     g ? s.n = g : h && (s.n = l, s.url = h);
  2097.     var u = {};
  2098.     Object.keys(s.k).forEach(function(a) {
  2099.         var b = s.k[a];
  2100.         u[a] = function() {
  2101.             Ib(s) || e(new T(S.C));
  2102.             return b.apply(l, arguments)
  2103.         }
  2104.     });
  2105.     u.J = function(a, b, c, d, f) {
  2106.         Ib(s) || e(new T(S.C));
  2107.         a = a.e.n;
  2108.         if (f >= a.length) return 0;
  2109.         d = Math.min(a.length - f, d);
  2110.         w(0 <= d);
  2111.         if (a.slice)
  2112.             for (var g = 0; g < d; g++) b[c + g] = a[f + g];
  2113.         else
  2114.             for (g = 0; g < d; g++) b[c + g] = a.get(f + g);
  2115.         return d
  2116.     };
  2117.     s.k = u;
  2118.     return s
  2119. };
  2120. p.FS_createLink = function(a, b, c) {
  2121.     a = W(("string" === typeof a ? a : X(a)) + "/" + b);
  2122.     return yb(c, a)
  2123. };
  2124. p.FS_createDevice = Y;
  2125. Wa = v.Ya(4);
  2126. J[Wa >> 2] = 0;
  2127. Ia.unshift({
  2128.     Q: n()
  2129. });
  2130. Ka.push({
  2131.     Q: n()
  2132. });
  2133. var hc = new v.ga;
  2134. ba && (require("fs"), process.platform.match(/^win/));
  2135. Da = r = v.M(B);
  2136. Ea = Da + 5242880;
  2137. Fa = C = v.M(Ea);
  2138. w(Fa < D, "TOTAL_MEMORY not big enough for stack");
  2139. ra = Math.min;
  2140. var $ = (function(global, env, buffer) {
  2141.     // EMSCRIPTEN_START_ASM
  2142.     "use asm";
  2143.     var a = new global.Int8Array(buffer);
  2144.     var b = new global.Int16Array(buffer);
  2145.     var c = new global.Int32Array(buffer);
  2146.     var d = new global.Uint8Array(buffer);
  2147.     var e = new global.Uint16Array(buffer);
  2148.     var f = new global.Uint32Array(buffer);
  2149.     var g = new global.Float32Array(buffer);
  2150.     var h = new global.Float64Array(buffer);
  2151.     var i = env.STACKTOP | 0;
  2152.     var j = env.STACK_MAX | 0;
  2153.     var k = env.tempDoublePtr | 0;
  2154.     var l = env.ABORT | 0;
  2155.     var m = 0;
  2156.     var n = 0;
  2157.     var o = 0;
  2158.     var p = 0;
  2159.     var q = +env.NaN,
  2160.         r = +env.Infinity;
  2161.     var s = 0,
  2162.         t = 0,
  2163.         u = 0,
  2164.         v = 0,
  2165.         w = 0.0,
  2166.         x = 0,
  2167.         y = 0,
  2168.         z = 0,
  2169.         A = 0.0;
  2170.     var B = 0;
  2171.     var C = 0;
  2172.     var D = 0;
  2173.     var E = 0;
  2174.     var F = 0;
  2175.     var G = 0;
  2176.     var H = 0;
  2177.     var I = 0;
  2178.     var J = 0;
  2179.     var K = 0;
  2180.     var L = global.Math.floor;
  2181.     var M = global.Math.abs;
  2182.     var N = global.Math.sqrt;
  2183.     var O = global.Math.pow;
  2184.     var P = global.Math.cos;
  2185.     var Q = global.Math.sin;
  2186.     var R = global.Math.tan;
  2187.     var S = global.Math.acos;
  2188.     var T = global.Math.asin;
  2189.     var U = global.Math.atan;
  2190.     var V = global.Math.atan2;
  2191.     var W = global.Math.exp;
  2192.     var X = global.Math.log;
  2193.     var Y = global.Math.ceil;
  2194.     var Z = global.Math.imul;
  2195.     var _ = env.abort;
  2196.     var $ = env.assert;
  2197.     var aa = env.asmPrintInt;
  2198.     var ba = env.asmPrintFloat;
  2199.     var ca = env.min;
  2200.     var da = env._fflush;
  2201.     var ea = env.___setErrNo;
  2202.     var fa = env._malloc;
  2203.     var ga = env._emscripten_memcpy_big;
  2204.     var ha = env._free;
  2205.     var ia = env._llvm_bswap_i32;
  2206.     var ja = 0.0;
  2207.     // EMSCRIPTEN_START_FUNCS
  2208.     function ka(a) {
  2209.         a = a | 0;
  2210.         var b = 0;
  2211.         b = i;
  2212.         i = i + a | 0;
  2213.         i = i + 7 & -8;
  2214.         return b | 0
  2215.     }
  2216.  
  2217.     function la() {
  2218.         return i | 0
  2219.     }
  2220.  
  2221.     function ma(a) {
  2222.         a = a | 0;
  2223.         i = a
  2224.     }
  2225.  
  2226.     function na(a, b) {
  2227.         a = a | 0;
  2228.         b = b | 0;
  2229.         if ((m | 0) == 0) {
  2230.             m = a;
  2231.             n = b
  2232.         }
  2233.     }
  2234.  
  2235.     function oa(b) {
  2236.         b = b | 0;
  2237.         a[k] = a[b];
  2238.         a[k + 1 | 0] = a[b + 1 | 0];
  2239.         a[k + 2 | 0] = a[b + 2 | 0];
  2240.         a[k + 3 | 0] = a[b + 3 | 0]
  2241.     }
  2242.  
  2243.     function pa(b) {
  2244.         b = b | 0;
  2245.         a[k] = a[b];
  2246.         a[k + 1 | 0] = a[b + 1 | 0];
  2247.         a[k + 2 | 0] = a[b + 2 | 0];
  2248.         a[k + 3 | 0] = a[b + 3 | 0];
  2249.         a[k + 4 | 0] = a[b + 4 | 0];
  2250.         a[k + 5 | 0] = a[b + 5 | 0];
  2251.         a[k + 6 | 0] = a[b + 6 | 0];
  2252.         a[k + 7 | 0] = a[b + 7 | 0]
  2253.     }
  2254.  
  2255.     function qa(a) {
  2256.         a = a | 0;
  2257.         B = a
  2258.     }
  2259.  
  2260.     function ra(a) {
  2261.         a = a | 0;
  2262.         C = a
  2263.     }
  2264.  
  2265.     function sa(a) {
  2266.         a = a | 0;
  2267.         D = a
  2268.     }
  2269.  
  2270.     function ta(a) {
  2271.         a = a | 0;
  2272.         E = a
  2273.     }
  2274.  
  2275.     function ua(a) {
  2276.         a = a | 0;
  2277.         F = a
  2278.     }
  2279.  
  2280.     function va(a) {
  2281.         a = a | 0;
  2282.         G = a
  2283.     }
  2284.  
  2285.     function wa(a) {
  2286.         a = a | 0;
  2287.         H = a
  2288.     }
  2289.  
  2290.     function xa(a) {
  2291.         a = a | 0;
  2292.         I = a
  2293.     }
  2294.  
  2295.     function ya(a) {
  2296.         a = a | 0;
  2297.         J = a
  2298.     }
  2299.  
  2300.     function za(a) {
  2301.         a = a | 0;
  2302.         K = a
  2303.     }
  2304.  
  2305.     function Aa(e, f, g, h) {
  2306.         e = e | 0;
  2307.         f = f | 0;
  2308.         g = g | 0;
  2309.         h = h | 0;
  2310.         var j = 0,
  2311.             k = 0,
  2312.             l = 0,
  2313.             m = 0,
  2314.             n = 0,
  2315.             o = 0,
  2316.             p = 0,
  2317.             q = 0,
  2318.             r = 0,
  2319.             s = 0,
  2320.             t = 0,
  2321.             u = 0,
  2322.             v = 0,
  2323.             w = 0;
  2324.         j = i;
  2325.         i = i + 32 | 0;
  2326.         o = j;
  2327.         l = j + 16 | 0;
  2328.         n = g + h | 0;
  2329.         c[o + 0 >> 2] = 0;
  2330.         c[o + 4 >> 2] = 0;
  2331.         c[o + 8 >> 2] = 0;
  2332.         c[o + 12 >> 2] = 0;
  2333.         m = e + f | 0;
  2334.         r = a[e] | 0;
  2335.         a: do {
  2336.             if (!(r << 24 >> 24 == 0)) {
  2337.                 p = (f | 0) != 0;
  2338.                 f = m;
  2339.                 q = g;
  2340.                 b: while (1) {
  2341.                     if (p & e >>> 0 > m >>> 0) {
  2342.                         break a
  2343.                     }
  2344.                     r = a[8 + (r & 255) | 0] | 0;
  2345.                     b[o >> 1] = r << 24 >> 24;
  2346.                     c: do {
  2347.                         if (!(r << 24 >> 24 < 0)) {
  2348.                             t = r << 24 >> 24;
  2349.                             r = f - e | 0;
  2350.                             d: do {
  2351.                                 if (p) {
  2352.                                     u = 1;
  2353.                                     while (1) {
  2354.                                         if ((u | 0) > (r | 0)) {
  2355.                                             k = 13;
  2356.                                             break d
  2357.                                         }
  2358.                                         w = a[8 + (d[e + u | 0] | 0) | 0] | 0;
  2359.                                         s = w << 24 >> 24;
  2360.                                         if (w << 24 >> 24 < 0) {
  2361.                                             k = 13;
  2362.                                             break d
  2363.                                         }
  2364.                                         t = a[264 + (t << 5) + s | 0] | 0;
  2365.                                         if (t << 24 >> 24 < 0) {
  2366.                                             k = 13;
  2367.                                             break d
  2368.                                         }
  2369.                                         b[o + (u << 1) >> 1] = t << 24 >> 24;
  2370.                                         u = u + 1 | 0;
  2371.                                         if ((u | 0) < 8) {
  2372.                                             t = s
  2373.                                         } else {
  2374.                                             break
  2375.                                         }
  2376.                                     }
  2377.                                 } else {
  2378.                                     u = 1;
  2379.                                     while (1) {
  2380.                                         w = a[8 + (d[e + u | 0] | 0) | 0] | 0;
  2381.                                         r = w << 24 >> 24;
  2382.                                         if (w << 24 >> 24 < 0) {
  2383.                                             k = 13;
  2384.                                             break d
  2385.                                         }
  2386.                                         s = a[264 + (t << 5) + r | 0] | 0;
  2387.                                         if (s << 24 >> 24 < 0) {
  2388.                                             k = 13;
  2389.                                             break d
  2390.                                         }
  2391.                                         b[o + (u << 1) >> 1] = s << 24 >> 24;
  2392.                                         u = u + 1 | 0;
  2393.                                         if ((u | 0) < 8) {
  2394.                                             t = r
  2395.                                         } else {
  2396.                                             break
  2397.                                         }
  2398.                                     }
  2399.                                 }
  2400.                             } while (0);
  2401.                             if ((k | 0) == 13) {
  2402.                                 k = 0;
  2403.                                 if ((u | 0) < 2) {
  2404.                                     k = 27;
  2405.                                     break
  2406.                                 }
  2407.                             }
  2408.                             s = 2;
  2409.                             e: while (1) {
  2410.                                 r = c[1296 + (s * 80 | 0) >> 2] | 0;
  2411.                                 f: do {
  2412.                                     if (!(r >>> 0 > u >>> 0)) {
  2413.                                         t = 0;
  2414.                                         while (1) {
  2415.                                             v = t + 1 | 0;
  2416.                                             if ((b[o + (t << 1) >> 1] | 0) > (b[1288 + (s * 80 | 0) + (t << 1) + 48 >> 1] | 0)) {
  2417.                                                 break f
  2418.                                             }
  2419.                                             if (v >>> 0 < r >>> 0) {
  2420.                                                 t = v
  2421.                                             } else {
  2422.                                                 break e
  2423.                                             }
  2424.                                         }
  2425.                                     }
  2426.                                 } while (0);
  2427.                                 if ((s | 0) > 0) {
  2428.                                     s = s + -1 | 0
  2429.                                 } else {
  2430.                                     k = 27;
  2431.                                     break c
  2432.                                 }
  2433.                             }
  2434.                             if ((s | 0) > -1) {
  2435.                                 u = c[1292 + (s * 80 | 0) >> 2] | 0;
  2436.                                 t = q + u | 0;
  2437.                                 if (t >>> 0 > n >>> 0) {
  2438.                                     k = 21;
  2439.                                     break b
  2440.                                 }
  2441.                                 w = c[1288 + (s * 80 | 0) >> 2] | 0;
  2442.                                 c[l >> 2] = w;
  2443.                                 v = 0;
  2444.                                 do {
  2445.                                     w = w | b[o + (v << 1) >> 1] << c[1288 + (s * 80 | 0) + (v << 2) + 12 >> 2];
  2446.                                     v = v + 1 | 0
  2447.                                 } while (v >>> 0 < r >>> 0);
  2448.                                 c[l >> 2] = ia(w | 0) | 0;
  2449.                                 s = 0;
  2450.                                 do {
  2451.                                     a[q + s | 0] = a[l + s | 0] | 0;
  2452.                                     s = s + 1 | 0
  2453.                                 } while (s >>> 0 < u >>> 0);
  2454.                                 e = e + r | 0;
  2455.                                 q = t
  2456.                             } else {
  2457.                                 k = 27
  2458.                             }
  2459.                         } else {
  2460.                             k = 27
  2461.                         }
  2462.                     } while (0);
  2463.                     if ((k | 0) == 27) {
  2464.                         k = 0;
  2465.                         r = a[e] | 0;
  2466.                         if (!(r << 24 >> 24 < 0)) {
  2467.                             if ((q + 1 | 0) >>> 0 > n >>> 0) {
  2468.                                 k = 32;
  2469.                                 break
  2470.                             }
  2471.                         } else {
  2472.                             if ((q + 2 | 0) >>> 0 > n >>> 0) {
  2473.                                 k = 29;
  2474.                                 break
  2475.                             }
  2476.                             a[q] = 0;
  2477.                             r = a[e] | 0;
  2478.                             q = q + 1 | 0
  2479.                         }
  2480.                         a[q] = r;
  2481.                         e = e + 1 | 0;
  2482.                         q = q + 1 | 0
  2483.                     }
  2484.                     r = a[e] | 0;
  2485.                     if (r << 24 >> 24 == 0) {
  2486.                         break a
  2487.                     }
  2488.                 }
  2489.                 if ((k | 0) == 21) {
  2490.                     w = h + 1 | 0;
  2491.                     i = j;
  2492.                     return w | 0
  2493.                 } else if ((k | 0) == 29) {
  2494.                     w = h + 1 | 0;
  2495.                     i = j;
  2496.                     return w | 0
  2497.                 } else if ((k | 0) == 32) {
  2498.                     w = h + 1 | 0;
  2499.                     i = j;
  2500.                     return w | 0
  2501.                 }
  2502.             } else {
  2503.                 q = g
  2504.             }
  2505.         } while (0);
  2506.         w = q - g | 0;
  2507.         i = j;
  2508.         return w | 0
  2509.     }
  2510.  
  2511.     function Ba(d, e, f, g) {
  2512.         d = d | 0;
  2513.         e = e | 0;
  2514.         f = f | 0;
  2515.         g = g | 0;
  2516.         var h = 0,
  2517.             j = 0,
  2518.             k = 0,
  2519.             l = 0,
  2520.             m = 0,
  2521.             n = 0,
  2522.             o = 0,
  2523.             p = 0,
  2524.             q = 0,
  2525.             r = 0,
  2526.             s = 0,
  2527.             t = 0;
  2528.         k = i;
  2529.         i = i + 16 | 0;
  2530.         l = k;
  2531.         j = f + g | 0;
  2532.         m = d + e | 0;
  2533.         a: do {
  2534.             if ((e | 0) > 0) {
  2535.                 e = f;
  2536.                 while (1) {
  2537.                     s = a[d] | 0;
  2538.                     if (s << 24 >> 24 < 0) {
  2539.                         n = s;
  2540.                         o = -1;
  2541.                         do {
  2542.                             n = (n & 255) << 1 & 255;
  2543.                             o = o + 1 | 0
  2544.                         } while (n << 24 >> 24 < 0);
  2545.                         if ((o | 0) >= 0) {
  2546.                             p = c[1296 + (o * 80 | 0) >> 2] | 0;
  2547.                             n = e + p | 0;
  2548.                             if (n >>> 0 > j >>> 0) {
  2549.                                 h = 11;
  2550.                                 break
  2551.                             }
  2552.                             q = 1292 + (o * 80 | 0) | 0;
  2553.                             r = c[q >> 2] | 0;
  2554.                             t = 0;
  2555.                             while (1) {
  2556.                                 a[l + t | 0] = s;
  2557.                                 t = t + 1 | 0;
  2558.                                 if (!(t >>> 0 < r >>> 0)) {
  2559.                                     break
  2560.                                 }
  2561.                                 s = a[d + t | 0] | 0
  2562.                             }
  2563.                             r = ia(c[l >> 2] | 0) | 0;
  2564.                             c[l >> 2] = r;
  2565.                             r = a[1528 + (b[1336 + (o * 80 | 0) >> 1] & r >>> (c[1300 + (o * 80 | 0) >> 2] | 0)) | 0] | 0;
  2566.                             a[e] = r;
  2567.                             s = 1;
  2568.                             do {
  2569.                                 r = a[((c[l >> 2] | 0) >>> (c[1288 + (o * 80 | 0) + (s << 2) + 12 >> 2] | 0) & b[1288 + (o * 80 | 0) + (s << 1) + 48 >> 1]) + (1560 + ((r & 255) + -39 << 4)) | 0] | 0;
  2570.                                 a[e + s | 0] = r;
  2571.                                 s = s + 1 | 0
  2572.                             } while (s >>> 0 < p >>> 0);
  2573.                             d = d + (c[q >> 2] | 0) | 0;
  2574.                             e = n
  2575.                         } else {
  2576.                             h = 6
  2577.                         }
  2578.                     } else {
  2579.                         h = 6
  2580.                     }
  2581.                     if ((h | 0) == 6) {
  2582.                         h = 0;
  2583.                         if (!(e >>> 0 < j >>> 0)) {
  2584.                             h = 7;
  2585.                             break
  2586.                         }
  2587.                         d = s << 24 >> 24 == 0 ? d + 1 | 0 : d;
  2588.                         a[e] = a[d] | 0;
  2589.                         d = d + 1 | 0;
  2590.                         e = e + 1 | 0
  2591.                     }
  2592.                     if (!(d >>> 0 < m >>> 0)) {
  2593.                         break a
  2594.                     }
  2595.                 }
  2596.                 if ((h | 0) == 7) {
  2597.                     t = g + 1 | 0;
  2598.                     i = k;
  2599.                     return t | 0
  2600.                 } else if ((h | 0) == 11) {
  2601.                     t = g + 1 | 0;
  2602.                     i = k;
  2603.                     return t | 0
  2604.                 }
  2605.             } else {
  2606.                 e = f
  2607.             }
  2608.         } while (0);
  2609.         if (e >>> 0 < j >>> 0) {
  2610.             a[e] = 0
  2611.         }
  2612.         t = e - f | 0;
  2613.         i = k;
  2614.         return t | 0
  2615.     }
  2616.  
  2617.     function Ca() {}
  2618.  
  2619.     function Da(b, d, e) {
  2620.         b = b | 0;
  2621.         d = d | 0;
  2622.         e = e | 0;
  2623.         var f = 0,
  2624.             g = 0,
  2625.             h = 0,
  2626.             i = 0;
  2627.         f = b + e | 0;
  2628.         if ((e | 0) >= 20) {
  2629.             d = d & 255;
  2630.             i = b & 3;
  2631.             h = d | d << 8 | d << 16 | d << 24;
  2632.             g = f & ~3;
  2633.             if (i) {
  2634.                 i = b + 4 - i | 0;
  2635.                 while ((b | 0) < (i | 0)) {
  2636.                     a[b] = d;
  2637.                     b = b + 1 | 0
  2638.                 }
  2639.             }
  2640.             while ((b | 0) < (g | 0)) {
  2641.                 c[b >> 2] = h;
  2642.                 b = b + 4 | 0
  2643.             }
  2644.         }
  2645.         while ((b | 0) < (f | 0)) {
  2646.             a[b] = d;
  2647.             b = b + 1 | 0
  2648.         }
  2649.         return b - e | 0
  2650.     }
  2651.  
  2652.     function Ea(b) {
  2653.         b = b | 0;
  2654.         var c = 0;
  2655.         c = b;
  2656.         while (a[c] | 0) {
  2657.             c = c + 1 | 0
  2658.         }
  2659.         return c - b | 0
  2660.     }
  2661.  
  2662.     function Fa(b, d, e) {
  2663.         b = b | 0;
  2664.         d = d | 0;
  2665.         e = e | 0;
  2666.         var f = 0;
  2667.         if ((e | 0) >= 4096) return ga(b | 0, d | 0, e | 0) | 0;
  2668.         f = b | 0;
  2669.         if ((b & 3) == (d & 3)) {
  2670.             while (b & 3) {
  2671.                 if ((e | 0) == 0) return f | 0;
  2672.                 a[b] = a[d] | 0;
  2673.                 b = b + 1 | 0;
  2674.                 d = d + 1 | 0;
  2675.                 e = e - 1 | 0
  2676.             }
  2677.             while ((e | 0) >= 4) {
  2678.                 c[b >> 2] = c[d >> 2];
  2679.                 b = b + 4 | 0;
  2680.                 d = d + 4 | 0;
  2681.                 e = e - 4 | 0
  2682.             }
  2683.         }
  2684.         while ((e | 0) > 0) {
  2685.             a[b] = a[d] | 0;
  2686.             b = b + 1 | 0;
  2687.             d = d + 1 | 0;
  2688.             e = e - 1 | 0
  2689.         }
  2690.         return f | 0
  2691.     }
  2692.  
  2693.  
  2694.  
  2695.  
  2696.     // EMSCRIPTEN_END_FUNCS
  2697.     return {
  2698.         _shoco_decompress: Ba,
  2699.         _memcpy: Fa,
  2700.         _strlen: Ea,
  2701.         _shoco_compress: Aa,
  2702.         _memset: Da,
  2703.         runPostSets: Ca,
  2704.         stackAlloc: ka,
  2705.         stackSave: la,
  2706.         stackRestore: ma,
  2707.         setThrew: na,
  2708.         setTempRet0: qa,
  2709.         setTempRet1: ra,
  2710.         setTempRet2: sa,
  2711.         setTempRet3: ta,
  2712.         setTempRet4: ua,
  2713.         setTempRet5: va,
  2714.         setTempRet6: wa,
  2715.         setTempRet7: xa,
  2716.         setTempRet8: ya,
  2717.         setTempRet9: za
  2718.     }
  2719.     // EMSCRIPTEN_END_ASM
  2720.  
  2721. })({
  2722.     Math: Math,
  2723.     Int8Array: Int8Array,
  2724.     Int16Array: Int16Array,
  2725.     Int32Array: Int32Array,
  2726.     Uint8Array: Uint8Array,
  2727.     Uint16Array: Uint16Array,
  2728.     Uint32Array: Uint32Array,
  2729.     Float32Array: Float32Array,
  2730.     Float64Array: Float64Array
  2731. }, {
  2732.     abort: z,
  2733.     assert: w,
  2734.     asmPrintInt: function(a, b) {
  2735.         p.print("int " + a + "," + b)
  2736.     },
  2737.     asmPrintFloat: function(a, b) {
  2738.         p.print("float " + a + "," + b)
  2739.     },
  2740.     min: ra,
  2741.     _fflush: n(),
  2742.     ___setErrNo: Xa,
  2743.     _malloc: xa,
  2744.     _emscripten_memcpy_big: function(a, b, c) {
  2745.         N.set(N.subarray(b, b + c), a);
  2746.         return a
  2747.     },
  2748.     _free: $b,
  2749.     _llvm_bswap_i32: function(a) {
  2750.         return (a &
  2751.             255) << 24 | (a >> 8 & 255) << 16 | (a >> 16 & 255) << 8 | a >>> 24
  2752.     },
  2753.     STACKTOP: r,
  2754.     STACK_MAX: Ea,
  2755.     tempDoublePtr: Ua,
  2756.     ABORT: ka,
  2757.     NaN: NaN,
  2758.     Infinity: Infinity
  2759. }, P);
  2760. p._shoco_decompress = $._shoco_decompress;
  2761. var Zb = p._memcpy = $._memcpy,
  2762.     Yb = p._strlen = $._strlen;
  2763. p._shoco_compress = $._shoco_compress;
  2764. var Xb = p._memset = $._memset;
  2765. p.runPostSets = $.runPostSets;
  2766. v.wa = function(a) {
  2767.     return $.stackAlloc(a)
  2768. };
  2769. v.Xa = function() {
  2770.     return $.stackSave()
  2771. };
  2772. v.Wa = function(a) {
  2773.     $.stackRestore(a)
  2774. };
  2775.  
  2776. function ic(a) {
  2777.     this.name = "ExitStatus";
  2778.     this.message = "Program terminated with exit(" + a + ")";
  2779.     this.status = a
  2780. }
  2781. ic.prototype = Error();
  2782. var jc, kc = l,
  2783.     Ra = function lc() {
  2784.         !p.calledRun && mc && nc();
  2785.         p.calledRun || (Ra = lc)
  2786.     };
  2787. p.callMain = p.Rd = function(a) {
  2788.     function b() {
  2789.         for (var a = 0; 3 > a; a++) d.push(0)
  2790.     }
  2791.     w(0 == R, "cannot call main when async dependencies remain! (listen on __ATMAIN__)");
  2792.     w(0 == Ha.length, "cannot call main when preRun functions remain to be called");
  2793.     a = a || [];
  2794.     Ma || (Ma = j, Q(Ia));
  2795.     var c = a.length + 1,
  2796.         d = [M(G("/bin/this.program"), "i8", 0)];
  2797.     b();
  2798.     for (var f = 0; f < c - 1; f += 1) d.push(M(G(a[f]), "i8", 0)), b();
  2799.     d.push(0);
  2800.     d = M(d, "i32", 0);
  2801.     jc = r;
  2802.     try {
  2803.         var g = p._main(c, d, 0);
  2804.         p.noExitRuntime || oc(g)
  2805.     } catch (h) {
  2806.         h instanceof ic || ("SimulateInfiniteLoop" == h ? p.noExitRuntime =
  2807.             j : (h && ("object" === typeof h && h.stack) && p.I("exception thrown: " + [h, h.stack]), e(h)))
  2808.     } finally {}
  2809. };
  2810.  
  2811. function nc(a) {
  2812.     function b() {
  2813.         if (!p.calledRun) {
  2814.             p.calledRun = j;
  2815.             Ma || (Ma = j, Q(Ia));
  2816.             Q(Ja);
  2817.             ca && kc !== l && p.I("pre-main prep time: " + (Date.now() - kc) + " ms");
  2818.             p._main && mc && p.callMain(a);
  2819.             if (p.postRun)
  2820.                 for ("function" == typeof p.postRun && (p.postRun = [p.postRun]); p.postRun.length;) Pa(p.postRun.shift());
  2821.             Q(La)
  2822.         }
  2823.     }
  2824.     a = a || p.arguments;
  2825.     kc === l && (kc = Date.now());
  2826.     if (0 < R) p.I("run() called, but dependencies remain, so not running");
  2827.     else {
  2828.         if (p.preRun)
  2829.             for ("function" == typeof p.preRun && (p.preRun = [p.preRun]); p.preRun.length;) Na(p.preRun.shift());
  2830.         Q(Ha);
  2831.         !(0 < R) && !p.calledRun && (p.setStatus ? (p.setStatus("Running..."), setTimeout(function() {
  2832.             setTimeout(function() {
  2833.                 p.setStatus("")
  2834.             }, 1);
  2835.             ka || b()
  2836.         }, 1)) : b())
  2837.     }
  2838. }
  2839. p.run = p.re = nc;
  2840.  
  2841. function oc(a) {
  2842.     ka = j;
  2843.     r = jc;
  2844.     Q(Ka);
  2845.     e(new ic(a))
  2846. }
  2847. p.exit = p.Vd = oc;
  2848.  
  2849. function z(a) {
  2850.     a && (p.print(a), p.I(a));
  2851.     ka = j;
  2852.     e("abort() at " + za() + "\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.")
  2853. }
  2854. p.abort = p.abort = z;
  2855. if (p.preInit)
  2856.     for ("function" == typeof p.preInit && (p.preInit = [p.preInit]); 0 < p.preInit.length;) p.preInit.pop()();
  2857. var mc = j;
  2858. p.noInitialRun && (mc = m);
  2859. nc();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement