UNPKG

333 kBJavaScriptView Raw
1var libh3 = function (libh3) {
2 libh3 = libh3 || {};
3 var Module = typeof libh3 !== "undefined" ? libh3 : {};
4 var moduleOverrides = {};
5 var key;
6
7 for (key in Module) {
8 if (Module.hasOwnProperty(key)) {
9 moduleOverrides[key] = Module[key];
10 }
11 }
12
13 var arguments_ = [];
14 var thisProgram = "./this.program";
15
16 var ENVIRONMENT_IS_WEB = false;
17 var ENVIRONMENT_IS_WORKER = false;
18 var ENVIRONMENT_IS_NODE = false;
19 var ENVIRONMENT_HAS_NODE = false;
20 var ENVIRONMENT_IS_SHELL = false;
21 ENVIRONMENT_IS_WEB = typeof window === "object";
22 ENVIRONMENT_IS_WORKER = typeof importScripts === "function";
23 ENVIRONMENT_HAS_NODE = typeof process === "object" && typeof process.versions === "object" && typeof process.versions.node === "string";
24 ENVIRONMENT_IS_NODE = ENVIRONMENT_HAS_NODE && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER;
25 ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
26 var scriptDirectory = "";
27
28 function locateFile(path) {
29 if (Module["locateFile"]) {
30 return Module["locateFile"](path, scriptDirectory);
31 }
32
33 return scriptDirectory + path;
34 }
35
36 var read_, readAsync, readBinary;
37
38 if (ENVIRONMENT_IS_NODE) {
39 scriptDirectory = __dirname + "/";
40 var nodeFS;
41 var nodePath;
42
43 read_ = function shell_read(filename, binary) {
44 var ret;
45 ret = tryParseAsDataURI(filename);
46
47 if (!ret) {
48 if (!nodeFS) { nodeFS = require("fs"); }
49 if (!nodePath) { nodePath = require("path"); }
50 filename = nodePath["normalize"](filename);
51 ret = nodeFS["readFileSync"](filename);
52 }
53
54 return binary ? ret : ret.toString();
55 };
56
57 readBinary = function readBinary(filename) {
58 var ret = read_(filename, true);
59
60 if (!ret.buffer) {
61 ret = new Uint8Array(ret);
62 }
63
64 assert(ret.buffer);
65 return ret;
66 };
67
68 if (process["argv"].length > 1) {
69 thisProgram = process["argv"][1].replace(/\\/g, "/");
70 }
71
72 arguments_ = process["argv"].slice(2);
73
74 Module["inspect"] = function () {
75 return "[Emscripten Module object]";
76 };
77 } else if (ENVIRONMENT_IS_SHELL) {
78 if (typeof read != "undefined") {
79 read_ = function shell_read(f) {
80 var data = tryParseAsDataURI(f);
81
82 if (data) {
83 return intArrayToString(data);
84 }
85
86 return read(f);
87 };
88 }
89
90 readBinary = function readBinary(f) {
91 var data;
92 data = tryParseAsDataURI(f);
93
94 if (data) {
95 return data;
96 }
97
98 if (typeof readbuffer === "function") {
99 return new Uint8Array(readbuffer(f));
100 }
101
102 data = read(f, "binary");
103 assert(typeof data === "object");
104 return data;
105 };
106
107 if (typeof scriptArgs != "undefined") {
108 arguments_ = scriptArgs;
109 } else if (typeof arguments != "undefined") {
110 arguments_ = arguments;
111 }
112
113 if (typeof print !== "undefined") {
114 if (typeof console === "undefined") { console = {}; }
115 console.log = print;
116 console.warn = console.error = typeof printErr !== "undefined" ? printErr : print;
117 }
118 } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
119 if (ENVIRONMENT_IS_WORKER) {
120 scriptDirectory = self.location.href;
121 } else if (document.currentScript) {
122 scriptDirectory = document.currentScript.src;
123 }
124
125 if (scriptDirectory.indexOf("blob:") !== 0) {
126 scriptDirectory = scriptDirectory.substr(0, scriptDirectory.lastIndexOf("/") + 1);
127 } else {
128 scriptDirectory = "";
129 }
130
131 read_ = function shell_read(url) {
132 try {
133 var xhr = new XMLHttpRequest();
134 xhr.open("GET", url, false);
135 xhr.send(null);
136 return xhr.responseText;
137 } catch (err) {
138 var data = tryParseAsDataURI(url);
139
140 if (data) {
141 return intArrayToString(data);
142 }
143
144 throw err;
145 }
146 };
147
148 if (ENVIRONMENT_IS_WORKER) {
149 readBinary = function readBinary(url) {
150 try {
151 var xhr = new XMLHttpRequest();
152 xhr.open("GET", url, false);
153 xhr.responseType = "arraybuffer";
154 xhr.send(null);
155 return new Uint8Array(xhr.response);
156 } catch (err) {
157 var data = tryParseAsDataURI(url);
158
159 if (data) {
160 return data;
161 }
162
163 throw err;
164 }
165 };
166 }
167
168 readAsync = function readAsync(url, onload, onerror) {
169 var xhr = new XMLHttpRequest();
170 xhr.open("GET", url, true);
171 xhr.responseType = "arraybuffer";
172
173 xhr.onload = function xhr_onload() {
174 if (xhr.status == 200 || xhr.status == 0 && xhr.response) {
175 onload(xhr.response);
176 return;
177 }
178
179 var data = tryParseAsDataURI(url);
180
181 if (data) {
182 onload(data.buffer);
183 return;
184 }
185
186 onerror();
187 };
188
189 xhr.onerror = onerror;
190 xhr.send(null);
191 };
192 }
193
194 var out = Module["print"] || console.log.bind(console);
195 var err = Module["printErr"] || console.warn.bind(console);
196
197 for (key in moduleOverrides) {
198 if (moduleOverrides.hasOwnProperty(key)) {
199 Module[key] = moduleOverrides[key];
200 }
201 }
202
203 moduleOverrides = null;
204 if (Module["arguments"]) { arguments_ = Module["arguments"]; }
205 if (Module["thisProgram"]) { thisProgram = Module["thisProgram"]; }
206
207 var tempRet0 = 0;
208
209 var setTempRet0 = function (value) {
210 tempRet0 = value;
211 };
212
213 var getTempRet0 = function () {
214 return tempRet0;
215 };
216
217 var GLOBAL_BASE = 8;
218
219 function setValue(ptr, value, type, noSafe) {
220 type = type || "i8";
221 if (type.charAt(type.length - 1) === "*") { type = "i32"; }
222
223 switch (type) {
224 case "i1":
225 HEAP8[ptr >> 0] = value;
226 break;
227
228 case "i8":
229 HEAP8[ptr >> 0] = value;
230 break;
231
232 case "i16":
233 HEAP16[ptr >> 1] = value;
234 break;
235
236 case "i32":
237 HEAP32[ptr >> 2] = value;
238 break;
239
240 case "i64":
241 tempI64 = [value >>> 0, (tempDouble = value, +Math_abs(tempDouble) >= +1 ? tempDouble > +0 ? (Math_min(+Math_floor(tempDouble / +4294967296), +4294967295) | 0) >>> 0 : ~~+Math_ceil((tempDouble - +(~~tempDouble >>> 0)) / +4294967296) >>> 0 : 0)], HEAP32[ptr >> 2] = tempI64[0], HEAP32[ptr + 4 >> 2] = tempI64[1];
242 break;
243
244 case "float":
245 HEAPF32[ptr >> 2] = value;
246 break;
247
248 case "double":
249 HEAPF64[ptr >> 3] = value;
250 break;
251
252 default:
253 abort("invalid type for setValue: " + type);
254 }
255 }
256
257 function getValue(ptr, type, noSafe) {
258 type = type || "i8";
259 if (type.charAt(type.length - 1) === "*") { type = "i32"; }
260
261 switch (type) {
262 case "i1":
263 return HEAP8[ptr >> 0];
264
265 case "i8":
266 return HEAP8[ptr >> 0];
267
268 case "i16":
269 return HEAP16[ptr >> 1];
270
271 case "i32":
272 return HEAP32[ptr >> 2];
273
274 case "i64":
275 return HEAP32[ptr >> 2];
276
277 case "float":
278 return HEAPF32[ptr >> 2];
279
280 case "double":
281 return HEAPF64[ptr >> 3];
282
283 default:
284 abort("invalid type for getValue: " + type);
285 }
286
287 return null;
288 }
289
290 var ABORT = false;
291
292 function assert(condition, text) {
293 if (!condition) {
294 abort("Assertion failed: " + text);
295 }
296 }
297
298 function getCFunc(ident) {
299 var func = Module["_" + ident];
300 assert(func, "Cannot call unknown function " + ident + ", make sure it is exported");
301 return func;
302 }
303
304 function ccall(ident, returnType, argTypes, args, opts) {
305 var toC = {
306 "string": function (str) {
307 var ret = 0;
308
309 if (str !== null && str !== undefined && str !== 0) {
310 var len = (str.length << 2) + 1;
311 ret = stackAlloc(len);
312 stringToUTF8(str, ret, len);
313 }
314
315 return ret;
316 },
317 "array": function (arr) {
318 var ret = stackAlloc(arr.length);
319 writeArrayToMemory(arr, ret);
320 return ret;
321 }
322 };
323
324 function convertReturnValue(ret) {
325 if (returnType === "string") { return UTF8ToString(ret); }
326 if (returnType === "boolean") { return Boolean(ret); }
327 return ret;
328 }
329
330 var func = getCFunc(ident);
331 var cArgs = [];
332 var stack = 0;
333
334 if (args) {
335 for (var i = 0; i < args.length; i++) {
336 var converter = toC[argTypes[i]];
337
338 if (converter) {
339 if (stack === 0) { stack = stackSave(); }
340 cArgs[i] = converter(args[i]);
341 } else {
342 cArgs[i] = args[i];
343 }
344 }
345 }
346
347 var ret = func.apply(null, cArgs);
348 ret = convertReturnValue(ret);
349 if (stack !== 0) { stackRestore(stack); }
350 return ret;
351 }
352
353 function cwrap(ident, returnType, argTypes, opts) {
354 argTypes = argTypes || [];
355 var numericArgs = argTypes.every(function (type) {
356 return type === "number";
357 });
358 var numericRet = returnType !== "string";
359
360 if (numericRet && numericArgs && !opts) {
361 return getCFunc(ident);
362 }
363
364 return function () {
365 return ccall(ident, returnType, argTypes, arguments, opts);
366 };
367 }
368 var UTF8Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf8") : undefined;
369
370 function UTF8ArrayToString(u8Array, idx, maxBytesToRead) {
371 var endIdx = idx + maxBytesToRead;
372 var endPtr = idx;
373
374 while (u8Array[endPtr] && !(endPtr >= endIdx)) { ++endPtr; }
375
376 if (endPtr - idx > 16 && u8Array.subarray && UTF8Decoder) {
377 return UTF8Decoder.decode(u8Array.subarray(idx, endPtr));
378 } else {
379 var str = "";
380
381 while (idx < endPtr) {
382 var u0 = u8Array[idx++];
383
384 if (!(u0 & 128)) {
385 str += String.fromCharCode(u0);
386 continue;
387 }
388
389 var u1 = u8Array[idx++] & 63;
390
391 if ((u0 & 224) == 192) {
392 str += String.fromCharCode((u0 & 31) << 6 | u1);
393 continue;
394 }
395
396 var u2 = u8Array[idx++] & 63;
397
398 if ((u0 & 240) == 224) {
399 u0 = (u0 & 15) << 12 | u1 << 6 | u2;
400 } else {
401 u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | u8Array[idx++] & 63;
402 }
403
404 if (u0 < 65536) {
405 str += String.fromCharCode(u0);
406 } else {
407 var ch = u0 - 65536;
408 str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);
409 }
410 }
411 }
412
413 return str;
414 }
415
416 function UTF8ToString(ptr, maxBytesToRead) {
417 return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : "";
418 }
419
420 function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) {
421 if (!(maxBytesToWrite > 0)) { return 0; }
422 var startIdx = outIdx;
423 var endIdx = outIdx + maxBytesToWrite - 1;
424
425 for (var i = 0; i < str.length; ++i) {
426 var u = str.charCodeAt(i);
427
428 if (u >= 55296 && u <= 57343) {
429 var u1 = str.charCodeAt(++i);
430 u = 65536 + ((u & 1023) << 10) | u1 & 1023;
431 }
432
433 if (u <= 127) {
434 if (outIdx >= endIdx) { break; }
435 outU8Array[outIdx++] = u;
436 } else if (u <= 2047) {
437 if (outIdx + 1 >= endIdx) { break; }
438 outU8Array[outIdx++] = 192 | u >> 6;
439 outU8Array[outIdx++] = 128 | u & 63;
440 } else if (u <= 65535) {
441 if (outIdx + 2 >= endIdx) { break; }
442 outU8Array[outIdx++] = 224 | u >> 12;
443 outU8Array[outIdx++] = 128 | u >> 6 & 63;
444 outU8Array[outIdx++] = 128 | u & 63;
445 } else {
446 if (outIdx + 3 >= endIdx) { break; }
447 outU8Array[outIdx++] = 240 | u >> 18;
448 outU8Array[outIdx++] = 128 | u >> 12 & 63;
449 outU8Array[outIdx++] = 128 | u >> 6 & 63;
450 outU8Array[outIdx++] = 128 | u & 63;
451 }
452 }
453
454 outU8Array[outIdx] = 0;
455 return outIdx - startIdx;
456 }
457
458 function stringToUTF8(str, outPtr, maxBytesToWrite) {
459 return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
460 }
461
462 var UTF16Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-16le") : undefined;
463
464 function writeArrayToMemory(array, buffer) {
465 HEAP8.set(array, buffer);
466 }
467
468 function alignUp(x, multiple) {
469 if (x % multiple > 0) {
470 x += multiple - x % multiple;
471 }
472
473 return x;
474 }
475
476 var buffer, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;
477
478 function updateGlobalBufferAndViews(buf) {
479 buffer = buf;
480 Module["HEAP8"] = HEAP8 = new Int8Array(buf);
481 Module["HEAP16"] = HEAP16 = new Int16Array(buf);
482 Module["HEAP32"] = HEAP32 = new Int32Array(buf);
483 Module["HEAPU8"] = HEAPU8 = new Uint8Array(buf);
484 Module["HEAPU16"] = HEAPU16 = new Uint16Array(buf);
485 Module["HEAPU32"] = HEAPU32 = new Uint32Array(buf);
486 Module["HEAPF32"] = HEAPF32 = new Float32Array(buf);
487 Module["HEAPF64"] = HEAPF64 = new Float64Array(buf);
488 }
489
490 var DYNAMIC_BASE = 5266576,
491 DYNAMICTOP_PTR = 23664;
492 var INITIAL_TOTAL_MEMORY = Module["TOTAL_MEMORY"] || 33554432;
493
494 if (Module["buffer"]) {
495 buffer = Module["buffer"];
496 } else {
497 buffer = new ArrayBuffer(INITIAL_TOTAL_MEMORY);
498 }
499
500 INITIAL_TOTAL_MEMORY = buffer.byteLength;
501 updateGlobalBufferAndViews(buffer);
502 HEAP32[DYNAMICTOP_PTR >> 2] = DYNAMIC_BASE;
503
504 function callRuntimeCallbacks(callbacks) {
505 while (callbacks.length > 0) {
506 var callback = callbacks.shift();
507
508 if (typeof callback == "function") {
509 callback();
510 continue;
511 }
512
513 var func = callback.func;
514
515 if (typeof func === "number") {
516 if (callback.arg === undefined) {
517 Module["dynCall_v"](func);
518 } else {
519 Module["dynCall_vi"](func, callback.arg);
520 }
521 } else {
522 func(callback.arg === undefined ? null : callback.arg);
523 }
524 }
525 }
526
527 var __ATPRERUN__ = [];
528 var __ATINIT__ = [];
529 var __ATMAIN__ = [];
530 var __ATPOSTRUN__ = [];
531
532 function preRun() {
533 if (Module["preRun"]) {
534 if (typeof Module["preRun"] == "function") { Module["preRun"] = [Module["preRun"]]; }
535
536 while (Module["preRun"].length) {
537 addOnPreRun(Module["preRun"].shift());
538 }
539 }
540
541 callRuntimeCallbacks(__ATPRERUN__);
542 }
543
544 function initRuntime() {
545 callRuntimeCallbacks(__ATINIT__);
546 }
547
548 function preMain() {
549 callRuntimeCallbacks(__ATMAIN__);
550 }
551
552 function postRun() {
553 if (Module["postRun"]) {
554 if (typeof Module["postRun"] == "function") { Module["postRun"] = [Module["postRun"]]; }
555
556 while (Module["postRun"].length) {
557 addOnPostRun(Module["postRun"].shift());
558 }
559 }
560
561 callRuntimeCallbacks(__ATPOSTRUN__);
562 }
563
564 function addOnPreRun(cb) {
565 __ATPRERUN__.unshift(cb);
566 }
567
568 function addOnPostRun(cb) {
569 __ATPOSTRUN__.unshift(cb);
570 }
571
572 var Math_abs = Math.abs;
573 var Math_ceil = Math.ceil;
574 var Math_floor = Math.floor;
575 var Math_min = Math.min;
576 var runDependencies = 0;
577 var runDependencyWatcher = null;
578 var dependenciesFulfilled = null;
579
580 function addRunDependency(id) {
581 runDependencies++;
582
583 if (Module["monitorRunDependencies"]) {
584 Module["monitorRunDependencies"](runDependencies);
585 }
586 }
587
588 function removeRunDependency(id) {
589 runDependencies--;
590
591 if (Module["monitorRunDependencies"]) {
592 Module["monitorRunDependencies"](runDependencies);
593 }
594
595 if (runDependencies == 0) {
596 if (runDependencyWatcher !== null) {
597 clearInterval(runDependencyWatcher);
598 runDependencyWatcher = null;
599 }
600
601 if (dependenciesFulfilled) {
602 var callback = dependenciesFulfilled;
603 dependenciesFulfilled = null;
604 callback();
605 }
606 }
607 }
608
609 Module["preloadedImages"] = {};
610 Module["preloadedAudios"] = {};
611 var memoryInitializer = null;
612 var dataURIPrefix = "data:application/octet-stream;base64,";
613
614 function isDataURI(filename) {
615 return String.prototype.startsWith ? filename.startsWith(dataURIPrefix) : filename.indexOf(dataURIPrefix) === 0;
616 }
617
618 var tempDouble;
619 var tempI64;
620 memoryInitializer = "data:application/octet-stream;base64,AAAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAABAAAAAMAAAAGAAAABQAAAAIAAAAAAAAAAgAAAAMAAAABAAAABAAAAAYAAAAAAAAABQAAAAMAAAAGAAAABAA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HaADGvzUYObdf1+k/74auECWhw7+cjSACjzniv8CZ+wUhN9I/1uGEKzup6z+/GYr/04bavwmkNHp7xee/F2NMZVAA1z+82s+x2BLivwr2ytbJ9em/KwEH1sMS1r8yp/2LhTfev81i5RexJsy/BlIKPVwR5b95Wyu0/Qjnv5DjoT7YYcs/nBhKZ6zrwr8wRYS7Nebuv3OW6geh+Lu/SLrixebL3j+pcyymN9Xrv8rHIFfWehZAMBwUdlo0DECTUc17EOb2PxpVB1SWChdAzjbhb9pTDUDQhmdvECX5P9FlMKCC9+g/IIAzjELgE0DajDngMv8GQFhWDmDPjNs/y1guLh96EkAxPi8k7DIEQJCc4URlhRhA3eLKKLwkEECqpNAyTBD/P6xpjXcDiwVAFtl//cQm4z+Ibt3XKiYTQM7mCLUb3QdAoM1t8yVv7D8aLZv2Nk8UQEAJPV5nQwxAtSsfTCoE9z9TPjXLXIIWQBVanC5W9AtAYM3d7Adm9j++5mQz1FoWQBUThyaVBghAwH5muQsV7T89Q1qv82MUQJoWGOfNuBdAzrkClkmwDkDQjKq77t37Py+g0dtitsE/ZwAMTwVPEUBojepluNwBQGYbtuW+t9w/HNWIJs6MEkDTNuQUSlgEQKxktPP5TcQ/ixbLB8JjEUCwuWjXMQYCQAS/R09FkRdAowpiZjhhDkB7LmlczD/7P01iQmhhsAVAnrtTwDy84z/Z6jfQ2TgTQChOCXMnWwpAhrW3daoz8z/HYJvVPI4VQLT3ik5FcA5Angi7LOZd+z+NNVzDy5gXQBXdvVTFUA1AYNMgOeYe+T8+qHXGCwkXQKQTOKwa5AJA8gFVoEMW0T+FwzJyttIRQAEAAAD/////BwAAAP////8xAAAA/////1cBAAD/////YQkAAP////+nQQAA/////5HLAQD/////95AMAP/////B9lcAAAAAAAAAAAAAAAAAAgAAAP////8OAAAA/////2IAAAD/////rgIAAP/////CEgAA/////06DAAD/////IpcDAP/////uIRkA/////4LtrwAAAAAAAAAAAAAAAAAAAAAAAgAAAP//////////AQAAAAMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////wIAAAD//////////wEAAAAAAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA/////////////////////wEAAAD///////////////8CAAAA////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD///////////////////////////////8CAAAA////////////////AQAAAP////////////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAAAQAAAP//////////AgAAAP//////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAAEAAAD//////////wIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAgAAAAAAAAACAAAAAQAAAAEAAAACAAAAAgAAAAAAAAAFAAAABQAAAAAAAAACAAAAAgAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAABAAAAAgAAAA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AAAACAAAABQAAAAEAAAAEAAAAAAAAAAAAAAAFAAAAAwAAAAEAAAAGAAAABAAAAAIAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAA/////wAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAP////8AAAAAAAAAAAEAAAABAAAAAAAAAAAAAAD/////AAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAA/////wUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAABAAAAAQAAAA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nMgPj0gMAB3aXRoaW5QZW50YWdvblJvdGF0aW9ucyA+PSAwAGdyYXBoLT5idWNrZXRzICE9IE5VTEwAdmVydGV4R3JhcGguYwBpbml0VmVydGV4R3JhcGgAbm9kZSAhPSBOVUxMAGFkZFZlcnRleE5vZGU=";
621 var tempDoublePtr = 23680;
622
623 function demangle(func) {
624 return func;
625 }
626
627 function demangleAll(text) {
628 var regex = /\b__Z[\w\d_]+/g;
629 return text.replace(regex, function (x) {
630 var y = demangle(x);
631 return x === y ? x : y + " [" + x + "]";
632 });
633 }
634
635 function jsStackTrace() {
636 var err = new Error();
637
638 if (!err.stack) {
639 try {
640 throw new Error(0);
641 } catch (e) {
642 err = e;
643 }
644
645 if (!err.stack) {
646 return "(no stack trace available)";
647 }
648 }
649
650 return err.stack.toString();
651 }
652
653 function stackTrace() {
654 var js = jsStackTrace();
655 if (Module["extraStackTrace"]) { js += "\n" + Module["extraStackTrace"](); }
656 return demangleAll(js);
657 }
658
659 function ___assert_fail(condition, filename, line, func) {
660 abort("Assertion failed: " + UTF8ToString(condition) + ", at: " + [filename ? UTF8ToString(filename) : "unknown filename", line, func ? UTF8ToString(func) : "unknown function"]);
661 }
662
663 function _emscripten_get_heap_size() {
664 return HEAP8.length;
665 }
666
667 function _emscripten_memcpy_big(dest, src, num) {
668 HEAPU8.set(HEAPU8.subarray(src, src + num), dest);
669 }
670
671 function ___setErrNo(value) {
672 if (Module["___errno_location"]) { HEAP32[Module["___errno_location"]() >> 2] = value; }
673 return value;
674 }
675
676 function abortOnCannotGrowMemory(requestedSize) {
677 abort("OOM");
678 }
679
680 function emscripten_realloc_buffer(size) {
681 try {
682 var newBuffer = new ArrayBuffer(size);
683 if (newBuffer.byteLength != size) { return; }
684 new Int8Array(newBuffer).set(HEAP8);
685
686 _emscripten_replace_memory(newBuffer);
687
688 updateGlobalBufferAndViews(newBuffer);
689 return 1;
690 } catch (e) {}
691 }
692
693 function _emscripten_resize_heap(requestedSize) {
694 var oldSize = _emscripten_get_heap_size();
695
696 var PAGE_MULTIPLE = 16777216;
697 var LIMIT = 2147483648 - PAGE_MULTIPLE;
698
699 if (requestedSize > LIMIT) {
700 return false;
701 }
702
703 var MIN_TOTAL_MEMORY = 16777216;
704 var newSize = Math.max(oldSize, MIN_TOTAL_MEMORY);
705
706 while (newSize < requestedSize) {
707 if (newSize <= 536870912) {
708 newSize = alignUp(2 * newSize, PAGE_MULTIPLE);
709 } else {
710 newSize = Math.min(alignUp((3 * newSize + 2147483648) / 4, PAGE_MULTIPLE), LIMIT);
711 }
712 }
713
714 var replacement = emscripten_realloc_buffer(newSize);
715
716 if (!replacement) {
717 return false;
718 }
719
720 return true;
721 }
722
723 function intArrayToString(array) {
724 var ret = [];
725
726 for (var i = 0; i < array.length; i++) {
727 var chr = array[i];
728
729 if (chr > 255) {
730
731 chr &= 255;
732 }
733
734 ret.push(String.fromCharCode(chr));
735 }
736
737 return ret.join("");
738 }
739
740 var decodeBase64 = typeof atob === "function" ? atob : function (input) {
741 var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
742 var output = "";
743 var chr1, chr2, chr3;
744 var enc1, enc2, enc3, enc4;
745 var i = 0;
746 input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
747
748 do {
749 enc1 = keyStr.indexOf(input.charAt(i++));
750 enc2 = keyStr.indexOf(input.charAt(i++));
751 enc3 = keyStr.indexOf(input.charAt(i++));
752 enc4 = keyStr.indexOf(input.charAt(i++));
753 chr1 = enc1 << 2 | enc2 >> 4;
754 chr2 = (enc2 & 15) << 4 | enc3 >> 2;
755 chr3 = (enc3 & 3) << 6 | enc4;
756 output = output + String.fromCharCode(chr1);
757
758 if (enc3 !== 64) {
759 output = output + String.fromCharCode(chr2);
760 }
761
762 if (enc4 !== 64) {
763 output = output + String.fromCharCode(chr3);
764 }
765 } while (i < input.length);
766
767 return output;
768 };
769
770 function intArrayFromBase64(s) {
771 if (typeof ENVIRONMENT_IS_NODE === "boolean" && ENVIRONMENT_IS_NODE) {
772 var buf;
773
774 try {
775 buf = Buffer.from(s, "base64");
776 } catch (_) {
777 buf = new Buffer(s, "base64");
778 }
779
780 return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);
781 }
782
783 try {
784 var decoded = decodeBase64(s);
785 var bytes = new Uint8Array(decoded.length);
786
787 for (var i = 0; i < decoded.length; ++i) {
788 bytes[i] = decoded.charCodeAt(i);
789 }
790
791 return bytes;
792 } catch (_) {
793 throw new Error("Converting base64 string to bytes failed.");
794 }
795 }
796
797 function tryParseAsDataURI(filename) {
798 if (!isDataURI(filename)) {
799 return;
800 }
801
802 return intArrayFromBase64(filename.slice(dataURIPrefix.length));
803 }
804
805 var asmGlobalArg = {
806 "Math": Math,
807 "Int8Array": Int8Array,
808 "Int32Array": Int32Array,
809 "Uint8Array": Uint8Array,
810 "Float32Array": Float32Array,
811 "Float64Array": Float64Array
812 };
813 var asmLibraryArg = {
814 "a": abort,
815 "b": setTempRet0,
816 "c": getTempRet0,
817 "d": ___assert_fail,
818 "e": ___setErrNo,
819 "f": _emscripten_get_heap_size,
820 "g": _emscripten_memcpy_big,
821 "h": _emscripten_resize_heap,
822 "i": abortOnCannotGrowMemory,
823 "j": demangle,
824 "k": demangleAll,
825 "l": emscripten_realloc_buffer,
826 "m": jsStackTrace,
827 "n": stackTrace,
828 "o": tempDoublePtr,
829 "p": DYNAMICTOP_PTR
830 }; // EMSCRIPTEN_START_ASM
831
832 var asm =
833 /** @suppress {uselessCode} */
834 function (global, env, buffer) {
835 "almost asm";
836
837 var a = new global.Int8Array(buffer),
838 b = new global.Int32Array(buffer),
839 c = new global.Uint8Array(buffer),
840 d = new global.Float32Array(buffer),
841 e = new global.Float64Array(buffer),
842 g = env.p | 0,
843 p = global.Math.floor,
844 q = global.Math.abs,
845 r = global.Math.sqrt,
846 s = global.Math.pow,
847 t = global.Math.cos,
848 u = global.Math.sin,
849 v = global.Math.tan,
850 w = global.Math.acos,
851 x = global.Math.asin,
852 y = global.Math.atan,
853 z = global.Math.atan2,
854 A = global.Math.ceil,
855 B = global.Math.imul,
856 C = global.Math.clz32,
857 E = env.b,
858 F = env.c,
859 G = env.d,
860 H = env.e,
861 I = env.f,
862 J = env.g,
863 K = env.h,
864 L = env.i,
865 R = 23696;
866
867 function U(newBuffer) {
868 a = new Int8Array(newBuffer);
869 c = new Uint8Array(newBuffer);
870 b = new Int32Array(newBuffer);
871 d = new Float32Array(newBuffer);
872 e = new Float64Array(newBuffer);
873 buffer = newBuffer;
874 return true;
875 } // EMSCRIPTEN_START_FUNCS
876
877
878 function V(a) {
879 a = a | 0;
880 var b = 0;
881 b = R;
882 R = R + a | 0;
883 R = R + 15 & -16;
884 return b | 0;
885 }
886
887 function W() {
888 return R | 0;
889 }
890
891 function X(a) {
892 a = a | 0;
893 R = a;
894 }
895
896 function Y(a, b) {
897 a = a | 0;
898 b = b | 0;
899 R = a;
900 }
901
902 function Z(a) {
903 a = a | 0;
904 return (B(a * 3 | 0, a + 1 | 0) | 0) + 1 | 0;
905 }
906
907 function _(a, b, c, d) {
908 a = a | 0;
909 b = b | 0;
910 c = c | 0;
911 d = d | 0;
912 var e = 0,
913 f = 0,
914 g = 0;
915 e = (B(c * 3 | 0, c + 1 | 0) | 0) + 1 | 0;
916 f = e << 2;
917 g = Ic(f) | 0;
918
919 if (!(aa(a, b, c, d, g) | 0)) {
920 Jc(g);
921 return;
922 }
923
924 Uc(d | 0, 0, e << 3 | 0) | 0;
925 Uc(g | 0, 0, f | 0) | 0;
926 ba(a, b, c, d, g, e, 0);
927 Jc(g);
928 return;
929 }
930
931 function $(a, b, c, d, e) {
932 a = a | 0;
933 b = b | 0;
934 c = c | 0;
935 d = d | 0;
936 e = e | 0;
937 var f = 0;
938 f = (B(c * 3 | 0, c + 1 | 0) | 0) + 1 | 0;
939 if (!(aa(a, b, c, d, e) | 0)) { return; }
940 Uc(d | 0, 0, f << 3 | 0) | 0;
941 Uc(e | 0, 0, f << 2 | 0) | 0;
942 ba(a, b, c, d, e, f, 0);
943 return;
944 }
945
946 function aa(a, c, d, e, f) {
947 a = a | 0;
948 c = c | 0;
949 d = d | 0;
950 e = e | 0;
951 f = f | 0;
952 var g = 0,
953 h = 0,
954 i = 0,
955 j = 0,
956 k = 0,
957 l = 0,
958 m = 0,
959 n = 0,
960 o = 0;
961 o = R;
962 R = R + 16 | 0;
963 n = o;
964 g = e;
965 b[g >> 2] = a;
966 b[g + 4 >> 2] = c;
967 g = (f | 0) != 0;
968 if (g) { b[f >> 2] = 0; }
969
970 if (tb(a, c) | 0) {
971 n = 1;
972 R = o;
973 return n | 0;
974 }
975
976 b[n >> 2] = 0;
977
978 a: do { if ((d | 0) >= 1) {
979 if (g) {
980 k = 0;
981 l = 1;
982 m = 1;
983 h = 0;
984 g = a;
985
986 while (1) {
987 if (!(h | k)) {
988 g = ca(g, c, 4, n) | 0;
989 c = F() | 0;
990
991 if ((g | 0) == 0 & (c | 0) == 0) {
992 g = 2;
993 break a;
994 }
995
996 if (tb(g, c) | 0) {
997 g = 1;
998 break a;
999 }
1000 }
1001
1002 g = ca(g, c, b[16 + (k << 2) >> 2] | 0, n) | 0;
1003 c = F() | 0;
1004
1005 if ((g | 0) == 0 & (c | 0) == 0) {
1006 g = 2;
1007 break a;
1008 }
1009
1010 a = e + (m << 3) | 0;
1011 b[a >> 2] = g;
1012 b[a + 4 >> 2] = c;
1013 b[f + (m << 2) >> 2] = l;
1014 h = h + 1 | 0;
1015 a = (h | 0) == (l | 0);
1016 i = k + 1 | 0;
1017 j = (i | 0) == 6;
1018
1019 if (tb(g, c) | 0) {
1020 g = 1;
1021 break a;
1022 }
1023
1024 l = l + (j & a & 1) | 0;
1025
1026 if ((l | 0) > (d | 0)) {
1027 g = 0;
1028 break;
1029 } else {
1030 k = a ? j ? 0 : i : k;
1031 m = m + 1 | 0;
1032 h = a ? 0 : h;
1033 }
1034 }
1035 } else {
1036 k = 0;
1037 l = 1;
1038 m = 1;
1039 h = 0;
1040 g = a;
1041
1042 while (1) {
1043 if (!(h | k)) {
1044 g = ca(g, c, 4, n) | 0;
1045 c = F() | 0;
1046
1047 if ((g | 0) == 0 & (c | 0) == 0) {
1048 g = 2;
1049 break a;
1050 }
1051
1052 if (tb(g, c) | 0) {
1053 g = 1;
1054 break a;
1055 }
1056 }
1057
1058 g = ca(g, c, b[16 + (k << 2) >> 2] | 0, n) | 0;
1059 c = F() | 0;
1060
1061 if ((g | 0) == 0 & (c | 0) == 0) {
1062 g = 2;
1063 break a;
1064 }
1065
1066 a = e + (m << 3) | 0;
1067 b[a >> 2] = g;
1068 b[a + 4 >> 2] = c;
1069 h = h + 1 | 0;
1070 a = (h | 0) == (l | 0);
1071 i = k + 1 | 0;
1072 j = (i | 0) == 6;
1073
1074 if (tb(g, c) | 0) {
1075 g = 1;
1076 break a;
1077 }
1078
1079 l = l + (j & a & 1) | 0;
1080
1081 if ((l | 0) > (d | 0)) {
1082 g = 0;
1083 break;
1084 } else {
1085 k = a ? j ? 0 : i : k;
1086 m = m + 1 | 0;
1087 h = a ? 0 : h;
1088 }
1089 }
1090 }
1091 } else { g = 0; } } while (0);
1092
1093 n = g;
1094 R = o;
1095 return n | 0;
1096 }
1097
1098 function ba(a, c, d, e, f, g, h) {
1099 a = a | 0;
1100 c = c | 0;
1101 d = d | 0;
1102 e = e | 0;
1103 f = f | 0;
1104 g = g | 0;
1105 h = h | 0;
1106 var i = 0,
1107 j = 0,
1108 k = 0,
1109 l = 0,
1110 m = 0,
1111 n = 0,
1112 o = 0;
1113 m = R;
1114 R = R + 16 | 0;
1115 l = m;
1116
1117 if ((a | 0) == 0 & (c | 0) == 0) {
1118 R = m;
1119 return;
1120 }
1121
1122 i = Pc(a | 0, c | 0, g | 0, ((g | 0) < 0) << 31 >> 31 | 0) | 0;
1123 F() | 0;
1124 j = e + (i << 3) | 0;
1125 n = j;
1126 o = b[n >> 2] | 0;
1127 n = b[n + 4 >> 2] | 0;
1128 k = (o | 0) == (a | 0) & (n | 0) == (c | 0);
1129 if (!((o | 0) == 0 & (n | 0) == 0 | k)) { do {
1130 i = (i + 1 | 0) % (g | 0) | 0;
1131 j = e + (i << 3) | 0;
1132 o = j;
1133 n = b[o >> 2] | 0;
1134 o = b[o + 4 >> 2] | 0;
1135 k = (n | 0) == (a | 0) & (o | 0) == (c | 0);
1136 } while (!((n | 0) == 0 & (o | 0) == 0 | k)); }
1137 i = f + (i << 2) | 0;
1138
1139 if (k ? (b[i >> 2] | 0) <= (h | 0) : 0) {
1140 R = m;
1141 return;
1142 }
1143
1144 o = j;
1145 b[o >> 2] = a;
1146 b[o + 4 >> 2] = c;
1147 b[i >> 2] = h;
1148
1149 if ((h | 0) >= (d | 0)) {
1150 R = m;
1151 return;
1152 }
1153
1154 o = h + 1 | 0;
1155 b[l >> 2] = 0;
1156 n = ca(a, c, 2, l) | 0;
1157 ba(n, F() | 0, d, e, f, g, o);
1158 b[l >> 2] = 0;
1159 n = ca(a, c, 3, l) | 0;
1160 ba(n, F() | 0, d, e, f, g, o);
1161 b[l >> 2] = 0;
1162 n = ca(a, c, 1, l) | 0;
1163 ba(n, F() | 0, d, e, f, g, o);
1164 b[l >> 2] = 0;
1165 n = ca(a, c, 5, l) | 0;
1166 ba(n, F() | 0, d, e, f, g, o);
1167 b[l >> 2] = 0;
1168 n = ca(a, c, 4, l) | 0;
1169 ba(n, F() | 0, d, e, f, g, o);
1170 b[l >> 2] = 0;
1171 n = ca(a, c, 6, l) | 0;
1172 ba(n, F() | 0, d, e, f, g, o);
1173 R = m;
1174 return;
1175 }
1176
1177 function ca(a, c, d, e) {
1178 a = a | 0;
1179 c = c | 0;
1180 d = d | 0;
1181 e = e | 0;
1182 var f = 0,
1183 g = 0,
1184 h = 0,
1185 i = 0,
1186 j = 0,
1187 k = 0,
1188 l = 0,
1189 m = 0,
1190 n = 0,
1191 o = 0;
1192
1193 if ((b[e >> 2] | 0) > 0) {
1194 f = 0;
1195
1196 do {
1197 d = Ka(d) | 0;
1198 f = f + 1 | 0;
1199 } while ((f | 0) < (b[e >> 2] | 0));
1200 }
1201
1202 i = Qc(a | 0, c | 0, 45) | 0;
1203 F() | 0;
1204 j = i & 127;
1205 g = zb(a, c) | 0;
1206 f = Qc(a | 0, c | 0, 52) | 0;
1207 F() | 0;
1208 f = f & 15;
1209
1210 a: do { if (!f) { h = 6; }else { while (1) {
1211 m = (15 - f | 0) * 3 | 0;
1212 n = Qc(a | 0, c | 0, m | 0) | 0;
1213 F() | 0;
1214 n = n & 7;
1215 o = (Fb(f) | 0) == 0;
1216 f = f + -1 | 0;
1217 l = Rc(7, 0, m | 0) | 0;
1218 c = c & ~(F() | 0);
1219 m = Rc(b[(o ? 464 : 48) + (n * 28 | 0) + (d << 2) >> 2] | 0, 0, m | 0) | 0;
1220 k = F() | 0;
1221 d = b[(o ? 672 : 256) + (n * 28 | 0) + (d << 2) >> 2] | 0;
1222 a = m | a & ~l;
1223 c = k | c;
1224
1225 if (!d) {
1226 d = 0;
1227 break a;
1228 }
1229
1230 if (!f) {
1231 h = 6;
1232 break;
1233 }
1234 } } } while (0);
1235
1236 if ((h | 0) == 6) {
1237 o = b[880 + (j * 28 | 0) + (d << 2) >> 2] | 0;
1238 n = Rc(o | 0, 0, 45) | 0;
1239 a = n | a;
1240 c = F() | 0 | c & -1040385;
1241 d = b[4304 + (j * 28 | 0) + (d << 2) >> 2] | 0;
1242
1243 if ((o & 127 | 0) == 127) {
1244 o = Rc(b[880 + (j * 28 | 0) + 20 >> 2] | 0, 0, 45) | 0;
1245 c = F() | 0 | c & -1040385;
1246 d = b[4304 + (j * 28 | 0) + 20 >> 2] | 0;
1247 a = Bb(o | a, c) | 0;
1248 c = F() | 0;
1249 b[e >> 2] = (b[e >> 2] | 0) + 1;
1250 }
1251 }
1252
1253 h = Qc(a | 0, c | 0, 45) | 0;
1254 F() | 0;
1255 h = h & 127;
1256
1257 b: do { if (!(ia(h) | 0)) {
1258 if ((d | 0) > 0) {
1259 f = 0;
1260
1261 do {
1262 a = Bb(a, c) | 0;
1263 c = F() | 0;
1264 f = f + 1 | 0;
1265 } while ((f | 0) != (d | 0));
1266 }
1267 } else {
1268 c: do { if ((zb(a, c) | 0) == 1) {
1269 if ((j | 0) != (h | 0)) { if (ma(h, b[7728 + (j * 28 | 0) >> 2] | 0) | 0) {
1270 a = Db(a, c) | 0;
1271 g = 1;
1272 c = F() | 0;
1273 break;
1274 } else {
1275 a = Bb(a, c) | 0;
1276 g = 1;
1277 c = F() | 0;
1278 break;
1279 } }
1280
1281 switch (g | 0) {
1282 case 5:
1283 {
1284 a = Db(a, c) | 0;
1285 c = F() | 0;
1286 b[e >> 2] = (b[e >> 2] | 0) + 5;
1287 g = 0;
1288 break c;
1289 }
1290
1291 case 3:
1292 {
1293 a = Bb(a, c) | 0;
1294 c = F() | 0;
1295 b[e >> 2] = (b[e >> 2] | 0) + 1;
1296 g = 0;
1297 break c;
1298 }
1299
1300 default:
1301 {
1302 n = 0;
1303 o = 0;
1304 E(n | 0);
1305 return o | 0;
1306 }
1307 }
1308 } else { g = 0; } } while (0);
1309
1310 if ((d | 0) > 0) {
1311 f = 0;
1312
1313 do {
1314 a = Ab(a, c) | 0;
1315 c = F() | 0;
1316 f = f + 1 | 0;
1317 } while ((f | 0) != (d | 0));
1318 }
1319
1320 if ((j | 0) != (h | 0)) {
1321 if (!(ja(h) | 0)) {
1322 if ((g | 0) != 0 | (zb(a, c) | 0) != 5) { break; }
1323 b[e >> 2] = (b[e >> 2] | 0) + 1;
1324 break;
1325 }
1326
1327 switch (i & 127) {
1328 case 8:
1329 case 118:
1330 break b;
1331
1332 default:
1333
1334 }
1335
1336 if ((zb(a, c) | 0) != 3) { b[e >> 2] = (b[e >> 2] | 0) + 1; }
1337 }
1338 } } while (0);
1339
1340 b[e >> 2] = ((b[e >> 2] | 0) + d | 0) % 6 | 0;
1341 n = c;
1342 o = a;
1343 E(n | 0);
1344 return o | 0;
1345 }
1346
1347 function da(a, c, d, e) {
1348 a = a | 0;
1349 c = c | 0;
1350 d = d | 0;
1351 e = e | 0;
1352 var f = 0,
1353 g = 0,
1354 h = 0,
1355 i = 0,
1356 j = 0,
1357 k = 0,
1358 l = 0,
1359 m = 0;
1360 m = R;
1361 R = R + 16 | 0;
1362 l = m;
1363
1364 if (!d) {
1365 l = e;
1366 b[l >> 2] = a;
1367 b[l + 4 >> 2] = c;
1368 l = 0;
1369 R = m;
1370 return l | 0;
1371 }
1372
1373 b[l >> 2] = 0;
1374
1375 a: do { if (!(tb(a, c) | 0)) {
1376 g = (d | 0) > 0;
1377
1378 if (g) {
1379 f = 0;
1380 k = a;
1381
1382 do {
1383 k = ca(k, c, 4, l) | 0;
1384 c = F() | 0;
1385
1386 if ((k | 0) == 0 & (c | 0) == 0) {
1387 a = 2;
1388 break a;
1389 }
1390
1391 f = f + 1 | 0;
1392
1393 if (tb(k, c) | 0) {
1394 a = 1;
1395 break a;
1396 }
1397 } while ((f | 0) < (d | 0));
1398
1399 j = e;
1400 b[j >> 2] = k;
1401 b[j + 4 >> 2] = c;
1402 j = d + -1 | 0;
1403
1404 if (g) {
1405 g = 0;
1406 h = 1;
1407 f = k;
1408 a = c;
1409
1410 do {
1411 f = ca(f, a, 2, l) | 0;
1412 a = F() | 0;
1413
1414 if ((f | 0) == 0 & (a | 0) == 0) {
1415 a = 2;
1416 break a;
1417 }
1418
1419 i = e + (h << 3) | 0;
1420 b[i >> 2] = f;
1421 b[i + 4 >> 2] = a;
1422 h = h + 1 | 0;
1423
1424 if (tb(f, a) | 0) {
1425 a = 1;
1426 break a;
1427 }
1428
1429 g = g + 1 | 0;
1430 } while ((g | 0) < (d | 0));
1431
1432 i = 0;
1433 g = h;
1434
1435 do {
1436 f = ca(f, a, 3, l) | 0;
1437 a = F() | 0;
1438
1439 if ((f | 0) == 0 & (a | 0) == 0) {
1440 a = 2;
1441 break a;
1442 }
1443
1444 h = e + (g << 3) | 0;
1445 b[h >> 2] = f;
1446 b[h + 4 >> 2] = a;
1447 g = g + 1 | 0;
1448
1449 if (tb(f, a) | 0) {
1450 a = 1;
1451 break a;
1452 }
1453
1454 i = i + 1 | 0;
1455 } while ((i | 0) < (d | 0));
1456
1457 h = 0;
1458
1459 do {
1460 f = ca(f, a, 1, l) | 0;
1461 a = F() | 0;
1462
1463 if ((f | 0) == 0 & (a | 0) == 0) {
1464 a = 2;
1465 break a;
1466 }
1467
1468 i = e + (g << 3) | 0;
1469 b[i >> 2] = f;
1470 b[i + 4 >> 2] = a;
1471 g = g + 1 | 0;
1472
1473 if (tb(f, a) | 0) {
1474 a = 1;
1475 break a;
1476 }
1477
1478 h = h + 1 | 0;
1479 } while ((h | 0) < (d | 0));
1480
1481 h = 0;
1482
1483 do {
1484 f = ca(f, a, 5, l) | 0;
1485 a = F() | 0;
1486
1487 if ((f | 0) == 0 & (a | 0) == 0) {
1488 a = 2;
1489 break a;
1490 }
1491
1492 i = e + (g << 3) | 0;
1493 b[i >> 2] = f;
1494 b[i + 4 >> 2] = a;
1495 g = g + 1 | 0;
1496
1497 if (tb(f, a) | 0) {
1498 a = 1;
1499 break a;
1500 }
1501
1502 h = h + 1 | 0;
1503 } while ((h | 0) < (d | 0));
1504
1505 h = 0;
1506
1507 do {
1508 f = ca(f, a, 4, l) | 0;
1509 a = F() | 0;
1510
1511 if ((f | 0) == 0 & (a | 0) == 0) {
1512 a = 2;
1513 break a;
1514 }
1515
1516 i = e + (g << 3) | 0;
1517 b[i >> 2] = f;
1518 b[i + 4 >> 2] = a;
1519 g = g + 1 | 0;
1520
1521 if (tb(f, a) | 0) {
1522 a = 1;
1523 break a;
1524 }
1525
1526 h = h + 1 | 0;
1527 } while ((h | 0) < (d | 0));
1528
1529 h = 0;
1530
1531 while (1) {
1532 f = ca(f, a, 6, l) | 0;
1533 a = F() | 0;
1534
1535 if ((f | 0) == 0 & (a | 0) == 0) {
1536 a = 2;
1537 break a;
1538 }
1539
1540 if ((h | 0) != (j | 0)) {
1541 i = e + (g << 3) | 0;
1542 b[i >> 2] = f;
1543 b[i + 4 >> 2] = a;
1544 if (!(tb(f, a) | 0)) { g = g + 1 | 0; }else {
1545 a = 1;
1546 break a;
1547 }
1548 }
1549
1550 h = h + 1 | 0;
1551
1552 if ((h | 0) >= (d | 0)) {
1553 h = k;
1554 g = c;
1555 break;
1556 }
1557 }
1558 } else {
1559 h = k;
1560 f = k;
1561 g = c;
1562 a = c;
1563 }
1564 } else {
1565 h = e;
1566 b[h >> 2] = a;
1567 b[h + 4 >> 2] = c;
1568 h = a;
1569 f = a;
1570 g = c;
1571 a = c;
1572 }
1573
1574 a = ((h | 0) != (f | 0) | (g | 0) != (a | 0)) & 1;
1575 } else { a = 1; } } while (0);
1576
1577 l = a;
1578 R = m;
1579 return l | 0;
1580 }
1581
1582 function ea(a, b) {
1583 a = a | 0;
1584 b = b | 0;
1585 var c = 0,
1586 d = 0;
1587 c = R;
1588 R = R + 32 | 0;
1589 d = c;
1590 jc(a, d);
1591 b = ua(d, b) | 0;
1592 b = (B(b * 3 | 0, b + 1 | 0) | 0) + 1 | 0;
1593 R = c;
1594 return b | 0;
1595 }
1596
1597 function fa(a, c, d) {
1598 a = a | 0;
1599 c = c | 0;
1600 d = d | 0;
1601 var f = 0,
1602 g = 0,
1603 h = 0,
1604 i = 0,
1605 j = 0,
1606 k = 0,
1607 l = 0,
1608 m = 0,
1609 n = 0,
1610 o = 0.0;
1611 n = R;
1612 R = R + 32 | 0;
1613 f = n + 16 | 0;
1614 l = n;
1615 m = Ic((b[a + 8 >> 2] << 5) + 32 | 0) | 0;
1616 if (!m) { G(22487, 22096, 678, 22104); }
1617 kc(a, m);
1618 i = ua(m, c) | 0;
1619 j = B(i * 3 | 0, i + 1 | 0) | 0;
1620 k = j + 1 | 0;
1621 sa(m, f);
1622 c = Gb(f, c) | 0;
1623 f = F() | 0;
1624 g = k << 2;
1625 h = Ic(g) | 0;
1626
1627 if (aa(c, f, i, d, h) | 0) {
1628 Uc(d | 0, 0, k << 3 | 0) | 0;
1629 Uc(h | 0, 0, g | 0) | 0;
1630 ba(c, f, i, d, h, k, 0);
1631 }
1632
1633 Jc(h);
1634
1635 if ((j | 0) < 0) {
1636 Jc(m);
1637 R = n;
1638 return;
1639 }
1640
1641 f = l + 8 | 0;
1642 c = 0;
1643
1644 do {
1645 g = d + (c << 3) | 0;
1646 i = g;
1647 h = b[i >> 2] | 0;
1648 i = b[i + 4 >> 2] | 0;
1649
1650 if (!((h | 0) == 0 & (i | 0) == 0) ? (Jb(h, i, l), o = +eb(+e[l >> 3]), e[l >> 3] = o, o = +fb(+e[f >> 3]), e[f >> 3] = o, !(lc(a, m, l) | 0)) : 0) {
1651 j = g;
1652 b[j >> 2] = 0;
1653 b[j + 4 >> 2] = 0;
1654 }
1655
1656 c = c + 1 | 0;
1657 } while ((c | 0) != (k | 0));
1658
1659 Jc(m);
1660 R = n;
1661 return;
1662 }
1663
1664 function ga(a, c, d) {
1665 a = a | 0;
1666 c = c | 0;
1667 d = d | 0;
1668 var e = 0,
1669 f = 0,
1670 g = 0,
1671 h = 0,
1672 i = 0,
1673 j = 0,
1674 k = 0;
1675 k = R;
1676 R = R + 176 | 0;
1677 j = k;
1678
1679 if ((c | 0) < 1) {
1680 yc(d, 0, 0);
1681 R = k;
1682 return;
1683 }
1684
1685 h = a;
1686 h = Qc(b[h >> 2] | 0, b[h + 4 >> 2] | 0, 52) | 0;
1687 F() | 0;
1688 yc(d, (c | 0) > 6 ? c : 6, h & 15);
1689 h = 0;
1690
1691 do {
1692 e = a + (h << 3) | 0;
1693 Kb(b[e >> 2] | 0, b[e + 4 >> 2] | 0, j);
1694 e = b[j >> 2] | 0;
1695
1696 if ((e | 0) > 0) {
1697 i = 0;
1698
1699 do {
1700 g = j + 8 + (i << 4) | 0;
1701 i = i + 1 | 0;
1702 e = j + 8 + (((i | 0) % (e | 0) | 0) << 4) | 0;
1703 f = Dc(d, e, g) | 0;
1704 if (!f) { Cc(d, g, e) | 0; }else { Bc(d, f) | 0; }
1705 e = b[j >> 2] | 0;
1706 } while ((i | 0) < (e | 0));
1707 }
1708
1709 h = h + 1 | 0;
1710 } while ((h | 0) != (c | 0));
1711
1712 R = k;
1713 return;
1714 }
1715
1716 function ha(a, c, d) {
1717 a = a | 0;
1718 c = c | 0;
1719 d = d | 0;
1720 var e = 0,
1721 f = 0,
1722 g = 0,
1723 h = 0;
1724 g = R;
1725 R = R + 32 | 0;
1726 e = g;
1727 f = g + 16 | 0;
1728 ga(a, c, f);
1729 b[d >> 2] = 0;
1730 b[d + 4 >> 2] = 0;
1731 b[d + 8 >> 2] = 0;
1732 a = Ac(f) | 0;
1733
1734 if (!a) {
1735 _b(d) | 0;
1736 zc(f);
1737 R = g;
1738 return;
1739 }
1740
1741 do {
1742 c = Xb(d) | 0;
1743
1744 do {
1745 Yb(c, a) | 0;
1746 h = a + 16 | 0;
1747 b[e >> 2] = b[h >> 2];
1748 b[e + 4 >> 2] = b[h + 4 >> 2];
1749 b[e + 8 >> 2] = b[h + 8 >> 2];
1750 b[e + 12 >> 2] = b[h + 12 >> 2];
1751 Bc(f, a) | 0;
1752 a = Ec(f, e) | 0;
1753 } while ((a | 0) != 0);
1754
1755 a = Ac(f) | 0;
1756 } while ((a | 0) != 0);
1757
1758 _b(d) | 0;
1759 zc(f);
1760 R = g;
1761 return;
1762 }
1763
1764 function ia(a) {
1765 a = a | 0;
1766 return b[7728 + (a * 28 | 0) + 16 >> 2] | 0;
1767 }
1768
1769 function ja(a) {
1770 a = a | 0;
1771 return (a | 0) == 4 | (a | 0) == 117 | 0;
1772 }
1773
1774 function ka(a) {
1775 a = a | 0;
1776 return b[11152 + ((b[a >> 2] | 0) * 216 | 0) + ((b[a + 4 >> 2] | 0) * 72 | 0) + ((b[a + 8 >> 2] | 0) * 24 | 0) + (b[a + 12 >> 2] << 3) >> 2] | 0;
1777 }
1778
1779 function la(a) {
1780 a = a | 0;
1781 return b[11152 + ((b[a >> 2] | 0) * 216 | 0) + ((b[a + 4 >> 2] | 0) * 72 | 0) + ((b[a + 8 >> 2] | 0) * 24 | 0) + (b[a + 12 >> 2] << 3) + 4 >> 2] | 0;
1782 }
1783
1784 function ma(a, c) {
1785 a = a | 0;
1786 c = c | 0;
1787
1788 if ((b[7728 + (a * 28 | 0) + 20 >> 2] | 0) == (c | 0)) {
1789 c = 1;
1790 return c | 0;
1791 }
1792
1793 c = (b[7728 + (a * 28 | 0) + 24 >> 2] | 0) == (c | 0);
1794 return c | 0;
1795 }
1796
1797 function na(a, c) {
1798 a = a | 0;
1799 c = c | 0;
1800 return b[880 + (a * 28 | 0) + (c << 2) >> 2] | 0;
1801 }
1802
1803 function oa(a, c) {
1804 a = a | 0;
1805 c = c | 0;
1806
1807 if ((b[880 + (a * 28 | 0) >> 2] | 0) == (c | 0)) {
1808 c = 0;
1809 return c | 0;
1810 }
1811
1812 if ((b[880 + (a * 28 | 0) + 4 >> 2] | 0) == (c | 0)) {
1813 c = 1;
1814 return c | 0;
1815 }
1816
1817 if ((b[880 + (a * 28 | 0) + 8 >> 2] | 0) == (c | 0)) {
1818 c = 2;
1819 return c | 0;
1820 }
1821
1822 if ((b[880 + (a * 28 | 0) + 12 >> 2] | 0) == (c | 0)) {
1823 c = 3;
1824 return c | 0;
1825 }
1826
1827 if ((b[880 + (a * 28 | 0) + 16 >> 2] | 0) == (c | 0)) {
1828 c = 4;
1829 return c | 0;
1830 }
1831
1832 if ((b[880 + (a * 28 | 0) + 20 >> 2] | 0) == (c | 0)) {
1833 c = 5;
1834 return c | 0;
1835 } else { return ((b[880 + (a * 28 | 0) + 24 >> 2] | 0) == (c | 0) ? 6 : 7) | 0; }
1836
1837 return 0;
1838 }
1839
1840 function pa() {
1841 return 122;
1842 }
1843
1844 function qa(a) {
1845 a = a | 0;
1846 var c = 0,
1847 d = 0,
1848 e = 0;
1849 c = 0;
1850
1851 do {
1852 Rc(c | 0, 0, 45) | 0;
1853 e = F() | 0 | 134225919;
1854 d = a + (c << 3) | 0;
1855 b[d >> 2] = -1;
1856 b[d + 4 >> 2] = e;
1857 c = c + 1 | 0;
1858 } while ((c | 0) != 122);
1859
1860 return;
1861 }
1862
1863 function ra(a) {
1864 a = a | 0;
1865 return +e[a + 16 >> 3] < +e[a + 24 >> 3] | 0;
1866 }
1867
1868 function sa(a, b) {
1869 a = a | 0;
1870 b = b | 0;
1871 var c = 0.0,
1872 d = 0.0;
1873 e[b >> 3] = (+e[a >> 3] + +e[a + 8 >> 3]) * .5;
1874 c = +e[a + 16 >> 3];
1875 d = +e[a + 24 >> 3];
1876 c = +fb((d + (c < d ? c + 6.283185307179586 : c)) * .5);
1877 e[b + 8 >> 3] = c;
1878 return;
1879 }
1880
1881 function ta(a, b) {
1882 a = a | 0;
1883 b = b | 0;
1884 var c = 0.0,
1885 d = 0.0,
1886 f = 0.0;
1887 c = +e[b >> 3];
1888
1889 if (!(c >= +e[a + 8 >> 3])) {
1890 b = 0;
1891 return b | 0;
1892 }
1893
1894 if (!(c <= +e[a >> 3])) {
1895 b = 0;
1896 return b | 0;
1897 }
1898
1899 d = +e[a + 16 >> 3];
1900 c = +e[a + 24 >> 3];
1901 f = +e[b + 8 >> 3];
1902 b = f >= c;
1903 a = f <= d & 1;
1904
1905 if (d < c) {
1906 if (b) { a = 1; }
1907 } else if (!b) { a = 0; }
1908
1909 b = (a | 0) != 0;
1910 return b | 0;
1911 }
1912
1913 function ua(a, b) {
1914 a = a | 0;
1915 b = b | 0;
1916 var c = 0,
1917 d = 0,
1918 f = 0,
1919 g = 0.0,
1920 h = 0,
1921 i = 0,
1922 j = 0,
1923 k = 0.0,
1924 l = 0.0,
1925 m = 0;
1926 c = R;
1927 R = R + 224 | 0;
1928 f = c + 200 | 0;
1929 d = c + 32 | 0;
1930 h = c + 16 | 0;
1931 i = c;
1932 m = a + 8 | 0;
1933 e[h >> 3] = (+e[a >> 3] + +e[m >> 3]) * .5;
1934 j = a + 16 | 0;
1935 g = +e[j >> 3];
1936 l = +e[a + 24 >> 3];
1937 g = +fb((l + (g < l ? g + 6.283185307179586 : g)) * .5);
1938 e[h + 8 >> 3] = g;
1939 g = +e[a >> 3];
1940 l = +q(+g);
1941 k = +e[m >> 3];
1942 a = l > +q(+k);
1943 e[i >> 3] = a ? k : g;
1944 e[i + 8 >> 3] = +e[j >> 3];
1945 g = +gb(h, i);
1946 a = Gb(h, b) | 0;
1947 b = F() | 0;
1948 Jb(a, b, f);
1949 Kb(a, b, d);
1950 b = ~~+A(+(g / (+gb(f, d + 8 | 0) * 1.5)));
1951 R = c;
1952 return b | 0;
1953 }
1954
1955 function va(a, c, d, e) {
1956 a = a | 0;
1957 c = c | 0;
1958 d = d | 0;
1959 e = e | 0;
1960 b[a >> 2] = c;
1961 b[a + 4 >> 2] = d;
1962 b[a + 8 >> 2] = e;
1963 return;
1964 }
1965
1966 function wa(a, c) {
1967 a = a | 0;
1968 c = c | 0;
1969 var d = 0,
1970 f = 0,
1971 g = 0,
1972 h = 0,
1973 i = 0.0,
1974 j = 0.0,
1975 k = 0.0,
1976 l = 0.0,
1977 m = 0,
1978 n = 0,
1979 o = 0.0;
1980 n = c + 8 | 0;
1981 b[n >> 2] = 0;
1982 k = +e[a >> 3];
1983 i = +q(+k);
1984 l = +e[a + 8 >> 3];
1985 j = +q(+l) / .8660254037844386;
1986 i = i + j * .5;
1987 d = ~~i;
1988 a = ~~j;
1989 i = i - +(d | 0);
1990 j = j - +(a | 0);
1991
1992 do { if (i < .5) {
1993 if (i < .3333333333333333) {
1994 b[c >> 2] = d;
1995
1996 if (j < (i + 1.0) * .5) {
1997 b[c + 4 >> 2] = a;
1998 break;
1999 } else {
2000 a = a + 1 | 0;
2001 b[c + 4 >> 2] = a;
2002 break;
2003 }
2004 } else {
2005 o = 1.0 - i;
2006 a = (!(j < o) & 1) + a | 0;
2007 b[c + 4 >> 2] = a;
2008
2009 if (o <= j & j < i * 2.0) {
2010 d = d + 1 | 0;
2011 b[c >> 2] = d;
2012 break;
2013 } else {
2014 b[c >> 2] = d;
2015 break;
2016 }
2017 }
2018 } else {
2019 if (!(i < .6666666666666666)) {
2020 d = d + 1 | 0;
2021 b[c >> 2] = d;
2022
2023 if (j < i * .5) {
2024 b[c + 4 >> 2] = a;
2025 break;
2026 } else {
2027 a = a + 1 | 0;
2028 b[c + 4 >> 2] = a;
2029 break;
2030 }
2031 }
2032
2033 if (j < 1.0 - i) {
2034 b[c + 4 >> 2] = a;
2035
2036 if (i * 2.0 + -1.0 < j) {
2037 b[c >> 2] = d;
2038 break;
2039 }
2040 } else {
2041 a = a + 1 | 0;
2042 b[c + 4 >> 2] = a;
2043 }
2044
2045 d = d + 1 | 0;
2046 b[c >> 2] = d;
2047 } } while (0);
2048
2049 do { if (k < 0.0) { if (!(a & 1)) {
2050 m = (a | 0) / 2 | 0;
2051 m = Mc(d | 0, ((d | 0) < 0) << 31 >> 31 | 0, m | 0, ((m | 0) < 0) << 31 >> 31 | 0) | 0;
2052 d = ~~(+(d | 0) - (+(m >>> 0) + 4294967296.0 * +(F() | 0)) * 2.0);
2053 b[c >> 2] = d;
2054 break;
2055 } else {
2056 m = (a + 1 | 0) / 2 | 0;
2057 m = Mc(d | 0, ((d | 0) < 0) << 31 >> 31 | 0, m | 0, ((m | 0) < 0) << 31 >> 31 | 0) | 0;
2058 d = ~~(+(d | 0) - ((+(m >>> 0) + 4294967296.0 * +(F() | 0)) * 2.0 + 1.0));
2059 b[c >> 2] = d;
2060 break;
2061 } } } while (0);
2062
2063 m = c + 4 | 0;
2064
2065 if (l < 0.0) {
2066 d = d - ((a << 1 | 1 | 0) / 2 | 0) | 0;
2067 b[c >> 2] = d;
2068 a = 0 - a | 0;
2069 b[m >> 2] = a;
2070 }
2071
2072 f = a - d | 0;
2073
2074 if ((d | 0) < 0) {
2075 g = 0 - d | 0;
2076 b[m >> 2] = f;
2077 b[n >> 2] = g;
2078 b[c >> 2] = 0;
2079 a = f;
2080 d = 0;
2081 } else { g = 0; }
2082
2083 if ((a | 0) < 0) {
2084 d = d - a | 0;
2085 b[c >> 2] = d;
2086 g = g - a | 0;
2087 b[n >> 2] = g;
2088 b[m >> 2] = 0;
2089 a = 0;
2090 }
2091
2092 h = d - g | 0;
2093 f = a - g | 0;
2094
2095 if ((g | 0) < 0) {
2096 b[c >> 2] = h;
2097 b[m >> 2] = f;
2098 b[n >> 2] = 0;
2099 a = f;
2100 d = h;
2101 g = 0;
2102 }
2103
2104 f = (a | 0) < (d | 0) ? a : d;
2105 f = (g | 0) < (f | 0) ? g : f;
2106 if ((f | 0) <= 0) { return; }
2107 b[c >> 2] = d - f;
2108 b[m >> 2] = a - f;
2109 b[n >> 2] = g - f;
2110 return;
2111 }
2112
2113 function xa(a) {
2114 a = a | 0;
2115 var c = 0,
2116 d = 0,
2117 e = 0,
2118 f = 0,
2119 g = 0,
2120 h = 0;
2121 c = b[a >> 2] | 0;
2122 h = a + 4 | 0;
2123 d = b[h >> 2] | 0;
2124
2125 if ((c | 0) < 0) {
2126 d = d - c | 0;
2127 b[h >> 2] = d;
2128 g = a + 8 | 0;
2129 b[g >> 2] = (b[g >> 2] | 0) - c;
2130 b[a >> 2] = 0;
2131 c = 0;
2132 }
2133
2134 if ((d | 0) < 0) {
2135 c = c - d | 0;
2136 b[a >> 2] = c;
2137 g = a + 8 | 0;
2138 f = (b[g >> 2] | 0) - d | 0;
2139 b[g >> 2] = f;
2140 b[h >> 2] = 0;
2141 d = 0;
2142 } else {
2143 f = a + 8 | 0;
2144 g = f;
2145 f = b[f >> 2] | 0;
2146 }
2147
2148 if ((f | 0) < 0) {
2149 c = c - f | 0;
2150 b[a >> 2] = c;
2151 d = d - f | 0;
2152 b[h >> 2] = d;
2153 b[g >> 2] = 0;
2154 f = 0;
2155 }
2156
2157 e = (d | 0) < (c | 0) ? d : c;
2158 e = (f | 0) < (e | 0) ? f : e;
2159 if ((e | 0) <= 0) { return; }
2160 b[a >> 2] = c - e;
2161 b[h >> 2] = d - e;
2162 b[g >> 2] = f - e;
2163 return;
2164 }
2165
2166 function ya(a, c) {
2167 a = a | 0;
2168 c = c | 0;
2169 var d = 0.0,
2170 f = 0;
2171 f = b[a + 8 >> 2] | 0;
2172 d = +((b[a + 4 >> 2] | 0) - f | 0);
2173 e[c >> 3] = +((b[a >> 2] | 0) - f | 0) - d * .5;
2174 e[c + 8 >> 3] = d * .8660254037844386;
2175 return;
2176 }
2177
2178 function za(a, c, d) {
2179 a = a | 0;
2180 c = c | 0;
2181 d = d | 0;
2182 b[d >> 2] = (b[c >> 2] | 0) + (b[a >> 2] | 0);
2183 b[d + 4 >> 2] = (b[c + 4 >> 2] | 0) + (b[a + 4 >> 2] | 0);
2184 b[d + 8 >> 2] = (b[c + 8 >> 2] | 0) + (b[a + 8 >> 2] | 0);
2185 return;
2186 }
2187
2188 function Aa(a, c, d) {
2189 a = a | 0;
2190 c = c | 0;
2191 d = d | 0;
2192 b[d >> 2] = (b[a >> 2] | 0) - (b[c >> 2] | 0);
2193 b[d + 4 >> 2] = (b[a + 4 >> 2] | 0) - (b[c + 4 >> 2] | 0);
2194 b[d + 8 >> 2] = (b[a + 8 >> 2] | 0) - (b[c + 8 >> 2] | 0);
2195 return;
2196 }
2197
2198 function Ba(a, c) {
2199 a = a | 0;
2200 c = c | 0;
2201 var d = 0,
2202 e = 0;
2203 d = B(b[a >> 2] | 0, c) | 0;
2204 b[a >> 2] = d;
2205 d = a + 4 | 0;
2206 e = B(b[d >> 2] | 0, c) | 0;
2207 b[d >> 2] = e;
2208 a = a + 8 | 0;
2209 c = B(b[a >> 2] | 0, c) | 0;
2210 b[a >> 2] = c;
2211 return;
2212 }
2213
2214 function Ca(a) {
2215 a = a | 0;
2216 var c = 0,
2217 d = 0,
2218 e = 0,
2219 f = 0,
2220 g = 0,
2221 h = 0,
2222 i = 0;
2223 h = b[a >> 2] | 0;
2224 i = (h | 0) < 0;
2225 e = (b[a + 4 >> 2] | 0) - (i ? h : 0) | 0;
2226 g = (e | 0) < 0;
2227 f = (g ? 0 - e | 0 : 0) + ((b[a + 8 >> 2] | 0) - (i ? h : 0)) | 0;
2228 d = (f | 0) < 0;
2229 a = d ? 0 : f;
2230 c = (g ? 0 : e) - (d ? f : 0) | 0;
2231 f = (i ? 0 : h) - (g ? e : 0) - (d ? f : 0) | 0;
2232 d = (c | 0) < (f | 0) ? c : f;
2233 d = (a | 0) < (d | 0) ? a : d;
2234 e = (d | 0) > 0;
2235 a = a - (e ? d : 0) | 0;
2236 c = c - (e ? d : 0) | 0;
2237
2238 a: do { switch (f - (e ? d : 0) | 0) {
2239 case 0:
2240 switch (c | 0) {
2241 case 0:
2242 {
2243 i = (a | 0) == 0 ? 0 : (a | 0) == 1 ? 1 : 7;
2244 return i | 0;
2245 }
2246
2247 case 1:
2248 {
2249 i = (a | 0) == 0 ? 2 : (a | 0) == 1 ? 3 : 7;
2250 return i | 0;
2251 }
2252
2253 default:
2254 break a;
2255 }
2256
2257 case 1:
2258 switch (c | 0) {
2259 case 0:
2260 {
2261 i = (a | 0) == 0 ? 4 : (a | 0) == 1 ? 5 : 7;
2262 return i | 0;
2263 }
2264
2265 case 1:
2266 {
2267 if (!a) { a = 6; }else { break a; }
2268 return a | 0;
2269 }
2270
2271 default:
2272 break a;
2273 }
2274
2275 default:
2276
2277 } } while (0);
2278
2279 i = 7;
2280 return i | 0;
2281 }
2282
2283 function Da(a) {
2284 a = a | 0;
2285 var c = 0,
2286 d = 0,
2287 e = 0,
2288 f = 0,
2289 g = 0,
2290 h = 0,
2291 i = 0;
2292 h = a + 8 | 0;
2293 d = b[h >> 2] | 0;
2294 c = (b[a >> 2] | 0) - d | 0;
2295 i = a + 4 | 0;
2296 d = (b[i >> 2] | 0) - d | 0;
2297 e = Hc(+((c * 3 | 0) - d | 0) / 7.0) | 0;
2298 b[a >> 2] = e;
2299 c = Hc(+((d << 1) + c | 0) / 7.0) | 0;
2300 b[i >> 2] = c;
2301 b[h >> 2] = 0;
2302 d = c - e | 0;
2303
2304 if ((e | 0) < 0) {
2305 g = 0 - e | 0;
2306 b[i >> 2] = d;
2307 b[h >> 2] = g;
2308 b[a >> 2] = 0;
2309 c = d;
2310 e = 0;
2311 d = g;
2312 } else { d = 0; }
2313
2314 if ((c | 0) < 0) {
2315 e = e - c | 0;
2316 b[a >> 2] = e;
2317 d = d - c | 0;
2318 b[h >> 2] = d;
2319 b[i >> 2] = 0;
2320 c = 0;
2321 }
2322
2323 g = e - d | 0;
2324 f = c - d | 0;
2325
2326 if ((d | 0) < 0) {
2327 b[a >> 2] = g;
2328 b[i >> 2] = f;
2329 b[h >> 2] = 0;
2330 c = f;
2331 f = g;
2332 d = 0;
2333 } else { f = e; }
2334
2335 e = (c | 0) < (f | 0) ? c : f;
2336 e = (d | 0) < (e | 0) ? d : e;
2337 if ((e | 0) <= 0) { return; }
2338 b[a >> 2] = f - e;
2339 b[i >> 2] = c - e;
2340 b[h >> 2] = d - e;
2341 return;
2342 }
2343
2344 function Ea(a) {
2345 a = a | 0;
2346 var c = 0,
2347 d = 0,
2348 e = 0,
2349 f = 0,
2350 g = 0,
2351 h = 0,
2352 i = 0;
2353 h = a + 8 | 0;
2354 d = b[h >> 2] | 0;
2355 c = (b[a >> 2] | 0) - d | 0;
2356 i = a + 4 | 0;
2357 d = (b[i >> 2] | 0) - d | 0;
2358 e = Hc(+((c << 1) + d | 0) / 7.0) | 0;
2359 b[a >> 2] = e;
2360 c = Hc(+((d * 3 | 0) - c | 0) / 7.0) | 0;
2361 b[i >> 2] = c;
2362 b[h >> 2] = 0;
2363 d = c - e | 0;
2364
2365 if ((e | 0) < 0) {
2366 g = 0 - e | 0;
2367 b[i >> 2] = d;
2368 b[h >> 2] = g;
2369 b[a >> 2] = 0;
2370 c = d;
2371 e = 0;
2372 d = g;
2373 } else { d = 0; }
2374
2375 if ((c | 0) < 0) {
2376 e = e - c | 0;
2377 b[a >> 2] = e;
2378 d = d - c | 0;
2379 b[h >> 2] = d;
2380 b[i >> 2] = 0;
2381 c = 0;
2382 }
2383
2384 g = e - d | 0;
2385 f = c - d | 0;
2386
2387 if ((d | 0) < 0) {
2388 b[a >> 2] = g;
2389 b[i >> 2] = f;
2390 b[h >> 2] = 0;
2391 c = f;
2392 f = g;
2393 d = 0;
2394 } else { f = e; }
2395
2396 e = (c | 0) < (f | 0) ? c : f;
2397 e = (d | 0) < (e | 0) ? d : e;
2398 if ((e | 0) <= 0) { return; }
2399 b[a >> 2] = f - e;
2400 b[i >> 2] = c - e;
2401 b[h >> 2] = d - e;
2402 return;
2403 }
2404
2405 function Fa(a) {
2406 a = a | 0;
2407 var c = 0,
2408 d = 0,
2409 e = 0,
2410 f = 0,
2411 g = 0,
2412 h = 0,
2413 i = 0;
2414 c = b[a >> 2] | 0;
2415 h = a + 4 | 0;
2416 d = b[h >> 2] | 0;
2417 i = a + 8 | 0;
2418 e = b[i >> 2] | 0;
2419 f = d + (c * 3 | 0) | 0;
2420 b[a >> 2] = f;
2421 d = e + (d * 3 | 0) | 0;
2422 b[h >> 2] = d;
2423 c = (e * 3 | 0) + c | 0;
2424 b[i >> 2] = c;
2425 e = d - f | 0;
2426
2427 if ((f | 0) < 0) {
2428 c = c - f | 0;
2429 b[h >> 2] = e;
2430 b[i >> 2] = c;
2431 b[a >> 2] = 0;
2432 d = e;
2433 e = 0;
2434 } else { e = f; }
2435
2436 if ((d | 0) < 0) {
2437 e = e - d | 0;
2438 b[a >> 2] = e;
2439 c = c - d | 0;
2440 b[i >> 2] = c;
2441 b[h >> 2] = 0;
2442 d = 0;
2443 }
2444
2445 g = e - c | 0;
2446 f = d - c | 0;
2447
2448 if ((c | 0) < 0) {
2449 b[a >> 2] = g;
2450 b[h >> 2] = f;
2451 b[i >> 2] = 0;
2452 e = g;
2453 c = 0;
2454 } else { f = d; }
2455
2456 d = (f | 0) < (e | 0) ? f : e;
2457 d = (c | 0) < (d | 0) ? c : d;
2458 if ((d | 0) <= 0) { return; }
2459 b[a >> 2] = e - d;
2460 b[h >> 2] = f - d;
2461 b[i >> 2] = c - d;
2462 return;
2463 }
2464
2465 function Ga(a) {
2466 a = a | 0;
2467 var c = 0,
2468 d = 0,
2469 e = 0,
2470 f = 0,
2471 g = 0,
2472 h = 0,
2473 i = 0;
2474 f = b[a >> 2] | 0;
2475 h = a + 4 | 0;
2476 c = b[h >> 2] | 0;
2477 i = a + 8 | 0;
2478 d = b[i >> 2] | 0;
2479 e = (c * 3 | 0) + f | 0;
2480 f = d + (f * 3 | 0) | 0;
2481 b[a >> 2] = f;
2482 b[h >> 2] = e;
2483 c = (d * 3 | 0) + c | 0;
2484 b[i >> 2] = c;
2485 d = e - f | 0;
2486
2487 if ((f | 0) < 0) {
2488 c = c - f | 0;
2489 b[h >> 2] = d;
2490 b[i >> 2] = c;
2491 b[a >> 2] = 0;
2492 f = 0;
2493 } else { d = e; }
2494
2495 if ((d | 0) < 0) {
2496 f = f - d | 0;
2497 b[a >> 2] = f;
2498 c = c - d | 0;
2499 b[i >> 2] = c;
2500 b[h >> 2] = 0;
2501 d = 0;
2502 }
2503
2504 g = f - c | 0;
2505 e = d - c | 0;
2506
2507 if ((c | 0) < 0) {
2508 b[a >> 2] = g;
2509 b[h >> 2] = e;
2510 b[i >> 2] = 0;
2511 f = g;
2512 c = 0;
2513 } else { e = d; }
2514
2515 d = (e | 0) < (f | 0) ? e : f;
2516 d = (c | 0) < (d | 0) ? c : d;
2517 if ((d | 0) <= 0) { return; }
2518 b[a >> 2] = f - d;
2519 b[h >> 2] = e - d;
2520 b[i >> 2] = c - d;
2521 return;
2522 }
2523
2524 function Ha(a, c) {
2525 a = a | 0;
2526 c = c | 0;
2527 var d = 0,
2528 e = 0,
2529 f = 0,
2530 g = 0,
2531 h = 0,
2532 i = 0;
2533 if ((c + -1 | 0) >>> 0 >= 6) { return; }
2534 f = (b[15472 + (c * 12 | 0) >> 2] | 0) + (b[a >> 2] | 0) | 0;
2535 b[a >> 2] = f;
2536 i = a + 4 | 0;
2537 e = (b[15472 + (c * 12 | 0) + 4 >> 2] | 0) + (b[i >> 2] | 0) | 0;
2538 b[i >> 2] = e;
2539 h = a + 8 | 0;
2540 c = (b[15472 + (c * 12 | 0) + 8 >> 2] | 0) + (b[h >> 2] | 0) | 0;
2541 b[h >> 2] = c;
2542 d = e - f | 0;
2543
2544 if ((f | 0) < 0) {
2545 c = c - f | 0;
2546 b[i >> 2] = d;
2547 b[h >> 2] = c;
2548 b[a >> 2] = 0;
2549 e = 0;
2550 } else {
2551 d = e;
2552 e = f;
2553 }
2554
2555 if ((d | 0) < 0) {
2556 e = e - d | 0;
2557 b[a >> 2] = e;
2558 c = c - d | 0;
2559 b[h >> 2] = c;
2560 b[i >> 2] = 0;
2561 d = 0;
2562 }
2563
2564 g = e - c | 0;
2565 f = d - c | 0;
2566
2567 if ((c | 0) < 0) {
2568 b[a >> 2] = g;
2569 b[i >> 2] = f;
2570 b[h >> 2] = 0;
2571 e = g;
2572 c = 0;
2573 } else { f = d; }
2574
2575 d = (f | 0) < (e | 0) ? f : e;
2576 d = (c | 0) < (d | 0) ? c : d;
2577 if ((d | 0) <= 0) { return; }
2578 b[a >> 2] = e - d;
2579 b[i >> 2] = f - d;
2580 b[h >> 2] = c - d;
2581 return;
2582 }
2583
2584 function Ia(a) {
2585 a = a | 0;
2586 var c = 0,
2587 d = 0,
2588 e = 0,
2589 f = 0,
2590 g = 0,
2591 h = 0,
2592 i = 0;
2593 f = b[a >> 2] | 0;
2594 h = a + 4 | 0;
2595 c = b[h >> 2] | 0;
2596 i = a + 8 | 0;
2597 d = b[i >> 2] | 0;
2598 e = c + f | 0;
2599 f = d + f | 0;
2600 b[a >> 2] = f;
2601 b[h >> 2] = e;
2602 c = d + c | 0;
2603 b[i >> 2] = c;
2604 d = e - f | 0;
2605
2606 if ((f | 0) < 0) {
2607 c = c - f | 0;
2608 b[h >> 2] = d;
2609 b[i >> 2] = c;
2610 b[a >> 2] = 0;
2611 e = 0;
2612 } else {
2613 d = e;
2614 e = f;
2615 }
2616
2617 if ((d | 0) < 0) {
2618 e = e - d | 0;
2619 b[a >> 2] = e;
2620 c = c - d | 0;
2621 b[i >> 2] = c;
2622 b[h >> 2] = 0;
2623 d = 0;
2624 }
2625
2626 g = e - c | 0;
2627 f = d - c | 0;
2628
2629 if ((c | 0) < 0) {
2630 b[a >> 2] = g;
2631 b[h >> 2] = f;
2632 b[i >> 2] = 0;
2633 e = g;
2634 c = 0;
2635 } else { f = d; }
2636
2637 d = (f | 0) < (e | 0) ? f : e;
2638 d = (c | 0) < (d | 0) ? c : d;
2639 if ((d | 0) <= 0) { return; }
2640 b[a >> 2] = e - d;
2641 b[h >> 2] = f - d;
2642 b[i >> 2] = c - d;
2643 return;
2644 }
2645
2646 function Ja(a) {
2647 a = a | 0;
2648 var c = 0,
2649 d = 0,
2650 e = 0,
2651 f = 0,
2652 g = 0,
2653 h = 0,
2654 i = 0;
2655 c = b[a >> 2] | 0;
2656 h = a + 4 | 0;
2657 e = b[h >> 2] | 0;
2658 i = a + 8 | 0;
2659 d = b[i >> 2] | 0;
2660 f = e + c | 0;
2661 b[a >> 2] = f;
2662 e = d + e | 0;
2663 b[h >> 2] = e;
2664 c = d + c | 0;
2665 b[i >> 2] = c;
2666 d = e - f | 0;
2667
2668 if ((f | 0) < 0) {
2669 c = c - f | 0;
2670 b[h >> 2] = d;
2671 b[i >> 2] = c;
2672 b[a >> 2] = 0;
2673 e = 0;
2674 } else {
2675 d = e;
2676 e = f;
2677 }
2678
2679 if ((d | 0) < 0) {
2680 e = e - d | 0;
2681 b[a >> 2] = e;
2682 c = c - d | 0;
2683 b[i >> 2] = c;
2684 b[h >> 2] = 0;
2685 d = 0;
2686 }
2687
2688 g = e - c | 0;
2689 f = d - c | 0;
2690
2691 if ((c | 0) < 0) {
2692 b[a >> 2] = g;
2693 b[h >> 2] = f;
2694 b[i >> 2] = 0;
2695 e = g;
2696 c = 0;
2697 } else { f = d; }
2698
2699 d = (f | 0) < (e | 0) ? f : e;
2700 d = (c | 0) < (d | 0) ? c : d;
2701 if ((d | 0) <= 0) { return; }
2702 b[a >> 2] = e - d;
2703 b[h >> 2] = f - d;
2704 b[i >> 2] = c - d;
2705 return;
2706 }
2707
2708 function Ka(a) {
2709 a = a | 0;
2710
2711 switch (a | 0) {
2712 case 1:
2713 {
2714 a = 5;
2715 break;
2716 }
2717
2718 case 5:
2719 {
2720 a = 4;
2721 break;
2722 }
2723
2724 case 4:
2725 {
2726 a = 6;
2727 break;
2728 }
2729
2730 case 6:
2731 {
2732 a = 2;
2733 break;
2734 }
2735
2736 case 2:
2737 {
2738 a = 3;
2739 break;
2740 }
2741
2742 case 3:
2743 {
2744 a = 1;
2745 break;
2746 }
2747
2748 default:
2749
2750 }
2751
2752 return a | 0;
2753 }
2754
2755 function La(a) {
2756 a = a | 0;
2757
2758 switch (a | 0) {
2759 case 1:
2760 {
2761 a = 3;
2762 break;
2763 }
2764
2765 case 3:
2766 {
2767 a = 2;
2768 break;
2769 }
2770
2771 case 2:
2772 {
2773 a = 6;
2774 break;
2775 }
2776
2777 case 6:
2778 {
2779 a = 4;
2780 break;
2781 }
2782
2783 case 4:
2784 {
2785 a = 5;
2786 break;
2787 }
2788
2789 case 5:
2790 {
2791 a = 1;
2792 break;
2793 }
2794
2795 default:
2796
2797 }
2798
2799 return a | 0;
2800 }
2801
2802 function Ma(a) {
2803 a = a | 0;
2804 var c = 0,
2805 d = 0,
2806 e = 0,
2807 f = 0,
2808 g = 0,
2809 h = 0,
2810 i = 0;
2811 c = b[a >> 2] | 0;
2812 h = a + 4 | 0;
2813 d = b[h >> 2] | 0;
2814 i = a + 8 | 0;
2815 e = b[i >> 2] | 0;
2816 f = d + (c << 1) | 0;
2817 b[a >> 2] = f;
2818 d = e + (d << 1) | 0;
2819 b[h >> 2] = d;
2820 c = (e << 1) + c | 0;
2821 b[i >> 2] = c;
2822 e = d - f | 0;
2823
2824 if ((f | 0) < 0) {
2825 c = c - f | 0;
2826 b[h >> 2] = e;
2827 b[i >> 2] = c;
2828 b[a >> 2] = 0;
2829 d = e;
2830 e = 0;
2831 } else { e = f; }
2832
2833 if ((d | 0) < 0) {
2834 e = e - d | 0;
2835 b[a >> 2] = e;
2836 c = c - d | 0;
2837 b[i >> 2] = c;
2838 b[h >> 2] = 0;
2839 d = 0;
2840 }
2841
2842 g = e - c | 0;
2843 f = d - c | 0;
2844
2845 if ((c | 0) < 0) {
2846 b[a >> 2] = g;
2847 b[h >> 2] = f;
2848 b[i >> 2] = 0;
2849 e = g;
2850 c = 0;
2851 } else { f = d; }
2852
2853 d = (f | 0) < (e | 0) ? f : e;
2854 d = (c | 0) < (d | 0) ? c : d;
2855 if ((d | 0) <= 0) { return; }
2856 b[a >> 2] = e - d;
2857 b[h >> 2] = f - d;
2858 b[i >> 2] = c - d;
2859 return;
2860 }
2861
2862 function Na(a) {
2863 a = a | 0;
2864 var c = 0,
2865 d = 0,
2866 e = 0,
2867 f = 0,
2868 g = 0,
2869 h = 0,
2870 i = 0;
2871 f = b[a >> 2] | 0;
2872 h = a + 4 | 0;
2873 c = b[h >> 2] | 0;
2874 i = a + 8 | 0;
2875 d = b[i >> 2] | 0;
2876 e = (c << 1) + f | 0;
2877 f = d + (f << 1) | 0;
2878 b[a >> 2] = f;
2879 b[h >> 2] = e;
2880 c = (d << 1) + c | 0;
2881 b[i >> 2] = c;
2882 d = e - f | 0;
2883
2884 if ((f | 0) < 0) {
2885 c = c - f | 0;
2886 b[h >> 2] = d;
2887 b[i >> 2] = c;
2888 b[a >> 2] = 0;
2889 f = 0;
2890 } else { d = e; }
2891
2892 if ((d | 0) < 0) {
2893 f = f - d | 0;
2894 b[a >> 2] = f;
2895 c = c - d | 0;
2896 b[i >> 2] = c;
2897 b[h >> 2] = 0;
2898 d = 0;
2899 }
2900
2901 g = f - c | 0;
2902 e = d - c | 0;
2903
2904 if ((c | 0) < 0) {
2905 b[a >> 2] = g;
2906 b[h >> 2] = e;
2907 b[i >> 2] = 0;
2908 f = g;
2909 c = 0;
2910 } else { e = d; }
2911
2912 d = (e | 0) < (f | 0) ? e : f;
2913 d = (c | 0) < (d | 0) ? c : d;
2914 if ((d | 0) <= 0) { return; }
2915 b[a >> 2] = f - d;
2916 b[h >> 2] = e - d;
2917 b[i >> 2] = c - d;
2918 return;
2919 }
2920
2921 function Oa(a, c) {
2922 a = a | 0;
2923 c = c | 0;
2924 var d = 0,
2925 e = 0,
2926 f = 0,
2927 g = 0,
2928 h = 0,
2929 i = 0;
2930 h = (b[a >> 2] | 0) - (b[c >> 2] | 0) | 0;
2931 i = (h | 0) < 0;
2932 e = (b[a + 4 >> 2] | 0) - (b[c + 4 >> 2] | 0) - (i ? h : 0) | 0;
2933 g = (e | 0) < 0;
2934 f = (i ? 0 - h | 0 : 0) + (b[a + 8 >> 2] | 0) - (b[c + 8 >> 2] | 0) + (g ? 0 - e | 0 : 0) | 0;
2935 a = (f | 0) < 0;
2936 c = a ? 0 : f;
2937 d = (g ? 0 : e) - (a ? f : 0) | 0;
2938 f = (i ? 0 : h) - (g ? e : 0) - (a ? f : 0) | 0;
2939 a = (d | 0) < (f | 0) ? d : f;
2940 a = (c | 0) < (a | 0) ? c : a;
2941 e = (a | 0) > 0;
2942 c = c - (e ? a : 0) | 0;
2943 d = d - (e ? a : 0) | 0;
2944 a = f - (e ? a : 0) | 0;
2945 a = (a | 0) > -1 ? a : 0 - a | 0;
2946 d = (d | 0) > -1 ? d : 0 - d | 0;
2947 c = (c | 0) > -1 ? c : 0 - c | 0;
2948 c = (d | 0) > (c | 0) ? d : c;
2949 return ((a | 0) > (c | 0) ? a : c) | 0;
2950 }
2951
2952 function Pa(a, c) {
2953 a = a | 0;
2954 c = c | 0;
2955 var d = 0;
2956 d = b[a + 8 >> 2] | 0;
2957 b[c >> 2] = (b[a >> 2] | 0) - d;
2958 b[c + 4 >> 2] = (b[a + 4 >> 2] | 0) - d;
2959 return;
2960 }
2961
2962 function Qa(a, c) {
2963 a = a | 0;
2964 c = c | 0;
2965 var d = 0,
2966 e = 0,
2967 f = 0,
2968 g = 0,
2969 h = 0,
2970 i = 0;
2971 e = b[a >> 2] | 0;
2972 b[c >> 2] = e;
2973 a = b[a + 4 >> 2] | 0;
2974 h = c + 4 | 0;
2975 b[h >> 2] = a;
2976 i = c + 8 | 0;
2977 b[i >> 2] = 0;
2978 d = a - e | 0;
2979
2980 if ((e | 0) < 0) {
2981 a = 0 - e | 0;
2982 b[h >> 2] = d;
2983 b[i >> 2] = a;
2984 b[c >> 2] = 0;
2985 e = 0;
2986 } else {
2987 d = a;
2988 a = 0;
2989 }
2990
2991 if ((d | 0) < 0) {
2992 e = e - d | 0;
2993 b[c >> 2] = e;
2994 a = a - d | 0;
2995 b[i >> 2] = a;
2996 b[h >> 2] = 0;
2997 d = 0;
2998 }
2999
3000 g = e - a | 0;
3001 f = d - a | 0;
3002
3003 if ((a | 0) < 0) {
3004 b[c >> 2] = g;
3005 b[h >> 2] = f;
3006 b[i >> 2] = 0;
3007 d = f;
3008 f = g;
3009 a = 0;
3010 } else { f = e; }
3011
3012 e = (d | 0) < (f | 0) ? d : f;
3013 e = (a | 0) < (e | 0) ? a : e;
3014 if ((e | 0) <= 0) { return; }
3015 b[c >> 2] = f - e;
3016 b[h >> 2] = d - e;
3017 b[i >> 2] = a - e;
3018 return;
3019 }
3020
3021 function Ra(a) {
3022 a = a | 0;
3023 var c = 0,
3024 d = 0,
3025 e = 0,
3026 f = 0;
3027 c = a + 8 | 0;
3028 f = b[c >> 2] | 0;
3029 d = f - (b[a >> 2] | 0) | 0;
3030 b[a >> 2] = d;
3031 e = a + 4 | 0;
3032 a = (b[e >> 2] | 0) - f | 0;
3033 b[e >> 2] = a;
3034 b[c >> 2] = 0 - (a + d);
3035 return;
3036 }
3037
3038 function Sa(a) {
3039 a = a | 0;
3040 var c = 0,
3041 d = 0,
3042 e = 0,
3043 f = 0,
3044 g = 0,
3045 h = 0,
3046 i = 0;
3047 d = b[a >> 2] | 0;
3048 c = 0 - d | 0;
3049 b[a >> 2] = c;
3050 h = a + 8 | 0;
3051 b[h >> 2] = 0;
3052 i = a + 4 | 0;
3053 e = b[i >> 2] | 0;
3054 f = e + d | 0;
3055
3056 if ((d | 0) > 0) {
3057 b[i >> 2] = f;
3058 b[h >> 2] = d;
3059 b[a >> 2] = 0;
3060 c = 0;
3061 e = f;
3062 } else { d = 0; }
3063
3064 if ((e | 0) < 0) {
3065 g = c - e | 0;
3066 b[a >> 2] = g;
3067 d = d - e | 0;
3068 b[h >> 2] = d;
3069 b[i >> 2] = 0;
3070 f = g - d | 0;
3071 c = 0 - d | 0;
3072
3073 if ((d | 0) < 0) {
3074 b[a >> 2] = f;
3075 b[i >> 2] = c;
3076 b[h >> 2] = 0;
3077 e = c;
3078 d = 0;
3079 } else {
3080 e = 0;
3081 f = g;
3082 }
3083 } else { f = c; }
3084
3085 c = (e | 0) < (f | 0) ? e : f;
3086 c = (d | 0) < (c | 0) ? d : c;
3087 if ((c | 0) <= 0) { return; }
3088 b[a >> 2] = f - c;
3089 b[i >> 2] = e - c;
3090 b[h >> 2] = d - c;
3091 return;
3092 }
3093
3094 function Ta(a, b, c) {
3095 a = a | 0;
3096 b = b | 0;
3097 c = c | 0;
3098 var d = 0,
3099 e = 0;
3100 d = R;
3101 R = R + 16 | 0;
3102 e = d;
3103 Ua(a, b, c, e);
3104 wa(e, c + 4 | 0);
3105 R = d;
3106 return;
3107 }
3108
3109 function Ua(a, c, d, f) {
3110 a = a | 0;
3111 c = c | 0;
3112 d = d | 0;
3113 f = f | 0;
3114 var g = 0.0,
3115 h = 0,
3116 i = 0.0,
3117 j = 0.0,
3118 k = 0;
3119 k = R;
3120 R = R + 32 | 0;
3121 h = k;
3122 xc(a, h);
3123 b[d >> 2] = 0;
3124 g = +wc(15888, h);
3125 i = +wc(15912, h);
3126
3127 if (i < g) {
3128 b[d >> 2] = 1;
3129 g = i;
3130 }
3131
3132 i = +wc(15936, h);
3133
3134 if (i < g) {
3135 b[d >> 2] = 2;
3136 g = i;
3137 }
3138
3139 i = +wc(15960, h);
3140
3141 if (i < g) {
3142 b[d >> 2] = 3;
3143 g = i;
3144 }
3145
3146 i = +wc(15984, h);
3147
3148 if (i < g) {
3149 b[d >> 2] = 4;
3150 g = i;
3151 }
3152
3153 i = +wc(16008, h);
3154
3155 if (i < g) {
3156 b[d >> 2] = 5;
3157 g = i;
3158 }
3159
3160 i = +wc(16032, h);
3161
3162 if (i < g) {
3163 b[d >> 2] = 6;
3164 g = i;
3165 }
3166
3167 i = +wc(16056, h);
3168
3169 if (i < g) {
3170 b[d >> 2] = 7;
3171 g = i;
3172 }
3173
3174 i = +wc(16080, h);
3175
3176 if (i < g) {
3177 b[d >> 2] = 8;
3178 g = i;
3179 }
3180
3181 i = +wc(16104, h);
3182
3183 if (i < g) {
3184 b[d >> 2] = 9;
3185 g = i;
3186 }
3187
3188 i = +wc(16128, h);
3189
3190 if (i < g) {
3191 b[d >> 2] = 10;
3192 g = i;
3193 }
3194
3195 i = +wc(16152, h);
3196
3197 if (i < g) {
3198 b[d >> 2] = 11;
3199 g = i;
3200 }
3201
3202 i = +wc(16176, h);
3203
3204 if (i < g) {
3205 b[d >> 2] = 12;
3206 g = i;
3207 }
3208
3209 i = +wc(16200, h);
3210
3211 if (i < g) {
3212 b[d >> 2] = 13;
3213 g = i;
3214 }
3215
3216 i = +wc(16224, h);
3217
3218 if (i < g) {
3219 b[d >> 2] = 14;
3220 g = i;
3221 }
3222
3223 i = +wc(16248, h);
3224
3225 if (i < g) {
3226 b[d >> 2] = 15;
3227 g = i;
3228 }
3229
3230 i = +wc(16272, h);
3231
3232 if (i < g) {
3233 b[d >> 2] = 16;
3234 g = i;
3235 }
3236
3237 i = +wc(16296, h);
3238
3239 if (i < g) {
3240 b[d >> 2] = 17;
3241 g = i;
3242 }
3243
3244 i = +wc(16320, h);
3245
3246 if (i < g) {
3247 b[d >> 2] = 18;
3248 g = i;
3249 }
3250
3251 i = +wc(16344, h);
3252
3253 if (i < g) {
3254 b[d >> 2] = 19;
3255 g = i;
3256 }
3257
3258 i = +w(+(1.0 - g * .5));
3259
3260 if (i < 1.0e-16) {
3261 b[f >> 2] = 0;
3262 b[f + 4 >> 2] = 0;
3263 b[f + 8 >> 2] = 0;
3264 b[f + 12 >> 2] = 0;
3265 R = k;
3266 return;
3267 }
3268
3269 d = b[d >> 2] | 0;
3270 g = +e[16368 + (d * 24 | 0) >> 3];
3271 g = +bb(g - +bb(+hb(15568 + (d << 4) | 0, a)));
3272 if (!(Fb(c) | 0)) { j = g; }else { j = +bb(g + -.3334731722518321); }
3273 g = +v(+i) / .381966011250105;
3274
3275 if ((c | 0) > 0) {
3276 h = 0;
3277
3278 do {
3279 g = g * 2.6457513110645907;
3280 h = h + 1 | 0;
3281 } while ((h | 0) != (c | 0));
3282 }
3283
3284 i = +t(+j) * g;
3285 e[f >> 3] = i;
3286 j = +u(+j) * g;
3287 e[f + 8 >> 3] = j;
3288 R = k;
3289 return;
3290 }
3291
3292 function Va(a, c, d, f, g) {
3293 a = a | 0;
3294 c = c | 0;
3295 d = d | 0;
3296 f = f | 0;
3297 g = g | 0;
3298 var h = 0.0,
3299 i = 0.0;
3300 h = +tc(a);
3301
3302 if (h < 1.0e-16) {
3303 c = 15568 + (c << 4) | 0;
3304 b[g >> 2] = b[c >> 2];
3305 b[g + 4 >> 2] = b[c + 4 >> 2];
3306 b[g + 8 >> 2] = b[c + 8 >> 2];
3307 b[g + 12 >> 2] = b[c + 12 >> 2];
3308 return;
3309 }
3310
3311 i = +z(+ +e[a + 8 >> 3], + +e[a >> 3]);
3312
3313 if ((d | 0) > 0) {
3314 a = 0;
3315
3316 do {
3317 h = h / 2.6457513110645907;
3318 a = a + 1 | 0;
3319 } while ((a | 0) != (d | 0));
3320 }
3321
3322 if (!f) {
3323 h = +y(+(h * .381966011250105));
3324 if (Fb(d) | 0) { i = +bb(i + .3334731722518321); }
3325 } else {
3326 h = h / 3.0;
3327 d = (Fb(d) | 0) == 0;
3328 h = +y(+((d ? h : h / 2.6457513110645907) * .381966011250105));
3329 }
3330
3331 ib(15568 + (c << 4) | 0, +bb(+e[16368 + (c * 24 | 0) >> 3] - i), h, g);
3332 return;
3333 }
3334
3335 function Wa(a, c, d) {
3336 a = a | 0;
3337 c = c | 0;
3338 d = d | 0;
3339 var e = 0,
3340 f = 0;
3341 e = R;
3342 R = R + 16 | 0;
3343 f = e;
3344 ya(a + 4 | 0, f);
3345 Va(f, b[a >> 2] | 0, c, 0, d);
3346 R = e;
3347 return;
3348 }
3349
3350 function Xa(a, c, d) {
3351 a = a | 0;
3352 c = c | 0;
3353 d = d | 0;
3354 var f = 0,
3355 g = 0,
3356 h = 0,
3357 i = 0,
3358 j = 0,
3359 k = 0,
3360 l = 0,
3361 m = 0,
3362 n = 0,
3363 o = 0,
3364 p = 0,
3365 q = 0,
3366 r = 0,
3367 s = 0,
3368 t = 0,
3369 u = 0,
3370 v = 0,
3371 w = 0,
3372 x = 0,
3373 y = 0,
3374 z = 0,
3375 A = 0,
3376 B = 0,
3377 C = 0,
3378 D = 0,
3379 E = 0.0,
3380 F = 0.0;
3381 D = R;
3382 R = R + 272 | 0;
3383 j = D + 256 | 0;
3384 k = D + 240 | 0;
3385 y = D;
3386 z = D + 224 | 0;
3387 A = D + 208 | 0;
3388 B = D + 176 | 0;
3389 C = D + 160 | 0;
3390 s = D + 192 | 0;
3391 t = D + 144 | 0;
3392 u = D + 128 | 0;
3393 v = D + 112 | 0;
3394 w = D + 96 | 0;
3395 x = D + 80 | 0;
3396 b[j >> 2] = c;
3397 b[k >> 2] = b[a >> 2];
3398 b[k + 4 >> 2] = b[a + 4 >> 2];
3399 b[k + 8 >> 2] = b[a + 8 >> 2];
3400 b[k + 12 >> 2] = b[a + 12 >> 2];
3401 Ya(k, j, y);
3402 b[d >> 2] = 0;
3403 j = b[j >> 2] | 0;
3404 k = z + 4 | 0;
3405 l = B + 4 | 0;
3406 m = 16848 + (j << 2) | 0;
3407 n = 16928 + (j << 2) | 0;
3408 o = u + 8 | 0;
3409 p = v + 8 | 0;
3410 q = w + 8 | 0;
3411 r = A + 4 | 0;
3412 i = 0;
3413
3414 a: while (1) {
3415 h = y + (((i >>> 0) % 5 | 0) << 4) | 0;
3416 b[A >> 2] = b[h >> 2];
3417 b[A + 4 >> 2] = b[h + 4 >> 2];
3418 b[A + 8 >> 2] = b[h + 8 >> 2];
3419 b[A + 12 >> 2] = b[h + 12 >> 2];
3420
3421 do {} while ((Za(A, j, 0, 1) | 0) == 2);
3422
3423 if ((i | 0) != 0 & (Fb(c) | 0) != 0) {
3424 b[B >> 2] = b[A >> 2];
3425 b[B + 4 >> 2] = b[A + 4 >> 2];
3426 b[B + 8 >> 2] = b[A + 8 >> 2];
3427 b[B + 12 >> 2] = b[A + 12 >> 2];
3428 ya(k, C);
3429 f = b[B >> 2] | 0;
3430 g = b[17008 + (f * 80 | 0) + (b[z >> 2] << 2) >> 2] | 0;
3431 b[B >> 2] = b[18608 + (f * 80 | 0) + (g * 20 | 0) >> 2];
3432 h = b[18608 + (f * 80 | 0) + (g * 20 | 0) + 16 >> 2] | 0;
3433
3434 if ((h | 0) > 0) {
3435 a = 0;
3436
3437 do {
3438 Ia(l);
3439 a = a + 1 | 0;
3440 } while ((a | 0) < (h | 0));
3441 }
3442
3443 h = 18608 + (f * 80 | 0) + (g * 20 | 0) + 4 | 0;
3444 b[s >> 2] = b[h >> 2];
3445 b[s + 4 >> 2] = b[h + 4 >> 2];
3446 b[s + 8 >> 2] = b[h + 8 >> 2];
3447 Ba(s, (b[m >> 2] | 0) * 3 | 0);
3448 za(l, s, l);
3449 xa(l);
3450 ya(l, t);
3451 E = +(b[n >> 2] | 0);
3452 e[u >> 3] = E * 3.0;
3453 e[o >> 3] = 0.0;
3454 F = E * -1.5;
3455 e[v >> 3] = F;
3456 e[p >> 3] = E * 2.598076211353316;
3457 e[w >> 3] = F;
3458 e[q >> 3] = E * -2.598076211353316;
3459
3460 switch (b[17008 + ((b[B >> 2] | 0) * 80 | 0) + (b[A >> 2] << 2) >> 2] | 0) {
3461 case 1:
3462 {
3463 a = v;
3464 f = u;
3465 break;
3466 }
3467
3468 case 3:
3469 {
3470 a = w;
3471 f = v;
3472 break;
3473 }
3474
3475 case 2:
3476 {
3477 a = u;
3478 f = w;
3479 break;
3480 }
3481
3482 default:
3483 {
3484 a = 11;
3485 break a;
3486 }
3487 }
3488
3489 uc(C, t, f, a, x);
3490 Va(x, b[B >> 2] | 0, j, 1, d + 8 + (b[d >> 2] << 4) | 0);
3491 b[d >> 2] = (b[d >> 2] | 0) + 1;
3492 }
3493
3494 if (i >>> 0 < 5) {
3495 ya(r, B);
3496 Va(B, b[A >> 2] | 0, j, 1, d + 8 + (b[d >> 2] << 4) | 0);
3497 b[d >> 2] = (b[d >> 2] | 0) + 1;
3498 }
3499 b[z >> 2] = b[A >> 2];
3500 b[z + 4 >> 2] = b[A + 4 >> 2];
3501 b[z + 8 >> 2] = b[A + 8 >> 2];
3502 b[z + 12 >> 2] = b[A + 12 >> 2];
3503 i = i + 1 | 0;
3504
3505 if (i >>> 0 >= 6) {
3506 a = 2;
3507 break;
3508 }
3509 }
3510
3511 if ((a | 0) == 2) {
3512 R = D;
3513 return;
3514 } else if ((a | 0) == 11) { G(22113, 22160, 571, 22170); }
3515 }
3516
3517 function Ya(a, c, d) {
3518 a = a | 0;
3519 c = c | 0;
3520 d = d | 0;
3521 var e = 0,
3522 f = 0,
3523 g = 0,
3524 h = 0,
3525 i = 0,
3526 j = 0;
3527 j = R;
3528 R = R + 128 | 0;
3529 e = j + 64 | 0;
3530 f = j;
3531 g = e;
3532 h = 20208;
3533 i = g + 60 | 0;
3534
3535 do {
3536 b[g >> 2] = b[h >> 2];
3537 g = g + 4 | 0;
3538 h = h + 4 | 0;
3539 } while ((g | 0) < (i | 0));
3540
3541 g = f;
3542 h = 20272;
3543 i = g + 60 | 0;
3544
3545 do {
3546 b[g >> 2] = b[h >> 2];
3547 g = g + 4 | 0;
3548 h = h + 4 | 0;
3549 } while ((g | 0) < (i | 0));
3550
3551 i = (Fb(b[c >> 2] | 0) | 0) == 0;
3552 e = i ? e : f;
3553 f = a + 4 | 0;
3554 Ma(f);
3555 Na(f);
3556
3557 if (Fb(b[c >> 2] | 0) | 0) {
3558 Ga(f);
3559 b[c >> 2] = (b[c >> 2] | 0) + 1;
3560 }
3561
3562 b[d >> 2] = b[a >> 2];
3563 c = d + 4 | 0;
3564 za(f, e, c);
3565 xa(c);
3566 b[d + 16 >> 2] = b[a >> 2];
3567 c = d + 20 | 0;
3568 za(f, e + 12 | 0, c);
3569 xa(c);
3570 b[d + 32 >> 2] = b[a >> 2];
3571 c = d + 36 | 0;
3572 za(f, e + 24 | 0, c);
3573 xa(c);
3574 b[d + 48 >> 2] = b[a >> 2];
3575 c = d + 52 | 0;
3576 za(f, e + 36 | 0, c);
3577 xa(c);
3578 b[d + 64 >> 2] = b[a >> 2];
3579 d = d + 68 | 0;
3580 za(f, e + 48 | 0, d);
3581 xa(d);
3582 R = j;
3583 return;
3584 }
3585
3586 function Za(a, c, d, e) {
3587 a = a | 0;
3588 c = c | 0;
3589 d = d | 0;
3590 e = e | 0;
3591 var f = 0,
3592 g = 0,
3593 h = 0,
3594 i = 0,
3595 j = 0,
3596 k = 0,
3597 l = 0,
3598 m = 0,
3599 n = 0,
3600 o = 0,
3601 p = 0;
3602 p = R;
3603 R = R + 32 | 0;
3604 n = p + 12 | 0;
3605 i = p;
3606 o = a + 4 | 0;
3607 m = b[16928 + (c << 2) >> 2] | 0;
3608 l = (e | 0) != 0;
3609 m = l ? m * 3 | 0 : m;
3610 f = b[o >> 2] | 0;
3611 k = a + 8 | 0;
3612 h = b[k >> 2] | 0;
3613
3614 if (l) {
3615 g = a + 12 | 0;
3616 e = b[g >> 2] | 0;
3617 f = h + f + e | 0;
3618
3619 if ((f | 0) == (m | 0)) {
3620 o = 1;
3621 R = p;
3622 return o | 0;
3623 } else { j = g; }
3624 } else {
3625 j = a + 12 | 0;
3626 e = b[j >> 2] | 0;
3627 f = h + f + e | 0;
3628 }
3629
3630 if ((f | 0) <= (m | 0)) {
3631 o = 0;
3632 R = p;
3633 return o | 0;
3634 }
3635
3636 do { if ((e | 0) > 0) {
3637 e = b[a >> 2] | 0;
3638
3639 if ((h | 0) > 0) {
3640 g = 18608 + (e * 80 | 0) + 60 | 0;
3641 e = a;
3642 break;
3643 }
3644
3645 e = 18608 + (e * 80 | 0) + 40 | 0;
3646
3647 if (!d) {
3648 g = e;
3649 e = a;
3650 } else {
3651 va(n, m, 0, 0);
3652 Aa(o, n, i);
3653 Ja(i);
3654 za(i, n, o);
3655 g = e;
3656 e = a;
3657 }
3658 } else {
3659 g = 18608 + ((b[a >> 2] | 0) * 80 | 0) + 20 | 0;
3660 e = a;
3661 } } while (0);
3662
3663 b[e >> 2] = b[g >> 2];
3664 f = g + 16 | 0;
3665
3666 if ((b[f >> 2] | 0) > 0) {
3667 e = 0;
3668
3669 do {
3670 Ia(o);
3671 e = e + 1 | 0;
3672 } while ((e | 0) < (b[f >> 2] | 0));
3673 }
3674
3675 a = g + 4 | 0;
3676 b[n >> 2] = b[a >> 2];
3677 b[n + 4 >> 2] = b[a + 4 >> 2];
3678 b[n + 8 >> 2] = b[a + 8 >> 2];
3679 c = b[16848 + (c << 2) >> 2] | 0;
3680 Ba(n, l ? c * 3 | 0 : c);
3681 za(o, n, o);
3682 xa(o);
3683 if (l) { e = ((b[k >> 2] | 0) + (b[o >> 2] | 0) + (b[j >> 2] | 0) | 0) == (m | 0) ? 1 : 2; }else { e = 2; }
3684 o = e;
3685 R = p;
3686 return o | 0;
3687 }
3688
3689 function _a(a, b) {
3690 a = a | 0;
3691 b = b | 0;
3692 var c = 0;
3693
3694 do { c = Za(a, b, 0, 1) | 0; } while ((c | 0) == 2);
3695
3696 return c | 0;
3697 }
3698
3699 function $a(a, c, d, f) {
3700 a = a | 0;
3701 c = c | 0;
3702 d = d | 0;
3703 f = f | 0;
3704 var g = 0,
3705 h = 0,
3706 i = 0,
3707 j = 0,
3708 k = 0,
3709 l = 0,
3710 m = 0,
3711 n = 0,
3712 o = 0,
3713 p = 0,
3714 q = 0,
3715 r = 0,
3716 s = 0,
3717 t = 0,
3718 u = 0,
3719 v = 0,
3720 w = 0,
3721 x = 0,
3722 y = 0,
3723 z = 0,
3724 A = 0.0,
3725 B = 0.0;
3726 z = R;
3727 R = R + 240 | 0;
3728 g = z + 224 | 0;
3729 t = z + 208 | 0;
3730 u = z;
3731 v = z + 192 | 0;
3732 w = z + 176 | 0;
3733 x = z + 160 | 0;
3734 p = z + 144 | 0;
3735 q = z + 128 | 0;
3736 r = z + 112 | 0;
3737 s = z + 96 | 0;
3738
3739 if (d | 0) {
3740 Xa(a, c, f);
3741 R = z;
3742 return;
3743 }
3744
3745 b[g >> 2] = c;
3746 b[t >> 2] = b[a >> 2];
3747 b[t + 4 >> 2] = b[a + 4 >> 2];
3748 b[t + 8 >> 2] = b[a + 8 >> 2];
3749 b[t + 12 >> 2] = b[a + 12 >> 2];
3750 ab(t, g, u);
3751 b[f >> 2] = 0;
3752 j = b[g >> 2] | 0;
3753 k = 16928 + (j << 2) | 0;
3754 l = p + 8 | 0;
3755 m = q + 8 | 0;
3756 n = r + 8 | 0;
3757 o = v + 4 | 0;
3758 h = 0;
3759 i = 0;
3760 d = -1;
3761
3762 a: while (1) {
3763 g = (i >>> 0) % 6 | 0;
3764 a = u + (g << 4) | 0;
3765 b[v >> 2] = b[a >> 2];
3766 b[v + 4 >> 2] = b[a + 4 >> 2];
3767 b[v + 8 >> 2] = b[a + 8 >> 2];
3768 b[v + 12 >> 2] = b[a + 12 >> 2];
3769 a = h;
3770 h = Za(v, j, 0, 1) | 0;
3771
3772 if ((i | 0) != 0 & (Fb(c) | 0) != 0 ? (a | 0) != 1 ? (b[v >> 2] | 0) != (d | 0) : 0 : 0) {
3773 ya(u + ((((g + 5 | 0) >>> 0) % 6 | 0) << 4) + 4 | 0, w);
3774 ya(u + (g << 4) + 4 | 0, x);
3775 A = +(b[k >> 2] | 0);
3776 e[p >> 3] = A * 3.0;
3777 e[l >> 3] = 0.0;
3778 B = A * -1.5;
3779 e[q >> 3] = B;
3780 e[m >> 3] = A * 2.598076211353316;
3781 e[r >> 3] = B;
3782 e[n >> 3] = A * -2.598076211353316;
3783 g = b[t >> 2] | 0;
3784
3785 switch (b[17008 + (g * 80 | 0) + (((d | 0) == (g | 0) ? b[v >> 2] | 0 : d) << 2) >> 2] | 0) {
3786 case 1:
3787 {
3788 a = q;
3789 d = p;
3790 break;
3791 }
3792
3793 case 3:
3794 {
3795 a = r;
3796 d = q;
3797 break;
3798 }
3799
3800 case 2:
3801 {
3802 a = p;
3803 d = r;
3804 break;
3805 }
3806
3807 default:
3808 {
3809 y = 9;
3810 break a;
3811 }
3812 }
3813
3814 uc(w, x, d, a, s);
3815
3816 if (!(vc(w, s) | 0) ? !(vc(x, s) | 0) : 0) {
3817 Va(s, b[t >> 2] | 0, j, 1, f + 8 + (b[f >> 2] << 4) | 0);
3818 b[f >> 2] = (b[f >> 2] | 0) + 1;
3819 }
3820 }
3821
3822 if (i >>> 0 < 6) {
3823 ya(o, w);
3824 Va(w, b[v >> 2] | 0, j, 1, f + 8 + (b[f >> 2] << 4) | 0);
3825 b[f >> 2] = (b[f >> 2] | 0) + 1;
3826 }
3827
3828 i = i + 1 | 0;
3829 if (i >>> 0 >= 7) { break; }else { d = b[v >> 2] | 0; }
3830 }
3831
3832 if ((y | 0) == 9) { G(22196, 22160, 735, 22241); }
3833 R = z;
3834 return;
3835 }
3836
3837 function ab(a, c, d) {
3838 a = a | 0;
3839 c = c | 0;
3840 d = d | 0;
3841 var e = 0,
3842 f = 0,
3843 g = 0,
3844 h = 0,
3845 i = 0,
3846 j = 0;
3847 j = R;
3848 R = R + 160 | 0;
3849 e = j + 80 | 0;
3850 f = j;
3851 g = e;
3852 h = 20336;
3853 i = g + 72 | 0;
3854
3855 do {
3856 b[g >> 2] = b[h >> 2];
3857 g = g + 4 | 0;
3858 h = h + 4 | 0;
3859 } while ((g | 0) < (i | 0));
3860
3861 g = f;
3862 h = 20416;
3863 i = g + 72 | 0;
3864
3865 do {
3866 b[g >> 2] = b[h >> 2];
3867 g = g + 4 | 0;
3868 h = h + 4 | 0;
3869 } while ((g | 0) < (i | 0));
3870
3871 i = (Fb(b[c >> 2] | 0) | 0) == 0;
3872 e = i ? e : f;
3873 f = a + 4 | 0;
3874 Ma(f);
3875 Na(f);
3876
3877 if (Fb(b[c >> 2] | 0) | 0) {
3878 Ga(f);
3879 b[c >> 2] = (b[c >> 2] | 0) + 1;
3880 }
3881
3882 b[d >> 2] = b[a >> 2];
3883 c = d + 4 | 0;
3884 za(f, e, c);
3885 xa(c);
3886 b[d + 16 >> 2] = b[a >> 2];
3887 c = d + 20 | 0;
3888 za(f, e + 12 | 0, c);
3889 xa(c);
3890 b[d + 32 >> 2] = b[a >> 2];
3891 c = d + 36 | 0;
3892 za(f, e + 24 | 0, c);
3893 xa(c);
3894 b[d + 48 >> 2] = b[a >> 2];
3895 c = d + 52 | 0;
3896 za(f, e + 36 | 0, c);
3897 xa(c);
3898 b[d + 64 >> 2] = b[a >> 2];
3899 c = d + 68 | 0;
3900 za(f, e + 48 | 0, c);
3901 xa(c);
3902 b[d + 80 >> 2] = b[a >> 2];
3903 d = d + 84 | 0;
3904 za(f, e + 60 | 0, d);
3905 xa(d);
3906 R = j;
3907 return;
3908 }
3909
3910 function bb(a) {
3911 a = +a;
3912 var b = 0.0;
3913 b = a < 0.0 ? a + 6.283185307179586 : a;
3914 return +(!(a >= 6.283185307179586) ? b : b + -6.283185307179586);
3915 }
3916
3917 function cb(a, b, c) {
3918 a = a | 0;
3919 b = b | 0;
3920 c = +c;
3921
3922 if (!(+q(+(+e[a >> 3] - +e[b >> 3])) < c)) {
3923 b = 0;
3924 return b | 0;
3925 }
3926
3927 b = +q(+(+e[a + 8 >> 3] - +e[b + 8 >> 3])) < c;
3928 return b | 0;
3929 }
3930
3931 function db(a, b) {
3932 a = a | 0;
3933 b = b | 0;
3934
3935 if (!(+q(+(+e[a >> 3] - +e[b >> 3])) < 1.7453292519943298e-11)) {
3936 b = 0;
3937 return b | 0;
3938 }
3939
3940 b = +q(+(+e[a + 8 >> 3] - +e[b + 8 >> 3])) < 1.7453292519943298e-11;
3941 return b | 0;
3942 }
3943
3944 function eb(a) {
3945 a = +a;
3946 if (!(a > 1.5707963267948966)) { return +a; }
3947
3948 do { a = a + -3.141592653589793; } while (a > 1.5707963267948966);
3949
3950 return +a;
3951 }
3952
3953 function fb(a) {
3954 a = +a;
3955 if (a > 3.141592653589793) { do { a = a + -6.283185307179586; } while (a > 3.141592653589793); }
3956 if (!(a < -3.141592653589793)) { return +a; }
3957
3958 do { a = a + 6.283185307179586; } while (a < -3.141592653589793);
3959
3960 return +a;
3961 }
3962
3963 function gb(a, b) {
3964 a = a | 0;
3965 b = b | 0;
3966 var c = 0.0,
3967 d = 0.0,
3968 f = 0.0;
3969 d = +e[b + 8 >> 3];
3970 f = +e[a + 8 >> 3];
3971 c = +q(+(d - f));
3972 if (c > 3.141592653589793) { c = +q(+((d < 0.0 ? d + 6.283185307179586 : d) - (f < 0.0 ? f + 6.283185307179586 : f))); }
3973 d = 1.5707963267948966 - +e[a >> 3];
3974 f = 1.5707963267948966 - +e[b >> 3];
3975 f = +t(+d) * +t(+f) + +t(+c) * (+u(+d) * +u(+f));
3976 f = f > 1.0 ? 1.0 : f;
3977 return +(+w(+(f < -1.0 ? -1.0 : f)) * 6371.007180918475);
3978 }
3979
3980 function hb(a, b) {
3981 a = a | 0;
3982 b = b | 0;
3983 var c = 0.0,
3984 d = 0.0,
3985 f = 0.0,
3986 g = 0.0,
3987 h = 0.0;
3988 g = +e[b >> 3];
3989 d = +t(+g);
3990 f = +e[b + 8 >> 3] - +e[a + 8 >> 3];
3991 h = d * +u(+f);
3992 c = +e[a >> 3];
3993 return + +z(+h, +(+u(+g) * +t(+c) - +t(+f) * (d * +u(+c))));
3994 }
3995
3996 function ib(a, c, d, f) {
3997 a = a | 0;
3998 c = +c;
3999 d = +d;
4000 f = f | 0;
4001 var g = 0,
4002 h = 0.0,
4003 i = 0.0,
4004 j = 0.0;
4005
4006 if (d < 1.0e-16) {
4007 b[f >> 2] = b[a >> 2];
4008 b[f + 4 >> 2] = b[a + 4 >> 2];
4009 b[f + 8 >> 2] = b[a + 8 >> 2];
4010 b[f + 12 >> 2] = b[a + 12 >> 2];
4011 return;
4012 }
4013
4014 h = c < 0.0 ? c + 6.283185307179586 : c;
4015 h = !(c >= 6.283185307179586) ? h : h + -6.283185307179586;
4016
4017 do { if (h < 1.0e-16) {
4018 c = +e[a >> 3] + d;
4019 e[f >> 3] = c;
4020 g = f;
4021 } else {
4022 g = +q(+(h + -3.141592653589793)) < 1.0e-16;
4023 c = +e[a >> 3];
4024
4025 if (g) {
4026 c = c - d;
4027 e[f >> 3] = c;
4028 g = f;
4029 break;
4030 }
4031
4032 i = +t(+d);
4033 d = +u(+d);
4034 c = i * +u(+c) + +t(+h) * (d * +t(+c));
4035 c = c > 1.0 ? 1.0 : c;
4036 c = +x(+(c < -1.0 ? -1.0 : c));
4037 e[f >> 3] = c;
4038
4039 if (+q(+(c + -1.5707963267948966)) < 1.0e-16) {
4040 e[f >> 3] = 1.5707963267948966;
4041 e[f + 8 >> 3] = 0.0;
4042 return;
4043 }
4044
4045 if (+q(+(c + 1.5707963267948966)) < 1.0e-16) {
4046 e[f >> 3] = -1.5707963267948966;
4047 e[f + 8 >> 3] = 0.0;
4048 return;
4049 }
4050
4051 j = +t(+c);
4052 h = d * +u(+h) / j;
4053 d = +e[a >> 3];
4054 c = (i - +u(+c) * +u(+d)) / +t(+d) / j;
4055 i = h > 1.0 ? 1.0 : h;
4056 c = c > 1.0 ? 1.0 : c;
4057 c = +e[a + 8 >> 3] + +z(+(i < -1.0 ? -1.0 : i), +(c < -1.0 ? -1.0 : c));
4058 if (c > 3.141592653589793) { do { c = c + -6.283185307179586; } while (c > 3.141592653589793); }
4059 if (c < -3.141592653589793) { do { c = c + 6.283185307179586; } while (c < -3.141592653589793); }
4060 e[f + 8 >> 3] = c;
4061 return;
4062 } } while (0);
4063
4064 if (+q(+(c + -1.5707963267948966)) < 1.0e-16) {
4065 e[g >> 3] = 1.5707963267948966;
4066 e[f + 8 >> 3] = 0.0;
4067 return;
4068 }
4069
4070 if (+q(+(c + 1.5707963267948966)) < 1.0e-16) {
4071 e[g >> 3] = -1.5707963267948966;
4072 e[f + 8 >> 3] = 0.0;
4073 return;
4074 }
4075
4076 c = +e[a + 8 >> 3];
4077 if (c > 3.141592653589793) { do { c = c + -6.283185307179586; } while (c > 3.141592653589793); }
4078 if (c < -3.141592653589793) { do { c = c + 6.283185307179586; } while (c < -3.141592653589793); }
4079 e[f + 8 >> 3] = c;
4080 return;
4081 }
4082
4083 function jb(a) {
4084 a = a | 0;
4085 return + +e[20496 + (a << 3) >> 3];
4086 }
4087
4088 function kb(a) {
4089 a = a | 0;
4090 return + +e[20624 + (a << 3) >> 3];
4091 }
4092
4093 function lb(a) {
4094 a = a | 0;
4095 return + +e[20752 + (a << 3) >> 3];
4096 }
4097
4098 function mb(a) {
4099 a = a | 0;
4100 return + +e[20880 + (a << 3) >> 3];
4101 }
4102
4103 function nb(a) {
4104 a = a | 0;
4105 var c = 0;
4106 c = 21008 + (a << 3) | 0;
4107 a = b[c >> 2] | 0;
4108 E(b[c + 4 >> 2] | 0);
4109 return a | 0;
4110 }
4111
4112 function ob(a, b) {
4113 a = a | 0;
4114 b = b | 0;
4115 b = Qc(a | 0, b | 0, 45) | 0;
4116 F() | 0;
4117 return b & 127 | 0;
4118 }
4119
4120 function pb(a, b) {
4121 a = a | 0;
4122 b = b | 0;
4123 var c = 0,
4124 d = 0,
4125 e = 0,
4126 f = 0,
4127 g = 0,
4128 h = 0;
4129
4130 if (!(0 == 0 & (b & 2013265920 | 0) == 134217728)) {
4131 b = 0;
4132 return b | 0;
4133 }
4134
4135 g = Qc(a | 0, b | 0, 45) | 0;
4136 F() | 0;
4137 g = g & 127;
4138
4139 if (g >>> 0 > 121) {
4140 b = 0;
4141 return b | 0;
4142 }
4143
4144 c = Qc(a | 0, b | 0, 52) | 0;
4145 F() | 0;
4146 c = c & 15;
4147
4148 do { if (c | 0) {
4149 e = 1;
4150 d = 0;
4151
4152 while (1) {
4153 f = Qc(a | 0, b | 0, (15 - e | 0) * 3 | 0) | 0;
4154 F() | 0;
4155 f = f & 7;
4156 if ((f | 0) != 0 & (d ^ 1)) { if ((f | 0) == 1 & (ia(g) | 0) != 0) {
4157 h = 0;
4158 d = 13;
4159 break;
4160 } else { d = 1; } }
4161
4162 if ((f | 0) == 7) {
4163 h = 0;
4164 d = 13;
4165 break;
4166 }
4167
4168 if (e >>> 0 < c >>> 0) { e = e + 1 | 0; }else {
4169 d = 9;
4170 break;
4171 }
4172 }
4173
4174 if ((d | 0) == 9) {
4175 if ((c | 0) == 15) { h = 1; }else { break; }
4176 return h | 0;
4177 } else if ((d | 0) == 13) { return h | 0; }
4178 } } while (0);
4179
4180 while (1) {
4181 h = Qc(a | 0, b | 0, (14 - c | 0) * 3 | 0) | 0;
4182 F() | 0;
4183
4184 if (!((h & 7 | 0) == 7 & 0 == 0)) {
4185 h = 0;
4186 d = 13;
4187 break;
4188 }
4189
4190 if (c >>> 0 < 14) { c = c + 1 | 0; }else {
4191 h = 1;
4192 d = 13;
4193 break;
4194 }
4195 }
4196
4197 if ((d | 0) == 13) { return h | 0; }
4198 return 0;
4199 }
4200
4201 function qb(a, b, c) {
4202 a = a | 0;
4203 b = b | 0;
4204 c = c | 0;
4205 var d = 0,
4206 e = 0;
4207 d = Qc(a | 0, b | 0, 52) | 0;
4208 F() | 0;
4209 d = d & 15;
4210
4211 if ((d | 0) >= (c | 0)) {
4212 if ((d | 0) != (c | 0)) { if (c >>> 0 <= 15) {
4213 e = Rc(c | 0, 0, 52) | 0;
4214 a = e | a;
4215 b = F() | 0 | b & -15728641;
4216 if ((d | 0) > (c | 0)) { do {
4217 e = Rc(7, 0, (14 - c | 0) * 3 | 0) | 0;
4218 c = c + 1 | 0;
4219 a = e | a;
4220 b = F() | 0 | b;
4221 } while ((c | 0) < (d | 0)); }
4222 } else {
4223 b = 0;
4224 a = 0;
4225 } }
4226 } else {
4227 b = 0;
4228 a = 0;
4229 }
4230
4231 E(b | 0);
4232 return a | 0;
4233 }
4234
4235 function rb(a, b, c) {
4236 a = a | 0;
4237 b = b | 0;
4238 c = c | 0;
4239 a = Qc(a | 0, b | 0, 52) | 0;
4240 F() | 0;
4241 a = a & 15;
4242
4243 if (!((c | 0) < 16 & (a | 0) <= (c | 0))) {
4244 c = 0;
4245 return c | 0;
4246 }
4247
4248 c = hc(7, c - a | 0) | 0;
4249 return c | 0;
4250 }
4251
4252 function sb(a, c, d, e) {
4253 a = a | 0;
4254 c = c | 0;
4255 d = d | 0;
4256 e = e | 0;
4257 var f = 0,
4258 g = 0,
4259 h = 0,
4260 i = 0,
4261 j = 0,
4262 k = 0,
4263 l = 0;
4264 h = Qc(a | 0, c | 0, 52) | 0;
4265 F() | 0;
4266 h = h & 15;
4267 if (!((d | 0) < 16 & (h | 0) <= (d | 0))) { return; }
4268
4269 if ((h | 0) == (d | 0)) {
4270 d = e;
4271 b[d >> 2] = a;
4272 b[d + 4 >> 2] = c;
4273 return;
4274 }
4275
4276 j = hc(7, d - h | 0) | 0;
4277 k = (j | 0) / 7 | 0;
4278 i = Qc(a | 0, c | 0, 45) | 0;
4279 F() | 0;
4280 if (!(ia(i & 127) | 0)) { g = 0; }else {
4281 a: do { if (!h) { f = 0; }else {
4282 g = 1;
4283
4284 while (1) {
4285 f = Qc(a | 0, c | 0, (15 - g | 0) * 3 | 0) | 0;
4286 F() | 0;
4287 f = f & 7;
4288 if (f | 0) { break a; }
4289 if (g >>> 0 < h >>> 0) { g = g + 1 | 0; }else {
4290 f = 0;
4291 break;
4292 }
4293 }
4294 } } while (0);
4295
4296 g = (f | 0) == 0;
4297 }
4298 l = Rc(h + 1 | 0, 0, 52) | 0;
4299 f = F() | 0 | c & -15728641;
4300 i = (14 - h | 0) * 3 | 0;
4301 c = Rc(7, 0, i | 0) | 0;
4302 c = (l | a) & ~c;
4303 h = f & ~(F() | 0);
4304 sb(c, h, d, e);
4305 f = e + (k << 3) | 0;
4306
4307 if (!g) {
4308 l = Rc(1, 0, i | 0) | 0;
4309 sb(l | c, F() | 0 | h, d, f);
4310 l = f + (k << 3) | 0;
4311 j = Rc(2, 0, i | 0) | 0;
4312 sb(j | c, F() | 0 | h, d, l);
4313 l = l + (k << 3) | 0;
4314 j = Rc(3, 0, i | 0) | 0;
4315 sb(j | c, F() | 0 | h, d, l);
4316 l = l + (k << 3) | 0;
4317 j = Rc(4, 0, i | 0) | 0;
4318 sb(j | c, F() | 0 | h, d, l);
4319 l = l + (k << 3) | 0;
4320 j = Rc(5, 0, i | 0) | 0;
4321 sb(j | c, F() | 0 | h, d, l);
4322 j = Rc(6, 0, i | 0) | 0;
4323 sb(j | c, F() | 0 | h, d, l + (k << 3) | 0);
4324 return;
4325 }
4326
4327 g = f + (k << 3) | 0;
4328
4329 if ((j | 0) > 6) {
4330 j = f + 8 | 0;
4331 l = (g >>> 0 > j >>> 0 ? g : j) + -1 + (0 - f) | 0;
4332 Uc(f | 0, 0, l + 8 & -8 | 0) | 0;
4333 f = j + (l >>> 3 << 3) | 0;
4334 }
4335
4336 l = Rc(2, 0, i | 0) | 0;
4337 sb(l | c, F() | 0 | h, d, f);
4338 l = f + (k << 3) | 0;
4339 j = Rc(3, 0, i | 0) | 0;
4340 sb(j | c, F() | 0 | h, d, l);
4341 l = l + (k << 3) | 0;
4342 j = Rc(4, 0, i | 0) | 0;
4343 sb(j | c, F() | 0 | h, d, l);
4344 l = l + (k << 3) | 0;
4345 j = Rc(5, 0, i | 0) | 0;
4346 sb(j | c, F() | 0 | h, d, l);
4347 j = Rc(6, 0, i | 0) | 0;
4348 sb(j | c, F() | 0 | h, d, l + (k << 3) | 0);
4349 return;
4350 }
4351
4352 function tb(a, b) {
4353 a = a | 0;
4354 b = b | 0;
4355 var c = 0,
4356 d = 0,
4357 e = 0;
4358 e = Qc(a | 0, b | 0, 45) | 0;
4359 F() | 0;
4360
4361 if (!(ia(e & 127) | 0)) {
4362 e = 0;
4363 return e | 0;
4364 }
4365
4366 e = Qc(a | 0, b | 0, 52) | 0;
4367 F() | 0;
4368 e = e & 15;
4369
4370 a: do { if (!e) { c = 0; }else {
4371 d = 1;
4372
4373 while (1) {
4374 c = Qc(a | 0, b | 0, (15 - d | 0) * 3 | 0) | 0;
4375 F() | 0;
4376 c = c & 7;
4377 if (c | 0) { break a; }
4378 if (d >>> 0 < e >>> 0) { d = d + 1 | 0; }else {
4379 c = 0;
4380 break;
4381 }
4382 }
4383 } } while (0);
4384
4385 e = (c | 0) == 0 & 1;
4386 return e | 0;
4387 }
4388
4389 function ub(a, b, c) {
4390 a = a | 0;
4391 b = b | 0;
4392 c = c | 0;
4393 var d = 0,
4394 e = 0;
4395 d = Qc(a | 0, b | 0, 52) | 0;
4396 F() | 0;
4397 d = d & 15;
4398
4399 if ((c | 0) < 16 & (d | 0) <= (c | 0)) {
4400 if ((d | 0) != (c | 0)) {
4401 e = Rc(c | 0, 0, 52) | 0;
4402 a = e | a;
4403 b = F() | 0 | b & -15728641;
4404 if ((d | 0) < (c | 0)) { do {
4405 e = Rc(7, 0, (14 - d | 0) * 3 | 0) | 0;
4406 d = d + 1 | 0;
4407 a = a & ~e;
4408 b = b & ~(F() | 0);
4409 } while ((d | 0) < (c | 0)); }
4410 }
4411 } else {
4412 b = 0;
4413 a = 0;
4414 }
4415
4416 E(b | 0);
4417 return a | 0;
4418 }
4419
4420 function vb(a, c, d) {
4421 a = a | 0;
4422 c = c | 0;
4423 d = d | 0;
4424 var e = 0,
4425 f = 0,
4426 g = 0,
4427 h = 0,
4428 i = 0,
4429 j = 0,
4430 k = 0,
4431 l = 0,
4432 m = 0,
4433 n = 0,
4434 o = 0,
4435 p = 0,
4436 q = 0,
4437 r = 0,
4438 s = 0,
4439 t = 0,
4440 u = 0,
4441 v = 0,
4442 w = 0,
4443 x = 0;
4444 f = a;
4445 e = b[f >> 2] | 0;
4446 f = b[f + 4 >> 2] | 0;
4447
4448 if (0 == 0 & (f & 15728640 | 0) == 0) {
4449 if ((d | 0) <= 0) {
4450 x = 0;
4451 return x | 0;
4452 }
4453
4454 x = c;
4455 b[x >> 2] = e;
4456 b[x + 4 >> 2] = f;
4457
4458 if ((d | 0) == 1) {
4459 x = 0;
4460 return x | 0;
4461 }
4462
4463 e = 1;
4464
4465 do {
4466 v = a + (e << 3) | 0;
4467 w = b[v + 4 >> 2] | 0;
4468 x = c + (e << 3) | 0;
4469 b[x >> 2] = b[v >> 2];
4470 b[x + 4 >> 2] = w;
4471 e = e + 1 | 0;
4472 } while ((e | 0) != (d | 0));
4473
4474 e = 0;
4475 return e | 0;
4476 }
4477
4478 v = d << 3;
4479 w = Ic(v) | 0;
4480 Tc(w | 0, a | 0, v | 0) | 0;
4481 u = Kc(d, 8) | 0;
4482
4483 a: do { if (d | 0) {
4484 e = d;
4485
4486 b: while (1) {
4487 h = w;
4488 l = b[h >> 2] | 0;
4489 h = b[h + 4 >> 2] | 0;
4490 s = Qc(l | 0, h | 0, 52) | 0;
4491 F() | 0;
4492 s = s & 15;
4493 t = s + -1 | 0;
4494 r = (e | 0) > 0;
4495
4496 c: do { if (r) {
4497 q = ((e | 0) < 0) << 31 >> 31;
4498 o = Rc(t | 0, 0, 52) | 0;
4499 p = F() | 0;
4500
4501 if (t >>> 0 > 15) {
4502 f = 0;
4503 a = l;
4504 d = h;
4505
4506 while (1) {
4507 if (!((a | 0) == 0 & (d | 0) == 0)) {
4508 g = Qc(a | 0, d | 0, 52) | 0;
4509 F() | 0;
4510 g = g & 15;
4511 i = (g | 0) < (t | 0);
4512 g = (g | 0) == (t | 0);
4513 k = i ? 0 : g ? a : 0;
4514 a = i ? 0 : g ? d : 0;
4515 d = Pc(k | 0, a | 0, e | 0, q | 0) | 0;
4516 F() | 0;
4517 g = u + (d << 3) | 0;
4518 i = g;
4519 j = b[i >> 2] | 0;
4520 i = b[i + 4 >> 2] | 0;
4521 if ((j | 0) == 0 & (i | 0) == 0) { d = k; }else {
4522 o = 0;
4523 n = d;
4524 m = j;
4525 d = k;
4526 j = g;
4527
4528 while (1) {
4529 if ((o | 0) > (e | 0)) {
4530 x = 33;
4531 break b;
4532 }
4533
4534 if ((m | 0) == (d | 0) & (i & -117440513 | 0) == (a | 0)) {
4535 g = Qc(m | 0, i | 0, 56) | 0;
4536 F() | 0;
4537 g = g & 7;
4538
4539 if ((g | 0) == 7) {
4540 x = 38;
4541 break b;
4542 }
4543
4544 p = Rc(g + 1 | 0, 0, 56) | 0;
4545 a = F() | 0 | a & -117440513;
4546 b[j >> 2] = 0;
4547 b[j + 4 >> 2] = 0;
4548 j = n;
4549 d = p | d;
4550 } else { j = (n + 1 | 0) % (e | 0) | 0; }
4551
4552 g = u + (j << 3) | 0;
4553 i = g;
4554 m = b[i >> 2] | 0;
4555 i = b[i + 4 >> 2] | 0;
4556 if ((m | 0) == 0 & (i | 0) == 0) { break; }else {
4557 o = o + 1 | 0;
4558 n = j;
4559 j = g;
4560 }
4561 }
4562 }
4563 p = g;
4564 b[p >> 2] = d;
4565 b[p + 4 >> 2] = a;
4566 }
4567
4568 f = f + 1 | 0;
4569 if ((f | 0) >= (e | 0)) { break c; }
4570 d = w + (f << 3) | 0;
4571 a = b[d >> 2] | 0;
4572 d = b[d + 4 >> 2] | 0;
4573 }
4574 }
4575
4576 f = 0;
4577 a = l;
4578 d = h;
4579
4580 while (1) {
4581 if (!((a | 0) == 0 & (d | 0) == 0)) {
4582 i = Qc(a | 0, d | 0, 52) | 0;
4583 F() | 0;
4584 i = i & 15;
4585
4586 if ((i | 0) >= (t | 0)) {
4587 if ((i | 0) != (t | 0)) {
4588 a = a | o;
4589 d = d & -15728641 | p;
4590
4591 if (i >>> 0 >= s >>> 0) {
4592 g = t;
4593
4594 do {
4595 n = Rc(7, 0, (14 - g | 0) * 3 | 0) | 0;
4596 g = g + 1 | 0;
4597 a = n | a;
4598 d = F() | 0 | d;
4599 } while (g >>> 0 < i >>> 0);
4600 }
4601 }
4602 } else {
4603 a = 0;
4604 d = 0;
4605 }
4606
4607 i = Pc(a | 0, d | 0, e | 0, q | 0) | 0;
4608 F() | 0;
4609 g = u + (i << 3) | 0;
4610 j = g;
4611 k = b[j >> 2] | 0;
4612 j = b[j + 4 >> 2] | 0;
4613
4614 if (!((k | 0) == 0 & (j | 0) == 0)) {
4615 n = 0;
4616 m = k;
4617 k = g;
4618
4619 while (1) {
4620 if ((n | 0) > (e | 0)) {
4621 x = 33;
4622 break b;
4623 }
4624
4625 if ((m | 0) == (a | 0) & (j & -117440513 | 0) == (d | 0)) {
4626 g = Qc(m | 0, j | 0, 56) | 0;
4627 F() | 0;
4628 g = g & 7;
4629
4630 if ((g | 0) == 7) {
4631 x = 38;
4632 break b;
4633 }
4634
4635 m = Rc(g + 1 | 0, 0, 56) | 0;
4636 d = F() | 0 | d & -117440513;
4637 b[k >> 2] = 0;
4638 b[k + 4 >> 2] = 0;
4639 a = m | a;
4640 } else { i = (i + 1 | 0) % (e | 0) | 0; }
4641
4642 g = u + (i << 3) | 0;
4643 j = g;
4644 m = b[j >> 2] | 0;
4645 j = b[j + 4 >> 2] | 0;
4646 if ((m | 0) == 0 & (j | 0) == 0) { break; }else {
4647 n = n + 1 | 0;
4648 k = g;
4649 }
4650 }
4651 }
4652
4653 n = g;
4654 b[n >> 2] = a;
4655 b[n + 4 >> 2] = d;
4656 }
4657
4658 f = f + 1 | 0;
4659 if ((f | 0) >= (e | 0)) { break c; }
4660 d = w + (f << 3) | 0;
4661 a = b[d >> 2] | 0;
4662 d = b[d + 4 >> 2] | 0;
4663 }
4664 } } while (0);
4665
4666 if ((e + 5 | 0) >>> 0 < 11) {
4667 x = 84;
4668 break;
4669 }
4670
4671 q = Ic(((e | 0) / 6 | 0) << 3) | 0;
4672
4673 d: do { if (r) {
4674 o = 0;
4675 n = 0;
4676
4677 do {
4678 i = u + (o << 3) | 0;
4679 a = i;
4680 f = b[a >> 2] | 0;
4681 a = b[a + 4 >> 2] | 0;
4682
4683 if (!((f | 0) == 0 & (a | 0) == 0)) {
4684 j = Qc(f | 0, a | 0, 56) | 0;
4685 F() | 0;
4686 j = j & 7;
4687 d = j + 1 | 0;
4688 k = a & -117440513;
4689 p = Qc(f | 0, a | 0, 45) | 0;
4690 F() | 0;
4691
4692 e: do { if (ia(p & 127) | 0) {
4693 m = Qc(f | 0, a | 0, 52) | 0;
4694 F() | 0;
4695 m = m & 15;
4696
4697 if (m | 0) {
4698 g = 1;
4699
4700 while (1) {
4701 p = Rc(7, 0, (15 - g | 0) * 3 | 0) | 0;
4702 if (!((f & p | 0) == 0 & (k & (F() | 0) | 0) == 0)) { break e; }
4703 if (g >>> 0 < m >>> 0) { g = g + 1 | 0; }else { break; }
4704 }
4705 }
4706
4707 a = Rc(d | 0, 0, 56) | 0;
4708 f = a | f;
4709 a = F() | 0 | k;
4710 d = i;
4711 b[d >> 2] = f;
4712 b[d + 4 >> 2] = a;
4713 d = j + 2 | 0;
4714 } } while (0);
4715
4716 if ((d | 0) == 7) {
4717 p = q + (n << 3) | 0;
4718 b[p >> 2] = f;
4719 b[p + 4 >> 2] = a & -117440513;
4720 n = n + 1 | 0;
4721 }
4722 }
4723
4724 o = o + 1 | 0;
4725 } while ((o | 0) != (e | 0));
4726
4727 if (r) {
4728 p = ((e | 0) < 0) << 31 >> 31;
4729 m = Rc(t | 0, 0, 52) | 0;
4730 o = F() | 0;
4731
4732 if (t >>> 0 > 15) {
4733 a = 0;
4734 f = 0;
4735
4736 while (1) {
4737 do { if (!((l | 0) == 0 & (h | 0) == 0)) {
4738 j = Qc(l | 0, h | 0, 52) | 0;
4739 F() | 0;
4740 j = j & 15;
4741 g = (j | 0) < (t | 0);
4742 j = (j | 0) == (t | 0);
4743 i = g ? 0 : j ? l : 0;
4744 j = g ? 0 : j ? h : 0;
4745 g = Pc(i | 0, j | 0, e | 0, p | 0) | 0;
4746 F() | 0;
4747 d = 0;
4748
4749 while (1) {
4750 if ((d | 0) > (e | 0)) {
4751 x = 83;
4752 break b;
4753 }
4754
4755 s = u + (g << 3) | 0;
4756 k = b[s + 4 >> 2] | 0;
4757
4758 if ((k & -117440513 | 0) == (j | 0) ? (b[s >> 2] | 0) == (i | 0) : 0) {
4759 x = 55;
4760 break;
4761 }
4762
4763 g = (g + 1 | 0) % (e | 0) | 0;
4764 s = u + (g << 3) | 0;
4765 if ((b[s >> 2] | 0) == (i | 0) ? (b[s + 4 >> 2] | 0) == (j | 0) : 0) { break; }else { d = d + 1 | 0; }
4766 }
4767
4768 if ((x | 0) == 55 ? (x = 0, 0 == 0 & (k & 117440512 | 0) == 100663296) : 0) { break; }
4769 s = c + (f << 3) | 0;
4770 b[s >> 2] = l;
4771 b[s + 4 >> 2] = h;
4772 f = f + 1 | 0;
4773 } } while (0);
4774
4775 a = a + 1 | 0;
4776
4777 if ((a | 0) >= (e | 0)) {
4778 e = n;
4779 break d;
4780 }
4781
4782 h = w + (a << 3) | 0;
4783 l = b[h >> 2] | 0;
4784 h = b[h + 4 >> 2] | 0;
4785 }
4786 }
4787
4788 a = 0;
4789 f = 0;
4790
4791 while (1) {
4792 do { if (!((l | 0) == 0 & (h | 0) == 0)) {
4793 j = Qc(l | 0, h | 0, 52) | 0;
4794 F() | 0;
4795 j = j & 15;
4796 if ((j | 0) >= (t | 0)) {
4797 if ((j | 0) != (t | 0)) {
4798 d = l | m;
4799 g = h & -15728641 | o;
4800 if (j >>> 0 < s >>> 0) { j = g; }else {
4801 i = t;
4802
4803 do {
4804 r = Rc(7, 0, (14 - i | 0) * 3 | 0) | 0;
4805 i = i + 1 | 0;
4806 d = r | d;
4807 g = F() | 0 | g;
4808 } while (i >>> 0 < j >>> 0);
4809
4810 j = g;
4811 }
4812 } else {
4813 d = l;
4814 j = h;
4815 }
4816 } else {
4817 d = 0;
4818 j = 0;
4819 }
4820 i = Pc(d | 0, j | 0, e | 0, p | 0) | 0;
4821 F() | 0;
4822 g = 0;
4823
4824 while (1) {
4825 if ((g | 0) > (e | 0)) {
4826 x = 83;
4827 break b;
4828 }
4829
4830 r = u + (i << 3) | 0;
4831 k = b[r + 4 >> 2] | 0;
4832
4833 if ((k & -117440513 | 0) == (j | 0) ? (b[r >> 2] | 0) == (d | 0) : 0) {
4834 x = 78;
4835 break;
4836 }
4837
4838 i = (i + 1 | 0) % (e | 0) | 0;
4839 r = u + (i << 3) | 0;
4840 if ((b[r >> 2] | 0) == (d | 0) ? (b[r + 4 >> 2] | 0) == (j | 0) : 0) { break; }else { g = g + 1 | 0; }
4841 }
4842
4843 if ((x | 0) == 78 ? (x = 0, 0 == 0 & (k & 117440512 | 0) == 100663296) : 0) { break; }
4844 r = c + (f << 3) | 0;
4845 b[r >> 2] = l;
4846 b[r + 4 >> 2] = h;
4847 f = f + 1 | 0;
4848 } } while (0);
4849
4850 a = a + 1 | 0;
4851
4852 if ((a | 0) >= (e | 0)) {
4853 e = n;
4854 break d;
4855 }
4856
4857 h = w + (a << 3) | 0;
4858 l = b[h >> 2] | 0;
4859 h = b[h + 4 >> 2] | 0;
4860 }
4861 } else {
4862 f = 0;
4863 e = n;
4864 }
4865 } else {
4866 f = 0;
4867 e = 0;
4868 } } while (0);
4869
4870 Uc(u | 0, 0, v | 0) | 0;
4871 Tc(w | 0, q | 0, e << 3 | 0) | 0;
4872 Jc(q);
4873 if (!e) { break a; }else { c = c + (f << 3) | 0; }
4874 }
4875
4876 if ((x | 0) == 33) {
4877 Jc(w);
4878 Jc(u);
4879 x = -1;
4880 return x | 0;
4881 } else if ((x | 0) == 38) {
4882 Jc(w);
4883 Jc(u);
4884 x = -2;
4885 return x | 0;
4886 } else if ((x | 0) == 83) {
4887 Jc(q);
4888 Jc(w);
4889 Jc(u);
4890 x = -1;
4891 return x | 0;
4892 } else if ((x | 0) == 84) {
4893 Tc(c | 0, w | 0, e << 3 | 0) | 0;
4894 break;
4895 }
4896 } } while (0);
4897
4898 Jc(w);
4899 Jc(u);
4900 x = 0;
4901 return x | 0;
4902 }
4903
4904 function wb(a, c, d, e, f) {
4905 a = a | 0;
4906 c = c | 0;
4907 d = d | 0;
4908 e = e | 0;
4909 f = f | 0;
4910 var g = 0,
4911 h = 0,
4912 i = 0,
4913 j = 0,
4914 k = 0,
4915 l = 0;
4916
4917 if ((c | 0) <= 0) {
4918 f = 0;
4919 return f | 0;
4920 }
4921
4922 if ((f | 0) >= 16) {
4923 g = 0;
4924
4925 while (1) {
4926 l = a + (g << 3) | 0;
4927
4928 if (!((b[l >> 2] | 0) == 0 & (b[l + 4 >> 2] | 0) == 0)) {
4929 g = 14;
4930 break;
4931 }
4932
4933 g = g + 1 | 0;
4934
4935 if ((g | 0) >= (c | 0)) {
4936 h = 0;
4937 g = 16;
4938 break;
4939 }
4940 }
4941
4942 if ((g | 0) == 14) { return ((e | 0) > 0 ? -2 : -1) | 0; }else if ((g | 0) == 16) { return h | 0; }
4943 }
4944
4945 g = 0;
4946 l = 0;
4947
4948 a: while (1) {
4949 k = a + (l << 3) | 0;
4950 i = k;
4951 h = b[i >> 2] | 0;
4952 i = b[i + 4 >> 2] | 0;
4953
4954 do { if (!((h | 0) == 0 & (i | 0) == 0)) {
4955 if ((g | 0) >= (e | 0)) {
4956 h = -1;
4957 g = 16;
4958 break a;
4959 }
4960
4961 j = Qc(h | 0, i | 0, 52) | 0;
4962 F() | 0;
4963 j = j & 15;
4964
4965 if ((j | 0) > (f | 0)) {
4966 h = -2;
4967 g = 16;
4968 break a;
4969 }
4970
4971 if ((j | 0) == (f | 0)) {
4972 k = d + (g << 3) | 0;
4973 b[k >> 2] = h;
4974 b[k + 4 >> 2] = i;
4975 g = g + 1 | 0;
4976 break;
4977 }
4978
4979 h = (hc(7, f - j | 0) | 0) + g | 0;
4980
4981 if ((h | 0) > (e | 0)) {
4982 h = -1;
4983 g = 16;
4984 break a;
4985 }
4986
4987 sb(b[k >> 2] | 0, b[k + 4 >> 2] | 0, f, d + (g << 3) | 0);
4988 g = h;
4989 } } while (0);
4990
4991 l = l + 1 | 0;
4992
4993 if ((l | 0) >= (c | 0)) {
4994 h = 0;
4995 g = 16;
4996 break;
4997 }
4998 }
4999
5000 if ((g | 0) == 16) { return h | 0; }
5001 return 0;
5002 }
5003
5004 function xb(a, c, d) {
5005 a = a | 0;
5006 c = c | 0;
5007 d = d | 0;
5008 var e = 0,
5009 f = 0,
5010 g = 0,
5011 h = 0;
5012
5013 if ((c | 0) <= 0) {
5014 d = 0;
5015 return d | 0;
5016 }
5017
5018 if ((d | 0) >= 16) {
5019 e = 0;
5020
5021 while (1) {
5022 h = a + (e << 3) | 0;
5023
5024 if (!((b[h >> 2] | 0) == 0 & (b[h + 4 >> 2] | 0) == 0)) {
5025 e = -1;
5026 f = 13;
5027 break;
5028 }
5029
5030 e = e + 1 | 0;
5031
5032 if ((e | 0) >= (c | 0)) {
5033 e = 0;
5034 f = 13;
5035 break;
5036 }
5037 }
5038
5039 if ((f | 0) == 13) { return e | 0; }
5040 }
5041
5042 e = 0;
5043 h = 0;
5044
5045 a: while (1) {
5046 f = a + (h << 3) | 0;
5047 g = b[f >> 2] | 0;
5048 f = b[f + 4 >> 2] | 0;
5049
5050 do { if (!((g | 0) == 0 & (f | 0) == 0)) {
5051 f = Qc(g | 0, f | 0, 52) | 0;
5052 F() | 0;
5053 f = f & 15;
5054
5055 if ((f | 0) > (d | 0)) {
5056 e = -1;
5057 f = 13;
5058 break a;
5059 }
5060
5061 if ((f | 0) == (d | 0)) {
5062 e = e + 1 | 0;
5063 break;
5064 } else {
5065 e = (hc(7, d - f | 0) | 0) + e | 0;
5066 break;
5067 }
5068 } } while (0);
5069
5070 h = h + 1 | 0;
5071
5072 if ((h | 0) >= (c | 0)) {
5073 f = 13;
5074 break;
5075 }
5076 }
5077
5078 if ((f | 0) == 13) { return e | 0; }
5079 return 0;
5080 }
5081
5082 function yb(a, b) {
5083 a = a | 0;
5084 b = b | 0;
5085 b = Qc(a | 0, b | 0, 52) | 0;
5086 F() | 0;
5087 return b & 1 | 0;
5088 }
5089
5090 function zb(a, b) {
5091 a = a | 0;
5092 b = b | 0;
5093 var c = 0,
5094 d = 0,
5095 e = 0;
5096 e = Qc(a | 0, b | 0, 52) | 0;
5097 F() | 0;
5098 e = e & 15;
5099
5100 if (!e) {
5101 e = 0;
5102 return e | 0;
5103 }
5104
5105 d = 1;
5106
5107 while (1) {
5108 c = Qc(a | 0, b | 0, (15 - d | 0) * 3 | 0) | 0;
5109 F() | 0;
5110 c = c & 7;
5111
5112 if (c | 0) {
5113 d = 5;
5114 break;
5115 }
5116
5117 if (d >>> 0 < e >>> 0) { d = d + 1 | 0; }else {
5118 c = 0;
5119 d = 5;
5120 break;
5121 }
5122 }
5123
5124 if ((d | 0) == 5) { return c | 0; }
5125 return 0;
5126 }
5127
5128 function Ab(a, b) {
5129 a = a | 0;
5130 b = b | 0;
5131 var c = 0,
5132 d = 0,
5133 e = 0,
5134 f = 0,
5135 g = 0,
5136 h = 0,
5137 i = 0;
5138 i = Qc(a | 0, b | 0, 52) | 0;
5139 F() | 0;
5140 i = i & 15;
5141
5142 if (!i) {
5143 h = b;
5144 i = a;
5145 E(h | 0);
5146 return i | 0;
5147 }
5148
5149 h = 1;
5150 c = 0;
5151
5152 while (1) {
5153 f = (15 - h | 0) * 3 | 0;
5154 d = Rc(7, 0, f | 0) | 0;
5155 e = F() | 0;
5156 g = Qc(a | 0, b | 0, f | 0) | 0;
5157 F() | 0;
5158 f = Rc(Ka(g & 7) | 0, 0, f | 0) | 0;
5159 g = F() | 0;
5160 a = f | a & ~d;
5161 b = g | b & ~e;
5162
5163 a: do { if (!c) { if (!((f & d | 0) == 0 & (g & e | 0) == 0)) {
5164 d = Qc(a | 0, b | 0, 52) | 0;
5165 F() | 0;
5166 d = d & 15;
5167 if (!d) { c = 1; }else {
5168 c = 1;
5169
5170 b: while (1) {
5171 g = Qc(a | 0, b | 0, (15 - c | 0) * 3 | 0) | 0;
5172 F() | 0;
5173
5174 switch (g & 7) {
5175 case 1:
5176 break b;
5177
5178 case 0:
5179 break;
5180
5181 default:
5182 {
5183 c = 1;
5184 break a;
5185 }
5186 }
5187
5188 if (c >>> 0 < d >>> 0) { c = c + 1 | 0; }else {
5189 c = 1;
5190 break a;
5191 }
5192 }
5193
5194 c = 1;
5195
5196 while (1) {
5197 g = (15 - c | 0) * 3 | 0;
5198 e = Qc(a | 0, b | 0, g | 0) | 0;
5199 F() | 0;
5200 f = Rc(7, 0, g | 0) | 0;
5201 b = b & ~(F() | 0);
5202 g = Rc(Ka(e & 7) | 0, 0, g | 0) | 0;
5203 a = a & ~f | g;
5204 b = b | (F() | 0);
5205 if (c >>> 0 < d >>> 0) { c = c + 1 | 0; }else {
5206 c = 1;
5207 break;
5208 }
5209 }
5210 }
5211 } else { c = 0; } } } while (0);
5212
5213 if (h >>> 0 < i >>> 0) { h = h + 1 | 0; }else { break; }
5214 }
5215
5216 E(b | 0);
5217 return a | 0;
5218 }
5219
5220 function Bb(a, b) {
5221 a = a | 0;
5222 b = b | 0;
5223 var c = 0,
5224 d = 0,
5225 e = 0,
5226 f = 0,
5227 g = 0;
5228 d = Qc(a | 0, b | 0, 52) | 0;
5229 F() | 0;
5230 d = d & 15;
5231
5232 if (!d) {
5233 c = b;
5234 d = a;
5235 E(c | 0);
5236 return d | 0;
5237 }
5238
5239 c = 1;
5240
5241 while (1) {
5242 f = (15 - c | 0) * 3 | 0;
5243 g = Qc(a | 0, b | 0, f | 0) | 0;
5244 F() | 0;
5245 e = Rc(7, 0, f | 0) | 0;
5246 b = b & ~(F() | 0);
5247 f = Rc(Ka(g & 7) | 0, 0, f | 0) | 0;
5248 a = f | a & ~e;
5249 b = F() | 0 | b;
5250 if (c >>> 0 < d >>> 0) { c = c + 1 | 0; }else { break; }
5251 }
5252
5253 E(b | 0);
5254 return a | 0;
5255 }
5256
5257 function Cb(a, b) {
5258 a = a | 0;
5259 b = b | 0;
5260 var c = 0,
5261 d = 0,
5262 e = 0,
5263 f = 0,
5264 g = 0,
5265 h = 0,
5266 i = 0;
5267 i = Qc(a | 0, b | 0, 52) | 0;
5268 F() | 0;
5269 i = i & 15;
5270
5271 if (!i) {
5272 h = b;
5273 i = a;
5274 E(h | 0);
5275 return i | 0;
5276 }
5277
5278 h = 1;
5279 c = 0;
5280
5281 while (1) {
5282 f = (15 - h | 0) * 3 | 0;
5283 d = Rc(7, 0, f | 0) | 0;
5284 e = F() | 0;
5285 g = Qc(a | 0, b | 0, f | 0) | 0;
5286 F() | 0;
5287 f = Rc(La(g & 7) | 0, 0, f | 0) | 0;
5288 g = F() | 0;
5289 a = f | a & ~d;
5290 b = g | b & ~e;
5291
5292 a: do { if (!c) { if (!((f & d | 0) == 0 & (g & e | 0) == 0)) {
5293 d = Qc(a | 0, b | 0, 52) | 0;
5294 F() | 0;
5295 d = d & 15;
5296 if (!d) { c = 1; }else {
5297 c = 1;
5298
5299 b: while (1) {
5300 g = Qc(a | 0, b | 0, (15 - c | 0) * 3 | 0) | 0;
5301 F() | 0;
5302
5303 switch (g & 7) {
5304 case 1:
5305 break b;
5306
5307 case 0:
5308 break;
5309
5310 default:
5311 {
5312 c = 1;
5313 break a;
5314 }
5315 }
5316
5317 if (c >>> 0 < d >>> 0) { c = c + 1 | 0; }else {
5318 c = 1;
5319 break a;
5320 }
5321 }
5322
5323 c = 1;
5324
5325 while (1) {
5326 e = (15 - c | 0) * 3 | 0;
5327 f = Rc(7, 0, e | 0) | 0;
5328 g = b & ~(F() | 0);
5329 b = Qc(a | 0, b | 0, e | 0) | 0;
5330 F() | 0;
5331 b = Rc(La(b & 7) | 0, 0, e | 0) | 0;
5332 a = a & ~f | b;
5333 b = g | (F() | 0);
5334 if (c >>> 0 < d >>> 0) { c = c + 1 | 0; }else {
5335 c = 1;
5336 break;
5337 }
5338 }
5339 }
5340 } else { c = 0; } } } while (0);
5341
5342 if (h >>> 0 < i >>> 0) { h = h + 1 | 0; }else { break; }
5343 }
5344
5345 E(b | 0);
5346 return a | 0;
5347 }
5348
5349 function Db(a, b) {
5350 a = a | 0;
5351 b = b | 0;
5352 var c = 0,
5353 d = 0,
5354 e = 0,
5355 f = 0,
5356 g = 0;
5357 d = Qc(a | 0, b | 0, 52) | 0;
5358 F() | 0;
5359 d = d & 15;
5360
5361 if (!d) {
5362 c = b;
5363 d = a;
5364 E(c | 0);
5365 return d | 0;
5366 }
5367
5368 c = 1;
5369
5370 while (1) {
5371 g = (15 - c | 0) * 3 | 0;
5372 f = Rc(7, 0, g | 0) | 0;
5373 e = b & ~(F() | 0);
5374 b = Qc(a | 0, b | 0, g | 0) | 0;
5375 F() | 0;
5376 b = Rc(La(b & 7) | 0, 0, g | 0) | 0;
5377 a = b | a & ~f;
5378 b = F() | 0 | e;
5379 if (c >>> 0 < d >>> 0) { c = c + 1 | 0; }else { break; }
5380 }
5381
5382 E(b | 0);
5383 return a | 0;
5384 }
5385
5386 function Eb(a, c) {
5387 a = a | 0;
5388 c = c | 0;
5389 var d = 0,
5390 e = 0,
5391 f = 0,
5392 g = 0,
5393 h = 0,
5394 i = 0,
5395 j = 0,
5396 k = 0,
5397 l = 0;
5398 j = R;
5399 R = R + 64 | 0;
5400 i = j + 40 | 0;
5401 e = j + 24 | 0;
5402 f = j + 12 | 0;
5403 g = j;
5404 Rc(c | 0, 0, 52) | 0;
5405 d = F() | 0 | 134225919;
5406
5407 if (!c) {
5408 if ((b[a + 4 >> 2] | 0) > 2) {
5409 h = 0;
5410 i = 0;
5411 E(h | 0);
5412 R = j;
5413 return i | 0;
5414 }
5415
5416 if ((b[a + 8 >> 2] | 0) > 2) {
5417 h = 0;
5418 i = 0;
5419 E(h | 0);
5420 R = j;
5421 return i | 0;
5422 }
5423
5424 if ((b[a + 12 >> 2] | 0) > 2) {
5425 h = 0;
5426 i = 0;
5427 E(h | 0);
5428 R = j;
5429 return i | 0;
5430 }
5431
5432 Rc(ka(a) | 0, 0, 45) | 0;
5433 h = F() | 0 | d;
5434 i = -1;
5435 E(h | 0);
5436 R = j;
5437 return i | 0;
5438 }
5439 b[i >> 2] = b[a >> 2];
5440 b[i + 4 >> 2] = b[a + 4 >> 2];
5441 b[i + 8 >> 2] = b[a + 8 >> 2];
5442 b[i + 12 >> 2] = b[a + 12 >> 2];
5443 h = i + 4 | 0;
5444
5445 if ((c | 0) > 0) {
5446 a = -1;
5447
5448 while (1) {
5449 b[e >> 2] = b[h >> 2];
5450 b[e + 4 >> 2] = b[h + 4 >> 2];
5451 b[e + 8 >> 2] = b[h + 8 >> 2];
5452
5453 if (!(c & 1)) {
5454 Ea(h);
5455 b[f >> 2] = b[h >> 2];
5456 b[f + 4 >> 2] = b[h + 4 >> 2];
5457 b[f + 8 >> 2] = b[h + 8 >> 2];
5458 Ga(f);
5459 } else {
5460 Da(h);
5461 b[f >> 2] = b[h >> 2];
5462 b[f + 4 >> 2] = b[h + 4 >> 2];
5463 b[f + 8 >> 2] = b[h + 8 >> 2];
5464 Fa(f);
5465 }
5466
5467 Aa(e, f, g);
5468 xa(g);
5469 l = (15 - c | 0) * 3 | 0;
5470 k = Rc(7, 0, l | 0) | 0;
5471 d = d & ~(F() | 0);
5472 l = Rc(Ca(g) | 0, 0, l | 0) | 0;
5473 a = l | a & ~k;
5474 d = F() | 0 | d;
5475 if ((c | 0) > 1) { c = c + -1 | 0; }else { break; }
5476 }
5477 } else { a = -1; }
5478
5479 a: do { if (((b[h >> 2] | 0) <= 2 ? (b[i + 8 >> 2] | 0) <= 2 : 0) ? (b[i + 12 >> 2] | 0) <= 2 : 0) {
5480 e = ka(i) | 0;
5481 c = Rc(e | 0, 0, 45) | 0;
5482 c = c | a;
5483 a = F() | 0 | d & -1040385;
5484 g = la(i) | 0;
5485
5486 if (!(ia(e) | 0)) {
5487 if ((g | 0) <= 0) { break; }
5488 f = 0;
5489
5490 while (1) {
5491 e = Qc(c | 0, a | 0, 52) | 0;
5492 F() | 0;
5493 e = e & 15;
5494
5495 if (e) {
5496 d = 1;
5497
5498 while (1) {
5499 l = (15 - d | 0) * 3 | 0;
5500 i = Qc(c | 0, a | 0, l | 0) | 0;
5501 F() | 0;
5502 k = Rc(7, 0, l | 0) | 0;
5503 a = a & ~(F() | 0);
5504 l = Rc(Ka(i & 7) | 0, 0, l | 0) | 0;
5505 c = c & ~k | l;
5506 a = a | (F() | 0);
5507 if (d >>> 0 < e >>> 0) { d = d + 1 | 0; }else { break; }
5508 }
5509 }
5510
5511 f = f + 1 | 0;
5512 if ((f | 0) == (g | 0)) { break a; }
5513 }
5514 }
5515
5516 f = Qc(c | 0, a | 0, 52) | 0;
5517 F() | 0;
5518 f = f & 15;
5519
5520 b: do { if (f) {
5521 d = 1;
5522
5523 c: while (1) {
5524 l = Qc(c | 0, a | 0, (15 - d | 0) * 3 | 0) | 0;
5525 F() | 0;
5526
5527 switch (l & 7) {
5528 case 1:
5529 break c;
5530
5531 case 0:
5532 break;
5533
5534 default:
5535 break b;
5536 }
5537
5538 if (d >>> 0 < f >>> 0) { d = d + 1 | 0; }else { break b; }
5539 }
5540
5541 if (ma(e, b[i >> 2] | 0) | 0) {
5542 d = 1;
5543
5544 while (1) {
5545 i = (15 - d | 0) * 3 | 0;
5546 k = Rc(7, 0, i | 0) | 0;
5547 l = a & ~(F() | 0);
5548 a = Qc(c | 0, a | 0, i | 0) | 0;
5549 F() | 0;
5550 a = Rc(La(a & 7) | 0, 0, i | 0) | 0;
5551 c = c & ~k | a;
5552 a = l | (F() | 0);
5553 if (d >>> 0 < f >>> 0) { d = d + 1 | 0; }else { break; }
5554 }
5555 } else {
5556 d = 1;
5557
5558 while (1) {
5559 l = (15 - d | 0) * 3 | 0;
5560 i = Qc(c | 0, a | 0, l | 0) | 0;
5561 F() | 0;
5562 k = Rc(7, 0, l | 0) | 0;
5563 a = a & ~(F() | 0);
5564 l = Rc(Ka(i & 7) | 0, 0, l | 0) | 0;
5565 c = c & ~k | l;
5566 a = a | (F() | 0);
5567 if (d >>> 0 < f >>> 0) { d = d + 1 | 0; }else { break; }
5568 }
5569 }
5570 } } while (0);
5571
5572 if ((g | 0) > 0) {
5573 d = 0;
5574
5575 do {
5576 c = Ab(c, a) | 0;
5577 a = F() | 0;
5578 d = d + 1 | 0;
5579 } while ((d | 0) != (g | 0));
5580 }
5581 } else {
5582 c = 0;
5583 a = 0;
5584 } } while (0);
5585
5586 k = a;
5587 l = c;
5588 E(k | 0);
5589 R = j;
5590 return l | 0;
5591 }
5592
5593 function Fb(a) {
5594 a = a | 0;
5595 return (a | 0) % 2 | 0 | 0;
5596 }
5597
5598 function Gb(a, c) {
5599 a = a | 0;
5600 c = c | 0;
5601 var d = 0,
5602 e = 0;
5603 e = R;
5604 R = R + 16 | 0;
5605 d = e;
5606
5607 if ((c >>> 0 <= 15 ? !((b[a + 4 >> 2] & 2146435072 | 0) == 2146435072) : 0) ? !((b[a + 8 + 4 >> 2] & 2146435072 | 0) == 2146435072) : 0) {
5608 Ta(a, c, d);
5609 c = Eb(d, c) | 0;
5610 a = F() | 0;
5611 } else {
5612 a = 0;
5613 c = 0;
5614 }
5615
5616 E(a | 0);
5617 R = e;
5618 return c | 0;
5619 }
5620
5621 function Hb(a, c, d) {
5622 a = a | 0;
5623 c = c | 0;
5624 d = d | 0;
5625 var e = 0,
5626 f = 0,
5627 g = 0,
5628 h = 0;
5629 f = d + 4 | 0;
5630 g = Qc(a | 0, c | 0, 52) | 0;
5631 F() | 0;
5632 g = g & 15;
5633 h = Qc(a | 0, c | 0, 45) | 0;
5634 F() | 0;
5635 e = (g | 0) == 0;
5636
5637 if (!(ia(h & 127) | 0)) {
5638 if (e) {
5639 h = 0;
5640 return h | 0;
5641 }
5642
5643 if ((b[f >> 2] | 0) == 0 ? (b[d + 8 >> 2] | 0) == 0 : 0) { e = (b[d + 12 >> 2] | 0) != 0 & 1; }else { e = 1; }
5644 } else if (e) {
5645 h = 1;
5646 return h | 0;
5647 } else { e = 1; }
5648
5649 d = 1;
5650
5651 while (1) {
5652 if (!(d & 1)) { Ga(f); }else { Fa(f); }
5653 h = Qc(a | 0, c | 0, (15 - d | 0) * 3 | 0) | 0;
5654 F() | 0;
5655 Ha(f, h & 7);
5656 if (d >>> 0 < g >>> 0) { d = d + 1 | 0; }else { break; }
5657 }
5658
5659 return e | 0;
5660 }
5661
5662 function Ib(a, c, d) {
5663 a = a | 0;
5664 c = c | 0;
5665 d = d | 0;
5666 var e = 0,
5667 f = 0,
5668 g = 0,
5669 h = 0,
5670 i = 0,
5671 j = 0,
5672 k = 0,
5673 l = 0;
5674 l = R;
5675 R = R + 16 | 0;
5676 j = l;
5677 k = Qc(a | 0, c | 0, 45) | 0;
5678 F() | 0;
5679 k = k & 127;
5680
5681 a: do { if ((ia(k) | 0) != 0 ? (g = Qc(a | 0, c | 0, 52) | 0, F() | 0, g = g & 15, (g | 0) != 0) : 0) {
5682 e = 1;
5683
5684 b: while (1) {
5685 i = Qc(a | 0, c | 0, (15 - e | 0) * 3 | 0) | 0;
5686 F() | 0;
5687
5688 switch (i & 7) {
5689 case 5:
5690 break b;
5691
5692 case 0:
5693 break;
5694
5695 default:
5696 {
5697 e = c;
5698 break a;
5699 }
5700 }
5701
5702 if (e >>> 0 < g >>> 0) { e = e + 1 | 0; }else {
5703 e = c;
5704 break a;
5705 }
5706 }
5707
5708 f = 1;
5709 e = c;
5710
5711 while (1) {
5712 c = (15 - f | 0) * 3 | 0;
5713 h = Rc(7, 0, c | 0) | 0;
5714 i = e & ~(F() | 0);
5715 e = Qc(a | 0, e | 0, c | 0) | 0;
5716 F() | 0;
5717 e = Rc(La(e & 7) | 0, 0, c | 0) | 0;
5718 a = a & ~h | e;
5719 e = i | (F() | 0);
5720 if (f >>> 0 < g >>> 0) { f = f + 1 | 0; }else { break; }
5721 }
5722 } else { e = c; } } while (0);
5723
5724 i = 7728 + (k * 28 | 0) | 0;
5725 b[d >> 2] = b[i >> 2];
5726 b[d + 4 >> 2] = b[i + 4 >> 2];
5727 b[d + 8 >> 2] = b[i + 8 >> 2];
5728 b[d + 12 >> 2] = b[i + 12 >> 2];
5729
5730 if (!(Hb(a, e, d) | 0)) {
5731 R = l;
5732 return;
5733 }
5734
5735 h = d + 4 | 0;
5736 b[j >> 2] = b[h >> 2];
5737 b[j + 4 >> 2] = b[h + 4 >> 2];
5738 b[j + 8 >> 2] = b[h + 8 >> 2];
5739 g = Qc(a | 0, e | 0, 52) | 0;
5740 F() | 0;
5741 i = g & 15;
5742 if (!(g & 1)) { g = i; }else {
5743 Ga(h);
5744 g = i + 1 | 0;
5745 }
5746 if (!(ia(k) | 0)) { e = 0; }else {
5747 c: do { if (!i) { e = 0; }else {
5748 c = 1;
5749
5750 while (1) {
5751 f = Qc(a | 0, e | 0, (15 - c | 0) * 3 | 0) | 0;
5752 F() | 0;
5753 f = f & 7;
5754
5755 if (f | 0) {
5756 e = f;
5757 break c;
5758 }
5759
5760 if (c >>> 0 < i >>> 0) { c = c + 1 | 0; }else {
5761 e = 0;
5762 break;
5763 }
5764 }
5765 } } while (0);
5766
5767 e = (e | 0) == 4 & 1;
5768 }
5769
5770 if (!(Za(d, g, e, 0) | 0)) {
5771 if ((g | 0) != (i | 0)) {
5772 b[h >> 2] = b[j >> 2];
5773 b[h + 4 >> 2] = b[j + 4 >> 2];
5774 b[h + 8 >> 2] = b[j + 8 >> 2];
5775 }
5776 } else {
5777 if (ia(k) | 0) { do {} while ((Za(d, g, 0, 0) | 0) != 0); }
5778 if ((g | 0) != (i | 0)) { Ea(h); }
5779 }
5780
5781 R = l;
5782 return;
5783 }
5784
5785 function Jb(a, b, c) {
5786 a = a | 0;
5787 b = b | 0;
5788 c = c | 0;
5789 var d = 0,
5790 e = 0;
5791 d = R;
5792 R = R + 16 | 0;
5793 e = d;
5794 Ib(a, b, e);
5795 b = Qc(a | 0, b | 0, 52) | 0;
5796 F() | 0;
5797 Wa(e, b & 15, c);
5798 R = d;
5799 return;
5800 }
5801
5802 function Kb(a, b, c) {
5803 a = a | 0;
5804 b = b | 0;
5805 c = c | 0;
5806 var d = 0,
5807 e = 0,
5808 f = 0,
5809 g = 0,
5810 h = 0;
5811 h = R;
5812 R = R + 16 | 0;
5813 f = h;
5814 Ib(a, b, f);
5815 g = Qc(a | 0, b | 0, 52) | 0;
5816 F() | 0;
5817 g = g & 15;
5818 e = Qc(a | 0, b | 0, 45) | 0;
5819 F() | 0;
5820
5821 if (!(ia(e & 127) | 0)) {
5822 b = 0;
5823 $a(f, g, b, c);
5824 R = h;
5825 return;
5826 }
5827
5828 a: do { if (!g) { d = 0; }else {
5829 e = 1;
5830
5831 while (1) {
5832 d = Qc(a | 0, b | 0, (15 - e | 0) * 3 | 0) | 0;
5833 F() | 0;
5834 d = d & 7;
5835 if (d | 0) { break a; }
5836 if (e >>> 0 < g >>> 0) { e = e + 1 | 0; }else {
5837 d = 0;
5838 break;
5839 }
5840 }
5841 } } while (0);
5842
5843 b = (d | 0) == 0 & 1;
5844 $a(f, g, b, c);
5845 R = h;
5846 return;
5847 }
5848
5849 function Lb(a, b) {
5850 a = a | 0;
5851 b = b | 0;
5852 var c = 0,
5853 d = 0,
5854 e = 0;
5855 d = Qc(a | 0, b | 0, 45) | 0;
5856 F() | 0;
5857
5858 if (!(ia(d & 127) | 0)) {
5859 d = 2;
5860 return d | 0;
5861 }
5862
5863 d = Qc(a | 0, b | 0, 52) | 0;
5864 F() | 0;
5865 d = d & 15;
5866
5867 if (!d) {
5868 d = 5;
5869 return d | 0;
5870 }
5871
5872 c = 1;
5873
5874 while (1) {
5875 e = Rc(7, 0, (15 - c | 0) * 3 | 0) | 0;
5876
5877 if (!((e & a | 0) == 0 & ((F() | 0) & b | 0) == 0)) {
5878 c = 2;
5879 a = 6;
5880 break;
5881 }
5882
5883 if (c >>> 0 < d >>> 0) { c = c + 1 | 0; }else {
5884 c = 5;
5885 a = 6;
5886 break;
5887 }
5888 }
5889
5890 if ((a | 0) == 6) { return c | 0; }
5891 return 0;
5892 }
5893
5894 function Mb(a, c, d) {
5895 a = a | 0;
5896 c = c | 0;
5897 d = d | 0;
5898 var e = 0,
5899 f = 0,
5900 g = 0,
5901 h = 0,
5902 i = 0,
5903 j = 0,
5904 k = 0,
5905 l = 0,
5906 m = 0;
5907 m = R;
5908 R = R + 128 | 0;
5909 k = m + 112 | 0;
5910 g = m + 96 | 0;
5911 l = m;
5912 f = Qc(a | 0, c | 0, 52) | 0;
5913 F() | 0;
5914 i = f & 15;
5915 b[k >> 2] = i;
5916 h = Qc(a | 0, c | 0, 45) | 0;
5917 F() | 0;
5918 h = h & 127;
5919
5920 a: do { if (ia(h) | 0) {
5921 if (i | 0) {
5922 e = 1;
5923
5924 while (1) {
5925 j = Rc(7, 0, (15 - e | 0) * 3 | 0) | 0;
5926
5927 if (!((j & a | 0) == 0 & ((F() | 0) & c | 0) == 0)) {
5928 f = 0;
5929 break a;
5930 }
5931
5932 if (e >>> 0 < i >>> 0) { e = e + 1 | 0; }else { break; }
5933 }
5934 }
5935
5936 if (!(f & 1)) {
5937 j = Rc(i + 1 | 0, 0, 52) | 0;
5938 l = F() | 0 | c & -15728641;
5939 k = Rc(7, 0, (14 - i | 0) * 3 | 0) | 0;
5940 Mb((j | a) & ~k, l & ~(F() | 0), d);
5941 R = m;
5942 return;
5943 } else { f = 1; }
5944 } else { f = 0; } } while (0);
5945
5946 Ib(a, c, g);
5947
5948 if (f) {
5949 Ya(g, k, l);
5950 j = 5;
5951 } else {
5952 ab(g, k, l);
5953 j = 6;
5954 }
5955
5956 b: do { if (ia(h) | 0) {
5957 if (!i) { e = 20; }else {
5958 e = 1;
5959
5960 while (1) {
5961 h = Rc(7, 0, (15 - e | 0) * 3 | 0) | 0;
5962
5963 if (!((h & a | 0) == 0 & ((F() | 0) & c | 0) == 0)) {
5964 e = 8;
5965 break b;
5966 }
5967
5968 if (e >>> 0 < i >>> 0) { e = e + 1 | 0; }else {
5969 e = 20;
5970 break;
5971 }
5972 }
5973 }
5974 } else { e = 8; } } while (0);
5975
5976 Uc(d | 0, -1, e | 0) | 0;
5977
5978 if (f) {
5979 f = 0;
5980
5981 do {
5982 g = l + (f << 4) | 0;
5983 _a(g, b[k >> 2] | 0) | 0;
5984 g = b[g >> 2] | 0;
5985 e = 0;
5986
5987 while (1) {
5988 h = d + (e << 2) | 0;
5989 i = b[h >> 2] | 0;
5990 if ((i | 0) == -1 | (i | 0) == (g | 0)) { break; }else { e = e + 1 | 0; }
5991 }
5992
5993 b[h >> 2] = g;
5994 f = f + 1 | 0;
5995 } while ((f | 0) != (j | 0));
5996 } else {
5997 f = 0;
5998
5999 do {
6000 g = l + (f << 4) | 0;
6001 Za(g, b[k >> 2] | 0, 0, 1) | 0;
6002 g = b[g >> 2] | 0;
6003 e = 0;
6004
6005 while (1) {
6006 h = d + (e << 2) | 0;
6007 i = b[h >> 2] | 0;
6008 if ((i | 0) == -1 | (i | 0) == (g | 0)) { break; }else { e = e + 1 | 0; }
6009 }
6010
6011 b[h >> 2] = g;
6012 f = f + 1 | 0;
6013 } while ((f | 0) != (j | 0));
6014 }
6015
6016 R = m;
6017 return;
6018 }
6019
6020 function Nb() {
6021 return 12;
6022 }
6023
6024 function Ob(a, c) {
6025 a = a | 0;
6026 c = c | 0;
6027 var d = 0,
6028 e = 0,
6029 f = 0,
6030 g = 0,
6031 h = 0,
6032 i = 0,
6033 j = 0;
6034 Rc(a | 0, 0, 52) | 0;
6035 i = F() | 0 | 134225919;
6036
6037 if ((a | 0) < 1) {
6038 e = 0;
6039 d = 0;
6040
6041 do {
6042 if (ia(e) | 0) {
6043 Rc(e | 0, 0, 45) | 0;
6044 h = i | (F() | 0);
6045 a = c + (d << 3) | 0;
6046 b[a >> 2] = -1;
6047 b[a + 4 >> 2] = h;
6048 d = d + 1 | 0;
6049 }
6050
6051 e = e + 1 | 0;
6052 } while ((e | 0) != 122);
6053
6054 return;
6055 }
6056
6057 h = 0;
6058 d = 0;
6059
6060 do {
6061 if (ia(h) | 0) {
6062 Rc(h | 0, 0, 45) | 0;
6063 e = 1;
6064 f = -1;
6065 g = i | (F() | 0);
6066
6067 while (1) {
6068 j = Rc(7, 0, (15 - e | 0) * 3 | 0) | 0;
6069 f = f & ~j;
6070 g = g & ~(F() | 0);
6071 if ((e | 0) == (a | 0)) { break; }else { e = e + 1 | 0; }
6072 }
6073
6074 j = c + (d << 3) | 0;
6075 b[j >> 2] = f;
6076 b[j + 4 >> 2] = g;
6077 d = d + 1 | 0;
6078 }
6079
6080 h = h + 1 | 0;
6081 } while ((h | 0) != 122);
6082
6083 return;
6084 }
6085
6086 function Pb(a, c, d, e) {
6087 a = a | 0;
6088 c = c | 0;
6089 d = d | 0;
6090 e = e | 0;
6091 var f = 0,
6092 g = 0,
6093 h = 0,
6094 i = 0,
6095 j = 0,
6096 k = 0;
6097 i = R;
6098 R = R + 64 | 0;
6099 h = i;
6100
6101 if ((a | 0) == (d | 0) & (c | 0) == (e | 0) | (0 != 0 | (c & 2013265920 | 0) != 134217728 | (0 != 0 | (e & 2013265920 | 0) != 134217728))) {
6102 h = 0;
6103 R = i;
6104 return h | 0;
6105 }
6106
6107 f = Qc(a | 0, c | 0, 52) | 0;
6108 F() | 0;
6109 f = f & 15;
6110 g = Qc(d | 0, e | 0, 52) | 0;
6111 F() | 0;
6112
6113 if ((f | 0) != (g & 15 | 0)) {
6114 h = 0;
6115 R = i;
6116 return h | 0;
6117 }
6118
6119 g = f + -1 | 0;
6120
6121 if (f >>> 0 > 1 ? (k = qb(a, c, g) | 0, j = F() | 0, g = qb(d, e, g) | 0, (k | 0) == (g | 0) & (j | 0) == (F() | 0)) : 0) {
6122 g = (f ^ 15) * 3 | 0;
6123 f = Qc(a | 0, c | 0, g | 0) | 0;
6124 F() | 0;
6125 f = f & 7;
6126 g = Qc(d | 0, e | 0, g | 0) | 0;
6127 F() | 0;
6128 g = g & 7;
6129
6130 if ((f | 0) == 0 | (g | 0) == 0) {
6131 k = 1;
6132 R = i;
6133 return k | 0;
6134 }
6135
6136 if ((b[21136 + (f << 2) >> 2] | 0) == (g | 0)) {
6137 k = 1;
6138 R = i;
6139 return k | 0;
6140 }
6141
6142 if ((b[21168 + (f << 2) >> 2] | 0) == (g | 0)) {
6143 k = 1;
6144 R = i;
6145 return k | 0;
6146 }
6147 }
6148
6149 f = h;
6150 g = f + 56 | 0;
6151
6152 do {
6153 b[f >> 2] = 0;
6154 f = f + 4 | 0;
6155 } while ((f | 0) < (g | 0));
6156
6157 _(a, c, 1, h);
6158
6159 k = h;
6160
6161 if (((((!((b[k >> 2] | 0) == (d | 0) ? (b[k + 4 >> 2] | 0) == (e | 0) : 0) ? (k = h + 8 | 0, !((b[k >> 2] | 0) == (d | 0) ? (b[k + 4 >> 2] | 0) == (e | 0) : 0)) : 0) ? (k = h + 16 | 0, !((b[k >> 2] | 0) == (d | 0) ? (b[k + 4 >> 2] | 0) == (e | 0) : 0)) : 0) ? (k = h + 24 | 0, !((b[k >> 2] | 0) == (d | 0) ? (b[k + 4 >> 2] | 0) == (e | 0) : 0)) : 0) ? (k = h + 32 | 0, !((b[k >> 2] | 0) == (d | 0) ? (b[k + 4 >> 2] | 0) == (e | 0) : 0)) : 0) ? (k = h + 40 | 0, !((b[k >> 2] | 0) == (d | 0) ? (b[k + 4 >> 2] | 0) == (e | 0) : 0)) : 0) {
6162 f = h + 48 | 0;
6163 f = ((b[f >> 2] | 0) == (d | 0) ? (b[f + 4 >> 2] | 0) == (e | 0) : 0) & 1;
6164 } else { f = 1; }
6165
6166 k = f;
6167 R = i;
6168 return k | 0;
6169 }
6170
6171 function Qb(a, c, d, e) {
6172 a = a | 0;
6173 c = c | 0;
6174 d = d | 0;
6175 e = e | 0;
6176 var f = 0,
6177 g = 0,
6178 h = 0,
6179 i = 0;
6180 h = R;
6181 R = R + 16 | 0;
6182 f = h;
6183
6184 if (!(Pb(a, c, d, e) | 0)) {
6185 a = 0;
6186 g = 0;
6187 E(a | 0);
6188 R = h;
6189 return g | 0;
6190 }
6191
6192 g = c & -2130706433;
6193 b[f >> 2] = 0;
6194 i = ca(a, c, 1, f) | 0;
6195
6196 if (!((i | 0) == (d | 0) & (F() | 0) == (e | 0))) {
6197 b[f >> 2] = 0;
6198 i = ca(a, c, 2, f) | 0;
6199
6200 if (!((i | 0) == (d | 0) & (F() | 0) == (e | 0))) {
6201 b[f >> 2] = 0;
6202 i = ca(a, c, 3, f) | 0;
6203
6204 if (!((i | 0) == (d | 0) & (F() | 0) == (e | 0))) {
6205 b[f >> 2] = 0;
6206 i = ca(a, c, 4, f) | 0;
6207
6208 if (!((i | 0) == (d | 0) & (F() | 0) == (e | 0))) {
6209 b[f >> 2] = 0;
6210 i = ca(a, c, 5, f) | 0;
6211
6212 if (!((i | 0) == (d | 0) & (F() | 0) == (e | 0))) {
6213 b[f >> 2] = 0;
6214 i = ca(a, c, 6, f) | 0;
6215
6216 if ((i | 0) == (d | 0) & (F() | 0) == (e | 0)) {
6217 c = 0;
6218 d = 100663296;
6219 } else {
6220 g = 0;
6221 i = 0;
6222 E(g | 0);
6223 R = h;
6224 return i | 0;
6225 }
6226 } else {
6227 c = 0;
6228 d = 83886080;
6229 }
6230 } else {
6231 c = 0;
6232 d = 67108864;
6233 }
6234 } else {
6235 c = 0;
6236 d = 50331648;
6237 }
6238 } else {
6239 c = 0;
6240 d = 33554432;
6241 }
6242 } else {
6243 c = 0;
6244 d = 16777216;
6245 }
6246
6247 g = g | d | 268435456;
6248 i = a | c;
6249 E(g | 0);
6250 R = h;
6251 return i | 0;
6252 }
6253
6254 function Rb(a, b) {
6255 a = a | 0;
6256 b = b | 0;
6257 var c = 0;
6258 c = 0 == 0 & (b & 2013265920 | 0) == 268435456;
6259 E((c ? b & -2130706433 | 134217728 : 0) | 0);
6260 return (c ? a : 0) | 0;
6261 }
6262
6263 function Sb(a, c) {
6264 a = a | 0;
6265 c = c | 0;
6266 var d = 0,
6267 e = 0,
6268 f = 0;
6269 e = R;
6270 R = R + 16 | 0;
6271 d = e;
6272
6273 if (!(0 == 0 & (c & 2013265920 | 0) == 268435456)) {
6274 c = 0;
6275 d = 0;
6276 E(c | 0);
6277 R = e;
6278 return d | 0;
6279 }
6280
6281 f = Qc(a | 0, c | 0, 56) | 0;
6282 F() | 0;
6283 b[d >> 2] = 0;
6284 d = ca(a, c & -2130706433 | 134217728, f & 7, d) | 0;
6285 c = F() | 0;
6286 E(c | 0);
6287 R = e;
6288 return d | 0;
6289 }
6290
6291 function Tb(a, b) {
6292 a = a | 0;
6293 b = b | 0;
6294 var c = 0;
6295
6296 if (!(0 == 0 & (b & 2013265920 | 0) == 268435456)) {
6297 c = 0;
6298 return c | 0;
6299 }
6300
6301 c = Qc(a | 0, b | 0, 56) | 0;
6302 F() | 0;
6303
6304 switch (c & 7) {
6305 case 0:
6306 case 7:
6307 {
6308 c = 0;
6309 return c | 0;
6310 }
6311
6312 default:
6313
6314 }
6315
6316 c = b & -2130706433 | 134217728;
6317
6318 if (0 == 0 & (b & 117440512 | 0) == 16777216 & (tb(a, c) | 0) != 0) {
6319 c = 0;
6320 return c | 0;
6321 }
6322
6323 c = pb(a, c) | 0;
6324 return c | 0;
6325 }
6326
6327 function Ub(a, c, d) {
6328 a = a | 0;
6329 c = c | 0;
6330 d = d | 0;
6331 var e = 0,
6332 f = 0,
6333 g = 0,
6334 h = 0,
6335 i = 0;
6336 g = R;
6337 R = R + 16 | 0;
6338 e = g;
6339 h = 0 == 0 & (c & 2013265920 | 0) == 268435456;
6340 f = c & -2130706433 | 134217728;
6341 i = d;
6342 b[i >> 2] = h ? a : 0;
6343 b[i + 4 >> 2] = h ? f : 0;
6344
6345 if (h) {
6346 c = Qc(a | 0, c | 0, 56) | 0;
6347 F() | 0;
6348 b[e >> 2] = 0;
6349 a = ca(a, f, c & 7, e) | 0;
6350 c = F() | 0;
6351 } else {
6352 a = 0;
6353 c = 0;
6354 }
6355
6356 i = d + 8 | 0;
6357 b[i >> 2] = a;
6358 b[i + 4 >> 2] = c;
6359 R = g;
6360 return;
6361 }
6362
6363 function Vb(a, c, d) {
6364 a = a | 0;
6365 c = c | 0;
6366 d = d | 0;
6367 var e = 0,
6368 f = 0;
6369 f = (tb(a, c) | 0) == 0;
6370 c = c & -2130706433;
6371 e = d;
6372 b[e >> 2] = f ? a : 0;
6373 b[e + 4 >> 2] = f ? c | 285212672 : 0;
6374 e = d + 8 | 0;
6375 b[e >> 2] = a;
6376 b[e + 4 >> 2] = c | 301989888;
6377 e = d + 16 | 0;
6378 b[e >> 2] = a;
6379 b[e + 4 >> 2] = c | 318767104;
6380 e = d + 24 | 0;
6381 b[e >> 2] = a;
6382 b[e + 4 >> 2] = c | 335544320;
6383 e = d + 32 | 0;
6384 b[e >> 2] = a;
6385 b[e + 4 >> 2] = c | 352321536;
6386 d = d + 40 | 0;
6387 b[d >> 2] = a;
6388 b[d + 4 >> 2] = c | 369098752;
6389 return;
6390 }
6391
6392 function Wb(a, c, d) {
6393 a = a | 0;
6394 c = c | 0;
6395 d = d | 0;
6396 var e = 0,
6397 f = 0,
6398 g = 0,
6399 h = 0,
6400 i = 0,
6401 j = 0,
6402 k = 0,
6403 l = 0;
6404 l = R;
6405 R = R + 368 | 0;
6406 f = l + 352 | 0;
6407 i = l + 184 | 0;
6408 j = l + 16 | 0;
6409 k = l;
6410 Uc(i | 0, 0, 168) | 0;
6411 Uc(j | 0, 0, 168) | 0;
6412 b[k >> 2] = 0;
6413 b[k + 4 >> 2] = 0;
6414 b[k + 8 >> 2] = 0;
6415 b[k + 12 >> 2] = 0;
6416 h = 0 == 0 & (c & 2013265920 | 0) == 268435456;
6417 e = c & -2130706433 | 134217728;
6418 Kb(h ? a : 0, h ? e : 0, i);
6419
6420 if (h) {
6421 c = Qc(a | 0, c | 0, 56) | 0;
6422 F() | 0;
6423 b[f >> 2] = 0;
6424 a = ca(a, e, c & 7, f) | 0;
6425 c = F() | 0;
6426 } else {
6427 a = 0;
6428 c = 0;
6429 }
6430
6431 Kb(a, c, j);
6432
6433 if ((b[i >> 2] | 0) <= 0) {
6434 k = 0;
6435 b[d >> 2] = k;
6436 R = l;
6437 return;
6438 }
6439
6440 h = i + 24 | 0;
6441 a = 0;
6442 c = 0;
6443 g = 0;
6444
6445 do {
6446 f = i + 8 + (g << 4) | 0;
6447
6448 a: do { if ((b[j >> 2] | 0) > 0) {
6449 e = 0;
6450
6451 while (1) {
6452 if (cb(f, j + 8 + (e << 4) | 0, 1.0e-06) | 0) { break; }
6453 e = e + 1 | 0;
6454 if ((e | 0) >= (b[j >> 2] | 0)) { break a; }
6455 }
6456
6457 b: do { if (!g) {
6458 if ((b[j >> 2] | 0) > 0) {
6459 e = 0;
6460
6461 do {
6462 if (cb(h, j + 8 + (e << 4) | 0, 1.0e-06) | 0) { break b; }
6463 e = e + 1 | 0;
6464 } while ((e | 0) < (b[j >> 2] | 0));
6465 }
6466 b[k >> 2] = b[f >> 2];
6467 b[k + 4 >> 2] = b[f + 4 >> 2];
6468 b[k + 8 >> 2] = b[f + 8 >> 2];
6469 b[k + 12 >> 2] = b[f + 12 >> 2];
6470 c = 1;
6471 break a;
6472 } } while (0);
6473
6474 e = d + 8 + (a << 4) | 0;
6475 b[e >> 2] = b[f >> 2];
6476 b[e + 4 >> 2] = b[f + 4 >> 2];
6477 b[e + 8 >> 2] = b[f + 8 >> 2];
6478 b[e + 12 >> 2] = b[f + 12 >> 2];
6479 a = a + 1 | 0;
6480 } } while (0);
6481
6482 g = g + 1 | 0;
6483 } while ((g | 0) < (b[i >> 2] | 0));
6484
6485 if (!c) {
6486 k = a;
6487 b[d >> 2] = k;
6488 R = l;
6489 return;
6490 }
6491
6492 j = d + 8 + (a << 4) | 0;
6493 b[j >> 2] = b[k >> 2];
6494 b[j + 4 >> 2] = b[k + 4 >> 2];
6495 b[j + 8 >> 2] = b[k + 8 >> 2];
6496 b[j + 12 >> 2] = b[k + 12 >> 2];
6497 k = a + 1 | 0;
6498 b[d >> 2] = k;
6499 R = l;
6500 return;
6501 }
6502
6503 function Xb(a) {
6504 a = a | 0;
6505 var c = 0,
6506 d = 0,
6507 e = 0;
6508 c = Kc(1, 12) | 0;
6509 if (!c) { G(22330, 22285, 46, 22343); }
6510 d = a + 4 | 0;
6511 e = b[d >> 2] | 0;
6512
6513 if (e | 0) {
6514 e = e + 8 | 0;
6515 b[e >> 2] = c;
6516 b[d >> 2] = c;
6517 return c | 0;
6518 }
6519
6520 if (b[a >> 2] | 0) { G(22360, 22285, 58, 22383); }
6521 e = a;
6522 b[e >> 2] = c;
6523 b[d >> 2] = c;
6524 return c | 0;
6525 }
6526
6527 function Yb(a, c) {
6528 a = a | 0;
6529 c = c | 0;
6530 var d = 0,
6531 e = 0;
6532 e = Ic(24) | 0;
6533 if (!e) { G(22397, 22285, 75, 22411); }
6534 b[e >> 2] = b[c >> 2];
6535 b[e + 4 >> 2] = b[c + 4 >> 2];
6536 b[e + 8 >> 2] = b[c + 8 >> 2];
6537 b[e + 12 >> 2] = b[c + 12 >> 2];
6538 b[e + 16 >> 2] = 0;
6539 c = a + 4 | 0;
6540 d = b[c >> 2] | 0;
6541
6542 if (d | 0) {
6543 b[d + 16 >> 2] = e;
6544 b[c >> 2] = e;
6545 return e | 0;
6546 }
6547
6548 if (b[a >> 2] | 0) { G(22426, 22285, 79, 22411); }
6549 b[a >> 2] = e;
6550 b[c >> 2] = e;
6551 return e | 0;
6552 }
6553
6554 function Zb(a) {
6555 a = a | 0;
6556 var c = 0,
6557 d = 0,
6558 e = 0,
6559 f = 0;
6560 if (!a) { return; }
6561 e = 1;
6562
6563 while (1) {
6564 c = b[a >> 2] | 0;
6565 if (c | 0) { do {
6566 d = b[c >> 2] | 0;
6567 if (d | 0) { do {
6568 f = d;
6569 d = b[d + 16 >> 2] | 0;
6570 Jc(f);
6571 } while ((d | 0) != 0); }
6572 f = c;
6573 c = b[c + 8 >> 2] | 0;
6574 Jc(f);
6575 } while ((c | 0) != 0); }
6576 c = a;
6577 a = b[a + 8 >> 2] | 0;
6578 if (!e) { Jc(c); }
6579 if (!a) { break; }else { e = 0; }
6580 }
6581
6582 return;
6583 }
6584
6585 function _b(a) {
6586 a = a | 0;
6587 var c = 0,
6588 d = 0,
6589 f = 0,
6590 g = 0,
6591 h = 0.0,
6592 i = 0,
6593 j = 0.0,
6594 k = 0.0,
6595 l = 0,
6596 m = 0,
6597 n = 0,
6598 o = 0,
6599 p = 0,
6600 r = 0,
6601 s = 0.0,
6602 t = 0.0,
6603 u = 0.0,
6604 v = 0.0,
6605 w = 0.0,
6606 x = 0.0,
6607 y = 0,
6608 z = 0,
6609 A = 0,
6610 B = 0,
6611 C = 0,
6612 D = 0,
6613 E = 0,
6614 F = 0,
6615 H = 0,
6616 I = 0,
6617 J = 0,
6618 K = 0;
6619 g = a + 8 | 0;
6620
6621 if (b[g >> 2] | 0) {
6622 K = 1;
6623 return K | 0;
6624 }
6625
6626 f = b[a >> 2] | 0;
6627
6628 if (!f) {
6629 K = 0;
6630 return K | 0;
6631 }
6632
6633 c = f;
6634 d = 0;
6635
6636 do {
6637 d = d + 1 | 0;
6638 c = b[c + 8 >> 2] | 0;
6639 } while ((c | 0) != 0);
6640
6641 if (d >>> 0 < 2) {
6642 K = 0;
6643 return K | 0;
6644 }
6645
6646 I = Ic(d << 2) | 0;
6647 if (!I) { G(22446, 22285, 312, 22465); }
6648 H = Ic(d << 5) | 0;
6649 if (!H) { G(22487, 22285, 316, 22465); }
6650 b[a >> 2] = 0;
6651 z = a + 4 | 0;
6652 b[z >> 2] = 0;
6653 b[g >> 2] = 0;
6654 d = 0;
6655 F = 0;
6656 y = 0;
6657 n = 0;
6658
6659 a: while (1) {
6660 m = b[f >> 2] | 0;
6661
6662 if (m) {
6663 h = 0.0;
6664 i = m;
6665
6666 do {
6667 k = +e[i + 8 >> 3];
6668 c = i;
6669 i = b[i + 16 >> 2] | 0;
6670 l = (i | 0) == 0;
6671 g = l ? m : i;
6672 j = +e[g + 8 >> 3];
6673
6674 if (+q(+(k - j)) > 3.141592653589793) {
6675 K = 14;
6676 break;
6677 }
6678
6679 h = h + (j - k) * (+e[c >> 3] + +e[g >> 3]);
6680 } while (!l);
6681
6682 if ((K | 0) == 14) {
6683 K = 0;
6684 h = 0.0;
6685 c = m;
6686
6687 do {
6688 x = +e[c + 8 >> 3];
6689 E = c + 16 | 0;
6690 D = b[E >> 2] | 0;
6691 D = (D | 0) == 0 ? m : D;
6692 w = +e[D + 8 >> 3];
6693 h = h + (+e[c >> 3] + +e[D >> 3]) * ((w < 0.0 ? w + 6.283185307179586 : w) - (x < 0.0 ? x + 6.283185307179586 : x));
6694 c = b[((c | 0) == 0 ? f : E) >> 2] | 0;
6695 } while ((c | 0) != 0);
6696 }
6697
6698 if (h > 0.0) {
6699 b[I + (F << 2) >> 2] = f;
6700 F = F + 1 | 0;
6701 g = y;
6702 c = n;
6703 } else { K = 19; }
6704 } else { K = 19; }
6705
6706 if ((K | 0) == 19) {
6707 K = 0;
6708
6709 do { if (!d) {
6710 if (!n) {
6711 if (!(b[a >> 2] | 0)) {
6712 g = z;
6713 i = a;
6714 c = f;
6715 d = a;
6716 break;
6717 } else {
6718 K = 27;
6719 break a;
6720 }
6721 } else {
6722 g = z;
6723 i = n + 8 | 0;
6724 c = f;
6725 d = a;
6726 break;
6727 }
6728 } else {
6729 c = d + 8 | 0;
6730
6731 if (b[c >> 2] | 0) {
6732 K = 21;
6733 break a;
6734 }
6735
6736 d = Kc(1, 12) | 0;
6737
6738 if (!d) {
6739 K = 23;
6740 break a;
6741 }
6742
6743 b[c >> 2] = d;
6744 g = d + 4 | 0;
6745 i = d;
6746 c = n;
6747 } } while (0);
6748
6749 b[i >> 2] = f;
6750 b[g >> 2] = f;
6751 i = H + (y << 5) | 0;
6752 l = b[f >> 2] | 0;
6753
6754 if (l) {
6755 m = H + (y << 5) + 8 | 0;
6756 e[m >> 3] = 1797693134862315708145274.0e284;
6757 n = H + (y << 5) + 24 | 0;
6758 e[n >> 3] = 1797693134862315708145274.0e284;
6759 e[i >> 3] = -1797693134862315708145274.0e284;
6760 o = H + (y << 5) + 16 | 0;
6761 e[o >> 3] = -1797693134862315708145274.0e284;
6762 u = 1797693134862315708145274.0e284;
6763 v = -1797693134862315708145274.0e284;
6764 g = 0;
6765 p = l;
6766 k = 1797693134862315708145274.0e284;
6767 s = 1797693134862315708145274.0e284;
6768 t = -1797693134862315708145274.0e284;
6769 j = -1797693134862315708145274.0e284;
6770
6771 while (1) {
6772 h = +e[p >> 3];
6773 x = +e[p + 8 >> 3];
6774 p = b[p + 16 >> 2] | 0;
6775 r = (p | 0) == 0;
6776 w = +e[(r ? l : p) + 8 >> 3];
6777
6778 if (h < k) {
6779 e[m >> 3] = h;
6780 k = h;
6781 }
6782
6783 if (x < s) {
6784 e[n >> 3] = x;
6785 s = x;
6786 }
6787
6788 if (h > t) { e[i >> 3] = h; }else { h = t; }
6789
6790 if (x > j) {
6791 e[o >> 3] = x;
6792 j = x;
6793 }
6794
6795 u = x > 0.0 & x < u ? x : u;
6796 v = x < 0.0 & x > v ? x : v;
6797 g = g | +q(+(x - w)) > 3.141592653589793;
6798 if (r) { break; }else { t = h; }
6799 }
6800
6801 if (g) {
6802 e[o >> 3] = v;
6803 e[n >> 3] = u;
6804 }
6805 } else {
6806 b[i >> 2] = 0;
6807 b[i + 4 >> 2] = 0;
6808 b[i + 8 >> 2] = 0;
6809 b[i + 12 >> 2] = 0;
6810 b[i + 16 >> 2] = 0;
6811 b[i + 20 >> 2] = 0;
6812 b[i + 24 >> 2] = 0;
6813 b[i + 28 >> 2] = 0;
6814 }
6815
6816 g = y + 1 | 0;
6817 }
6818
6819 E = f + 8 | 0;
6820 f = b[E >> 2] | 0;
6821 b[E >> 2] = 0;
6822
6823 if (!f) {
6824 K = 45;
6825 break;
6826 } else {
6827 y = g;
6828 n = c;
6829 }
6830 }
6831
6832 if ((K | 0) == 21) { G(22263, 22285, 32, 22297); }else if ((K | 0) == 23) { G(22317, 22285, 34, 22297); }else if ((K | 0) == 27) { G(22360, 22285, 58, 22383); }else if ((K | 0) == 45) {
6833 b: do { if ((F | 0) > 0) {
6834 E = (g | 0) == 0;
6835 C = g << 2;
6836 D = (a | 0) == 0;
6837 B = 0;
6838 c = 0;
6839
6840 while (1) {
6841 A = b[I + (B << 2) >> 2] | 0;
6842
6843 if (!E) {
6844 y = Ic(C) | 0;
6845
6846 if (!y) {
6847 K = 50;
6848 break;
6849 }
6850
6851 z = Ic(C) | 0;
6852
6853 if (!z) {
6854 K = 52;
6855 break;
6856 }
6857
6858 c: do { if (!D) {
6859 g = 0;
6860 d = 0;
6861 i = a;
6862
6863 while (1) {
6864 f = H + (g << 5) | 0;
6865
6866 if ($b(b[i >> 2] | 0, f, b[A >> 2] | 0) | 0) {
6867 b[y + (d << 2) >> 2] = i;
6868 b[z + (d << 2) >> 2] = f;
6869 r = d + 1 | 0;
6870 } else { r = d; }
6871
6872 i = b[i + 8 >> 2] | 0;
6873 if (!i) { break; }else {
6874 g = g + 1 | 0;
6875 d = r;
6876 }
6877 }
6878
6879 if ((r | 0) > 0) {
6880 f = b[y >> 2] | 0;
6881 if ((r | 0) == 1) { d = f; }else {
6882 o = 0;
6883 p = -1;
6884 d = f;
6885 n = f;
6886
6887 while (1) {
6888 l = b[n >> 2] | 0;
6889 f = 0;
6890 i = 0;
6891
6892 while (1) {
6893 g = b[b[y + (i << 2) >> 2] >> 2] | 0;
6894 if ((g | 0) == (l | 0)) { m = f; }else { m = f + (($b(g, b[z + (i << 2) >> 2] | 0, b[l >> 2] | 0) | 0) & 1) | 0; }
6895 i = i + 1 | 0;
6896 if ((i | 0) == (r | 0)) { break; }else { f = m; }
6897 }
6898
6899 g = (m | 0) > (p | 0);
6900 d = g ? n : d;
6901 f = o + 1 | 0;
6902 if ((f | 0) == (r | 0)) { break c; }
6903 o = f;
6904 p = g ? m : p;
6905 n = b[y + (f << 2) >> 2] | 0;
6906 }
6907 }
6908 } else { d = 0; }
6909 } else { d = 0; } } while (0);
6910
6911 Jc(y);
6912 Jc(z);
6913
6914 if (d) {
6915 g = d + 4 | 0;
6916 f = b[g >> 2] | 0;
6917
6918 if (!f) {
6919 if (b[d >> 2] | 0) {
6920 K = 70;
6921 break;
6922 }
6923 } else { d = f + 8 | 0; }
6924
6925 b[d >> 2] = A;
6926 b[g >> 2] = A;
6927 } else { K = 73; }
6928 } else { K = 73; }
6929
6930 if ((K | 0) == 73) {
6931 K = 0;
6932 c = b[A >> 2] | 0;
6933 if (c | 0) { do {
6934 z = c;
6935 c = b[c + 16 >> 2] | 0;
6936 Jc(z);
6937 } while ((c | 0) != 0); }
6938 Jc(A);
6939 c = 2;
6940 }
6941
6942 B = B + 1 | 0;
6943
6944 if ((B | 0) >= (F | 0)) {
6945 J = c;
6946 break b;
6947 }
6948 }
6949
6950 if ((K | 0) == 50) { G(22502, 22285, 246, 22521); }else if ((K | 0) == 52) { G(22540, 22285, 248, 22521); }else if ((K | 0) == 70) { G(22360, 22285, 58, 22383); }
6951 } else { J = 0; } } while (0);
6952
6953 Jc(I);
6954 Jc(H);
6955 K = J;
6956 return K | 0;
6957 }
6958 return 0;
6959 }
6960
6961 function $b(a, c, d) {
6962 a = a | 0;
6963 c = c | 0;
6964 d = d | 0;
6965 var f = 0.0,
6966 g = 0.0,
6967 h = 0.0,
6968 i = 0.0,
6969 j = 0.0,
6970 k = 0.0,
6971 l = 0.0,
6972 m = 0;
6973
6974 if (!(ta(c, d) | 0)) {
6975 a = 0;
6976 return a | 0;
6977 }
6978
6979 c = ra(c) | 0;
6980 l = +e[d >> 3];
6981 f = +e[d + 8 >> 3];
6982 f = c & f < 0.0 ? f + 6.283185307179586 : f;
6983 a = b[a >> 2] | 0;
6984
6985 if (!a) {
6986 a = 0;
6987 return a | 0;
6988 }
6989
6990 if (c) {
6991 c = 0;
6992 d = a;
6993
6994 a: while (1) {
6995 while (1) {
6996 i = +e[d >> 3];
6997 k = +e[d + 8 >> 3];
6998 d = d + 16 | 0;
6999 m = b[d >> 2] | 0;
7000 m = (m | 0) == 0 ? a : m;
7001 h = +e[m >> 3];
7002 g = +e[m + 8 >> 3];
7003
7004 if (i > h) {
7005 j = i;
7006 i = k;
7007 } else {
7008 j = h;
7009 h = i;
7010 i = g;
7011 g = k;
7012 }
7013
7014 if (!(l < h | l > j)) { break; }
7015 d = b[d >> 2] | 0;
7016
7017 if (!d) {
7018 d = 22;
7019 break a;
7020 }
7021 }
7022
7023 k = g < 0.0 ? g + 6.283185307179586 : g;
7024 i = i < 0.0 ? i + 6.283185307179586 : i;
7025 f = i == f | k == f ? f + -2.220446049250313e-16 : f;
7026 k = k + (l - h) / (j - h) * (i - k);
7027 if ((k < 0.0 ? k + 6.283185307179586 : k) > f) { c = c ^ 1; }
7028 d = b[d >> 2] | 0;
7029
7030 if (!d) {
7031 d = 22;
7032 break;
7033 }
7034 }
7035
7036 if ((d | 0) == 22) { return c | 0; }
7037 } else {
7038 c = 0;
7039 d = a;
7040
7041 b: while (1) {
7042 while (1) {
7043 i = +e[d >> 3];
7044 k = +e[d + 8 >> 3];
7045 d = d + 16 | 0;
7046 m = b[d >> 2] | 0;
7047 m = (m | 0) == 0 ? a : m;
7048 h = +e[m >> 3];
7049 g = +e[m + 8 >> 3];
7050
7051 if (i > h) {
7052 j = i;
7053 i = k;
7054 } else {
7055 j = h;
7056 h = i;
7057 i = g;
7058 g = k;
7059 }
7060
7061 if (!(l < h | l > j)) { break; }
7062 d = b[d >> 2] | 0;
7063
7064 if (!d) {
7065 d = 22;
7066 break b;
7067 }
7068 }
7069
7070 f = i == f | g == f ? f + -2.220446049250313e-16 : f;
7071 if (g + (l - h) / (j - h) * (i - g) > f) { c = c ^ 1; }
7072 d = b[d >> 2] | 0;
7073
7074 if (!d) {
7075 d = 22;
7076 break;
7077 }
7078 }
7079
7080 if ((d | 0) == 22) { return c | 0; }
7081 }
7082
7083 return 0;
7084 }
7085
7086 function ac(c, d, e, f, g) {
7087 c = c | 0;
7088 d = d | 0;
7089 e = e | 0;
7090 f = f | 0;
7091 g = g | 0;
7092 var h = 0,
7093 i = 0,
7094 j = 0,
7095 k = 0,
7096 l = 0,
7097 m = 0,
7098 n = 0,
7099 o = 0,
7100 p = 0,
7101 q = 0,
7102 r = 0,
7103 s = 0,
7104 t = 0,
7105 u = 0;
7106 u = R;
7107 R = R + 32 | 0;
7108 t = u + 16 | 0;
7109 s = u;
7110 h = Qc(c | 0, d | 0, 52) | 0;
7111 F() | 0;
7112 h = h & 15;
7113 p = Qc(e | 0, f | 0, 52) | 0;
7114 F() | 0;
7115
7116 if ((h | 0) != (p & 15 | 0)) {
7117 t = 1;
7118 R = u;
7119 return t | 0;
7120 }
7121
7122 l = Qc(c | 0, d | 0, 45) | 0;
7123 F() | 0;
7124 l = l & 127;
7125 m = Qc(e | 0, f | 0, 45) | 0;
7126 F() | 0;
7127 m = m & 127;
7128 p = (l | 0) != (m | 0);
7129
7130 if (p) {
7131 j = oa(l, m) | 0;
7132
7133 if ((j | 0) == 7) {
7134 t = 2;
7135 R = u;
7136 return t | 0;
7137 }
7138
7139 k = oa(m, l) | 0;
7140 if ((k | 0) == 7) { G(22564, 22588, 151, 22598); }else {
7141 q = j;
7142 i = k;
7143 }
7144 } else {
7145 q = 0;
7146 i = 0;
7147 }
7148
7149 n = ia(l) | 0;
7150 o = ia(m) | 0;
7151 b[t >> 2] = 0;
7152 b[t + 4 >> 2] = 0;
7153 b[t + 8 >> 2] = 0;
7154 b[t + 12 >> 2] = 0;
7155
7156 do { if (!q) {
7157 Hb(e, f, t) | 0;
7158
7159 if ((n | 0) != 0 & (o | 0) != 0) {
7160 if ((m | 0) != (l | 0)) { G(22716, 22588, 243, 22598); }
7161 i = zb(c, d) | 0;
7162 h = zb(e, f) | 0;
7163
7164 if (!(a[22032 + (i * 7 | 0) + h >> 0] | 0)) {
7165 i = b[21200 + (i * 28 | 0) + (h << 2) >> 2] | 0;
7166
7167 if ((i | 0) > 0) {
7168 j = t + 4 | 0;
7169 h = 0;
7170
7171 do {
7172 Ja(j);
7173 h = h + 1 | 0;
7174 } while ((h | 0) != (i | 0));
7175
7176 r = 50;
7177 } else { r = 50; }
7178 } else { h = 5; }
7179 } else { r = 50; }
7180 } else {
7181 m = b[4304 + (l * 28 | 0) + (q << 2) >> 2] | 0;
7182 j = (m | 0) > 0;
7183 if (!o) {
7184 if (j) {
7185 l = 0;
7186 k = e;
7187 j = f;
7188
7189 do {
7190 k = Db(k, j) | 0;
7191 j = F() | 0;
7192 i = La(i) | 0;
7193 l = l + 1 | 0;
7194 } while ((l | 0) != (m | 0));
7195
7196 m = i;
7197 l = k;
7198 k = j;
7199 } else {
7200 m = i;
7201 l = e;
7202 k = f;
7203 }
7204 } else if (j) {
7205 l = 0;
7206 k = e;
7207 j = f;
7208
7209 do {
7210 k = Cb(k, j) | 0;
7211 j = F() | 0;
7212 i = La(i) | 0;
7213 if ((i | 0) == 1) { i = La(1) | 0; }
7214 l = l + 1 | 0;
7215 } while ((l | 0) != (m | 0));
7216
7217 m = i;
7218 l = k;
7219 k = j;
7220 } else {
7221 m = i;
7222 l = e;
7223 k = f;
7224 }
7225 Hb(l, k, t) | 0;
7226 if (!p) { G(22611, 22588, 181, 22598); }
7227 j = (n | 0) != 0;
7228 i = (o | 0) != 0;
7229 if (j & i) { G(22638, 22588, 182, 22598); }
7230 if (!j) {
7231 if (i) {
7232 i = zb(l, k) | 0;
7233
7234 if (a[22032 + (i * 7 | 0) + m >> 0] | 0) {
7235 h = 4;
7236 break;
7237 }
7238
7239 l = 0;
7240 k = b[21200 + (m * 28 | 0) + (i << 2) >> 2] | 0;
7241 r = 26;
7242 } else { i = 0; }
7243 } else {
7244 i = zb(c, d) | 0;
7245
7246 if (a[22032 + (i * 7 | 0) + q >> 0] | 0) {
7247 h = 3;
7248 break;
7249 }
7250
7251 k = b[21200 + (i * 28 | 0) + (q << 2) >> 2] | 0;
7252 l = k;
7253 r = 26;
7254 }
7255
7256 if ((r | 0) == 26) {
7257 if ((k | 0) <= -1) { G(22669, 22588, 212, 22598); }
7258 if ((l | 0) <= -1) { G(22692, 22588, 213, 22598); }
7259
7260 if ((k | 0) > 0) {
7261 j = t + 4 | 0;
7262 i = 0;
7263
7264 do {
7265 Ja(j);
7266 i = i + 1 | 0;
7267 } while ((i | 0) != (k | 0));
7268
7269 i = l;
7270 } else { i = l; }
7271 }
7272 b[s >> 2] = 0;
7273 b[s + 4 >> 2] = 0;
7274 b[s + 8 >> 2] = 0;
7275 Ha(s, q);
7276 if (h | 0) { while (1) {
7277 if (!(Fb(h) | 0)) { Ga(s); }else { Fa(s); }
7278 if ((h | 0) > 1) { h = h + -1 | 0; }else { break; }
7279 } }
7280
7281 if ((i | 0) > 0) {
7282 h = 0;
7283
7284 do {
7285 Ja(s);
7286 h = h + 1 | 0;
7287 } while ((h | 0) != (i | 0));
7288 }
7289
7290 r = t + 4 | 0;
7291 za(r, s, r);
7292 xa(r);
7293 r = 50;
7294 } } while (0);
7295
7296 if ((r | 0) == 50) {
7297 h = t + 4 | 0;
7298 b[g >> 2] = b[h >> 2];
7299 b[g + 4 >> 2] = b[h + 4 >> 2];
7300 b[g + 8 >> 2] = b[h + 8 >> 2];
7301 h = 0;
7302 }
7303
7304 t = h;
7305 R = u;
7306 return t | 0;
7307 }
7308
7309 function bc(a, c, d, e) {
7310 a = a | 0;
7311 c = c | 0;
7312 d = d | 0;
7313 e = e | 0;
7314 var f = 0,
7315 g = 0,
7316 h = 0,
7317 i = 0,
7318 j = 0,
7319 k = 0,
7320 l = 0,
7321 m = 0,
7322 n = 0,
7323 o = 0,
7324 p = 0,
7325 q = 0,
7326 r = 0,
7327 s = 0,
7328 t = 0;
7329 p = R;
7330 R = R + 48 | 0;
7331 h = p + 36 | 0;
7332 i = p + 24 | 0;
7333 j = p + 12 | 0;
7334 k = p;
7335 g = Qc(a | 0, c | 0, 52) | 0;
7336 F() | 0;
7337 g = g & 15;
7338 n = Qc(a | 0, c | 0, 45) | 0;
7339 F() | 0;
7340 n = n & 127;
7341 l = ia(n) | 0;
7342 Rc(g | 0, 0, 52) | 0;
7343 r = F() | 0 | 134225919;
7344 q = e;
7345 b[q >> 2] = -1;
7346 b[q + 4 >> 2] = r;
7347
7348 if (!g) {
7349 if ((b[d >> 2] | 0) > 1) {
7350 r = 1;
7351 R = p;
7352 return r | 0;
7353 }
7354
7355 if ((b[d + 4 >> 2] | 0) > 1) {
7356 r = 1;
7357 R = p;
7358 return r | 0;
7359 }
7360
7361 if ((b[d + 8 >> 2] | 0) > 1) {
7362 r = 1;
7363 R = p;
7364 return r | 0;
7365 }
7366
7367 f = na(n, Ca(d) | 0) | 0;
7368
7369 if ((f | 0) == 127) {
7370 r = 1;
7371 R = p;
7372 return r | 0;
7373 }
7374
7375 o = Rc(f | 0, 0, 45) | 0;
7376 q = F() | 0;
7377 n = e;
7378 q = b[n + 4 >> 2] & -1040385 | q;
7379 r = e;
7380 b[r >> 2] = b[n >> 2] | o;
7381 b[r + 4 >> 2] = q;
7382 r = 0;
7383 R = p;
7384 return r | 0;
7385 }
7386 b[h >> 2] = b[d >> 2];
7387 b[h + 4 >> 2] = b[d + 4 >> 2];
7388 b[h + 8 >> 2] = b[d + 8 >> 2];
7389
7390 while (1) {
7391 b[i >> 2] = b[h >> 2];
7392 b[i + 4 >> 2] = b[h + 4 >> 2];
7393 b[i + 8 >> 2] = b[h + 8 >> 2];
7394
7395 if (!(Fb(g) | 0)) {
7396 Ea(h);
7397 b[j >> 2] = b[h >> 2];
7398 b[j + 4 >> 2] = b[h + 4 >> 2];
7399 b[j + 8 >> 2] = b[h + 8 >> 2];
7400 Ga(j);
7401 } else {
7402 Da(h);
7403 b[j >> 2] = b[h >> 2];
7404 b[j + 4 >> 2] = b[h + 4 >> 2];
7405 b[j + 8 >> 2] = b[h + 8 >> 2];
7406 Fa(j);
7407 }
7408
7409 Aa(i, j, k);
7410 xa(k);
7411 q = e;
7412 s = b[q >> 2] | 0;
7413 q = b[q + 4 >> 2] | 0;
7414 t = (15 - g | 0) * 3 | 0;
7415 d = Rc(7, 0, t | 0) | 0;
7416 q = q & ~(F() | 0);
7417 t = Rc(Ca(k) | 0, 0, t | 0) | 0;
7418 q = F() | 0 | q;
7419 r = e;
7420 b[r >> 2] = t | s & ~d;
7421 b[r + 4 >> 2] = q;
7422 if ((g | 0) > 1) { g = g + -1 | 0; }else { break; }
7423 }
7424
7425 a: do { if (((b[h >> 2] | 0) <= 1 ? (b[h + 4 >> 2] | 0) <= 1 : 0) ? (b[h + 8 >> 2] | 0) <= 1 : 0) {
7426 g = Ca(h) | 0;
7427 i = na(n, g) | 0;
7428 if ((i | 0) == 127) { k = 0; }else { k = ia(i) | 0; }
7429
7430 b: do { if (!g) {
7431 if ((l | 0) != 0 & (k | 0) != 0) {
7432 t = zb(a, c) | 0;
7433 g = e;
7434 g = 21408 + (t * 28 | 0) + ((zb(b[g >> 2] | 0, b[g + 4 >> 2] | 0) | 0) << 2) | 0;
7435 g = b[g >> 2] | 0;
7436 if ((g | 0) <= -1) { G(22840, 22588, 433, 22773); }
7437
7438 if (!g) {
7439 f = i;
7440 g = 55;
7441 } else {
7442 h = e;
7443 f = 0;
7444 d = b[h >> 2] | 0;
7445 h = b[h + 4 >> 2] | 0;
7446
7447 do {
7448 d = Bb(d, h) | 0;
7449 h = F() | 0;
7450 t = e;
7451 b[t >> 2] = d;
7452 b[t + 4 >> 2] = h;
7453 f = f + 1 | 0;
7454 } while ((f | 0) < (g | 0));
7455
7456 f = i;
7457 g = 54;
7458 }
7459 } else {
7460 f = i;
7461 g = 54;
7462 }
7463 } else {
7464 if (l) {
7465 h = 21408 + ((zb(a, c) | 0) * 28 | 0) + (g << 2) | 0;
7466 h = b[h >> 2] | 0;
7467
7468 if ((h | 0) > 0) {
7469 d = 0;
7470
7471 do {
7472 g = Ka(g) | 0;
7473 d = d + 1 | 0;
7474 } while ((d | 0) != (h | 0));
7475 }
7476
7477 if ((g | 0) == 1) {
7478 f = 3;
7479 break a;
7480 }
7481
7482 d = na(n, g) | 0;
7483 if ((d | 0) == 127) { G(22743, 22588, 376, 22773); }
7484
7485 if (!(ia(d) | 0)) {
7486 o = h;
7487 m = g;
7488 f = d;
7489 } else { G(22786, 22588, 377, 22773); }
7490 } else {
7491 o = 0;
7492 m = g;
7493 f = i;
7494 }
7495
7496 j = b[4304 + (n * 28 | 0) + (m << 2) >> 2] | 0;
7497 if ((j | 0) <= -1) { G(22817, 22588, 384, 22773); }
7498
7499 if (!k) {
7500 if ((o | 0) <= -1) { G(22669, 22588, 417, 22773); }
7501
7502 if (o | 0) {
7503 h = e;
7504 g = 0;
7505 d = b[h >> 2] | 0;
7506 h = b[h + 4 >> 2] | 0;
7507
7508 do {
7509 d = Bb(d, h) | 0;
7510 h = F() | 0;
7511 t = e;
7512 b[t >> 2] = d;
7513 b[t + 4 >> 2] = h;
7514 g = g + 1 | 0;
7515 } while ((g | 0) < (o | 0));
7516 }
7517
7518 if ((j | 0) <= 0) {
7519 g = 54;
7520 break;
7521 }
7522
7523 h = e;
7524 g = 0;
7525 d = b[h >> 2] | 0;
7526 h = b[h + 4 >> 2] | 0;
7527
7528 while (1) {
7529 d = Bb(d, h) | 0;
7530 h = F() | 0;
7531 t = e;
7532 b[t >> 2] = d;
7533 b[t + 4 >> 2] = h;
7534 g = g + 1 | 0;
7535
7536 if ((g | 0) == (j | 0)) {
7537 g = 54;
7538 break b;
7539 }
7540 }
7541 }
7542
7543 i = oa(f, n) | 0;
7544 if ((i | 0) == 7) { G(22564, 22588, 393, 22773); }
7545 g = e;
7546 d = b[g >> 2] | 0;
7547 g = b[g + 4 >> 2] | 0;
7548
7549 if ((j | 0) > 0) {
7550 h = 0;
7551
7552 do {
7553 d = Bb(d, g) | 0;
7554 g = F() | 0;
7555 t = e;
7556 b[t >> 2] = d;
7557 b[t + 4 >> 2] = g;
7558 h = h + 1 | 0;
7559 } while ((h | 0) != (j | 0));
7560 }
7561
7562 d = zb(d, g) | 0;
7563 t = ja(f) | 0;
7564 d = b[(t ? 21824 : 21616) + (i * 28 | 0) + (d << 2) >> 2] | 0;
7565 if ((d | 0) <= -1) { G(22669, 22588, 412, 22773); }
7566 if (!d) { g = 54; }else {
7567 i = e;
7568 g = 0;
7569 h = b[i >> 2] | 0;
7570 i = b[i + 4 >> 2] | 0;
7571
7572 do {
7573 h = Ab(h, i) | 0;
7574 i = F() | 0;
7575 t = e;
7576 b[t >> 2] = h;
7577 b[t + 4 >> 2] = i;
7578 g = g + 1 | 0;
7579 } while ((g | 0) < (d | 0));
7580
7581 g = 54;
7582 }
7583 } } while (0);
7584
7585 if ((g | 0) == 54) { if (k) { g = 55; } }
7586
7587 if ((g | 0) == 55) {
7588 t = e;
7589
7590 if ((zb(b[t >> 2] | 0, b[t + 4 >> 2] | 0) | 0) == 1) {
7591 f = 4;
7592 break;
7593 }
7594 }
7595
7596 t = e;
7597 r = b[t >> 2] | 0;
7598 t = b[t + 4 >> 2] & -1040385;
7599 s = Rc(f | 0, 0, 45) | 0;
7600 t = t | (F() | 0);
7601 f = e;
7602 b[f >> 2] = r | s;
7603 b[f + 4 >> 2] = t;
7604 f = 0;
7605 } else { f = 2; } } while (0);
7606
7607 t = f;
7608 R = p;
7609 return t | 0;
7610 }
7611
7612 function cc(a, b, c, d, e) {
7613 a = a | 0;
7614 b = b | 0;
7615 c = c | 0;
7616 d = d | 0;
7617 e = e | 0;
7618 var f = 0,
7619 g = 0;
7620 g = R;
7621 R = R + 16 | 0;
7622 f = g;
7623 a = ac(a, b, c, d, f) | 0;
7624
7625 if (!a) {
7626 Pa(f, e);
7627 a = 0;
7628 }
7629
7630 R = g;
7631 return a | 0;
7632 }
7633
7634 function dc(a, b, c, d) {
7635 a = a | 0;
7636 b = b | 0;
7637 c = c | 0;
7638 d = d | 0;
7639 var e = 0,
7640 f = 0;
7641 e = R;
7642 R = R + 16 | 0;
7643 f = e;
7644 Qa(c, f);
7645 d = bc(a, b, f, d) | 0;
7646 R = e;
7647 return d | 0;
7648 }
7649
7650 function ec(a, b, c, d) {
7651 a = a | 0;
7652 b = b | 0;
7653 c = c | 0;
7654 d = d | 0;
7655 var e = 0,
7656 f = 0,
7657 g = 0;
7658 g = R;
7659 R = R + 32 | 0;
7660 e = g + 12 | 0;
7661 f = g;
7662 if ((ac(a, b, a, b, e) | 0) == 0 ? (ac(a, b, c, d, f) | 0) == 0 : 0) { a = Oa(e, f) | 0; }else { a = -1; }
7663 R = g;
7664 return a | 0;
7665 }
7666
7667 function fc(a, b, c, d) {
7668 a = a | 0;
7669 b = b | 0;
7670 c = c | 0;
7671 d = d | 0;
7672 var e = 0,
7673 f = 0,
7674 g = 0;
7675 g = R;
7676 R = R + 32 | 0;
7677 e = g + 12 | 0;
7678 f = g;
7679 if ((ac(a, b, a, b, e) | 0) == 0 ? (ac(a, b, c, d, f) | 0) == 0 : 0) { a = Oa(e, f) | 0; }else { a = -1; }
7680 R = g;
7681 return (a >>> 31 ^ 1) + a | 0;
7682 }
7683
7684 function gc(a, c, d, e, f) {
7685 a = a | 0;
7686 c = c | 0;
7687 d = d | 0;
7688 e = e | 0;
7689 f = f | 0;
7690 var g = 0,
7691 h = 0,
7692 i = 0.0,
7693 j = 0.0,
7694 k = 0,
7695 l = 0,
7696 m = 0,
7697 n = 0,
7698 o = 0.0,
7699 p = 0.0,
7700 r = 0.0,
7701 s = 0,
7702 t = 0,
7703 u = 0,
7704 v = 0,
7705 w = 0,
7706 x = 0,
7707 y = 0.0;
7708 x = R;
7709 R = R + 48 | 0;
7710 g = x + 24 | 0;
7711 h = x + 12 | 0;
7712 w = x;
7713
7714 if ((ac(a, c, a, c, g) | 0) == 0 ? (ac(a, c, d, e, h) | 0) == 0 : 0) {
7715 v = Oa(g, h) | 0;
7716
7717 if ((v | 0) < 0) {
7718 w = v;
7719 R = x;
7720 return w | 0;
7721 }
7722 b[g >> 2] = 0;
7723 b[g + 4 >> 2] = 0;
7724 b[g + 8 >> 2] = 0;
7725 b[h >> 2] = 0;
7726 b[h + 4 >> 2] = 0;
7727 b[h + 8 >> 2] = 0;
7728 ac(a, c, a, c, g) | 0;
7729 ac(a, c, d, e, h) | 0;
7730 Ra(g);
7731 Ra(h);
7732
7733 if (!v) {
7734 e = g + 4 | 0;
7735 n = g + 8 | 0;
7736 s = e;
7737 t = n;
7738 u = g;
7739 d = b[g >> 2] | 0;
7740 e = b[e >> 2] | 0;
7741 g = b[n >> 2] | 0;
7742 p = 0.0;
7743 r = 0.0;
7744 o = 0.0;
7745 } else {
7746 l = b[g >> 2] | 0;
7747 o = +(v | 0);
7748 s = g + 4 | 0;
7749 m = b[s >> 2] | 0;
7750 t = g + 8 | 0;
7751 n = b[t >> 2] | 0;
7752 u = g;
7753 d = l;
7754 e = m;
7755 g = n;
7756 p = +((b[h >> 2] | 0) - l | 0) / o;
7757 r = +((b[h + 4 >> 2] | 0) - m | 0) / o;
7758 o = +((b[h + 8 >> 2] | 0) - n | 0) / o;
7759 }
7760
7761 b[w >> 2] = d;
7762 n = w + 4 | 0;
7763 b[n >> 2] = e;
7764 m = w + 8 | 0;
7765 b[m >> 2] = g;
7766 l = 0;
7767
7768 while (1) {
7769 j = +(l | 0);
7770 y = p * j + +(d | 0);
7771 i = r * j + +(b[s >> 2] | 0);
7772 j = o * j + +(b[t >> 2] | 0);
7773 e = ~~+Sc(+y);
7774 h = ~~+Sc(+i);
7775 d = ~~+Sc(+j);
7776 y = +q(+(+(e | 0) - y));
7777 i = +q(+(+(h | 0) - i));
7778 j = +q(+(+(d | 0) - j));
7779
7780 do { if (!(y > i & y > j)) {
7781 k = 0 - e | 0;
7782
7783 if (i > j) {
7784 g = k - d | 0;
7785 break;
7786 } else {
7787 g = h;
7788 d = k - h | 0;
7789 break;
7790 }
7791 } else {
7792 e = 0 - (h + d) | 0;
7793 g = h;
7794 } } while (0);
7795
7796 b[w >> 2] = e;
7797 b[n >> 2] = g;
7798 b[m >> 2] = d;
7799 Sa(w);
7800 bc(a, c, w, f + (l << 3) | 0) | 0;
7801 if ((l | 0) == (v | 0)) { break; }
7802 l = l + 1 | 0;
7803 d = b[u >> 2] | 0;
7804 }
7805
7806 w = 0;
7807 R = x;
7808 return w | 0;
7809 }
7810
7811 w = -1;
7812 R = x;
7813 return w | 0;
7814 }
7815
7816 function hc(a, b) {
7817 a = a | 0;
7818 b = b | 0;
7819 var c = 0;
7820
7821 if (!b) {
7822 c = 1;
7823 return c | 0;
7824 }
7825
7826 c = a;
7827 a = 1;
7828
7829 do {
7830 a = B((b & 1 | 0) == 0 ? 1 : c, a) | 0;
7831 b = b >> 1;
7832 c = B(c, c) | 0;
7833 } while ((b | 0) != 0);
7834
7835 return a | 0;
7836 }
7837
7838 function ic(a, c, d) {
7839 a = a | 0;
7840 c = c | 0;
7841 d = d | 0;
7842 var f = 0.0,
7843 g = 0.0,
7844 h = 0.0,
7845 i = 0.0,
7846 j = 0.0,
7847 k = 0.0,
7848 l = 0,
7849 m = 0,
7850 n = 0,
7851 o = 0.0;
7852
7853 if (!(ta(c, d) | 0)) {
7854 n = 0;
7855 return n | 0;
7856 }
7857
7858 c = ra(c) | 0;
7859 o = +e[d >> 3];
7860 f = +e[d + 8 >> 3];
7861 f = c & f < 0.0 ? f + 6.283185307179586 : f;
7862 n = b[a >> 2] | 0;
7863
7864 if ((n | 0) <= 0) {
7865 n = 0;
7866 return n | 0;
7867 }
7868
7869 m = b[a + 4 >> 2] | 0;
7870
7871 if (c) {
7872 c = 0;
7873 d = -1;
7874 a = 0;
7875
7876 a: while (1) {
7877 l = a;
7878
7879 while (1) {
7880 i = +e[m + (l << 4) >> 3];
7881 k = +e[m + (l << 4) + 8 >> 3];
7882 a = (d + 2 | 0) % (n | 0) | 0;
7883 h = +e[m + (a << 4) >> 3];
7884 g = +e[m + (a << 4) + 8 >> 3];
7885
7886 if (i > h) {
7887 j = i;
7888 i = k;
7889 } else {
7890 j = h;
7891 h = i;
7892 i = g;
7893 g = k;
7894 }
7895
7896 if (!(o < h | o > j)) { break; }
7897 d = l + 1 | 0;
7898
7899 if ((d | 0) < (n | 0)) {
7900 a = l;
7901 l = d;
7902 d = a;
7903 } else {
7904 d = 22;
7905 break a;
7906 }
7907 }
7908
7909 k = g < 0.0 ? g + 6.283185307179586 : g;
7910 i = i < 0.0 ? i + 6.283185307179586 : i;
7911 f = i == f | k == f ? f + -2.220446049250313e-16 : f;
7912 k = k + (o - h) / (j - h) * (i - k);
7913 if ((k < 0.0 ? k + 6.283185307179586 : k) > f) { c = c ^ 1; }
7914 a = l + 1 | 0;
7915
7916 if ((a | 0) >= (n | 0)) {
7917 d = 22;
7918 break;
7919 } else { d = l; }
7920 }
7921
7922 if ((d | 0) == 22) { return c | 0; }
7923 } else {
7924 c = 0;
7925 d = -1;
7926 a = 0;
7927
7928 b: while (1) {
7929 l = a;
7930
7931 while (1) {
7932 i = +e[m + (l << 4) >> 3];
7933 k = +e[m + (l << 4) + 8 >> 3];
7934 a = (d + 2 | 0) % (n | 0) | 0;
7935 h = +e[m + (a << 4) >> 3];
7936 g = +e[m + (a << 4) + 8 >> 3];
7937
7938 if (i > h) {
7939 j = i;
7940 i = k;
7941 } else {
7942 j = h;
7943 h = i;
7944 i = g;
7945 g = k;
7946 }
7947
7948 if (!(o < h | o > j)) { break; }
7949 d = l + 1 | 0;
7950
7951 if ((d | 0) < (n | 0)) {
7952 a = l;
7953 l = d;
7954 d = a;
7955 } else {
7956 d = 22;
7957 break b;
7958 }
7959 }
7960
7961 f = i == f | g == f ? f + -2.220446049250313e-16 : f;
7962 if (g + (o - h) / (j - h) * (i - g) > f) { c = c ^ 1; }
7963 a = l + 1 | 0;
7964
7965 if ((a | 0) >= (n | 0)) {
7966 d = 22;
7967 break;
7968 } else { d = l; }
7969 }
7970
7971 if ((d | 0) == 22) { return c | 0; }
7972 }
7973
7974 return 0;
7975 }
7976
7977 function jc(a, c) {
7978 a = a | 0;
7979 c = c | 0;
7980 var d = 0.0,
7981 f = 0.0,
7982 g = 0.0,
7983 h = 0.0,
7984 i = 0.0,
7985 j = 0.0,
7986 k = 0.0,
7987 l = 0.0,
7988 m = 0.0,
7989 n = 0,
7990 o = 0,
7991 p = 0,
7992 r = 0,
7993 s = 0,
7994 t = 0,
7995 u = 0,
7996 v = 0;
7997 r = b[a >> 2] | 0;
7998
7999 if (!r) {
8000 b[c >> 2] = 0;
8001 b[c + 4 >> 2] = 0;
8002 b[c + 8 >> 2] = 0;
8003 b[c + 12 >> 2] = 0;
8004 b[c + 16 >> 2] = 0;
8005 b[c + 20 >> 2] = 0;
8006 b[c + 24 >> 2] = 0;
8007 b[c + 28 >> 2] = 0;
8008 return;
8009 }
8010
8011 s = c + 8 | 0;
8012 e[s >> 3] = 1797693134862315708145274.0e284;
8013 t = c + 24 | 0;
8014 e[t >> 3] = 1797693134862315708145274.0e284;
8015 e[c >> 3] = -1797693134862315708145274.0e284;
8016 u = c + 16 | 0;
8017 e[u >> 3] = -1797693134862315708145274.0e284;
8018 if ((r | 0) <= 0) { return; }
8019 o = b[a + 4 >> 2] | 0;
8020 l = 1797693134862315708145274.0e284;
8021 m = -1797693134862315708145274.0e284;
8022 n = 0;
8023 a = -1;
8024 h = 1797693134862315708145274.0e284;
8025 i = 1797693134862315708145274.0e284;
8026 k = -1797693134862315708145274.0e284;
8027 f = -1797693134862315708145274.0e284;
8028 p = 0;
8029
8030 while (1) {
8031 d = +e[o + (p << 4) >> 3];
8032 j = +e[o + (p << 4) + 8 >> 3];
8033 a = a + 2 | 0;
8034 g = +e[o + (((a | 0) == (r | 0) ? 0 : a) << 4) + 8 >> 3];
8035
8036 if (d < h) {
8037 e[s >> 3] = d;
8038 h = d;
8039 }
8040
8041 if (j < i) {
8042 e[t >> 3] = j;
8043 i = j;
8044 }
8045
8046 if (d > k) { e[c >> 3] = d; }else { d = k; }
8047
8048 if (j > f) {
8049 e[u >> 3] = j;
8050 f = j;
8051 }
8052
8053 l = j > 0.0 & j < l ? j : l;
8054 m = j < 0.0 & j > m ? j : m;
8055 n = n | +q(+(j - g)) > 3.141592653589793;
8056 a = p + 1 | 0;
8057 if ((a | 0) == (r | 0)) { break; }else {
8058 v = p;
8059 k = d;
8060 p = a;
8061 a = v;
8062 }
8063 }
8064
8065 if (!n) { return; }
8066 e[u >> 3] = m;
8067 e[t >> 3] = l;
8068 return;
8069 }
8070
8071 function kc(a, c) {
8072 a = a | 0;
8073 c = c | 0;
8074 var d = 0,
8075 f = 0,
8076 g = 0,
8077 h = 0.0,
8078 i = 0.0,
8079 j = 0.0,
8080 k = 0.0,
8081 l = 0.0,
8082 m = 0.0,
8083 n = 0.0,
8084 o = 0.0,
8085 p = 0.0,
8086 r = 0,
8087 s = 0,
8088 t = 0,
8089 u = 0,
8090 v = 0,
8091 w = 0,
8092 x = 0,
8093 y = 0,
8094 z = 0,
8095 A = 0;
8096 r = b[a >> 2] | 0;
8097
8098 if (r) {
8099 s = c + 8 | 0;
8100 e[s >> 3] = 1797693134862315708145274.0e284;
8101 t = c + 24 | 0;
8102 e[t >> 3] = 1797693134862315708145274.0e284;
8103 e[c >> 3] = -1797693134862315708145274.0e284;
8104 u = c + 16 | 0;
8105 e[u >> 3] = -1797693134862315708145274.0e284;
8106
8107 if ((r | 0) > 0) {
8108 g = b[a + 4 >> 2] | 0;
8109 o = 1797693134862315708145274.0e284;
8110 p = -1797693134862315708145274.0e284;
8111 f = 0;
8112 d = -1;
8113 k = 1797693134862315708145274.0e284;
8114 l = 1797693134862315708145274.0e284;
8115 n = -1797693134862315708145274.0e284;
8116 i = -1797693134862315708145274.0e284;
8117 v = 0;
8118
8119 while (1) {
8120 h = +e[g + (v << 4) >> 3];
8121 m = +e[g + (v << 4) + 8 >> 3];
8122 z = d + 2 | 0;
8123 j = +e[g + (((z | 0) == (r | 0) ? 0 : z) << 4) + 8 >> 3];
8124
8125 if (h < k) {
8126 e[s >> 3] = h;
8127 k = h;
8128 }
8129
8130 if (m < l) {
8131 e[t >> 3] = m;
8132 l = m;
8133 }
8134
8135 if (h > n) { e[c >> 3] = h; }else { h = n; }
8136
8137 if (m > i) {
8138 e[u >> 3] = m;
8139 i = m;
8140 }
8141
8142 o = m > 0.0 & m < o ? m : o;
8143 p = m < 0.0 & m > p ? m : p;
8144 f = f | +q(+(m - j)) > 3.141592653589793;
8145 d = v + 1 | 0;
8146 if ((d | 0) == (r | 0)) { break; }else {
8147 z = v;
8148 n = h;
8149 v = d;
8150 d = z;
8151 }
8152 }
8153
8154 if (f) {
8155 e[u >> 3] = p;
8156 e[t >> 3] = o;
8157 }
8158 }
8159 } else {
8160 b[c >> 2] = 0;
8161 b[c + 4 >> 2] = 0;
8162 b[c + 8 >> 2] = 0;
8163 b[c + 12 >> 2] = 0;
8164 b[c + 16 >> 2] = 0;
8165 b[c + 20 >> 2] = 0;
8166 b[c + 24 >> 2] = 0;
8167 b[c + 28 >> 2] = 0;
8168 }
8169
8170 z = a + 8 | 0;
8171 d = b[z >> 2] | 0;
8172 if ((d | 0) <= 0) { return; }
8173 y = a + 12 | 0;
8174 x = 0;
8175
8176 do {
8177 g = b[y >> 2] | 0;
8178 f = x;
8179 x = x + 1 | 0;
8180 t = c + (x << 5) | 0;
8181 u = b[g + (f << 3) >> 2] | 0;
8182
8183 if (u) {
8184 v = c + (x << 5) + 8 | 0;
8185 e[v >> 3] = 1797693134862315708145274.0e284;
8186 a = c + (x << 5) + 24 | 0;
8187 e[a >> 3] = 1797693134862315708145274.0e284;
8188 e[t >> 3] = -1797693134862315708145274.0e284;
8189 w = c + (x << 5) + 16 | 0;
8190 e[w >> 3] = -1797693134862315708145274.0e284;
8191
8192 if ((u | 0) > 0) {
8193 r = b[g + (f << 3) + 4 >> 2] | 0;
8194 o = 1797693134862315708145274.0e284;
8195 p = -1797693134862315708145274.0e284;
8196 g = 0;
8197 f = -1;
8198 s = 0;
8199 k = 1797693134862315708145274.0e284;
8200 l = 1797693134862315708145274.0e284;
8201 m = -1797693134862315708145274.0e284;
8202 i = -1797693134862315708145274.0e284;
8203
8204 while (1) {
8205 h = +e[r + (s << 4) >> 3];
8206 n = +e[r + (s << 4) + 8 >> 3];
8207 f = f + 2 | 0;
8208 j = +e[r + (((f | 0) == (u | 0) ? 0 : f) << 4) + 8 >> 3];
8209
8210 if (h < k) {
8211 e[v >> 3] = h;
8212 k = h;
8213 }
8214
8215 if (n < l) {
8216 e[a >> 3] = n;
8217 l = n;
8218 }
8219
8220 if (h > m) { e[t >> 3] = h; }else { h = m; }
8221
8222 if (n > i) {
8223 e[w >> 3] = n;
8224 i = n;
8225 }
8226
8227 o = n > 0.0 & n < o ? n : o;
8228 p = n < 0.0 & n > p ? n : p;
8229 g = g | +q(+(n - j)) > 3.141592653589793;
8230 f = s + 1 | 0;
8231 if ((f | 0) == (u | 0)) { break; }else {
8232 A = s;
8233 s = f;
8234 m = h;
8235 f = A;
8236 }
8237 }
8238
8239 if (g) {
8240 e[w >> 3] = p;
8241 e[a >> 3] = o;
8242 }
8243 }
8244 } else {
8245 b[t >> 2] = 0;
8246 b[t + 4 >> 2] = 0;
8247 b[t + 8 >> 2] = 0;
8248 b[t + 12 >> 2] = 0;
8249 b[t + 16 >> 2] = 0;
8250 b[t + 20 >> 2] = 0;
8251 b[t + 24 >> 2] = 0;
8252 b[t + 28 >> 2] = 0;
8253 d = b[z >> 2] | 0;
8254 }
8255 } while ((x | 0) < (d | 0));
8256
8257 return;
8258 }
8259
8260 function lc(a, c, d) {
8261 a = a | 0;
8262 c = c | 0;
8263 d = d | 0;
8264 var e = 0,
8265 f = 0,
8266 g = 0;
8267
8268 if (!(ic(a, c, d) | 0)) {
8269 f = 0;
8270 return f | 0;
8271 }
8272
8273 f = a + 8 | 0;
8274
8275 if ((b[f >> 2] | 0) <= 0) {
8276 f = 1;
8277 return f | 0;
8278 }
8279
8280 e = a + 12 | 0;
8281 a = 0;
8282
8283 while (1) {
8284 g = a;
8285 a = a + 1 | 0;
8286
8287 if (ic((b[e >> 2] | 0) + (g << 3) | 0, c + (a << 5) | 0, d) | 0) {
8288 a = 0;
8289 e = 6;
8290 break;
8291 }
8292
8293 if ((a | 0) >= (b[f >> 2] | 0)) {
8294 a = 1;
8295 e = 6;
8296 break;
8297 }
8298 }
8299
8300 if ((e | 0) == 6) { return a | 0; }
8301 return 0;
8302 }
8303
8304 function mc() {
8305 return 8;
8306 }
8307
8308 function nc() {
8309 return 16;
8310 }
8311
8312 function oc() {
8313 return 168;
8314 }
8315
8316 function pc() {
8317 return 8;
8318 }
8319
8320 function qc() {
8321 return 16;
8322 }
8323
8324 function rc() {
8325 return 12;
8326 }
8327
8328 function sc() {
8329 return 8;
8330 }
8331
8332 function tc(a) {
8333 a = a | 0;
8334 var b = 0.0,
8335 c = 0.0;
8336 c = +e[a >> 3];
8337 b = +e[a + 8 >> 3];
8338 return + +r(+(c * c + b * b));
8339 }
8340
8341 function uc(a, b, c, d, f) {
8342 a = a | 0;
8343 b = b | 0;
8344 c = c | 0;
8345 d = d | 0;
8346 f = f | 0;
8347 var g = 0.0,
8348 h = 0.0,
8349 i = 0.0,
8350 j = 0.0,
8351 k = 0.0,
8352 l = 0.0,
8353 m = 0.0,
8354 n = 0.0;
8355 k = +e[a >> 3];
8356 j = +e[b >> 3] - k;
8357 i = +e[a + 8 >> 3];
8358 h = +e[b + 8 >> 3] - i;
8359 m = +e[c >> 3];
8360 g = +e[d >> 3] - m;
8361 n = +e[c + 8 >> 3];
8362 l = +e[d + 8 >> 3] - n;
8363 g = (g * (i - n) - (k - m) * l) / (j * l - h * g);
8364 e[f >> 3] = k + j * g;
8365 e[f + 8 >> 3] = i + h * g;
8366 return;
8367 }
8368
8369 function vc(a, b) {
8370 a = a | 0;
8371 b = b | 0;
8372
8373 if (!(+e[a >> 3] == +e[b >> 3])) {
8374 b = 0;
8375 return b | 0;
8376 }
8377
8378 b = +e[a + 8 >> 3] == +e[b + 8 >> 3];
8379 return b | 0;
8380 }
8381
8382 function wc(a, b) {
8383 a = a | 0;
8384 b = b | 0;
8385 var c = 0.0,
8386 d = 0.0,
8387 f = 0.0;
8388 f = +e[a >> 3] - +e[b >> 3];
8389 d = +e[a + 8 >> 3] - +e[b + 8 >> 3];
8390 c = +e[a + 16 >> 3] - +e[b + 16 >> 3];
8391 return +(f * f + d * d + c * c);
8392 }
8393
8394 function xc(a, b) {
8395 a = a | 0;
8396 b = b | 0;
8397 var c = 0.0,
8398 d = 0.0,
8399 f = 0.0;
8400 c = +e[a >> 3];
8401 d = +t(+c);
8402 c = +u(+c);
8403 e[b + 16 >> 3] = c;
8404 c = +e[a + 8 >> 3];
8405 f = d * +t(+c);
8406 e[b >> 3] = f;
8407 c = d * +u(+c);
8408 e[b + 8 >> 3] = c;
8409 return;
8410 }
8411
8412 function yc(a, c, d) {
8413 a = a | 0;
8414 c = c | 0;
8415 d = d | 0;
8416 var e = 0;
8417
8418 if ((c | 0) > 0) {
8419 e = Kc(c, 4) | 0;
8420 b[a >> 2] = e;
8421 if (!e) { G(22869, 22892, 37, 22906); }
8422 } else { b[a >> 2] = 0; }
8423
8424 b[a + 4 >> 2] = c;
8425 b[a + 8 >> 2] = 0;
8426 b[a + 12 >> 2] = d;
8427 return;
8428 }
8429
8430 function zc(a) {
8431 a = a | 0;
8432 var c = 0,
8433 d = 0,
8434 f = 0,
8435 g = 0,
8436 h = 0,
8437 i = 0,
8438 j = 0;
8439 g = a + 4 | 0;
8440 h = a + 12 | 0;
8441 i = a + 8 | 0;
8442
8443 a: while (1) {
8444 d = b[g >> 2] | 0;
8445 c = 0;
8446
8447 while (1) {
8448 if ((c | 0) >= (d | 0)) { break a; }
8449 f = b[a >> 2] | 0;
8450 j = b[f + (c << 2) >> 2] | 0;
8451 if (!j) { c = c + 1 | 0; }else { break; }
8452 }
8453
8454 c = f + (~~(+q(+(+s(10.0, + +(15 - (b[h >> 2] | 0) | 0)) * (+e[j >> 3] + +e[j + 8 >> 3]))) % +(d | 0)) >>> 0 << 2) | 0;
8455 d = b[c >> 2] | 0;
8456
8457 b: do { if (d | 0) {
8458 f = j + 32 | 0;
8459 if ((d | 0) == (j | 0)) { b[c >> 2] = b[f >> 2]; }else {
8460 d = d + 32 | 0;
8461 c = b[d >> 2] | 0;
8462 if (!c) { break; }
8463
8464 while (1) {
8465 if ((c | 0) == (j | 0)) { break; }
8466 d = c + 32 | 0;
8467 c = b[d >> 2] | 0;
8468 if (!c) { break b; }
8469 }
8470
8471 b[d >> 2] = b[f >> 2];
8472 }
8473 Jc(j);
8474 b[i >> 2] = (b[i >> 2] | 0) + -1;
8475 } } while (0);
8476 }
8477
8478 Jc(b[a >> 2] | 0);
8479 return;
8480 }
8481
8482 function Ac(a) {
8483 a = a | 0;
8484 var c = 0,
8485 d = 0,
8486 e = 0;
8487 e = b[a + 4 >> 2] | 0;
8488 d = 0;
8489
8490 while (1) {
8491 if ((d | 0) >= (e | 0)) {
8492 c = 0;
8493 d = 4;
8494 break;
8495 }
8496
8497 c = b[(b[a >> 2] | 0) + (d << 2) >> 2] | 0;
8498 if (!c) { d = d + 1 | 0; }else {
8499 d = 4;
8500 break;
8501 }
8502 }
8503
8504 if ((d | 0) == 4) { return c | 0; }
8505 return 0;
8506 }
8507
8508 function Bc(a, c) {
8509 a = a | 0;
8510 c = c | 0;
8511 var d = 0,
8512 f = 0,
8513 g = 0,
8514 h = 0;
8515 d = ~~(+q(+(+s(10.0, + +(15 - (b[a + 12 >> 2] | 0) | 0)) * (+e[c >> 3] + +e[c + 8 >> 3]))) % +(b[a + 4 >> 2] | 0)) >>> 0;
8516 d = (b[a >> 2] | 0) + (d << 2) | 0;
8517 f = b[d >> 2] | 0;
8518
8519 if (!f) {
8520 h = 1;
8521 return h | 0;
8522 }
8523
8524 h = c + 32 | 0;
8525
8526 do { if ((f | 0) != (c | 0)) {
8527 d = b[f + 32 >> 2] | 0;
8528
8529 if (!d) {
8530 h = 1;
8531 return h | 0;
8532 }
8533
8534 g = d;
8535
8536 while (1) {
8537 if ((g | 0) == (c | 0)) {
8538 g = 8;
8539 break;
8540 }
8541
8542 d = b[g + 32 >> 2] | 0;
8543
8544 if (!d) {
8545 d = 1;
8546 g = 10;
8547 break;
8548 } else {
8549 f = g;
8550 g = d;
8551 }
8552 }
8553
8554 if ((g | 0) == 8) {
8555 b[f + 32 >> 2] = b[h >> 2];
8556 break;
8557 } else if ((g | 0) == 10) { return d | 0; }
8558 } else { b[d >> 2] = b[h >> 2]; } } while (0);
8559
8560 Jc(c);
8561 h = a + 8 | 0;
8562 b[h >> 2] = (b[h >> 2] | 0) + -1;
8563 h = 0;
8564 return h | 0;
8565 }
8566
8567 function Cc(a, c, d) {
8568 a = a | 0;
8569 c = c | 0;
8570 d = d | 0;
8571 var f = 0,
8572 g = 0,
8573 h = 0,
8574 i = 0;
8575 h = Ic(40) | 0;
8576 if (!h) { G(22922, 22892, 95, 22935); }
8577 b[h >> 2] = b[c >> 2];
8578 b[h + 4 >> 2] = b[c + 4 >> 2];
8579 b[h + 8 >> 2] = b[c + 8 >> 2];
8580 b[h + 12 >> 2] = b[c + 12 >> 2];
8581 g = h + 16 | 0;
8582 b[g >> 2] = b[d >> 2];
8583 b[g + 4 >> 2] = b[d + 4 >> 2];
8584 b[g + 8 >> 2] = b[d + 8 >> 2];
8585 b[g + 12 >> 2] = b[d + 12 >> 2];
8586 b[h + 32 >> 2] = 0;
8587 g = ~~(+q(+(+s(10.0, + +(15 - (b[a + 12 >> 2] | 0) | 0)) * (+e[c >> 3] + +e[c + 8 >> 3]))) % +(b[a + 4 >> 2] | 0)) >>> 0;
8588 g = (b[a >> 2] | 0) + (g << 2) | 0;
8589 f = b[g >> 2] | 0;
8590
8591 do { if (!f) { b[g >> 2] = h; }else {
8592 while (1) {
8593 if (db(f, c) | 0 ? db(f + 16 | 0, d) | 0 : 0) { break; }
8594 g = b[f + 32 >> 2] | 0;
8595 f = (g | 0) == 0 ? f : g;
8596
8597 if (!(b[f + 32 >> 2] | 0)) {
8598 i = 10;
8599 break;
8600 }
8601 }
8602
8603 if ((i | 0) == 10) {
8604 b[f + 32 >> 2] = h;
8605 break;
8606 }
8607
8608 Jc(h);
8609 i = f;
8610 return i | 0;
8611 } } while (0);
8612
8613 i = a + 8 | 0;
8614 b[i >> 2] = (b[i >> 2] | 0) + 1;
8615 i = h;
8616 return i | 0;
8617 }
8618
8619 function Dc(a, c, d) {
8620 a = a | 0;
8621 c = c | 0;
8622 d = d | 0;
8623 var f = 0,
8624 g = 0;
8625 g = ~~(+q(+(+s(10.0, + +(15 - (b[a + 12 >> 2] | 0) | 0)) * (+e[c >> 3] + +e[c + 8 >> 3]))) % +(b[a + 4 >> 2] | 0)) >>> 0;
8626 g = b[(b[a >> 2] | 0) + (g << 2) >> 2] | 0;
8627
8628 if (!g) {
8629 d = 0;
8630 return d | 0;
8631 }
8632
8633 if (!d) {
8634 a = g;
8635
8636 while (1) {
8637 if (db(a, c) | 0) {
8638 f = 10;
8639 break;
8640 }
8641
8642 a = b[a + 32 >> 2] | 0;
8643
8644 if (!a) {
8645 a = 0;
8646 f = 10;
8647 break;
8648 }
8649 }
8650
8651 if ((f | 0) == 10) { return a | 0; }
8652 }
8653
8654 a = g;
8655
8656 while (1) {
8657 if (db(a, c) | 0 ? db(a + 16 | 0, d) | 0 : 0) {
8658 f = 10;
8659 break;
8660 }
8661
8662 a = b[a + 32 >> 2] | 0;
8663
8664 if (!a) {
8665 a = 0;
8666 f = 10;
8667 break;
8668 }
8669 }
8670
8671 if ((f | 0) == 10) { return a | 0; }
8672 return 0;
8673 }
8674
8675 function Ec(a, c) {
8676 a = a | 0;
8677 c = c | 0;
8678 var d = 0;
8679 d = ~~(+q(+(+s(10.0, + +(15 - (b[a + 12 >> 2] | 0) | 0)) * (+e[c >> 3] + +e[c + 8 >> 3]))) % +(b[a + 4 >> 2] | 0)) >>> 0;
8680 a = b[(b[a >> 2] | 0) + (d << 2) >> 2] | 0;
8681
8682 if (!a) {
8683 d = 0;
8684 return d | 0;
8685 }
8686
8687 while (1) {
8688 if (db(a, c) | 0) {
8689 c = 5;
8690 break;
8691 }
8692
8693 a = b[a + 32 >> 2] | 0;
8694
8695 if (!a) {
8696 a = 0;
8697 c = 5;
8698 break;
8699 }
8700 }
8701
8702 if ((c | 0) == 5) { return a | 0; }
8703 return 0;
8704 }
8705
8706 function Fc() {
8707 return 22960;
8708 }
8709
8710 function Gc(a) {
8711 a = +a;
8712 return + +Vc(+a);
8713 }
8714
8715 function Hc(a) {
8716 a = +a;
8717 return ~~+Gc(a) | 0;
8718 }
8719
8720 function Ic(a) {
8721 a = a | 0;
8722 var c = 0,
8723 d = 0,
8724 e = 0,
8725 f = 0,
8726 g = 0,
8727 h = 0,
8728 i = 0,
8729 j = 0,
8730 k = 0,
8731 l = 0,
8732 m = 0,
8733 n = 0,
8734 o = 0,
8735 p = 0,
8736 q = 0,
8737 r = 0,
8738 s = 0,
8739 t = 0,
8740 u = 0,
8741 v = 0,
8742 w = 0;
8743 w = R;
8744 R = R + 16 | 0;
8745 n = w;
8746
8747 do { if (a >>> 0 < 245) {
8748 k = a >>> 0 < 11 ? 16 : a + 11 & -8;
8749 a = k >>> 3;
8750 m = b[5741] | 0;
8751 d = m >>> a;
8752
8753 if (d & 3 | 0) {
8754 c = (d & 1 ^ 1) + a | 0;
8755 a = 23004 + (c << 1 << 2) | 0;
8756 d = a + 8 | 0;
8757 e = b[d >> 2] | 0;
8758 f = e + 8 | 0;
8759 g = b[f >> 2] | 0;
8760 if ((g | 0) == (a | 0)) { b[5741] = m & ~(1 << c); }else {
8761 b[g + 12 >> 2] = a;
8762 b[d >> 2] = g;
8763 }
8764 v = c << 3;
8765 b[e + 4 >> 2] = v | 3;
8766 v = e + v + 4 | 0;
8767 b[v >> 2] = b[v >> 2] | 1;
8768 v = f;
8769 R = w;
8770 return v | 0;
8771 }
8772
8773 l = b[5743] | 0;
8774
8775 if (k >>> 0 > l >>> 0) {
8776 if (d | 0) {
8777 c = 2 << a;
8778 c = d << a & (c | 0 - c);
8779 c = (c & 0 - c) + -1 | 0;
8780 i = c >>> 12 & 16;
8781 c = c >>> i;
8782 d = c >>> 5 & 8;
8783 c = c >>> d;
8784 g = c >>> 2 & 4;
8785 c = c >>> g;
8786 a = c >>> 1 & 2;
8787 c = c >>> a;
8788 e = c >>> 1 & 1;
8789 e = (d | i | g | a | e) + (c >>> e) | 0;
8790 c = 23004 + (e << 1 << 2) | 0;
8791 a = c + 8 | 0;
8792 g = b[a >> 2] | 0;
8793 i = g + 8 | 0;
8794 d = b[i >> 2] | 0;
8795
8796 if ((d | 0) == (c | 0)) {
8797 a = m & ~(1 << e);
8798 b[5741] = a;
8799 } else {
8800 b[d + 12 >> 2] = c;
8801 b[a >> 2] = d;
8802 a = m;
8803 }
8804
8805 v = e << 3;
8806 h = v - k | 0;
8807 b[g + 4 >> 2] = k | 3;
8808 f = g + k | 0;
8809 b[f + 4 >> 2] = h | 1;
8810 b[g + v >> 2] = h;
8811
8812 if (l | 0) {
8813 e = b[5746] | 0;
8814 c = l >>> 3;
8815 d = 23004 + (c << 1 << 2) | 0;
8816 c = 1 << c;
8817
8818 if (!(a & c)) {
8819 b[5741] = a | c;
8820 c = d;
8821 a = d + 8 | 0;
8822 } else {
8823 a = d + 8 | 0;
8824 c = b[a >> 2] | 0;
8825 }
8826
8827 b[a >> 2] = e;
8828 b[c + 12 >> 2] = e;
8829 b[e + 8 >> 2] = c;
8830 b[e + 12 >> 2] = d;
8831 }
8832
8833 b[5743] = h;
8834 b[5746] = f;
8835 v = i;
8836 R = w;
8837 return v | 0;
8838 }
8839
8840 g = b[5742] | 0;
8841
8842 if (g) {
8843 d = (g & 0 - g) + -1 | 0;
8844 f = d >>> 12 & 16;
8845 d = d >>> f;
8846 e = d >>> 5 & 8;
8847 d = d >>> e;
8848 h = d >>> 2 & 4;
8849 d = d >>> h;
8850 i = d >>> 1 & 2;
8851 d = d >>> i;
8852 j = d >>> 1 & 1;
8853 j = b[23268 + ((e | f | h | i | j) + (d >>> j) << 2) >> 2] | 0;
8854 d = j;
8855 i = j;
8856 j = (b[j + 4 >> 2] & -8) - k | 0;
8857
8858 while (1) {
8859 a = b[d + 16 >> 2] | 0;
8860
8861 if (!a) {
8862 a = b[d + 20 >> 2] | 0;
8863 if (!a) { break; }
8864 }
8865
8866 h = (b[a + 4 >> 2] & -8) - k | 0;
8867 f = h >>> 0 < j >>> 0;
8868 d = a;
8869 i = f ? a : i;
8870 j = f ? h : j;
8871 }
8872
8873 h = i + k | 0;
8874
8875 if (h >>> 0 > i >>> 0) {
8876 f = b[i + 24 >> 2] | 0;
8877 c = b[i + 12 >> 2] | 0;
8878
8879 do { if ((c | 0) == (i | 0)) {
8880 a = i + 20 | 0;
8881 c = b[a >> 2] | 0;
8882
8883 if (!c) {
8884 a = i + 16 | 0;
8885 c = b[a >> 2] | 0;
8886
8887 if (!c) {
8888 d = 0;
8889 break;
8890 }
8891 }
8892
8893 while (1) {
8894 e = c + 20 | 0;
8895 d = b[e >> 2] | 0;
8896
8897 if (!d) {
8898 e = c + 16 | 0;
8899 d = b[e >> 2] | 0;
8900 if (!d) { break; }else {
8901 c = d;
8902 a = e;
8903 }
8904 } else {
8905 c = d;
8906 a = e;
8907 }
8908 }
8909
8910 b[a >> 2] = 0;
8911 d = c;
8912 } else {
8913 d = b[i + 8 >> 2] | 0;
8914 b[d + 12 >> 2] = c;
8915 b[c + 8 >> 2] = d;
8916 d = c;
8917 } } while (0);
8918
8919 do { if (f | 0) {
8920 c = b[i + 28 >> 2] | 0;
8921 a = 23268 + (c << 2) | 0;
8922
8923 if ((i | 0) == (b[a >> 2] | 0)) {
8924 b[a >> 2] = d;
8925
8926 if (!d) {
8927 b[5742] = g & ~(1 << c);
8928 break;
8929 }
8930 } else {
8931 v = f + 16 | 0;
8932 b[((b[v >> 2] | 0) == (i | 0) ? v : f + 20 | 0) >> 2] = d;
8933 if (!d) { break; }
8934 }
8935
8936 b[d + 24 >> 2] = f;
8937 c = b[i + 16 >> 2] | 0;
8938
8939 if (c | 0) {
8940 b[d + 16 >> 2] = c;
8941 b[c + 24 >> 2] = d;
8942 }
8943
8944 c = b[i + 20 >> 2] | 0;
8945
8946 if (c | 0) {
8947 b[d + 20 >> 2] = c;
8948 b[c + 24 >> 2] = d;
8949 }
8950 } } while (0);
8951
8952 if (j >>> 0 < 16) {
8953 v = j + k | 0;
8954 b[i + 4 >> 2] = v | 3;
8955 v = i + v + 4 | 0;
8956 b[v >> 2] = b[v >> 2] | 1;
8957 } else {
8958 b[i + 4 >> 2] = k | 3;
8959 b[h + 4 >> 2] = j | 1;
8960 b[h + j >> 2] = j;
8961
8962 if (l | 0) {
8963 e = b[5746] | 0;
8964 c = l >>> 3;
8965 d = 23004 + (c << 1 << 2) | 0;
8966 c = 1 << c;
8967
8968 if (!(c & m)) {
8969 b[5741] = c | m;
8970 c = d;
8971 a = d + 8 | 0;
8972 } else {
8973 a = d + 8 | 0;
8974 c = b[a >> 2] | 0;
8975 }
8976
8977 b[a >> 2] = e;
8978 b[c + 12 >> 2] = e;
8979 b[e + 8 >> 2] = c;
8980 b[e + 12 >> 2] = d;
8981 }
8982
8983 b[5743] = j;
8984 b[5746] = h;
8985 }
8986
8987 v = i + 8 | 0;
8988 R = w;
8989 return v | 0;
8990 } else { m = k; }
8991 } else { m = k; }
8992 } else { m = k; }
8993 } else if (a >>> 0 <= 4294967231) {
8994 a = a + 11 | 0;
8995 k = a & -8;
8996 e = b[5742] | 0;
8997
8998 if (e) {
8999 f = 0 - k | 0;
9000 a = a >>> 8;
9001 if (a) {
9002 if (k >>> 0 > 16777215) { j = 31; }else {
9003 m = (a + 1048320 | 0) >>> 16 & 8;
9004 q = a << m;
9005 i = (q + 520192 | 0) >>> 16 & 4;
9006 q = q << i;
9007 j = (q + 245760 | 0) >>> 16 & 2;
9008 j = 14 - (i | m | j) + (q << j >>> 15) | 0;
9009 j = k >>> (j + 7 | 0) & 1 | j << 1;
9010 }
9011 } else { j = 0; }
9012 d = b[23268 + (j << 2) >> 2] | 0;
9013
9014 a: do { if (!d) {
9015 d = 0;
9016 a = 0;
9017 q = 61;
9018 } else {
9019 a = 0;
9020 i = k << ((j | 0) == 31 ? 0 : 25 - (j >>> 1) | 0);
9021 g = 0;
9022
9023 while (1) {
9024 h = (b[d + 4 >> 2] & -8) - k | 0;
9025 if (h >>> 0 < f >>> 0) { if (!h) {
9026 a = d;
9027 f = 0;
9028 q = 65;
9029 break a;
9030 } else {
9031 a = d;
9032 f = h;
9033 } }
9034 q = b[d + 20 >> 2] | 0;
9035 d = b[d + 16 + (i >>> 31 << 2) >> 2] | 0;
9036 g = (q | 0) == 0 | (q | 0) == (d | 0) ? g : q;
9037
9038 if (!d) {
9039 d = g;
9040 q = 61;
9041 break;
9042 } else { i = i << 1; }
9043 }
9044 } } while (0);
9045
9046 if ((q | 0) == 61) {
9047 if ((d | 0) == 0 & (a | 0) == 0) {
9048 a = 2 << j;
9049 a = (a | 0 - a) & e;
9050
9051 if (!a) {
9052 m = k;
9053 break;
9054 }
9055
9056 m = (a & 0 - a) + -1 | 0;
9057 h = m >>> 12 & 16;
9058 m = m >>> h;
9059 g = m >>> 5 & 8;
9060 m = m >>> g;
9061 i = m >>> 2 & 4;
9062 m = m >>> i;
9063 j = m >>> 1 & 2;
9064 m = m >>> j;
9065 d = m >>> 1 & 1;
9066 a = 0;
9067 d = b[23268 + ((g | h | i | j | d) + (m >>> d) << 2) >> 2] | 0;
9068 }
9069
9070 if (!d) {
9071 i = a;
9072 h = f;
9073 } else { q = 65; }
9074 }
9075
9076 if ((q | 0) == 65) {
9077 g = d;
9078
9079 while (1) {
9080 m = (b[g + 4 >> 2] & -8) - k | 0;
9081 d = m >>> 0 < f >>> 0;
9082 f = d ? m : f;
9083 a = d ? g : a;
9084 d = b[g + 16 >> 2] | 0;
9085 if (!d) { d = b[g + 20 >> 2] | 0; }
9086
9087 if (!d) {
9088 i = a;
9089 h = f;
9090 break;
9091 } else { g = d; }
9092 }
9093 }
9094
9095 if (((i | 0) != 0 ? h >>> 0 < ((b[5743] | 0) - k | 0) >>> 0 : 0) ? (l = i + k | 0, l >>> 0 > i >>> 0) : 0) {
9096 g = b[i + 24 >> 2] | 0;
9097 c = b[i + 12 >> 2] | 0;
9098
9099 do { if ((c | 0) == (i | 0)) {
9100 a = i + 20 | 0;
9101 c = b[a >> 2] | 0;
9102
9103 if (!c) {
9104 a = i + 16 | 0;
9105 c = b[a >> 2] | 0;
9106
9107 if (!c) {
9108 c = 0;
9109 break;
9110 }
9111 }
9112
9113 while (1) {
9114 f = c + 20 | 0;
9115 d = b[f >> 2] | 0;
9116
9117 if (!d) {
9118 f = c + 16 | 0;
9119 d = b[f >> 2] | 0;
9120 if (!d) { break; }else {
9121 c = d;
9122 a = f;
9123 }
9124 } else {
9125 c = d;
9126 a = f;
9127 }
9128 }
9129
9130 b[a >> 2] = 0;
9131 } else {
9132 v = b[i + 8 >> 2] | 0;
9133 b[v + 12 >> 2] = c;
9134 b[c + 8 >> 2] = v;
9135 } } while (0);
9136
9137 do { if (g) {
9138 a = b[i + 28 >> 2] | 0;
9139 d = 23268 + (a << 2) | 0;
9140
9141 if ((i | 0) == (b[d >> 2] | 0)) {
9142 b[d >> 2] = c;
9143
9144 if (!c) {
9145 e = e & ~(1 << a);
9146 b[5742] = e;
9147 break;
9148 }
9149 } else {
9150 v = g + 16 | 0;
9151 b[((b[v >> 2] | 0) == (i | 0) ? v : g + 20 | 0) >> 2] = c;
9152 if (!c) { break; }
9153 }
9154
9155 b[c + 24 >> 2] = g;
9156 a = b[i + 16 >> 2] | 0;
9157
9158 if (a | 0) {
9159 b[c + 16 >> 2] = a;
9160 b[a + 24 >> 2] = c;
9161 }
9162
9163 a = b[i + 20 >> 2] | 0;
9164
9165 if (a) {
9166 b[c + 20 >> 2] = a;
9167 b[a + 24 >> 2] = c;
9168 }
9169 } } while (0);
9170
9171 b: do { if (h >>> 0 < 16) {
9172 v = h + k | 0;
9173 b[i + 4 >> 2] = v | 3;
9174 v = i + v + 4 | 0;
9175 b[v >> 2] = b[v >> 2] | 1;
9176 } else {
9177 b[i + 4 >> 2] = k | 3;
9178 b[l + 4 >> 2] = h | 1;
9179 b[l + h >> 2] = h;
9180 c = h >>> 3;
9181
9182 if (h >>> 0 < 256) {
9183 d = 23004 + (c << 1 << 2) | 0;
9184 a = b[5741] | 0;
9185 c = 1 << c;
9186
9187 if (!(a & c)) {
9188 b[5741] = a | c;
9189 c = d;
9190 a = d + 8 | 0;
9191 } else {
9192 a = d + 8 | 0;
9193 c = b[a >> 2] | 0;
9194 }
9195
9196 b[a >> 2] = l;
9197 b[c + 12 >> 2] = l;
9198 b[l + 8 >> 2] = c;
9199 b[l + 12 >> 2] = d;
9200 break;
9201 }
9202
9203 c = h >>> 8;
9204 if (c) {
9205 if (h >>> 0 > 16777215) { d = 31; }else {
9206 u = (c + 1048320 | 0) >>> 16 & 8;
9207 v = c << u;
9208 t = (v + 520192 | 0) >>> 16 & 4;
9209 v = v << t;
9210 d = (v + 245760 | 0) >>> 16 & 2;
9211 d = 14 - (t | u | d) + (v << d >>> 15) | 0;
9212 d = h >>> (d + 7 | 0) & 1 | d << 1;
9213 }
9214 } else { d = 0; }
9215 c = 23268 + (d << 2) | 0;
9216 b[l + 28 >> 2] = d;
9217 a = l + 16 | 0;
9218 b[a + 4 >> 2] = 0;
9219 b[a >> 2] = 0;
9220 a = 1 << d;
9221
9222 if (!(e & a)) {
9223 b[5742] = e | a;
9224 b[c >> 2] = l;
9225 b[l + 24 >> 2] = c;
9226 b[l + 12 >> 2] = l;
9227 b[l + 8 >> 2] = l;
9228 break;
9229 }
9230
9231 c = b[c >> 2] | 0;
9232
9233 c: do { if ((b[c + 4 >> 2] & -8 | 0) != (h | 0)) {
9234 e = h << ((d | 0) == 31 ? 0 : 25 - (d >>> 1) | 0);
9235
9236 while (1) {
9237 d = c + 16 + (e >>> 31 << 2) | 0;
9238 a = b[d >> 2] | 0;
9239 if (!a) { break; }
9240
9241 if ((b[a + 4 >> 2] & -8 | 0) == (h | 0)) {
9242 c = a;
9243 break c;
9244 } else {
9245 e = e << 1;
9246 c = a;
9247 }
9248 }
9249
9250 b[d >> 2] = l;
9251 b[l + 24 >> 2] = c;
9252 b[l + 12 >> 2] = l;
9253 b[l + 8 >> 2] = l;
9254 break b;
9255 } } while (0);
9256
9257 u = c + 8 | 0;
9258 v = b[u >> 2] | 0;
9259 b[v + 12 >> 2] = l;
9260 b[u >> 2] = l;
9261 b[l + 8 >> 2] = v;
9262 b[l + 12 >> 2] = c;
9263 b[l + 24 >> 2] = 0;
9264 } } while (0);
9265
9266 v = i + 8 | 0;
9267 R = w;
9268 return v | 0;
9269 } else { m = k; }
9270 } else { m = k; }
9271 } else { m = -1; } } while (0);
9272
9273 d = b[5743] | 0;
9274
9275 if (d >>> 0 >= m >>> 0) {
9276 c = d - m | 0;
9277 a = b[5746] | 0;
9278
9279 if (c >>> 0 > 15) {
9280 v = a + m | 0;
9281 b[5746] = v;
9282 b[5743] = c;
9283 b[v + 4 >> 2] = c | 1;
9284 b[a + d >> 2] = c;
9285 b[a + 4 >> 2] = m | 3;
9286 } else {
9287 b[5743] = 0;
9288 b[5746] = 0;
9289 b[a + 4 >> 2] = d | 3;
9290 v = a + d + 4 | 0;
9291 b[v >> 2] = b[v >> 2] | 1;
9292 }
9293
9294 v = a + 8 | 0;
9295 R = w;
9296 return v | 0;
9297 }
9298
9299 h = b[5744] | 0;
9300
9301 if (h >>> 0 > m >>> 0) {
9302 t = h - m | 0;
9303 b[5744] = t;
9304 v = b[5747] | 0;
9305 u = v + m | 0;
9306 b[5747] = u;
9307 b[u + 4 >> 2] = t | 1;
9308 b[v + 4 >> 2] = m | 3;
9309 v = v + 8 | 0;
9310 R = w;
9311 return v | 0;
9312 }
9313
9314 if (!(b[5859] | 0)) {
9315 b[5861] = 4096;
9316 b[5860] = 4096;
9317 b[5862] = -1;
9318 b[5863] = -1;
9319 b[5864] = 0;
9320 b[5852] = 0;
9321 b[5859] = n & -16 ^ 1431655768;
9322 a = 4096;
9323 } else { a = b[5861] | 0; }
9324
9325 i = m + 48 | 0;
9326 j = m + 47 | 0;
9327 g = a + j | 0;
9328 f = 0 - a | 0;
9329 k = g & f;
9330
9331 if (k >>> 0 <= m >>> 0) {
9332 v = 0;
9333 R = w;
9334 return v | 0;
9335 }
9336
9337 a = b[5851] | 0;
9338
9339 if (a | 0 ? (l = b[5849] | 0, n = l + k | 0, n >>> 0 <= l >>> 0 | n >>> 0 > a >>> 0) : 0) {
9340 v = 0;
9341 R = w;
9342 return v | 0;
9343 }
9344
9345 d: do { if (!(b[5852] & 4)) {
9346 d = b[5747] | 0;
9347
9348 e: do { if (d) {
9349 e = 23412;
9350
9351 while (1) {
9352 n = b[e >> 2] | 0;
9353 if (n >>> 0 <= d >>> 0 ? (n + (b[e + 4 >> 2] | 0) | 0) >>> 0 > d >>> 0 : 0) { break; }
9354 a = b[e + 8 >> 2] | 0;
9355
9356 if (!a) {
9357 q = 128;
9358 break e;
9359 } else { e = a; }
9360 }
9361
9362 c = g - h & f;
9363
9364 if (c >>> 0 < 2147483647) {
9365 a = Wc(c | 0) | 0;
9366
9367 if ((a | 0) == ((b[e >> 2] | 0) + (b[e + 4 >> 2] | 0) | 0)) {
9368 if ((a | 0) != (-1 | 0)) {
9369 h = c;
9370 g = a;
9371 q = 145;
9372 break d;
9373 }
9374 } else {
9375 e = a;
9376 q = 136;
9377 }
9378 } else { c = 0; }
9379 } else { q = 128; } } while (0);
9380
9381 do { if ((q | 0) == 128) {
9382 d = Wc(0) | 0;
9383
9384 if ((d | 0) != (-1 | 0) ? (c = d, o = b[5860] | 0, p = o + -1 | 0, c = ((p & c | 0) == 0 ? 0 : (p + c & 0 - o) - c | 0) + k | 0, o = b[5849] | 0, p = c + o | 0, c >>> 0 > m >>> 0 & c >>> 0 < 2147483647) : 0) {
9385 n = b[5851] | 0;
9386
9387 if (n | 0 ? p >>> 0 <= o >>> 0 | p >>> 0 > n >>> 0 : 0) {
9388 c = 0;
9389 break;
9390 }
9391
9392 a = Wc(c | 0) | 0;
9393
9394 if ((a | 0) == (d | 0)) {
9395 h = c;
9396 g = d;
9397 q = 145;
9398 break d;
9399 } else {
9400 e = a;
9401 q = 136;
9402 }
9403 } else { c = 0; }
9404 } } while (0);
9405
9406 do { if ((q | 0) == 136) {
9407 d = 0 - c | 0;
9408 if (!(i >>> 0 > c >>> 0 & (c >>> 0 < 2147483647 & (e | 0) != (-1 | 0)))) { if ((e | 0) == (-1 | 0)) {
9409 c = 0;
9410 break;
9411 } else {
9412 h = c;
9413 g = e;
9414 q = 145;
9415 break d;
9416 } }
9417 a = b[5861] | 0;
9418 a = j - c + a & 0 - a;
9419
9420 if (a >>> 0 >= 2147483647) {
9421 h = c;
9422 g = e;
9423 q = 145;
9424 break d;
9425 }
9426
9427 if ((Wc(a | 0) | 0) == (-1 | 0)) {
9428 Wc(d | 0) | 0;
9429 c = 0;
9430 break;
9431 } else {
9432 h = a + c | 0;
9433 g = e;
9434 q = 145;
9435 break d;
9436 }
9437 } } while (0);
9438
9439 b[5852] = b[5852] | 4;
9440 q = 143;
9441 } else {
9442 c = 0;
9443 q = 143;
9444 } } while (0);
9445
9446 if (((q | 0) == 143 ? k >>> 0 < 2147483647 : 0) ? (t = Wc(k | 0) | 0, p = Wc(0) | 0, r = p - t | 0, s = r >>> 0 > (m + 40 | 0) >>> 0, !((t | 0) == (-1 | 0) | s ^ 1 | t >>> 0 < p >>> 0 & ((t | 0) != (-1 | 0) & (p | 0) != (-1 | 0)) ^ 1)) : 0) {
9447 h = s ? r : c;
9448 g = t;
9449 q = 145;
9450 }
9451
9452 if ((q | 0) == 145) {
9453 c = (b[5849] | 0) + h | 0;
9454 b[5849] = c;
9455 if (c >>> 0 > (b[5850] | 0) >>> 0) { b[5850] = c; }
9456 j = b[5747] | 0;
9457
9458 f: do { if (j) {
9459 c = 23412;
9460
9461 while (1) {
9462 a = b[c >> 2] | 0;
9463 d = b[c + 4 >> 2] | 0;
9464
9465 if ((g | 0) == (a + d | 0)) {
9466 q = 154;
9467 break;
9468 }
9469
9470 e = b[c + 8 >> 2] | 0;
9471 if (!e) { break; }else { c = e; }
9472 }
9473
9474 if (((q | 0) == 154 ? (u = c + 4 | 0, (b[c + 12 >> 2] & 8 | 0) == 0) : 0) ? g >>> 0 > j >>> 0 & a >>> 0 <= j >>> 0 : 0) {
9475 b[u >> 2] = d + h;
9476 v = (b[5744] | 0) + h | 0;
9477 t = j + 8 | 0;
9478 t = (t & 7 | 0) == 0 ? 0 : 0 - t & 7;
9479 u = j + t | 0;
9480 t = v - t | 0;
9481 b[5747] = u;
9482 b[5744] = t;
9483 b[u + 4 >> 2] = t | 1;
9484 b[j + v + 4 >> 2] = 40;
9485 b[5748] = b[5863];
9486 break;
9487 }
9488
9489 if (g >>> 0 < (b[5745] | 0) >>> 0) { b[5745] = g; }
9490 d = g + h | 0;
9491 c = 23412;
9492
9493 while (1) {
9494 if ((b[c >> 2] | 0) == (d | 0)) {
9495 q = 162;
9496 break;
9497 }
9498
9499 a = b[c + 8 >> 2] | 0;
9500 if (!a) { break; }else { c = a; }
9501 }
9502
9503 if ((q | 0) == 162 ? (b[c + 12 >> 2] & 8 | 0) == 0 : 0) {
9504 b[c >> 2] = g;
9505 l = c + 4 | 0;
9506 b[l >> 2] = (b[l >> 2] | 0) + h;
9507 l = g + 8 | 0;
9508 l = g + ((l & 7 | 0) == 0 ? 0 : 0 - l & 7) | 0;
9509 c = d + 8 | 0;
9510 c = d + ((c & 7 | 0) == 0 ? 0 : 0 - c & 7) | 0;
9511 k = l + m | 0;
9512 i = c - l - m | 0;
9513 b[l + 4 >> 2] = m | 3;
9514
9515 g: do { if ((j | 0) == (c | 0)) {
9516 v = (b[5744] | 0) + i | 0;
9517 b[5744] = v;
9518 b[5747] = k;
9519 b[k + 4 >> 2] = v | 1;
9520 } else {
9521 if ((b[5746] | 0) == (c | 0)) {
9522 v = (b[5743] | 0) + i | 0;
9523 b[5743] = v;
9524 b[5746] = k;
9525 b[k + 4 >> 2] = v | 1;
9526 b[k + v >> 2] = v;
9527 break;
9528 }
9529
9530 a = b[c + 4 >> 2] | 0;
9531
9532 if ((a & 3 | 0) == 1) {
9533 h = a & -8;
9534 e = a >>> 3;
9535
9536 h: do { if (a >>> 0 < 256) {
9537 a = b[c + 8 >> 2] | 0;
9538 d = b[c + 12 >> 2] | 0;
9539
9540 if ((d | 0) == (a | 0)) {
9541 b[5741] = b[5741] & ~(1 << e);
9542 break;
9543 } else {
9544 b[a + 12 >> 2] = d;
9545 b[d + 8 >> 2] = a;
9546 break;
9547 }
9548 } else {
9549 g = b[c + 24 >> 2] | 0;
9550 a = b[c + 12 >> 2] | 0;
9551
9552 do { if ((a | 0) == (c | 0)) {
9553 d = c + 16 | 0;
9554 e = d + 4 | 0;
9555 a = b[e >> 2] | 0;
9556
9557 if (!a) {
9558 a = b[d >> 2] | 0;
9559
9560 if (!a) {
9561 a = 0;
9562 break;
9563 }
9564 } else { d = e; }
9565
9566 while (1) {
9567 f = a + 20 | 0;
9568 e = b[f >> 2] | 0;
9569
9570 if (!e) {
9571 f = a + 16 | 0;
9572 e = b[f >> 2] | 0;
9573 if (!e) { break; }else {
9574 a = e;
9575 d = f;
9576 }
9577 } else {
9578 a = e;
9579 d = f;
9580 }
9581 }
9582
9583 b[d >> 2] = 0;
9584 } else {
9585 v = b[c + 8 >> 2] | 0;
9586 b[v + 12 >> 2] = a;
9587 b[a + 8 >> 2] = v;
9588 } } while (0);
9589
9590 if (!g) { break; }
9591 d = b[c + 28 >> 2] | 0;
9592 e = 23268 + (d << 2) | 0;
9593
9594 do { if ((b[e >> 2] | 0) != (c | 0)) {
9595 v = g + 16 | 0;
9596 b[((b[v >> 2] | 0) == (c | 0) ? v : g + 20 | 0) >> 2] = a;
9597 if (!a) { break h; }
9598 } else {
9599 b[e >> 2] = a;
9600 if (a | 0) { break; }
9601 b[5742] = b[5742] & ~(1 << d);
9602 break h;
9603 } } while (0);
9604
9605 b[a + 24 >> 2] = g;
9606 d = c + 16 | 0;
9607 e = b[d >> 2] | 0;
9608
9609 if (e | 0) {
9610 b[a + 16 >> 2] = e;
9611 b[e + 24 >> 2] = a;
9612 }
9613
9614 d = b[d + 4 >> 2] | 0;
9615 if (!d) { break; }
9616 b[a + 20 >> 2] = d;
9617 b[d + 24 >> 2] = a;
9618 } } while (0);
9619
9620 c = c + h | 0;
9621 f = h + i | 0;
9622 } else { f = i; }
9623
9624 c = c + 4 | 0;
9625 b[c >> 2] = b[c >> 2] & -2;
9626 b[k + 4 >> 2] = f | 1;
9627 b[k + f >> 2] = f;
9628 c = f >>> 3;
9629
9630 if (f >>> 0 < 256) {
9631 d = 23004 + (c << 1 << 2) | 0;
9632 a = b[5741] | 0;
9633 c = 1 << c;
9634
9635 if (!(a & c)) {
9636 b[5741] = a | c;
9637 c = d;
9638 a = d + 8 | 0;
9639 } else {
9640 a = d + 8 | 0;
9641 c = b[a >> 2] | 0;
9642 }
9643
9644 b[a >> 2] = k;
9645 b[c + 12 >> 2] = k;
9646 b[k + 8 >> 2] = c;
9647 b[k + 12 >> 2] = d;
9648 break;
9649 }
9650
9651 c = f >>> 8;
9652
9653 do { if (!c) { e = 0; }else {
9654 if (f >>> 0 > 16777215) {
9655 e = 31;
9656 break;
9657 }
9658
9659 u = (c + 1048320 | 0) >>> 16 & 8;
9660 v = c << u;
9661 t = (v + 520192 | 0) >>> 16 & 4;
9662 v = v << t;
9663 e = (v + 245760 | 0) >>> 16 & 2;
9664 e = 14 - (t | u | e) + (v << e >>> 15) | 0;
9665 e = f >>> (e + 7 | 0) & 1 | e << 1;
9666 } } while (0);
9667
9668 c = 23268 + (e << 2) | 0;
9669 b[k + 28 >> 2] = e;
9670 a = k + 16 | 0;
9671 b[a + 4 >> 2] = 0;
9672 b[a >> 2] = 0;
9673 a = b[5742] | 0;
9674 d = 1 << e;
9675
9676 if (!(a & d)) {
9677 b[5742] = a | d;
9678 b[c >> 2] = k;
9679 b[k + 24 >> 2] = c;
9680 b[k + 12 >> 2] = k;
9681 b[k + 8 >> 2] = k;
9682 break;
9683 }
9684
9685 c = b[c >> 2] | 0;
9686
9687 i: do { if ((b[c + 4 >> 2] & -8 | 0) != (f | 0)) {
9688 e = f << ((e | 0) == 31 ? 0 : 25 - (e >>> 1) | 0);
9689
9690 while (1) {
9691 d = c + 16 + (e >>> 31 << 2) | 0;
9692 a = b[d >> 2] | 0;
9693 if (!a) { break; }
9694
9695 if ((b[a + 4 >> 2] & -8 | 0) == (f | 0)) {
9696 c = a;
9697 break i;
9698 } else {
9699 e = e << 1;
9700 c = a;
9701 }
9702 }
9703
9704 b[d >> 2] = k;
9705 b[k + 24 >> 2] = c;
9706 b[k + 12 >> 2] = k;
9707 b[k + 8 >> 2] = k;
9708 break g;
9709 } } while (0);
9710
9711 u = c + 8 | 0;
9712 v = b[u >> 2] | 0;
9713 b[v + 12 >> 2] = k;
9714 b[u >> 2] = k;
9715 b[k + 8 >> 2] = v;
9716 b[k + 12 >> 2] = c;
9717 b[k + 24 >> 2] = 0;
9718 } } while (0);
9719
9720 v = l + 8 | 0;
9721 R = w;
9722 return v | 0;
9723 }
9724
9725 c = 23412;
9726
9727 while (1) {
9728 a = b[c >> 2] | 0;
9729 if (a >>> 0 <= j >>> 0 ? (v = a + (b[c + 4 >> 2] | 0) | 0, v >>> 0 > j >>> 0) : 0) { break; }
9730 c = b[c + 8 >> 2] | 0;
9731 }
9732
9733 f = v + -47 | 0;
9734 a = f + 8 | 0;
9735 a = f + ((a & 7 | 0) == 0 ? 0 : 0 - a & 7) | 0;
9736 f = j + 16 | 0;
9737 a = a >>> 0 < f >>> 0 ? j : a;
9738 c = a + 8 | 0;
9739 d = h + -40 | 0;
9740 t = g + 8 | 0;
9741 t = (t & 7 | 0) == 0 ? 0 : 0 - t & 7;
9742 u = g + t | 0;
9743 t = d - t | 0;
9744 b[5747] = u;
9745 b[5744] = t;
9746 b[u + 4 >> 2] = t | 1;
9747 b[g + d + 4 >> 2] = 40;
9748 b[5748] = b[5863];
9749 d = a + 4 | 0;
9750 b[d >> 2] = 27;
9751 b[c >> 2] = b[5853];
9752 b[c + 4 >> 2] = b[5854];
9753 b[c + 8 >> 2] = b[5855];
9754 b[c + 12 >> 2] = b[5856];
9755 b[5853] = g;
9756 b[5854] = h;
9757 b[5856] = 0;
9758 b[5855] = c;
9759 c = a + 24 | 0;
9760
9761 do {
9762 u = c;
9763 c = c + 4 | 0;
9764 b[c >> 2] = 7;
9765 } while ((u + 8 | 0) >>> 0 < v >>> 0);
9766
9767 if ((a | 0) != (j | 0)) {
9768 g = a - j | 0;
9769 b[d >> 2] = b[d >> 2] & -2;
9770 b[j + 4 >> 2] = g | 1;
9771 b[a >> 2] = g;
9772 c = g >>> 3;
9773
9774 if (g >>> 0 < 256) {
9775 d = 23004 + (c << 1 << 2) | 0;
9776 a = b[5741] | 0;
9777 c = 1 << c;
9778
9779 if (!(a & c)) {
9780 b[5741] = a | c;
9781 c = d;
9782 a = d + 8 | 0;
9783 } else {
9784 a = d + 8 | 0;
9785 c = b[a >> 2] | 0;
9786 }
9787
9788 b[a >> 2] = j;
9789 b[c + 12 >> 2] = j;
9790 b[j + 8 >> 2] = c;
9791 b[j + 12 >> 2] = d;
9792 break;
9793 }
9794
9795 c = g >>> 8;
9796 if (c) {
9797 if (g >>> 0 > 16777215) { e = 31; }else {
9798 u = (c + 1048320 | 0) >>> 16 & 8;
9799 v = c << u;
9800 t = (v + 520192 | 0) >>> 16 & 4;
9801 v = v << t;
9802 e = (v + 245760 | 0) >>> 16 & 2;
9803 e = 14 - (t | u | e) + (v << e >>> 15) | 0;
9804 e = g >>> (e + 7 | 0) & 1 | e << 1;
9805 }
9806 } else { e = 0; }
9807 d = 23268 + (e << 2) | 0;
9808 b[j + 28 >> 2] = e;
9809 b[j + 20 >> 2] = 0;
9810 b[f >> 2] = 0;
9811 c = b[5742] | 0;
9812 a = 1 << e;
9813
9814 if (!(c & a)) {
9815 b[5742] = c | a;
9816 b[d >> 2] = j;
9817 b[j + 24 >> 2] = d;
9818 b[j + 12 >> 2] = j;
9819 b[j + 8 >> 2] = j;
9820 break;
9821 }
9822
9823 c = b[d >> 2] | 0;
9824
9825 j: do { if ((b[c + 4 >> 2] & -8 | 0) != (g | 0)) {
9826 e = g << ((e | 0) == 31 ? 0 : 25 - (e >>> 1) | 0);
9827
9828 while (1) {
9829 d = c + 16 + (e >>> 31 << 2) | 0;
9830 a = b[d >> 2] | 0;
9831 if (!a) { break; }
9832
9833 if ((b[a + 4 >> 2] & -8 | 0) == (g | 0)) {
9834 c = a;
9835 break j;
9836 } else {
9837 e = e << 1;
9838 c = a;
9839 }
9840 }
9841
9842 b[d >> 2] = j;
9843 b[j + 24 >> 2] = c;
9844 b[j + 12 >> 2] = j;
9845 b[j + 8 >> 2] = j;
9846 break f;
9847 } } while (0);
9848
9849 u = c + 8 | 0;
9850 v = b[u >> 2] | 0;
9851 b[v + 12 >> 2] = j;
9852 b[u >> 2] = j;
9853 b[j + 8 >> 2] = v;
9854 b[j + 12 >> 2] = c;
9855 b[j + 24 >> 2] = 0;
9856 }
9857 } else {
9858 v = b[5745] | 0;
9859 if ((v | 0) == 0 | g >>> 0 < v >>> 0) { b[5745] = g; }
9860 b[5853] = g;
9861 b[5854] = h;
9862 b[5856] = 0;
9863 b[5750] = b[5859];
9864 b[5749] = -1;
9865 b[5754] = 23004;
9866 b[5753] = 23004;
9867 b[5756] = 23012;
9868 b[5755] = 23012;
9869 b[5758] = 23020;
9870 b[5757] = 23020;
9871 b[5760] = 23028;
9872 b[5759] = 23028;
9873 b[5762] = 23036;
9874 b[5761] = 23036;
9875 b[5764] = 23044;
9876 b[5763] = 23044;
9877 b[5766] = 23052;
9878 b[5765] = 23052;
9879 b[5768] = 23060;
9880 b[5767] = 23060;
9881 b[5770] = 23068;
9882 b[5769] = 23068;
9883 b[5772] = 23076;
9884 b[5771] = 23076;
9885 b[5774] = 23084;
9886 b[5773] = 23084;
9887 b[5776] = 23092;
9888 b[5775] = 23092;
9889 b[5778] = 23100;
9890 b[5777] = 23100;
9891 b[5780] = 23108;
9892 b[5779] = 23108;
9893 b[5782] = 23116;
9894 b[5781] = 23116;
9895 b[5784] = 23124;
9896 b[5783] = 23124;
9897 b[5786] = 23132;
9898 b[5785] = 23132;
9899 b[5788] = 23140;
9900 b[5787] = 23140;
9901 b[5790] = 23148;
9902 b[5789] = 23148;
9903 b[5792] = 23156;
9904 b[5791] = 23156;
9905 b[5794] = 23164;
9906 b[5793] = 23164;
9907 b[5796] = 23172;
9908 b[5795] = 23172;
9909 b[5798] = 23180;
9910 b[5797] = 23180;
9911 b[5800] = 23188;
9912 b[5799] = 23188;
9913 b[5802] = 23196;
9914 b[5801] = 23196;
9915 b[5804] = 23204;
9916 b[5803] = 23204;
9917 b[5806] = 23212;
9918 b[5805] = 23212;
9919 b[5808] = 23220;
9920 b[5807] = 23220;
9921 b[5810] = 23228;
9922 b[5809] = 23228;
9923 b[5812] = 23236;
9924 b[5811] = 23236;
9925 b[5814] = 23244;
9926 b[5813] = 23244;
9927 b[5816] = 23252;
9928 b[5815] = 23252;
9929 v = h + -40 | 0;
9930 t = g + 8 | 0;
9931 t = (t & 7 | 0) == 0 ? 0 : 0 - t & 7;
9932 u = g + t | 0;
9933 t = v - t | 0;
9934 b[5747] = u;
9935 b[5744] = t;
9936 b[u + 4 >> 2] = t | 1;
9937 b[g + v + 4 >> 2] = 40;
9938 b[5748] = b[5863];
9939 } } while (0);
9940
9941 c = b[5744] | 0;
9942
9943 if (c >>> 0 > m >>> 0) {
9944 t = c - m | 0;
9945 b[5744] = t;
9946 v = b[5747] | 0;
9947 u = v + m | 0;
9948 b[5747] = u;
9949 b[u + 4 >> 2] = t | 1;
9950 b[v + 4 >> 2] = m | 3;
9951 v = v + 8 | 0;
9952 R = w;
9953 return v | 0;
9954 }
9955 }
9956
9957 v = Fc() | 0;
9958 b[v >> 2] = 12;
9959 v = 0;
9960 R = w;
9961 return v | 0;
9962 }
9963
9964 function Jc(a) {
9965 a = a | 0;
9966 var c = 0,
9967 d = 0,
9968 e = 0,
9969 f = 0,
9970 g = 0,
9971 h = 0,
9972 i = 0,
9973 j = 0;
9974 if (!a) { return; }
9975 d = a + -8 | 0;
9976 f = b[5745] | 0;
9977 a = b[a + -4 >> 2] | 0;
9978 c = a & -8;
9979 j = d + c | 0;
9980
9981 do { if (!(a & 1)) {
9982 e = b[d >> 2] | 0;
9983 if (!(a & 3)) { return; }
9984 h = d + (0 - e) | 0;
9985 g = e + c | 0;
9986 if (h >>> 0 < f >>> 0) { return; }
9987
9988 if ((b[5746] | 0) == (h | 0)) {
9989 a = j + 4 | 0;
9990 c = b[a >> 2] | 0;
9991
9992 if ((c & 3 | 0) != 3) {
9993 i = h;
9994 c = g;
9995 break;
9996 }
9997
9998 b[5743] = g;
9999 b[a >> 2] = c & -2;
10000 b[h + 4 >> 2] = g | 1;
10001 b[h + g >> 2] = g;
10002 return;
10003 }
10004
10005 d = e >>> 3;
10006
10007 if (e >>> 0 < 256) {
10008 a = b[h + 8 >> 2] | 0;
10009 c = b[h + 12 >> 2] | 0;
10010
10011 if ((c | 0) == (a | 0)) {
10012 b[5741] = b[5741] & ~(1 << d);
10013 i = h;
10014 c = g;
10015 break;
10016 } else {
10017 b[a + 12 >> 2] = c;
10018 b[c + 8 >> 2] = a;
10019 i = h;
10020 c = g;
10021 break;
10022 }
10023 }
10024
10025 f = b[h + 24 >> 2] | 0;
10026 a = b[h + 12 >> 2] | 0;
10027
10028 do { if ((a | 0) == (h | 0)) {
10029 c = h + 16 | 0;
10030 d = c + 4 | 0;
10031 a = b[d >> 2] | 0;
10032
10033 if (!a) {
10034 a = b[c >> 2] | 0;
10035
10036 if (!a) {
10037 a = 0;
10038 break;
10039 }
10040 } else { c = d; }
10041
10042 while (1) {
10043 e = a + 20 | 0;
10044 d = b[e >> 2] | 0;
10045
10046 if (!d) {
10047 e = a + 16 | 0;
10048 d = b[e >> 2] | 0;
10049 if (!d) { break; }else {
10050 a = d;
10051 c = e;
10052 }
10053 } else {
10054 a = d;
10055 c = e;
10056 }
10057 }
10058
10059 b[c >> 2] = 0;
10060 } else {
10061 i = b[h + 8 >> 2] | 0;
10062 b[i + 12 >> 2] = a;
10063 b[a + 8 >> 2] = i;
10064 } } while (0);
10065
10066 if (f) {
10067 c = b[h + 28 >> 2] | 0;
10068 d = 23268 + (c << 2) | 0;
10069
10070 if ((b[d >> 2] | 0) == (h | 0)) {
10071 b[d >> 2] = a;
10072
10073 if (!a) {
10074 b[5742] = b[5742] & ~(1 << c);
10075 i = h;
10076 c = g;
10077 break;
10078 }
10079 } else {
10080 i = f + 16 | 0;
10081 b[((b[i >> 2] | 0) == (h | 0) ? i : f + 20 | 0) >> 2] = a;
10082
10083 if (!a) {
10084 i = h;
10085 c = g;
10086 break;
10087 }
10088 }
10089
10090 b[a + 24 >> 2] = f;
10091 c = h + 16 | 0;
10092 d = b[c >> 2] | 0;
10093
10094 if (d | 0) {
10095 b[a + 16 >> 2] = d;
10096 b[d + 24 >> 2] = a;
10097 }
10098
10099 c = b[c + 4 >> 2] | 0;
10100
10101 if (c) {
10102 b[a + 20 >> 2] = c;
10103 b[c + 24 >> 2] = a;
10104 i = h;
10105 c = g;
10106 } else {
10107 i = h;
10108 c = g;
10109 }
10110 } else {
10111 i = h;
10112 c = g;
10113 }
10114 } else {
10115 i = d;
10116 h = d;
10117 } } while (0);
10118
10119 if (h >>> 0 >= j >>> 0) { return; }
10120 a = j + 4 | 0;
10121 e = b[a >> 2] | 0;
10122 if (!(e & 1)) { return; }
10123
10124 if (!(e & 2)) {
10125 if ((b[5747] | 0) == (j | 0)) {
10126 j = (b[5744] | 0) + c | 0;
10127 b[5744] = j;
10128 b[5747] = i;
10129 b[i + 4 >> 2] = j | 1;
10130 if ((i | 0) != (b[5746] | 0)) { return; }
10131 b[5746] = 0;
10132 b[5743] = 0;
10133 return;
10134 }
10135
10136 if ((b[5746] | 0) == (j | 0)) {
10137 j = (b[5743] | 0) + c | 0;
10138 b[5743] = j;
10139 b[5746] = h;
10140 b[i + 4 >> 2] = j | 1;
10141 b[h + j >> 2] = j;
10142 return;
10143 }
10144
10145 f = (e & -8) + c | 0;
10146 d = e >>> 3;
10147
10148 do { if (e >>> 0 < 256) {
10149 c = b[j + 8 >> 2] | 0;
10150 a = b[j + 12 >> 2] | 0;
10151
10152 if ((a | 0) == (c | 0)) {
10153 b[5741] = b[5741] & ~(1 << d);
10154 break;
10155 } else {
10156 b[c + 12 >> 2] = a;
10157 b[a + 8 >> 2] = c;
10158 break;
10159 }
10160 } else {
10161 g = b[j + 24 >> 2] | 0;
10162 a = b[j + 12 >> 2] | 0;
10163
10164 do { if ((a | 0) == (j | 0)) {
10165 c = j + 16 | 0;
10166 d = c + 4 | 0;
10167 a = b[d >> 2] | 0;
10168
10169 if (!a) {
10170 a = b[c >> 2] | 0;
10171
10172 if (!a) {
10173 d = 0;
10174 break;
10175 }
10176 } else { c = d; }
10177
10178 while (1) {
10179 e = a + 20 | 0;
10180 d = b[e >> 2] | 0;
10181
10182 if (!d) {
10183 e = a + 16 | 0;
10184 d = b[e >> 2] | 0;
10185 if (!d) { break; }else {
10186 a = d;
10187 c = e;
10188 }
10189 } else {
10190 a = d;
10191 c = e;
10192 }
10193 }
10194
10195 b[c >> 2] = 0;
10196 d = a;
10197 } else {
10198 d = b[j + 8 >> 2] | 0;
10199 b[d + 12 >> 2] = a;
10200 b[a + 8 >> 2] = d;
10201 d = a;
10202 } } while (0);
10203
10204 if (g | 0) {
10205 a = b[j + 28 >> 2] | 0;
10206 c = 23268 + (a << 2) | 0;
10207
10208 if ((b[c >> 2] | 0) == (j | 0)) {
10209 b[c >> 2] = d;
10210
10211 if (!d) {
10212 b[5742] = b[5742] & ~(1 << a);
10213 break;
10214 }
10215 } else {
10216 e = g + 16 | 0;
10217 b[((b[e >> 2] | 0) == (j | 0) ? e : g + 20 | 0) >> 2] = d;
10218 if (!d) { break; }
10219 }
10220
10221 b[d + 24 >> 2] = g;
10222 a = j + 16 | 0;
10223 c = b[a >> 2] | 0;
10224
10225 if (c | 0) {
10226 b[d + 16 >> 2] = c;
10227 b[c + 24 >> 2] = d;
10228 }
10229
10230 a = b[a + 4 >> 2] | 0;
10231
10232 if (a | 0) {
10233 b[d + 20 >> 2] = a;
10234 b[a + 24 >> 2] = d;
10235 }
10236 }
10237 } } while (0);
10238
10239 b[i + 4 >> 2] = f | 1;
10240 b[h + f >> 2] = f;
10241
10242 if ((i | 0) == (b[5746] | 0)) {
10243 b[5743] = f;
10244 return;
10245 }
10246 } else {
10247 b[a >> 2] = e & -2;
10248 b[i + 4 >> 2] = c | 1;
10249 b[h + c >> 2] = c;
10250 f = c;
10251 }
10252
10253 a = f >>> 3;
10254
10255 if (f >>> 0 < 256) {
10256 d = 23004 + (a << 1 << 2) | 0;
10257 c = b[5741] | 0;
10258 a = 1 << a;
10259
10260 if (!(c & a)) {
10261 b[5741] = c | a;
10262 a = d;
10263 c = d + 8 | 0;
10264 } else {
10265 c = d + 8 | 0;
10266 a = b[c >> 2] | 0;
10267 }
10268
10269 b[c >> 2] = i;
10270 b[a + 12 >> 2] = i;
10271 b[i + 8 >> 2] = a;
10272 b[i + 12 >> 2] = d;
10273 return;
10274 }
10275
10276 a = f >>> 8;
10277 if (a) {
10278 if (f >>> 0 > 16777215) { e = 31; }else {
10279 h = (a + 1048320 | 0) >>> 16 & 8;
10280 j = a << h;
10281 g = (j + 520192 | 0) >>> 16 & 4;
10282 j = j << g;
10283 e = (j + 245760 | 0) >>> 16 & 2;
10284 e = 14 - (g | h | e) + (j << e >>> 15) | 0;
10285 e = f >>> (e + 7 | 0) & 1 | e << 1;
10286 }
10287 } else { e = 0; }
10288 a = 23268 + (e << 2) | 0;
10289 b[i + 28 >> 2] = e;
10290 b[i + 20 >> 2] = 0;
10291 b[i + 16 >> 2] = 0;
10292 c = b[5742] | 0;
10293 d = 1 << e;
10294
10295 a: do { if (!(c & d)) {
10296 b[5742] = c | d;
10297 b[a >> 2] = i;
10298 b[i + 24 >> 2] = a;
10299 b[i + 12 >> 2] = i;
10300 b[i + 8 >> 2] = i;
10301 } else {
10302 a = b[a >> 2] | 0;
10303
10304 b: do { if ((b[a + 4 >> 2] & -8 | 0) != (f | 0)) {
10305 e = f << ((e | 0) == 31 ? 0 : 25 - (e >>> 1) | 0);
10306
10307 while (1) {
10308 d = a + 16 + (e >>> 31 << 2) | 0;
10309 c = b[d >> 2] | 0;
10310 if (!c) { break; }
10311
10312 if ((b[c + 4 >> 2] & -8 | 0) == (f | 0)) {
10313 a = c;
10314 break b;
10315 } else {
10316 e = e << 1;
10317 a = c;
10318 }
10319 }
10320
10321 b[d >> 2] = i;
10322 b[i + 24 >> 2] = a;
10323 b[i + 12 >> 2] = i;
10324 b[i + 8 >> 2] = i;
10325 break a;
10326 } } while (0);
10327
10328 h = a + 8 | 0;
10329 j = b[h >> 2] | 0;
10330 b[j + 12 >> 2] = i;
10331 b[h >> 2] = i;
10332 b[i + 8 >> 2] = j;
10333 b[i + 12 >> 2] = a;
10334 b[i + 24 >> 2] = 0;
10335 } } while (0);
10336
10337 j = (b[5749] | 0) + -1 | 0;
10338 b[5749] = j;
10339 if (j | 0) { return; }
10340 a = 23420;
10341
10342 while (1) {
10343 a = b[a >> 2] | 0;
10344 if (!a) { break; }else { a = a + 8 | 0; }
10345 }
10346
10347 b[5749] = -1;
10348 return;
10349 }
10350
10351 function Kc(a, c) {
10352 a = a | 0;
10353 c = c | 0;
10354 var d = 0;
10355
10356 if (a) {
10357 d = B(c, a) | 0;
10358 if ((c | a) >>> 0 > 65535) { d = ((d >>> 0) / (a >>> 0) | 0 | 0) == (c | 0) ? d : -1; }
10359 } else { d = 0; }
10360
10361 a = Ic(d) | 0;
10362 if (!a) { return a | 0; }
10363 if (!(b[a + -4 >> 2] & 3)) { return a | 0; }
10364 Uc(a | 0, 0, d | 0) | 0;
10365 return a | 0;
10366 }
10367
10368 function Lc(a, b, c, d) {
10369 a = a | 0;
10370 b = b | 0;
10371 c = c | 0;
10372 d = d | 0;
10373 c = a + c >>> 0;
10374 return (E(b + d + (c >>> 0 < a >>> 0 | 0) >>> 0 | 0), c | 0) | 0;
10375 }
10376
10377 function Mc(a, b, c, d) {
10378 a = a | 0;
10379 b = b | 0;
10380 c = c | 0;
10381 d = d | 0;
10382 d = b - d - (c >>> 0 > a >>> 0 | 0) >>> 0;
10383 return (E(d | 0), a - c >>> 0 | 0) | 0;
10384 }
10385
10386 function Nc(a) {
10387 a = a | 0;
10388 return (a ? 31 - (C(a ^ a - 1) | 0) | 0 : 32) | 0;
10389 }
10390
10391 function Oc(a, c, d, e, f) {
10392 a = a | 0;
10393 c = c | 0;
10394 d = d | 0;
10395 e = e | 0;
10396 f = f | 0;
10397 var g = 0,
10398 h = 0,
10399 i = 0,
10400 j = 0,
10401 k = 0,
10402 l = 0,
10403 m = 0,
10404 n = 0,
10405 o = 0,
10406 p = 0;
10407 l = a;
10408 j = c;
10409 k = j;
10410 h = d;
10411 n = e;
10412 i = n;
10413
10414 if (!k) {
10415 g = (f | 0) != 0;
10416
10417 if (!i) {
10418 if (g) {
10419 b[f >> 2] = (l >>> 0) % (h >>> 0);
10420 b[f + 4 >> 2] = 0;
10421 }
10422
10423 n = 0;
10424 f = (l >>> 0) / (h >>> 0) >>> 0;
10425 return (E(n | 0), f) | 0;
10426 } else {
10427 if (!g) {
10428 n = 0;
10429 f = 0;
10430 return (E(n | 0), f) | 0;
10431 }
10432
10433 b[f >> 2] = a | 0;
10434 b[f + 4 >> 2] = c & 0;
10435 n = 0;
10436 f = 0;
10437 return (E(n | 0), f) | 0;
10438 }
10439 }
10440
10441 g = (i | 0) == 0;
10442
10443 do { if (h) {
10444 if (!g) {
10445 g = (C(i | 0) | 0) - (C(k | 0) | 0) | 0;
10446
10447 if (g >>> 0 <= 31) {
10448 m = g + 1 | 0;
10449 i = 31 - g | 0;
10450 c = g - 31 >> 31;
10451 h = m;
10452 a = l >>> (m >>> 0) & c | k << i;
10453 c = k >>> (m >>> 0) & c;
10454 g = 0;
10455 i = l << i;
10456 break;
10457 }
10458
10459 if (!f) {
10460 n = 0;
10461 f = 0;
10462 return (E(n | 0), f) | 0;
10463 }
10464
10465 b[f >> 2] = a | 0;
10466 b[f + 4 >> 2] = j | c & 0;
10467 n = 0;
10468 f = 0;
10469 return (E(n | 0), f) | 0;
10470 }
10471
10472 g = h - 1 | 0;
10473
10474 if (g & h | 0) {
10475 i = (C(h | 0) | 0) + 33 - (C(k | 0) | 0) | 0;
10476 p = 64 - i | 0;
10477 m = 32 - i | 0;
10478 j = m >> 31;
10479 o = i - 32 | 0;
10480 c = o >> 31;
10481 h = i;
10482 a = m - 1 >> 31 & k >>> (o >>> 0) | (k << m | l >>> (i >>> 0)) & c;
10483 c = c & k >>> (i >>> 0);
10484 g = l << p & j;
10485 i = (k << p | l >>> (o >>> 0)) & j | l << m & i - 33 >> 31;
10486 break;
10487 }
10488
10489 if (f | 0) {
10490 b[f >> 2] = g & l;
10491 b[f + 4 >> 2] = 0;
10492 }
10493
10494 if ((h | 0) == 1) {
10495 o = j | c & 0;
10496 p = a | 0 | 0;
10497 return (E(o | 0), p) | 0;
10498 } else {
10499 p = Nc(h | 0) | 0;
10500 o = k >>> (p >>> 0) | 0;
10501 p = k << 32 - p | l >>> (p >>> 0) | 0;
10502 return (E(o | 0), p) | 0;
10503 }
10504 } else {
10505 if (g) {
10506 if (f | 0) {
10507 b[f >> 2] = (k >>> 0) % (h >>> 0);
10508 b[f + 4 >> 2] = 0;
10509 }
10510
10511 o = 0;
10512 p = (k >>> 0) / (h >>> 0) >>> 0;
10513 return (E(o | 0), p) | 0;
10514 }
10515
10516 if (!l) {
10517 if (f | 0) {
10518 b[f >> 2] = 0;
10519 b[f + 4 >> 2] = (k >>> 0) % (i >>> 0);
10520 }
10521
10522 o = 0;
10523 p = (k >>> 0) / (i >>> 0) >>> 0;
10524 return (E(o | 0), p) | 0;
10525 }
10526
10527 g = i - 1 | 0;
10528
10529 if (!(g & i)) {
10530 if (f | 0) {
10531 b[f >> 2] = a | 0;
10532 b[f + 4 >> 2] = g & k | c & 0;
10533 }
10534
10535 o = 0;
10536 p = k >>> ((Nc(i | 0) | 0) >>> 0);
10537 return (E(o | 0), p) | 0;
10538 }
10539
10540 g = (C(i | 0) | 0) - (C(k | 0) | 0) | 0;
10541
10542 if (g >>> 0 <= 30) {
10543 c = g + 1 | 0;
10544 i = 31 - g | 0;
10545 h = c;
10546 a = k << i | l >>> (c >>> 0);
10547 c = k >>> (c >>> 0);
10548 g = 0;
10549 i = l << i;
10550 break;
10551 }
10552
10553 if (!f) {
10554 o = 0;
10555 p = 0;
10556 return (E(o | 0), p) | 0;
10557 }
10558
10559 b[f >> 2] = a | 0;
10560 b[f + 4 >> 2] = j | c & 0;
10561 o = 0;
10562 p = 0;
10563 return (E(o | 0), p) | 0;
10564 } } while (0);
10565
10566 if (!h) {
10567 k = i;
10568 j = 0;
10569 i = 0;
10570 } else {
10571 m = d | 0 | 0;
10572 l = n | e & 0;
10573 k = Lc(m | 0, l | 0, -1, -1) | 0;
10574 d = F() | 0;
10575 j = i;
10576 i = 0;
10577
10578 do {
10579 e = j;
10580 j = g >>> 31 | j << 1;
10581 g = i | g << 1;
10582 e = a << 1 | e >>> 31 | 0;
10583 n = a >>> 31 | c << 1 | 0;
10584 Mc(k | 0, d | 0, e | 0, n | 0) | 0;
10585 p = F() | 0;
10586 o = p >> 31 | ((p | 0) < 0 ? -1 : 0) << 1;
10587 i = o & 1;
10588 a = Mc(e | 0, n | 0, o & m | 0, (((p | 0) < 0 ? -1 : 0) >> 31 | ((p | 0) < 0 ? -1 : 0) << 1) & l | 0) | 0;
10589 c = F() | 0;
10590 h = h - 1 | 0;
10591 } while ((h | 0) != 0);
10592
10593 k = j;
10594 j = 0;
10595 }
10596
10597 h = 0;
10598
10599 if (f | 0) {
10600 b[f >> 2] = a;
10601 b[f + 4 >> 2] = c;
10602 }
10603
10604 o = (g | 0) >>> 31 | (k | h) << 1 | (h << 1 | g >>> 31) & 0 | j;
10605 p = (g << 1 | 0 >>> 31) & -2 | i;
10606 return (E(o | 0), p) | 0;
10607 }
10608
10609 function Pc(a, c, d, e) {
10610 a = a | 0;
10611 c = c | 0;
10612 d = d | 0;
10613 e = e | 0;
10614 var f = 0,
10615 g = 0;
10616 g = R;
10617 R = R + 16 | 0;
10618 f = g | 0;
10619 Oc(a, c, d, e, f) | 0;
10620 R = g;
10621 return (E(b[f + 4 >> 2] | 0), b[f >> 2] | 0) | 0;
10622 }
10623
10624 function Qc(a, b, c) {
10625 a = a | 0;
10626 b = b | 0;
10627 c = c | 0;
10628
10629 if ((c | 0) < 32) {
10630 E(b >>> c | 0);
10631 return a >>> c | (b & (1 << c) - 1) << 32 - c;
10632 }
10633
10634 E(0);
10635 return b >>> c - 32 | 0;
10636 }
10637
10638 function Rc(a, b, c) {
10639 a = a | 0;
10640 b = b | 0;
10641 c = c | 0;
10642
10643 if ((c | 0) < 32) {
10644 E(b << c | (a & (1 << c) - 1 << 32 - c) >>> 32 - c | 0);
10645 return a << c;
10646 }
10647
10648 E(a << c - 32 | 0);
10649 return 0;
10650 }
10651
10652 function Sc(a) {
10653 a = +a;
10654 return a >= 0.0 ? +p(a + .5) : +A(a - .5);
10655 }
10656
10657 function Tc(c, d, e) {
10658 c = c | 0;
10659 d = d | 0;
10660 e = e | 0;
10661 var f = 0,
10662 g = 0,
10663 h = 0;
10664
10665 if ((e | 0) >= 8192) {
10666 J(c | 0, d | 0, e | 0) | 0;
10667 return c | 0;
10668 }
10669
10670 h = c | 0;
10671 g = c + e | 0;
10672
10673 if ((c & 3) == (d & 3)) {
10674 while (c & 3) {
10675 if (!e) { return h | 0; }
10676 a[c >> 0] = a[d >> 0] | 0;
10677 c = c + 1 | 0;
10678 d = d + 1 | 0;
10679 e = e - 1 | 0;
10680 }
10681
10682 e = g & -4 | 0;
10683 f = e - 64 | 0;
10684
10685 while ((c | 0) <= (f | 0)) {
10686 b[c >> 2] = b[d >> 2];
10687 b[c + 4 >> 2] = b[d + 4 >> 2];
10688 b[c + 8 >> 2] = b[d + 8 >> 2];
10689 b[c + 12 >> 2] = b[d + 12 >> 2];
10690 b[c + 16 >> 2] = b[d + 16 >> 2];
10691 b[c + 20 >> 2] = b[d + 20 >> 2];
10692 b[c + 24 >> 2] = b[d + 24 >> 2];
10693 b[c + 28 >> 2] = b[d + 28 >> 2];
10694 b[c + 32 >> 2] = b[d + 32 >> 2];
10695 b[c + 36 >> 2] = b[d + 36 >> 2];
10696 b[c + 40 >> 2] = b[d + 40 >> 2];
10697 b[c + 44 >> 2] = b[d + 44 >> 2];
10698 b[c + 48 >> 2] = b[d + 48 >> 2];
10699 b[c + 52 >> 2] = b[d + 52 >> 2];
10700 b[c + 56 >> 2] = b[d + 56 >> 2];
10701 b[c + 60 >> 2] = b[d + 60 >> 2];
10702 c = c + 64 | 0;
10703 d = d + 64 | 0;
10704 }
10705
10706 while ((c | 0) < (e | 0)) {
10707 b[c >> 2] = b[d >> 2];
10708 c = c + 4 | 0;
10709 d = d + 4 | 0;
10710 }
10711 } else {
10712 e = g - 4 | 0;
10713
10714 while ((c | 0) < (e | 0)) {
10715 a[c >> 0] = a[d >> 0] | 0;
10716 a[c + 1 >> 0] = a[d + 1 >> 0] | 0;
10717 a[c + 2 >> 0] = a[d + 2 >> 0] | 0;
10718 a[c + 3 >> 0] = a[d + 3 >> 0] | 0;
10719 c = c + 4 | 0;
10720 d = d + 4 | 0;
10721 }
10722 }
10723
10724 while ((c | 0) < (g | 0)) {
10725 a[c >> 0] = a[d >> 0] | 0;
10726 c = c + 1 | 0;
10727 d = d + 1 | 0;
10728 }
10729
10730 return h | 0;
10731 }
10732
10733 function Uc(c, d, e) {
10734 c = c | 0;
10735 d = d | 0;
10736 e = e | 0;
10737 var f = 0,
10738 g = 0,
10739 h = 0,
10740 i = 0;
10741 h = c + e | 0;
10742 d = d & 255;
10743
10744 if ((e | 0) >= 67) {
10745 while (c & 3) {
10746 a[c >> 0] = d;
10747 c = c + 1 | 0;
10748 }
10749
10750 f = h & -4 | 0;
10751 i = d | d << 8 | d << 16 | d << 24;
10752 g = f - 64 | 0;
10753
10754 while ((c | 0) <= (g | 0)) {
10755 b[c >> 2] = i;
10756 b[c + 4 >> 2] = i;
10757 b[c + 8 >> 2] = i;
10758 b[c + 12 >> 2] = i;
10759 b[c + 16 >> 2] = i;
10760 b[c + 20 >> 2] = i;
10761 b[c + 24 >> 2] = i;
10762 b[c + 28 >> 2] = i;
10763 b[c + 32 >> 2] = i;
10764 b[c + 36 >> 2] = i;
10765 b[c + 40 >> 2] = i;
10766 b[c + 44 >> 2] = i;
10767 b[c + 48 >> 2] = i;
10768 b[c + 52 >> 2] = i;
10769 b[c + 56 >> 2] = i;
10770 b[c + 60 >> 2] = i;
10771 c = c + 64 | 0;
10772 }
10773
10774 while ((c | 0) < (f | 0)) {
10775 b[c >> 2] = i;
10776 c = c + 4 | 0;
10777 }
10778 }
10779
10780 while ((c | 0) < (h | 0)) {
10781 a[c >> 0] = d;
10782 c = c + 1 | 0;
10783 }
10784
10785 return h - e | 0;
10786 }
10787
10788 function Vc(a) {
10789 a = +a;
10790 return a >= 0.0 ? +p(a + .5) : +A(a - .5);
10791 }
10792
10793 function Wc(a) {
10794 a = a | 0;
10795 var c = 0,
10796 d = 0,
10797 e = 0;
10798 e = I() | 0;
10799 d = b[g >> 2] | 0;
10800 c = d + a | 0;
10801
10802 if ((a | 0) > 0 & (c | 0) < (d | 0) | (c | 0) < 0) {
10803 L(c | 0) | 0;
10804 H(12);
10805 return -1;
10806 }
10807
10808 if ((c | 0) > (e | 0)) { if (!(K(c | 0) | 0)) {
10809 H(12);
10810 return -1;
10811 } }
10812 b[g >> 2] = c;
10813 return d | 0;
10814 } // EMSCRIPTEN_END_FUNCS
10815
10816
10817 return {
10818 ___uremdi3: Pc,
10819 _bitshift64Lshr: Qc,
10820 _bitshift64Shl: Rc,
10821 _calloc: Kc,
10822 _compact: vb,
10823 _destroyLinkedPolygon: Zb,
10824 _edgeLengthKm: lb,
10825 _edgeLengthM: mb,
10826 _emscripten_replace_memory: U,
10827 _experimentalH3ToLocalIj: cc,
10828 _experimentalLocalIjToH3: dc,
10829 _free: Jc,
10830 _geoToH3: Gb,
10831 _getDestinationH3IndexFromUnidirectionalEdge: Sb,
10832 _getH3IndexesFromUnidirectionalEdge: Ub,
10833 _getH3UnidirectionalEdge: Qb,
10834 _getH3UnidirectionalEdgeBoundary: Wb,
10835 _getH3UnidirectionalEdgesFromHexagon: Vb,
10836 _getOriginH3IndexFromUnidirectionalEdge: Rb,
10837 _getPentagonIndexes: Ob,
10838 _getRes0Indexes: qa,
10839 _h3Distance: ec,
10840 _h3GetBaseCell: ob,
10841 _h3GetFaces: Mb,
10842 _h3IndexesAreNeighbors: Pb,
10843 _h3IsPentagon: tb,
10844 _h3IsResClassIII: yb,
10845 _h3IsValid: pb,
10846 _h3Line: gc,
10847 _h3LineSize: fc,
10848 _h3SetToLinkedGeo: ha,
10849 _h3ToCenterChild: ub,
10850 _h3ToChildren: sb,
10851 _h3ToGeo: Jb,
10852 _h3ToGeoBoundary: Kb,
10853 _h3ToParent: qb,
10854 _h3UnidirectionalEdgeIsValid: Tb,
10855 _hexAreaKm2: jb,
10856 _hexAreaM2: kb,
10857 _hexRing: da,
10858 _i64Subtract: Mc,
10859 _kRing: _,
10860 _kRingDistances: $,
10861 _llvm_round_f64: Sc,
10862 _malloc: Ic,
10863 _maxFaceCount: Lb,
10864 _maxH3ToChildrenSize: rb,
10865 _maxKringSize: Z,
10866 _maxPolyfillSize: ea,
10867 _maxUncompactSize: xb,
10868 _memcpy: Tc,
10869 _memset: Uc,
10870 _numHexagons: nb,
10871 _pentagonIndexCount: Nb,
10872 _polyfill: fa,
10873 _res0IndexCount: pa,
10874 _round: Vc,
10875 _sbrk: Wc,
10876 _sizeOfCoordIJ: sc,
10877 _sizeOfGeoBoundary: oc,
10878 _sizeOfGeoCoord: nc,
10879 _sizeOfGeoPolygon: qc,
10880 _sizeOfGeofence: pc,
10881 _sizeOfH3Index: mc,
10882 _sizeOfLinkedGeoPolygon: rc,
10883 _uncompact: wb,
10884 establishStackSpace: Y,
10885 stackAlloc: V,
10886 stackRestore: X,
10887 stackSave: W
10888 };
10889 }( // EMSCRIPTEN_END_ASM
10890 asmGlobalArg, asmLibraryArg, buffer);
10891
10892 var ___uremdi3 = Module["___uremdi3"] = asm["___uremdi3"];
10893
10894 var _bitshift64Lshr = Module["_bitshift64Lshr"] = asm["_bitshift64Lshr"];
10895
10896 var _bitshift64Shl = Module["_bitshift64Shl"] = asm["_bitshift64Shl"];
10897
10898 var _calloc = Module["_calloc"] = asm["_calloc"];
10899
10900 var _compact = Module["_compact"] = asm["_compact"];
10901
10902 var _destroyLinkedPolygon = Module["_destroyLinkedPolygon"] = asm["_destroyLinkedPolygon"];
10903
10904 var _edgeLengthKm = Module["_edgeLengthKm"] = asm["_edgeLengthKm"];
10905
10906 var _edgeLengthM = Module["_edgeLengthM"] = asm["_edgeLengthM"];
10907
10908 var _emscripten_replace_memory = Module["_emscripten_replace_memory"] = asm["_emscripten_replace_memory"];
10909
10910 var _experimentalH3ToLocalIj = Module["_experimentalH3ToLocalIj"] = asm["_experimentalH3ToLocalIj"];
10911
10912 var _experimentalLocalIjToH3 = Module["_experimentalLocalIjToH3"] = asm["_experimentalLocalIjToH3"];
10913
10914 var _free = Module["_free"] = asm["_free"];
10915
10916 var _geoToH3 = Module["_geoToH3"] = asm["_geoToH3"];
10917
10918 var _getDestinationH3IndexFromUnidirectionalEdge = Module["_getDestinationH3IndexFromUnidirectionalEdge"] = asm["_getDestinationH3IndexFromUnidirectionalEdge"];
10919
10920 var _getH3IndexesFromUnidirectionalEdge = Module["_getH3IndexesFromUnidirectionalEdge"] = asm["_getH3IndexesFromUnidirectionalEdge"];
10921
10922 var _getH3UnidirectionalEdge = Module["_getH3UnidirectionalEdge"] = asm["_getH3UnidirectionalEdge"];
10923
10924 var _getH3UnidirectionalEdgeBoundary = Module["_getH3UnidirectionalEdgeBoundary"] = asm["_getH3UnidirectionalEdgeBoundary"];
10925
10926 var _getH3UnidirectionalEdgesFromHexagon = Module["_getH3UnidirectionalEdgesFromHexagon"] = asm["_getH3UnidirectionalEdgesFromHexagon"];
10927
10928 var _getOriginH3IndexFromUnidirectionalEdge = Module["_getOriginH3IndexFromUnidirectionalEdge"] = asm["_getOriginH3IndexFromUnidirectionalEdge"];
10929
10930 var _getPentagonIndexes = Module["_getPentagonIndexes"] = asm["_getPentagonIndexes"];
10931
10932 var _getRes0Indexes = Module["_getRes0Indexes"] = asm["_getRes0Indexes"];
10933
10934 var _h3Distance = Module["_h3Distance"] = asm["_h3Distance"];
10935
10936 var _h3GetBaseCell = Module["_h3GetBaseCell"] = asm["_h3GetBaseCell"];
10937
10938 var _h3GetFaces = Module["_h3GetFaces"] = asm["_h3GetFaces"];
10939
10940 var _h3IndexesAreNeighbors = Module["_h3IndexesAreNeighbors"] = asm["_h3IndexesAreNeighbors"];
10941
10942 var _h3IsPentagon = Module["_h3IsPentagon"] = asm["_h3IsPentagon"];
10943
10944 var _h3IsResClassIII = Module["_h3IsResClassIII"] = asm["_h3IsResClassIII"];
10945
10946 var _h3IsValid = Module["_h3IsValid"] = asm["_h3IsValid"];
10947
10948 var _h3Line = Module["_h3Line"] = asm["_h3Line"];
10949
10950 var _h3LineSize = Module["_h3LineSize"] = asm["_h3LineSize"];
10951
10952 var _h3SetToLinkedGeo = Module["_h3SetToLinkedGeo"] = asm["_h3SetToLinkedGeo"];
10953
10954 var _h3ToCenterChild = Module["_h3ToCenterChild"] = asm["_h3ToCenterChild"];
10955
10956 var _h3ToChildren = Module["_h3ToChildren"] = asm["_h3ToChildren"];
10957
10958 var _h3ToGeo = Module["_h3ToGeo"] = asm["_h3ToGeo"];
10959
10960 var _h3ToGeoBoundary = Module["_h3ToGeoBoundary"] = asm["_h3ToGeoBoundary"];
10961
10962 var _h3ToParent = Module["_h3ToParent"] = asm["_h3ToParent"];
10963
10964 var _h3UnidirectionalEdgeIsValid = Module["_h3UnidirectionalEdgeIsValid"] = asm["_h3UnidirectionalEdgeIsValid"];
10965
10966 var _hexAreaKm2 = Module["_hexAreaKm2"] = asm["_hexAreaKm2"];
10967
10968 var _hexAreaM2 = Module["_hexAreaM2"] = asm["_hexAreaM2"];
10969
10970 var _hexRing = Module["_hexRing"] = asm["_hexRing"];
10971
10972 var _i64Subtract = Module["_i64Subtract"] = asm["_i64Subtract"];
10973
10974 var _kRing = Module["_kRing"] = asm["_kRing"];
10975
10976 var _kRingDistances = Module["_kRingDistances"] = asm["_kRingDistances"];
10977
10978 var _llvm_round_f64 = Module["_llvm_round_f64"] = asm["_llvm_round_f64"];
10979
10980 var _malloc = Module["_malloc"] = asm["_malloc"];
10981
10982 var _maxFaceCount = Module["_maxFaceCount"] = asm["_maxFaceCount"];
10983
10984 var _maxH3ToChildrenSize = Module["_maxH3ToChildrenSize"] = asm["_maxH3ToChildrenSize"];
10985
10986 var _maxKringSize = Module["_maxKringSize"] = asm["_maxKringSize"];
10987
10988 var _maxPolyfillSize = Module["_maxPolyfillSize"] = asm["_maxPolyfillSize"];
10989
10990 var _maxUncompactSize = Module["_maxUncompactSize"] = asm["_maxUncompactSize"];
10991
10992 var _memcpy = Module["_memcpy"] = asm["_memcpy"];
10993
10994 var _memset = Module["_memset"] = asm["_memset"];
10995
10996 var _numHexagons = Module["_numHexagons"] = asm["_numHexagons"];
10997
10998 var _pentagonIndexCount = Module["_pentagonIndexCount"] = asm["_pentagonIndexCount"];
10999
11000 var _polyfill = Module["_polyfill"] = asm["_polyfill"];
11001
11002 var _res0IndexCount = Module["_res0IndexCount"] = asm["_res0IndexCount"];
11003
11004 var _round = Module["_round"] = asm["_round"];
11005
11006 var _sbrk = Module["_sbrk"] = asm["_sbrk"];
11007
11008 var _sizeOfCoordIJ = Module["_sizeOfCoordIJ"] = asm["_sizeOfCoordIJ"];
11009
11010 var _sizeOfGeoBoundary = Module["_sizeOfGeoBoundary"] = asm["_sizeOfGeoBoundary"];
11011
11012 var _sizeOfGeoCoord = Module["_sizeOfGeoCoord"] = asm["_sizeOfGeoCoord"];
11013
11014 var _sizeOfGeoPolygon = Module["_sizeOfGeoPolygon"] = asm["_sizeOfGeoPolygon"];
11015
11016 var _sizeOfGeofence = Module["_sizeOfGeofence"] = asm["_sizeOfGeofence"];
11017
11018 var _sizeOfH3Index = Module["_sizeOfH3Index"] = asm["_sizeOfH3Index"];
11019
11020 var _sizeOfLinkedGeoPolygon = Module["_sizeOfLinkedGeoPolygon"] = asm["_sizeOfLinkedGeoPolygon"];
11021
11022 var _uncompact = Module["_uncompact"] = asm["_uncompact"];
11023
11024 var establishStackSpace = Module["establishStackSpace"] = asm["establishStackSpace"];
11025 var stackAlloc = Module["stackAlloc"] = asm["stackAlloc"];
11026 var stackRestore = Module["stackRestore"] = asm["stackRestore"];
11027 var stackSave = Module["stackSave"] = asm["stackSave"];
11028 Module["asm"] = asm;
11029 Module["cwrap"] = cwrap;
11030 Module["setValue"] = setValue;
11031 Module["getValue"] = getValue;
11032 Module["getTempRet0"] = getTempRet0;
11033
11034 if (memoryInitializer) {
11035 if (!isDataURI(memoryInitializer)) {
11036 memoryInitializer = locateFile(memoryInitializer);
11037 }
11038
11039 if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) {
11040 var data = readBinary(memoryInitializer);
11041 HEAPU8.set(data, GLOBAL_BASE);
11042 } else {
11043 addRunDependency("memory initializer");
11044
11045 var applyMemoryInitializer = function (data) {
11046 if (data.byteLength) { data = new Uint8Array(data); }
11047 HEAPU8.set(data, GLOBAL_BASE);
11048 if (Module["memoryInitializerRequest"]) { delete Module["memoryInitializerRequest"].response; }
11049 removeRunDependency("memory initializer");
11050 };
11051
11052 var doBrowserLoad = function () {
11053 readAsync(memoryInitializer, applyMemoryInitializer, function () {
11054 throw "could not load memory initializer " + memoryInitializer;
11055 });
11056 };
11057
11058 var memoryInitializerBytes = tryParseAsDataURI(memoryInitializer);
11059
11060 if (memoryInitializerBytes) {
11061 applyMemoryInitializer(memoryInitializerBytes.buffer);
11062 } else if (Module["memoryInitializerRequest"]) {
11063 var useRequest = function () {
11064 var request = Module["memoryInitializerRequest"];
11065 var response = request.response;
11066
11067 if (request.status !== 200 && request.status !== 0) {
11068 var data = tryParseAsDataURI(Module["memoryInitializerRequestURL"]);
11069
11070 if (data) {
11071 response = data.buffer;
11072 } else {
11073 console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: " + request.status + ", retrying " + memoryInitializer);
11074 doBrowserLoad();
11075 return;
11076 }
11077 }
11078
11079 applyMemoryInitializer(response);
11080 };
11081
11082 if (Module["memoryInitializerRequest"].response) {
11083 setTimeout(useRequest, 0);
11084 } else {
11085 Module["memoryInitializerRequest"].addEventListener("load", useRequest);
11086 }
11087 } else {
11088 doBrowserLoad();
11089 }
11090 }
11091 }
11092
11093 var calledRun;
11094
11095 dependenciesFulfilled = function runCaller() {
11096 if (!calledRun) { run(); }
11097 if (!calledRun) { dependenciesFulfilled = runCaller; }
11098 };
11099
11100 function run(args) {
11101 args = args || arguments_;
11102
11103 if (runDependencies > 0) {
11104 return;
11105 }
11106
11107 preRun();
11108 if (runDependencies > 0) { return; }
11109
11110 function doRun() {
11111 if (calledRun) { return; }
11112 calledRun = true;
11113 if (ABORT) { return; }
11114 initRuntime();
11115 preMain();
11116 if (Module["onRuntimeInitialized"]) { Module["onRuntimeInitialized"](); }
11117 postRun();
11118 }
11119
11120 if (Module["setStatus"]) {
11121 Module["setStatus"]("Running...");
11122 setTimeout(function () {
11123 setTimeout(function () {
11124 Module["setStatus"]("");
11125 }, 1);
11126 doRun();
11127 }, 1);
11128 } else {
11129 doRun();
11130 }
11131 }
11132
11133 Module["run"] = run;
11134
11135 function abort(what) {
11136 if (Module["onAbort"]) {
11137 Module["onAbort"](what);
11138 }
11139
11140 what += "";
11141 out(what);
11142 err(what);
11143 ABORT = true;
11144 throw "abort(" + what + "). Build with -s ASSERTIONS=1 for more info.";
11145 }
11146
11147 Module["abort"] = abort;
11148
11149 if (Module["preInit"]) {
11150 if (typeof Module["preInit"] == "function") { Module["preInit"] = [Module["preInit"]]; }
11151
11152 while (Module["preInit"].length > 0) {
11153 Module["preInit"].pop()();
11154 }
11155 }
11156 run();
11157 return libh3;
11158}(typeof libh3 === 'object' ? libh3 : {});
11159
11160/*
11161 * Copyright 2018-2019 Uber Technologies, Inc.
11162 *
11163 * Licensed under the Apache License, Version 2.0 (the "License");
11164 * you may not use this file except in compliance with the License.
11165 * You may obtain a copy of the License at
11166 *
11167 * http://www.apache.org/licenses/LICENSE-2.0
11168 *
11169 * Unless required by applicable law or agreed to in writing, software
11170 * distributed under the License is distributed on an "AS IS" BASIS,
11171 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11172 * See the License for the specific language governing permissions and
11173 * limitations under the License.
11174 */
11175// Define the C bindings for the h3 library
11176// Add some aliases to make the function definitions more intelligible
11177var NUMBER = 'number';
11178var BOOLEAN = NUMBER;
11179var H3_LOWER = NUMBER;
11180var H3_UPPER = NUMBER;
11181var RESOLUTION = NUMBER;
11182var POINTER = NUMBER; // Define the bindings to functions in the C lib. Functions are defined as
11183// [name, return type, [arg types]]. You must run `npm run build-emscripten`
11184// before new functions added here will be available.
11185
11186var BINDINGS = [// The size functions are inserted via build/sizes.h
11187['sizeOfH3Index', NUMBER], ['sizeOfGeoCoord', NUMBER], ['sizeOfGeoBoundary', NUMBER], ['sizeOfGeoPolygon', NUMBER], ['sizeOfGeofence', NUMBER], ['sizeOfLinkedGeoPolygon', NUMBER], ['sizeOfCoordIJ', NUMBER], // The remaining functions are defined in the core lib in h3Api.h
11188['h3IsValid', BOOLEAN, [H3_LOWER, H3_UPPER]], ['geoToH3', H3_LOWER, [NUMBER, NUMBER, RESOLUTION]], ['h3ToGeo', null, [H3_LOWER, H3_UPPER, POINTER]], ['h3ToGeoBoundary', null, [H3_LOWER, H3_UPPER, POINTER]], ['maxKringSize', NUMBER, [NUMBER]], ['kRing', null, [H3_LOWER, H3_UPPER, NUMBER, POINTER]], ['kRingDistances', null, [H3_LOWER, H3_UPPER, NUMBER, POINTER, POINTER]], ['hexRing', null, [H3_LOWER, H3_UPPER, NUMBER, POINTER]], ['maxPolyfillSize', NUMBER, [POINTER, RESOLUTION]], ['polyfill', null, [POINTER, RESOLUTION, POINTER]], ['h3SetToLinkedGeo', null, [POINTER, NUMBER, POINTER]], ['destroyLinkedPolygon', null, [POINTER]], ['compact', NUMBER, [POINTER, POINTER, NUMBER]], ['uncompact', NUMBER, [POINTER, NUMBER, POINTER, NUMBER, RESOLUTION]], ['maxUncompactSize', NUMBER, [POINTER, NUMBER, RESOLUTION]], ['h3IsPentagon', BOOLEAN, [H3_LOWER, H3_UPPER]], ['h3IsResClassIII', BOOLEAN, [H3_LOWER, H3_UPPER]], ['h3GetBaseCell', NUMBER, [H3_LOWER, H3_UPPER]], ['maxFaceCount', NUMBER, [H3_LOWER, H3_UPPER]], ['h3GetFaces', null, [H3_LOWER, H3_UPPER, POINTER]], ['h3ToParent', H3_LOWER, [H3_LOWER, H3_UPPER, RESOLUTION]], ['h3ToChildren', null, [H3_LOWER, H3_UPPER, RESOLUTION, POINTER]], ['h3ToCenterChild', H3_LOWER, [H3_LOWER, H3_UPPER, RESOLUTION]], ['maxH3ToChildrenSize', NUMBER, [H3_LOWER, H3_UPPER, RESOLUTION]], ['h3IndexesAreNeighbors', BOOLEAN, [H3_LOWER, H3_UPPER, H3_LOWER, H3_UPPER]], ['getH3UnidirectionalEdge', H3_LOWER, [H3_LOWER, H3_UPPER, H3_LOWER, H3_UPPER]], ['getOriginH3IndexFromUnidirectionalEdge', H3_LOWER, [H3_LOWER, H3_UPPER]], ['getDestinationH3IndexFromUnidirectionalEdge', H3_LOWER, [H3_LOWER, H3_UPPER]], ['h3UnidirectionalEdgeIsValid', BOOLEAN, [H3_LOWER, H3_UPPER]], ['getH3IndexesFromUnidirectionalEdge', null, [H3_LOWER, H3_UPPER, POINTER]], ['getH3UnidirectionalEdgesFromHexagon', null, [H3_LOWER, H3_UPPER, POINTER]], ['getH3UnidirectionalEdgeBoundary', null, [H3_LOWER, H3_UPPER, POINTER]], ['h3Distance', NUMBER, [H3_LOWER, H3_UPPER, H3_LOWER, H3_UPPER]], ['h3Line', NUMBER, [H3_LOWER, H3_UPPER, H3_LOWER, H3_UPPER, POINTER]], ['h3LineSize', NUMBER, [H3_LOWER, H3_UPPER, H3_LOWER, H3_UPPER]], ['experimentalH3ToLocalIj', NUMBER, [H3_LOWER, H3_UPPER, H3_LOWER, H3_UPPER, POINTER]], ['experimentalLocalIjToH3', NUMBER, [H3_LOWER, H3_UPPER, POINTER, POINTER]], ['hexAreaM2', NUMBER, [RESOLUTION]], ['hexAreaKm2', NUMBER, [RESOLUTION]], ['edgeLengthM', NUMBER, [RESOLUTION]], ['edgeLengthKm', NUMBER, [RESOLUTION]], ['numHexagons', NUMBER, [RESOLUTION]], ['getRes0Indexes', null, [POINTER]], ['res0IndexCount', NUMBER], ['getPentagonIndexes', null, [NUMBER, POINTER]], ['pentagonIndexCount', NUMBER]];
11189
11190/*
11191 * Copyright 2018-2019 Uber Technologies, Inc.
11192 *
11193 * Licensed under the Apache License, Version 2.0 (the "License");
11194 * you may not use this file except in compliance with the License.
11195 * You may obtain a copy of the License at
11196 *
11197 * http://www.apache.org/licenses/LICENSE-2.0
11198 *
11199 * Unless required by applicable law or agreed to in writing, software
11200 * distributed under the License is distributed on an "AS IS" BASIS,
11201 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11202 * See the License for the specific language governing permissions and
11203 * limitations under the License.
11204 */
11205/**
11206 * 64-bit hexidecimal string representation of an H3 index
11207 * @static
11208 * @typedef {string} H3Index
11209 */
11210
11211var H3 = {}; // Create the bound functions themselves
11212
11213BINDINGS.forEach(function bind(def) {
11214 H3[def[0]] = libh3.cwrap.apply(libh3, def);
11215}); // Alias the hexidecimal base for legibility
11216
11217var BASE_16 = 16; // ----------------------------------------------------------------------------
11218// Byte size imports
11219
11220var SZ_INT = 4;
11221var SZ_PTR = 4;
11222var SZ_DBL = 8;
11223var SZ_H3INDEX = H3.sizeOfH3Index();
11224var SZ_GEOCOORD = H3.sizeOfGeoCoord();
11225var SZ_GEOBOUNDARY = H3.sizeOfGeoBoundary();
11226var SZ_GEOPOLYGON = H3.sizeOfGeoPolygon();
11227var SZ_GEOFENCE = H3.sizeOfGeofence();
11228var SZ_LINKED_GEOPOLYGON = H3.sizeOfLinkedGeoPolygon();
11229var SZ_COORDIJ = H3.sizeOfCoordIJ(); // ----------------------------------------------------------------------------
11230// Unit constants
11231
11232var UNITS = {
11233 m: 'm',
11234 km: 'km',
11235 m2: 'm2',
11236 km2: 'km2'
11237}; // ----------------------------------------------------------------------------
11238// Utilities and helpers
11239
11240/**
11241 * Validate a resolution, throwing an error if invalid
11242 * @private
11243 * @param {mixed} res Value to validate
11244 * @throws {Error} Error if invalid
11245 */
11246
11247function validateRes(res) {
11248 if (typeof res !== 'number' || res < 0 || res > 15 || Math.floor(res) !== res) {
11249 throw new Error(("Invalid resolution: " + res));
11250 }
11251}
11252/**
11253 * Convert an H3 index (64-bit hexidecimal string) into a "split long" - a pair of 32-bit ints
11254 * @private
11255 * @param {H3Index} h3Index H3 index to check
11256 * @return {Number[]} A two-element array with 32 lower bits and 32 upper bits
11257 */
11258
11259
11260function h3IndexToSplitLong(h3Index) {
11261 if (typeof h3Index !== 'string') {
11262 return [0, 0];
11263 }
11264
11265 var upper = parseInt(h3Index.substring(0, h3Index.length - 8), BASE_16);
11266 var lower = parseInt(h3Index.substring(h3Index.length - 8), BASE_16);
11267 return [lower, upper];
11268}
11269/**
11270 * Convert a 32-bit int to a hexdecimal string
11271 * @private
11272 * @param {Number} num Integer to convert
11273 * @return {H3Index} Hexidecimal string
11274 */
11275
11276
11277function hexFrom32Bit(num) {
11278 if (num >= 0) {
11279 return num.toString(BASE_16);
11280 } // Handle negative numbers
11281
11282
11283 num = num & 0x7fffffff;
11284 var tempStr = zeroPad(8, num.toString(BASE_16));
11285 var topNum = (parseInt(tempStr[0], BASE_16) + 8).toString(BASE_16);
11286 tempStr = topNum + tempStr.substring(1);
11287 return tempStr;
11288}
11289/**
11290 * Get a H3 index from a split long (pair of 32-bit ints)
11291 * @private
11292 * @param {Number} lower Lower 32 bits
11293 * @param {Number} upper Upper 32 bits
11294 * @return {H3Index} H3 index
11295 */
11296
11297
11298function splitLongToh3Index(lower, upper) {
11299 return hexFrom32Bit(upper) + zeroPad(8, hexFrom32Bit(lower));
11300}
11301/**
11302 * Zero-pad a string to a given length
11303 * @private
11304 * @param {Number} fullLen Target length
11305 * @param {String} numStr String to zero-pad
11306 * @return {String} Zero-padded string
11307 */
11308
11309
11310function zeroPad(fullLen, numStr) {
11311 var numZeroes = fullLen - numStr.length;
11312 var outStr = '';
11313
11314 for (var i = 0; i < numZeroes; i++) {
11315 outStr += '0';
11316 }
11317
11318 outStr = outStr + numStr;
11319 return outStr;
11320}
11321/**
11322 * Populate a C-appropriate Geofence struct from a polygon array
11323 * @private
11324 * @param {Array[]} polygonArray Polygon, as an array of coordinate pairs
11325 * @param {Number} geofence C pointer to a Geofence struct
11326 * @param {Boolean} isGeoJson Whether coordinates are in [lng, lat] order per GeoJSON spec
11327 * @return {Number} C pointer to populated Geofence struct
11328 */
11329
11330
11331function polygonArrayToGeofence(polygonArray, geofence, isGeoJson) {
11332 var numVerts = polygonArray.length;
11333
11334 var geoCoordArray = libh3._calloc(numVerts, SZ_GEOCOORD); // Support [lng, lat] pairs if GeoJSON is specified
11335
11336
11337 var latIndex = isGeoJson ? 1 : 0;
11338 var lngIndex = isGeoJson ? 0 : 1;
11339
11340 for (var i = 0; i < numVerts * 2; i += 2) {
11341 libh3.HEAPF64.set([polygonArray[i / 2][latIndex], polygonArray[i / 2][lngIndex]].map(degsToRads), geoCoordArray / SZ_DBL + i);
11342 }
11343
11344 libh3.HEAPU32.set([numVerts, geoCoordArray], geofence / SZ_INT);
11345 return geofence;
11346}
11347/**
11348 * Create a C-appropriate GeoPolygon struct from an array of polygons
11349 * @private
11350 * @param {Array[]} coordinates Array of polygons, each an array of coordinate pairs
11351 * @param {Boolean} isGeoJson Whether coordinates are in [lng, lat] order per GeoJSON spec
11352 * @return {Number} C pointer to populated GeoPolygon struct
11353 */
11354
11355
11356function coordinatesToGeoPolygon(coordinates, isGeoJson) {
11357 // Any loops beyond the first loop are holes
11358 var numHoles = coordinates.length - 1;
11359
11360 var geoPolygon = libh3._calloc(SZ_GEOPOLYGON); // Byte positions within the struct
11361
11362
11363 var geofenceOffset = 0;
11364 var numHolesOffset = geofenceOffset + SZ_GEOFENCE;
11365 var holesOffset = numHolesOffset + SZ_INT; // geofence is first part of struct
11366
11367 polygonArrayToGeofence(coordinates[0], geoPolygon + geofenceOffset, isGeoJson);
11368 var holes;
11369
11370 if (numHoles > 0) {
11371 holes = libh3._calloc(numHoles, SZ_GEOFENCE);
11372
11373 for (var i = 0; i < numHoles; i++) {
11374 polygonArrayToGeofence(coordinates[i + 1], holes + SZ_GEOFENCE * i, isGeoJson);
11375 }
11376 }
11377
11378 libh3.setValue(geoPolygon + numHolesOffset, numHoles, 'i32');
11379 libh3.setValue(geoPolygon + holesOffset, holes, 'i32');
11380 return geoPolygon;
11381}
11382/**
11383 * Free memory allocated for a GeoPolygon struct. It is an error to access the struct
11384 * after passing it to this method.
11385 * @private
11386 * @return {Number} geoPolygon C pointer to populated GeoPolygon struct
11387 */
11388
11389
11390function destroyGeoPolygon(geoPolygon) {
11391 // Byte positions within the struct
11392 var geofenceOffset = 0;
11393 var numHolesOffset = geofenceOffset + SZ_GEOFENCE;
11394 var holesOffset = numHolesOffset + SZ_INT; // Free the outer loop
11395
11396 libh3._free(libh3.getValue(geoPolygon + geofenceOffset, 'i8*')); // Free the holes, if any
11397
11398
11399 var numHoles = libh3.getValue(geoPolygon + numHolesOffset, 'i32');
11400
11401 for (var i = 0; i < numHoles; i++) {
11402 libh3._free(libh3.getValue(geoPolygon + holesOffset + SZ_GEOFENCE * i, 'i8*'));
11403 }
11404
11405 libh3._free(geoPolygon);
11406}
11407/**
11408 * Read a long value, returning the lower and upper portions as separate 32-bit integers.
11409 * Because the upper bits are returned via side effect, the argument to this function is
11410 * intended to be the invocation that caused the side effect, e.g. readLong(H3.getSomeLong())
11411 * @private
11412 * @param {Number} invocation Invoked function returning a long value. The actual return
11413 * value of these functions is a 32-bit integer.
11414 * @return {Number} Long value as a [lower, upper] pair
11415 */
11416
11417
11418function readLong(invocation) {
11419 // Upper 32-bits of the long set via side-effect
11420 var upper = libh3.getTempRet0();
11421 return [invocation, upper];
11422}
11423/**
11424 * Read an H3 index from a C return value. As with readLong, the argument to this function
11425 * is intended to be an invocation, e.g. readH3Index(H3.getSomeAddress()), to help ensure that
11426 * the temp value storing the upper bits of the long is still set.
11427 * @private
11428 * @param {Number} invocation Invoked function returning a single H3 index
11429 * @return {H3Index} H3 index, or null if index was invalid
11430 */
11431
11432
11433function readH3Index(invocation) {
11434 var ref = readLong(invocation);
11435 var lower = ref[0];
11436 var upper = ref[1]; // The lower bits are allowed to be 0s, but if the upper bits are 0
11437 // this represents an invalid H3 index
11438
11439 return upper ? splitLongToh3Index(lower, upper) : null;
11440}
11441/**
11442 * Read an H3 index from a pointer to C memory.
11443 * @private
11444 * @param {Number} cAddress Pointer to allocated C memory
11445 * @param {Number} offset Offset, in number of H3 indexes, in case we're
11446 * reading an array
11447 * @return {H3Index} H3 index, or null if index was invalid
11448 */
11449
11450
11451function readH3IndexFromPointer(cAddress, offset) {
11452 if ( offset === void 0 ) offset = 0;
11453
11454 var lower = libh3.getValue(cAddress + SZ_INT * offset * 2, 'i32');
11455 var upper = libh3.getValue(cAddress + SZ_INT * (offset * 2 + 1), 'i32'); // The lower bits are allowed to be 0s, but if the upper bits are 0
11456 // this represents an invalid H3 index
11457
11458 return upper ? splitLongToh3Index(lower, upper) : null;
11459}
11460/**
11461 * Store an H3 index in C memory. Primarily used as an efficient way to
11462 * write sets of hexagons.
11463 * @private
11464 * @param {H3Index} h3Index H3 index to store
11465 * @param {Number} cAddress Pointer to allocated C memory
11466 * @param {Number} offset Offset, in number of H3 indexes from beginning
11467 * of the current array
11468 */
11469
11470
11471function storeH3Index(h3Index, cAddress, offset) {
11472 // HEAPU32 is a typed array projection on the index space
11473 // as unsigned 32-bit integers. This means the index needs
11474 // to be divided by SZ_INT (4) to access correctly. Also,
11475 // the H3 index is 64 bits, so we skip by twos as we're writing
11476 // to 32-bit integers in the proper order.
11477 libh3.HEAPU32.set(h3IndexToSplitLong(h3Index), cAddress / SZ_INT + 2 * offset);
11478}
11479/**
11480 * Read an array of 64-bit H3 indexes from C and convert to a JS array of
11481 * H3 index strings
11482 * @private
11483 * @param {Number} cAddress Pointer to C ouput array
11484 * @param {Number} maxCount Max number of hexagons in array. Hexagons with
11485 * the value 0 will be skipped, so this isn't
11486 * necessarily the length of the output array.
11487 * @return {H3Index[]} Array of H3 indexes
11488 */
11489
11490
11491function readArrayOfHexagons(cAddress, maxCount) {
11492 var out = [];
11493
11494 for (var i = 0; i < maxCount; i++) {
11495 var h3Index = readH3IndexFromPointer(cAddress, i);
11496
11497 if (h3Index !== null) {
11498 out.push(h3Index);
11499 }
11500 }
11501
11502 return out;
11503}
11504/**
11505 * Store an array of H3 index strings as a C array of 64-bit integers.
11506 * @private
11507 * @param {Number} cAddress Pointer to C input array
11508 * @param {H3Index[]} hexagons H3 indexes to pass to the C lib
11509 */
11510
11511
11512function storeArrayOfHexagons(cAddress, hexagons) {
11513 // Assuming the cAddress points to an already appropriately
11514 // allocated space
11515 var count = hexagons.length;
11516
11517 for (var i = 0; i < count; i++) {
11518 storeH3Index(hexagons[i], cAddress, i);
11519 }
11520}
11521
11522function readSingleCoord(cAddress) {
11523 return radsToDegs(libh3.getValue(cAddress, 'double'));
11524}
11525/**
11526 * Read a GeoCoord from C and return a [lat, lng] pair.
11527 * @private
11528 * @param {Number} cAddress Pointer to C struct
11529 * @return {Number[]} [lat, lng] pair
11530 */
11531
11532
11533function readGeoCoord(cAddress) {
11534 return [readSingleCoord(cAddress), readSingleCoord(cAddress + SZ_DBL)];
11535}
11536/**
11537 * Read a GeoCoord from C and return a GeoJSON-style [lng, lat] pair.
11538 * @private
11539 * @param {Number} cAddress Pointer to C struct
11540 * @return {Number[]} [lng, lat] pair
11541 */
11542
11543
11544function readGeoCoordGeoJson(cAddress) {
11545 return [readSingleCoord(cAddress + SZ_DBL), readSingleCoord(cAddress)];
11546}
11547/**
11548 * Read the GeoBoundary structure into a list of geo coordinate pairs
11549 * @private
11550 * @param {Number} geoBoundary C pointer to GeoBoundary struct
11551 * @param {Boolean} geoJsonCoords Whether to provide GeoJSON coordinate order: [lng, lat]
11552 * @param {Boolean} closedLoop Whether to close the loop
11553 * @return {Array[]} Array of geo coordinate pairs
11554 */
11555
11556
11557function readGeoBoundary(geoBoundary, geoJsonCoords, closedLoop) {
11558 var numVerts = libh3.getValue(geoBoundary, 'i32'); // Note that though numVerts is an int, the coordinate doubles have to be
11559 // aligned to 8 bytes, hence the 8-byte offset here
11560
11561 var vertsPos = geoBoundary + SZ_DBL;
11562 var out = []; // Support [lng, lat] pairs if GeoJSON is specified
11563
11564 var readCoord = geoJsonCoords ? readGeoCoordGeoJson : readGeoCoord;
11565
11566 for (var i = 0; i < numVerts * 2; i += 2) {
11567 out.push(readCoord(vertsPos + SZ_DBL * i));
11568 }
11569
11570 if (closedLoop) {
11571 // Close loop if GeoJSON is specified
11572 out.push(out[0]);
11573 }
11574
11575 return out;
11576}
11577/**
11578 * Read the LinkedGeoPolygon structure into a nested array of MultiPolygon coordinates
11579 * @private
11580 * @param {Number} polygon C pointer to LinkedGeoPolygon struct
11581 * @param {Boolean} formatAsGeoJson Whether to provide GeoJSON output: [lng, lat], closed loops
11582 * @return {Number[][][][]} MultiPolygon-style output.
11583 */
11584
11585
11586function readMultiPolygon(polygon, formatAsGeoJson) {
11587 var output = [];
11588 var readCoord = formatAsGeoJson ? readGeoCoordGeoJson : readGeoCoord;
11589 var loops;
11590 var loop;
11591 var coords;
11592 var coord; // Loop through the linked structure, building the output
11593
11594 while (polygon) {
11595 output.push(loops = []); // Follow ->first pointer
11596
11597 loop = libh3.getValue(polygon, 'i8*');
11598
11599 while (loop) {
11600 loops.push(coords = []); // Follow ->first pointer
11601
11602 coord = libh3.getValue(loop, 'i8*');
11603
11604 while (coord) {
11605 coords.push(readCoord(coord)); // Follow ->next pointer
11606
11607 coord = libh3.getValue(coord + SZ_DBL * 2, 'i8*');
11608 }
11609
11610 if (formatAsGeoJson) {
11611 // Close loop if GeoJSON is requested
11612 coords.push(coords[0]);
11613 } // Follow ->next pointer
11614
11615
11616 loop = libh3.getValue(loop + SZ_PTR * 2, 'i8*');
11617 } // Follow ->next pointer
11618
11619
11620 polygon = libh3.getValue(polygon + SZ_PTR * 2, 'i8*');
11621 }
11622
11623 return output;
11624}
11625/**
11626 * Read a CoordIJ from C and return an {i, j} pair.
11627 * @private
11628 * @param {Number} cAddress Pointer to C struct
11629 * @return {Object} {i, j} pair
11630 */
11631
11632
11633function readCoordIJ(cAddress) {
11634 return {
11635 i: libh3.getValue(cAddress, 'i32'),
11636 j: libh3.getValue(cAddress + SZ_INT, 'i32')
11637 };
11638}
11639/**
11640 * Store an {i, j} pair to a C CoordIJ struct.
11641 * @private
11642 * @param {Number} cAddress Pointer to C struct
11643 * @return {Object} {i, j} pair
11644 */
11645
11646
11647function storeCoordIJ(cAddress, ref) {
11648 var i = ref.i;
11649 var j = ref.j;
11650
11651 libh3.setValue(cAddress, i, 'i32');
11652 libh3.setValue(cAddress + SZ_INT, j, 'i32');
11653}
11654/**
11655 * Read an array of positive integers array from C. Negative
11656 * values are considered invalid and ignored in output.
11657 * @private
11658 * @param {Number} cAddress Pointer to C array
11659 * @param {Number} count Length of C array
11660 * @return {Number[]} Javascript integer array
11661 */
11662
11663
11664function readArrayOfPositiveIntegers(cAddress, count) {
11665 var out = [];
11666
11667 for (var i = 0; i < count; i++) {
11668 var int = libh3.getValue(cAddress + SZ_INT * i, 'i32');
11669
11670 if (int >= 0) {
11671 out.push(int);
11672 }
11673 }
11674
11675 return out;
11676} // ----------------------------------------------------------------------------
11677// Public API functions: Core
11678
11679/**
11680 * Whether a given string represents a valid H3 index
11681 * @static
11682 * @param {H3Index} h3Index H3 index to check
11683 * @return {Boolean} Whether the index is valid
11684 */
11685
11686
11687function h3IsValid(h3Index) {
11688 var ref = h3IndexToSplitLong(h3Index);
11689 var lower = ref[0];
11690 var upper = ref[1];
11691 return Boolean(H3.h3IsValid(lower, upper));
11692}
11693/**
11694 * Whether the given H3 index is a pentagon
11695 * @static
11696 * @param {H3Index} h3Index H3 index to check
11697 * @return {Boolean} isPentagon
11698 */
11699
11700function h3IsPentagon(h3Index) {
11701 var ref = h3IndexToSplitLong(h3Index);
11702 var lower = ref[0];
11703 var upper = ref[1];
11704 return Boolean(H3.h3IsPentagon(lower, upper));
11705}
11706/**
11707 * Whether the given H3 index is in a Class III resolution (rotated versus
11708 * the icosahedron and subject to shape distortion adding extra points on
11709 * icosahedron edges, making them not true hexagons).
11710 * @static
11711 * @param {H3Index} h3Index H3 index to check
11712 * @return {Boolean} isResClassIII
11713 */
11714
11715function h3IsResClassIII(h3Index) {
11716 var ref = h3IndexToSplitLong(h3Index);
11717 var lower = ref[0];
11718 var upper = ref[1];
11719 return Boolean(H3.h3IsResClassIII(lower, upper));
11720}
11721/**
11722 * Get the number of the base cell for a given H3 index
11723 * @static
11724 * @param {H3Index} h3Index H3 index to get the base cell for
11725 * @return {Number} Index of the base cell (0-121)
11726 */
11727
11728function h3GetBaseCell(h3Index) {
11729 var ref = h3IndexToSplitLong(h3Index);
11730 var lower = ref[0];
11731 var upper = ref[1];
11732 return H3.h3GetBaseCell(lower, upper);
11733}
11734/**
11735 * Get the indices of all icosahedron faces intersected by a given H3 index
11736 * @static
11737 * @param {H3Index} h3Index H3 index to get faces for
11738 * @return {Number[]} Indices (0-19) of all intersected faces
11739 */
11740
11741function h3GetFaces(h3Index) {
11742 var ref = h3IndexToSplitLong(h3Index);
11743 var lower = ref[0];
11744 var upper = ref[1];
11745 var count = H3.maxFaceCount(lower, upper);
11746
11747 var faces = libh3._malloc(SZ_INT * count);
11748
11749 H3.h3GetFaces(lower, upper, faces);
11750 var out = readArrayOfPositiveIntegers(faces, count);
11751
11752 libh3._free(faces);
11753
11754 return out;
11755}
11756/**
11757 * Returns the resolution of an H3 index
11758 * @static
11759 * @param {H3Index} h3Index H3 index to get resolution
11760 * @return {Number} The number (0-15) resolution, or -1 if invalid
11761 */
11762
11763function h3GetResolution(h3Index) {
11764 if (typeof h3Index !== 'string') {
11765 return -1;
11766 }
11767
11768 return parseInt(h3Index.charAt(1), BASE_16);
11769}
11770/**
11771 * Get the hexagon containing a lat,lon point
11772 * @static
11773 * @param {Number} lat Latitude of point
11774 * @param {Number} lng Longtitude of point
11775 * @param {Number} res Resolution of hexagons to return
11776 * @return {H3Index} H3 index
11777 */
11778
11779function geoToH3(lat, lng, res) {
11780 var latlng = libh3._malloc(SZ_GEOCOORD); // Slightly more efficient way to set the memory
11781
11782
11783 libh3.HEAPF64.set([lat, lng].map(degsToRads), latlng / SZ_DBL); // Read value as a split long
11784
11785 var h3Index = readH3Index(H3.geoToH3(latlng, res));
11786
11787 libh3._free(latlng);
11788
11789 return h3Index;
11790}
11791/**
11792 * Get the lat,lon center of a given hexagon
11793 * @static
11794 * @param {H3Index} h3Index H3 index
11795 * @return {Number[]} Point as a [lat, lng] pair
11796 */
11797
11798function h3ToGeo(h3Index) {
11799 var latlng = libh3._malloc(SZ_GEOCOORD);
11800
11801 var ref = h3IndexToSplitLong(h3Index);
11802 var lower = ref[0];
11803 var upper = ref[1];
11804 H3.h3ToGeo(lower, upper, latlng);
11805 var out = readGeoCoord(latlng);
11806
11807 libh3._free(latlng);
11808
11809 return out;
11810}
11811/**
11812 * Get the vertices of a given hexagon (or pentagon), as an array of [lat, lng]
11813 * points. For pentagons and hexagons on the edge of an icosahedron face, this
11814 * function may return up to 10 vertices.
11815 * @static
11816 * @param {H3Index} h3Index H3 index
11817 * @param {Boolean} formatAsGeoJson Whether to provide GeoJSON output: [lng, lat], closed loops
11818 * @return {Number[][]} Array of [lat, lng] pairs
11819 */
11820
11821function h3ToGeoBoundary(h3Index, formatAsGeoJson) {
11822 var geoBoundary = libh3._malloc(SZ_GEOBOUNDARY);
11823
11824 var ref = h3IndexToSplitLong(h3Index);
11825 var lower = ref[0];
11826 var upper = ref[1];
11827 H3.h3ToGeoBoundary(lower, upper, geoBoundary);
11828 var out = readGeoBoundary(geoBoundary, formatAsGeoJson, formatAsGeoJson);
11829
11830 libh3._free(geoBoundary);
11831
11832 return out;
11833} // ----------------------------------------------------------------------------
11834// Public API functions: Algorithms
11835
11836/**
11837 * Get the parent of the given hexagon at a particular resolution
11838 * @static
11839 * @param {H3Index} h3Index H3 index to get parent for
11840 * @param {Number} res Resolution of hexagon to return
11841 * @return {H3Index} H3 index of parent, or null for invalid input
11842 */
11843
11844function h3ToParent(h3Index, res) {
11845 var ref = h3IndexToSplitLong(h3Index);
11846 var lower = ref[0];
11847 var upper = ref[1];
11848 return readH3Index(H3.h3ToParent(lower, upper, res));
11849}
11850/**
11851 * Get the children/descendents of the given hexagon at a particular resolution
11852 * @static
11853 * @param {H3Index} h3Index H3 index to get children for
11854 * @param {Number} res Resolution of hexagons to return
11855 * @return {H3Index[]} H3 indexes of children, or empty array for invalid input
11856 */
11857
11858function h3ToChildren(h3Index, res) {
11859 // Bad input in this case can potentially result in high computation volume
11860 // using the current C algorithm. Validate and return an empty array on failure.
11861 if (!h3IsValid(h3Index)) {
11862 return [];
11863 }
11864
11865 var ref = h3IndexToSplitLong(h3Index);
11866 var lower = ref[0];
11867 var upper = ref[1];
11868 var maxCount = H3.maxH3ToChildrenSize(lower, upper, res);
11869
11870 var hexagons = libh3._calloc(maxCount, SZ_H3INDEX);
11871
11872 H3.h3ToChildren(lower, upper, res, hexagons);
11873 var out = readArrayOfHexagons(hexagons, maxCount);
11874
11875 libh3._free(hexagons);
11876
11877 return out;
11878}
11879/**
11880 * Get the center child of the given hexagon at a particular resolution
11881 * @static
11882 * @param {H3Index} h3Index H3 index to get center child for
11883 * @param {Number} res Resolution of hexagon to return
11884 * @return {H3Index} H3 index of child, or null for invalid input
11885 */
11886
11887function h3ToCenterChild(h3Index, res) {
11888 var ref = h3IndexToSplitLong(h3Index);
11889 var lower = ref[0];
11890 var upper = ref[1];
11891 return readH3Index(H3.h3ToCenterChild(lower, upper, res));
11892}
11893/**
11894 * Get all hexagons in a k-ring around a given center. The order of the hexagons is undefined.
11895 * @static
11896 * @param {H3Index} h3Index H3 index of center hexagon
11897 * @param {Number} ringSize Radius of k-ring
11898 * @return {H3Index[]} H3 indexes for all hexagons in ring
11899 */
11900
11901function kRing(h3Index, ringSize) {
11902 var ref = h3IndexToSplitLong(h3Index);
11903 var lower = ref[0];
11904 var upper = ref[1];
11905 var maxCount = H3.maxKringSize(ringSize);
11906
11907 var hexagons = libh3._calloc(maxCount, SZ_H3INDEX);
11908
11909 H3.kRing(lower, upper, ringSize, hexagons);
11910 var out = readArrayOfHexagons(hexagons, maxCount);
11911
11912 libh3._free(hexagons);
11913
11914 return out;
11915}
11916/**
11917 * Get all hexagons in a k-ring around a given center, in an array of arrays
11918 * ordered by distance from the origin. The order of the hexagons within each ring is undefined.
11919 * @static
11920 * @param {H3Index} h3Index H3 index of center hexagon
11921 * @param {Number} ringSize Radius of k-ring
11922 * @return {H3Index[][]} Array of arrays with H3 indexes for all hexagons each ring
11923 */
11924
11925function kRingDistances(h3Index, ringSize) {
11926 var ref = h3IndexToSplitLong(h3Index);
11927 var lower = ref[0];
11928 var upper = ref[1];
11929 var maxCount = H3.maxKringSize(ringSize);
11930
11931 var kRings = libh3._calloc(maxCount, SZ_H3INDEX);
11932
11933 var distances = libh3._calloc(maxCount, SZ_INT);
11934
11935 H3.kRingDistances(lower, upper, ringSize, kRings, distances); // Create an array of empty arrays to hold the output
11936
11937 var out = [];
11938
11939 for (var i = 0; i < ringSize + 1; i++) {
11940 out.push([]);
11941 } // Read the array of hexagons, putting them into the appropriate rings
11942
11943
11944 for (var i$1 = 0; i$1 < maxCount * 2; i$1 += 2) {
11945 var hexLower = libh3.getValue(kRings + SZ_INT * i$1, 'i32');
11946 var hexUpper = libh3.getValue(kRings + SZ_INT * (i$1 + 1), 'i32');
11947 var index = libh3.getValue(distances + SZ_INT * (i$1 / 2), 'i32');
11948
11949 if (hexLower !== 0 || hexUpper !== 0) {
11950 out[index].push(splitLongToh3Index(hexLower, hexUpper));
11951 }
11952 }
11953
11954 libh3._free(kRings);
11955
11956 libh3._free(distances);
11957
11958 return out;
11959}
11960/**
11961 * Get all hexagons in a hollow hexagonal ring centered at origin with sides of a given length.
11962 * Unlike kRing, this function will throw an error if there is a pentagon anywhere in the ring.
11963 * @static
11964 * @param {H3Index} h3Index H3 index of center hexagon
11965 * @param {Number} ringSize Radius of ring
11966 * @return {H3Index[]} H3 indexes for all hexagons in ring
11967 * @throws {Error} If the algorithm could not calculate the ring
11968 */
11969
11970function hexRing(h3Index, ringSize) {
11971 var maxCount = ringSize === 0 ? 1 : 6 * ringSize;
11972
11973 var hexagons = libh3._calloc(maxCount, SZ_H3INDEX);
11974
11975 var retVal = H3.hexRing.apply(H3, h3IndexToSplitLong(h3Index).concat( [ringSize], [hexagons] ));
11976
11977 if (retVal !== 0) {
11978 libh3._free(hexagons);
11979
11980 throw new Error('Failed to get hexRing (encountered a pentagon?)');
11981 }
11982
11983 var out = readArrayOfHexagons(hexagons, maxCount);
11984
11985 libh3._free(hexagons);
11986
11987 return out;
11988}
11989/**
11990 * Get all hexagons with centers contained in a given polygon. The polygon
11991 * is specified with GeoJson semantics as an array of loops. Each loop is
11992 * an array of [lat, lng] pairs (or [lng, lat] if isGeoJson is specified).
11993 * The first loop is the perimeter of the polygon, and subsequent loops are
11994 * expected to be holes.
11995 * @static
11996 * @param {Number[][] | Number[][][]} coordinates
11997 * Array of loops, or a single loop
11998 * @param {Number} res Resolution of hexagons to return
11999 * @param {Boolean} isGeoJson Whether to expect GeoJson-style [lng, lat]
12000 * pairs instead of [lat, lng]
12001 * @return {H3Index[]} H3 indexes for all hexagons in polygon
12002 */
12003
12004function polyfill(coordinates, res, isGeoJson) {
12005 validateRes(res);
12006 isGeoJson = Boolean(isGeoJson); // Guard against empty input
12007
12008 if (coordinates.length === 0 || coordinates[0].length === 0) {
12009 return [];
12010 } // Wrap to expected format if a single loop is provided
12011
12012
12013 if (typeof coordinates[0][0] === 'number') {
12014 coordinates = [coordinates];
12015 }
12016
12017 var geoPolygon = coordinatesToGeoPolygon(coordinates, isGeoJson);
12018 var arrayLen = H3.maxPolyfillSize(geoPolygon, res);
12019
12020 var hexagons = libh3._calloc(arrayLen, SZ_H3INDEX);
12021
12022 H3.polyfill(geoPolygon, res, hexagons);
12023 var out = readArrayOfHexagons(hexagons, arrayLen);
12024
12025 libh3._free(hexagons);
12026
12027 destroyGeoPolygon(geoPolygon);
12028 return out;
12029}
12030/**
12031 * Get the outlines of a set of H3 hexagons, returned in GeoJSON MultiPolygon
12032 * format (an array of polygons, each with an array of loops, each an array of
12033 * coordinates). Coordinates are returned as [lat, lng] pairs unless GeoJSON
12034 * is requested.
12035 * @static
12036 * @param {H3Index[]} h3Indexes H3 indexes to get outlines for
12037 * @param {Boolean} formatAsGeoJson Whether to provide GeoJSON output:
12038 * [lng, lat], closed loops
12039 * @return {Number[][][][]} MultiPolygon-style output.
12040 */
12041
12042function h3SetToMultiPolygon(h3Indexes, formatAsGeoJson) {
12043 // Early exit on empty input
12044 if (!h3Indexes || !h3Indexes.length) {
12045 return [];
12046 } // Set up input set
12047
12048
12049 var indexCount = h3Indexes.length;
12050
12051 var set = libh3._calloc(indexCount, SZ_H3INDEX);
12052
12053 storeArrayOfHexagons(set, h3Indexes); // Allocate memory for output linked polygon
12054
12055 var polygon = libh3._calloc(SZ_LINKED_GEOPOLYGON); // Store a reference to the first polygon - that's the one we need for
12056 // memory deallocation
12057
12058
12059 var originalPolygon = polygon;
12060 H3.h3SetToLinkedGeo(set, indexCount, polygon);
12061 var multiPolygon = readMultiPolygon(polygon, formatAsGeoJson); // Clean up
12062
12063 H3.destroyLinkedPolygon(originalPolygon);
12064
12065 libh3._free(originalPolygon);
12066
12067 libh3._free(set);
12068
12069 return multiPolygon;
12070}
12071/**
12072 * Compact a set of hexagons of the same resolution into a set of hexagons across
12073 * multiple levels that represents the same area.
12074 * @static
12075 * @param {H3Index[]} h3Set H3 indexes to compact
12076 * @return {H3Index[]} Compacted H3 indexes
12077 * @throws {Error} If the input is invalid (e.g. duplicate hexagons)
12078 */
12079
12080function compact(h3Set) {
12081 if (!h3Set || !h3Set.length) {
12082 return [];
12083 } // Set up input set
12084
12085
12086 var count = h3Set.length;
12087
12088 var set = libh3._calloc(count, SZ_H3INDEX);
12089
12090 storeArrayOfHexagons(set, h3Set); // Allocate memory for compacted hexagons, worst-case is no compaction
12091
12092 var compactedSet = libh3._calloc(count, SZ_H3INDEX);
12093
12094 var retVal = H3.compact(set, compactedSet, count);
12095
12096 if (retVal !== 0) {
12097 libh3._free(set);
12098
12099 libh3._free(compactedSet);
12100
12101 throw new Error('Failed to compact, malformed input data (duplicate hexagons?)');
12102 }
12103
12104 var out = readArrayOfHexagons(compactedSet, count);
12105
12106 libh3._free(set);
12107
12108 libh3._free(compactedSet);
12109
12110 return out;
12111}
12112/**
12113 * Uncompact a compacted set of hexagons to hexagons of the same resolution
12114 * @static
12115 * @param {H3Index[]} compactedSet H3 indexes to uncompact
12116 * @param {Number} res The resolution to uncompact to
12117 * @return {H3Index[]} The uncompacted H3 indexes
12118 * @throws {Error} If the input is invalid (e.g. invalid resolution)
12119 */
12120
12121function uncompact(compactedSet, res) {
12122 validateRes(res);
12123
12124 if (!compactedSet || !compactedSet.length) {
12125 return [];
12126 } // Set up input set
12127
12128
12129 var count = compactedSet.length;
12130
12131 var set = libh3._calloc(count, SZ_H3INDEX);
12132
12133 storeArrayOfHexagons(set, compactedSet); // Estimate how many hexagons we need (always overestimates if in error)
12134
12135 var maxUncompactedNum = H3.maxUncompactSize(set, count, res); // Allocate memory for uncompacted hexagons
12136
12137 var uncompactedSet = libh3._calloc(maxUncompactedNum, SZ_H3INDEX);
12138
12139 var retVal = H3.uncompact(set, count, uncompactedSet, maxUncompactedNum, res);
12140
12141 if (retVal !== 0) {
12142 libh3._free(set);
12143
12144 libh3._free(uncompactedSet);
12145
12146 throw new Error('Failed to uncompact (bad resolution?)');
12147 }
12148
12149 var out = readArrayOfHexagons(uncompactedSet, maxUncompactedNum);
12150
12151 libh3._free(set);
12152
12153 libh3._free(uncompactedSet);
12154
12155 return out;
12156} // ----------------------------------------------------------------------------
12157// Public API functions: Unidirectional edges
12158
12159/**
12160 * Whether two H3 indexes are neighbors (share an edge)
12161 * @static
12162 * @param {H3Index} origin Origin hexagon index
12163 * @param {H3Index} destination Destination hexagon index
12164 * @return {Boolean} Whether the hexagons share an edge
12165 */
12166
12167function h3IndexesAreNeighbors(origin, destination) {
12168 var ref = h3IndexToSplitLong(origin);
12169 var oLower = ref[0];
12170 var oUpper = ref[1];
12171 var ref$1 = h3IndexToSplitLong(destination);
12172 var dLower = ref$1[0];
12173 var dUpper = ref$1[1];
12174 return Boolean(H3.h3IndexesAreNeighbors(oLower, oUpper, dLower, dUpper));
12175}
12176/**
12177 * Get an H3 index representing a unidirectional edge for a given origin and destination
12178 * @static
12179 * @param {H3Index} origin Origin hexagon index
12180 * @param {H3Index} destination Destination hexagon index
12181 * @return {H3Index} H3 index of the edge, or null if no edge is shared
12182 */
12183
12184function getH3UnidirectionalEdge(origin, destination) {
12185 var ref = h3IndexToSplitLong(origin);
12186 var oLower = ref[0];
12187 var oUpper = ref[1];
12188 var ref$1 = h3IndexToSplitLong(destination);
12189 var dLower = ref$1[0];
12190 var dUpper = ref$1[1];
12191 return readH3Index(H3.getH3UnidirectionalEdge(oLower, oUpper, dLower, dUpper));
12192}
12193/**
12194 * Get the origin hexagon from an H3 index representing a unidirectional edge
12195 * @static
12196 * @param {H3Index} edgeIndex H3 index of the edge
12197 * @return {H3Index} H3 index of the edge origin
12198 */
12199
12200function getOriginH3IndexFromUnidirectionalEdge(edgeIndex) {
12201 var ref = h3IndexToSplitLong(edgeIndex);
12202 var lower = ref[0];
12203 var upper = ref[1];
12204 return readH3Index(H3.getOriginH3IndexFromUnidirectionalEdge(lower, upper));
12205}
12206/**
12207 * Get the destination hexagon from an H3 index representing a unidirectional edge
12208 * @static
12209 * @param {H3Index} edgeIndex H3 index of the edge
12210 * @return {H3Index} H3 index of the edge destination
12211 */
12212
12213function getDestinationH3IndexFromUnidirectionalEdge(edgeIndex) {
12214 var ref = h3IndexToSplitLong(edgeIndex);
12215 var lower = ref[0];
12216 var upper = ref[1];
12217 return readH3Index(H3.getDestinationH3IndexFromUnidirectionalEdge(lower, upper));
12218}
12219/**
12220 * Whether the input is a valid unidirectional edge
12221 * @static
12222 * @param {H3Index} edgeIndex H3 index of the edge
12223 * @return {Boolean} Whether the index is valid
12224 */
12225
12226function h3UnidirectionalEdgeIsValid(edgeIndex) {
12227 var ref = h3IndexToSplitLong(edgeIndex);
12228 var lower = ref[0];
12229 var upper = ref[1];
12230 return Boolean(H3.h3UnidirectionalEdgeIsValid(lower, upper));
12231}
12232/**
12233 * Get the [origin, destination] pair represented by a unidirectional edge
12234 * @static
12235 * @param {H3Index} edgeIndex H3 index of the edge
12236 * @return {H3Index[]} [origin, destination] pair as H3 indexes
12237 */
12238
12239function getH3IndexesFromUnidirectionalEdge(edgeIndex) {
12240 var ref = h3IndexToSplitLong(edgeIndex);
12241 var lower = ref[0];
12242 var upper = ref[1];
12243 var count = 2;
12244
12245 var hexagons = libh3._calloc(count, SZ_H3INDEX);
12246
12247 H3.getH3IndexesFromUnidirectionalEdge(lower, upper, hexagons);
12248 var out = readArrayOfHexagons(hexagons, count);
12249
12250 libh3._free(hexagons);
12251
12252 return out;
12253}
12254/**
12255 * Get all of the unidirectional edges with the given H3 index as the origin (i.e. an edge to
12256 * every neighbor)
12257 * @static
12258 * @param {H3Index} h3Index H3 index of the origin hexagon
12259 * @return {H3Index[]} List of unidirectional edges
12260 */
12261
12262function getH3UnidirectionalEdgesFromHexagon(h3Index) {
12263 var ref = h3IndexToSplitLong(h3Index);
12264 var lower = ref[0];
12265 var upper = ref[1];
12266 var count = 6;
12267
12268 var edges = libh3._calloc(count, SZ_H3INDEX);
12269
12270 H3.getH3UnidirectionalEdgesFromHexagon(lower, upper, edges);
12271 var out = readArrayOfHexagons(edges, count);
12272
12273 libh3._free(edges);
12274
12275 return out;
12276}
12277/**
12278 * Get the vertices of a given edge as an array of [lat, lng] points. Note that for edges that
12279 * cross the edge of an icosahedron face, this may return 3 coordinates.
12280 * @static
12281 * @param {H3Index} edgeIndex H3 index of the edge
12282 * @param {Boolean} formatAsGeoJson Whether to provide GeoJSON output: [lng, lat]
12283 * @return {Number[][]} Array of geo coordinate pairs
12284 */
12285
12286function getH3UnidirectionalEdgeBoundary(edgeIndex, formatAsGeoJson) {
12287 var geoBoundary = libh3._malloc(SZ_GEOBOUNDARY);
12288
12289 var ref = h3IndexToSplitLong(edgeIndex);
12290 var lower = ref[0];
12291 var upper = ref[1];
12292 H3.getH3UnidirectionalEdgeBoundary(lower, upper, geoBoundary);
12293 var out = readGeoBoundary(geoBoundary, formatAsGeoJson);
12294
12295 libh3._free(geoBoundary);
12296
12297 return out;
12298}
12299/**
12300 * Get the grid distance between two hex indexes. This function may fail
12301 * to find the distance between two indexes if they are very far apart or
12302 * on opposite sides of a pentagon.
12303 * @static
12304 * @param {H3Index} origin Origin hexagon index
12305 * @param {H3Index} destination Destination hexagon index
12306 * @return {Number} Distance between hexagons, or a negative
12307 * number if the distance could not be computed
12308 */
12309
12310function h3Distance(origin, destination) {
12311 var ref = h3IndexToSplitLong(origin);
12312 var oLower = ref[0];
12313 var oUpper = ref[1];
12314 var ref$1 = h3IndexToSplitLong(destination);
12315 var dLower = ref$1[0];
12316 var dUpper = ref$1[1];
12317 return H3.h3Distance(oLower, oUpper, dLower, dUpper);
12318}
12319/**
12320 * Given two H3 indexes, return the line of indexes between them (inclusive).
12321 *
12322 * This function may fail to find the line between two indexes, for
12323 * example if they are very far apart. It may also fail when finding
12324 * distances for indexes on opposite sides of a pentagon.
12325 *
12326 * Notes:
12327 *
12328 * - The specific output of this function should not be considered stable
12329 * across library versions. The only guarantees the library provides are
12330 * that the line length will be `h3Distance(start, end) + 1` and that
12331 * every index in the line will be a neighbor of the preceding index.
12332 * - Lines are drawn in grid space, and may not correspond exactly to either
12333 * Cartesian lines or great arcs.
12334 *
12335 * @static
12336 * @param {H3Index} origin Origin hexagon index
12337 * @param {H3Index} destination Destination hexagon index
12338 * @return {H3Index[]} H3 indexes connecting origin and destination
12339 * @throws {Error} If the line cannot be calculated
12340 */
12341
12342function h3Line(origin, destination) {
12343 var ref = h3IndexToSplitLong(origin);
12344 var oLower = ref[0];
12345 var oUpper = ref[1];
12346 var ref$1 = h3IndexToSplitLong(destination);
12347 var dLower = ref$1[0];
12348 var dUpper = ref$1[1];
12349 var count = H3.h3LineSize(oLower, oUpper, dLower, dUpper);
12350
12351 if (count < 0) {
12352 // We can't get the specific error code here - may be any of
12353 // the errors possible in experimentalH3ToLocalIj
12354 throw new Error('Line cannot be calculated');
12355 }
12356
12357 var hexagons = libh3._calloc(count, SZ_H3INDEX);
12358
12359 H3.h3Line(oLower, oUpper, dLower, dUpper, hexagons);
12360 var out = readArrayOfHexagons(hexagons, count);
12361
12362 libh3._free(hexagons);
12363
12364 return out;
12365}
12366/**
12367 * Produces IJ coordinates for an H3 index anchored by an origin.
12368 *
12369 * - The coordinate space used by this function may have deleted
12370 * regions or warping due to pentagonal distortion.
12371 * - Coordinates are only comparable if they come from the same
12372 * origin index.
12373 * - Failure may occur if the index is too far away from the origin
12374 * or if the index is on the other side of a pentagon.
12375 * - This function is experimental, and its output is not guaranteed
12376 * to be compatible across different versions of H3.
12377 * @static
12378 * @param {H3Index} origin Origin H3 index
12379 * @param {H3Index} destination H3 index for which to find relative coordinates
12380 * @return {Object} Coordinates as an `{i, j}` pair
12381 * @throws {Error} If the IJ coordinates cannot be calculated
12382 */
12383
12384function experimentalH3ToLocalIj(origin, destination) {
12385 var ij = libh3._malloc(SZ_COORDIJ);
12386
12387 var retVal = H3.experimentalH3ToLocalIj.apply(H3, h3IndexToSplitLong(origin).concat( h3IndexToSplitLong(destination), [ij] ));
12388 var coords = readCoordIJ(ij);
12389
12390 libh3._free(ij); // Return the pair, or throw if an error code was returned.
12391 // Switch statement and error codes cribbed from h3-java's implementation.
12392
12393
12394 switch (retVal) {
12395 case 0:
12396 return coords;
12397
12398 case 1:
12399 throw new Error('Incompatible origin and index.');
12400
12401 case 2:
12402 default:
12403 throw new Error('Local IJ coordinates undefined for this origin and index pair. ' + 'The index may be too far from the origin.');
12404
12405 case 3:
12406 case 4:
12407 case 5:
12408 throw new Error('Encountered possible pentagon distortion');
12409 }
12410}
12411/**
12412 * Produces an H3 index for IJ coordinates anchored by an origin.
12413 *
12414 * - The coordinate space used by this function may have deleted
12415 * regions or warping due to pentagonal distortion.
12416 * - Coordinates are only comparable if they come from the same
12417 * origin index.
12418 * - Failure may occur if the index is too far away from the origin
12419 * or if the index is on the other side of a pentagon.
12420 * - This function is experimental, and its output is not guaranteed
12421 * to be compatible across different versions of H3.
12422 * @static
12423 * @param {H3Index} origin Origin H3 index
12424 * @param {Object} coords Coordinates as an `{i, j}` pair
12425 * @return {H3Index} H3 index at the relative coordinates
12426 * @throws {Error} If the H3 index cannot be calculated
12427 */
12428
12429function experimentalLocalIjToH3(origin, coords) {
12430 // Validate input coords
12431 if (!coords || typeof coords.i !== 'number' || typeof coords.j !== 'number') {
12432 throw new Error('Coordinates must be provided as an {i, j} object');
12433 } // Allocate memory for the CoordIJ struct and an H3 index to hold the return value
12434
12435
12436 var ij = libh3._malloc(SZ_COORDIJ);
12437
12438 var out = libh3._malloc(SZ_H3INDEX);
12439
12440 storeCoordIJ(ij, coords);
12441 var retVal = H3.experimentalLocalIjToH3.apply(H3, h3IndexToSplitLong(origin).concat( [ij], [out] ));
12442 var h3Index = readH3IndexFromPointer(out);
12443
12444 libh3._free(ij);
12445
12446 libh3._free(out);
12447
12448 if (retVal !== 0) {
12449 throw new Error('Index not defined for this origin and IJ coordinates pair. ' + 'IJ coordinates may be too far from origin, or ' + 'a pentagon distortion was encountered.');
12450 }
12451
12452 return h3Index;
12453} // ----------------------------------------------------------------------------
12454// Public informational utilities
12455
12456/**
12457 * Average hexagon area at a given resolution
12458 * @static
12459 * @param {Number} res Hexagon resolution
12460 * @param {String} unit Area unit (either UNITS.m2 or UNITS.km2)
12461 * @return {Number} Average area
12462 * @throws {Error} If the unit is invalid
12463 */
12464
12465function hexArea(res, unit) {
12466 validateRes(res);
12467
12468 switch (unit) {
12469 case UNITS.m2:
12470 return H3.hexAreaM2(res);
12471
12472 case UNITS.km2:
12473 return H3.hexAreaKm2(res);
12474
12475 default:
12476 throw new Error(("Unknown unit: " + unit));
12477 }
12478}
12479/**
12480 * Average hexagon edge length at a given resolution
12481 * @static
12482 * @param {Number} res Hexagon resolution
12483 * @param {String} unit Area unit (either UNITS.m or UNITS.km)
12484 * @return {Number} Average edge length
12485 * @throws {Error} If the unit is invalid
12486 */
12487
12488function edgeLength(res, unit) {
12489 validateRes(res);
12490
12491 switch (unit) {
12492 case UNITS.m:
12493 return H3.edgeLengthM(res);
12494
12495 case UNITS.km:
12496 return H3.edgeLengthKm(res);
12497
12498 default:
12499 throw new Error(("Unknown unit: " + unit));
12500 }
12501}
12502/**
12503 * The total count of hexagons in the world at a given resolution. Note that above
12504 * resolution 8 the exact count cannot be represented in a JavaScript 32-bit number,
12505 * so consumers should use caution when applying further operations to the output.
12506 * @static
12507 * @param {Number} res Hexagon resolution
12508 * @return {Number} Count
12509 */
12510
12511function numHexagons(res) {
12512 validateRes(res); // Get number as a long value
12513
12514 var ref = readLong(H3.numHexagons(res));
12515 var lower = ref[0];
12516 var upper = ref[1]; // If we're using <= 32 bits we can use normal JS numbers
12517
12518 if (!upper) {
12519 return lower;
12520 } // Above 32 bit, make a JS number that's correct in order of magnitude
12521
12522
12523 return upper * Math.pow(2, 32) + lower;
12524}
12525/**
12526 * Get all H3 indexes at resolution 0. As every index at every resolution > 0 is
12527 * the descendant of a res 0 index, this can be used with h3ToChildren to iterate
12528 * over H3 indexes at any resolution.
12529 * @static
12530 * @return {H3Index[]} All H3 indexes at res 0
12531 */
12532
12533function getRes0Indexes() {
12534 var count = H3.res0IndexCount();
12535
12536 var hexagons = libh3._malloc(SZ_H3INDEX * count);
12537
12538 H3.getRes0Indexes(hexagons);
12539 var out = readArrayOfHexagons(hexagons, count);
12540
12541 libh3._free(hexagons);
12542
12543 return out;
12544}
12545/**
12546 * Get the twelve pentagon indexes at a given resolution.
12547 * @static
12548 * @param {Number} res Hexagon resolution
12549 * @return {H3Index[]} All H3 pentagon indexes at res
12550 */
12551
12552function getPentagonIndexes(res) {
12553 validateRes(res);
12554 var count = H3.pentagonIndexCount();
12555
12556 var hexagons = libh3._malloc(SZ_H3INDEX * count);
12557
12558 H3.getPentagonIndexes(res, hexagons);
12559 var out = readArrayOfHexagons(hexagons, count);
12560
12561 libh3._free(hexagons);
12562
12563 return out;
12564}
12565/**
12566 * Convert degrees to radians
12567 * @static
12568 * @param {Number} deg Value in degrees
12569 * @return {Number} Value in radians
12570 */
12571
12572function degsToRads(deg) {
12573 return deg * Math.PI / 180;
12574}
12575/**
12576 * Convert radians to degrees
12577 * @static
12578 * @param {Number} rad Value in radians
12579 * @return {Number} Value in degrees
12580 */
12581
12582function radsToDegs(rad) {
12583 return rad * 180 / Math.PI;
12584}
12585
12586exports.UNITS = UNITS;
12587exports.h3IsValid = h3IsValid;
12588exports.h3IsPentagon = h3IsPentagon;
12589exports.h3IsResClassIII = h3IsResClassIII;
12590exports.h3GetBaseCell = h3GetBaseCell;
12591exports.h3GetFaces = h3GetFaces;
12592exports.h3GetResolution = h3GetResolution;
12593exports.geoToH3 = geoToH3;
12594exports.h3ToGeo = h3ToGeo;
12595exports.h3ToGeoBoundary = h3ToGeoBoundary;
12596exports.h3ToParent = h3ToParent;
12597exports.h3ToChildren = h3ToChildren;
12598exports.h3ToCenterChild = h3ToCenterChild;
12599exports.kRing = kRing;
12600exports.kRingDistances = kRingDistances;
12601exports.hexRing = hexRing;
12602exports.polyfill = polyfill;
12603exports.h3SetToMultiPolygon = h3SetToMultiPolygon;
12604exports.compact = compact;
12605exports.uncompact = uncompact;
12606exports.h3IndexesAreNeighbors = h3IndexesAreNeighbors;
12607exports.getH3UnidirectionalEdge = getH3UnidirectionalEdge;
12608exports.getOriginH3IndexFromUnidirectionalEdge = getOriginH3IndexFromUnidirectionalEdge;
12609exports.getDestinationH3IndexFromUnidirectionalEdge = getDestinationH3IndexFromUnidirectionalEdge;
12610exports.h3UnidirectionalEdgeIsValid = h3UnidirectionalEdgeIsValid;
12611exports.getH3IndexesFromUnidirectionalEdge = getH3IndexesFromUnidirectionalEdge;
12612exports.getH3UnidirectionalEdgesFromHexagon = getH3UnidirectionalEdgesFromHexagon;
12613exports.getH3UnidirectionalEdgeBoundary = getH3UnidirectionalEdgeBoundary;
12614exports.h3Distance = h3Distance;
12615exports.h3Line = h3Line;
12616exports.experimentalH3ToLocalIj = experimentalH3ToLocalIj;
12617exports.experimentalLocalIjToH3 = experimentalLocalIjToH3;
12618exports.hexArea = hexArea;
12619exports.edgeLength = edgeLength;
12620exports.numHexagons = numHexagons;
12621exports.getRes0Indexes = getRes0Indexes;
12622exports.getPentagonIndexes = getPentagonIndexes;
12623exports.degsToRads = degsToRads;
12624exports.radsToDegs = radsToDegs;
12625//# sourceMappingURL=h3-js.js.map