forked from jeffpar/pcjs.v1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pcx86-dbg.js
916 lines (916 loc) · 368 KB
/
pcx86-dbg.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
(function(){/*
https://www.pcjs.org/modules/shared/lib/diskapi.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/dumpapi.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/reportapi.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/userapi.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/keys.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/strlib.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/weblib.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/interrupts.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/messages.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/debugger.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/state.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/embed.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/defines.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/usrlib.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/component.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/defines.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/panel.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/bus.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/memory.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/cpu.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86seg.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86cpu.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86fpu.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86func.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86help.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86mods.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86ops.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/x86op0f.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/chipset.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/rom.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/ram.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/keyboard.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/video.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/parallel.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/serial.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/mouse.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/disk.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/fdc.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/hdc.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/debugger.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/pcx86/lib/computer.js (C) Jeff Parsons 2012-2017
https://www.pcjs.org/modules/shared/lib/save.js (C) Jeff Parsons 2012-2017
*/
var l,aa,ba="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ca;if("function"==typeof Object.setPrototypeOf)ca=Object.setPrototypeOf;else{var da;a:{var ea={Hd:!0},fa={};try{fa.__proto__=ea;da=fa.Hd;break a}catch(a){}da=!1}ca=da?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ha=ca;
function ia(a,b){a.prototype=ba(b.prototype);a.prototype.constructor=a;if(ha)ha(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.tq=b.prototype}
var ja="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ka="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function la(a,b){if(b){var c=ka;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ja(c,a,{configurable:!0,writable:!0,value:b})}}
la("Math.trunc",function(a){return a?a:function(a){a=Number(a);if(isNaN(a)||Infinity===a||-Infinity===a||0===a)return a;var b=Math.floor(Math.abs(a));return 0>a?-b:b}});la("Math.sign",function(a){return a?a:function(a){a=Number(a);return 0===a||isNaN(a)?a:0<a?1:-1}});
var ma={163840:[40,1,8,,254],184320:[40,1,9,,252],327680:[40,2,8,,255],368640:[40,2,9,,253],737280:[80,2,9,,249],1228800:[80,2,15,,249],1474560:[80,2,18,,240],2949120:[80,2,36,,240],10653696:[306,4,17],21411840:[615,4,17],256256:[77,1,26,128],2494464:[203,2,12,512],5242880:[256,2,40,256],10485760:[512,2,40,256]},n={Tp:0,fl:1,gl:2,hl:3,il:4,jl:5,kl:6,ll:7,ml:8,Lg:9,Mg:10,nl:11,ol:12,Ng:13,pl:14,ql:15,rl:16,sl:17,tl:18,ul:19,vl:20,wl:21,xl:22,yl:23,zl:24,Al:25,wi:26,Wp:27," ":32,"!":33,'"':34,"#":35,
$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ee:65,ui:66,vi:67,xi:68,E:69,yi:70,zi:71,Ai:72,Bi:73,Ci:74,Di:75,Ei:76,Fi:77,Gi:78,Hi:79,Ii:80,Q:81,Ji:82,Ki:83,Li:84,Mi:85,Ni:86,Oi:87,Pi:88,Qi:89,$f:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Hd:97,Ol:98,Ql:99,d:100,e:101,Zl:102,$l:103,am:104,bm:105,xn:106,k:107,yn:108,En:109,n:110,On:111,p:112,q:113,r:114,sp:115,t:116,
wp:117,xp:118,yp:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126,Vp:127},na={};na[173]=n["-"];na[186]=n[";"];na[187]=n["="];na[189]=n["-"];na[188]=n[","];na[190]=n["."];na[191]=n["/"];na[192]=n["`"];na[219]=n["["];na[220]=n["\\"];na[221]=n["]"];na[222]=n["'"];var oa={};oa[n["1"]]=n["!"];oa[n["2"]]=n["@"];oa[n["3"]]=n["#"];oa[n["4"]]=n.$;oa[n["5"]]=n["%"];oa[n["6"]]=n["^"];oa[n["7"]]=n["&"];oa[n["8"]]=n["*"];oa[n["9"]]=n["("];oa[n["0"]]=n[")"];oa[186]=n[":"];oa[187]=n["+"];oa[188]=n["<"];
oa[189]=n._;oa[190]=n[">"];oa[191]=n["?"];oa[192]=n["~"];oa[219]=n["{"];oa[220]=n["|"];oa[221]=n["}"];oa[222]=n['"'];oa[173]=n._;oa[61]=n["+"];oa[59]=n[":"];
function qa(a,b){if(a){b||(b=10);var c,d=0<a.indexOf(",");d&&(a=a.replace(/,/g,""));var e=c=a.charAt(0);"#"==c?(b=8,c=""):"$"==c&&(b=16,c="");e!=c?a=a.substr(1):(e=c=a.substr(0,2),"0b"==c&&d||"^B"==c?(b=2,c=""):"0o"==c||"^O"==c?(b=8,c=""):"^D"==c?(b=10,c=""):"0x"==c&&(b=16,c=""),e!=c&&(a=a.substr(2)));e=c=a.slice(-1);"Y"==c||"y"==c?(b=2,c=""):"."==c?(b=10,c=""):"H"==c||"h"==c?(b=16,c=""):"K"==c?c="000":"M"==c?c="000000":"G"==c&&(c="000000000");e!=c&&(a=a.slice(0,-1)+c);var f;e=0;10>=b&&(c=a.match(/(-?[0-9]+)B([0-9]*)/))&&
(a=c[1],e=35-((c[2]||35)&255));c=a;if(((d=b)&&10!=d?16==d?null!==c.match(/^-?[0-9a-f]+$/i):8==d?null!==c.match(/^-?[0-7]+$/):2==d&&null!==c.match(/^-?[01]+$/):null!==c.match(/^-?[0-9]+$/))&&!isNaN(f=parseInt(a,b))){e&&(0>f&&(f+=Math.pow(2,36)),f=0<e?f*Math.pow(2,e):Math.trunc(f/Math.pow(2,-e)));var g=f}}return g}
function ra(a,b,c,d,e){e=void 0===e?0:e;var f="";isNaN(a)?a=null:null!=a&&(0>a&&-1<a&&(a=-1),0>a&&(a+=Math.pow(b,c)),a>=Math.pow(b,c)&&(c=Math.ceil(Math.log(a)/Math.log(b))));for(var g=e||-1;0<c--;){g||(f=","+f,g=e);if(null==a)f="?"+f;else{var h=a%b;h+=0<=h&&9>=h?48:55;f=String.fromCharCode(h)+f;a=Math.trunc(a/b)}g--}return(void 0===d?"":d)+f}function ta(a,b,c){b?36<b&&(b=36):(b=Math.abs(a),b=255>=b?8:262143>=b?18:36);return ra(a,2,b,"",c)}
function ua(a,b,c){b?12<b&&(b=12):(b=Math.abs(a),b=262143>=b?6:16777215>=b?8:12);return ra(a,8,b,c?"0o":"")}function p(a,b,c){b?9<b&&(b=9):(b=Math.abs(a),b=65535>=b?4:4294967295>=b?8:9);return ra(a,16,b,c?"0x":"")}function va(a){return p(a,2,!0)}function wa(a){return p(a,4,!0)}function xa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0<d&&(c=c.substr(0,d));b&&(d=c.lastIndexOf("."),0<d&&(c=c.substring(0,d)));return c}
function ya(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}function za(a,b){return-1!==a.indexOf(b,a.length-b.length)}function Aa(a){return a.replace(/[&<>"']/g,function(a){return Ba[a]})}function Ca(a,b,c){return c?(" "+a).slice(-b):(a+" ").slice(0,b)}function Da(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}
function Ea(a){var b;a!=Fa&&a!=Ga&&(b=Ha[a]);return b=b?"<"+b+">":String.fromCharCode(a)}var Ba={"&":"&","<":"<",">":">",'"':""","'":"'"},Ha={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BS",9:"TAB",10:"LF",11:"VT",12:"FF",13:"CR",14:"SO",15:"SI",16:"DLE",17:"XON",18:"DC2",19:"XOFF",20:"DC4",21:"NAK",22:"SYN",23:"ETB",24:"CAN",25:"EM",26:"SUB",27:"ESC",28:"FS",29:"GS",30:"RS",31:"US",127:"DEL"},Ga=10,Fa=13;
function Ia(a,b,c){var d=0,e=a.length,f=0;for(c||(c=function(a,b){return a>b?1:a<b?-1:0});d<e;){var g=d+e>>1;var h=c(b,a[g]);0<h?d=g+1:(e=g,f=!h)}return f?d:~d}
function Ja(a){var b,c="";b||(b=new Date);for(var d=b.getHours(),e=b.getDate(),f=b.getMonth()+1,g=0;g<a.length;g++){var h;switch(h=a.charAt(g)){case "a":c+=12>d?"am":"pm";break;case "d":c+=("0"+e).slice(-2);break;case "D":c+=Ka[b.getDay()].substr(0,3);break;case "F":c+=La[f-1];break;case "g":c+=d?12<d?d-12:d:12;break;case "h":c+=d;break;case "H":c+=("0"+d).slice(-2);break;case "i":c+=("0"+b.getMinutes()).slice(-2);break;case "j":c+=e;break;case "l":c+=Ka[b.getDay()];break;case "m":c+=("0"+f).slice(-2);
break;case "M":c+=La[f-1].substr(0,3);break;case "n":c+=f;break;case "s":c+=("0"+b.getSeconds()).slice(-2);break;case "y":c+=(""+b.getFullYear()).slice(-2);break;case "Y":c+=b.getFullYear();break;default:c+=h}}return c}function Ma(a,b){if(Array.prototype.indexOf)return a.indexOf(b,c);var c=c||0;0>c&&(c+=a.length);0>c&&(c=0);for(var d=a.length;c<d;c++)if(c in a&&a[c]===b)return c;return-1}
var Ka="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),La="January February March April May June July August September October November December".split(" "),Na=[31,28,31,30,31,30,31,31,30,31,30,31],Oa=Date.now||function(){return+new Date};
function Pa(a,b,c,d,e){c=void 0===c?!1:c;var f=0,g=null,h=null;if("object"==typeof resources&&(g=resources[a]))return d&&d(a,g,f),[g,f];if(c&&"function"==typeof resources)return resources(a,function(b,c){d&&d(a,b,c)}),h;var k=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");c&&(k.onreadystatechange=function(){4!==k.readyState?e&&e(1):(g=k.responseText,200==k.status||!k.status&&g.length&&"file:"==(window?window.location.protocol:"file:")||(f=k.status||-1),
e&&e(2),d&&d(a,g,f))});e&&e(0);if(b&&"object"==typeof b){var m="",q;for(q in b)b.hasOwnProperty(q)&&(m&&(m+="&"),m+=q+"="+encodeURIComponent(b[q]));m=m.replace(/%20/g,"+");k.open("POST",a,c);k.setRequestHeader("Content-type","application/x-www-form-urlencoded");k.send(m)}else k.open("GET",a,c),"bytes"==b&&k.overrideMimeType("text/plain; charset=x-user-defined"),k.send();c||(g=k.responseText,200!=k.status&&(f=k.status||-1),d&&d(a,g,f),h=[g,f]);return h}
function Qa(){return"http://"+(window?window.location.host:"www.pcjs.org")}function Ra(){return window?window.navigator.userAgent:""}function Ta(){if(null==Ua){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}Ua=a}return Ua}function Va(a){if(window)try{var b=window.localStorage.getItem(a)}catch(c){}return b}
function Wa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}function Xa(a){if(window){var b=Ra();return"iOS"==a&&!!b.match(/(iPod|iPhone|iPad)/)&&!!b.match(/AppleWebKit/)||"MSIE"==a&&!!b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)}return!1}function Ya(a,b,c){if(a)for(var d=0;d<Za.length;d++){var e=Za[d];if(c){if(e+=c,b+e in a)return e}else if(e=e?e+b[0].toUpperCase():b[0],e+=b.substr(1),e in a)return e}return null}
function $a(a){if(!ab){var b,c={};if(window){b||(b=window.location.search.substr(1));for(var d,e=/\+/g,f=/([^&=]+)=?([^&]*)/g;d=f.exec(b);)c[decodeURIComponent(d[1].replace(e," "))]=decodeURIComponent(d[2].replace(e," "))}ab=c}return ab[a]||ab[a.toLowerCase()]}
function bb(a,b,c,d){var e=null;b="data:application/"+b+(c?";base64":"")+",";b=Xa("Firefox")?b+(c?a:encodeURIComponent(a)):b+(c?a:encodeURI(a));d&&(e=document.createElement("a"),"string"!=typeof e.download&&(e=null));e?(e.href=b,e.download=d,document.body.appendChild(e),e.click(),document.body.removeChild(e),a="Check your Downloads folder for "+d+"."):(window.open(b),a="Check your browser for a new window/tab containing the requested data"+(d?" ("+d+")":"")+".");return a}
function cb(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}function db(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,f=!1;a.onmousedown=function(){f||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);f=!0}}function eb(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}
function gb(a){hb.init.push(a)}function lb(a){if(mb)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){nb(""+("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to [email protected]. Thanks."))}}function ob(a){!mb&&a?(mb=!0,pb&&qb("init"),rb&&qb("show")):mb=a}function qb(a){hb[a]&&lb(hb[a])}var ab=null,hb={init:[],show:[],exit:[]},Za=["","moz","ms","webkit"],pb=!1,rb=!1,mb=!0,Ua=null;eb("onload",function(){pb=!0;lb(hb.init)});eb("onpageshow",function(){rb=!0;lb(hb.show)});
eb(Xa("iOS")?"onpagehide":Xa("Opera")?"onunload":"onbeforeunload",function(){lb(hb.exit)});function sb(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id||"";this.name=b.name;this.zj=b.comment;this.Ok=b;this.exports={};this.ma=this.bindings={};a=this.id.indexOf(".");0>a?this.ze=this.id:(this.de=this.id.substr(0,a),this.ze=this.id.substr(a+1));this.aa={ready:!1,nf:!1,ah:!1,qf:!1,ac:!1,xe:!1,error:!1};this.mg=null;this.aa.error=!1;this.dc=c||0;this.ca=this.G=this.oa=this.na=null;tb.push(this)}
function ub(a,b,c){vb[a]&&b&&(vb[a][b]=c)}function nb(a){window&&window.alert(a)}function wb(a){var b=!1;window&&(b=window.confirm(a));return b}function xb(a,b){a.value+=b;b=a.value;8192<b.length&&(a.value=b.substr(b.length-4096));a.scrollTop=a.scrollHeight}function yb(a,b,c){var d=a.value,e=d.lastIndexOf(b);0>e?d+=b+"\n":d=d.substr(0,e)+c+d.substr(e+b.length);8192<d.length&&(d=d.substr(d.length-4096));a.value=d;a.scrollTop=a.scrollHeight}
function zb(a,b,c){var d;b&&(void 0===d&&(d="Panel"),(d=Ab(d,a.id))&&(b=d.ma[b])&&a.Fb(null,c,b))}function Bb(a,b){b=Cb(b.parentNode,"pcx86-control");for(var c=0;c<b.length;c++)for(var d=b[c].childNodes,e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){var g=f.getAttribute("class");if(g)for(var h=g.split(" "),k=0;k<h.length;k++)switch(g=h[k],g){case "pcx86-binding":(g=Db(f))&&g.binding&&a.Fb(g.type,g.binding,f,g.value),k=h.length}}}}
function Eb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<tb.length;b++){var d=tb[b];a&&d.id.indexOf(a)||c.push(d)}return c}function Fb(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<tb.length;c++)if(tb[c].id===a)return tb[c]}return null}
function Ab(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<tb.length;d++)if(c)c==tb[d]&&(c=null);else if(!(a!=tb[d].type||b&&tb[d].id.indexOf(b)))return tb[d]}return null}function Db(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("("+a+")")}catch(c){nb(c.message+" ("+a+")")}return b}
function Cb(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
function Gb(a,b){var c=!1;a+=".machine";if(!b)delete Hb[a],c=!0;else if("string"==typeof b&&!Hb[a]){c=!0;for(var d=Hb,e=a,f=b.length,g=[],h=[],k="",m=null,q=0;q<f;q++){var v=b[q];if('"'==v||"'"==v)m&&v!=m?k+=v:(m?m=null:m=v,k&&(h.push(k),k=""));else{if(!m){if("\r"==v||"\n"==v)v=";";if(" "==v||"\t"==v||";"==v){k&&(h.push(k),k="");";"==v&&h.length&&(g.push(h),h=[]);continue}}k+=v}}k&&h.push(k);h.length&&g.push(h);d[e]=g;Ib(a)||(c=!1)}return c}
function Ib(a){for(var b=!0,c=Hb[a];c&&c.length;){var d=c.splice(0,1)[0],e=d[0],f=null;0<=Jb.indexOf(e)&&(f=function(){return function(){Ib(a)}}());var g=Lb[e];if(g)if(!f)b=g(d[1],d[2],d[3]);else{if(!g(f,d[1],d[2],d[3]))break}else{b=!1;var h=Ab(d[1],a);if(h)if(g=Nb[e])b=g(h,d[2],d[3]);else{var k=h.exports;if(k&&(g=k[e]))if(b=!0,!f)b=g.call(h,d[2],d[3]);else if(!g.call(h,f,d[2],d[3]))break}}if(!b){nb("Script error: '"+e+(g?" failed":" unrecognized"));break}}c&&!c.length&&delete Hb[a];return b}l=sb.prototype;
l.toString=function(){return this.name?this.name:this.id||this.type};
l.Fb=function(a,b,c){switch(b){case "clear":return this.ma[b]||(this.ma[b]=c,c.onclick=function(a){return function(){a.ma.print&&(a.ma.print.value="")}}(this)),!0;case "print":return this.ma[b]||(this.ma[b]=c,this.Da=function(a){this.O(a,this.type);return!0},c.value="",this.print=function(a){return function(b){xb(a,b)}}(c),this.O=function(a,b){return function(a,c){a||(a="");c!=Ob||"..."!=a.slice(-3)?(c&&(a=c+": "+a),xb(b,a+"\n")):yb(b,a,a+".")}}(this,c)),!0;default:return!1}};l.log=function(){};
l.print=function(){};l.O=function(){};l.status=function(a){this.O(this.type+": "+a)};l.Da=function(a,b,c){if(!b){var d=Ab("Computer",this.id);if(d&&d.aa.xe)return console.log("ignoring notice during unload: "+a),!1}c=c||this.type;b||nb((c?c+": ":"")+a);return!0};function Pb(a,b){a.aa.error=!0;a.Da(b)}function Qb(a){return a.aa.error?(a.O(a.toString()+" error"),!0):!1}function Rb(a,b){b&&(a.aa.ready?b():a.mg=b);return a.aa.ready}
function Sb(a,b){a.aa.error||(a.aa.ready=!1!==b,a.aa.ready&&(b=a.mg,a.mg=null,b&&b()))}function Ub(a,b){a.aa.nf&&(b?a.aa.ah=!0:void 0===b&&a.O(a.toString()+" busy"));return a.aa.nf}function Vb(a,b){if(a.aa.ah)return a.aa.nf=!1,a.aa.ah=!1;if(a.aa.error)return a.O(a.toString()+" error"),!1;a.aa.nf=b;return a.aa.nf}l.$b=function(){return this.aa.ac=!0};l.Zb=function(a,b){b&&(this.aa.ac=!1);return!0};
function r(a,b){if(a.ca){a===a.ca?b|=0:b=b||a.dc;var c=a.ca.dc&b;return!!b&&c===b||!!(c&a.ca.Pl)}return!1}function Wb(a,b,c,d){a.ca&&(!0===c||r(a,c|0))&&a.ca.message(b,d)}function t(a,b,c,d,e,f,g){a.ca&&(!0===g?g=0:null==g&&(g=a.dc),Xb(a.ca,a,b,c,d,e,f,g))}var Ob="progress";window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]),window.PCjs.Commands||(window.PCjs.Commands={}));
var vb=window?window.PCjs.Machines:{},tb=window?window.PCjs.Components:[],Hb=window?window.PCjs.Commands:{},Jb=["hold","sleep","wait"],Lb={alert:function(a){nb(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},Nb={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});
var Yb="undefined"!==typeof ArrayBuffer,Zb={xg:4,xc:5,yd:6,Qc:7,Rc:8,Za:9,Wb:11,Xb:12,se:4,Ij:60,Jj:83,mc:3,Nb:9,Bc:16,wg:1,Nj:19,Pj:28,Rj:16,Qj:21,Oj:37,Lj:2,Bh:9,Mj:5,Kj:33,Dh:10,Ch:8,Bf:3,Af:15,ek:51,fk:1,gk:2,hk:4,dk:32,Eh:15,jk:15,Ta:16,Ua:4,lk:11,kk:18,ik:24,Yb:4,mk:2,We:16,nk:17,Jh:18,pk:19,Ih:5,Kh:6,uk:2,tk:8,rk:9,sk:10,qk:10,Lh:10,Mh:10,Tj:80,Vj:144,Sj:86,Uj:154,Xj:101,Zj:165,Wj:107,Yj:171,wk:70,yk:113,vk:76,xk:124,ak:80,ck:128,$j:86,bk:134,Df:3,Cf:16,Rh:10,Qh:8,zk:51,nc:8,Ak:17,Bk:36,Ic:11,
Ck:16,te:10,$c:2,yh:18,zh:7,Ah:15,Fh:12,Gh:7,Hh:11,Nh:18,Oh:7,Ph:15,Sh:15,Th:7,Uh:13,Yh:11,Zh:7,$h:8,Dk:8,Gk:12,Ek:18,Fk:17,Hk:15,Wh:8,Vh:20,Xh:2,ci:3,Ef:9,bi:5,ai:11,ei:4,di:17,Ik:11},$b={xg:0,xc:0,yd:0,Qc:0,Rc:0,Za:0,Wb:1,Xb:1,se:3,Ij:14,Jj:16,mc:2,Nb:7,Bc:7,wg:0,Nj:7,Pj:13,Rj:7,Qj:11,Oj:16,Lj:3,Bh:6,Mj:2,Kj:13,Dh:5,Ch:5,Bf:2,Af:7,ek:23,fk:0,gk:1,hk:3,dk:17,Eh:7,jk:11,Ta:7,Ua:3,lk:7,kk:11,ik:15,Yb:2,mk:3,We:7,nk:8,Jh:8,pk:8,Ih:4,Kh:4,uk:2,tk:3,rk:5,sk:2,qk:3,Lh:5,Mh:3,Tj:14,Vj:22,Sj:17,Uj:25,Xj:17,
Zj:25,Wj:20,Yj:28,wk:13,yk:21,vk:16,xk:24,ak:13,ck:21,$j:16,bk:24,Df:2,Cf:7,Rh:5,Qh:5,zk:19,nc:5,Ak:5,Bk:17,Ic:3,Ck:5,te:3,$c:0,yh:8,zh:5,Ah:9,Fh:5,Gh:5,Hh:4,Nh:5,Oh:5,Ph:4,Sh:7,Th:5,Uh:8,Yh:3,Zh:4,$h:3,Dk:11,Gk:11,Ek:15,Fk:15,Hk:7,Wh:5,Vh:8,Xh:0,ci:2,Ef:6,bi:3,ai:6,ei:3,di:5,Ik:5},ac={19:{0:"disk reset",1:"get status",2:"read drive @DL (@CH:@DH:@CL,@AL) into @ES:@BX",3:"write drive @DL (@CH:@DH:@CL,@AL) from @ES:@BX",4:"verify drive @DL (@CH:@DH:@CL,@AL)",5:"format drive @DL using @ES:@BX",8:"read drive @DL parameters",
21:"get drive @DL DASD type",22:"get drive @DL change line status",23:"set drive @DL DASD type",24:"set drive @DL media type"},21:{128:"open device",129:"close device",130:"program termination",131:"wait @CX:@DXus for event",132:"joystick support",133:"SYSREQ pressed",134:"wait @CX:@DXus",135:"move block (@CX words)",136:"get extended memory size",137:"processor to virtual mode",144:"device busy loop",145:"interrupt complete flag set"},33:{0:"terminate program",1:"read character (AL) from stdin with echo",
2:"write character #@DL to stdout",3:"read character (AL) from stdaux",4:"write character #@DL to stdaux",5:"write character #@DL to stdprn",6:"direct console output (input if @DL=FF)",7:"direct console input without echo",8:"read character (AL) from stdin without echo",9:"write string $@DS:@DX to stdout",10:"buffered input (DS:DX)",11:"get stdin status",12:"flush buffer and read stdin",13:"disk reset",14:"select default drive @DL",15:"open file using FCB ^@DS:@DX",16:"close file using FCB ^@DS:@DX",
17:"find first matching file using FCB ^@DS:@DX",18:"find next matching file using FCB ^@DS:@DX",19:"delete file using FCB ^@DS:@DX",20:"sequential read from file using FCB ^@DS:@DX",21:"sequential write to file using FCB ^@DS:@DX",22:"create or truncate file using FCB ^@DS:@DX",23:"rename file using FCB ^@DS:@DX",25:"get current default drive (AL)",26:"set disk transfer area (DTA=@DS:@DX)",27:"get allocation information for default drive",28:"get allocation information for specific drive @DL",31:"get drive parameter block for default drive",
33:"read random record from file using FCB ^@DS:@DX",34:"write random record to file using FCB ^@DS:@DX",35:"get file size using FCB ^@DS:@DX",36:"set random record number for FCB ^@DS:@DX",37:"set address @DS:@DX of interrupt vector @AL",38:"create new PSP at segment @DX",39:"random block read from file using FCB ^@DS:@DX",40:"random block write to file using FCB ^@DS:@DX",41:"parse filename $@DS:@SI into FCB @ES:@DI using @AL",42:"get system date (year=CX, mon=DH, day=DL)",43:"set system date (year=@CX, mon=@DH, day=@DL)",
44:"get system time (hour=CH, min=CL, sec=DH, 100ths=DL)",45:"set system time (hour=@CH, min=@CL, sec=@DH, 100ths=@DL)",46:"set verify flag @AL",47:"get disk transfer area (DTA=ES:BX)",48:"get DOS version (AL=major, AH=minor)",49:"terminate and stay resident",50:"get drive parameter block (DPB=DS:BX) for drive @DL",51:"extended break check",52:"get address (ES:BX) of InDOS flag",53:"get address (ES:BX) of interrupt vector @AL",54:"get free disk space of drive @DL",55:"get(0)/set(1) switch character @DL (@AL)",
56:"get country-specific information",57:"create subdirectory $@DS:@DX",58:"remove subdirectory $@DS:@DX",59:"set current directory $@DS:@DX",60:"create or truncate file $@DS:@DX with attributes @CX",61:"open file $@DS:@DX with mode @AL",62:"close file @BX",63:"read @CX bytes from file @BX into buffer @DS:@DX",64:"write @CX bytes to file @BX from buffer @DS:@DX",65:"delete file $@DS:@DX",66:"set position @CX:@DX of file @BX relative to @AL",67:"get(0)/set(1) attributes @CX of file $@DS:@DX (@AL)",
68:"get device information (IOCTL)",69:"duplicate file handle @BX",70:"force file handle @CX to duplicate file handle @BX",71:"get current directory (DS:SI) for drive @DL",72:"allocate memory segment with @BX paragraphs",73:"free memory segment @ES",74:"resize memory segment @ES to @BX paragraphs",75:"load program $@DS:@DX using parameter block @ES:@BX",76:"terminate with return code @AL",77:"get return code (AL)",78:"find first matching file $@DS:@DX with attributes @CX",79:"find next matching file",
80:"set current PSP @BX",81:"get current PSP (bx)",82:"get system variables (ES:BX)",83:"translate BPB @DS:@SI to DPB (ES:BP)",84:"get verify flag (AL)",85:"create child PSP at segment @DX",86:"rename file $@DS:@DX to $@ES:@DI",87:"get(0)/set(1) file @BX date @DX and time @CX (@AL)",88:"get(0)/set(1) memory allocation strategy (@AL)",89:"get extended error information",90:"create temporary file $@DS:@DX with attributes @CX",91:"create file $@DS:@DX with attributes @CX",92:"lock(0)/unlock(1) file @BX region @CX:@DX length @SI:@DI (@AL)",
93:"critical error information (@AL)",96:"get fully-qualified filename from $@DS:@SI",99:"get lead byte table (@AL)",108:"extended open file $@DS:@SI"},65:{79:"check debugger loaded"}},bc={cpu:1,seg:2,desc:4,tss:8,"int":16,fault:32,bus:64,mem:128,port:256,dma:512,pic:1024,timer:2048,cmos:4096,rtc:8192,8042:16384,chipset:32768,keyboard:65536,key:131072,video:262144,fdc:524288,hdc:1048576,disk:2097152,parallel:4194304,serial:8388608,mouse:16777216,speaker:33554432,computer:67108864,dos:134217728,data:268435456,
log:536870912,warn:1073741824,halt:-2147483648};function cc(a){sb.call(this,"Panel",a);this.pi=this.A=this.B=this.H=-1}ia(cc,sb);l=cc.prototype;l.tc=function(a,b,c,d){this.na=a;this.oa=b;this.G=c;this.ca=d;this.C=ec(a,"Keyboard")};l.Fb=function(a,b,c,d){return this.na&&this.na.Fb(a,b,c,d)||this.G&&this.G.Fb(a,b,c,d)||this.C&&this.C.Fb(a,b,c,d)||this.ca&&this.ca.Fb(a,b,c,d)?!0:sb.prototype.Fb.call(this,a,b,c,d)};l.$b=function(a,b){b||fc();return!0};l.Zb=function(){return!0};
l.Xd=function(a,b){a.button||(this.H=b?0:-1,gc(this,a,b))};l.tf=function(a){gc(this,a)};
function gc(a,b,c){var d=hc/null.offsetWidth,e=ic/null.offsetHeight,f=null.getBoundingClientRect();d=(b.clientX-f.left)*d|0;b=(b.clientY-f.top)*e|0;null==c&&(a.H||(a.H=Math.abs(a.A-d)>Math.abs(a.B-b)?1:2),1==a.H?b=a.B:2==a.H&&(d=a.A));a.A=d;a.B=b;if(0<=d&&d<hc&&0<=b&&b<ic){a:{c=d;if(c<jc&&a.F&&a.F.Ti)for(f=0;f<a.F.Ti.length;f++)if(e=a.F.Ti[f],e.contains(c,b)){c-=e.x;b-=e.y;f=a.F.mq[f];d=kc.Nn;var g=(a.F.lq[f.qq]&d.Fn)>>d.shift;d=g*a.oa.B;f=(g+f.oq)*a.oa.B-1;0<b&&(d+=e.pq*(b-1)*a.ha);d+=c*a.ha;d|=
0;d>f&&(d=f);c=d;break a}c=-1}if(-1!==c&&(c&=-16,c!=a.N)){b=c;if(a.context&&a.K&&a.L){e=lc-mc;f=a.K.width;a.L.fillStyle=nc;a.L.fillRect(0,e,f,mc);d=e+oc;g=a.K;var h=a.L,k,m=null.style.color,q=a.ka=10;a.D=q;a.J=d;a.ea=a.ba=oc;k||(k=a.U||a.ba+"px "+pc);a.Z=a.U=k;g&&(a.P=g);h&&(a.I=h,a.V=m||"white");a.M=a.P.width/24|0;if(null==b)qc(a,"Mouse over memory to dump");else for(qc(a,p(b,8,!0),null,0,1),k=1;16>=k;k++){d="";for(g=1;8>=g;g++)h=a.oa,m=b++,h=h.Z[(m&h.C)>>>h.A].ae(m&h.D,m),qc(a,p(h,2),null,1),d+=
32<=h&&128>h?String.fromCharCode(h):".";qc(a,d,null,0,1)}a.context.drawImage(a.K,0,e,f,mc,a.ra,a.ta,a.la,a.qa)}a.N=c}}}function qc(a,b,c,d,e){a.I.font=a.Z;a.I.fillStyle=a.V;a.I.fillText(b,a.D,a.J);a.D+=a.M;null!=c&&(16!=a.pa?b=c.toString():(b=8>a.fa?"0x":"",b+=p(c,a.fa)),a.I.fillText(b,a.D,a.J),a.D+=a.M);d&&(a.D+=a.M*d);e&&(a.D=a.ka,a.J+=(a.ea+2)*(e||1))}
function fc(){for(var a=!1,b=Cb(document,"pcx86","panel"),c=0;c<b.length;c++){var d=b[c],e=Db(d),f=Fb(e.id);f||(a=!0,f=new cc(e));Bb(f,d);a&&Sb(f)}}var hc=1280,ic=720,oc=18,pc="Monaco, Lucida Console, Courier New",jc=3*hc>>2,lc=ic,nc="black",mc=ic>>1;gb(fc);
function rc(a,b,c){sb.call(this,"Bus",a);this.G=b;this.ca=c;this.I=a.busWidth||20;this.ba=Math.pow(2,this.I);this.N=this.C=this.ba-1|0;this.A=32==this.I||20>=this.I?12:24>=this.I?14:15;this.B=1<<this.A;this.ea=this.B>>2;this.D=this.B-1;this.M=this.ba/this.B|0;this.P=this.M-1;this.F=[];this.H=[];this.K=this.L=!1;this.V=[];this.U=[];a=new w;sc(a,this.ca);this.Z=Array(this.M);for(b=0;b<this.M;b++)this.Z[b]=a;a=this.G;b=this.Z;c=this.A;a.sc=a.Z=b;a.lb=c;a.Pg=1<<a.lb;a.Gb=a.Pg-1;a.Sf=b.length;a.ef=a.Sf-
1;a=this.G;a.ff=a.cd=this.C;Sb(this)}ia(rc,sb);l=rc.prototype;l.reset=function(){tc(this,!0)};l.$b=function(a,b){b||this.reset();return!0};
function uc(a,b,c,d,e){for(var f=b,g=c,h=f>>>a.A;0<g&&h<a.Z.length;){var k=a.Z[h],m=h*a.B,q=a.B-(f-m);q>g&&(q=g);if(k&&k.size){if(k.type==d&&k.controller==e){if(f+g<=k.za)return k.ye+=k.za-f,k.za=f,!0;if(f>=k.za+k.ye){q=k.size-(f-m);q>g&&(q=g);k.ye=f-k.za+q;f=m+a.B;g-=q;h++;continue}}return vc(a,xc,f,g)}f=new w(f,q,a.B,d,e);sc(f,a.ca,k);a.Z[h++]=f;f=m+a.B;g-=q}return 0>=g?(yc(a.G),a.G.aa.Xa||(e=c/1024|0,a.status((e?e+"Kb ":c+" bytes ")+zc[d]+" at "+p(b))),!0):vc(a,Ac,b,c)}
function tc(a,b){32==a.I?b?a.J&&(Cc(a,1048576,1048576,a.J),a.J=null):a.J||(a.J=Dc(a,1048576,1048576),Cc(a,1048576,1048576,Dc(a,0,1048576))):20<a.I&&(b=a.C&-1048577|(b?1048576:0),b!=a.C&&(a.C=b,a.G&&(a=a.G,a.ff=a.cd=b)))}l.Ig=function(a,b,c,d){if(!(a&this.D||!b||b&this.D)){for(var e=a>>>this.A;0<b;){var f=this.Z[e];if(!f.controller)return vc(this,Ec,a,b,d);Fc(f,c,!0);b-=this.B;e++}return!0}return vc(this,Gc,a,b)};
function Hc(a,b,c){if(!(b&a.D||!c||c&a.D)){for(var d=b>>>a.A;0<c;){var e=a.Z[d];b=new w(b);sc(b,a.ca,e);a.Z[d++]=b;b=d*a.B;c-=a.B}yc(a.G);return!0}return vc(a,Ic,b,c)}function Dc(a,b,c){var d=[];for(b>>>=a.A;0<c&&b<a.Z.length;)d.push(a.Z[b++]),c-=a.B;return d}
function Cc(a,b,c,d,e){for(var f=0,g=b>>>a.A;0<c&&g<a.Z.length;){var h=d[f++];if(!h)break;if(void 0!==e){var k=new w(b),m=k,q=e,v=a.ca;m.id=h.id|1;m.ye=h.ye;m.size=h.size;q&&(m.type=q,m.D=q==Jc);Yb?(m.I=h.I,m.H=h.H,m.Qa=h.Qa,m.Td=h.Td,m.W=h.W,Fc(m,Kc?Lc:Mc)):(m.W=h.W,Fc(m,Nc));sc(m,v,h);h=k}a.Z[g++]=h;c-=a.B}}l.ya=function(a){return this.Z[(a&this.C)>>>this.A].Cc(a&this.D,a)};function Oc(a,b){var c=b&a.D,d=(b&a.C)>>>a.A;return c!=a.D?a.Z[d].Lf(c,b):a.Z[d++].ae(c,b)|a.Z[d&a.P].ae(0,b+1)<<8}
l.ub=function(a,b){this.Z[(a&this.C)>>>this.A].Ec(a&this.D,b&255,a)};function Pc(a,b,c){var d=b&a.D,e=(b&a.C)>>>a.A;d!=a.D?a.Z[e].ti(d,c&65535,b):(a.Z[e++].cf(d,c&255,b),a.Z[e&a.P].cf(0,c>>8&255,b+1))}
function Qc(a,b){var c=0,d=[],e=!a.J&&a.N==a.C;e||tc(a,!0);for(var f=0;f<a.M;f++){var g=a.Z[f];if(b&&g.type!=Jc||g.Oa||g.rj){d[c++]=f;var h=c++;if(g=g.save()){for(var k=0,m=0,q=[];k<g.length;){for(var v=g[k],u=k+1;u<g.length&&g[u]===v;)u++;q[m++]=u-k;q[m++]=v;k=u}q.length<g.length&&(g=q)}d[h]=g}}e||tc(a,!1);d[c]=e;return d}function Rc(a,b){if(null==b)return a.K=!a.K,a.K;void 0===a.F[b]&&(a.F[b]=[null,!1]);a.F[b][1]=!a.F[b][1];return a.F[b][1]}
function Tc(a,b,c,d){void 0===d&&(d=0);for(var e in c){var f=a,g=+e+d,h=c[e].bind(b);if(h)for(var k=+e+d;k<=g;k++)void 0!==f.F[k]?nb("Input port "+wa(k)+" already registered"):f.F[k]=[h,!1]}}function Uc(a,b,c,d){for(var e=0,f=0;0<c;){var g=a.F[b],h=a.V[b]||1,k=1==h?255:2==h?65535:-1,m=k;void 0!==g?(g[0]&&(m=g[0](b,d),null==m?m=k:m&=k),a.ca&&a.K!=g[1]&&Vc(a.ca,b,m)):a.ca&&(Xb(a.ca,a,b,null,d),a.K&&Vc(a.ca,b,m));e|=m<<f;f+=h<<3;b+=h;c-=h}return e}
function Wc(a,b){if(null==b)return a.L=!a.L,a.L;void 0===a.H[b]&&(a.H[b]=[null,!1]);a.H[b][1]=!a.H[b][1];return a.H[b][1]}function Xc(a,b,c,d){void 0===d&&(d=0);for(var e in c){var f=a,g=+e+d,h=c[e].bind(b);if(h)for(var k=+e+d;k<=g;k++)void 0!==f.H[k]?nb("Output port "+wa(k)+" already registered"):f.H[k]=[h,!1]}}
function Yc(a,b,c,d,e){for(var f=0;0<c;){var g=a.H[b],h=a.U[b]||1,k=1==h?255:2==h?65535:-1;k&=d>>>=f;if(void 0!==g){if(g[0])g[0](b,k,e);a.ca&&a.L!=g[1]&&Zc(a.ca,b,k)}else a.ca&&(Xb(a.ca,a,b,k,e),a.L&&Zc(a.ca,b,k));f+=h<<3;b+=h;c-=h}}function vc(a,b,c,d,e){b="Memory block error ("+b+": "+p(c)+","+p(d)+")";e?a.ca?a.ca.message(b):a.log(b):nb(b);return!1}var kc,$c={Nn:20,count:8,nq:1,type:3},ad=0,bd;for(bd in $c){var cd=$c[bd];$c[bd]={Fn:(1<<cd)-1<<ad,shift:ad};ad+=cd}kc=$c;
var xc=1,Ac=2,Ec=3,Gc=4,Ic=5,dd;if(Yb){var ed=new ArrayBuffer(2);(new DataView(ed)).setUint16(0,256,!0);dd=256===(new Uint16Array(ed))[0]}else dd=!1;var Kc=dd;
function w(a,b,c,d,e,f){this.id=fd+=2;this.W=null;this.G=0;this.za=a;this.ye=b;this.size=c||0;this.type=d||gd;this.D=d==Jc;this.controller=null;this.C=f;sc(this);this.Oa=this.rj=!1;if(c)if(e)this.controller=e,a=e.wj(a),this.W=a[0],this.G=a[1],Fc(this,e.gh());else if(Yb)this.I=new ArrayBuffer(c),this.H=new DataView(this.I,0,c),this.Qa=new Uint8Array(this.I,0,c),this.Td=new Uint16Array(this.I,0,c>>1),this.W=new Int32Array(this.I,0,c>>2),Fc(this,Kc?Lc:Mc);else{this.W=Array(c>>2);for(e=0;e<this.W.length;e++)this.W[e]=
0;Fc(this,Nc)}else Fc(this)}l=w.prototype;l.jh=function(a){this.za=a};l.save=function(){var a;if(this.controller)var b=null;else if(Yb)for(b=Array(this.size>>2),a=0;a<b.length;a++)b[a]=this.H.getInt32(a<<2,!0);else b=this.W;return b};l.restore=function(a){if(this.controller)return!a;if(a&&this.size==a.length<<2){var b;if(Yb)for(b=0;b<a.length;b++)this.H.setInt32(b<<2,a[b],!0);else this.W=a;return this.Oa=!0}return!1};function Fc(a,b,c){b||(b=a.type==hd?id:a.type==jd?kd:ld);md(a,b,c);nd(a,b,c)}
function md(a,b,c){c&&a.Ge||(a.Cc=b[0]||a.Tk,a.Kf=b[2]||a.Uk,a.Nd=b[4]||a.Rk);if(c||void 0===c)a.ae=b[0]||a.Tk,a.Lf=b[2]||a.Uk,a.ji=b[4]||a.Rk}function nd(a,b,c){c&&a.He||(a.Ec=!a.D&&b[1]||a.df,a.Pf=!a.D&&b[3]||a.si,a.Of=!a.D&&b[5]||a.ri);if(c||void 0===c)a.cf=b[1]||a.df,a.ti=b[3]||a.si,a.K=b[5]||a.ri}l.sd=function(a,b,c){b?0===this.He++&&(c&&(this.C=c),nd(this,od,!1)):0===this.Ge++&&(c&&(this.C=c),md(this,od,!1))};
function pd(a,b){b?0===--a.He&&(a.Ec=a.D?a.df:a.cf,a.Pf=a.D?a.si:a.ti,a.Of=a.D?a.ri:a.K):0===--a.Ge&&(a.Cc=a.ae,a.Kf=a.Lf,a.Nd=a.ji)}function sc(a,b,c){a.ca=b;a.Ge=a.He=0;c&&(c.C&&(a.C=c.C),(a.Ge=c.Ge)&&md(a,od,!1),(a.He=c.He)&&nd(a,od,!1))}l.Tk=function(a,b){this.ca&&r(this.ca,129)&&this.ca.message("attempt to read invalid block %"+p(b),!0);return 255};l.df=function(a,b,c){this.ca&&r(this.ca,129)&&this.ca.message("attempt to write "+wa(b)+" to invalid block %"+p(c),!0)};
l.Uk=function(a,b){return this.Cc(a++,b++)|this.Cc(a,b)<<8};l.Rk=function(a,b){return this.Cc(a++,b++)|this.Cc(a++,b++)<<8|this.Cc(a++,b++)<<16|this.Cc(a,b)<<24};l.si=function(a,b,c){this.Ec(a++,b&255,c++);this.Ec(a,b>>8,c)};l.ri=function(a,b,c){this.Ec(a++,b&255,c++);this.Ec(a++,b>>8&255,c++);this.Ec(a++,b>>16&255,c++);this.Ec(a,b>>>24,c)};l.ap=function(a){return this.W[a>>2]>>>((a&3)<<3)&255};
l.np=function(a){var b=a>>2;a=(a&3)<<3;var c=this.W[b]>>a;return 24>a?c&65535:c&255|(this.W[b+1]&255)<<8};l.hp=function(a){var b=a>>2;a=(a&3)<<3;var c=this.W[b];a&&(c=c>>>a|this.W[b+1]<<32-a);return c};l.Dp=function(a,b){var c=a>>2;a=(a&3)<<3;this.W[c]=this.W[c]&~(255<<a)|b<<a;this.Oa=!0};l.Pp=function(a,b){var c=a>>2;a=(a&3)<<3;24>a?this.W[c]=this.W[c]&~(65535<<a)|b<<a:(this.W[c]=this.W[c]&16777215|b<<24,c++,this.W[c]=this.W[c]&-256|b>>8);this.Oa=!0};
l.Jp=function(a,b){var c=a>>2;if(a=(a&3)<<3){var d=-1<<a;this.W[c]=this.W[c]&~d|b<<a;c++;this.W[c]=this.W[c]&d|b>>>32-a}else this.W[c]=b;this.Oa=!0};l.$o=function(a,b){this.ca&&null!=this.za&&qd(this.ca,this.za+a)||this.C&&rd(this.C,b,1,!1);return this.ae(a,b)};l.mp=function(a,b){this.ca&&null!=this.za&&qd(this.ca,this.za+a,2)||this.C&&rd(this.C,b,2,!1);return this.Lf(a,b)};l.gp=function(a,b){this.ca&&null!=this.za&&qd(this.ca,this.za+a,4)||this.C&&rd(this.C,b,4,!1);return this.ji(a,b)};
l.Cp=function(a,b,c){this.ca&&null!=this.za&&xd(this.ca,this.za+a)||this.C&&rd(this.C,c,1,!0);this.D?this.df(0,b,c):this.cf(a,b,c)};l.Op=function(a,b,c){this.ca&&null!=this.za&&xd(this.ca,this.za+a,2)||this.C&&rd(this.C,c,2,!0);this.D?this.df(0,b,c):this.ti(a,b,c)};l.Ip=function(a,b,c){this.ca&&null!=this.za&&xd(this.ca,this.za+a,4)||this.C&&rd(this.C,c,4,!0);this.D?this.df(0,b,c):this.K(a,b,c)};l.cp=function(a,b){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.F;return this.ud.Cc(a,b)};
l.pp=function(a,b){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.F;return this.ud.Kf(a,b)};l.jp=function(a,b){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.F;return this.ud.Nd(a,b)};l.Fp=function(a,b,c){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.J;this.ud.Ec(a,b,c)};l.Rp=function(a,b,c){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.J;this.ud.Pf(a,b,c)};l.Lp=function(a,b,c){this.pb.W[this.A]|=this.F;this.qb.W[this.B]|=this.J;this.ud.Of(a,b,c)};
l.ep=function(a,b){return yd(this.C,b,!1).Cc(a,b)};l.qp=function(a,b){return yd(this.C,b,!1).Kf(a,b)};l.kp=function(a,b){return yd(this.C,b,!1).Nd(a,b)};l.Gp=function(a,b,c){yd(this.C,c,!0).Ec(a,b,c)};l.Sp=function(a,b,c){yd(this.C,c,!0).Pf(a,b,c)};l.Mp=function(a,b,c){yd(this.C,c,!0).Of(a,b,c)};l.Zo=function(a){return this.Qa[a]};l.Qk=function(a){return this.Qa[a]};l.bp=function(a){this.pb.W[this.A]|=32;this.qb.W[this.B]|=32;this.Cc=this.Qk;return this.Qa[a]};
l.lp=function(a){return this.H.getUint16(a,!0)};l.Vk=function(a){return a&1?this.Qa[a]|this.Qa[a+1]<<8:this.Td[a>>1]};l.op=function(a){this.pb.W[this.A]|=32;this.qb.W[this.B]|=32;this.Kf=this.Vk;return a&1?this.Qa[a]|this.Qa[a+1]<<8:this.Td[a>>1]};l.fp=function(a){return this.H.getInt32(a,!0)};l.Sk=function(a){return a&3?this.Qa[a]|this.Qa[a+1]<<8|this.Qa[a+2]<<16|this.Qa[a+3]<<24:this.W[a>>2]};
l.ip=function(a){this.pb.W[this.A]|=32;this.qb.W[this.B]|=32;this.Nd=this.Sk;return a&3?this.Qa[a]|this.Qa[a+1]<<8|this.Qa[a+2]<<16|this.Qa[a+3]<<24:this.W[a>>2]};l.Bp=function(a,b){this.Qa[a]=b;this.Oa=!0};l.cl=function(a,b){this.Qa[a]=b;this.Oa=!0};l.Ep=function(a,b){this.Qa[a]=b;this.pb.W[this.A]|=32;this.qb.W[this.B]|=96;this.Ec=this.cl;this.ud.Oa=!0};l.Np=function(a,b){this.H.setUint16(a,b,!0);this.Oa=!0};l.el=function(a,b){a&1?(this.Qa[a]=b,this.Qa[a+1]=b>>8):this.Td[a>>1]=b;this.Oa=!0};
l.Qp=function(a,b){a&1?(this.Qa[a]=b,this.Qa[a+1]=b>>8):this.Td[a>>1]=b;this.pb.W[this.A]|=32;this.qb.W[this.B]|=96;this.Pf=this.el;this.ud.Oa=!0};l.Hp=function(a,b){this.H.setInt32(a,b,!0);this.Oa=!0};l.dl=function(a,b){a&3?(this.Qa[a]=b,this.Qa[a+1]=b>>8,this.Qa[a+2]=b>>16,this.Qa[a+3]=b>>24):this.W[a>>2]=b;this.Oa=!0};
l.Kp=function(a,b){a&3?(this.Qa[a]=b,this.Qa[a+1]=b>>8,this.Qa[a+2]=b>>16,this.Qa[a+3]=b>>24):this.W[a>>2]=b;this.pb.W[this.A]|=32;this.qb.W[this.B]|=96;this.Of=this.dl;this.ud.Oa=!0};function zd(a){Yb&&!Kc&&(a=a<<24|a<<8&16711680|a>>8&65280|a>>>24);return a}
var gd=0,Jc=2,hd=5,jd=6,zc="NONE RAM ROM VIDEO H/W UNPAGED PAGED".split(" "),fd=0,ld=[],Nc=[w.prototype.ap,w.prototype.Dp,w.prototype.np,w.prototype.Pp,w.prototype.hp,w.prototype.Jp],od=[w.prototype.$o,w.prototype.Cp,w.prototype.mp,w.prototype.Op,w.prototype.gp,w.prototype.Ip],kd=[w.prototype.cp,w.prototype.Fp,w.prototype.pp,w.prototype.Rp,w.prototype.jp,w.prototype.Lp],id=[w.prototype.ep,w.prototype.Gp,w.prototype.qp,w.prototype.Sp,w.prototype.kp,w.prototype.Mp];
if(Yb)var Mc=[w.prototype.Zo,w.prototype.Bp,w.prototype.lp,w.prototype.Np,w.prototype.fp,w.prototype.Hp],Lc=[w.prototype.Qk,w.prototype.cl,w.prototype.Vk,w.prototype.el,w.prototype.Sk,w.prototype.dl],Ad=[w.prototype.bp,w.prototype.Ep,w.prototype.op,w.prototype.Qp,w.prototype.ip,w.prototype.Kp];
function Bd(a,b){sb.call(this,"CPU",a,1);b=a.cycles||b;var c=a.multiplier||1;this.Y={};this.Y.Yd=b;this.Y.ph=Math.round(1E3/Cd);this.Y.Hj=this.Y.th=this.Y.Ad=c;this.Y.pg=Math.round(this.Y.Yd/1E4)/100;this.Y.Kd=this.Y.pe=this.Y.pg*this.Y.Ad;this.aa.oi=this.aa.Xa=this.aa.Qf=!1;this.aa.he=a.autoStart;this.aa.mj=!1;this.aa.Je=!1;this.Y.vf=this.Y.Te=0;this.Y.xf=a.csStart;this.Y.Se=a.csInterval;this.Y.Ue=a.csStop;this.qa=[];this.Rd=0;this.Bj=this.rp.bind(this)}ia(Bd,sb);l=Bd.prototype;
l.tc=function(a,b,c,d){this.na=a;this.oa=b;this.ca=d;for(b=0;b<Dd.length;b++)(d=this.ma[Dd[b]])&&this.na.Fb(null,Dd[b],d);this.Kc=ec(a,"FPU");this.V=ec(a,"ChipSet");a=Ed(a,"autoStart");null!=a&&(this.aa.he="true"==a?!0:"false"==a?!1:!!a);Fd(c,this.id,function(){c.aa.Qf=!0},this.Y.ph);Sb(this)};l.reset=function(){};l.save=function(){return null};l.restore=function(){return!1};
l.$b=function(a,b){if(!b){if(a&&this.restore){Gd(this);if(!this.restore(a))return!1;Hd(this)}else this.reset();this.ca?this.ca.jh():this.O("No debugger detected")}Id(this);return!0};l.Zb=function(a,b){var c=this.aa.Xa;b&&Jd(this);return a?this.save(c):!0};l.he=function(){return this.aa.Xa?!0:this.aa.he||!this.ca&&void 0===this.ma.run?Kd(this):!1};l.vj=function(){return 0};
function Hd(a){void 0===a.Y.xf&&(a.Y.xf=0);void 0===a.Y.Se&&(a.Y.Se=-1);void 0===a.Y.Ue&&(a.Y.Ue=-1);a.aa.Je=0<=a.Y.xf&&0<a.Y.Se;a.aa.Je&&(a.Y.vf=0,a.Y.Te=a.Y.xf-a.Fd)}function Ld(a,b){if(a.aa.Je){var c=!1;a.Y.vf=a.Y.vf+a.vj()|0;a.Y.Te-=b;0>=a.Y.Te&&(a.Y.Te+=a.Y.Se,c=!0);0<=a.Y.Ue&&a.Y.Ue<=Md(a)&&(a.Y.Se=a.Y.Ue=-1,Hd(a),Jd(a),c=!0);c&&a.O(Md(a)+" cycles: checksum="+p(a.Y.vf))}}
l.Fb=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.ma[b]=c;a=!0;break;case "run":this.ma[b]=c;c.onclick=function(){var a=d.aa.Xa,b;if(b=d.na)if(b=d.na,b.aa.xe&&(b.aa.xe=!1,b.aa.qf&&!b.aa.ac&&b.Xe(Nd)),b.aa.ac)b=!0;else{var c=null,h,k=Eb(b.id);for(h=0;h<k.length&&(c=k[h],c===b||c.aa.ready);h++);if(h==k.length)for(h=0;h<k.length&&(c=k[h],c===b||c.aa.ac);h++);h==k.length&&(c=b);nb("The "+c.type+" component ("+c.id+") is not "+(c.aa.ready?"powered yet":"ready yet"+(c.mg?" (waiting for notification)":
""))+".");b=!1}b&&a==d.aa.Xa&&(d.aa.Xa?Jd(d,!0):Kd(d,!0))};a=!0;break;case "speed":this.ma[b]=c;a=!0;break;case "setSpeed":this.ma[b]=c,c.onclick=function(){Od(d,d.Y.Ad<<1,!0)},c.textContent=this.Y.pe.toFixed(2)+"Mhz",a=!0}return a};function Pd(a,b){a.aa.Xa&&(b=a.A-b,a.A-=b,a.md-=b)}function Qd(a,b,c){a.Fd+=b;c&&(a.md=a.A=0)}function Rd(a){var b=a.Y.Kd/a.Y.pg;if(!b||b>a.Y.Ad)b=a.Y.Ad;a.Y.Kn=Math.floor(a.Y.Yd/Cd*b);a.Y.th=b}
function Md(a,b){var c=a.Fd+a.nd+a.md-a.A;b&&1<a.Y.Ad&&a.Y.Kd>a.Y.pg&&(c=Math.round(c/a.Y.Ad));return c}function Gd(a){a.Fd=a.nd=a.md=a.A=0;Hd(a);Od(a,a.Y.Hj)}
function Od(a,b,c){var d=!0;if(void 0!==b){0<a.Y.Kd&&a.Y.Kd<.9*a.Y.pe&&(b=a.Y.Hj,d=!1);a.Y.Kd=0;a.Y.Ad=b;b=a.Y.pg*a.Y.Ad;if(a.Y.pe!=b){a.Y.pe=b;b=a.Y.pe.toFixed(2)+"Mhz";var e=a.ma.setSpeed;e&&(e.textContent=b);a.O("target speed: "+b)}c&&a.na&&a.na.dd()}Qd(a,a.nd);a.nd=0;a.Y.Zc=a.Y.qe=0;Rd(a);for(c=a.qa.length-1;0<=c;c--)b=a.qa[c],0<=b[2]&&Sd(a,c,b[2],!0);return d}function Fd(a,b,c,d){d=void 0===d?-1:d;var e=a.qa.length;a.qa.push([b,-1,d,c]);0<=d&&Sd(a,e,d);return e}
function Sd(a,b,c,d){0<=b&&b<a.qa.length&&(b=a.qa[b],d||0>b[1])&&(c=a.Y.Yd*a.Y.th/1E3*c|0,a.aa.Xa&&(c+=Ud(a)),b[1]=c)}function Vd(a){for(var b=[],c=0;c<a.qa.length;c++){var d=a.qa[c];b.push([d[0],d[1],d[2]])}return b}function Ud(a){var b=a.md-a.A;a.md=a.A=0;a.Y.rg+=b;a.nd+=b;return b}
l.rp=function(){this.Rd=0;if(this.aa.Xa){Rd(this);this.Y.rg=0;this.Y.uf=0;this.Y.re=Oa();this.Y.Zc||(this.Y.Zc=this.Y.re);if(this.Y.qe){var a=this.Y.re-this.Y.qe;a>this.Y.ph&&(this.Y.Zc+=a,this.Y.Zc>this.Y.re&&(this.Y.Zc=this.Y.re))}try{this.aa.Qf=!1;do{for(var b,c=this.aa.Je?1:this.Y.Yd*this.Y.th|0,d=this.qa.length-1;0<=d;d--){var e=this.qa[d];0>e[1]||c>e[1]&&(c=e[1])}b=c;if(this.V){Wd(this.V);var f=this.V;a=b;var g=f.qa[0];if(g.me){var h=(Md(f.G,f.M)-g.jd)/f.Ea|0,k=Xd(f,0)-h;g.mode==Yd&&(k-=h);
var m=k*f.Ea|0;g.mode==Yd&&(m>>=1);a>m&&(a=m)}b=a;var q=this.V;a=b;if(q.A&&q.A[Zd]&$d){var v=q.Z-Md(q.G,q.M);0<v&&a>v&&(a=v)}b=a}try{this.Kg(b)}catch(J){if("number"!=typeof J)throw J;}a=b=Ud(this);for(var u=this.qa.length-1;0<=u;u--){var A=this.qa[u];0>A[1]||(A[1]-=a,0>=A[1]&&(A[1]=-1,A[3](),0<=A[2]&&Sd(this,u,A[2])))}Ld(this,b)}while(this.aa.Xa&&!this.aa.Qf)}catch(J){Jd(this);Id(this);this.na&&this.na.stop(Oa(),Md(this));Pb(this,J.stack||J.message);return}if(this.aa.Xa){b=setTimeout;c=this.Bj;this.Y.qe=
Oa();this.Y.uf&&(this.Y.Zc+=this.Y.uf,this.Y.re+=this.Y.uf);d=this.Y.ph;this.Y.rg&&(d=Math.round(d*this.Y.rg/this.Y.Kn));d-=this.Y.qe-this.Y.re;if(e=this.Y.qe-this.Y.Zc)this.Y.Kd=Math.round(this.nd/(10*e))/100,864E5<=e&&(this.Fd=0,this.V&&Wd(this.V,!0),Od(this));0>d?(-1E3>d&&(this.Y.Zc-=d),d=0):this.Y.Kd<this.Y.pe&&(d=0);this.Y.qe+=d;this.Rd=b(c,d)}}};
function Kd(a,b,c){if(Qb(a))return!1;if(a.aa.Xa)return c||a.O(a.toString()+" busy"),!1;a.Rd&&(clearTimeout(a.Rd),a.Rd=0);Od(a);a.aa.Xa=!0;a.aa.oi=!0;a.V&&a.V.start();if(c=a.ma.run)c.textContent="Halt";a.na&&(ce(a.na,!0),b&&a.na.dd(!0),a.na.start(a.Y.Zc,Md(a)));a.Rd=setTimeout(a.Bj,0);return!0}l.Kg=function(){return 0};
function Jd(a,b){var c=!1;if(a.aa.Xa){Ud(a);Qd(a,a.nd);a.nd=0;a.aa.Xa=!1;a.V&&a.V.stop();if(c=a.ma.run)c.textContent="Run";a.na&&(a.na.stop(Date.now()||+new Date,Md(a)),ce(a.na,!0));a.ca||a.status("Stopped");c=!0}a.aa.complete=b;return c}function de(a,b){var c=Oa();b()&&(b=Oa(),a.Y.uf+=b-c)}function Id(a,b){a.na&&ce(a.na,b)}var Cd=30,Dd=["power","reset"];
function ee(a,b,c,d){this.Mb=a;this.ca=a.ca;this.id=b;this.hc=c||"";this.T=0;this.Sa=65535;this.Ob=this.Sa+1;this.Db=this.qc=this.ext=this.ob=this.type=this.ua=0;this.Pb=-1;this.X=this.Lc=2;this.R=this.xa=65535;this.H=this.oh;this.F=this.D=this.hg;this.A={T:-1,ua:0,Sa:0,ob:0,type:0,ext:0,Pb:-1};1==this.id&&(this.If=0,this.C=null,this.Oe=!1,this.G=Array(32),this.B=[]);fe(this,!0,d);0==this.id&&(this.Ub=this.Cb=this.fj)}function ge(a,b){a.B.push(b);return[a.B.length,he]}l=ee.prototype;
l.oh=function(a){this.T=a&65535;return this.ua=this.T<<4};l.og=function(a,b){var c=this.Mb;a&=65535;if(a&4){var d=c.Hb.ua;var e=d+c.Hb.Sa|0}else d=c.Lb,e=c.Jc;if(d){d=d+(a&65528)|0;if(e-d|0)return c.A-=15,ie(this,d,a,b);this.id<je&&x.call(c,b&&this.id==ke?10:13,a&65532)}return-1};l.Dn=function(a){var b=this.Mb;a=b.Qb+(a<<2);var c=b.ja(a);b.P&=-769;return this.load(b.ja(a+2))+c|0};
l.Cn=function(a){var b=this.Mb;a<<=3;var c=b.Qb+a|0;if(7<=(b.ad-c|0))return this.C=!0,a=ie(this,c,a),-1!==a&&(a+=this.If),a;x.call(b,13,a|2);return-1};l.fj=function(a){return this.ua+a|0};l.hg=function(a,b){(a>>>0)+b>this.Ob&&(8088>=this.Mb.da?this.Mb.M|=8:x.call(this.Mb,13));return this.ua+a|0};l.ej=function(a,b){return(a>>>0)+b<=this.Ob?this.ua+a|0:this.gg()};l.Sl=function(a,b){return(a>>>0)+b>this.Ob?this.ua+a|0:this.gg()};l.gg=function(){x.call(this.Mb,13,0);return-1};
l.gj=function(a,b){return(a>>>0)+b<=this.Ob?this.ua+a|0:this.ig()};l.Tl=function(a,b){return(a>>>0)+b>this.Ob?this.ua+a|0:this.ig()};l.ig=function(){x.call(this.Mb,13,0);return-1};function le(a,b,c,d,e){a.T=b;a.ua=d;a.Sa=e;a.Ob=(e>>>0)+1;a.ob=c;a.type=c&7936;a.ext=c>>16&192;a.Pb=(b&4?a.Mb.Hb.ua:a.Mb.Lb)+(b&65528)|0;a.id<me&&fe(a,!0)}function ne(a,b,c){var d=a.Mb,e=d.ja(b+2),f=d.ja(b)|(e&255)<<16;d=d.ja(b+4);a.T=c;a.ua=f;a.Sa=d;a.Ob=(d>>>0)+1;a.ob=e;a.type=e&7936;a.ext=0;a.Pb=b;a.id<me&&fe(a,!0)}
function ie(a,b,c,d){var e=a.Mb;if(!d&&c===a.A.T)return a.T=c,a.ua=a.A.ua,a.Sa=a.A.Sa,a.Ob=(a.A.Sa>>>0)+1,a.ob=a.A.ob,a.type=a.A.type,a.ext=a.A.ext,a.Pb=a.A.Pb,a.A.T=-1,fe(a,!0,!0,!1),a.ua;a.A.T=-1;var f=e.ja(b+0),g=e.ja(b+4),h=g&7936,k=e.ja(b+2)|(g&255)<<16,m=e.ja(b+6),q=c&65528;if(80386<=e.da){var v=f;k|=(m&65280)<<16;f|=(m&15)<<16;m&128&&(f=f<<12|4095)}switch(a.id){case oe:var u=a.C;a.Oe=!1;if(u&&c==he&&a.B.length){var A=a.B[a.If-1];if(A&&!A())return-1}var J=c&3,H=(g&24576)>>13;A=-1;q||b>=e.Lb&&
b<e.Jc&&(h=0);if(6144<=h)null!=d?A=0:!1!==u?(h&1024?H<=a.Db&&(A=0):J<=a.Db&&H==a.Db&&(A=0),A||(c=c&-4|a.Db&3)):J>=a.Db&&(J>a.Db&&(A=pe(e),qe(e,pe(e),!0),re(e,A),a.Oe=!0),A=0);else{if(256==h||2304==h)return se(a,c,u)?a.ua:-1;if(1024==h){A=2;var G=0;J<a.Db&&(J=a.Db)}else if(3072==h)A=4,G=0,J<a.Db&&(J=a.Db);else if(1536==h)A=2,G=148224;else if(3584==h)A=4,G=148224;else if(1792==h)A=2,G=147712;else if(3840==h)A=4,G=147712;else if(1280==h)return se(a,k&65535,u)?a.ua:-1}0<A&&!(g&32768)&&(A=0);if(0<A){q=
a.Db;var P=b==e.Qb+c;if(J<=H&&(!P||0<=e.Sc||q<=H)){b=k&65535;h&2048&&(f=v|m<<16);m=h=0;d=b&3;if(d<q){if(-1===a.og(b,!0))return-1;m=e.ka.ua;e.ka.type&2048?(c=(d<<3)+4,v=4):(c=(d<<2)+2,v=2);h=e.ja(m+c+v);if(!h)return x.call(e,10,h),-1;if(-1===e.U.og(h,!0))return-1;m=2==v?e.ja(m+c):e.ia(m+c)}c=e.P;e.P&=~G;c&131072&&te(e,!0,!1);if(-1===a.og(b,!1))return-1;ue(e,A);a.If=f;if(d<q){if(!0!==u)return-1;A=y(e);f=0;for(g&=31;g--;)a.G[f++]=ve(e,e.U,A),A+=2;u=e.U.T;g=y(e);qe(e,h,!0);re(e,m);c&131072&&(ue(e,4),
we(e,e.La.T,4,2),e.La.load(0),we(e,e.Ka.T,4,2),e.Ka.load(0),we(e,e.Fa.T,4,2),xe(e,0),we(e,e.pa.T,4,2),ye(e,0));we(e,u,e.X,2);for(ze(e,g);f;)ze(e,a.G[--f]);a.Oe=!0}return a.ua}}if(0!=A)return x.call(e,13,c&65532|(P?2:0)),-1;if(!(g&32768))return x.call(e,11,c&65532|(P?2:0)),-1;break;case Ae:if(q){if(4096>h||2048==(h&2560))return x.call(e,13,c&65532),-1;if(!(g&32768))return x.call(e,11,c&65532),-1}break;case ke:if(!q||4096>h||512!=(h&2560))return x.call(e,13,c&65532),-1;if(!(g&32768))return x.call(e,
12,c&65532),-1;break;case me:u=h&-513;if(!q||256!=u&&2304!=u)return x.call(e,13,c&65532),-1;2304==u&&(a.Vi=k+e.ja(k+102)|0,a.Ml=k+a.Sa|0);break;case je:if(!(h&4096)&&768<h&&2304!=h&&2816!=h)return-1}d?(a.A.T=c,a.A.ua=k,a.A.Sa=f,a.A.ob=g,a.A.type=h,a.A.ext=m,a.A.Pb=b):(a.T=c,a.ua=k,a.Sa=f,a.Ob=(f>>>0)+1,a.ob=g,a.type=h,a.ext=m,a.Pb=b,fe(a,!0,!0,!1));return k}
function se(a,b,c){var d=a.Mb,e=a.Db,f=d.ka.T,g=d.ka.ua;if(!c){if(!(d.ka.type&512))return x.call(d,13,b&65532),!1;d.ib(d.ka.Pb+4,d.ka.ob&=-513)}if(-1===d.ka.load(b))return!1;var h=d.ka.ua;if(!1!==c){if(d.ka.type&512)return x.call(d,13,b&65532),!1;d.ib(d.ka.Pb+4,d.ka.ob|=512)}d.ka.type=d.ka.type&-513|d.ka.ob&512;256==d.ka.type||768==d.ka.type?(d.ib(g+14,z(d)),d.ib(g+16,Be(d)),d.ib(g+18,d.D),d.ib(g+20,d.I),d.ib(g+22,d.L),d.ib(g+24,d.H),d.ib(g+26,y(d)),d.ib(g+28,d.N),d.ib(g+30,d.K),d.ib(g+32,d.J),d.ib(g+
34,d.pa.T),d.ib(g+36,d.ba.T),d.ib(g+38,d.U.T),d.ib(g+40,d.Fa.T),d.Hb.load(d.ja(h+42)),Ce(d,d.ja(h+16)|(c?16384:0)),d.D=d.ja(h+18),d.I=d.ja(h+20),d.L=d.ja(h+22),d.H=d.ja(h+24),d.N=d.ja(h+28),d.K=d.ja(h+30),d.J=d.ja(h+32),d.pa.load(d.ja(h+34)),d.Fa.load(d.ja(h+40)),De(d,d.ja(h+14),d.ja(h+36)),b=38,g=26,a.Db<e&&(g=(a.Db<<2)+2,b=g+2),qe(d,d.ja(h+b),!0),re(d,d.ja(h+g))):(d.eb(g+28,d.wc),d.eb(g+32,z(d)),d.eb(g+36,Be(d)),d.eb(g+40,d.D),d.eb(g+44,d.I),d.eb(g+48,d.L),d.eb(g+52,d.H),d.eb(g+56,y(d)),d.eb(g+
60,d.N),d.eb(g+64,d.K),d.eb(g+68,d.J),d.eb(g+72,d.pa.T),d.eb(g+76,d.ba.T),d.eb(g+80,d.U.T),d.eb(g+84,d.Fa.T),d.eb(g+88,d.Ka.T),d.eb(g+92,d.La.T),b=d.ia(h+28),d.wc=b,yc(d),d.Hb.load(d.ja(h+96)),Ce(d,d.ia(h+36)|(c?16384:0)),d.D=d.ia(h+40),d.I=d.ia(h+44),d.L=d.ia(h+48),d.H=d.ia(h+52),d.N=d.ia(h+60),d.K=d.ia(h+64),d.J=d.ia(h+68),d.pa.load(d.ja(h+72)),d.Fa.load(d.ja(h+84)),d.Ka.load(d.ja(h+88)),d.La.load(d.ja(h+92)),De(d,d.ia(h+32),d.ja(h+76)),b=80,g=56,a.Db<e&&(g=(a.Db<<3)+4,b=g+4),qe(d,d.ja(h+b),!0),
re(d,d.ia(h+g)));c&&d.ib(h+0,f);d.ra|=8;return!0}l.save=function(){return[this.T,this.ua,this.Sa,this.ob,this.id,this.hc,this.Db,this.qc,this.Pb,this.Lc,this.xa,this.X,this.R,this.type,this.Ob]};l.restore=function(a){"number"==typeof a?this.load(a):(this.T=a[0],this.ua=a[1],this.Sa=a[2],this.ob=a[3],this.id=a[4],this.hc=a[5],this.Db=a[6],this.qc=a[7],this.Pb=a[8],this.Lc=a[9]||2,this.xa=a[10]||65535,this.X=a[11]||2,this.R=a[12]||65535,this.type=a[13]||this.ob&7936,this.Ob=a[14]||(this.Sa>>>0)+1)};
function fe(a,b,c,d){void 0===c&&(c=!!(a.Mb.ra&1));a.fd=!1;if(c)if(a.load=a.og,a.Fj=a.Cn,a.Cb=a.ej,a.Ub=a.gj,void 0===d&&(d=!!(a.Mb.P&131072)),d)a.load=a.H,a.Cb=a.D,a.Ub=a.F,a.Db=a.qc=3,a.X=2,a.R=a.xa=65535,a.Sa=65535,a.Ob=a.Sa+1,a.Lc=a.X,a.Pb=-1,a.Oe=!1;else{if(!(a.T&-4))a.Cb=a.gg,a.Ub=a.ig;else if(a.type&4096){6144==(a.type&6656)&&(a.Cb=a.gg);if(a.type&2048||!(a.type&512))a.Ub=a.ig;1024==(a.type&3072)&&(a.Cb==a.ej&&(a.Cb=a.Sl),a.Ub==a.gj&&(a.Ub=a.Tl),a.fd=!0);b&&a.id<je&&a.T&-4&&-1!==a.Pb&&(c=a.Pb+
5,d=a.Mb.ya(c),d&1||a.Mb.ub(c,d|1))}b&&(a.Db=a.T&3,a.qc=(a.ob&24576)>>13,80386>a.Mb.da||!(a.ext&64)?(a.X=2,a.R=65535):(a.X=4,a.R=-1),a.Lc=a.X,a.xa=a.R)}else a.load=a.oh,a.Fj=a.Dn,a.Cb=a.hg,a.Ub=a.hg,a.Db=a.qc=0,a.Pb=-1,a.Oe=!1}var oe=1,Ae=2,ke=3,me=4,je=6,he=1;
function Ee(a){var b=+a.model||8088;switch(b){default:var c=4772727;break;case 80286:c=6E6;break;case 80386:c=16E6}Bd.call(this,a,c);this.da=b;a=a.stepping;this.Qd=b+(a?qa(a,16):0);this.bj=61442;this.Pd=1792;this.Ui=28672;this.Rf=4;this.Ra=255;this.B=80286<=this.da?$b:Zb;this.wa=Fe;this.kj=Je;this.oj=Ke;this.tj=Le;if(80186<=this.da&&(this.wa=Fe.slice(),this.kj=Je.slice(),this.oj=Ke.slice(),this.Ra=31,this.wa[15]=Me,this.wa[96]=Ne,this.wa[97]=Oe,this.wa[98]=Pe,this.wa[99]=Me,this.wa[100]=Me,this.wa[101]=
Me,this.wa[102]=Me,this.wa[103]=Me,this.wa[104]=Qe,this.wa[105]=Re,this.wa[106]=Se,this.wa[107]=Te,this.wa[108]=Ue,this.wa[109]=Ve,this.wa[110]=We,this.wa[111]=Xe,this.wa[192]=Ye,this.wa[193]=Ze,this.wa[200]=$e,this.wa[201]=af,this.wa[241]=bf,this.kj[7]=cf,this.oj[7]=cf,80286<=this.da)){this.bj=2;this.Pd|=28672;this.Rf=0;this.wa[15]=df;this.rd=ef.slice();for(b=0;b<this.rd.length;b++)this.rd[b]||(this.rd[b]=ff);this.wa[84]=gf;this.wa[99]=hf;if(80386<=this.da){var d;this.Ui=0;this.Pd|=196608;this.wa[100]=
jf;this.wa[101]=kf;this.wa[102]=of;this.wa[103]=pf;for(d in B)this.rd[+d]=B[+d];80546<=this.Qd&&80562>=this.Qd&&(this.rd[166]=qf,this.rd[167]=rf)}}this.Uf=[];this.Vf=[];this.Xf=0;Gd(this);this.aa.complete=this.aa.lj=!1;this.xj=0;this.sc=this.Z=[];this.lb=this.Pg=this.Gb=this.Sf=this.ef=this.ff=this.cd=0;sf(this)}ia(Ee,Bd);function tf(a,b,c,d){pd((d?a.sc:a.Z)[b>>>a.lb],c);d&&yc(a)}
function uf(a){var b;if(a.Z===a.sc){a.Z=Array(a.Sf);a.Wf=new w(null,0,0,hd,null,a);sc(a.Wf,a.ca);for(b=0;b<a.Sf;b++)a.Z[b]=a.Wf;a.gf=new w;a.dj=Array(vf);a.Yf=0}else for(var c=0;c<a.Tf.length;c++){b=a.Tf[c];var d=a.Z[b];a.Yf<vf&&(a.dj[a.Yf++]=d);a.Z[b]=a.Wf}a.Tf=[]}function yc(a){a.ra&-2147483648&&uf(a)}
function yd(a,b,c,d){var e=(b&-4194304)>>>20,f=a.sc[(a.wc+e&a.ff)>>>a.lb],g=f.Nd(e);if(!(g&1))return d||wf.call(a,b,!1,c),a.gf;if(!(g&4)&&3==a.Pa)return d||wf.call(a,b,!0,c),a.gf;var h=(b&4190208)>>>10;g=a.sc[((g&-4096)+h&a.ff)>>>a.lb];var k=g.Nd(h);if(!(k&1))return d||wf.call(a,b,!1,c),a.gf;if(!(k&4)&&3==a.Pa)return d||wf.call(a,b,!0,c),a.gf;c=a.sc[((k&-4096)+(b&4095)&a.ff)>>>a.lb];if(d)return c;d=b>>>a.lb;k=a.Z[d];b&=-4096;if(0<a.Yf){var m=a.dj[--a.Yf];m.jh(b)}else m=new w(b,0,0,jd);b=m;b.ud=c;
b.pb=f;b.A=e>>2;b.qb=g;b.B=h>>2;Yb&&Kc&&c.W&&!c.controller&&!c.Ge&&!c.He?(b.Qa=c.Qa,b.Td=c.Td,b.W=c.W,Fc(b,Ad)):(b.F=c?zd(32):0,b.J=c?zd(96):0,Fc(b,kd));sc(b,a.ca,k);a.Z[d]=b;a.Tf.push(d);return b}function Cf(a){a.Z!==a.sc&&(a.Z=a.sc,a.Wf=null,a.Tf=null,a.gf=null)}l=Ee.prototype;l.reset=function(){sf(this);Gd(this);this.aa.error=!1};
function Df(a,b){switch(b){case 0:var c=a.D;break;case 1:c=a.I;break;case 2:c=a.L;break;case 3:c=a.H;break;case 4:c=y(a);break;case 5:c=a.N;break;case 6:c=a.K;break;case 7:c=a.J}return c}function Ef(a,b,c){switch(b){case 0:a.D=c;break;case 1:a.I=c;break;case 2:a.L=c;break;case 3:a.H=c;break;case 4:re(a,c);break;case 5:a.N=c;break;case 6:a.K=c;break;case 7:a.J=c}}
function sf(a){a.D=0;a.H=0;a.I=0;a.L=0;a.Ac=0;a.N=0;a.K=0;a.J=0;a.vc=!1;a.Ea=a.cb=0;a.zn=[0,0];a.Gn=[0,0];a.Aa=0;a.uj=0;a.fa=0;a.ra=65520;a.Qb=0;a.ad=1023;a.P=a.lc=0;a.Ae=a.hf=a.Sd=a.Be=0;a.Sc=-1;a.od=a.Tc=-1;a.pd=a.ta=-1;a.ba=new ee(a,oe,"CS");a.Fa=new ee(a,Ae,"DS");a.pa=new ee(a,Ae,"ES");a.U=new ee(a,ke,"SS");re(a,0);qe(a,0);if(80386<=a.da){switch(a.Qd){case 80562:case 80563:a.L=771;break;case 80578:a.L=772;break;case 80594:a.L=773;break;case 80595:case 80596:a.L=776}a.ra=16;a.Qg=0;a.qd=0;a.wc=
0;a.Rb=[0,0,0,0,null,null,0,0];a.Zf=[null,null,null,null,null,null,0,0];a.Ka=new ee(a,Ae,"FS");a.La=new ee(a,Ae,"GS");Cf(a)}a.Jg=new ee(a,0,"NULL");a.Ga=a.Fa;a.Sb=a.U;a.M=a.ha=0;a.C=a.F=-1;a.Ia=a.Jg;a.ab=0;if(80286>a.da)De(a,0,65535);else{a.Lb=0;a.Jc=65535;a.Hb=new ee(a,5,"LDT",!0);a.ka=new ee(a,me,"TSS",!0);a.zb=new ee(a,je,"VER",!0);De(a,65520,61440);var b=z(a);var c=a.ba;var d=-65536;80386>c.Mb.da&&(d&=16777215);c=c.ua=d;a.ea=c+b|0;a.Rg=(c>>>0)+(a.ba.Sa>>>0)+1}Ce(a,0);te(a)}
function Ff(a){2==a.Lc?(a.Vb=a.ja,a.kc=Gf,a.uc=Hf,a.ld=If,2==a.X?(a.la=Jf,a.Ba=Kf,a.mb=Lf):(a.la=Mf,a.Ba=Nf,a.mb=Of)):(a.Vb=a.ia,a.kc=Pf,a.uc=Qf,a.ld=Rf,2==a.X?(a.la=Sf,a.Ba=Tf,a.mb=Uf):(a.la=Vf,a.Ba=Wf,a.mb=Xf))}function ue(a,b){a.X!=b&&(a.ha|=1024,a.X=b,a.R=2==b?65535:-1,Yf(a))}function Yf(a){2==a.X?(a.Ib=32768,a.nb=a.ja,a.fc=a.ib,2==a.Lc?(a.la=Jf,a.Ba=Kf,a.mb=Lf):(a.la=Sf,a.Ba=Tf,a.mb=Uf)):(a.Ib=-2147483648,a.nb=a.ia,a.fc=a.eb,2==a.Lc?(a.la=Mf,a.Ba=Nf,a.mb=Of):(a.la=Vf,a.Ba=Wf,a.mb=Xf))}
function Zf(a){a.Lc=a.ba.Lc;a.xa=a.ba.xa;Ff(a);a.X=a.ba.X;a.R=a.ba.R;Yf(a);a.ha&=-3073}l.vj=function(){var a=this.D+this.H+this.I+this.L+y(this)+this.N+this.K+this.J|0;return a=a+z(this)+this.ba.T+this.Fa.T+this.U.T+this.pa.T+Be(this)|0};function $f(a,b,c){void 0===a.Uf[b]&&(a.Uf[b]=[]);a.Uf[b].push(c)}function ag(a,b,c){c&&(null==a.Vf[b]&&a.Xf++,a.Vf[b]=c)}function bg(a,b){var c=a.Vf[b];null!=c&&(c(--a.Xf),delete a.Vf[b])}
function cg(a,b){for(var c=a.Rb[7],d=c>>16,e=0;4>e;e++){if(c&3){var f=!!(d&1),g=a.Rb[e];g&=~(d>>2&3);b?a.Z[g>>>a.lb].sd(g&a.Gb,f,a):pd(a.Z[g>>>a.lb],f)}c>>=2;d>>=4}}function rd(a,b,c,d){if(!(a.M&8192)&&a.Rb[7]&255){c--;var e=a.Rb[7],f=e>>16;d=d?1:0==d?3:0;for(var g=0;4>g;g++){if(e&3&&(f&3)==d){var h=f>>2;if(b+c>=a.Rb[g]&&b<=a.Rb[g]+h){a.Rb[6]|=1<<g;a.ab|=2;break}}e>>=2;f>>=4}}}
function te(a,b,c){void 0===b&&(b=!!(a.ra&1));void 0===c&&(c=!!(a.P&131072));a.tj=b&&!c?dg:Le;fe(a.ba,!1,b,c);fe(a.Fa,!1,b,c);fe(a.U,!1,b,c);fe(a.pa,!1,b,c);80386<=a.da&&(fe(a.Ka,!1,b,c),fe(a.La,!1,b,c));Zf(a)}
l.save=function(a){var b=new eg(this);b.set(0,[this.D,this.H,this.I,this.L,y(this),this.N,this.K,this.J]);var c=z(this),d=this.ba.save(),e=this.Fa.save(),f=this.U.save(),g=this.pa.save();if(null!=this.Lb){var h=[this.ra,this.Lb,this.Jc,this.Qb,this.ad,this.Hb.save(),this.ka.save(),this.lc];80386<=this.da&&(h.push(this.Qg),h.push(this.qd),h.push(this.wc),h.push(this.Rb),h.push(this.Zf))}else h=null;c=[c,d,e,f,g,h,Be(this)];80386<=this.da&&(c.push(this.Ka.save()),c.push(this.La.save()));b.set(1,c);
b.set(2,[this.Ga.hc,this.Sb.hc,this.M,this.ha,this.ab,this.C,this.F]);b.set(3,[0,this.Fd,this.Y.Ad,a,Vd(this)]);b.set(4,Qc(this.oa,!!(this.ra&-2147483648)));return b.data()};
l.restore=function(a){var b=a[0];this.D=b[0];this.H=b[1];this.I=b[2];this.L=b[3];var c=b[4];this.N=b[5];this.K=b[6];this.J=b[7];b=a[1];this.ba.restore(b[1]);this.Fa.restore(b[2]);this.U.restore(b[3]);this.pa.restore(b[4]);var d=b[5];d&&d.length&&(this.ra=d[0],this.Lb=d[1],this.Jc=d[2],this.Qb=d[3],this.ad=d[4],this.Hb.restore(d[5]),this.ka.restore(d[6]),this.lc=d[7],80386<=this.da&&(this.Qg=d[8],this.qd=d[9],this.wc=d[10],this.Rb=d[11],this.Zf=d[12]),te(this));Ce(this,b[6]);d=!1;a:{var e=this.oa;
var f=a[4],g;for(g=0;g<f.length-1;g+=2){var h=f[g],k=f[g+1];if(k&&k.length<e.ea){for(var m=0,q=Array(e.ea),v=0;v<k.length-1;)for(var u=k[v++],A=k[v++];u--;)q[m++]=A;k=q}m=e.Z[h];if(!m||!m.restore(k)){nb("Unable to restore memory block "+h);e=!1;break a}}void 0!==f[g]&&tc(e,f[g]);e=!0}e&&(De(this,b[0],this.ba.T),re(this,c),qe(this,this.U.T),80386<=this.da&&(this.Ka.restore(b[7]),this.La.restore(b[8])),d=!0);b=a[2];this.Ga=null!=b[0]&&fg(this,b[0])||this.Fa;this.Sb=null!=b[1]&&fg(this,b[1])||this.U;
this.M=b[2];this.ha=b[3];this.ab=b[4];this.C=b[5];this.F=b[6];b=a[3];this.Fd=b[1];Od(this,b[2]);null!=b[3]&&(this.aa.he=b[3]);if(null!=b[4])for(a=b[4],b=0;b<a.length;b++){c=a[b];a:{for(e=0;e<this.qa.length;e++)if(f=this.qa[e],f[0]==c[0]){e=f;break a}e=null}e&&(e[1]=c[1],e[2]=c[2])}return d};function fg(a,b){switch(b){case "CS":return a.ba;case "DS":return a.Fa;case "SS":return a.U;case "ES":return a.pa;case "NULL":return a.Jg;default:return[0,b,0,0,""]}}
function gg(a,b){null!=De(a,z(a),b)&&(a.M|=a.Rf)}function xe(a,b){-1!==a.Fa.load(b)&&(a.M|=a.Rf)}function qe(a,b,c){var d=y(a);-1!==a.U.load(b)&&(re(a,d),a.U.fd?(a.Sg=a.U.ua+a.U.xa|0,a.Cj=a.U.ua+a.U.Sa|0):(a.Sg=a.U.ua+a.U.Sa|0,a.Cj=a.U.ua),c||(a.M|=4))}function ye(a,b){-1!==a.pa.load(b)&&(a.M|=a.Rf)}function z(a){return a.ea-a.ba.ua|0}function C(a,b){a.ea=a.ba.ua+(b&a.R)|0}function hg(a,b){a.ea=b;a.Rg=(a.ba.ua>>>0)+(a.ba.Sa>>>0)+1;a.Pa=a.ba.Db;Zf(a)}
function De(a,b,c,d){var e=a.ba;e.If=b;e.C=d;b=e.load(c);return-1!==b?(hg(a,b+(a.ba.If&a.ba.R)),a.ba.Oe):null}function ig(a,b){var c=(a.ea>>>0)+b;c>a.Rg&&(8088>=a.da?(c=a.ba.ua+(c-a.Rg&a.R),2==b&&(a.M|=8)):x.call(a,13,0));return c|0}function jg(a){a.ea=a.pd}function y(a){return a.Ac&~a.U.xa|a.Ca-a.U.ua}function re(a,b){a.Ac=b;a.Ca=a.U.ua+(b&a.U.xa)|0}
function kg(a,b,c,d,e,f){if(63!=(e&63)&&e!=a.resultType){var g=(e^a.resultType)&a.resultType;g&&(g&1&&lg(a),g&2&&mg(a),g&4&&ng(a),g&8&&og(a),g&16&&pg(a),g&32&&qg(a))}f?(a.Ae=d,a.Sd=b):(a.Ae=b,a.Sd=d);a.hf=c;a.Be=d;a.resultType=e}function rg(a,b,c,d,e){a.resultType=c|26;a.Be=b;d?sg(a):tg(a);e?ug(a):vg(a);return b}function wg(a,b,c,d){c&d?sg(a):tg(a);(b^c)&d?ug(a):vg(a)}function xg(a){return lg(a)?1:0}
function lg(a){a.resultType&1&&(a.P&=-2,(a.Ae^(a.Ae^a.hf)&(a.hf^a.Sd))&a.resultType&-2147450752&&(a.P|=1),a.resultType&=-2);return a.P&1}function mg(a){a.resultType&2&&(a.P&=-5,38505>>((a.Be^a.Be>>4)&15)&1&&(a.P|=4),a.resultType&=-3);return a.P&4}function ng(a){a.resultType&4&&(a.P&=-17,(a.Sd^a.Ae^a.hf)&16&&(a.P|=16),a.resultType&=-5);return a.P&16}function og(a){a.resultType&8&&(a.P&=-65,a.Be&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.P|=64),a.resultType&=-9);return a.P&64}
function pg(a){a.resultType&16&&(a.P&=-129,a.Be&a.resultType&-2147450752&&(a.P|=128),a.resultType&=-17);return a.P&128}function qg(a){a.resultType&32&&(a.P&=-2049,(a.Ae^a.Sd)&(a.hf^a.Sd)&a.resultType&-2147450752&&(a.P|=2048),a.resultType&=-33);return a.P&2048}function tg(a){a.resultType&=-2;a.P&=-2}function yg(a){a.resultType&=-5;a.P&=-17}function zg(a){a.resultType&=-9;a.P&=-65}function vg(a){a.resultType&=-33;a.P&=-2049}function sg(a){a.resultType&=-2;a.P|=1}
function Ag(a){a.resultType&=-5;a.P|=16}function Bg(a){a.resultType&=-9;a.P|=64}function ug(a){a.resultType&=-33;a.P|=2048}function Be(a){return a.P&-2262|lg(a)|mg(a)|ng(a)|og(a)|pg(a)|qg(a)}function Cg(a,b){b|=a.ra&1|65520;a.ra=a.ra&-65536|b&65535;a.ra&1&&te(a,!0)}function Ce(a,b,c){a.ra&1||(b&=~a.Ui);void 0===c&&(c=a.Pa);c?b=b&-12289|a.P&12288:a.lc=(b&12288)>>12;c>a.lc&&(b=b&-513|a.P&512);a.resultType=128;a.P=a.P&~(a.Pd|2261)|b&(a.Pd|2261)|a.bj;a.P&256&&(a.ab|=2,a.M|=4)}
function Dg(a,b,c,d){var e=0;if(a.ra&1&&(a.Pa>a.lc||a.P&131072)&&a.ka.Vi){var f=a.ka.Vi+(b>>>3);for(e=(1<<c)-1<<(b&7);e&&f<=a.ka.Ml&&!(a.ya(f)&e);)e>>>=8,f++}return e?(r(a,256)&&Wb(a,"checkIOPM("+wa(b)+","+c+","+(d?"input":"output")+"): trapped",!0,!0),x.call(a,13,0),!1):!0}
l.Fb=function(a,b,c){switch(b){case "EAX":case "EBX":case "ECX":case "EDX":case "ESP":case "EBP":case "ESI":case "EDI":case "EIP":case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "IP":case "PC":case "CS":case "DS":case "SS":case "ES":case "FS":case "GS":case "CR0":case "CR2":case "CR3":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "V":this.ma[b]=c;this.xj++;a=!0;break;default:a=Bd.prototype.Fb.call(this,a,b,c)}return a};
function Eg(a,b,c,d){var e=(d?a.sc:a.Z)[(b&a.cd)>>>a.lb];e&&e.type==hd&&(e=yd(a,b,!1,!0));if(e){var f=b&a.Gb;if(!c||1==c)return e.ae(f,b);if(2==c)return f<a.Gb?e.Lf(f,b):e.ae(f,b)|Eg(a,b+1,1,d)<<8;if(4==c)return f<a.Gb-2?e.ji(f,b):f==a.Gb-1?e.Lf(f,b)|Eg(a,b+2,2,d)<<16:e.ae(f,b)|Eg(a,b+1,1,d)<<8|Eg(a,b+2,1,d)<<16|Eg(a,b+3,1,d)<<24}return null}l.ya=function(a){return this.Z[(a&this.cd)>>>this.lb].Cc(a&this.Gb,a)};
l.ja=function(a){var b=a&this.Gb,c=(a&this.cd)>>>this.lb;this.A-=this.B.xg;if(b<this.Gb)return this.Z[c].Kf(b,a);b=this.Z[c].Cc(b,a);this.M&4096||(b|=this.Z[c+1&this.ef].Cc(0,a+1)<<8);return b};l.ia=function(a){var b=a&this.Gb,c=(a&this.cd)>>>this.lb;if(b<this.Gb-2)return this.Z[c].Nd(b,a);for(var d=0,e=4,f=0,g=4-(b&3);e--;){d|=this.Z[c].Cc(b++,a++)<<f;if(this.M&4096)break;--g||(c=c+1&this.ef,b=0);f+=8}return d};l.ub=function(a,b){this.Z[(a&this.cd)>>>this.lb].Ec(a&this.Gb,b&255,a)};
l.ib=function(a,b){var c=a&this.Gb,d=(a&this.cd)>>>this.lb;this.A-=this.B.xg;c<this.Gb?this.Z[d].Pf(c,b&65535,a):(this.Z[d++].Ec(c,b&255,a),this.M&4096||this.Z[d&this.ef].Ec(0,b>>8&255,a+1))};l.eb=function(a,b){var c=a&this.Gb,d=(a&this.cd)>>>this.lb;this.A-=this.B.xg;if(c<this.Gb-2)this.Z[d].Of(c,b,a);else for(var e=4,f=4-(c&3);e--;){this.Z[d].Ec(c++,b&255,a++);if(this.M&4096)break;--f||(d=d+1&this.ef,c=0);b>>>=8}};function Hg(a,b,c){a.Ia=b;a.vb=c&a.xa;a.C=b.Cb(a.vb,1);return a.M&1?0:a.ya(a.C)}
function D(a,b){return Hg(a,a.Ga,b)}function Ig(a,b){return Hg(a,a.Sb,b)}function Jg(a,b,c){a.Ia=b;a.vb=c&a.xa;a.C=b.Cb(a.vb,a.X);if(a.M&9){if(a.M&1)return 0;a=a.ya(a.C)|a.ya(b.Cb(0,1))<<8}else a=a.nb(a.C);return a}function E(a,b){a.Ia=a.Ga;a.vb=b&a.xa;a.C=a.Ia.Cb(a.vb,2);if(a.M&9){if(a.M&1)return 0;b=a.ya(a.C)|a.ya(a.Ia.Cb(0,1))<<8;a.M&=-9}else b=a.ja(a.C);return b}
function Kg(a,b){a.Ia=a.Sb;a.vb=b&a.xa;a.C=a.Ia.Cb(a.vb,2);if(a.M&9){if(a.M&1)return 0;b=a.ya(a.C)|a.ya(a.Ia.Cb(0,1))<<8;a.M&=-9}else b=a.ja(a.C);return b}function F(a,b){a.Ia=a.Ga;a.vb=b&a.xa;a.C=a.Ia.Cb(a.vb,4);return a.M&1?0:a.ia(a.C)}function Lg(a,b){a.Ia=a.Sb;a.vb=b&a.xa;a.C=a.Ia.Cb(a.vb,4);return a.M&1?0:a.ia(a.C)}function Mg(a,b){a.M&2||a.ub(a.Ia.Ub(a.vb,1),b)}function Ng(a,b){if(!(a.M&2)){var c=a.Ia.Ub(a.vb,2);a.M&8?(a.ub(c,b),a.ub(a.Ia.Ub(0,1),b>>8),a.M&=-9):a.ib(c,b)}}
function Og(a,b){a.M&2||a.eb(a.Ia.Ub(a.vb,4),b)}function ve(a,b,c){c=b.Cb(c,a.X);a.M&8?(b=a.ya(c)|a.ya(b.Cb(0,1))<<8,a.M&=-9):b=a.nb(c);return b}function Pg(a,b,c,d){c=b.Ub(c,a.X);a.M&8?(a.ub(c,d),a.ub(b.Ub(0,1),d>>8),a.M&=-9):a.fc(c,d)}l.sa=function(){var a=ig(this,1),b=this.ya(this.ea);this.ea=a;return b};function Qg(a){var b=ig(a,2);if(a.M&8){var c=a.ya(a.ea)|a.ya(b-1)<<8;a.M&=-9}else c=a.ja(a.ea);a.ea=b;return c}
function K(a){var b=ig(a,a.Lc);if(a.M&8){var c=a.ya(a.ea)|a.ya(b-1)<<8;a.M&=-9}else c=a.Vb(a.ea);a.ea=b;return c}l.Ha=function(){var a=ig(this,this.X);if(this.M&8){var b=this.ya(this.ea)|this.ya(a-1)<<8;this.M&=-9}else b=this.nb(this.ea);this.ea=a;return b};l.S=function(){var a=ig(this,1),b=this.ya(this.ea)<<24>>24;this.ea=a;return b};
function pe(a){var b=a.nb(a.Ca);a.Ca=a.Ca+a.X|0;var c=(a.Sg>>>0)-(a.Ca>>>0);0>c&&(8088>=a.da?(re(a,a.Ca-a.U.ua&a.U.xa),-1>c&&(b=b&255|a.ya(a.Ca-1)<<8)):-1>c?x.call(a,12,0):(!a.U.fd&&a.U.Sa==a.U.xa||a.U.fd&&!a.U.Sa)&&re(a,a.Ca-a.U.ua&a.U.xa));return b}function ze(a,b){we(a,b,a.X)}
function we(a,b,c,d){d=void 0===d?c:d;var e=a.Ca-c|0,f=(e>>>0)-(a.Cj>>>0);if(0>f){if(8088>=a.da&&-1==f){a.ub(e+1,b>>8);re(a,e-a.U.ua&a.U.xa);a.ub(a.Ca,b);return}if(!a.U.fd&&a.U.Sa==a.U.xa||a.U.fd&&!a.U.Sa){if(f>-c){x.call(a,12,0);return}re(a,e-a.U.ua&a.U.xa);e=a.Ca}else{x.call(a,12,0);return}}switch(d){case 1:a.ub(e,b);break;case 2:a.ib(e,b);break;case 4:a.eb(e,b)}a.Ca=e}
function Rg(a,b,c){var d=4;1==b.length&&(d=1,c=c?1:0);if(80386>a.da)2<b.length&&(b=b.substr(1,2));else if("PS"==b||2<b.length)d=8;a.ma[b]&&(void 0===c&&(Pb(a,"Value for "+b+" is invalid"),Jd(a)),d=!a.aa.Xa||a.aa.mj?p(c,d):"--------".substr(0,d),a.ma[b].textContent!=d&&(a.ma[b].textContent=d))}
l.Kg=function(a){this.aa.complete=!0;var b=this.aa.lj=this.ca&&Sg(this.ca),c=a?this.aa.oi?0:1:-1;this.aa.oi=!1;this.md=this.A=a;this.V&&!a&&Wd(this.V);a||r(this,1024)||(this.M|=4);do{var d=this.M&3312;if(d)this.ha|=d;else if(this.pd=this.ea,this.Ga=this.Fa,this.Sb=this.U,this.C=this.F=-1,this.ha&3072&&Zf(this),this.ha=this.M&256,this.ab){a:{if(!(this.M&4)){d=80286>this.da?0:1;for(var e=0;2>e;e++){switch(d){case 0:if(this.ab&1&&this.P&512){var f=Tg(this.V);if(-1<=f&&(this.ab&=-2,0<=f)){this.ab&=-5;
Ug.call(this,f);d=!0;break a}}break;case 1:if(this.ab&2){this.ab&=-3;80386<=this.da&&(this.Rb[6]|=16384);Ug.call(this,1);d=!0;break a}}d=1-d}}d=!1}if(d&&!a){this.O("interrupt dispatched");this.M=0;break}if(this.ab&4){this.M=this.A=0;break}}if(b){if(Vg(this.ca,this.ea,c)){Jd(this);break}c=1}this.M=0;this.wa[this.sa()].call(this)}while(0<this.A);return this.aa.complete?this.md-this.A:void 0===this.aa.complete?0:-1};var vf=512;
gb(function(){for(var a=Cb(document,"pcx86","cpu"),b=0;b<a.length;b++){var c=a[b],d=Db(c);d=new Ee(d);Bb(d,c)}});
function Wg(a){sb.call(this,"FPU",a);this.da=a.model||8087;this.F=new Float64Array(8);this.L=new Int32Array(this.F.buffer);this.Z=new Float32Array(1);this.ha=new Int32Array(this.Z.buffer);this.K=new Float64Array(1);this.H=new Int32Array(this.K.buffer);this.D=Array(3);this.M=this.N=-1;this.I=this.J=this.P=this.A=0;this.U=new Float64Array(1);this.ba=new Int32Array(this.U.buffer);this.ba[0]=0;this.ba[1]=268402688;Xg(this);this.fa=Wg.prototype.ni;this.ea=Wg.prototype.bl}ia(Wg,sb);l=Wg.prototype;
l.tc=function(a,b,c){this.G=c;this.V=ec(a,"ChipSet");Sb(this)};l.$b=function(a,b){if(!b)if(!a||!this.restore)Xg(this);else if(!this.restore(a))return!1;return!0};l.Zb=function(a){return a?this.save():!0};l.save=function(){var a=new eg(this),b=[],c=0;b[c++]=this.bc;b[c++]=Yg(this);b[c++]=Zg(this);for(var d=0;d<this.F.length;d++)b[c++]=this.F[d];a.set(0,b);return a.data()};
l.restore=function(a){a=a[0];var b=0;this.bc=a[b++]&-57409;var c=a[b++];this.ga=c&-14337;this.B=(c&14336)>>11;lh(this);mh(this,a[b++]);for(c=0;c<this.F.length;c++)this.F[c]=a[b++];return!0};function Xg(a){a.C=0;a.bc=959;a.ga=0;a.B=0;a.V&&(a=a.V,a.da>=nh&&oh(a,ph))}function lh(a){a.ga&=-129;a.ga&~a.bc&63&&(a.ga|=128);if(a.ga&128&&!(a.bc&128))return a=a.V,a.da>=nh?qh(a,ph):a.fa&rh||Ug.call(a.G,2),!0;a=a.V;a.da>=nh&&oh(a,ph);return!1}function sh(a,b){80387<=a.da||(b&=-65);a.ga|=b;return lh(a)}
function Yg(a){return a.ga|a.B<<11}function th(a,b){return isFinite(b)?!0:!sh(a,Infinity===b?8:16)}function uh(a,b,c){var d=null;null!=b&&null!=c&&(d=b+c,th(a,d)||(d=null));return d}function vh(a,b,c){var d=null;null!=b&&null!=c&&(d=b-c,th(a,d)||(d=null));return d}function wh(a,b,c){var d=null;null!=b&&null!=c&&(d=b*c,th(a,d)||(d=null));return d}function xh(a,b,c){var d=null;null==b||null==c||!c&&sh(a,2)||(d=b/c,th(a,d)||(d=null));return d}
function yh(a,b,c){if(null!=b&&null!=c){var d=0;isNaN(b)||isNaN(c)?d=17664:(b-=c,0>b?d=256:0===b&&(d=16384));a.ga=a.ga&-18177|d;return!0}return!1}function zh(a,b,c){if(null==b)return null;var d=a.bc&3072;0==d?(d=Math.round(b),.5===d-b&&d%2&&d--):d=1024==d||3072==d&&0<b?Math.floor(b):Math.ceil(b);if(c){if(d>=c){if(sh(a,1))return null;d=-c}else if(d<-c){if(sh(a,1))return null;d=-c}a.H[0]=d|0;2147483648<c&&(a.H[1]=d/4294967296|0,!a.H[1]&&0>d&&(a.H[1]=-1))}return d}
function Ah(a,b){var c=3;a.C&1<<b&&(a=a.F[b],c=0,0===a?c=1:isFinite(a)||(c=2));return c}function Zg(a){for(var b=0,c=a.F.length-1;0<=c;c--)b<<=2,b|=Ah(a,c);return b}function mh(a,b){a.C=0;for(var c=1;128>=c;c<<=1)3!=(b&3)&&(a.C|=c),b>>=2}function Bh(a){var b=a.B+0&7;return a.C&1<<b?(a.Z[0]=a.F[b],!0):sh(a,1)?!1:(a.Z[0]=a.U[0],!0)}function Ch(a){var b=a.B+0&7;return a.C&1<<b?(a.K[0]=a.F[b],!0):sh(a,1)?!1:(a.K[0]=a.U[0],!0)}
function L(a,b){var c=null;b=a.B+b&7;a.C&1<<b?c=a.F[b]:sh(a,1)||(c=a.U[0]);return c}function M(a,b,c){return null!=c&&(isNaN(c)?!sh(a,1):1)?(b=a.B+b&7,a.F[b]=c,a.C|=1<<b,!0):!1}function Dh(a,b,c){var d=null;b=a.B+b&7;if(c||a.C&1<<b||!sh(a,1))c=b<<1,d=Eh(a,a.L[c],a.L[c+1]);return d}function Fh(a){return a.G.ja(a.G.C)<<16>>16}function Gh(a){return a.G.ia(a.G.C)}function Hh(a){a.ha[0]=a.G.ia(a.G.C);return a.Z[0]}function Ih(a){a.H[0]=a.G.ia(a.G.C);a.H[1]=a.G.ia(a.G.C+4);return a.K[0]}
function Jh(a){a.D[0]=a.G.ia(a.G.C);a.D[1]=a.G.ia(a.G.C+4);a.D[2]=a.G.ja(a.G.C+8);return a.D}l.ni=function(){this.G.eb(this.G.C,this.H[0])};l.bl=function(){this.G.eb(this.G.C,this.H[0]);this.G.eb(this.G.C+4,this.H[1])};function Kh(a){a.G.eb(a.G.C,a.D[0]);a.G.eb(a.G.C+4,a.D[1]);a.G.ib(a.G.C+8,a.D[2])}function Lh(a,b){var c=b[1],d=(b[2]&32768)>>4,e=b[2]&32767;b=b[0]>>>11|c<<21;c=c>>11&1048575;32767==e?e=2047:e&&(e+=-15360,0>=e&&(e=2047,b=c=0));a.H[0]=b;a.H[1]=c|(d|e)<<20;return a.K[0]}
function Eh(a,b,c){var d=c>>20&2047,e=2147483648|(c&1048575)<<11|b>>>21;2047==d?d=32767:d?d+=15360:e&=2147483647;a.D[0]=b<<11;a.D[1]=e;a.D[2]=c>>16&32768|d;return a.D}function Mh(a,b){for(var c=0,d=1;b--;)c+=(a&15)*d,d*=10,a>>=4;return c}function Nh(a,b){for(var c=0,d=0;b--;)c|=a%10<<d,a/=10,d+=4;return c}function Oh(a){var b=null,c=1<<a.B;if(!(a.C&c)&&(a.ga&=-513,sh(a,65)))return b;a.C&=~c;b=a.F[a.B];a.B=a.B+1&7;return b}
function Ph(a,b){if(null!=b){var c=a.B-1&7,d=1<<c;if(a.C&d&&(a.ga|=512,sh(a,65)))return;if(isNaN(b)&&sh(a,1)){if(sh(a,1))return;b=NaN}a.F[a.B=c]=b;a.C|=d}}
function Qh(a,b){var c=a.G;var d=c.nb(b);a.bc=d&-57409;d=c.nb(b+=c.X);a.ga=d&-14337;a.B=(d&14336)>>11;lh(a);mh(a,c.nb(b+=c.X));!(c.ra&1)||c.P&131072?(a.I=c.nb(b+=c.X),d=c.nb(b+=c.X),a.P=d&2047,a.I|=(d&-4096)<<4,a.M=-1,a.J=c.nb(b+=c.X),a.J|=(c.nb(b+=c.X)&-4096)<<4,a.N=-1):(a.I=c.nb(b+=c.X),d=c.nb(b+=c.X),a.M=d&65535,a.P=d>>16&2047,a.J=c.nb(b+=c.X),a.N=c.nb(b+=c.X)&65535);return b+c.X}
function Rh(a,b){var c=a.G;c.fc(b,a.bc);c.fc(b+=c.X,Yg(a));c.fc(b+=c.X,Zg(a));if(!(c.ra&1)||c.P&131072){var d=(a.M<<4)+a.I;c.fc(b+=c.X,d);c.fc(b+=c.X,d>>4&-4096|a.P);d=(a.N<<4)+a.J;c.fc(b+=c.X,d);c.fc(b+=c.X,d>>4&-4096)}else c.fc(b+=c.X,a.I),c.fc(b+=c.X,a.M|a.P<<16),c.fc(b+=c.X,a.J),c.fc(b+=c.X,a.N);return b+c.X}function Sh(){this.ga&=-32896;lh(this)}function Th(){yh(this,L(this,0),L(this,this.A))}function Uh(){yh(this,L(this,0),L(this,this.A))&&Oh(this)}function Vh(){Uh.call(this)}
function Wh(){M(this,0,xh(this,L(this,0),Hh(this)))}function Xh(){this.C&=~(1<<this.B)}function Yh(){Xg(this)}function Zh(){this.bc=this.G.ja(this.G.C)&-57409}function $h(){Qh(this,this.G.C)}function ai(){for(var a=this.G,b=Qh(this,a.C),c=this.D,d=0;d<this.F.length;d++)c[0]=a.ia(b),c[1]=a.ia(b+=4),c[2]=a.ja(b+=4),c&&M(this,d,Lh(this,c)),b+=2}function bi(){for(var a=this.G,b=Rh(this,a.C),c=0;c<this.F.length;c++){var d=Dh(this,c,!0);a.eb(b,d[0]);a.eb(b+=4,d[1]);a.ib(b+=4,d[2]);b+=2}Xg(this)}
function ci(){Rh(this,this.G.C);this.bc|=63}function di(){M(this,this.A,L(this,0))&&Oh(this)}function ei(){di.call(this)}function fi(){this.G.ib(this.G.C,this.bc)}function gi(){this.G.ib(this.G.C,Yg(this))}function hi(){80287<=this.da&&(this.G.D=this.G.D&-65536|Yg(this))}function ii(){var a=L(this,0);M(this,0,L(this,this.A));M(this,this.A,a)}function ji(){ii.call(this)}
var ki=Math.log(10)/Math.LN2,li=Math.LOG2E,mi=Math.PI,ni=Math.log(2)/Math.LN10,oi=Math.LN2,pi=Math.pow(2,63),qi={216:{0:function(){M(this,0,uh(this,L(this,0),Hh(this)))},1:function(){M(this,0,wh(this,L(this,0),Hh(this)))},2:function(){yh(this,L(this,0),Hh(this))},3:function(){yh(this,L(this,0),Hh(this))&&Oh(this)},4:function(){M(this,0,vh(this,L(this,0),Hh(this)))},5:function(){M(this,0,vh(this,Hh(this),L(this,0)))},6:Wh,7:Wh,48:function(){M(this,0,uh(this,L(this,0),L(this,this.A)))},49:function(){M(this,
0,wh(this,L(this,0),L(this,this.A)))},50:Th,51:Uh,52:function(){M(this,0,vh(this,L(this,0),L(this,this.A)))},53:function(){M(this,0,vh(this,L(this,this.A),L(this,0)))},54:function(){M(this,0,xh(this,L(this,0),L(this,this.A)))},55:function(){M(this,0,xh(this,L(this,this.A),L(this,0)))}},217:{0:function(){Ph(this,Hh(this))},2:function(){Bh(this)&&this.fa()},3:function(){Bh(this)&&(this.fa(),Oh(this))},4:$h,5:Zh,6:ci,7:fi,48:function(){Ph(this,L(this,this.A))},49:ii,50:function(){},51:ei,64:function(){M(this,
0,-L(this,0))},65:function(){M(this,0,Math.abs(L(this,0)))},68:function(){yh(this,L(this,0),0)},69:function(){this.ga&=-18177;this.L[((this.B+0&7)<<1)+1]&-2147483648&&(this.ga|=512);if(3==Ah(this,this.B))this.ga|=16640;else{var a=L(this,0);this.ga=isNaN(a)?this.ga|256:0===a?this.ga|16384:Infinity===a||-Infinity===a?this.ga|1280:this.ga|1024}},80:function(){Ph(this,1)},81:function(){Ph(this,ki)},82:function(){Ph(this,li)},83:function(){Ph(this,mi)},84:function(){Ph(this,ni)},85:function(){Ph(this,
oi)},86:function(){Ph(this,0)},96:function(){M(this,0,Math.pow(2,L(this,0))-1)},97:function(){M(this,1,L(this,1)*Math.log(L(this,0))/Math.LN2)&&Oh(this)},98:function(){M(this,0,Math.tan(L(this,0)))&&Ph(this,1)},99:function(){M(this,1,Math.atan2(L(this,1),L(this,0)))&&Oh(this)},100:function(){var a=L(this,0);null!=a&&(this.K[0]=a,M(this,0,(this.H[1]>>20&2047)-1023),this.H[1]=(this.H[1]|1072693248)&-1073741825,Ph(this,this.K[0]))},102:function(){this.B=this.B-1&7;this.ga&=-513},103:function(){this.B=
this.B+1&7;this.ga&=-513},112:function(){M(this,0,L(this,0)%L(this,1))},113:function(){M(this,1,L(this,1)*Math.log(L(this,0)+1)/Math.LN2)&&Oh(this)},114:function(){var a=L(this,0),b=null;if(0<=a||!sh(this,1))b=Math.sqrt(a),th(this,b)||(b=null);M(this,0,b)},116:function(){M(this,0,zh(this,L(this,0),pi))},117:function(){var a=L(this,0),b=L(this,1);null!=a&&null!=b&&M(this,0,a*Math.pow(2,0<b?Math.floor(b):Math.ceil(b)))}},218:{0:function(){M(this,0,uh(this,L(this,0),Gh(this)))},1:function(){M(this,0,
wh(this,L(this,0),Gh(this)))},2:function(){yh(this,L(this,0),Gh(this))},3:function(){yh(this,L(this,0),Gh(this))&&Oh(this)},4:function(){M(this,0,vh(this,L(this,0),Gh(this)))},5:function(){M(this,0,vh(this,Gh(this),L(this,0)))},6:function(){M(this,0,xh(this,L(this,0),Gh(this)))},7:function(){M(this,0,xh(this,Gh(this),L(this,0)))}},219:{0:function(){Ph(this,Gh(this))},2:function(){null!=zh(this,L(this,0),2147483648)&&this.ni()},3:function(){null!=zh(this,L(this,0),2147483648)&&(this.ni(),Oh(this))},
5:function(){Ph(this,Lh(this,Jh(this)))},7:function(){Dh(this,0)&&(Kh(this),Oh(this))},64:function(){8087==this.da&&(this.bc&=-129)},65:function(){8087==this.da&&(this.bc|=128)},66:Sh,67:Yh,68:function(){},115:function(){}},220:{0:function(){M(this,0,uh(this,L(this,0),Ih(this)))},1:function(){M(this,0,wh(this,L(this,0),Ih(this)))},2:function(){yh(this,L(this,0),Ih(this))},3:function(){yh(this,L(this,0),Ih(this))&&Oh(this)},4:function(){M(this,0,vh(this,L(this,0),Ih(this)))},5:function(){M(this,0,
vh(this,Ih(this),L(this,0)))},6:function(){M(this,0,xh(this,L(this,0),Ih(this)))},7:function(){M(this,0,xh(this,Ih(this),L(this,0)))},48:function(){M(this,this.A,uh(this,L(this,this.A),L(this,0)))},49:function(){M(this,this.A,wh(this,L(this,this.A),L(this,0)))},50:function(){Th.call(this)},51:Vh,52:function(){M(this,this.A,vh(this,L(this,0),L(this,this.A)))},53:function(){M(this,this.A,vh(this,L(this,this.A),L(this,0)))},54:function(){M(this,this.A,xh(this,L(this,0),L(this,this.A)))},55:function(){M(this,
this.A,xh(this,L(this,this.A),L(this,0)))}},221:{0:function(){Ph(this,Ih(this))},2:function(){Ch(this)&&this.ea()},3:function(){Ch(this)&&(this.ea(),Oh(this))},4:ai,6:bi,7:gi,48:Xh,49:ji,50:function(){M(this,this.A,L(this,0))},51:di},222:{0:function(){M(this,0,uh(this,L(this,0),Fh(this)))},1:function(){M(this,0,wh(this,L(this,0),Fh(this)))},2:function(){yh(this,L(this,0),Fh(this))},3:function(){yh(this,L(this,0),Fh(this))&&Oh(this)},4:function(){M(this,0,vh(this,L(this,0),Fh(this)))},5:function(){M(this,
0,vh(this,Fh(this),L(this,0)))},6:function(){M(this,0,xh(this,L(this,0),Fh(this)))},7:function(){M(this,0,xh(this,Fh(this),L(this,0)))},48:function(){M(this,this.A,uh(this,L(this,this.A),L(this,0)))&&Oh(this)},49:function(){M(this,this.A,wh(this,L(this,this.A),L(this,0)))&&Oh(this)},50:Vh,51:function(){yh(this,L(this,0),L(this,1))&&null!=Oh(this)&&Oh(this)},52:function(){M(this,this.A,vh(this,L(this,0),L(this,this.A)))&&Oh(this)},53:function(){M(this,this.A,vh(this,L(this,this.A),L(this,0)))&&Oh(this)},
54:function(){M(this,this.A,xh(this,L(this,0),L(this,this.A)))&&Oh(this)},55:function(){M(this,this.A,xh(this,L(this,this.A),L(this,0)))&&Oh(this)}},223:{0:function(){Ph(this,Fh(this))},2:function(){null!=zh(this,L(this,0),32768)&&this.G.ib(this.G.C,this.H[0])},3:function(){null!=zh(this,L(this,0),32768)&&(this.G.ib(this.G.C,this.H[0]),Oh(this))},4:function(){var a=Jh(this),b=Mh(a[0],8)+1E8*Mh(a[1],8)+1E16*Mh(a[2],2);a[2]&32768&&(b=-b);Ph(this,b)},5:function(){var a=this.G.ia(this.G.C);a=4294967296*
this.G.ia(this.G.C+4)+(a>>>0);Ph(this,a)},6:function(){var a=zh(this,Oh(this));null!=a&&(this.D[0]=Nh(a,8),this.D[1]=Nh(a/1E8,8),this.D[2]=Nh(a/1E16,2),0>a&&(this.D[2]|=32768),Kh(this))},7:function(){null!=zh(this,L(this,0),pi)&&(this.bl(),Oh(this))},48:function(){Xh.call(this);Oh(this)},49:ji,50:ei,51:ei,52:hi}},ri=[Sh,Yh,Zh,$h,ai,bi,fi,ci,gi,hi];gb(function(){for(var a=Cb(document,"pcx86","fpu"),b=0;b<a.length;b++){var c=a[b],d=Db(c);d=new Wg(d);Bb(d,c)}});
function si(a,b){var c=a+b+xg(this)|0;kg(this,a,b,c,191);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Nb:this.B.Bc;return c&255}function ti(a,b){var c=a+b+xg(this)|0;kg(this,a,b,c,this.Ib|63);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Nb:this.B.Bc;return c&this.R}function ui(a,b){var c=a+b|0;kg(this,a,b,c,191);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Nb:this.B.Bc;return c&255}
function vi(a,b){var c=a+b|0;kg(this,a,b,c,this.Ib|63);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Nb:this.B.Bc;return c&this.R}function wi(a,b){a&=b;rg(this,a,128);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Nb:this.B.Bc;return a}function xi(a,b){this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Nb:this.B.Bc;return rg(this,a&b,this.Ib)&this.R}function yi(a,b){this.A-=10+(-1===this.C?0:1);if((a&3)<(b&3))return a=a&-4|b&3,Bg(this),a;zg(this);return a}
function zi(a){if(-1===this.C)return x.call(this,6),a;var b=a,c=this.nb(this.C),d=this.nb(this.C+this.X);2==this.X&&(b=a<<16>>16,c=c<<16>>16,d=d<<16>>16);this.A-=this.B.Kj;(b<c||b>d)&&x.call(this,5);this.M|=2;return a}function Ai(a,b){var c=0;if(b){zg(this);for(var d=1;d&this.R;){if(b&d){a=c;break}d<<=1;c++}}else Bg(this);this.A-=11+3*c;return a}function Bi(a,b){var c=0;if(b){zg(this);for(var d=2==this.X?15:31,e=1<<d;e;){if(b&e){a=d;break}e>>>=1;c++;d--}}else Bg(this);this.A-=11+3*c;return a}
function Ci(a,b){a&1<<(b&(2==this.X?15:31))?sg(this):tg(this);this.A-=-1===this.C?3:6;this.M|=2;return a}function Di(a,b){b=1<<(b&(2==this.X?15:31));a&b?sg(this):tg(this);this.A-=-1===this.C?6:8;return a^b}function Ei(a,b){b=1<<(b&(2==this.X?15:31));a&b?sg(this):tg(this);this.A-=-1===this.C?6:8;return a&~b}function Fi(a,b){b=1<<(b&(2==this.X?15:31));a&b?sg(this):tg(this);this.A-=-1===this.C?6:8;return a|b}
function Gi(a,b){if(-1===this.C)return Ci.call(this,a,b);var c=this.X<<3;if(b>=c||b<-c)a=Jg(this,this.Ia,this.vb+(b>>(2==this.X?4:5))*this.X);b=1<<(b&(2==this.X?15:31));a&b?sg(this):tg(this);this.A-=6;this.M|=2;return a}function Hi(a,b){if(-1===this.C)return Di.call(this,a,b);var c=this.X<<3;if(b>=c||b<-c)a=Jg(this,this.Ia,this.vb+(b>>(2==this.X?4:5))*this.X);b=1<<(b&(2==this.X?15:31));a&b?sg(this):tg(this);this.A-=8;return a^b}
function Ii(a,b){if(-1===this.C)return Ei.call(this,a,b);var c=this.X<<3;if(b>=c||b<-c)a=Jg(this,this.Ia,this.vb+(b>>(2==this.X?4:5))*this.X);b=1<<(b&(2==this.X?15:31));a&b?sg(this):tg(this);this.A-=8;return a&~b}function Ji(a,b){if(-1===this.C)return Fi.call(this,a,b);var c=this.X<<3;if(b>=c||b<-c)a=Jg(this,this.Ia,this.vb+(b>>(2==this.X?4:5))*this.X);b=1<<(b&(2==this.X?15:31));a&b?sg(this):tg(this);this.A-=8;return a|b}
function Ki(a,b){kg(this,a,b,a-b|0,191,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Bh:this.B.Nb;this.M|=2;return a}function Li(a,b){kg(this,a,b,a-b|0,this.Ib|63,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Bh:this.B.Nb;this.M|=2;return a}
function Mi(a){if(this.Kc){var b=this.Kc,c=this.uj,d=this.fa,e=d>>3&7;b.A=d&7;var f=(3>(d>>6&3)?0:48)+e;(217==c||219==c)&&52<=f&&(f=e<<4|b.A);if(e=qi[c][f]){if(0>ri.indexOf(e)){f=b.G;var g=f.pd;8087==b.da&&(f.ha&16&&g++,f.ha&32&&g++);b.M=f.ba.T;b.I=g-f.ba.ua;-1!==f.C&&(b.N=f.Ia.T,b.J=f.C-f.Ia.ua);b.P=(c&7)<<8|d}e.call(b)}}this.A-=-1===this.C?2:8;return a}function Ni(a){if(80186>this.da)return Oi.call(this,a);x.call(this,13,0);return a}function cf(a){x.call(this,6);return a}
function Oi(a){ff.call(this);return a}function Pi(a,b){a=Qi.call(this,this.S(),b);80386>this.da&&(this.A-=12);return a}function Ri(a,b){a=this.Ha();a=2==this.X?Qi.call(this,a,b):Si.call(this,a,b);80386>this.da&&(this.A-=12);return a}function Ti(a,b){var c=!1;0>b&&(b=-b|0,c=!c);0>a&&(a=-a|0,c=!c);Ui.call(this,a,b);c&&(this.Ea=~this.Ea+1|0,this.cb=~this.cb+(this.Ea?0:1)|0)}
function Qi(a,b){a=(a<<16>>16)*(b<<16>>16)|0;32767<a||-32768>a?(sg(this),ug(this)):(tg(this),vg(this));this.A-=-1===this.C?9:12;return a&65535}function Si(a,b){Ti.call(this,a,b);this.cb!=this.Ea>>31?(sg(this),ug(this)):(tg(this),vg(this));this.A-=-1===this.C?9:12;return this.Ea}function Vi(a,b){this.A-=14+(-1===this.C?0:2);zg(this);-1!==this.zb.load(b)&&this.zb.qc>=this.Pa&&this.zb.qc>=(b&3)&&(Bg(this),a=this.zb.ob&-256,2<this.X&&(a|=(this.zb.ext&-65281)<<16));return a}
function Wi(a,b){if(-1===this.C)return ff.call(this),a;xe(this,this.ja(this.C+this.X));this.A-=this.B.We;return b}function Xi(){this.A-=this.B.mk;return this.C}function Yi(a,b){if(-1===this.C)return ff.call(this),a;ye(this,this.ja(this.C+this.X));this.A-=this.B.We;return b}function Zi(a,b){if(-1===this.C)return ff.call(this),a;a=this.ja(this.C+this.X);this.Ka.load(a);this.A-=this.B.We;return b}
function $i(a,b){if(-1===this.C)return ff.call(this),a;a=this.ja(this.C+this.X);this.La.load(a);this.A-=this.B.We;return b}function aj(a,b){this.A-=14+(-1===this.C?0:2);if(b&65528&&-1!==this.zb.load(b)&&(7168==(this.zb.ob&7168)||this.zb.qc>=this.Pa)&&this.zb.qc>=(b&3))return Bg(this),this.zb.Sa;zg(this);return a}function bj(a,b){if(-1===this.C)return ff.call(this),a;qe(this,this.ja(this.C+this.X));this.A-=this.B.We;return b}
function cj(a,b){this.A-=-1===this.F?-1===this.C?this.B.uk:this.B.tk:this.B.rk;return b}function dj(a,b){switch(this.fa>>3&7){case 4:this.Aa=this.D;break;case 5:this.Aa=this.I;break;case 6:this.Aa=this.L;break;case 7:this.Aa=this.H}return b}function ej(a,b){return b}
function fj(a,b){a=this.fa>>3&7;switch(a){case 0:this.Aa=this.D;break;case 2:this.Aa=this.L;break;case 3:this.Aa=this.H;break;default:if(80286==this.da||80386==this.da&&4!=a&&5!=a)x.call(this,6);else switch(a){case 1:this.Aa=this.I;break;case 4:this.Aa=y(this);break;case 5:this.Aa=this.N;break;case 6:this.Aa=this.K;break;case 7:this.Aa=this.J}}return cj.call(this,0,b)}
function gj(a,b){switch(this.fa>>3&7){case 0:b=this.pa.T;break;case 1:b=this.ba.T;break;case 2:b=this.U.T;break;case 3:b=this.Fa.T;break;case 4:if(80386<=this.da){b=this.Ka.T;break}x.call(this,6);b=a;break;case 5:if(80386<=this.da){b=this.La.T;break}default:x.call(this,6),b=a}-1!==this.F&&ue(this,2);return cj.call(this,0,b)}
function Ui(a,b){if(a&-65536||b&-65536){var c=b&65535;b>>>=16;var d=a&65535;a>>>=16;var e=c*d;d=(e>>>16)+b*d;var f=d>>>16;d=(d&65535)+c*a;this.Ea=d<<16|e&65535;this.cb=f+((d>>>16)+b*a)|0}else this.Ea=a*b|0,this.cb=0}function hj(a,b){this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Nb:this.B.Bc;return rg(this,a|b,128)}function rj(a,b){this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Nb:this.B.Bc;return rg(this,a|b,this.Ib)&this.R}
function sj(a,b){var c=a-b-xg(this)|0;kg(this,a,b,c,191,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Nb:this.B.Bc;return c&255}function tj(a,b){var c=a-b-xg(this)|0;kg(this,a,b,c,this.Ib|63,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Nb:this.B.Bc;return c&this.R}function uj(){return qg(this)?1:0}function vj(){return lg(this)?1:0}function wj(){return lg(this)?0:1}function xj(){return og(this)?1:0}function yj(){return og(this)?0:1}function zj(){return lg(this)||og(this)?1:0}
function Aj(){return lg(this)||og(this)?0:1}function Bj(){return pg(this)?1:0}function Cj(){return pg(this)?0:1}function Dj(){return mg(this)?1:0}function Ej(){return mg(this)?0:1}function Fj(){return!pg(this)!=!qg(this)?1:0}function Gj(){return!pg(this)!=!qg(this)?0:1}function Hj(){return og(this)||!pg(this)!=!qg(this)?1:0}function Ij(){return og(this)||!pg(this)!=!qg(this)?0:1}function Jj(a,b){return Kj.call(this,a,b,this.sa())}function Lj(a,b){return Mj.call(this,a,b,this.sa())}
function Nj(a,b){return Kj.call(this,a,b,this.I&31)}function Oj(a,b){return Mj.call(this,a,b,this.I&31)}function Pj(a,b){return Qj.call(this,a,b,this.sa())}function Rj(a,b){return Sj.call(this,a,b,this.sa())}function Tj(a,b){return Qj.call(this,a,b,this.I&31)}function Uj(a,b){return Sj.call(this,a,b,this.I&31)}function Vj(a,b){var c=a-b|0;kg(this,a,b,c,191,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Nb:this.B.Bc;return c&255}
function Wj(a,b){var c=a-b|0;kg(this,a,b,c,this.Ib|63,!0);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Nb:this.B.Bc;return c&this.R}function Xj(a,b){rg(this,a&b,128);this.A-=-1===this.F?-1===this.C?this.B.ci:this.B.Ef:this.B.Ef;this.M|=2;return a}function Yj(a,b){rg(this,a&b,this.Ib);this.A-=-1===this.F?-1===this.C?this.B.ci:this.B.Ef:this.B.Ef;this.M|=2;return a}function Zj(a,b){var c=this.D&this.R,d=(1<<(this.I&31))-1;return a&~(d<<c)|(b&d)<<c}
function ak(a,b){return b>>(this.D&this.R)&(1<<(this.I&31))-1&this.R}function bk(a,b){if(-1===this.C){switch(this.fa&7){case 0:this.D=this.D&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.L=this.L&-256|a;break;case 3:this.H=this.H&-256|a;break;case 4:this.D=this.D&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.L=this.L&-65281|a<<8;break;case 7:this.H=this.H&-65281|a<<8}this.A-=this.B.ei}else this.F=this.C,Mg(this,a),this.A-=this.B.di;return b}
function ck(a,b){if(-1===this.C){switch(this.fa&7){case 0:this.D=this.D&~this.R|a;break;case 1:this.I=this.I&~this.R|a;break;case 2:this.L=this.L&~this.R|a;break;case 3:this.H=this.H&~this.R|a;break;case 4:re(this,y(this)&~this.R|a);break;case 5:this.N=this.H&~this.R|a;break;case 6:this.K=this.K&~this.R|a;break;case 7:this.J=this.J&~this.R|a}this.A-=this.B.ei}else{this.F=this.C;if(!(this.M&2)){var c=this.Ia.Ub(this.vb,this.X);this.M&8?(this.ub(c,a),this.ub(this.Ia.Ub(0,1),a>>8),this.M&=-9):this.fc(c,
a)}this.A-=this.B.di}return b}function dk(a,b){a^=b;rg(this,a,128);this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Nb:this.B.Bc;return a}function ek(a,b){this.A-=-1===this.F?-1===this.C?this.B.mc:this.B.Nb:this.B.Bc;return rg(this,a^b,this.Ib)&this.R}function fk(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}function gk(a){var b=a-1|0;kg(this,a,1,b,this.Ib|62,!0);this.A-=2;return a&~this.R|b&this.R}
function hk(a,b,c){c>>>=0;if(!c||c<=b>>>0)return!1;var d=0,e=1,f=this.zn;f[0]=c>>>0;f[1]=0;c=this.Gn;c[0]=a>>>0;for(c[1]=b>>>0;0<fk(c,f);)b=a=f,a[0]+=b[0],a[1]+=b[1],4294967295<a[0]&&(a[0]>>>=0,a[1]++),e+=e;do 0<=fk(c,f)&&(a=c,b=f,a[0]-=b[0],a[1]-=b[1],0>a[0]&&(a[0]>>>=0,a[1]--),d+=e),a=f,a[0]>>>=1,a[1]&1&&(a[0]=(a[0]|2147483648)>>>0),a[1]>>>=1,e/=2;while(1<=e);this.Ea=d;this.cb=c[0];return!0}function ik(a){var b=a+1|0;kg(this,a,1,b,this.Ib|62);this.A-=2;return a&~this.R|b&this.R}
function jk(a){this.ra=a;te(this);this.ra&-2147483648?uf(this):Cf(this)}function kk(a){this.M|=1;this.uc.call(this,a);this.A-=-1===this.C?4:5}function Kj(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a<<c-1;a=(d<<1|b>>>16-c)&65535;rg(this,a,32768,d&32768)}return a}function Mj(a,b,c){if(c){var d=a<<c-1;a=d<<1|b>>>32-c;rg(this,a,-2147483648,d&-2147483648)}return a}function Qj(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a>>>c-1;a=(d>>>1|b<<16-c)&65535;rg(this,a,32768,d&1)}return a}
function Sj(a,b,c){if(c){var d=a>>>c-1;a=d>>>1|b<<32-c;rg(this,a,-2147483648,d&1)}return a}function lk(){this.A-=-1===this.C?2:this.B.Hk;return 1}function mk(){var a=this.I&255;this.A-=(-1===this.C?this.B.Wh:this.B.Vh)+(a<<this.B.Xh);return a}function nk(){var a=this.sa();this.A-=(-1===this.C?this.B.Wh:this.B.Vh)+(a<<this.B.Xh);return a}function ok(){return null}function pk(){return this.Aa}
function qk(a,b){this.od=this.ba.T;this.Tc=this.U.T;this.ta=this.Ca;var c=z(this),d=this.X;null!=De(this,a,b,!0)&&(we(this,this.od,d,2),we(this,c,d,d));this.od=this.Tc=this.ta=-1}function rk(a,b,c){this.A-=this.B.ek+(c||0);c=Be(this);var d=this.ba.T,e=z(this);a=this.ba.Fj(a);-1!==a&&(ze(this,c),ze(this,d),ze(this,e),null!=b&&ze(this,b),this.Sc=-1,hg(this,a))}
function sk(a){this.Tc=this.U.T;this.ta=this.Ca;var b=pe(this),c=pe(this);a&&re(this,y(this)+a);De(this,b,c,!1)&&(a&&re(this,y(this)+a),tk.call(this,this.Fa),tk.call(this,this.pa),80386<=this.da&&(tk.call(this,this.Ka),tk.call(this,this.La)));2==a&&this.Xf&&bg(this,this.ea);this.Tc=this.ta=-1}function uk(){8086==this.da?(this.Sc=-1,rk.call(this,0,null,2)):x.call(this,0,null,2)}function Ug(a,b){this.Sc=a;void 0===b&&(b=11);rk.call(this,a,null,b)}
function x(a,b,c,d){var e=!1;this.aa.complete?80186<=this.da&&(e=!0,0>this.Sc?(-1!=this.od&&(this.od!==this.ba.T&&(this.ba.Db=this.od&3,gg(this,this.od)),this.od=-1),this.pd!==this.ea&&hg(this,this.pd),-1!=this.Tc&&(this.Tc!==this.U.T&&qe(this,this.Tc),this.Tc=-1),-1!==this.ta&&(this.ta!==this.Ca&&re(this,this.Ac&~this.U.xa|this.ta-this.U.ua),this.ta=-1)):8!=this.Sc?(b=0,a=8):(b=0,a=-1,sf(this),e=d=!1)):hg(this,this.pd);var f=a,g=b,h=32,k=Eg(this,this.ea);204!=k||this.ad||(d=!1);this.P&131072&&(6==
f&&99==k||13==f&&205==k)&&(d=!1);!1===d&&(h|=1);983040<=this.ea&&1048575>=this.ea&&(d=!1);r(this,h|-2147483648)&&(d=!0);if(r(this,h)||d){var m=this.aa.Xa;f="Fault "+va(f)+(null!=g?" ("+wa(g)+")":"")+" on opcode "+va(k);d&&m&&(f+=" (blocked)");this.ca?(Wb(this,f,d||h,!0),d&&(d=m,vk(this.ca))):(this.Da(f),Jd(this))}if(d&&e)throw-1;if(e)throw this.Sc=a,rk.call(this,a,b,c),this.pd=this.ea,this.M=1==a?this.M|8192:this.M|4096,a;}
function wf(a,b,c){this.qd=a;a=0;b&&(a|=1);c&&(a|=2);3==this.Pa&&(a|=4);x.call(this,14,a)}function tk(a){var b=a.ob&7680;a.T&65528&&(6144==b||7168==b||7168>b&&a.qc<this.Pa&&a.qc<(a.T&3))&&a.load(0)}
function Gf(a){switch((this.fa=this.sa())&199){case 0:var b=D(this,this.H+this.K);this.A-=this.B.Qc;break;case 1:b=D(this,this.H+this.J);this.A-=this.B.Rc;break;case 2:b=Ig(this,this.N+this.K);this.A-=this.B.Rc;break;case 3:b=Ig(this,this.N+this.J);this.A-=this.B.Qc;break;case 4:b=D(this,this.K);this.A-=this.B.xc;break;case 5:b=D(this,this.J);this.A-=this.B.xc;break;case 6:b=D(this,K(this));this.A-=this.B.yd;break;case 7:b=D(this,this.H);this.A-=this.B.xc;break;case 64:b=D(this,this.H+this.K+this.S());
this.A-=this.B.Wb;break;case 65:b=D(this,this.H+this.J+this.S());this.A-=this.B.Xb;break;case 66:b=Ig(this,this.N+this.K+this.S());this.A-=this.B.Xb;break;case 67:b=Ig(this,this.N+this.J+this.S());this.A-=this.B.Wb;break;case 68:b=D(this,this.K+this.S());this.A-=this.B.Za;break;case 69:b=D(this,this.J+this.S());this.A-=this.B.Za;break;case 70:b=Ig(this,this.N+this.S());this.A-=this.B.Za;break;case 71:b=D(this,this.H+this.S());this.A-=this.B.Za;break;case 128:b=D(this,this.H+this.K+K(this));this.A-=
this.B.Wb;break;case 129:b=D(this,this.H+this.J+K(this));this.A-=this.B.Xb;break;case 130:b=Ig(this,this.N+this.K+K(this));this.A-=this.B.Xb;break;case 131:b=Ig(this,this.N+this.J+K(this));this.A-=this.B.Wb;break;case 132:b=D(this,this.K+K(this));this.A-=this.B.Za;break;case 133:b=D(this,this.J+K(this));this.A-=this.B.Za;break;case 134:b=Ig(this,this.N+K(this));this.A-=this.B.Za;break;case 135:b=D(this,this.H+K(this));this.A-=this.B.Za;break;case 192:b=this.D&255;break;case 193:b=this.I&255;break;
case 194:b=this.L&255;break;case 195:b=this.H&255;break;case 196:b=this.D>>8&255;break;case 197:b=this.I>>8&255;break;case 198:b=this.L>>8&255;break;case 199:b=this.H>>8&255;break;default:b=0}var c=this.fa>>3&7;switch(c){case 0:var d=this.D&255;break;case 1:d=this.I&255;break;case 2:d=this.L&255;break;case 3:d=this.H&255;break;case 4:d=this.D>>8&255;break;case 5:d=this.I>>8&255;break;case 6:d=this.L>>8&255;break;case 7:d=this.H>>8&255;break;default:d=0}a=a.call(this,d,b);switch(c){case 0:this.D=this.D&
-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.L=this.L&-256|a;break;case 3:this.H=this.H&-256|a;break;case 4:this.D=this.D&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.L=this.L&-65281|a<<8;break;case 7:this.H=this.H&-65281|a<<8}}
function Hf(a){var b=(this.fa=this.sa())&199;switch(b){case 0:var c=D(this,this.H+this.K);this.F=this.C;break;case 1:c=D(this,this.H+this.J);this.F=this.C;break;case 2:c=Ig(this,this.N+this.K);this.F=this.C;break;case 3:c=Ig(this,this.N+this.J);this.F=this.C;break;case 4:c=D(this,this.K);this.F=this.C;break;case 5:c=D(this,this.J);this.F=this.C;break;case 6:c=D(this,K(this));this.F=this.C;break;case 7:c=D(this,this.H);this.F=this.C;break;case 64:c=D(this,this.H+this.K+this.S());this.F=this.C;break;
case 65:c=D(this,this.H+this.J+this.S());this.F=this.C;break;case 66:c=Ig(this,this.N+this.K+this.S());this.F=this.C;break;case 67:c=Ig(this,this.N+this.J+this.S());this.F=this.C;break;case 68:c=D(this,this.K+this.S());this.F=this.C;break;case 69:c=D(this,this.J+this.S());this.F=this.C;break;case 70:c=Ig(this,this.N+this.S());this.F=this.C;break;case 71:c=D(this,this.H+this.S());this.F=this.C;break;case 128:c=D(this,this.H+this.K+K(this));this.F=this.C;break;case 129:c=D(this,this.H+this.J+K(this));
this.F=this.C;break;case 130:c=Ig(this,this.N+this.K+K(this));this.F=this.C;break;case 131:c=Ig(this,this.N+this.J+K(this));this.F=this.C;break;case 132:c=D(this,this.K+K(this));this.F=this.C;break;case 133:c=D(this,this.J+K(this));this.F=this.C;break;case 134:c=Ig(this,this.N+K(this));this.F=this.C;break;case 135:c=D(this,this.H+K(this));this.F=this.C;break;case 192:c=this.D&255;break;case 193:c=this.I&255;break;case 194:c=this.L&255;break;case 195:c=this.H&255;break;case 196:c=this.D>>8&255;break;
case 197:c=this.I>>8&255;break;case 198:c=this.L>>8&255;break;case 199:c=this.H>>8&255;break;default:c=0}switch(this.fa>>3&7){case 0:var d=this.D&255;break;case 1:d=this.I&255;break;case 2:d=this.L&255;break;case 3:d=this.H&255;break;case 4:d=this.D>>8&255;break;case 5:d=this.I>>8&255;break;case 6:d=this.L>>8&255;break;case 7:d=this.H>>8&255;break;default:d=0}a=a.call(this,c,d);switch(b){case 0:case 3:Mg(this,a);this.A-=this.B.Qc;break;case 1:case 2:Mg(this,a);this.A-=this.B.Rc;break;case 4:case 5:case 7:Mg(this,
a);this.A-=this.B.xc;break;case 6:Mg(this,a);this.A-=this.B.yd;break;case 64:case 67:case 128:case 131:Mg(this,a);this.A-=this.B.Wb;break;case 65:case 66:case 129:case 130:Mg(this,a);this.A-=this.B.Xb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Mg(this,a);this.A-=this.B.Za;break;case 192:this.D=this.D&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.D=this.D&-65281|a<<8;break;case 197:this.I=
this.I&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8}}
function If(a,b){var c=(this.fa=this.sa())&199;switch(c){case 0:var d=D(this,this.H+this.K);this.F=this.C;break;case 1:d=D(this,this.H+this.J);this.F=this.C;break;case 2:d=Ig(this,this.N+this.K);this.F=this.C;break;case 3:d=Ig(this,this.N+this.J);this.F=this.C;break;case 4:d=D(this,this.K);this.F=this.C;break;case 5:d=D(this,this.J);this.F=this.C;break;case 6:d=D(this,K(this));this.F=this.C;break;case 7:d=D(this,this.H);this.F=this.C;break;case 64:d=D(this,this.H+this.K+this.S());this.F=this.C;break;
case 65:d=D(this,this.H+this.J+this.S());this.F=this.C;break;case 66:d=Ig(this,this.N+this.K+this.S());this.F=this.C;break;case 67:d=Ig(this,this.N+this.J+this.S());this.F=this.C;break;case 68:d=D(this,this.K+this.S());this.F=this.C;break;case 69:d=D(this,this.J+this.S());this.F=this.C;break;case 70:d=Ig(this,this.N+this.S());this.F=this.C;break;case 71:d=D(this,this.H+this.S());this.F=this.C;break;case 128:d=D(this,this.H+this.K+K(this));this.F=this.C;break;case 129:d=D(this,this.H+this.J+K(this));
this.F=this.C;break;case 130:d=Ig(this,this.N+this.K+K(this));this.F=this.C;break;case 131:d=Ig(this,this.N+this.J+K(this));this.F=this.C;break;case 132:d=D(this,this.K+K(this));this.F=this.C;break;case 133:d=D(this,this.J+K(this));this.F=this.C;break;case 134:d=Ig(this,this.N+K(this));this.F=this.C;break;case 135:d=D(this,this.H+K(this));this.F=this.C;break;case 192:d=this.D&255;break;case 193:d=this.I&255;break;case 194:d=this.L&255;break;case 195:d=this.H&255;break;case 196:d=this.D>>8&255;break;
case 197:d=this.I>>8&255;break;case 198:d=this.L>>8&255;break;case 199:d=this.H>>8&255;break;default:d=0}a=a[this.fa>>3&7].call(this,d,b.call(this));switch(c){case 0:case 3:Mg(this,a);this.A-=this.B.Qc;break;case 1:case 2:Mg(this,a);this.A-=this.B.Rc;break;case 4:case 5:case 7:Mg(this,a);this.A-=this.B.xc;break;case 6:Mg(this,a);this.A-=this.B.yd;break;case 64:case 67:case 128:case 131:Mg(this,a);this.A-=this.B.Wb;break;case 65:case 66:case 129:case 130:Mg(this,a);this.A-=this.B.Xb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Mg(this,
a);this.A-=this.B.Za;break;case 192:this.D=this.D&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.D=this.D&-65281|a<<8;break;case 197:this.I=this.I&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8}}
function Jf(a){switch((this.fa=this.sa())&199){case 0:var b=E(this,this.H+this.K);this.A-=this.B.Qc;break;case 1:b=E(this,this.H+this.J);this.A-=this.B.Rc;break;case 2:b=Kg(this,this.N+this.K);this.A-=this.B.Rc;break;case 3:b=Kg(this,this.N+this.J);this.A-=this.B.Qc;break;case 4:b=E(this,this.K);this.A-=this.B.xc;break;case 5:b=E(this,this.J);this.A-=this.B.xc;break;case 6:b=E(this,K(this));this.A-=this.B.yd;break;case 7:b=E(this,this.H);this.A-=this.B.xc;break;case 64:b=E(this,this.H+this.K+this.S());
this.A-=this.B.Wb;break;case 65:b=E(this,this.H+this.J+this.S());this.A-=this.B.Xb;break;case 66:b=Kg(this,this.N+this.K+this.S());this.A-=this.B.Xb;break;case 67:b=Kg(this,this.N+this.J+this.S());this.A-=this.B.Wb;break;case 68:b=E(this,this.K+this.S());this.A-=this.B.Za;break;case 69:b=E(this,this.J+this.S());this.A-=this.B.Za;break;case 70:b=Kg(this,this.N+this.S());this.A-=this.B.Za;break;case 71:b=E(this,this.H+this.S());this.A-=this.B.Za;break;case 128:b=E(this,this.H+this.K+K(this));this.A-=
this.B.Wb;break;case 129:b=E(this,this.H+this.J+K(this));this.A-=this.B.Xb;break;case 130:b=Kg(this,this.N+this.K+K(this));this.A-=this.B.Xb;break;case 131:b=Kg(this,this.N+this.J+K(this));this.A-=this.B.Wb;break;case 132:b=E(this,this.K+K(this));this.A-=this.B.Za;break;case 133:b=E(this,this.J+K(this));this.A-=this.B.Za;break;case 134:b=Kg(this,this.N+K(this));this.A-=this.B.Za;break;case 135:b=E(this,this.H+K(this));this.A-=this.B.Za;break;case 192:b=this.D&65535;break;case 193:b=this.I&65535;break;
case 194:b=this.L&65535;break;case 195:b=this.H&65535;break;case 196:b=y(this)&65535;break;case 197:b=this.N&65535;break;case 198:b=this.K&65535;break;case 199:b=this.J&65535;break;default:b=0}var c=this.fa>>3&7;switch(c){case 0:var d=this.D&65535;break;case 1:d=this.I&65535;break;case 2:d=this.L&65535;break;case 3:d=this.H&65535;break;case 4:d=y(this)&65535;break;case 5:d=this.N&65535;break;case 6:d=this.K&65535;break;case 7:d=this.J&65535;break;default:d=0}a=a.call(this,d,b);switch(c){case 0:this.D=
this.D&-65536|a;break;case 1:this.I=this.I&-65536|a;break;case 2:this.L=this.L&-65536|a;break;case 3:this.H=this.H&-65536|a;break;case 4:re(this,y(this)&-65536|a);break;case 5:this.N=this.N&-65536|a;break;case 6:this.K=this.K&-65536|a;break;case 7:this.J=this.J&-65536|a}}
function Kf(a){var b=(this.fa=this.sa())&199;switch(b){case 0:var c=E(this,this.H+this.K);this.F=this.C;break;case 1:c=E(this,this.H+this.J);this.F=this.C;break;case 2:c=Kg(this,this.N+this.K);this.F=this.C;break;case 3:c=Kg(this,this.N+this.J);this.F=this.C;break;case 4:c=E(this,this.K);this.F=this.C;break;case 5:c=E(this,this.J);this.F=this.C;break;case 6:c=E(this,K(this));this.F=this.C;break;case 7:c=E(this,this.H);this.F=this.C;break;case 64:c=E(this,this.H+this.K+this.S());this.F=this.C;break;
case 65:c=E(this,this.H+this.J+this.S());this.F=this.C;break;case 66:c=Kg(this,this.N+this.K+this.S());this.F=this.C;break;case 67:c=Kg(this,this.N+this.J+this.S());this.F=this.C;break;case 68:c=E(this,this.K+this.S());this.F=this.C;break;case 69:c=E(this,this.J+this.S());this.F=this.C;break;case 70:c=Kg(this,this.N+this.S());this.F=this.C;break;case 71:c=E(this,this.H+this.S());this.F=this.C;break;case 128:c=E(this,this.H+this.K+K(this));this.F=this.C;break;case 129:c=E(this,this.H+this.J+K(this));
this.F=this.C;break;case 130:c=Kg(this,this.N+this.K+K(this));this.F=this.C;break;case 131:c=Kg(this,this.N+this.J+K(this));this.F=this.C;break;case 132:c=E(this,this.K+K(this));this.F=this.C;break;case 133:c=E(this,this.J+K(this));this.F=this.C;break;case 134:c=Kg(this,this.N+K(this));this.F=this.C;break;case 135:c=E(this,this.H+K(this));this.F=this.C;break;case 192:c=this.D&65535;break;case 193:c=this.I&65535;break;case 194:c=this.L&65535;break;case 195:c=this.H&65535;break;case 196:c=y(this)&65535;
break;case 197:c=this.N&65535;break;case 198:c=this.K&65535;break;case 199:c=this.J&65535;break;default:c=0}switch(this.fa>>3&7){case 0:var d=this.D&65535;break;case 1:d=this.I&65535;break;case 2:d=this.L&65535;break;case 3:d=this.H&65535;break;case 4:d=y(this)&65535;break;case 5:d=this.N&65535;break;case 6:d=this.K&65535;break;case 7:d=this.J&65535;break;default:d=0}a=a.call(this,c,d);switch(b){case 0:case 3:Ng(this,a);this.A-=this.B.Qc;break;case 1:case 2:Ng(this,a);this.A-=this.B.Rc;break;case 4:case 5:case 7:Ng(this,
a);this.A-=this.B.xc;break;case 6:Ng(this,a);this.A-=this.B.yd;break;case 64:case 67:case 128:case 131:Ng(this,a);this.A-=this.B.Wb;break;case 65:case 66:case 129:case 130:Ng(this,a);this.A-=this.B.Xb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Ng(this,a);this.A-=this.B.Za;break;case 192:this.D=this.D&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.L=this.L&-65536|a;break;case 195:this.H=this.H&-65536|a;break;case 196:re(this,y(this)&-65536|a);break;
case 197:this.N=this.N&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a}}
function Lf(a,b){var c=(this.fa=this.sa())&199;switch(c){case 0:var d=E(this,this.H+this.K);this.F=this.C;break;case 1:d=E(this,this.H+this.J);this.F=this.C;break;case 2:d=Kg(this,this.N+this.K);this.F=this.C;break;case 3:d=Kg(this,this.N+this.J);this.F=this.C;break;case 4:d=E(this,this.K);this.F=this.C;break;case 5:d=E(this,this.J);this.F=this.C;break;case 6:d=E(this,K(this));this.F=this.C;break;case 7:d=E(this,this.H);this.F=this.C;break;case 64:d=E(this,this.H+this.K+this.S());this.F=this.C;break;
case 65:d=E(this,this.H+this.J+this.S());this.F=this.C;break;case 66:d=Kg(this,this.N+this.K+this.S());this.F=this.C;break;case 67:d=Kg(this,this.N+this.J+this.S());this.F=this.C;break;case 68:d=E(this,this.K+this.S());this.F=this.C;break;case 69:d=E(this,this.J+this.S());this.F=this.C;break;case 70:d=Kg(this,this.N+this.S());this.F=this.C;break;case 71:d=E(this,this.H+this.S());this.F=this.C;break;case 128:d=E(this,this.H+this.K+K(this));this.F=this.C;break;case 129:d=E(this,this.H+this.J+K(this));
this.F=this.C;break;case 130:d=Kg(this,this.N+this.K+K(this));this.F=this.C;break;case 131:d=Kg(this,this.N+this.J+K(this));this.F=this.C;break;case 132:d=E(this,this.K+K(this));this.F=this.C;break;case 133:d=E(this,this.J+K(this));this.F=this.C;break;case 134:d=Kg(this,this.N+K(this));this.F=this.C;break;case 135:d=E(this,this.H+K(this));this.F=this.C;break;case 192:d=this.D&65535;break;case 193:d=this.I&65535;break;case 194:d=this.L&65535;break;case 195:d=this.H&65535;break;case 196:d=y(this)&65535;
break;case 197:d=this.N&65535;break;case 198:d=this.K&65535;break;case 199:d=this.J&65535;break;default:d=0}a=a[this.fa>>3&7].call(this,d,b.call(this));switch(c){case 0:case 3:Ng(this,a);this.A-=this.B.Qc;break;case 1:case 2:Ng(this,a);this.A-=this.B.Rc;break;case 4:case 5:case 7:Ng(this,a);this.A-=this.B.xc;break;case 6:Ng(this,a);this.A-=this.B.yd;break;case 64:case 67:case 128:case 131:Ng(this,a);this.A-=this.B.Wb;break;case 65:case 66:case 129:case 130:Ng(this,a);this.A-=this.B.Xb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Ng(this,
a);this.A-=this.B.Za;break;case 192:this.D=this.D&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.L=this.L&-65536|a;break;case 195:this.H=this.H&-65536|a;break;case 196:re(this,y(this)&-65536|a);break;case 197:this.N=this.N&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a}}
function Mf(a){switch((this.fa=this.sa())&199){case 0:var b=F(this,this.H+this.K);this.A-=this.B.Qc;break;case 1:b=F(this,this.H+this.J);this.A-=this.B.Rc;break;case 2:b=Lg(this,this.N+this.K);this.A-=this.B.Rc;break;case 3:b=Lg(this,this.N+this.J);this.A-=this.B.Qc;break;case 4:b=F(this,this.K);this.A-=this.B.xc;break;case 5:b=F(this,this.J);this.A-=this.B.xc;break;case 6:b=F(this,K(this));this.A-=this.B.yd;break;case 7:b=F(this,this.H);this.A-=this.B.xc;break;case 64:b=F(this,this.H+this.K+this.S());
this.A-=this.B.Wb;break;case 65:b=F(this,this.H+this.J+this.S());this.A-=this.B.Xb;break;case 66:b=Lg(this,this.N+this.K+this.S());this.A-=this.B.Xb;break;case 67:b=Lg(this,this.N+this.J+this.S());this.A-=this.B.Wb;break;case 68:b=F(this,this.K+this.S());this.A-=this.B.Za;break;case 69:b=F(this,this.J+this.S());this.A-=this.B.Za;break;case 70:b=Lg(this,this.N+this.S());this.A-=this.B.Za;break;case 71:b=F(this,this.H+this.S());this.A-=this.B.Za;break;case 128:b=F(this,this.H+this.K+K(this));this.A-=
this.B.Wb;break;case 129:b=F(this,this.H+this.J+K(this));this.A-=this.B.Xb;break;case 130:b=Lg(this,this.N+this.K+K(this));this.A-=this.B.Xb;break;case 131:b=Lg(this,this.N+this.J+K(this));this.A-=this.B.Wb;break;case 132:b=F(this,this.K+K(this));this.A-=this.B.Za;break;case 133:b=F(this,this.J+K(this));this.A-=this.B.Za;break;case 134:b=Lg(this,this.N+K(this));this.A-=this.B.Za;break;case 135:b=F(this,this.H+K(this));this.A-=this.B.Za;break;case 192:b=this.D;break;case 193:b=this.I;break;case 194:b=
this.L;break;case 195:b=this.H;break;case 196:b=y(this);break;case 197:b=this.N;break;case 198:b=this.K;break;case 199:b=this.J;break;default:b=0}var c=this.fa>>3&7;switch(c){case 0:var d=this.D;break;case 1:d=this.I;break;case 2:d=this.L;break;case 3:d=this.H;break;case 4:d=y(this);break;case 5:d=this.N;break;case 6:d=this.K;break;case 7:d=this.J;break;default:d=0}a=a.call(this,d,b);switch(c){case 0:this.D=a;break;case 1:this.I=a;break;case 2:this.L=a;break;case 3:this.H=a;break;case 4:re(this,a);
break;case 5:this.N=a;break;case 6:this.K=a;break;case 7:this.J=a}}
function Nf(a){var b=(this.fa=this.sa())&199;switch(b){case 0:var c=F(this,this.H+this.K);this.F=this.C;break;case 1:c=F(this,this.H+this.J);this.F=this.C;break;case 2:c=Lg(this,this.N+this.K);this.F=this.C;break;case 3:c=Lg(this,this.N+this.J);this.F=this.C;break;case 4:c=F(this,this.K);this.F=this.C;break;case 5:c=F(this,this.J);this.F=this.C;break;case 6:c=F(this,K(this));this.F=this.C;break;case 7:c=F(this,this.H);this.F=this.C;break;case 64:c=F(this,this.H+this.K+this.S());this.F=this.C;break;
case 65:c=F(this,this.H+this.J+this.S());this.F=this.C;break;case 66:c=Lg(this,this.N+this.K+this.S());this.F=this.C;break;case 67:c=Lg(this,this.N+this.J+this.S());this.F=this.C;break;case 68:c=F(this,this.K+this.S());this.F=this.C;break;case 69:c=F(this,this.J+this.S());this.F=this.C;break;case 70:c=Lg(this,this.N+this.S());this.F=this.C;break;case 71:c=F(this,this.H+this.S());this.F=this.C;break;case 128:c=F(this,this.H+this.K+K(this));this.F=this.C;break;case 129:c=F(this,this.H+this.J+K(this));
this.F=this.C;break;case 130:c=Lg(this,this.N+this.K+K(this));this.F=this.C;break;case 131:c=Lg(this,this.N+this.J+K(this));this.F=this.C;break;case 132:c=F(this,this.K+K(this));this.F=this.C;break;case 133:c=F(this,this.J+K(this));this.F=this.C;break;case 134:c=Lg(this,this.N+K(this));this.F=this.C;break;case 135:c=F(this,this.H+K(this));this.F=this.C;break;case 192:c=this.D;break;case 193:c=this.I;break;case 194:c=this.L;break;case 195:c=this.H;break;case 196:c=y(this);break;case 197:c=this.N;break;
case 198:c=this.K;break;case 199:c=this.J;break;default:c=0}switch(this.fa>>3&7){case 0:var d=this.D;break;case 1:d=this.I;break;case 2:d=this.L;break;case 3:d=this.H;break;case 4:d=y(this);break;case 5:d=this.N;break;case 6:d=this.K;break;case 7:d=this.J;break;default:d=0}a=a.call(this,c,d);switch(b){case 0:case 3:Og(this,a);this.A-=this.B.Qc;break;case 1:case 2:Og(this,a);this.A-=this.B.Rc;break;case 4:case 5:case 7:Og(this,a);this.A-=this.B.xc;break;case 6:Og(this,a);this.A-=this.B.yd;break;case 64:case 67:case 128:case 131:Og(this,
a);this.A-=this.B.Wb;break;case 65:case 66:case 129:case 130:Og(this,a);this.A-=this.B.Xb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Og(this,a);this.A-=this.B.Za;break;case 192:this.D=a;break;case 193:this.I=a;break;case 194:this.L=a;break;case 195:this.H=a;break;case 196:re(this,a);break;case 197:this.N=a;break;case 198:this.K=a;break;case 199:this.J=a}}
function Of(a,b){var c=(this.fa=this.sa())&199;switch(c){case 0:var d=F(this,this.H+this.K);this.F=this.C;break;case 1:d=F(this,this.H+this.J);this.F=this.C;break;case 2:d=Lg(this,this.N+this.K);this.F=this.C;break;case 3:d=Lg(this,this.N+this.J);this.F=this.C;break;case 4:d=F(this,this.K);this.F=this.C;break;case 5:d=F(this,this.J);this.F=this.C;break;case 6:d=F(this,K(this));this.F=this.C;break;case 7:d=F(this,this.H);this.F=this.C;break;case 64:d=F(this,this.H+this.K+this.S());this.F=this.C;break;
case 65:d=F(this,this.H+this.J+this.S());this.F=this.C;break;case 66:d=Lg(this,this.N+this.K+this.S());this.F=this.C;break;case 67:d=Lg(this,this.N+this.J+this.S());this.F=this.C;break;case 68:d=F(this,this.K+this.S());this.F=this.C;break;case 69:d=F(this,this.J+this.S());this.F=this.C;break;case 70:d=Lg(this,this.N+this.S());this.F=this.C;break;case 71:d=F(this,this.H+this.S());this.F=this.C;break;case 128:d=F(this,this.H+this.K+K(this));this.F=this.C;break;case 129:d=F(this,this.H+this.J+K(this));
this.F=this.C;break;case 130:d=Lg(this,this.N+this.K+K(this));this.F=this.C;break;case 131:d=Lg(this,this.N+this.J+K(this));this.F=this.C;break;case 132:d=F(this,this.K+K(this));this.F=this.C;break;case 133:d=F(this,this.J+K(this));this.F=this.C;break;case 134:d=Lg(this,this.N+K(this));this.F=this.C;break;case 135:d=F(this,this.H+K(this));this.F=this.C;break;case 192:d=this.D;break;case 193:d=this.I;break;case 194:d=this.L;break;case 195:d=this.H;break;case 196:d=y(this);break;case 197:d=this.N;break;
case 198:d=this.K;break;case 199:d=this.J}a=a[this.fa>>3&7].call(this,d,b.call(this));switch(c){case 0:case 3:Og(this,a);this.A-=this.B.Qc;break;case 1:case 2:Og(this,a);this.A-=this.B.Rc;break;case 4:case 5:case 7:Og(this,a);this.A-=this.B.xc;break;case 6:Og(this,a);this.A-=this.B.yd;break;case 64:case 67:case 128:case 131:Og(this,a);this.A-=this.B.Wb;break;case 65:case 66:case 129:case 130:Og(this,a);this.A-=this.B.Xb;break;case 68:case 69:case 70:case 71:case 132:case 133:case 134:case 135:Og(this,
a);this.A-=this.B.Za;break;case 192:this.D=a;break;case 193:this.I=a;break;case 194:this.L=a;break;case 195:this.H=a;break;case 196:re(this,a);break;case 197:this.N=a;break;case 198:this.K=a;break;case 199:this.J=a}}
function Pf(a){switch((this.fa=this.sa())&199){case 0:var b=D(this,this.D);break;case 1:b=D(this,this.I);break;case 2:b=D(this,this.L);break;case 3:b=D(this,this.H);break;case 4:b=D(this,wk.call(this,0));break;case 5:b=D(this,K(this));break;case 6:b=D(this,this.K);break;case 7:b=D(this,this.J);break;case 64:b=D(this,this.D+this.S());break;case 65:b=D(this,this.I+this.S());break;case 66:b=D(this,this.L+this.S());break;case 67:b=D(this,this.H+this.S());break;case 68:b=D(this,wk.call(this,1)+this.S());
break;case 69:b=Ig(this,this.N+this.S());break;case 70:b=D(this,this.K+this.S());break;case 71:b=D(this,this.J+this.S());break;case 128:b=D(this,this.D+K(this));break;case 129:b=D(this,this.I+K(this));break;case 130:b=D(this,this.L+K(this));break;case 131:b=D(this,this.H+K(this));break;case 132:b=D(this,wk.call(this,2)+K(this));break;case 133:b=Ig(this,this.N+K(this));break;case 134:b=D(this,this.K+K(this));break;case 135:b=D(this,this.J+K(this));break;case 192:b=this.D&255;break;case 193:b=this.I&
255;break;case 194:b=this.L&255;break;case 195:b=this.H&255;break;case 196:b=this.D>>8&255;break;case 197:b=this.I>>8&255;break;case 198:b=this.L>>8&255;break;case 199:b=this.H>>8&255;break;default:b=0}var c=this.fa>>3&7;switch(c){case 0:var d=this.D&255;break;case 1:d=this.I&255;break;case 2:d=this.L&255;break;case 3:d=this.H&255;break;case 4:d=this.D>>8&255;break;case 5:d=this.I>>8&255;break;case 6:d=this.L>>8&255;break;case 7:d=this.H>>8&255;break;default:d=0}a=a.call(this,d,b);switch(c){case 0:this.D=
this.D&-256|a;break;case 1:this.I=this.I&-256|a;break;case 2:this.L=this.L&-256|a;break;case 3:this.H=this.H&-256|a;break;case 4:this.D=this.D&-65281|a<<8;break;case 5:this.I=this.I&-65281|a<<8;break;case 6:this.L=this.L&-65281|a<<8;break;case 7:this.H=this.H&-65281|a<<8}}
function Qf(a){var b=(this.fa=this.sa())&199;switch(b){case 0:var c=D(this,this.D);this.F=this.C;break;case 1:c=D(this,this.I);this.F=this.C;break;case 2:c=D(this,this.L);this.F=this.C;break;case 3:c=D(this,this.H);this.F=this.C;break;case 4:c=D(this,wk.call(this,0));this.F=this.C;break;case 5:c=D(this,K(this));this.F=this.C;break;case 6:c=D(this,this.K);this.F=this.C;break;case 7:c=D(this,this.J);this.F=this.C;break;case 64:c=D(this,this.D+this.S());this.F=this.C;break;case 65:c=D(this,this.I+this.S());
this.F=this.C;break;case 66:c=D(this,this.L+this.S());this.F=this.C;break;case 67:c=D(this,this.H+this.S());this.F=this.C;break;case 68:c=D(this,wk.call(this,1)+this.S());this.F=this.C;break;case 69:c=Ig(this,this.N+this.S());this.F=this.C;break;case 70:c=D(this,this.K+this.S());this.F=this.C;break;case 71:c=D(this,this.J+this.S());this.F=this.C;break;case 128:c=D(this,this.D+K(this));this.F=this.C;break;case 129:c=D(this,this.I+K(this));this.F=this.C;break;case 130:c=D(this,this.L+K(this));this.F=
this.C;break;case 131:c=D(this,this.H+K(this));this.F=this.C;break;case 132:c=D(this,wk.call(this,2)+K(this));this.F=this.C;break;case 133:c=Ig(this,this.N+K(this));this.F=this.C;break;case 134:c=D(this,this.K+K(this));this.F=this.C;break;case 135:c=D(this,this.J+K(this));this.F=this.C;break;case 192:c=this.D&255;break;case 193:c=this.I&255;break;case 194:c=this.L&255;break;case 195:c=this.H&255;break;case 196:c=this.D>>8&255;break;case 197:c=this.I>>8&255;break;case 198:c=this.L>>8&255;break;case 199:c=
this.H>>8&255;break;default:c=0}switch(this.fa>>3&7){case 0:var d=this.D&255;break;case 1:d=this.I&255;break;case 2:d=this.L&255;break;case 3:d=this.H&255;break;case 4:d=this.D>>8&255;break;case 5:d=this.I>>8&255;break;case 6:d=this.L>>8&255;break;case 7:d=this.H>>8&255;break;default:d=0}a=a.call(this,c,d);switch(b){case 192:this.D=this.D&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.D=this.D&-65281|a<<8;break;
case 197:this.I=this.I&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8;break;default:Mg(this,a)}}
function Rf(a,b){var c=(this.fa=this.sa())&199;switch(c){case 0:var d=D(this,this.D);this.F=this.C;break;case 1:d=D(this,this.I);this.F=this.C;break;case 2:d=D(this,this.L);this.F=this.C;break;case 3:d=D(this,this.H);this.F=this.C;break;case 4:d=D(this,wk.call(this,0));this.F=this.C;break;case 5:d=D(this,K(this));this.F=this.C;break;case 6:d=D(this,this.K);this.F=this.C;break;case 7:d=D(this,this.J);this.F=this.C;break;case 64:d=D(this,this.D+this.S());this.F=this.C;break;case 65:d=D(this,this.I+
this.S());this.F=this.C;break;case 66:d=D(this,this.L+this.S());this.F=this.C;break;case 67:d=D(this,this.H+this.S());this.F=this.C;break;case 68:d=D(this,wk.call(this,1)+this.S());this.F=this.C;break;case 69:d=Ig(this,this.N+this.S());this.F=this.C;break;case 70:d=D(this,this.K+this.S());this.F=this.C;break;case 71:d=D(this,this.J+this.S());this.F=this.C;break;case 128:d=D(this,this.D+K(this));this.F=this.C;break;case 129:d=D(this,this.I+K(this));this.F=this.C;break;case 130:d=D(this,this.L+K(this));
this.F=this.C;break;case 131:d=D(this,this.H+K(this));this.F=this.C;break;case 132:d=D(this,wk.call(this,2)+K(this));this.F=this.C;break;case 133:d=Ig(this,this.N+K(this));this.F=this.C;break;case 134:d=D(this,this.K+K(this));this.F=this.C;break;case 135:d=D(this,this.J+K(this));this.F=this.C;break;case 192:d=this.D&255;break;case 193:d=this.I&255;break;case 194:d=this.L&255;break;case 195:d=this.H&255;break;case 196:d=this.D>>8&255;break;case 197:d=this.I>>8&255;break;case 198:d=this.L>>8&255;break;
case 199:d=this.H>>8&255;break;default:d=0}a=a[this.fa>>3&7].call(this,d,b.call(this));switch(c){case 192:this.D=this.D&-256|a;break;case 193:this.I=this.I&-256|a;break;case 194:this.L=this.L&-256|a;break;case 195:this.H=this.H&-256|a;break;case 196:this.D=this.D&-65281|a<<8;break;case 197:this.I=this.I&-65281|a<<8;break;case 198:this.L=this.L&-65281|a<<8;break;case 199:this.H=this.H&-65281|a<<8;break;default:Mg(this,a)}}
function Sf(a){switch((this.fa=this.sa())&199){case 0:var b=E(this,this.D);break;case 1:b=E(this,this.I);break;case 2:b=E(this,this.L);break;case 3:b=E(this,this.H);break;case 4:b=E(this,wk.call(this,0));break;case 5:b=E(this,K(this));break;case 6:b=E(this,this.K);break;case 7:b=E(this,this.J);break;case 64:b=E(this,this.D+this.S());break;case 65:b=E(this,this.I+this.S());break;case 66:b=E(this,this.L+this.S());break;case 67:b=E(this,this.H+this.S());break;case 68:b=E(this,wk.call(this,1)+this.S());
break;case 69:b=Kg(this,this.N+this.S());break;case 70:b=E(this,this.K+this.S());break;case 71:b=E(this,this.J+this.S());break;case 128:b=E(this,this.D+K(this));break;case 129:b=E(this,this.I+K(this));break;case 130:b=E(this,this.L+K(this));break;case 131:b=E(this,this.H+K(this));break;case 132:b=E(this,wk.call(this,2)+K(this));break;case 133:b=Kg(this,this.N+K(this));break;case 134:b=E(this,this.K+K(this));break;case 135:b=E(this,this.J+K(this));break;case 192:b=this.D&65535;break;case 193:b=this.I&
65535;break;case 194:b=this.L&65535;break;case 195:b=this.H&65535;break;case 196:b=y(this)&65535;break;case 197:b=this.N&65535;break;case 198:b=this.K&65535;break;case 199:b=this.J&65535;break;default:b=0}var c=this.fa>>3&7;switch(c){case 0:var d=this.D&65535;break;case 1:d=this.I&65535;break;case 2:d=this.L&65535;break;case 3:d=this.H&65535;break;case 4:d=y(this)&65535;break;case 5:d=this.N&65535;break;case 6:d=this.K&65535;break;case 7:d=this.J&65535;break;default:d=0}a=a.call(this,d,b);switch(c){case 0:this.D=
this.D&-65536|a;break;case 1:this.I=this.I&-65536|a;break;case 2:this.L=this.L&-65536|a;break;case 3:this.H=this.H&-65536|a;break;case 4:re(this,y(this)&-65536|a);break;case 5:this.N=this.N&-65536|a;break;case 6:this.K=this.K&-65536|a;break;case 7:this.J=this.J&-65536|a}}
function Tf(a){var b=(this.fa=this.sa())&199;switch(b){case 0:var c=E(this,this.D);this.F=this.C;break;case 1:c=E(this,this.I);this.F=this.C;break;case 2:c=E(this,this.L);this.F=this.C;break;case 3:c=E(this,this.H);this.F=this.C;break;case 4:c=E(this,wk.call(this,0));this.F=this.C;break;case 5:c=E(this,K(this));this.F=this.C;break;case 6:c=E(this,this.K);this.F=this.C;break;case 7:c=E(this,this.J);this.F=this.C;break;case 64:c=E(this,this.D+this.S());this.F=this.C;break;case 65:c=E(this,this.I+this.S());
this.F=this.C;break;case 66:c=E(this,this.L+this.S());this.F=this.C;break;case 67:c=E(this,this.H+this.S());this.F=this.C;break;case 68:c=E(this,wk.call(this,1)+this.S());this.F=this.C;break;case 69:c=Kg(this,this.N+this.S());this.F=this.C;break;case 70:c=E(this,this.K+this.S());this.F=this.C;break;case 71:c=E(this,this.J+this.S());this.F=this.C;break;case 128:c=E(this,this.D+K(this));this.F=this.C;break;case 129:c=E(this,this.I+K(this));this.F=this.C;break;case 130:c=E(this,this.L+K(this));this.F=
this.C;break;case 131:c=E(this,this.H+K(this));this.F=this.C;break;case 132:c=E(this,wk.call(this,2)+K(this));this.F=this.C;break;case 133:c=Kg(this,this.N+K(this));this.F=this.C;break;case 134:c=E(this,this.K+K(this));this.F=this.C;break;case 135:c=E(this,this.J+K(this));this.F=this.C;break;case 192:c=this.D&65535;break;case 193:c=this.I&65535;break;case 194:c=this.L&65535;break;case 195:c=this.H&65535;break;case 196:c=y(this)&65535;break;case 197:c=this.N&65535;break;case 198:c=this.K&65535;break;
case 199:c=this.J&65535;break;default:c=0}switch(this.fa>>3&7){case 0:var d=this.D&65535;break;case 1:d=this.I&65535;break;case 2:d=this.L&65535;break;case 3:d=this.H&65535;break;case 4:d=y(this)&65535;break;case 5:d=this.N&65535;break;case 6:d=this.K&65535;break;case 7:d=this.J&65535;break;default:d=0}a=a.call(this,c,d);switch(b){case 192:this.D=this.D&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.L=this.L&-65536|a;break;case 195:this.H=this.H&-65536|a;break;case 196:re(this,
y(this)&-65536|a);break;case 197:this.N=this.N&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a;break;default:Ng(this,a)}}
function Uf(a,b){var c=(this.fa=this.sa())&199;switch(c){case 0:var d=E(this,this.D);this.F=this.C;break;case 1:d=E(this,this.I);this.F=this.C;break;case 2:d=E(this,this.L);this.F=this.C;break;case 3:d=E(this,this.H);this.F=this.C;break;case 4:d=E(this,wk.call(this,0));this.F=this.C;break;case 5:d=E(this,K(this));this.F=this.C;break;case 6:d=E(this,this.K);this.F=this.C;break;case 7:d=E(this,this.J);this.F=this.C;break;case 64:d=E(this,this.D+this.S());this.F=this.C;break;case 65:d=E(this,this.I+
this.S());this.F=this.C;break;case 66:d=E(this,this.L+this.S());this.F=this.C;break;case 67:d=E(this,this.H+this.S());this.F=this.C;break;case 68:d=E(this,wk.call(this,1)+this.S());this.F=this.C;break;case 69:d=Kg(this,this.N+this.S());this.F=this.C;break;case 70:d=E(this,this.K+this.S());this.F=this.C;break;case 71:d=E(this,this.J+this.S());this.F=this.C;break;case 128:d=E(this,this.D+K(this));this.F=this.C;break;case 129:d=E(this,this.I+K(this));this.F=this.C;break;case 130:d=E(this,this.L+K(this));
this.F=this.C;break;case 131:d=E(this,this.H+K(this));this.F=this.C;break;case 132:d=E(this,wk.call(this,2)+K(this));this.F=this.C;break;case 133:d=Kg(this,this.N+K(this));this.F=this.C;break;case 134:d=E(this,this.K+K(this));this.F=this.C;break;case 135:d=E(this,this.J+K(this));this.F=this.C;break;case 192:d=this.D&65535;break;case 193:d=this.I&65535;break;case 194:d=this.L&65535;break;case 195:d=this.H&65535;break;case 196:d=y(this)&65535;break;case 197:d=this.N&65535;break;case 198:d=this.K&65535;
break;case 199:d=this.J&65535;break;default:d=0}a=a[this.fa>>3&7].call(this,d,b.call(this));switch(c){case 192:this.D=this.D&-65536|a;break;case 193:this.I=this.I&-65536|a;break;case 194:this.L=this.L&-65536|a;break;case 195:this.H=this.H&-65536|a;break;case 196:re(this,y(this)&-65536|a);break;case 197:this.N=this.N&-65536|a;break;case 198:this.K=this.K&-65536|a;break;case 199:this.J=this.J&-65536|a;break;default:Ng(this,a)}}
function Vf(a){switch((this.fa=this.sa())&199){case 0:var b=F(this,this.D);break;case 1:b=F(this,this.I);break;case 2:b=F(this,this.L);break;case 3:b=F(this,this.H);break;case 4:b=F(this,wk.call(this,0));break;case 5:b=F(this,K(this));break;case 6:b=F(this,this.K);break;case 7:b=F(this,this.J);break;case 64:b=F(this,this.D+this.S());break;case 65:b=F(this,this.I+this.S());break;case 66:b=F(this,this.L+this.S());break;case 67:b=F(this,this.H+this.S());break;case 68:b=F(this,wk.call(this,1)+this.S());
break;case 69:b=Lg(this,this.N+this.S());break;case 70:b=F(this,this.K+this.S());break;case 71:b=F(this,this.J+this.S());break;case 128:b=F(this,this.D+K(this));break;case 129:b=F(this,this.I+K(this));break;case 130:b=F(this,this.L+K(this));break;case 131:b=F(this,this.H+K(this));break;case 132:b=F(this,wk.call(this,2)+K(this));break;case 133:b=Lg(this,this.N+K(this));break;case 134:b=F(this,this.K+K(this));break;case 135:b=F(this,this.J+K(this));break;case 192:b=this.D;break;case 193:b=this.I;break;
case 194:b=this.L;break;case 195:b=this.H;break;case 196:b=y(this);break;case 197:b=this.N;break;case 198:b=this.K;break;case 199:b=this.J;break;default:b=0}var c=this.fa>>3&7;switch(c){case 0:var d=this.D;break;case 1:d=this.I;break;case 2:d=this.L;break;case 3:d=this.H;break;case 4:d=y(this);break;case 5:d=this.N;break;case 6:d=this.K;break;case 7:d=this.J;break;default:d=0}a=a.call(this,d,b);switch(c){case 0:this.D=a;break;case 1:this.I=a;break;case 2:this.L=a;break;case 3:this.H=a;break;case 4:re(this,
a);break;case 5:this.N=a;break;case 6:this.K=a;break;case 7:this.J=a}}
function Wf(a){var b=(this.fa=this.sa())&199;switch(b){case 0:var c=F(this,this.D);this.F=this.C;break;case 1:c=F(this,this.I);this.F=this.C;break;case 2:c=F(this,this.L);this.F=this.C;break;case 3:c=F(this,this.H);this.F=this.C;break;case 4:c=F(this,wk.call(this,0));this.F=this.C;break;case 5:c=F(this,K(this));this.F=this.C;break;case 6:c=F(this,this.K);this.F=this.C;break;case 7:c=F(this,this.J);this.F=this.C;break;case 64:c=F(this,this.D+this.S());this.F=this.C;break;case 65:c=F(this,this.I+this.S());
this.F=this.C;break;case 66:c=F(this,this.L+this.S());this.F=this.C;break;case 67:c=F(this,this.H+this.S());this.F=this.C;break;case 68:c=F(this,wk.call(this,1)+this.S());this.F=this.C;break;case 69:c=Lg(this,this.N+this.S());this.F=this.C;break;case 70:c=F(this,this.K+this.S());this.F=this.C;break;case 71:c=F(this,this.J+this.S());this.F=this.C;break;case 128:c=F(this,this.D+K(this));this.F=this.C;break;case 129:c=F(this,this.I+K(this));this.F=this.C;break;case 130:c=F(this,this.L+K(this));this.F=
this.C;break;case 131:c=F(this,this.H+K(this));this.F=this.C;break;case 132:c=F(this,wk.call(this,2)+K(this));this.F=this.C;break;case 133:c=Lg(this,this.N+K(this));this.F=this.C;break;case 134:c=F(this,this.K+K(this));this.F=this.C;break;case 135:c=F(this,this.J+K(this));this.F=this.C;break;case 192:c=this.D;break;case 193:c=this.I;break;case 194:c=this.L;break;case 195:c=this.H;break;case 196:c=y(this);break;case 197:c=this.N;break;case 198:c=this.K;break;case 199:c=this.J;break;default:c=0}switch(this.fa>>
3&7){case 0:var d=this.D;break;case 1:d=this.I;break;case 2:d=this.L;break;case 3:d=this.H;break;case 4:d=y(this);break;case 5:d=this.N;break;case 6:d=this.K;break;case 7:d=this.J;break;default:d=0}a=a.call(this,c,d);switch(b){case 192:this.D=a;break;case 193:this.I=a;break;case 194:this.L=a;break;case 195:this.H=a;break;case 196:re(this,a);break;case 197:this.N=a;break;case 198:this.K=a;break;case 199:this.J=a;break;default:Og(this,a)}}
function Xf(a,b){var c=(this.fa=this.sa())&199;switch(c){case 0:var d=F(this,this.D);this.F=this.C;break;case 1:d=F(this,this.I);this.F=this.C;break;case 2:d=F(this,this.L);this.F=this.C;break;case 3:d=F(this,this.H);this.F=this.C;break;case 4:d=F(this,wk.call(this,0));this.F=this.C;break;case 5:d=F(this,K(this));this.F=this.C;break;case 6:d=F(this,this.K);this.F=this.C;break;case 7:d=F(this,this.J);this.F=this.C;break;case 64:d=F(this,this.D+this.S());this.F=this.C;break;case 65:d=F(this,this.I+
this.S());this.F=this.C;break;case 66:d=F(this,this.L+this.S());this.F=this.C;break;case 67:d=F(this,this.H+this.S());this.F=this.C;break;case 68:d=F(this,wk.call(this,1)+this.S());this.F=this.C;break;case 69:d=Lg(this,this.N+this.S());this.F=this.C;break;case 70:d=F(this,this.K+this.S());this.F=this.C;break;case 71:d=F(this,this.J+this.S());this.F=this.C;break;case 128:d=F(this,this.D+K(this));this.F=this.C;break;case 129:d=F(this,this.I+K(this));this.F=this.C;break;case 130:d=F(this,this.L+K(this));
this.F=this.C;break;case 131:d=F(this,this.H+K(this));this.F=this.C;break;case 132:d=F(this,wk.call(this,2)+K(this));this.F=this.C;break;case 133:d=Lg(this,this.N+K(this));this.F=this.C;break;case 134:d=F(this,this.K+K(this));this.F=this.C;break;case 135:d=F(this,this.J+K(this));this.F=this.C;break;case 192:d=this.D;break;case 193:d=this.I;break;case 194:d=this.L;break;case 195:d=this.H;break;case 196:d=y(this);break;case 197:d=this.N;break;case 198:d=this.K;break;case 199:d=this.J;break;default:d=
0}a=a[this.fa>>3&7].call(this,d,b.call(this));switch(c){case 192:this.D=a;break;case 193:this.I=a;break;case 194:this.L=a;break;case 195:this.H=a;break;case 196:re(this,a);break;case 197:this.N=a;break;case 198:this.K=a;break;case 199:this.J=a;break;default:Og(this,a)}}
function wk(a){var b=this.sa(),c=b>>6;switch(b>>3&7){case 0:var d=this.D;break;case 1:d=this.I;break;case 2:d=this.L;break;case 3:d=this.H;break;case 4:d=0;break;case 5:d=this.N;break;case 6:d=this.K;break;case 7:d=this.J}switch(b&7){case 0:var e=this.D;break;case 1:e=this.I;break;case 2:e=this.L;break;case 3:e=this.H;break;case 4:e=y(this);this.Ga=this.Sb;break;case 5:a?(e=this.N,this.Ga=this.Sb):e=K(this);break;case 6:e=this.K;break;case 7:e=this.J}return(d<<c)+e|0}
function df(){this.rd[this.sa()].call(this)}function gf(){ze(this,y(this)&this.R);this.A-=this.B.Ic}function Ne(){this.ta=this.Ca;var a=y(this)&this.R;ze(this,this.D&this.R);ze(this,this.I&this.R);ze(this,this.L&this.R);ze(this,this.H&this.R);ze(this,a);ze(this,this.N&this.R);ze(this,this.K&this.R);ze(this,this.J&this.R);this.A-=this.B.Bk;this.ta=-1}
function Oe(){this.ta=this.Ca;this.J=this.J&~this.R|pe(this);this.K=this.K&~this.R|pe(this);this.N=this.N&~this.R|pe(this);re(this,y(this)+this.X);this.H=this.H&~this.R|pe(this);this.L=this.L&~this.R|pe(this);this.I=this.I&~this.R|pe(this);this.D=this.D&~this.R|pe(this);this.A-=this.B.zk;this.ta=-1}function Pe(){this.la.call(this,zi)}function hf(){!(this.ra&1)||this.P&131072?x.call(this,6):this.Ba.call(this,yi)}function jf(){this.M|=20;this.Ga=this.Sb=this.Ka;this.A-=this.B.$c}
function kf(){this.M|=20;this.Ga=this.Sb=this.La;this.A-=this.B.$c}function of(){this.M|=1024;this.ha&1024||(this.X^=6,this.R^=-65536,Yf(this));this.A-=this.B.$c}function pf(){this.M|=2048;this.ha&2048||(this.Lc^=6,this.xa^=-65536,Ff(this));this.A-=this.B.$c}function Qe(){ze(this,this.Ha());this.A-=this.B.Ic}function Re(){this.la.call(this,Ri)}function Se(){ze(this,this.S());this.A-=this.B.Ic}function Te(){this.la.call(this,Pi)}
function Ue(){var a=1,b=0,c=this.xa,d=5;this.ha&192&&(a=this.I&c,b=1,this.ha&256&&(d=4));if(a--){var e=this.L&65535;Dg(this,e,1,!0)&&(e=Uc(this.oa,e,1,this.ea-b-1),this.ub(this.pa.Ub(this.J&c,1),e),this.J=this.J&~c|this.J+(this.P&1024?-1:1)&c,this.I=this.I&~c|this.I-b&c,this.A-=d,a&&(jg(this),this.M|=256))}}
function Ve(){var a=1,b=0,c=this.xa,d=5;this.ha&192&&(a=this.I&c,b=1,this.ha&256&&(d=4));if(a--){var e=this.L&65535;Dg(this,e,this.X,!0)&&(e=Uc(this.oa,e,this.X,this.ea-b-1),Pg(this,this.pa,this.J&c,e),this.J=this.J&~c|this.J+(this.P&1024?-this.X:this.X)&c,this.I=this.I&~c|this.I-b&c,this.A-=d,a&&(jg(this),this.M|=256))}}
function We(){var a=1,b=0,c=this.xa,d=5;this.ha&192&&(a=this.I&c,b=1,this.ha&256&&(d=4));if(a--){var e=this.L&65535;if(Dg(this,e,1,!1)){var f=this.ya(this.Fa.Cb(this.K&c,1));Yc(this.oa,e,1,f,this.ea-b-1);this.K=this.K&~c|this.K+(this.P&1024?-1:1)&c;this.I=this.I&~c|this.I-b&c;this.A-=d;a&&(jg(this),this.M|=256)}}}
function Xe(){var a=1,b=0,c=this.xa,d=5;this.ha&192&&(a=this.I&c,b=1,this.ha&256&&(d=4));if(a--){var e=ve(this,this.Fa,this.K&c),f=this.L&65535;Dg(this,f,this.X,!1)&&(Yc(this.oa,f,this.X,e,this.ea-b-1),this.K=this.K&~c|this.K+(this.P&1024?-this.X:this.X)&c,this.I=this.I&~c|this.I-b&c,this.A-=d,a&&(jg(this),this.M|=256))}}function xk(){var a=this.S();qg(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua}
function yk(){var a=this.S();qg(this)?this.A-=this.B.Ua:(C(this,z(this)+a),this.A-=this.B.Ta)}function zk(){var a=this.S();lg(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua}function Ak(){var a=this.S();lg(this)?this.A-=this.B.Ua:(C(this,z(this)+a),this.A-=this.B.Ta)}function Bk(){var a=this.S();og(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua}function Ck(){var a=this.S();og(this)?this.A-=this.B.Ua:(C(this,z(this)+a),this.A-=this.B.Ta)}
function Dk(){var a=this.S();lg(this)||og(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua}function Ek(){var a=this.S();lg(this)||og(this)?this.A-=this.B.Ua:(C(this,z(this)+a),this.A-=this.B.Ta)}function Fk(){var a=this.S();pg(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua}function Gk(){var a=this.S();pg(this)?this.A-=this.B.Ua:(C(this,z(this)+a),this.A-=this.B.Ta)}function Hk(){var a=this.S();mg(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua}
function Ik(){var a=this.S();mg(this)?this.A-=this.B.Ua:(C(this,z(this)+a),this.A-=this.B.Ta)}function Jk(){var a=this.S();!pg(this)!=!qg(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua}function Kk(){var a=this.S();!pg(this)==!qg(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua}function Lk(){var a=this.S();og(this)||!pg(this)!=!qg(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua}
function Mk(){var a=this.S();og(this)||!pg(this)!=!qg(this)?this.A-=this.B.Ua:(C(this,z(this)+a),this.A-=this.B.Ta)}function Nk(){this.ld.call(this,Ok,this.sa);this.A-=-1===this.F?1:this.B.wg}function Pk(){this.M|=1;this.uc.call(this,cj)}function Qk(){this.M|=1;this.Ba.call(this,cj)}function Rk(){this.kc.call(this,cj)}function Sk(){this.la.call(this,cj)}function Ye(){this.ld.call(this,Tk,nk)}function Ze(){this.mb.call(this,2==this.X?Uk:Vk,nk)}
function Wk(){var a=Qg(this),b=pe(this);C(this,b);a&&re(this,y(this)+a);this.A-=this.B.Gk}function Xk(){var a=pe(this);C(this,a);this.A-=this.B.Dk}function $e(){this.ta=this.Ca;var a=Qg(this),b=this.sa()&31;this.A-=11;ze(this,this.N);var c=y(this)&this.R;if(0<b){for(this.A-=(b<<2)+(1<b?1:0);--b;)this.N=this.N&~this.R|this.N-this.X&this.R,ze(this,ve(this,this.U,this.N&this.R));ze(this,c)}this.N=this.N&~this.R|c;re(this,y(this)&~this.U.xa|y(this)-a&this.U.xa);this.ta=-1}
function af(){this.ta=this.Ca;re(this,y(this)&~this.U.xa|this.N&this.U.xa);this.N=this.N&~this.R|pe(this)&this.R;this.A-=5;this.ta=-1}function Yk(){sk.call(this,Qg(this));this.A-=this.B.Fk}function Zk(){sk.call(this,0);this.A-=this.B.Ek}function $k(a){this.uj=a;this.la.call(this,Mi)}function al(){this.M|=36;this.A-=this.B.$c}function bf(){ff.call(this)}function Me(){x.call(this,6)}
function ff(){C(this,this.pd-this.ba.ua);Pb(this,"Undefined opcode "+va(this.ya(this.ea))+" at "+p(this.ea,8,!0));Jd(this)}
var Fe=[function(){this.uc.call(this,ui)},function(){this.Ba.call(this,vi)},function(){this.kc.call(this,ui)},function(){this.la.call(this,vi)},function(){this.D=this.D&-256|ui.call(this,this.D&255,this.sa());this.A--},function(){this.D=this.D&~this.R|vi.call(this,this.D&this.R,this.Ha());this.A--},function(){we(this,this.pa.T,this.X,2);this.A-=this.B.te},function(){this.ta=this.Ca;ye(this,pe(this));this.A-=this.B.nc;this.ta=-1},function(){this.uc.call(this,hj)},function(){this.Ba.call(this,rj)},
function(){this.kc.call(this,hj)},function(){this.la.call(this,rj)},function(){this.D=this.D&-256|hj.call(this,this.D&255,this.sa());this.A--},function(){this.D=this.D&~this.R|rj.call(this,this.D&this.R,this.Ha());this.A--},function(){we(this,this.ba.T,this.X,2);this.A-=this.B.te},function(){gg(this,pe(this));this.A-=this.B.nc},function(){this.uc.call(this,si)},function(){this.Ba.call(this,ti)},function(){this.kc.call(this,si)},function(){this.la.call(this,ti)},function(){this.D=this.D&-256|si.call(this,
this.D&255,this.sa());this.A--},function(){this.D=this.D&~this.R|ti.call(this,this.D&this.R,this.Ha());this.A--},function(){we(this,this.U.T,this.X,2);this.A-=this.B.te},function(){this.ta=this.Ca;qe(this,pe(this));this.A-=this.B.nc;this.ta=-1},function(){this.uc.call(this,sj)},function(){this.Ba.call(this,tj)},function(){this.kc.call(this,sj)},function(){this.la.call(this,tj)},function(){this.D=this.D&-256|sj.call(this,this.D&255,this.sa());this.A--},function(){this.D=this.D&~this.R|tj.call(this,
this.D&this.R,this.Ha());this.A--},function(){we(this,this.Fa.T,this.X,2);this.A-=this.B.te},function(){this.ta=this.Ca;xe(this,pe(this));this.A-=this.B.nc;this.ta=-1},function(){this.uc.call(this,wi)},function(){this.Ba.call(this,xi)},function(){this.kc.call(this,wi)},function(){this.la.call(this,xi)},function(){this.D=this.D&-256|wi.call(this,this.D&255,this.sa());this.A--},function(){this.D=this.D&~this.R|xi.call(this,this.D&this.R,this.Ha());this.A--},function(){this.M|=20;this.Ga=this.Sb=this.pa;
this.A-=this.B.$c},function(){var a=this.D&255,b=ng(this),c=lg(this);9<(a&15)||b?(a+=6,b=16):b=0;159<a||c?(a+=96,c=1):c=0;a&=255;this.D=this.D&-256|a;rg(this,a,128);c?sg(this):tg(this);b?Ag(this):yg(this);this.A-=this.B.se},function(){this.uc.call(this,Vj)},function(){this.Ba.call(this,Wj)},function(){this.kc.call(this,Vj)},function(){this.la.call(this,Wj)},function(){this.D=this.D&-256|Vj.call(this,this.D&255,this.sa());this.A--},function(){this.D=this.D&~this.R|Wj.call(this,this.D&this.R,this.Ha());
this.A--},function(){this.M|=20;this.Ga=this.Sb=this.ba;this.A-=this.B.$c},function(){var a=this.D&255,b=ng(this),c=lg(this);9<(a&15)||b?(a-=6,b=16):b=0;159<a||c?(a-=96,c=1):c=0;a&=255;this.D=this.D&-256|a;rg(this,a,128);c?sg(this):tg(this);b?Ag(this):yg(this);this.A-=this.B.se},function(){this.uc.call(this,dk)},function(){this.Ba.call(this,ek)},function(){this.kc.call(this,dk)},function(){this.la.call(this,ek)},function(){this.D=this.D&-256|dk.call(this,this.D&255,this.sa());this.A--},function(){this.D=
this.D&~this.R|ek.call(this,this.D&this.R,this.Ha());this.A--},function(){this.M|=20;this.Ga=this.Sb=this.U;this.A-=this.B.$c},function(){var a,b=this.D&255,c=this.D>>8&255;if(9<(b&15)||ng(this)){b+=6;80286<=this.da&&255<b&&c++;c++;var d=a=1}else d=a=0;this.D=this.D&-65536|(c<<8|b)&65295;d?sg(this):tg(this);a?Ag(this):yg(this);this.A-=this.B.se},function(){this.uc.call(this,Ki)},function(){this.Ba.call(this,Li)},function(){this.kc.call(this,Ki)},function(){this.la.call(this,Li)},function(){Ki.call(this,
this.D&255,this.sa());this.A--},function(){Li.call(this,this.D&this.R,this.Ha());this.A--},function(){this.M|=20;this.Ga=this.Sb=this.Fa;this.A-=this.B.$c},function(){var a,b=this.D&255,c=this.D>>8&255;if(9<(b&15)||ng(this)){b=b-6&15;c=c-1&255;var d=a=1}else d=a=0;this.D=this.D&-65536|c<<8|b;d?sg(this):tg(this);a?Ag(this):yg(this);this.A-=this.B.se},function(){this.D=ik.call(this,this.D)},function(){this.I=ik.call(this,this.I)},function(){this.L=ik.call(this,this.L)},function(){this.H=ik.call(this,
this.H)},function(){re(this,ik.call(this,y(this)))},function(){this.N=ik.call(this,this.N)},function(){this.K=ik.call(this,this.K)},function(){this.J=ik.call(this,this.J)},function(){this.D=gk.call(this,this.D)},function(){this.I=gk.call(this,this.I)},function(){this.L=gk.call(this,this.L)},function(){this.H=gk.call(this,this.H)},function(){re(this,gk.call(this,y(this)))},function(){this.N=gk.call(this,this.N)},function(){this.K=gk.call(this,this.K)},function(){this.J=gk.call(this,this.J)},function(){ze(this,
this.D&this.R);this.A-=this.B.Ic},function(){ze(this,this.I&this.R);this.A-=this.B.Ic},function(){ze(this,this.L&this.R);this.A-=this.B.Ic},function(){ze(this,this.H&this.R);this.A-=this.B.Ic},function(){ze(this,y(this)-2&65535);this.A-=this.B.Ic},function(){ze(this,this.N&this.R);this.A-=this.B.Ic},function(){ze(this,this.K&this.R);this.A-=this.B.Ic},function(){ze(this,this.J&this.R);this.A-=this.B.Ic},function(){this.D=this.D&~this.R|pe(this);this.A-=this.B.nc},function(){this.I=this.I&~this.R|
pe(this);this.A-=this.B.nc},function(){this.L=this.L&~this.R|pe(this);this.A-=this.B.nc},function(){this.H=this.H&~this.R|pe(this);this.A-=this.B.nc},function(){re(this,y(this)&~this.R|pe(this));this.A-=this.B.nc},function(){this.N=this.N&~this.R|pe(this);this.A-=this.B.nc},function(){this.K=this.K&~this.R|pe(this);this.A-=this.B.nc},function(){this.J=this.J&~this.R|pe(this);this.A-=this.B.nc},xk,yk,zk,Ak,Bk,Ck,Dk,Ek,Fk,Gk,Hk,Ik,Jk,Kk,Lk,Mk,xk,yk,zk,Ak,Bk,Ck,Dk,Ek,Fk,Gk,Hk,Ik,Jk,Kk,Lk,Mk,Nk,function(){this.mb.call(this,
bl,this.Ha);this.A-=-1===this.F?1:this.B.wg},Nk,function(){this.mb.call(this,bl,this.S);this.A-=-1===this.F?1:this.B.wg},function(){this.uc.call(this,Xj)},function(){this.Ba.call(this,Yj)},function(){this.kc.call(this,bk)},function(){this.la.call(this,ck)},Pk,Qk,Rk,Sk,function(){this.M|=1;this.Ba.call(this,gj)},function(){this.M|=1;this.Ga=this.Sb=this.Jg;this.la.call(this,Xi)},function(){this.la.call(this,fj);switch(this.fa>>3&7){case 0:var a=this.D;this.D=this.Aa;ye(this,a);break;case 1:a=this.I;
this.I=this.Aa;gg(this,a);break;case 2:a=this.L;this.L=this.Aa;qe(this,a);break;case 3:a=this.H;this.H=this.Aa;xe(this,a);break;case 4:a=y(this);re(this,this.Aa);80386<=this.da?this.Ka.load(a):ye(this,a);break;case 5:a=this.N;this.N=this.Aa;80386<=this.da?this.La.load(a):gg(this,a);break;case 6:a=this.K;this.K=this.Aa;qe(this,a);break;case 7:a=this.J,this.J=this.Aa,xe(this,a)}},function(){this.M|=1;this.ta=this.Ca;this.Aa=pe(this);this.mb.call(this,cl,pk);this.ta=-1},function(){this.A-=3},function(){var a=
this.D;this.D=this.D&~this.R|this.I&this.R;this.I=this.I&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.L&this.R;this.L=this.L&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.H&this.R;this.H=this.H&~this.R|a&this.R;this.A-=3},function(){var a=this.D,b=y(this);this.D=this.D&~this.R|b&this.R;re(this,b&~this.R|a&this.R);this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.N&this.R;this.N=this.N&~this.R|a&this.R;this.A-=3},function(){var a=
this.D;this.D=this.D&~this.R|this.K&this.R;this.K=this.K&~this.R|a&this.R;this.A-=3},function(){var a=this.D;this.D=this.D&~this.R|this.J&this.R;this.J=this.J&~this.R|a&this.R;this.A-=3},function(){this.D=2==this.X?this.D&-65536|this.D<<24>>24&65535:this.D<<16>>16;this.A-=2},function(){this.L=2==this.X?this.L&-65536|(this.D&32768?65535:0):this.D&-2147483648?-1:0;this.A-=this.B.Mj},function(){qk.call(this,this.Ha(),Qg(this));this.A-=this.B.Pj},function(){this.A-=3},function(){var a=Be(this);a&131072&&
3>this.lc?x.call(this,13,0):(ze(this,a&-196609),this.A-=this.B.Ic)},function(){if(this.P&131072&&3>this.lc)x.call(this,13,0);else{var a=pe(this);a=a&65535|this.P&-65536;Ce(this,a);this.A-=this.B.nc}},function(){var a=this.D>>8&255;a&1?sg(this):tg(this);a&4?(this.resultType&=-3,this.P|=4):(this.resultType&=-3,this.P&=-5);a&16?Ag(this):yg(this);a&64?Bg(this):zg(this);a&128?(this.resultType&=-17,this.P|=128):(this.resultType&=-17,this.P&=-129);this.A-=this.B.Yb},function(){this.D=this.D&-65281|(Be(this)&
213)<<8;this.A-=this.B.Yb},function(){var a=this.D&-256;var b=K(this);b=this.ya(this.Ga.Cb(b,1));this.D=a|b;this.A-=this.B.Lh},function(){this.D=this.D&~this.R|ve(this,this.Ga,K(this));this.A-=this.B.Lh},function(){var a=K(this),b=this.D;this.ub(this.Ga.Ub(a,1),b);this.A-=this.B.Mh},function(){Pg(this,this.Ga,K(this),this.D);this.A-=this.B.Mh},function(){var a=1,b=0,c=this.xa,d=this.B.Nh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Ph,this.ha&256||(this.A-=this.B.Oh));if(a--){var e=this.ya(this.Ga.Cb(this.K&
c,1));this.ub(this.pa.Ub(this.J&c,1),e);e=this.P&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d;this.I=this.I&~c|this.I-b&c;a&&(jg(this),this.M|=256)}},function(){var a=1,b=0,c=this.xa,d=this.B.Nh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Ph,this.ha&256||(this.A-=this.B.Oh));if(a--){Pg(this,this.pa,this.J&c,ve(this,this.Ga,this.K&c));var e=this.P&1024?-this.X:this.X;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.A-=d;this.I=this.I&~c|this.I-b&c;a&&(jg(this),
this.M|=256)}},function(){var a=1,b=0,c=this.xa,d=this.B.yh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Ah,this.ha&256||(this.A-=this.B.zh));if(a--){var e=Hg(this,this.Ga,this.K),f=Hg(this,this.pa,this.J);this.F=this.C;Ki.call(this,e,f);e=this.P&1024?-1:1;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Nb;a&&og(this)==(this.ha&64)&&(jg(this),this.M|=256)}},function(){var a=1,b=0,c=this.xa,d=this.B.yh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Ah,this.ha&256||
(this.A-=this.B.zh));if(a--){var e=Jg(this,this.Ga,this.K&c),f=Jg(this,this.pa,this.J&c);this.F=this.C;Li.call(this,e,f);e=this.P&1024?-this.X:this.X;this.K=this.K&~c|this.K+e&c;this.J=this.J&~c|this.J+e&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Nb;a&&og(this)==(this.ha&64)&&(jg(this),this.M|=256)}},function(){rg(this,this.D&this.sa(),128);this.A-=this.B.se},function(){rg(this,this.D&this.Ha(),this.Ib);this.A-=this.B.se},function(){var a=1,b=0,c=this.xa,d=this.B.Yh;this.ha&192&&(a=this.I&c,b=
1,d=this.B.$h,this.ha&256||(this.A-=this.B.Zh));if(a--){var e=this.D;this.ub(this.pa.Ub(this.J&c,1),e);this.I=this.I&~c|this.I-b&c;80546<=this.Qd&&80564>=this.Qd&&!(this.ha&2048)!=(103!=this.ya(this.ea))&&(c^=-65536);this.J=this.J&~c|this.J+(this.P&1024?-1:1)&c;this.A-=d;a&&(jg(this),this.M|=256)}},function(){var a=1,b=0,c=this.xa,d=this.B.Yh;this.ha&192&&(a=this.I&c,b=1,d=this.B.$h,this.ha&256||(this.A-=this.B.Zh));a--&&(Pg(this,this.pa,this.J&c,this.D),this.J=this.J&~c|this.J+(this.P&1024?-this.X:
this.X)&c,this.I=this.I&~c|this.I-b&c,this.A-=d,a&&(jg(this),this.M|=256))},function(){var a=1,b=0,c=this.xa,d=this.B.Fh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Hh,this.ha&256||(this.A-=this.B.Gh));if(a--){var e=this.ya(this.Ga.Cb(this.K&c,1));this.D=this.D&-256|e;this.K=this.K&~c|this.K+(this.P&1024?-1:1)&c;this.I=this.I&~c|this.I-b&c;this.A-=d;a&&(jg(this),this.M|=256)}},function(){var a=1,b=0,c=this.xa,d=this.B.Fh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Hh,this.ha&256||(this.A-=this.B.Gh));if(a--){var e=
ve(this,this.Ga,this.K&c);this.D=this.D&~this.R|e;this.K=this.K&~c|this.K+(this.P&1024?-this.X:this.X)&c;this.I=this.I&~c|this.I-b&c;this.A-=d;a&&(jg(this),this.M|=256)}},function(){var a=1,b=0,c=this.xa,d=this.B.Sh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Uh,this.ha&256||(this.A-=this.B.Th));if(a--){var e=this.D&255,f=Hg(this,this.pa,this.J);this.F=this.C;Ki.call(this,e,f);this.J=this.J&~c|this.J+(this.P&1024?-1:1)&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Nb;a&&og(this)==(this.ha&64)&&(jg(this),
this.M|=256)}},function(){var a=1,b=0,c=this.xa,d=this.B.Sh;this.ha&192&&(a=this.I&c,b=1,d=this.B.Uh,this.ha&256||(this.A-=this.B.Th));if(a--){var e=this.D&this.R,f=Jg(this,this.pa,this.J&c);this.F=this.C;Li.call(this,e,f);this.J=this.J&~c|this.J+(this.P&1024?-this.X:this.X)&c;this.I=this.I&~c|this.I-b&c;this.A-=d-this.B.Nb;a&&og(this)==(this.ha&64)&&(jg(this),this.M|=256)}},function(){this.D=this.D&-256|this.sa();this.A-=this.B.Yb},function(){this.I=this.I&-256|this.sa();this.A-=this.B.Yb},function(){this.L=
this.L&-256|this.sa();this.A-=this.B.Yb},function(){this.H=this.H&-256|this.sa();this.A-=this.B.Yb},function(){this.D=this.D&-65281|this.sa()<<8;this.A-=this.B.Yb},function(){this.I=this.I&-65281|this.sa()<<8;this.A-=this.B.Yb},function(){this.L=this.L&-65281|this.sa()<<8;this.A-=this.B.Yb},function(){this.H=this.H&-65281|this.sa()<<8;this.A-=this.B.Yb},function(){this.D=this.D&~this.R|this.Ha();this.A-=this.B.Yb},function(){this.I=this.I&~this.R|this.Ha();this.A-=this.B.Yb},function(){this.L=this.L&
~this.R|this.Ha();this.A-=this.B.Yb},function(){this.H=this.H&~this.R|this.Ha();this.A-=this.B.Yb},function(){re(this,y(this)&~this.R|this.Ha());this.A-=this.B.Yb},function(){this.N=this.N&~this.R|this.Ha();this.A-=this.B.Yb},function(){this.K=this.K&~this.R|this.Ha();this.A-=this.B.Yb},function(){this.J=this.J&~this.R|this.Ha();this.A-=this.B.Yb},Wk,Xk,Wk,Xk,function(){this.la.call(this,Yi)},function(){this.la.call(this,Wi)},function(){this.M|=1;this.ld.call(this,dl,this.sa)},function(){this.M|=
1;this.mb.call(this,dl,this.Ha)},Yk,Zk,Yk,Zk,function(){if(this.P&131072&&3>this.lc)x.call(this,13,0);else{var a=this.B.fk;this.Sc=-1;rk.call(this,3,null,a)}},function(){var a=this.sa();if(this.P&131072&&3>this.lc)x.call(this,13,0);else{a:{var b=this.Uf[a];if(void 0!==b)for(var c=0;c<b.length;c++)if(!b[c](this.ea)){b=!1;break a}this.aa.lj&&r(this,16)&&el(this.ca,a,this.ea);b=!0}b?(this.Sc=-1,rk.call(this,a,null,0)):this.A--}},function(){if(qg(this))if(this.P&131072&&3>this.lc)x.call(this,13,0);else{var a=
this.B.gk;this.Sc=-1;rk.call(this,4,null,a)}else this.A-=this.B.hk},function(){if(this.P&131072&&3>this.lc)x.call(this,13,0);else{this.Tc=this.U.T;this.ta=this.Ca;this.A-=this.B.dk;if(this.ra&1&&this.P&16384){var a=this.ja(this.ka.ua+0);se(this.ba,a,!1)}else{a=this.Pa;var b=pe(this),c=pe(this),d=pe(this);if(this.P&131072)d=d&131071|this.P&-131072;else if(d&131072){var e=pe(this),f=pe(this),g=pe(this),h=pe(this),k=pe(this),m=pe(this);te(this,!0,!0);qe(this,f);re(this,e);ye(this,g);xe(this,h);this.Ka.load(k);
this.La.load(m)}null!=De(this,b,c,!1)&&(Ce(this,d,a),this.Xf&&bg(this,this.ea))}this.Tc=this.ta=-1}},function(){this.ld.call(this,Tk,lk)},function(){this.mb.call(this,2==this.X?Uk:Vk,lk)},function(){this.ld.call(this,Tk,mk)},function(){this.mb.call(this,2==this.X?Uk:Vk,mk)},function(){var a=this.sa();if(a){var b=this.D&255;this.D=this.D&-65536|b/a<<8|b%a;rg(this,this.D,128);this.A-=this.B.Jj}else uk.call(this)},function(){var a=this.D&255,b=(this.D>>8&255)*this.sa()|0,c=a+b|0;this.D=this.D&-65536|
c&255;kg(this,a,b,c,191);this.A-=this.B.Ij},function(){this.D=this.D&-256|(lg(this)?255:0);this.A-=2},function(){this.D=this.D&-256|Hg(this,this.Ga,this.H+(this.D&255));this.A-=this.B.Ik},function(){$k.call(this,216)},function(){$k.call(this,217)},function(){$k.call(this,218)},function(){$k.call(this,219)},function(){$k.call(this,220)},function(){$k.call(this,221)},function(){$k.call(this,222)},function(){$k.call(this,223)},function(){var a=this.S(),b=this.I-1&this.xa;this.I=this.I&~this.xa|b;b&&
!og(this)?(C(this,z(this)+a),this.A-=this.B.pk):this.A-=this.B.Ih},function(){var a=this.S(),b=this.I-1&this.xa;this.I=this.I&~this.xa|b;b&&og(this)?(C(this,z(this)+a),this.A-=this.B.Jh):this.A-=this.B.Kh},function(){var a=this.S(),b=this.I-1&this.xa;this.I=this.I&~this.xa|b;b?(C(this,z(this)+a),this.A-=this.B.nk):this.A-=this.B.Ih},function(){var a=this.S();this.I&this.xa?this.A-=this.B.Kh:(C(this,z(this)+a),this.A-=this.B.Jh)},function(){var a=this.sa();Dg(this,a,1,!0)&&(this.D=this.D&-256|Uc(this.oa,
a,1,this.ea-2)&255,this.A-=this.B.Dh)},function(){var a=this.sa();Dg(this,a,this.X,!0)&&(this.D=this.D&~this.R|Uc(this.oa,a,this.X,this.ea-2)&this.R,this.A-=this.B.Dh)},function(){var a=this.sa();Dg(this,a,1,!1)&&(Yc(this.oa,a,1,this.D&255,this.ea-2),this.A-=this.B.Rh)},function(){var a=this.sa();Dg(this,a,this.X,!1)&&(Yc(this.oa,a,this.X,this.D&this.R,this.ea-2),this.A-=this.B.Rh)},function(){var a=this.Ha(),b=z(this);a=b+a;ze(this,b);C(this,a);this.A-=this.B.Nj},function(){var a=this.Ha();C(this,
z(this)+a);this.A-=this.B.Eh},function(){De(this,this.Ha(),Qg(this));this.A-=this.B.jk},function(){var a=this.S();C(this,z(this)+a);this.A-=this.B.Eh},function(){var a=this.L&65535;Dg(this,a,1,!0)&&(this.D=this.D&-256|Uc(this.oa,a,1,this.ea-1)&255,this.A-=this.B.Ch)},function(){var a=this.L&65535;Dg(this,a,this.X,!0)&&(this.D=this.D&~this.R|Uc(this.oa,a,this.X,this.ea-1)&this.R,this.A-=this.B.Ch)},function(){var a=this.L&65535;Dg(this,a,1,!1)&&(Yc(this.oa,a,1,this.D&255,this.ea-1),this.A-=this.B.Qh)},
function(){var a=this.L&65535;Dg(this,a,2,!1)&&(Yc(this.oa,a,this.X,this.D&this.R,this.ea-1),this.A-=this.B.Qh)},al,al,function(){this.M|=132;this.A-=this.B.$c},function(){this.M|=68;this.A-=this.B.$c},function(){this.P&131072?x.call(this,13,0):(this.ab|=4,this.A-=2,this.ca&&r(this,-2147483648)?(jg(this),vk(this.ca)):this.P&512||(this.ca&&jg(this),Jd(this)))},function(){lg(this)?tg(this):sg(this);this.A-=2},function(){this.vc=!1;this.ld.call(this,fl,ok);this.vc&&(this.D=this.D&~this.R|this.Ea&this.R)},
function(){this.vc=!1;this.mb.call(this,gl,ok);this.vc&&(this.D=this.D&~this.R|this.Ea&this.R,this.L=this.L&~this.R|this.cb&this.R)},function(){tg(this);this.A-=2},function(){sg(this);this.A-=2},function(){this.Pa>this.lc?x.call(this,13,0):(this.P&=-513,this.A-=this.B.Lj)},function(){this.Pa>this.lc?x.call(this,13,0):(this.P|=512,this.M|=4,this.A-=2)},function(){this.P&=-1025;this.A-=2},function(){this.P|=1024;this.A-=2},function(){this.ld.call(this,Je,ok)},function(){this.mb.call(this,Ke,ok)}],Ok=
[ui,hj,si,sj,wi,Vj,dk,Ki],bl=[vi,rj,ti,tj,xi,Wj,ek,Li],cl=[function(a,b){this.A-=-1===this.F?this.B.nc:this.B.Ak;return b},Ni,Ni,Ni,Ni,Ni,Ni,Ni],dl=[function(a,b){this.A-=-1===this.F?this.B.sk:this.B.qk;return b},Oi,Oi,Oi,Oi,Oi,Oi,Oi],Tk=[function(a,b){var c=a;if(b&=this.Ra){if(b&=7){var d=a<<b-1;c=(a<<b|a>>8-b)&255}else d=a<<7;wg(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.Ra){if(b&=7){var d=a<<8-b;c=(a>>>b|d)&255}else d=a;wg(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.Ra){var d=
xg(this);(b%=9)?(c=(a<<b|d<<b-1|a>>9-b)&255,d=a<<b-1):d<<=7;wg(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.Ra){var d=xg(this);(b%=9)?(c=(a>>b|d<<8-b|a<<9-b)&255,d=a<<8-b):d<<=7;wg(this,c,d,128)}return c},function(a,b){var c=a;if(b&=this.Ra){var d=0;8<b?c=0:(d=a<<b-1,c=d<<1&255);rg(this,c,128,d&128,(c^d)&128)}return c},function(a,b){if(b&=this.Ra)b=8<b?0:a>>>b-1,a=b>>>1&255,rg(this,a,128,b&1,a&128);return a},Oi,function(a,b){if(b&=this.Ra)9<b&&(b=9),b=a<<24>>24>>b-1,a=b>>1&255,rg(this,
a,128,b&1);return a}],Uk=[function(a,b){var c=a;if(b&=this.Ra){if(b&=15){var d=a<<b-1;c=(a<<b|a>>16-b)&65535}else d=a<<15;wg(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Ra){if(b&=15){var d=a<<16-b;c=(a>>>b|d)&65535}else d=a;wg(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Ra){var d=xg(this);(b%=17)?(c=(a<<b|d<<b-1|a>>17-b)&65535,d=a<<b-1):d<<=15;wg(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Ra){var d=xg(this);(b%=17)?(c=(a>>b|d<<16-b|a<<17-b)&65535,d=a<<
16-b):d<<=15;wg(this,c,d,32768)}return c},function(a,b){var c=a;if(b&=this.Ra){var d=0;16<b?c=0:(d=a<<b-1,c=d<<1&65535);rg(this,c,32768,d&32768,(c^d)&32768)}return c},function(a,b){if(b&=this.Ra)b=16<b?0:a>>>b-1,a=b>>>1&65535,rg(this,a,32768,b&1,a&32768);return a},Oi,function(a,b){if(b&=this.Ra)17<b&&(b=17),b=a<<16>>16>>b-1,a=b>>1&65535,rg(this,a,32768,b&1);return a}],Vk=[function(a,b){var c=a;if(b&=this.Ra)c=a<<b|a>>>32-b,wg(this,c,a<<b-1,-2147483648);return c},function(a,b){var c=a;if(b&=this.Ra){var d=
a<<32-b;c=a>>>b|d;wg(this,c,d,-2147483648)}return c},function(a,b){var c=a;if(b&=this.Ra)c=xg(this),c=a<<b|c<<b-1|a>>>32-b>>>1,wg(this,c,a<<b-1,-2147483648);return c},function(a,b){var c=a;if(b&=this.Ra)c=xg(this),c=a>>>b|c<<32-b|a<<32-b<<1,wg(this,c,a<<32-b,-2147483648);return c},function(a,b){var c=a;if(b&=this.Ra)a<<=b-1,c=a<<1,rg(this,c,-2147483648,a&-2147483648,(c^a)&-2147483648);return c},function(a,b){if(b&=this.Ra)b=a>>>b-1,a=b>>>1,rg(this,a,-2147483648,b&1,a&-2147483648);return a},Oi,function(a,
b){if(b&=this.Ra)b=a>>b-1,a=b>>1,rg(this,a,-2147483648,b&1);return a}],fl=[function(a,b){b=this.sa();rg(this,a&b,128);this.A-=-1===this.C?this.B.bi:this.B.ai;this.M|=2;return a},Oi,function(a){this.A-=-1===this.C?this.B.Df:this.B.Cf;return a^255},function(a){var b=-a|0;kg(this,0,a,b,191,!0);this.A-=-1===this.C?this.B.Df:this.B.Cf;return b&255},function(a){this.Ea=(this.D&255)*a&65535;this.Ea&65280?(sg(this),ug(this)):(tg(this),vg(this));this.vc=!0;this.A-=-1===this.C?this.B.wk:this.B.vk;this.M|=2;
return a},function(a){var b=(this.D<<24>>24)*(a<<24>>24)|0;this.Ea=b&65535;127<b||-128>b?(sg(this),ug(this)):(tg(this),vg(this));this.vc=!0;this.A-=-1===this.C?this.B.ak:this.B.$j;this.M|=2;return a},function(a,b){if(!a)return uk.call(this),a;var c=(b=this.D&65535)/a;if(255<c)return uk.call(this),a;this.Ea=c&255|(b%a&255)<<8;this.vc=!0;this.A-=-1===this.C?this.B.Tj:this.B.Sj;this.M|=2;return a},function(a,b){if(!a)return uk.call(this),a;var c=a<<24>>24,d=(b=this.D<<16>>16)/c|0;if(d!=d<<24>>24||8086==
this.da&&-128==d)return uk.call(this),a;this.Ea=d&255|(b%c&255)<<8;this.vc=!0;this.A-=-1===this.C?this.B.Xj:this.B.Wj;this.M|=2;return a}],gl=[function(a,b){b=this.Ha();rg(this,a&b,this.Ib);this.A-=-1===this.C?this.B.bi:this.B.ai;this.M|=2;return a},Oi,function(a){this.A-=-1===this.C?this.B.Df:this.B.Cf;return a^this.R},function(a){var b=-a|0;kg(this,0,a,b,this.Ib|63,!0);this.A-=-1===this.C?this.B.Df:this.B.Cf;return b&this.R},function(a,b){2==this.X?(b=this.D&65535,b=b*a|0,this.Ea=b&65535,this.cb=
b>>16&65535):(Ui.call(this,a,this.D),80563==this.Qd&&68657152==this.D&&129==a&&(this.cb=0));this.cb?(sg(this),ug(this)):(tg(this),vg(this));this.vc=!0;this.A-=-1===this.C?this.B.yk:this.B.xk;this.M|=2;return a},function(a,b){2==this.X?(b=this.D&65535,b=(b<<16>>16)*(a<<16>>16)|0,this.Ea=b&65535,this.cb=b>>16&65535,b=32767<b||-32768>b):(Ti.call(this,a,this.D),b=this.cb!=this.Ea>>31);b?(sg(this),ug(this)):(tg(this),vg(this));this.vc=!0;this.A-=-1===this.C?this.B.ck:this.B.bk;this.M|=2;return a},function(a,
b){if(2==this.X){if(!a)return uk.call(this),a;b=65536*(this.L&65535)+(this.D&65535);var c=b/a;if(65536<=c)return uk.call(this),a;this.Ea=c&65535;this.cb=b%a&65535}else{if(!hk.call(this,this.D,this.L,a))return uk.call(this),a;this.Ea|=0;this.cb|=0}this.vc=!0;this.A-=-1===this.C?this.B.Vj:this.B.Uj;this.M|=2;return a},function(a,b){if(2==this.X){if(!a)return uk.call(this),a;var c=a<<16>>16,d=(b=this.L<<16|this.D&65535)/c|0;if(d!=d<<16>>16||8086==this.da&&-32768==d)return uk.call(this),a;this.Ea=d&65535;
this.cb=b%c&65535}else{b=this.D;c=this.L;d=a;var e=0,f=0;0>d&&(d=-d|0,e=1-e);0>c&&(b=-b|0,c=~c+(b?0:1)|0,f=1,e=1-e);!hk.call(this,b,c,d)||this.Ea>2147483647+e||this.cb>2147483647+f?b=!1:(e&&(this.Ea=-this.Ea),f&&(this.cb=-this.cb),b=!0);if(!b)return uk.call(this),a;this.Ea|=0;this.cb|=0}this.vc=!0;this.A-=-1===this.C?this.B.Zj:this.B.Yj;this.M|=2;return a}],Je=[function(a){var b=a+1|0;kg(this,a,1,b,190);this.A-=-1===this.C?this.B.Bf:this.B.Af;return b&255},function(a){var b=a-1|0;kg(this,a,1,b,190,
!0);this.A-=-1===this.C?this.B.Bf:this.B.Af;return b&255},Oi,Oi,Oi,Oi,Oi,Oi],Ke=[function(a){var b=a+1|0;kg(this,a,1,b,this.Ib|62);this.A-=-1===this.C?this.B.Bf:this.B.Af;return b&this.R},function(a){var b=a-1|0;kg(this,a,1,b,this.Ib|62,!0);this.A-=-1===this.C?this.B.Bf:this.B.Af;return b&this.R},function(a){ze(this,z(this));C(this,a);this.A-=-1===this.C?this.B.Rj:this.B.Qj;this.M|=2;return a},function(a){if(-1===this.C)return Oi.call(this,a);this.ta=this.Ca;qk.call(this,a,this.ja(this.C+this.X));
this.A-=this.B.Oj;this.M|=2;this.ta=-1;return a},function(a){C(this,a);this.A-=-1===this.C?this.B.lk:this.B.kk;this.M|=2;return a},function(a){if(-1===this.C)return Oi.call(this,a);De(this,a,this.ja(this.C+this.X));this.A-=this.B.ik;this.M|=2;return a},function(a){var b=a;this.M&512&&(a=a-2&65535,80286>this.da&&(b=a));ze(this,b);this.A-=-1===this.C?this.B.Ic:this.B.Ck;this.M|=2;return a},Oi];function qf(){this.la.call(this,ak);this.A-=-1===this.C?6:13}
function rf(){this.Ba.call(this,Zj);this.A-=-1===this.C?12:19}var ef=Array(256);ef[0]=function(){16>(this.ya(this.ea)&56)&&(this.M|=1);this.mb.call(this,this.tj,ok)};ef[1]=function(){this.ya(this.ea)&16||(this.M|=1);this.mb.call(this,hl,ok)};ef[2]=function(){!(this.ra&1)||this.P&131072?x.call(this,6):this.la.call(this,Vi)};ef[3]=function(){!(this.ra&1)||this.P&131072?x.call(this,6):this.la.call(this,aj)};
ef[5]=function(){this.Pa?x.call(this,13,0,0,!0):(Cg(this,this.ja(2054)),this.J=this.ja(2086),this.K=this.ja(2088),this.N=this.ja(2090),this.H=this.ja(2094),this.L=this.ja(2096),this.I=this.ja(2098),this.D=this.ja(2100),ne(this.pa,2102,this.ja(2084)),ne(this.ba,2108,this.ja(2082)),ne(this.U,2114,this.ja(2080)),ne(this.Fa,2120,this.ja(2078)),Ce(this,this.ja(2072)),C(this,this.ja(2074)),re(this,this.ja(2092)),this.Lb=this.ja(2126)|this.ya(2128)<<16,this.Jc=this.Lb+this.ja(2130),this.Qb=this.ja(2138)|
this.ya(2140)<<16,this.ad=this.Qb+this.ja(2142),ne(this.Hb,2132,this.ja(2076)),ne(this.ka,2144,this.ja(2070)),this.A-=195)};ef[6]=function(){this.Pa?x.call(this,13,0):(this.ra&=-9,this.A-=2)};ef[11]=Me;ef[166]=Me;ef[255]=Me;var B=[];B[5]=Me;
B[7]=function(){if(this.Pa)x.call(this,13,0,0,!0);else{var a=this.pa.Cb(this.J&this.xa,204);if(-1!==a){jk.call(this,this.ia(a));var b=this.ia(a+168),c=(b&24576)>>13;Ce(this,this.ia(a+4),c);this.Lb=this.ia(a+112);this.Jc=this.Lb+this.ia(a+116);this.Qb=this.ia(a+100);this.ad=this.Qb+this.ia(a+104);le(this.Hb,this.ia(a+56),this.ia(a+120),this.ia(a+124),this.ia(a+128));le(this.ka,this.ia(a+52),this.ia(a+84),this.ia(a+88),this.ia(a+92));this.J=this.ia(a+12);this.K=this.ia(a+16);this.N=this.ia(a+20);this.H=
this.ia(a+28);this.L=this.ia(a+32);this.I=this.ia(a+36);this.D=this.ia(a+40);le(this.La,this.ia(a+60),this.ia(a+132),this.ia(a+136),this.ia(a+140));le(this.Ka,this.ia(a+64),this.ia(a+144),this.ia(a+148),this.ia(a+152));le(this.Fa,this.ia(a+68),this.ia(a+156),this.ia(a+160),this.ia(a+164));le(this.U,this.ia(a+72),b,this.ia(a+172),this.ia(a+176));le(this.ba,this.ia(a+76),this.ia(a+180),this.ia(a+184),this.ia(a+188));le(this.pa,this.ia(a+80),this.ia(a+192),this.ia(a+196),this.ia(a+200));C(this,this.ia(a+
8));re(this,this.ia(a+24))}this.A-=122<<(a&3?1:0)}};B[16]=Pk;B[17]=Qk;B[18]=Rk;B[19]=Sk;B[32]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa();switch((a&56)>>3){case 0:var b=this.ra;break;case 2:b=this.qd;break;case 3:b=this.wc;break;default:ff.call(this);return}Ef(this,a&7,b);this.A-=6}};B[33]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;4==b||5==b?ff.call(this):(Ef(this,a&7,this.Rb[b]),this.A-=22)}};
B[34]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa(),b=Df(this,a&7);switch((a&56)>>3){case 0:jk.call(this,b);this.A-=10;break;case 2:this.qd=b;this.A-=4;break;case 3:this.wc=b;yc(this);this.A-=5;break;default:ff.call(this)}}};B[35]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;4==b||5==b?ff.call(this):(a=Df(this,a&7),a!=this.Rb[b]&&(cg(this,!1),this.Rb[b]=a,cg(this,!0)),this.A-=4>b?22:14)}};
B[36]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;6>b?ff.call(this):(Ef(this,a&7,this.Zf[b]),this.A-=12)}};B[38]=function(){if(this.Pa)x.call(this,13,0);else{var a=this.sa(),b=(a&56)>>3;6>b?ff.call(this):(this.Zf[b]=Df(this,a&7),this.A-=12)}};B[128]=function(){var a=this.Ha();qg(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};B[129]=function(){var a=this.Ha();qg(this)?this.A-=this.B.Ua:(C(this,z(this)+a),this.A-=this.B.Ta)};
B[130]=function(){var a=this.Ha();lg(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};B[131]=function(){var a=this.Ha();lg(this)?this.A-=this.B.Ua:(C(this,z(this)+a),this.A-=this.B.Ta)};B[132]=function(){var a=this.Ha();og(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};B[133]=function(){var a=this.Ha();og(this)?this.A-=this.B.Ua:(C(this,z(this)+a),this.A-=this.B.Ta)};B[134]=function(){var a=this.Ha();lg(this)||og(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};
B[135]=function(){var a=this.Ha();lg(this)||og(this)?this.A-=this.B.Ua:(C(this,z(this)+a),this.A-=this.B.Ta)};B[136]=function(){var a=this.Ha();pg(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};B[137]=function(){var a=this.Ha();pg(this)?this.A-=this.B.Ua:(C(this,z(this)+a),this.A-=this.B.Ta)};B[138]=function(){var a=this.Ha();mg(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};B[139]=function(){var a=this.Ha();mg(this)?this.A-=this.B.Ua:(C(this,z(this)+a),this.A-=this.B.Ta)};
B[140]=function(){var a=this.Ha();!pg(this)!=!qg(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};B[141]=function(){var a=this.Ha();!pg(this)==!qg(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};B[142]=function(){var a=this.Ha();og(this)||!pg(this)!=!qg(this)?(C(this,z(this)+a),this.A-=this.B.Ta):this.A-=this.B.Ua};B[143]=function(){var a=this.Ha();og(this)||!pg(this)!=!qg(this)?this.A-=this.B.Ua:(C(this,z(this)+a),this.A-=this.B.Ta)};B[144]=function(){kk.call(this,uj)};
B[145]=function(){kk.call(this,uj)};B[146]=function(){kk.call(this,vj)};B[147]=function(){kk.call(this,wj)};B[148]=function(){kk.call(this,xj)};B[149]=function(){kk.call(this,yj)};B[150]=function(){kk.call(this,zj)};B[151]=function(){kk.call(this,Aj)};B[152]=function(){kk.call(this,Bj)};B[153]=function(){kk.call(this,Cj)};B[154]=function(){kk.call(this,Dj)};B[155]=function(){kk.call(this,Ej)};B[156]=function(){kk.call(this,Fj)};B[157]=function(){kk.call(this,Gj)};B[158]=function(){kk.call(this,Hj)};
B[159]=function(){kk.call(this,Ij)};B[160]=function(){we(this,this.Ka.T,this.X,2);this.A-=this.B.te};B[161]=function(){this.ta=this.Ca;var a=pe(this);this.Ka.load(a);this.A-=this.B.nc;this.ta=-1};B[163]=function(){this.Ba.call(this,Gi);-1!==this.C&&(this.A-=6)};B[164]=function(){this.Ba.call(this,2==this.X?Jj:Lj);this.A-=-1===this.C?3:7};B[165]=function(){this.Ba.call(this,2==this.X?Nj:Oj);this.A-=-1===this.C?3:7};B[168]=function(){we(this,this.La.T,this.X,2);this.A-=this.B.te};
B[169]=function(){this.ta=this.Ca;var a=pe(this);this.La.load(a);this.A-=this.B.nc;this.ta=-1};B[171]=function(){this.Ba.call(this,Ji);-1!==this.C&&(this.A-=5)};B[172]=function(){this.Ba.call(this,2==this.X?Pj:Rj);this.A-=-1===this.C?3:7};B[173]=function(){this.Ba.call(this,2==this.X?Tj:Uj);this.A-=-1===this.C?3:7};B[175]=function(){this.la.call(this,2==this.X?Qi:Si)};B[178]=function(){this.la.call(this,bj)};B[179]=function(){this.Ba.call(this,Ii);-1!==this.C&&(this.A-=5)};
B[180]=function(){this.la.call(this,Zi)};B[181]=function(){this.la.call(this,$i)};
B[182]=function(){this.kc.call(this,dj);switch(this.fa>>3&7){case 0:this.D=this.D&~this.R|this.D&255;break;case 1:this.I=this.I&~this.R|this.I&255;break;case 2:this.L=this.L&~this.R|this.L&255;break;case 3:this.H=this.H&~this.R|this.H&255;break;case 4:this.Ac=this.Ac&~this.R|this.D>>8&255;this.D=this.Aa;break;case 5:this.N=this.N&~this.R|this.I>>8&255;this.I=this.Aa;break;case 6:this.K=this.K&~this.R|this.L>>8&255;this.L=this.Aa;break;case 7:this.J=this.J&~this.R|this.H>>8&255,this.H=this.Aa}this.A-=
-1===this.C?3:6};B[183]=function(){ue(this,2);this.la.call(this,ej);switch(this.fa>>3&7){case 0:this.D=this.D&65535;break;case 1:this.I=this.I&65535;break;case 2:this.L=this.L&65535;break;case 3:this.H=this.H&65535;break;case 4:this.Ac=this.Ac&65535;break;case 5:this.N=this.N&65535;break;case 6:this.K=this.K&65535;break;case 7:this.J=this.J&65535}this.A-=-1===this.C?3:6};B[186]=function(){this.mb.call(this,il,this.sa)};B[187]=function(){this.Ba.call(this,Hi);-1!==this.C&&(this.A-=5)};
B[188]=function(){this.la.call(this,Ai)};B[189]=function(){this.la.call(this,Bi)};
B[190]=function(){this.kc.call(this,dj);switch(this.fa>>3&7){case 0:this.D=this.D&~this.R|(this.D&255)<<24>>24&this.R;break;case 1:this.I=this.I&~this.R|(this.I&255)<<24>>24&this.R;break;case 2:this.L=this.L&~this.R|(this.L&255)<<24>>24&this.R;break;case 3:this.H=this.H&~this.R|(this.H&255)<<24>>24&this.R;break;case 4:this.Ac=this.Ac&~this.R|this.D<<16>>24&this.R;this.D=this.Aa;break;case 5:this.N=this.N&~this.R|this.I<<16>>24&this.R;this.I=this.Aa;break;case 6:this.K=this.K&~this.R|this.L<<16>>24&
this.R;this.L=this.Aa;break;case 7:this.J=this.J&~this.R|this.H<<16>>24&this.R,this.H=this.Aa}this.A-=-1===this.C?3:6};B[191]=function(){ue(this,2);this.la.call(this,ej);switch(this.fa>>3&7){case 0:this.D=this.D<<16>>16;break;case 1:this.I=this.I<<16>>16;break;case 2:this.L=this.L<<16>>16;break;case 3:this.H=this.H<<16>>16;break;case 4:this.Ac=this.Ac<<16>>16;break;case 5:this.N=this.N<<16>>16;break;case 6:this.K=this.K<<16>>16;break;case 7:this.J=this.J<<16>>16}this.A-=-1===this.C?3:6};
var dg=[function(){this.A-=2+(-1===this.C?0:1);return this.Hb.T},function(){this.A-=2+(-1===this.C?0:1);return this.ka.T},function(a){this.M|=2;this.Hb.load(a);this.A-=17+(-1===this.C?0:2);return a},function(a){this.M|=2;-1!==this.ka.load(a)&&(this.ib(this.ka.Pb+4,this.ka.ob|=512),this.ka.type|=512);this.A-=17+(-1===this.C?0:2);return a},function(a){this.M|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.zb.load(a)&&2048!=(this.zb.ob&2560)&&(this.zb.qc>=this.Pa&&this.zb.qc>=(a&3)||7168==(this.zb.ob&7168)))return Bg(this),
a;zg(this);return a},function(a){this.M|=2;this.A-=14+(-1===this.C?0:2);if(-1!==this.zb.load(a)&&512==(this.zb.ob&2560)&&this.zb.qc>=this.Pa&&this.zb.qc>=(a&3))return Bg(this),a;zg(this);return a},Oi,Oi],Le=[cf,cf,cf,cf,cf,cf,Oi,Oi],hl=[function(a){if(-1===this.C)x.call(this,6);else{a=this.Jc-this.Lb;var b=this.Lb;80286==this.da?b|=-16777216:80386<=this.da&&2!=this.X&&(a|=b<<16);this.eb(this.C+2,b);this.A-=11}return a},function(a){if(-1===this.C)x.call(this,6);else{a=this.ad-this.Qb;var b=this.Qb;
80286==this.da?b|=-16777216:80386<=this.da&&2!=this.X&&(a|=b<<16);this.eb(this.C+2,b);this.A-=12}return a},function(a){-1===this.C||this.P&131072?x.call(this,6):(this.Lb=this.ia(this.C+2)&(this.R|this.R<<8),a&=65535,this.Jc=this.Lb+a,this.M|=2,this.A-=11);return a},function(a){-1===this.C||this.P&131072?x.call(this,6):(this.Qb=this.ia(this.C+2)&(this.R|this.R<<8),a&=65535,this.ad=this.Qb+a,this.M|=2,this.A-=12);return a},function(){this.A-=2+(-1===this.C?0:1);return this.ra},Oi,function(a){this.P&
131072?x.call(this,6):(Cg(this,a),this.A-=-1===this.C?3:6,this.M|=2);return a},Oi],il=[Oi,Oi,Oi,Oi,Ci,Fi,Ei,Di];
function jl(a){sb.call(this,"ChipSet",a,32768);var b=a.model;b&&!kl[b]&&nb("Unrecognized ChipSet model: "+b);this.da=kl[b]||ll;this.B=[];b=ml(a[nl]);this.B[0]=[b,b];null==b&&(this.L=[360,360],(b=a.floppies)&&b.length&&(this.L=b),ol(this,pl,this.L.length),ol(this,ql,a.monitor||(this.da<nh?"mono":"ega")));b=ml(a[rl]);this.B[1]=[b,b];this.Ba=this.ka=1;this.da>=nh&&(this.Ba=this.ka=2);this.M=a.scaleTimers||!1;this.Ra=a.dateRTC;this.Ka=this.La=!1;this.Ia=0;if(a=a.sound)this.Ia="number"!=typeof a||0>a||
1<a?.5:a,this.Ga=this.P=null,window&&(this.Ga=window.AudioContext||window.webkitAudioContext),this.Ga&&(this.P=new this.Ga);this.reset(!0)}ia(jl,sb);l=jl.prototype;
l.tc=function(a,b,c,d){this.oa=b;this.G=c;this.ca=d;this.na=a;this.Kc=ec(a,"FPU");ol(this,sl,this.Kc?1:0,!0);this.C=ec(a,"Keyboard");a=Ed(a,"sound");if(null!=a){var e=+a||0;this.Ia="true"==a||0>e||1<e?.5:e}this.Ea=c.Y.Yd/tl;Tc(b,this,ul);Xc(b,this,vl);this.da<nh?this.da!=wl?(Tc(b,this,xl),Xc(b,this,yl)):(Tc(b,this,zl),Xc(b,this,Al)):(Tc(b,this,Bl),Xc(b,this,Cl),(this.da|0)==Dl&&(Tc(b,this,El),Xc(b,this,Fl)));if(d){var f=this;Gl(d,1024,function(){for(var a=0;a<f.ic.length;a++){for(var b=f.ic[a],c=
"PIC"+a+":",d=0;d<b.Mc.length;d++)c+=" IC"+(d+1)+"="+va(b.Mc[d]);c+=" IMR="+va(b.td)+" IRR="+va(b.cc)+" ISR="+va(b.Fc)+" DELAY="+b.Ve;f.ca.O(c)}});Gl(d,2048,function(a){a=(a=a[0])?+a:null;for(var b=0;b<f.qa.length;b++)if(null==a||b==a){Hl(f,b);var c=f.qa[b],d="TIMER"+b+":",e=0;if(null!=c.Yc)for(var g=0;g<=c.Yc;g++)e|=c.rb[g]<<8*g;d+=" mode="+(c.mode>>1)+" bytes="+c.Yc+" count="+wa(e);f.ca.O(d)}});this.da>=nh&&Gl(d,4096,function(){for(var a="",b=0;b<Il;b++){var c=b<=Jl?Kl(f,b):f.A[b];a&&(a+="\n");
a+="CMOS["+va(b)+"]: "+va(c)}f.ca.O(a)})}$f(c,26,this.sn.bind(this));Sb(this)};l.Fb=function(a,b,c){switch(b){case nl:return this.ma[b]=c,Ll(this,0,b),!0;case rl:if((this.da|0)==Ml||this.da==wl)return this.ma[b]=c,Ll(this,1,b),!0;break;case Nl:return this.ma[b]=c,!0}return!1};l.$b=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};l.Zb=function(a){return a?this.save():!0};
l.reset=function(a){var b;Ol(this);this.F=Array(this.Ba);for(b=0;b<this.Ba;b++)Pl(this,b);this.ic=Array(this.ka);Ql(this,Rl,Sl);1<this.ka&&Ql(this,Tl,Ul);this.wa=this.ta=null;this.qa=Array((this.da|0)==Dl?6:3);for(b=0;b<this.qa.length;b++)Vl(this,b);this.ha=this.Fa=this.H=this.Aa=null;this.fa=rh;this.da==wl&&(this.ea=0);if(this.da>=nh){this.D=Wl;this.J=0;this.I=Xl;this.pa=0;this.K=Yl|Zl;512<=$l(this)&&(this.K|=am);+bm(this,ql,void 0)==cm&&(this.K|=dm);(this.da|0)==Dl&&(this.K=this.K|em|fm);this.ra=
gm|hm;this.U=Array(8);this.N=0;a&&(this.A=Array(Il));im(this,this.Ra);for(a=jm;a<=km;a++)this.A[a]=0;for(a=lm;a<mm;a++)void 0===this.A[a]&&(this.A[a]=0);a=0|+bm(this,ql,void 0)<<nm.Og&nm.zc;a|=+bm(this,sl,void 0)?om:0;b=+bm(this,pl,void 0);a|=b?b-1<<pm.Og&pm.zc|pm.Hl:0;this.A[qm]=a;this.A[rm]=sm(this,0)<<4|sm(this,1);tm(this)}};
function im(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.O("CMOS date invalid ("+b+"), using "+c)):b&&a.O("CMOS date: "+c);a.A[um]=c.getSeconds();a.A[vm]=0;a.A[wm]=c.getMinutes();a.A[xm]=0;a.A[ym]=c.getHours();a.A[zm]=0;a.A[Am]=c.getDay()+1;a.A[Bm]=c.getDate();a.A[Xm]=c.getMonth()+1;b=c.getFullYear();a.A[Ym]=b%100;b/=100;a.A[Zm]=b%10|b/10<<4;a.A[$m]=38;a.A[Zd]=an;a.A[bn]=0;a.A[Jl]=cn;a.la=a.Z=0;a.Pa=a.Ca=null}
function Kl(a,b){var c=a.A[b];if(b<$m){var d=!1;b!=ym&&b!=zm||a.A[Zd]&an||(12>c?c=c?c:12:c=(c-=12)?c+128:140,d=!0);a.A[Zd]&dn||(d&&128<c&&(c-=48),c=c%10|c/10<<4)}else b==$m&&(a.A[b]&=~en);return c}function fn(a){var b=a.Ca;a.Z=Md(a.G,a.M)+b;a.A[Zd]&$d&&Pd(a.G,b)}function tm(a){for(var b=0,c=rm;c<mm;c++)b+=a.A[c];a.A[gn]=b&255;a.A[mm]=b>>8}
l.save=function(){var a=new eg(this);a.set(0,[this.B]);for(var b=[],c=0;c<this.F;c++){for(var d=this.F[c],e=d,f=[],g=0;g<e.oc.length;g++){var h=e.oc[g];f[g]=[h.oe,h.ag,h.pc,h.wb,h.rb,h.mode,h.dg,h.tp,h.up]}b[c]=[d.Ab,d.Yg,d.$i,d.Bb,f,d.aj]}a.set(1,[b]);b=[];for(c=0;c<this.ic.length;c++)d=this.ic[c],b[c]=[d.Ve,d.Mc,d.Ld,d.td,d.cc,d.Fc,d.ie,d.mf];a.set(2,[b]);b=[];for(c=0;c<this.qa.length;c++)d=this.qa[c],b[c]=[d.pc,d.Oc,d.rb,d.je,d.$g,d.mode,d.Nf,d.wd,d.Yc,d.gd,d.Le,d.me,d.jd,d.Ab,d.Pe];a.set(3,[this.ta,
b,this.wa]);a.set(4,[this.Aa,this.H,this.Fa,this.ha,this.fa]);this.da>=nh&&(a.set(5,[this.D,this.J,this.I,this.pa,this.K,this.ra]),a.set(6,[this.U[7],this.U,this.N,this.A,this.la,this.Z]));return a.data()};
l.restore=function(a){var b;var c=a[0];Array.isArray(c[0])?this.B=c[0]:(this.B[0][0]=c[0],this.B[1][0]=c[1]&15,this.B[0][1]=c[2],this.B[1][1]=c[3]&15);Ol(this);c=a[1];for(b=0;b<this.Ba;b++)Pl(this,b,1==c.length?c[0][b]:c);c=a[2];for(b=0;b<this.ka;b++)Ql(this,b,0===b?Sl:Ul,c[0][b]);c=a[3];this.ta=c[0];this.wa=c[2];for(b=0;b<this.qa.length;b++)Vl(this,b,c[1][b]);c=a[4];this.Aa=c[0];this.H=c[1];this.Fa=c[2];this.ha=c[3];this.fa=c[4];if(c=a[5])this.D=c[0],this.J=c[1],this.I=c[2],this.pa=c[3],this.K=c[4],
this.ra=c[5];if(c=a[6])this.U=c[1],this.U[7]=c[0],this.N=c[2],this.A=c[3],this.la=c[4],this.Z=c[5],im(this);return!0};l.start=function(){hn(this)};l.stop=function(){hn(this)};function Pl(a,b,c){var d=a.F[b];d||(d={oc:Array(4)});c=c&&5<=c.length?c:jn;d.Ab=c[0];d.Yg=c[1];d.$i=c[2];d.Bb=c[3];d.Hn=b<<2;for(var e=0;e<d.oc.length;e++)kn(d,e,c[4][e]);d.aj=c[5]||0;a.F[b]=d}
function kn(a,b,c){var d=a.oc[b];d||(d={ag:[0,0],pc:[0,0],wb:[0,0],rb:[0,0]});c=c&&8==c.length?c:ln;d.oe=c[0];d.ag[0]=c[1][0];d.ag[1]=c[1][1];d.pc[0]=c[2][0];d.pc[1]=c[2][1];d.wb[0]=c[3][0];d.wb[1]=c[3][1];d.rb[0]=c[4][0];d.rb[1]=c[4][1];d.mode=c[5];d.dg=c[6];d.controller=a;d.yj=b;mn(d,c[8],c[9]);a.oc[b]=d}function mn(a,b,c,d){"string"==typeof b&&(b=Fb(b));b&&(a.done=null,a.tp=b.id,a.up=c,a.jg=b,a.fh=b[c],a.yg=d)}
function Ql(a,b,c,d){var e=a.ic[b];e||(e={Mc:[null,null,null,null]});d=d&&8==d.length?d:nn;e.port=c;e.rq=b<<3;e.Ve=d[0];e.Mc[0]=d[1][0];e.Mc[1]=d[1][1];e.Mc[2]=d[1][2];e.Mc[3]=d[1][3];e.Ld=d[2];e.td=d[3];e.cc=d[4];e.Fc=d[5];e.ie=d[6];e.mf=d[7];a.ic[b]=e}
function Vl(a,b,c){var d=a.qa[b];d||(d={pc:[0,0],Oc:[0,0],rb:[0,0],je:[0,0]});c=c&&13<=c.length?c:on;d.pc[0]=c[0][0];d.pc[1]=c[0][1];d.Oc[0]=c[1][0];d.Oc[1]=c[1][1];d.rb[0]=c[2][0];d.rb[1]=c[2][1];d.je[0]=c[3][0];d.je[1]=c[3][1];d.$g=c[4];d.mode=c[5];d.Nf=c[6];d.wd=c[7];d.Yc=c[8];d.gd=c[9];d.Le=c[10];d.me=c[11];d.jd=c[12];d.Ab=c[13]||0;d.Pe=c[14]||!1;a.qa[b]=d}
function Ll(a,b,c){for(var d="",e=a.ma[c],f=1;8>=f;f++){var g="pcjs-bitCell";f||(g+=" pcjs-bitCellLeft");d+='<div id="'+(c+"-"+f)+'" class="'+g+'" data-value="0">'+f+"</div>\n"}e.innerHTML=d;pn(a,b,c,!0)}function qn(a,b,c){if(b=(a=rn[a.da|0])&&a[b])for(var d in b)if(a=b[d],a.zc&1<<c)return a;return null}
function bm(a,b,c){for(var d=null,e=rn[a.da]||rn[a.da|0]||rn[Ml],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b])){a=a.B[f][c?0:1]&g.zc;for(var h in g.Wc)if(g.Wc[h]==a&&(d=h,"number"==typeof+d))break;break}}return d}function sm(a,b){if(b<+bm(a,pl,void 0)){if(!a.L)return sn;if(b<a.L.length)switch(a.L[b]){case 160:case 180:case 320:case 360:return sn;case 720:return tn;case 1200:return un;case 1440:return vn}}return wn}function $l(a,b){return+bm(a,xn,b)+ +bm(a,yn,b)}
function ml(a,b){if(a){b=0;for(var c=1,d=0;d<a.length;d++)"0"==a.charAt(d)&&(b|=c),c<<=1}return b}function ol(a,b,c,d){for(var e=rn[a.da]||rn[a.da|0]||rn[Ml],f=0;f<e.length;f++){var g=e[f];if(g&&(g=g[b]))for(var h in g.Wc)if(h==c){a.B[f][d?0:1]&=~g.zc;a.B[f][d?0:1]|=g.Wc[h];return}}}function zn(a,b){a.setAttribute("data-value",b?"1":"0");a.style.color=b?"#ffffff":"#000000";a.style.backgroundColor=b?"#000000":"#ffffff"}function Ol(a){pn(a,0,nl);pn(a,1,rl);An(a)}
function pn(a,b,c,d){if(c=a.ma[c]){d=d?a.B[b][0]:a.B[b][1]=a.B[b][0];c=Cb(c,"pcjs-bitCell");for(var e=0;e<c.length;e++){var f=qn(a,b,e);c[e].setAttribute("title",f&&f.Gd||"Reserved");zn(c[e],!(d&1<<e));c[e].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");zn(b,c);var d=b.getAttribute("id").split("-"),e=1<<+d[1]-1;switch(d[0]){case nl:a.B[0][0]=a.B[0][0]&~e|(c?0:e);break;case rl:a.B[1][0]=a.B[1][0]&~e|(c?0:e)}An(a)}}(a,c[e])}}}
function An(a){var b=a.ma[Nl];if(null!=b){var c=""+($l(a,!0)+"Kb");c+=", "+(+ +bm(a,sl,!0)?"":"No ")+"FPU";c+=", "+{0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"}[+bm(a,ql,!0)]+" Monitor";c+=", "+ +bm(a,pl,!0)+" Floppy Drives";if(null!=a.B[0][1]&&a.B[0][1]!=a.B[0][0]||null!=a.B[1][1]&&a.B[1][1]!=a.B[1][0])c+=" (Reset required)";b.textContent=c}}
function Bn(a,b,c,d,e){var f=a.F[b],g=f.oc[c],h=g.wb[f.Bb];r(a,768)&&t(a,d,null,e,"DMA"+b+".CHANNEL"+c+".ADDR["+f.Bb+"]",h,!0);f.Bb^=1;b||c!=Cn||f.Bb||(g.wb[0]++,255<g.wb[0]&&(g.wb[0]=0,g.wb[1]++,255<g.wb[1]&&(g.wb[1]=0)));return h}function Dn(a,b,c,d,e,f){var g=a.F[b];r(a,768)&&t(a,d,e,f,"DMA"+b+".CHANNEL"+c+".ADDR["+g.Bb+"]",null,!0);a=g.oc[c];a.wb[g.Bb]=a.ag[g.Bb]=e;g.Bb^=1}
function En(a,b,c,d,e){var f=a.F[b],g=f.oc[c],h=g.rb[f.Bb];r(a,768)&&t(a,d,null,e,"DMA"+b+".CHANNEL"+c+".COUNT["+f.Bb+"]",h,!0);f.Bb^=1;b||c!=Cn||f.Bb||(g.rb[0]--,0>g.rb[0]&&(g.rb[0]=255,g.rb[1]--,0>g.rb[1]&&(g.rb[1]=255)));return h}function Fn(a,b,c,d,e,f){var g=a.F[b];r(a,768)&&t(a,d,e,f,"DMA"+b+".CHANNEL"+c+".COUNT["+g.Bb+"]",null,!0);a=g.oc[c];a.rb[g.Bb]=a.pc[g.Bb]=e;g.Bb^=1}function Gn(a,b,c,d){var e=a.F[b],f=e.Ab|Hn;e.Ab&=~In;r(a,768)&&t(a,c,null,d,"DMA"+b+".STATUS",f,!0);return f}
function Jn(a,b,c,d,e){var f=a.F[b];r(a,768)&&t(a,c,d,e,"DMA"+b+".REQ",null,!0);a=d&3;f.Ab=f.Ab&~(16<<a)|(d&4)<<a+2;f.$i=d}function Kn(a,b,c,d,e){var f=a.F[b];r(a,768)&&t(a,c,d,e,"DMA"+b+".MASK",null,!0);b=d&Ln;c=f.oc[b];c.oe=!!(d&Mn);c.oe||Nn(a,f.Hn+b)}function On(a,b,c,d,e){r(a,768)&&t(a,c,d,e,"DMA"+b+".MODE",null,!0);a.F[b].oc[d&Pn].mode=d}function Qn(a,b,c,d){var e=a.F[b].aj;r(a,768)&&t(a,c,null,d,"DMA"+b+".TEMP",e,!0);return e}
function Rn(a,b,c,d,e){r(a,768)&&t(a,c,d,e,"DMA"+b+".MASTER_CLEAR",null,!0);a=a.F[b];for(b=0;b<a.oc.length;b++)kn(a,b)}function Sn(a,b,c,d,e){var f=a.F[b].oc[c].dg;r(a,768)&&t(a,d,null,e,"DMA"+b+".CHANNEL"+c+".PAGE",f,!0);return f}function Tn(a,b,c,d,e,f){r(a,768)&&t(a,d,e,f,"DMA"+b+".CHANNEL"+c+".PAGE",null,!0);a.F[b].oc[c].dg=e}function Un(a,b,c,d){var e=a.U[b];r(a,768)&&t(a,c,null,d,"DMA.SPARE"+b+".PAGE",e,!0);return e}
function Vn(a,b,c,d,e){r(a,768)&&t(a,c,d,e,"DMA.SPARE"+b+".PAGE",null,!0);a.U[b]=d}function Wn(a,b,c,d,e){mn(a.F[b>>2].oc[b&3],c,d,e)}function Nn(a,b,c){b=a.F[b>>2].oc[b&3];b.jg&&b.fh&&b.yg?(c&&(b.done=c),b.oe||Xn(a,b,!0)):c&&c(!0)}
function Xn(a,b,c){c&&(b.count=b.rb[1]<<8|b.rb[0],b.type=b.mode&Yn,b.sj=b.kg=!1);for(var d=!1;0<=b.count&&(c=b.dg<<16|b.wb[1]<<8|b.wb[0],b.type==Zn?(d=!0,function(c){b.fh.call(b.jg,b.yg,-1,function(e,g){0>e&&(b.sj||(b.sj=!0),e=255);b.oe||a.oa.ub(c,e);(d=g)&&setTimeout(function(){$n(b)||Xn(a,b)},0)})}(c)):b.type==ao?(c=a.oa.ya(c),0>b.fh.call(b.jg,b.yg,c)&&(b.kg=!0)):b.type!=bo&&(b.kg=!0)),!d&&!$n(b););}
function $n(a){if(!a.kg&&0<=--a.count&&(a.mode&co?(a.wb[0]--,0>a.wb[0]&&(a.wb[0]=255,a.wb[1]--,0>a.wb[1]&&(a.wb[1]=255))):(a.wb[0]++,255<a.wb[0]&&(a.wb[0]=0,a.wb[1]++,255<a.wb[1]&&(a.wb[1]=0))),!a.oe))return!1;var b=a.controller;b.Ab=b.Ab&~(16<<a.yj)|1<<a.yj;a.mode&eo||(a.oe=!0,a.jg=a.yg=null);a.done&&(a.done(!a.kg),a.done=null);return!0}function fo(a,b,c){var d=0,e=a.ic[b];if(null!=e.mf)switch(e.mf&go){case ho:d=e.cc;break;case io:d=e.Fc}r(a,34048)&&t(a,e.port,null,c,"PIC"+b,d,!0);return d}
function jo(a,b,c,d){var e=a.ic[b];r(a,34048)&&t(a,e.port,c,d,"PIC"+b,null,!0);if(c&ko)e.Ld=0,e.Mc[e.Ld++]=c,e.td=0,e.ie=7,e.cc=e.Fc=0,e.mf=lo|ho;else if(c&lo)c&(mo|no)&&r(a,1073741824)&&Wb(a,"PIC"+b+"("+va(e.port)+"): unsupported OCW3 "+va(c),!0,!0),e.mf=c;else if(d=c&oo,d&po){var f=0;if((d&qo)==qo){var g=c&ro;f=1<<g}else for(g=e.ie+1;;){g&=7;var h=1<<g;if(e.Fc&h){f=h;break}if(g++==e.ie)break}e.Fc&f&&(e.Fc&=~f,so(a));d&to&&r(a,1073741824)&&Wb(a,"PIC"+b+"("+va(e.port)+"): unsupported OCW2 rotate "+
va(c),!0,!0)}else d==uo?e.ie=c&ro:r(a,1073741824)&&Wb(a,"PIC"+b+"("+va(e.port)+"): unsupported OCW2 automatic EOI "+va(c),!0,!0)}function vo(a,b,c){var d=a.ic[b],e=d.td;r(a,34048)&&t(a,d.port+1,null,c,"PIC"+b,e,!0);return e}function wo(a,b,c,d){var e=a.ic[b];r(a,34048)&&t(a,e.port+1,c,d,"PIC"+b,null,!0);e.Ld<e.Mc.length?(e.Mc[e.Ld++]=c,2==e.Ld&&e.Mc[0]&xo&&e.Ld++,3!=e.Ld||e.Mc[0]&yo||e.Ld++):(e.td=c,d=a.G,d.M|=4,so(a,b||253!=c?0:6))}
function qh(a,b,c){var d=a.ic[b>>3];b=1<<(b&7);d.cc&b||(d.cc|=b,d.Ve=c||0,so(a))}function oh(a,b){var c=a.ic[b>>3];b=1<<(b&7);c.cc&b&&(c.cc&=~b,so(a))}function so(a,b){var c=-1;if(1<a.ka){var d=a.ic[1];c=~(d.Fc|d.td)&d.cc}d=a.ic[0];0<=c&&(d.cc=c?d.cc|1<<zo:d.cc&~(1<<zo));c=~(d.Fc|d.td)&d.cc;a=a.G;a.V&&(a.ab=c?a.ab|1:a.ab&-2);c&&b&&(d.Ve=b)}
function Tg(a,b){void 0===b&&(b=0);var c=-1,d=a.ic[b];if(d.Ve)c=-2,d.Ve--;else for(var e=d.cc&((d.Fc|d.td)^255),f=d.ie+1;;){f&=7;var g=1<<f;if(d.Fc&g)break;if(e&g){b||f!=zo?c=d.Mc[1]+f:c=Tg(a,1);0<=c&&(d.Fc|=g,d.cc&=~g);break}if(f++==d.ie)break}return c}function Ao(a,b,c,d,e){var f=b?3:0;var g=a.qa[f+c];g.Pe?(f=g.Ab,g.Pe=!1):(g.wd==g.Yc&&Bo(a,f+c),g.Le?(f=g.je[g.wd++],g.wd==g.Yc&&(g.Le=!1)):(Hl(a,f+c),f=g.rb[g.wd++]));r(a,2304)&&t(a,d,null,e,"PIT"+b+".TIMER"+c,f,!0);return f}
function Co(a,b,c,d,e,f){r(a,2304)&&t(a,d,e,f,"PIT"+b+".TIMER"+c,null,!0);f=b?3:0;d=a.qa[f+c];d.wd==d.Yc&&Bo(a,f+c);d.pc[d.wd++]=e;d.wd==d.Yc&&(d.me&&d.mode!=Do&&d.mode!=Eo||(d.Le=!1,d.rb[0]=d.Oc[0]=d.pc[0],d.rb[1]=d.Oc[1]=d.pc[1],d.jd=Md(a.G,a.M),d.me=!0,d.gd=d.mode!=Do,b==Fo&&c==Go&&(oh(a,Ho),e=Io(a,Go)*a.Ea|0,d.mode==Yd&&(e>>=1),Pd(a.G,e))),b==Fo&&c==Jo&&hn(a))}function Ko(a,b,c,d){t(a,c,null,d,"PIT"+b+".CTRL",null,2048);return b?a.wa:a.ta}
function Lo(a,b,c,d,e){t(a,c,d,e,"PIT"+b+".CTRL",null,2048);e=0;c=d&Mo;b?(e=3,a.wa=d):a.ta=d;if(c==No){if(!(d&Oo))for(c=0;2>=c;c++)if(d&Po<<c){b=e+c;var f=a.qa[b];f.Pe||(Hl(a,b),f.Ab=f.$g|f.mode|f.Nf|(f.wd<f.Yc?Qo:0)|(f.gd?Ro:0),f.Pe=!0)}if(!(d&So))for(c=0;2>=c;c++)d&Po<<c&&To(a,e+c)}else{c>>=Uo;f=d&Vo;var g=d&Wo;d&=Xo;if(d==Yo)To(a,e+c);else{e+=c;var h=a.qa[e];h.Nf=d;h.mode=g;h.$g=f;h.pc=[0,0];h.rb=[0,0];h.je=[0,0];h.gd=!1;h.Le=!1;h.me=!1;h.Pe=!1;Bo(a,e);b==Fo&&c==Go&&oh(a,Ho);b==Fo&&c==Jo&&255==
a.ic[0].td&&a.H==(Zo|$o|ap|bp)&&(b=a.qa[0],b.Oc[0]=b.pc[0],b.Oc[1]=b.pc[1],b.jd=Md(a.G,a.M))}}}function Io(a,b){a=a.qa[b];(b=a.pc[1]<<8|a.pc[0])||(b=1==a.Yc?256:65536);return b}function Xd(a,b){a=a.qa[b];(b=a.Oc[1]<<8|a.Oc[0])||(b=1==a.Yc?256:65536);return b}function To(a,b){Hl(a,b);var c=a.qa[b];c.je[0]=c.rb[0];c.je[1]=c.rb[1];c.Le=!0;Bo(a,b)}function Bo(a,b){a=a.qa[b];a.wd=a.Nf==cp?1:0;a.Yc=a.Nf==dp?2:1}
function Hl(a,b,c){var d=a.qa[b];if(d.me&&(b!=Jo||a.H&Zo)){var e=Md(a.G,a.M),f=(e-d.jd)/a.Ea|0;0>f&&(d.jd=e,f=0);var g=Io(a,b),h=Xd(a,b)-f;d.mode==Do?(0>=h&&(h=0),h||(d.gd=!0,d.me=!1,b||qh(a,Ho))):d.mode==ep?(d.gd=1!=h,0>=h&&(h=g+h,0>=h&&(h=g),d.Oc[0]=h&255,d.Oc[1]=h>>8&255,d.jd=e,!b&&d.gd&&qh(a,Ho))):d.mode==Yd&&(h-=f,0>=h&&(d.gd=!d.gd,h=g+h,0>=h&&(h=g),d.Oc[0]=h&255,d.Oc[1]=h>>8&255,d.jd=e,!b&&d.gd&&qh(a,Ho)));d.rb[0]=h&255;d.rb[1]=h>>8&255;c&&(a.jd=0)}return d}
function Wd(a,b){for(var c=0;c<a.qa.length;c++)Hl(a,c,b);if(a.da>=nh){b=a.G.Y.Yd;c=Md(a.G,a.M);null==a.Ca&&(a.la=Md(a.G,a.M),a.Pa=1024,a.Ca=Math.floor(a.G.Y.Yd/a.Pa),fn(a));c>=a.Z&&(a.A[bn]|=fp,a.A[Zd]&$d&&(a.A[bn]|=gp,qh(a,hp)),a.Z=c+a.Ca);a.A[um]==a.A[vm]&&a.A[wm]==a.A[xm]&&a.A[ym]==a.A[zm]&&(a.A[bn]|=ip,a.A[Zd]&jp&&(a.A[bn]|=gp,qh(a,hp)));var d=c-a.la,e=Math.floor(d/b);if(e&&!(a.A[Zd]&kp)){for(;e--;)if(60<=++a.A[um]&&(a.A[um]=0,60<=++a.A[wm]&&(a.A[wm]=0,24<=++a.A[ym]))){a.A[ym]=0;a.A[Am]=a.A[Am]%
7+1;var f=a.A[Ym];var g=Na[a.A[Xm]-1];28==g&&0===f%4&&(f%100||0===f%400)&&g++;f=g;++a.A[Bm]>f&&(a.A[Bm]=1,12<++a.A[Xm]&&(a.A[Xm]=1,a.A[Ym]=(a.A[Ym]+1)%100))}a.A[$m]|=en;a.A[bn]|=lp;a.A[Zd]&mp&&(a.A[bn]|=gp,qh(a,hp))}a.la=c-d%b}}l.$m=function(a,b){var c=this.Aa;this.ha&np&&(this.H&op?c=this.B[0][1]:this.C&&(c=pp(this.C)));t(this,a,null,b,"PPI_A",c);return c};l.No=function(a,b,c){t(this,a,b,c,"PPI_A");this.Aa=b};l.an=function(a,b){var c=this.H;t(this,a,null,b,"PPI_B",c);return c};
l.Oo=function(a,b,c){t(this,a,b,c,"PPI_B");qp(this,b)};function qp(a,b){var c=!!(b&rp),d=!!(a.H&rp);a.H=b;a.C&&sp(a.C,!(b&op),!!(b&bp));c!=d&&hn(a,c)}l.bn=function(a,b){var c=0;c=(this.da|0)==Ml?this.H&$o?c|this.B[1][1]&tp:c|this.B[1][1]>>4&1:this.H&up?c|this.B[0][1]>>4:c|this.B[0][1]&15;this.H&Zo&&Hl(this,Jo).gd&&(c=this.H&rp?c|vp:c|wp);t(this,a,null,b,"PPI_C",c,32896);return c};l.Po=function(a,b,c){t(this,a,b,c,"PPI_C");this.Fa=b};l.cn=function(a,b){var c=this.ha;t(this,a,null,b,"PPI_CTRL",c);return c};
l.Qo=function(a,b,c){t(this,a,b,c,"PPI_CTRL");this.ha=b};l.hm=function(a,b){var c=this.C?pp(this.C):0;t(this,a,null,b,"8041_KBD",c);this.ea&=~xp;return c};l.Tn=function(a,b,c){t(this,a,b,c,"8041_KBD")};l.gm=function(a,b){var c=this.H;t(this,a,null,b,"8041_CTRL",c);return c};l.Sn=function(a,b,c){t(this,a,b,c,"8041_CTRL");qp(this,b)};l.im=function(a,b){var c=this.ea;t(this,a,null,b,"8041_STATUS",c);return c};
l.jm=function(a,b){var c=this.pa;t(this,a,null,b,"8042_OUTBUFF",c,16384);this.D&=~(xp|yp);this.C&&zp(this.C);return c};
l.Vn=function(a,b,c){t(this,a,b,c,"8042_INBUF.DATA",null,16384);if(this.D&Ap)switch(this.J){case Bp:Cp(this,b);break;case Dp:Ep(this,b);break;default:if(Cp(this,this.I&~Xl),this.C){a=this.C;c=b;var d=-1;r(a)&&Wb(a,"sendCmd("+va(c)+")");switch(a.H||c){case Fp:d=Gp;Hp(a);break;case Ip:a.H&&(c=0);Jp(a,Gp);a.H=c;break;case Kp:a.H&&(c=0);Jp(a,Gp);a.H=c;break;default:Wb(a,"sendCmd(): unrecognized command")}Lp(this,d)}}this.J=b;this.D&=~Ap};
l.km=function(a,b){var c=this.H&~(Mp|Np)|(Md(this.G)&64?Np:0);t(this,a,null,b,"8042_RWREG",c,16384);return c};l.Wn=function(a,b,c){t(this,a,b,c,"8042_RWREG",null,16384);qp(this,b)};l.lm=function(a,b){t(this,a,null,b,"8042_STATUS",this.D,16384);a=this.D&255;this.D&yp&&(this.D|=xp,this.D&=~yp);return a};
l.Un=function(a,b,c){t(this,a,b,c,"8042_INBUFF.CMD",null,16384);this.J=b;this.D|=Ap;a=0;this.J>=Op&&(a=this.J^15,this.J=Op);switch(this.J){case Pp:Lp(this,this.I);break;case Qp:Cp(this,this.I|Xl);break;case Rp:Cp(this,this.I&~Xl);this.C&&zp(this.C);break;case Sp:this.C&&(a=this.C,a.A=[],r(a)&&Wb(a,"scan codes flushed"));Cp(this,this.I|Xl);Lp(this,Tp);Ep(this,gm|hm);break;case Up:Lp(this,Vp);break;case Wp:Lp(this,this.K);break;case Xp:Lp(this,this.ra);break;case Yp:Lp(this,this.I&Xl?0:Zp);break;case Op:a&
1&&sf(this.G)}};function Cp(a,b){a.I=b;a.D=a.D&~$p|b&aq;a.C&&sp(a.C,!!(b&bq),!(b&Xl))}function Lp(a,b,c){0<=b&&(a.pa=b,c?a.D|=xp:(a.D&=~xp,a.D|=yp))}function Ep(a,b){a.ra=b;tc(a.oa,!!(b&hm));b&gm||sf(a.G)}function cq(a,b){a.da<nh?(qh(a,dq,4),a.ea|=xp):a.I&Xl||a.D&(xp|yp)||(Lp(a,b,!0),eq(a.C),qh(a,dq,120))}function fq(a,b,c,d){var e=a.B[b][1];t(a,c,null,d,"DIPSW-"+b,e,32768);return e}l.Dm=function(a,b){t(this,a,null,b,"CMOS.ADDR",this.N,4096);return this.N};
l.po=function(a,b,c){t(this,a,b,c,"CMOS.ADDR",null,4096);this.N=b;this.fa=b&gq?rh:hq};l.Em=function(a,b){var c=this.N&iq,d=c<=Jl?Kl(this,c):this.A[c];r(this,4352)&&t(this,a,null,b,"CMOS.DATA["+va(c)+"]",d,!0);null!=b&&c==bn&&(this.A[c]&=jq,d&gp&&oh(this,hp),d&fp&&this.A[Zd]&$d&&fn(this));return d};
l.qo=function(a,b,c){var d=this.N&iq;r(this,4352)&&t(this,a,b,c,"CMOS.DATA["+va(d)+"]",null,!0);a=b^this.A[d];if(d<=Jl){if(c=b,d<$m){var e=!1;this.A[Zd]&dn||(c=10*(c>>4)+(c&15),e=!0);if(d==ym||d==zm)e&&23<c&&(c+=48),this.A[Zd]&an||(12>=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.A[d]=c;d==Zd&&a&$d&&b&$d&&fn(this)};l.Nk=function(a,b,c){t(this,a,b,c,"NMI");this.fa=b};l.Ao=function(a,b,c){t(this,a,b,c,"FPU.CLEAR")};l.Bo=function(a,b,c){t(this,a,b,c,"FPU.RESET");this.Kc&&Xg(this.Kc)};
l.sn=function(a){if(r(this,16)&&el(this.ca,26,a)){var b=this.G.D>>8;ag(this.G,a,function(a,d){return function(c){d=Md(a.G)-d;var e=a.G.L&255,g=a.G.L>>8,h=a.G.L&255,k=a.G.L>>8;if(2==b||3==b)var m=" CH(hour)="+wa(g)+" CL(min)="+va(e)+" DH(sec)="+va(k);else if(4==b||5==b)m=" CX(year)="+wa(a.G.I)+" DH(month)="+va(k)+" DL(day)="+va(h);e=a.ca;g=d;e.message("INT "+va(26)+": C="+(lg(e.G)?1:0)+(m||"")+" (cycles="+g+(c?",level="+(c+1):"")+")")}}(this,Md(this.G)))}return!0};
function hn(a,b){if(a.P){void 0!==b?a.Ka=b:b=!!(a.Ka&&a.G&&a.G.aa.Xa);var c=Math.round(tl/Io(a,Jo));if(20>c||2E4<c)b=!1;b&&kq(a)?(a.V.frequency.setValueAtTime(c,0),a.ba.gain.value=a.Ia,r(a,33554432)&&Wb(a,"speaker on at "+c+"hz",!0)):a.ba&&(a.ba.gain.value=0,r(a,33554432)&&Wb(a,"speaker off at "+c+"hz",!0))}else b&&Wb(a,"BEEP",33554432)}
function kq(a,b){if(a.P){if(b){if(a.La)return!0;a.V=null;a.La=!0}if(a.V)return!0;try{if(a.V=a.P.createOscillator(),"start"in a.V)return a.ba=a.P.createGain(),a.V.connect(a.ba),a.ba.connect(a.P.destination),a.ba.gain.value=0,a.V.type="square",a.V.start(0),!0}catch(c){a.Da("AudioContext exception: "+c.message),a.P=null}}return!1}var Ml=5150,ll=5150.9,nh=5170,wl=5160.101,Dl=5180,kl={5150:Ml,5160:5160,5170:nh,att6300:wl,mpc1600:5150.101,z150:5160.15,compaq:5150.102,other:ll};kl.deskpro386=Dl;
var nl="sw1",rl="sw2",Nl="swdesc",cm=3,Hn=1,In=15,Ln=3,Mn=4,Pn=3,Yn=12,bo=0,Zn=4,ao=8,eo=16,co=32,Cn=0,Rl=0,Sl=32,Tl=1,Ul=160,ko=16,yo=1,xo=2,ro=7,oo=224,po=32,qo=96,to=128,uo=192,lo=8,ho=2,io=3,go=3,mo=4,no=96,Ho=0,dq=1,zo=2,hp=8,ph=13,Fo=0,Go=0,Jo=2,Vo=1,Wo=14,Do=0,ep=4,Yd=6,Eo=8,Xo=48,Yo=0,cp=32,dp=48,Mo=192,No=192,Uo=6,Po=2,Oo=16,So=32,Qo=64,Ro=128,tl=1193181,Zo=1,rp=2,$o=4,ap=8,up=8,bp=64,op=128,tp=15,wp=16,vp=32,np=16,pm={Hl:1,ONE:0,jq:64,hq:128,Yp:192,zc:192,Og:6},om=2,nm={iq:16,Up:32,Zp:48,
zc:48,Og:4},pl=1,sl=3,ql=4,xn=5,yn=6,rn={};rn[Ml]=[{},{}];rn[Ml][0][pl]={zc:192,Wc:{1:0,2:64,3:128,4:192},Gd:"Number of Floppy Drives"};rn[Ml][0][sl]={zc:2,Wc:{0:0,1:2},Gd:"FPU"};rn[Ml][0][ql]={zc:48,Wc:{0:0,1:16,2:32,3:48,none:0,tv:16,color:32,cga:32,mda:48,mono:48,ega:0,vga:0},Gd:"Monitor Type"};rn[Ml][0][xn]={zc:12,Wc:{16:0,32:4,48:8,64:12},Gd:"Base Memory (16Kb Increments)"};
rn[Ml][1][yn]={zc:31,Wc:{0:0,32:1,64:2,96:3,128:4,160:5,192:6,224:7,256:8,288:9,320:10,352:11,384:12,416:13,448:14,480:15,512:16,544:17,576:18},Gd:"Expansion Memory (32Kb Increments)"};rn[5160]=[{},{}];rn[5160][0][pl]=rn[Ml][0][pl];rn[5160][0][sl]=rn[Ml][0][sl];rn[5160][0][ql]=rn[Ml][0][ql];rn[5160][0][xn]={zc:12,Wc:{64:0,128:4,192:8,256:12},Gd:"Base Memory (64Kb Increments)"};rn[5160][1][yn]=rn[Ml][1][yn];rn[wl]=[{},{}];rn[wl][0][xn]={zc:143,Wc:{128:1,256:130,512:8,640:141},Gd:"Base Memory (128Kb Increments)"};
rn[wl][0][sl]={zc:16,Wc:{0:0,1:16},Gd:"FPU"};rn[wl][1][2]={zc:1,Wc:{0:0,1:1},Gd:"Floppy Type"};rn[wl][1][pl]=rn[Ml][0][pl];rn[wl][1][ql]=rn[Ml][0][ql];
var aq=4,bq=8,Xl=16,Tp=85,Vp=0,em=4,fm=8,am=16,Yl=32,dm=64,Zl=128,gm=1,hm=2,Zp=1,Np=16,Mp=192,Pp=32,Bp=96,Sp=170,Up=171,Qp=173,Rp=174,Wp=192,Xp=208,Dp=209,Yp=224,Op=240,xp=1,$p=4,Ap=8,Wl=16,yp=256,um=0,vm=1,wm=2,xm=3,ym=4,zm=5,Am=6,Bm=7,Xm=8,Ym=9,$m=10,Zd=11,bn=12,Jl=13,lm=14,rm=16,qm=20,jm=21,km=24,mm=46,gn=47,Zm=50,iq=63,Il=64,gq=128,en=128,kp=128,$d=64,jp=32,mp=16,dn=4,an=2,gp=128,fp=64,ip=32,lp=16,jq=15,cn=128,wn=0,sn=1,un=2,tn=3,vn=4,hq=128,rh=0,jn=[0,null,null,0,Array(4),0],ln=[!0,[0,0],[0,
0],[0,0],[0,0]],nn=[0,Array(4)],on=[[0,0],[0,0],[0,0],[0,0]],ul={0:function(a,b){return Bn(this,0,0,a,b)},1:function(a,b){return En(this,0,0,a,b)},2:function(a,b){return Bn(this,0,1,a,b)},3:function(a,b){return En(this,0,1,a,b)},4:function(a,b){return Bn(this,0,2,a,b)},5:function(a,b){return En(this,0,2,a,b)},6:function(a,b){return Bn(this,0,3,a,b)},7:function(a,b){return En(this,0,3,a,b)},8:function(a,b){return Gn(this,0,a,b)},13:function(a,b){return Qn(this,0,a,b)},32:function(a,b){return fo(this,
Rl,b)},33:function(a,b){return vo(this,Rl,b)},64:function(a,b){return Ao(this,Fo,Go,a,b)},65:function(a,b){return Ao(this,Fo,1,a,b)},66:function(a,b){return Ao(this,Fo,Jo,a,b)},67:function(a,b){return Ko(this,Fo,a,b)},129:function(a,b){return Sn(this,0,2,a,b)},130:function(a,b){return Sn(this,0,3,a,b)},131:function(a,b){return Sn(this,0,1,a,b)},135:function(a,b){return Sn(this,0,0,a,b)}},xl={96:jl.prototype.$m,97:jl.prototype.an,98:jl.prototype.bn,99:jl.prototype.cn},Bl={96:jl.prototype.jm,97:jl.prototype.km,
100:jl.prototype.lm,112:jl.prototype.Dm,113:jl.prototype.Em,128:function(a,b){return Un(this,7,a,b)},132:function(a,b){return Un(this,0,a,b)},133:function(a,b){return Un(this,1,a,b)},134:function(a,b){return Un(this,2,a,b)},136:function(a,b){return Un(this,3,a,b)},137:function(a,b){return Sn(this,1,2,a,b)},138:function(a,b){return Sn(this,1,3,a,b)},139:function(a,b){return Sn(this,1,1,a,b)},140:function(a,b){return Un(this,4,a,b)},141:function(a,b){return Un(this,5,a,b)},142:function(a,b){return Un(this,
6,a,b)},143:function(a,b){return Sn(this,1,0,a,b)},160:function(a,b){return fo(this,Tl,b)},161:function(a,b){return vo(this,Tl,b)},192:function(a,b){return Bn(this,1,0,a,b)},194:function(a,b){return En(this,1,0,a,b)},196:function(a,b){return Bn(this,1,1,a,b)},198:function(a,b){return En(this,1,1,a,b)},200:function(a,b){return Bn(this,1,2,a,b)},202:function(a,b){return En(this,1,2,a,b)},204:function(a,b){return Bn(this,1,3,a,b)},206:function(a,b){return En(this,1,3,a,b)},208:function(a,b){return Gn(this,
1,a,b)},218:function(a,b){return Qn(this,1,a,b)}},zl={96:jl.prototype.hm,97:jl.prototype.gm,100:jl.prototype.im,102:function(a,b){return fq(this,0,a,b)},103:function(a,b){return fq(this,1,a,b)}},El={72:function(a,b){return Ao(this,1,0,a,b)},73:function(a,b){return Ao(this,1,1,a,b)},74:function(a,b){return Ao(this,1,2,a,b)},75:function(a,b){return Ko(this,1,a,b)}},vl={0:function(a,b,c){Dn(this,0,0,a,b,c)},1:function(a,b,c){Fn(this,0,0,a,b,c)},2:function(a,b,c){Dn(this,0,1,a,b,c)},3:function(a,b,c){Fn(this,
0,1,a,b,c)},4:function(a,b,c){Dn(this,0,2,a,b,c)},5:function(a,b,c){Fn(this,0,2,a,b,c)},6:function(a,b,c){Dn(this,0,3,a,b,c)},7:function(a,b,c){Fn(this,0,3,a,b,c)},8:function(a,b,c){r(this,768)&&t(this,a,b,c,"DMA0.CMD",null,!0);this.F[0].Yg=b},9:function(a,b,c){Jn(this,0,a,b,c)},10:function(a,b,c){Kn(this,0,a,b,c)},11:function(a,b,c){On(this,0,a,b,c)},12:function(a,b,c){r(this,768)&&t(this,a,b,c,"DMA0.RESET_FF",null,!0);this.F[0].Bb=0},13:function(a,b,c){Rn(this,0,a,b,c)},32:function(a,b,c){jo(this,
Rl,b,c)},33:function(a,b,c){wo(this,Rl,b,c)},64:function(a,b,c){Co(this,Fo,Go,a,b,c)},65:function(a,b,c){Co(this,Fo,1,a,b,c)},66:function(a,b,c){Co(this,Fo,Jo,a,b,c)},67:function(a,b,c){Lo(this,Fo,a,b,c)},129:function(a,b,c){Tn(this,0,2,a,b,c)},130:function(a,b,c){Tn(this,0,3,a,b,c)},131:function(a,b,c){Tn(this,0,1,a,b,c)},135:function(a,b,c){Tn(this,0,0,a,b,c)}},yl={96:jl.prototype.No,97:jl.prototype.Oo,98:jl.prototype.Po,99:jl.prototype.Qo,160:jl.prototype.Nk},Cl={96:jl.prototype.Vn,97:jl.prototype.Wn,
100:jl.prototype.Un,112:jl.prototype.po,113:jl.prototype.qo,128:function(a,b,c){Vn(this,7,a,b,c)},132:function(a,b,c){Vn(this,0,a,b,c)},133:function(a,b,c){Vn(this,1,a,b,c)},134:function(a,b,c){Vn(this,2,a,b,c)},136:function(a,b,c){Vn(this,3,a,b,c)},137:function(a,b,c){Tn(this,1,2,a,b,c)},138:function(a,b,c){Tn(this,1,3,a,b,c)},139:function(a,b,c){Tn(this,1,1,a,b,c)},140:function(a,b,c){Vn(this,4,a,b,c)},141:function(a,b,c){Vn(this,5,a,b,c)},142:function(a,b,c){Vn(this,6,a,b,c)},143:function(a,b,
c){Tn(this,1,0,a,b,c)},160:function(a,b,c){jo(this,Tl,b,c)},161:function(a,b,c){wo(this,Tl,b,c)},192:function(a,b,c){Dn(this,1,0,a,b,c)},194:function(a,b,c){Fn(this,1,0,a,b,c)},196:function(a,b,c){Dn(this,1,1,a,b,c)},198:function(a,b,c){Fn(this,1,1,a,b,c)},200:function(a,b,c){Dn(this,1,2,a,b,c)},202:function(a,b,c){Fn(this,1,2,a,b,c)},204:function(a,b,c){Dn(this,1,3,a,b,c)},206:function(a,b,c){Fn(this,1,3,a,b,c)},208:function(a,b,c){r(this,768)&&t(this,a,b,c,"DMA1.CMD",null,!0);this.F[1].Yg=b},210:function(a,
b,c){Jn(this,1,a,b,c)},212:function(a,b,c){Kn(this,1,a,b,c)},214:function(a,b,c){On(this,1,a,b,c)},216:function(a,b,c){r(this,768)&&t(this,a,b,c,"DMA1.RESET_FF",null,!0);this.F[1].Bb=0},218:function(a,b,c){Rn(this,1,a,b,c)},240:jl.prototype.Ao,241:jl.prototype.Bo},Al={96:jl.prototype.Tn,97:jl.prototype.Sn,160:jl.prototype.Nk},Fl={72:function(a,b,c){Co(this,1,0,a,b,c)},73:function(a,b,c){Co(this,1,1,a,b,c)},74:function(a,b,c){Co(this,1,2,a,b,c)},75:function(a,b,c){Lo(this,1,a,b,c)}};
gb(function(){for(var a=Cb(document,"pcx86","chipset"),b=0;b<a.length;b++){var c=a[b],d=Db(c);d=new jl(d);Bb(d,c);An(d)}});function lq(a){sb.call(this,"ROM",a);this.A=null;this.H=a.addr;this.C=a.size;this.F=a.alias;this.B=a.notify;this.I=null;if(this.B){var b=this.B.indexOf("[");if(0<b){try{this.I=eval(this.B.substr(b))}catch(c){}this.B=this.B.substr(0,b)}}if(this.D=this.J=a.file)a=ya(xa(this.D)),"json"!=a&&"hex"!=a&&(this.D=Qa()+"/api/v1/dump?file="+this.J+"&format=bytes&decimal=true")}ia(lq,sb);
lq.prototype.tc=function(a,b,c,d){this.na=a;this.oa=b;this.G=c;this.ca=d;if(this.D){var e=this,f="Loading "+this.D+"...";Pa(this.D,null,!0,function(a,b,c){mq(e,a,b,c)},function(){e.O(f,Ob)})}};lq.prototype.$b=function(){this.Id&&(this.ca&&nq(this.ca,this.id,0,this.H>>>4,0,this.H,this.C,this.Id),delete this.Id);return!0};lq.prototype.Zb=function(){return!0};
function mq(a,b,c,d){if(d)a.Da("Unable to load system ROM (error "+d+": "+b+")",0>d);else{ub(a.de,b,c);if("["==c.charAt(0)||"{"==c.charAt(0))try{var e=eval("("+c+")"),f=e.bytes,g=e.longs||e.data;if(f)a.A=f;else if(g)for(a.A=Array(4*g.length),d=c=0;c<g.length;c++)a.A[d++]=g[c]&255,a.A[d++]=g[c]>>8&255,a.A[d++]=g[c]>>16&255,a.A[d++]=g[c]>>24&255;else a.A=e;a.Id=e.symbols;if(!a.A.length){nb("Empty ROM: "+b);return}if(1==a.A.length){nb(a.A[0]);return}}catch(h){a.Da("ROM data error: "+h.message);return}else for(b=
c.replace(/\n/gm," ").replace(/ +$/,"").split(" "),a.A=Array(b.length),e=0;e<b.length;e++)a.A[e]=qa(b[e],16);oq(a)}}
function oq(a){if(!Rb(a))if(!a.J)Sb(a);else if(a.A&&a.oa){a.C||(a.C=a.A.length);if(a.A.length!=a.C)Pb(a,"ROM size ("+p(a.A.length,8,!0)+") does not match specified size ("+p(a.C,8,!0)+")");else{var b=a.H;if(uc(a.oa,b,a.C,Jc)){for(var c=0;c<a.A.length;c++){var d=a.oa,e=b+c;d.Z[(e&d.C)>>>d.A].cf(e&d.D,a.A[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.F?b.push(a.F):null!=a.F&&a.F.length&&(b=a.F);for(c=0;c<b.length;c++){d=a;e=b[c];var f=Dc(d.oa,d.H,d.C);Cc(d.oa,e,d.C,f)}a.B&&((b=Fb(a.B,a.id))?
(c=a.A,d=a.I,b.Ma==pq?qq(b,c,d||[12640,8752],8):b.Ma==rq&&qq(b,c,d||[14221,16269],8),Sb(b)):a.Da("Unable to find component: "+a.B));delete a.A}}Sb(a)}}gb(function(){for(var a=Cb(document,"pcx86","rom"),b=0;b<a.length;b++){var c=a[b],d=Db(c);d=new lq(d);Bb(d,c)}});function sq(a){sb.call(this,"RAM",a);this.B=a.addr;this.A=a.size;this.F=a.test;this.D=!!this.A;this.C=!1}ia(sq,sb);l=sq.prototype;l.tc=function(a,b,c,d){this.oa=b;this.G=c;this.ca=d;this.V=ec(a,"ChipSet");Sb(this)};
l.$b=function(a,b){return!b&&(this.reset(),a&&this.controller&&!this.restore(a))?!1:!0};l.Zb=function(a){return a&&this.controller?this.save():!0};
l.reset=function(){if(!this.B&&!this.D&&this.V){var a=1024*$l(this.V);this.A&&a!=this.A&&(Hc(this.oa,this.B,this.A),this.C=!1);this.A=a}!this.C&&this.A&&uc(this.oa,this.B,this.A,1)&&(this.C=!0,"ramCPQ"==this.ze&&(this.controller=new tq(this),uc(this.oa,uq,4,4,this.controller)));if(this.C){if(this.F||Pc(this.oa,1138,4660),"ramCPQ"!=this.ze&&this.V&&(a=this.V,a.A)){var b=1048576>this.B?jm:23,c=a.A[b]|a.A[b+1]<<8;c+=this.A>>10;a.A[b]=c&255;a.A[b+1]=c>>8;tm(a)}}else nb("No RAM allocated")};
l.save=function(){var a=new eg(this);this.controller&&a.set(0,this.controller.save());return a.data()};l.restore=function(a){return this.controller?this.controller.restore(a[0]):!0};function tq(a){this.D=a;this.C=vq;this.G=wq;this.B=xq;this.A=null}l=tq.prototype;l.save=function(){return[this.C,this.B]};l.restore=function(a){this.ub(0,a[0]&255);this.ub(2,a[1]&255);return!0};l.ya=function(a){var b=255;2>a?b=a&1?this.G>>8:this.G&255:4>a&&(b=a&1?this.B>>8:this.B&255);return b};
l.ub=function(a,b){if(a)2==a&&(this.B=this.B&-256|b);else if(b!=(this.C&255)){a=this.D.oa;if(b&yq)this.A&&(Cc(a,zq,Aq,this.A),this.A=null);else{this.A||(this.A=Dc(a,zq,Aq));var c=Dc(a,Bq,Aq);Cc(a,zq,Aq,c,b&Cq?1:Jc)}this.C=this.C&-256|b}};l.wj=function(){return Dq};l.gh=function(){return Eq};var uq=-2134900736,Bq=16646144,zq=917504,Aq=131072,yq=1,Cq=2,vq=65535,wq=2575,xq=2,Dq=[null,0],Eq=[function(a){return this.controller.ya(a)},null,null,function(a,b){this.controller.ub(a,b)},null,null];
gb(function(){for(var a=Cb(document,"pcx86","ram"),b=0;b<a.length;b++){var c=a[b],d=Db(c);d=new sq(d);Bb(d,c)}});function Fq(a){sb.call(this,"Keyboard",a,65536);Gq(this,a.model);this.ea=Xa("Mobi");this.ha=Xa("MSIE");Wb(this,"mobile keyboard support: "+(this.ea?"true":"false"));this.ba=0;this.fa=this.eh=!1;this.B=[];this.la=50;this.Z=0;this.F=null;this.I=a.autoType;this.P=!1;this.L=this.M=null;this.exports={type:this.kh,wait:this.Ap};Sb(this)}ia(Fq,sb);l=Fq.prototype;
l.Fb=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.ma[f])switch(b){case "kbd":case "screen":return c.onkeydown=function(a){return Hq(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;if(Iq(e.na)){e.C="";var b=!N[a]||!!(e.jc&Jq);b||Kq(e,a,!0);a=b}else a=!1;return a},c.onkeyup=function(a){return Hq(e,a,!1)},!0;case "caps-lock":return this.ma[f]=c,c.onclick=function(a){a.preventDefault();e.na&&e.na.dd();Kq(e,Lq,!0)},!0;case "num-lock":return this.ma[f]=c,c.onclick=function(a){a.preventDefault();
e.na&&e.na.dd();Kq(e,Mq,!0)},!0;case "scroll-lock":return this.ma[f]=c,c.onclick=function(a){a.preventDefault();e.na&&e.na.dd();Kq(e,Nq,!0)},!0;default:var g=b.toUpperCase().replace(/-/g,"_");if(void 0!==Oq[g]&&"button"==a)return this.ma[f]=c,c.onclick=function(a,b,c){return function(b){b.preventDefault();a.na&&a.na.dd();a.C="";Pq(a,c,!0);Kq(a,c,!0)}}(this,g,Oq[g]),!0;if(void 0!==Qq[b])return this.ba++,this.ma[f]=c,a=function(a,b,c){return function(b){b.preventDefault();a.na&&a.na.dd();a.C="";Kq(a,
c)}}(this,b,Qq[b]),b=function(a,b,c){return function(){Rq(a,c)}}(this,b,Qq[b]),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=a,c.onmouseup=c.onmouseout=b),!0;if(d)return this.ma[f]=c,c.onclick=function(a){a.preventDefault();e.na&&e.na.dd();return e.kh(d)},!0}return!1};
function Sq(a,b,c){if(a.ba){for(var d in oa)if(b==oa[d]){b=+d;(d=na[d])&&(b=+d);break}for(var e in Qq)if((d=Qq[e]==b)||(d=b,d>=n.Hd&&d<=n.z&&(d-=n.Hd-n.ee),d=Qq[e]==d),d){(a=a.ma["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}l.tc=function(a,b,c,d){this.na=a;this.oa=b;this.G=c;this.ca=d;var e=this;this.qa=Fd(this.G,this.id+".inject",function(){Tq(e)});this.V=ec(a,"ChipSet");this.I=Ed(a,"autoType")||this.I;$f(c,33,this.tn.bind(this))};
l.tn=function(){if(10==(this.G.D>>8&255))if(this.P=!0,this.L)this.L(),this.L=null,this.P=!1;else{var a=this.I;!this.F&&a&&(this.F=a,this.kh(this.F))}return!0};function Gq(a,b){var c=0;a.da=null;"string"==typeof b&&(a.da=b.toUpperCase(),c=Uq.indexOf(a.da),0>c&&(c=0));if(b=Uq[c])a.ka=parseInt(b.substr(2),10)}function Hp(a){Wb(a,"keyboard reset",65792);a.A=[];Jp(a,Vq)}function sp(a,b,c){a.N!==c&&(a.N=a.U=c)&&(a.J=!0);a.K!==b&&(a.K=b)&&!a.U&&eq(a,!0);a.K&&a.U&&(Hp(a),a.U=!1)}
function Jp(a,b){a.V&&(a.A.unshift(b),a.J=!0,cq(a.V,b))}function zp(a){var b=0;a.A.length&&a.J&&(b=a.A[0],a.V&&cq(a.V,b));r(a)&&Wb(a,b?"scan code "+va(b)+" available":"no scan codes available")}function pp(a){var b=0;a.A.length&&(b=a.A[0]);r(a)&&Wb(a,"scan code "+va(b)+" delivered");return b}function eq(a,b){0<a.A.length&&(a.A.shift(),(a.J=b)&&(a.A.length&&a.V?cq(a.V,a.A[0]):b=!1),r(a)&&Wb(a,"scan codes shifted, notify "+(b?"true":"false")))}
l.$b=function(a,b){return!b&&(this.reset(),a&&this.restore&&!this.restore(a))?!1:!0};l.Zb=function(a){return a?this.save():!0};l.reset=function(){if(!this.da&&this.V)switch(this.V.da){case Ml:case 5160:Gq(this,Uq[0]);break;default:Gq(this,Uq[1])}Wq(this)};l.save=function(){var a=new eg(this),b=[];b[0]=this.N;b[1]=this.K;a.set(0,b);return a.data()};l.restore=function(a){return Wq(this,a[0])};
function Wq(a,b){var c=0;b?a.F=a.I:(b=[],a.F=null);a.N=b[c++];a.K=b[c];a.H=0;a.jc=a.D=0;a.A=[];a.J=!0;a.C="";return!0}l.kh=function(a,b){if(a&&!this.C){if(a){for(var c,d=/(?:^|[^$])\$([a-z]+)/g;c=d.exec(a);){switch(c[1]){case "date":var e=Ja("n-j-Y");break;case "time":e=Ja("h:i:s");break;default:continue}a=a.replace("$"+c[1],e)}a=a.replace(/\$\$/g,"$$")}this.C=a;this.Z=b||150;Tq(this);return!0}return!1};
function Tq(a){for(var b=0;0<a.C.length&&!b;)if(b=a.C.charAt(0),a.C=a.C.substr(1),b=b.charCodeAt(0),b<=n.wi)b!=n.Lg&&b!=n.Mg&&b!=n.Ng&&(b+=4E3);else if(28==b)b=n.Lg+4E3;else if(29==b)b=n.Mg+4E3;else if(30==b)b=n.Ng+4E3;else if(240<=b){a.Z=100*(b-240)||150;b=0;break}b&&(10==b&&(b=13),Kq(a,b,!0));a.C.length?Sd(a.G,a.qa,a.Z):a.M&&(a.M(),a.M=null)}l.Ap=function(a,b){var c=!1;switch(b){case "DOS":this.P?c=!0:this.L=a;break;default:this.C.length?this.M=a:c=!0}return c};
function Pq(a,b,c,d){if(N[b]){var e=Math.floor(b/1E3)&2;if(b=Xq[b]||0){!e||b&Yq||(b>>=1);if(b&Zq){if(!1===d)return!0;d=null}null==d?d=!((c?a.D:a.jc)&b):d||b&$q&&(b=$q);if(c){a.D&=~b;d&&(a.D|=b);c=b;var f,g;for(g in ar)d="led-"+g,e=ar[g],c&&c!=e||!(f=a.ma[d])||(f.style.backgroundColor=a.D&e?"#00ff00":"#000000")}else a.jc&=~b,d&&(a.jc|=b);return!0}}return!1}
function Kq(a,b,c){if((N[b]||N[b+=1E3])&&a.G&&a.G.aa.Xa){Xq[b]&&a.B.length&&0<a.B[0].zd&&(a.B[0].zd=0);for(var d,e=0;e<a.B.length;e++)if(d=a.B[e],d.we==b){if(!c||0<=d.zd){e=-1;break}0<e&&(0<a.B[0].zd&&(a.B[0].zd=0),a.B.splice(e,1));break}0>e||(e==a.B.length&&(d={},d.we=b,d.jc=a.jc,Sq(a,b,!0),e++),0<e&&a.B.splice(0,0,d),d.pf=!0,d.zd=c?-1:Xq[b]?0:1,br(a,d))}}
function Rq(a,b,c){if(!N[b]||!(c||a.G&&a.G.aa.Xa))return!1;for(var d=!1,e=0;e<a.B.length;e++){var f=a.B[e];if(f.we==b||f.we==oa[b]){a.B.splice(e,1);f.pi&&clearTimeout(f.pi);f.pf&&!c&&cr(a,f.we,!1);Sq(a,b,!1);d=!0;break}}!a.B.length&&a.fa&&(Pq(a,Lq),a.fa=!1);return d}function br(a,b){if(!a.G||!a.G.aa.Xa)Rq(a,b.we,!0);else if(cr(a,b.we,b.pf)&&b.zd){if(0>b.zd){if(!b.pf){Rq(a,b.we);return}b.pf=!1;var c=a.la}else c=1==b.zd++?500:100;b.pi=setTimeout(function(a){return function(){br(a,b)}}(a),c)}}
function dr(a,b,c){var d=b;if(b>=n.ee&&b<=n.$f)!(a.jc&(er|fr|gr))==c&&(d=b+(n.Hd-n.ee));else if(b>=n.Hd&&b<=n.z)!!(a.jc&(er|fr|gr))==c&&(d=b-(n.Hd-n.ee));else if(!!(a.jc&(er|fr))==c){if(a=oa[b])d=a}else if(a=na[b])d=a;return d}l.zg=function(a){a||(this.jc&=~$q)};
function Hq(a,b,c){var d=!0,e=!1,f=!1,g=b.keyCode;if(!Iq(a.na))return!1;a.C="";Gb(a.de);var h=dr(a,g,!0);a.eh&&h==n["`"]&&(g=h=27);if(N[g+1E3])if(h+=1E3,2==b.location&&(h+=2E3),Pq(a,h,!1,c)){if(20==g||144==g||145==g)a.ha||(c=e=!0);if(!(c||91!=g&&93!=g))for(var k=0;k<a.B.length;k++){var m=a.B[k];m.pf=!1;0<m.zd&&(m.zd=0)}}else 8==g&&(a.jc&(hr|ir))==hr&&(h=jr),d=!1;else if(N[h]&&a.jc&(kr|lr)&&(d=!1),d&&c||a.jc&mr)f=!0;d||b.preventDefault();f||a.ea&&d||(c?Kq(a,h,e):Rq(a,h)||(b=dr(a,g,!1),b!=h&&Rq(a,b)));
return d}
function cr(a,b,c){var d=!1;Pq(a,b,!0,c);var e=N[b]||N[b+1E3];if(void 0!==e){e==nr&&(a.jc&(hr|ir))==(hr|ir)&&(e=or);d=[];var f=e&255;if(83<f&&83==a.ka)return!1;d.push(f|(c?0:pr));for(b=b>=n.ee&&b<=n.$f||b>=n.Hd&&b<=n.z;e>>>=8;){var g=0,h=e&255;f==qr||f==rr?d.push(f|(c?0:pr)):(h==O?a.D&(er|fr)||a.D&gr&&b||(g=h):h==sr?a.D&(hr|tr)||(g=h):h==ur?a.D&(ir|vr)||(g=h):d.push(f|(c?0:pr)),g&&(c?d.unshift(g):d.push(g|pr)))}for(c=0;c<d.length;c++)e=a,f=d[c],e.A&&(e.A.length<wr?(r(e)&&Wb(e,"scan code "+va(f)+" buffered"),
e.A.push(f),1==e.A.length&&e.V&&cq(e.V,f)):(e.A.length==wr&&e.A.push(xr),Wb(e,"scan code buffer overflow")));d=!0}return d}
var Uq=["US83","US84","US101"],Lq=1020,Mq=1144,Nq=1145,yr=n.fl+4E3,zr=n.gl+4E3,Ar=n.hl+4E3,Br=n.il+4E3,Cr=n.jl+4E3,Dr=n.kl+4E3,Er=n.ll+4E3,Fr=n.ml+4E3,Gr=n.Lg+4E3,Hr=n.Mg+4E3,Ir=n.nl+4E3,Jr=n.ol+4E3,Kr=n.Ng+4E3,Lr=n.pl+4E3,Mr=n.ql+4E3,Nr=n.rl+4E3,Or=n.sl+4E3,Pr=n.tl+4E3,Qr=n.ul+4E3,Rr=n.vl+4E3,Sr=n.wl+4E3,Tr=n.xl+4E3,Ur=n.yl+4E3,Vr=n.zl+4E3,Wr=n.Al+4E3,Xr=n.wi+4E3,jr=4145,nr=14,sr=29,O=42,ur=56,or=83,pr=128,qr=224,rr=225,fr=1,er=2,tr=4,hr=8,kr=12,vr=16,ir=32,lr=48,Jq=128,mr=192,Yq=85,$q=255,gr=512,
Zq=3584,Xq={};Xq[3016]=fr;Xq[1016]=er;Xq[1017]=hr;Xq[1018]=ir;Xq[1091]=Jq;Xq[1093]=64;Xq[1224]=Jq;Xq[Lq]=gr;Xq[Mq]=1024;Xq[Nq]=2048;
var Oq={TAB:1009,ESC:1027,F1:1112,F2:1113,F3:1114,F4:1115,F5:1116,F6:1117,F7:1118,F8:1119,F9:1120,F10:1121,LEFT:1037,UP:1038,RIGHT:1039,DOWN:1040,SYSREQ:4027,CTRL_C:Ar,CTRL_BREAK:jr,CTRL_ALT_DEL:4046,CTRL_ALT_INS:4045,CTRL_ALT_ENTER:6013},Qq={esc:1027,1:n["1"],2:n["2"],3:n["3"],4:n["4"],5:n["5"],6:n["6"],7:n["7"],8:n["8"],9:n["9"],0:n["0"],"-":n["-"],"=":n["="],bs:1008,tab:1009,q:n.Q,w:n.Oi,e:n.E,r:n.Ji,t:n.Li,y:n.Qi,u:n.Mi,i:n.Bi,o:n.Hi,p:n.Ii,"[":n["["],"]":n["]"],enter:13,ctrl:1017,a:n.ee,s:n.Ki,
d:n.xi,f:n.yi,g:n.zi,h:n.Ai,j:n.Ci,k:n.Di,l:n.Ei,";":n[";"],quote:n["'"],"`":n["`"],shift:1016,"\\":n["\\"],z:n.$f,x:n.Pi,c:n.vi,v:n.Ni,b:n.ui,n:n.Gi,m:n.Fi,",":n[","],".":n["."],"/":n["/"],"right-shift":3016,prtsc:1044,alt:1018,space:1032,"caps-lock":Lq,f1:1112,f2:1113,f3:1114,f4:1115,f5:1116,f6:1117,f7:1118,f8:1119,f9:1120,f10:1121,"num-lock":Mq,"scroll-lock":Nq,"num-home":1036,"num-up":1038,"num-pgup":1033,"num-sub":1109,"num-left":1037,"num-center":1101,"num-right":1039,"num-add":1107,"num-end":1035,
"num-down":1040,"num-pgdn":1034,"num-ins":1045,"num-del":1046,sysreq:84},ar={"caps-lock":gr,"num-lock":1024,"scroll-lock":2048},N={1027:1};N[n["1"]]=2;N[n["!"]]=2|O<<8;N[n["2"]]=3;N[n["@"]]=3|O<<8;N[n["3"]]=4;N[n["#"]]=4|O<<8;N[n["4"]]=5;N[n.$]=5|O<<8;N[n["5"]]=6;N[n["%"]]=6|O<<8;N[n["6"]]=7;N[n["^"]]=7|O<<8;N[n["7"]]=8;N[n["&"]]=8|O<<8;N[n["8"]]=9;N[n["*"]]=9|O<<8;N[n["9"]]=10;N[n["("]]=10|O<<8;N[n["0"]]=11;N[n[")"]]=11|O<<8;N[n["-"]]=12;N[n._]=12|O<<8;N[n["="]]=13;N[n["+"]]=13|O<<8;N[1008]=nr;
N[1009]=15;N[n.q]=16;N[n.Q]=16|O<<8;N[n.yp]=17;N[n.Oi]=17|O<<8;N[n.e]=18;N[n.E]=18|O<<8;N[n.r]=19;N[n.Ji]=19|O<<8;N[n.t]=20;N[n.Li]=20|O<<8;N[n.y]=21;N[n.Qi]=21|O<<8;N[n.wp]=22;N[n.Mi]=22|O<<8;N[n.bm]=23;N[n.Bi]=23|O<<8;N[n.On]=24;N[n.Hi]=24|O<<8;N[n.p]=25;N[n.Ii]=25|O<<8;N[n["["]]=26;N[n["{"]]=26|O<<8;N[n["]"]]=27;N[n["}"]]=27|O<<8;N[13]=28;N[1017]=sr;N[n.Hd]=30;N[n.ee]=30|O<<8;N[n.sp]=31;N[n.Ki]=31|O<<8;N[n.d]=32;N[n.xi]=32|O<<8;N[n.Zl]=33;N[n.yi]=33|O<<8;N[n.$l]=34;N[n.zi]=34|O<<8;N[n.am]=35;
N[n.Ai]=35|O<<8;N[n.xn]=36;N[n.Ci]=36|O<<8;N[n.k]=37;N[n.Di]=37|O<<8;N[n.yn]=38;N[n.Ei]=38|O<<8;N[n[";"]]=39;N[n[":"]]=39|O<<8;N[n["'"]]=40;N[n['"']]=40|O<<8;N[n["`"]]=41;N[n["~"]]=41|O<<8;N[1016]=O;N[n["\\"]]=43;N[n["|"]]=43|O<<8;N[n.z]=44;N[n.$f]=44|O<<8;N[n.x]=45;N[n.Pi]=45|O<<8;N[n.Ql]=46;N[n.vi]=46|O<<8;N[n.xp]=47;N[n.Ni]=47|O<<8;N[n.Ol]=48;N[n.ui]=48|O<<8;N[n.n]=49;N[n.Gi]=49|O<<8;N[n.En]=50;N[n.Fi]=50|O<<8;N[n[","]]=51;N[n["<"]]=51|O<<8;N[n["."]]=52;N[n[">"]]=52|O<<8;N[n["/"]]=53;
N[n["?"]]=53|O<<8;N[3016]=54;N[1044]=55;N[1018]=ur;N[1032]=57;N[Lq]=58;N[1112]=59;N[1113]=60;N[1114]=61;N[1115]=62;N[1116]=63;N[1117]=64;N[1118]=65;N[1119]=66;N[1120]=67;N[1121]=68;N[Mq]=69;N[Nq]=70;N[1036]=71;N[1038]=72;N[1033]=73;N[1109]=74;N[1037]=75;N[1101]=76;N[1039]=77;N[1107]=78;N[1035]=79;N[1040]=80;N[1034]=81;N[1045]=82;N[1046]=or;N[4027]=84;N[1122]=87;N[1123]=88;N[1091]=91;N[1093]=93;N[1224]=91;N[yr]=30|sr<<8;N[zr]=48|sr<<8;N[Ar]=46|sr<<8;N[Br]=32|sr<<8;N[Cr]=18|sr<<8;N[Dr]=33|sr<<8;
N[Er]=34|sr<<8;N[Fr]=35|sr<<8;N[Gr]=23|sr<<8;N[Hr]=36|sr<<8;N[Ir]=37|sr<<8;N[Jr]=38|sr<<8;N[Kr]=50|sr<<8;N[Lr]=49|sr<<8;N[Mr]=24|sr<<8;N[Nr]=25|sr<<8;N[Or]=16|sr<<8;N[Pr]=19|sr<<8;N[Qr]=31|sr<<8;N[Rr]=20|sr<<8;N[Sr]=22|sr<<8;N[Tr]=47|sr<<8;N[Ur]=17|sr<<8;N[Vr]=45|sr<<8;N[Wr]=21|sr<<8;N[Xr]=44|sr<<8;N[jr]=70|sr<<8;N[4046]=or|sr<<8|ur<<16;N[4045]=82|sr<<8|ur<<16;N[6013]=28|sr<<8|ur<<16;var Fp=255,Ip=243,Kp=237,Vq=170,Gp=250,xr=255,wr=20;
gb(function(){for(var a=Cb(document,"pcx86","keyboard"),b=0;b<a.length;b++){var c=a[b],d=Db(c);d=new Fq(d);Bb(d,c)}});
function Yr(a,b,c,d){if(void 0!==b&&(!c||c.length)){this.video=a;var e=Zr[b],f=a.fa||e[5];if(!c||6>c.length)c=[!1,0,null,null,0,Array(b<pq?$r:as)];this.ca=a.ca;this.type=e[0];this.port=e[1];this.Ma=b;this.fb=e[2];this.Tb=e[3];this.vd=d||e[4];65536<=this.vd&&720896<=this.fb&&(this.Tb=Math.min(this.vd>>2,32768));this.rc=c[0];this.Uc=c[1];this.Ze=c[2];this.ga=c[3];this.gc=c[4]&255;this.Dg=c[4]>>8&255;this.$a=c[5];this.qh=$r;this.cg=bs;this.$d=this.$a[cs]|this.$a[ds]<<8;this.bg=63;if(b>=pq){this.bg=255;
this.qh=as;this.cg=es;b=c[6];void 0===b&&(b=[!1,0,Array(fs),0,f==cm?0:gs,0,0,Array(hs),0,0,0,Array(is),0,[this.fb,this.Tb,this.vd],Array(this.vd>>2),js|ks|ls|ms|ns,0,-1,0,-1,0,-1,0,0,0,0,os,ps,0,0,qs,Array(rs)]);this.Ke=b[0];this.Bd=b[1];this.Dc=b[2];this.Ug=ss;this.Gg=b[3];this.af=b[4];this.Mf=b[5];this.Ed=b[6];this.be=b[7];this.Wg=ts;this.Wk=b[8];this.Xk=b[9];this.Dd=b[10];this.Cd=b[11];this.Vg=us;this.xb=b[12];d=b[13];"number"==typeof d&&(d=[this.fb,this.Tb,d]);this.fb=d[0];this.Tb=d[1];d=this.vd>>
2;if((this.ed=b[14])&&this.ed.length<d){e=this.ed;for(var g=0,h=Array(d),k=0;k<e.length-1;){for(var m=e[k++],q=e[k++];m--;)h[g]=q,g+=2;g==d&&(g=1)}this.ed=h}(d=b[15])&&(d&ns?d&=~ns:d=vs[d&65280]|vs[d&255]);this.Ig(d);this.fi=b[16];this.kb=b[17];this.Pc=b[18];this.Eb=b[19];this.Ff=b[20];this.Md=b[21];this.Zd=b[22];this.rh=b[23];this.sh=b[24];this.$d=b[25];this.gi=this.Gf=0;this.Ma==rq&&(this.ki=b[26],this.Eg=b[27],this.bd=b[28],this.yc=b[29],this.Fg=b[30],this.$e=b[31])}f=ws[f]||ws[cm];this.uh=a.G.Y.Yd/
f.vg|0;this.Jn=this.uh*f.Bg/100|0;this.vh=this.uh*f.ug|0;this.Ln=this.vh*f.Cg/100|0;this.xh=c[7]||0}}
function xs(a){var b=[];if(void 0!==a.Ma){b[0]=a.rc;b[1]=a.Uc;b[2]=a.Ze;b[3]=a.ga;b[4]=a.gc|a.Dg<<8;b[5]=a.$a;if(a.Ma>=pq){var c=[];c[0]=a.Ke;c[1]=a.Bd;c[2]=a.Dc;c[3]=a.Gg;c[4]=a.af;c[5]=a.Mf;c[6]=a.Ed;c[7]=a.be;c[8]=a.Wk;c[9]=a.Xk;c[10]=a.Dd;c[11]=a.Cd;c[12]=a.xb;c[13]=[a.fb,a.Tb,a.vd];var d;if(d=a.ed){var e=0,f=[];if(void 0!==d[0])for(var g=0;2>g;g++)for(var h=g;h<d.length;){for(var k=d[h],m=h+2;m<d.length&&d[m]===k;)m+=2;f[e++]=m-h>>1;f[e++]=k;h=m}f.length<d.length&&(d=f)}c[14]=d;c[15]=a.qg|ns;
c[16]=a.fi;c[17]=a.kb;c[18]=a.Pc;c[19]=a.Eb;c[20]=a.Ff;c[21]=a.Md;c[22]=a.Zd;c[23]=a.rh;c[24]=a.sh;c[25]=a.$d;a.Ma==rq&&(c[26]=a.ki,c[27]=a.Eg,c[28]=a.bd,c[29]=a.yc,c[30]=a.Fg,c[31]=a.$e);b[6]=c}b[7]=a.xh}return b}function ys(a,b,c,d,e){if(d){var f,g="";for(f=0;f<e.length;f++){var h=d===a.$a?zs(a,f):d[f];g&&(g+="\n");g+=b+"["+p(f,2)+"]: "+Ca(e[f],18)+(f===c?"*":" ")+p(h,255<h?4:2);null!=h&&(g+=" ("+h+".)")}a.ca.O(g)}else a.ca.O(b+": "+p(c,2))}Yr.prototype.wj=function(a){return[this.ed,a-this.fb]};
Yr.prototype.gh=function(){return this.A};Yr.prototype.Ig=function(a){if(null!=a&&a!=this.qg){var b=a&As,c=Bs[b];c||b&ks&&(c=Bs[ks]);b=a&Cs;var d=Bs[b];d||b&ms&&(d=Bs[ms]);this.A||(this.A=Array(6));this.A[0]=c;this.A[1]=d;this.qg=a}};
function zs(a,b){var c=a.$a[b];if(null!=c&&a.Ma>=pq){var d=0,e=0,f=0;switch(b){case Ds:d=Es;a.Ma==rq&&(e=Fs);break;case Gs:a.Ma==pq&&(d=Hs);break;case Is:d=Js;a.Ma==rq&&(e=Ks);break;case Ls:d=Ms;a.Ma==rq&&(e=Ns);break;case Os:d=Ps;a.Ma==rq&&(f=Qs);break;case Rs:d=Ss,a.Ma==rq&&(f=Ts)}d&&(c|=a.$a[Us]&d?256:0,c|=a.$a[Us]&e?512:0,c|=a.$a[Vs]&f?512:0)}return c}
var ds=12,cs=13,$r=18,Ds=6,Us=7,Es=1,Ms=2,Js=4,Ps=8,Ss=16,Hs=32,Fs=32,Ns=64,Ks=128,Vs=9,Qs=32,Ts=64,Gs=10,Is=16,Ls=18,Os=21,Rs=24,as=25,Ws={},Xs=(Ws[0]=255,Ws[1]=255,Ws[2]=255,Ws[3]=15,Ws[4]=127,Ws[5]=31,Ws[6]=127,Ws[7]=127,Ws[8]=3,Ws[9]=31,Ws[10]=127,Ws[11]=31,Ws[ds]=63,Ws[cs]=255,Ws[14]=63,Ws[15]=255,Ws[16]=63,Ws[17]=255,Ws),bs="HTOTAL HDISP HSPOS HSWIDTH VTOTAL VTOTADJ VDISP VSPOS ILMODE MAXSCAN CURSTART CUREND STARTHIGH STARTLOW CURHIGH CURLOW PENHIGH PENLOW".split(" "),es="HTOTAL HDEND HBSTART HBEND HRSTART HREND VTOTAL OVERFLOW PRESCAN MAXSCAN CURSTART CUREND STARTHIGH STARTLOW CURHIGH CURLOW VRSTART VREND VDEND OFFSET UNDERLINE VBSTART VBEND MODECTRL LINECOMP".split(" "),
fs=20,ss="PAL00 PAL01 PAL02 PAL03 PAL04 PAL05 PAL06 PAL07 PAL08 PAL09 PAL0A PAL0B PAL0C PAL0D PAL0E PAL0F MODE OVERSCAN PLANES HPAN".split(" "),gs=1,os=1,hs=5,ts=["RESET","CLOCKING","MAPMASK","CHARMAP","MEMMODE"],ps=255,qs=0,rs=256,is=9,us="SRESET ESRESET COLORCMP DATAROT READMAP MODE MISC COLORDC BITMASK".split(" "),js=1024,ks=4096,As=65280,ls=0,ms=16,Cs=255,ns=-2147483648,vs=[];vs[2]=js;vs[3]=js|ks;vs[16]=1280;vs[512]=ls;vs[1024]=ls|32;vs[1536]=ls|96;vs[2560]=ls|160;vs[3584]=ls|224;vs[768]=ls|ms;
vs[4096]=1;vs[8192]=2;vs[24576]=98;vs[40960]=162;vs[57344]=226;var Bs=[];Bs[js]=function(a){a+=this.G;return(this.controller.xb=this.W[a])>>this.controller.fi&255};Bs[js|16384]=function(a){return(this.controller.xb=this.W[(a&-4)+this.G])>>((a&3)<<3)&255};Bs[js|ks]=function(a){a+=this.G;var b=this.controller.xb=this.W[a&-2];return(a&1?b>>8:b)&255};
Bs[1280]=function(a){a+=this.G;a=this.controller.xb=this.W[a];for(var b=this.controller.sh,c=this.controller.rh&b,d=0,e=128;e;)(a&b)==c&&(d|=e),c>>>=1,b>>>=1,e>>=1;return d};Bs[ls]=function(a,b){a+=this.G;b=(b|b<<8|b<<16|b<<24)&this.controller.Md|this.controller.Zd;b=b&this.controller.Eb|this.controller.xb&~this.controller.Eb;b=b&this.controller.kb|this.W[a]&~this.controller.kb;this.W[a]!=b&&(this.W[a]=b,this.Oa=!0)};
Bs[ls|32]=function(a,b){a+=this.G;b=b>>this.controller.Pc|b<<8-this.controller.Pc&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Md|this.controller.Zd;b=b&this.controller.Eb|this.controller.xb&~this.controller.Eb;b=b&this.controller.kb|this.W[a]&~this.controller.kb;this.W[a]!=b&&(this.W[a]=b,this.Oa=!0)};
Bs[ls|96]=function(a,b){a+=this.G;b=b>>this.controller.Pc|b<<8-this.controller.Pc&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Md|this.controller.Zd;b&=this.controller.xb;b=b&this.controller.Eb|this.controller.xb&~this.controller.Eb;b=b&this.controller.kb|this.W[a]&~this.controller.kb;this.W[a]!=b&&(this.W[a]=b,this.Oa=!0)};
Bs[ls|160]=function(a,b){a+=this.G;b=b>>this.controller.Pc|b<<8-this.controller.Pc&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Md|this.controller.Zd;b|=this.controller.xb;b=b&this.controller.Eb|this.controller.xb&~this.controller.Eb;b=b&this.controller.kb|this.W[a]&~this.controller.kb;this.W[a]!=b&&(this.W[a]=b,this.Oa=!0)};
Bs[ls|224]=function(a,b){a+=this.G;b=b>>this.controller.Pc|b<<8-this.controller.Pc&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Md|this.controller.Zd;b^=this.controller.xb;b=b&this.controller.Eb|this.controller.xb&~this.controller.Eb;b=b&this.controller.kb|this.W[a]&~this.controller.kb;this.W[a]!=b&&(this.W[a]=b,this.Oa=!0)};Bs[ls|4]=function(a,b){var c=(a&-4)+this.G;a=(a&3)<<3;b=b<<a&this.controller.kb|this.W[c]&~(255<<a&this.controller.kb);this.W[c]!=b&&(this.W[c]=b,this.Oa=!0)};
Bs[ls|ms]=function(a,b){a+=this.G;var c=a&-2;b=(b|b<<8|b<<16|b<<24)&this.controller.Eb|this.controller.xb&~this.controller.Eb;a=this.controller.kb&(c==a?16711935:-16711936);b=b&a|this.W[c]&~a;this.W[c]!=b&&(this.W[c]=b,this.Oa=!0)};Bs[1]=function(a){a+=this.G;var b=this.W[a]&~this.controller.kb|this.controller.xb&this.controller.kb;this.W[a]!=b&&(this.W[a]=b,this.Oa=!0)};
Bs[1|ms]=function(a){a+=this.G;var b=a&-2;a=this.controller.kb&(b==a?16711935:-16711936);a=this.W[b]&~a|this.controller.xb&a;this.W[b]!=a&&(this.W[b]=a,this.Oa=!0)};Bs[2]=function(a,b){a+=this.G;b=Ys[b&15];b=b&this.controller.Eb|this.controller.xb&~this.controller.Eb;b=b&this.controller.kb|this.W[a]&~this.controller.kb;this.W[a]!=b&&(this.W[a]=b,this.Oa=!0)};
Bs[98]=function(a,b){a+=this.G;b=Ys[b&15];b&=this.controller.xb;b=b&this.controller.Eb|this.controller.xb&~this.controller.Eb;b=b&this.controller.kb|this.W[a]&~this.controller.kb;this.W[a]!=b&&(this.W[a]=b,this.Oa=!0)};Bs[162]=function(a,b){a+=this.G;b=Ys[b&15];b|=this.controller.xb;b=b&this.controller.Eb|this.controller.xb&~this.controller.Eb;b=b&this.controller.kb|this.W[a]&~this.controller.kb;this.W[a]!=b&&(this.W[a]=b,this.Oa=!0)};
Bs[226]=function(a,b){a+=this.G;b=Ys[b&15];b^=this.controller.xb;b=b&this.controller.Eb|this.controller.xb&~this.controller.Eb;b=b&this.controller.kb|this.W[a]&~this.controller.kb;this.W[a]!=b&&(this.W[a]=b,this.Oa=!0)};Bs[3]=function(a,b){a+=this.G;b=b>>this.controller.Pc|b<<8-this.controller.Pc&255;b=(b|b<<8|b<<16|b<<24)&this.controller.Eb;b=this.controller.Ff&b|this.controller.xb&~b;b=b&this.controller.kb|this.W[a]&~this.controller.kb;this.W[a]!=b&&(this.W[a]=b,this.Oa=!0)};
function Q(a,b,c,d,e){sb.call(this,"Video",a,262144);var f=this,g;this.ad=Xa("Gecko/");this.da=a.model;var h=Zs[this.da]||Zs.mda;this.Ma=h[0];this.vd=a.memory||0;this.od=a.switches;this.Sb=a.randomize;null==this.Sb&&(this.Sb=1);this.ea=a.mode;if(null==this.ea||null==$s[this.ea])this.ea=h[1];this.Rb=a.charCols;this.Ac=a.charRows;if(void 0===this.Rb||void 0===this.Ac)this.Rb=$s[this.ea][0],this.Ac=$s[this.ea][1];this.Z=a.screenWidth;this.ka=a.screenHeight;this.cd=a.scale;this.Qd=12<=Math.round(this.Z/
this.Rb);this.N=b;this.L=c;this.F=(this.ng=d)||b||null;this.lc=a.screenColor||"black";this.nd=(1-($a("flicker")||a.flicker||0)).toString();this.Ib=!1;b&&(b.style.backgroundColor=this.lc);e&&(e.style.backgroundColor=this.lc);b=a.smoothing;(c=$a("smoothing"))&&(b="true"==c);null!=b&&(g=Ya(this.L,"imageSmoothingEnabled"))&&(this.L[g]=b);this.pd=a.touchScreen;this.lb=at;this.H=null;this.Pd=a.autoLock;this.fb=this.Tb=0;this.ra=[];this.ha=Array(this.Ma==rq?256:16);this.Ia=!1;if(this.P=e)if(g=Ya(e,"requestFullscreen")||
Ya(e,"requestFullScreen")){this.P.A=e[g];if(e=Ya(document,"on","fullscreenchange")){var k=Ya(document,"fullscreenElement")||Ya(document,"fullScreenElement");document.addEventListener(e,function(){bt(f,!!k)},!1)}(e=Ya(document,"on","fullscreenerror"))&&document.addEventListener(e,function(){bt(f,null)},!1)}if(this.F&&(this.F.onfocus=function(){return f.zg(!0)},this.F.onblur=function(){return f.zg(!1)},this.F.ne=(g=Ya(this.F,"requestPointerLock"))&&this.F[g],this.F.B=(g=Ya(this.F,"exitPointerLock"))&&
this.F[g],this.F.ne&&(e=Ya(document,"on","pointerlockchange")))){var m=Ya(document,"pointerLockElement");document.addEventListener(e,function(){f.Hf(!(!m||document[m]!==f.F))},!1)}(this.Aa=a.fontROM)&&"json"!=ya(this.Aa)&&(this.Aa=Qa()+"/api/v1/dump?file="+this.Aa+"&format=bytes")}ia(Q,sb);l=Q.prototype;
l.tc=function(a,b,c,d){var e=this;this.oa=b;this.G=c;this.ca=d;c=+Ed(a,"randomize");0<=c&&1>=c&&(this.Sb=c);c=(c=Zs[this.da])&&c[0];c!==ct&&(Tc(b,this,dt),Xc(b,this,et));c!==ft&&(Tc(b,this,gt),Xc(b,this,ht));this.Ma>=pq&&(Tc(b,this,it),Xc(b,this,jt));this.Ma==rq&&(Tc(b,this,kt),Xc(b,this,lt));d&&Gl(d,262144,function(a){if(e.B)if(a[0]){var b=e.B;if(b.ed){var c,d=!1,f=8,g=8,h=-1,J=b.video.D>>3;for(c=0;c<a.length;c++){var H=a[c];if(c){var G=H.charAt(0);var P=qa(H.substr(1),16);switch(G){case "l":f=P;
break;case "n":1<=P&&8>=P&&(g=P,d=!0);break;case "p":0<=P&&3>=P&&(h=P);break;case "w":P<J&&(J=P);break;default:b.ca.O("unrecognized argument: "+H)}}else var I=qa(H,16)}void 0===I?I=b.B||0:I>=b.fb&&(I-=b.fb);a="";for(c=0;c<f;c++){H=p(b.fb+I)+":";for(P=0;P<g&&I<b.ed.length;P++)G=b.ed[I++],H+=" "+(0>h?p(G):ta(G>>(h<<3),8));d&&(I+=J-g);a&&(a+="\n");a+=H}a&&b.ca.O(a);b.B=I}else b.ca.O("no buffer")}else e.ca.O("BIOSMODE: "+va(e.la)),b=e.B,ys(b,"CRTC",b.gc,b.$a,b.cg),b.Ma>=pq&&(ys(b," GRC",b.Dd,b.Cd,b.Vg),
ys(b," SEQ",b.Ed,b.be,b.Wg),ys(b," ATC",b.Bd,b.Dc,b.Ug),ys(b," ATCINDX",b.Bd),b.ca.O(" ATCDATA: "+b.Ke),ys(b," FEAT",b.Mf),ys(b," MISC",b.af),ys(b," STATUS0",b.Gg)),ys(b," STATUS1",b.ga),b.Ma!=ft&&b.Ma!=ct||ys(b," MODEREG",b.Uc),b.Ma==ct&&ys(b," COLOR",b.Ze),b.Ma>=pq&&(b.ca.O(" LATCHES: "+p(b.xb)),b.ca.O(" ACCESS: "+p(b.qg,4)),b.ca.O("Use 'dump video [addr]' to dump video memory"));else e.ca.O("no active video card")});if((this.C=ec(a,"Keyboard"))&&this.N){for(var f in this.ma)0<f.indexOf("lock")&&
this.C.Fb("led",f,this.ma[f]);this.C.Fb(this.ng?"textarea":"canvas","screen",this.F)}this.Gb=9;(this.V=ec(a,"ChipSet"))&&this.od&&this.Ma==pq&&(this.Gb=ml(this.od,this.Gb));"mouse"==this.pd?(this.H=ec(a,"Mouse"))&&mt(this,nt):"keygrid"==this.pd&&this.C&&mt(this,ot);this.lb||mt(this,pt);if(this.Aa){var g="Loading "+this.Aa+"...";Pa(this.Aa,null,!0,function(a,b,c){qt(e,a,b,c)},function(){e.O(g,Ob)})}Fd(this.G,this.id,function(){rt(e)},1E3/st)};
l.Fb=function(a,b,c){var d=this;if(!this.ma[b])switch(this.ma[b]=c,b){case "fullScreen":return this.P&&this.P.A?c.onclick=function(){if(d.P){if(d.P.A){var a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=d.Z/d.ka;b>c&&(a=Math.round(c/b*100)+"%")}d.ad?(d.N.style.width=a,d.N.style.width=a,d.N.style.display="block",d.N.style.margin="auto"):(d.P.style.width=a,d.P.style.height="auto");d.P.style.backgroundColor=d.lc;d.P.A()}d.F&&d.F.focus()}}:c.parentNode.removeChild(c),
!0;case "lockPointer":return this.Sd=c.textContent,this.F&&this.F.ne?c.onclick=function(){d.ne(!0)}:c.parentNode.removeChild(c),!0;case "refresh":return c.onclick=function(){rt(d,!0)},!0}return!1};function bt(a,b){!b&&a.P&&(a.ad?a.N.style.width=a.N.style.height="":a.P.style.width=a.P.style.height="");Wb(a,"notifyFullScreen("+b+")",!0);a.C&&(a.C.eh=b)}
l.ne=function(a){var b=!1;this.F&&(a?this.F.ne&&(this.F.ne(),this.H&&this.H.Hf(!0),b=!0):this.F.B&&(this.F.B(),this.H&&this.H.Hf(!1),b=!0),this.F&&this.F.focus());return b};l.Hf=function(a){this.H&&(this.H.Hf(a),this.C&&(this.C.eh=a));var b=this.ma.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.Sd)};
function mt(a,b){var c=a.F;c&&!a.lb&&(a.lb=b,c.addEventListener("touchstart",function(b){kq(a.V,b);a.lb!=pt&&tt(a,b,!0)},!1),b!=pt&&(c.addEventListener("touchmove",function(b){tt(a,b)},!0),c.addEventListener("touchend",function(b){tt(a,b,!1)},!1),a.mb=a.vb=a.qd=-1,a.wc=!1,a.Lb=null,a.vc=!1,a.Rd=function(){a.vc=!0;a.H.Xd(ut,!0)}))}l.zg=function(a){this.C&&this.C.zg(a)};
function tt(a,b,c){var d=0,e=0;var f=a.N;do isNaN(f.offsetLeft)||(d+=f.offsetLeft,e+=f.offsetTop);while(f=f.offsetParent);var g=a.Z/a.N.offsetWidth,h=a.ka/a.N.offsetHeight;if(b.targetTouches&&b.targetTouches.length){f=b.targetTouches[0].pageX;var k=b.targetTouches[0].pageY}else f=b.pageX,k=b.pageY;f=(f-d)*g;k=(k-e)*h;if(a.lb==ot)c&&Kq(a.C,vt[k/(a.ka/3)|0][f/(a.Z/3)|0],!0);else if(a.H){e=a.wc;d=b.timeStamp-a.qd;!0===c?(a.wc=500<d,a.qd=b.timeStamp,a.Lb=setTimeout(a.Rd,500)):null!=a.Lb&&(clearTimeout(a.Lb),
a.Lb=null);void 0===c&&(a.wc=!1);e||b.preventDefault();if(!1===c){a.vc?(a.H.Xd(ut,!1),a.vc=!1,b=!0):b=!1;if(b)return;if(200>d){a.H.Xd(ut,!0);a.H.Xd(ut,!1);return}}if(c||0>a.mb||0>a.vb)a.mb=f,a.vb=k;c=Math.round(f-a.mb);b=Math.round(k-a.vb);a.mb=f;a.vb=k;a.H.tf(c,b,a.mb,a.vb)}}l.$b=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Zb=function(a){return a?this.save():!0};
l.reset=function(){var a=0;this.V&&(a=+bm(this.V,ql,void 0));this.da||(this.Ma=a==cm?ft:ct);this.ea=wt;switch(this.Ma){case rq:a=7;break;case pq:var b=xt[this.Gb];b&&(a=b[0]);a||(a=4);break;case ft:a=cm;this.ea=yt;break;default:a=2}this.fa!==a&&(this.fa=a);this.B=null;this.U=this.fc=new Yr(this,ft);this.K=this.Hb=new Yr(this,ct);this.Ma<pq?this.A=new Yr:(this.A=new Yr(this,this.Ma,null,this.vd),zt(this));At(this);this.la=null;Bt(this,this.ea);if(this.B.fb&&this.Sb){a=this.B.fb+this.Ra;for(b=this.B.fb;b<
a;b+=2){var c=65536*Math.random()|0;if(4==this.fa||7==this.fa){var d=b>>1&255;c=c>>8&~Ct;c>>4==(c&15)&&(c^=15)}else d=c&255,c=(c&256?Dt|Et:Ft|Gt)|Ht&c>>8;Pc(this.oa,b,d|c<<8)}rt(this,!0)}};function zt(a){a.A.af&gs?(a.U=a.fc,a.K=a.A):(a.U=a.A,a.K=a.Hb)}l.save=function(){var a=new eg(this);a.set(0,xs(this.fc));a.set(1,xs(this.Hb));a.set(2,[this.fa,this.ea,this.la]);a.set(3,xs(this.A));return a.data()};
l.restore=function(a){var b=a[2];this.fa=b[0];this.ea=b[1];this.la=b[2];this.B=null;this.U=this.fc=new Yr(this,ft,a[0]);this.K=this.Hb=new Yr(this,ct,a[1]);this.A=new Yr(this,this.Ma,a[3],this.vd);this.A.rc&&zt(this);At(this);if(!It(this))return!1;Jt(this);return!0};
function qt(a,b,c,d){if(d)a.Da("Unable to load font ROM (error "+d+": "+b+")",0>d);else{ub(a.de,b,c);try{var e=eval("("+c+")"),f=e.bytes||e;if(!f.length){nb("Empty font ROM: "+b);return}if(1==f.length){nb(f[0]);return}if(8192==f.length)qq(a,f,[6144,0]);else if(2048==f.length)qq(a,f,[0]);else{a.Da("Unrecognized font data length ("+f.length+")");return}}catch(g){a.Da("Font ROM data error: "+g.message);return}(a.L||a.ca)&&Sb(a)}}
function Kt(a,b){if(1==b)return a.ha[0]=Lt[Ft],a.ha[1]=Lt[Dt],a.ha;if(2==b){var c=a.B.Ze;if(a.B===a.A){var d=a.A.Dc[0];c=d&7;d&16&&(c|=8);18!=a.A.Dc[1]&&(c|=32)}a.ha[0]=Lt[c&15];c=c&32?Mt:Nt;for(d=0;d<c.length;d++)a.ha[d+1]=Lt[c[d]];return a.ha}if(a.K===a.Hb)return Lt;a.Ia&&b&&!a.ha[16]&&(a.Ia=!1);if(!a.Ia){c=a.A;d=c.$e;var e;if(8==b)for(e=0;256>e;e++){var f=d[e]||0;var g=f<<2&252;var h=f>>4&252;f=f>>10&252;a.ha[e]=[g,h,f,255]}else{var k=d&&d[255];b=null!=c.Dc[15]?c.Dc:Ot;for(e=0;16>e;e++)f=b[e]&
63,k?(f|=(c.Dc[20]&12)<<4,c.Dc[16]&128&&(f&=-49,f|=(c.Dc[20]&3)<<4),f=d[f],g=f<<2&252,h=f>>4&252,f=f>>10&252):(g=(f&4?170:0)|(f&32?85:0),h=(f&2?170:0)|(f&16?85:0),f=(f&1?170:0)|(f&8?85:0)),a.ha[e]=[g,h,f,255]}a.Ia=!0}return a.ha}function qq(a,b,c,d){a.zb=b;a.Pa=c;a.Fa=d}
function At(a,b){var c=!1;if(window&&a.zb&&(!b||a.I)){var d=0,e=a.Fa?a.Fa:8,f=Kt(a);null!=a.Pa[0]&&Pt(a,Qt,a.Pa[0],d,e,8,a.zb,f)&&(c=!0);d=a.Fa?0:2048;e=a.Fa?a.Fa:9;null!=a.Pa[1]&&(Pt(a,qu,a.Pa[1],d,e,14,a.zb,su,tu)&&(c=!0),a.Fa&&Pt(a,a.Ma,a.Pa[1],0,a.Fa,14,a.zb,f)&&(c=!0))}b||(a.ba=-1,a.Ba=-1,a.ta=0);return c}function Pt(a,b,c,d,e,f,g,h,k){var m=!1;null!=c&&(uu(a,b,c,d,e,f,g,h,k)&&(m=!0),a.Qd&&uu(a,b<<1,c,d,e,f,g,h,k)&&(m=!0));return m}
function uu(a,b,c,d,e,f,g,h,k){var m=!1,q=b&1?0:1,v=a.ra[b],u=16>h.length?h.length:16;v||(v={Gc:e<<q,Hc:f<<q,Ce:Array(u),Si:h.slice(0,u),jf:k,Tg:Array(u)});for(k=0;k<u;k++){var A=h[k],J=v.Ce[k]?v.Si[k]:[];if(A[0]!==J[0]||A[1]!==J[1]||A[2]!==J[2]){var H,G;m=v;J=k;var P=A,I=q,pa=c,Z=d,ib=e,sa=f,jb=g,Tb=[0,0,0,0],Kb=document.createElement("canvas");Kb.width=m.Gc<<4;Kb.height=m.Hc<<4;var dc=Kb.getContext("2d"),wc=8>sa||!Z?sa:8,kb=dc.createImageData(m.Gc,m.Hc);for(G=0;256>G;G++){for(A=0;A<sa;A++)for(var lf=
m.jf&&J&1&&A>=sa-2,Td=jb[A<wc?pa+G*wc+A:Z+G*wc+A-wc],mf=0;mf<=I;mf++)for(H=0;H<ib;H++){var Fg=H<<I,nf=(A<<I)+mf,Gg=lf||Td&128>>(8<=H&&192<=G&&223>=G?7:H)?P:Tb;vu(kb,Fg,nf,Gg);I&&vu(kb,Fg+1,nf,Gg)}dc.putImageData(kb,(G&15)*m.Gc,(G>>4)*m.Hc)}m.Ce[J]="#"+p(P[0],2)+p(P[1],2)+p(P[2],2);m.Si[J]=P;m.Tg[J]=Kb;m=!0}}a.ra[b]=v;return m}function wu(a){0<a.ta||0<=a.ba?0>a.Ba&&(a.Ba=0):a.Ba=-1}
function Jt(a){if(a.I){for(var b=10;15>=b;b++)if(null==a.B.$a[b])return;var c=a.B.$a[10];b=c&31;var d=a.B.$a[11]&Xs[11],e=a.B.$a[9]&Xs[9],f=!1;a.B===a.A&&(f=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!f||b>e)xu(a);else{c=a.B.$a[15];c|=(a.B.$a[14]&a.B.bg)<<8;a.ba!=c&&(xu(a),a.ba=c);d=d-b+1;if(a.rd!=b||a.Sc!=d)a.rd=b,a.Sc=d;a.wa=e+1;wu(a)}}}
function xu(a){if(0<=a.ba){if(void 0!==a.M){var b=yu<<8,c=a.M[a.ba];if(c&b){c&=~b;b=a.ba%a.D;var d=a.ba/a.D|0;a.I&&a.ra[a.I]&&(a.Ea&&zu(a,b,d,c,a.Ea),zu(a,b,d,c));a.M[a.ba]=c}}a.ba=-1}}
function Au(a){var b=a.B;a.Tc=!1;var c=b.Cd[5];if(null!=c){var d=js;var e=ls,f=b.Cd[3]&31;switch(c&3){case 0:if(f){e=ls|32;switch(f&24){case 8:e=ls|96;break;case 16:e=ls|160;break;case 24:e=ls|224}b.Pc=f&7}break;case 1:e=1;break;case 2:switch(f&24){default:e=2;break;case 8:e=98;break;case 16:e=162;break;case 24:e=226}break;case 3:a.Ma==rq&&(e=3,b.Pc=f&7)}c&8&&(d=1280);b=b.be[4];null!=b&&(b&4||(d|=ks,e|=ms),c&64&&(b&8&&(d|=16384,e|=4),a.Tc=!0));d|=e}return d}
function Bu(a,b){var c=a.B;return c&&null!=b&&b!=c.qg?(c.Ig(b),a.oa.Ig(c.fb,c.Tb,c.gh(),!0),!0):!1}
function It(a,b){var c=a.la,d=a.B;if(d)if(d.Ma==ft)c=yt;else if(d.Ma>=pq){c=null;var e=d.vd>>2,f=32768<e?32768:e,g=d.Cd[6];if(null!=g){switch(g&12){case 0:d.fb=655360;d.Tb=e;c=Cu;break;case 4:d.fb=655360;d.Tb=e;c=a.fa==cm?Du:Eu;break;case 8:d.fb=720896;d.Tb=f;c=yt;break;case 12:d.fb=753664,d.Tb=f,c=a.fa==cm?Fu:wt}var h=80==(d.Cd[5]&80);!h||d.fb==a.fb&&d.Tb==a.Tb||(b=!0);e=zs(d,Ds);f=d.$a[Vs];var k=d.$a[23],m=d.be[1]&8;c!=Cu&&(g&1?655360==d.fb||h||k&1?d.Cd[5]&64?c=f&31?143>=d.$a[Ls]?Gu:Hu:Iu:f&128||
350>e?c=m?Ju:Ku:480<=e&&(c=a.fa==cm?Lu:Mu):c=m?7-c:Nu:c-=m?2:0);h=Au(a)}}else d.Uc&8?(d.Uc&2?(c=d.Uc&16?Nu:Ou,d.Uc&4||--c):(c=d.Uc&1?wt:Pu,d.Uc&4&&--c),a.Ib&&(a.N.style.opacity="1",a.Ib=!1)):!a.Ib&&1>+a.nd&&(a.Ib=!0,a.N.style.opacity=a.nd,d=a.G,d.aa.Qf=!0,Id(d));else a.la=null,null==c&&(c=a.ea);if(!Bt(a,c,b))return!1;Bu(a,h);return!0}
function Bt(a,b,c){if(null!=b&&(b!=a.la||c)){a.Fd=0;a.la=b;a.Ia=!1;b=a.B||(b==yt?a.U:a.K);if(b!=a.B||b.fb!=a.fb||b.Tb!=a.Tb){xu(a);if(a.fb){if(!Hc(a.oa,a.fb,a.Tb))return!1;a.B&&(a.B.rc=!1)}a.B=b;b.rc=!0;a.fb=b.fb;a.Tb=b.Tb;if(!uc(a.oa,b.fb,b.Tb,3,b===a.A?b:null))return!1}a:{a.I=0;a.D=a.Rb;a.J=a.Ac;a.La=a.D;a.Qb=$s[yt][2];b=0;if(c=$s[a.la])a.D=c[0],a.J=c[1],a.Qb=c[2],b=c[3],a.I=c[4],4!=a.fa&&7!=a.fa||a.B!==a.A||a.I!=Qt||(7==(a.A.$a[Vs]&31)?a.J=350>zs(a.A,Ls)?43:50:a.I=a.Ma);a.md=a.D*a.J|0;a.ld=a.md/
a.Qb|0;a.Ra=a.ld;a.kc=0;void 0!==b&&(a.Ra=(a.Ra<<1)+b|0,a.kc=a.Ra+b>>1);if(a.ra.length){a.qa=a.Z/a.D|0;a.pa=a.ka/a.J|0;if(a.I){b=a.ra[a.I];if(!b)break a;c=a.ra[a.I<<1];a.cd&&80==a.D?c&&a.qa>=3*c.Gc>>2&&(a.I<<=1,b=c):(c&&a.qa>=c.Gc&&(a.I<<=1,b=c),a.cd||(a.qa=b.Gc,a.pa=b.Hc));a.ab=a.cb=0;b&&(a.ab=a.D*b.Gc,a.cb=a.J*b.Hc)}else a.qa=a.pa=1,a.ab=a.D,a.cb=a.J;a.Ka=a.L.createImageData(a.ab,a.cb);a.Ca=document.createElement("canvas");a.Ca.width=a.ab;a.Ca.height=a.cb;a.Ea=a.Ca.getContext("2d");a.Jc=a.Kc=0;
a.sc=a.Z;a.uc=a.ka;b=a.Z-a.D*a.qa;c=a.ka-a.J*a.pa;0<b&&(a.Jc=b>>1,a.sc-=b);0<c&&(a.Kc=c>>1,a.uc-=c);if(b||c)a.L.fillStyle=a.N.style.backgroundColor,a.L.fillRect(0,0,a.Z,a.ka)}}Qu(a,!0);rt(a)}return!0}function vu(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function Ru(a){a.ta=-1;a.Ga=!1;var b=a.ld;if(void 0===a.M||a.M.length!=b)a.M=Array(b)}function Qu(a,b){b||(a.Ia=!1);Ru(a)}
function zu(a,b,c,d,e){var f=d&255,g=d>>8;d=g&15;var h=a.ra[a.I];h.jf&&(d=h.jf[d]);var k=g>>4&15;h.jf&&(k=h.jf[k]);e?(b*=h.Gc,c*=h.Hc,e.fillStyle=h.Ce[k],e.fillRect(b,c,h.Gc,h.Hc)):(b=b*a.qa+a.Jc,c=c*a.pa+a.Kc,a.L.fillStyle=h.Ce[k],a.L.fillRect(b,c,a.qa,a.pa));g&Su&&(k=(f&15)*h.Gc,f=(f>>4)*h.Hc,e?e.drawImage(h.Tg[d],k,f,h.Gc,h.Hc,b,c,h.Gc,h.Hc):a.L.drawImage(h.Tg[d],k,f,h.Gc,h.Hc,b,c,a.qa,a.pa));g&yu&&(f=a.rd,g=a.Sc,e?(a.wa&&a.wa!==h.Hc&&(f=f*h.Hc/a.wa|0,g=g*h.Hc/a.wa|0),e.fillStyle=h.Ce[d],e.fillRect(b,
c+f,h.Gc,g)):(a.wa&&a.wa!==a.pa&&(f=f*a.pa/a.wa|0,g=g*a.pa/a.wa|0),a.L.fillStyle=h.Ce[d],a.L.fillRect(b,c+f,a.qa,g)))}
function rt(a,b){b=void 0===b?!1:b;if(a.aa.ac){var c=!1,d=a.B;d&&(d!==a.A?d.Uc&8&&(c=!0):d.Bd&32&&(c=!0));if(c||b){if(b)Ru(a);else if(void 0===a.M)return;c=!1;!(b||++a.Fd&15)&&0<=a.Ba&&(a.Ba++,c=!0);var e=a.md,f=a.fb,g=f,h=g+a.Tb;a.la>=Gu&&(f=g=655360,h=g+65536);if(Tu(a,d)&8||d.Gf&&d.Gf<d.gi){var k=d.$a[cs];k|=(d.$a[ds]&d.bg)<<8;d.$d!==k&&(d.$d=k,Qu(a));d.Gf=0}var m=d.$d<<(a.I?1:0);g+=m;k=a.Ra;a.Ma>=pq&&d.$a[19]&&d.$a[19]<<1!=d.$a[1]+1&&(a.La=d.$a[19]<<(a.I?1:d.$a[20]&64?3:4),k=(a.La*(a.J-1)+a.D)/
a.Qb|0,a.la<=yt&&(k<<=1));var q=d=0;g+k>h&&(q=k,g>=h?(d=f+(g-h),k=0):(d=f,k=h-g,q-=k));h=a.ba-(m>>1);g=Uu(a,f,g,k,0,h,e,b,c);q&&(g+=Uu(a,f,d,q,0+g,h,e,b,c));g&&(a.Ga=!0)}}}
function Uu(a,b,c,d,e,f,g,h,k){var m=d>>1;m>g&&(m=g);var q=c+d;if(h=!h&&a.Ga){h=a.oa;for(var v=!0,u=c>>>h.A,A=h.B-(c&h.D);0<d&&u<h.Z.length;)h.Z[u].Oa&&(h.Z[u].Oa=v=!1,h.Z[u].rj=!0),d-=A,A=h.B,u++;h=v}if(h){if(!k)return m;if(!a.ta){f-=e;if(0>f)return m;c+=f<<1;e+=f;g=e+1}}if(a.I){if(a.ra[a.I]){b=c;c=e;k=f=e=0;h=Su<<8;d=1048575;u=a.B.Uc&32;a.Ma>=pq&&(u=a.B.Dc[16]&8);v=a.ba-a.B.$d;u&&(k=Ct<<8,d&=~k,a.Ba&2||(d&=~h));for(a.ta=0;b<q&&c<g;)u=Oc(a.oa,b),u|=h,u&k&&(a.ta++,u&=d),c==v&&(u|=a.Ba&1?yu<<8:0),
a.Ga&&u===a.M[c]||(zu(a,c%a.D,c/a.D|0,u,a.Ea),a.M[c]=u,f++),b+=2,e++,c++;f&&a.Ea&&a.L.drawImage(a.Ca,0,0,a.ab,a.cb,a.Jc,a.Kc,a.sc,a.uc);wu(a)}}else{if(a.kc){b=c;m=q-b>>1;g=0;c=a.Qb;e=b;f=16==c?65536:196608;k=16==c?1:2;h=Kt(a,k);v=d=0;u=a.D;A=0;var J=a.J,H=0;for(a.ta=0;e<q;){var G=Oc(a.oa,e);if(a.Ga&&G===a.M[g])d+=c;else{a.M[g]=G;G=G>>8|(G&255)<<8;var P=f,I=16;d<u&&(u=d);for(var pa=0;pa<c;pa++){var Z=(G&(P>>=k))>>(I-=k);vu(a.Ka,d++,v,h[Z])}d>A&&(A=d);v<J&&(J=v);v>=H&&(H=v+1)}e+=2;g++;if(d>=a.D){d=
0;v+=2;if(v>a.J)break;v==a.J&&(v=1,e=b+a.kc)}}u<a.D&&(a.Ea.putImageData(a.Ka,0,0,u,J,A-u,H-J),a.L.drawImage(a.Ca,0,0,a.D,a.J,0,0,a.Z,a.ka));a=m}else{if(a.Tc){m=0;g=q-c;e=Kt(a,8);f=a.B.ed;h=k=0;d=a.D;v=0;u=a.J;A=0;J=a.B.be[4]&8?4:1;H=a.B.Dc[19]&15;G=a.La>a.D?a.La-a.D-H>>3:0;for(a.ta=0;c<q;){P=f[c-b];pa=4;H||(a.Ga&&P===a.M[m]?(k+=pa,pa=0):a.M[m]=P,m++);if(pa){k<d&&(d=k);for(I=0;I<pa;I++)vu(a.Ka,k++,h,e[P&255]),P>>=8;k>v&&(v=k);h<u&&(u=h);h>=A&&(A=h+1)}c+=J;if(k>=a.D){k=0;if(++h>a.J)break;c+=G}}H&&(g=
0)}else{m=0;g=q-c;e=Kt(a);f=a.B.ed;h=k=0;d=a.D;v=0;u=a.J;A=0;J=a.B.Dc[19]&15;H=a.La>a.D?a.La-a.D-J>>3:0;for(a.ta=0;c<q;){G=c++-b;G=f[G];I=8;J?k?(P=a.D-k,I>P&&(I=P)):(G<<=J,I-=J,a.Ga=!1):(a.Ga&&G===a.M[m]?(k+=I,I=0):a.M[m]=G,m++);if(I){k<d&&(d=k);for(P=0;P<I;P++)pa=Vu[G&2155905152]||0,vu(a.Ka,k++,h,e[pa]),G<<=1;k>v&&(v=k);h<u&&(u=h);h>=A&&(A=h+1)}if(k>=a.D){k=0;if(++h>a.J)break;c+=H}}J&&(g=0)}d<a.D&&(a.Ea.putImageData(a.Ka,0,0,d,u,v-d,A-u),a.L.drawImage(a.Ca,0,0,a.D,a.J,0,0,a.Z,a.ka));a=g}m=a}return m}
function Tu(a,b){var c=0;a=Md(a.G)-b.xh;0>a&&(b.xh=a,a=-a|0);a%b.uh>b.Jn&&(c|=1);a%b.vh>b.Ln&&(c|=9);b.gi=a/b.vh|0;return c}l.Wm=function(a,b){return Wu(this,this.U,a,b)};l.Ko=function(a,b,c){var d=this.U;d.Dg=d.gc;d.gc=b&31;t(this,a,b,c,"CRTC.INDX")};l.Vm=function(a,b){return Xu(this,this.U,a,b)};l.Jo=function(a,b,c){Yu(this,this.U,a,b,c)};l.Xm=function(a,b){return Zu(this,this.U,b)};l.Lo=function(a,b,c){a=this.U;t(this,a.port+4,b,c,"MODE");a.Uc=b;It(this,!1)};
l.Ym=function(a,b){return $u(this,this.U,b)};l.Mk=function(a,b,c){this.A.Mf=this.A.Mf&-4|b&3;t(this,a,b,c,"FEAT")};l.qm=function(a,b){a=this.A.Bd;b&&!r(this)||t(this,960,null,b,"ATC.INDX",a);return a};l.Kl=function(a,b){a=this.A.Dc[this.A.Bd&31];b&&!r(this)||t(this,960,null,b,"ATC."+this.A.Ug[this.A.Bd&31],a);return a};
l.Lk=function(a,b,c){var d=this.A,e=d.Bd&32;if(d.Ke){d.Ke=!1;var f=d.Bd&31;if(16<=f||!e)if(av||d.Dc[f]!==b)c&&!r(this)||t(this,a,b,c,"ATC."+d.Ug[f]),d.Dc[f]=b,Qu(this,!1)}else d.Bd=b,t(this,a,b,c,"ATC.INDX"),d.Ke=!0,b&32&&!e&&At(this,!0)&&rt(this,!0),a=d.$a[cs],a|=(d.$a[ds]&d.bg)<<8,d.$d!=a&&(d.$d=a,Qu(this)),d.Gf=0};
l.hn=function(a,b){a=0;if(this.Ma==pq)a=3-((this.A.af&12)>>2),a=(this.Gb&1<<a)<<4-a;else{var c=this.A.$e[0];45!=(c&63)&&2880!=(c&4032)&&184320!=(c&258048)&&(a|=16)}a|=this.A.Gg&-17;this.A.Gg=a;t(this,962,null,b,"STATUS0",a);return a};l.Mo=function(a,b,c){this.A.af=b;zt(this);t(this,962,b,c,"MISC")};l.jn=function(a,b){a=this.A.ki;t(this,963,null,b,"VGA_ENABLE",a);return a};l.Uo=function(a,b,c){this.A.ki=b;t(this,963,b,c,"VGA_ENABLE")};
l.fn=function(a,b){a=this.A.Ed;t(this,964,null,b,"SEQ.INDX",a);return a};l.So=function(a,b,c){this.A.Ed=b;t(this,964,b,c,"SEQ.INDX")};l.en=function(a,b){a=this.A.be[this.A.Ed];b&&!r(this)||t(this,965,null,b,"SEQ."+this.A.Wg[this.A.Ed],a);return a};l.Ro=function(a,b,c){if(av||this.A.be[this.A.Ed]!==b)c&&!r(this)||t(this,965,b,c,"SEQ."+this.A.Wg[this.A.Ed]),this.A.be[this.A.Ed]=b;switch(this.A.Ed){case 2:this.A.kb=Ys[b&15];break;case 4:Bu(this,Au(this))&&rt(this,!0)}};
l.Hm=function(a,b){a=this.A.Eg;b&&!r(this)||t(this,966,null,b,"DAC.MASK",a);return a};l.to=function(a,b,c){if(av||this.A.Eg!==b)c&&!r(this)||t(this,966,b,c,"DAC.MASK"),this.A.Eg=b};l.Im=function(a,b){a=this.A.Fg;b&&!r(this)||t(this,967,null,b,"DAC.STATE",a);return a};l.uo=function(a,b,c){c&&!r(this)||t(this,967,b,c,"DAC.READ");this.A.bd=b;this.A.Fg=3;this.A.yc=0};l.vo=function(a,b,c){c&&!r(this)||t(this,968,b,c,"DAC.WRITE");this.A.bd=b;this.A.Fg=qs;this.A.yc=0};
l.Gm=function(a,b){a=this.A.$e[this.A.bd]>>this.A.yc&63;b&&!r(this)||t(this,969,null,b,"DAC.DATA["+va(this.A.bd)+"]["+va(this.A.yc)+"]",a);this.A.yc+=6;12<this.A.yc&&(this.A.yc=0,this.A.bd=this.A.bd+1&rs-1);return a};l.so=function(a,b,c){a=this.A.$e[this.A.bd];c&&!r(this)||t(this,969,b,c,"DAC.DATA["+va(this.A.bd)+"]["+va(this.A.yc)+"]");b=a&~(63<<this.A.yc)|(b&63)<<this.A.yc;a!==b&&(this.A.$e[this.A.bd]=b,Qu(this,!1));this.A.yc+=6;12<this.A.yc&&(this.A.yc=0,this.A.bd=this.A.bd+1&rs-1)};
l.kn=function(a,b){a=this.A.Mf;t(this,970,null,b,"FEAT",a);return a};l.Fo=function(a,b,c){this.A.Xk=b;t(this,970,b,c,"GRC2")};l.mn=function(a,b){a=this.A.af;t(this,972,null,b,"MISC",a);return a};l.Eo=function(a,b,c){this.A.Wk=b;t(this,972,b,c,"GRC1")};l.Pm=function(a,b){a=this.A.Dd;t(this,974,null,b,"GRC.INDX",a);return a};l.Do=function(a,b,c){this.A.Dd=b;t(this,974,b,c,"GRC.INDX")};l.Om=function(a,b){a=this.A.Cd[this.A.Dd];b&&!r(this)||t(this,975,null,b,"GRC."+this.A.Vg[this.A.Dd],a);return a};
l.Co=function(a,b,c){if(av||this.A.Cd[this.A.Dd]!==b)c&&!r(this)||t(this,975,b,c,"GRC."+this.A.Vg[this.A.Dd]),this.A.Cd[this.A.Dd]=b;switch(this.A.Dd){case 0:this.A.Ff=Ys[b&15];this.A.Zd=this.A.Ff&~this.A.Md;break;case 1:this.A.Md=~Ys[b&15];this.A.Zd=this.A.Ff&~this.A.Md;break;case 2:this.A.rh=Ys[b&15]&-2139062144;break;case 3:case 5:Bu(this,Au(this));break;case 4:this.A.fi=(b&3)<<3;break;case 6:It(this,!1);break;case 7:this.A.sh=Ys[b&15]&-2139062144;break;case 8:this.A.Eb=b|b<<8|b<<16|b<<24}};
l.Am=function(a,b){return Wu(this,this.K,a,b)};l.no=function(a,b,c){var d=this.K;d.Dg=d.gc;d.gc=b&31;t(this,a,b,c,"CRTC.INDX")};l.zm=function(a,b){return Xu(this,this.K,a,b)};l.mo=function(a,b,c){Yu(this,this.K,a,b,c)};l.Bm=function(a,b){return Zu(this,this.K,b)};l.oo=function(a,b,c){a=this.K;t(this,a.port+4,b,c,"MODE");a.Uc=b;It(this,!1)};l.ym=function(a,b){var c=this.K.Ze;b&&!r(this)||t(this,a,null,b,this.K.type+".COLOR",c);return c};
l.lo=function(a,b,c){c&&!r(this)||t(this,a,b,c,this.K.type+".COLOR");this.K.Ze!==b&&(this.K.Ze=b,Qu(this,!1))};l.Cm=function(a,b){return $u(this,this.K,b)};function Wu(a,b,c,d){if(b.rc)var e=b.gc;t(a,c,null,d,"CRTC.INDX",e);return e}function Xu(a,b,c,d){var e;b.rc&&b.gc<b.qh&&(e=b.$a[b.gc]);d&&!r(a)||t(a,c,null,d,"CRTC."+b.cg[b.gc],e);return e}
function Yu(a,b,c,d,e){if(b.gc<b.qh){if(av||b.$a[b.gc]!==d)e&&!r(a)||t(a,c,d,e,"CRTC."+b.cg[b.gc]),b.$a[b.gc]=d;if(b.gc==ds||b.gc==cs)Tu(a,b),b.Gf=b.gi;(9==b.gc&&8!=b.Dg||b.gc==Ls&&223==d)&&It(a,!0);Jt(a)}}function Zu(a,b,c){var d=b.Uc;t(a,b.port+4,null,c,"MODE",d);return d}function $u(a,b,c){var d=Tu(a,b);b===a.A?(d|=b.ga&48^48,b.Ke=!1):d=(b.ga^=9)|240;b.ga=d;t(a,b.port+6,null,c,b===a.A?"STATUS1":"STATUS",d);return d}
var av=!0,Pu=1,Fu=2,wt=3,Ou=5,Nu=6,yt=7,Ju=13,Ku=14,Du=15,Eu=16,Lu=17,Mu=18,Gu=19,Hu=20,Iu=21,Cu=255,st=60,qu=1,Qt=3,ft=qu,ct=Qt,pq=5,rq=7,Zs={mda:[ft,yt],cga:[ct,wt],ega:[pq,wt],vga:[rq,wt]},ws={2:{vg:15700,ug:208,Bg:85,Cg:96}};ws[cm]={vg:18432,ug:364,Bg:85,Cg:96};ws[4]={vg:21850,ug:364,Bg:85,Cg:96};ws[7]={vg:16700,ug:480,Bg:85,Cg:83};var xt={6:[1,cm,!0],7:[2,cm,!0],8:[6,cm,!0],9:[4,cm,!0],10:[cm,1,!0],11:[cm,2,!0],0:[1,cm,!1],1:[2,cm,!1],2:[6,cm,!1],3:[4,cm,!1],4:[cm,1,!1],5:[cm,2,!1]},$s=[];
$s[Pu]=[40,25,1,0,Qt];$s[wt]=[80,25,1,0,Qt];$s[4]=[320,200,8,192];$s[Nu]=[640,200,16,192];$s[yt]=[80,25,1,0,qu];$s[Ju]=[320,200,8];$s[Ku]=[640,200,8];$s[Du]=[640,350,8];$s[Eu]=[640,350,8];$s[Lu]=[640,480,8];$s[Mu]=[640,480,8];$s[Gu]=[320,200,1];$s[Hu]=[320,240,4];$s[Iu]=[320,400,4];$s[0]=$s[Pu];$s[Fu]=$s[wt];$s[Ou]=$s[4];
var Ft=0,Dt=7,Ht=8,Et=0,Gt=112,Ct=128,Su=256,yu=512,su=[[0,0,0,255],[127,192,127,255],[127,192,127,255],[127,255,127,255],[127,255,127,255]],tu=[0,1,2,2,2,2,2,2,0,3,4,4,4,4,4,4],Lt=[[0,0,0,255],[0,0,170,255],[0,170,0,255],[0,170,170,255],[170,0,0,255],[170,0,170,255],[170,85,0,255],[170,170,170,255],[85,85,85,255],[85,85,255,255],[85,255,85,255],[85,255,255,255],[255,85,85,255],[255,85,255,255],[255,255,85,255],[255,255,255,255]],Nt=[2,4,6],Mt=[3,5,Dt],Ot=[0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63],
Ys=[0,255,65280,65535,16711680,16711935,16776960,16777215,-16777216,-16776961,-16711936,-16711681,-65536,-65281,-256,-1],Vu=[0];Vu[128]=1;Vu[32768]=2;Vu[32896]=3;Vu[8388608]=4;Vu[8388736]=5;Vu[8421376]=6;Vu[8421504]=7;Vu[-2147483648]=8;Vu[-2147483520]=9;Vu[-2147450880]=10;Vu[-2147450752]=11;Vu[-2139095040]=12;Vu[-2139094912]=13;Vu[-2139062272]=14;Vu[-2139062144]=15;var Zr=[];Zr[ft]=["MDA",948,720896,4096,0,cm];Zr[ct]=["CGA",980,753664,16384,0,2];Zr[pq]=["EGA",980,753664,16384,65536,4];
Zr[rq]=["VGA",980,753664,16384,262144,7];
var at=0,pt=1,ot=2,nt=3,vt=[[1036,1038,1033],[1037,1032,1039],[1035,1040,1034]],dt={948:Q.prototype.Wm,949:Q.prototype.Vm,952:Q.prototype.Xm,954:Q.prototype.Ym},et={948:Q.prototype.Ko,949:Q.prototype.Jo,952:Q.prototype.Lo},gt={980:Q.prototype.Am,981:Q.prototype.zm,984:Q.prototype.Bm,985:Q.prototype.ym,986:Q.prototype.Cm},ht={980:Q.prototype.no,981:Q.prototype.mo,984:Q.prototype.oo,985:Q.prototype.lo},it={960:Q.prototype.qm,961:Q.prototype.Kl,962:Q.prototype.hn,964:Q.prototype.fn,965:Q.prototype.en,
974:Q.prototype.Pm,975:Q.prototype.Om},jt={954:Q.prototype.Mk,960:Q.prototype.Lk,961:Q.prototype.Lk,962:Q.prototype.Mo,964:Q.prototype.So,965:Q.prototype.Ro,970:Q.prototype.Fo,972:Q.prototype.Eo,974:Q.prototype.Do,975:Q.prototype.Co,986:Q.prototype.Mk},kt={963:Q.prototype.jn,966:Q.prototype.Hm,967:Q.prototype.Im,969:Q.prototype.Gm,970:Q.prototype.kn,972:Q.prototype.mn},lt={963:Q.prototype.Uo,966:Q.prototype.to,967:Q.prototype.uo,968:Q.prototype.vo,969:Q.prototype.so};
gb(function(){for(var a=Cb(document,"pcx86","video"),b=0;b<a.length;b++){var c=a[b],d=Db(c),e=document.createElement("canvas");if(void 0===e||!e.getContext){c.innerHTML="<br/>Missing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.height="auto";0<=Ra().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height=(a.clientWidth*d/c|0)+"px"}}(c,
e,d.screenWidth,d.screenHeight),c.onresize(null));var f=+($a("aspect")||d.aspect);f&&.3<=f&&3.33>=f&&(eb("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");Xa("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d");d=new Q(d,e,g,f,c);Bb(d,c)}});
function bv(a){sb.call(this,"ParallelPort",a,4194304);this.H=a.adapter;switch(this.H){case 1:this.D=956;this.C=7;break;case 2:this.D=888;this.C=7;break;case 3:this.D=632;this.C=5;break;default:nb("Unrecognized parallel adapter #"+this.H);return}this.A=this.B=null;a=a.binding;"console"==a?this.B="":zb(this,a,cv)}ia(bv,sb);l=bv.prototype;l.Fb=function(a,b,c){switch(b){case cv:return this.ma[b]=this.A=c,!0}return!1};
l.tc=function(a,b,c,d){this.oa=b;this.G=c;this.ca=d;this.V=ec(a,"ChipSet");Tc(b,this,dv,this.D);Xc(b,this,ev,this.D);Sb(this)};l.$b=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Zb=function(a){return a?this.save():!0};l.reset=function(){fv(this)};l.save=function(){var a=new eg(this),b=0,c=[];c[b++]=this.F;c[b++]=this.Ab;c[b]=this.lf;a.set(0,c);return a.data()};l.restore=function(a){return fv(this,a[0])};
function fv(a,b){var c=0;void 0===b&&(b=[0,gv,0]);a.F=b[c++];a.Ab=b[c++];a.lf=b[c];return!0}l.Jm=function(a,b){var c=this.F;t(this,a,null,b,"DATA",c);return c};l.gn=function(a,b){var c=this.Ab;this.Ab|=hv;this.Ab&=~iv;t(this,a,null,b,"STAT",c);jv(this);return c};l.Fm=function(a,b){var c=this.lf;t(this,a,null,b,"CTRL",c);return c};
l.wo=function(a,b,c){var d=this;t(this,a,b,c,"DATA");this.F=b;de(this.G,function(){var a=b,c=!1;Wb(d,"transmitByte("+va(a)+")");if(d.A)13!=a&&(8==a?d.A.value=d.A.value.slice(0,-1):(128<=a&&(a=160>a?a-128:224>a?42:32),d.A.value+=Ea(a),d.A.scrollTop=d.A.scrollHeight)),c=!0;else if(null!=d.B){if(10==a||1024<=d.B.length)d.O(d.B),d.B="";10!=a&&(d.B+=String.fromCharCode(a));c=!0}return c?(d.Ab=d.Ab|iv|gv,d.Ab&=~hv,!0):!1});jv(this)};l.ro=function(a,b,c){t(this,a,b,c,"CTRL");this.lf=b;jv(this)};
function jv(a){a.V&&a.C&&(a.lf&kv&&!(a.Ab&hv)?qh(a.V,a.C):oh(a.V,a.C))}var cv="buffer",gv=8,hv=64,iv=128,kv=16,dv={0:bv.prototype.Jm,1:bv.prototype.gn,2:bv.prototype.Fm},ev={0:bv.prototype.wo,2:bv.prototype.ro};gb(function(){for(var a=Cb(document,"pcx86","parallel"),b=0;b<a.length;b++){var c=a[b],d=Db(c);d=new bv(d);Bb(d,c)}});
function lv(a){sb.call(this,"SerialPort",a,8388608);this.ha=a.adapter;switch(this.ha){case 1:this.ea=1016;this.N=4;break;case 2:this.ea=760;this.N=3;break;default:nb("Unrecognized serial adapter #"+this.ha);return}this.C=this.K=null;this.pa=a.tabSize||0;this.la=a.charBOL||0;this.L=this.qa=0;this.ra=mv|nv;this.P=!0;a=a.binding;"console"==a?this.K="":zb(this,a,ov);this.H=this.ba=this.U=null;this.exports={connect:this.Aj,receiveData:this.Ye,receiveStatus:this.Jl}}ia(lv,sb);l=lv.prototype;
l.Yi=function(a,b,c){var d=null;a!=this.ze||this.H||(this.H=b,this.U=c,this.P=!1,d=this);return d};l.Fb=function(a,b,c){var d=this;switch(b){case ov:return this.ma[b]=this.C=c,this.C.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),d.Ye(b);return!0},this.C.onkeypress=function(a){a=a||window.event;d.Ye(a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},this.C.removeAttribute("readonly"),!0}return!1};
l.tc=function(a,b,c,d){this.na=a;this.oa=b;this.G=c;this.ca=d;var e=this;this.ta=Fd(this.G,this.id+".receive",function(){e.Ye()});this.wa=Fd(this.G,this.id+".transmit",function(){e.A=e.A|pv|qv});this.V=ec(a,"ChipSet");Tc(b,this,rv,this.ea);Xc(b,this,sv,this.ea);Sb(this)};
l.Aj=function(a){if(!this.H){var b=Ed(this.na,"connection");if(b){var c=b.split("->");if(2==c.length){var d=Da(c[0]);if(d!=this.ze)return;c=Da(c[1]);if(this.H=Fb(c)){var e=this.H.exports;if(e){var f=e.connect;f&&f.call(this.H,this.P);if(this.ba=e.receiveData){this.P=a;this.U=e.receiveStatus;this.status("Connected "+this.de+"."+d+" to "+c);return}}}}this.status("Unable to establish connection: "+b)}}};
l.$b=function(a,b){if(!b)if(this.Aj(this.P),!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Zb=function(a){return a?this.save():!0};l.reset=function(){tv(this)};l.save=function(){var a=new eg(this),b=0,c=[];c[b++]=this.fa;c[b++]=this.ka;c[b++]=this.I;c[b++]=this.M;c[b++]=this.F;c[b++]=this.D;c[b++]=this.Z;c[b++]=this.A;c[b++]=this.B;c[b]=this.J;a.set(0,c);return a.data()};l.restore=function(a){return tv(this,a[0])};
function tv(a,b){var c=0;void 0===b&&(b=[0,0,uv,0,vv,0,0,pv|qv,a.ra,[]]);a.fa=b[c++];a.ka=b[c++];a.I=b[c++];a.M=b[c++];a.F=b[c++];a.D=b[c++];a.Z=b[c++];a.A=b[c++];a.B=b[c++];a.J=b[c];return!0}l.Ye=function(a){if(null!=a)if("number"==typeof a)this.J.push(a);else if("string"==typeof a)for(var b=0;b<a.length;b++)this.J.push(a.charCodeAt(b));else this.J=this.J.concat(a);wv(this);return!0};
l.Jl=function(a){var b=this.B;this.B&=~(mv|nv);a&32&&(this.B=this.B|mv|xv);a&64&&(this.B=this.B|nv|yv);b!=this.B&&zv(this)};function wv(a){0<a.J.length&&!(a.A&Av)&&(a.fa=a.J.shift(),a.A|=Av,a.J.length&&a.G&&Sd(a.G,a.ta,1E3/(1843200/((a.I||1)<<7))|0));zv(a)}l.dn=function(a,b){var c=this.D&Bv?this.I&255:this.fa;t(this,a,null,b,this.D&Bv?"DLL":"RBR",c);this.A&=~Av;wv(this);return c};l.Qm=function(a,b){var c=this.D&Bv?this.I>>8:this.M;t(this,a,null,b,this.D&Bv?"DLM":"IER",c);return c};
l.Rm=function(a,b){var c=this.F;this.F|=vv;t(this,a,null,b,"IIR",c);return c};l.Sm=function(a,b){var c=this.D;t(this,a,null,b,"LCR",c);return c};l.Um=function(a,b){var c=this.Z;t(this,a,null,b,"MCR",c);return c};l.Tm=function(a,b){var c=this.A;t(this,a,null,b,"LSR",c);return c};l.Zm=function(a,b){var c=this.B;this.B&=~(xv|yv);t(this,a,null,b,"MSR",c);return c};
l.To=function(a,b,c){var d=this;t(this,a,b,c,this.D&Bv?"DLL":"THR");this.D&Bv?this.I=this.I&-256|b:(this.ka=b,this.A&=~(pv|qv),de(this.G,function(){var a=!1;Wb(d,"transmitByte("+va(b)+")");d.ba&&d.ba.call(d.H,b)&&(a=!0);if(d.C){if(13==b)d.L=0;else if(8==b)d.C.value=d.C.value.slice(0,-1),0<d.L&&d.L--;else{a=Ea(b);var c=a.length;32>b&&1==c&&(c=0);9==b&&(c=d.pa||8,c-=d.L%c,d.pa&&(a=Ca("",c)));!d.L&&c&&(10!=d.qa&&(a="\n"+a),d.la&&(a=String.fromCharCode(d.la)+a));d.C.value+=a;d.C.scrollTop=d.C.scrollHeight;
d.L+=c}d.qa=b;a=!0}else if(null!=d.K){if(10==b||1024<=d.K.length)d.O(d.K),d.K="";10!=b&&(d.K+=String.fromCharCode(b));a=!0}return a}),Sd(this.G,this.wa,1E3/(1843200/((this.I||1)<<7))|0),zv(this))};l.Go=function(a,b,c){t(this,a,b,c,this.D&Bv?"DLM":"IER");this.D&Bv?this.I=this.I&255|b<<8:this.M=b};l.Ho=function(a,b,c){t(this,a,b,c,"LCR");this.D=b};
l.Io=function(a,b,c){var d=b^this.Z;t(this,a,b,c,"MCR");this.Z=b;d&(Cv|Dv)&&this.U&&(a=0,this.P?(a|=b&Dv?32:0,a|=b&Cv?320:0):(a|=b&Dv?16:0,a|=b&Cv?1048576:0),this.U.call(this.H,a))};function zv(a){var b=-1;a.A&Av&&a.M&Ev?b=Fv:a.A&pv&&a.M&Gv?b=Hv:a.B&(xv|yv)&&a.M&Iv&&(b=Jv);0<=b?(a.F&=~(vv|Kv),a.F|=b,a.V&&a.N&&qh(a.V,a.N,100)):(a.F|=vv,a.V&&a.N&&oh(a.V,a.N))}
var ov="buffer",uv=384,Ev=1,Gv=2,Iv=8,vv=1,Fv=4,Hv=2,Jv=0,Kv=6,Bv=128,Cv=1,Dv=2,Av=1,pv=32,qv=64,xv=1,yv=2,mv=16,nv=32,rv={0:lv.prototype.dn,1:lv.prototype.Qm,2:lv.prototype.Rm,3:lv.prototype.Sm,4:lv.prototype.Um,5:lv.prototype.Tm,6:lv.prototype.Zm},sv={0:lv.prototype.To,1:lv.prototype.Go,3:lv.prototype.Ho,4:lv.prototype.Io};gb(function(){for(var a=Cb(document,"pcx86","serial"),b=0;b<a.length;b++){var c=a[b],d=Db(c);d=new lv(d);Bb(d,c)}});
function Lv(a){sb.call(this,"Mouse",a,16777216);this.V=a.serial||a.binding;this.Z=a.type||(this.V?Mv:Nv);this.U=this.Z==Mv?"SerialPort":null;this.F=null;this.K=a.scaleMouse;this.rc=this.P=this.N=!1;this.H=[];this.D=[]}ia(Lv,sb);l=Lv.prototype;l.tc=function(a,b,c,d){this.na=a;this.oa=b;this.G=c;this.ca=d;this.K=Ed(a,"scaleMouse")||this.K;for(c=null;c=ec(a,"Video",c);)this.H.push(c);this.Z==Nv&&(Tc(b,this,Ov,Pv),Xc(b,this,Qv,Pv));Sb(this)};
l.$b=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.U&&!this.F){for(a=null;(a=ec(this.na,this.U,a))&&(!a.Yi||!(this.F=a.Yi(this.V,this,this.Il))););if(this.F)for(this.D=[],a=0;a<this.H.length;a++)b=this.H[a],b.H=this,(b=b.F)&&this.D.push(b);else nb(this.id+": "+this.U+" "+this.V+" unavailable")}this.rc?Rv(this):Sv(this)}return!0};l.Zb=function(a){return a?this.save():!0};l.reset=function(){Tv(this)};
l.save=function(){var a=new eg(this),b=0,c=[];c[b++]=this.rc;c[b++]=this.A;c[b++]=this.B;c[b++]=this.I;c[b++]=this.J;c[b++]=this.L;c[b++]=this.M;c[b]=this.C;a.set(0,c);return a.data()};l.restore=function(a){return Tv(this,a[0])};function Tv(a,b){var c=0;void 0===b&&(b=[!1,-1,-1,0,0,!1,!1,0]);var d=b[c++];a.rc=d;a.A=b[c++];a.B=b[c++];a.I=b[c++];a.J=b[c++];a.L=b[c++];a.M=b[c++];a.C=b[c];a.C&(Cv|Dv)&&(a.C=(a.C&Cv?1048576:0)|(a.C&Dv?16:0));return!0}l.Hf=function(a){this.N=a};
function Rv(a){if(!a.P)for(var b=0;b<a.D.length;b++)Uv(a,a.D[b])&&(a.P=!0)}function Sv(a){if(a.P)for(var b=0;b<a.D.length;b++){var c=a.D[b];c&&(c.style.cursor="auto")}}function Uv(a,b){return b?(b.addEventListener("mousemove",function(b){Vv(a,b)},!1),b.addEventListener("mousedown",function(b){Vv(a,b,!0)},!1),b.addEventListener("mouseup",function(b){Vv(a,b,!1)},!1),b.style.cursor="none",!0):!1}
function Vv(a,b,c){if(void 0!==c){var d;!(d=!1!==a.N)&&(d=a.H.length)&&(d=a.H[0],d=d.Pd?d.ne(!0):!1);d||(a.N=null);a.Xd(b.button,c)}else{if(0>a.A||0>a.B)a.A=b.screenX,a.B=b.screenY;a.N?(c=b.movementX||b.mozMovementX||b.webkitMovementX||0,d=b.movementY||b.mozMovementY||b.webkitMovementY||0):(c=b.screenX-a.A,d=b.screenY-a.B);a.A=b.screenX;a.B=b.screenY;a.tf(c,d,a.A,a.B)}}
l.Xd=function(a,b){if(this.rc&&this.G&&this.G.aa.Xa){var c="mouse button"+a+" "+(b?"dn":"up");switch(a){case ut:if(this.L!=b){this.L=b;Wv(this,c);return}break;case Xv:if(this.M!=b){this.M=b;Wv(this,c);return}}Wb(this,c+": ignored")}};
l.tf=function(a,b,c,d){this.rc&&this.G&&this.G.aa.Xa&&(a=Math.round(Math.abs(a)*this.K)*Math.sign(a)||Math.sign(a),b=Math.round(Math.abs(b)*this.K)*Math.sign(b)||Math.sign(b),a||b)&&(r(this,16777216)&&Wb(this,"moveMouse("+a+","+b+")"),this.I=a,this.J=b,Wv(this,null,c,d))};
function Wv(a,b,c,d){var e=64|(a.L?32:0)|(a.M?16:0)|(a.J&192)>>4|(a.I&192)>>6,f=a.I&63,g=a.J&63;r(a,8388608)&&Wb(a,(b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+va(e)+","+va(f)+","+va(g)+"]",0,!0);a.F.Ye([e,f,g]);a.I=a.J=0}
l.Il=function(a){var b=1048592==(a&1048592);if(b){if(!this.rc){var c=!1;this.C&16||(this.reset(),Wb(this,"serial mouse reset"),c=!0);this.C&1048576||(Wb(this,"serial mouse ID requested"),c=!0);c&&(this.F.Ye([Yv,Yv]),Wb(this,"serial mouse ID sent"));Rv(this);this.rc=b}}else this.rc&&(Wb(this,"serial mouse inactive"),Sv(this),this.rc=b);this.C=a};l.wm=function(a,b){t(this,a,null,b,"DATA",0);return 0};l.xm=function(a,b){t(this,a,null,b,"TPPI",0);return 0};
l.vm=function(a,b){t(this,a,null,b,"CTRL",0);return 0};l.um=function(a,b){t(this,a,null,b,"CPPI",0);return 0};l.jo=function(a,b,c){t(this,a,b,c,"DATA")};l.ko=function(a,b,c){t(this,a,b,c,"TPPI")};l.io=function(a,b,c){t(this,a,b,c,"CTRL")};l.ho=function(a,b,c){t(this,a,b,c,"CPPI")};var Nv="bus",Mv="serial",ut=0,Xv=2,Pv=572,Ov={0:Lv.prototype.wm,1:Lv.prototype.xm,2:Lv.prototype.vm,3:Lv.prototype.um},Qv={0:Lv.prototype.jo,1:Lv.prototype.ko,2:Lv.prototype.io,3:Lv.prototype.ho},Yv=77;
gb(function(){for(var a=Cb(document,"pcx86","mouse"),b=0;b<a.length;b++){var c=a[b],d=Db(c);d=new Lv(d);Bb(d,c)}});function Zv(a,b,c){sb.call(this,"Disk",{id:a.de+".disk"+p(++$v,4)},2097152);this.controller=a;this.Da=a.Da;this.O=a.O;this.na=a.na;this.ca=a.ca;this.B=b;this.kd=b.name;this.Ne=b.Ne;this.lg=this.D=!1;this.create(c,b.sb,b.gb,b.Wa,b.Na);this.I=[];this.L=[];this.F=null;this.N=0;this.M=!1;Sb(this)}ia(Zv,sb);l=Zv.prototype;l.tc=function(a,b,c,d){this.ca=d};
l.$b=function(a,b){b||!this.lg||this.D||(Sb(this,!1),this.load(this.kd,this.H,null,this.Yl,this));return!0};l.Yl=function(){Sb(this,!0)};
l.Zb=function(a,b){if(this.D){var c,d=0;if(this.M&&!wb("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=aw(this,!1);)if(d=c[0]){this.Da('Unable to save "'+this.kd+'" (error '+d+")");break}b&&this.D&&(b="action=close&volume="+this.H,b+="&machine="+bw(this.controller),b+="&user="+cw(this.controller),Pa(Qa()+"/api/v1/disk?"+b,null,!0),this.D=!1);!d&&a&&this.Da(this.kd+" saved")}return!0};
l.create=function(a,b,c,d,e){this.mode=a;this.sb=b;this.gb=c;this.Wa=d;this.Na=e;this.A=[];if("preload"!=this.mode){a=Array(this.sb);for(b=0;b<a.length;b++){c=Array(this.gb);for(d=0;d<c.length;d++){e=Array(this.Wa);for(var f=1;f<=e.length;f++)e[f-1]=dw(null,b,d,f,this.Na,"local"==this.mode?0:null);c[d]=e}a[b]=c}this.A=a}this.K=null};
l.load=function(a,b,c,d,e){var f=b;if(this.J)return!0;this.kd=a;this.H=b;this.Hg=xa(b);var g=this;this.J=d;this.P=e||this.controller;if(c){var h=new FileReader;h.onload=function(){var a=h.result,b=a?a.byteLength:0,c=ma[b];if(c){g.sb=c[0];g.gb=c[1];g.Wa=c[2];g.Na=c[3]||512;var d=g.Na>>2;var e=c=0;a=new DataView(a,0,b);g.A=Array(g.sb);for(b=0;b<g.A.length;b++)for(var f=g.A[b]=Array(g.gb),k=0;k<f.length;k++)for(var G=f[k]=Array(g.Wa),P=0;P<G.length;P++){for(var I=dw(null,b,k,P+1,g.Na,0),pa=I.data,Z=
0;Z<d;Z++,e+=4){var ib=pa[Z]=a.getInt32(e,!0);c=c+ib&-1}I.Nc=d;G[P]=I}g.K=c;d=g}else g.Da("Unrecognized disk format ("+b+" bytes)");g.J&&(g.J.call(g.controller,g.B,d,g.kd,g.H),g.J=null)};h.readAsArrayBuffer(c);return!0}0>b.indexOf("/api/v1/dump")&&(a=ya(b),"json"==a||"gz"==a?f=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(f=ew(this,b),this.lg=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):
za(b,"/")&&(c="dir"),f=Qa()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.Ne?"":d)+"&format=json"));var k="Loading "+f+"...";return!!Pa(f,null,!0,function(a,b,c){fw(g,a,b,c)},function(){g.O(k,Ob)})};
function fw(a,b,c,d){var e=null;a.Qe=!1;var f=!(!(0>d&&a.na)||a.na.aa.ac);if(a.lg)d?a.Da('Unable to connect to disk "'+a.H+'" (error '+d+": "+c+")",f):(a.D=!0,gw(a),e=a);else if(d)a.Da('Unable to load disk "'+a.kd+'" (error '+d+": "+b+")",f);else{ub(a.controller.de,b,c);try{if(0<xa(a.Hg,!0).toLowerCase().indexOf("-readonly"))a.Qe=!0;else{var g=c.indexOf("\n");0<g&&1024>g&&0<c.substring(0,g).indexOf("write-protected")&&(a.Qe=!0)}var h;"<"==c.charAt(0)?h=["Missing disk image: "+a.kd]:h=0>c.indexOf("0x")&&
'["'!=c.substr(0,2)?JSON.parse(c.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+c+")");if(h.length)if(1==h.length)nb(h[0]);else{a.sb=h.length;a.gb=h[0].length;a.Wa=h[0][0].length;var k=h[0][0][0];a.Na=k&&k.length||512;for(d=c=0;d<a.sb;d++)for(f=0;f<a.gb;f++)for(g=0;g<a.Wa;g++)if(k=h[d][f][g]){var m=k.length;void 0===m&&(m=k.length=512);m>>=2;var q=k.pattern;void 0===q&&(q=k.pattern=0);var v=k.data;if(void 0===v){var u=k.bytes;if(void 0!==u&&u.length){for(var A=m<<2,J=u.length;J<
A;J++)u[J]=q;hw(k,u,0)}else k.data=v=[],u&&(k.pattern=q|q<<8|q<<16|q<<24);delete k.bytes}dw(k,d,f);for(A=0;A<v.length;A++)c=c+v[A]&-1}a.A=h;a.K=c;gw(a);e=a}else nb("Empty disk image: "+a.kd)}catch(H){nb("Disk image error ("+b+"): "+H.message)}}a.J&&(a.J.call(a.P,a.B,e,a.kd,a.H),a.J=null)}
function gw(a){var b,c={},d;if(a.C&&a.C.length){var e=a.A;for(b=0;b<e.length;b++)for(var f=0;f<e[b].length;f++)for(d=0;d<e[b][f].length;d++){var g=e[b][f][d];g&&(delete g.file,delete g.Qn)}}a.C=[];c.Jf=c.sf=0;e=a.sb*a.gb*a.Wa*a.Na;a.D&&a.log("ignore any synchronous XMLHttpRequest warnings here (for now)");if(d=iw(a,0)){c.Na=jw(a,d,11,2);if(c.Na!=a.Na){f=!1;c.rf=1;c.tg=12;c.nh=c.rf+2;c.wf=1;c.Na=a.Na;if(163840==e&&254==kw(a,c,0,0))c.sf=320,c.wh=64,f=!0;else if(327680==e&&255==kw(a,c,0,0))c.sf=640,
c.wh=112,c.wf++,f=!0;else for(b=446,e=0;4>e;e++){if(128==jw(a,d,b+0,1)){c.Jf=jw(a,d,b+8,4);(d=iw(a,c.Jf))&&(f=!0);break}b+=16}if(!f)return}c.sf||(c.sf=jw(a,d,19,2)||jw(a,d,32,4),c.rf=jw(a,d,14,2),c.nh=c.rf+jw(a,d,22,2)*jw(a,d,16,1),c.wh=jw(a,d,17,2),c.wf=jw(a,d,13,1));c.lh=c.nh+((32*c.wh+(c.Na-1))/c.Na|0);c.In=(c.sf-c.lh)/c.wf|0;c.tg=4084>=c.In?12:16;c.dm=12==c.tg?4086:65526;e=[];for(d=c.nh;d<c.lh;d++)e.push(c.Jf+d);lw(a,c,a.Hg,"",e);for(e=0;e<a.C.length;e++){c=a.C[e];for(d=b=0;d<c.ge.length;d++){var h=
g=f=void 0,k=c.ge[d],m=b,q=a.gb*a.Wa,v=k%q,u=v/a.Wa|0;v%=a.Wa;(h=a.A[k/q|0])&&(g=h[u])&&(f=g[v])&&!f.file&&(f.file=c,f.Qn=m);b+=a.Na}d=c;if((za(d.hc,".EXE")||za(d.hc,".DLL")||za(d.hc,".DRV"))&&mw(d,nw)==ow&&mw(d,pw)==qw&&(b=mw(d,rw),mw(d,sw,b)==tw)){k=mw(d,uw,b);g=mw(d,vw,b);h=mw(d,ww,b);if(g&&k){c=d;f=g+b;g=k;h=h||0;k=1;c.fe=[];for(c.A=[];g--;){if(m=xw(c,f)<<h)q=xw(c,f+2)||65536,c.fe[k++]={Rn:m,Pn:m+q-1,kf:[]};f+=8}c.fe[254]={Rn:0,Pn:0,kf:[]}}g=mw(d,yw,b);h=mw(d,zw,b);if(g&&h)for(c=d,f=g+=b,g+=h,
h=1;f<g;){m=xw(c,f);k=m&255;if(!k)break;m>>=8;f+=2;if(m)for(;k--;)xw(c,f,1),254>=m?(q=m,u=xw(c,f+1),f+=3):(q=xw(c,f+3,1),u=xw(c,f+4),f+=6),c.fe[q]&&(c.fe[q].kf[h]=[u]),c.A[h]=[q,u],h++;else h+=k}(g=mw(d,Aw,b))&&Bw(d,g+b);g=mw(d,Cw,b);h=mw(d,Dw,b);g&&h&&Bw(d,g,g+h)}}}}
function lw(a,b,c,d,e){var f=a.C.length,g=b.Na/32|0;b.sq=d+"\\";for(var h=0;h<e.length;h++)for(var k=e[h],m=0;m<g;m++){var q=a,v=b;var u=m;v.ce&&v.ii&&v.ii==k||(v.ii=k,v.ce=iw(q,v.ii));if(v.ce){u*=32;var A=jw(q,v.ce,u,1);if(0==A)u=!1;else{if(229==A)v.hc=null;else{v.hc=Da(Ew(q,v.ce,u+0,8));A=Da(Ew(q,v.ce,u+8,3));A.length&&(v.hc+="."+A);v.Xg=jw(q,v.ce,u+11,1);v.cj=jw(q,v.ce,u+28,2);v.cm=jw(q,v.ce,u+26,2);u=v;A=[];var J=v.cm;if(J){do{if(2>J)break;for(var H=v.lh+(J-2)*v.wf,G=0;G<v.wf;G++)A.push(v.Jf+
H++);J=kw(q,v,J,0)|kw(q,v,J,1)}while(J<=v.dm)}u.ge=A}u=!0}}else u=!1;if(!u){h=e.length;break}null!=b.hc&&"."!=b.hc&&".."!=b.hc&&(u=new Fw(a,b.hc,b.Xg,b.cj,b.ge),a.C.push(u))}for(e=a.C.length;f<e;f++)u=a.C[f],u.Xg&16&&u.ge.length&&lw(a,b,c,d+"\\"+u.hc,u.ge)}function kw(a,b,c,d){var e=0,f=8*b.Na;c=b.tg*c+(d?8:0);var g=c/f|0;b.mi&&b.mh&&b.mh==b.rf+g||(b.mh=b.rf+g,b.mi=iw(a,b.Jf+b.mh));b.mi&&(c=c%f|0,e=jw(a,b.mi,c>>3,1),d?e=16==b.tg?e<<8:c&7?e<<4:(e&15)<<8:c&7&&(e>>=4));return e}
function iw(a,b){var c=a.gb*a.Wa,d=b/c|0;return d<a.sb?(b%=c,a.seek(d,b/a.Wa|0,b%a.Wa+1)):null}function jw(a,b,c,d){for(var e=0,f=0;d--;){var g=a.read(b,c++);if(0>g)break;e|=g<<f;f+=8}return e}function Ew(a,b,c,d){for(var e="";d--;){var f=a.read(b,c++);if(0>=f)break;e+=String.fromCharCode(f)}return e}function dw(a,b,c,d,e,f){a||(a={sector:d,length:e,data:[],pattern:f});a.em=b;a.fm=c;a.hd=a.Nc=0;a.Oa=!1;return a}
function ew(a,b){b="action=open&volume="+b+("&mode="+a.mode);b+="&chs="+a.sb+":"+a.gb+":"+a.Wa+":"+a.Na;b+="&machine="+bw(a.controller);b+="&user="+cw(a.controller);return Qa()+"/api/v1/disk?"+b}
function Gw(a,b,c,d,e,f,g){if(a.D){var h="action=read&volume="+a.H;h+="&chs="+a.sb+":"+a.gb+":"+a.Wa+":"+a.Na;h=h+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+bw(a.controller));h+="&user="+cw(a.controller);Pa(Qa()+"/api/v1/disk?"+h,null,f,function(h,m,q){h=[b,c,d,e,f,g];var k=!1,u=h[0],A=h[1],J=h[2],H=h[3];if(!q){m=JSON.parse(m);for(k=0;H--;){var G=a.seek(u,A,J,!0);if(!G)break;hw(G,m,k);k+=G.length;J++}k=h[4]}(h=h[5])&&h(q,k)})}else g&&g(-1,!1)}
function Hw(a,b,c,d,e,f,g){if(a.D){var h={};a.M=!0;h.action="write";h.volume=a.H;h.chs=a.sb+":"+a.gb+":"+a.Wa+":"+a.Na;h.addr=b+":"+c+":"+d+":"+e;h.machine=bw(a.controller);h.user=cw(a.controller);h.data=JSON.stringify(f);Pa(Qa()+"/api/v1/disk",h,g,function(f,h,q){var k=[b,c,d,e,g];f=k[0];h=k[1];var m=k[2],A=k[3];k=k[4];a.M=!1;if(0<=f&&f<a.A.length&&0<=h&&h<a.A[f].length)for(--m;0<A--&&0<=m&&m<a.A[f][h].length;m++){var J=a.A[f][h][m];q?Iw(a,J,!1):J.Oa||(J.hd=J.Nc=0)}k&&Jw(a)})}return!1}
function Iw(a,b,c){b.Oa=!0;var d=a.I.indexOf(b);0<=d&&(a.I.splice(d,1),a.L.splice(d,1));a.I.push(b);a.L.push(Oa());c&&Jw(a)}function Jw(a){if(a.I.length){var b=a.L[0]+2E3;a.F&&a.N<b&&(clearTimeout(a.F),a.F=null);if(!a.F){var c=Oa();b-=c;0>b&&(b=0);2E3<b&&(b=2E3);a.F=setTimeout(function(){aw(a,!0)},b);a.N=c+b}}else a.F&&(clearTimeout(a.F),a.F=null)}
function aw(a,b){b&&(a.F=null);var c=a.I[0];if(c){var d=c.em,e=c.fm;c=c.sector;for(var f=0,g=[],h=c-1;h<a.A[d][e].length;h++){var k=a.A[d][e][h];if(!k.Oa)break;var m=a.I.indexOf(k);a.I.splice(m,1);a.L.splice(m,1);g=g.concat(Kw(k));k.Oa=!1;f++}a=Hw(a,d,e,c,f,g,b);return b||a}return!1}l.info=function(){return this.A.length?[this.A.length,this.A[0].length,this.A[0][0].length,this.A[0][0][0].length]:[0,0,0,0]};
l.seek=function(a,b,c,d,e){var f=null,g=this.B,h=this.A[a];if(h){var k=h[b];if(!k&&g.Zg&&b<g.gb){k=h[b]=Array(g.Vd);for(h=0;h<k.length;h++)k[h]=dw(null,a,b,h+1,g.yb,0);this.gb<=b&&(this.gb=b+1)}if(k){for(h=0;h<k.length;h++)if(k[h]&&k[h].sector==c){f=k[h];if(null===f.pattern)if(d)f.pattern=0;else{for(d=1;++h<k.length;)null===k[h].pattern&&d++;Gw(this,a,b,c,d,!!e,function(a,b){a&&(f=null);e&&e(f,b)});return e?null:f}break}!f&&g.Zg&&9==g.jb&&(f=k[h]=dw(null,a,b,g.jb,g.yb,0),this.Wa<g.jb&&(this.Wa=g.jb))}}e&&
e(f,!1);return f};function hw(a,b,c){for(var d=a.length>>2,e=Array(d),f=0;f<d;f++)e[f]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e}function Kw(a){var b=a.length,c=Array(b),d=0;b>>=2;var e=a.data;a=a.pattern;for(var f=0;f<b;f++){var g=f<e.length?e[f]:a;c[d++]=g&255;c[d++]=g>>8&255;c[d++]=g>>16&255;c[d++]=g>>24&255}return c}l.read=function(a,b){var c=-1;if(a&&b<a.length){c=a.data;var d=b>>2;c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255}return c};
l.write=function(a,b,c){if(this.Qe)return!1;if(b<a.length){if(c!=this.read(a,b,!0)){var d=a.data,e=a.pattern,f=b>>2;b=(b&3)<<3;for(var g=d.length;g<=f;g++)d[g]=e;a.Nc?f<a.hd?(a.Nc+=a.hd-f,a.hd=f):f>=a.hd+a.Nc&&(a.Nc+=f-(a.hd+a.Nc)+1):(a.hd=f,a.Nc=1);d[f]=d[f]&~(255<<b)|c<<b;this.D&&Iw(this,a,!0)}return!0}return null};function Lw(a){for(var b="",c=0,d;d=iw(a,c++);)for(var e=0,f=d.length;e<f;e++)b+=String.fromCharCode(jw(a,d,e,1));return btoa(b)}
l.save=function(){var a=0,b=[];b[a++]=[this.H,this.K,this.sb,this.gb,this.Wa,this.Na];if(!this.D&&!this.Qe)for(var c=this.A,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var f=0;f<c[d][e].length;f++){var g=c[d][e][f];if(g&&g.Nc){for(var h=[],k=0,m=g.hd,q=g.hd+g.Nc;m<q;)h[k++]=g.data[m++];b[a++]=[d,e,f,g.hd,h]}}return b};
l.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.A.length&&6<=e.length?this.create("local",e[2],e[3],e[4],e[5]):null!=e[0]&&null!=e[1]&&null!=this.K&&e[1]!=this.K&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.K+")",b=-2));for(this.A.length||(b=-1);d<a.length&&0<=b;){var f=0,g=a[d++],h=g[f++],k=g[f++],m=g[f++];if(h>=this.A.length||k>=this.A[h].length||m>=this.A[h][k].length){c="sector (CHS="+h+":"+k+":"+
m+") out of range ("+b+" changes applied)";b=-1;break}if(this.Qe){c="unable to modify write-protected disk";b=-1;break}e=g[f++];f=g[f++];g=e+f.length;if(h=this.A[h][k][m]){for(k=h.data.length;k<e;)h.data[k++]=h.pattern;k=0;h.hd=e;for(h.Nc=f.length;e<g;)h.data[e++]=f[k++];b++}}}0>b?-2!=b&&this.Da("Unable to restore disk '"+this.kd+": "+c):gw(this);return b};
function Mw(a){for(var b=0,c;c=iw(a,b++);)Nw(c);a=JSON.stringify(a.A,function(a,b){if("file"!=a)return b});a=a.replace(/,"length":512/g,"").replace(/,"pattern":0/g,"").replace(/,"data":\[]/g,"");a=a.replace(/"(sector|length|data|pattern)":/g,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/g,"");return a=a.replace(/(sector|length|data|pattern):/g,'"$1":')}function Nw(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}var $v=0;
function Fw(a,b,c,d,e){this.va=a;this.hc=b;this.Xg=c;this.cj=d;this.ge=e}function xw(a,b,c){var d;c=c||2;var e=b&511,f=iw(a.va,a.ge[b>>9]);if(f){if(e+c<=f.length)return jw(a.va,f,e,c);for(e=d=0;c--;)d|=xw(a,b++,1)<<e,e+=8}return d}function mw(a,b,c){return xw(a,b[0]+(c||0),b[1])}
function Bw(a,b,c){for(var d=0;!c||b<c;){var e=xw(a,b,1);if(!e)break;var f=a;var g=b+1,h=e,k="";for(h||(h=-1);h--;){var m=xw(f,g++,1);if(!m)break;k+=String.fromCharCode(m)}f=k;if(!f)break;b+=1+e;if(d){if(e=xw(a,b),g=a.A[e])g=g[0],a.fe[g]&&a.fe[g].kf[e].push(f)}else c||(a.li=f);b+=2;d++}}var ow=23117,nw=[0,2],pw=[24,2],rw=[60,4],qw=64,tw=17742,sw=[0,2],yw=[4,2],zw=[6,2],uw=[28,2],Dw=[32,2],vw=[34,2],Aw=[38,2],Cw=[44,4],ww=[50,2];
function Ow(a){sb.call(this,"FDC",a,524288);this.dmaRead=Ow.prototype.Cl;this.dmaWrite=Ow.prototype.Dl;this.dmaFormat=Ow.prototype.Ul;this.M=Pw(a.autoMount);this.J=a.sortBy||"name";"none"==this.J&&(this.J=null);this.B=[];this.L=!Xa("Mobi")&&window&&"FileReader"in window;this.exports={loadDisk:this.Gj,wait:this.zp}}ia(Ow,sb);l=Ow.prototype;
l.Fb=function(a,b,c){var d=this;switch(b){case "listDisks":this.ma[b]=c;if(this.J){b=[];for(a=0;a<c.options.length;a++)b.push(c.options[a]);b.sort(function(a,b){return"path"!=d.J?a.text.localeCompare(b.text):a.value.localeCompare(b.value)});for(a=0;a<b.length;a++)try{c.options[a]=b[a]}catch(e){break}}c.onchange=function(){Qw(d)};return!0;case "descDisk":case "listDrives":return this.ma[b]=c,c.onchange=function(){var a=qa(c.value,10);null!=a&&Rw(d,a)},!0;case "loadDisk":return this.ma[b]=c,c.onclick=
function(){d.Gj()},!0;case "saveDisk":if(!this.L){c.parentNode.removeChild(c);break}this.ma[b]=c;c.onclick=function(){var a=d.ma.listDrives;a&&a.options&&d.A&&((a=d.A[qa(a.value,10)||0])?(a=a.va)?(a=bb(Lw(a),"octet-stream",!0,a.Hg.replace(".json",".img")),nb(a)):d.Da("No diskette loaded in drive."):d.Da("No diskette drive selected."))};return!0;case "mountDisk":if(this.L)return this.ma[b]=c,c.onchange=function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length},c.onsubmit=function(a){if(a=
a.currentTarget[1].files[0]){var b=a.name;Sw(d,xa(b,!0),b,a)}return!1},!0;c.parentNode.removeChild(c)}return!1};l.tc=function(a,b,c,d){this.oa=b;this.G=c;this.ca=d;this.na=a;this.V=ec(a,"ChipSet");Pw(Ed(this.na,"autoMount"),this.M);Tw(this);Tc(b,this,Uw);Xc(b,this,Vw);Ww(this,"None","",!0);this.L&&Ww(this,"Local Disk","?");Ww(this,"Remote Disk","??");Xw(this)||Sb(this)};
function Pw(a,b){if(a){if("string"==typeof a)try{a=eval("("+a+")")}catch(d){nb("FDC auto-mount error: "+d.message+" ("+a+")"),a={}}}else a={};for(var c in a)b&&(b[c]=a[c]);return a}
l.$b=function(a,b){if(!b){if(!a){if(this.reset(),this.na.Z){this.B=[];for(a=0;a<this.A.length;a++)Yw(this,a,!0);Xw(this,!0)}}else if(!this.restore(a))return!1;if(a=this.ma.listDrives){for(;a.firstChild;)a.removeChild(a.firstChild);a.value="";for(b=0;b<this.N;b++){var c=document.createElement("option");c.value=b;c.text=String.fromCharCode(65+b)+":";a.appendChild(c)}0<this.N&&(a.value="0",Rw(this,0))}}return!0};l.Zb=function(a){return a?this.save():!0};l.reset=function(){Tw(this)};
l.save=function(){var a=new eg(this);a.set(0,Zw(this));return a.data()};l.restore=function(a){return Tw(this,a[0])};
function Tw(a,b){var c=0,d=!0;b||(b=[0,0,$w,Array(9),0,0,0,[]]);a.Ya=b[c++];c++;a.ga=b[c++];a.F=b[c++];a.D=b[c++];a.C=b[c++];a.I=b[c++];var e=b[c++];var f=b[c++];null!=f&&(a.B=f);void 0===a.A&&(a.N=4,a.V&&(a.N=+bm(a.V,pl,void 0)),a.A=Array(4));for(f=0;f<a.A.length;f++){var g=a.A[f];if(void 0===g){g=a.A[f]={};if(a.V)a:{var h=a.V;if(f<+bm(h,pl,void 0)){if(!h.L){h=360;break a}if(f<h.L.length){h=h.L[f];break a}}h=0}else h=0;switch(h){case 160:case 180:g.gb=1;default:g.sb=40;g.Wa=9;break;case 720:g.sb=
80;g.Wa=9;break;case 1200:g.sb=80;g.Wa=15;break;case 1440:g.sb=80,g.Wa=18}}var k=a,m=f,q=e[f],v=0;h=!0;g.Ya=m;g.le=g.Me=!1;g.Re=null;void 0===q&&(q=[ax,!0,0,2,0]);"boolean"==typeof q[1]&&(q[1]=[bx,g.sb||40,g.gb||q[3],g.Wa||9,g.Na||512,q[1],g.sg,g.yf,g.zf]);g.tb=q[v++];var u=q[v++];g.name=u[0];g.sb=u[1];g.gb=u[2];g.Wa=u[3];g.Na=u[4];g.Ne=u[5];(g.sg=u[6])?(g.yf=u[7],g.zf=u[8]):(g.sg=g.sb,g.yf=g.gb,g.zf=g.Wa);g.bb=q[v++];g.Ud=q[v++];g.Jb=q[v++];g.Ud=100<=g.Ud?g.Ud-100:g.Ud-g.Jb;g.jb=q[v++];g.Vd=q[v++];
g.yb=q[v++];g.Va=q[v++];g.hb=null;g.va||(g.ve="");var A=q[v++];102==A&&(A=!1);"boolean"==typeof A?(u=q[v++],q=q[v],A?(v=k.A[m],Yw(k,m,!0,!0),v.Me=!0,m=new Zv(k,v,"preload"),k.nj(v,m,u,q,!0)):cx(k,m,u,q,!0)?g.va&&q&&dx(k,u,q,g.va):Sb(k,!1)):void 0!==A&&g.va&&0>g.va.restore(A)&&(h=!1);h&&g.va&&void 0!==g.Va&&(g.hb=g.va.seek(g.Jb,g.bb,g.jb));h||(d=!1)}a.H=b[c++]||0;a.bc=b[c]||ex;return d}
function Zw(a){var b=0,c=[];c[b++]=a.Ya;c[b++]=0;c[b++]=a.ga;c[b++]=a.F;c[b++]=a.D;c[b++]=a.C;c[b++]=a.I;for(var d=b++,e=0,f=[],g=0;g<a.A.length;g++){var h=e++,k=a.A[g],m=0,q=[];q[m++]=k.tb;q[m++]=[k.name,k.sb,k.gb,k.Wa,k.Na,k.Ne,k.sg,k.yf,k.zf];q[m++]=k.bb;q[m++]=k.Ud+100;q[m++]=k.Jb;q[m++]=k.jb;q[m++]=k.Vd;q[m++]=k.yb;q[m++]=k.Va;q[m++]=k.Me;q[m++]=k.Zk;q[m]=k.ve;f[h]=q}c[d]=f;d=b++;for(e=0;e<a.A.length;e++)f=a.A[e],f.va&&fx(a,f.ve,f.va);c[d]=a.B;c[b++]=a.H;c[b]=a.bc;return c}
l.ij=function(a){a=this.A[a];if(void 0!==a){var b={};for(var c in a)b[c]=a[c]}return b};l.$k=function(a,b,c){if(a.va){var d=a.va.info(),e=d[2],f=d[1]*e;if(b+c<=d[0]*f)return a.Jb=Math.floor(b/f),b%=f,a.bb=Math.floor(b/e),a.jb=b%e+1,a.yb=c*d[3],a.tb=gx,!0}return!1};
function Xw(a,b){b||(a.K=0);for(var c in a.M){var d=a.M[c],e;if(!(e=d.path))a:{if(e=d.name){var f=a.ma.listDisks;if(f&&f.options)for(var g=0;g<f.options.length;g++){var h=f.options[g];if(h.text==e){e=h.value;break a}}}e=""}e&&(f=c.charCodeAt(0)-65,0<=f&&f<a.A.length?!cx(a,f,d.name||hx(a,e)||xa(e,!0),e,!0)&&b&&Sb(a,!1):a.Da("Incorrect auto-mount settings for drive "+c+" ("+JSON.stringify(d)+")"))}return!!a.K}
l.Gj=function(){var a=this.ma.listDisks;return a?Sw(this,a.options[a.selectedIndex].text,a.value):!1};
function Sw(a,b,c,d){var e,f=a.ma.listDrives;if(f&&!isNaN(e=qa(f.value,10))&&0<=e&&e<a.A.length){if(!c)return Yw(a,e),!0;if("?"==c)return a.Da('Use "Choose File" and "Mount" to select and load a local disk.'),!1;if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return!1;b=xa(c)}for(;0>cx(a,e,b,c,!1,d);){if(!window.confirm("Click OK to reload the original disk and discard any changes."))return!1;var g=a,h=c;for(f=0;f<g.B.length;f++)if(g.B[f][1]==h){g.B.splice(f,1);break}Yw(a,
e,!1,!0)}return!0}a.Da("Unable to load the selected drive");return!1}function cx(a,b,c,d,e,f){var g=a.A[b];if(d&&(d=d.replace("/disks/pc/","/disks/pcx86/"),g.ve.toLowerCase()!=d.toLowerCase())){Yw(a,b,e,!0);if(g.le)return a.Da("Drive "+b+" busy"),0;g.le=!0;e&&(g.ke=!0,a.K++,r(a)&&Wb(a,"loading diskette '"+c+"'"));g.Me=!!f;return(new Zv(a,g,"preload")).load(c,d,f,a.nj)?1:0}return-1}
l.nj=function(a,b,c,d,e){a.le=!1;if(b){var f=b.info();if(b&&f[0]>a.sb||f[1]>a.gb)this.Da('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.Ya)),b=null}b?(a.va=b,a.Zk=c,a.ve=d,hx(this,d)||Ww(this,c,d),dx(this,c,d,b),f=b.info(),this.H|=ix,a.Re||this.Da('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.Ya),a.ke||e),a.sg=f[0],a.yf=f[1],a.zf=f[2],this.na&&this.na.dd()):a.Me=!1;a.ke&&(a.ke=!1,--this.K||Sb(this));Rw(this,a.Ya);a.Re&&(a.Re(),a.Re=null)};
function Ww(a,b,c,d){if((a=a.ma.listDisks)&&a.options){for(var e=0;e<a.options.length;e++)if(a.options[e].value==c)return;e=document.createElement("option");e.text=b;e.value=c;d&&a.childNodes[0]?a.insertBefore(e,a.childNodes[0]):a.appendChild(e)}}function hx(a,b){if((a=a.ma.listDisks)&&a.options)for(var c=0;c<a.options.length;c++){var d=a.options[c];if(d.value==b)return d.text}return null}
function Rw(a,b){if(0<=b&&b<a.A.length){var c=a.A[b],d=a.ma.listDisks;a=a.ma.listDrives;if(d&&a&&d.options&&a.options&&(a=qa(a.value,10),c=c.Me?"?":c.ve,!isNaN(a)&&a==b)){for(b=0;b<d.options.length;b++)if(d.options[b].value==c){d.selectedIndex!=b&&(d.selectedIndex=b);break}b==d.options.length&&(d.selectedIndex=0)}}}
function Qw(a){var b=a.ma.listDisks,c=a.ma.descDisk,d=b.options[b.selectedIndex];if(c&&d){b={};if(d=d.getAttribute("data-value"))try{b=eval("("+d+")")}catch(e){nb(a.type+" option error: "+e.message)}a=b.desc;void 0===a&&(a="");b=b.href;void 0!==b&&(a='<a href="'+b+'" target="_blank">'+a+"</a>");c.innerHTML=a}}l.zp=function(a){for(var b=0;b<this.A.length;b++){var c=this.A[b];if(c&&c.le)return c.Re||(c.Re=a),!1}return!0};
function Yw(a,b,c,d){var e=a.A[b];e.va&&(fx(a,e.ve,e.va),e.Zk="",e.ve="",e.va=null,e.Me=!1,a.H|=ix,d||a.Da("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||Rw(a,b))}function dx(a,b,c,d){var e;for(e=0;e<a.B.length;e++)if(a.B[e][1]==c){d.restore(a.B[e][2]);return}a.B[e]=[b,c,[]]}function fx(a,b,c){var d;for(d=0;d<a.B.length;d++)if(a.B[d][1]==b){a.B[d][2]=c.save();break}}l.zo=function(a,b,c){t(this,a,b,c,"OUTPUT");b&jx?this.I&jx||this.I&kx&&this.V&&qh(this.V,6):Tw(this);this.I=b};
l.Lm=function(a,b){t(this,a,null,b,"DIAG",80);return 80};l.Nm=function(a,b){t(this,a,null,b,"STATUS",this.ga);return this.ga};l.Km=function(a,b){var c=0;this.D<this.C&&(c=this.F[this.D]);this.I&kx&&this.V&&oh(this.V,6);r(this)&&t(this,a,null,b,"DATA["+this.D+"]",c);++this.D>=this.C&&(this.ga&=~(lx|mx),this.D=this.C=0);return c};
l.yo=function(a,b,c){r(this)&&t(this,a,b,c,"DATA["+this.C+"]");this.C<this.F.length&&(this.F[this.C++]=b);a=this.F[0]&nx;if(void 0!==ox[a]&&this.C>=ox[a].Jd){b=!1;this.D=0;a=px(this);var d=a&nx;switch(d){case qx:px(this);px(this);rx(this);break;case sx:c=px(this);this.Ya=c&3;var e=this.A[this.Ya];rx(this);tx(this,(e.tb&ux)>>>24);break;case vx:case wx:c=px(this);b=c>>2&1;this.Ya=c&3;e=this.A[this.Ya];e.bb=b;c=e.Jb=px(this);var f=px(this);var g=e.jb=px(this);var h=px(this);e.yb=128<<h;e.Vd=px(this);
px(this);px(this);d==wx?(d=e,d.tb=xx|yx,d.va&&(d.hb=null,d.tb=gx,this.V&&(Wn(this.V,2,this,"dmaRead",d),Nn(this.V,2)))):(d=e,d.tb=xx|yx,d.va&&(d.va.Qe?d.tb=zx|yx:(d.hb=null,d.tb=gx,this.V&&(Wn(this.V,2,this,"dmaWrite",d),Nn(this.V,2)))));Ax(this,e,a,b,c,f,g,h);b=!0;break;case Bx:c=px(this);this.Ya=c&3;e=this.A[this.Ya];e.Jb=e.Ud=0;e.tb=Cx|Dx;rx(this);b=!0;break;case Ex:e=this.A[this.Ya];e.bb=0;rx(this);tx(this,e.Ya|e.bb<<2|e.tb&Fx);tx(this,e.Jb);this.Ya=this.Ya+1&3;break;case Gx:c=px(this);b=c>>2&
1;this.Ya=c&3;e=this.A[this.Ya];c=e.Jb;f=e.bb=b;g=e.jb=1;h=0;e.tb=gx;e.va&&(e.hb=e.va.seek(e.Jb,e.bb,e.jb))?h=e.hb.length>>8:e.tb=xx|yx;Ax(this,e,a,b,c,f,g,h);b=!0;break;case Hx:c=px(this);b=c>>2&1;this.Ya=c&3;e=this.A[this.Ya];c=e.Jb;f=e.bb=b;g=1;h=px(this);e.yb=128<<h;e.Vd=px(this);px(this);e.Zi=px(this);d=e;d.tb=xx|yx;d.va&&(d.hb=null,d.tb=gx,this.V&&(d.Ie=0,d.Xc=Array(4),d.Zg=!0,d.fg=0,Wn(this.V,2,this,"dmaFormat",d),Nn(this.V,2),d.Zg=!1));Ax(this,e,a,b,c,f,g,h);b=!0;break;case Ix:c=px(this),
this.Ya=c&3,e=this.A[this.Ya],e.bb=c>>2&1,c=px(this),e.Jb+=c-e.Ud,0>e.Jb&&(e.Jb=0),e.Jb>=e.sb&&(e.Jb=e.sb-1),e.Ud=c,e.tb=Cx,e.Jb||(e.tb|=Dx),rx(this),b=!0}0<this.C&&(this.ga=this.ga|lx|mx);this.I&kx&&(!e||e.tb&xx||!b||this.V&&qh(this.V,6))}};l.Mm=function(a,b){var c=this.H;this.H&=~ix;t(this,a,null,b,"INPUT",c);return c};l.xo=function(a,b,c){t(this,a,b,c,"CONTROL");this.bc=b};
function Ax(a,b,c,d,e,f,g,h){rx(a);tx(a,b.Ya|b.bb<<2|b.tb&Fx);tx(a,(b.tb&Jx)>>>8);tx(a,(b.tb&Kx)>>>16);var k=0;if(e!=b.Jb||f!=b.bb)k=g=1;c&Lx&&(f^=k,d||(k=0));tx(a,e+k);tx(a,f);tx(a,g);tx(a,h)}function px(a){var b=a.F[a.D];a.D++;return b}function rx(a){a.D=a.C=0}function tx(a,b){a.F[a.C++]=b}l.Cl=function(a,b,c){void 0===b||0>b?this.ue(a,c):c(-1,!1)};l.Dl=function(a,b){return void 0!==b&&0<=b?Mx(a,b):-1};
l.Ul=function(a,b){if(void 0!==b&&0<=b)a:if(a.tb)a=-1;else{a.Xc[a.Ie++]=b;if(a.Ie==a.Xc.length){a.Jb=a.Xc[0];a.bb=a.Xc[1];a.jb=a.Xc[2];a.yb=128<<a.Xc[3];for(var c=a.Ie=0;c<a.yb;c++)if(0>Mx(a,a.Zi)){a=-1;break a}a.fg++}a.fg>=a.Vd&&(b=-1);a=b}else a=-1;return a};l.ue=function(a,b){var c=-1,d=null,e=0;if(!a.tb&&a.va){do{if(a.hb&&(e=a.Va,0<=(c=a.va.read(a.hb,a.Va++)))){d=a.hb;break}a.hb=a.va.seek(a.Jb,a.bb,a.jb);if(!a.hb){a.tb=Nx|yx;break}a.Va=0;Ox(a)}while(1)}b(c,!1,d,e)};
function Mx(a,b){if(a.tb||!a.va)return-1;do{if(a.hb&&a.va.write(a.hb,a.Va++,b))break;a.hb=a.va.seek(a.Jb,a.bb,a.jb);if(!a.hb){a.tb=Px|yx;b=-1;break}a.Va=0;Ox(a)}while(1);return b}function Ox(a){a.jb++;a.jb>=a.zf+1&&(a.jb=1,a.bb++,a.bb>=a.yf&&(a.bb=0,a.Jb++))}var bx="Floppy Drive",jx=4,kx=8,mx=16,lx=64,$w=128,qx=3,sx=4,vx=5,wx=6,Bx=7,Ex=8,Gx=10,Hx=13,Ix=15,nx=31,Lx=128,gx=0,xx=8,Cx=32,yx=64,ax=192,Fx=255,zx=512,Nx=1024,Px=8192,Jx=65280,Kx=16711680,Dx=268435456,ux=-16777216,ix=128,ex=0;aa={};
var ox={3:{Jd:3,Wd:0,name:aa.gq},4:{Jd:2,Wd:1,name:aa.eq},5:{Jd:9,Wd:7,name:aa.kq},6:{Jd:9,Wd:7,name:aa.$p},7:{Jd:2,Wd:0,name:aa.bq},8:{Jd:1,Wd:2,name:aa.fq},10:{Jd:2,Wd:7,name:aa.aq},13:{Jd:6,Wd:7,name:aa.Xp},15:{Jd:3,Wd:0,name:aa.cq}},Uw={1009:Ow.prototype.Lm,1012:Ow.prototype.Nm,1013:Ow.prototype.Km,1015:Ow.prototype.Mm},Vw={1010:Ow.prototype.zo,1013:Ow.prototype.yo,1015:Ow.prototype.xo};
gb(function(){for(var a=Cb(document,"pcx86","fdc"),b=0;b<a.length;b++){var c=a[b],d=Db(c);d=new Ow(d);Bb(d,c)}});function Qx(a){sb.call(this,"HDC",a,1048576);this.dmaRead=Qx.prototype.El;this.dmaWrite=Qx.prototype.Fl;this.dmaWriteBuffer=Qx.prototype.Vl;this.dmaWriteFormat=Qx.prototype.Wl;this.Z=[];this.ka=a.drives;this.M=(a=a.type)&&"AT"==a.toUpperCase()||!1;this.wa=!Xa("Mobi")&&window&&"FileReader"in window}ia(Qx,sb);l=Qx.prototype;
l.Fb=function(a,b,c){var d=this;switch(b){case "saveHD0":case "saveHD1":if(this.wa)return this.ma[b]=c,c.onclick=function(a){return function(){var b=d.A&&d.A[a];if(b&&b.va){b=b.va;var c=b.Hg||b.kd,e=c.lastIndexOf(".");0<=e&&(c=c.substr(0,e));c+=".img";b=bb(Lw(b),"octet-stream",!0,c);nb(b)}else d.Da("Hard drive "+a+" is not available.")}}(+b.slice(-1)),!0;c.parentNode.removeChild(c)}return!1};
l.tc=function(a,b,c,d){this.oa=b;this.G=c;this.ca=d;this.na=a;if(d=Ed(a,"drives"))this.Z=d;else if(this.ka)try{this.Z=eval("("+this.ka+")")}catch(e){nb("HDC drive configuration error: "+e.message+" ("+this.ka+")")}this.V=ec(a,"ChipSet");this.H=0;this.la=3;Tc(b,this,this.M?Rx:Sx);Xc(b,this,this.M?Tx:Ux);this.M&&(this.H++,this.V&&this.V.da==Dl&&this.H++,this.la=2,b.V[Vx]=2,b.U[Vx]=2);$f(c,19,this.qn.bind(this));$f(c,64,this.rn.bind(this));this.reset();Wx(this)||Sb(this)};
l.$b=function(a,b){if(!b)if(!a)Xx(this),this.na.Z&&Wx(this,!0);else if(!this.restore(a))return!1;return!0};l.Zb=function(a){return a?this.save():!0};function bw(a){return a.na?a.na.ta:""}function cw(a){return a.na?a.na.B||"":""}l.reset=function(){Xx(this,null,!0)};l.save=function(){var a=new eg(this);a.set(0,Yx(this));return a.data()};l.restore=function(a){return Xx(this,a[0])};
function Xx(a,b,c){var d=0,e=!0;a.Ya=-1;if(a.M){if(b||(b=[0,0,0,0,0,0,0,Zx,0,[0,-1]]),a.I=b[d++],a.ta=b[d++],a.J=b[d++],a.fa=b[d++],a.ea=b[d++],a.ba=b[d++],a.U=b[d++],a.ga=b[d++],a.ha=b[d++],a.L=b[d++],"object"==typeof a.L){var f=a.L;a.L=f[0];a.Ya=f[1]}}else b||(b=[0,$x,Array(14),0,0]),a.P=b[d++],a.ga=b[d++],a.F=b[d++],a.D=b[d++],a.C=b[d++],a.ra=b[d++],a.pa=b[d++],a.qa=b[d++],f=b[d++],void 0!==f?a.N=f:void 0===a.N&&(a.N=-1);void 0===a.A&&(a.A=Array(a.Z.length));b=b[d];void 0===b&&(b=[]);for(d=0;d<
a.A.length;d++){void 0===a.A[d]&&(a.A[d]={});f=a.A[d];var g=a,h=d,k=f,m=a.Z[d],q=b[d],v=c,u=0,A=!0;void 0===q&&(q=[ay,0,!1,Array(8)]);k.Ya=h;k.errorCode=q[u++];k.al=q[u++];k.Ne=q[u++];k.De=q[u++];k.Ee=q[u++];k.bb=q[u++];k.gb=q[u++];k.Od=q[u++];k.jb=q[u++];k.Vd=q[u++];k.yb=q[u++];k.eg=g.M?0:1;k.name=m.name;void 0===k.name&&(k.name=by);k.path=m.path;k.mode=m.mode||(k.path?"preload":"local");"demandro"!=k.mode&&"demandrw"!=k.mode||cw(g)||(k.mode="local");k.type=m.type;if(void 0===k.type||void 0===cy[g.H][k.type])k.type=
g.la;m=cy[g.H][k.type];k.Wa=m[2]||17;k.Na=m[3]||512;if(v&&g.V){var J=g.V;m=k.type;if(J.A){v=null;var H=J.A[18];15<m&&(v=m,m=15);h?(H=H&240|m,m=26):(H=H&15|m<<4,m=25);var G=J;G.A&&(G.A[18]=H,tm(G));null!=v&&J.A&&(J.A[m]=v,tm(J))}}void 0===k.va&&(k.va=null,g.Da("Type "+k.type+' "'+k.name+'" is fixed disk '+h,!0));dy(g,k);k.Va=q[u++];k.hb=null;k.va&&(g=q[u],void 0!==g&&0>k.va.restore(g)&&(A=!1),A&&void 0!==k.Va&&(k.hb=k.va.seek(k.Od,k.bb,k.jb+k.eg)));A||(e=!1);null!=a.P&&1>=d&&(a.P|=(f.type&3)<<(1-d<<
1))}0<=a.Ya&&(a.B=a.A[a.Ya]);return e}
function Yx(a){var b=0,c=[];a.M?(c[b++]=a.I,c[b++]=a.ta,c[b++]=a.J,c[b++]=a.fa,c[b++]=a.ea,c[b++]=a.ba,c[b++]=a.U,c[b++]=a.ga,c[b++]=a.ha,c[b++]=[a.L,a.Ya]):(c[b++]=a.P,c[b++]=a.ga,c[b++]=a.F,c[b++]=a.D,c[b++]=a.C,c[b++]=a.ra,c[b++]=a.pa,c[b++]=a.qa,c[b++]=a.N);for(var d=0,e=[],f=0;f<a.A.length;f++){var g=d++,h=a.A[f],k=0,m=[];m[k++]=h.errorCode;m[k++]=h.al;m[k++]=h.Ne;m[k++]=h.De;m[k++]=h.Ee;m[k++]=h.bb;m[k++]=h.gb;m[k++]=h.Od;m[k++]=h.jb;m[k++]=h.Vd;m[k++]=h.yb;m[k++]=h.Va;m[k]=h.va?h.va.save():
null;e[g]=m}c[b]=e;return c}l.ij=function(a){a=this.A[a];if(void 0!==a){var b={};for(var c in a)b[c]=a[c]}return b};function dy(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.De[2])?e=b.De[0]<<8|b.De[1]:c=b.type);null==c||d||(d=cy[a.H][c][1],e=cy[a.H][c][0]);d&&((c=cy[a.H][b.type])&&e!=c[0]&&d!=c[1]&&a.Da("Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.sb=e,b.gb=d,null==b.va&&(b.va=new Zv(a,b,b.mode)))}}
l.$k=function(a,b,c){if(a.va){var d=a.va.info(),e=d[0];if(e){var f=d[2],g=d[1]*f;if(b+c<=e*g)return a.Od=Math.floor(b/g),b%=g,a.bb=Math.floor(b/f),a.jb=b%f,a.yb=c*d[3],a.errorCode=ay,!0}}return!1};function Wx(a,b){b||(a.K=0);for(var c=0;c<a.A.length;c++){var d=a.A[c];d.name&&d.path?b&&d.va&&d.va.lg||!a.Bn(c,d.name,d.path,!0)&&b&&Sb(a,!1):b&&void 0!==d.type&&(d.va=null,dy(a,d,d.type))}return!!a.K}
l.Bn=function(a,b,c,d){var e=this.A[a];if(e.le)return this.Da("Drive "+a+" busy"),!0;e.le=!0;d&&(e.ke=!0,this.K++,r(this)&&Wb(this,"loading "+b));(e.va||new Zv(this,e,e.mode)).load(b,c,null,this.Xl);return!1};
l.Xl=function(a,b,c){a.le=!1;if(a.va=b)this.Da('Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.Ya),a.ke),b=b.info(),b[0]==a.sb&&b[1]==a.gb&&b[2]==a.Wa&&b[3]==a.Na||this.Da("Warning: disk geometry ("+b[0]+":"+b[1]+":"+b[2]+") does not match "+ey[this.H]+" drive type "+a.type+" ("+a.sb+":"+a.gb+":"+a.Wa+")");a.ke&&(a.ke=!1,--this.K||Sb(this))};
l.on=function(a,b){var c=0;this.D<this.C&&(c=this.F[this.D]);this.V&&oh(this.V,5);this.ga&=~fy;t(this,a,null,b,"DATA["+this.D+"]",c);++this.D>=this.C&&(this.D=this.C=0,this.ga&=~(gy|hy|iy));return c};l.Vo=function(a,b,c){t(this,a,b,c,"DATA["+this.C+"]");this.C<this.F.length&&(this.F[this.C++]=b);a=this.F[0]!=jy?6:this.F.length;6==this.C&&(this.ga&=~ky);this.C>=a&&(this.ga|=gy,this.ga&=~ky,ly(this))};l.pn=function(a,b){var c=this.ga;t(this,a,null,b,"STATUS",c);this.D<this.C&&(this.ga|=ky);return c};
l.Yo=function(a,b,c){t(this,a,b,c,"RESET");this.ra=b;this.V&&oh(this.V,5);Xx(this)};l.nn=function(a,b){t(this,a,null,b,"CONFIG",this.P);return this.P};l.Xo=function(a,b,c){t(this,a,b,c,"PULSE");this.pa=b;this.ga=ky|hy|iy};l.Wo=function(a,b,c){t(this,a,b,c,"PATTERN");this.qa=b};l.hi=function(a,b,c){t(this,a,b,c,"NOISE")};
function my(a,b,c){var d=-1;a.B&&(d=a.ue(a.B,function(){}),1==a.B.Va||a.B.Va==a.B.Na)&&(r(a,1048832)&&t(a,b,null,c,"DATA["+a.B.Va+"]",d),1<a.B.Va&&(a.B.yb-=a.B.Na,a.J=a.J-1&255,a.B.yb>=a.B.Na?(a.ga=ny,a.ue(a.B,function(b){0<=b?(oy(a),a.V&&a.V.da==Dl&&(a.ga=0),a.ga=a.ga|Zx|py|qy):(a.ga=ry,a.I=sy)},!1)):a.ga=Zx|py));return d}l.Gl=function(a,b){return my(this,a,b)|my(this,a,b)<<8};
function ty(a,b,c,d){if(a.B&&a.B.yb>=a.B.Na)if(0>uy(a.B,c))a.ga=ry,a.I=sy;else if(1==a.B.Va||a.B.Va==a.B.Na)r(a,1048832)&&t(a,b,c,d,"DATA["+a.B.Va+"]"),1<a.B.Va&&(a.B.yb-=a.B.Na,a.J=a.J-1&255,oy(a),a.ga=Zx|py,a.B.yb>=a.B.Na&&(a.ga|=qy))}l.$n=function(a,b,c){ty(this,a,b&255,c);ty(this,a,b>>8&255,c)};l.pm=function(a,b){var c=this.I;t(this,a,null,b,"ERROR",c);return c};l.fo=function(a,b,c){t(this,a,b,c,"WPREC");this.ta=b};l.rm=function(a,b){var c=this.J;t(this,a,null,b,"SECCNT",c);return c};
l.co=function(a,b,c){t(this,a,b,c,"SECCNT");this.J=b};l.sm=function(a,b){var c=this.fa;t(this,a,null,b,"SECNUM",c);return c};l.eo=function(a,b,c){t(this,a,b,c,"SECNUM");this.fa=b};l.nm=function(a,b){var c=this.ea;t(this,a,null,b,"CYLLO",c);return c};l.Zn=function(a,b,c){t(this,a,b,c,"CYLLO");this.ea=b};l.mm=function(a,b){var c=this.ba;t(this,a,null,b,"CYLHI",c);return c};l.Yn=function(a,b,c){t(this,a,b,c,"CYLHI");this.ba=b};l.om=function(a,b){var c=this.U;t(this,a,null,b,"DRVHD",c);return c};
l.ao=function(a,b,c){t(this,a,b,c,"DRVHD");this.U=b;this.ga=this.A[this.U&vy?1:0]?this.ga|Zx|py:this.ga&~Zx};l.tm=function(a,b){var c=this.ga;t(this,a,null,b,"STATUS",c);this.ga&Zx&&(this.ga&=~ny);return c};l.Xn=function(a,b,c){t(this,a,b,c,"COMMAND");this.ha=b;this.V&&oh(this.V,14);wy(this)};l.bo=function(a,b,c){t(this,a,b,c,"FDR");this.L&xy&&!(b&xy)&&(this.I=yy);this.L=b};
function wy(a){var b=!1,c=a.ha,d=a.U&vy?1:0,e=a.U&zy,f=a.ea|(a.ba&Ay)<<8,g=a.fa,h=a.J||256;a.Ya=-1;a.B=null;a.I=By;a.ga=Zx|py;var k=a.A[d];k?(k.Od=f,k.bb=e,k.jb=g,k.yb=h*k.Na,c=c>=Cy?c:c&Dy,k.hb=null,k.Va=0,k.errorCode=0,a.Ya=d,a.B=k):c=-1;switch(c&Dy){case Ey:b=!0;break;case Fy:a.ga=ny;a.ue(k,function(b){0<=b&&a.V?(oy(a),a.ga=Zx|py|qy):(a.ga=ry,a.I=sy)},!1);break;case Gy:a.ga=qy;break;case Hy:b=!0;break;case Iy:b=!0;break;case Cy:a.I=yy;b=!0;break;case Jy:k.gb=e+1,k.Wa=h,b=!0}b&&oy(a)}
function oy(a){a.V&&(a.L&Ky||qh(a.V,14,120))}
function ly(a){a.D=0;var b=Ly(a),c=Ly(a),d=c&32,e=d>>5,f=c&31,g=Ly(a),h=Ly(a),k=g<<2&768|h,m=g&63,q=Ly(a),v=Ly(a),u=a.A[e];u&&(u.Od=k,u.bb=f,u.jb=m,u.yb=q*u.Na);switch(b){case My:Ny(a,u?u.errorCode:Oy);Py(a,c);Py(a,g);Py(a,h);Py(a,Qy|d);b=-1;break;case jy:for(c=0;0<=(b=Ly(a));)u&&c<u.De.length&&(u.De[c++]=b);u&&dy(a,u);b=Qy;u||a.N!=e||(a.N=-1,b=Ry);Ny(a,b|d);b=-1;break;case Sy:case Ty:Ny(a,Qy|d),b=-1}if(0<=b)switch(void 0===u?b=-1:(u.errorCode=ay,u.al=0),b){case Uy:Ny(a,Qy|d);break;case Vy:u.lf=v;
Ny(a,Qy|d);break;case Wy:Ny(a,Qy|d);break;case Xy:Yy(a,u,function(b){Ny(a,b|d)});break;case Zy:$y(a,u,function(b){Ny(a,b|d)});break;case az:bz(a,u,function(b){Ny(a,b|d)});break;default:Ny(a,Ry|d)}}function Ly(a){var b=-1;a.D<a.C&&(b=a.F[a.D++]);return b}function Ny(a,b){a.D=a.C=0;void 0!==b&&Py(a,b);a.V&&qh(a.V,5);a.ga|=fy}function Py(a,b){a.F[a.C++]=b}l.El=function(a,b,c){void 0===b||0>b?this.ue(a,c):c(-1,!1)};l.Fl=function(a,b){return void 0!==b&&0<=b?uy(a,b):-1};
l.Vl=function(a,b){void 0!==b&&0<=b?(a.Va<a.Ee.length?a.Ee[a.Va++]=b:(a.errorCode=cz,b=-1),a=b):a=-1;return a};l.Wl=function(a,b){if(void 0!==b&&0<=b)a:if(a.errorCode)a=-1;else{a.Xc[a.Ie++]=b;if(a.Ie==a.Xc.length){a.Od=a.Xc[0];a.bb=a.Xc[1];a.jb=a.Xc[2];a.yb=128<<a.Xc[3];for(var c=a.Ie=0;c<a.yb;c++)if(0>uy(a,a.Zi)){a=-1;break a}a.fg++}a.fg>=a.Vd&&(b=-1);a=b}else a=-1;return a};
function Yy(a,b,c){b.errorCode=Oy;if(b.va&&(b.hb=null,a.V)){b.errorCode=ay;Wn(a.V,3,a,"dmaRead",b);Nn(a.V,3,function(a){a||b.errorCode!=ay||(b.errorCode=Oy);c(b.errorCode?Ry:Qy)});return}c(b.errorCode?Ry:Qy)}function $y(a,b,c){b.errorCode=Oy;if(b.va&&(b.hb=null,a.V)){b.errorCode=ay;Wn(a.V,3,a,"dmaWrite",b);Nn(a.V,3,function(a){a||(b.errorCode==ay&&(b.errorCode=Oy),b.errorCode==cz&&(b.errorCode=ay));c(b.errorCode?Ry:Qy)});return}c(b.errorCode?Ry:Qy)}
function bz(a,b,c){b.errorCode=Oy;b.Ee&&b.Ee.length==b.yb||(b.Ee=Array(b.yb));b.Va=0;a.V?(b.errorCode=ay,Wn(a.V,3,a,"dmaWriteBuffer",b),Nn(a.V,3,function(a){a||b.errorCode!=ay||(b.errorCode=Oy);c(b.errorCode?Ry:Qy)})):c(b.errorCode?Ry:Qy)}
l.ue=function(a,b,c){var d=-1,e=null,f=0;if(a.errorCode)return b&&b(d,!1,e,f),d;var g=!1!==c?1:0;if(a.hb&&(f=a.Va,d=a.va.read(a.hb,a.Va),a.Va+=g,0<=d))return e=a.hb,b&&b(d,!1,e,f),d;if(b){if(a.va)return a.va.seek(a.Od,a.bb,a.jb+a.eg,!1,function(c,k){(a.hb=c)?(e=c,f=a.Va=0,dz(a),d=a.va.read(a.hb,a.Va),a.Va+=g):a.errorCode=cz;b(d,k,e,f)}),d;a.errorCode=cz;b(d,!1,e,f)}return d};
function uy(a,b){if(a.errorCode)return-1;do{if(a.hb&&a.va.write(a.hb,a.Va++,b))break;a.va&&a.va.seek(a.Od,a.bb,a.jb+a.eg,!0,function(b){a.hb=b});if(!a.hb){a.errorCode=cz;b=-1;break}a.Va=0;dz(a)}while(1);return b}function dz(a){a.jb++;var b=1-a.eg;a.jb>=a.Wa+b&&(a.jb=b,a.bb++,a.bb>=a.gb&&(a.bb=0,a.Od++))}l.qn=function(){var a=this.G.L&255;!(this.G.D>>8)&&128<a&&(this.N=a-128);return!0};l.rn=function(){var a;(a=this.G.D>>8||!this.V)||(a=!(this.V.ic[0].td&64));return a?!0:!1};
var by="Hard Drive",ey=["XTC","ATC","COMPAQ"],cy=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7],16:[612,4],17:[977,5],18:[977,7],19:[1024,7],20:[733,5],21:[733,7],22:[733,5],23:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[1023,8],5:[940,6],6:[697,5],7:[462,8],8:[925,5],9:[900,15],10:[980,5],11:[925,7],12:[925,9],13:[612,8],14:[980,4],16:[612,4],17:[980,5],18:[966,
6],19:[1023,8],20:[733,5],21:[733,7],22:[524,4,40],23:[924,8],24:[966,14],25:[966,16],26:[1023,14],27:[832,6,33],28:[1222,15,34],29:[1240,7,34],30:[615,4,25],31:[615,8,25],32:[905,9,25],33:[832,8,33],34:[966,7,34],35:[966,8,34],36:[966,9,34],37:[966,5,34],38:[612,16,63],39:[1023,11,33],40:[1023,15,34],41:[1630,15,52],42:[1023,16,63],43:[805,4,26],44:[805,2,26],45:[748,8,33],46:[748,6,33],47:[966,5,25]}],Vx=496,yy=1,By=0,sy=16,Ay=3,zy=15,vy=16,ry=1,qy=8,py=16,Zx=64,ny=128,Ey=16,Fy=32,Gy=48,Hy=64,Iy=
112,Cy=144,Jy=145,Dy=240,Ky=2,xy=4,Qy=0,Ry=2,Uy=0,Vy=1,My=3,Wy=5,Xy=8,Zy=10,jy=12,az=15,Sy=224,Ty=228,ay=0,Oy=4,cz=20,$x=0,ky=1,gy=2,hy=4,iy=8,fy=32,Sx={800:Qx.prototype.on,801:Qx.prototype.pn,802:Qx.prototype.nn},Rx={496:Qx.prototype.Gl,497:Qx.prototype.pm,498:Qx.prototype.rm,499:Qx.prototype.sm,500:Qx.prototype.nm,501:Qx.prototype.mm,502:Qx.prototype.om,503:Qx.prototype.tm},Ux={800:Qx.prototype.Vo,801:Qx.prototype.Yo,802:Qx.prototype.Xo,803:Qx.prototype.Wo,807:Qx.prototype.hi,811:Qx.prototype.hi,
815:Qx.prototype.hi},Tx={496:Qx.prototype.$n,497:Qx.prototype.fo,498:Qx.prototype.co,499:Qx.prototype.eo,500:Qx.prototype.Zn,501:Qx.prototype.Yn,502:Qx.prototype.ao,503:Qx.prototype.Xn,1014:Qx.prototype.bo};gb(function(){for(var a=Cb(document,"pcx86","hdc"),b=0;b<a.length;b++){var c=a[b],d=Db(c);d=new Qx(d);Bb(d,c)}});function ez(a){sb.call(this,"Debugger",a);this.D=+a.base||16;this.ha=["{","}"];this.Ea=["[","]"];this.ba=this.ka=this.P=0;this.fa=!1;this.A=-1;this.C=[];this.I={}}ia(ez,sb);
ez.prototype.hh=function(){return-1};ez.prototype.ih=function(){};ez.prototype.Pk=function(a,b){return a.replace("["+b+"]","unimplemented")};
ez.prototype.Ag=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else this.fa?a="end":a=this.C[this.A+1];b=[];if(a){a=a.replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Da(a.substring(d,f))),d=f+1}}return b};
function fz(a,b,c){var d=a;b=b||32;if(c)if(32==b)d=a>>>0;else if(32>b)d=a&(1<<b)-1;else{if(b=Math.pow(2,b),0>a||a>=b)d=a%b,0>d&&(d+=b)}else 32>=b?d=a<<32-b>>32-b:(b=Math.pow(2,b-1),a>=b?(d=a%b,(a/b|0)&1&&(d-=b)):a<-b&&(d=a%b,((-a-1)/b|0)&1?d&&(d+=b):d||(d-=b)));a!=d&&(a=d);return a}
function gz(a,b,c){for(c=void 0===c?-1:c;c--&&b.length;){var d=b.pop();if(2>a.length)return!1;var e=a.pop();var f=a.pop();switch(d){case "*":f*=e;break;case "/":if(!e)return!1;f=Math.trunc(f/e);break;case "^/":if(!e)return!1;f%=e;break;case "+":f+=e;break;case "-":f-=e;break;case "<<":f<<=e;break;case ">>":f>>=e;break;case ">>>":f>>>=e;break;case "<":f=f<e?1:0;break;case "<=":f=f<=e?1:0;break;case ">":f=f>e?1:0;break;case ">=":f=f>=e?1:0;break;case "==":f=f==e?1:0;break;case "!=":f=f!=e?1:0;break;
case "&":f&=e;break;case "!":case "|":f|=e;break;case "^!":f|=e;break;case "&&":f=f&&e?1:0;break;case "||":f=f||e?1:0;break;case ",,":f=fz(f,18,!0)*Math.pow(2,18)+fz(e,18,!0);break;case "_":case "^_":"^_"==d&&(e=35-(e&255));e&&(f=fz(f,0,!0),f=0<e?f*Math.pow(2,e):Math.trunc(f/Math.pow(2,-e)));break;default:return!1}a.push(fz(f))}return!0}
function hz(a,b,c,d,e,f){var g,h=!1,k=0,m=[],q=[],v=a.D;for(a.D=e;c<d;){var u=b[c++].trim();var A=c<d?b[c++]:"";if(u)var J=iz(a,u,null,f,k);else if("{"==A){u=1;for(J=c;c<d;)if(c++,A=c<b.length?b[c++]:"","{"==A)u++;else if("}"==A&&!--u)break;J=hz(a,b,J,c-1,a.D,f);null!=J&&k&&(J=jz(J,k));u=c<d?b[c++].trim():"";A=c<d?b[c++]:""}else{if(" "==A)continue;if("^B"==A){a.D=2;continue}if("^O"==A){a.D=8;continue}if("^D"==A){a.D=10;continue}if(!(k&-1073741824)){if("+"==A)continue;if("-"==A){k=k<<2|1;continue}if("~"==
A||"^-"==A){k=k<<2|2;continue}if("^L"==A){k=k<<2|3;continue}}h=!0;break}if(void 0===J)if(f)f.push(u),J=0;else{h=!0;f=[];break}m.push(fz(J));if(" "==A)if(c<b.length-1&&!b[c])c++,A=b[c++];else{h=!0;break}if(!A)break;k="<"==a.ha[0]?kz:lz;if(!k[A]){h=!0;break}q.length&&k[A]<=k[q[q.length-1]]&&gz(m,q,1);q.push(A);a.D="^_"==A?10:e;k=0}if(h||!gz(m,q)||1!=m.length)h=!0;h?f||a.O("parse error ("+(u||A)+")"):g=m.pop();a.D=v;return g}
function mz(a,b,c,d,e){for(var f;0<=(f=b.indexOf(c));){for(var g=0,h=f+1,k=e;h<b.length;){var m=b[h++];if(m==c){k=-1;break}if(!k)break;k--;m=m.charCodeAt(0);7==d?m&=127:m=m-32&63;g=fz(g*Math.pow(2,d)+m,d*e,!0)}if(0<=k){a.O("parse error ("+c+b+c+")");return}b=b.substr(0,f)+nz(a,g,-1)+b.substr(h)}return b}
function oz(a,b,c){var d=void 0,e=!1===c;c=Array.isArray(c)?c:void 0;if(b){"{"!=a.ha[0]&&(b=b.split(a.ha[0]).join("{").split(a.ha[1]).join("}"));b=mz(a,b,'"',7,5);if(!b)return d;b=mz(a,b,"'",6,6);if(!b)return d;16!=a.D&&(b=b.replace(/(^|[^A-Z0-9$%.])([0-9]+)B/,"$1$2^_").replace(/\s+/g," "));b=b.split(/({|}|\|\||&&|\||\^!|\^B|\^O|\^D|\^L|\^-|~|\^_|_|&|!=|!|==|>=|>>>|>>|>|<=|<<|<|-|\+|\^\/|\/|\*|,,| )/);d=hz(a,b,0,b.length,a.D,c);void 0!==d&&e&&pz(a,null,d)}return d}
function qz(a,b){var c=a.ha[0],d=a.ha[1];var e="("==c||"{"==c||"["==c?"\\":"";var f="["==c?"\\":"";for(f=new RegExp(e+c+"([^"+f+c+f+d+"]+)"+e+d);e=b.match(f);){var g=oz(a,e[1]);if(void 0===g)return;b=b.replace(c+e[1]+d,null!=g?nz(a,g):"undefined")}if(a.Ea.length)for(c=a.Ea[0],d=a.Ea[1],e="("==c||"{"==c||"["==c?"\\":"",f="["==c?"\\":"",f=new RegExp(e+c+"([^"+f+c+f+d+"]+)"+e+d);e=b.match(f);)b=a.Pk(b,e[1]);for(;c=b.match(/\$([a-z]+)/i);){d=null;switch(c[1].toLowerCase()){case "ops":d=a.ba-a.ka}if(null==
d)break;b=b.replace(c[0],d.toString())}return b}function jz(a,b){for(;b;){switch(b&3){case 1:a=-fz(a);break;case 2:a|=-1;break;case 3:for(var c=35;0<=c&&!(a&Math.pow(2,c));)c--;a=35-c}b>>>=2}return a}
function iz(a,b,c,d,e){e=void 0===e?0:e;var f=Array.isArray(d)?d:void 0;if(null!=b){var g=a.hh(b);if(0<=g)g=a.ih(g);else if(g=b,a.I[g]?g=a.I[g].value:(g=g.substr(0,6),g=a.I[g]&&a.I[g].value),null!=g){var h=a.I[b]&&a.I[b].vp;h&&(f?f.push(h):(f=oz(a,h,d),void 0!==f?g+=f:(d||a.O("undefined "+(c||"value")+": "+b+" ("+h+")"),g=void 0)))}else g=qa(b,1<b.length||10<a.D?a.D:10);null!=g?g=fz(jz(g,e)):d||a.O("invalid "+(c||"value")+": "+b)}else d||a.O("missing "+(c||"value"));return g}
function pz(a,b,c){var d=!1;if(void 0!==c){d=!0;var e=8==a.D?nz(a,c,32,8,1)+" "+c+".":nz(a,c,32,16,1)+" "+nz(a,c,32,8,1)+" "+nz(a,c,32,2,8)+" "+c+".";32<=c&&127>c&&(e+=" '"+String.fromCharCode(c)+"'")}a.O((null!=b?b+": ":"")+e);return d}function rz(a,b){var c=0;if(a.I){if(b)return pz(a,b,a.I[b]&&a.I[b].value);b=Object.keys(a.I);b.sort();for(var d=0;d<b.length;d++)pz(a,b[d],a.I[b[d]].value),c++}return 0<c}
function nz(a,b,c,d,e){c=void 0===c?0:c;e=void 0===e?0:e;switch((void 0===d?0:d)||a.D){case 2:b=ta(b,0<c?c:0,e);break;case 8:b=ua(b,0<c?(c+2)/3|0:0,!!e);break;case 10:(a=0<c?Math.ceil(.3*c):0)?11<a&&(a=11):a=99999>=Math.abs(b)?5:11;b=ra(b,10,a);break;default:b=p(b,0<c?c+3>>2:0,!!e)}0>c?c=b.replace(/^0+([0-9A-F]+)$/i,"$1"):c=b;return c}
var lz={"||":5,"&&":6,"!":7,"|":7,"^!":8,"&":9,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,_:19,"^_":19,"{":20,"}":20},kz={",,":1,"||":5,"&&":6,"!=":10,"==":10,">=":11,">":11,"<=":11,"<":11,">>>":12,">>":12,"<<":12,"-":13,"+":13,"^/":14,"/":14,"*":14,"!":15,"|":15,"^!":15,"&":15,_:19,"^_":19,"{":20,"}":20};
function sz(a){ez.call(this,a);this.ra=4;this.la=5;this.xa=1048575;this.N=tz(this,0,0);this.Ca=tz(this,0,0);this.ea=tz(this,0,0);this.F=[];this.B=this.V=this.L=[];uz(this);this.wa=0;vz(this);this.Fa={};wz(this,a.messages);this.Ka=a.commands;var b=this;window?void 0===window.pcx86&&(window.pcx86=function(a){return xz(b,a)}):void 0===global.pcx86&&(global.pcx86=function(a){return xz(b,a)})}ia(sz,ez);l=sz.prototype;
l.tc=function(a,b,c,d){this.oa=b;this.G=c;this.na=a;this.cb=ec(a,"FDC");this.Pa=ec(a,"HDC");this.Kc=ec(a,"FPU");this.H=ec(a,"Mouse");(a=Ed(a,"messages"))&&wz(this,a);this.la=b.I>>2;this.xa=b.N;this.ab=new ee(this.G,7,"DBG");this.pa=yz;80186<=this.G.da&&(this.pa=yz.slice(),this.pa[15]=zz,80286<=this.G.da&&(this.pa[15]=Az,80386<=this.G.da&&(this.ra=8)));Gl(this,64,function(a){Bz(d,d.G.sc,a[0])});Gl(this,4,function(a){if(a=a[0]){var b=iz(d,a);if(void 0===b)d.O("invalid selector: "+a);else if(a=Cz(d,
b,Dz),d.O("dumpSel("+wa(a?a.T:b)+"): %"+p(a?a.Pb:null,d.la)),a){b=!1;if(a.type&4096){if(a.type&2048){var c="code"+(a.type&512?",readable":",execonly");a.type&1024&&(c+=",conforming")}else c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown");a.type&256&&(c+=",accessed")}else{var e=Ez[a.type];e&&(c=e[0],b=e[1])}!c||a.ob&32768||(c+=",not present");d.O((b?"seg="+wa(a.ua&65535)+" off="+wa(a.Sa):"base="+p(a.ua,d.la)+" limit="+Fz(a.Sa))+" type="+va(a.type>>8)+" ("+c+") ext="+wa(a.ext&
-65296)+" dpl="+va(a.qc))}}else d.O("no selector")});Gl(this,134217728,function(a){var b;(a=a[0])&&(b=iz(d,a));if(void 0===b)d.O("invalid MCB");else for(d.O("dumpMCB("+wa(b)+")");b;){a=tz(d,0,b);var c=d.ya(a,1),e=d.Vc(a,2),k=d.Vc(a,5);if(77!=c&&90!=c)break;d.O(Gz(0,b)+": '"+String.fromCharCode(c)+"' PID="+wa(e)+" LEN="+wa(k)+' "'+Hz(d,a,8)+'"');b+=1+k}});Gl(this,128,function(a){Bz(d,d.G.Z,a[0],d.G.Z!==d.G.sc)});Gl(this,8,function(a){a:{if(a=a[0]){var b=iz(d,a);if(void 0===b){d.O("invalid task selector: "+
a);break a}a=Cz(d,b,Dz)}else a=d.G.ka;d.O("dumpTSS("+wa(a?a.T:b)+"): %"+p(a?a.ua:null,d.la));if(a){b="";var c=a.type&-513,e=256==c?4:8,k=256==c?Iz:Jz;for(u in k){var m=k[u];var q=a.ua+m;var v=Eg(d.G,q,2);2304==c&&(v|=Eg(d.G,q+2,2)<<16);b&&(b+="\n");b+=wa(m)+" "+Ca(u+":",11)+p(v,e)}if(2304==c){var u=0;for(m=v>>>16;m<a.Ob&&1023>u;){q=a.ua+m;v=Eg(d.G,q,2);q=2;c="";if(!q||4<q)q=4;for(e=0;e<q;e++)c&&(c=","+c),c=ta(v&255,8)+c,v>>=8;b+="\n"+wa(m)+" ports "+wa(u)+"-"+wa(u+15)+": "+(""+c);u+=16;m+=2}}d.O(b)}}});
this.J=null;this.La=0;this.Ga=!1;$f(this.G,48,this.un.bind(this));$f(this.G,65,this.vn.bind(this));this.Z=null;$f(this.G,104,this.wn.bind(this));Sb(this)};function Kz(a,b,c,d,e,f){b=Hz(a,b);var g=Cz(a,d);g=g?g.Sa+1:0;var h=(e?"_CODE":"_DATA")+p(c,2);f&&r(a,128)&&a.message(b+" "+(e?"code":"data")+"("+p(c,4)+")=#"+p(d,4)+" len "+p(g));e=Lz(a,b,c);e[b+h]=0;nq(a,b,c,d,0,null,g,e)}
function Mz(a,b,c,d){var e=a.Vc(b,2),f=a.Vc(b,2),g=Nz(a,b,4),h=Nz(a,b,4),k=tz(a,Nz(a,b,4),a.Vc(b,2));b=tz(a,Nz(a,b,4),a.Vc(b,2));b=Hz(a,b).toUpperCase();k=Hz(a,k).toUpperCase();var m=(c?"_CODE":"_DATA")+p(e,2);d&&r(a,128)&&a.message((b==k?"":b+"!")+k+" "+(c?"code":"data")+"("+p(e,4)+")="+p(f,4)+":"+p(g)+" len "+p(h));c=Lz(a,k,e);c[k+m]=g;nq(a,k,e,f,g,null,h,c)}function Oz(a,b,c){c=Hz(a,c).toUpperCase();Pz(a,c,b)}
l.un=function(){var a=this.G;if(null!=this.J&&2752554==a.D){var b=a.L&65535,c=a.K&65535,d=tz(this,y(a)+12,a.U.T);switch(Nz(this,d)){case 336:Mz(this,tz(this,a.H,b),!c,!!this.J)}}return!0};
l.vn=function(a){var b=this.G,c=b.D&65535,d=b.H&65535,e=b.I&65535,f=b.L&65535,g=b.K&65535,h=b.J&65535,k=b.pa.T;if(null==this.J)return 79==c&&ag(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Wb(a,"INT 0x41 handling enabled",128),a.J=!0):(Wb(a,"INT 0x41 monitoring enabled",128),a.J=!1)}}(this)),!0;switch(c){case 79:this.J&&(b.D=b.D&-65536|62342,Wb(this,"INT 0x41 handling enabled",128));break;case 80:Kz(this,tz(this,h,k),d+1,e,!(g&1),!!this.J);break;case 82:Pz(this,null,
d);break;case 127:this.J&&(b.D=b.D&-65536|(this.Ga?0:1));break;case 131:this.J&&(a=tz(this,b.L,e),this.La++?(this.O("TRAPFAULT failed"),Qz(this,this.B,a,!0,!0),this.La=0,vk(this)):(this.O("INT 0x41 TRAPFAULT: fault="+wa(d)+" error="+p(b.K,8,!0)+" addr="+Rz(a)),this.sd(this.B,a,!0),vz(this,!0)));break;case 141:this.J&&(b.D=b.D&-65536|1);break;case 336:Mz(this,tz(this,b.H,f),!g,!!this.J);break;case 338:Oz(this,d,tz(this,b.J,f))}this.Ga=!1;return!this.J};
l.wn=function(a){var b=this.G,c=b.D&255,d=b.D>>8&255,e=b.H&65535,f=b.I&65535,g=b.L&65535,h=b.J&65535,k=b.pa.T;if(null==this.Z){if(67==d){if(609437257==b.ia((b.ba.T<<4)+10)||1111835735==b.ia((b.ba.T<<4)+95))return!0;ag(b,a,function(a){return function(){62342!=(b.D&65535)?(b.D=b.D&-65536|62342,Wb(a,"INT 0x68 handling enabled",128),a.J=a.Z=!0):(Wb(a,"INT 0x68 monitoring enabled",128),a.Z=!1)}}(this))}return!0}switch(d){case 67:this.Z&&(b.D=b.D&-65536|62342);break;case 68:this.Z&&(a=ge(b.ba,this.Rl.bind(this)))&&
(b.J=a[0],ye(b,a[1]));break;case 72:Pz(this,null,e);break;case 80:32==c?Kz(this,tz(this,h,k),0,f,!0,!!this.Z):128>c?Kz(this,tz(this,h,k),e+1,c&64?g:f,!(c&1),!!this.Z):Mz(this,tz(this,h,k),!(c&1),!!this.Z),this.Z&&(b.D=b.D&-256|1)}return!this.Z};l.Rl=function(){var a=this.G;5==(a.D&255)&&(a.I=a.K=0,a.D=a.D&-256|1);return!1};
l.Fb=function(a,b,c){var d=this;switch(b){case "debugInput":return this.ta=this.ma[b]=c,c.onkeydown=function(a){if(13==a.keyCode){var b=c.value;c.value="";xz(d,b,!0)}else if(27==a.keyCode)c.value=b="";else if(38==a.keyCode?(b=null,d.A<d.C.length-1&&(b=d.C[++d.A])):40==a.keyCode&&(0<d.A?b=d.C[--d.A]:(b="",d.A=-1)),null!=b){var e=b.length;c.value=b;c.setSelectionRange(e,e)}null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.ma[b]=c,db(c,function(){if(d.ta){var a=d.ta.value;
d.ta.value="";xz(d,a,!0);return!0}return!1}),!0;case "step":return this.ma[b]=c,db(c,function(a){var b=!1;Ub(d,!0)||(Vb(d,!0),b=Sz(d,a?1:0),Vb(d,!1));return b}),!0}return!1};l.dd=function(){this.ta&&this.ta.focus()};function Tz(a){return!(!(a.G&&a.G.ra&1)||a.G.P&131072)}
function Cz(a,b,c){var d=Tz(a)?Dz:Uz;c||(c=d);if(c==d){if(b===a.G.ba.T)return a.G.ba;if(b===a.G.Fa.T)return a.G.Fa;if(b===a.G.pa.T)return a.G.pa;if(b===a.G.U.T)return a.G.U;if(80386<=a.G.da){if(b===a.G.Ka.T)return a.G.Ka;if(b===a.G.La.T)return a.G.La}if(a.Ia&&c==Dz||!a.ab)return null}a=a.ab;if(c!=Dz)a.oh(b),a.Sa=65535,a.Ob=65536;else{c=a.Mb;b&=65535;if(b&4){d=c.Hb.ua;var e=d+c.Hb.Sa|0}else d=c.Lb,e=c.Jc;d=d+(b&65528)|0;if(e-d|0){e=Eg(c,d+0,2);var f=Eg(c,d+4,2),g=f&7936,h=Eg(c,d+2,2)|(f&255)<<16,k=
Eg(c,d+6,2);80386<=c.da&&(h|=(k&65280)<<16,e|=(k&15)<<16,k&128&&(e=e<<12|4095));a.T=b;a.ua=h;a.Sa=e;a.Ob=(e>>>0)+1;a.ob=f;a.type=g;a.ext=k;a.Pb=d;fe(a,!0,!0,!1)}}return a}l.Vb=function(a,b,c){var d=a&&a.za;if(null==d&&(d=-1,a)){var e=Cz(this,a.T,a.type);e&&(b=a.Ja||0,c=c||1,d=e=-1===e.Pb||e.fd&&(b>>>0)+c>e.Ob||!e.fd&&(b>>>0)+c<=e.Ob?e.ua+b|0:-1,a.za=d)}return d};l.ya=function(a,b){var c=255,d=this.Vb(a,!1,1);-1!==d&&(c=Eg(this.G,d,1,a.type==Vz)|0,b&&Wz(this,a,b));return c};
l.nb=function(a,b){return a.Kb?Nz(this,a,b?4:0):this.Vc(a,b?2:0)};l.Vc=function(a,b){var c=65535,d=this.Vb(a,!1,2);-1!==d&&(c=Eg(this.G,d,2,a.type==Vz)|0,b&&Wz(this,a,b));return c};function Nz(a,b,c){var d=-1,e=a.Vb(b,!1,4);-1!==e&&(d=Eg(a.G,e,4,b.type==Vz)|0,c&&Wz(a,b,c));return d}l.ub=function(a,b,c,d){var e=this.Vb(a,!0,1);if(-1!==e){if(a.type!=Vz)this.G.ub(e,b);else{var f=this.oa;f.Z[(e&f.C)>>>f.A].cf(e&f.D,b&255,e)}c&&Wz(this,a,c);d||Id(this.G,!0)}};
l.Bl=function(a,b,c){var d=this.Vb(a,!0,2);-1!==d&&(a.type!=Vz?this.G.ib(d,b):Pc(this.oa,d,b),c&&Wz(this,a,c),Id(this.G,!0))};function tz(a,b,c,d,e,f,g){return Xz(a,{},b,c,d,e,f,g)}function Xz(a,b,c,d,e,f,g,h){b.Ja=c||0;b.T=d;b.za=e;b.type=f||(Tz(a)?Dz:Uz);b.Kb=null!=g?g:!(!a.G||4!=a.G.ba.X);b.ec=null!=h?h:!(!a.G||4!=a.G.ba.Lc);b.xd=!1;return b}function Yz(a){return[a.Ja,a.T,a.za,a.xd,a.Kb,a.ec,a.Fe,a.dh]}function Zz(a){return{Ja:a[0],T:a[1],za:a[2],xd:a[3],Kb:a[4],ec:a[5],Fe:a[6],dh:a[7]}}
function $z(a,b,c){if(null!=b.T&&(a=Cz(a,b.T,b.type))){var d=b.Ja&a.xa;if(!a.fd){if(d>>>0>=a.Ob)return!1}else if(d>>>0<a.Ob)return!1;c&&(b.Ja=d,b.Kb=4==a.X,b.ec=4==a.Lc)}return!0}
function aA(a,b,c,d){var e=c?a.N:a.Ca;c=d?bA:e.type;var f=e.Ja,g=e.T;e=e.za;if(void 0!==b){b=qz(a,b);var h=b.charAt(0);e=b.indexOf(":");switch(h){case "&":c=Uz;break;case "#":c=Dz;break;case "%":c=cA;h=b.charAt(1);"%"==h&&(c=Vz,h+=h);f=0;g=null;break;default:0<=e&&(c=bA),h=""}h&&(b=b.substr(h.length),e-=h.length);h=b;if(h.match(/^[a-z_][a-z0-9_]*$/i))for(var k=h.toUpperCase(),m=0;m<a.F.length;m++){h=a.F[m];var q=h.Id[k];if(void 0!==q){k=q.o;if(void 0!==k){var v=q.s;void 0===v&&(v=h.T);v=tz(a,k,v,
q.p)}break}}if(h=v)return h;0>e?null!=g?(f=oz(a,b,void 0),e=null):(e=oz(a,b,void 0),null==e&&(f=null)):(g=oz(a,b.substring(0,e),void 0),f=oz(a,b.substring(e+1),void 0),e=null)}null!=f&&(h=tz(a,f,g,e,c),d||$z(a,h,!0)||(a.O("invalid offset: "+Rz(h)),h=null));return h}function dA(a,b,c){c&&(c=c.match(/(['"])(.*?)\1/))&&(b.Ll=a.Ag(b.Yk=c[2]))}l.Pk=function(a,b){var c=aA(this,b);return a.replace("["+b+"]",c?p(this.nb(c),c.Kb?8:4):"undefined")};
function Wz(a,b,c){c=c||1;null!=b.za&&(b.za+=c);null!=b.T&&(b.Ja+=c,$z(a,b)||(b.Ja=0,b.za=null))}function Gz(a,b,c){return null!=b?p(b,4)+":"+p(a,a&-65536||c?8:4):p(a)}function Rz(a){switch(a.type){case Uz:case eA:var b="&";break;case Dz:b="#";break;case cA:b="%";break;case Vz:b="%%";break;default:b=a.T?"":"%"}return a.type>=cA||null==a.T?b+p(a.za):b+Gz(a.Ja,a.T,a.ec)}
function Hz(a,b,c){var d="";for(c=c||256;d.length<c;){var e=a.ya(b,1);if(!e||36==e||127<=e)break;d+=32<=e?String.fromCharCode(e):"."}return d}
function Bz(a,b,c,d){var e=0,f=0,g=b.length;if(c){e=a.Vb(aA(a,c));if(-1===e){a.O("invalid address: "+c);return}f=e>>>a.G.lb;g=1}a.O("blockid "+(d?"linear ":"physical")+" blockaddr used size type");a.O("-------- --------- ---------- ------ ------ ----");c=-1;for(var h=0;g--;)(d=b[f])&&d.type==hd&&(d=yd(a.G,e,!1,!0)),d.type==c?h++||a.O("..."):(c=d.type,h=zc[c],c==jd&&(d=d.ud,h+=" -> "+zc[d.type]),d&&a.O(p(d.id,8)+" %"+p(f<<a.G.lb,8)+" %%"+p(d.za,8)+" "+wa(d.ye)+" "+wa(d.size)+
" "+h),c!=gd&&c!=hd&&(c=-1),h=0),e+=a.G.Pg,f++}function fA(a,b,c){a=p(a)+" "+p(b)+" ";a=a+(c&&b&64?"D":"-")+(b&32?"A":"-")+(b&4?"U":"S");a+=b&2?"W":"R";return a+=b&1?"P":"N"}function Lz(a,b,c){var d=[],e;for(e=null;e=ec(a.na,"Disk",e);){var f=e,g=b,h=c;d={};if(f.C)for(var k=0;k<f.C.length;k++){var m=f.C[k];if(m.li==g&&(m=m.fe[h])){for(var q in m.kf)f=m.kf[q],d[f[1]]=f[0];break}}if(d.length)break}return d}
function wz(a,b){a.ca=a;a.dc=a.Pl=1073741824;a.Aa=null;a.Ba=[];b=a.Ag(b.replace("keys","key").replace("kbd","keyboard"),!1,"|");if(b.length)for(var c in bc)0<=Ma(b,c)&&(a.dc|=bc[c],a.O(c+" messages enabled"));vz(a)}function Gl(a,b,c){for(var d in bc)if(b==bc[d]){a.Fa[d]=c;break}}l.hh=function(a,b){a=a.toUpperCase();if(null==b)var c=Ma(gA,a);else c=Ma(gA,a.substr(b,3)),0>c&&(c=Ma(gA,a.substr(b,2)));return c};
function hA(a,b){var c=0,d=a.ih(b);if(null!=d)switch(b){case iA:case jA:case kA:case lA:case mA:case nA:case oA:case pA:c=2;break;case qA:case rA:case sA:case tA:case uA:case vA:case wA:case xA:case yA:case zA+AA:case zA+BA:case zA+CA:case zA+DA:case zA+EA:case zA+FA:c=4;break;case GA:case HA:case IA:case JA:case KA:case LA:case MA:case NA:case OA:case PA:case QA:case RA:case SA:c=8;break;case TA:c=a.ra}return c?p(d,c):"??"}
l.ih=function(a){if(0<=a){var b=this.G;switch(a){case iA:var c=b.D&255;break;case jA:c=b.I&255;break;case kA:c=b.L&255;break;case lA:c=b.H&255;break;case mA:c=b.D>>8&255;break;case nA:c=b.I>>8&255;break;case oA:c=b.L>>8&255;break;case pA:c=b.H>>8&255;break;case qA:c=b.D&65535;break;case rA:c=b.I&65535;break;case sA:c=b.L&65535;break;case tA:c=b.H&65535;break;case uA:c=y(b)&65535;break;case vA:c=b.N&65535;break;case wA:c=b.K&65535;break;case xA:c=b.J&65535;break;case yA:c=z(b)&65535;break;case TA:c=
Be(b);break;case zA+AA:c=b.pa.T;break;case zA+BA:c=b.ba.T;break;case zA+CA:c=b.U.T;break;case zA+DA:c=b.Fa.T;break;default:if(80286==this.G.da)a==OA&&(c=b.ra);else if(80386<=this.G.da)switch(a){case GA:c=b.D;break;case HA:c=b.I;break;case IA:c=b.L;break;case JA:c=b.H;break;case KA:c=y(b);break;case LA:c=b.N;break;case MA:c=b.K;break;case NA:c=b.J;break;case OA:c=b.ra;break;case PA:c=b.Qg;break;case QA:c=b.qd;break;case RA:c=b.wc;break;case zA+EA:c=b.Ka.T;break;case zA+FA:c=b.La.T;break;case SA:c=
z(b)}}}return c};
function UA(a,b){b=qz(a,b)||b;for(var c=0,d,e;0<=(c=b.indexOf("@",c));)e=a.hh(b,c+1),0<=e&&(b=b.substr(0,c)+hA(a,e)+b.substr(c+1+gA[e].length)),c++;for(c=0;0<=(c=b.indexOf("#",c));)e=b.substr(c+1,2),d=qa(e,16),null!=d&&32<=d&&127>d?(d=e+" '"+String.fromCharCode(d)+"'",b=b.replace("#"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("$",c));)e=b.substr(c+1,9),(d=aA(a,e))?(d=e+' "'+Hz(a,d)+'"',b=b.replace("$"+e,d),c+=d.length):c++;for(c=0;0<=(c=b.indexOf("^",c));)e=b.substr(c+1,9),(d=aA(a,e))?(Wz(a,d),
d=e+' "'+Hz(a,d,11)+'"',b=b.replace("^"+e,d),c+=d.length):c++;return b}l.message=function(a,b){b&&(a+=" at "+Rz(tz(this,z(this.G),this.G.ba.T))+" (%"+p(this.G.ea)+")");this.dc&536870912?this.Ba.push(a):this.Aa&&a==this.Aa||(this.Aa=a,this.dc&-2147483648&&(vk(this),a+=" (cpu halted)"),this.O(a),this.G&&(a=this.G,a.aa.Qf=!0,Id(a)))};
function el(a,b,c,d){var e;d||(d=r(a,1)&&0>VA.indexOf(b),d||(e=WA[b])&&(d=r(a,e)?!0:524288==e&&r(a,e=1048576)));if(d){var f=a.G.D>>8&255;var g=a.G.L&255;if(33==b&&11==f||524288==e&&128<=g||1048576==e&&128>g)d=!1}d&&((e=(e=ac[b])&&e[f]||"")&&(e=" "+UA(a,e)),a.message("INT "+va(b)+": AH="+va(f)+" at "+Gz(c-2-a.G.ba.ua,a.G.ba.T)+e));return d}
function Xb(a,b,c,d,e,f,g,h){h|=256;if(null==e||(a.dc&h)==h)h=null,null!=e&&(h=a.G.ba.T,e-=a.G.ba.ua),a.message(b.ze+"."+(null!=d?"outPort":"inPort")+"("+wa(c)+","+(f?f:"unknown")+(null!=d?","+va(d):"")+")"+(null!=g?": "+va(g):"")+(null!=e?" at "+Gz(e,h):""))}l.jh=function(){this.O("Type ? for help with PCx86 Debugger commands");XA(this);if(this.Ka){var a=this.Ka;this.Ka=null;xz(this,a)}};
function vz(a,b){var c;if(Sg(a)){if(!a.U||!a.U.length){a.U=Array(YA);for(c=0;c<a.U.length;c++)a.U[c]=tz(a);a.qa=0;b||a.O("instruction history buffer allocated")}if(!a.M||!a.M.length)for(a.M=Array(256),c=0;c<a.M.length;c++)a.M[c]=[c,0]}else a.U&&a.U.length&&!b&&a.O("instruction history buffer freed"),a.qa=0,a.U=[],a.M=[]}
function Sz(a,b,c,d){if(!ZA(a))return!1;a.P=0;do{b||Sg(a)&&Vg(a,a.G.ea,0);try{var e=a.G.Kg(b);0<e&&(a.P+=e,Qd(a.G,e,!0),Ld(a.G,e),a.ba++)}catch(g){if("number"!=typeof g){var f=g;a.P=0;Pb(a.G,f.stack||f.message)}}}while(a.G.M&3312);!1!==d&&Id(a.G);XA(a,c||!1);return 0<a.P}function vk(a,b){return a.G&&Jd(a.G,b)||!1}function XA(a,b){void 0===b&&(b=!0);a.N=tz(a,z(a.G),a.G.ba.T);b&&1!=a.K?$A(a):aB(a)}
function ZA(a,b){var c;(c=!a.G||!Rb(a.G))||(c=a.G,c.aa.ac?c=!0:(c.O(c.toString()+" not powered"),c=!1),c=!c);return c||a.G.aa.Xa?(b||a.O("cpu busy or unavailable, command ignored"),!1):!Qb(a.G)}l.$b=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};l.Zb=function(a,b){b&&this.O(a?"suspending":"shutting down");return a?this.save():!0};l.reset=function(a){vz(this);this.ba=this.ka=0;this.Aa=null;this.P=0;this.N=tz(this,z(this.G),this.G.ba.T);bB(this);a||this.aa.Xa||XA(this)};
l.save=function(){var a=new eg(this);a.set(0,Yz(this.N));a.set(1,Yz(this.Ca));a.set(2,Yz(this.ea));a.set(3,[this.C,this.fa,this.dc]);a.set(4,this.F);a.set(5,[this.B,this.V,this.L]);return a.data()};
l.restore=function(a){var b=0;a[b]&&(this.N=Zz(a[b++]));a[5]&&(this.Ca=Zz(a[b++]));a[b]&&(this.ea=Zz(a[b++]));a[b]&&(this.C=a[b][0],"string"==typeof this.C&&(this.C=[this.C]),this.fa=a[b][1],this.dc|=a[b][2],b++);a[b]&&(this.F=a[b++]);a[b]&&(cB(this,this.B,a[b][0]),cB(this,this.V,a[b][1]),cB(this,this.L,a[b][2]));return!0};l.start=function(a,b){this.K||this.O("running");this.aa.Xa=!0;this.lb=a;this.jd=b};
l.stop=function(a,b){if(this.aa.Xa){this.aa.Xa=!1;this.P=b-this.jd;if(!this.K){b="stopped";if(this.P){a-=this.lb;var c=0<a?Math.round(1E3*this.P/a):0;b+=" (";Sg(this)&&(b+=this.ba+" opcodes, ",this.ka-=this.ba,this.ba=0);b+=this.P+" cycles, "+a+" ms, "+c+" hz)"}else r(this,-2147483648)&&(b+=" (use the 't' command to execute blocked faults)");this.O(b)}XA(this,!0);this.dd();bB(this,this.G.ea)}};function Sg(a){return 1<a.B.length||!!a.wa||r(a,16)}
function Vg(a,b,c){var d=a.G;if(0<c&&(a.wa&&!--a.wa||dB(a,b,1,a.B)))return!0;0<=c&&a.M.length&&(a.ba++,b=Eg(d,b),null!=b&&(a.M[b][1]++,b=a.U[a.qa],Xz(a,b,z(d),d.ba.T),b.jj=Md(d),++a.qa==a.U.length&&(a.qa=0)));return!1}function qd(a,b,c){return dB(a,b,c||1,a.V)?(vk(a,!0),!0):!1}function xd(a,b,c){return dB(a,b,c||1,a.L)?(vk(a,!0),!0):!1}function Vc(a,b,c){a.O("break on input from port "+wa(b)+": "+p(c));vk(a,!0)}function Zc(a,b,c){a.O("break on output to port "+wa(b)+": "+p(c));vk(a,!0)}
function uz(a){var b;a.B=["bp"];if(a.V)for(b=1;b<a.V.length;b++){var c=a.V[b];tf(a.G,a.Vb(c),!1,c.type==Vz)}a.V=["br"];if(a.L)for(b=1;b<a.L.length;b++)c=a.L[b],tf(a.G,a.Vb(c),!0,c.type==Vz);a.L=["bw"];a.Ia=0}
l.sd=function(a,b,c,d){var e=!0;c||Qz(this,a,b,!1,!0);if(a!=this.B){var f=this.Vb(b);if(-1===f)this.O("invalid address: "+Rz(b)),e=!1;else{var g=this.G,h=b.type==Vz;(h?g.sc:g.Z)[f>>>g.lb].sd(f&g.Gb,a==this.L);h&&yc(g)}}e&&(a.push(b),c?(null!=b.za&&(b.T=null),b.xd=!0):(d||eB(this,a,a.length-1,"set"),vz(this)));return e};
function Qz(a,b,c,d,e){for(var f=!1,g=fB(a,a.Vb(c)),h=1;h<b.length;h++){var k=b[h];if(-1!==g&&g==fB(a,a.Vb(k))||-1===g&&c.T==k.T&&c.Ja==k.Ja)if(!d||k.xd){f=!0;k.xd||e||eB(a,b,h,"cleared");b.splice(h,1);b!=a.B&&tf(a.G,g,b==a.L,k.type==Vz);k.xd||vz(a);break}}return f}function gB(a,b){for(var c=1;c<b.length;c++)eB(a,b,c);return b.length-1}function eB(a,b,c,d){c=b[c];a.O(b[0]+" "+Rz(c)+(d?" "+d:c.Yk?' "'+c.Yk+'"':""))}
function cB(a,b,c){if(c[0]==b[0])for(var d=1;d<c.length;d++){var e=c[d];a.sd(b,e,e.xd,!0)}}function bB(a,b){if(void 0!==b)dB(a,b,1,a.B,!0),a.K=0;else for(b=1;b<a.B.length;b++){var c=a.B[b];if(c.xd){if(!Qz(a,a.B,c,!0))break;b=0}}}function fB(a,b){-1!==b&&(a=a.xa&-65536,(b&a)==a&&(b&=1048575));return b}
function dB(a,b,c,d,e){var f=!1;if(!a.Ia++){b=fB(a,b);r(a,-2147483632)&&204==Eg(a.G,b)&&(f=!0);for(var g=1;!f&&g<d.length;g++){var h=d[g];if(!e||h.xd){null!=h.T&&(h.za=null);for(var k=fB(a,a.Vb(h)),m=0;m<c;m++)if(b+m==k){var q;f=!0;h.xd&&(Qz(a,d,h,!0),e=!0);if(q=h.Ll){f=!1;for(var v=0;v<q.length;v++)if(!hB(a,q[v],!0)){if(q[v].indexOf("if")){f=!0;break}for(var u=v+1;u<q.length&&q[u].indexOf("else");u++)v++;if(u==q.length){f=!0;break}}a.G.aa.Xa||(f=!0)}if(f){e||eB(a,d,g,"hit");break}}}}}a.Ia--;return f}
function iB(a,b,c,d){for(var e=tz(a,b.Ja,b.T,b.za,b.type),f=a.ya(b,1),g=4,h=0,k=!1,m=!1;(102==f||103==f)&&g--;)102==f?k||(b.Kb=!b.Kb,k=!0):m||(b.ec=!b.ec,m=!0),h++,f=a.ya(b,1);g=-1;var q=jB;k=a.pa[f];m=k[0];m==kB&&(m=a.ya(b,1),k=lB[m]||zz,f|=m<<8,m=k[0]);if(m==mB){g=a.ya(b,1);var v=null;var u=g>>3&7,A=(3>(g>>6&3)?0:48)+u;(217==f||219==f)&&52<=A&&(A=u<<4|g&7);(u=nB[f])&&(v=u[A]);v&&(q=oB,k=v,m=k[0])}m>=q.length&&(g=a.ya(b,1),k=pB[m-q.length][g>>3&7],m=k[0]);q=q[m];u=k.length-1;v="";b.Kb&&(m==qB?q=
"CWDE":m==rB?q="CDQ":m>=sB&&m<=tB&&(q+="D"));if(164<=f&&167>=f||170<=f&&175>=f)u=0,b.Kb&&"W"==q.slice(-1)&&(q=q.slice(0,-1)+"D");f=-1;A=!0;for(var J=1;J<=u;J++){var H="";var G=k[J];if(void 0!==G){0>f&&(f=G>>uB);m==vB&&(f==wB?v="[%800]":f==xB&&(v="ES:["+(b.ec?"E":"")+"DI]"));var P=G&yB;if(P!=zB)if(P==AB)A=!1;else{var I=G&BB;if(I>=R)if(0>g&&(g=a.ya(b,1)),I<CB){I=a;H=G;var pa=u;G=b;var Z="",ib=g>>6,sa=g&7;if(3>ib){P=0==q.indexOf("FI");if(!ib&&(!G.ec&&6==sa||G.ec&&5==sa))ib=2;else{if(G.ec)if(4!=sa)sa+=
8;else{Z=I;var jb=ib,Tb=G,Kb=Z.ya(Tb,1),dc=Kb>>6,wc=Kb>>3&7;Kb&=7;var kb="";if(jb||5!=Kb)kb=DB[Kb+8];4!=wc&&(kb&&(kb+="+"),kb+=DB[wc+8],dc&&(kb+="*"+(1<<dc)));jb||5!=Kb||(kb&&(kb+="+"),kb+=p(Nz(Z,Tb,4)));Z=kb}Z||(Z=DB[sa])}1==ib?(I=I.ya(G,1),Z=I&128?Z+("-"+p(-(I<<24>>24),2)):Z+("+"+p(I,2))):2==ib&&(Z&&(Z+="+"),G.ec?(I=Nz(I,G,4),Z+=p(I)):(I=I.Vc(G,2),Z+=p(I,4)));Z="["+Z+"]";if(1==pa){I="";H&=yB;H==S&&(H=G.Kb?EB:T);switch(H){case FB:I="FAR";break;case U:I="BYTE";break;case T:if(P){I="INT16";break}I=
"WORD";break;case EB:I="DWORD";break;case GB:if(P){I="INT32";break}case HB:I="REAL32";break;case IB:if(P){I="INT64";break}case JB:I="REAL64";break;case KB:I="REAL80";break;case LB:I="BCD80"}I&&(Z=I+" "+Z)}}else Z=MB(I,sa,H,G);H=Z}else H=I==CB?MB(a,g&7,G,b):MB(a,g>>3&7,G,b);else if(I==NB)H="1";else if(I==V){H=a;P=G;I=b;G=" ";switch(P&yB){case U:P&W&&(G=p(H.ya(I,1),2));break;case OB:G=p(H.ya(I,1)<<24>>24,I.Kb?8:4);break;case S:if(I.Kb){G=p(Nz(H,I,4));break}case T:G=p(H.Vc(I,2),4);break;case FB:I=tz(H,
H.nb(I,!0),H.Vc(I,2),null,I.type,I.Kb,I.ec);G=Rz(I);H=PB(H,I);H[0]&&(G+=" ("+H[0]+")");break;default:G="imm("+wa(P)+")"}H=G}else I==QB?(b.ec?(H=8,G=Nz(a,b,4)):(H=4,G=a.Vc(b,2)),H="["+p(G,H)+"]"):I==RB?(H=P==U?a.ya(b,1)<<24>>24:a.nb(b,!0),G=b.Ja+H&(b.Kb?-1:65535),H=p(G,b.Kb?8:4),G=PB(a,tz(a,G,b.T)),G[0]&&(H+=" ("+G[0]+")")):I==X?H=P==SB?"ST":P==TB?"ST("+(g&7)+")":MB(a,(G&UB)>>8,G,b):I==VB?H=MB(a,(G&UB)>>8,WB,b):I==XB?H="DS:[SI]":I==YB&&(H="ES:[DI]");if(!H||!H.length){v="INVALID";break}0<v.length&&
(v+=",");v+=H||"???"}}}g="";k=Rz(e)+" ";if(-1!==e.za&&-1!==b.za){do if(g+=p(a.ya(e,1),2),null==e.za)break;while(e.za!=b.za)}k+=Ca(g,e.ec?25:17);k+=Ca(q,8);v&&(k+=" "+v);a.G.da<ZB[f]&&(c=ZB[f]+" CPU only");c&&A&&(k=Ca(k,e.ec?74:62)+";"+c,k=a.G.aa.Je?k+("cycles="+Md(a.G).toString()+" cs="+p(a.G.Y.vf)):k+(null!=d?"="+d.toString():""));$B(b,A,h);return k}
function MB(a,b,c,d){var e=c&BB;if(e==WB){if(b>FA||b>=EA&&80386>a.G.da)return"??";b+=zA}else if(e==aC)b+=OA;else if(e==bC)b+=cC;else if(e==dC)b+=eC;else if(a=c&yB,a>=T&&(b<qA&&(b+=qA-iA),a==EB||a==S&&d.Kb))b+=GA-qA;return gA[b]}
function fC(a,b){switch(b){case "V":a=qg(a.G);break;case "D":a=a.G.P&1024;break;case "I":a=a.G.P&512;break;case "T":a=a.G.P&256;break;case "S":a=pg(a.G);break;case "Z":a=og(a.G);break;case "A":a=ng(a.G);break;case "P":a=mg(a.G);break;case "C":a=lg(a.G);break;default:a=0}return b+(a?"1":"0")+" "}function Fz(a){return p(a,a&-65536?8:4)}function gC(a,b){b>=qA&&b<=xA&&4<a.ra&&(b+=GA-qA);var c=gA[b];b==OA&&80286==a.G.da&&(c="MS");return c+"="+hA(a,b)+" "}
function hC(a,b,c){return b.hc+"="+p(b.T,4)+(c?"["+p(b.ua,a.la)+","+Fz(b.Sa)+"]":"")}function iC(a,b,c,d,e){return b+"="+(null!=c?p(c,4):"")+"["+p(d,a.la)+","+p(e-d,4)+"]"}
function jC(a,b){void 0===b&&(b=Tz(a));var c=gC(a,qA)+gC(a,tA)+gC(a,rA)+gC(a,sA)+(4<a.ra?"\n":"")+gC(a,uA)+gC(a,vA)+gC(a,wA)+gC(a,xA)+"\n"+hC(a,a.G.U,b)+" "+hC(a,a.G.Fa,b)+" "+hC(a,a.G.pa,b)+" ";if(b){var d="TR="+p(a.G.ka.T,4),e=a.oa;e="A20="+(e.J||e.N!=e.C?"OFF ":"ON ");80386>a.G.da&&(d="\n"+d,c+=e,e="");c+="\n"+hC(a,a.G.ba,b)+" ";80386<=a.G.da&&(e+="\n",c+=hC(a,a.G.Ka,b)+" "+hC(a,a.G.La,b)+"\n");c+=iC(a,"LD",a.G.Hb.T,a.G.Hb.ua,a.G.Hb.ua+a.G.Hb.Sa)+" "+iC(a,"GD",null,a.G.Lb,a.G.Jc)+" "+iC(a,"ID",
null,a.G.Qb,a.G.ad)+" ";c=c+(d+" "+e)+gC(a,OA);80386<=a.G.da&&(c+=gC(a,QA)+gC(a,RA))}else 80386<=a.G.da&&(c+=hC(a,a.G.Ka,b)+" "+hC(a,a.G.La,b)+" ");return c+=gC(a,TA)+fC(a,"V")+fC(a,"D")+fC(a,"I")+fC(a,"T")+fC(a,"S")+fC(a,"Z")+fC(a,"A")+fC(a,"P")+fC(a,"C")}l.hj=function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0};
function nq(a,b,c,d,e,f,g,h){var k={},m=[],q;for(q in h){var v=h[q];"number"==typeof v&&(h[q]=v={o:v});var u=v.o,A=v.s,J=v.a;if(void 0!==u){void 0!==A&&(k.Ja=u,k.T=A,k.za=null,a.Vb(k),(k.za&-65536)==(a.oa.N&-65536)&&(k.za&=1048575),v.p=k.za);A=m;u=[u>>>0,q];var H=Ia(A,u,a.hj);0>H&&A.splice(-(H+1),0,u)}J&&(v.a=J.replace(/''/g,'"'))}a.F.push({li:b,Mn:c,T:d,Ja:e,za:f,An:g,Id:h,Ri:m})}
function Pz(a,b,c){for(var d=0;d<a.F.length;d++){var e=a.F[d];if(!b||e.li==b)if(b&&c==e.Mn||!b&&c==e.T){a.F.splice(d,1);break}}}function PB(a,b,c){for(var d=[],e=b.Ja>>>0,f=a.Vb(b)>>>0,g=0;g<a.F.length;g++){var h=a.F[g],k=h.T,m=h.Ja>>>0,q=h.za;null!=q&&(q>>>=0);var v=h.An;48==k&&(k=40);if(k==b.T&&e>=m&&e<m+v||null!=q&&f>=q&&f<q+v){b=Ia(h.Ri,[e],a.hj);0<=b?kC(a,g,b,d):c&&(b=~b,kC(a,g,b-1,d),kC(a,g,b,d));break}}return d}
function kC(a,b,c,d){var e={},f=a.F[b].Ri,g=0,h=null;0<=c&&c<f.length&&(g=f[c][0],h=f[c][1]);h&&(e=a.F[b].Id[h],h="."==h.charAt(0)?null:e.l||h);d.push(h);d.push(g);d.push(e.a);d.push(e.c)}
function lC(a,b){if("?"==b)a.O("frequency commands:"),a.O("\tclear\tclear all frequency counts");else{var c=0;if(a.M)if("clear"==b){for(b=0;b<a.M.length;b++)a.M[b]=[b,0];a.O("frequency data cleared");c++}else if(void 0!==b)a.O("unknown frequency command: "+b),c++;else{var d=a.M.slice();d.sort(function(a,b){return b[1]-a[1]});for(b=0;b<d.length;b++){var e=d[b][0],f=d[b][1];f&&(a.O((jB[a.pa[e][0]]+" ").substr(0,5)+" ("+va(e)+"): "+f+" times"),c++)}}c||a.O("no frequency data available")}}
function mC(a,b){var c=b.match(/^\s*([A-Z_]?[A-Z0-9_]*)\s*(=?)\s*(.*)$/i);if(c){if(!c[1])return rz(a)||a.O("no variables"),!0;if(!c[2])return rz(a,c[1]);if(!c[3])return delete a.I[c[1]],!0;b=oz(a,c[3]);return void 0!==b?(a.I[c[1]]={value:b,vp:void 0},!0):!1}a.O("invalid assignment:"+b);return!1}
function nC(a,b,c){var d=null;if(b=aA(a,b,!0)){a.Vb(b);var e=PB(a,b,!0);if(e.length){var f;if(e[0]){var g="";(f=b.Ja-e[1])&&(g=" + "+wa(f));f=e[0]+" ("+Gz(e[1],b.T)+")"+g;c&&a.O(f);d=f}4<e.length&&e[4]&&(g="",(f=e[5]-b.Ja)&&(g=" - "+wa(f)),f=e[4]+" ("+Gz(e[5],b.T)+")"+g,c&&a.O(f),d||(d=f))}else c&&a.O("no symbols")}return d}
function oC(a,b){if(b[1]&&"?"!=b[1]){var c="json"==b[1],d=0,e=0,f=c?{}:aA(a,b[1]);if(f){var g=iz(a,b[2],"drive #");if(void 0!==g){if(!c){d=iz(a,b[3],"sector #");if(void 0===d)return;e=iz(a,b[4],"# of sectors");void 0===e&&(e=1)}var h=a.cb;2<=g&&a.Pa&&(g-=2,h=a.Pa);if(h){var k=h.ij(g);if(k)if(k.va)if(c)pC(a.na),a.O(Mw(k.va));else if(h.$k(k,d,e)){var m=0,q=!1;for(b=Rz(f);!q&&0<k.yb--;)(function(a,b){h.ue(k,function(c){0>c?(a.O("out of data at address "+Rz(b)),q=!0):(a.ub(b,c,1,!0),m++)})})(a,f);Id(a.G,
!0);a.O(m+" bytes read at "+b)}else a.O("sector "+d+" request out of range");else a.O("drive "+g+" not loaded");else a.O("invalid drive: "+g)}else a.O("disk controller not present")}}}else a.O("load commands:"),a.O("\tl [address] [drive #] [sector #] [# sectors]")}
function $A(a,b){var c;if(b&&"?"==b[1])a.O("register commands:"),a.O("\tr\tdump registers"),a.Kc&&a.O("\trfp\tdump floating-point registers"),a.O("\trp\tdump all registers"),a.O("\trx [#]\tset flag or register x to [#]");else{null==c&&(c=!0);if(b&&1<b.length){var d=b[1];if(a.Kc&&"fp"==d){c=a.Kc;var e=Yg(c);b=c.bc;for(var f=0;8>f;f++){var g=c;d=null;if(f<g.F.length){d=[];var h=g.B+f&7;d[0]=h;d[1]=Ah(g,h);d[2]=g.F[h];h<<=1;d[3]=g.L[h];d[4]=g.L[h+1];g=Eh(g,d[3],d[4]);d[5]=g[0];d[6]=g[1];d[7]=g[2]}if(!d)break;
a.O("ST"+f+": "+Ca(d[2].toFixed(15),24,!0)+" "+p(d[4])+","+p(d[3])+" ["+d[0]+":"+qC[d[1]]+"]")}a.O(" B3SSS210ESPUOZDI xxxIRRPPIxPUOZDI");a.O("SW: "+ta(e,16)+" ("+wa(e)+") CW: "+ta(b,16)+" ("+wa(b)+")");return}if("p"==d)e=80286<=a.G.da;else{f=d.indexOf("=");if(0<f)b=d.substr(f+1),d=d.substr(0,f);else if(2<b.length)b=b[2];else{a.O("missing value for "+b[1]);return}g=oz(a,b);if(void 0===g)return;f=!0;h=d.toUpperCase();"E"==h.charAt(0)&&4>=a.ra&&(h=null);switch(h){case "AL":a.G.D=
a.G.D&-256|g&255;break;case "AH":a.G.D=a.G.D&-65281|g<<8&255;break;case "AX":a.G.D=a.G.D&-65536|g&65535;break;case "BL":a.G.H=a.G.H&-256|g&255;break;case "BH":a.G.H=a.G.H&-65281|g<<8&255;break;case "BX":a.G.H=a.G.H&-65536|g&65535;break;case "CL":a.G.I=a.G.I&-256|g&255;break;case "CH":a.G.I=a.G.I&-65281|g<<8&255;break;case "CX":a.G.I=a.G.I&-65536|g&65535;break;case "DL":a.G.L=a.G.L&-256|g&255;break;case "DH":a.G.L=a.G.L&-65281|g<<8&255;break;case "DX":a.G.L=a.G.L&-65536|g&65535;break;case "SP":re(a.G,
y(a.G)&-65536|g&65535);break;case "BP":a.G.N=a.G.N&-65536|g&65535;break;case "SI":a.G.K=a.G.K&-65536|g&65535;break;case "DI":a.G.J=a.G.J&-65536|g&65535;break;case "DS":xe(a.G,g);break;case "ES":ye(a.G,g);break;case "SS":qe(a.G,g);break;case "CS":gg(a.G,g);a.N=tz(a,z(a.G),a.G.ba.T);break;case "IP":case "EIP":C(a.G,g);a.N=tz(a,z(a.G),a.G.ba.T);break;case "PC":case "PS":Ce(a.G,g);break;case "C":g?sg(a.G):tg(a.G);break;case "P":g?(d=a.G,d.resultType&=-3,d.P|=4):(d=a.G,d.resultType&=-3,d.P&=-5);break;
case "A":g?Ag(a.G):yg(a.G);break;case "Z":g?Bg(a.G):zg(a.G);break;case "S":g?(d=a.G,d.resultType&=-17,d.P|=128):(d=a.G,d.resultType&=-17,d.P&=-129);break;case "I":g?(d=a.G,d.P|=512):(d=a.G,d.P&=-513);break;case "D":g?(d=a.G,d.P|=1024):(d=a.G,d.P&=-1025);break;case "V":g?ug(a.G):vg(a.G);break;default:var k=!0;if(80286<=a.G.da)switch(k=!1,h){case "MS":Cg(a.G,g);break;case "TR":-1===a.G.ka.load(g)&&(f=!1);break;default:if(k=!0,80386<=a.G.da)switch(k=!1,h){case "EAX":a.G.D=g;break;case "EBX":a.G.H=g;
break;case "ECX":a.G.I=g;break;case "EDX":a.G.L=g;break;case "ESP":re(a.G,g);break;case "EBP":a.G.N=g;break;case "ESI":a.G.K=g;break;case "EDI":a.G.J=g;break;case "FS":a.G.Ka.load(g);break;case "GS":a.G.La.load(g);break;case "CR0":a.G.ra=g;jk.call(a.G,g);break;case "CR2":a.G.qd=g;break;case "CR3":a.G.wc=g;a.G.wc=g;yc(a.G);break;default:k=!0}}if(k){a.O("unknown register: "+d);return}}if(!f){a.O("invalid value: "+b);return}Id(a.G);a.O("updated registers:")}}a.O(jC(a,e));c&&(a.N=tz(a,z(a.G),a.G.ba.T),
aB(a,Rz(a.N)))}}function rC(a,b){b=Da(b);var c=b.match(/^(['"])(.*?)\1$/);c?a.O(UA(a,c[2])):oz(a,b,!1)}function sC(a,b,c){for(var d=null,e=b.Ja,f=e,g=1;6>=g&&e;g++){if(2<g){b.Ja=e;b.za=null;var h=iB(a,b);if(0<=h.indexOf("CALL")||c&&0<=h.indexOf("INT")){var k=h.indexOf(" ");if(e+(h.indexOf(" ",k+1)-k-1)/2==f){d=h;break}}}e--}b.Ja=f;return d}
function tC(a,b,c){var d="t"!=b;c=iz(a,c,null,!0)||1;var e=1==c?0:1;"tc"==b&&(e=c,c=1);cb(c,function(){return Vb(a,!0)&&Sz(a,e,d,!1)},function(){Id(a.G);Vb(a,!1)})}function $B(a,b,c){if(a.dh=b)null!=a.qj&&(a.Kb=a.qj),null!=a.pj&&(a.ec=a.pj),a.qj=a.Kb,a.pj=a.ec;a.Fe=c||0}
function aB(a,b,c,d){if(b=aA(a,b,!0)){void 0===d&&(d=1);var e=256;if(void 0!==c){d=aA(a,c,!0);if(!d||d.Ja<b.Ja)return;e=d.Ja-b.Ja+1;0>e&&(e=1);4096<e&&(e=4096);d=-1}c=0;for($B(b,!0);0<e&&d--;){var f=Ub(a,!1)||a.K?a.P:null;var g=null!=f?"cycles":null,h=PB(a,b),k=b.za;if(h[0]&&d&&(!c&&d||0>h[0].indexOf("+"))){var m=h[0]+":";h[2]&&(m+=" "+h[2]);a.O(m)}h[3]&&(g=h[3],f=null);f=iB(a,b,g,f);b.dh||d||d++;a.O(f);a.N=b;e-=b.za-k;c++}}}
l.Ag=function(a,b,c){if(b)if(a){0>this.A&&this.C.length&&(this.A=0);if(0>this.A||a!=this.C[this.A])this.C.splice(0,0,a),this.A=0;this.A--}else a=this.C[this.A+1];b=[];if(a){a=a.toLowerCase().replace(/""/g,"'");var d=0,e=null;c=c||";";for(var f=0;f<=a.length;f++){var g=a.charAt(f);if('"'==g||"'"==g)e?g==e&&(e=null):e=g;else if(g==c&&!e||!g)b.push(Da(a.substring(d,f))),d=f+1}}return b};
function hB(a,b,c){var d=!0;try{if(!b.length||"end"==b)a.fa&&(a.O("ended assemble at "+Rz(a.ea)),a.N=a.ea,a.fa=!1),b="";else if(!c){var e=">> ";a.G.ra&1&&(e=a.G.P&131072?"-- ":"## ");a.O(e+b)}var f=b.charAt(0);if('"'==f||"'"==f)return!0;a.Aa=null;if(Rb(a)&&0<b.length){a.fa&&(b="a "+Rz(a.ea)+" "+b);var g=b.replace(/ +/g," ").split(" ");if(g&&g.length)for(var h=g[0],k=h.charAt(0),m=1;m<h.length;m++){var q=h.charAt(m);if("?"==k||"r"==k||"a">q||"z"<q){g[0]=h.substr(m);g.unshift(h.substr(0,m));break}}switch(g[0].charAt(0)){case "a":var v=
aA(a,g[1],!0);if(v)if(a.ea=v,void 0===g[2])a.O("begin assemble at "+Rz(v)),a.fa=!0,Id(a.G);else{a.O("not supported yet");var u=[];if(u.length){for(var A=0;A<u.length;A++)a.ub(v,u[A],1);a.O(iB(a,a.ea))}}break;case "b":a:{var J=g[0],H=g[1],G=b;if("?"==H)a.O("breakpoint commands:"),a.O("\tbi [p]\ttoggle break on input port [p]"),a.O("\tbo [p]\ttoggle break on output port [p]"),a.O("\tbp [a]\tset exec breakpoint at addr [a]"),a.O("\tbr [a]\tset read breakpoint at addr [a]"),a.O("\tbw [a]\tset write breakpoint at addr [a]"),
a.O("\tbc [a]\tclear breakpoint at addr [a]"),a.O("\tbl\tlist all breakpoints"),a.O("\tbn [n]\tbreak after [n] instruction(s)");else{var P=J.charAt(1);if("l"==P){var I=0+gB(a,a.B);I+=gB(a,a.V);(I+=gB(a,a.L))||a.O("no breakpoints")}else if("n"==P)a.wa=iz(a,H),a.O("break after "+a.wa+" instruction(s)");else if(void 0===H)a.O("missing breakpoint address");else{var pa={};if("*"!=H&&(pa=aA(a,H,!0,!0),!pa))break a;H=null==pa.Ja?H:wa(pa.Ja);"c"==P?null==pa.Ja?(uz(a),a.O("all breakpoints cleared")):Qz(a,
a.B,pa)||Qz(a,a.V,pa)||Qz(a,a.L,pa)||a.O("breakpoint missing: "+Rz(pa)):"i"==P?a.O("breakpoint "+(Rc(a.oa,pa.Ja)?"enabled":"cleared")+": port "+H+" (input)"):"o"==P?a.O("breakpoint "+(Wc(a.oa,pa.Ja)?"enabled":"cleared")+": port "+H+" (output)"):null!=pa.Ja&&(dA(a,pa,G),"p"==P?a.sd(a.B,pa):"r"==P?a.sd(a.V,pa):"w"==P?a.sd(a.L,pa):a.O("unknown breakpoint command: "+P))}}}break;case "c":pC(a.na);break;case "d":a:{var Z=g,ib,sa=Z[0],jb=Z[1],Tb=Z[2],Kb=Z[3];if("?"==jb){var dc="";for(ib in bc)a.Fa[ib]&&
(dc&&(dc+=","),dc+=ib);dc+=",state,symbols";a.O("dump memory commands:");a.O("\tdb [a] [#] dump # bytes at address a");a.O("\tdw [a] [#] dump # words at address a");a.O("\tdd [a] [#] dump # dwords at address a");a.O("\tdh [#] [#] dump # instructions from history");a.O("\tdi [#] dump descriptor info for IDT #");a.O("\tds [#] dump descriptor info for selector #");dc.length&&a.O("dump extension commands:\n\t"+dc)}else if("state"==jb){var wc=uC(a.na,!0);wc?"console"==Tb?console.log(wc):
(pC(a.na),a.O(wc)):a.O("powerOff() error")}else if("symbols"==jb)for(var kb=0;kb<a.F.length;kb++){var lf=a.F[kb],Td;for(Td in lf.Id)if("."!=Td.charAt(0)){var mf=lf.Id[Td],Fg=mf.o;if(void 0!==Fg){var nf=mf.s;void 0===nf&&(nf=lf.T);var Gg=lf.Id[Td].l;Gg&&(Td=Gg);a.O(Gz(Fg,nf)+" "+Td)}}}else{if("ds"==sa||"dg"==sa||"dl"==sa)sa="d",Z=[sa,"desc",jb];"d"==sa&&"page"==jb&&(sa="dp",Z.shift());if("dp"==sa){Z.shift();var Cm=Z[0];if(Cm){var $g=a.Vb(aA(a,Cm));if(-1===$g)a.O("invalid address: "+Cm);else{var xf,
Sa=null;if(80386<=a.G.da){var yf=a.oa;Sa={};Sa.Jk=($g&-4194304)>>>20;Sa.Wi=a.G.wc+Sa.Jk;Sa.pb=yf.Z[(Sa.Wi&yf.C)>>>yf.A];Sa.Dj=Sa.pb.Nd(Sa.Jk);Sa.Kk=($g&4190208)>>>10;Sa.Xi=(Sa.Dj&-4096)+Sa.Kk;Sa.qb=yf.Z[(Sa.Xi&yf.C)>>>yf.A];Sa.Ej=Sa.qb.Nd(Sa.Kk);Sa.Nl=(Sa.Ej&-4096)+($g&4095)}if(xf=Sa){a.O("linear PDE addr PDE PTE addr PTE physical");a.O("--------- ---------- -------- ---------- -------- ----------");var ij="%"+p($g);ij+=" %%"+fA(xf.Wi,xf.Dj);ij+=" %%"+
fA(xf.Xi,xf.Ej,!0);ij+=" %%"+p(xf.Nl);a.O(ij)}else a.O("unsupported operation")}}else a.O("missing address")}else{if("d"==sa){if("disk"==jb){Z[0]="l";Z[1]="json";oC(a,Z);break a}for(ib in bc)if(Z[1]==ib){var Rt=a.Fa[ib];Rt?(Z.shift(),Z.shift(),Rt(Z)):a.O("no dump registered for "+jb);break a}jb||(sa=a.mb||"db")}if("dh"==sa){var St=jb,Tt=Tb,ah=Kb;ah=void 0===ah?"history":ah;var Ut="",Vt=0,Sc=a.qa,sd=a.U;if(sd.length){var Bc=+St||a.Ra,bh=+Tt||10;isNaN(Bc)?Bc=bh:Ut="more ";Bc>sd.length&&(a.O("note: only "+
sd.length+" available"),Bc=sd.length);Sc-=Bc;0>Sc&&(null==sd[sd.length-1].T?(Bc=Sc+Bc,Sc=0):Sc+=sd.length);var Dm=[];"call"==Tt&&(bh=1E5,Dm=["CALL"]);for(void 0!==St&&a.O(Bc+" instructions earlier:");0<bh&&Sc!=a.qa;){var td=sd[Sc++];if(null==td.T)break;var ch=tz(a,td.Ja,td.T,td.za,td.type,td.Kb,td.ec),Wt=Bc--;null!=td.jj&&"cycles"==ah&&(Wt=td.jj);var Xt=iB(a,ch,ah,Wt);(!Dm.length||0<=Xt.indexOf(Dm[0]))&&a.O(Xt);ch.Fe&&(Sc+=ch.Fe,bh-=ch.Fe,Bc-=ch.Fe);Sc>=sd.length&&(Sc=0);a.Ra=Bc;Vt++;bh--}}Vt||(a.O("no "+
Ut+"history available"),a.Ra=void 0)}else if("di"==sa){Z.shift();var Em=Z[0];if(Em){var dh=iz(a,Em);if(void 0===dh||0>dh||255<dh)a.O("invalid vector: "+Em);else{var Yt="&",Zt=!!(a.G.ra&1),$t=!1,jj=a.G.Qb+(dh<<(Zt?3:2)),au=a.G.ja(jj+0),jD=a.G.ja(jj+2);Zt&&(Yt="#",a.G.ja(jj+4)&2048&&($t=!0,au|=a.G.ja(jj+6)<<16));a.O("dumpIDT("+wa(dh)+"): "+Yt+p(jD,4)+":"+p(au,$t?8:4))}}else a.O("no IDT vector")}else if("dt"==sa)Z.shift(),a.O("no information");else if(sa[1]&&0>"abwd".indexOf(sa[1]))a.O("unrecognized dump command");
else{a.mb=sa;var Ge=aA(a,jb);if(Ge&&(null!=Ge.T||null!=Ge.za)){var zf=0;if(Tb){if("l"==Tb.charAt(0))Tb=Tb.substr(1)||Kb,zf=iz(a,Tb);else{var bu=aA(a,Tb);if(!bu)break a;zf=bu.Ja-Ge.Ja+1}if(0>zf||65536<zf)zf=0}var He="",Fm=!1,Af="dd"==sa?4:"dw"==sa?2:1,eh=Af*zf||128,Gm=eh+15>>4||1,Hm=4==Af?16:a.D;"a"==sa[1]&&(Fm=!0,Gm=25,Hm=160,eh=Gm*Hm);for(;Gm--&&0<eh;){var kj=0,Im=0,fh,Jm="",lj="";jb=Rz(Ge);for(fh=Hm;0<fh&&0<eh;fh--){var mj=a.ya(Ge,1);kj|=mj<<(Im++<<3);Im==Af&&(Jm+=8==a.D?ua(kj,3*Af):p(kj,2*Af),
Jm+=1==Af?9==fh?"-":" ":" ",kj=Im=0);lj+=32<=mj&&127>mj?String.fromCharCode(mj):Fm?"":".";eh--}He&&(He+="\n");He=Fm?He+lj:He+(jb+" "+Jm+Ca(lj,lj.length+3*fh+1,!0))}He&&a.O(He.replace(/\s*$/,""));a.Ca=Ge}}}}}break;case "e":if("else"==g[0])break;var nj=1,cu=255,du=a.ya,eu=a.ub;"ew"==g[0]&&(nj=2,cu=65535,du=a.Vc,eu=a.Bl);var fu=nj<<1,gu=g[1];if(null==gu)a.O("edit memory commands:"),a.O("\teb [a] [...] edit bytes at address a"),a.O("\tew [a] [...] edit words at address a");else{var oj=aA(a,gu);if(oj)for(var pj=
2;pj<g.length;pj++){var gh=oz(a,g[pj]);if(void 0===gh){a.O("unrecognized value: "+g[pj]);break}gh&~cu&&a.O("warning: "+p(gh)+" exceeds "+nj+"-byte value");var kD=du.call(a,oj);a.O("changing "+Rz(oj)+" from "+p(kD,fu,!0)+" to "+p(gh,fu,!0));eu.call(a,oj,gh,nj)}}break;case "f":lC(a,g[1]);break;case "g":a:{var hu=g[1],lD=b;"gt"==g[0]&&(a.Ga=!0);if(void 0!==hu){var Km=aA(a,hu,!0);if(!Km)break a;dA(a,Km,lD);a.sd(a.B,Km,!0)}ZA(a,c)&&Kd(a.G,!0,c)}break;case "h":vk(a)||Ub(a,!0)||c||a.O("already halted");
break;case "i":if("if"==g[0]){var hh=b.substr(2);hh=Da(hh);if(oz(a,hh)){c||a.O("true: "+hh);var iu=!0}else c||a.O("false: "+hh),iu=!1;iu||(d=!1);break}if("int"==g[0]){a:switch(iz(a,g[1])){case 19:el(a,19,a.G.ea,!0);a.ka=a.ba;var Lm=!0;break a;case 33:el(a,33,a.G.ea,!0);a.ka=a.ba;Lm=!0;break a;default:Lm=!1}Lm||(d=!1);break}var Mm=g[1];if(Mm&&"?"!=Mm){var Nm=iz(a,Mm);if(void 0!==Nm){var mD=Uc(a.oa,Nm,1);a.O(wa(Nm)+": "+va(mD))}}else a.O("input commands:"),a.O("\ti [p]\tread port [p]"),a.O("warning: port accesses can affect hardware state");
break;case "k":var nD=g[0];if("?"==g[1])a.O("stack trace commands:"),a.O("\tk\tshow frame addresses"),a.O("\tks\tshow symbol information");else{var Om=0,ju=a.G.ba.T,ih=tz(a),ae=tz(a,y(a.G),a.G.U.T);for(a.O("stack trace for "+Rz(ae));10>Om;){for(var ud=null,oD=256;ae.Ja>>>0<a.G.Sg>>>0;){ih.Ja=a.nb(ae,!0);if(null==ae.za||!oD--)break;ih.T=ju;if(ud=sC(a,ih))break;ih.T=a.nb(ae);if(ud=sC(a,ih,!0)){ju=a.nb(ae,!0);0<ud.indexOf("INT")&&a.nb(ae,!0);break}}if(!ud||null==ud)break;var ku=null;if("ks"==nD){var lu=
ud.match(/[0-9A-F]+$/);lu&&(ku=nC(a,lu[0]))}ud=Ca(ud,50)+" ;"+(ku||"stack="+Rz(ae));a.O(ud);Om++}Om||a.O("no return addresses found")}break;case "l":if("ln"==g[0]){nC(a,g[1],!0);break}oC(a,g);break;case "m":if("mouse"==g[0]){var Pm=g[1],qj=g[2];if(a.H){var mu=1;"-"==qj.charAt(0)&&(mu=-1,qj=qj.substr(1));var Ie=iz(a,qj,Pm);if(void 0!==Ie)switch(Ie=Ie*mu|0,Pm){case "x":a.H.tf(Ie,0);break;case "y":a.H.tf(0,Ie);break;case "click":a.H.Xd(Ie,!0);a.H.Xd(Ie,!1);break;default:a.O("unknown action: "+Pm)}}else a.O("no mouse");
break}a:{var vd,wd=null,fb=g[1];"?"==fb&&(fb=void 0);if(void 0!==fb){var be=0;if("all"==fb)be=1610481663,fb=null;else if("on"==fb)wd=!0,fb=null;else if("off"==fb)wd=!1,fb=null;else{"keys"==fb&&(fb="key");"kbd"==fb&&(fb="keyboard");for(vd in bc)if(fb==vd){be=bc[vd];wd=!!(a.dc&be);break}if(!be){a.O("unknown message category: "+fb);break a}}if(be)if("on"==g[2])a.dc|=be,wd=!0;else if("off"==g[2]&&(a.dc&=~be,wd=!1,536870912==be)){for(var Qm=0;Qm<a.Ba.length;Qm++)a.O(a.Ba[Qm]);a.Ba=[]}}var pD=0,jh="";for(vd in bc)if(!fb||
fb==vd){var qD=!!(a.dc&bc[vd]);if(null===wd||wd==qD)jh&&(jh+=","),++pD%10||(jh+="\n\t"),"key"==vd&&(vd="keys"),jh+=vd}void 0===fb&&a.O("message commands:\n\tm [category] [on|off]\tturn categories on/off");a.O((null!==wd?wd?"messages on: ":"messages off: ":"message categories:\n\t")+(jh||"none"));vz(a)}break;case "o":var Rm=g[1],rD=g[2];if(Rm&&"?"!=Rm){var Sm=iz(a,Rm,"port #"),Tm=iz(a,rD);void 0!==Sm&&void 0!==Tm&&(Yc(a.oa,Sm,1,Tm),a.O(wa(Sm)+": "+va(Tm)))}else a.O("output commands:"),a.O("\to [p] [b]\twrite byte [b] to port [p]"),
a.O("warning: port accesses can affect hardware state");break;case "p":if("print"==g[0]){rC(a,b.substr(5));break}var nu="pr"==g[0]?1:0,Bf=1+nu;if(a.K)a.O("step in progress");else{var ou=!1,Mb=tz(a,z(a.G),a.G.ba.T);do{var Um=!1;switch(a.ya(Mb)){case 38:case 46:case 54:case 62:case 100:case 101:case 102:case 103:case 240:Wz(a,Mb,1);Um=!0;break;case 204:case 206:a.K=Bf;Wz(a,Mb,1);break;case 205:case 224:case 225:case 226:a.K=Bf;Wz(a,Mb,Mb.Kb?4:2);break;case 232:a.K=Bf;Wz(a,Mb,Mb.Kb?5:3);break;case 154:a.K=
Bf;Wz(a,Mb,Mb.Kb?7:5);break;case 255:var pu=a.nb(Mb)&14591;if(4351==pu||6399==pu)a.K=Bf,iB(a,Mb);break;case 243:case 242:Wz(a,Mb,1);ou=Um=!0;break;case 108:case 109:case 110:case 111:case 164:case 165:case 166:case 167:case 170:case 171:case 172:case 173:case 174:case 175:ou&&(a.K=Bf,Wz(a,Mb,1))}}while(Um);a.K?(a.sd(a.B,Mb,!0),ZA(a,void 0)&&Kd(a.G,void 0,void 0)||(a.na&&a.na.dd(),a.K=0)):tC(a,nu?"tr":"t")}break;case "r":if("reset"==b){a.na&&a.na.reset();break}$A(a,g);break;case "t":tC(a,g[0],g[1]);
break;case "u":aB(a,g[1],g[2],8);break;case "v":if("var"==g[0]){mC(a,b.substr(3))||(d=!1);break}a.O("PCx86 version 1.40.0 ("+a.G.da+",RELEASE,NOPREFETCH"+(Yb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)");a.O(Ra());break;case "x":a:if(g[1]&&"?"!=g[1])switch(g[1]){case "cs":var kh;void 0!==g[3]&&(kh=+g[3]);switch(g[2]){case "int":a.G.Y.Se=kh;break;case "start":a.G.Y.xf=kh;break;case "stop":a.G.Y.Ue=kh;break;default:a.O("unknown cs option");break a}void 0!==kh&&Hd(a.G);a.O("checksums "+(a.G.aa.Je?"enabled":
"disabled"));break;case "sp":void 0!==g[2]&&(Od(a.G,+g[2])||a.O("warning: using 1x multiplier, previous target not reached"));a.O("target speed: "+(a.G.Y.pe.toFixed(2)+"Mhz")+" ("+a.G.Y.Ad+"x)");break;default:a.O("unknown option: "+g[1])}else a.O("execution options:"),a.O("\tcs int #\tset checksum cycle interval to #"),a.O("\tcs start #\tset checksum cycle start count to #"),a.O("\tcs stop #\tset checksum cycle stop count to #"),a.O("\tsp #\t\tset speed multiplier to #");break;case "?":if(g[1]){rC(a,
b.substr(1));break}var Vm="commands:",Wm;for(Wm in vC)Vm+="\n"+Ca(Wm,7)+vC[Wm];Sg(a)||(Vm+="\nnote: frequency/history disabled if no exec breakpoints");a.O(Vm);break;default:a.O("unknown command: "+b),d=!1}}}catch(ru){a.O("debugger error: "+(ru.stack||ru.message)),d=!1}return d}function xz(a,b,c){b=a.Ag(b,c);for(var d in b)if(!hB(a,b[+d]))return!1;return!0}
var WA={16:262144,19:524288,21:32768,22:65536,28:2048,33:134217728,51:16777216},VA=[26,28,40,42,109],vC={"?":"help/print","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory",f:"frequencies","g [#]":"go [to #]",h:"halt","i [#]":"input port #","if":"eval expression",k:"stack trace",l:"load sector(s)",ln:"list nearest symbol(s)",m:"messages",mouse:"mouse action","o [#]":"output port #",p:"step over",print:"print expression",r:"dump/set registers",reset:"reset machine",
"t [#]":"trace","u [#]":"unassemble",x:"execution options",v:"print version","var":"assign variable"},bA=0,Uz=1,Dz=2,eA=3,cA=4,Vz=5,qB=18,rB=28,mB=36,vB=80,sB=104,tB=107,kB=176,jB="INVALID AAA AAD AAM AAS ADC ADD AND ARPL AS: BOUND BSF BSR BT BTC BTR BTS CALL CBW CLC CLD CLI CLTS CMC CMP CMPSB CMPSW CS: CWD DAA DAS DEC DIV DS: ENTER ES: ESC FS: GS: HLT IBTS IDIV IMUL IN INC INS INT INT3 INTO IRET JBE JC JCXZ JG JGE JL JLE JMP JA JNC JNO JNP JNS JNZ JO JP JS JZ LAHF LAR LDS LEA LEAVE LES LFS LGDT LGS LIDT LLDT LMSW LOADALL LOCK LODSB LODSW LOOP LOOPNZ LOOPZ LSL LSS LTR MOV MOVSB MOVSW MOVSX MOVZX MUL NEG NOP NOT OR OS: OUT OUTS POP POPA POPF PUSHF PUSHA PUSH RCL RCR REPNZ REPZ RET RETF ROL ROR SAHF SALC SAR SBB SCASB SCASW SETBE SETC SETG SETGE SETL SETLE SETNBE SETNC SETNO SETNP SETNS SETNZ SETO SETP SETS SETZ SGDT SHL SHLD SHR SHRD SIDT SLDT SMSW SS: STC STD STI STOSB STOSW STR SUB TEST VERR VERW WAIT XBTS XCHG XLAT XOR".split(" "),
oB="FLD FST FSTP FXCH FILD FIST FISTP FBLD FBSTP FADD FADDP FIADD FSUB FSUBP FISUB FSUBR FSUBRP FISUBR FMUL FMULP FIMUL FDIV FDIVP FIDIV FDIVR FDIVRP FIDIVR FSQRT FSCALE FPREM FRNDINT FXTRACT FABS FCHS FCOM FCOMP FCOMPP FICOM FICOMP FTST FXAM FPTAN FPATAN F2XM1 FYL2X FYL2XP1 FLDZ FLD1 FLDPI FLDL2T FLDL2E FLDLG2 FLDLN2 FINIT FNINIT FDISI FNDISI FENI FNENI FLDCW FSTCW FNSTCW FSTSW FNSTSW FCLEX FNCLEX FSTENV FNSTENV FLDENV FSAVE FNSAVE FRSTOR FINCSTP FDECSTP FFREE FFREEP FNOP FWAIT FSETPM FSINCOS FSTSWAX".split(" "),
qC=["VALID","ZERO ","SPEC ","EMPTY"],wB=2,xB=3,ZB=[8086,80186,80286,80386],iA=0,jA=1,kA=2,lA=3,mA=4,nA=5,oA=6,pA=7,qA=8,rA=9,sA=10,tA=11,uA=12,vA=13,wA=14,xA=15,zA=16,yA=22,TA=23,GA=24,HA=25,IA=26,JA=27,KA=28,LA=29,MA=30,NA=31,OA=32,PA=33,QA=34,RA=35,cC=40,eC=48,SA=56,gA=["AL","CL","DL","BL","AH","CH","DH","BH","AX","CX","DX","BX","SP","BP","SI","DI","ES","CS","SS","DS","FS","GS","IP","PS","EAX","ECX","EDX","EBX","ESP","EBP","ESI","EDI","CR0","CR1","CR2","CR3",null,null,null,null,"DR0","DR1","DR2",
"DR3",null,null,"DR6","DR7",null,null,null,null,null,null,"TR6","TR7","EIP"],AA=0,BA=1,CA=2,DA=3,EA=4,FA=5,DB="BX+SI BX+DI BP+SI BP+DI SI DI BP BX EAX ECX EDX EBX ESP EBP ESI EDI".split(" "),yB=15,BB=240,UB=3840,zB=0,U=1,OB=2,T=3,S=4,EB=5,FB=7,AB=8,SB=9,TB=10,GB=11,HB=11,IB=12,JB=12,KB=13,LB=14,V=0,NB=16,QB=32,RB=48,XB=64,YB=80,X=96,VB=112,R=128,CB=160,WB=192,aC=208,bC=224,dC=240,wC=iA<<8|X|U,xC=jA<<8|X|U,yC=qA<<8|X|S,zC=rA<<8|X|S,AC=sA<<8|X|S,BC=tA<<8|X|S,CC=uA<<8|X|S,DC=vA<<8|X|S,EC=wA<<8|X|S,FC=
xA<<8|X|S,GC=AA<<8|VB|T,HC=BA<<8|VB|T,IC=CA<<8|VB|T,JC=DA<<8|VB|T,KC=EA<<8|VB|T,LC=FA<<8|VB|T,W=12288,MC=wB<<14,Y=xB<<14,uB=14,YA=1E3,zz=[0,zB],Az=[kB,T|W],yz=[[6,R|U|W,U|4272],[6,R|S|W,S|4272],[6,176|U|W,R|U|4096],[6,176|S|W,R|S|4096],[6,wC|W,V|U|4096],[6,yC|W,V|S|4096],[108,GC|4096],[103,GC|8192],[99,R|U|W,U|4272],[99,R|S|W,S|4272],[99,176|U|W,R|U|4096],[99,176|S|W,R|S|4096],[99,wC|W,V|U|4096],[99,yC|W,V|S|4096],[108,HC|4096],[103,HC|8192],[5,R|U|W,U|4272],[5,R|S|W,S|4272],[5,176|U|W,R|U|4096],
[5,176|S|W,R|S|4096],[5,wC|W,V|U|4096],[5,yC|W,V|S|4096],[108,IC|4096],[103,IC|8192],[120,R|U|W,U|4272],[120,R|S|W,S|4272],[120,176|U|W,R|U|4096],[120,176|S|W,R|S|4096],[120,wC|W,V|U|4096],[120,yC|W,V|S|4096],[108,JC|4096],[103,JC|8192],[7,R|U|W,U|4272],[7,R|S|W,S|4272],[7,176|U|W,R|U|4096],[7,176|S|W,R|S|4096],[7,wC|W,V|U|4096],[7,yC|W,V|S|4096],[35,AB],[29],[154,R|U|W,U|4272],[154,R|S|W,S|4272],[154,176|U|W,R|U|4096],[154,176|S|W,R|S|4096],[154,wC|W,V|U|4096],[154,yC|W,V|S|4096],[27,AB],[30],[162,
R|U|W,U|4272],[162,R|S|W,S|4272],[162,176|U|W,R|U|4096],[162,176|S|W,R|S|4096],[162,wC|W,V|U|4096],[162,yC|W,V|S|4096],[147,AB],[1],[24,R|U|4096,U|4272],[24,R|S|4096,S|4272],[24,U|4272,R|U|4096],[24,S|4272,R|S|4096],[24,wC|4096,V|U|4096],[24,yC|4096,V|S|4096],[33,AB],[4],[44,yC|W],[44,zC|W],[44,AC|W],[44,BC|W],[44,CC|W],[44,DC|W],[44,EC|W],[44,FC|W],[31,yC|W],[31,zC|W],[31,AC|W],[31,BC|W],[31,CC|W],[31,DC|W],[31,EC|W],[31,FC|W],[108,yC|4096],[108,zC|4096],[108,AC|4096],[108,BC|4096],[108,CC|4096],
[108,DC|4096],[108,EC|4096],[108,FC|4096],[103,yC|8192],[103,zC|8192],[103,AC|8192],[103,BC|8192],[103,CC|8192],[103,DC|8192],[103,EC|8192],[103,FC|8192],[tB,zB|MC],[sB,zB|MC],[10,S|4272|MC,R|S|4096],[8,R|T|8192,T|4272],[37,AB|Y],[38,AB|Y],[100,AB|Y],[9,AB|Y],[108,V|S|4096|MC],[42,176|T|W|MC,R|S|4096,V|S|4096],[108,V|OB|4096|MC],[42,T|8368|MC,R|S|4096,V|U|4096],[45,YB|U|8192|MC,AC|4096],[45,YB|S|8192|MC,AC|4096],[102,AC|4096|MC,XB|U|4096],[102,AC|4096|MC,XB|S|4096],[64,RB|U|4096],[60,RB|U|4096],[51,
RB|U|4096],[59,RB|U|4096],[67,RB|U|4096],[63,RB|U|4096],[50,RB|U|4096],[58,RB|U|4096],[66,RB|U|4096],[62,RB|U|4096],[65,RB|U|4096],[61,RB|U|4096],[55,RB|U|4096],[54,RB|U|4096],[56,RB|U|4096],[53,RB|U|4096],[163,R|U|W,V|U|4096],[164,R|S|W,V|S|4096],[163,R|U|W,V|U|4096],[165,R|S|W,V|U|4096],[155,R|U|4096,U|4272],[155,R|S|4096,S|4272],[160,176|U|W,R|U|W],[160,176|S|W,R|S|W],[90,R|U|8192,U|4272],[90,R|S|8192,S|4272],[90,U|8368,R|U|4096],[90,S|8368,R|S|4096],[90,R|S|8192,WB|T|4096],[71,S|8368,144|S],[90,
WB|T|8192,R|S|4096],[103,R|S|8192],[97],[160,yC|W,zC|W],[160,yC|W,AC|W],[160,yC|W,BC|W],[160,yC|W,CC|W],[160,yC|W,DC|W],[160,yC|W,EC|W],[160,yC|W,FC|W],[qB],[rB],[17,V|FB|4096],[158],[106],[105],[117],[68],[90,wC|8192,QB|U|4096],[90,yC|8192,QB|S|4096],[90,QB|U|8192,wC|4096],[90,QB|S|8192,yC|4096],[91,YB|U|8192,XB|U|4096],[92,YB|S|8192,XB|S|4096],[25,YB|U|4096,XB|U|4096],[26,YB|S|4096,XB|S|4096],[155,wC|4096,V|U|4096],[155,yC|4096,V|S|4096],[151,YB|U|8192,wC|4096],[152,YB|S|8192,yC|4096],[82,wC|8192,
XB|U|4096],[83,yC|8192,XB|S|4096],[121,wC|4096,YB|U|4096],[122,yC|4096,YB|S|4096],[90,wC|8192,V|U|4096],[90,xC|8192,V|U|4096],[90,kA<<8|X|U|8192,V|U|4096],[90,lA<<8|X|U|8192,V|U|4096],[90,mA<<8|X|U|8192,V|U|4096],[90,nA<<8|X|U|8192,V|U|4096],[90,oA<<8|X|U|8192,V|U|4096],[90,pA<<8|X|U|8192,V|U|4096],[90,yC|8192,V|S|4096],[90,zC|8192,V|S|4096],[90,AC|8192,V|S|4096],[90,BC|8192,V|S|4096],[90,CC|8192,V|S|4096],[90,DC|8192,V|S|4096],[90,EC|8192,V|S|4096],[90,FC|8192,V|S|4096],[166,R|U|W|16384,V|U|4096],
[167,R|S|W|16384,V|U|4096],[113,V|T|4096],[113],[73,S|8368,4246],[70,S|8368,4246],[90,R|U|8192,V|U|4096],[90,R|S|8192,V|S|4096],[34,V|T|4096|MC,V|U|4096],[72,zB|MC],[114,V|T|4096],[114],[47],[46,V|U|4096],[48],[49],[168,R|U|W,NB|U|4096],[169,R|S|W,NB|U|4096],[170,R|U|W,xC|4096],[171,R|S|W,xC|4096],[3,V|U],[2,V|U],[118],[161],[mB,R|S|4096],[mB,R|S|4096],[mB,R|S|4096],[mB,R|S|4096],[mB,R|S|4096],[mB,R|S|4096],[mB,R|S|4096],[mB,R|S|4096],[85,RB|U|4096],[86,RB|U|4096],[84,RB|U|4096],[52,RB|U|4096],[43,
wC|8192,V|U|4096],[43,yC|8192,V|U|4096],[101,V|U|4096,wC|4096],[101,V|U|4096,yC|4096],[17,RB|S|4096],[57,RB|S|4096],[57,V|FB|4096],[57,RB|U|4096],[43,wC|8192,AC|T|4096],[43,yC|8192,AC|T|4096],[101,AC|T|4096,wC|4096],[101,AC|T|4096,yC|4096],[81,AB],[0],[111,AB],[112,AB],[39],[23],[172,R|U|W],[173,R|S|W],[19],[148],[21],[150],[20],[149],[174,R|U|W],[175,R|S|W]],lB={0:[177,R|T|W],1:[178,R|T|W],2:[69,T|8368|MC,T|4240],3:[87,T|8368|MC,T|4240],5:[vB,MC],6:[22,MC],7:[vB,Y],32:[90,CB|EB|8192|Y,aC|EB|4096],
33:[90,CB|EB|8192|Y,bC|EB|4096],34:[90,aC|EB|8192|Y,CB|EB|4096],35:[90,bC|EB|8192|Y,CB|EB|4096],36:[90,CB|EB|8192|Y,dC|EB|4096],38:[90,dC|EB|8192|Y,CB|EB|4096],128:[64,RB|S|4096|Y],129:[60,RB|S|4096|Y],130:[51,RB|S|4096|Y],131:[59,RB|S|4096|Y],132:[67,RB|S|4096|Y],133:[63,RB|S|4096|Y],134:[50,RB|S|4096|Y],135:[58,RB|S|4096|Y],136:[66,RB|S|4096|Y],137:[62,RB|S|4096|Y],138:[65,RB|S|4096|Y],139:[61,RB|S|4096|Y],140:[55,RB|S|4096|Y],141:[54,RB|S|4096|Y],142:[56,RB|S|4096|Y],143:[53,RB|S|4096|Y],144:[135,
R|U|8192|Y],145:[131,R|U|8192|Y],146:[124,R|U|8192|Y],147:[130,R|U|8192|Y],148:[138,R|U|8192|Y],149:[134,R|U|8192|Y],150:[123,R|U|8192|Y],151:[129,R|U|8192|Y],152:[137,R|U|8192|Y],153:[133,R|U|8192|Y],154:[136,R|U|8192|Y],155:[132,R|U|8192|Y],156:[127,R|U|8192|Y],157:[126,R|U|8192|Y],158:[128,R|U|8192|Y],159:[125,R|U|8192|Y],160:[108,KC|4096|Y],161:[103,KC|8192|Y],163:[13,R|S|4096|Y,S|4272],164:[141,R|S|8192|Y,S|4272,V|U|4096],165:[141,R|S|8192|Y,S|4272,xC|4096],166:[159,S|8368|Y,R|S|4096,yC|4096,
xC|4096],167:[40,R|S|8192|Y,yC|4096,xC|4096,S|4272],168:[108,LC|4096|Y],169:[103,LC|8192|Y],171:[16,R|S|8192|Y,S|4272],172:[143,R|S|8192|Y,S|4272,V|U|4096],173:[143,R|S|8192|Y,S|4272,xC|4096],175:[42,R|S|W|Y,S|4272],178:[88,S|8368,4246],179:[15,R|S|8192|Y,S|4272],180:[74,S|8368,4246],181:[76,S|8368,4246],182:[94,S|8368|Y,R|U|4096],183:[94,EB|8368|Y,R|T|4096],186:[179,R|S|W|Y,V|U|4096],187:[14,R|S|8192|Y,S|4272],188:[11,S|8368|Y,R|S|4096],189:[12,S|8368|Y,R|S|4096],190:[93,S|8368|Y,R|U|4096],191:[93,
EB|8368|Y,R|T|4096]},nB={216:{0:[9,R|HB|4096],1:[18,R|HB|4096],2:[34,R|HB|4096],3:[35,R|HB|4096],4:[12,R|HB|4096],5:[15,R|HB|4096],6:[21,R|HB|4096],7:[24,R|HB|4096],48:[9,X|SB|8192,X|TB|4096],49:[18,X|SB|8192,X|TB|4096],50:[34,X|SB|8192,X|TB|4096],51:[35,X|SB|8192,X|TB|4096],52:[12,X|SB|8192,X|TB|4096],53:[15,X|SB|8192,X|TB|4096],54:[21,X|SB|8192,X|TB|4096],55:[24,X|SB|8192,X|TB|4096]},217:{0:[0,R|HB|4096],2:[1,R|HB|8192],3:[2,R|HB|8192],4:[68,R|4111],5:[59,R|T|4096],6:[66,R|8207],7:[60,R|T|8192],
48:[0,X|TB|8192],49:[3,X|TB|8192],50:[76],51:[2,X|TB|8192],64:[33],65:[32],68:[39],69:[40],80:[47],81:[49],82:[50],83:[48],84:[51],85:[52],86:[46],96:[43],97:[44],98:[41],99:[42],100:[31],102:[73],103:[72],112:[29],113:[45],114:[27],116:[30],117:[28]},218:{0:[11,R|GB|4096],1:[20,R|GB|4096],2:[37,R|GB|4096],3:[38,R|GB|4096],4:[14,R|GB|4096],5:[17,R|GB|4096],6:[23,R|GB|4096],7:[26,R|GB|4096]},219:{0:[4,R|GB|4096],2:[5,R|GB|8192],3:[6,R|GB|8192],5:[0,R|KB|4096],7:[2,R|KB|8192],64:[57],65:[55],66:[64],
67:[53],68:[78,MC],115:[79,Y]},220:{0:[9,R|JB|4096],1:[18,R|JB|4096],2:[34,R|JB|4096],3:[35,R|JB|4096],4:[12,R|JB|4096],5:[15,R|JB|4096],6:[21,R|JB|4096],7:[24,R|JB|4096],48:[9,X|TB|8192,X|SB|4096],49:[18,X|TB|8192,X|SB|4096],50:[34,X|TB|4096],51:[35,X|TB|4096],52:[15,X|TB|8192,X|SB|4096],53:[12,X|TB|8192,X|SB|4096],54:[24,X|TB|8192,X|SB|4096],55:[21,X|TB|8192,X|SB|4096]},221:{0:[0,R|JB|4096],2:[1,R|JB|8192],3:[2,R|JB|8192],4:[71,R|4111],6:[69,R|8207],7:[62,R|T|8192],48:[74,X|TB|4096],49:[3,X|TB|
8192],50:[1,X|TB|4096],51:[2,X|TB|4096]},222:{0:[11,R|T|4096],1:[20,R|T|4096],2:[37,R|T|4096],3:[38,R|T|4096],4:[14,R|T|4096],5:[17,R|T|4096],6:[23,R|T|4096],7:[26,R|T|4096],48:[10,X|TB|8192,X|SB|4096],49:[19,X|TB|8192,X|SB|4096],50:[35,X|TB|4096],51:[36,X|TB|4096],52:[16,X|TB|8192,X|SB|4096],53:[13,X|TB|8192,X|SB|4096],54:[25,X|TB|8192,X|SB|4096],55:[22,X|TB|8192,X|SB|4096]},223:{0:[4,R|T|4096],2:[5,R|T|8192],3:[6,R|T|8192],4:[7,R|LB|4096],5:[4,R|IB|4096],6:[8,R|LB|8192],7:[6,R|IB|8192],48:[75,X|
TB|4096],49:[3,X|TB|8192],50:[2,X|TB|4096],51:[2,X|TB|4096],52:[80,MC]}},pB=[[[6,R|U|W,V|U|4096],[99,R|U|W,V|U|4096],[5,R|U|W,V|U|4096],[120,R|U|W,V|U|4096],[7,R|U|W,V|U|4096],[154,R|U|W,V|U|4096],[162,R|U|W,V|U|4096],[24,R|U|4096,V|U|4096]],[[6,R|S|W,V|S|4096],[99,R|S|W,V|S|4096],[5,R|S|W,V|S|4096],[120,R|S|W,V|S|4096],[7,R|S|W,V|S|4096],[154,R|S|W,V|S|4096],[162,R|S|W,V|S|4096],[24,R|S|4096,V|S|4096]],[[6,R|S|W,V|OB|4096],[99,R|S|W,V|OB|4096],[5,R|S|W,V|OB|4096],[120,R|S|W,V|OB|4096],[7,R|S|W,V|
OB|4096],[154,R|S|W,V|OB|4096],[162,R|S|W,V|OB|4096],[24,R|S|4096,V|OB|4096]],[[115,R|U|W|MC,V|U|4096],[116,R|U|W|MC,V|U|4096],[109,R|U|W|MC,V|U|4096],[110,R|U|W|MC,V|U|4096],[140,R|U|W|MC,V|U|4096],[142,R|U|W|MC,V|U|4096],zz,[119,R|U|W|MC,V|U|4096]],[[115,R|S|W|MC,V|U|4096],[116,R|S|W|MC,V|U|4096],[109,R|S|W|MC,V|U|4096],[110,R|S|W|MC,V|U|4096],[140,R|S|W|MC,V|U|4096],[142,R|S|W|MC,V|U|4096],zz,[119,R|S|W|MC,V|U|4096]],[[115,R|U|W,NB|U|4096],[116,R|U|W,NB|U|4096],[109,R|U|W,NB|U|4096],[110,R|U|W,
NB|U|4096],[140,R|U|W,NB|U|4096],[142,R|U|W,NB|U|4096],zz,[119,R|U|W,NB|U|4096]],[[115,R|S|W,NB|U|4096],[116,R|S|W,NB|U|4096],[109,R|S|W,NB|U|4096],[110,R|S|W,NB|U|4096],[140,R|S|W,NB|U|4096],[142,R|S|W,NB|U|4096],zz,[119,R|S|W,NB|U|4096]],[[115,R|U|W,xC|4096],[116,R|U|W,xC|4096],[109,R|U|W,xC|4096],[110,R|U|W,xC|4096],[140,R|U|W,xC|4096],[142,R|U|W,xC|4096],zz,[119,R|U|W,xC|4096]],[[115,R|S|W,xC|4096],[116,R|S|W,xC|4096],[109,R|S|W,xC|4096],[110,R|S|W,xC|4096],[140,R|S|W,xC|4096],[142,R|S|W,xC|4096],
zz,[119,R|S|W,xC|4096]],[[155,R|U|4096,V|U|4096],zz,[98,R|U|W],[96,R|U|W],[95,R|U|4096],[42,R|U|W],[32,R|U|4096],[41,R|U|W]],[[155,R|S|4096,V|S|4096],zz,[98,R|S|W],[96,R|S|W],[95,R|S|4096],[42,R|S|W],[32,R|S|4096],[41,R|S|W]],[[44,R|U|W],[31,R|U|W],zz,zz,zz,zz,zz,zz],[[44,R|S|W],[31,R|S|W],[17,R|S|4096],[17,R|FB|4096],[57,R|S|4096],[57,R|FB|4096],[108,R|S|4096],zz],[],[[145,R|T|8192|MC],[153,R|T|8192|MC],[78,R|T|4096|MC],[89,R|T|4096|MC],[156,R|T|4096|MC],[157,R|T|4096|MC],zz,zz],[[139,R|T|8192|MC],
[144,R|T|8192|MC],[75,R|T|4096|MC],[77,R|T|4096|MC],[146,R|T|8192|MC],zz,[79,R|T|4096|MC],zz],[zz,zz,zz,zz,[13,R|S|4096|Y,V|U|4096],[16,R|S|8192|Y,V|U|4096],[15,R|S|8192|Y,V|U|4096],[14,R|S|8192|Y,V|U|4096]]],Ez={256:["tss286",!1],512:["ldt",!1],768:["busy tss286",!1],1024:["call gate",!0],1280:["task gate",!0],1536:["int gate286",!0],1792:["trap gate286",!0],2304:["tss386",!1],2816:["busy tss386",!1],3072:["call gate386",!0],3584:["int gate386",!0],3840:["trap gate386",!0]},Iz={PREV_TSS:0,CPL0_SP:2,
CPL0_SS:4,CPL1_SP:6,CPL1_SS:8,CPL2_SP:10,CPL2_SS:12,TASK_IP:14,TASK_PS:16,TASK_AX:18,TASK_CX:20,TASK_DX:22,TASK_BX:24,TASK_SP:26,TASK_BP:28,TASK_SI:30,TASK_DI:32,TASK_ES:34,TASK_CS:36,TASK_SS:38,TASK_DS:40,TASK_LDT:42},Jz={PREV_TSS:0,CPL0_ESP:4,CPL0_SS:8,CPL1_ESP:12,CPL1_SS:16,CPL2_ESP:20,CPL2_SS:24,TASK_CR3:28,TASK_EIP:32,TASK_PS:36,TASK_EAX:40,TASK_ECX:44,TASK_EDX:48,TASK_EBX:52,TASK_ESP:56,TASK_EBP:60,TASK_ESI:64,TASK_EDI:68,TASK_ES:72,TASK_CS:76,TASK_SS:80,TASK_DS:84,TASK_FS:88,TASK_GS:92,TASK_LDT:96,
TASK_IOPM:100};gb(function(){for(var a=Cb(document,"pcx86","debugger"),b=0;b<a.length;b++){var c=a[b],d=Db(c);d=new sz(d);Bb(d,c)}});
function NC(a,b,c){sb.call(this,"Computer",a,67108864);var d=this;OC(this,b);this.U=Ed(this,"autoPower",a);this.D=+Ed(this,"diagnostics",a);0<=this.D&&2>=this.D||(this.D=1);this.F=0;this.pa=a.busWidth||a.buswidth;this.A=PC;this.P=null;this.L=this.ha=!1;this.ra=Ed(this,"url")||"";this.ta=(Math.random()+.1).toString(36).substr(2,12);this.B=QC(this);if(this.G=Ab("CPU",this.id)){this.ca=Ab("Debugger",this.id);this.C=[];for(b=null;b=ec(this,"Video",b);)this.C.push(b);this.oa=new rc({id:this.de+".bus",
busWidth:this.pa},this.G,this.ca);var e=Eb(this.id);this.K=(this.J=Ab("Panel",this.id))&&this.J.ma.print;this.ka=this.Da;this.la=this.print;this.qa=this.O;this.K&&(this.ka=this.J.Da,this.la=this.J.print,this.qa=this.J.O);for(b=0;b<e.length;b++){var f=e[b];f.Da=function(a,b,c){RC(d,a);return d.ka.call(this,a,b,c)}.bind(f);f.print=function(a){return d.la.call(this,a)}.bind(f);f.O=function(a,b,c){RC(d,a,b);return d.qa.call(this,a,b,c)}.bind(f)}this.I=0;!this.K&&this.D&&SC(this);this.O("PCx86 v1.40.0\nCopyright \u00a9 2012-2017 Jeff Parsons <[email protected]>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>");
for(b=0;b<e.length;b++)f=e[b],f.tc&&f.tc(this,this.oa,this.G,this.ca);Fd(this.G,this.id,function(){ce(d,!1)},1E3/TC);b=null;f=Ed(this,"resume");void 0!==f&&(1<f.length?b=this.N=f:this.A=parseInt(f,10));f=!1;e=$a("state");e||(f=!0,e=Ed(this,"state",a));e&&(b=this.ba=e,f||(this.L=!0,this.A=PC),this.A&&(this.V=new eg(this,"1.40.0"),this.V.load()?b=null:delete this.V));!b&&this.A&&(b=UC(this))&&(this.L=!0);if(this.ea=b){var g="Loading "+this.ea+"...";Pa(this.ea,null,!0,function(a,b,c){c?(d.N=null,d.L=
!1,d.Da("Unable to load machine state from server (error "+c+(b?": "+Da(b):"")+")")):(d.P=b,d.ha=!0);Sb(d)},function(){d.O(g,Ob)})}else Sb(this);this.ma.power||(this.U=!0);!c&&this.U&&this.bf(this.Xe)}else nb("Unable to find CPU component")}ia(NC,sb);function pC(a){a.K&&(a.K.value="")}function SC(a){if(!a.I)for(var b=0;b<a.C.length;b++){var c=a.C[b];c&&(c=c.ng)&&(c.style.opacity="1",c.style.lineHeight="1",a.I++)}}
function RC(a,b,c){if(a.I)for(var d=0;d<a.C.length;d++){var e=a.C[d];e&&(e=e.ng)&&(c!=Ob||"..."!=b.slice(-3)?xb(e,b+"\n"):yb(e,b,b+"."))}}function Iq(a){var b=a.D;3==a.D&&(a.D++,Sb(a));return!b}function OC(a,b){if(!b){var c;if("object"==typeof resources&&(c=resources.parms))try{b=eval("("+c+")")}catch(d){nb(d.message+" ("+c+")")}}a.M=b}
function Ed(a,b,c){var d=$a(b);if(d)try{var e=0<=d.indexOf("'")?'"':"'";d=eval(e+d+e)}catch(f){nb(f.message+" ("+d+")"),d=void 0}void 0===d&&a.M&&(d=a.M[b]);void 0===d&&c&&(d=c[b]);void 0===d&&"object"==typeof resources&&resources[b]&&(d=b);return d}l=NC.prototype;l.bf=function(a,b){for(var c=this,d=Eb(this.id),e=0;e<=d.length;e++){var f=e<d.length?d[e]:this;if(!Rb(f)){Rb(f,function(){c.bf(a,b)});return}}a.call(this,b)};
function VC(a,b){var c=new eg(a,"1.40.0",WC);if(c.load()&&XC(c)){var d=c.get(YC),e=b?b.get(YC):"unknown";d!=e&&(a.Da("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
l.Xe=function(a){void 0===a&&(a=this.A||(this.P?ZC:PC));if(!this.F){this.F++;var b=!1,c=!1;this.fa=!1;var d=this.V||new eg(this,"1.40.0");if(a==Nd)b=!0;else if(a>PC){if(d.load(this.P)){this.H=new eg(this,"1.40.0",$C);this.H.load()&&(a!=ZC&&aD(this,d)&&(a=bD),cD(this.H));this.H.set(YC,Ja("Y-m-d H:i:s"));dD(this.H);var e=this.A&&!this.L;if(a==ZC||wb("Click OK to restore the previous PCx86 machine state.")){if(c=XC(d)){var f=d.get("code"),g=d.get("data");f&&("ok"==f?d.load(g):("error"==f&&"no machine state"!=
g?(this.Da("Error: "+g),"unable to verify user"==g&&(Wa(eD,""),this.B=null)):this.O(f+": "+g),cD(d),d.load()?(c=XC(d),e=!0):c=!1))}e&&VC(this,c?d:null)}else a==bD&&d.clear()}else VC(this);delete this.P;delete this.V}e=Eb(this.id);for(f=0;f<e.length;f++)g=e[f],g!==this&&g!=this.G&&(c=fD(this,g,d,b,c));b=[d,a,c];a!=Nd?this.bf(this.bh,b):this.bh(b)}};
function fD(a,b,c,d,e){if(!b.aa.ac){b.aa.ac=!0;if(b.$b){var f=null;e&&((f=c.get(b.id))||(f=c.get(b.id.replace(/-[0-9]+\./i,"."))));"string"===typeof f&&(f=null);!b.$b(f,d)&&f&&(b.Da("Unable to restore hardware state")&&(a.ba&&!a.ha?(c.clear(),a.A=PC,window&&window.location.reload()):a.fa=!0),b.$b(null),e=!1)}b.aa.qf=!0;if(!d&&b.zj)for(a=b.zj.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
l.bh=function(a){if(!this.aa.qf){a:{if(this.I){if(2==this.D){this.D++;this.O("Press any key to continue...");var b=!1;break a}for(b=0;b<this.C.length;b++){var c=this.C[b];if(c&&(c=c.ng)){var d=Ra();c.style.opacity="0";c.style.lineHeight="0";if(0<=d.indexOf("MSIE")||0<=d.indexOf("Trident"))c.style.fontSize="0";c.value=""}}this.I=0}this.D=0;b=!0}if(!b){Sb(this,!1);this.bf(this.bh,a);return}this.aa.qf=!0}b=a[0];c=0>a[1];a=a[2];if(d=this.ma.power)d.textContent="Shutdown";this.aa.ac=!0;this.G&&(fD(this,
this.G,b,c,a),this.G.he());this.fa&&(aD(this,b),b.clear());!c&&this.H&&(this.H.clear(),delete this.H);this.F=0;Gb(this.de,Ed(this,"autoScript"))};function aD(a,b){if(!a.aa.xe){if(wb("There may be a problem with your PCx86 machine.\n\nTo help us diagnose it, click OK to send this PCx86 machine state to http://www.pcjs.org.")){var c=a.B||"";b=b.toString();var d={app:"PCx86",ver:"1.40.0"};d.url=a.ra;d.user=c;d.type="bug";d.data=b;Pa("http://www.pcjs.org/api/v1/report",d,!0)}return!0}return!1}
function uC(a,b,c){var d="none";if(a.F)return null;a.F--;var e=new eg(a,"1.40.0"),f=new eg(a,"1.40.0",WC),g=Ja("Y-m-d H:i:s");f.set(YC,g);e.set(YC,g);e.set(gD,"1.40.0");e.set(hD,window?window.location.href:null);e.set(iD,Ra());if(a.G&&a.G.Zb){var h=a.G.Zb(b,c);"object"===typeof h&&e.set(a.G.id,h);c&&(a.G.aa.ac=!1,!1===h&&(d=null))}g=Eb(a.id);for(var k=0;k<g.length;k++){var m=g[k];m.aa.ac&&(m.Zb&&(h=m.Zb(b,c),"object"===typeof h&&e.set(m.id,h)),c&&(m.aa.ac=!1,!1===h&&(d=null)))}d&&(c?(g=h=!1,b?(a.B&&
sD(a,a.B,e.toString()),dD(f)&&dD(e)||(d=null,h=g=!0)):a.A&&(h=!0,g=a.A==tD),h&&e.clear(g)):d=e.toString());c&&(a.aa.ac=!1,b=a.ma.power)&&(b.textContent="Power");a.F=0;return d}l.reset=function(){this.oa&&this.oa.reset&&(Wb(this,"Resetting "+this.oa.type),this.oa.reset());for(var a=Eb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.oa&&c.reset&&(Wb(this,"Resetting "+c.type),c.reset())}};
l.start=function(a,b){for(var c=Eb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};l.stop=function(a,b){for(var c=Eb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
l.Fb=function(a,b,c){var d=this;switch(b){case "power":return this.ma[b]=c,c.onclick=function(){d.F||(d.aa.ac?uC(d,!1,!0):d.bf(d.Xe))},!0;case "reset":return this.ma[b]=c,c.onclick=function(){if(d.aa.ac&&!d.F)if(d.G&&(d.G.aa.he=d.G.aa.Xa),d.A&&!d.N){var a=d.aa.xe||!wb("Click OK to reset this PCx86 machine and discard all disk modifications.");uC(d,a,!0);!a&&d.ba?window&&window.location.reload():(a||(d.Z=!0),d.Xe(PC),d.Z=!1)}else d.reset(),d.G&&d.G.he()},!0;case "save":if(za(Qa(),"pcjs.org"))c.parentNode.removeChild(c);
else return this.ma[b]=c,c.onclick=function(){var a=QC(d,!0);if(a){var b=!!(d.A&&!d.N||d.ba),c=uC(d,b);b?sD(d,a,c):d.Da("Resume disabled, machine state not saved")}},!0}return!1};
function QC(a,b){var c=a.B;c||((c=Va(eD),void 0!==c)?!c&&b&&(b=null,window&&(b=window.prompt("Saving machine states on the pcjs.org server is currently unsupported.\n\nIf you're running your own server, enter your user ID below.","")),c=b)&&((c=uD(a,c))||a.Da("The user ID is invalid.")):b&&a.Da("Browser local storage is not available"));return c}
function uD(a,b){a.B=null;b=Pa(Qa()+"/api/v1/user?req=verify&user="+b);var c=b[1];if(!b[0]&&c)try{b=eval("("+c+")"),b.code&&"ok"==b.code&&(Wa(eD,b.data),a.B=b.data)}catch(d){nb(d.message+" ("+c+")")}return a.B}function UC(a){var b=null;a.B&&(b=Qa()+"/api/v1/user?req=load&user="+a.B+"&state="+vD(a,"1.40.0"));return b}
function sD(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=vD(a,"1.40.0");d.data=c;b=Pa(Qa()+"/api/v1/user",d);d=b[0];if(b[1]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[1]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.Da("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.Da(c),Wa(eD,""),a.B=null)}}
function ec(a,b,c){a=Eb(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}l.dd=function(a){if(this.C.length){var b=0,c=0;!a&&window&&(b=window.scrollX,c=window.scrollY);var d=this.C[0];d.F&&d.F.focus();!a&&window&&window.scrollTo(b,c)}};
function ce(a,b){if(a.G){var c=a.G;if(c.xj&&(b||!c.aa.Xa||c.aa.mj)){Rg(c,"EAX",c.D);Rg(c,"EBX",c.H);Rg(c,"ECX",c.I);Rg(c,"EDX",c.L);Rg(c,"ESP",y(c));Rg(c,"EBP",c.N);Rg(c,"ESI",c.K);Rg(c,"EDI",c.J);Rg(c,"CS",c.ba.T);Rg(c,"DS",c.Fa.T);Rg(c,"SS",c.U.T);Rg(c,"ES",c.pa.T);Rg(c,"EIP",z(c));var d=Be(c);Rg(c,"PS",d);Rg(c,"V",d&2048);Rg(c,"D",d&1024);Rg(c,"I",d&512);Rg(c,"T",d&256);Rg(c,"S",d&128);Rg(c,"Z",d&64);Rg(c,"A",d&16);Rg(c,"P",d&4);Rg(c,"C",d&1);80386==c.da&&(Rg(c,"FS",c.Ka.T),Rg(c,"GS",c.La.T),Rg(c,
"CR0",c.ra),Rg(c,"CR2",c.qd),Rg(c,"CR3",c.wc))}if(d=c.ma.speed)d.textContent=c.aa.Xa&&c.Y.Kd?c.Y.Kd.toFixed(2)+"Mhz":"Stopped"}if(!1!==b)for(c=0;c<a.C.length;c++)rt(a.C[c],b)}var $C="failsafe",WC="validate",YC="timestamp",gD="version",hD="url",iD="browser",eD="user",Nd=-1,PC=0,ZC=1,bD=2,tD=3,TC=2;gb(function(){for(var a=Cb(document,"pcx86-machine"),b=0;b<a.length;b++){var c=a[b],d=Db(c);c=Cb(c,"pcx86","computer");for(var e=0;e<c.length;e++){var f=c[e],g=Db(f);g=new NC(g,d,!0);Bb(g,f);g.U&&g.bf(g.Xe)}}});
hb.show.push(function(){for(var a=Cb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=Db(a[b]);if(c=Ab("Computer",c.id))c.aa.xe=!1,c.aa.qf&&!c.aa.ac&&c.Xe(Nd)}});hb.exit.push(function(){for(var a=Cb(document,"pcx86","computer"),b=0;b<a.length;b++){var c=Db(a[b]);if(c=Ab("Computer",c.id))c.aa.xe=!0,c.aa.ac&&uC(c,!(!c.A||c.N),!0)}});function eg(a,b,c){this.id=a.id;this.ca=a.ca;this.A="";this.state={};this.B=this.C=!1;this.key=vD(a,b,c);cD(this,a.Ok)}l=eg.prototype;
l.set=function(a,b){try{this.state[a]=b}catch(c){}};l.get=function(a){return this.state[a]||null};l.data=function(){return this.state};l.load=function(a){return a?(this.A=a,this.B=!0,this.C=!1,!0):this.B?!0:Ta()&&(a=Va(this.key))?(this.A=a,this.B=!0):!1};function XC(a){var b=!0;if(!a.C)try{a.state=JSON.parse(a.A),a.C=!0}catch(c){nb(c.message||c),b=!1}return b}
function dD(a){var b=!0;if(Ta()){var c=JSON.stringify(a.state);Wa(a.key,c)||(nb("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}l.toString=function(){return this.state?JSON.stringify(this.state):this.A};function cD(a,b){a.A="";a.state={};a.B=a.C=!1;b&&a.set("parms",b)}
l.clear=function(a){cD(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(e){}b.splice(c,1);c=0}};function vD(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}var wD=0;
function xD(a,b,c,d,e,f){e("Loading "+a+"...");Pa(a,null,!0,function(g,h,k){k?(h||(h="unable to load "+a+" ("+k+")"),f(h,null)):yD(h,a,b,c,d,e,f)})}
function yD(a,b,c,d,e,f,g){function h(a,f){if(f)g(f,null);else{c&&(ub(c,b,a),(f=b)&&0>f.indexOf("/")&&"/"==window.location.pathname.slice(-1)&&(f=window.location.pathname+f),d?"}"==d.slice(-1)?(d=d.slice(0,-1),1<d.length&&(d+=",")):d='{state:"'+d+'",':d="{",d+='url:"'+f+'"}',"object"==typeof resources&&(f=null),d=d.replace(/\$/g,"$$$$"),a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" parms='"+d+"'":"")+(f?' url="'+f+'"':"")));e||(a=a.replace(/(<xsl:variable name="APPNAME">).*?(<\/xsl:variable>)/,
"$1PCx86$2"),a=a.replace(/(<xsl:variable name="APPCLASS">).*?(<\/xsl:variable>)/,"$1pcx86$2"));f=null;if("<"==a.charAt(0))try{e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),window.ActiveXObject||"ActiveXObject"in window?(f=new window.ActiveXObject("Microsoft.XMLDOM"),f.async=!1,f.loadXML(a)):f=(new window.DOMParser).parseFromString(a,"text/xml")}catch(q){f=null,a=q.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);g(a,f)}}a?e?zD(a,f,h):h(a,null):g("no data"+(b?" for file: "+
b:""),null)}
function zD(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");Pa(e,null,!0,function(f,g,h){if(h||!g)c(a,"unable to resolve XML reference: "+d[0]+" ("+h+")");else{if(f=d[3])if(h=g.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var k=h[0],m,q=/( [a-z]+=)(['"])(.*?)\2/gi;m=q.exec(f);)k=0>k.toLowerCase().indexOf(m[1].toLowerCase())?k.replace(">",m[0]+">"):k.replace(new RegExp(m[1]+"(['\"])(.*?)\\1"),m[0]);h[0]!=k&&(g=g.replace(h[0],k))}else{c(a,"missing <"+d[1]+
"> in "+e);return}g=g.replace(/<\?xml[^>]*>[\r\n]*/,"");a=a.replace(d[0],g);zD(a,b,c)}})}else c(a,null)}
function AD(a,b,c,d){function e(a){if(void 0===h){var b=g&&Cb(g,"machine-warning");h=b&&b[0]||g}h&&(h.innerHTML=Aa(a))}function f(a){e("Error: "+a);k&&(--wD||ob(!0));k=!1}var g,h,k=!0;wD++;vb[a]={};try{if(g=document.getElementById(a)){var m;if("object"==typeof resources&&(m=resources.css)){var q=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText=m:v.appendChild(document.createTextNode(m));q.appendChild(v)}c||
(c="/versions/pcx86/1.40.0/components.xsl");m=function(d,h){h?xD(c,null,null,!1,e,function(d,k){k?(ub(a,c,d),e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window?(k=h.transformNode(k))?(g.outerHTML=k,--wD||ob(!0)):f("transformNodeToObject failed"):document.implementation&&document.implementation.createDocument?(d=new XSLTProcessor,d.importStylesheet(k),(k=d.transformToFragment(h,document))?g.parentNode?(g.parentNode.replaceChild(k,g),--wD||ob(!0)):f("invalid machine element: "+
a):f("transformToFragment failed")):f("unable to transform XML: unsupported browser")):f(d)}):f(d)};"<"!=b.charAt(0)?xD(b,a,d,!0,e,m):yD(b,null,a,d,!1,e,m)}else f("missing machine element: "+a)}catch(u){f(u.message)}return k}function BD(a,b,c,d){ob(!1);return AD(a,b,c,d)}window.embedPC=BD;window.embedPCx86=BD;
window.commandMachine=function(a,b,c,d,e,f){if("script"==e)return Gb(c,f)?(b&&(a.disabled=!0),!0):!1;if(d){var g=Ab(d,c+".machine");if(g){var h=g.exports;if(h&&(h=h[e]))return h.call(g,f)?(b&&(a.disabled=!0),!0):!1}}console.log("unimplemented: commandMachine('"+c+"','"+d+"','"+e+"','"+f+"')");return!1};window.enableEvents=ob;window.sendEvent=qb;
function CD(a,b,c,d){if(!c&&b){d.push(b);a=vb[d[0]];b=null;for(var e in a)if(za(e,"components.xsl")){b=e.replace(".xsl",".css");break}b?Pa(b,null,!0,function(a,b){DD(b,d)}):DD(null,d)}else nb("Error ("+c+") requesting "+a)}
function DD(a,b){var c,d,e=b[0],f=b[1];var g=b[4];if(g=g.match(/^(\s*\(function\(\)\{)([\s\S]*)(}\)\(\);)/)){var h=vb[e],k={},m;for(m in h){var q=h[m],v=ya(m);if("xml"==v){for(v=/[ \t]*<disk [^>]*path=(['"])(.*?)\1.*?<\/disk>\n?/g;c=v.exec(h[m]);){var u=c[2];u&&!h[u]&&(q=q.replace(c[0],""))}c=m=xa(m)}else"xsl"==v&&(d=m=xa(m));k[m]=q}a&&(k[m="css"]=a);b[2]&&(k[m="parms"]=b[2]);b[3]&&(k[m="state"]=b[3]);c&&d?(a=JSON.stringify(k),f+=".js",g=g[1]+"var resources="+a+";"+g[2]+g[3],g=g.replace(/\u00A9/g,
"©"),a=bb(g,"javascript",!1,f),a=a+(', copy it to your web server as "'+f+'", and then add the following to your web page:\n\n')+('<div id="'+e+'"></div>\n')+"...\n",a=a+('<script type="text/javascript" src="'+f+'">\x3c/script>\n')+('<script type="text/javascript">embedPC("'+e+'","'+c+'","'+d+'");\x3c/script>\n\n')+"The machine should appear where the <div> is located.",nb(a)):nb("Missing XML/XSL resources")}else nb("Unsupported script")}
window.savePC=function(a,b,c){var d=Ab("Computer",a),e=Ab("Debugger",a);if(d){var f=uC(d,!0),g=d.M?JSON.stringify(d.M):null;b||(b="/versions/pcx86/1.40.0/pcx86"+(e?"-dbg":"")+".js");if(c&&c({state:f,Ok:g}))return!0;Pa(b,null,!0,function(c,d,e){CD(c,d,e,[a,xa(b,!0),g,f])});return!0}nb("Unable to identify machine '"+a+"'");return!1};})();//# sourceMappingURL=/versions/pcx86/1.40.0/pcx86-dbg.map