forked from yurydelendik/zbarjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zbar-processor.js
4722 lines (4718 loc) · 718 KB
/
zbar-processor.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// The main barcode scanning processing function.
// Compiled from zbar.sf.net using emscripten.
//
// Copyright (C) 2013 Yury Delendik
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
function zbarProcessImageData(imgData) {
var result = [];
var Module = {};
Module['imageWidth'] = imgData.width;
Module['imageHeight'] = imgData.height;
Module['getImageData'] = function (grayData) {
var d = imgData.data;
for (var i = 0, j = 0; i < d.length; i += 4, j++) {
grayData[j] = (d[i] * 66 + d[i + 1] * 129 + d[i + 2] * 25 + 4096) >> 8;
}
};
Module['outputResult'] = function (symbol, addon, data) {
result.push([symbol, addon, data]);
};
/* EMSCRIPTEN_CODE */
// Note: Some Emscripten settings will significantly limit the speed of the generated code.
// Note: Some Emscripten settings may limit the speed of the generated code.
try {
this['Module'] = Module;
Module.test;
} catch(e) {
this['Module'] = Module = {};
}
// The environment setup code below is customized to use Module.
// *** Environment setup code ***
var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function';
var ENVIRONMENT_IS_WEB = typeof window === 'object';
var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function';
var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
if (typeof module === "object") {
module.exports = Module;
}
if (ENVIRONMENT_IS_NODE) {
// Expose functionality in the same simple way that the shells work
// Note that we pollute the global namespace here, otherwise we break in node
Module['print'] = function(x) {
process['stdout'].write(x + '\n');
};
Module['printErr'] = function(x) {
process['stderr'].write(x + '\n');
};
var nodeFS = require('fs');
var nodePath = require('path');
Module['read'] = function(filename, binary) {
filename = nodePath['normalize'](filename);
var ret = nodeFS['readFileSync'](filename);
// The path is absolute if the normalized version is the same as the resolved.
if (!ret && filename != nodePath['resolve'](filename)) {
filename = path.join(__dirname, '..', 'src', filename);
ret = nodeFS['readFileSync'](filename);
}
if (ret && !binary) ret = ret.toString();
return ret;
};
Module['readBinary'] = function(filename) { return Module['read'](filename, true) };
Module['load'] = function(f) {
globalEval(read(f));
};
if (!Module['arguments']) {
Module['arguments'] = process['argv'].slice(2);
}
}
if (ENVIRONMENT_IS_SHELL) {
Module['print'] = print;
if (typeof printErr != 'undefined') Module['printErr'] = printErr; // not present in v8 or older sm
Module['read'] = read;
Module['readBinary'] = function(f) {
return read(f, 'binary');
};
if (!Module['arguments']) {
if (typeof scriptArgs != 'undefined') {
Module['arguments'] = scriptArgs;
} else if (typeof arguments != 'undefined') {
Module['arguments'] = arguments;
}
}
}
if (ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER) {
if (!Module['print']) {
Module['print'] = function(x) {
console.log(x);
};
}
if (!Module['printErr']) {
Module['printErr'] = function(x) {
console.log(x);
};
}
}
if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
Module['read'] = function(url) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, false);
xhr.send(null);
return xhr.responseText;
};
if (!Module['arguments']) {
if (typeof arguments != 'undefined') {
Module['arguments'] = arguments;
}
}
}
if (ENVIRONMENT_IS_WORKER) {
// We can do very little here...
var TRY_USE_DUMP = false;
if (!Module['print']) {
Module['print'] = (TRY_USE_DUMP && (typeof(dump) !== "undefined") ? (function(x) {
dump(x);
}) : (function(x) {
// self.postMessage(x); // enable this if you want stdout to be sent as messages
}));
}
Module['load'] = importScripts;
}
if (!ENVIRONMENT_IS_WORKER && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_SHELL) {
// Unreachable because SHELL is dependant on the others
throw 'Unknown runtime environment. Where are we?';
}
function globalEval(x) {
eval.call(null, x);
}
if (!Module['load'] == 'undefined' && Module['read']) {
Module['load'] = function(f) {
globalEval(Module['read'](f));
};
}
if (!Module['print']) {
Module['print'] = function(){};
}
if (!Module['printErr']) {
Module['printErr'] = Module['print'];
}
if (!Module['arguments']) {
Module['arguments'] = [];
}
// *** Environment setup code ***
// Closure helpers
Module.print = Module['print'];
Module.printErr = Module['printErr'];
// Callbacks
if (!Module['preRun']) Module['preRun'] = [];
if (!Module['postRun']) Module['postRun'] = [];
// === Auto-generated preamble library stuff ===
//========================================
// Runtime code shared with compiler
//========================================
var Runtime = {
stackSave: function () {
return STACKTOP;
},
stackRestore: function (stackTop) {
STACKTOP = stackTop;
},
forceAlign: function (target, quantum) {
quantum = quantum || 4;
if (quantum == 1) return target;
if (isNumber(target) && isNumber(quantum)) {
return Math.ceil(target/quantum)*quantum;
} else if (isNumber(quantum) && isPowerOfTwo(quantum)) {
var logg = log2(quantum);
return '((((' +target + ')+' + (quantum-1) + ')>>' + logg + ')<<' + logg + ')';
}
return 'Math.ceil((' + target + ')/' + quantum + ')*' + quantum;
},
isNumberType: function (type) {
return type in Runtime.INT_TYPES || type in Runtime.FLOAT_TYPES;
},
isPointerType: function isPointerType(type) {
return type[type.length-1] == '*';
},
isStructType: function isStructType(type) {
if (isPointerType(type)) return false;
if (isArrayType(type)) return true;
if (/<?{ ?[^}]* ?}>?/.test(type)) return true; // { i32, i8 } etc. - anonymous struct types
// See comment in isStructPointerType()
return type[0] == '%';
},
INT_TYPES: {"i1":0,"i8":0,"i16":0,"i32":0,"i64":0},
FLOAT_TYPES: {"float":0,"double":0},
or64: function (x, y) {
var l = (x | 0) | (y | 0);
var h = (Math.round(x / 4294967296) | Math.round(y / 4294967296)) * 4294967296;
return l + h;
},
and64: function (x, y) {
var l = (x | 0) & (y | 0);
var h = (Math.round(x / 4294967296) & Math.round(y / 4294967296)) * 4294967296;
return l + h;
},
xor64: function (x, y) {
var l = (x | 0) ^ (y | 0);
var h = (Math.round(x / 4294967296) ^ Math.round(y / 4294967296)) * 4294967296;
return l + h;
},
getNativeTypeSize: function (type, quantumSize) {
if (Runtime.QUANTUM_SIZE == 1) return 1;
var size = {
'%i1': 1,
'%i8': 1,
'%i16': 2,
'%i32': 4,
'%i64': 8,
"%float": 4,
"%double": 8
}['%'+type]; // add '%' since float and double confuse Closure compiler as keys, and also spidermonkey as a compiler will remove 's from '_i8' etc
if (!size) {
if (type.charAt(type.length-1) == '*') {
size = Runtime.QUANTUM_SIZE; // A pointer
} else if (type[0] == 'i') {
var bits = parseInt(type.substr(1));
assert(bits % 8 == 0);
size = bits/8;
}
}
return size;
},
getNativeFieldSize: function (type) {
return Math.max(Runtime.getNativeTypeSize(type), Runtime.QUANTUM_SIZE);
},
dedup: function dedup(items, ident) {
var seen = {};
if (ident) {
return items.filter(function(item) {
if (seen[item[ident]]) return false;
seen[item[ident]] = true;
return true;
});
} else {
return items.filter(function(item) {
if (seen[item]) return false;
seen[item] = true;
return true;
});
}
},
set: function set() {
var args = typeof arguments[0] === 'object' ? arguments[0] : arguments;
var ret = {};
for (var i = 0; i < args.length; i++) {
ret[args[i]] = 0;
}
return ret;
},
STACK_ALIGN: 8,
getAlignSize: function (type, size, vararg) {
// we align i64s and doubles on 64-bit boundaries, unlike x86
if (type == 'i64' || type == 'double' || vararg) return 8;
if (!type) return Math.min(size, 8); // align structures internally to 64 bits
return Math.min(size || (type ? Runtime.getNativeFieldSize(type) : 0), Runtime.QUANTUM_SIZE);
},
calculateStructAlignment: function calculateStructAlignment(type) {
type.flatSize = 0;
type.alignSize = 0;
var diffs = [];
var prev = -1;
type.flatIndexes = type.fields.map(function(field) {
var size, alignSize;
if (Runtime.isNumberType(field) || Runtime.isPointerType(field)) {
size = Runtime.getNativeTypeSize(field); // pack char; char; in structs, also char[X]s.
alignSize = Runtime.getAlignSize(field, size);
} else if (Runtime.isStructType(field)) {
size = Types.types[field].flatSize;
alignSize = Runtime.getAlignSize(null, Types.types[field].alignSize);
} else if (field[0] == 'b') {
// bN, large number field, like a [N x i8]
size = field.substr(1)|0;
alignSize = 1;
} else {
throw 'Unclear type in struct: ' + field + ', in ' + type.name_ + ' :: ' + dump(Types.types[type.name_]);
}
if (type.packed) alignSize = 1;
type.alignSize = Math.max(type.alignSize, alignSize);
var curr = Runtime.alignMemory(type.flatSize, alignSize); // if necessary, place this on aligned memory
type.flatSize = curr + size;
if (prev >= 0) {
diffs.push(curr-prev);
}
prev = curr;
return curr;
});
type.flatSize = Runtime.alignMemory(type.flatSize, type.alignSize);
if (diffs.length == 0) {
type.flatFactor = type.flatSize;
} else if (Runtime.dedup(diffs).length == 1) {
type.flatFactor = diffs[0];
}
type.needsFlattening = (type.flatFactor != 1);
return type.flatIndexes;
},
generateStructInfo: function (struct, typeName, offset) {
var type, alignment;
if (typeName) {
offset = offset || 0;
type = (typeof Types === 'undefined' ? Runtime.typeInfo : Types.types)[typeName];
if (!type) return null;
if (type.fields.length != struct.length) {
printErr('Number of named fields must match the type for ' + typeName + ': possibly duplicate struct names. Cannot return structInfo');
return null;
}
alignment = type.flatIndexes;
} else {
var type = { fields: struct.map(function(item) { return item[0] }) };
alignment = Runtime.calculateStructAlignment(type);
}
var ret = {
__size__: type.flatSize
};
if (typeName) {
struct.forEach(function(item, i) {
if (typeof item === 'string') {
ret[item] = alignment[i] + offset;
} else {
// embedded struct
var key;
for (var k in item) key = k;
ret[key] = Runtime.generateStructInfo(item[key], type.fields[i], alignment[i]);
}
});
} else {
struct.forEach(function(item, i) {
ret[item[1]] = alignment[i];
});
}
return ret;
},
dynCall: function (sig, ptr, args) {
if (args && args.length) {
if (!args.splice) args = Array.prototype.slice.call(args);
args.splice(0, 0, ptr);
return Module['dynCall_' + sig].apply(null, args);
} else {
return Module['dynCall_' + sig].call(null, ptr);
}
},
functionPointers: [],
addFunction: function (func) {
for (var i = 0; i < Runtime.functionPointers.length; i++) {
if (!Runtime.functionPointers[i]) {
Runtime.functionPointers[i] = func;
return 2 + 2*i;
}
}
throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.';
},
removeFunction: function (index) {
Runtime.functionPointers[(index-2)/2] = null;
},
warnOnce: function (text) {
if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {};
if (!Runtime.warnOnce.shown[text]) {
Runtime.warnOnce.shown[text] = 1;
Module.printErr(text);
}
},
funcWrappers: {},
getFuncWrapper: function (func, sig) {
assert(sig);
if (!Runtime.funcWrappers[func]) {
Runtime.funcWrappers[func] = function() {
return Runtime.dynCall(sig, func, arguments);
};
}
return Runtime.funcWrappers[func];
},
UTF8Processor: function () {
var buffer = [];
var needed = 0;
this.processCChar = function (code) {
code = code & 0xff;
if (needed) {
buffer.push(code);
needed--;
}
if (buffer.length == 0) {
if (code < 128) return String.fromCharCode(code);
buffer.push(code);
if (code > 191 && code < 224) {
needed = 1;
} else {
needed = 2;
}
return '';
}
if (needed > 0) return '';
var c1 = buffer[0];
var c2 = buffer[1];
var c3 = buffer[2];
var ret;
if (c1 > 191 && c1 < 224) {
ret = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));
} else {
ret = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
}
buffer.length = 0;
return ret;
}
this.processJSString = function(string) {
string = unescape(encodeURIComponent(string));
var ret = [];
for (var i = 0; i < string.length; i++) {
ret.push(string.charCodeAt(i));
}
return ret;
}
},
stackAlloc: function (size) { var ret = STACKTOP;STACKTOP = (STACKTOP + size)|0;STACKTOP = ((((STACKTOP)+7)>>3)<<3); return ret; },
staticAlloc: function (size) { var ret = STATICTOP;STATICTOP = (STATICTOP + size)|0;STATICTOP = ((((STATICTOP)+7)>>3)<<3); return ret; },
dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + size)|0;DYNAMICTOP = ((((DYNAMICTOP)+7)>>3)<<3); if (DYNAMICTOP >= TOTAL_MEMORY) enlargeMemory();; return ret; },
alignMemory: function (size,quantum) { var ret = size = Math.ceil((size)/(quantum ? quantum : 8))*(quantum ? quantum : 8); return ret; },
makeBigInt: function (low,high,unsigned) { var ret = (unsigned ? ((+(((low)>>>(0))))+((+(((high)>>>(0))))*(+(4294967296)))) : ((+(((low)>>>(0))))+((+(((high)|(0))))*(+(4294967296))))); return ret; },
GLOBAL_BASE: 8,
QUANTUM_SIZE: 4,
__dummy__: 0
}
//========================================
// Runtime essentials
//========================================
var __THREW__ = 0; // Used in checking for thrown exceptions.
var ABORT = false; // whether we are quitting the application. no code should run after this. set in exit() and abort()
var undef = 0;
// tempInt is used for 32-bit signed values or smaller. tempBigInt is used
// for 32-bit unsigned values or more than 32 bits. TODO: audit all uses of tempInt
var tempValue, tempInt, tempBigInt, tempInt2, tempBigInt2, tempPair, tempBigIntI, tempBigIntR, tempBigIntS, tempBigIntP, tempBigIntD;
var tempI64, tempI64b;
var tempRet0, tempRet1, tempRet2, tempRet3, tempRet4, tempRet5, tempRet6, tempRet7, tempRet8, tempRet9;
function abort(text) {
Module.print(text + ':\n' + (new Error).stack);
ABORT = true;
throw "Assertion: " + text;
}
function assert(condition, text) {
if (!condition) {
abort('Assertion failed: ' + text);
}
}
var globalScope = this;
// C calling interface. A convenient way to call C functions (in C files, or
// defined with extern "C").
//
// Note: LLVM optimizations can inline and remove functions, after which you will not be
// able to call them. Closure can also do so. To avoid that, add your function to
// the exports using something like
//
// -s EXPORTED_FUNCTIONS='["_main", "_myfunc"]'
//
// @param ident The name of the C function (note that C++ functions will be name-mangled - use extern "C")
// @param returnType The return type of the function, one of the JS types 'number', 'string' or 'array' (use 'number' for any C pointer, and
// 'array' for JavaScript arrays and typed arrays).
// @param argTypes An array of the types of arguments for the function (if there are no arguments, this can be ommitted). Types are as in returnType,
// except that 'array' is not possible (there is no way for us to know the length of the array)
// @param args An array of the arguments to the function, as native JS values (as in returnType)
// Note that string arguments will be stored on the stack (the JS string will become a C string on the stack).
// @return The return value, as a native JS value (as in returnType)
function ccall(ident, returnType, argTypes, args) {
return ccallFunc(getCFunc(ident), returnType, argTypes, args);
}
Module["ccall"] = ccall;
// Returns the C function with a specified identifier (for C++, you need to do manual name mangling)
function getCFunc(ident) {
try {
var func = globalScope['Module']['_' + ident]; // closure exported function
if (!func) func = eval('_' + ident); // explicit lookup
} catch(e) {
}
assert(func, 'Cannot call unknown function ' + ident + ' (perhaps LLVM optimizations or closure removed it?)');
return func;
}
// Internal function that does a C call using a function, not an identifier
function ccallFunc(func, returnType, argTypes, args) {
var stack = 0;
function toC(value, type) {
if (type == 'string') {
if (value === null || value === undefined || value === 0) return 0; // null string
if (!stack) stack = Runtime.stackSave();
var ret = Runtime.stackAlloc(value.length+1);
writeStringToMemory(value, ret);
return ret;
} else if (type == 'array') {
if (!stack) stack = Runtime.stackSave();
var ret = Runtime.stackAlloc(value.length);
writeArrayToMemory(value, ret);
return ret;
}
return value;
}
function fromC(value, type) {
if (type == 'string') {
return Pointer_stringify(value);
}
assert(type != 'array');
return value;
}
var i = 0;
var cArgs = args ? args.map(function(arg) {
return toC(arg, argTypes[i++]);
}) : [];
var ret = fromC(func.apply(null, cArgs), returnType);
if (stack) Runtime.stackRestore(stack);
return ret;
}
// Returns a native JS wrapper for a C function. This is similar to ccall, but
// returns a function you can call repeatedly in a normal way. For example:
//
// var my_function = cwrap('my_c_function', 'number', ['number', 'number']);
// alert(my_function(5, 22));
// alert(my_function(99, 12));
//
function cwrap(ident, returnType, argTypes) {
var func = getCFunc(ident);
return function() {
return ccallFunc(func, returnType, argTypes, Array.prototype.slice.call(arguments));
}
}
Module["cwrap"] = cwrap;
// Sets a value in memory in a dynamic way at run-time. Uses the
// type data. This is the same as makeSetValue, except that
// makeSetValue is done at compile-time and generates the needed
// code then, whereas this function picks the right code at
// run-time.
// Note that setValue and getValue only do *aligned* writes and reads!
// Note that ccall uses JS types as for defining types, while setValue and
// getValue need LLVM types ('i8', 'i32') - this is a lower-level operation
function setValue(ptr, value, type, noSafe) {
type = type || 'i8';
if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit
switch(type) {
case 'i1': HEAP8[(ptr)]=value; break;
case 'i8': HEAP8[(ptr)]=value; break;
case 'i16': HEAP16[((ptr)>>1)]=value; break;
case 'i32': HEAP32[((ptr)>>2)]=value; break;
case 'i64': (tempI64 = [value>>>0,((Math.min((+(Math.floor((value)/(+(4294967296))))), (+(4294967295))))|0)>>>0],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break;
case 'float': HEAPF32[((ptr)>>2)]=value; break;
case 'double': HEAPF64[((ptr)>>3)]=value; break;
default: abort('invalid type for setValue: ' + type);
}
}
Module['setValue'] = setValue;
// Parallel to setValue.
function getValue(ptr, type, noSafe) {
type = type || 'i8';
if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit
switch(type) {
case 'i1': return HEAP8[(ptr)];
case 'i8': return HEAP8[(ptr)];
case 'i16': return HEAP16[((ptr)>>1)];
case 'i32': return HEAP32[((ptr)>>2)];
case 'i64': return HEAP32[((ptr)>>2)];
case 'float': return HEAPF32[((ptr)>>2)];
case 'double': return HEAPF64[((ptr)>>3)];
default: abort('invalid type for setValue: ' + type);
}
return null;
}
Module['getValue'] = getValue;
var ALLOC_NORMAL = 0; // Tries to use _malloc()
var ALLOC_STACK = 1; // Lives for the duration of the current function call
var ALLOC_STATIC = 2; // Cannot be freed
var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk
var ALLOC_NONE = 4; // Do not allocate
Module['ALLOC_NORMAL'] = ALLOC_NORMAL;
Module['ALLOC_STACK'] = ALLOC_STACK;
Module['ALLOC_STATIC'] = ALLOC_STATIC;
Module['ALLOC_DYNAMIC'] = ALLOC_DYNAMIC;
Module['ALLOC_NONE'] = ALLOC_NONE;
// allocate(): This is for internal use. You can use it yourself as well, but the interface
// is a little tricky (see docs right below). The reason is that it is optimized
// for multiple syntaxes to save space in generated code. So you should
// normally not use allocate(), and instead allocate memory using _malloc(),
// initialize it with setValue(), and so forth.
// @slab: An array of data, or a number. If a number, then the size of the block to allocate,
// in *bytes* (note that this is sometimes confusing: the next parameter does not
// affect this!)
// @types: Either an array of types, one for each byte (or 0 if no type at that position),
// or a single type which is used for the entire block. This only matters if there
// is initial data - if @slab is a number, then this does not matter at all and is
// ignored.
// @allocator: How to allocate memory, see ALLOC_*
function allocate(slab, types, allocator, ptr) {
var zeroinit, size;
if (typeof slab === 'number') {
zeroinit = true;
size = slab;
} else {
zeroinit = false;
size = slab.length;
}
var singleType = typeof types === 'string' ? types : null;
var ret;
if (allocator == ALLOC_NONE) {
ret = ptr;
} else {
ret = [_malloc, Runtime.stackAlloc, Runtime.staticAlloc, Runtime.dynamicAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length));
}
if (zeroinit) {
var ptr = ret, stop;
assert((ret & 3) == 0);
stop = ret + (size & ~3);
for (; ptr < stop; ptr += 4) {
HEAP32[((ptr)>>2)]=0;
}
stop = ret + size;
while (ptr < stop) {
HEAP8[((ptr++)|0)]=0;
}
return ret;
}
if (singleType === 'i8') {
if (slab.subarray || slab.slice) {
HEAPU8.set(slab, ret);
} else {
HEAPU8.set(new Uint8Array(slab), ret);
}
return ret;
}
var i = 0, type, typeSize, previousType;
while (i < size) {
var curr = slab[i];
if (typeof curr === 'function') {
curr = Runtime.getFunctionIndex(curr);
}
type = singleType || types[i];
if (type === 0) {
i++;
continue;
}
if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later
setValue(ret+i, curr, type);
// no need to look up size unless type changes, so cache it
if (previousType !== type) {
typeSize = Runtime.getNativeTypeSize(type);
previousType = type;
}
i += typeSize;
}
return ret;
}
Module['allocate'] = allocate;
function Pointer_stringify(ptr, /* optional */ length) {
// Find the length, and check for UTF while doing so
var hasUtf = false;
var t;
var i = 0;
while (1) {
t = HEAPU8[(((ptr)+(i))|0)];
if (t >= 128) hasUtf = true;
else if (t == 0 && !length) break;
i++;
if (length && i == length) break;
}
if (!length) length = i;
var ret = '';
if (!hasUtf) {
var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack
var curr;
while (length > 0) {
curr = String.fromCharCode.apply(String, HEAPU8.subarray(ptr, ptr + Math.min(length, MAX_CHUNK)));
ret = ret ? ret + curr : curr;
ptr += MAX_CHUNK;
length -= MAX_CHUNK;
}
return ret;
}
var utf8 = new Runtime.UTF8Processor();
for (i = 0; i < length; i++) {
t = HEAPU8[(((ptr)+(i))|0)];
ret += utf8.processCChar(t);
}
return ret;
}
Module['Pointer_stringify'] = Pointer_stringify;
// Memory management
var PAGE_SIZE = 4096;
function alignMemoryPage(x) {
return ((x+4095)>>12)<<12;
}
var HEAP;
var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;
var STATIC_BASE = 0, STATICTOP = 0, staticSealed = false; // static area
var STACK_BASE = 0, STACKTOP = 0, STACK_MAX = 0; // stack area
var DYNAMIC_BASE = 0, DYNAMICTOP = 0; // dynamic area handled by sbrk
function enlargeMemory() {
abort('Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value, or (2) set Module.TOTAL_MEMORY before the program runs.');
}
var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880;
var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216;
var FAST_MEMORY = Module['FAST_MEMORY'] || 2097152;
// Initialize the runtime's memory
// check for full engine support (use string 'subarray' to avoid closure compiler confusion)
assert(!!Int32Array && !!Float64Array && !!(new Int32Array(1)['subarray']) && !!(new Int32Array(1)['set']),
'Cannot fallback to non-typed array case: Code is too specialized');
var buffer = new ArrayBuffer(TOTAL_MEMORY);
HEAP8 = new Int8Array(buffer);
HEAP16 = new Int16Array(buffer);
HEAP32 = new Int32Array(buffer);
HEAPU8 = new Uint8Array(buffer);
HEAPU16 = new Uint16Array(buffer);
HEAPU32 = new Uint32Array(buffer);
HEAPF32 = new Float32Array(buffer);
HEAPF64 = new Float64Array(buffer);
// Endianness check (note: assumes compiler arch was little-endian)
HEAP32[0] = 255;
assert(HEAPU8[0] === 255 && HEAPU8[3] === 0, 'Typed arrays 2 must be run on a little-endian system');
Module['HEAP'] = HEAP;
Module['HEAP8'] = HEAP8;
Module['HEAP16'] = HEAP16;
Module['HEAP32'] = HEAP32;
Module['HEAPU8'] = HEAPU8;
Module['HEAPU16'] = HEAPU16;
Module['HEAPU32'] = HEAPU32;
Module['HEAPF32'] = HEAPF32;
Module['HEAPF64'] = HEAPF64;
function callRuntimeCallbacks(callbacks) {
while(callbacks.length > 0) {
var callback = callbacks.shift();
if (typeof callback == 'function') {
callback();
continue;
}
var func = callback.func;
if (typeof func === 'number') {
if (callback.arg === undefined) {
Runtime.dynCall('v', func);
} else {
Runtime.dynCall('vi', func, [callback.arg]);
}
} else {
func(callback.arg === undefined ? null : callback.arg);
}
}
}
var __ATINIT__ = []; // functions called during startup
var __ATMAIN__ = []; // functions called when main() is to be run
var __ATEXIT__ = []; // functions called during shutdown
var runtimeInitialized = false;
function ensureInitRuntime() {
if (runtimeInitialized) return;
runtimeInitialized = true;
callRuntimeCallbacks(__ATINIT__);
}
function preMain() {
callRuntimeCallbacks(__ATMAIN__);
}
function exitRuntime() {
callRuntimeCallbacks(__ATEXIT__);
}
// Tools
// This processes a JS string into a C-line array of numbers, 0-terminated.
// For LLVM-originating strings, see parser.js:parseLLVMString function
function intArrayFromString(stringy, dontAddNull, length /* optional */) {
var ret = (new Runtime.UTF8Processor()).processJSString(stringy);
if (length) {
ret.length = length;
}
if (!dontAddNull) {
ret.push(0);
}
return ret;
}
Module['intArrayFromString'] = intArrayFromString;
function intArrayToString(array) {
var ret = [];
for (var i = 0; i < array.length; i++) {
var chr = array[i];
if (chr > 0xFF) {
chr &= 0xFF;
}
ret.push(String.fromCharCode(chr));
}
return ret.join('');
}
Module['intArrayToString'] = intArrayToString;
// Write a Javascript array to somewhere in the heap
function writeStringToMemory(string, buffer, dontAddNull) {
var array = intArrayFromString(string, dontAddNull);
var i = 0;
while (i < array.length) {
var chr = array[i];
HEAP8[(((buffer)+(i))|0)]=chr
i = i + 1;
}
}
Module['writeStringToMemory'] = writeStringToMemory;
function writeArrayToMemory(array, buffer) {
for (var i = 0; i < array.length; i++) {
HEAP8[(((buffer)+(i))|0)]=array[i];
}
}
Module['writeArrayToMemory'] = writeArrayToMemory;
function unSign(value, bits, ignore, sig) {
if (value >= 0) {
return value;
}
return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts
: Math.pow(2, bits) + value;
}
function reSign(value, bits, ignore, sig) {
if (value <= 0) {
return value;
}
var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32
: Math.pow(2, bits-1);
if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that
// but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors
// TODO: In i64 mode 1, resign the two parts separately and safely
value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts
}
return value;
}
if (!Math['imul']) Math['imul'] = function(a, b) {
var ah = a >>> 16;
var al = a & 0xffff;
var bh = b >>> 16;
var bl = b & 0xffff;
return (al*bl + ((ah*bl + al*bh) << 16))|0;
};
// A counter of dependencies for calling run(). If we need to
// do asynchronous work before running, increment this and
// decrement it. Incrementing must happen in a place like
// PRE_RUN_ADDITIONS (used by emcc to add file preloading).
// Note that you can add dependencies in preRun, even though
// it happens right before run - run will be postponed until
// the dependencies are met.
var runDependencies = 0;
var runDependencyTracking = {};
var calledInit = false, calledRun = false;
var runDependencyWatcher = null;
function addRunDependency(id) {
runDependencies++;
if (Module['monitorRunDependencies']) {
Module['monitorRunDependencies'](runDependencies);
}
if (id) {
assert(!runDependencyTracking[id]);
runDependencyTracking[id] = 1;
} else {
Module.printErr('warning: run dependency added without ID');
}
}
Module['addRunDependency'] = addRunDependency;
function removeRunDependency(id) {
runDependencies--;
if (Module['monitorRunDependencies']) {
Module['monitorRunDependencies'](runDependencies);
}
if (id) {
assert(runDependencyTracking[id]);
delete runDependencyTracking[id];
} else {
Module.printErr('warning: run dependency removed without ID');
}
if (runDependencies == 0) {
if (runDependencyWatcher !== null) {
clearInterval(runDependencyWatcher);
runDependencyWatcher = null;
}
// If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false)
if (!calledRun && shouldRunNow) run();
}
}
Module['removeRunDependency'] = removeRunDependency;
Module["preloadedImages"] = {}; // maps url to image data
Module["preloadedAudios"] = {}; // maps url to audio data
function addPreRun(func) {
if (!Module['preRun']) Module['preRun'] = [];
else if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];
Module['preRun'].push(func);
}
var awaitingMemoryInitializer = false;
function loadMemoryInitializer(filename) {
function applyData(data) {
HEAPU8.set(data, STATIC_BASE);
runPostSets();
}
// always do this asynchronously, to keep shell and web as similar as possible
addPreRun(function() {
if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) {
applyData(Module['readBinary'](filename));
} else {
Browser.asyncLoad(filename, function(data) {
applyData(data);
}, function(data) {
throw 'could not load memory initializer ' + filename;
});
}
});
awaitingMemoryInitializer = false;
}
// === Body ===
STATIC_BASE = 8;
STATICTOP = STATIC_BASE + 10624;
var _stderr;
var _stderr = _stderr=allocate([0,0,0,0,0,0,0,0], "i8", ALLOC_STATIC);
/* memory initializer */ allocate([89,56,48,48,0,0,0,0,128,18,0,0,0,18,0,0,216,17,0,0,152,17,0,0,80,17,0,0,0,0,0,0,10,9,8,8,12,11,16,10,14,13,16,12,0,0,0,0,65,0,4,1,1,0,0,1,64,16,4,0,0,16,0,0,16,1,17,0,16,0,16,0,0,17,1,0,0,16,0,0,132,0,66,0,4,0,64,0,128,16,2,0,0,16,0,0,0,108,0,0,0,68,0,0,0,56,0,0,0,16,0,0,0,0,1,1,4,0,3,1,2,0,2,1,0,2,1,2,240,255,255,15,255,31,47,243,255,79,127,248,95,249,246,255,255,111,159,245,143,247,244,255,63,242,241,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,20,0,0,136,20,0,0,192,19,0,0,8,19,0,0,104,15,0,0,0,0,0,0,255,240,255,31,255,242,255,255,255,255,255,63,244,245,255,111,255,255,255,255,240,241,255,47,255,255,255,255,255,255,63,79,255,15,241,242,255,63,255,244,245,246,247,137,255,171,255,252,255,255,15,31,35,69,246,127,255,255,255,255,248,255,249,175,240,241,255,47,255,243,255,255,79,95,103,137,250,191,255,205,240,241,242,63,244,86,255,255,255,255,127,143,154,255,188,223,15,31,242,255,255,63,255,255,244,255,245,111,255,255,255,255,15,31,35,255,69,111,255,255,247,255,248,159,255,255,255,255,0,7,12,25,36,50,64,71,11,2,8,16,10,4,8,9,255,0,1,4,2,8,5,10,3,14,9,7,6,13,11,12,1,2,4,8,3,6,12,11,5,10,7,14,15,13,9,1,2,4,8,3,6,12,11,5,10,7,14,15,13,9,1,0,82,71,66,52,3,0,0,0,4,8,16,24,66,71,82,49,3,0,0,0,1,160,163,198,52,50,50,80,1,0,0,0,1,0,0,0,89,56,48,48,0,0,0,0,0,0,0,0,89,85,89,50,2,0,0,0,1,0,0,0,74,80,69,71,5,0,0,0,0,0,0,0,89,86,89,85,2,0,0,0,1,0,1,0,89,56,0,0,0,0,0,0,0,0,0,0,78,86,50,49,4,0,0,0,1,1,1,0,78,86,49,50,4,0,0,0,1,1,0,0,66,71,82,51,3,0,0,0,3,16,8,0,89,86,85,57,1,0,0,0,2,2,1,0,82,71,66,79,3,0,0,0,2,106,101,96,82,71,66,81,3,0,0,0,2,98,109,104,71,82,69,89,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,4,16,8,0,89,56,32,32,0,0,0,0,0,0,0,0,73,52,50,48,1,0,0,0,1,1,0,0,82,71,66,49,3,0,0,0,1,165,162,192,89,85,49,50,1,0,0,0,1,1,0,0,89,86,49,50,1,0,0,0,1,1,1,0,82,71,66,51,3,0,0,0,3,0,8,16,82,52,52,52,3,0,0,0,2,136,132,128,66,71,82,52,3,0,0,0,4,16,8,0,89,85,86,57,1,0,0,0,2,2,0,0,77,74,80,71,5,0,0,0,0,0,0,0,52,49,49,80,1,0,0,0,2,0,0,0,82,71,66,80,3,0,0,0,2,107,69,96,82,71,66,82,3,0,0,0,2,99,77,104,89,85,89,86,2,0,0,0,1,0,0,0,85,89,86,89,2,0,0,0,1,0,2,0,0,0,0,0,248,8,0,0,128,7,0,0,176,30,0,0,224,29,0,0,8,29,0,0,232,27,0,0,200,26,0,0,192,24,0,0,168,24,0,0,200,23,0,0,16,23,0,0,96,22,0,0,208,21,0,0,0,0,0,0,6,16,4,19,25,8,17,5,9,18,7,21,22,0,20,3,24,1,2,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,8,0,0,0,42,0,0,0,24,0,0,0,24,0,0,0,32,0,0,0,30,0,0,0,8,0,0,0,42,0,0,0,255,255,255,255,0,0,0,0,1,0,0,0,12,0,0,0,48,0,0,0,6,0,0,0,64,0,0,0,24,0,0,0,128,0,0,0,30,0,0,0,40,0,0,0,42,0,0,0,255,255,255,255,0,0,0,0,24,0,0,0,2,0,0,0,52,0,0,0,2,0,0,0,20,0,0,0,34,0,0,0,144,0,0,0,38,0,0,0,18,0,0,0,2,0,0,0,255,255,255,255,0,0,0,0,112,0,0,0,26,0,0,0,160,0,0,0,26,0,0,0,144,0,0,0,18,0,0,0,120,0,0,0,36,0,0,0,152,0,0,0,26,0,0,0,255,255,255,255,0,0,0,0,1,0,0,0,12,0,0,0,8,0,0,0,42,0,0,0,24,0,0,0,24,0,0,0,32,0,0,0,30,0,0,0,8,0,0,0,42,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,128,66,134,200,74,142,208,18,147,213,151,255,217,27,255,255,92,160,226,36,165,255,39,255,232,42,255,255,43,255,255,255,7,26,32,13,16,3,19,23,34,22,29,35,25,13,5,28,19,6,37,7,12,42,42,39,49,4,14,52,0,15,67,21,37,70,28,38,73,11,8,76,18,9,82,25,43,88,15,0,97,2,17,100,9,18,112,6,19,133,36,22,138,41,40,145,33,24,148,43,25,162,40,41,168,39,42,193,31,27,196,38,28,208,35,29,3,20,30,6,27,31,9,10,1,12,17,2,18,24,33,24,14,4,33,1,10,36,8,11,48,5,13,66,22,36,72,12,7,96,3,16,129,30,20,132,37,21,144,34,23,192,32,26,0,0,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,45,46,32,36,47,43,37,42,0,0,0,0,92,191,161,42,197,12,164,45,227,15,95,228,107,232,105,167,231,193,81,30,131,217,0,132,31,199,13,51,134,181,14,21,135,16,218,17,54,229,24,55,204,19,57,137,151,20,27,138,58,189,162,94,1,133,176,2,163,165,44,22,136,188,18,166,97,230,86,98,25,219,26,168,50,28,139,205,29,169,195,32,196,80,93,192,43,198,46,83,96,49,82,194,52,200,85,87,62,206,59,201,106,84,79,56,88,203,47,202,0,0,0,0,0,0,0,0,0,0,0,0,52,50,50,80,73,52,50,48,89,85,49,50,89,86,49,50,52,49,49,80,78,86,49,50,78,86,50,49,89,85,89,86,85,89,86,89,89,85,89,50,89,85,86,52,82,71,66,51,3,0,0,0,66,71,82,51,82,71,66,52,66,71,82,52,82,71,66,80,82,71,66,79,82,71,66,82,82,71,66,81,89,85,86,57,89,86,85,57,71,82,69,89,89,56,48,48,89,56,32,32,89,56,0,0,82,71,66,49,82,52,52,52,66,65,56,49,89,52,49,80,89,52,52,52,89,85,86,79,72,77,49,50,72,73,50,52,74,80,69,71,77,74,80,71,77,80,69,71,0,0,0,0,58,32,37,115,32,40,37,100,41,10,0,0,0,0,0,0,37,115,58,32,122,98,97,114,32,37,115,32,105,110,32,37,115,40,41,58,10,32,32,32,32,37,115,58,32,0,0,0,69,65,78,45,56,0,0,0,33,112,114,111,99,45,62,119,97,105,116,95,104,101,97,100,0,0,0,0,0,0,0,0,33,40,99,111,100,101,32,38,32,48,120,56,48,41,0,0,37,115,58,32,69,82,82,79,82,32,119,114,105,116,105,110,103,32,37,115,58,32,37,115,10,0,0,0,0,0,0,0,37,115,58,32,105,109,103,95,121,43,58,32,37,48,52,100,44,37,48,52,100,32,64,37,112,10,0,0,0,0,0,0,37,115,58,32,115,101,116,116,105,110,103,32,98,101,115,116,32,102,111,114,109,97,116,32,37,46,52,115,40,37,48,56,120,41,32,40,37,100,41,10,0,0,0,0,0,0,0,0,46,47,122,98,97,114,47,101,114,114,111,114,46,104,0,0,105,110,118,97,108,105,100,32,105,111,109,111,100,101,32,114,101,113,117,101,115,116,101,100,0,0,0,0,0,0,0,0,80,68,70,52,49,55,0,0,111,117,116,32,111,102,32,109,101,109,111,114,121,0,0,0,122,98,97,114,47,112,114,111,99,101,115,115,111,114,46,99,0,0,0,0,0,0,0,0,99,111,100,101,32,60,32,48,120,49,52,0,0,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,105,61,37,120,32,106,61,37,120,32,99,111,100,101,61,37,48,50,120,32,99,104,97,114,115,101,116,61,37,120,32,99,101,120,112,61,37,120,32,37,115,10,0,0,114,99,32,62,61,32,48,0,37,115,58,32,69,82,82,79,82,32,111,112,101,110,105,110,103,32,37,115,58,32,37,115,10,0,0,0,0,0,0,0,37,115,58,32,105,109,103,95,120,45,58,32,37,48,52,100,44,37,48,52,100,32,64,37,112,10,0,0,0,0,0,0,110,111,32,115,117,112,112,111,114,116,101,100,32,105,109,97,103,101,32,102,111,114,109,97,116,115,32,97,118,97,105,108,97,98,108,101,0,0,0,0,115,116,97,116,101,45,62,107,105,99,107,95,102,100,115,91,49,93,32,62,61,32,48,0,101,114,114,45,62,109,97,103,105,99,32,61,61,32,69,82,82,73,78,70,79,95,77,65,71,73,67,0,0,0,0,0,100,101,118,105,99,101,32,97,108,114,101,97,100,121,32,111,112,101,110,101,100,44,32,117,110,97,98,108,101,32,116,111,32,99,104,97,110,103,101,32,105,111,109,111,100,101,0,0,67,79,68,69,45,49,50,56,0,0,0,0,0,0,0,0,110,111,32,101,114,114,111,114,0,0,0,0,0,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,99,111,100,101,61,37,48,50,120,32,101,49,61,37,120,32,101,50,61,37,120,32,115,52,61,37,120,32,99,111,108,111,114,61,37,120,10,0,0,0,0,0,0,0,99,111,100,101,32,62,61,32,83,84,65,82,84,95,65,32,38,38,32,99,111,100,101,32,60,61,32,83,84,65,82,84,95,67,0,0,0,0,0,0,46,47,122,98,97,114,47,114,101,102,99,110,116,46,104,0,112,32,61,61,32,100,97,116,97,32,43,32,120,32,43,32,121,32,42,32,40,105,110,116,112,116,114,95,116,41,119,0,119,0,0,0,0,0,0,0,37,115,58,32,37,46,52,115,40,37,48,56,120,41,32,45,62,32,37,46,52,115,40,37,48,56,120,41,32,40,37,100,41,10,0,0,0,0,0,0,122,98,97,114,47,112,114,111,99,101,115,115,111,114,47,112,111,115,105,120,46,104,0,0,46,47,122,98,97,114,47,101,114,114,111,114,46,104,0,0,37,115,58,32,114,101,113,117,101,115,116,32,105,110,116,101,114,102,97,99,101,32,118,101,114,115,105,111,110,32,37,100,10,0,0,0,0,0,0,0,67,79,68,69,45,51,57,0,117,110,107,110,111,119,110,32,105,109,97,103,101,32,102,111,114,109,97,116,0,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,110,61,37,120,32,100,61,37,120,32,99,104,107,61,37,120,32,37,115,10,0,0,0,0,0,0,0,0,105,100,120,32,60,32,48,120,50,99,0,0,0,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,37,115,10,0,110,101,120,116,32,62,32,115,121,109,115,45,62,100,97,116,97,108,101,110,0,0,0,0,37,115,58,32,105,109,103,95,120,43,58,32,37,48,52,100,44,37,48,52,100,32,64,37,112,10,0,0,0,0,0,0,37,115,58,32,100,117,109,112,105,110,103,32,37,46,52,115,40,37,48,56,120,41,32,105,109,97,103,101,32,116,111,32,37,115,10,0,0,0,0,0,37,115,58,32,37,46,52,115,40,37,48,56,120,41,32,45,62,32,63,32,40,117,110,115,117,112,112,111,114,116,101,100,41,10,0,0,0,0,0,0,37,115,58,32,91,37,100,93,32,102,100,61,37,100,32,104,97,110,100,108,101,114,61,37,112,10,0,0,0,0,0,0,114,99,32,62,61,32,48,0,100,101,118,105,99,101,32,97,108,114,101,97,100,121,32,111,112,101,110,101,100,44,32,117,110,97,98,108,101,32,116,111,32,99,104,97,110,103,101,32,105,110,116,101,114,102,97,99,101,0,0,0,0,0,0,0,73,50,47,53,0,0,0,0,37,120,0,0,0,0,0,0,110,101,119,0,0,0,0,0,122,98,97,114,0,0,0,0,99,104,107,32,60,32,49,48,0,0,0,0,0,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,32,105,100,120,61,37,120,32,101,110,99,61,37,120,32,115,57,61,37,120,10,0,0,0,0,0,0,0,100,99,111,100,101,45,62,98,117,102,91,100,99,111,100,101,49,50,56,45,62,99,104,97,114,97,99,116,101,114,32,45,32,49,93,32,61,61,32,83,84,79,80,95,70,87,68,0,122,98,97,114,47,113,114,99,111,100,101,47,113,114,100,101,99,116,120,116,46,99,0,0,33,115,121,109,45,62,115,121,109,115,0,0,0,0,0,0,110,32,60,32,108,101,110,0,110,111,32,105,110,112,117,116,32,111,114,32,111,117,116,112,117,116,32,102,111,114,109,97,116,115,32,97,118,97,105,108,97,98,108,101,0,0,0,0,112,114,111,99,45,62,116,104,114,101,97,100,101,100,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,119,61,37,120,32,100,61,37,120,32,99,104,107,61,37,120,32,37,115,10,0,0,0,0,0,0,0,0,46,47,122,98,97,114,47,114,101,102,99,110,116,46,104,0,37,115,58,32,114,101,113,117,101,115,116,32,115,105,122,101,58,32,37,100,32,120,32,37,100,10,0,0,0,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,99,61,37,48,50,120,32,115,57,61,37,120,10,0,0,0,0,0,0,0,73,83,66,78,45,49,51,0,37,100,0,0,0,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,97,108,108,111,99,61,37,120,32,105,100,120,61,37,120,32,99,61,37,48,50,120,32,37,115,10,0,0,60,63,62,0,0,0,0,0,100,117,112,108,105,99,97,116,101,0,0,0,0,0,0,0,98,117,102,91,37,48,52,120,93,61,0,0,0,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,99,104,107,61,37,120,32,110,61,37,120,32,37,115,0,0,0,0,0,0,101,110,99,32,60,32,48,120,50,48,0,0,0,0,0,0,100,99,111,100,101,45,62,98,117,102,91,100,99,111,100,101,49,50,56,45,62,99,104,97,114,97,99,116,101,114,32,45,32,49,93,32,61,61,32,83,84,79,80,95,82,69,86,0,67,80,52,51,55,0,0,0,105,115,99,110,45,62,114,101,99,121,99,108,101,91,105,93,46,110,115,121,109,115,0,0,37,115,46,37,48,56,120,46,122,105,109,103,0,0,0,0,105,109,97,103,101,32,102,111,114,109,97,116,32,108,105,115,116,32,105,115,32,110,111,116,32,115,111,114,116,101,100,33,63,0,0,0,0,0,0,0,85,84,70,45,56,0,0,0,122,98,97,114,47,112,114,111,99,101,115,115,111,114,47,112,111,115,105,120,46,99,0,0,37,115,58,32,109,97,120,32,102,105,110,100,101,114,32,108,105,110,101,115,32,61,32,37,100,120,37,100,10,0,0,0,97,108,114,101,97,100,121,32,105,110,105,116,105,97,108,105,122,101,100,44,32,117,110,97,98,108,101,32,116,111,32,114,101,115,105,122,101,0,0,0,69,65,78,45,49,51,0,0,122,98,97,114,47,101,114,114,111,114,46,99,0,0,0,0,60,117,110,107,110,111,119,110,62,0,0,0,0,0,0,0,122,98,97,114,47,105,109,103,95,115,99,97,110,110,101,114,46,99,0,0,0,0,0,0,117,110,99,101,114,116,97,105,110,0,0,0,0,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,105,61,37,120,32,100,61,37,120,32,99,104,107,61,37,120,32,37,115,10,0,0,0,0,0,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,32,101,110,99,61,37,120,32,115,57,61,37,120,10,0,0,0,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,100,105,114,61,37,120,32,37,115,10,0,0,0,0,0,0,0,0,0,0,73,83,79,56,56,53,57,45,37,105,0,0,0,0,0,0,115,121,109,45,62,100,97,116,97,0,0,0,0,0,0,0,37,115,46,37,46,52,115,46,122,105,109,103,0,0,0,0,37,115,58,32,107,105,99,107,105,110,103,32,37,100,32,102,100,115,10,0,0,0,0,0,112,114,111,99,45,62,108,111,99,107,95,108,101,118,101,108,32,61,61,32,49,0,0,0,37,115,58,32,115,104,97,114,101,100,32,102,111,114,109,97,116,58,32,37,52,46,52,115,10,0,0,0,0,0,0,0,110,111,116,32,99,111,109,112,105,108,101,100,32,119,105,116,104,32,118,105,100,101,111,32,105,110,112,117,116,32,115,117,112,112,111,114,116,0,0,0,118,105,100,101,111,32,100,114,105,118,101,114,32,100,111,101,115,32,110,111,116,32,115,117,112,112,111,114,116,32,112,111,108,108,105,110,103,0,0,0,85,80,67,45,65,0,0,0,122,98,97,114,47,105,109,97,103,101,46,99,0,0,0,0,78,79,84,69,0,0,0,0,115,114,99,45,62,109,97,103,105,99,32,61,61,32,69,82,82,73,78,70,79,95,77,65,71,73,67,0,0,0,0,0,0,0,0,0,0,0,0,0,105,109,103,45,62,115,114,99,105,100,120,32,62,61,32,48,0,0,0,0,0,0,0,0,87,65,82,78,73,78,71,0,100,115,116,45,62,109,97,103,105,99,32,61,61,32,69,82,82,73,78,70,79,95,77,65,71,73,67,0,0,0,0,0,122,98,97,114,47,112,114,111,99,101,115,115,111,114,47,108,111,99,107,46,99,0,0,0,79,75,0,0,0,0,0,0,101,114,114,45,62,109,97,103,105,99,32,61,61,32,69,82,82,73,78,70,79,95,77,65,71,73,67,0,0,0,0,0,69,82,82,79,82,0,0,0,37,115,0,0,0,0,0,0,46,47,122,98,97,114,47,101,114,114,111,114,46,104,0,0,37,115,58,32,37,115,37,115,58,32,37,115,32,40,37,100,32,112,116,115,41,32,40,113,61,37,100,41,32,40,37,115,41,10,0,0,0,0,0,0,100,32,60,32,49,48,0,0,101,114,114,45,62,109,97,103,105,99,32,61,61,32,69,82,82,73,78,70,79,95,77,65,71,73,67,0,0,0,0,0,99,32,60,32,48,120,50,99,0,0,0,0,0,0,0,0,70,65,84,65,76,32,69,82,82,79,82,0,0,0,0,0,100,99,111,100,101,45,62,98,117,102,95,97,108,108,111,99,32,62,32,100,99,111,100,101,49,50,56,45,62,99,104,97,114,97,99,116,101,114,0,0,110,111,116,32,99,111,109,112,105,108,101,100,32,119,105,116,104,32,111,117,116,112,117,116,32,119,105,110,100,111,119,32,115,117,112,112,111,114,116,0,32,0,0,0,0,0,0,0,114,99,32,62,61,32,48,0,83,74,73,83,0,0,0,0,46,47,122,98,97,114,47,101,114,114,111,114,46,104,0,0,105,109,97,103,101,32,115,99,97,110,110,101,114,0,0,0,118,105,100,101,111,32,105,110,112,117,116,32,110,111,116,32,105,110,105,116,105,97,108,105,122,101,100,0,0,0,0,0,48,0,0,0,0,0,0,0,46,47,122,98,97,114,47,114,101,102,99,110,116,46,104,0,110,111,116,32,99,111,109,112,105,108,101,100,32,119,105,116,104,32,111,117,116,112,117,116,32,119,105,110,100,111,119,32,115,117,112,112,111,114,116,0,32,37,46,52,115,40,37,48,56,120,41,61,37,100,0,0,101,114,114,45,62,109,97,103,105,99,32,61,61,32,69,82,82,73,78,70,79,95,77,65,71,73,67,0,0,0,0,0,37,115,58,32,32,32,32,32,91,37,48,50,100,93,32,64,37,48,56,108,120,10,0,0,119,105,110,100,111,119,0,0,37,115,58,32,91,37,100,93,32,102,100,61,37,100,32,110,61,37,100,10,0,0,0,0,100,105,115,112,108,97,121,32,119,105,110,100,111,119,32,110,111,116,32,97,118,97,105,108,97,98,108,101,32,102,111,114,32,105,110,112,117,116,0,0,119,32,61,61,32,119,97,105,116,101,114,0,0,0,0,0,101,114,114,45,62,109,97,103,105,99,32,61,61,32,69,82,82,73,78,70,79,95,77,65,71,73,67,0,0,0,0,0,101,114,114,45,62,109,97,103,105,99,32,61,61,32,69,82,82,73,78,70,79,95,77,65,71,73,67,0,0,0,0,0,37,115,58,32,100,115,116,61,37,100,120,37,100,32,40,37,108,120,41,32,37,108,120,32,115,114,99,61,37,100,120,37,100,32,37,108,120,10,0,0,85,83,69,82,80,84,82,0,118,105,100,101,111,0,0,0,105,100,120,32,60,61,32,48,120,53,48,0,0,0,0,0,118,105,100,101,111,32,100,101,118,105,99,101,32,110,111,116,32,111,112,101,110,101,100,0,115,114,99,45,62,100,97,116,97,108,101,110,32,62,61,32,115,114,99,45,62,119,105,100,116,104,32,42,32,115,114,99,45,62,104,101,105,103,104,116,0,0,0,0,0,0,0,0,82,69,65,68,0,0,0,0,73,83,66,78,45,49,48,0,112,114,111,99,101,115,115,111,114,0,0,0,0,0,0,0,110,111,32,99,111,109,112,97,116,105,98,108,101,32,105,109,97,103,101,32,102,111,114,109,97,116,0,0,0,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,115,105,103,61,37,120,32,111,102,102,115,101,116,61,37,120,32,98,97,115,101,61,37,120,32,105,100,120,61,37,120,10,0,0,0,0,115,114,99,45,62,100,97,116,97,108,101,110,32,62,61,32,115,114,99,110,32,43,32,50,32,42,32,115,114,99,110,0,37,115,58,32,112,114,101,45,97,108,108,111,99,97,116,101,100,32,37,100,32,37,115,32,98,117,102,102,101,114,115,32,115,105,122,101,61,48,120,37,108,120,10,0,0,0,0,0,114,99,32,62,61,32,48,0,117,110,107,110,111,119,110,32,101,114,114,111,114,0,0,0,122,105,109,97,103,101,0,0,119,105,110,100,111,119,32,111,117,116,112,117,116,0,0,0,98,97,115,101,32,60,32,56,0,0,0,0,0,0,0,0,115,114,99,45,62,100,97,116,97,108,101,110,32,62,61,32,115,114,99,110,32,43,32,50,32,42,32,115,114,99,109,0,117,110,97,98,108,101,32,116,111,32,97,108,108,111,99,97,116,101,32,105,109,97,103,101,32,98,117,102,102,101,114,115,0,0,0,0,0,0,0,0,46,47,122,98,97,114,47,114,101,102,99,110,116,46,104,0,119,105,110,100,111,119,115,32,115,121,115,116,101,109,32,101,114,114,111,114,0,0,0,0,118,105,100,101,111,32,105,110,112,117,116,0,0,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,115,105,103,61,37,120,32,111,102,102,115,101,116,61,37,120,32,105,100,120,61,37,120,32,98,97,115,101,61,37,120,10,0,0,0,0,114,99,32,62,61,32,48,0,115,114,99,102,109,116,45,62,112,46,121,117,118,46,120,115,117,98,50,32,61,61,32,49,0,0,0,0,0,0,0,0,33,118,100,111,45,62,98,117,102,0,0,0,0,0,0,0,111,117,116,112,117,116,32,119,105,110,100,111,119,32,105,115,32,99,108,111,115,101,100,0,37,115,58,32,69,82,82,79,82,58,32,110,111,32,99,111,109,112,97,116,105,98,108,101,32,37,115,32,102,111,114,109,97,116,10,0,0,0,0,0,97,99,99,32,60,32,49,48,51,0,0,0,0,0,0,0,46,47,122,98,97,114,47,114,101,102,99,110,116,46,104,0,115,114,99,45,62,100,97,116,97,108,101,110,32,62,61,32,40,115,114,99,45,62,119,105,100,116,104,32,42,32,115,114,99,45,62,104,101,105,103,104,116,32,43,32,117,118,112,95,115,105,122,101,40,115,114,99,44,32,115,114,99,102,109,116,41,32,42,32,50,41,0,0,118,100,111,45,62,100,97,116,97,108,101,110,0,0,0,0,88,49,49,32,112,114,111,116,111,99,111,108,32,101,114,114,111,114,0,0,0,0,0,0,87,65,82,78,73,78,71,58,32,110,111,32,99,111,109,112,97,116,105,98,108,101,32,105,110,112,117,116,32,116,111,32,111,117,116,112,117,116,32,102,111,114,109,97,116,10,46,46,46,116,114,121,105,110,103,32,97,103,97,105,110,32,119,105,116,104,32,111,117,116,112,117,116,32,100,105,115,97,98,108,101,100,10,0,0,0,0,0,115,117,109,32,60,32,49,48,51,0,0,0,0,0,0,0,108,105,110,101,0,0,0,0,115,114,99,45,62,100,97,116,97,108,101,110,32,62,61,32,40,115,114,99,45,62,119,105,100,116,104,32,42,32,115,114,99,45,62,104,101,105,103,104,116,32,42,32,115,114,99,102,109,116,45,62,112,46,114,103,98,46,98,112,112,41,0,0,105,109,103,45,62,115,114,99,105,100,120,32,61,61,32,45,49,0,0,0,0,0,0,0,88,49,49,32,100,105,115,112,108,97,121,32,101,114,114,111,114,0,0,0,0,0,0,0,97,108,108,32,114,101,115,111,117,114,99,101,115,32,98,117,115,121,0,0,0,0,0,0,115,112,97,119,110,105,110,103,32,105,110,112,117,116,32,116,104,114,101,97,100,0,0,0,37,115,58,32,112,114,111,99,101,115,115,105,110,103,58,32,37,46,52,115,40,37,48,56,120,41,32,37,100,120,37,100,32,64,37,112,10,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,100,105,114,61,37,120,32,105,61,37,120,32,115,117,109,61,37,120,32,97,99,99,61,37,120,32,37,115,10,0,0,0,0,0,0,0,37,115,58,32,32,32,32,32,32,114,101,99,121,99,108,101,100,91,37,100,93,32,32,32,32,32,32,32,32,61,32,37,45,52,100,10,0,0,0,0,122,98,97,114,47,99,111,110,118,101,114,116,46,99,0,0,122,98,97,114,47,100,101,99,111,100,101,114,47,101,97,110,46,99,0,0,0,0,0,0,118,100,111,0,0,0,0,0,122,98,97,114,47,100,101,99,111,100,101,114,47,99,111,100,101,51,57,46,99,0,0,0,101,114,114,45,62,109,97,103,105,99,32,61,61,32,69,82,82,73,78,70,79,95,77,65,71,73,67,0,0,0,0,0,122,98,97,114,47,100,101,99,111,100,101,114,47,99,111,100,101,49,50,56,46,99,0,0,115,112,97,119,110,105,110,103,32,118,105,100,101,111,32,116,104,114,101,97,100,0,0,0,37,115,37,48,50,120,0,0,99,111,100,101,32,60,61,32,57,0,0,0,0,0,0,0,37,115,58,32,99,108,111,115,101,100,32,99,97,109,101,114,97,32,40,102,100,61,37,100,41,10,0,0,0,0,0,0,37,115,58,32,115,121,109,98,111,108,115,32,97,108,108,111,99,97,116,101,100,32,32,32,32,32,32,32,61,32,37,45,52,100,10,0,0,0,0,0,73,83,79,56,56,53,57,45,49,0,0,0,0,0,0,0,37,115,58,32,37,100,120,37,100,32,102,105,110,100,101,114,115,44,32,37,100,32,99,101,110,116,101,114,115,58,10,0,114,99,32,62,61,32,48,0,0,0,0,0,0,0,0,0,108,111,99,107,105,110,103,32,101,114,114,111,114,0,0,0,97,108,108,111,99,97,116,105,110,103,32,118,105,100,101,111,32,114,101,115,111,117,114,99,101,115,0,0,0,0,0,0,115,121,109,45,62,100,97,116,97,95,97,108,108,111,99,0,100,99,111,100,101,45,62,98,117,102,91,106,93,32,60,61,32,39,57,39,0,0,0,0,37,115,58,32,32,32,32,32,105,109,97,103,101,32,115,121,109,115,32,105,110,32,117,115,101,32,32,32,61,32,37,45,52,100,9,114,101,99,121,99,108,101,100,32,32,61,32,37,45,52,100,10,0,0,0,0,69,82,82,79,82,58,32,105,109,97,103,101,32,102,111,114,109,97,116,32,108,105,115,116,32,105,115,32,110,111,116,32,115,111,114,116,101,100,33,63,10,0,0,0,0,0,0,0,116,105,109,101,111,117,116,32,62,32,48,0,0,0,0,0,37,115,58,32,102,114,111,109,32,37,46,52,115,40,37,48,56,120,41,32,116,111,0,0,46,47,122,98,97,114,47,101,114,114,111,114,46,104,0,0,46,47,122,98,97,114,47,114,101,102,99,110,116,46,104,0,43,53,0,0,0,0,0,0,105,109,103,45,62,114,101,102,99,110,116,0,0,0,0,0,115,121,115,116,101,109,32,101,114,114,111,114,0,0,0,0,102,97,105,108,101,100,32,116,111,32,111,112,101,110,32,112,105,112,101,0,0,0,0,0,112,114,111,99,45,62,108,111,99,107,95,108,101,118,101,108,32,62,32,48,0,0,0,0,97,108,108,111,99,97,116,105,110,103,32,119,105,110,100,111,119,32,114,101,115,111,117,114,99,101,115,0,0,0,0,0,87,65,82,78,73,78,71,58,32,37,115,58,37,100,58,32,37,115,58,32,65,115,115,101,114,116,105,111,110,32,34,37,115,34,32,102,97,105,108,101,100,46,10,9,115,116,97,114,116,61,37,120,32,101,110,100,61,37,120,32,105,61,37,120,32,106,61,37,120,32,37,115,10,0,0,0,0,0,0,0,46,47,122,98,97,114,47,101,114,114,111,114,46,104,0,0,37,115,58,32,32,32,32,32,115,99,97,110,110,101,114,32,115,121,109,115,32,105,110,32,117,115,101,32,61,32,37,45,52,100,9,114,101,99,121,99,108,101,100,32,32,61,32,37,45,52,100,10,0,0,0,0,46,47,122,98,97,114,47,101,114,114,111,114,46,104,0,0,33,114,99,0,0,0,0,0,105,109,103,0,0,0,0,0,43,50,0,0,0,0,0,0,105,110,118,97,108,105,100,32,114,101,113,117,101,115,116,0,33,112,114,111,99,45,62,119,97,105,116,95,110,101,120,116,0,0,0,0,0,0,0,0,99,111,100,101,32,62,61,32,67,79,68,69,95,67,32,38,38,32,99,111,100,101,32,60,61,32,67,79,68,69,95,65,0,0,0,0,0,0,0,0,47,100,101,118,47,118,105,100,101,111,48,0,0,0,0,0,114,99,32,62,61,32,48,0,37,115,58,32,115,121,109,98,111,108,32,115,101,116,115,32,97,108,108,111,99,97,116,101,100,32,32,32,61,32,37,45,52,100,10,0,0,0,0,0,101,114,114,45,62,109,97,103,105,99,32,61,61,32,69,82,82,73,78,70,79,95,77,65,71,73,67,0,0,0,0,0,112,45,62,110,117,109,0,0,122,98,97,114,47,118,105,100,101,111,46,99,0,0,0,0,85,78,75,78,79,87,78,0,85,80,67,45,69,0,0,0,117,110,115,117,112,112,111,114,116,101,100,32,114,101,113,117,101,115,116,0,0,0,0,0,33,112,114,111,99,45,62,119,97,105,116,95,116,97,105,108,0,0,0,0,0,0,0,0,99,101,120,112,0,0,0,0,46,47,122,98,97,114,47,114,101,102,99,110,116,46,104,0,37,115,58,32,105,109,103,95,121,45,58,32,37,48,52,100,44,37,48,52,100,32,64,37,112,10,0,0,0,0,0,0,46,47,122,98,97,114,47,101,114,114,111,114,46,104,0,0,101,114,114,45,62,109,97,103,105,99,32,61,61,32,69,82,82,73,78,70,79,95,77,65,71,73,67,0,0,0,0,0,97,108,114,101,97,100,121,32,105,110,105,116,105,97,108,105,122,101,100,44,32,114,101,45,105,110,105,116,32,117,110,105,109,112,108,101,109,101,110,116,101,100,0,0,0,0,0,0,81,82,45,67,111,100,101,0,105,110,116,101,114,110,97,108,32,108,105,98,114,97,114,121,32,101,114,114,111,114,0,0,112,114,111,99,101,115,115,111,114,0,0,0,0,0,0,0,46,46,47,116,101,109,112,108,97,116,101,115,47,122,98,97,114,45,109,97,105,110,46,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,122,98,97,114,95,118,105,100,101,111,95,114,101,113,117,101,115,116,95,115,105,122,101,0,122,98,97,114,95,118,105,100,101,111,95,114,101,113,117,101,115,116,95,105,111,109,111,100,101,0,0,0,0,0,0,0,122,98,97,114,95,118,105,100,101,111,95,114,101,113,117,101,115,116,95,105,110,116,101,114,102,97,99,101,0,0,0,0,122,98,97,114,95,118,105,100,101,111,95,111,112,101,110,0,122,98,97,114,95,118,105,100,101,111,95,110,101,120,116,95,105,109,97,103,101,0,0,0,122,98,97,114,95,118,105,100,101,111,95,105,110,105,116,0,122,98,97,114,95,118,105,100,101,111,95,103,101,116,95,102,100,0,0,0,0,0,0,0,122,98,97,114,95,118,105,100,101,111,95,101,110,97,98,108,101,0,0,0,0,0,0,0,122,98,97,114,95,115,99,97,110,95,105,109,97,103,101,0,122,98,97,114,95,112,114,111,99,101,115,115,111,114,95,117,115,101,114,95,119,97,105,116,0,0,0,0,0,0,0,0,122,98,97,114,95,112,114,111,99,101,115,115,111,114,95,115,101,116,95,97,99,116,105,118,101,0,0,0,0,0,0,0,122,98,97,114,95,112,114,111,99,101,115,115,111,114,95,105,110,105,116,0,0,0,0,0,122,98,97,114,95,112,114,111,99,101,115,115,111,114,95,100,101,115,116,114,111,121,0,0,122,98,97,114,95,110,101,103,111,116,105,97,116,101,95,102,111,114,109,97,116,0,0,0,122,98,97,114,95,105,109,97,103,101,95,119,114,105,116,101,0,0,0,0,0,0,0,0,122,98,97,114,95,105,109,97,103,101,95,102,114,101,101,95,100,97,116,97,0,0,0,0,118,105,100,101,111,95,105,110,105,116,95,105,109,97,103,101,115,0,0,0,0,0,0,0,118,97,108,105,100,97,116,101,95,99,104,101,99,107,115,117,109,0,0,0,0,0,0,0,114,101,109,111,118,101,95,112,111,108,108,0,0,0,0,0,113,114,95,104,97,110,100,108,101,114,0,0,0,0,0,0,113,114,95,99,111,100,101,95,100,97,116,97,95,108,105,115,116,95,101,120,116,114,97,99,116,95,116,101,120,116,0,0,112,114,111,99,95,115,108,101,101,112,0,0,0,0,0,0,112,114,111,99,95,112,111,108,108,95,105,110,112,117,116,115,0,0,0,0,0,0,0,0,112,114,111,99,95,107,105,99,107,95,104,97,110,100,108,101,114,0,0,0,0,0,0,0,112,111,115,116,112,114,111,99,101,115,115,95,99,0,0,0,112,111,115,116,112,114,111,99,101,115,115,0,0,0,0,0,109,97,105,110,0,0,0,0,105,115,98,110,49,48,95,99,97,108,99,95,99,104,101,99,107,115,117,109,0,0,0,0,101,114,114,95,99,111,112,121,0,0,0,0,0,0,0,0,101,114,114,95,99,108,101,97,110,117,112,0,0,0,0,0,101,114,114,95,99,108,101,97,110,117,112,0,0,0,0,0,101,114,114,95,99,108,101,97,110,117,112,0,0,0,0,0,101,114,114,95,99,97,112,116,117,114,101,0,0,0,0,0,101,114,114,95,99,97,112,116,117,114,101,0,0,0,0,0,101,114,114,95,99,97,112,116,117,114,101,0,0,0,0,0,101,114,114,95,99,97,112,116,117,114,101,0,0,0,0,0,101,114,114,95,99,97,112,116,117,114,101,0,0,0,0,0,101,114,114,95,99,97,112,116,117,114,101,0,0,0,0,0,101,114,114,95,99,97,112,116,117,114,101,0,0,0,0,0,101,97,110,95,118,101,114,105,102,121,95,99,104,101,99,107,115,117,109,0,0,0,0,0,100,117,109,112,95,115,116,97,116,115,0,0,0,0,0,0,100,101,99,111,100,101,95,108,111,0,0,0,0,0,0,0,100,101,99,111,100,101,52,0,99,111,110,118,101,114,116,95,121,117,118,112,95,116,111,95,114,103,98,0,0,0,0,0,99,111,110,118,101,114,116,95,121,117,118,95,116,111,95,114,103,98,0,0,0,0,0,0,99,111,110,118,101,114,116,95,121,117,118,95,112,97,99,107,0,0,0,0,0,0,0,0,99,111,110,118,101,114,116,95,117,118,112,95,97,112,112,101,110,100,0,0,0,0,0,0,99,111,110,118,101,114,116,95,114,103,98,95,116,111,95,121,117,118,112,0,0,0,0,0,99,111,110,118,101,114,116,95,114,103,98,95,116,111,95,121,117,118,0,0,0,0,0,0,99,111,110,118,101,114,116,95,114,103,98,95,114,101,115,97,109,112,108,101,0,0,0,0,99,111,100,101,51,57,95,100,101,99,111,100,101,57,0,0,97,100,100,95,112,111,108,108,0,0,0,0,0,0,0,0,95,122,98,97,114,95,119,105,110,100,111,119,95,97,116,116,97,99,104,0,0,0,0,0,95,122,98,97,114,95,118,105,100,101,111,95,114,101,99,121,99,108,101,95,115,104,97,100,111,119,0,0,0,0,0,0,95,122,98,97,114,95,118,105,100,101,111,95,114,101,99,121,99,108,101,95,105,109,97,103,101,0,0,0,0,0,0,0,95,122,98,97,114,95,118,105,100,101,111,95,111,112,101,110,0,0,0,0,0,0,0,0,95,122,98,97,114,95,114,101,102,99,110,116,0,0,0,0,95,122,98,97,114,95,114,101,102,99,110,116,0,0,0,0,95,122,98,97,114,95,114,101,102,99,110,116,0,0,0,0,95,122,98,97,114,95,114,101,102,99,110,116,0,0,0,0,95,122,98,97,114,95,114,101,102,99,110,116,0,0,0,0,95,122,98,97,114,95,114,101,102,99,110,116,0,0,0,0,95,122,98,97,114,95,114,101,102,99,110,116,0,0,0,0,95,122,98,97,114,95,113,114,95,100,101,115,116,114,111,121,0,0,0,0,0,0,0,0,95,122,98,97,114,95,113,114,95,100,101,99,111,100,101,0,95,122,98,97,114,95,112,114,111,99,101,115,115,111,114,95,119,97,105,116,0,0,0,0,95,122,98,97,114,95,112,114,111,99,101,115,115,111,114,95,117,110,108,111,99,107,0,0,95,122,98,97,114,95,112,114,111,99,101,115,115,111,114,95,115,101,116,95,115,105,122,101,0,0,0,0,0,0,0,0,95,122,98,97,114,95,112,114,111,99,101,115,115,111,114,95,111,112,101,110,0,0,0,0,95,122,98,97,114,95,112,114,111,99,101,115,115,111,114,95,105,110,118,97,108,105,100,97,116,101,0,0,0,0,0,0,95,122,98,97,114,95,112,114,111,99,101,115,115,111,114,95,105,110,105,116,0,0,0,0,95,122,98,97,114,95,112,114,111,99,101,115,115,111,114,95,99,108,111,115,101,0,0,0,95,122,98,97,114,95,112,114,111,99,101,115,115,95,105,109,97,103,101,0,0,0,0,0,95,122,98,97,114,95,105,109,97,103,101,95,115,99,97,110,110,101,114,95,114,101,99,121,99,108,101,95,115,121,109,115,0,0,0,0,0,0,0,0,95,122,98,97,114,95,105,109,97,103,101,95,115,99,97,110,110,101,114,95,97,108,108,111,99,95,115,121,109,0,0,0,95,122,98,97,114,95,101,114,114,111,114,95,115,116,114,105,110,103,0,0,0,0,0,0,95,122,98,97,114,95,101,114,114,111,114,95,115,112,101,119,0,0,0,0,0,0,0,0,95,122,98,97,114,95,100,101,99,111,100,101,95,99,111,100,101,51,57,0,0,0,0,0,95,122,98,97,114,95,100,101,99,111,100,101,95,99,111,100,101,49,50,56,0,0,0,0,95,122,98,97,114,95,98,101,115,116,95,102,111,114,109,97,116,0,0,0,0,0,0,0,7,10,13,17,10,16,22,28,26,26,26,22,24,22,22,26,24,18,22,15,26,18,22,24,30,24,20,24,18,16,24,28,28,28,28,30,24,20,18,18,26,24,28,24,30,26,28,28,26,28,30,30,22,20,24,20,18,26,16,20,30,28,24,22,26,28,26,30,28,30,30,0,0,4,19,55,15,28,37,12,51,39,59,62,10,24,22,41,31,44,7,65,47,33,67,67,48,32,67,67,67,67,67,67,67,67,67,67,67,67,67,67].concat([1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,32,36,37,42,43,45,46,47,58,0,0,0,16,18,20,22,24,26,28,20,22,24,24,26,28,28,22,24,24,26,26,28,28,24,24,26,26,26,28,28,24,26,26,26,28,28,0,0,0,0,0,0,148,124,0,0,188,133,0,0,153,154,0,0,211,164,0,0,246,187,0,0,98,199,0,0,71,216,0,0,13,230,0,0,40,249,0,0,120,11,1,0,93,20,1,0,23,42,1,0,50,53,1,0,166,73,1,0,131,86,1,0,201,104,1,0,236,119,1,0,196,142,1,0,225,145,1,0,171,175,1,0,142,176,1,0,26,204,1,0,63,211,1,0,117,237,1,0,80,242,1,0,213,9,2,0,240,22,2,0,186,40,2,0,159,55,2,0,11,75,2,0,46,84,2,0,100,106,2,0,65,117,2,0,105,140,2,0])
, "i8", ALLOC_NONE, Runtime.GLOBAL_BASE)
function runPostSets() {
}
if (!awaitingMemoryInitializer) runPostSets();
var tempDoublePtr = Runtime.alignMemory(allocate(12, "i8", ALLOC_STATIC), 8);
assert(tempDoublePtr % 8 == 0);
function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much
HEAP8[tempDoublePtr] = HEAP8[ptr];
HEAP8[tempDoublePtr+1] = HEAP8[ptr+1];
HEAP8[tempDoublePtr+2] = HEAP8[ptr+2];
HEAP8[tempDoublePtr+3] = HEAP8[ptr+3];
}
function copyTempDouble(ptr) {
HEAP8[tempDoublePtr] = HEAP8[ptr];
HEAP8[tempDoublePtr+1] = HEAP8[ptr+1];
HEAP8[tempDoublePtr+2] = HEAP8[ptr+2];
HEAP8[tempDoublePtr+3] = HEAP8[ptr+3];
HEAP8[tempDoublePtr+4] = HEAP8[ptr+4];
HEAP8[tempDoublePtr+5] = HEAP8[ptr+5];
HEAP8[tempDoublePtr+6] = HEAP8[ptr+6];
HEAP8[tempDoublePtr+7] = HEAP8[ptr+7];
}
function ___assert_func(filename, line, func, condition) {
throw 'Assertion failed: ' + (condition ? Pointer_stringify(condition) : 'unknown condition') + ', at: ' + [filename ? Pointer_stringify(filename) : 'unknown filename', line, func ? Pointer_stringify(func) : 'unknown function'] + ' at ' + new Error().stack;
}
function _js_get_width() { return Module['imageWidth']; }
function _js_get_height() { return Module['imageHeight']; }
function _js_read_image(dataPtr, len) {
var HEAPU8 = Module['HEAPU8'];
var array = HEAPU8.subarray(dataPtr, dataPtr + len);
Module['getImageData'](array);
return array.length;
}
function _js_output_result(symbol, addon, data) {
var Pointer_stringify = Module['Pointer_stringify'];
Module['outputResult'](Pointer_stringify(symbol),
Pointer_stringify(addon),
Pointer_stringify(data));
}
var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:35,EIDRM:36,ECHRNG:37,EL2NSYNC:38,EL3HLT:39,EL3RST:40,ELNRNG:41,EUNATCH:42,ENOCSI:43,EL2HLT:44,EDEADLK:45,ENOLCK:46,EBADE:50,EBADR:51,EXFULL:52,ENOANO:53,EBADRQC:54,EBADSLT:55,EDEADLOCK:56,EBFONT:57,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:74,ELBIN:75,EDOTDOT:76,EBADMSG:77,EFTYPE:79,ENOTUNIQ:80,EBADFD:81,EREMCHG:82,ELIBACC:83,ELIBBAD:84,ELIBSCN:85,ELIBMAX:86,ELIBEXEC:87,ENOSYS:88,ENMFILE:89,ENOTEMPTY:90,ENAMETOOLONG:91,ELOOP:92,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:106,EPROTOTYPE:107,ENOTSOCK:108,ENOPROTOOPT:109,ESHUTDOWN:110,ECONNREFUSED:111,EADDRINUSE:112,ECONNABORTED:113,ENETUNREACH:114,ENETDOWN:115,ETIMEDOUT:116,EHOSTDOWN:117,EHOSTUNREACH:118,EINPROGRESS:119,EALREADY:120,EDESTADDRREQ:121,EMSGSIZE:122,EPROTONOSUPPORT:123,ESOCKTNOSUPPORT:124,EADDRNOTAVAIL:125,ENETRESET:126,EISCONN:127,ENOTCONN:128,ETOOMANYREFS:129,EPROCLIM:130,EUSERS:131,EDQUOT:132,ESTALE:133,ENOTSUP:134,ENOMEDIUM:135,ENOSHARE:136,ECASECLASH:137,EILSEQ:138,EOVERFLOW:139,ECANCELED:140,ENOTRECOVERABLE:141,EOWNERDEAD:142,ESTRPIPE:143};
var ___errno_state=0;function ___setErrNo(value) {
// For convenient setting and returning of errno.
HEAP32[((___errno_state)>>2)]=value
return value;
}
var _stdin=allocate(1, "i32*", ALLOC_STATIC);
var _stdout=allocate(1, "i32*", ALLOC_STATIC);
var _stderr=allocate(1, "i32*", ALLOC_STATIC);
var __impure_ptr=allocate(1, "i32*", ALLOC_STATIC);var FS={currentPath:"/",nextInode:2,streams:[null],ignorePermissions:true,createFileHandle:function (stream, fd) {
if (typeof stream === 'undefined') {
stream = null;
}
if (!fd) {
if (stream && stream.socket) {
for (var i = 1; i < 64; i++) {
if (!FS.streams[i]) {
fd = i;
break;
}
}
assert(fd, 'ran out of low fds for sockets');
} else {
fd = Math.max(FS.streams.length, 64);
for (var i = FS.streams.length; i < fd; i++) {
FS.streams[i] = null; // Keep dense
}
}
}
// Close WebSocket first if we are about to replace the fd (i.e. dup2)
if (FS.streams[fd] && FS.streams[fd].socket && FS.streams[fd].socket.close) {
FS.streams[fd].socket.close();
}
FS.streams[fd] = stream;
return fd;
},removeFileHandle:function (fd) {
FS.streams[fd] = null;
},joinPath:function (parts, forceRelative) {
var ret = parts[0];
for (var i = 1; i < parts.length; i++) {
if (ret[ret.length-1] != '/') ret += '/';
ret += parts[i];
}
if (forceRelative && ret[0] == '/') ret = ret.substr(1);
return ret;
},absolutePath:function (relative, base) {
if (typeof relative !== 'string') return null;
if (base === undefined) base = FS.currentPath;