Comparison

buildscripts/squish @ 370:75e7917761c0

Makefile, buildscripts/squish: Add Makefile and squish to the repo
author Matthew Wild <mwild1@gmail.com>
date Thu, 31 Dec 2015 21:12:00 +0000
child 428:bde804b01f28
comparison
equal deleted inserted replaced
369:074c547fe05a 370:75e7917761c0
1 #!/usr/bin/env lua
2 package.preload['optlex']=(function(...)
3 local s=_G
4 local u=require"string"
5 module"optlex"
6 local i=u.match
7 local e=u.sub
8 local r=u.find
9 local d=u.rep
10 local c
11 error=s.error
12 warn={}
13 local n,o,l
14 local p={
15 TK_KEYWORD=true,
16 TK_NAME=true,
17 TK_NUMBER=true,
18 TK_STRING=true,
19 TK_LSTRING=true,
20 TK_OP=true,
21 TK_EOS=true,
22 }
23 local y={
24 TK_COMMENT=true,
25 TK_LCOMMENT=true,
26 TK_EOL=true,
27 TK_SPACE=true,
28 }
29 local h
30 local function w(e)
31 local t=n[e-1]
32 if e<=1 or t=="TK_EOL"then
33 return true
34 elseif t==""then
35 return w(e-1)
36 end
37 return false
38 end
39 local function g(e)
40 local t=n[e+1]
41 if e>=#n or t=="TK_EOL"or t=="TK_EOS"then
42 return true
43 elseif t==""then
44 return g(e+1)
45 end
46 return false
47 end
48 local function _(a)
49 local t=#i(a,"^%-%-%[=*%[")
50 local a=e(a,t+1,-(t-1))
51 local e,t=1,0
52 while true do
53 local o,n,i,a=r(a,"([\r\n])([\r\n]?)",e)
54 if not o then break end
55 e=o+1
56 t=t+1
57 if#a>0 and i~=a then
58 e=e+1
59 end
60 end
61 return t
62 end
63 local function v(s,h)
64 local a=i
65 local t,e=n[s],n[h]
66 if t=="TK_STRING"or t=="TK_LSTRING"or
67 e=="TK_STRING"or e=="TK_LSTRING"then
68 return""
69 elseif t=="TK_OP"or e=="TK_OP"then
70 if(t=="TK_OP"and(e=="TK_KEYWORD"or e=="TK_NAME"))or
71 (e=="TK_OP"and(t=="TK_KEYWORD"or t=="TK_NAME"))then
72 return""
73 end
74 if t=="TK_OP"and e=="TK_OP"then
75 local t,e=o[s],o[h]
76 if(a(t,"^%.%.?$")and a(e,"^%."))or
77 (a(t,"^[~=<>]$")and e=="=")or
78 (t=="["and(e=="["or e=="="))then
79 return" "
80 end
81 return""
82 end
83 local t=o[s]
84 if e=="TK_OP"then t=o[h]end
85 if a(t,"^%.%.?%.?$")then
86 return" "
87 end
88 return""
89 else
90 return" "
91 end
92 end
93 local function b()
94 local s,i,a={},{},{}
95 local e=1
96 for t=1,#n do
97 local n=n[t]
98 if n~=""then
99 s[e],i[e],a[e]=n,o[t],l[t]
100 e=e+1
101 end
102 end
103 n,o,l=s,i,a
104 end
105 local function A(r)
106 local t=o[r]
107 local t=t
108 local n
109 if i(t,"^0[xX]")then
110 local e=s.tostring(s.tonumber(t))
111 if#e<=#t then
112 t=e
113 else
114 return
115 end
116 end
117 if i(t,"^%d+%.?0*$")then
118 t=i(t,"^(%d+)%.?0*$")
119 if t+0>0 then
120 t=i(t,"^0*([1-9]%d*)$")
121 local a=#i(t,"0*$")
122 local o=s.tostring(a)
123 if a>#o+1 then
124 t=e(t,1,#t-a).."e"..o
125 end
126 n=t
127 else
128 n="0"
129 end
130 elseif not i(t,"[eE]")then
131 local a,t=i(t,"^(%d*)%.(%d+)$")
132 if a==""then a=0 end
133 if t+0==0 and a==0 then
134 n="0"
135 else
136 local o=#i(t,"0*$")
137 if o>0 then
138 t=e(t,1,#t-o)
139 end
140 if a+0>0 then
141 n=a.."."..t
142 else
143 n="."..t
144 local a=#i(t,"^0*")
145 local a=#t-a
146 local o=s.tostring(#t)
147 if a+2+#o<1+#t then
148 n=e(t,-a).."e-"..o
149 end
150 end
151 end
152 else
153 local t,a=i(t,"^([^eE]+)[eE]([%+%-]?%d+)$")
154 a=s.tonumber(a)
155 local h,o=i(t,"^(%d*)%.(%d*)$")
156 if h then
157 a=a-#o
158 t=h..o
159 end
160 if t+0==0 then
161 n="0"
162 else
163 local o=#i(t,"^0*")
164 t=e(t,o+1)
165 o=#i(t,"0*$")
166 if o>0 then
167 t=e(t,1,#t-o)
168 a=a+o
169 end
170 local i=s.tostring(a)
171 if a==0 then
172 n=t
173 elseif a>0 and(a<=1+#i)then
174 n=t..d("0",a)
175 elseif a<0 and(a>=-#t)then
176 o=#t+a
177 n=e(t,1,o).."."..e(t,o+1)
178 elseif a<0 and(#i>=-a-#t)then
179 o=-a-#t
180 n="."..d("0",o)..t
181 else
182 n=t.."e"..a
183 end
184 end
185 end
186 if n and n~=o[r]then
187 if h then
188 c("<number> (line "..l[r]..") "..o[r].." -> "..n)
189 h=h+1
190 end
191 o[r]=n
192 end
193 end
194 local function O(m)
195 local t=o[m]
196 local s=e(t,1,1)
197 local f=(s=="'")and'"'or"'"
198 local t=e(t,2,-2)
199 local a=1
200 local d,n=0,0
201 while a<=#t do
202 local c=e(t,a,a)
203 if c=="\\"then
204 local o=a+1
205 local l=e(t,o,o)
206 local h=r("abfnrtv\\\n\r\"\'0123456789",l,1,true)
207 if not h then
208 t=e(t,1,a-1)..e(t,o)
209 a=a+1
210 elseif h<=8 then
211 a=a+2
212 elseif h<=10 then
213 local i=e(t,o,o+1)
214 if i=="\r\n"or i=="\n\r"then
215 t=e(t,1,a).."\n"..e(t,o+2)
216 elseif h==10 then
217 t=e(t,1,a).."\n"..e(t,o+1)
218 end
219 a=a+2
220 elseif h<=12 then
221 if l==s then
222 d=d+1
223 a=a+2
224 else
225 n=n+1
226 t=e(t,1,a-1)..e(t,o)
227 a=a+1
228 end
229 else
230 local i=i(t,"^(%d%d?%d?)",o)
231 o=a+1+#i
232 local l=i+0
233 local h=u.char(l)
234 local r=r("\a\b\f\n\r\t\v",h,1,true)
235 if r then
236 i="\\"..e("abfnrtv",r,r)
237 elseif l<32 then
238 i="\\"..l
239 elseif h==s then
240 i="\\"..h
241 d=d+1
242 elseif h=="\\"then
243 i="\\\\"
244 else
245 i=h
246 if h==f then
247 n=n+1
248 end
249 end
250 t=e(t,1,a-1)..i..e(t,o)
251 a=a+#i
252 end
253 else
254 a=a+1
255 if c==f then
256 n=n+1
257 end
258 end
259 end
260 if d>n then
261 a=1
262 while a<=#t do
263 local o,n,i=r(t,"([\'\"])",a)
264 if not o then break end
265 if i==s then
266 t=e(t,1,o-2)..e(t,o)
267 a=o
268 else
269 t=e(t,1,o-1).."\\"..e(t,o)
270 a=o+2
271 end
272 end
273 s=f
274 end
275 t=s..t..s
276 if t~=o[m]then
277 if h then
278 c("<string> (line "..l[m]..") "..o[m].." -> "..t)
279 h=h+1
280 end
281 o[m]=t
282 end
283 end
284 local function I(u)
285 local t=o[u]
286 local s=i(t,"^%[=*%[")
287 local a=#s
288 local c=e(t,-a,-1)
289 local h=e(t,a+1,-(a+1))
290 local n=""
291 local t=1
292 while true do
293 local a,o,r,s=r(h,"([\r\n])([\r\n]?)",t)
294 local o
295 if not a then
296 o=e(h,t)
297 elseif a>=t then
298 o=e(h,t,a-1)
299 end
300 if o~=""then
301 if i(o,"%s+$")then
302 warn.lstring="trailing whitespace in long string near line "..l[u]
303 end
304 n=n..o
305 end
306 if not a then
307 break
308 end
309 t=a+1
310 if a then
311 if#s>0 and r~=s then
312 t=t+1
313 end
314 if not(t==1 and t==a)then
315 n=n.."\n"
316 end
317 end
318 end
319 if a>=3 then
320 local e,t=a-1
321 while e>=2 do
322 local a="%]"..d("=",e-2).."%]"
323 if not i(n,a)then t=e end
324 e=e-1
325 end
326 if t then
327 a=d("=",t-2)
328 s,c="["..a.."[","]"..a.."]"
329 end
330 end
331 o[u]=s..n..c
332 end
333 local function j(l)
334 local a=o[l]
335 local h=i(a,"^%-%-%[=*%[")
336 local t=#h
337 local u=e(a,-t,-1)
338 local s=e(a,t+1,-(t-1))
339 local n=""
340 local a=1
341 while true do
342 local o,t,r,h=r(s,"([\r\n])([\r\n]?)",a)
343 local t
344 if not o then
345 t=e(s,a)
346 elseif o>=a then
347 t=e(s,a,o-1)
348 end
349 if t~=""then
350 local a=i(t,"%s*$")
351 if#a>0 then t=e(t,1,-(a+1))end
352 n=n..t
353 end
354 if not o then
355 break
356 end
357 a=o+1
358 if o then
359 if#h>0 and r~=h then
360 a=a+1
361 end
362 n=n.."\n"
363 end
364 end
365 t=t-2
366 if t>=3 then
367 local e,a=t-1
368 while e>=2 do
369 local t="%]"..d("=",e-2).."%]"
370 if not i(n,t)then a=e end
371 e=e-1
372 end
373 if a then
374 t=d("=",a-2)
375 h,u="--["..t.."[","]"..t.."]"
376 end
377 end
378 o[l]=h..n..u
379 end
380 local function q(n)
381 local t=o[n]
382 local a=i(t,"%s*$")
383 if#a>0 then
384 t=e(t,1,-(a+1))
385 end
386 o[n]=t
387 end
388 local function x(o,a)
389 if not o then return false end
390 local t=i(a,"^%-%-%[=*%[")
391 local t=#t
392 local i=e(a,-t,-1)
393 local e=e(a,t+1,-(t-1))
394 if r(e,o,1,true)then
395 return true
396 end
397 end
398 function optimize(t,a,i,r)
399 local f=t["opt-comments"]
400 local u=t["opt-whitespace"]
401 local m=t["opt-emptylines"]
402 local k=t["opt-eols"]
403 local E=t["opt-strings"]
404 local T=t["opt-numbers"]
405 local z=t.KEEP
406 h=t.DETAILS and 0
407 c=c or s.print
408 if k then
409 f=true
410 u=true
411 m=true
412 end
413 n,o,l
414 =a,i,r
415 local t=1
416 local a,r
417 local s
418 local function i(a,i,e)
419 e=e or t
420 n[e]=a or""
421 o[e]=i or""
422 end
423 while true do
424 a,r=n[t],o[t]
425 local h=w(t)
426 if h then s=nil end
427 if a=="TK_EOS"then
428 break
429 elseif a=="TK_KEYWORD"or
430 a=="TK_NAME"or
431 a=="TK_OP"then
432 s=t
433 elseif a=="TK_NUMBER"then
434 if T then
435 A(t)
436 end
437 s=t
438 elseif a=="TK_STRING"or
439 a=="TK_LSTRING"then
440 if E then
441 if a=="TK_STRING"then
442 O(t)
443 else
444 I(t)
445 end
446 end
447 s=t
448 elseif a=="TK_COMMENT"then
449 if f then
450 if t==1 and e(r,1,1)=="#"then
451 q(t)
452 else
453 i()
454 end
455 elseif u then
456 q(t)
457 end
458 elseif a=="TK_LCOMMENT"then
459 if x(z,r)then
460 if u then
461 j(t)
462 end
463 s=t
464 elseif f then
465 local e=_(r)
466 if y[n[t+1]]then
467 i()
468 a=""
469 else
470 i("TK_SPACE"," ")
471 end
472 if not m and e>0 then
473 i("TK_EOL",d("\n",e))
474 end
475 if u and a~=""then
476 t=t-1
477 end
478 else
479 if u then
480 j(t)
481 end
482 s=t
483 end
484 elseif a=="TK_EOL"then
485 if h and m then
486 i()
487 elseif r=="\r\n"or r=="\n\r"then
488 i("TK_EOL","\n")
489 end
490 elseif a=="TK_SPACE"then
491 if u then
492 if h or g(t)then
493 i()
494 else
495 local a=n[s]
496 if a=="TK_LCOMMENT"then
497 i()
498 else
499 local e=n[t+1]
500 if y[e]then
501 if(e=="TK_COMMENT"or e=="TK_LCOMMENT")and
502 a=="TK_OP"and o[s]=="-"then
503 else
504 i()
505 end
506 else
507 local e=v(s,t+1)
508 if e==""then
509 i()
510 else
511 i("TK_SPACE"," ")
512 end
513 end
514 end
515 end
516 end
517 else
518 error("unidentified token encountered")
519 end
520 t=t+1
521 end
522 b()
523 if k then
524 t=1
525 if n[1]=="TK_COMMENT"then
526 t=3
527 end
528 while true do
529 a,r=n[t],o[t]
530 if a=="TK_EOS"then
531 break
532 elseif a=="TK_EOL"then
533 local a,e=n[t-1],n[t+1]
534 if p[a]and p[e]then
535 local e=v(t-1,t+1)
536 if e==""then
537 i()
538 end
539 end
540 end
541 t=t+1
542 end
543 b()
544 end
545 if h and h>0 then c()end
546 return n,o,l
547 end
548 end)
549 package.preload['optparser']=(function(...)
550 local e=_G
551 local a=require"string"
552 local f=require"table"
553 module"optparser"
554 local s="etaoinshrdlucmfwypvbgkqjxz_ETAOINSHRDLUCMFWYPVBGKQJXZ"
555 local r="etaoinshrdlucmfwypvbgkqjxz_0123456789ETAOINSHRDLUCMFWYPVBGKQJXZ"
556 local w={}
557 for e in a.gmatch([[
558 and break do else elseif end false for function if in
559 local nil not or repeat return then true until while
560 self]],"%S+")do
561 w[e]=true
562 end
563 local h,m,
564 u,o,
565 l,y,
566 d,
567 n
568 local function c(e)
569 local o={}
570 for n=1,#e do
571 local e=e[n]
572 local i=e.name
573 if not o[i]then
574 o[i]={
575 decl=0,token=0,size=0,
576 }
577 end
578 local t=o[i]
579 t.decl=t.decl+1
580 local o=e.xref
581 local a=#o
582 t.token=t.token+a
583 t.size=t.size+a*#i
584 if e.decl then
585 e.id=n
586 e.xcount=a
587 if a>1 then
588 e.first=o[2]
589 e.last=o[a]
590 end
591 else
592 t.id=n
593 end
594 end
595 return o
596 end
597 local function v(e)
598 local n=a.byte
599 local d=a.char
600 local a={
601 TK_KEYWORD=true,TK_NAME=true,TK_NUMBER=true,
602 TK_STRING=true,TK_LSTRING=true,
603 }
604 if not e["opt-comments"]then
605 a.TK_COMMENT=true
606 a.TK_LCOMMENT=true
607 end
608 local t={}
609 for e=1,#h do
610 t[e]=m[e]
611 end
612 for e=1,#o do
613 local e=o[e]
614 local a=e.xref
615 for e=1,e.xcount do
616 local e=a[e]
617 t[e]=""
618 end
619 end
620 local e={}
621 for t=0,255 do e[t]=0 end
622 for o=1,#h do
623 local o,t=h[o],t[o]
624 if a[o]then
625 for a=1,#t do
626 local t=n(t,a)
627 e[t]=e[t]+1
628 end
629 end
630 end
631 local function i(a)
632 local t={}
633 for o=1,#a do
634 local a=n(a,o)
635 t[o]={c=a,freq=e[a],}
636 end
637 f.sort(t,
638 function(t,e)
639 return t.freq>e.freq
640 end
641 )
642 local a={}
643 for e=1,#t do
644 a[e]=d(t[e].c)
645 end
646 return f.concat(a)
647 end
648 s=i(s)
649 r=i(r)
650 end
651 local function p()
652 local t
653 local n,h=#s,#r
654 local e=d
655 if e<n then
656 e=e+1
657 t=a.sub(s,e,e)
658 else
659 local o,i=n,1
660 repeat
661 e=e-o
662 o=o*h
663 i=i+1
664 until o>e
665 local o=e%n
666 e=(e-o)/n
667 o=o+1
668 t=a.sub(s,o,o)
669 while i>1 do
670 local o=e%h
671 e=(e-o)/h
672 o=o+1
673 t=t..a.sub(r,o,o)
674 i=i-1
675 end
676 end
677 d=d+1
678 return t,l[t]~=nil
679 end
680 function optimize(e,a,s,i,t)
681 h,m,u,o
682 =a,s,i,t
683 d=0
684 n={}
685 l=c(u)
686 y=c(o)
687 if e["opt-entropy"]then
688 v(e)
689 end
690 local e={}
691 for t=1,#o do
692 e[t]=o[t]
693 end
694 f.sort(e,
695 function(e,t)
696 return e.xcount>t.xcount
697 end
698 )
699 local a,t,r={},1,false
700 for o=1,#e do
701 local e=e[o]
702 if not e.isself then
703 a[t]=e
704 t=t+1
705 else
706 r=true
707 end
708 end
709 e=a
710 local s=#e
711 while s>0 do
712 local h,t
713 repeat
714 h,t=p()
715 until not w[h]
716 n[#n+1]=h
717 local a=s
718 if t then
719 local i=u[l[h].id].xref
720 local h=#i
721 for t=1,s do
722 local t=e[t]
723 local n,e=t.act,t.rem
724 while e<0 do
725 e=o[-e].rem
726 end
727 local o
728 for t=1,h do
729 local t=i[t]
730 if t>=n and t<=e then o=true end
731 end
732 if o then
733 t.skip=true
734 a=a-1
735 end
736 end
737 end
738 while a>0 do
739 local t=1
740 while e[t].skip do
741 t=t+1
742 end
743 a=a-1
744 local i=e[t]
745 t=t+1
746 i.newname=h
747 i.skip=true
748 i.done=true
749 local s,r=i.first,i.last
750 local h=i.xref
751 if s and a>0 then
752 local n=a
753 while n>0 do
754 while e[t].skip do
755 t=t+1
756 end
757 n=n-1
758 local e=e[t]
759 t=t+1
760 local n,t=e.act,e.rem
761 while t<0 do
762 t=o[-t].rem
763 end
764 if not(r<n or s>t)then
765 if n>=i.act then
766 for o=1,i.xcount do
767 local o=h[o]
768 if o>=n and o<=t then
769 a=a-1
770 e.skip=true
771 break
772 end
773 end
774 else
775 if e.last and e.last>=i.act then
776 a=a-1
777 e.skip=true
778 end
779 end
780 end
781 if a==0 then break end
782 end
783 end
784 end
785 local a,t={},1
786 for o=1,s do
787 local e=e[o]
788 if not e.done then
789 e.skip=false
790 a[t]=e
791 t=t+1
792 end
793 end
794 e=a
795 s=#e
796 end
797 for e=1,#o do
798 local e=o[e]
799 local t=e.xref
800 if e.newname then
801 for a=1,e.xcount do
802 local t=t[a]
803 m[t]=e.newname
804 end
805 e.name,e.oldname
806 =e.newname,e.name
807 else
808 e.oldname=e.name
809 end
810 end
811 if r then
812 n[#n+1]="self"
813 end
814 local e=c(o)
815 end
816 end)
817 package.preload['llex']=(function(...)
818 local f=_G
819 local r=require"string"
820 module"llex"
821 local l=r.find
822 local c=r.match
823 local i=r.sub
824 local m={}
825 for e in r.gmatch([[
826 and break do else elseif end false for function if in
827 local nil not or repeat return then true until while]],"%S+")do
828 m[e]=true
829 end
830 local e,
831 d,
832 a,
833 n,
834 h
835 local function o(t,a)
836 local e=#tok+1
837 tok[e]=t
838 seminfo[e]=a
839 tokln[e]=h
840 end
841 local function s(t,s)
842 local n=i
843 local i=n(e,t,t)
844 t=t+1
845 local e=n(e,t,t)
846 if(e=="\n"or e=="\r")and(e~=i)then
847 t=t+1
848 i=i..e
849 end
850 if s then o("TK_EOL",i)end
851 h=h+1
852 a=t
853 return t
854 end
855 function init(t,i)
856 e=t
857 d=i
858 a=1
859 h=1
860 tok={}
861 seminfo={}
862 tokln={}
863 local i,n,e,t=l(e,"^(#[^\r\n]*)(\r?\n?)")
864 if i then
865 a=a+#e
866 o("TK_COMMENT",e)
867 if#t>0 then s(a,true)end
868 end
869 end
870 function chunkid()
871 if d and c(d,"^[=@]")then
872 return i(d,2)
873 end
874 return"[string]"
875 end
876 function errorline(a,t)
877 local e=error or f.error
878 e(r.format("%s:%d: %s",chunkid(),t or h,a))
879 end
880 local r=errorline
881 local function u(t)
882 local i=i
883 local n=i(e,t,t)
884 t=t+1
885 local o=#c(e,"=*",t)
886 t=t+o
887 a=t
888 return(i(e,t,t)==n)and o or(-o)-1
889 end
890 local function w(h,d)
891 local t=a+1
892 local i=i
893 local o=i(e,t,t)
894 if o=="\r"or o=="\n"then
895 t=s(t)
896 end
897 local o=t
898 while true do
899 local o,c,l=l(e,"([\r\n%]])",t)
900 if not o then
901 r(h and"unfinished long string"or
902 "unfinished long comment")
903 end
904 t=o
905 if l=="]"then
906 if u(t)==d then
907 n=i(e,n,a)
908 a=a+1
909 return n
910 end
911 t=a
912 else
913 n=n.."\n"
914 t=s(t)
915 end
916 end
917 end
918 local function y(u)
919 local t=a
920 local h=l
921 local d=i
922 while true do
923 local i,l,o=h(e,"([\n\r\\\"\'])",t)
924 if i then
925 if o=="\n"or o=="\r"then
926 r("unfinished string")
927 end
928 t=i
929 if o=="\\"then
930 t=t+1
931 o=d(e,t,t)
932 if o==""then break end
933 i=h("abfnrtv\n\r",o,1,true)
934 if i then
935 if i>7 then
936 t=s(t)
937 else
938 t=t+1
939 end
940 elseif h(o,"%D")then
941 t=t+1
942 else
943 local o,e,a=h(e,"^(%d%d?%d?)",t)
944 t=e+1
945 if a+1>256 then
946 r("escape sequence too large")
947 end
948 end
949 else
950 t=t+1
951 if o==u then
952 a=t
953 return d(e,n,t-1)
954 end
955 end
956 else
957 break
958 end
959 end
960 r("unfinished string")
961 end
962 function llex()
963 local h=l
964 local l=c
965 while true do
966 local t=a
967 while true do
968 local c,p,d=h(e,"^([_%a][_%w]*)",t)
969 if c then
970 a=t+#d
971 if m[d]then
972 o("TK_KEYWORD",d)
973 else
974 o("TK_NAME",d)
975 end
976 break
977 end
978 local d,m,c=h(e,"^(%.?)%d",t)
979 if d then
980 if c=="."then t=t+1 end
981 local u,s,n=h(e,"^%d*[%.%d]*([eE]?)",t)
982 t=s+1
983 if#n==1 then
984 if l(e,"^[%+%-]",t)then
985 t=t+1
986 end
987 end
988 local n,t=h(e,"^[_%w]*",t)
989 a=t+1
990 local e=i(e,d,t)
991 if not f.tonumber(e)then
992 r("malformed number")
993 end
994 o("TK_NUMBER",e)
995 break
996 end
997 local c,m,f,d=h(e,"^((%s)[ \t\v\f]*)",t)
998 if c then
999 if d=="\n"or d=="\r"then
1000 s(t,true)
1001 else
1002 a=m+1
1003 o("TK_SPACE",f)
1004 end
1005 break
1006 end
1007 local s=l(e,"^%p",t)
1008 if s then
1009 n=t
1010 local d=h("-[\"\'.=<>~",s,1,true)
1011 if d then
1012 if d<=2 then
1013 if d==1 then
1014 local r=l(e,"^%-%-(%[?)",t)
1015 if r then
1016 t=t+2
1017 local s=-1
1018 if r=="["then
1019 s=u(t)
1020 end
1021 if s>=0 then
1022 o("TK_LCOMMENT",w(false,s))
1023 else
1024 a=h(e,"[\n\r]",t)or(#e+1)
1025 o("TK_COMMENT",i(e,n,a-1))
1026 end
1027 break
1028 end
1029 else
1030 local e=u(t)
1031 if e>=0 then
1032 o("TK_LSTRING",w(true,e))
1033 elseif e==-1 then
1034 o("TK_OP","[")
1035 else
1036 r("invalid long string delimiter")
1037 end
1038 break
1039 end
1040 elseif d<=5 then
1041 if d<5 then
1042 a=t+1
1043 o("TK_STRING",y(s))
1044 break
1045 end
1046 s=l(e,"^%.%.?%.?",t)
1047 else
1048 s=l(e,"^%p=?",t)
1049 end
1050 end
1051 a=t+#s
1052 o("TK_OP",s)
1053 break
1054 end
1055 local e=i(e,t,t)
1056 if e~=""then
1057 a=t+1
1058 o("TK_OP",e)
1059 break
1060 end
1061 o("TK_EOS","")
1062 return
1063 end
1064 end
1065 end
1066 return _M
1067 end)
1068 package.preload['lparser']=(function(...)
1069 local R=_G
1070 local p=require"string"
1071 module"lparser"
1072 local _,
1073 q,
1074 z,
1075 S,
1076 u,
1077 r,
1078 V,
1079 t,k,l,f,
1080 w,
1081 a,
1082 K,
1083 j,
1084 I,
1085 d,
1086 b,
1087 A
1088 local v,h,y,E,T,x
1089 local e=p.gmatch
1090 local D={}
1091 for e in e("else elseif end until <eof>","%S+")do
1092 D[e]=true
1093 end
1094 local B={}
1095 for e in e("if while do for repeat function local return break","%S+")do
1096 B[e]=e.."_stat"
1097 end
1098 local L={}
1099 local G={}
1100 for e,t,a in e([[
1101 {+ 6 6}{- 6 6}{* 7 7}{/ 7 7}{% 7 7}
1102 {^ 10 9}{.. 5 4}
1103 {~= 3 3}{== 3 3}
1104 {< 3 3}{<= 3 3}{> 3 3}{>= 3 3}
1105 {and 2 2}{or 1 1}
1106 ]],"{(%S+)%s(%d+)%s(%d+)}")do
1107 L[e]=t+0
1108 G[e]=a+0
1109 end
1110 local Z={["not"]=true,["-"]=true,
1111 ["#"]=true,}
1112 local X=8
1113 local function o(a,t)
1114 local e=error or R.error
1115 e(p.format("(source):%d: %s",t or l,a))
1116 end
1117 local function e()
1118 V=z[u]
1119 t,k,l,f
1120 =_[u],q[u],z[u],S[u]
1121 u=u+1
1122 end
1123 local function J()
1124 return _[u]
1125 end
1126 local function n(a)
1127 local e=t
1128 if e~="<number>"and e~="<string>"then
1129 if e=="<name>"then e=k end
1130 e="'"..e.."'"
1131 end
1132 o(a.." near "..e)
1133 end
1134 local function c(e)
1135 n("'"..e.."' expected")
1136 end
1137 local function o(a)
1138 if t==a then e();return true end
1139 end
1140 local function O(e)
1141 if t~=e then c(e)end
1142 end
1143 local function i(t)
1144 O(t);e()
1145 end
1146 local function Q(e,t)
1147 if not e then n(t)end
1148 end
1149 local function s(e,a,t)
1150 if not o(e)then
1151 if t==l then
1152 c(e)
1153 else
1154 n("'"..e.."' expected (to close '"..a.."' at line "..t..")")
1155 end
1156 end
1157 end
1158 local function m()
1159 O("<name>")
1160 local t=k
1161 w=f
1162 e()
1163 return t
1164 end
1165 local function N(e,t)
1166 e.k="VK"
1167 end
1168 local function U(e)
1169 N(e,m())
1170 end
1171 local function c(o,i)
1172 local t=a.bl
1173 local e
1174 if t then
1175 e=t.locallist
1176 else
1177 e=a.locallist
1178 end
1179 local t=#d+1
1180 d[t]={
1181 name=o,
1182 xref={w},
1183 decl=w,
1184 }
1185 if i then
1186 d[t].isself=true
1187 end
1188 local a=#b+1
1189 b[a]=t
1190 A[a]=e
1191 end
1192 local function g(e)
1193 local t=#b
1194 while e>0 do
1195 e=e-1
1196 local t=t-e
1197 local a=b[t]
1198 local e=d[a]
1199 local o=e.name
1200 e.act=f
1201 b[t]=nil
1202 local i=A[t]
1203 A[t]=nil
1204 local t=i[o]
1205 if t then
1206 e=d[t]
1207 e.rem=-a
1208 end
1209 i[o]=a
1210 end
1211 end
1212 local function H()
1213 local t=a.bl
1214 local e
1215 if t then
1216 e=t.locallist
1217 else
1218 e=a.locallist
1219 end
1220 for t,e in R.pairs(e)do
1221 local e=d[e]
1222 e.rem=f
1223 end
1224 end
1225 local function f(e,t)
1226 if p.sub(e,1,1)=="("then
1227 return
1228 end
1229 c(e,t)
1230 end
1231 local function R(o,a)
1232 local t=o.bl
1233 local e
1234 if t then
1235 e=t.locallist
1236 while e do
1237 if e[a]then return e[a]end
1238 t=t.prev
1239 e=t and t.locallist
1240 end
1241 end
1242 e=o.locallist
1243 return e[a]or-1
1244 end
1245 local function p(t,o,e)
1246 if t==nil then
1247 e.k="VGLOBAL"
1248 return"VGLOBAL"
1249 else
1250 local a=R(t,o)
1251 if a>=0 then
1252 e.k="VLOCAL"
1253 e.id=a
1254 return"VLOCAL"
1255 else
1256 if p(t.prev,o,e)=="VGLOBAL"then
1257 return"VGLOBAL"
1258 end
1259 e.k="VUPVAL"
1260 return"VUPVAL"
1261 end
1262 end
1263 end
1264 local function W(o)
1265 local t=m()
1266 p(a,t,o)
1267 if o.k=="VGLOBAL"then
1268 local e=I[t]
1269 if not e then
1270 e=#j+1
1271 j[e]={
1272 name=t,
1273 xref={w},
1274 }
1275 I[t]=e
1276 else
1277 local e=j[e].xref
1278 e[#e+1]=w
1279 end
1280 else
1281 local e=o.id
1282 local e=d[e].xref
1283 e[#e+1]=w
1284 end
1285 end
1286 local function p(t)
1287 local e={}
1288 e.isbreakable=t
1289 e.prev=a.bl
1290 e.locallist={}
1291 a.bl=e
1292 end
1293 local function w()
1294 local e=a.bl
1295 H()
1296 a.bl=e.prev
1297 end
1298 local function C()
1299 local e
1300 if not a then
1301 e=K
1302 else
1303 e={}
1304 end
1305 e.prev=a
1306 e.bl=nil
1307 e.locallist={}
1308 a=e
1309 end
1310 local function M()
1311 H()
1312 a=a.prev
1313 end
1314 local function H(a)
1315 local t={}
1316 e()
1317 U(t)
1318 a.k="VINDEXED"
1319 end
1320 local function F(t)
1321 e()
1322 h(t)
1323 i("]")
1324 end
1325 local function R(e)
1326 local e,a={},{}
1327 if t=="<name>"then
1328 U(e)
1329 else
1330 F(e)
1331 end
1332 i("=")
1333 h(a)
1334 end
1335 local function Y(e)
1336 if e.v.k=="VVOID"then return end
1337 e.v.k="VVOID"
1338 end
1339 local function Y(e)
1340 h(e.v)
1341 end
1342 local function P(a)
1343 local n=l
1344 local e={}
1345 e.v={}
1346 e.t=a
1347 a.k="VRELOCABLE"
1348 e.v.k="VVOID"
1349 i("{")
1350 repeat
1351 if t=="}"then break end
1352 local t=t
1353 if t=="<name>"then
1354 if J()~="="then
1355 Y(e)
1356 else
1357 R(e)
1358 end
1359 elseif t=="["then
1360 R(e)
1361 else
1362 Y(e)
1363 end
1364 until not o(",")and not o(";")
1365 s("}","{",n)
1366 end
1367 local function J()
1368 local i=0
1369 if t~=")"then
1370 repeat
1371 local t=t
1372 if t=="<name>"then
1373 c(m())
1374 i=i+1
1375 elseif t=="..."then
1376 e()
1377 a.is_vararg=true
1378 else
1379 n("<name> or '...' expected")
1380 end
1381 until a.is_vararg or not o(",")
1382 end
1383 g(i)
1384 end
1385 local function Y(h)
1386 local a={}
1387 local i=l
1388 local o=t
1389 if o=="("then
1390 if i~=V then
1391 n("ambiguous syntax (function call x new statement)")
1392 end
1393 e()
1394 if t==")"then
1395 a.k="VVOID"
1396 else
1397 v(a)
1398 end
1399 s(")","(",i)
1400 elseif o=="{"then
1401 P(a)
1402 elseif o=="<string>"then
1403 N(a,k)
1404 e()
1405 else
1406 n("function arguments expected")
1407 return
1408 end
1409 h.k="VCALL"
1410 end
1411 local function V(a)
1412 local t=t
1413 if t=="("then
1414 local t=l
1415 e()
1416 h(a)
1417 s(")","(",t)
1418 elseif t=="<name>"then
1419 W(a)
1420 else
1421 n("unexpected symbol")
1422 end
1423 end
1424 local function R(a)
1425 V(a)
1426 while true do
1427 local t=t
1428 if t=="."then
1429 H(a)
1430 elseif t=="["then
1431 local e={}
1432 F(e)
1433 elseif t==":"then
1434 local t={}
1435 e()
1436 U(t)
1437 Y(a)
1438 elseif t=="("or t=="<string>"or t=="{"then
1439 Y(a)
1440 else
1441 return
1442 end
1443 end
1444 end
1445 local function U(o)
1446 local t=t
1447 if t=="<number>"then
1448 o.k="VKNUM"
1449 elseif t=="<string>"then
1450 N(o,k)
1451 elseif t=="nil"then
1452 o.k="VNIL"
1453 elseif t=="true"then
1454 o.k="VTRUE"
1455 elseif t=="false"then
1456 o.k="VFALSE"
1457 elseif t=="..."then
1458 Q(a.is_vararg==true,
1459 "cannot use '...' outside a vararg function");
1460 o.k="VVARARG"
1461 elseif t=="{"then
1462 P(o)
1463 return
1464 elseif t=="function"then
1465 e()
1466 T(o,false,l)
1467 return
1468 else
1469 R(o)
1470 return
1471 end
1472 e()
1473 end
1474 local function k(o,n)
1475 local a=t
1476 local i=Z[a]
1477 if i then
1478 e()
1479 k(o,X)
1480 else
1481 U(o)
1482 end
1483 a=t
1484 local t=L[a]
1485 while t and t>n do
1486 local o={}
1487 e()
1488 local e=k(o,G[a])
1489 a=e
1490 t=L[a]
1491 end
1492 return a
1493 end
1494 function h(e)
1495 k(e,0)
1496 end
1497 local function N(e)
1498 local t={}
1499 local e=e.v.k
1500 Q(e=="VLOCAL"or e=="VUPVAL"or e=="VGLOBAL"
1501 or e=="VINDEXED","syntax error")
1502 if o(",")then
1503 local e={}
1504 e.v={}
1505 R(e.v)
1506 N(e)
1507 else
1508 i("=")
1509 v(t)
1510 return
1511 end
1512 t.k="VNONRELOC"
1513 end
1514 local function k(e,t)
1515 i("do")
1516 p(false)
1517 g(e)
1518 y()
1519 w()
1520 end
1521 local function L(e)
1522 local t=r
1523 f("(for index)")
1524 f("(for limit)")
1525 f("(for step)")
1526 c(e)
1527 i("=")
1528 E()
1529 i(",")
1530 E()
1531 if o(",")then
1532 E()
1533 else
1534 end
1535 k(1,true)
1536 end
1537 local function F(e)
1538 local t={}
1539 f("(for generator)")
1540 f("(for state)")
1541 f("(for control)")
1542 c(e)
1543 local e=1
1544 while o(",")do
1545 c(m())
1546 e=e+1
1547 end
1548 i("in")
1549 local a=r
1550 v(t)
1551 k(e,false)
1552 end
1553 local function U(e)
1554 local a=false
1555 W(e)
1556 while t=="."do
1557 H(e)
1558 end
1559 if t==":"then
1560 a=true
1561 H(e)
1562 end
1563 return a
1564 end
1565 function E()
1566 local e={}
1567 h(e)
1568 end
1569 local function k()
1570 local e={}
1571 h(e)
1572 end
1573 local function E()
1574 e()
1575 k()
1576 i("then")
1577 y()
1578 end
1579 local function H()
1580 local e,t={}
1581 c(m())
1582 e.k="VLOCAL"
1583 g(1)
1584 T(t,false,l)
1585 end
1586 local function W()
1587 local e=0
1588 local t={}
1589 repeat
1590 c(m())
1591 e=e+1
1592 until not o(",")
1593 if o("=")then
1594 v(t)
1595 else
1596 t.k="VVOID"
1597 end
1598 g(e)
1599 end
1600 function v(e)
1601 h(e)
1602 while o(",")do
1603 h(e)
1604 end
1605 end
1606 function T(a,t,e)
1607 C()
1608 i("(")
1609 if t then
1610 f("self",true)
1611 g(1)
1612 end
1613 J()
1614 i(")")
1615 x()
1616 s("end","function",e)
1617 M()
1618 end
1619 function y()
1620 p(false)
1621 x()
1622 w()
1623 end
1624 function for_stat()
1625 local o=r
1626 p(true)
1627 e()
1628 local a=m()
1629 local e=t
1630 if e=="="then
1631 L(a)
1632 elseif e==","or e=="in"then
1633 F(a)
1634 else
1635 n("'=' or 'in' expected")
1636 end
1637 s("end","for",o)
1638 w()
1639 end
1640 function while_stat()
1641 local t=r
1642 e()
1643 k()
1644 p(true)
1645 i("do")
1646 y()
1647 s("end","while",t)
1648 w()
1649 end
1650 function repeat_stat()
1651 local t=r
1652 p(true)
1653 p(false)
1654 e()
1655 x()
1656 s("until","repeat",t)
1657 k()
1658 w()
1659 w()
1660 end
1661 function if_stat()
1662 local a=r
1663 local o={}
1664 E()
1665 while t=="elseif"do
1666 E()
1667 end
1668 if t=="else"then
1669 e()
1670 y()
1671 end
1672 s("end","if",a)
1673 end
1674 function return_stat()
1675 local a={}
1676 e()
1677 local e=t
1678 if D[e]or e==";"then
1679 else
1680 v(a)
1681 end
1682 end
1683 function break_stat()
1684 local t=a.bl
1685 e()
1686 while t and not t.isbreakable do
1687 t=t.prev
1688 end
1689 if not t then
1690 n("no loop to break")
1691 end
1692 end
1693 function expr_stat()
1694 local e={}
1695 e.v={}
1696 R(e.v)
1697 if e.v.k=="VCALL"then
1698 else
1699 e.prev=nil
1700 N(e)
1701 end
1702 end
1703 function function_stat()
1704 local o=r
1705 local a,t={},{}
1706 e()
1707 local e=U(a)
1708 T(t,e,o)
1709 end
1710 function do_stat()
1711 local t=r
1712 e()
1713 y()
1714 s("end","do",t)
1715 end
1716 function local_stat()
1717 e()
1718 if o("function")then
1719 H()
1720 else
1721 W()
1722 end
1723 end
1724 local function i()
1725 r=l
1726 local e=t
1727 local t=B[e]
1728 if t then
1729 _M[t]()
1730 if e=="return"or e=="break"then return true end
1731 else
1732 expr_stat()
1733 end
1734 return false
1735 end
1736 function x()
1737 local e=false
1738 while not e and not D[t]do
1739 e=i()
1740 o(";")
1741 end
1742 end
1743 function parser()
1744 C()
1745 a.is_vararg=true
1746 e()
1747 x()
1748 O("<eof>")
1749 M()
1750 return j,d
1751 end
1752 function init(e,o,n)
1753 u=1
1754 K={}
1755 local t=1
1756 _,q,z,S={},{},{},{}
1757 for a=1,#e do
1758 local e=e[a]
1759 local i=true
1760 if e=="TK_KEYWORD"or e=="TK_OP"then
1761 e=o[a]
1762 elseif e=="TK_NAME"then
1763 e="<name>"
1764 q[t]=o[a]
1765 elseif e=="TK_NUMBER"then
1766 e="<number>"
1767 q[t]=0
1768 elseif e=="TK_STRING"or e=="TK_LSTRING"then
1769 e="<string>"
1770 q[t]=""
1771 elseif e=="TK_EOS"then
1772 e="<eof>"
1773 else
1774 i=false
1775 end
1776 if i then
1777 _[t]=e
1778 z[t]=n[a]
1779 S[t]=a
1780 t=t+1
1781 end
1782 end
1783 j,I,d={},{},{}
1784 b,A={},{}
1785 end
1786 return _M
1787 end)
1788 do local e={};
1789 e["vio"]="local vio = {};\
1790 vio.__index = vio; \
1791 \
1792 function vio.open(string)\
1793 return setmetatable({ pos = 1, data = string }, vio);\
1794 end\
1795 \
1796 function vio:read(format, ...)\
1797 if self.pos >= #self.data then return; end\
1798 if format == \"*a\" then\
1799 local oldpos = self.pos;\
1800 self.pos = #self.data;\
1801 return self.data:sub(oldpos, self.pos);\
1802 elseif format == \"*l\" then\
1803 local data;\
1804 data, self.pos = self.data:match(\"([^\\r\\n]*)\\r?\\n?()\", self.pos)\
1805 return data;\
1806 elseif format == \"*n\" then\
1807 local data;\
1808 data, self.pos = self.data:match(\"(%d+)()\", self.pos)\
1809 return tonumber(data); \
1810 elseif type(format) == \"number\" then\
1811 local oldpos = self.pos;\
1812 self.pos = self.pos + format;\
1813 return self.data:sub(oldpos, self.pos-1);\
1814 end\
1815 end\
1816 \
1817 function vio:seek(whence, offset)\
1818 if type(whence) == \"number\" then\
1819 whence, offset = \"cur\", whence;\
1820 end\
1821 offset = offset or 0;\
1822 \
1823 if whence == \"cur\" then\
1824 self.pos = self.pos + offset;\
1825 elseif whence == \"set\" then\
1826 self.pos = offset + 1;\
1827 elseif whence == \"end\" then\
1828 self.pos = #self.data - offset;\
1829 end\
1830 \
1831 return self.pos;\
1832 end\
1833 \
1834 local function _readline(f) return f:read(\"*l\"); end\
1835 function vio:lines()\
1836 return _readline, self;\
1837 end\
1838 \
1839 function vio:write(...)\
1840 for i=1,select('#', ...) do\
1841 local dat = tostring(select(i, ...));\
1842 self.data = self.data:sub(1, self.pos-1)..dat..self.data:sub(self.pos+#dat, -1);\
1843 end\
1844 end\
1845 \
1846 function vio:close()\
1847 self.pos, self.data = nil, nil;\
1848 end\
1849 \
1850 "e["gunzip.lua"]="local base_char,keywords=128,{\"and\",\"break\",\"do\",\"else\",\"elseif\",\"end\",\"false\",\"for\",\"function\",\"if\",\"in\",\"local\",\"nil\",\"not\",\"or\",\"repeat\",\"return\",\"then\",\"true\",\"until\",\"while\",\"read\",\"nbits\",\"nbits_left_in_byte\",\"wnd_pos\",\"output\",\"val\",\"input\",}; function prettify(code) return code:gsub(\"[\"..string.char(base_char)..\"-\"..string.char(base_char+#keywords)..\"]\", \
1851 function (c) return keywords[c:byte()-base_char]; end) end return assert(loadstring(prettify[===[ i,h,b,m,l,d,e,y,r,w,u,v,l,l=assert,error,ipairs,pairs,tostring,type,setmetatable,io,math,table.sort,math.max,string.char,io.open,_G; p(n) l={}; e=e({},l) l:__index(l) n=n(l);e[l]=n\
1852 n\
1853 \
1854 e\
1855 \
1856 l(n,l)l=l 1\
1857 h({n},l+1)\
1858 _(n) l={}l.outbs=n\
1859 l.wnd={}l.=1\
1860 l\
1861 \
1862 t(l,e) n=l.\
1863 l.outbs(e)l.wnd[n]=e\
1864 l.=n%32768+1\
1865 \
1866 n(l) i(l,'unexpected end of file')\
1867 o(n,l) n%(l+l)>=l\
1868 \
1869 a=p((l) 2^l ) c=e({},{__mode='k'}) g(o) l=1\
1870 e={} e:() n\
1871 l<=#o \
1872 n=o:byte(l)l=l+1\
1873 \
1874 n\
1875 \
1876 e\
1877 \
1878 l\
1879 s(d) n,l,o=0,0,{}; o:() l\
1880 \
1881 o:(e)e=e 1\
1882 l<e \
1883 e=d:() e \
1884 n=n+a[l]*e\
1885 l=l+8\
1886 \
1887 o=a[e] a=n%o\
1888 n=(n-a)/o\
1889 l=l-e\
1890 a\
1891 \
1892 c[o]=\
1893 o\
1894 \
1895 f(l) c[l] l s(g(l))\
1896 s(l) n\
1897 y.type(l)=='file'\
1898 n=(n)l:write(v(n))\
1899 d(l)=='function'\
1900 n=l\
1901 \
1902 n\
1903 \
1904 d(e,o) l={} o \
1905 e,n m(e)\
1906 n~=0 \
1907 l[#l+1]={=e,=n}\
1908 \
1909 \
1910 n=1,#e-2,2 \
1911 o,n,e=e[n],e[n+1],e[n+2] n~=0 \
1912 e=o,e-1 \
1913 l[#l+1]={=e,=n}\
1914 \
1915 \
1916 \
1917 w(l,(n,l) n.==l. n.<l. n.<l.\
1918 ) e=1\
1919 o=0\
1920 n,l b(l)\
1921 l.~=o \
1922 e=e*a[l.-o]o=l.\
1923 \
1924 l.code=e\
1925 e=e+1\
1926 \
1927 e=r.huge\
1928 c={} n,l b(l)\
1929 e=r.min(e,l.)c[l.code]=l.\
1930 \
1931 o(n,e) l=0\
1932 e=1,e \
1933 e=n%2\
1934 n=(n-e)/2\
1935 l=l*2+e\
1936 \
1937 l\
1938 \
1939 d=p((l) a[e]+o(l,e)) l:(a) o,l=1,0\
1940 1 \
1941 l==0 \
1942 o=d[n(a:(e))]l=l+e\
1943 \
1944 n=n(a:())l=l+1\
1945 o=o*2+n\
1946 \
1947 l=c[o] l \
1948 l\
1949 \
1950 \
1951 \
1952 l\
1953 \
1954 b(l) a=2^1\
1955 e=2^2\
1956 c=2^3\
1957 d=2^4\
1958 n=l:(8) n=l:(8) n=l:(8) n=l:(8) t=l:(32) t=l:(8) t=l:(8) o(n,e)\
1959 n=l:(16) e=0\
1960 n=1,n \
1961 e=l:(8)\
1962 \
1963 o(n,c)\
1964 l:(8)~=0 \
1965 \
1966 o(n,d)\
1967 l:(8)~=0 \
1968 \
1969 o(n,a)\
1970 l:(16)\
1971 \
1972 p(l) f=l:(5) i=l:(5) e=n(l:(4)) a=e+4\
1973 e={} o={16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15} n=1,a \
1974 l=l:(3) n=o[n]e[n]=l\
1975 \
1976 e=d(e,) r(o) t={} a\
1977 c=0\
1978 c<o \
1979 o=e:(l) e\
1980 o<=15 \
1981 e=1\
1982 a=o\
1983 o==16 \
1984 e=3+n(l:(2)) o==17 \
1985 e=3+n(l:(3))a=0\
1986 o==18 \
1987 e=11+n(l:(7))a=0\
1988 \
1989 h'ASSERT'\
1990 l=1,e \
1991 t[c]=a\
1992 c=c+1\
1993 \
1994 \
1995 l=d(t,) l\
1996 \
1997 n=f+257\
1998 l=i+1\
1999 n=r(n) l=r(l) n,l\
2000 \
2001 a\
2002 o\
2003 c\
2004 r\
2005 h(e,n,l,d) l=l:(e) l<256 \
2006 t(n,l) l==256 \
2007 \
2008 \
2009 a \
2010 l={[257]=3} e=1\
2011 n=258,285,4 \
2012 n=n,n+3 l[n]=l[n-1]+e \
2013 n~=258 e=e*2 \
2014 \
2015 l[285]=258\
2016 a=l\
2017 \
2018 o \
2019 l={} e=257,285 \
2020 n=u(e-261,0)l[e]=(n-(n%4))/4\
2021 \
2022 l[285]=0\
2023 o=l\
2024 \
2025 a=a[l] l=o[l] l=e:(l) o=a+l\
2026 c \
2027 e={[0]=1} l=1\
2028 n=1,29,2 \
2029 n=n,n+1 e[n]=e[n-1]+l \
2030 n~=1 l=l*2 \
2031 \
2032 c=e\
2033 \
2034 r \
2035 n={} e=0,29 \
2036 l=u(e-2,0)n[e]=(l-(l%2))/2\
2037 \
2038 r=n\
2039 \
2040 l=d:(e) a=c[l] l=r[l] l=e:(l) l=a+l\
2041 e=1,o \
2042 l=(n.-1-l)%32768+1\
2043 t(n,i(n.wnd[l],'invalid distance'))\
2044 \
2045 \
2046 \
2047 u(l,a) i=l:(1) e=l:(2) r=0\
2048 o=1\
2049 c=2\
2050 f=3\
2051 e==r \
2052 l:(l:()) e=l:(16) o=n(l:(16)) e=1,e \
2053 l=n(l:(8))t(a,l)\
2054 e==o e==c \
2055 n,o\
2056 e==c \
2057 n,o=p(l)\
2058 n=d{0,8,144,9,256,7,280,8,288,}o=d{0,5,32,}\
2059 h(l,a,n,o);\
2060 i~=0\
2061 \
2062 e(l) n,l=f(l.),_(s(l.)) u(n,l)\
2063 (n) l=f(n.) n=s(n.)b(l)e{=l,=n}l:(l:())l:()\
2064 ]===], '@gunzip.lua'))()"e["lua5.1.min.js"]="////////////////////////////////////////////////////////////////////////////////\
2065 // lua5.1.5.js: Lua 5.1.5 in JavaScript\
2066 // This file is a part of lua5.1.js project:\
2067 // https://github.com/logiceditor-com/lua5.1.js/\
2068 // Copyright (c) LogicEditor <info@logiceditor.com>\
2069 // Copyright (c) lua5.1.js authors\
2070 // Distributed under the terms of the MIT license:\
2071 // https://github.com/logiceditor-com/lua5.1.js/tree/master/COPYRIGHT\
2072 // Based on original Lua 5.1.5 header files:\
2073 // Copyright (c) 1994-2012 Lua.org, PUC-Rio\
2074 ////////////////////////////////////////////////////////////////////////////////\
2075 // WARNING: Emscriptenized code does not like minification.\
2076 // Keep this file as is and enable compression in your HTTP server.\
2077 ////////////////////////////////////////////////////////////////////////////////\
2078 \
2079 var Lua5_1 = Lua5_1 || { };\
2080 \
2081 ////////////////////////////////////////////////////////////////////////////////\
2082 \
2083 (function(Lua5_1) {\
2084 \
2085 ////////////////////////////////////////////////////////////////////////////////\
2086 \
2087 // Note: For maximum-speed code, see \"Optimizing Code\" on the Emscripten wiki, https://github.com/kripken/emscripten/wiki/Optimizing-Code\
2088 // Note: Some Emscripten settings may limit the speed of the generated code.\
2089 // The Module object: Our interface to the outside world. We import\
2090 // and export values on it, and do the work to get that through\
2091 // closure compiler if necessary. There are various ways Module can be used:\
2092 // 1. Not defined. We create it here\
2093 // 2. A function parameter, function(Module) { ..generated code.. }\
2094 // 3. pre-run appended it, var Module = {}; ..generated code..\
2095 // 4. External script tag defines var Module.\
2096 // We need to do an eval in order to handle the closure compiler\
2097 // case, where this code here is minified but Module was defined\
2098 // elsewhere (e.g. case 4 above). We also need to check if Module\
2099 // already exists (e.g. case 3 above).\
2100 // Note that if you want to run closure, and also to use Module\
2101 // after the generated code, you will need to define var Module = {};\
2102 // before the code. Then that object will be used in the code, and you\
2103 // can continue to use Module afterwards as well.\
2104 var Module;\
2105 if (!Module) Module = eval('(function() { try { return Module || {} } catch(e) { return {} } })()');\
2106 // Sometimes an existing Module object exists with properties\
2107 // meant to overwrite the default module functionality. Here\
2108 // we collect those properties and reapply _after_ we configure\
2109 // the current environment's defaults to avoid having to be so\
2110 // defensive during initialization.\
2111 var moduleOverrides = {};\
2112 for (var key in Module) {\
2113 if (Module.hasOwnProperty(key)) {\
2114 moduleOverrides[key] = Module[key];\
2115 }\
2116 }\
2117 // The environment setup code below is customized to use Module.\
2118 // *** Environment setup code ***\
2119 var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function';\
2120 var ENVIRONMENT_IS_WEB = typeof window === 'object';\
2121 var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function';\
2122 var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;\
2123 if (ENVIRONMENT_IS_NODE) {\
2124 // Expose functionality in the same simple way that the shells work\
2125 // Note that we pollute the global namespace here, otherwise we break in node\
2126 Module['print'] = function(x) {\
2127 process['stdout'].write(x + '\\n');\
2128 };\
2129 Module['printErr'] = function(x) {\
2130 process['stderr'].write(x + '\\n');\
2131 };\
2132 var nodeFS = require('fs');\
2133 var nodePath = require('path');\
2134 Module['read'] = function(filename, binary) {\
2135 filename = nodePath['normalize'](filename);\
2136 var ret = nodeFS['readFileSync'](filename);\
2137 // The path is absolute if the normalized version is the same as the resolved.\
2138 if (!ret && filename != nodePath['resolve'](filename)) {\
2139 filename = path.join(__dirname, '..', 'src', filename);\
2140 ret = nodeFS['readFileSync'](filename);\
2141 }\
2142 if (ret && !binary) ret = ret.toString();\
2143 return ret;\
2144 };\
2145 Module['readBinary'] = function(filename) { return Module['read'](filename, true) };\
2146 Module['load'] = function(f) {\
2147 globalEval(read(f));\
2148 };\
2149 Module['arguments'] = process['argv'].slice(2);\
2150 module.exports = Module;\
2151 }\
2152 else if (ENVIRONMENT_IS_SHELL) {\
2153 Module['print'] = print;\
2154 if (typeof printErr != 'undefined') Module['printErr'] = printErr; // not present in v8 or older sm\
2155 if (typeof read != 'undefined') {\
2156 Module['read'] = read;\
2157 } else {\
2158 Module['read'] = function() { throw 'no read() available (jsc?)' };\
2159 }\
2160 Module['readBinary'] = function(f) {\
2161 return read(f, 'binary');\
2162 };\
2163 if (typeof scriptArgs != 'undefined') {\
2164 Module['arguments'] = scriptArgs;\
2165 } else if (typeof arguments != 'undefined') {\
2166 Module['arguments'] = arguments;\
2167 }\
2168 this['Module'] = Module;\
2169 }\
2170 else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {\
2171 Module['read'] = function(url) {\
2172 var xhr = new XMLHttpRequest();\
2173 xhr.open('GET', url, false);\
2174 xhr.send(null);\
2175 return xhr.responseText;\
2176 };\
2177 if (typeof arguments != 'undefined') {\
2178 Module['arguments'] = arguments;\
2179 }\
2180 if (ENVIRONMENT_IS_WEB) {\
2181 Module['print'] = function(x) {\
2182 console.log(x);\
2183 };\
2184 Module['printErr'] = function(x) {\
2185 console.log(x);\
2186 };\
2187 this['Module'] = Module;\
2188 } else if (ENVIRONMENT_IS_WORKER) {\
2189 // We can do very little here...\
2190 var TRY_USE_DUMP = false;\
2191 Module['print'] = (TRY_USE_DUMP && (typeof(dump) !== \"undefined\") ? (function(x) {\
2192 dump(x);\
2193 }) : (function(x) {\
2194 // self.postMessage(x); // enable this if you want stdout to be sent as messages\
2195 }));\
2196 Module['load'] = importScripts;\
2197 }\
2198 }\
2199 else {\
2200 // Unreachable because SHELL is dependant on the others\
2201 throw 'Unknown runtime environment. Where are we?';\
2202 }\
2203 function globalEval(x) {\
2204 eval.call(null, x);\
2205 }\
2206 if (!Module['load'] == 'undefined' && Module['read']) {\
2207 Module['load'] = function(f) {\
2208 globalEval(Module['read'](f));\
2209 };\
2210 }\
2211 if (!Module['print']) {\
2212 Module['print'] = function(){};\
2213 }\
2214 if (!Module['printErr']) {\
2215 Module['printErr'] = Module['print'];\
2216 }\
2217 if (!Module['arguments']) {\
2218 Module['arguments'] = [];\
2219 }\
2220 // *** Environment setup code ***\
2221 // Closure helpers\
2222 Module.print = Module['print'];\
2223 Module.printErr = Module['printErr'];\
2224 // Callbacks\
2225 Module['preRun'] = [];\
2226 Module['postRun'] = [];\
2227 // Merge back in the overrides\
2228 for (var key in moduleOverrides) {\
2229 if (moduleOverrides.hasOwnProperty(key)) {\
2230 Module[key] = moduleOverrides[key];\
2231 }\
2232 }\
2233 // === Auto-generated preamble library stuff ===\
2234 //========================================\
2235 // Runtime code shared with compiler\
2236 //========================================\
2237 var Runtime = {\
2238 stackSave: function () {\
2239 return STACKTOP;\
2240 },\
2241 stackRestore: function (stackTop) {\
2242 STACKTOP = stackTop;\
2243 },\
2244 forceAlign: function (target, quantum) {\
2245 quantum = quantum || 4;\
2246 if (quantum == 1) return target;\
2247 if (isNumber(target) && isNumber(quantum)) {\
2248 return Math.ceil(target/quantum)*quantum;\
2249 } else if (isNumber(quantum) && isPowerOfTwo(quantum)) {\
2250 var logg = log2(quantum);\
2251 return '((((' +target + ')+' + (quantum-1) + ')>>' + logg + ')<<' + logg + ')';\
2252 }\
2253 return 'Math.ceil((' + target + ')/' + quantum + ')*' + quantum;\
2254 },\
2255 isNumberType: function (type) {\
2256 return type in Runtime.INT_TYPES || type in Runtime.FLOAT_TYPES;\
2257 },\
2258 isPointerType: function isPointerType(type) {\
2259 return type[type.length-1] == '*';\
2260 },\
2261 isStructType: function isStructType(type) {\
2262 if (isPointerType(type)) return false;\
2263 if (isArrayType(type)) return true;\
2264 if (/<?{ ?[^}]* ?}>?/.test(type)) return true; // { i32, i8 } etc. - anonymous struct types\
2265 // See comment in isStructPointerType()\
2266 return type[0] == '%';\
2267 },\
2268 INT_TYPES: {\"i1\":0,\"i8\":0,\"i16\":0,\"i32\":0,\"i64\":0},\
2269 FLOAT_TYPES: {\"float\":0,\"double\":0},\
2270 or64: function (x, y) {\
2271 var l = (x | 0) | (y | 0);\
2272 var h = (Math.round(x / 4294967296) | Math.round(y / 4294967296)) * 4294967296;\
2273 return l + h;\
2274 },\
2275 and64: function (x, y) {\
2276 var l = (x | 0) & (y | 0);\
2277 var h = (Math.round(x / 4294967296) & Math.round(y / 4294967296)) * 4294967296;\
2278 return l + h;\
2279 },\
2280 xor64: function (x, y) {\
2281 var l = (x | 0) ^ (y | 0);\
2282 var h = (Math.round(x / 4294967296) ^ Math.round(y / 4294967296)) * 4294967296;\
2283 return l + h;\
2284 },\
2285 getNativeTypeSize: function (type, quantumSize) {\
2286 if (Runtime.QUANTUM_SIZE == 1) return 1;\
2287 var size = {\
2288 '%i1': 1,\
2289 '%i8': 1,\
2290 '%i16': 2,\
2291 '%i32': 4,\
2292 '%i64': 8,\
2293 \"%float\": 4,\
2294 \"%double\": 8\
2295 }['%'+type]; // add '%' since float and double confuse Closure compiler as keys, and also spidermonkey as a compiler will remove 's from '_i8' etc\
2296 if (!size) {\
2297 if (type.charAt(type.length-1) == '*') {\
2298 size = Runtime.QUANTUM_SIZE; // A pointer\
2299 } else if (type[0] == 'i') {\
2300 var bits = parseInt(type.substr(1));\
2301 assert(bits % 8 == 0);\
2302 size = bits/8;\
2303 }\
2304 }\
2305 return size;\
2306 },\
2307 getNativeFieldSize: function (type) {\
2308 return Math.max(Runtime.getNativeTypeSize(type), Runtime.QUANTUM_SIZE);\
2309 },\
2310 dedup: function dedup(items, ident) {\
2311 var seen = {};\
2312 if (ident) {\
2313 return items.filter(function(item) {\
2314 if (seen[item[ident]]) return false;\
2315 seen[item[ident]] = true;\
2316 return true;\
2317 });\
2318 } else {\
2319 return items.filter(function(item) {\
2320 if (seen[item]) return false;\
2321 seen[item] = true;\
2322 return true;\
2323 });\
2324 }\
2325 },\
2326 set: function set() {\
2327 var args = typeof arguments[0] === 'object' ? arguments[0] : arguments;\
2328 var ret = {};\
2329 for (var i = 0; i < args.length; i++) {\
2330 ret[args[i]] = 0;\
2331 }\
2332 return ret;\
2333 },\
2334 STACK_ALIGN: 8,\
2335 getAlignSize: function (type, size, vararg) {\
2336 // we align i64s and doubles on 64-bit boundaries, unlike x86\
2337 if (type == 'i64' || type == 'double' || vararg) return 8;\
2338 if (!type) return Math.min(size, 8); // align structures internally to 64 bits\
2339 return Math.min(size || (type ? Runtime.getNativeFieldSize(type) : 0), Runtime.QUANTUM_SIZE);\
2340 },\
2341 calculateStructAlignment: function calculateStructAlignment(type) {\
2342 type.flatSize = 0;\
2343 type.alignSize = 0;\
2344 var diffs = [];\
2345 var prev = -1;\
2346 var index = 0;\
2347 type.flatIndexes = type.fields.map(function(field) {\
2348 index++;\
2349 var size, alignSize;\
2350 if (Runtime.isNumberType(field) || Runtime.isPointerType(field)) {\
2351 size = Runtime.getNativeTypeSize(field); // pack char; char; in structs, also char[X]s.\
2352 alignSize = Runtime.getAlignSize(field, size);\
2353 } else if (Runtime.isStructType(field)) {\
2354 if (field[1] === '0') {\
2355 // this is [0 x something]. When inside another structure like here, it must be at the end,\
2356 // and it adds no size\
2357 // XXX this happens in java-nbody for example... assert(index === type.fields.length, 'zero-length in the middle!');\
2358 size = 0;\
2359 if (Types.types[field]) {\
2360 alignSize = Runtime.getAlignSize(null, Types.types[field].alignSize);\
2361 } else {\
2362 alignSize = type.alignSize || QUANTUM_SIZE;\
2363 }\
2364 } else {\
2365 size = Types.types[field].flatSize;\
2366 alignSize = Runtime.getAlignSize(null, Types.types[field].alignSize);\
2367 }\
2368 } else if (field[0] == 'b') {\
2369 // bN, large number field, like a [N x i8]\
2370 size = field.substr(1)|0;\
2371 alignSize = 1;\
2372 } else {\
2373 throw 'Unclear type in struct: ' + field + ', in ' + type.name_ + ' :: ' + dump(Types.types[type.name_]);\
2374 }\
2375 if (type.packed) alignSize = 1;\
2376 type.alignSize = Math.max(type.alignSize, alignSize);\
2377 var curr = Runtime.alignMemory(type.flatSize, alignSize); // if necessary, place this on aligned memory\
2378 type.flatSize = curr + size;\
2379 if (prev >= 0) {\
2380 diffs.push(curr-prev);\
2381 }\
2382 prev = curr;\
2383 return curr;\
2384 });\
2385 type.flatSize = Runtime.alignMemory(type.flatSize, type.alignSize);\
2386 if (diffs.length == 0) {\
2387 type.flatFactor = type.flatSize;\
2388 } else if (Runtime.dedup(diffs).length == 1) {\
2389 type.flatFactor = diffs[0];\
2390 }\
2391 type.needsFlattening = (type.flatFactor != 1);\
2392 return type.flatIndexes;\
2393 },\
2394 generateStructInfo: function (struct, typeName, offset) {\
2395 var type, alignment;\
2396 if (typeName) {\
2397 offset = offset || 0;\
2398 type = (typeof Types === 'undefined' ? Runtime.typeInfo : Types.types)[typeName];\
2399 if (!type) return null;\
2400 if (type.fields.length != struct.length) {\
2401 printErr('Number of named fields must match the type for ' + typeName + ': possibly duplicate struct names. Cannot return structInfo');\
2402 return null;\
2403 }\
2404 alignment = type.flatIndexes;\
2405 } else {\
2406 var type = { fields: struct.map(function(item) { return item[0] }) };\
2407 alignment = Runtime.calculateStructAlignment(type);\
2408 }\
2409 var ret = {\
2410 __size__: type.flatSize\
2411 };\
2412 if (typeName) {\
2413 struct.forEach(function(item, i) {\
2414 if (typeof item === 'string') {\
2415 ret[item] = alignment[i] + offset;\
2416 } else {\
2417 // embedded struct\
2418 var key;\
2419 for (var k in item) key = k;\
2420 ret[key] = Runtime.generateStructInfo(item[key], type.fields[i], alignment[i]);\
2421 }\
2422 });\
2423 } else {\
2424 struct.forEach(function(item, i) {\
2425 ret[item[1]] = alignment[i];\
2426 });\
2427 }\
2428 return ret;\
2429 },\
2430 dynCall: function (sig, ptr, args) {\
2431 if (args && args.length) {\
2432 if (!args.splice) args = Array.prototype.slice.call(args);\
2433 args.splice(0, 0, ptr);\
2434 return Module['dynCall_' + sig].apply(null, args);\
2435 } else {\
2436 return Module['dynCall_' + sig].call(null, ptr);\
2437 }\
2438 },\
2439 functionPointers: [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],\
2440 addFunction: function (func) {\
2441 for (var i = 0; i < Runtime.functionPointers.length; i++) {\
2442 if (!Runtime.functionPointers[i]) {\
2443 Runtime.functionPointers[i] = func;\
2444 return 2 + 2*i;\
2445 }\
2446 }\
2447 throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.';\
2448 },\
2449 removeFunction: function (index) {\
2450 Runtime.functionPointers[(index-2)/2] = null;\
2451 },\
2452 warnOnce: function (text) {\
2453 if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {};\
2454 if (!Runtime.warnOnce.shown[text]) {\
2455 Runtime.warnOnce.shown[text] = 1;\
2456 Module.printErr(text);\
2457 }\
2458 },\
2459 funcWrappers: {},\
2460 getFuncWrapper: function (func, sig) {\
2461 assert(sig);\
2462 if (!Runtime.funcWrappers[func]) {\
2463 Runtime.funcWrappers[func] = function() {\
2464 return Runtime.dynCall(sig, func, arguments);\
2465 };\
2466 }\
2467 return Runtime.funcWrappers[func];\
2468 },\
2469 UTF8Processor: function () {\
2470 var buffer = [];\
2471 var needed = 0;\
2472 this.processCChar = function (code) {\
2473 code = code & 0xFF;\
2474 if (buffer.length == 0) {\
2475 if ((code & 0x80) == 0x00) { // 0xxxxxxx\
2476 return String.fromCharCode(code);\
2477 }\
2478 buffer.push(code);\
2479 if ((code & 0xE0) == 0xC0) { // 110xxxxx\
2480 needed = 1;\
2481 } else if ((code & 0xF0) == 0xE0) { // 1110xxxx\
2482 needed = 2;\
2483 } else { // 11110xxx\
2484 needed = 3;\
2485 }\
2486 return '';\
2487 }\
2488 if (needed) {\
2489 buffer.push(code);\
2490 needed--;\
2491 if (needed > 0) return '';\
2492 }\
2493 var c1 = buffer[0];\
2494 var c2 = buffer[1];\
2495 var c3 = buffer[2];\
2496 var c4 = buffer[3];\
2497 var ret;\
2498 if (buffer.length == 2) {\
2499 ret = String.fromCharCode(((c1 & 0x1F) << 6) | (c2 & 0x3F));\
2500 } else if (buffer.length == 3) {\
2501 ret = String.fromCharCode(((c1 & 0x0F) << 12) | ((c2 & 0x3F) << 6) | (c3 & 0x3F));\
2502 } else {\
2503 // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\
2504 var codePoint = ((c1 & 0x07) << 18) | ((c2 & 0x3F) << 12) |\
2505 ((c3 & 0x3F) << 6) | (c4 & 0x3F);\
2506 ret = String.fromCharCode(\
2507 Math.floor((codePoint - 0x10000) / 0x400) + 0xD800,\
2508 (codePoint - 0x10000) % 0x400 + 0xDC00);\
2509 }\
2510 buffer.length = 0;\
2511 return ret;\
2512 }\
2513 this.processJSString = function(string) {\
2514 string = unescape(encodeURIComponent(string));\
2515 var ret = [];\
2516 for (var i = 0; i < string.length; i++) {\
2517 ret.push(string.charCodeAt(i));\
2518 }\
2519 return ret;\
2520 }\
2521 },\
2522 stackAlloc: function (size) { var ret = STACKTOP;STACKTOP = (STACKTOP + size)|0;STACKTOP = ((((STACKTOP)+7)>>3)<<3); return ret; },\
2523 staticAlloc: function (size) { var ret = STATICTOP;STATICTOP = (STATICTOP + size)|0;STATICTOP = ((((STATICTOP)+7)>>3)<<3); return ret; },\
2524 dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + size)|0;DYNAMICTOP = ((((DYNAMICTOP)+7)>>3)<<3); if (DYNAMICTOP >= TOTAL_MEMORY) enlargeMemory();; return ret; },\
2525 alignMemory: function (size,quantum) { var ret = size = Math.ceil((size)/(quantum ? quantum : 8))*(quantum ? quantum : 8); return ret; },\
2526 makeBigInt: function (low,high,unsigned) { var ret = (unsigned ? ((+(((low)>>>(0))))+((+(((high)>>>(0))))*(+(4294967296)))) : ((+(((low)>>>(0))))+((+(((high)|(0))))*(+(4294967296))))); return ret; },\
2527 GLOBAL_BASE: 8,\
2528 QUANTUM_SIZE: 4,\
2529 __dummy__: 0\
2530 }\
2531 function jsCall() {\
2532 var args = Array.prototype.slice.call(arguments);\
2533 return Runtime.functionPointers[args[0]].apply(null, args.slice(1));\
2534 }\
2535 //========================================\
2536 // Runtime essentials\
2537 //========================================\
2538 var __THREW__ = 0; // Used in checking for thrown exceptions.\
2539 var ABORT = false; // whether we are quitting the application. no code should run after this. set in exit() and abort()\
2540 var EXITSTATUS = 0;\
2541 var undef = 0;\
2542 // tempInt is used for 32-bit signed values or smaller. tempBigInt is used\
2543 // for 32-bit unsigned values or more than 32 bits. TODO: audit all uses of tempInt\
2544 var tempValue, tempInt, tempBigInt, tempInt2, tempBigInt2, tempPair, tempBigIntI, tempBigIntR, tempBigIntS, tempBigIntP, tempBigIntD;\
2545 var tempI64, tempI64b;\
2546 var tempRet0, tempRet1, tempRet2, tempRet3, tempRet4, tempRet5, tempRet6, tempRet7, tempRet8, tempRet9;\
2547 function assert(condition, text) {\
2548 if (!condition) {\
2549 abort('Assertion failed: ' + text);\
2550 }\
2551 }\
2552 var globalScope = this;\
2553 // C calling interface. A convenient way to call C functions (in C files, or\
2554 // defined with extern \"C\").\
2555 //\
2556 // Note: LLVM optimizations can inline and remove functions, after which you will not be\
2557 // able to call them. Closure can also do so. To avoid that, add your function to\
2558 // the exports using something like\
2559 //\
2560 // -s EXPORTED_FUNCTIONS='[\"_main\", \"_myfunc\"]'\
2561 //\
2562 // @param ident The name of the C function (note that C++ functions will be name-mangled - use extern \"C\")\
2563 // @param returnType The return type of the function, one of the JS types 'number', 'string' or 'array' (use 'number' for any C pointer, and\
2564 // 'array' for JavaScript arrays and typed arrays; note that arrays are 8-bit).\
2565 // @param argTypes An array of the types of arguments for the function (if there are no arguments, this can be ommitted). Types are as in returnType,\
2566 // except that 'array' is not possible (there is no way for us to know the length of the array)\
2567 // @param args An array of the arguments to the function, as native JS values (as in returnType)\
2568 // Note that string arguments will be stored on the stack (the JS string will become a C string on the stack).\
2569 // @return The return value, as a native JS value (as in returnType)\
2570 function ccall(ident, returnType, argTypes, args) {\
2571 return ccallFunc(getCFunc(ident), returnType, argTypes, args);\
2572 }\
2573 Module[\"ccall\"] = ccall;\
2574 // Returns the C function with a specified identifier (for C++, you need to do manual name mangling)\
2575 function getCFunc(ident) {\
2576 try {\
2577 var func = Module['_' + ident]; // closure exported function\
2578 if (!func) func = eval('_' + ident); // explicit lookup\
2579 } catch(e) {\
2580 }\
2581 assert(func, 'Cannot call unknown function ' + ident + ' (perhaps LLVM optimizations or closure removed it?)');\
2582 return func;\
2583 }\
2584 // Internal function that does a C call using a function, not an identifier\
2585 function ccallFunc(func, returnType, argTypes, args) {\
2586 var stack = 0;\
2587 function toC(value, type) {\
2588 if (type == 'string') {\
2589 if (value === null || value === undefined || value === 0) return 0; // null string\
2590 if (!stack) stack = Runtime.stackSave();\
2591 var ret = Runtime.stackAlloc(value.length+1);\
2592 writeStringToMemory(value, ret);\
2593 return ret;\
2594 } else if (type == 'array') {\
2595 if (!stack) stack = Runtime.stackSave();\
2596 var ret = Runtime.stackAlloc(value.length);\
2597 writeArrayToMemory(value, ret);\
2598 return ret;\
2599 }\
2600 return value;\
2601 }\
2602 function fromC(value, type) {\
2603 if (type == 'string') {\
2604 return Pointer_stringify(value);\
2605 }\
2606 assert(type != 'array');\
2607 return value;\
2608 }\
2609 var i = 0;\
2610 var cArgs = args ? args.map(function(arg) {\
2611 return toC(arg, argTypes[i++]);\
2612 }) : [];\
2613 var ret = fromC(func.apply(null, cArgs), returnType);\
2614 if (stack) Runtime.stackRestore(stack);\
2615 return ret;\
2616 }\
2617 // Returns a native JS wrapper for a C function. This is similar to ccall, but\
2618 // returns a function you can call repeatedly in a normal way. For example:\
2619 //\
2620 // var my_function = cwrap('my_c_function', 'number', ['number', 'number']);\
2621 // alert(my_function(5, 22));\
2622 // alert(my_function(99, 12));\
2623 //\
2624 function cwrap(ident, returnType, argTypes) {\
2625 var func = getCFunc(ident);\
2626 return function() {\
2627 return ccallFunc(func, returnType, argTypes, Array.prototype.slice.call(arguments));\
2628 }\
2629 }\
2630 Module[\"cwrap\"] = cwrap;\
2631 // Sets a value in memory in a dynamic way at run-time. Uses the\
2632 // type data. This is the same as makeSetValue, except that\
2633 // makeSetValue is done at compile-time and generates the needed\
2634 // code then, whereas this function picks the right code at\
2635 // run-time.\
2636 // Note that setValue and getValue only do *aligned* writes and reads!\
2637 // Note that ccall uses JS types as for defining types, while setValue and\
2638 // getValue need LLVM types ('i8', 'i32') - this is a lower-level operation\
2639 function setValue(ptr, value, type, noSafe) {\
2640 type = type || 'i8';\
2641 if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit\
2642 switch(type) {\
2643 case 'i1': HEAP8[(ptr)]=value; break;\
2644 case 'i8': HEAP8[(ptr)]=value; break;\
2645 case 'i16': HEAP16[((ptr)>>1)]=value; break;\
2646 case 'i32': HEAP32[((ptr)>>2)]=value; break;\
2647 case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math.abs(tempDouble))) >= (+(1)) ? (tempDouble > (+(0)) ? ((Math.min((+(Math.floor((tempDouble)/(+(4294967296))))), (+(4294967295))))|0)>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/(+(4294967296)))))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break;\
2648 case 'float': HEAPF32[((ptr)>>2)]=value; break;\
2649 case 'double': HEAPF64[((ptr)>>3)]=value; break;\
2650 default: abort('invalid type for setValue: ' + type);\
2651 }\
2652 }\
2653 Module['setValue'] = setValue;\
2654 // Parallel to setValue.\
2655 function getValue(ptr, type, noSafe) {\
2656 type = type || 'i8';\
2657 if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit\
2658 switch(type) {\
2659 case 'i1': return HEAP8[(ptr)];\
2660 case 'i8': return HEAP8[(ptr)];\
2661 case 'i16': return HEAP16[((ptr)>>1)];\
2662 case 'i32': return HEAP32[((ptr)>>2)];\
2663 case 'i64': return HEAP32[((ptr)>>2)];\
2664 case 'float': return HEAPF32[((ptr)>>2)];\
2665 case 'double': return HEAPF64[((ptr)>>3)];\
2666 default: abort('invalid type for setValue: ' + type);\
2667 }\
2668 return null;\
2669 }\
2670 Module['getValue'] = getValue;\
2671 var ALLOC_NORMAL = 0; // Tries to use _malloc()\
2672 var ALLOC_STACK = 1; // Lives for the duration of the current function call\
2673 var ALLOC_STATIC = 2; // Cannot be freed\
2674 var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk\
2675 var ALLOC_NONE = 4; // Do not allocate\
2676 Module['ALLOC_NORMAL'] = ALLOC_NORMAL;\
2677 Module['ALLOC_STACK'] = ALLOC_STACK;\
2678 Module['ALLOC_STATIC'] = ALLOC_STATIC;\
2679 Module['ALLOC_DYNAMIC'] = ALLOC_DYNAMIC;\
2680 Module['ALLOC_NONE'] = ALLOC_NONE;\
2681 // allocate(): This is for internal use. You can use it yourself as well, but the interface\
2682 // is a little tricky (see docs right below). The reason is that it is optimized\
2683 // for multiple syntaxes to save space in generated code. So you should\
2684 // normally not use allocate(), and instead allocate memory using _malloc(),\
2685 // initialize it with setValue(), and so forth.\
2686 // @slab: An array of data, or a number. If a number, then the size of the block to allocate,\
2687 // in *bytes* (note that this is sometimes confusing: the next parameter does not\
2688 // affect this!)\
2689 // @types: Either an array of types, one for each byte (or 0 if no type at that position),\
2690 // or a single type which is used for the entire block. This only matters if there\
2691 // is initial data - if @slab is a number, then this does not matter at all and is\
2692 // ignored.\
2693 // @allocator: How to allocate memory, see ALLOC_*\
2694 function allocate(slab, types, allocator, ptr) {\
2695 var zeroinit, size;\
2696 if (typeof slab === 'number') {\
2697 zeroinit = true;\
2698 size = slab;\
2699 } else {\
2700 zeroinit = false;\
2701 size = slab.length;\
2702 }\
2703 var singleType = typeof types === 'string' ? types : null;\
2704 var ret;\
2705 if (allocator == ALLOC_NONE) {\
2706 ret = ptr;\
2707 } else {\
2708 ret = [_malloc, Runtime.stackAlloc, Runtime.staticAlloc, Runtime.dynamicAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length));\
2709 }\
2710 if (zeroinit) {\
2711 var ptr = ret, stop;\
2712 assert((ret & 3) == 0);\
2713 stop = ret + (size & ~3);\
2714 for (; ptr < stop; ptr += 4) {\
2715 HEAP32[((ptr)>>2)]=0;\
2716 }\
2717 stop = ret + size;\
2718 while (ptr < stop) {\
2719 HEAP8[((ptr++)|0)]=0;\
2720 }\
2721 return ret;\
2722 }\
2723 if (singleType === 'i8') {\
2724 if (slab.subarray || slab.slice) {\
2725 HEAPU8.set(slab, ret);\
2726 } else {\
2727 HEAPU8.set(new Uint8Array(slab), ret);\
2728 }\
2729 return ret;\
2730 }\
2731 var i = 0, type, typeSize, previousType;\
2732 while (i < size) {\
2733 var curr = slab[i];\
2734 if (typeof curr === 'function') {\
2735 curr = Runtime.getFunctionIndex(curr);\
2736 }\
2737 type = singleType || types[i];\
2738 if (type === 0) {\
2739 i++;\
2740 continue;\
2741 }\
2742 if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later\
2743 setValue(ret+i, curr, type);\
2744 // no need to look up size unless type changes, so cache it\
2745 if (previousType !== type) {\
2746 typeSize = Runtime.getNativeTypeSize(type);\
2747 previousType = type;\
2748 }\
2749 i += typeSize;\
2750 }\
2751 return ret;\
2752 }\
2753 Module['allocate'] = allocate;\
2754 function Pointer_stringify(ptr, /* optional */ length) {\
2755 // TODO: use TextDecoder\
2756 // Find the length, and check for UTF while doing so\
2757 var hasUtf = false;\
2758 var t;\
2759 var i = 0;\
2760 while (1) {\
2761 t = HEAPU8[(((ptr)+(i))|0)];\
2762 if (t >= 128) hasUtf = true;\
2763 else if (t == 0 && !length) break;\
2764 i++;\
2765 if (length && i == length) break;\
2766 }\
2767 if (!length) length = i;\
2768 var ret = '';\
2769 if (!hasUtf) {\
2770 var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack\
2771 var curr;\
2772 while (length > 0) {\
2773 curr = String.fromCharCode.apply(String, HEAPU8.subarray(ptr, ptr + Math.min(length, MAX_CHUNK)));\
2774 ret = ret ? ret + curr : curr;\
2775 ptr += MAX_CHUNK;\
2776 length -= MAX_CHUNK;\
2777 }\
2778 return ret;\
2779 }\
2780 var utf8 = new Runtime.UTF8Processor();\
2781 for (i = 0; i < length; i++) {\
2782 t = HEAPU8[(((ptr)+(i))|0)];\
2783 ret += utf8.processCChar(t);\
2784 }\
2785 return ret;\
2786 }\
2787 Module['Pointer_stringify'] = Pointer_stringify;\
2788 // Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns\
2789 // a copy of that string as a Javascript String object.\
2790 function UTF16ToString(ptr) {\
2791 var i = 0;\
2792 var str = '';\
2793 while (1) {\
2794 var codeUnit = HEAP16[(((ptr)+(i*2))>>1)];\
2795 if (codeUnit == 0)\
2796 return str;\
2797 ++i;\
2798 // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through.\
2799 str += String.fromCharCode(codeUnit);\
2800 }\
2801 }\
2802 Module['UTF16ToString'] = UTF16ToString;\
2803 // Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', \
2804 // null-terminated and encoded in UTF16LE form. The copy will require at most (str.length*2+1)*2 bytes of space in the HEAP.\
2805 function stringToUTF16(str, outPtr) {\
2806 for(var i = 0; i < str.length; ++i) {\
2807 // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP.\
2808 var codeUnit = str.charCodeAt(i); // possibly a lead surrogate\
2809 HEAP16[(((outPtr)+(i*2))>>1)]=codeUnit\
2810 }\
2811 // Null-terminate the pointer to the HEAP.\
2812 HEAP16[(((outPtr)+(str.length*2))>>1)]=0\
2813 }\
2814 Module['stringToUTF16'] = stringToUTF16;\
2815 // Given a pointer 'ptr' to a null-terminated UTF32LE-encoded string in the emscripten HEAP, returns\
2816 // a copy of that string as a Javascript String object.\
2817 function UTF32ToString(ptr) {\
2818 var i = 0;\
2819 var str = '';\
2820 while (1) {\
2821 var utf32 = HEAP32[(((ptr)+(i*4))>>2)];\
2822 if (utf32 == 0)\
2823 return str;\
2824 ++i;\
2825 // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing.\
2826 if (utf32 >= 0x10000) {\
2827 var ch = utf32 - 0x10000;\
2828 str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));\
2829 } else {\
2830 str += String.fromCharCode(utf32);\
2831 }\
2832 }\
2833 }\
2834 Module['UTF32ToString'] = UTF32ToString;\
2835 // Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', \
2836 // null-terminated and encoded in UTF32LE form. The copy will require at most (str.length+1)*4 bytes of space in the HEAP,\
2837 // but can use less, since str.length does not return the number of characters in the string, but the number of UTF-16 code units in the string.\
2838 function stringToUTF32(str, outPtr) {\
2839 var iChar = 0;\
2840 for(var iCodeUnit = 0; iCodeUnit < str.length; ++iCodeUnit) {\
2841 // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap.\
2842 var codeUnit = str.charCodeAt(iCodeUnit); // possibly a lead surrogate\
2843 if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) {\
2844 var trailSurrogate = str.charCodeAt(++iCodeUnit);\
2845 codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF);\
2846 }\
2847 HEAP32[(((outPtr)+(iChar*4))>>2)]=codeUnit\
2848 ++iChar;\
2849 }\
2850 // Null-terminate the pointer to the HEAP.\
2851 HEAP32[(((outPtr)+(iChar*4))>>2)]=0\
2852 }\
2853 Module['stringToUTF32'] = stringToUTF32;\
2854 // Memory management\
2855 var PAGE_SIZE = 4096;\
2856 function alignMemoryPage(x) {\
2857 return ((x+4095)>>12)<<12;\
2858 }\
2859 var HEAP;\
2860 var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;\
2861 var STATIC_BASE = 0, STATICTOP = 0, staticSealed = false; // static area\
2862 var STACK_BASE = 0, STACKTOP = 0, STACK_MAX = 0; // stack area\
2863 var DYNAMIC_BASE = 0, DYNAMICTOP = 0; // dynamic area handled by sbrk\
2864 function enlargeMemory() {\
2865 abort('Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + TOTAL_MEMORY + ', or (2) set Module.TOTAL_MEMORY before the program runs.');\
2866 }\
2867 var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880;\
2868 var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216;\
2869 var FAST_MEMORY = Module['FAST_MEMORY'] || 2097152;\
2870 // Initialize the runtime's memory\
2871 // check for full engine support (use string 'subarray' to avoid closure compiler confusion)\
2872 assert(!!Int32Array && !!Float64Array && !!(new Int32Array(1)['subarray']) && !!(new Int32Array(1)['set']),\
2873 'Cannot fallback to non-typed array case: Code is too specialized');\
2874 var buffer = new ArrayBuffer(TOTAL_MEMORY);\
2875 HEAP8 = new Int8Array(buffer);\
2876 HEAP16 = new Int16Array(buffer);\
2877 HEAP32 = new Int32Array(buffer);\
2878 HEAPU8 = new Uint8Array(buffer);\
2879 HEAPU16 = new Uint16Array(buffer);\
2880 HEAPU32 = new Uint32Array(buffer);\
2881 HEAPF32 = new Float32Array(buffer);\
2882 HEAPF64 = new Float64Array(buffer);\
2883 // Endianness check (note: assumes compiler arch was little-endian)\
2884 HEAP32[0] = 255;\
2885 assert(HEAPU8[0] === 255 && HEAPU8[3] === 0, 'Typed arrays 2 must be run on a little-endian system');\
2886 Module['HEAP'] = HEAP;\
2887 Module['HEAP8'] = HEAP8;\
2888 Module['HEAP16'] = HEAP16;\
2889 Module['HEAP32'] = HEAP32;\
2890 Module['HEAPU8'] = HEAPU8;\
2891 Module['HEAPU16'] = HEAPU16;\
2892 Module['HEAPU32'] = HEAPU32;\
2893 Module['HEAPF32'] = HEAPF32;\
2894 Module['HEAPF64'] = HEAPF64;\
2895 function callRuntimeCallbacks(callbacks) {\
2896 while(callbacks.length > 0) {\
2897 var callback = callbacks.shift();\
2898 if (typeof callback == 'function') {\
2899 callback();\
2900 continue;\
2901 }\
2902 var func = callback.func;\
2903 if (typeof func === 'number') {\
2904 if (callback.arg === undefined) {\
2905 Runtime.dynCall('v', func);\
2906 } else {\
2907 Runtime.dynCall('vi', func, [callback.arg]);\
2908 }\
2909 } else {\
2910 func(callback.arg === undefined ? null : callback.arg);\
2911 }\
2912 }\
2913 }\
2914 var __ATPRERUN__ = []; // functions called before the runtime is initialized\
2915 var __ATINIT__ = []; // functions called during startup\
2916 var __ATMAIN__ = []; // functions called when main() is to be run\
2917 var __ATEXIT__ = []; // functions called during shutdown\
2918 var __ATPOSTRUN__ = []; // functions called after the runtime has exited\
2919 var runtimeInitialized = false;\
2920 function preRun() {\
2921 // compatibility - merge in anything from Module['preRun'] at this time\
2922 if (Module['preRun']) {\
2923 if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];\
2924 while (Module['preRun'].length) {\
2925 addOnPreRun(Module['preRun'].shift());\
2926 }\
2927 }\
2928 callRuntimeCallbacks(__ATPRERUN__);\
2929 }\
2930 function ensureInitRuntime() {\
2931 if (runtimeInitialized) return;\
2932 runtimeInitialized = true;\
2933 callRuntimeCallbacks(__ATINIT__);\
2934 }\
2935 function preMain() {\
2936 callRuntimeCallbacks(__ATMAIN__);\
2937 }\
2938 function exitRuntime() {\
2939 callRuntimeCallbacks(__ATEXIT__);\
2940 }\
2941 function postRun() {\
2942 // compatibility - merge in anything from Module['postRun'] at this time\
2943 if (Module['postRun']) {\
2944 if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']];\
2945 while (Module['postRun'].length) {\
2946 addOnPostRun(Module['postRun'].shift());\
2947 }\
2948 }\
2949 callRuntimeCallbacks(__ATPOSTRUN__);\
2950 }\
2951 function addOnPreRun(cb) {\
2952 __ATPRERUN__.unshift(cb);\
2953 }\
2954 Module['addOnPreRun'] = Module.addOnPreRun = addOnPreRun;\
2955 function addOnInit(cb) {\
2956 __ATINIT__.unshift(cb);\
2957 }\
2958 Module['addOnInit'] = Module.addOnInit = addOnInit;\
2959 function addOnPreMain(cb) {\
2960 __ATMAIN__.unshift(cb);\
2961 }\
2962 Module['addOnPreMain'] = Module.addOnPreMain = addOnPreMain;\
2963 function addOnExit(cb) {\
2964 __ATEXIT__.unshift(cb);\
2965 }\
2966 Module['addOnExit'] = Module.addOnExit = addOnExit;\
2967 function addOnPostRun(cb) {\
2968 __ATPOSTRUN__.unshift(cb);\
2969 }\
2970 Module['addOnPostRun'] = Module.addOnPostRun = addOnPostRun;\
2971 // Tools\
2972 // This processes a JS string into a C-line array of numbers, 0-terminated.\
2973 // For LLVM-originating strings, see parser.js:parseLLVMString function\
2974 function intArrayFromString(stringy, dontAddNull, length /* optional */) {\
2975 var ret = (new Runtime.UTF8Processor()).processJSString(stringy);\
2976 if (length) {\
2977 ret.length = length;\
2978 }\
2979 if (!dontAddNull) {\
2980 ret.push(0);\
2981 }\
2982 return ret;\
2983 }\
2984 Module['intArrayFromString'] = intArrayFromString;\
2985 function intArrayToString(array) {\
2986 var ret = [];\
2987 for (var i = 0; i < array.length; i++) {\
2988 var chr = array[i];\
2989 if (chr > 0xFF) {\
2990 chr &= 0xFF;\
2991 }\
2992 ret.push(String.fromCharCode(chr));\
2993 }\
2994 return ret.join('');\
2995 }\
2996 Module['intArrayToString'] = intArrayToString;\
2997 // Write a Javascript array to somewhere in the heap\
2998 function writeStringToMemory(string, buffer, dontAddNull) {\
2999 var array = intArrayFromString(string, dontAddNull);\
3000 var i = 0;\
3001 while (i < array.length) {\
3002 var chr = array[i];\
3003 HEAP8[(((buffer)+(i))|0)]=chr\
3004 i = i + 1;\
3005 }\
3006 }\
3007 Module['writeStringToMemory'] = writeStringToMemory;\
3008 function writeArrayToMemory(array, buffer) {\
3009 for (var i = 0; i < array.length; i++) {\
3010 HEAP8[(((buffer)+(i))|0)]=array[i];\
3011 }\
3012 }\
3013 Module['writeArrayToMemory'] = writeArrayToMemory;\
3014 function unSign(value, bits, ignore, sig) {\
3015 if (value >= 0) {\
3016 return value;\
3017 }\
3018 return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts\
3019 : Math.pow(2, bits) + value;\
3020 }\
3021 function reSign(value, bits, ignore, sig) {\
3022 if (value <= 0) {\
3023 return value;\
3024 }\
3025 var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32\
3026 : Math.pow(2, bits-1);\
3027 if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that\
3028 // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors\
3029 // TODO: In i64 mode 1, resign the two parts separately and safely\
3030 value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts\
3031 }\
3032 return value;\
3033 }\
3034 if (!Math['imul']) Math['imul'] = function(a, b) {\
3035 var ah = a >>> 16;\
3036 var al = a & 0xffff;\
3037 var bh = b >>> 16;\
3038 var bl = b & 0xffff;\
3039 return (al*bl + ((ah*bl + al*bh) << 16))|0;\
3040 };\
3041 Math.imul = Math['imul'];\
3042 // A counter of dependencies for calling run(). If we need to\
3043 // do asynchronous work before running, increment this and\
3044 // decrement it. Incrementing must happen in a place like\
3045 // PRE_RUN_ADDITIONS (used by emcc to add file preloading).\
3046 // Note that you can add dependencies in preRun, even though\
3047 // it happens right before run - run will be postponed until\
3048 // the dependencies are met.\
3049 var runDependencies = 0;\
3050 var runDependencyTracking = {};\
3051 var calledInit = false, calledRun = false;\
3052 var runDependencyWatcher = null;\
3053 function addRunDependency(id) {\
3054 runDependencies++;\
3055 if (Module['monitorRunDependencies']) {\
3056 Module['monitorRunDependencies'](runDependencies);\
3057 }\
3058 if (id) {\
3059 assert(!runDependencyTracking[id]);\
3060 runDependencyTracking[id] = 1;\
3061 } else {\
3062 Module.printErr('warning: run dependency added without ID');\
3063 }\
3064 }\
3065 Module['addRunDependency'] = addRunDependency;\
3066 function removeRunDependency(id) {\
3067 runDependencies--;\
3068 if (Module['monitorRunDependencies']) {\
3069 Module['monitorRunDependencies'](runDependencies);\
3070 }\
3071 if (id) {\
3072 assert(runDependencyTracking[id]);\
3073 delete runDependencyTracking[id];\
3074 } else {\
3075 Module.printErr('warning: run dependency removed without ID');\
3076 }\
3077 if (runDependencies == 0) {\
3078 if (runDependencyWatcher !== null) {\
3079 clearInterval(runDependencyWatcher);\
3080 runDependencyWatcher = null;\
3081 } \
3082 // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false)\
3083 if (!calledRun && shouldRunNow) run();\
3084 }\
3085 }\
3086 Module['removeRunDependency'] = removeRunDependency;\
3087 Module[\"preloadedImages\"] = {}; // maps url to image data\
3088 Module[\"preloadedAudios\"] = {}; // maps url to audio data\
3089 function loadMemoryInitializer(filename) {\
3090 function applyData(data) {\
3091 HEAPU8.set(data, STATIC_BASE);\
3092 }\
3093 // always do this asynchronously, to keep shell and web as similar as possible\
3094 addOnPreRun(function() {\
3095 if (ENVIRONMENT_IS_NODE || ENVIRONMENT_IS_SHELL) {\
3096 applyData(Module['readBinary'](filename));\
3097 } else {\
3098 Browser.asyncLoad(filename, function(data) {\
3099 applyData(data);\
3100 }, function(data) {\
3101 throw 'could not load memory initializer ' + filename;\
3102 });\
3103 }\
3104 });\
3105 }\
3106 // === Body ===\
3107 STATIC_BASE = 8;\
3108 STATICTOP = STATIC_BASE + 11056;\
3109 /* global initializers */ __ATINIT__.push({ func: function() { runPostSets() } });\
3110 var _stdout;\
3111 var _stdin;\
3112 var _stderr;\
3113 var _stdout = _stdout=allocate([0,0,0,0,0,0,0,0], \"i8\", ALLOC_STATIC);\
3114 var _stdin = _stdin=allocate([0,0,0,0,0,0,0,0], \"i8\", ALLOC_STATIC);\
3115 var _stderr = _stderr=allocate([0,0,0,0,0,0,0,0], \"i8\", ALLOC_STATIC);\
3116 /* memory initializer */ allocate([16,36,0,0,244,1,0,0,64,28,0,0,2,2,0,0,0,22,0,0,0,2,0,0,88,17,0,0,28,2,0,0,208,14,0,0,210,1,0,0,128,12,0,0,80,1,0,0,152,10,0,0,172,1,0,0,64,9,0,0,102,1,0,0,104,8,0,0,40,2,0,0,0,0,0,0,0,0,0,0,80,36,0,0,34,1,0,0,200,28,0,0,4,2,0,0,32,22,0,0,180,1,0,0,112,17,0,0,36,2,0,0,224,14,0,0,6,2,0,0,136,12,0,0,214,1,0,0,160,10,0,0,52,1,0,0,72,9,0,0,242,1,0,0,112,8,0,0,194,1,0,0,56,40,0,0,46,1,0,0,144,39,0,0,108,1,0,0,0,0,0,0,0,0,0,0,200,14,0,0,192,1,0,0,120,12,0,0,44,1,0,0,144,10,0,0,86,1,0,0,56,9,0,0,56,1,0,0,96,8,0,0,116,1,0,0,24,28,0,0,168,1,0,0,224,35,0,0,98,1,0,0,48,40,0,0,122,1,0,0,72,39,0,0,234,1,0,0,40,38,0,0,184,1,0,0,96,37,0,0,62,1,0,0,136,36,0,0,106,1,0,0,216,35,0,0,42,1,0,0,88,35,0,0,226,1,0,0,224,34,0,0,82,1,0,0,0,0,0,0,0,0,0,0,32,23,0,0,96,40,0,0,184,39,0,0,160,38,0,0,6,6,6,6,7,7,7,7,7,7,10,9,5,4,3,3,3,3,3,3,3,3,3,3,3,3,2,2,1,1,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,89,64,0,0,0,0,0,136,195,64,0,0,0,0,132,215,151,65,0,128,224,55,121,195,65,67,23,110,5,181,181,184,147,70,245,249,63,233,3,79,56,77,50,29,48,249,72,119,130,90,60,191,115,127,221,79,21,117,128,16,0,0,16,2,0,0,80,16,0,0,20,2,0,0,0,0,0,0,0,0,0,0,240,31,0,0,216,30,0,0,200,29,0,0,40,29,0,0,32,28,0,0,56,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,0,15,0,0,16,1,0,0,144,12,0,0,22,1,0,0,184,10,0,0,104,1,0,0,80,9,0,0,138,1,0,0,128,8,0,0,6,1,0,0,64,40,0,0,160,1,0,0,152,39,0,0,32,2,0,0,128,38,0,0,164,1,0,0,152,37,0,0,58,1,0,0,208,36,0,0,78,1,0,0,0,36,0,0,74,1,0,0,80,22,0,0,204,1,0,0,104,35,0,0,158,1,0,0,240,34,0,0,208,1,0,0,88,34,0,0,10,1,0,0,120,33,0,0,222,1,0,0,216,32,0,0,190,1,0,0,248,31,0,0,186,1,0,0,224,30,0,0,92,1,0,0,208,29,0,0,144,1,0,0,56,29,0,0,66,1,0,0,40,28,0,0,126,1,0,0,128,27,0,0,196,1,0,0,208,26,0,0,14,1,0,0,104,26,0,0,254,1,0,0,0,26,0,0,30,2,0,0,96,25,0,0,166,1,0,0,192,24,0,0,150,1,0,0,0,0,0,0,0,0,0,0,24,13,0,0,128,35,0,0,120,27,0,0,128,21,0,0,168,16,0,0,152,14,0,0,216,11,0,0,96,10,0,0,24,9,0,0,16,8,0,0,24,40,0,0,56,39,0,0,16,38,0,0,72,37,0,0,112,36,0,0,200,35,0,0,72,35,0,0,168,34,0,0,248,33,0,0,56,33,0,0,112,32,0,0,120,31,0,0,96,31,0,0,128,30,0,0,136,29,0,0,208,28,0,0,56,27,0,0,40,27,0,0,152,26,0,0,32,26,0,0,184,25,0,0,0,0,0,0,128,31,0,0,216,38,0,0,64,31,0,0,56,24,0,0,232,18,0,0,168,15,0,0,104,13,0,0,64,31,0,0,72,11,0,0,240,9,0,0,200,8,0,0,0,0,0,0,136,40,0,0,216,39,0,0,184,38,0,0,224,37,0,0,32,37,0,0,48,36,0,0,176,35,0,0,32,35,0,0,128,34,0,0,176,33,0,0,0,33,0,0,40,32,0,0,56,31,0,0,96,30,0,0,112,29,0,0,136,28,0,0,192,27,0,0,0,0,0,0,96,113,84,96,80,113,108,49,16,60,84,108,124,124,124,124,124,124,96,96,96,104,34,188,188,188,228,228,84,84,16,98,98,132,20,0,81,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,0,0,0,0,120,11,0,0,112,11,0,0,80,11,0,0,8,11,0,0,200,10,0,0,168,10,0,0,128,10,0,0,0,0,0,0,208,35,0,0,46,2,0,0,80,35,0,0,118,1,0,0,0,0,0,0,0,0,0,0,136,8,0,0,120,1,0,0,72,40,0,0,42,2,0,0,160,39,0,0,10,2,0,0,136,38,0,0,84,1,0,0,160,37,0,0,220,1,0,0,216,36,0,0,170,1,0,0,200,17,0,0,154,1,0,0,8,36,0,0,206,1,0,0,112,35,0,0,50,1,0,0,248,34,0,0,252,1,0,0,96,34,0,0,2,1,0,0,0,0,0,0,0,0,0,0,136,26,0,0,16,26,0,0,136,25,0,0,224,24,0,0,248,23,0,0,0,0,0,0,136,8,0,0,120,1,0,0,72,40,0,0,200,1,0,0,136,38,0,0,28,1,0,0,8,36,0,0,130,1,0,0,104,22,0,0,252,0,0,0,248,21,0,0,44,2,0,0,96,34,0,0,38,1,0,0,168,21,0,0,32,1,0,0,32,21,0,0,250,1,0,0,0,0,0,0,0,0,0,0,200,19,0,0,48,19,0,0,200,18,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,18,0,0,168,17,0,0,80,17,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,21,0,0,238,1,0,0,80,37,0,0,54,1,0,0,144,29,0,0,18,1,0,0,152,22,0,0,88,1,0,0,232,17,0,0,36,1,0,0,48,15,0,0,198,1,0,0,208,12,0,0,4,1,0,0,208,10,0,0,110,1,0,0,120,9,0,0,176,1,0,0,144,8,0,0,178,1,0,0,80,40,0,0,230,1,0,0,168,39,0,0,90,1,0,0,144,38,0,0,48,1,0,0,168,37,0,0,236,1,0,0,0,0,0,0,0,0,0,0,216,37,0,0,114,1,0,0,88,30,0,0,232,1,0,0,32,23,0,0,136,1,0,0,40,18,0,0,224,1,0,0,64,15,0,0,134,1,0,0,248,12,0,0,174,1,0,0,0,0,0,0,0,0,0,0,88,29,0,0,70,1,0,0,96,28,0,0,18,2,0,0,184,27,0,0,188,1,0,0,248,26,0,0,182,1,0,0,144,26,0,0,152,1,0,0,24,26,0,0,22,2,0,0,144,25,0,0,202,1,0,0,232,24,0,0,212,1,0,0,48,24,0,0,24,2,0,0,16,23,0,0,218,1,0,0,120,22,0,0,8,1,0,0,24,22,0,0,162,1,0,0,216,21,0,0,216,1,0,0,72,21,0,0,12,1,0,0,208,20,0,0,34,2,0,0,104,20,0,0,14,2,0,0,224,19,0,0,8,2,0,0,72,19,0,0,24,1,0,0,216,18,0,0,240,1,0,0,24,18,0,0,112,1,0,0,184,17,0,0,72,1,0,0,104,17,0,0,0,1,0,0,240,16,0,0,228,1,0,0,160,16,0,0,128,1,0,0,0,0,0,0,0,0,0,0,105,102,0,0,0,0,0,0,46,47,63,46,115,111,59,47,117,115,114,47,108,111,99,97,108,47,108,105,98,47,108,117,97,47,53,46,49,47,63,46,115,111,59,47,117,115,114,47,108,111,99,97,108,47,108,105,98,47,108,117,97,47,53,46,49,47,108,111,97,100,97,108,108,46,115,111,0,0,0,0,102,111,114,109,97,116,0,0,115,111,114,116,0,0,0,0,115,101,116,108,111,99,97,108,101,0,0,0,0,0,0,0,97,116,97,110,0,0,0,0,99,108,111,115,101,0,0,0,115,101,116,104,111,111,107,0,116,111,111,32,109,97,110,121,32,114,101,115,117,108,116,115,32,116,111,32,114,101,115,117,109,101,0,0,0,0,0,0,98,97,100,32,104,101,97,100,101,114,0,0,0,0,0,0,117,112,118,97,108,0,0,0,105,116,101,109,115,32,105,110,32,97,32,99,111,110,115,116,114,117,99,116,111,114,0,0,102,105,101,108,100,0,0,0,109,101,109,111,114,121,32,97,108,108,111,99,97,116,105,111,110,32,101,114,114,111,114,58,32,98,108,111,99,107,32,116,111,111,32,98,105,103,0,0,102,117,110,99,116,105,111,110,0,0,0,0,0,0,0,0,76,85,65,95,67,80,65,84,72,0,0,0,0,0,0,0,102,105,110,100,0,0,0,0,115,101,116,110,0,0,0,0,114,101,110,97,109,101,0,0,97,116,97,110,50,0,0,0,99,97,110,110,111,116,32,99,108,111,115,101,32,115,116,97,110,100,97,114,100,32,102,105,108,101,0,0,0,0,0,0,115,101,116,102,101,110,118,0,99,97,110,110,111,116,32,114,101,115,117,109,101,32,37,115,32,99,111,114,111,117,116,105,110,101,0,0,0,0,0,0,37,115,58,37,100,58,32,0,99,97,108,108,0,0,0,0,39,102,111,114,39,32,115,116,101,112,32,109,117,115,116,32,98,101,32,97,32,110,117,109,98,101,114,0,0,0,0,0,37,115,58,32,37,115,32,105,110,32,112,114,101,99,111,109,112,105,108,101,100,32,99,104,117,110,107,0,0,0,0,0,112,114,111,116,111,0,0,0,116,111,111,32,109,97,110,121,32,108,111,99,97,108,32,118,97,114,105,97,98,108,101,115,0,0,0,0,0,0,0,0,103,108,111,98,97,108,0,0,97,116,116,101,109,112,116,32,116,111,32,37,115,32,37,115,32,39,37,115,39,32,40,97,32,37,115,32,118,97,108,117,101,41,0,0,0,0,0,0,97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,33,0,0,0,0,0,0,0,102,111,114,0,0,0,0,0,37,115,0,0,0,0,0,0,100,101,98,117,103,0,0,0,99,112,97,116,104,0,0,0,115,101,116,115,116,101,112,109,117,108,0,0,0,0,0,0,100,117,109,112,0,0,0,0,114,101,109,111,118,101,0,0,114,101,109,111,118,101,0,0,115,101,116,112,97,117,115,101,0,0,0,0,0,0,0,0,97,115,105,110,0,0,0,0,37,115,0,0,0,0,0,0,115,116,101,112,0,0,0,0,103,101,116,117,112,118,97,108,117,101,0,0,0,0,0,0,116,111,111,32,109,97,110,121,32,97,114,103,117,109,101,110,116,115,32,116,111,32,114,101,115,117,109,101,0,0,0,0,83,108,0,0,0,0,0,0,99,111,117,110,116,0,0,0,39,102,111,114,39,32,108,105,109,105,116,32,109,117,115,116,32,98,101,32,97,32,110,117,109,98,101,114,0,0,0,0,110,0,0,0,0,0,0,0,98,97,100,32,105,110,116,101,103,101,114,0,0,0,0,0,116,104,114,101,97,100,0,0,99,111,108,108,101,99,116,0,108,111,99,97,108,32,118,97,114,105,97,98,108,101,115,0,34,93,0,0,0,0,0,0,114,101,115,116,97,114,116,0,115,116,111,112,0,0,0,0,108,111,99,97,108,0,0,0,114,101,97,100,101,114,32,102,117,110,99,116,105,111,110,32,109,117,115,116,32,114,101,116,117,114,110,32,97,32,115,116,114,105,110,103,0,0,0,0,116,111,111,32,109,97,110,121,32,110,101,115,116,101,100,32,102,117,110,99,116,105,111,110,115,0,0,0,0,0,0,0,61,40,108,111,97,100,41,0,102,97,108,115,101,0,0,0,109,97,116,104,0,0,0,0,46,47,63,46,108,117,97,59,47,117,115,114,47,108,111,99,97,108,47,115,104,97,114,101,47,108,117,97,47,53,46,49,47,63,46,108,117,97,59,47,117,115,114,47,108,111,99,97,108,47,115,104,97,114,101,47,108,117,97,47,53,46,49,47,63,47,105,110,105,116,46,108,117,97,59,47,117,115,114,47,108,111,99,97,108,47,108,105,98,47,108,117,97,47,53,46,49,47,63,46,108,117,97,59,47,117,115,114,47,108,111,99,97,108,47,108,105,98,47,108,117,97,47,53,46,49,47,63,47,105,110,105,116,46,108,117,97,0,0,0,0,0,0,0,99,104,97,114,0,0,0,0,105,110,115,101,114,116,0,0,103,101,116,101,110,118,0,0,97,99,111,115,0,0,0,0,37,115,58,32,37,115,0,0,39,116,111,115,116,114,105,110,103,39,32,109,117,115,116,32,114,101,116,117,114,110,32,97,32,115,116,114,105,110,103,32,116,111,32,39,112,114,105,110,116,39,0,0,0,0,0,0,103,101,116,109,101,116,97,116,97,98,108,101,0,0,0,0,105,110,100,101,120,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,0,0,0,0,121,105,101,108,100,0,0,0,37,115,32,101,120,112,101,99,116,101,100,44,32,103,111,116,32,37,115,0,0,0,0,0,97,110,100,0,0,0,0,0,39,102,111,114,39,32,105,110,105,116,105,97,108,32,118,97,108,117,101,32,109,117,115,116,32,98,101,32,97,32,110,117,109,98,101,114,0,0,0,0,115,116,97,99,107,32,111,118,101,114,102,108,111,119,0,0,98,97,100,32,99,111,110,115,116,97,110,116,0,0,0,0,102,117,110,99,116,105,111,110,0,0,0,0,0,0,0,0,110,111,32,102,117,110,99,116,105,111,110,32,101,110,118,105,114,111,110,109,101,110,116,32,102,111,114,32,116,97,105,108,32,99,97,108,108,32,97,116,32,108,101,118,101,108,32,37,100,0,0,0,0,0,0,0,60,110,97,109,101,62,32,111,114,32,39,46,46,46,39,32,101,120,112,101,99,116,101,100,0,0,0,0,0,0,0,0,91,115,116,114,105,110,103,32,34,0,0,0,0,0,0,0,102,0,0,0,0,0,0,0,105,110,118,97,108,105,100,32,108,101,118,101,108,0,0,0,37,115,58,37,100,58,32,37,115,0,0,0,0,0,0,0,95,76,79,65,68,76,73,66,0,0,0,0,0,0,0,0,108,101,118,101,108,32,109,117,115,116,32,98,101,32,110,111,110,45,110,101,103,97,116,105,118,101,0,0,0,0,0,0,39,115,101,116,102,101,110,118,39,32,99,97,110,110,111,116,32,99,104,97,110,103,101,32,101,110,118,105,114,111,110,109,101,110,116,32,111,102,32,103,105,118,101,110,32,111,98,106,101,99,116,0,0,0,0,0,99,97,110,110,111,116,32,99,104,97,110,103,101,32,97,32,112,114,111,116,101,99,116,101,100,32,109,101,116,97,116,97,98,108,101,0,0,0,0,0,101,110,100,0,0,0,0,0,115,116,114,105,110,103,0,0,95,95,109,101,116,97,116,97,98,108,101,0,0,0,0,0,76,85,65,95,80,65,84,72,0,0,0,0,0,0,0,0,98,121,116,101,0,0,0,0,109,97,120,110,0,0,0,0,115,116,114,105,110,103,0,0,101,120,105,116,0,0,0,0,110,105,108,32,111,114,32,116,97,98,108,101,32,101,120,112,101,99,116,101,100,0,0,0,97,98,115,0,0,0,0,0,70,73,76,69,42,0,0,0,98,97,115,101,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,0,0,0,0,0,116,97,98,108,101,0,0,0,103,101,116,114,101,103,105,115,116,114,121,0,0,0,0,0,119,114,97,112,0,0,0,0,98,97,100,32,97,114,103,117,109,101,110,116,32,35,37,100,32,116,111,32,39,37,115,39,32,40,37,115,41,0,0,0,37,115,58,32,37,112,0,0,103,101,116,32,108,101,110,103,116,104,32,111,102,0,0,0,117,110,101,120,112,101,99,116,101,100,32,101,110,100,0,0,61,40,100,101,98,117,103,32,99,111,109,109,97,110,100,41,0,0,0,0,0,0,0,0,116,97,98,108,101,0,0,0,110,105,108,0,0,0,0,0,105,110,105,116,0,0,0,0,97,114,103,0,0,0,0,0,99,111,110,116,10,0,0,0,10,13,0,0,0,0,0,0,102,97,108,115,101,0,0,0,111,115,0,0,0,0,0,0,97,98,115,101,110,116,0,0,108,117,97,95,100,101,98,117,103,62,32,0,0,0,0,0,116,114,117,101,0,0,0,0,97,116,116,101,109,112,116,32,116,111,32,99,111,109,112,97,114,101,32,37,115,32,119,105,116,104,32,37,115,0,0,0,95,95,105,110,100,101,120,0,101,120,116,101,114,110,97,108,32,104,111,111,107,0,0,0,95,95,116,111,115,116,114,105,110,103,0,0,0,0,0,0,115,101,101,97,108,108,0,0,102,117,110,99,0,0,0,0,116,111,111,32,109,97,110,121,32,114,101,115,117,108,116,115,32,116,111,32,117,110,112,97,99,107,0,0,0,0,0,0,108,111,97,100,108,105,98,0,97,99,116,105,118,101,108,105,110,101,115,0,0,0,0,0,109,97,116,104,0,0,0,0,120,112,99,97,108,108,0,0,101,108,115,101,105,102,0,0,10,9,110,111,32,102,105,101,108,100,32,112,97,99,107,97,103,101,46,112,114,101,108,111,97,100,91,39,37,115,39,93,0,0,0,0,0,0,0,0,111,115,0,0,0,0,0,0,110,97,109,101,119,104,97,116,0,0,0,0,0,0,0,0,117,110,112,97,99,107,0,0,99,104,117,110,107,32,104,97,115,32,116,111,111,32,109,97,110,121,32,108,105,110,101,115,0,0,0,0,0,0,0,0,112,97,116,104,0,0,0,0,39,112,97,99,107,97,103,101,46,112,114,101,108,111,97,100,39,32,109,117,115,116,32,98,101,32,97,32,116,97,98,108,101,0,0,0,0,0,0,0,95,95,105,110,100,101,120,0,101,110,100,0,0,0,0,0,103,101,116,110,0,0,0,0,110,97,109,101,0,0,0,0,116,121,112,101,0,0,0,0,101,120,101,99,117,116,101,0,110,101,115,116,105,110,103,32,111,102,32,91,91,46,46,46,93,93,32,105,115,32,100,101,112,114,101,99,97,116,101,100,0,0,0,0,0,0,0,0,109,111,100,0,0,0,0,0,99,117,114,0,0,0,0,0,110,117,112,115,0,0,0,0,116,111,115,116,114,105,110,103,0,0,0,0,0,0,0,0,112,111,112,101,110,0,0,0,117,110,102,105,110,105,115,104,101,100,32,108,111,110,103,32,99,111,109,109,101,110,116,0,103,101,116,108,111,99,97,108,0,0,0,0,0,0,0,0,114,0,0,0,0,0,0,0,115,101,116,0,0,0,0,0,99,117,114,114,101,110,116,108,105,110,101,0,0,0,0,0,116,111,110,117,109,98,101,114,0,0,0,0,0,0,0,0,115,116,97,116,117,115,0,0,63,0,0,0,0,0,0,0,117,110,102,105,110,105,115,104,101,100,32,108,111,110,103,32,115,116,114,105,110,103,0,0,115,116,114,105,110,103,32,108,101,110,103,116,104,32,111,118,101,114,102,108,111,119,0,0,105,111,0,0,0,0,0,0,10,9,110,111,32,102,105,108,101,32,39,37,115,39,0,0,98,97,100,32,99,111,100,101,0,0,0,0,0,0,0,0,97,116,116,101,109,112,116,32,116,111,32,121,105,101,108,100,32,97,99,114,111,115,115,32,109,101,116,97,109,101,116,104,111,100,47,67,45,99,97,108,108,32,98,111,117,110,100,97,114,121,0,0,0,0,0,0,108,105,110,101,0,0,0,0,119,104,97,116,0,0,0,0,115,101,116,109,101,116,97,116,97,98,108,101,0,0,0,0,115,116,114,105,110,103,0,0,101,115,99,97,112,101,32,115,101,113,117,101,110,99,101,32,116,111,111,32,108,97,114,103,101,0,0,0,0,0,0,0,63,0,0,0,0,0,0,0,99,111,110,115,116,97,110,116,32,116,97,98,108,101,32,111,118,101,114,102,108,111,119,0,102,117,108,108,0,0,0,0,108,97,115,116,108,105,110,101,100,101,102,105,110,101,100,0,115,101,116,102,101,110,118,0,97,116,116,101,109,112,116,32,116,111,32,99,111,109,112,97,114,101,32,116,119,111,32,37,115,32,118,97,108,117,101,115,0,0,0,0,0,0,0,0,117,110,102,105,110,105,115,104,101,100,32,115,116,114,105,110,103,0,0,0,0,0,0,0,39,112,97,99,107,97,103,101,46,37,115,39,32,109,117,115,116,32,98,101,32,97,32,115,116,114,105,110,103,0,0,0,115,116,114,105,110,103,32,115,108,105,99,101,32,116,111,111,32,108,111,110,103,0,0,0,110,111,0,0,0,0,0,0,108,105,110,101,100,101,102,105,110,101,100,0,0,0,0,0,115,101,108,101,99,116,0,0,108,101,120,105,99,97,108,32,101,108,101,109,101,110,116,32,116,111,111,32,108,111,110,103,0,0,0,0,0,0,0,0,102,117,110,99,116,105,111,110,32,111,114,32,101,120,112,114,101,115,115,105,111,110,32,116,111,111,32,99,111,109,112,108,101,120,0,0,0,0,0,0,47,0,0,0,0,0,0,0,105,110,118,97,108,105,100,32,118,97,108,117,101,0,0,0,102,105,108,101,32,40,37,112,41,0,0,0,0,0,0,0,115,104,111,114,116,95,115,114,99,0,0,0,0,0,0,0,114,97,119,115,101,116,0,0,109,97,108,102,111,114,109,101,100,32,110,117,109,98,101,114,0,0,0,0,0,0,0,0,108,117,97,111,112,101,110,95,37,115,0,0,0,0,0,0,117,110,97,98,108,101,32,116,111,32,100,117,109,112,32,103,105,118,101,110,32,102,117,110,99,116,105,111,110,0,0,0,102,105,108,101,32,40,99,108,111,115,101,100,41,0,0,0,115,111,117,114,99,101,0,0,114,97,119,103,101,116,0,0,43,45,0,0,0,0,0,0,69,101,0,0,0,0,0,0,95,0,0,0,0,0,0,0,105,110,118,97,108,105,100,32,102,111,114,109,97,116,32,40,119,105,100,116,104,32,111,114,32,112,114,101,99,105,115,105,111,110,32,116,111,111,32,108,111,110,103,41,0,0,0,0,95,95,116,111,115,116,114,105,110,103,0,0,0,0,0,0,105,110,118,97,108,105,100,32,111,112,116,105,111,110,0,0,100,101,98,117,103,0,0,0,114,97,119,101,113,117,97,108,0,0,0,0,0,0,0,0,99,111,110,116,114,111,108,32,115,116,114,117,99,116,117,114,101,32,116,111,111,32,108,111,110,103,0,0,0,0,0,0,46,0,0,0,0,0,0,0,101,108,115,101,0,0,0,0,105,110,118,97,108,105,100,32,102,111,114,109,97,116,32,40,114,101,112,101,97,116,101,100,32,102,108,97,103,115,41,0,95,95,103,99,0,0,0,0,105,111,0,0,0,0,0,0,102,117,110,99,116,105,111,110,32,111,114,32,108,101,118,101,108,32,101,120,112,101,99,116,101,100,0,0,0,0,0,0,112,114,105,110,116,0,0,0,46,0,0,0,0,0,0,0,108,111,97,100,101,114,115,0,45,43,32,35,48,0,0,0,115,101,116,118,98,117,102,0,102,111,114,101,97,99,104,105,0,0,0,0,0,0,0,0,62,37,115,0,0,0,0,0,112,99,97,108,108,0,0,0,100,105,102,102,116,105,109,101,0,0,0,0,0,0,0,0,105,110,118,97,108,105,100,32,108,111,110,103,32,115,116,114,105,110,103,32,100,101,108,105,109,105,116,101,114,0,0,0,102,109,111,100,0,0,0,0,76,79,65,68,76,73,66,58,32,0,0,0,0,0,0,0,115,101,101,107,0,0,0,0,102,108,110,83,117,0,0,0,110,101,120,116,0,0,0,0,115,116,100,101,114,114,0,0,37,115,32,110,101,97,114,32,39,37,115,39,0,0,0,0,103,101,116,105,110,102,111,0,37,115,37,115,0,0,0,0,92,48,48,48,0,0,0,0,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,0,0,0,0,0,0,0,95,95,105,110,100,101,120,0,39,115,101,116,102,101,110,118,39,32,99,97,110,110,111,116,32,99,104,97,110,103,101,32,101,110,118,105,114,111,110,109,101,110,116,32,111,102,32,103,105,118,101,110,32,111,98,106,101,99,116,0,0,0,0,0,108,111,97,100,115,116,114,105,110,103,0,0,0,0,0,0,114,117,110,110,105,110,103,0,99,97,108,108,105,110,103,32,39,37,115,39,32,111,110,32,98,97,100,32,115,101,108,102,32,40,37,115,41,0,0,0,37,115,58,37,100,58,32,37,115,0,0,0,0,0,0,0,108,111,111,112,32,105,110,32,115,101,116,116,97,98,108,101,0,0,0,0,0,0,0,0,100,121,110,97,109,105,99,32,108,105,98,114,97,114,105,101,115,32,110,111,116,32,101,110,97,98,108,101,100,59,32,99,104,101,99,107,32,121,111,117,114,32,76,117,97,32,105,110,115,116,97,108,108,97,116,105,111,110,0,0,0,0,0,0,99,111,114,111,117,116,105,110,101,0,0,0,0,0,0,0,92,114,0,0,0,0,0,0,99,111,100,101,32,116,111,111,32,100,101,101,112,0,0,0,105,110,116,101,114,118,97,108,32,105,115,32,101,109,112,116,121,0,0,0,0,0,0,0,95,95,99,108,111,115,101,0,116,97,105,108,32,114,101,116,117,114,110,0,0,0,0,0,99,97,110,110,111,116,32,114,101,115,117,109,101,32,110,111,110,45,115,117,115,112,101,110,100,101,100,32,99,111,114,111,117,116,105,110,101,0,0,0,108,111,97,100,0,0,0,0,110,117,109,98,101,114,0,0,37,99,0,0,0,0,0,0,105,110,118,97,108,105,100,32,107,101,121,32,116,111,32,39,110,101,120,116,39,0,0,0,101,114,114,111,114,32,108,111,97,100,105,110,103,32,109,111,100,117,108,101,32,39,37,115,39,32,102,114,111,109,32,102,105,108,101,32,39,37,115,39,58,10,9,37,115,0,0,0,105,110,118,97,108,105,100,32,111,112,116,105,111,110,32,39,37,37,37,99,39,32,116,111,32,39,102,111,114,109,97,116,39,0,0,0,0,0,0,0,115,101,108,102,0,0,0,0,116,97,110,0,0,0,0,0,102,105,108,101,32,105,115,32,97,108,114,101,97,100,121,32,99,108,111,115,101,100,0,0,99,111,117,110,116,0,0,0,108,111,97,100,102,105,108,101,0,0,0,0,0,0,0,0,112,101,114,102,111,114,109,32,97,114,105,116,104,109,101,116,105,99,32,111,110,0,0,0,37,0,0,0,0,0,0,0,99,104,97,114,40,37,100,41,0,0,0,0,0,0,0,0,10,9,110,111,32,109,111,100,117,108,101,32,39,37,115,39,32,105,110,32,102,105,108,101,32,39,37,115,39,0,0,0,110,111,32,118,97,108,117,101,0,0,0,0,0,0,0,0,121,100,97,121,0,0,0,0,116,97,110,104,0,0,0,0,97,116,116,101,109,112,116,32,116,111,32,117,115,101,32,97,32,99,108,111,115,101,100,32,102,105,108,101,0,0,0,0,108,105,110,101,0,0,0,0,103,101,116,109,101,116,97,116,97,98,108,101,0,0,0,0,98,97,100,32,97,114,103,117,109,101,110,116,32,35,37,100,32,40,37,115,41,0,0,0,60,101,111,102,62,0,0,0,1,0,0,0,0,0,0,0,39,115,116,114,105,110,103,46,103,102,105,110,100,39,32,119,97,115,32,114,101,110,97,109,101,100,32,116,111,32,39,115,116,114,105,110,103,46,103,109,97,116,99,104,39,0,0,0,119,100,97,121,0,0,0,0,115,113,114,116,0,0,0,0,119,0,0,0,0,0,0,0,114,101,116,117,114,110,0,0,103,101,116,102,101,110,118,0,60,115,116,114,105,110,103,62,0,0,0,0,0,0,0,0,59,1,59,0,0,0,0,0,105,110,118,97,108,105,100,32,114,101,112,108,97,99,101,109,101,110,116,32,118,97,108,117,101,32,40,97,32,37,115,41,0,0,0,0,0,0,0,0,42,116,0,0,0,0,0,0,115,105,110,0,0,0,0,0,39,112,111,112,101,110,39,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,0,0,99,97,108,108,0,0,0,0,103,99,105,110,102,111,0,0,60,110,97,109,101,62,0,0,59,59,0,0,0,0,0,0,115,116,114,105,110,103,47,102,117,110,99,116,105,111,110,47,116,97,98,108,101,32,101,120,112,101,99,116,101,100,0,0,37,99,0,0,0,0,0,0,115,105,110,104,0,0,0,0,114,0,0,0,0,0,0,0,108,101,118,101,108,32,111,117,116,32,111,102,32,114,97,110,103,101,0,0,0,0,0,0,101,114,114,111,114,0,0,0,99,104,117,110,107,32,104,97,115,32,116,111,111,32,109,97,110,121,32,115,121,110,116,97,120,32,108,101,118,101,108,115,0,0,0,0,0,0,0,0,60,110,117,109,98,101,114,62,0,0,0,0,0,0,0,0,126,61,0,0,0,0,0,0,95,80,65,67,75,65,71,69,0,0,0,0,0,0,0,0,37,46,49,52,103,0,0,0,105,110,118,97,108,105,100,32,112,97,116,116,101,114,110,32,99,97,112,116,117,114,101,0,37,115,58,32,37,115,0,0,100,111,0,0,0,0,0,0,114,97,110,100,111,109,115,101,101,100,0,0,0,0,0,0,37,108,102,0,0,0,0,0,116,97,98,108,101,0,0,0,110,105,108,32,111,114,32,116,97,98,108,101,32,101,120,112,101,99,116,101,100,0,0,0,100,111,102,105,108,101,0,0,95,95,99,97,108,108,0,0,39,37,115,39,32,101,120,112,101,99,116,101,100,0,0,0,99,111,110,115,116,97,110,116,32,116,97,98,108,101,32,111,118,101,114,102,108,111,119,0,112,97,99,107,97,103,101,0,95,77,0,0,0,0,0,0,117,110,98,97,108,97,110,99,101,100,32,112,97,116,116,101,114,110,0,0,0,0,0,0,103,102,105,110,100,0,0,0,110,117,109,101,114,105,99,0,114,97,110,100,111,109,0,0,105,110,118,97,108,105,100,32,102,111,114,109,97,116,0,0,102,111,114,101,97,99,104,0,32,105,110,32,102,117,110,99,116,105,111,110,32,60,37,115,58,37,100,62,0,0,0,0,99,111,108,108,101,99,116,103,97,114,98,97,103,101,0,0,99,97,110,110,111,116,32,37,115,32,37,115,58,32,37,115,0,0,0,0,0,0,0,0,95,95,99,111,110,99,97,116,0,0,0,0,0,0,0,0,39,37,115,39,32,101,120,112,101,99,116,101,100,32,40,116,111,32,99,108,111,115,101,32,39,37,115,39,32,97,116,32,108,105,110,101,32,37,100,41,0,0,0,0,0,0,0,0,100,97,116,101,0,0,0,0,60,61,0,0,0,0,0,0,104,117,103,101,0,0,0,0,39,109,111,100,117,108,101,39,32,110,111,116,32,99,97,108,108,101,100,32,102,114,111,109,32,97,32,76,117,97,32,102,117,110,99,116,105,111,110,0,109,97,108,102,111,114,109,101,100,32,112,97,116,116,101,114,110,32,40,109,105,115,115,105,110,103,32,39,93,39,41,0,109,111,110,101,116,97,114,121,0,0,0,0,0,0,0,0,114,97,100,0,0,0,0,0,105,110,118,97,108,105,100,32,111,112,116,105,111,110,0,0,32,63,0,0,0,0,0,0,97,115,115,101,114,116,0,0,10,0,0,0,0,0,0,0,115,116,100,111,117,116,0,0,95,95,108,101,0,0,0,0,40,102,111,114,32,115,116,101,112,41,0,0,0,0,0,0,62,61,0,0,0,0,0,0,103,101,116,104,111,111,107,0,102,0,0,0,0,0,0,0,109,97,108,102,111,114,109,101,100,32,112,97,116,116,101,114,110,32,40,101,110,100,115,32,119,105,116,104,32,39,37,37,39,41,0,0,0,0,0,0,99,116,121,112,101,0,0,0,112,111,119,0,0,0,0,0,116,111,111,32,109,97,110,121,32,97,114,103,117,109,101,110,116,115,0,0,0,0,0,0,32,105,110,32,109,97,105,110,32,99,104,117,110,107,0,0,98,111,111,108,101,97,110,32,111,114,32,112,114,111,120,121,32,101,120,112,101,99,116,101,100,0,0,0,0,0,0,0,80,65,78,73,67,58,32,117,110,112,114,111,116,101,99,116,101,100,32,101,114,114,111,114,32,105,110,32,99,97,108,108,32,116,111,32,76,117,97,32,65,80,73,32,40,37,115,41,10,0,0,0,0,0,0,0,114,101,115,117,109,101,0,0,95,95,108,116,0,0,0,0,40,102,111,114,32,108,105,109,105,116,41,0,0,0,0,0,109,101,116,104,111,100,0,0,61,61,0,0,0,0,0,0,108,111,111,112,32,105,110,32,103,101,116,116,97,98,108,101,0,0,0,0,0,0,0,0,95,78,65,77,69,0,0,0,109,105,115,115,105,110,103,32,39,91,39,32,97,102,116,101,114,32,39,37,37,102,39,32,105,110,32,112,97,116,116,101,114,110,0,0,0,0,0,0,61,63,0,0,0,0,0,0,99,111,108,108,97,116,101,0,109,111,100,102,0,0,0,0,102,105,108,101,0,0,0,0,32,105,110,32,102,117,110,99,116,105,111,110,32,39,37,115,39,0,0,0,0,0,0,0,110,101,119,112,114,111,120,121,0,0,0,0,0,0,0,0,114,101,97,100,0,0,0,0,67,32,115,116,97,99,107,32,111,118,101,114,102,108,111,119,0,0,0,0,0,0,0,0,95,95,108,101,110,0,0,0,117,115,101,114,100,97,116,97,0,0,0,0,0,0,0,0,40,102,111,114,32,105,110,100,101,120,41,0,0,0,0,0,46,46,46,0,0,0,0,0,116,97,98,108,101,32,111,118,101,114,102,108,111,119,0,0,46,46,0,0,0,0,0,0,110,105,108,0,0,0,0,0,110,97,109,101,32,99,111,110,102,108,105,99,116,32,102,111,114,32,109,111,100,117,108,101,32,39,37,115,39,0,0,0,117,110,102,105,110,105,115,104,101,100,32,99,97,112,116,117,114,101,0,0,0,0,0,0,99,97,110,110,111,116,32,117,115,101,32,39,46,46,46,39,32,111,117,116,115,105,100,101,32,97,32,118,97,114,97,114,103,32,102,117,110,99,116,105,111,110,0,0,0,0,0,0,97,108,108,0,0,0,0,0,109,105,110,0,0,0,0,0,99,108,111,115,101,100,32,102,105,108,101,0,0,0,0,0,37,100,58,0,0,0,0,0,95,95,109,111,100,101,0,0,114,101,111,112,101,110,0,0,95,95,117,110,109,0,0,0,40,102,111,114,32,99,111,110,116,114,111,108,41,0,0,0,37,112,0,0,0,0,0,0,99,111,110,99,97,116,101,110,97,116,101,0,0,0,0,0,110,111,116,32,101,110,111,117,103,104,32,109,101,109,111,114,121,0,0,0,0,0,0,0,119,104,105,108,101,0,0,0,109,111,100,117,108,101,32,39,37,115,39,32,110,111,116,32,102,111,117,110,100,58,37,115,0,0,0,0,0,0,0,0,105,110,118,97,108,105,100,32,99,97,112,116,117,114,101,32,105,110,100,101,120,0,0,0,102,105,101,108,100,32,39,37,115,39,32,109,105,115,115,105,110,103,32,105,110,32,100,97,116,101,32,116,97,98,108,101,0,0,0,0,0,0,0,0,109,97,120,0,0,0,0,0,37,46,49,52,103,0,0,0,37,115,58,0,0,0,0,0,107,118,0,0,0,0,0,0,114,98,0,0,0,0,0,0,95,95,112,111,119,0,0,0,40,102,111,114,32,115,116,97,116,101,41,0,0,0,0,0,40,42,116,101,109,112,111,114,97,114,121,41,0,0,0,0,63,0,0,0,0,0,0,0,40,110,117,108,108,41,0,0,117,110,116,105,108,0,0,0,116,97,98,108,101,32,105,110,100,101,120,32,105,115,32,110,105,108,0,0,0,0,0,0,116,111,111,32,109,97,110,121,32,99,97,112,116,117,114,101,115,0,0,0,0,0,0,0,105,115,100,115,116,0,0,0,108,111,103,0,0,0,0,0,115,116,97,110,100,97,114,100,32,37,115,32,102,105,108,101,32,105,115,32,99,108,111,115,101,100,0,0,0,0,0,0,83,110,108,0,0,0,0,0,112,97,105,114,115,0,0,0,95,95,109,111,100,0,0,0,40,102,111,114,32,103,101,110,101,114,97,116,111,114,41,0,61,40,116,97,105,108,32,99,97,108,108,41,0,0,0,0,97,116,116,101,109,112,116,32,116,111,32,37,115,32,97,32,37,115,32,118,97,108,117,101,0,0,0,0,0,0,0,0,116,114,117,101,0,0,0,0,39,112,97,99,107,97,103,101,46,108,111,97,100,101,114,115,39,32,109,117,115,116,32,98,101,32,97,32,116,97,98,108,101,0,0,0,0,0,0,0,94,36,42,43,63,46,40,91,37,45,0,0,0,0,0,0,121,101,97,114,0,0,0,0,110,111,116,32,101,110,111,117,103,104,32,109,101,109,111,114,121,0,0,0,0,0,0,0,108,111,103,49,48,0,0,0,119,114,105,116,101,0,0,0,10,9,0,0,0,0,0,0,105,112,97,105,114,115,0,0,111,112,101,110,0,0,0,0,95,95,100,105,118,0,0,0,39,61,39,32,111,114,32,39,105,110,39,32,101,120,112,101,99,116,101,100,0,0,0,0,116,97,105,108,0,0,0,0,116,104,101,110,0,0,0,0,108,111,111,112,32,111,114,32,112,114,101,118,105,111,117,115,32,101,114,114,111,114,32,108,111,97,100,105,110,103,32,109,111,100,117,108,101,32,39,37,115,39,0,0,0,0,0,0,117,112,112,101,114,0,0,0,109,111,110,116,104,0,0,0,108,100,101,120,112,0,0,0,116,121,112,101,0,0,0,0,10,9,46,46,46,0,0,0,95,86,69,82,83,73,79,78,0,0,0,0,0,0,0,0,114,0,0,0,0,0,0,0,95,95,109,117,108,0,0,0,110,111,32,108,111,111,112,32,116,111,32,98,114,101,97,107,0,0,0,0,0,0,0,0,76,117,97,0,0,0,0,0,114,101,116,117,114,110,0,0,114,101,113,117,105,114,101,0,115,117,98,0,0,0,0,0,100,97,121,0,0,0,0,0,102,114,101,120,112,0,0,0,116,109,112,102,105,108,101,0,112,97,99,107,97,103,101,0,98,114,101,97,107,0,0,0,115,116,97,99,107,32,116,114,97,99,101,98,97,99,107,58,0,0,0,0,0,0,0,0,76,117,97,32,53,46,49,0,64,37,115,0,0,0,0,0,95,95,115,117,98,0,0,0,109,97,105,110,0,0,0,0,95,95,103,99,0,0,0,0,114,101,112,101,97,116,0,0,109,111,100,117,108,101,0,0,114,101,118,101,114,115,101,0,103,109,97,116,99,104,0,0,104,111,117,114,0,0,0,0,115,121,110,116,97,120,32,101,114,114,111,114,0,0,0,0,102,108,111,111,114,0,0,0,114,101,97,100,0,0,0,0,99,111,110,99,97,116,0,0,10,0,0,0,0,0,0,0,95,71,0,0,0,0,0,0,61,115,116,100,105,110,0,0,95,95,97,100,100,0,0,0,117,112,118,97,108,117,101,115,0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,99,108,111,99,107,0,0,0,99,111,100,101,32,115,105,122,101,32,111,118,101,114,102,108,111,119,0,0,0,0,0,0,111,114,0,0,0,0,0,0,112,105,0,0,0,0,0,0,112,114,101,108,111,97,100,0,114,101,112,0,0,0,0,0,105,110,118,97,108,105,100,32,118,97,108,117,101,32,40,37,115,41,32,97,116,32,105,110,100,101,120,32,37,100,32,105,110,32,116,97,98,108,101,32,102,111,114,32,39,99,111,110,99,97,116,39,0,0,0,0,109,105,110,0,0,0,0,0,101,120,112,0,0,0,0,0,111,117,116,112,117,116,0,0,76,117,97,32,102,117,110,99,116,105,111,110,32,101,120,112,101,99,116,101,100,0,0,0,110,97,109,101,32,99,111,110,102,108,105,99,116,32,102,111,114,32,109,111,100,117,108,101,32,39,37,115,39,0,0,0,115,116,100,105,110,0,0,0,95,95,101,113,0,0,0,0,117,110,101,120,112,101,99,116,101,100,32,115,121,109,98,111,108,0,0,0,0,0,0,0,61,91,67,93,0,0,0,0,110,111,116,0,0,0,0,0,103,101,116,102,101,110,118,0,108,111,97,100,101,100,0,0,109,97,116,99,104,0,0,0,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,32,116,111,32,39,105,110,115,101,114,116,39,0,0,0,115,101,99,0,0,0,0,0,100,101,103,0,0,0,0,0,111,112,101,110,0,0,0,0,116,114,97,99,101,98,97,99,107,0,0,0,0,0,0,0,99,111,114,111,117,116,105,110,101,32,101,120,112,101,99,116,101,100,0,0,0,0,0,0,95,76,79,65,68,69,68,0,99,114,101,97,116,101,0,0,95,95,109,111,100,101,0,0,102,117,110,99,116,105,111,110,32,97,114,103,117,109,101,110,116,115,32,101,120,112,101,99,116,101,100,0,0,0,0,0,110,0,0,0,0,0,0,0,110,105,108,0,0,0,0,0,105,110,100,101,120,0,0,0,95,76,79,65,68,69,68,0,108,111,119,101,114,0,0,0,39,115,101,116,110,39,32,105,115,32,111,98,115,111,108,101,116,101,0,0,0,0,0,0,98,105,110,97,114,121,32,115,116,114,105,110,103,0,0,0,117,110,97,98,108,101,32,116,111,32,103,101,110,101,114,97,116,101,32,97,32,117,110,105,113,117,101,32,102,105,108,101,110,97,109,101,0,0,0,0,99,111,115,0,0,0,0,0,108,105,110,101,115,0,0,0,115,101,116,117,112,118,97,108,117,101,0,0,0,0,0,0,100,101,97,100,0,0,0,0,118,97,108,117,101,32,101,120,112,101,99,116,101,100,0,0,95,95,103,99,0,0,0,0,101,114,114,111,114,32,105,110,32,101,114,114,111,114,32,104,97,110,100,108,105,110,103,0,98,111,111,108,101,97,110,0,97,109,98,105,103,117,111,117,115,32,115,121,110,116,97,120,32,40,102,117,110,99,116,105,111,110,32,99,97,108,108,32,120,32,110,101,119,32,115,116,97,116,101,109,101,110,116,41,0,0,0,0,0,0,0,0,109,101,116,104,111,100,0,0,116,97,98,108,101,32,105,110,100,101,120,32,105,115,32,78,97,78,0,0,0,0,0,0,108,111,99,97,108,0,0,0,99,111,110,102,105,103,0,0,108,101,110,0,0,0,0,0,118,97,114,105,97,98,108,101,115,32,105,110,32,97,115,115,105,103,110,109,101,110,116,0,105,110,118,97,108,105,100,32,111,114,100,101,114,32,102,117,110,99,116,105,111,110,32,102,111,114,32,115,111,114,116,105,110,103,0,0,0,0,0,0,116,109,112,110,97,109,101,0,99,111,115,104,0,0,0,0,105,110,112,117,116,0,0,0,115,101,116,109,101,116,97,116,97,98,108,101,0,0,0,0,110,111,114,109,97,108,0,0,115,116,97,99,107,32,111,118,101,114,102,108,111,119,32,40,37,115,41,0,0,0,0,0,95,95,110,101,119,105,110,100,101,120,0,0,0,0,0,0,102,117,110,99,116,105,111,110,32,97,116,32,108,105,110,101,32,37,100,32,104,97,115,32,109,111,114,101,32,116,104,97].concat([110,32,37,100,32,37,115,0,117,112,118,97,108,117,101,0,105,110,0,0,0,0,0,0,47,10,59,10,63,10,33,10,45,0,0,0,0,0,0,0,103,115,117,98,0,0,0,0,116,105,109,101,0,0,0,0,99,101,105,108,0,0,0,0,102,108,117,115,104,0,0,0,115,101,116,108,111,99,97,108,0,0,0,0,0,0,0,0,115,117,115,112,101,110,100,101,100,0,0,0,0,0,0,0,105,110,118,97,108,105,100,32,111,112,116,105,111,110,32,39,37,115,39,0,0,0,0,0,95,95,105,110,100,101,120,0,109,97,105,110,32,102,117,110,99,116,105,111,110,32,104,97,115,32,109,111,114,101,32,116,104,97,110,32,37,100,32,37,115,0,0,0,0,0,0,0,63,0,0,0,0,0,0,0,110,111,32,118,97,108,117,101,0,0,0,0,0,0,0,0,110,111,32,99,97,108,108,105,110,103,32,101,110,118,105,114,111,110,109,101,110,116,0,0,104,0,0,0,0,0,0,0])\
3117 , \"i8\", ALLOC_NONE, Runtime.GLOBAL_BASE)\
3118 var tempDoublePtr = Runtime.alignMemory(allocate(12, \"i8\", ALLOC_STATIC), 8);\
3119 assert(tempDoublePtr % 8 == 0);\
3120 function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much\
3121 HEAP8[tempDoublePtr] = HEAP8[ptr];\
3122 HEAP8[tempDoublePtr+1] = HEAP8[ptr+1];\
3123 HEAP8[tempDoublePtr+2] = HEAP8[ptr+2];\
3124 HEAP8[tempDoublePtr+3] = HEAP8[ptr+3];\
3125 }\
3126 function copyTempDouble(ptr) {\
3127 HEAP8[tempDoublePtr] = HEAP8[ptr];\
3128 HEAP8[tempDoublePtr+1] = HEAP8[ptr+1];\
3129 HEAP8[tempDoublePtr+2] = HEAP8[ptr+2];\
3130 HEAP8[tempDoublePtr+3] = HEAP8[ptr+3];\
3131 HEAP8[tempDoublePtr+4] = HEAP8[ptr+4];\
3132 HEAP8[tempDoublePtr+5] = HEAP8[ptr+5];\
3133 HEAP8[tempDoublePtr+6] = HEAP8[ptr+6];\
3134 HEAP8[tempDoublePtr+7] = HEAP8[ptr+7];\
3135 }\
3136 Module[\"_strlen\"] = _strlen;\
3137 var _llvm_va_start=undefined;\
3138 function _llvm_va_end() {}\
3139 Module[\"_memcpy\"] = _memcpy;var _llvm_memcpy_p0i8_p0i8_i32=_memcpy;\
3140 var _floor=Math.floor;\
3141 var _llvm_pow_f64=Math.pow;\
3142 function _llvm_lifetime_start() {}\
3143 function _llvm_lifetime_end() {}\
3144 function _strchr(ptr, chr) {\
3145 ptr--;\
3146 do {\
3147 ptr++;\
3148 var val = HEAP8[(ptr)];\
3149 if (val == chr) return ptr;\
3150 } while (val);\
3151 return 0;\
3152 }\
3153 var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:35,EIDRM:36,ECHRNG:37,EL2NSYNC:38,EL3HLT:39,EL3RST:40,ELNRNG:41,EUNATCH:42,ENOCSI:43,EL2HLT:44,EDEADLK:45,ENOLCK:46,EBADE:50,EBADR:51,EXFULL:52,ENOANO:53,EBADRQC:54,EBADSLT:55,EDEADLOCK:56,EBFONT:57,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:74,EDOTDOT:76,EBADMSG:77,ENOTUNIQ:80,EBADFD:81,EREMCHG:82,ELIBACC:83,ELIBBAD:84,ELIBSCN:85,ELIBMAX:86,ELIBEXEC:87,ENOSYS:88,ENOTEMPTY:90,ENAMETOOLONG:91,ELOOP:92,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:106,EPROTOTYPE:107,ENOTSOCK:108,ENOPROTOOPT:109,ESHUTDOWN:110,ECONNREFUSED:111,EADDRINUSE:112,ECONNABORTED:113,ENETUNREACH:114,ENETDOWN:115,ETIMEDOUT:116,EHOSTDOWN:117,EHOSTUNREACH:118,EINPROGRESS:119,EALREADY:120,EDESTADDRREQ:121,EMSGSIZE:122,EPROTONOSUPPORT:123,ESOCKTNOSUPPORT:124,EADDRNOTAVAIL:125,ENETRESET:126,EISCONN:127,ENOTCONN:128,ETOOMANYREFS:129,EUSERS:131,EDQUOT:132,ESTALE:133,ENOTSUP:134,ENOMEDIUM:135,EILSEQ:138,EOVERFLOW:139,ECANCELED:140,ENOTRECOVERABLE:141,EOWNERDEAD:142,ESTRPIPE:143};\
3154 var ERRNO_MESSAGES={0:\"Success\",1:\"Not super-user\",2:\"No such file or directory\",3:\"No such process\",4:\"Interrupted system call\",5:\"I/O error\",6:\"No such device or address\",7:\"Arg list too long\",8:\"Exec format error\",9:\"Bad file number\",10:\"No children\",11:\"No more processes\",12:\"Not enough core\",13:\"Permission denied\",14:\"Bad address\",15:\"Block device required\",16:\"Mount device busy\",17:\"File exists\",18:\"Cross-device link\",19:\"No such device\",20:\"Not a directory\",21:\"Is a directory\",22:\"Invalid argument\",23:\"Too many open files in system\",24:\"Too many open files\",25:\"Not a typewriter\",26:\"Text file busy\",27:\"File too large\",28:\"No space left on device\",29:\"Illegal seek\",30:\"Read only file system\",31:\"Too many links\",32:\"Broken pipe\",33:\"Math arg out of domain of func\",34:\"Math result not representable\",35:\"No message of desired type\",36:\"Identifier removed\",37:\"Channel number out of range\",38:\"Level 2 not synchronized\",39:\"Level 3 halted\",40:\"Level 3 reset\",41:\"Link number out of range\",42:\"Protocol driver not attached\",43:\"No CSI structure available\",44:\"Level 2 halted\",45:\"Deadlock condition\",46:\"No record locks available\",50:\"Invalid exchange\",51:\"Invalid request descriptor\",52:\"Exchange full\",53:\"No anode\",54:\"Invalid request code\",55:\"Invalid slot\",56:\"File locking deadlock error\",57:\"Bad font file fmt\",60:\"Device not a stream\",61:\"No data (for no delay io)\",62:\"Timer expired\",63:\"Out of streams resources\",64:\"Machine is not on the network\",65:\"Package not installed\",66:\"The object is remote\",67:\"The link has been severed\",68:\"Advertise error\",69:\"Srmount error\",70:\"Communication error on send\",71:\"Protocol error\",74:\"Multihop attempted\",76:\"Cross mount point (not really error)\",77:\"Trying to read unreadable message\",80:\"Given log. name not unique\",81:\"f.d. invalid for this operation\",82:\"Remote address changed\",83:\"Can access a needed shared lib\",84:\"Accessing a corrupted shared lib\",85:\".lib section in a.out corrupted\",86:\"Attempting to link in too many libs\",87:\"Attempting to exec a shared library\",88:\"Function not implemented\",90:\"Directory not empty\",91:\"File or path name too long\",92:\"Too many symbolic links\",95:\"Operation not supported on transport endpoint\",96:\"Protocol family not supported\",104:\"Connection reset by peer\",105:\"No buffer space available\",106:\"Address family not supported by protocol family\",107:\"Protocol wrong type for socket\",108:\"Socket operation on non-socket\",109:\"Protocol not available\",110:\"Can't send after socket shutdown\",111:\"Connection refused\",112:\"Address already in use\",113:\"Connection aborted\",114:\"Network is unreachable\",115:\"Network interface is not configured\",116:\"Connection timed out\",117:\"Host is down\",118:\"Host is unreachable\",119:\"Connection already in progress\",120:\"Socket already connected\",121:\"Destination address required\",122:\"Message too long\",123:\"Unknown protocol\",124:\"Socket type not supported\",125:\"Address not available\",126:\"Connection reset by network\",127:\"Socket is already connected\",128:\"Socket is not connected\",129:\"Too many references\",131:\"Too many users\",132:\"Quota exceeded\",133:\"Stale file handle\",134:\"Not supported\",135:\"No medium (in tape drive)\",138:\"Illegal byte sequence\",139:\"Value too large for defined data type\",140:\"Operation canceled\",141:\"State not recoverable\",142:\"Previous owner died\",143:\"Streams pipe error\"};\
3155 var ___errno_state=0;function ___setErrNo(value) {\
3156 // For convenient setting and returning of errno.\
3157 HEAP32[((___errno_state)>>2)]=value\
3158 return value;\
3159 }\
3160 var VFS=undefined;\
3161 var PATH={splitPath:function (filename) {\
3162 var splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\
3163 return splitPathRe.exec(filename).slice(1);\
3164 },normalizeArray:function (parts, allowAboveRoot) {\
3165 // if the path tries to go above the root, `up` ends up > 0\
3166 var up = 0;\
3167 for (var i = parts.length - 1; i >= 0; i--) {\
3168 var last = parts[i];\
3169 if (last === '.') {\
3170 parts.splice(i, 1);\
3171 } else if (last === '..') {\
3172 parts.splice(i, 1);\
3173 up++;\
3174 } else if (up) {\
3175 parts.splice(i, 1);\
3176 up--;\
3177 }\
3178 }\
3179 // if the path is allowed to go above the root, restore leading ..s\
3180 if (allowAboveRoot) {\
3181 for (; up--; up) {\
3182 parts.unshift('..');\
3183 }\
3184 }\
3185 return parts;\
3186 },normalize:function (path) {\
3187 var isAbsolute = path.charAt(0) === '/',\
3188 trailingSlash = path.substr(-1) === '/';\
3189 // Normalize the path\
3190 path = PATH.normalizeArray(path.split('/').filter(function(p) {\
3191 return !!p;\
3192 }), !isAbsolute).join('/');\
3193 if (!path && !isAbsolute) {\
3194 path = '.';\
3195 }\
3196 if (path && trailingSlash) {\
3197 path += '/';\
3198 }\
3199 return (isAbsolute ? '/' : '') + path;\
3200 },dirname:function (path) {\
3201 var result = PATH.splitPath(path),\
3202 root = result[0],\
3203 dir = result[1];\
3204 if (!root && !dir) {\
3205 // No dirname whatsoever\
3206 return '.';\
3207 }\
3208 if (dir) {\
3209 // It has a dirname, strip trailing slash\
3210 dir = dir.substr(0, dir.length - 1);\
3211 }\
3212 return root + dir;\
3213 },basename:function (path, ext) {\
3214 // EMSCRIPTEN return '/'' for '/', not an empty string\
3215 if (path === '/') return '/';\
3216 var f = PATH.splitPath(path)[2];\
3217 if (ext && f.substr(-1 * ext.length) === ext) {\
3218 f = f.substr(0, f.length - ext.length);\
3219 }\
3220 return f;\
3221 },extname:function (path) {\
3222 return PATH.splitPath(path)[3];\
3223 },join:function () {\
3224 var paths = Array.prototype.slice.call(arguments, 0);\
3225 return PATH.normalize(paths.filter(function(p, index) {\
3226 if (typeof p !== 'string') {\
3227 throw new TypeError('Arguments to path.join must be strings');\
3228 }\
3229 return p;\
3230 }).join('/'));\
3231 },resolve:function () {\
3232 var resolvedPath = '',\
3233 resolvedAbsolute = false;\
3234 for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\
3235 var path = (i >= 0) ? arguments[i] : FS.cwd();\
3236 // Skip empty and invalid entries\
3237 if (typeof path !== 'string') {\
3238 throw new TypeError('Arguments to path.resolve must be strings');\
3239 } else if (!path) {\
3240 continue;\
3241 }\
3242 resolvedPath = path + '/' + resolvedPath;\
3243 resolvedAbsolute = path.charAt(0) === '/';\
3244 }\
3245 // At this point the path should be resolved to a full absolute path, but\
3246 // handle relative paths to be safe (might happen when process.cwd() fails)\
3247 resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) {\
3248 return !!p;\
3249 }), !resolvedAbsolute).join('/');\
3250 return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\
3251 },relative:function (from, to) {\
3252 from = PATH.resolve(from).substr(1);\
3253 to = PATH.resolve(to).substr(1);\
3254 function trim(arr) {\
3255 var start = 0;\
3256 for (; start < arr.length; start++) {\
3257 if (arr[start] !== '') break;\
3258 }\
3259 var end = arr.length - 1;\
3260 for (; end >= 0; end--) {\
3261 if (arr[end] !== '') break;\
3262 }\
3263 if (start > end) return [];\
3264 return arr.slice(start, end - start + 1);\
3265 }\
3266 var fromParts = trim(from.split('/'));\
3267 var toParts = trim(to.split('/'));\
3268 var length = Math.min(fromParts.length, toParts.length);\
3269 var samePartsLength = length;\
3270 for (var i = 0; i < length; i++) {\
3271 if (fromParts[i] !== toParts[i]) {\
3272 samePartsLength = i;\
3273 break;\
3274 }\
3275 }\
3276 var outputParts = [];\
3277 for (var i = samePartsLength; i < fromParts.length; i++) {\
3278 outputParts.push('..');\
3279 }\
3280 outputParts = outputParts.concat(toParts.slice(samePartsLength));\
3281 return outputParts.join('/');\
3282 }};\
3283 var TTY={ttys:[],init:function () {\
3284 // https://github.com/kripken/emscripten/pull/1555\
3285 // if (ENVIRONMENT_IS_NODE) {\
3286 // // currently, FS.init does not distinguish if process.stdin is a file or TTY\
3287 // // device, it always assumes it's a TTY device. because of this, we're forcing\
3288 // // process.stdin to UTF8 encoding to at least make stdin reading compatible\
3289 // // with text files until FS.init can be refactored.\
3290 // process['stdin']['setEncoding']('utf8');\
3291 // }\
3292 },shutdown:function () {\
3293 // https://github.com/kripken/emscripten/pull/1555\
3294 // if (ENVIRONMENT_IS_NODE) {\
3295 // // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)?\
3296 // // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation\
3297 // // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists?\
3298 // // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle\
3299 // // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call\
3300 // process['stdin']['pause']();\
3301 // }\
3302 },register:function (dev, ops) {\
3303 TTY.ttys[dev] = { input: [], output: [], ops: ops };\
3304 FS.registerDevice(dev, TTY.stream_ops);\
3305 },stream_ops:{open:function (stream) {\
3306 var tty = TTY.ttys[stream.node.rdev];\
3307 if (!tty) {\
3308 throw new FS.ErrnoError(ERRNO_CODES.ENODEV);\
3309 }\
3310 stream.tty = tty;\
3311 stream.seekable = false;\
3312 },close:function (stream) {\
3313 // flush any pending line data\
3314 if (stream.tty.output.length) {\
3315 stream.tty.ops.put_char(stream.tty, 10);\
3316 }\
3317 },read:function (stream, buffer, offset, length, pos /* ignored */) {\
3318 if (!stream.tty || !stream.tty.ops.get_char) {\
3319 throw new FS.ErrnoError(ERRNO_CODES.ENXIO);\
3320 }\
3321 var bytesRead = 0;\
3322 for (var i = 0; i < length; i++) {\
3323 var result;\
3324 try {\
3325 result = stream.tty.ops.get_char(stream.tty);\
3326 } catch (e) {\
3327 throw new FS.ErrnoError(ERRNO_CODES.EIO);\
3328 }\
3329 if (result === undefined && bytesRead === 0) {\
3330 throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);\
3331 }\
3332 if (result === null || result === undefined) break;\
3333 bytesRead++;\
3334 buffer[offset+i] = result;\
3335 }\
3336 if (bytesRead) {\
3337 stream.node.timestamp = Date.now();\
3338 }\
3339 return bytesRead;\
3340 },write:function (stream, buffer, offset, length, pos) {\
3341 if (!stream.tty || !stream.tty.ops.put_char) {\
3342 throw new FS.ErrnoError(ERRNO_CODES.ENXIO);\
3343 }\
3344 for (var i = 0; i < length; i++) {\
3345 try {\
3346 stream.tty.ops.put_char(stream.tty, buffer[offset+i]);\
3347 } catch (e) {\
3348 throw new FS.ErrnoError(ERRNO_CODES.EIO);\
3349 }\
3350 }\
3351 if (length) {\
3352 stream.node.timestamp = Date.now();\
3353 }\
3354 return i;\
3355 }},default_tty_ops:{get_char:function (tty) {\
3356 if (!tty.input.length) {\
3357 var result = null;\
3358 if (ENVIRONMENT_IS_NODE) {\
3359 result = process['stdin']['read']();\
3360 if (!result) {\
3361 if (process['stdin']['_readableState'] && process['stdin']['_readableState']['ended']) {\
3362 return null; // EOF\
3363 }\
3364 return undefined; // no data available\
3365 }\
3366 } else if (typeof window != 'undefined' &&\
3367 typeof window.prompt == 'function') {\
3368 // Browser.\
3369 result = window.prompt('Input: '); // returns null on cancel\
3370 if (result !== null) {\
3371 result += '\\n';\
3372 }\
3373 } else if (typeof readline == 'function') {\
3374 // Command line.\
3375 result = readline();\
3376 if (result !== null) {\
3377 result += '\\n';\
3378 }\
3379 }\
3380 if (!result) {\
3381 return null;\
3382 }\
3383 tty.input = intArrayFromString(result, true);\
3384 }\
3385 return tty.input.shift();\
3386 },put_char:function (tty, val) {\
3387 if (val === null || val === 10) {\
3388 Module['print'](tty.output.join(''));\
3389 tty.output = [];\
3390 } else {\
3391 tty.output.push(TTY.utf8.processCChar(val));\
3392 }\
3393 }},default_tty1_ops:{put_char:function (tty, val) {\
3394 if (val === null || val === 10) {\
3395 Module['printErr'](tty.output.join(''));\
3396 tty.output = [];\
3397 } else {\
3398 tty.output.push(TTY.utf8.processCChar(val));\
3399 }\
3400 }}};\
3401 var MEMFS={CONTENT_OWNING:1,CONTENT_FLEXIBLE:2,CONTENT_FIXED:3,ensureFlexible:function (node) {\
3402 if (node.contentMode !== MEMFS.CONTENT_FLEXIBLE) {\
3403 var contents = node.contents;\
3404 node.contents = Array.prototype.slice.call(contents);\
3405 node.contentMode = MEMFS.CONTENT_FLEXIBLE;\
3406 }\
3407 },mount:function (mount) {\
3408 return MEMFS.create_node(null, '/', 0040000 | 0777, 0);\
3409 },create_node:function (parent, name, mode, dev) {\
3410 if (FS.isBlkdev(mode) || FS.isFIFO(mode)) {\
3411 // no supported\
3412 throw new FS.ErrnoError(ERRNO_CODES.EPERM);\
3413 }\
3414 var node = FS.createNode(parent, name, mode, dev);\
3415 if (FS.isDir(node.mode)) {\
3416 node.node_ops = {\
3417 getattr: MEMFS.node_ops.getattr,\
3418 setattr: MEMFS.node_ops.setattr,\
3419 lookup: MEMFS.node_ops.lookup,\
3420 mknod: MEMFS.node_ops.mknod,\
3421 mknod: MEMFS.node_ops.mknod,\
3422 rename: MEMFS.node_ops.rename,\
3423 unlink: MEMFS.node_ops.unlink,\
3424 rmdir: MEMFS.node_ops.rmdir,\
3425 readdir: MEMFS.node_ops.readdir,\
3426 symlink: MEMFS.node_ops.symlink\
3427 };\
3428 node.stream_ops = {\
3429 llseek: MEMFS.stream_ops.llseek\
3430 };\
3431 node.contents = {};\
3432 } else if (FS.isFile(node.mode)) {\
3433 node.node_ops = {\
3434 getattr: MEMFS.node_ops.getattr,\
3435 setattr: MEMFS.node_ops.setattr\
3436 };\
3437 node.stream_ops = {\
3438 llseek: MEMFS.stream_ops.llseek,\
3439 read: MEMFS.stream_ops.read,\
3440 write: MEMFS.stream_ops.write,\
3441 allocate: MEMFS.stream_ops.allocate,\
3442 mmap: MEMFS.stream_ops.mmap\
3443 };\
3444 node.contents = [];\
3445 node.contentMode = MEMFS.CONTENT_FLEXIBLE;\
3446 } else if (FS.isLink(node.mode)) {\
3447 node.node_ops = {\
3448 getattr: MEMFS.node_ops.getattr,\
3449 setattr: MEMFS.node_ops.setattr,\
3450 readlink: MEMFS.node_ops.readlink\
3451 };\
3452 node.stream_ops = {};\
3453 } else if (FS.isChrdev(node.mode)) {\
3454 node.node_ops = {\
3455 getattr: MEMFS.node_ops.getattr,\
3456 setattr: MEMFS.node_ops.setattr\
3457 };\
3458 node.stream_ops = FS.chrdev_stream_ops;\
3459 }\
3460 node.timestamp = Date.now();\
3461 // add the new node to the parent\
3462 if (parent) {\
3463 parent.contents[name] = node;\
3464 }\
3465 return node;\
3466 },node_ops:{getattr:function (node) {\
3467 var attr = {};\
3468 // device numbers reuse inode numbers.\
3469 attr.dev = FS.isChrdev(node.mode) ? node.id : 1;\
3470 attr.ino = node.id;\
3471 attr.mode = node.mode;\
3472 attr.nlink = 1;\
3473 attr.uid = 0;\
3474 attr.gid = 0;\
3475 attr.rdev = node.rdev;\
3476 if (FS.isDir(node.mode)) {\
3477 attr.size = 4096;\
3478 } else if (FS.isFile(node.mode)) {\
3479 attr.size = node.contents.length;\
3480 } else if (FS.isLink(node.mode)) {\
3481 attr.size = node.link.length;\
3482 } else {\
3483 attr.size = 0;\
3484 }\
3485 attr.atime = new Date(node.timestamp);\
3486 attr.mtime = new Date(node.timestamp);\
3487 attr.ctime = new Date(node.timestamp);\
3488 // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize),\
3489 // but this is not required by the standard.\
3490 attr.blksize = 4096;\
3491 attr.blocks = Math.ceil(attr.size / attr.blksize);\
3492 return attr;\
3493 },setattr:function (node, attr) {\
3494 if (attr.mode !== undefined) {\
3495 node.mode = attr.mode;\
3496 }\
3497 if (attr.timestamp !== undefined) {\
3498 node.timestamp = attr.timestamp;\
3499 }\
3500 if (attr.size !== undefined) {\
3501 MEMFS.ensureFlexible(node);\
3502 var contents = node.contents;\
3503 if (attr.size < contents.length) contents.length = attr.size;\
3504 else while (attr.size > contents.length) contents.push(0);\
3505 }\
3506 },lookup:function (parent, name) {\
3507 throw new FS.ErrnoError(ERRNO_CODES.ENOENT);\
3508 },mknod:function (parent, name, mode, dev) {\
3509 return MEMFS.create_node(parent, name, mode, dev);\
3510 },rename:function (old_node, new_dir, new_name) {\
3511 // if we're overwriting a directory at new_name, make sure it's empty.\
3512 if (FS.isDir(old_node.mode)) {\
3513 var new_node;\
3514 try {\
3515 new_node = FS.lookupNode(new_dir, new_name);\
3516 } catch (e) {\
3517 }\
3518 if (new_node) {\
3519 for (var i in new_node.contents) {\
3520 throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);\
3521 }\
3522 }\
3523 }\
3524 // do the internal rewiring\
3525 delete old_node.parent.contents[old_node.name];\
3526 old_node.name = new_name;\
3527 new_dir.contents[new_name] = old_node;\
3528 },unlink:function (parent, name) {\
3529 delete parent.contents[name];\
3530 },rmdir:function (parent, name) {\
3531 var node = FS.lookupNode(parent, name);\
3532 for (var i in node.contents) {\
3533 throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);\
3534 }\
3535 delete parent.contents[name];\
3536 },readdir:function (node) {\
3537 var entries = ['.', '..']\
3538 for (var key in node.contents) {\
3539 if (!node.contents.hasOwnProperty(key)) {\
3540 continue;\
3541 }\
3542 entries.push(key);\
3543 }\
3544 return entries;\
3545 },symlink:function (parent, newname, oldpath) {\
3546 var node = MEMFS.create_node(parent, newname, 0777 | 0120000, 0);\
3547 node.link = oldpath;\
3548 return node;\
3549 },readlink:function (node) {\
3550 if (!FS.isLink(node.mode)) {\
3551 throw new FS.ErrnoError(ERRNO_CODES.EINVAL);\
3552 }\
3553 return node.link;\
3554 }},stream_ops:{read:function (stream, buffer, offset, length, position) {\
3555 var contents = stream.node.contents;\
3556 var size = Math.min(contents.length - position, length);\
3557 if (size > 8 && contents.subarray) { // non-trivial, and typed array\
3558 buffer.set(contents.subarray(position, position + size), offset);\
3559 } else\
3560 {\
3561 for (var i = 0; i < size; i++) {\
3562 buffer[offset + i] = contents[position + i];\
3563 }\
3564 }\
3565 return size;\
3566 },write:function (stream, buffer, offset, length, position, canOwn) {\
3567 var node = stream.node;\
3568 node.timestamp = Date.now();\
3569 var contents = node.contents;\
3570 if (length && contents.length === 0 && position === 0 && buffer.subarray) {\
3571 // just replace it with the new data\
3572 assert(buffer.length);\
3573 if (canOwn && buffer.buffer === HEAP8.buffer && offset === 0) {\
3574 node.contents = buffer; // this is a subarray of the heap, and we can own it\
3575 node.contentMode = MEMFS.CONTENT_OWNING;\
3576 } else {\
3577 node.contents = new Uint8Array(buffer.subarray(offset, offset+length));\
3578 node.contentMode = MEMFS.CONTENT_FIXED;\
3579 }\
3580 return length;\
3581 }\
3582 MEMFS.ensureFlexible(node);\
3583 var contents = node.contents;\
3584 while (contents.length < position) contents.push(0);\
3585 for (var i = 0; i < length; i++) {\
3586 contents[position + i] = buffer[offset + i];\
3587 }\
3588 return length;\
3589 },llseek:function (stream, offset, whence) {\
3590 var position = offset;\
3591 if (whence === 1) { // SEEK_CUR.\
3592 position += stream.position;\
3593 } else if (whence === 2) { // SEEK_END.\
3594 if (FS.isFile(stream.node.mode)) {\
3595 position += stream.node.contents.length;\
3596 }\
3597 }\
3598 if (position < 0) {\
3599 throw new FS.ErrnoError(ERRNO_CODES.EINVAL);\
3600 }\
3601 stream.ungotten = [];\
3602 stream.position = position;\
3603 return position;\
3604 },allocate:function (stream, offset, length) {\
3605 MEMFS.ensureFlexible(stream.node);\
3606 var contents = stream.node.contents;\
3607 var limit = offset + length;\
3608 while (limit > contents.length) contents.push(0);\
3609 },mmap:function (stream, buffer, offset, length, position, prot, flags) {\
3610 if (!FS.isFile(stream.node.mode)) {\
3611 throw new FS.ErrnoError(ERRNO_CODES.ENODEV);\
3612 }\
3613 var ptr;\
3614 var allocated;\
3615 var contents = stream.node.contents;\
3616 // Only make a new copy when MAP_PRIVATE is specified.\
3617 if ( !(flags & 0x02) &&\
3618 (contents.buffer === buffer || contents.buffer === buffer.buffer) ) {\
3619 // We can't emulate MAP_SHARED when the file is not backed by the buffer\
3620 // we're mapping to (e.g. the HEAP buffer).\
3621 allocated = false;\
3622 ptr = contents.byteOffset;\
3623 } else {\
3624 // Try to avoid unnecessary slices.\
3625 if (position > 0 || position + length < contents.length) {\
3626 if (contents.subarray) {\
3627 contents = contents.subarray(position, position + length);\
3628 } else {\
3629 contents = Array.prototype.slice.call(contents, position, position + length);\
3630 }\
3631 }\
3632 allocated = true;\
3633 ptr = _malloc(length);\
3634 if (!ptr) {\
3635 throw new FS.ErrnoError(ERRNO_CODES.ENOMEM);\
3636 }\
3637 buffer.set(contents, ptr);\
3638 }\
3639 return { ptr: ptr, allocated: allocated };\
3640 }}};\
3641 var _stdin=allocate(1, \"i32*\", ALLOC_STATIC);\
3642 var _stdout=allocate(1, \"i32*\", ALLOC_STATIC);\
3643 var _stderr=allocate(1, \"i32*\", ALLOC_STATIC);\
3644 function _fflush(stream) {\
3645 // int fflush(FILE *stream);\
3646 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fflush.html\
3647 // we don't currently perform any user-space buffering of data\
3648 }var FS={root:null,devices:[null],streams:[null],nextInode:1,nameTable:null,currentPath:\"/\",initialized:false,ignorePermissions:true,ErrnoError:function ErrnoError(errno) {\
3649 this.errno = errno;\
3650 for (var key in ERRNO_CODES) {\
3651 if (ERRNO_CODES[key] === errno) {\
3652 this.code = key;\
3653 break;\
3654 }\
3655 }\
3656 this.message = ERRNO_MESSAGES[errno];\
3657 },handleFSError:function (e) {\
3658 if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + new Error().stack;\
3659 return ___setErrNo(e.errno);\
3660 },cwd:function () {\
3661 return FS.currentPath;\
3662 },lookupPath:function (path, opts) {\
3663 path = PATH.resolve(FS.currentPath, path);\
3664 opts = opts || { recurse_count: 0 };\
3665 if (opts.recurse_count > 8) { // max recursive lookup of 8\
3666 throw new FS.ErrnoError(ERRNO_CODES.ELOOP);\
3667 }\
3668 // split the path\
3669 var parts = PATH.normalizeArray(path.split('/').filter(function(p) {\
3670 return !!p;\
3671 }), false);\
3672 // start at the root\
3673 var current = FS.root;\
3674 var current_path = '/';\
3675 for (var i = 0; i < parts.length; i++) {\
3676 var islast = (i === parts.length-1);\
3677 if (islast && opts.parent) {\
3678 // stop resolving\
3679 break;\
3680 }\
3681 current = FS.lookupNode(current, parts[i]);\
3682 current_path = PATH.join(current_path, parts[i]);\
3683 // jump to the mount's root node if this is a mountpoint\
3684 if (FS.isMountpoint(current)) {\
3685 current = current.mount.root;\
3686 }\
3687 // follow symlinks\
3688 // by default, lookupPath will not follow a symlink if it is the final path component.\
3689 // setting opts.follow = true will override this behavior.\
3690 if (!islast || opts.follow) {\
3691 var count = 0;\
3692 while (FS.isLink(current.mode)) {\
3693 var link = FS.readlink(current_path);\
3694 current_path = PATH.resolve(PATH.dirname(current_path), link);\
3695 var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count });\
3696 current = lookup.node;\
3697 if (count++ > 40) { // limit max consecutive symlinks to 40 (SYMLOOP_MAX).\
3698 throw new FS.ErrnoError(ERRNO_CODES.ELOOP);\
3699 }\
3700 }\
3701 }\
3702 }\
3703 return { path: current_path, node: current };\
3704 },getPath:function (node) {\
3705 var path;\
3706 while (true) {\
3707 if (FS.isRoot(node)) {\
3708 return path ? PATH.join(node.mount.mountpoint, path) : node.mount.mountpoint;\
3709 }\
3710 path = path ? PATH.join(node.name, path) : node.name;\
3711 node = node.parent;\
3712 }\
3713 },hashName:function (parentid, name) {\
3714 var hash = 0;\
3715 for (var i = 0; i < name.length; i++) {\
3716 hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0;\
3717 }\
3718 return ((parentid + hash) >>> 0) % FS.nameTable.length;\
3719 },hashAddNode:function (node) {\
3720 var hash = FS.hashName(node.parent.id, node.name);\
3721 node.name_next = FS.nameTable[hash];\
3722 FS.nameTable[hash] = node;\
3723 },hashRemoveNode:function (node) {\
3724 var hash = FS.hashName(node.parent.id, node.name);\
3725 if (FS.nameTable[hash] === node) {\
3726 FS.nameTable[hash] = node.name_next;\
3727 } else {\
3728 var current = FS.nameTable[hash];\
3729 while (current) {\
3730 if (current.name_next === node) {\
3731 current.name_next = node.name_next;\
3732 break;\
3733 }\
3734 current = current.name_next;\
3735 }\
3736 }\
3737 },lookupNode:function (parent, name) {\
3738 var err = FS.mayLookup(parent);\
3739 if (err) {\
3740 throw new FS.ErrnoError(err);\
3741 }\
3742 var hash = FS.hashName(parent.id, name);\
3743 for (var node = FS.nameTable[hash]; node; node = node.name_next) {\
3744 if (node.parent.id === parent.id && node.name === name) {\
3745 return node;\
3746 }\
3747 }\
3748 // if we failed to find it in the cache, call into the VFS\
3749 return FS.lookup(parent, name);\
3750 },createNode:function (parent, name, mode, rdev) {\
3751 var node = {\
3752 id: FS.nextInode++,\
3753 name: name,\
3754 mode: mode,\
3755 node_ops: {},\
3756 stream_ops: {},\
3757 rdev: rdev,\
3758 parent: null,\
3759 mount: null\
3760 };\
3761 if (!parent) {\
3762 parent = node; // root node sets parent to itself\
3763 }\
3764 node.parent = parent;\
3765 node.mount = parent.mount;\
3766 // compatibility\
3767 var readMode = 292 | 73;\
3768 var writeMode = 146;\
3769 // NOTE we must use Object.defineProperties instead of individual calls to\
3770 // Object.defineProperty in order to make closure compiler happy\
3771 Object.defineProperties(node, {\
3772 read: {\
3773 get: function() { return (node.mode & readMode) === readMode; },\
3774 set: function(val) { val ? node.mode |= readMode : node.mode &= ~readMode; }\
3775 },\
3776 write: {\
3777 get: function() { return (node.mode & writeMode) === writeMode; },\
3778 set: function(val) { val ? node.mode |= writeMode : node.mode &= ~writeMode; }\
3779 },\
3780 isFolder: {\
3781 get: function() { return FS.isDir(node.mode); },\
3782 },\
3783 isDevice: {\
3784 get: function() { return FS.isChrdev(node.mode); },\
3785 },\
3786 });\
3787 FS.hashAddNode(node);\
3788 return node;\
3789 },destroyNode:function (node) {\
3790 FS.hashRemoveNode(node);\
3791 },isRoot:function (node) {\
3792 return node === node.parent;\
3793 },isMountpoint:function (node) {\
3794 return node.mounted;\
3795 },isFile:function (mode) {\
3796 return (mode & 0170000) === 0100000;\
3797 },isDir:function (mode) {\
3798 return (mode & 0170000) === 0040000;\
3799 },isLink:function (mode) {\
3800 return (mode & 0170000) === 0120000;\
3801 },isChrdev:function (mode) {\
3802 return (mode & 0170000) === 0020000;\
3803 },isBlkdev:function (mode) {\
3804 return (mode & 0170000) === 0060000;\
3805 },isFIFO:function (mode) {\
3806 return (mode & 0170000) === 0010000;\
3807 },isSocket:function (mode) {\
3808 return (mode & 0140000) === 0140000;\
3809 },flagModes:{\"r\":0,\"rs\":8192,\"r+\":2,\"w\":1537,\"wx\":3585,\"xw\":3585,\"w+\":1538,\"wx+\":3586,\"xw+\":3586,\"a\":521,\"ax\":2569,\"xa\":2569,\"a+\":522,\"ax+\":2570,\"xa+\":2570},modeStringToFlags:function (str) {\
3810 var flags = FS.flagModes[str];\
3811 if (typeof flags === 'undefined') {\
3812 throw new Error('Unknown file open mode: ' + str);\
3813 }\
3814 return flags;\
3815 },flagsToPermissionString:function (flag) {\
3816 var accmode = flag & 3;\
3817 var perms = ['r', 'w', 'rw'][accmode];\
3818 if ((flag & 1024)) {\
3819 perms += 'w';\
3820 }\
3821 return perms;\
3822 },nodePermissions:function (node, perms) {\
3823 if (FS.ignorePermissions) {\
3824 return 0;\
3825 }\
3826 // return 0 if any user, group or owner bits are set.\
3827 if (perms.indexOf('r') !== -1 && !(node.mode & 292)) {\
3828 return ERRNO_CODES.EACCES;\
3829 } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) {\
3830 return ERRNO_CODES.EACCES;\
3831 } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) {\
3832 return ERRNO_CODES.EACCES;\
3833 }\
3834 return 0;\
3835 },mayLookup:function (dir) {\
3836 return FS.nodePermissions(dir, 'x');\
3837 },mayCreate:function (dir, name) {\
3838 try {\
3839 var node = FS.lookupNode(dir, name);\
3840 return ERRNO_CODES.EEXIST;\
3841 } catch (e) {\
3842 }\
3843 return FS.nodePermissions(dir, 'wx');\
3844 },mayDelete:function (dir, name, isdir) {\
3845 var node;\
3846 try {\
3847 node = FS.lookupNode(dir, name);\
3848 } catch (e) {\
3849 return e.errno;\
3850 }\
3851 var err = FS.nodePermissions(dir, 'wx');\
3852 if (err) {\
3853 return err;\
3854 }\
3855 if (isdir) {\
3856 if (!FS.isDir(node.mode)) {\
3857 return ERRNO_CODES.ENOTDIR;\
3858 }\
3859 if (FS.isRoot(node) || FS.getPath(node) === FS.currentPath) {\
3860 return ERRNO_CODES.EBUSY;\
3861 }\
3862 } else {\
3863 if (FS.isDir(node.mode)) {\
3864 return ERRNO_CODES.EISDIR;\
3865 }\
3866 }\
3867 return 0;\
3868 },mayOpen:function (node, flags) {\
3869 if (!node) {\
3870 return ERRNO_CODES.ENOENT;\
3871 }\
3872 if (FS.isLink(node.mode)) {\
3873 return ERRNO_CODES.ELOOP;\
3874 } else if (FS.isDir(node.mode)) {\
3875 if ((flags & 3) !== 0 || // opening for write\
3876 (flags & 1024)) {\
3877 return ERRNO_CODES.EISDIR;\
3878 }\
3879 }\
3880 return FS.nodePermissions(node, FS.flagsToPermissionString(flags));\
3881 },MAX_OPEN_FDS:4096,nextfd:function (fd_start, fd_end) {\
3882 fd_start = fd_start || 1;\
3883 fd_end = fd_end || FS.MAX_OPEN_FDS;\
3884 for (var fd = fd_start; fd <= fd_end; fd++) {\
3885 if (!FS.streams[fd]) {\
3886 return fd;\
3887 }\
3888 }\
3889 throw new FS.ErrnoError(ERRNO_CODES.EMFILE);\
3890 },getStream:function (fd) {\
3891 return FS.streams[fd];\
3892 },createStream:function (stream, fd_start, fd_end) {\
3893 var fd = FS.nextfd(fd_start, fd_end);\
3894 stream.fd = fd;\
3895 // compatibility\
3896 Object.defineProperties(stream, {\
3897 object: {\
3898 get: function() { return stream.node; },\
3899 set: function(val) { stream.node = val; }\
3900 },\
3901 isRead: {\
3902 get: function() { return (stream.flags & 3) !== 1; }\
3903 },\
3904 isWrite: {\
3905 get: function() { return (stream.flags & 3) !== 0; }\
3906 },\
3907 isAppend: {\
3908 get: function() { return (stream.flags & 8); }\
3909 }\
3910 });\
3911 FS.streams[fd] = stream;\
3912 return stream;\
3913 },closeStream:function (fd) {\
3914 FS.streams[fd] = null;\
3915 },chrdev_stream_ops:{open:function (stream) {\
3916 var device = FS.getDevice(stream.node.rdev);\
3917 // override node's stream ops with the device's\
3918 stream.stream_ops = device.stream_ops;\
3919 // forward the open call\
3920 if (stream.stream_ops.open) {\
3921 stream.stream_ops.open(stream);\
3922 }\
3923 },llseek:function () {\
3924 throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);\
3925 }},major:function (dev) {\
3926 return ((dev) >> 8);\
3927 },minor:function (dev) {\
3928 return ((dev) & 0xff);\
3929 },makedev:function (ma, mi) {\
3930 return ((ma) << 8 | (mi));\
3931 },registerDevice:function (dev, ops) {\
3932 FS.devices[dev] = { stream_ops: ops };\
3933 },getDevice:function (dev) {\
3934 return FS.devices[dev];\
3935 },mount:function (type, opts, mountpoint) {\
3936 var mount = {\
3937 type: type,\
3938 opts: opts,\
3939 mountpoint: mountpoint,\
3940 root: null\
3941 };\
3942 var lookup;\
3943 if (mountpoint) {\
3944 lookup = FS.lookupPath(mountpoint, { follow: false });\
3945 }\
3946 // create a root node for the fs\
3947 var root = type.mount(mount);\
3948 root.mount = mount;\
3949 mount.root = root;\
3950 // assign the mount info to the mountpoint's node\
3951 if (lookup) {\
3952 lookup.node.mount = mount;\
3953 lookup.node.mounted = true;\
3954 // compatibility update FS.root if we mount to /\
3955 if (mountpoint === '/') {\
3956 FS.root = mount.root;\
3957 }\
3958 }\
3959 return root;\
3960 },lookup:function (parent, name) {\
3961 return parent.node_ops.lookup(parent, name);\
3962 },mknod:function (path, mode, dev) {\
3963 var lookup = FS.lookupPath(path, { parent: true });\
3964 var parent = lookup.node;\
3965 var name = PATH.basename(path);\
3966 var err = FS.mayCreate(parent, name);\
3967 if (err) {\
3968 throw new FS.ErrnoError(err);\
3969 }\
3970 if (!parent.node_ops.mknod) {\
3971 throw new FS.ErrnoError(ERRNO_CODES.EPERM);\
3972 }\
3973 return parent.node_ops.mknod(parent, name, mode, dev);\
3974 },create:function (path, mode) {\
3975 mode = mode !== undefined ? mode : 0666;\
3976 mode &= 4095;\
3977 mode |= 0100000;\
3978 return FS.mknod(path, mode, 0);\
3979 },mkdir:function (path, mode) {\
3980 mode = mode !== undefined ? mode : 0777;\
3981 mode &= 511 | 0001000;\
3982 mode |= 0040000;\
3983 return FS.mknod(path, mode, 0);\
3984 },mkdev:function (path, mode, dev) {\
3985 if (typeof(dev) === 'undefined') {\
3986 dev = mode;\
3987 mode = 0666;\
3988 }\
3989 mode |= 0020000;\
3990 return FS.mknod(path, mode, dev);\
3991 },symlink:function (oldpath, newpath) {\
3992 var lookup = FS.lookupPath(newpath, { parent: true });\
3993 var parent = lookup.node;\
3994 var newname = PATH.basename(newpath);\
3995 var err = FS.mayCreate(parent, newname);\
3996 if (err) {\
3997 throw new FS.ErrnoError(err);\
3998 }\
3999 if (!parent.node_ops.symlink) {\
4000 throw new FS.ErrnoError(ERRNO_CODES.EPERM);\
4001 }\
4002 return parent.node_ops.symlink(parent, newname, oldpath);\
4003 },rename:function (old_path, new_path) {\
4004 var old_dirname = PATH.dirname(old_path);\
4005 var new_dirname = PATH.dirname(new_path);\
4006 var old_name = PATH.basename(old_path);\
4007 var new_name = PATH.basename(new_path);\
4008 // parents must exist\
4009 var lookup, old_dir, new_dir;\
4010 try {\
4011 lookup = FS.lookupPath(old_path, { parent: true });\
4012 old_dir = lookup.node;\
4013 lookup = FS.lookupPath(new_path, { parent: true });\
4014 new_dir = lookup.node;\
4015 } catch (e) {\
4016 throw new FS.ErrnoError(ERRNO_CODES.EBUSY);\
4017 }\
4018 // need to be part of the same mount\
4019 if (old_dir.mount !== new_dir.mount) {\
4020 throw new FS.ErrnoError(ERRNO_CODES.EXDEV);\
4021 }\
4022 // source must exist\
4023 var old_node = FS.lookupNode(old_dir, old_name);\
4024 // old path should not be an ancestor of the new path\
4025 var relative = PATH.relative(old_path, new_dirname);\
4026 if (relative.charAt(0) !== '.') {\
4027 throw new FS.ErrnoError(ERRNO_CODES.EINVAL);\
4028 }\
4029 // new path should not be an ancestor of the old path\
4030 relative = PATH.relative(new_path, old_dirname);\
4031 if (relative.charAt(0) !== '.') {\
4032 throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);\
4033 }\
4034 // see if the new path already exists\
4035 var new_node;\
4036 try {\
4037 new_node = FS.lookupNode(new_dir, new_name);\
4038 } catch (e) {\
4039 // not fatal\
4040 }\
4041 // early out if nothing needs to change\
4042 if (old_node === new_node) {\
4043 return;\
4044 }\
4045 // we'll need to delete the old entry\
4046 var isdir = FS.isDir(old_node.mode);\
4047 var err = FS.mayDelete(old_dir, old_name, isdir);\
4048 if (err) {\
4049 throw new FS.ErrnoError(err);\
4050 }\
4051 // need delete permissions if we'll be overwriting.\
4052 // need create permissions if new doesn't already exist.\
4053 err = new_node ?\
4054 FS.mayDelete(new_dir, new_name, isdir) :\
4055 FS.mayCreate(new_dir, new_name);\
4056 if (err) {\
4057 throw new FS.ErrnoError(err);\
4058 }\
4059 if (!old_dir.node_ops.rename) {\
4060 throw new FS.ErrnoError(ERRNO_CODES.EPERM);\
4061 }\
4062 if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) {\
4063 throw new FS.ErrnoError(ERRNO_CODES.EBUSY);\
4064 }\
4065 // if we are going to change the parent, check write permissions\
4066 if (new_dir !== old_dir) {\
4067 err = FS.nodePermissions(old_dir, 'w');\
4068 if (err) {\
4069 throw new FS.ErrnoError(err);\
4070 }\
4071 }\
4072 // remove the node from the lookup hash\
4073 FS.hashRemoveNode(old_node);\
4074 // do the underlying fs rename\
4075 try {\
4076 old_dir.node_ops.rename(old_node, new_dir, new_name);\
4077 } catch (e) {\
4078 throw e;\
4079 } finally {\
4080 // add the node back to the hash (in case node_ops.rename\
4081 // changed its name)\
4082 FS.hashAddNode(old_node);\
4083 }\
4084 },rmdir:function (path) {\
4085 var lookup = FS.lookupPath(path, { parent: true });\
4086 var parent = lookup.node;\
4087 var name = PATH.basename(path);\
4088 var node = FS.lookupNode(parent, name);\
4089 var err = FS.mayDelete(parent, name, true);\
4090 if (err) {\
4091 throw new FS.ErrnoError(err);\
4092 }\
4093 if (!parent.node_ops.rmdir) {\
4094 throw new FS.ErrnoError(ERRNO_CODES.EPERM);\
4095 }\
4096 if (FS.isMountpoint(node)) {\
4097 throw new FS.ErrnoError(ERRNO_CODES.EBUSY);\
4098 }\
4099 parent.node_ops.rmdir(parent, name);\
4100 FS.destroyNode(node);\
4101 },readdir:function (path) {\
4102 var lookup = FS.lookupPath(path, { follow: true });\
4103 var node = lookup.node;\
4104 if (!node.node_ops.readdir) {\
4105 throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);\
4106 }\
4107 return node.node_ops.readdir(node);\
4108 },unlink:function (path) {\
4109 var lookup = FS.lookupPath(path, { parent: true });\
4110 var parent = lookup.node;\
4111 var name = PATH.basename(path);\
4112 var node = FS.lookupNode(parent, name);\
4113 var err = FS.mayDelete(parent, name, false);\
4114 if (err) {\
4115 // POSIX says unlink should set EPERM, not EISDIR\
4116 if (err === ERRNO_CODES.EISDIR) err = ERRNO_CODES.EPERM;\
4117 throw new FS.ErrnoError(err);\
4118 }\
4119 if (!parent.node_ops.unlink) {\
4120 throw new FS.ErrnoError(ERRNO_CODES.EPERM);\
4121 }\
4122 if (FS.isMountpoint(node)) {\
4123 throw new FS.ErrnoError(ERRNO_CODES.EBUSY);\
4124 }\
4125 parent.node_ops.unlink(parent, name);\
4126 FS.destroyNode(node);\
4127 },readlink:function (path) {\
4128 var lookup = FS.lookupPath(path, { follow: false });\
4129 var link = lookup.node;\
4130 if (!link.node_ops.readlink) {\
4131 throw new FS.ErrnoError(ERRNO_CODES.EINVAL);\
4132 }\
4133 return link.node_ops.readlink(link);\
4134 },stat:function (path, dontFollow) {\
4135 var lookup = FS.lookupPath(path, { follow: !dontFollow });\
4136 var node = lookup.node;\
4137 if (!node.node_ops.getattr) {\
4138 throw new FS.ErrnoError(ERRNO_CODES.EPERM);\
4139 }\
4140 return node.node_ops.getattr(node);\
4141 },lstat:function (path) {\
4142 return FS.stat(path, true);\
4143 },chmod:function (path, mode, dontFollow) {\
4144 var node;\
4145 if (typeof path === 'string') {\
4146 var lookup = FS.lookupPath(path, { follow: !dontFollow });\
4147 node = lookup.node;\
4148 } else {\
4149 node = path;\
4150 }\
4151 if (!node.node_ops.setattr) {\
4152 throw new FS.ErrnoError(ERRNO_CODES.EPERM);\
4153 }\
4154 node.node_ops.setattr(node, {\
4155 mode: (mode & 4095) | (node.mode & ~4095),\
4156 timestamp: Date.now()\
4157 });\
4158 },lchmod:function (path, mode) {\
4159 FS.chmod(path, mode, true);\
4160 },fchmod:function (fd, mode) {\
4161 var stream = FS.getStream(fd);\
4162 if (!stream) {\
4163 throw new FS.ErrnoError(ERRNO_CODES.EBADF);\
4164 }\
4165 FS.chmod(stream.node, mode);\
4166 },chown:function (path, uid, gid, dontFollow) {\
4167 var node;\
4168 if (typeof path === 'string') {\
4169 var lookup = FS.lookupPath(path, { follow: !dontFollow });\
4170 node = lookup.node;\
4171 } else {\
4172 node = path;\
4173 }\
4174 if (!node.node_ops.setattr) {\
4175 throw new FS.ErrnoError(ERRNO_CODES.EPERM);\
4176 }\
4177 node.node_ops.setattr(node, {\
4178 timestamp: Date.now()\
4179 // we ignore the uid / gid for now\
4180 });\
4181 },lchown:function (path, uid, gid) {\
4182 FS.chown(path, uid, gid, true);\
4183 },fchown:function (fd, uid, gid) {\
4184 var stream = FS.getStream(fd);\
4185 if (!stream) {\
4186 throw new FS.ErrnoError(ERRNO_CODES.EBADF);\
4187 }\
4188 FS.chown(stream.node, uid, gid);\
4189 },truncate:function (path, len) {\
4190 if (len < 0) {\
4191 throw new FS.ErrnoError(ERRNO_CODES.EINVAL);\
4192 }\
4193 var node;\
4194 if (typeof path === 'string') {\
4195 var lookup = FS.lookupPath(path, { follow: true });\
4196 node = lookup.node;\
4197 } else {\
4198 node = path;\
4199 }\
4200 if (!node.node_ops.setattr) {\
4201 throw new FS.ErrnoError(ERRNO_CODES.EPERM);\
4202 }\
4203 if (FS.isDir(node.mode)) {\
4204 throw new FS.ErrnoError(ERRNO_CODES.EISDIR);\
4205 }\
4206 if (!FS.isFile(node.mode)) {\
4207 throw new FS.ErrnoError(ERRNO_CODES.EINVAL);\
4208 }\
4209 var err = FS.nodePermissions(node, 'w');\
4210 if (err) {\
4211 throw new FS.ErrnoError(err);\
4212 }\
4213 node.node_ops.setattr(node, {\
4214 size: len,\
4215 timestamp: Date.now()\
4216 });\
4217 },ftruncate:function (fd, len) {\
4218 var stream = FS.getStream(fd);\
4219 if (!stream) {\
4220 throw new FS.ErrnoError(ERRNO_CODES.EBADF);\
4221 }\
4222 if ((stream.flags & 3) === 0) {\
4223 throw new FS.ErrnoError(ERRNO_CODES.EINVAL);\
4224 }\
4225 FS.truncate(stream.node, len);\
4226 },utime:function (path, atime, mtime) {\
4227 var lookup = FS.lookupPath(path, { follow: true });\
4228 var node = lookup.node;\
4229 node.node_ops.setattr(node, {\
4230 timestamp: Math.max(atime, mtime)\
4231 });\
4232 },open:function (path, flags, mode, fd_start, fd_end) {\
4233 path = PATH.normalize(path);\
4234 flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags;\
4235 mode = typeof mode === 'undefined' ? 0666 : mode;\
4236 if ((flags & 512)) {\
4237 mode = (mode & 4095) | 0100000;\
4238 } else {\
4239 mode = 0;\
4240 }\
4241 var node;\
4242 try {\
4243 var lookup = FS.lookupPath(path, {\
4244 follow: !(flags & 0200000)\
4245 });\
4246 node = lookup.node;\
4247 path = lookup.path;\
4248 } catch (e) {\
4249 // ignore\
4250 }\
4251 // perhaps we need to create the node\
4252 if ((flags & 512)) {\
4253 if (node) {\
4254 // if O_CREAT and O_EXCL are set, error out if the node already exists\
4255 if ((flags & 2048)) {\
4256 throw new FS.ErrnoError(ERRNO_CODES.EEXIST);\
4257 }\
4258 } else {\
4259 // node doesn't exist, try to create it\
4260 node = FS.mknod(path, mode, 0);\
4261 }\
4262 }\
4263 if (!node) {\
4264 throw new FS.ErrnoError(ERRNO_CODES.ENOENT);\
4265 }\
4266 // can't truncate a device\
4267 if (FS.isChrdev(node.mode)) {\
4268 flags &= ~1024;\
4269 }\
4270 // check permissions\
4271 var err = FS.mayOpen(node, flags);\
4272 if (err) {\
4273 throw new FS.ErrnoError(err);\
4274 }\
4275 // do truncation if necessary\
4276 if ((flags & 1024)) {\
4277 FS.truncate(node, 0);\
4278 }\
4279 // register the stream with the filesystem\
4280 var stream = FS.createStream({\
4281 path: path,\
4282 node: node,\
4283 flags: flags,\
4284 seekable: true,\
4285 position: 0,\
4286 stream_ops: node.stream_ops,\
4287 // used by the file family libc calls (fopen, fwrite, ferror, etc.)\
4288 ungotten: [],\
4289 error: false\
4290 }, fd_start, fd_end);\
4291 // call the new stream's open function\
4292 if (stream.stream_ops.open) {\
4293 stream.stream_ops.open(stream);\
4294 }\
4295 return stream;\
4296 },close:function (stream) {\
4297 try {\
4298 if (stream.stream_ops.close) {\
4299 stream.stream_ops.close(stream);\
4300 }\
4301 } catch (e) {\
4302 throw e;\
4303 } finally {\
4304 FS.closeStream(stream.fd);\
4305 }\
4306 },llseek:function (stream, offset, whence) {\
4307 if (!stream.seekable || !stream.stream_ops.llseek) {\
4308 throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);\
4309 }\
4310 return stream.stream_ops.llseek(stream, offset, whence);\
4311 },read:function (stream, buffer, offset, length, position) {\
4312 if (length < 0 || position < 0) {\
4313 throw new FS.ErrnoError(ERRNO_CODES.EINVAL);\
4314 }\
4315 if ((stream.flags & 3) === 1) {\
4316 throw new FS.ErrnoError(ERRNO_CODES.EBADF);\
4317 }\
4318 if (FS.isDir(stream.node.mode)) {\
4319 throw new FS.ErrnoError(ERRNO_CODES.EISDIR);\
4320 }\
4321 if (!stream.stream_ops.read) {\
4322 throw new FS.ErrnoError(ERRNO_CODES.EINVAL);\
4323 }\
4324 var seeking = true;\
4325 if (typeof position === 'undefined') {\
4326 position = stream.position;\
4327 seeking = false;\
4328 } else if (!stream.seekable) {\
4329 throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);\
4330 }\
4331 var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position);\
4332 if (!seeking) stream.position += bytesRead;\
4333 return bytesRead;\
4334 },write:function (stream, buffer, offset, length, position, canOwn) {\
4335 if (length < 0 || position < 0) {\
4336 throw new FS.ErrnoError(ERRNO_CODES.EINVAL);\
4337 }\
4338 if ((stream.flags & 3) === 0) {\
4339 throw new FS.ErrnoError(ERRNO_CODES.EBADF);\
4340 }\
4341 if (FS.isDir(stream.node.mode)) {\
4342 throw new FS.ErrnoError(ERRNO_CODES.EISDIR);\
4343 }\
4344 if (!stream.stream_ops.write) {\
4345 throw new FS.ErrnoError(ERRNO_CODES.EINVAL);\
4346 }\
4347 var seeking = true;\
4348 if (typeof position === 'undefined') {\
4349 position = stream.position;\
4350 seeking = false;\
4351 } else if (!stream.seekable) {\
4352 throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);\
4353 }\
4354 if (stream.flags & 8) {\
4355 // seek to the end before writing in append mode\
4356 FS.llseek(stream, 0, 2);\
4357 }\
4358 var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn);\
4359 if (!seeking) stream.position += bytesWritten;\
4360 return bytesWritten;\
4361 },allocate:function (stream, offset, length) {\
4362 if (offset < 0 || length <= 0) {\
4363 throw new FS.ErrnoError(ERRNO_CODES.EINVAL);\
4364 }\
4365 if ((stream.flags & 3) === 0) {\
4366 throw new FS.ErrnoError(ERRNO_CODES.EBADF);\
4367 }\
4368 if (!FS.isFile(stream.node.mode) && !FS.isDir(node.mode)) {\
4369 throw new FS.ErrnoError(ERRNO_CODES.ENODEV);\
4370 }\
4371 if (!stream.stream_ops.allocate) {\
4372 throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP);\
4373 }\
4374 stream.stream_ops.allocate(stream, offset, length);\
4375 },mmap:function (stream, buffer, offset, length, position, prot, flags) {\
4376 // TODO if PROT is PROT_WRITE, make sure we have write access\
4377 if ((stream.flags & 3) === 1) {\
4378 throw new FS.ErrnoError(ERRNO_CODES.EACCES);\
4379 }\
4380 if (!stream.stream_ops.mmap) {\
4381 throw new FS.errnoError(ERRNO_CODES.ENODEV);\
4382 }\
4383 return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags);\
4384 },ioctl:function (stream, cmd, arg) {\
4385 if (!stream.stream_ops.ioctl) {\
4386 throw new FS.ErrnoError(ERRNO_CODES.ENOTTY);\
4387 }\
4388 return stream.stream_ops.ioctl(stream, cmd, arg);\
4389 },readFile:function (path, opts) {\
4390 opts = opts || {};\
4391 opts.flags = opts.flags || 'r';\
4392 opts.encoding = opts.encoding || 'binary';\
4393 var ret;\
4394 var stream = FS.open(path, opts.flags);\
4395 var stat = FS.stat(path);\
4396 var length = stat.size;\
4397 var buf = new Uint8Array(length);\
4398 FS.read(stream, buf, 0, length, 0);\
4399 if (opts.encoding === 'utf8') {\
4400 ret = '';\
4401 var utf8 = new Runtime.UTF8Processor();\
4402 for (var i = 0; i < length; i++) {\
4403 ret += utf8.processCChar(buf[i]);\
4404 }\
4405 } else if (opts.encoding === 'binary') {\
4406 ret = buf;\
4407 } else {\
4408 throw new Error('Invalid encoding type \"' + opts.encoding + '\"');\
4409 }\
4410 FS.close(stream);\
4411 return ret;\
4412 },writeFile:function (path, data, opts) {\
4413 opts = opts || {};\
4414 opts.flags = opts.flags || 'w';\
4415 opts.encoding = opts.encoding || 'utf8';\
4416 var stream = FS.open(path, opts.flags, opts.mode);\
4417 if (opts.encoding === 'utf8') {\
4418 var utf8 = new Runtime.UTF8Processor();\
4419 var buf = new Uint8Array(utf8.processJSString(data));\
4420 FS.write(stream, buf, 0, buf.length, 0);\
4421 } else if (opts.encoding === 'binary') {\
4422 FS.write(stream, data, 0, data.length, 0);\
4423 } else {\
4424 throw new Error('Invalid encoding type \"' + opts.encoding + '\"');\
4425 }\
4426 FS.close(stream);\
4427 },createDefaultDirectories:function () {\
4428 FS.mkdir('/tmp');\
4429 },createDefaultDevices:function () {\
4430 // create /dev\
4431 FS.mkdir('/dev');\
4432 // setup /dev/null\
4433 FS.registerDevice(FS.makedev(1, 3), {\
4434 read: function() { return 0; },\
4435 write: function() { return 0; }\
4436 });\
4437 FS.mkdev('/dev/null', FS.makedev(1, 3));\
4438 // setup /dev/tty and /dev/tty1\
4439 // stderr needs to print output using Module['printErr']\
4440 // so we register a second tty just for it.\
4441 TTY.register(FS.makedev(5, 0), TTY.default_tty_ops);\
4442 TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops);\
4443 FS.mkdev('/dev/tty', FS.makedev(5, 0));\
4444 FS.mkdev('/dev/tty1', FS.makedev(6, 0));\
4445 // we're not going to emulate the actual shm device,\
4446 // just create the tmp dirs that reside in it commonly\
4447 FS.mkdir('/dev/shm');\
4448 FS.mkdir('/dev/shm/tmp');\
4449 },createStandardStreams:function () {\
4450 // TODO deprecate the old functionality of a single\
4451 // input / output callback and that utilizes FS.createDevice\
4452 // and instead require a unique set of stream ops\
4453 // by default, we symlink the standard streams to the\
4454 // default tty devices. however, if the standard streams\
4455 // have been overwritten we create a unique device for\
4456 // them instead.\
4457 if (Module['stdin']) {\
4458 FS.createDevice('/dev', 'stdin', Module['stdin']);\
4459 } else {\
4460 FS.symlink('/dev/tty', '/dev/stdin');\
4461 }\
4462 if (Module['stdout']) {\
4463 FS.createDevice('/dev', 'stdout', null, Module['stdout']);\
4464 } else {\
4465 FS.symlink('/dev/tty', '/dev/stdout');\
4466 }\
4467 if (Module['stderr']) {\
4468 FS.createDevice('/dev', 'stderr', null, Module['stderr']);\
4469 } else {\
4470 FS.symlink('/dev/tty1', '/dev/stderr');\
4471 }\
4472 // open default streams for the stdin, stdout and stderr devices\
4473 var stdin = FS.open('/dev/stdin', 'r');\
4474 HEAP32[((_stdin)>>2)]=stdin.fd;\
4475 assert(stdin.fd === 1, 'invalid handle for stdin (' + stdin.fd + ')');\
4476 var stdout = FS.open('/dev/stdout', 'w');\
4477 HEAP32[((_stdout)>>2)]=stdout.fd;\
4478 assert(stdout.fd === 2, 'invalid handle for stdout (' + stdout.fd + ')');\
4479 var stderr = FS.open('/dev/stderr', 'w');\
4480 HEAP32[((_stderr)>>2)]=stderr.fd;\
4481 assert(stderr.fd === 3, 'invalid handle for stderr (' + stderr.fd + ')');\
4482 },staticInit:function () {\
4483 FS.nameTable = new Array(4096);\
4484 FS.root = FS.createNode(null, '/', 0040000 | 0777, 0);\
4485 FS.mount(MEMFS, {}, '/');\
4486 FS.createDefaultDirectories();\
4487 FS.createDefaultDevices();\
4488 },init:function (input, output, error) {\
4489 assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)');\
4490 FS.init.initialized = true;\
4491 // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here\
4492 Module['stdin'] = input || Module['stdin'];\
4493 Module['stdout'] = output || Module['stdout'];\
4494 Module['stderr'] = error || Module['stderr'];\
4495 FS.createStandardStreams();\
4496 },quit:function () {\
4497 FS.init.initialized = false;\
4498 for (var i = 0; i < FS.streams.length; i++) {\
4499 var stream = FS.streams[i];\
4500 if (!stream) {\
4501 continue;\
4502 }\
4503 FS.close(stream);\
4504 }\
4505 },getMode:function (canRead, canWrite) {\
4506 var mode = 0;\
4507 if (canRead) mode |= 292 | 73;\
4508 if (canWrite) mode |= 146;\
4509 return mode;\
4510 },joinPath:function (parts, forceRelative) {\
4511 var path = PATH.join.apply(null, parts);\
4512 if (forceRelative && path[0] == '/') path = path.substr(1);\
4513 return path;\
4514 },absolutePath:function (relative, base) {\
4515 return PATH.resolve(base, relative);\
4516 },standardizePath:function (path) {\
4517 return PATH.normalize(path);\
4518 },findObject:function (path, dontResolveLastLink) {\
4519 var ret = FS.analyzePath(path, dontResolveLastLink);\
4520 if (ret.exists) {\
4521 return ret.object;\
4522 } else {\
4523 ___setErrNo(ret.error);\
4524 return null;\
4525 }\
4526 },analyzePath:function (path, dontResolveLastLink) {\
4527 // operate from within the context of the symlink's target\
4528 try {\
4529 var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink });\
4530 path = lookup.path;\
4531 } catch (e) {\
4532 }\
4533 var ret = {\
4534 isRoot: false, exists: false, error: 0, name: null, path: null, object: null,\
4535 parentExists: false, parentPath: null, parentObject: null\
4536 };\
4537 try {\
4538 var lookup = FS.lookupPath(path, { parent: true });\
4539 ret.parentExists = true;\
4540 ret.parentPath = lookup.path;\
4541 ret.parentObject = lookup.node;\
4542 ret.name = PATH.basename(path);\
4543 lookup = FS.lookupPath(path, { follow: !dontResolveLastLink });\
4544 ret.exists = true;\
4545 ret.path = lookup.path;\
4546 ret.object = lookup.node;\
4547 ret.name = lookup.node.name;\
4548 ret.isRoot = lookup.path === '/';\
4549 } catch (e) {\
4550 ret.error = e.errno;\
4551 };\
4552 return ret;\
4553 },createFolder:function (parent, name, canRead, canWrite) {\
4554 var path = PATH.join(typeof parent === 'string' ? parent : FS.getPath(parent), name);\
4555 var mode = FS.getMode(canRead, canWrite);\
4556 return FS.mkdir(path, mode);\
4557 },createPath:function (parent, path, canRead, canWrite) {\
4558 parent = typeof parent === 'string' ? parent : FS.getPath(parent);\
4559 var parts = path.split('/').reverse();\
4560 while (parts.length) {\
4561 var part = parts.pop();\
4562 if (!part) continue;\
4563 var current = PATH.join(parent, part);\
4564 try {\
4565 FS.mkdir(current);\
4566 } catch (e) {\
4567 // ignore EEXIST\
4568 }\
4569 parent = current;\
4570 }\
4571 return current;\
4572 },createFile:function (parent, name, properties, canRead, canWrite) {\
4573 var path = PATH.join(typeof parent === 'string' ? parent : FS.getPath(parent), name);\
4574 var mode = FS.getMode(canRead, canWrite);\
4575 return FS.create(path, mode);\
4576 },createDataFile:function (parent, name, data, canRead, canWrite, canOwn) {\
4577 var path = name ? PATH.join(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent;\
4578 var mode = FS.getMode(canRead, canWrite);\
4579 var node = FS.create(path, mode);\
4580 if (data) {\
4581 if (typeof data === 'string') {\
4582 var arr = new Array(data.length);\
4583 for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i);\
4584 data = arr;\
4585 }\
4586 // make sure we can write to the file\
4587 FS.chmod(path, mode | 146);\
4588 var stream = FS.open(path, 'w');\
4589 FS.write(stream, data, 0, data.length, 0, canOwn);\
4590 FS.close(stream);\
4591 FS.chmod(path, mode);\
4592 }\
4593 return node;\
4594 },createDevice:function (parent, name, input, output) {\
4595 var path = PATH.join(typeof parent === 'string' ? parent : FS.getPath(parent), name);\
4596 var mode = FS.getMode(!!input, !!output);\
4597 if (!FS.createDevice.major) FS.createDevice.major = 64;\
4598 var dev = FS.makedev(FS.createDevice.major++, 0);\
4599 // Create a fake device that a set of stream ops to emulate\
4600 // the old behavior.\
4601 FS.registerDevice(dev, {\
4602 open: function(stream) {\
4603 stream.seekable = false;\
4604 },\
4605 close: function(stream) {\
4606 // flush any pending line data\
4607 if (output && output.buffer && output.buffer.length) {\
4608 output(10);\
4609 }\
4610 },\
4611 read: function(stream, buffer, offset, length, pos /* ignored */) {\
4612 var bytesRead = 0;\
4613 for (var i = 0; i < length; i++) {\
4614 var result;\
4615 try {\
4616 result = input();\
4617 } catch (e) {\
4618 throw new FS.ErrnoError(ERRNO_CODES.EIO);\
4619 }\
4620 if (result === undefined && bytesRead === 0) {\
4621 throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);\
4622 }\
4623 if (result === null || result === undefined) break;\
4624 bytesRead++;\
4625 buffer[offset+i] = result;\
4626 }\
4627 if (bytesRead) {\
4628 stream.node.timestamp = Date.now();\
4629 }\
4630 return bytesRead;\
4631 },\
4632 write: function(stream, buffer, offset, length, pos) {\
4633 for (var i = 0; i < length; i++) {\
4634 try {\
4635 output(buffer[offset+i]);\
4636 } catch (e) {\
4637 throw new FS.ErrnoError(ERRNO_CODES.EIO);\
4638 }\
4639 }\
4640 if (length) {\
4641 stream.node.timestamp = Date.now();\
4642 }\
4643 return i;\
4644 }\
4645 });\
4646 return FS.mkdev(path, mode, dev);\
4647 },createLink:function (parent, name, target, canRead, canWrite) {\
4648 var path = PATH.join(typeof parent === 'string' ? parent : FS.getPath(parent), name);\
4649 return FS.symlink(target, path);\
4650 },forceLoadFile:function (obj) {\
4651 if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true;\
4652 var success = true;\
4653 if (typeof XMLHttpRequest !== 'undefined') {\
4654 throw new Error(\"Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.\");\
4655 } else if (Module['read']) {\
4656 // Command-line.\
4657 try {\
4658 // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as\
4659 // read() will try to parse UTF8.\
4660 obj.contents = intArrayFromString(Module['read'](obj.url), true);\
4661 } catch (e) {\
4662 success = false;\
4663 }\
4664 } else {\
4665 throw new Error('Cannot load without read() or XMLHttpRequest.');\
4666 }\
4667 if (!success) ___setErrNo(ERRNO_CODES.EIO);\
4668 return success;\
4669 },createLazyFile:function (parent, name, url, canRead, canWrite) {\
4670 if (typeof XMLHttpRequest !== 'undefined') {\
4671 if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc';\
4672 // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse.\
4673 var LazyUint8Array = function() {\
4674 this.lengthKnown = false;\
4675 this.chunks = []; // Loaded chunks. Index is the chunk number\
4676 }\
4677 LazyUint8Array.prototype.get = function(idx) {\
4678 if (idx > this.length-1 || idx < 0) {\
4679 return undefined;\
4680 }\
4681 var chunkOffset = idx % this.chunkSize;\
4682 var chunkNum = Math.floor(idx / this.chunkSize);\
4683 return this.getter(chunkNum)[chunkOffset];\
4684 }\
4685 LazyUint8Array.prototype.setDataGetter = function(getter) {\
4686 this.getter = getter;\
4687 }\
4688 LazyUint8Array.prototype.cacheLength = function() {\
4689 // Find length\
4690 var xhr = new XMLHttpRequest();\
4691 xhr.open('HEAD', url, false);\
4692 xhr.send(null);\
4693 if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error(\"Couldn't load \" + url + \". Status: \" + xhr.status);\
4694 var datalength = Number(xhr.getResponseHeader(\"Content-length\"));\
4695 var header;\
4696 var hasByteServing = (header = xhr.getResponseHeader(\"Accept-Ranges\")) && header === \"bytes\";\
4697 var chunkSize = 1024*1024; // Chunk size in bytes\
4698 if (!hasByteServing) chunkSize = datalength;\
4699 // Function to get a range from the remote URL.\
4700 var doXHR = (function(from, to) {\
4701 if (from > to) throw new Error(\"invalid range (\" + from + \", \" + to + \") or no bytes requested!\");\
4702 if (to > datalength-1) throw new Error(\"only \" + datalength + \" bytes available! programmer error!\");\
4703 // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available.\
4704 var xhr = new XMLHttpRequest();\
4705 xhr.open('GET', url, false);\
4706 if (datalength !== chunkSize) xhr.setRequestHeader(\"Range\", \"bytes=\" + from + \"-\" + to);\
4707 // Some hints to the browser that we want binary data.\
4708 if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer';\
4709 if (xhr.overrideMimeType) {\
4710 xhr.overrideMimeType('text/plain; charset=x-user-defined');\
4711 }\
4712 xhr.send(null);\
4713 if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error(\"Couldn't load \" + url + \". Status: \" + xhr.status);\
4714 if (xhr.response !== undefined) {\
4715 return new Uint8Array(xhr.response || []);\
4716 } else {\
4717 return intArrayFromString(xhr.responseText || '', true);\
4718 }\
4719 });\
4720 var lazyArray = this;\
4721 lazyArray.setDataGetter(function(chunkNum) {\
4722 var start = chunkNum * chunkSize;\
4723 var end = (chunkNum+1) * chunkSize - 1; // including this byte\
4724 end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block\
4725 if (typeof(lazyArray.chunks[chunkNum]) === \"undefined\") {\
4726 lazyArray.chunks[chunkNum] = doXHR(start, end);\
4727 }\
4728 if (typeof(lazyArray.chunks[chunkNum]) === \"undefined\") throw new Error(\"doXHR failed!\");\
4729 return lazyArray.chunks[chunkNum];\
4730 });\
4731 this._length = datalength;\
4732 this._chunkSize = chunkSize;\
4733 this.lengthKnown = true;\
4734 }\
4735 var lazyArray = new LazyUint8Array();\
4736 Object.defineProperty(lazyArray, \"length\", {\
4737 get: function() {\
4738 if(!this.lengthKnown) {\
4739 this.cacheLength();\
4740 }\
4741 return this._length;\
4742 }\
4743 });\
4744 Object.defineProperty(lazyArray, \"chunkSize\", {\
4745 get: function() {\
4746 if(!this.lengthKnown) {\
4747 this.cacheLength();\
4748 }\
4749 return this._chunkSize;\
4750 }\
4751 });\
4752 var properties = { isDevice: false, contents: lazyArray };\
4753 } else {\
4754 var properties = { isDevice: false, url: url };\
4755 }\
4756 var node = FS.createFile(parent, name, properties, canRead, canWrite);\
4757 // This is a total hack, but I want to get this lazy file code out of the\
4758 // core of MEMFS. If we want to keep this lazy file concept I feel it should\
4759 // be its own thin LAZYFS proxying calls to MEMFS.\
4760 if (properties.contents) {\
4761 node.contents = properties.contents;\
4762 } else if (properties.url) {\
4763 node.contents = null;\
4764 node.url = properties.url;\
4765 }\
4766 // override each stream op with one that tries to force load the lazy file first\
4767 var stream_ops = {};\
4768 var keys = Object.keys(node.stream_ops);\
4769 keys.forEach(function(key) {\
4770 var fn = node.stream_ops[key];\
4771 stream_ops[key] = function() {\
4772 if (!FS.forceLoadFile(node)) {\
4773 throw new FS.ErrnoError(ERRNO_CODES.EIO);\
4774 }\
4775 return fn.apply(null, arguments);\
4776 };\
4777 });\
4778 // use a custom read function\
4779 stream_ops.read = function(stream, buffer, offset, length, position) {\
4780 if (!FS.forceLoadFile(node)) {\
4781 throw new FS.ErrnoError(ERRNO_CODES.EIO);\
4782 }\
4783 var contents = stream.node.contents;\
4784 var size = Math.min(contents.length - position, length);\
4785 if (contents.slice) { // normal array\
4786 for (var i = 0; i < size; i++) {\
4787 buffer[offset + i] = contents[position + i];\
4788 }\
4789 } else {\
4790 for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR\
4791 buffer[offset + i] = contents.get(position + i);\
4792 }\
4793 }\
4794 return size;\
4795 };\
4796 node.stream_ops = stream_ops;\
4797 return node;\
4798 },createPreloadedFile:function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn) {\
4799 Browser.init();\
4800 // TODO we should allow people to just pass in a complete filename instead\
4801 // of parent and name being that we just join them anyways\
4802 var fullname = name ? PATH.resolve(PATH.join(parent, name)) : parent;\
4803 function processData(byteArray) {\
4804 function finish(byteArray) {\
4805 if (!dontCreateFile) {\
4806 FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn);\
4807 }\
4808 if (onload) onload();\
4809 removeRunDependency('cp ' + fullname);\
4810 }\
4811 var handled = false;\
4812 Module['preloadPlugins'].forEach(function(plugin) {\
4813 if (handled) return;\
4814 if (plugin['canHandle'](fullname)) {\
4815 plugin['handle'](byteArray, fullname, finish, function() {\
4816 if (onerror) onerror();\
4817 removeRunDependency('cp ' + fullname);\
4818 });\
4819 handled = true;\
4820 }\
4821 });\
4822 if (!handled) finish(byteArray);\
4823 }\
4824 addRunDependency('cp ' + fullname);\
4825 if (typeof url == 'string') {\
4826 Browser.asyncLoad(url, function(byteArray) {\
4827 processData(byteArray);\
4828 }, onerror);\
4829 } else {\
4830 processData(url);\
4831 }\
4832 },indexedDB:function () {\
4833 return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;\
4834 },DB_NAME:function () {\
4835 return 'EM_FS_' + window.location.pathname;\
4836 },DB_VERSION:20,DB_STORE_NAME:\"FILE_DATA\",saveFilesToDB:function (paths, onload, onerror) {\
4837 onload = onload || function(){};\
4838 onerror = onerror || function(){};\
4839 var indexedDB = FS.indexedDB();\
4840 try {\
4841 var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION);\
4842 } catch (e) {\
4843 return onerror(e);\
4844 }\
4845 openRequest.onupgradeneeded = function() {\
4846 console.log('creating db');\
4847 var db = openRequest.result;\
4848 db.createObjectStore(FS.DB_STORE_NAME);\
4849 };\
4850 openRequest.onsuccess = function() {\
4851 var db = openRequest.result;\
4852 var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite');\
4853 var files = transaction.objectStore(FS.DB_STORE_NAME);\
4854 var ok = 0, fail = 0, total = paths.length;\
4855 function finish() {\
4856 if (fail == 0) onload(); else onerror();\
4857 }\
4858 paths.forEach(function(path) {\
4859 var putRequest = files.put(FS.analyzePath(path).object.contents, path);\
4860 putRequest.onsuccess = function() { ok++; if (ok + fail == total) finish() };\
4861 putRequest.onerror = function() { fail++; if (ok + fail == total) finish() };\
4862 });\
4863 transaction.onerror = onerror;\
4864 };\
4865 openRequest.onerror = onerror;\
4866 },loadFilesFromDB:function (paths, onload, onerror) {\
4867 onload = onload || function(){};\
4868 onerror = onerror || function(){};\
4869 var indexedDB = FS.indexedDB();\
4870 try {\
4871 var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION);\
4872 } catch (e) {\
4873 return onerror(e);\
4874 }\
4875 openRequest.onupgradeneeded = onerror; // no database to load from\
4876 openRequest.onsuccess = function() {\
4877 var db = openRequest.result;\
4878 try {\
4879 var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly');\
4880 } catch(e) {\
4881 onerror(e);\
4882 return;\
4883 }\
4884 var files = transaction.objectStore(FS.DB_STORE_NAME);\
4885 var ok = 0, fail = 0, total = paths.length;\
4886 function finish() {\
4887 if (fail == 0) onload(); else onerror();\
4888 }\
4889 paths.forEach(function(path) {\
4890 var getRequest = files.get(path);\
4891 getRequest.onsuccess = function() {\
4892 if (FS.analyzePath(path).exists) {\
4893 FS.unlink(path);\
4894 }\
4895 FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true);\
4896 ok++;\
4897 if (ok + fail == total) finish();\
4898 };\
4899 getRequest.onerror = function() { fail++; if (ok + fail == total) finish() };\
4900 });\
4901 transaction.onerror = onerror;\
4902 };\
4903 openRequest.onerror = onerror;\
4904 }};\
4905 var SOCKFS={mount:function (mount) {\
4906 return FS.createNode(null, '/', 0040000 | 0777, 0);\
4907 },nextname:function () {\
4908 if (!SOCKFS.nextname.current) {\
4909 SOCKFS.nextname.current = 0;\
4910 }\
4911 return 'socket[' + (SOCKFS.nextname.current++) + ']';\
4912 },createSocket:function (family, type, protocol) {\
4913 var streaming = type == 1;\
4914 if (protocol) {\
4915 assert(streaming == (protocol == 6)); // if SOCK_STREAM, must be tcp\
4916 }\
4917 // create our internal socket structure\
4918 var sock = {\
4919 family: family,\
4920 type: type,\
4921 protocol: protocol,\
4922 server: null,\
4923 peers: {},\
4924 pending: [],\
4925 recv_queue: [],\
4926 sock_ops: SOCKFS.websocket_sock_ops\
4927 };\
4928 // create the filesystem node to store the socket structure\
4929 var name = SOCKFS.nextname();\
4930 var node = FS.createNode(SOCKFS.root, name, 0140000, 0);\
4931 node.sock = sock;\
4932 // and the wrapping stream that enables library functions such\
4933 // as read and write to indirectly interact with the socket\
4934 var stream = FS.createStream({\
4935 path: name,\
4936 node: node,\
4937 flags: FS.modeStringToFlags('r+'),\
4938 seekable: false,\
4939 stream_ops: SOCKFS.stream_ops\
4940 });\
4941 // map the new stream to the socket structure (sockets have a 1:1\
4942 // relationship with a stream)\
4943 sock.stream = stream;\
4944 return sock;\
4945 },getSocket:function (fd) {\
4946 var stream = FS.getStream(fd);\
4947 if (!stream || !FS.isSocket(stream.node.mode)) {\
4948 return null;\
4949 }\
4950 return stream.node.sock;\
4951 },stream_ops:{poll:function (stream) {\
4952 var sock = stream.node.sock;\
4953 return sock.sock_ops.poll(sock);\
4954 },ioctl:function (stream, request, varargs) {\
4955 var sock = stream.node.sock;\
4956 return sock.sock_ops.ioctl(sock, request, varargs);\
4957 },read:function (stream, buffer, offset, length, position /* ignored */) {\
4958 var sock = stream.node.sock;\
4959 var msg = sock.sock_ops.recvmsg(sock, length);\
4960 if (!msg) {\
4961 // socket is closed\
4962 return 0;\
4963 }\
4964 buffer.set(msg.buffer, offset);\
4965 return msg.buffer.length;\
4966 },write:function (stream, buffer, offset, length, position /* ignored */) {\
4967 var sock = stream.node.sock;\
4968 return sock.sock_ops.sendmsg(sock, buffer, offset, length);\
4969 },close:function (stream) {\
4970 var sock = stream.node.sock;\
4971 sock.sock_ops.close(sock);\
4972 }},websocket_sock_ops:{createPeer:function (sock, addr, port) {\
4973 var ws;\
4974 if (typeof addr === 'object') {\
4975 ws = addr;\
4976 addr = null;\
4977 port = null;\
4978 }\
4979 if (ws) {\
4980 // for sockets that've already connected (e.g. we're the server)\
4981 // we can inspect the _socket property for the address\
4982 if (ws._socket) {\
4983 addr = ws._socket.remoteAddress;\
4984 port = ws._socket.remotePort;\
4985 }\
4986 // if we're just now initializing a connection to the remote,\
4987 // inspect the url property\
4988 else {\
4989 var result = /ws[s]?:\\/\\/([^:]+):(\\d+)/.exec(ws.url);\
4990 if (!result) {\
4991 throw new Error('WebSocket URL must be in the format ws(s)://address:port');\
4992 }\
4993 addr = result[1];\
4994 port = parseInt(result[2], 10);\
4995 }\
4996 } else {\
4997 // create the actual websocket object and connect\
4998 try {\
4999 var url = 'ws://' + addr + ':' + port;\
5000 // the node ws library API is slightly different than the browser's\
5001 var opts = ENVIRONMENT_IS_NODE ? {} : ['binary'];\
5002 ws = new WebSocket(url, opts);\
5003 ws.binaryType = 'arraybuffer';\
5004 } catch (e) {\
5005 throw new FS.ErrnoError(ERRNO_CODES.EHOSTUNREACH);\
5006 }\
5007 }\
5008 var peer = {\
5009 addr: addr,\
5010 port: port,\
5011 socket: ws,\
5012 dgram_send_queue: []\
5013 };\
5014 SOCKFS.websocket_sock_ops.addPeer(sock, peer);\
5015 SOCKFS.websocket_sock_ops.handlePeerEvents(sock, peer);\
5016 // if this is a bound dgram socket, send the port number first to allow\
5017 // us to override the ephemeral port reported to us by remotePort on the\
5018 // remote end.\
5019 if (sock.type === 2 && typeof sock.sport !== 'undefined') {\
5020 peer.dgram_send_queue.push(new Uint8Array([\
5021 255, 255, 255, 255,\
5022 'p'.charCodeAt(0), 'o'.charCodeAt(0), 'r'.charCodeAt(0), 't'.charCodeAt(0),\
5023 ((sock.sport & 0xff00) >> 8) , (sock.sport & 0xff)\
5024 ]));\
5025 }\
5026 return peer;\
5027 },getPeer:function (sock, addr, port) {\
5028 return sock.peers[addr + ':' + port];\
5029 },addPeer:function (sock, peer) {\
5030 sock.peers[peer.addr + ':' + peer.port] = peer;\
5031 },removePeer:function (sock, peer) {\
5032 delete sock.peers[peer.addr + ':' + peer.port];\
5033 },handlePeerEvents:function (sock, peer) {\
5034 var first = true;\
5035 var handleOpen = function () {\
5036 try {\
5037 var queued = peer.dgram_send_queue.shift();\
5038 while (queued) {\
5039 peer.socket.send(queued);\
5040 queued = peer.dgram_send_queue.shift();\
5041 }\
5042 } catch (e) {\
5043 // not much we can do here in the way of proper error handling as we've already\
5044 // lied and said this data was sent. shut it down.\
5045 peer.socket.close();\
5046 }\
5047 };\
5048 var handleMessage = function(data) {\
5049 assert(typeof data !== 'string' && data.byteLength !== undefined); // must receive an ArrayBuffer\
5050 data = new Uint8Array(data); // make a typed array view on the array buffer\
5051 // if this is the port message, override the peer's port with it\
5052 var wasfirst = first;\
5053 first = false;\
5054 if (wasfirst &&\
5055 data.length === 10 &&\
5056 data[0] === 255 && data[1] === 255 && data[2] === 255 && data[3] === 255 &&\
5057 data[4] === 'p'.charCodeAt(0) && data[5] === 'o'.charCodeAt(0) && data[6] === 'r'.charCodeAt(0) && data[7] === 't'.charCodeAt(0)) {\
5058 // update the peer's port and it's key in the peer map\
5059 var newport = ((data[8] << 8) | data[9]);\
5060 SOCKFS.websocket_sock_ops.removePeer(sock, peer);\
5061 peer.port = newport;\
5062 SOCKFS.websocket_sock_ops.addPeer(sock, peer);\
5063 return;\
5064 }\
5065 sock.recv_queue.push({ addr: peer.addr, port: peer.port, data: data });\
5066 };\
5067 if (ENVIRONMENT_IS_NODE) {\
5068 peer.socket.on('open', handleOpen);\
5069 peer.socket.on('message', function(data, flags) {\
5070 if (!flags.binary) {\
5071 return;\
5072 }\
5073 handleMessage((new Uint8Array(data)).buffer); // copy from node Buffer -> ArrayBuffer\
5074 });\
5075 peer.socket.on('error', function() {\
5076 // don't throw\
5077 });\
5078 } else {\
5079 peer.socket.onopen = handleOpen;\
5080 peer.socket.onmessage = function(event) {\
5081 handleMessage(event.data);\
5082 };\
5083 }\
5084 },poll:function (sock) {\
5085 if (sock.type === 1 && sock.server) {\
5086 // listen sockets should only say they're available for reading\
5087 // if there are pending clients.\
5088 return sock.pending.length ? (0 /* XXX missing C define POLLRDNORM */ | 1) : 0;\
5089 }\
5090 var mask = 0;\
5091 var dest = sock.type === 1 ? // we only care about the socket state for connection-based sockets\
5092 SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport) :\
5093 null;\
5094 if (sock.recv_queue.length ||\
5095 !dest || // connection-less sockets are always ready to read\
5096 (dest && dest.socket.readyState === dest.socket.CLOSING) ||\
5097 (dest && dest.socket.readyState === dest.socket.CLOSED)) { // let recv return 0 once closed\
5098 mask |= (0 /* XXX missing C define POLLRDNORM */ | 1);\
5099 }\
5100 if (!dest || // connection-less sockets are always ready to write\
5101 (dest && dest.socket.readyState === dest.socket.OPEN)) {\
5102 mask |= 2;\
5103 }\
5104 if ((dest && dest.socket.readyState === dest.socket.CLOSING) ||\
5105 (dest && dest.socket.readyState === dest.socket.CLOSED)) {\
5106 mask |= 16;\
5107 }\
5108 return mask;\
5109 },ioctl:function (sock, request, arg) {\
5110 switch (request) {\
5111 case 1:\
5112 var bytes = 0;\
5113 if (sock.recv_queue.length) {\
5114 bytes = sock.recv_queue[0].data.length;\
5115 }\
5116 HEAP32[((arg)>>2)]=bytes;\
5117 return 0;\
5118 default:\
5119 return ERRNO_CODES.EINVAL;\
5120 }\
5121 },close:function (sock) {\
5122 // if we've spawned a listen server, close it\
5123 if (sock.server) {\
5124 try {\
5125 sock.server.close();\
5126 } catch (e) {\
5127 }\
5128 sock.server = null;\
5129 }\
5130 // close any peer connections\
5131 var peers = Object.keys(sock.peers);\
5132 for (var i = 0; i < peers.length; i++) {\
5133 var peer = sock.peers[peers[i]];\
5134 try {\
5135 peer.socket.close();\
5136 } catch (e) {\
5137 }\
5138 SOCKFS.websocket_sock_ops.removePeer(sock, peer);\
5139 }\
5140 return 0;\
5141 },bind:function (sock, addr, port) {\
5142 if (typeof sock.saddr !== 'undefined' || typeof sock.sport !== 'undefined') {\
5143 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); // already bound\
5144 }\
5145 sock.saddr = addr;\
5146 sock.sport = port || _mkport();\
5147 // in order to emulate dgram sockets, we need to launch a listen server when\
5148 // binding on a connection-less socket\
5149 // note: this is only required on the server side\
5150 if (sock.type === 2) {\
5151 // close the existing server if it exists\
5152 if (sock.server) {\
5153 sock.server.close();\
5154 sock.server = null;\
5155 }\
5156 // swallow error operation not supported error that occurs when binding in the\
5157 // browser where this isn't supported\
5158 try {\
5159 sock.sock_ops.listen(sock, 0);\
5160 } catch (e) {\
5161 if (!(e instanceof FS.ErrnoError)) throw e;\
5162 if (e.errno !== ERRNO_CODES.EOPNOTSUPP) throw e;\
5163 }\
5164 }\
5165 },connect:function (sock, addr, port) {\
5166 if (sock.server) {\
5167 throw new FS.ErrnoError(ERRNO_CODS.EOPNOTSUPP);\
5168 }\
5169 // TODO autobind\
5170 // if (!sock.addr && sock.type == 2) {\
5171 // }\
5172 // early out if we're already connected / in the middle of connecting\
5173 if (typeof sock.daddr !== 'undefined' && typeof sock.dport !== 'undefined') {\
5174 var dest = SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport);\
5175 if (dest) {\
5176 if (dest.socket.readyState === dest.socket.CONNECTING) {\
5177 throw new FS.ErrnoError(ERRNO_CODES.EALREADY);\
5178 } else {\
5179 throw new FS.ErrnoError(ERRNO_CODES.EISCONN);\
5180 }\
5181 }\
5182 }\
5183 // add the socket to our peer list and set our\
5184 // destination address / port to match\
5185 var peer = SOCKFS.websocket_sock_ops.createPeer(sock, addr, port);\
5186 sock.daddr = peer.addr;\
5187 sock.dport = peer.port;\
5188 // always \"fail\" in non-blocking mode\
5189 throw new FS.ErrnoError(ERRNO_CODES.EINPROGRESS);\
5190 },listen:function (sock, backlog) {\
5191 if (!ENVIRONMENT_IS_NODE) {\
5192 throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP);\
5193 }\
5194 if (sock.server) {\
5195 throw new FS.ErrnoError(ERRNO_CODES.EINVAL); // already listening\
5196 }\
5197 var WebSocketServer = require('ws').Server;\
5198 var host = sock.saddr;\
5199 sock.server = new WebSocketServer({\
5200 host: host,\
5201 port: sock.sport\
5202 // TODO support backlog\
5203 });\
5204 sock.server.on('connection', function(ws) {\
5205 if (sock.type === 1) {\
5206 var newsock = SOCKFS.createSocket(sock.family, sock.type, sock.protocol);\
5207 // create a peer on the new socket\
5208 var peer = SOCKFS.websocket_sock_ops.createPeer(newsock, ws);\
5209 newsock.daddr = peer.addr;\
5210 newsock.dport = peer.port;\
5211 // push to queue for accept to pick up\
5212 sock.pending.push(newsock);\
5213 } else {\
5214 // create a peer on the listen socket so calling sendto\
5215 // with the listen socket and an address will resolve\
5216 // to the correct client\
5217 SOCKFS.websocket_sock_ops.createPeer(sock, ws);\
5218 }\
5219 });\
5220 sock.server.on('closed', function() {\
5221 sock.server = null;\
5222 });\
5223 sock.server.on('error', function() {\
5224 // don't throw\
5225 });\
5226 },accept:function (listensock) {\
5227 if (!listensock.server) {\
5228 throw new FS.ErrnoError(ERRNO_CODES.EINVAL);\
5229 }\
5230 var newsock = listensock.pending.shift();\
5231 newsock.stream.flags = listensock.stream.flags;\
5232 return newsock;\
5233 },getname:function (sock, peer) {\
5234 var addr, port;\
5235 if (peer) {\
5236 if (sock.daddr === undefined || sock.dport === undefined) {\
5237 throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN);\
5238 }\
5239 addr = sock.daddr;\
5240 port = sock.dport;\
5241 } else {\
5242 // TODO saddr and sport will be set for bind()'d UDP sockets, but what\
5243 // should we be returning for TCP sockets that've been connect()'d?\
5244 addr = sock.saddr || 0;\
5245 port = sock.sport || 0;\
5246 }\
5247 return { addr: addr, port: port };\
5248 },sendmsg:function (sock, buffer, offset, length, addr, port) {\
5249 if (sock.type === 2) {\
5250 // connection-less sockets will honor the message address,\
5251 // and otherwise fall back to the bound destination address\
5252 if (addr === undefined || port === undefined) {\
5253 addr = sock.daddr;\
5254 port = sock.dport;\
5255 }\
5256 // if there was no address to fall back to, error out\
5257 if (addr === undefined || port === undefined) {\
5258 throw new FS.ErrnoError(ERRNO_CODES.EDESTADDRREQ);\
5259 }\
5260 } else {\
5261 // connection-based sockets will only use the bound\
5262 addr = sock.daddr;\
5263 port = sock.dport;\
5264 }\
5265 // find the peer for the destination address\
5266 var dest = SOCKFS.websocket_sock_ops.getPeer(sock, addr, port);\
5267 // early out if not connected with a connection-based socket\
5268 if (sock.type === 1) {\
5269 if (!dest || dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) {\
5270 throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN);\
5271 } else if (dest.socket.readyState === dest.socket.CONNECTING) {\
5272 throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);\
5273 }\
5274 }\
5275 // create a copy of the incoming data to send, as the WebSocket API\
5276 // doesn't work entirely with an ArrayBufferView, it'll just send\
5277 // the entire underlying buffer\
5278 var data;\
5279 if (buffer instanceof Array || buffer instanceof ArrayBuffer) {\
5280 data = buffer.slice(offset, offset + length);\
5281 } else { // ArrayBufferView\
5282 data = buffer.buffer.slice(buffer.byteOffset + offset, buffer.byteOffset + offset + length);\
5283 }\
5284 // if we're emulating a connection-less dgram socket and don't have\
5285 // a cached connection, queue the buffer to send upon connect and\
5286 // lie, saying the data was sent now.\
5287 if (sock.type === 2) {\
5288 if (!dest || dest.socket.readyState !== dest.socket.OPEN) {\
5289 // if we're not connected, open a new connection\
5290 if (!dest || dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) {\
5291 dest = SOCKFS.websocket_sock_ops.createPeer(sock, addr, port);\
5292 }\
5293 dest.dgram_send_queue.push(data);\
5294 return length;\
5295 }\
5296 }\
5297 try {\
5298 // send the actual data\
5299 dest.socket.send(data);\
5300 return length;\
5301 } catch (e) {\
5302 throw new FS.ErrnoError(ERRNO_CODES.EINVAL);\
5303 }\
5304 },recvmsg:function (sock, length) {\
5305 // http://pubs.opengroup.org/onlinepubs/7908799/xns/recvmsg.html\
5306 if (sock.type === 1 && sock.server) {\
5307 // tcp servers should not be recv()'ing on the listen socket\
5308 throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN);\
5309 }\
5310 var queued = sock.recv_queue.shift();\
5311 if (!queued) {\
5312 if (sock.type === 1) {\
5313 var dest = SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport);\
5314 if (!dest) {\
5315 // if we have a destination address but are not connected, error out\
5316 throw new FS.ErrnoError(ERRNO_CODES.ENOTCONN);\
5317 }\
5318 else if (dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) {\
5319 // return null if the socket has closed\
5320 return null;\
5321 }\
5322 else {\
5323 // else, our socket is in a valid state but truly has nothing available\
5324 throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);\
5325 }\
5326 } else {\
5327 throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);\
5328 }\
5329 }\
5330 // queued.data will be an ArrayBuffer if it's unadulterated, but if it's\
5331 // requeued TCP data it'll be an ArrayBufferView\
5332 var queuedLength = queued.data.byteLength || queued.data.length;\
5333 var queuedOffset = queued.data.byteOffset || 0;\
5334 var queuedBuffer = queued.data.buffer || queued.data;\
5335 var bytesRead = Math.min(length, queuedLength);\
5336 var res = {\
5337 buffer: new Uint8Array(queuedBuffer, queuedOffset, bytesRead),\
5338 addr: queued.addr,\
5339 port: queued.port\
5340 };\
5341 // push back any unread data for TCP connections\
5342 if (sock.type === 1 && bytesRead < queuedLength) {\
5343 var bytesRemaining = queuedLength - bytesRead;\
5344 queued.data = new Uint8Array(queuedBuffer, queuedOffset + bytesRead, bytesRemaining);\
5345 sock.recv_queue.unshift(queued);\
5346 }\
5347 return res;\
5348 }}};function _send(fd, buf, len, flags) {\
5349 var sock = SOCKFS.getSocket(fd);\
5350 if (!sock) {\
5351 ___setErrNo(ERRNO_CODES.EBADF);\
5352 return -1;\
5353 }\
5354 // TODO honor flags\
5355 return _write(fd, buf, len);\
5356 }\
5357 function _pwrite(fildes, buf, nbyte, offset) {\
5358 // ssize_t pwrite(int fildes, const void *buf, size_t nbyte, off_t offset);\
5359 // http://pubs.opengroup.org/onlinepubs/000095399/functions/write.html\
5360 var stream = FS.getStream(fildes);\
5361 if (!stream) {\
5362 ___setErrNo(ERRNO_CODES.EBADF);\
5363 return -1;\
5364 }\
5365 try {\
5366 var slab = HEAP8;\
5367 return FS.write(stream, slab, buf, nbyte, offset);\
5368 } catch (e) {\
5369 FS.handleFSError(e);\
5370 return -1;\
5371 }\
5372 }function _write(fildes, buf, nbyte) {\
5373 // ssize_t write(int fildes, const void *buf, size_t nbyte);\
5374 // http://pubs.opengroup.org/onlinepubs/000095399/functions/write.html\
5375 var stream = FS.getStream(fildes);\
5376 if (!stream) {\
5377 ___setErrNo(ERRNO_CODES.EBADF);\
5378 return -1;\
5379 }\
5380 try {\
5381 var slab = HEAP8;\
5382 return FS.write(stream, slab, buf, nbyte);\
5383 } catch (e) {\
5384 FS.handleFSError(e);\
5385 return -1;\
5386 }\
5387 }function _fputc(c, stream) {\
5388 // int fputc(int c, FILE *stream);\
5389 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fputc.html\
5390 var chr = unSign(c & 0xFF);\
5391 HEAP8[((_fputc.ret)|0)]=chr\
5392 var ret = _write(stream, _fputc.ret, 1);\
5393 if (ret == -1) {\
5394 var streamObj = FS.getStream(stream);\
5395 if (streamObj) streamObj.error = true;\
5396 return -1;\
5397 } else {\
5398 return chr;\
5399 }\
5400 }function _putchar(c) {\
5401 // int putchar(int c);\
5402 // http://pubs.opengroup.org/onlinepubs/000095399/functions/putchar.html\
5403 return _fputc(c, HEAP32[((_stdout)>>2)]);\
5404 } \
5405 Module[\"_saveSetjmp\"] = _saveSetjmp;\
5406 Module[\"_testSetjmp\"] = _testSetjmp;function _longjmp(env, value) {\
5407 asm['setThrew'](env, value || 1);\
5408 throw 'longjmp';\
5409 }\
5410 function __exit(status) {\
5411 // void _exit(int status);\
5412 // http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html\
5413 Module.print('exit(' + status + ') called');\
5414 Module['exit'](status);\
5415 }function _exit(status) {\
5416 __exit(status);\
5417 }\
5418 var _setjmp=undefined;\
5419 Module[\"_memset\"] = _memset;var _llvm_memset_p0i8_i64=_memset;\
5420 function _iscntrl(chr) {\
5421 return (0 <= chr && chr <= 0x1F) || chr === 0x7F;\
5422 }\
5423 function _isspace(chr) {\
5424 return (chr == 32) || (chr >= 9 && chr <= 13);\
5425 }\
5426 function _isalpha(chr) {\
5427 return (chr >= 97 && chr <= 122) ||\
5428 (chr >= 65 && chr <= 90);\
5429 }\
5430 function _isalnum(chr) {\
5431 return (chr >= 48 && chr <= 57) ||\
5432 (chr >= 97 && chr <= 122) ||\
5433 (chr >= 65 && chr <= 90);\
5434 }\
5435 function _localeconv() {\
5436 // %struct.timeval = type { char* decimal point, other stuff... }\
5437 // var indexes = Runtime.calculateStructAlignment({ fields: ['i32', 'i32'] });\
5438 var me = _localeconv;\
5439 if (!me.ret) {\
5440 me.ret = allocate([allocate(intArrayFromString('.'), 'i8', ALLOC_NORMAL)], 'i8*', ALLOC_NORMAL); // just decimal point, for now\
5441 }\
5442 return me.ret;\
5443 }\
5444 function _memchr(ptr, chr, num) {\
5445 chr = unSign(chr);\
5446 for (var i = 0; i < num; i++) {\
5447 if (HEAP8[(ptr)] == chr) return ptr;\
5448 ptr++;\
5449 }\
5450 return 0;\
5451 }\
5452 function __parseInt(str, endptr, base, min, max, bits, unsign) {\
5453 // Skip space.\
5454 while (_isspace(HEAP8[(str)])) str++;\
5455 // Check for a plus/minus sign.\
5456 var multiplier = 1;\
5457 if (HEAP8[(str)] == 45) {\
5458 multiplier = -1;\
5459 str++;\
5460 } else if (HEAP8[(str)] == 43) {\
5461 str++;\
5462 }\
5463 // Find base.\
5464 var finalBase = base;\
5465 if (!finalBase) {\
5466 if (HEAP8[(str)] == 48) {\
5467 if (HEAP8[((str+1)|0)] == 120 ||\
5468 HEAP8[((str+1)|0)] == 88) {\
5469 finalBase = 16;\
5470 str += 2;\
5471 } else {\
5472 finalBase = 8;\
5473 str++;\
5474 }\
5475 }\
5476 } else if (finalBase==16) {\
5477 if (HEAP8[(str)] == 48) {\
5478 if (HEAP8[((str+1)|0)] == 120 ||\
5479 HEAP8[((str+1)|0)] == 88) {\
5480 str += 2;\
5481 }\
5482 }\
5483 }\
5484 if (!finalBase) finalBase = 10;\
5485 // Get digits.\
5486 var chr;\
5487 var ret = 0;\
5488 while ((chr = HEAP8[(str)]) != 0) {\
5489 var digit = parseInt(String.fromCharCode(chr), finalBase);\
5490 if (isNaN(digit)) {\
5491 break;\
5492 } else {\
5493 ret = ret * finalBase + digit;\
5494 str++;\
5495 }\
5496 }\
5497 // Apply sign.\
5498 ret *= multiplier;\
5499 // Set end pointer.\
5500 if (endptr) {\
5501 HEAP32[((endptr)>>2)]=str\
5502 }\
5503 // Unsign if needed.\
5504 if (unsign) {\
5505 if (Math.abs(ret) > max) {\
5506 ret = max;\
5507 ___setErrNo(ERRNO_CODES.ERANGE);\
5508 } else {\
5509 ret = unSign(ret, bits);\
5510 }\
5511 }\
5512 // Validate range.\
5513 if (ret > max || ret < min) {\
5514 ret = ret > max ? max : min;\
5515 ___setErrNo(ERRNO_CODES.ERANGE);\
5516 }\
5517 if (bits == 64) {\
5518 return ((asm[\"setTempRet0\"]((tempDouble=ret,(+(Math.abs(tempDouble))) >= (+(1)) ? (tempDouble > (+(0)) ? ((Math.min((+(Math.floor((tempDouble)/(+(4294967296))))), (+(4294967295))))|0)>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/(+(4294967296)))))))>>>0) : 0)),ret>>>0)|0);\
5519 }\
5520 return ret;\
5521 }function _strtoul(str, endptr, base) {\
5522 return __parseInt(str, endptr, base, 0, 4294967295, 32, true); // ULONG_MAX.\
5523 }\
5524 function __reallyNegative(x) {\
5525 return x < 0 || (x === 0 && (1/x) === -Infinity);\
5526 }function __formatString(format, varargs) {\
5527 var textIndex = format;\
5528 var argIndex = 0;\
5529 function getNextArg(type) {\
5530 // NOTE: Explicitly ignoring type safety. Otherwise this fails:\
5531 // int x = 4; printf(\"%c\\n\", (char)x);\
5532 var ret;\
5533 if (type === 'double') {\
5534 ret = HEAPF64[(((varargs)+(argIndex))>>3)];\
5535 } else if (type == 'i64') {\
5536 ret = [HEAP32[(((varargs)+(argIndex))>>2)],\
5537 HEAP32[(((varargs)+(argIndex+8))>>2)]];\
5538 argIndex += 8; // each 32-bit chunk is in a 64-bit block\
5539 } else {\
5540 type = 'i32'; // varargs are always i32, i64, or double\
5541 ret = HEAP32[(((varargs)+(argIndex))>>2)];\
5542 }\
5543 argIndex += Math.max(Runtime.getNativeFieldSize(type), Runtime.getAlignSize(type, null, true));\
5544 return ret;\
5545 }\
5546 var ret = [];\
5547 var curr, next, currArg;\
5548 while(1) {\
5549 var startTextIndex = textIndex;\
5550 curr = HEAP8[(textIndex)];\
5551 if (curr === 0) break;\
5552 next = HEAP8[((textIndex+1)|0)];\
5553 if (curr == 37) {\
5554 // Handle flags.\
5555 var flagAlwaysSigned = false;\
5556 var flagLeftAlign = false;\
5557 var flagAlternative = false;\
5558 var flagZeroPad = false;\
5559 flagsLoop: while (1) {\
5560 switch (next) {\
5561 case 43:\
5562 flagAlwaysSigned = true;\
5563 break;\
5564 case 45:\
5565 flagLeftAlign = true;\
5566 break;\
5567 case 35:\
5568 flagAlternative = true;\
5569 break;\
5570 case 48:\
5571 if (flagZeroPad) {\
5572 break flagsLoop;\
5573 } else {\
5574 flagZeroPad = true;\
5575 break;\
5576 }\
5577 default:\
5578 break flagsLoop;\
5579 }\
5580 textIndex++;\
5581 next = HEAP8[((textIndex+1)|0)];\
5582 }\
5583 // Handle width.\
5584 var width = 0;\
5585 if (next == 42) {\
5586 width = getNextArg('i32');\
5587 textIndex++;\
5588 next = HEAP8[((textIndex+1)|0)];\
5589 } else {\
5590 while (next >= 48 && next <= 57) {\
5591 width = width * 10 + (next - 48);\
5592 textIndex++;\
5593 next = HEAP8[((textIndex+1)|0)];\
5594 }\
5595 }\
5596 // Handle precision.\
5597 var precisionSet = false;\
5598 if (next == 46) {\
5599 var precision = 0;\
5600 precisionSet = true;\
5601 textIndex++;\
5602 next = HEAP8[((textIndex+1)|0)];\
5603 if (next == 42) {\
5604 precision = getNextArg('i32');\
5605 textIndex++;\
5606 } else {\
5607 while(1) {\
5608 var precisionChr = HEAP8[((textIndex+1)|0)];\
5609 if (precisionChr < 48 ||\
5610 precisionChr > 57) break;\
5611 precision = precision * 10 + (precisionChr - 48);\
5612 textIndex++;\
5613 }\
5614 }\
5615 next = HEAP8[((textIndex+1)|0)];\
5616 } else {\
5617 var precision = 6; // Standard default.\
5618 }\
5619 // Handle integer sizes. WARNING: These assume a 32-bit architecture!\
5620 var argSize;\
5621 switch (String.fromCharCode(next)) {\
5622 case 'h':\
5623 var nextNext = HEAP8[((textIndex+2)|0)];\
5624 if (nextNext == 104) {\
5625 textIndex++;\
5626 argSize = 1; // char (actually i32 in varargs)\
5627 } else {\
5628 argSize = 2; // short (actually i32 in varargs)\
5629 }\
5630 break;\
5631 case 'l':\
5632 var nextNext = HEAP8[((textIndex+2)|0)];\
5633 if (nextNext == 108) {\
5634 textIndex++;\
5635 argSize = 8; // long long\
5636 } else {\
5637 argSize = 4; // long\
5638 }\
5639 break;\
5640 case 'L': // long long\
5641 case 'q': // int64_t\
5642 case 'j': // intmax_t\
5643 argSize = 8;\
5644 break;\
5645 case 'z': // size_t\
5646 case 't': // ptrdiff_t\
5647 case 'I': // signed ptrdiff_t or unsigned size_t\
5648 argSize = 4;\
5649 break;\
5650 default:\
5651 argSize = null;\
5652 }\
5653 if (argSize) textIndex++;\
5654 next = HEAP8[((textIndex+1)|0)];\
5655 // Handle type specifier.\
5656 switch (String.fromCharCode(next)) {\
5657 case 'd': case 'i': case 'u': case 'o': case 'x': case 'X': case 'p': {\
5658 // Integer.\
5659 var signed = next == 100 || next == 105;\
5660 argSize = argSize || 4;\
5661 var currArg = getNextArg('i' + (argSize * 8));\
5662 var origArg = currArg;\
5663 var argText;\
5664 // Flatten i64-1 [low, high] into a (slightly rounded) double\
5665 if (argSize == 8) {\
5666 currArg = Runtime.makeBigInt(currArg[0], currArg[1], next == 117);\
5667 }\
5668 // Truncate to requested size.\
5669 if (argSize <= 4) {\
5670 var limit = Math.pow(256, argSize) - 1;\
5671 currArg = (signed ? reSign : unSign)(currArg & limit, argSize * 8);\
5672 }\
5673 // Format the number.\
5674 var currAbsArg = Math.abs(currArg);\
5675 var prefix = '';\
5676 if (next == 100 || next == 105) {\
5677 if (argSize == 8 && i64Math) argText = i64Math.stringify(origArg[0], origArg[1], null); else\
5678 argText = reSign(currArg, 8 * argSize, 1).toString(10);\
5679 } else if (next == 117) {\
5680 if (argSize == 8 && i64Math) argText = i64Math.stringify(origArg[0], origArg[1], true); else\
5681 argText = unSign(currArg, 8 * argSize, 1).toString(10);\
5682 currArg = Math.abs(currArg);\
5683 } else if (next == 111) {\
5684 argText = (flagAlternative ? '0' : '') + currAbsArg.toString(8);\
5685 } else if (next == 120 || next == 88) {\
5686 prefix = (flagAlternative && currArg != 0) ? '0x' : '';\
5687 if (argSize == 8 && i64Math) {\
5688 if (origArg[1]) {\
5689 argText = (origArg[1]>>>0).toString(16);\
5690 var lower = (origArg[0]>>>0).toString(16);\
5691 while (lower.length < 8) lower = '0' + lower;\
5692 argText += lower;\
5693 } else {\
5694 argText = (origArg[0]>>>0).toString(16);\
5695 }\
5696 } else\
5697 if (currArg < 0) {\
5698 // Represent negative numbers in hex as 2's complement.\
5699 currArg = -currArg;\
5700 argText = (currAbsArg - 1).toString(16);\
5701 var buffer = [];\
5702 for (var i = 0; i < argText.length; i++) {\
5703 buffer.push((0xF - parseInt(argText[i], 16)).toString(16));\
5704 }\
5705 argText = buffer.join('');\
5706 while (argText.length < argSize * 2) argText = 'f' + argText;\
5707 } else {\
5708 argText = currAbsArg.toString(16);\
5709 }\
5710 if (next == 88) {\
5711 prefix = prefix.toUpperCase();\
5712 argText = argText.toUpperCase();\
5713 }\
5714 } else if (next == 112) {\
5715 if (currAbsArg === 0) {\
5716 argText = '(nil)';\
5717 } else {\
5718 prefix = '0x';\
5719 argText = currAbsArg.toString(16);\
5720 }\
5721 }\
5722 if (precisionSet) {\
5723 while (argText.length < precision) {\
5724 argText = '0' + argText;\
5725 }\
5726 }\
5727 // Add sign if needed\
5728 if (flagAlwaysSigned) {\
5729 if (currArg < 0) {\
5730 prefix = '-' + prefix;\
5731 } else {\
5732 prefix = '+' + prefix;\
5733 }\
5734 }\
5735 // Add padding.\
5736 while (prefix.length + argText.length < width) {\
5737 if (flagLeftAlign) {\
5738 argText += ' ';\
5739 } else {\
5740 if (flagZeroPad) {\
5741 argText = '0' + argText;\
5742 } else {\
5743 prefix = ' ' + prefix;\
5744 }\
5745 }\
5746 }\
5747 // Insert the result into the buffer.\
5748 argText = prefix + argText;\
5749 argText.split('').forEach(function(chr) {\
5750 ret.push(chr.charCodeAt(0));\
5751 });\
5752 break;\
5753 }\
5754 case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': {\
5755 // Float.\
5756 var currArg = getNextArg('double');\
5757 var argText;\
5758 if (isNaN(currArg)) {\
5759 argText = 'nan';\
5760 flagZeroPad = false;\
5761 } else if (!isFinite(currArg)) {\
5762 argText = (currArg < 0 ? '-' : '') + 'inf';\
5763 flagZeroPad = false;\
5764 } else {\
5765 var isGeneral = false;\
5766 var effectivePrecision = Math.min(precision, 20);\
5767 // Convert g/G to f/F or e/E, as per:\
5768 // http://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html\
5769 if (next == 103 || next == 71) {\
5770 isGeneral = true;\
5771 precision = precision || 1;\
5772 var exponent = parseInt(currArg.toExponential(effectivePrecision).split('e')[1], 10);\
5773 if (precision > exponent && exponent >= -4) {\
5774 next = ((next == 103) ? 'f' : 'F').charCodeAt(0);\
5775 precision -= exponent + 1;\
5776 } else {\
5777 next = ((next == 103) ? 'e' : 'E').charCodeAt(0);\
5778 precision--;\
5779 }\
5780 effectivePrecision = Math.min(precision, 20);\
5781 }\
5782 if (next == 101 || next == 69) {\
5783 argText = currArg.toExponential(effectivePrecision);\
5784 // Make sure the exponent has at least 2 digits.\
5785 if (/[eE][-+]\\d$/.test(argText)) {\
5786 argText = argText.slice(0, -1) + '0' + argText.slice(-1);\
5787 }\
5788 } else if (next == 102 || next == 70) {\
5789 argText = currArg.toFixed(effectivePrecision);\
5790 if (currArg === 0 && __reallyNegative(currArg)) {\
5791 argText = '-' + argText;\
5792 }\
5793 }\
5794 var parts = argText.split('e');\
5795 if (isGeneral && !flagAlternative) {\
5796 // Discard trailing zeros and periods.\
5797 while (parts[0].length > 1 && parts[0].indexOf('.') != -1 &&\
5798 (parts[0].slice(-1) == '0' || parts[0].slice(-1) == '.')) {\
5799 parts[0] = parts[0].slice(0, -1);\
5800 }\
5801 } else {\
5802 // Make sure we have a period in alternative mode.\
5803 if (flagAlternative && argText.indexOf('.') == -1) parts[0] += '.';\
5804 // Zero pad until required precision.\
5805 while (precision > effectivePrecision++) parts[0] += '0';\
5806 }\
5807 argText = parts[0] + (parts.length > 1 ? 'e' + parts[1] : '');\
5808 // Capitalize 'E' if needed.\
5809 if (next == 69) argText = argText.toUpperCase();\
5810 // Add sign.\
5811 if (flagAlwaysSigned && currArg >= 0) {\
5812 argText = '+' + argText;\
5813 }\
5814 }\
5815 // Add padding.\
5816 while (argText.length < width) {\
5817 if (flagLeftAlign) {\
5818 argText += ' ';\
5819 } else {\
5820 if (flagZeroPad && (argText[0] == '-' || argText[0] == '+')) {\
5821 argText = argText[0] + '0' + argText.slice(1);\
5822 } else {\
5823 argText = (flagZeroPad ? '0' : ' ') + argText;\
5824 }\
5825 }\
5826 }\
5827 // Adjust case.\
5828 if (next < 97) argText = argText.toUpperCase();\
5829 // Insert the result into the buffer.\
5830 argText.split('').forEach(function(chr) {\
5831 ret.push(chr.charCodeAt(0));\
5832 });\
5833 break;\
5834 }\
5835 case 's': {\
5836 // String.\
5837 var arg = getNextArg('i8*');\
5838 var argLength = arg ? _strlen(arg) : '(null)'.length;\
5839 if (precisionSet) argLength = Math.min(argLength, precision);\
5840 if (!flagLeftAlign) {\
5841 while (argLength < width--) {\
5842 ret.push(32);\
5843 }\
5844 }\
5845 if (arg) {\
5846 for (var i = 0; i < argLength; i++) {\
5847 ret.push(HEAPU8[((arg++)|0)]);\
5848 }\
5849 } else {\
5850 ret = ret.concat(intArrayFromString('(null)'.substr(0, argLength), true));\
5851 }\
5852 if (flagLeftAlign) {\
5853 while (argLength < width--) {\
5854 ret.push(32);\
5855 }\
5856 }\
5857 break;\
5858 }\
5859 case 'c': {\
5860 // Character.\
5861 if (flagLeftAlign) ret.push(getNextArg('i8'));\
5862 while (--width > 0) {\
5863 ret.push(32);\
5864 }\
5865 if (!flagLeftAlign) ret.push(getNextArg('i8'));\
5866 break;\
5867 }\
5868 case 'n': {\
5869 // Write the length written so far to the next parameter.\
5870 var ptr = getNextArg('i32*');\
5871 HEAP32[((ptr)>>2)]=ret.length\
5872 break;\
5873 }\
5874 case '%': {\
5875 // Literal percent sign.\
5876 ret.push(curr);\
5877 break;\
5878 }\
5879 default: {\
5880 // Unknown specifiers remain untouched.\
5881 for (var i = startTextIndex; i < textIndex + 2; i++) {\
5882 ret.push(HEAP8[(i)]);\
5883 }\
5884 }\
5885 }\
5886 textIndex += 2;\
5887 // TODO: Support a/A (hex float) and m (last error) specifiers.\
5888 // TODO: Support %1${specifier} for arg selection.\
5889 } else {\
5890 ret.push(curr);\
5891 textIndex += 1;\
5892 }\
5893 }\
5894 return ret;\
5895 }function _snprintf(s, n, format, varargs) {\
5896 // int snprintf(char *restrict s, size_t n, const char *restrict format, ...);\
5897 // http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html\
5898 var result = __formatString(format, varargs);\
5899 var limit = (n === undefined) ? result.length\
5900 : Math.min(result.length, Math.max(n - 1, 0));\
5901 if (s < 0) {\
5902 s = -s;\
5903 var buf = _malloc(limit+1);\
5904 HEAP32[((s)>>2)]=buf;\
5905 s = buf;\
5906 }\
5907 for (var i = 0; i < limit; i++) {\
5908 HEAP8[(((s)+(i))|0)]=result[i];\
5909 }\
5910 if (limit < n || (n === undefined)) HEAP8[(((s)+(i))|0)]=0;\
5911 return result.length;\
5912 }function _sprintf(s, format, varargs) {\
5913 // int sprintf(char *restrict s, const char *restrict format, ...);\
5914 // http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html\
5915 return _snprintf(s, undefined, format, varargs);\
5916 }\
5917 Module[\"_strncpy\"] = _strncpy;\
5918 Module[\"_strcat\"] = _strcat;\
5919 function _strcspn(pstr, pset) {\
5920 var str = pstr, set, strcurr, setcurr;\
5921 while (1) {\
5922 strcurr = HEAP8[(str)];\
5923 if (!strcurr) return str - pstr;\
5924 set = pset;\
5925 while (1) {\
5926 setcurr = HEAP8[(set)];\
5927 if (!setcurr || setcurr == strcurr) break;\
5928 set++;\
5929 }\
5930 if (setcurr) return str - pstr;\
5931 str++;\
5932 }\
5933 }\
5934 function _strncat(pdest, psrc, num) {\
5935 var len = _strlen(pdest);\
5936 var i = 0;\
5937 while(1) {\
5938 HEAP8[((pdest+len+i)|0)]=HEAP8[((psrc+i)|0)];\
5939 if (HEAP8[(((pdest)+(len+i))|0)] == 0) break;\
5940 i ++;\
5941 if (i == num) {\
5942 HEAP8[(((pdest)+(len+i))|0)]=0\
5943 break;\
5944 }\
5945 }\
5946 return pdest;\
5947 }\
5948 var _llvm_memset_p0i8_i32=_memset;\
5949 Module[\"_memcmp\"] = _memcmp;\
5950 function _strncmp(px, py, n) {\
5951 var i = 0;\
5952 while (i < n) {\
5953 var x = HEAPU8[(((px)+(i))|0)];\
5954 var y = HEAPU8[(((py)+(i))|0)];\
5955 if (x == y && x == 0) return 0;\
5956 if (x == 0) return -1;\
5957 if (y == 0) return 1;\
5958 if (x == y) {\
5959 i ++;\
5960 continue;\
5961 } else {\
5962 return x > y ? 1 : -1;\
5963 }\
5964 }\
5965 return 0;\
5966 }function _strcmp(px, py) {\
5967 return _strncmp(px, py, TOTAL_MEMORY);\
5968 }var _strcoll=_strcmp;\
5969 function _strstr(ptr1, ptr2) {\
5970 var check = 0, start;\
5971 do {\
5972 if (!check) {\
5973 start = ptr1;\
5974 check = ptr2;\
5975 }\
5976 var curr1 = HEAP8[((ptr1++)|0)];\
5977 var curr2 = HEAP8[((check++)|0)];\
5978 if (curr2 == 0) return start;\
5979 if (curr2 != curr1) {\
5980 // rewind to one character after start, to find ez in eeez\
5981 ptr1 = start + 1;\
5982 check = 0;\
5983 }\
5984 } while (curr1);\
5985 return 0;\
5986 }\
5987 var ___dirent_struct_layout={__size__:1040,d_ino:0,d_name:4,d_off:1028,d_reclen:1032,d_type:1036};function _open(path, oflag, varargs) {\
5988 // int open(const char *path, int oflag, ...);\
5989 // http://pubs.opengroup.org/onlinepubs/009695399/functions/open.html\
5990 var mode = HEAP32[((varargs)>>2)];\
5991 path = Pointer_stringify(path);\
5992 try {\
5993 var stream = FS.open(path, oflag, mode);\
5994 return stream.fd;\
5995 } catch (e) {\
5996 FS.handleFSError(e);\
5997 return -1;\
5998 }\
5999 }function _fopen(filename, mode) {\
6000 // FILE *fopen(const char *restrict filename, const char *restrict mode);\
6001 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fopen.html\
6002 var flags;\
6003 mode = Pointer_stringify(mode);\
6004 if (mode[0] == 'r') {\
6005 if (mode.indexOf('+') != -1) {\
6006 flags = 2;\
6007 } else {\
6008 flags = 0;\
6009 }\
6010 } else if (mode[0] == 'w') {\
6011 if (mode.indexOf('+') != -1) {\
6012 flags = 2;\
6013 } else {\
6014 flags = 1;\
6015 }\
6016 flags |= 512;\
6017 flags |= 1024;\
6018 } else if (mode[0] == 'a') {\
6019 if (mode.indexOf('+') != -1) {\
6020 flags = 2;\
6021 } else {\
6022 flags = 1;\
6023 }\
6024 flags |= 512;\
6025 flags |= 8;\
6026 } else {\
6027 ___setErrNo(ERRNO_CODES.EINVAL);\
6028 return 0;\
6029 }\
6030 var ret = _open(filename, flags, allocate([0x1FF, 0, 0, 0], 'i32', ALLOC_STACK)); // All creation permissions.\
6031 return (ret == -1) ? 0 : ret;\
6032 }\
6033 function _recv(fd, buf, len, flags) {\
6034 var sock = SOCKFS.getSocket(fd);\
6035 if (!sock) {\
6036 ___setErrNo(ERRNO_CODES.EBADF);\
6037 return -1;\
6038 }\
6039 // TODO honor flags\
6040 return _read(fd, buf, len);\
6041 }\
6042 function _pread(fildes, buf, nbyte, offset) {\
6043 // ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset);\
6044 // http://pubs.opengroup.org/onlinepubs/000095399/functions/read.html\
6045 var stream = FS.getStream(fildes);\
6046 if (!stream) {\
6047 ___setErrNo(ERRNO_CODES.EBADF);\
6048 return -1;\
6049 }\
6050 try {\
6051 var slab = HEAP8;\
6052 return FS.read(stream, slab, buf, nbyte, offset);\
6053 } catch (e) {\
6054 FS.handleFSError(e);\
6055 return -1;\
6056 }\
6057 }function _read(fildes, buf, nbyte) {\
6058 // ssize_t read(int fildes, void *buf, size_t nbyte);\
6059 // http://pubs.opengroup.org/onlinepubs/000095399/functions/read.html\
6060 var stream = FS.getStream(fildes);\
6061 if (!stream) {\
6062 ___setErrNo(ERRNO_CODES.EBADF);\
6063 return -1;\
6064 }\
6065 try {\
6066 var slab = HEAP8;\
6067 return FS.read(stream, slab, buf, nbyte);\
6068 } catch (e) {\
6069 FS.handleFSError(e);\
6070 return -1;\
6071 }\
6072 }function _fread(ptr, size, nitems, stream) {\
6073 // size_t fread(void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream);\
6074 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fread.html\
6075 var bytesToRead = nitems * size;\
6076 if (bytesToRead == 0) {\
6077 return 0;\
6078 }\
6079 var bytesRead = 0;\
6080 var streamObj = FS.getStream(stream);\
6081 while (streamObj.ungotten.length && bytesToRead > 0) {\
6082 HEAP8[((ptr++)|0)]=streamObj.ungotten.pop()\
6083 bytesToRead--;\
6084 bytesRead++;\
6085 }\
6086 var err = _read(stream, ptr, bytesToRead);\
6087 if (err == -1) {\
6088 if (streamObj) streamObj.error = true;\
6089 return 0;\
6090 }\
6091 bytesRead += err;\
6092 if (bytesRead < bytesToRead) streamObj.eof = true;\
6093 return Math.floor(bytesRead / size);\
6094 }function _fgetc(stream) {\
6095 // int fgetc(FILE *stream);\
6096 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fgetc.html\
6097 var streamObj = FS.getStream(stream);\
6098 if (!streamObj) return -1;\
6099 if (streamObj.eof || streamObj.error) return -1;\
6100 var ret = _fread(_fgetc.ret, 1, 1, stream);\
6101 if (ret == 0) {\
6102 return -1;\
6103 } else if (ret == -1) {\
6104 streamObj.error = true;\
6105 return -1;\
6106 } else {\
6107 return HEAPU8[((_fgetc.ret)|0)];\
6108 }\
6109 }var _getc=_fgetc;\
6110 function _close(fildes) {\
6111 // int close(int fildes);\
6112 // http://pubs.opengroup.org/onlinepubs/000095399/functions/close.html\
6113 var stream = FS.getStream(fildes);\
6114 if (!stream) {\
6115 ___setErrNo(ERRNO_CODES.EBADF);\
6116 return -1;\
6117 }\
6118 try {\
6119 FS.close(stream);\
6120 return 0;\
6121 } catch (e) {\
6122 FS.handleFSError(e);\
6123 return -1;\
6124 }\
6125 }\
6126 function _fsync(fildes) {\
6127 // int fsync(int fildes);\
6128 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fsync.html\
6129 var stream = FS.getStream(fildes);\
6130 if (stream) {\
6131 // We write directly to the file system, so there's nothing to do here.\
6132 return 0;\
6133 } else {\
6134 ___setErrNo(ERRNO_CODES.EBADF);\
6135 return -1;\
6136 }\
6137 }function _fclose(stream) {\
6138 // int fclose(FILE *stream);\
6139 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fclose.html\
6140 _fsync(stream);\
6141 return _close(stream);\
6142 }function _freopen(filename, mode, stream) {\
6143 // FILE *freopen(const char *restrict filename, const char *restrict mode, FILE *restrict stream);\
6144 // http://pubs.opengroup.org/onlinepubs/000095399/functions/freopen.html\
6145 if (!filename) {\
6146 var streamObj = FS.getStream(stream);\
6147 if (!streamObj) {\
6148 ___setErrNo(ERRNO_CODES.EBADF);\
6149 return 0;\
6150 }\
6151 if (_freopen.buffer) _free(_freopen.buffer);\
6152 filename = intArrayFromString(streamObj.path);\
6153 filename = allocate(filename, 'i8', ALLOC_NORMAL);\
6154 }\
6155 _fclose(stream);\
6156 return _fopen(filename, mode);\
6157 }\
6158 function _ungetc(c, stream) {\
6159 // int ungetc(int c, FILE *stream);\
6160 // http://pubs.opengroup.org/onlinepubs/000095399/functions/ungetc.html\
6161 stream = FS.getStream(stream);\
6162 if (!stream) {\
6163 return -1;\
6164 }\
6165 if (c === -1) {\
6166 // do nothing for EOF character\
6167 return c;\
6168 }\
6169 c = unSign(c & 0xFF);\
6170 stream.ungotten.push(c);\
6171 stream.eof = false;\
6172 return c;\
6173 }\
6174 function _ferror(stream) {\
6175 // int ferror(FILE *stream);\
6176 // http://pubs.opengroup.org/onlinepubs/000095399/functions/ferror.html\
6177 stream = FS.getStream(stream);\
6178 return Number(stream && stream.error);\
6179 }\
6180 function _fwrite(ptr, size, nitems, stream) {\
6181 // size_t fwrite(const void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream);\
6182 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fwrite.html\
6183 var bytesToWrite = nitems * size;\
6184 if (bytesToWrite == 0) return 0;\
6185 var bytesWritten = _write(stream, ptr, bytesToWrite);\
6186 if (bytesWritten == -1) {\
6187 var streamObj = FS.getStream(stream);\
6188 if (streamObj) streamObj.error = true;\
6189 return 0;\
6190 } else {\
6191 return Math.floor(bytesWritten / size);\
6192 }\
6193 }function _fprintf(stream, format, varargs) {\
6194 // int fprintf(FILE *restrict stream, const char *restrict format, ...);\
6195 // http://pubs.opengroup.org/onlinepubs/000095399/functions/printf.html\
6196 var result = __formatString(format, varargs);\
6197 var stack = Runtime.stackSave();\
6198 var ret = _fwrite(allocate(result, 'i8', ALLOC_STACK), 1, result.length, stream);\
6199 Runtime.stackRestore(stack);\
6200 return ret;\
6201 }\
6202 function _feof(stream) {\
6203 // int feof(FILE *stream);\
6204 // http://pubs.opengroup.org/onlinepubs/000095399/functions/feof.html\
6205 stream = FS.getStream(stream);\
6206 return Number(stream && stream.eof);\
6207 }\
6208 function _strerror_r(errnum, strerrbuf, buflen) {\
6209 if (errnum in ERRNO_MESSAGES) {\
6210 if (ERRNO_MESSAGES[errnum].length > buflen - 1) {\
6211 return ___setErrNo(ERRNO_CODES.ERANGE);\
6212 } else {\
6213 var msg = ERRNO_MESSAGES[errnum];\
6214 for (var i = 0; i < msg.length; i++) {\
6215 HEAP8[(((strerrbuf)+(i))|0)]=msg.charCodeAt(i)\
6216 }\
6217 HEAP8[(((strerrbuf)+(i))|0)]=0\
6218 return 0;\
6219 }\
6220 } else {\
6221 return ___setErrNo(ERRNO_CODES.EINVAL);\
6222 }\
6223 }function _strerror(errnum) {\
6224 if (!_strerror.buffer) _strerror.buffer = _malloc(256);\
6225 _strerror_r(errnum, _strerror.buffer, 256);\
6226 return _strerror.buffer;\
6227 }\
6228 function ___errno_location() {\
6229 return ___errno_state;\
6230 }var ___errno=___errno_location;\
6231 function _fputs(s, stream) {\
6232 // int fputs(const char *restrict s, FILE *restrict stream);\
6233 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fputs.html\
6234 return _write(stream, s, _strlen(s));\
6235 }\
6236 function _fgets(s, n, stream) {\
6237 // char *fgets(char *restrict s, int n, FILE *restrict stream);\
6238 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fgets.html\
6239 var streamObj = FS.getStream(stream);\
6240 if (!streamObj) return 0;\
6241 if (streamObj.error || streamObj.eof) return 0;\
6242 var byte_;\
6243 for (var i = 0; i < n - 1 && byte_ != 10; i++) {\
6244 byte_ = _fgetc(stream);\
6245 if (byte_ == -1) {\
6246 if (streamObj.error || (streamObj.eof && i == 0)) return 0;\
6247 else if (streamObj.eof) break;\
6248 }\
6249 HEAP8[(((s)+(i))|0)]=byte_\
6250 }\
6251 HEAP8[(((s)+(i))|0)]=0\
6252 return s;\
6253 }\
6254 function _tmpnam(s, dir, prefix) {\
6255 // char *tmpnam(char *s);\
6256 // http://pubs.opengroup.org/onlinepubs/000095399/functions/tmpnam.html\
6257 // NOTE: The dir and prefix arguments are for internal use only.\
6258 var folder = FS.findObject(dir || '/tmp');\
6259 if (!folder || !folder.isFolder) {\
6260 dir = '/tmp';\
6261 folder = FS.findObject(dir);\
6262 if (!folder || !folder.isFolder) return 0;\
6263 }\
6264 var name = prefix || 'file';\
6265 do {\
6266 name += String.fromCharCode(65 + Math.floor(Math.random() * 25));\
6267 } while (name in folder.contents);\
6268 var result = dir + '/' + name;\
6269 if (!_tmpnam.buffer) _tmpnam.buffer = _malloc(256);\
6270 if (!s) s = _tmpnam.buffer;\
6271 for (var i = 0; i < result.length; i++) {\
6272 HEAP8[(((s)+(i))|0)]=result.charCodeAt(i);\
6273 }\
6274 HEAP8[(((s)+(i))|0)]=0;\
6275 return s;\
6276 }function _tmpfile() {\
6277 // FILE *tmpfile(void);\
6278 // http://pubs.opengroup.org/onlinepubs/000095399/functions/tmpfile.html\
6279 // TODO: Delete the created file on closing.\
6280 if (_tmpfile.mode) {\
6281 _tmpfile.mode = allocate(intArrayFromString('w+'), 'i8', ALLOC_NORMAL);\
6282 }\
6283 return _fopen(_tmpnam(0), _tmpfile.mode);\
6284 }\
6285 function _clearerr(stream) {\
6286 // void clearerr(FILE *stream);\
6287 // http://pubs.opengroup.org/onlinepubs/000095399/functions/clearerr.html\
6288 stream = FS.getStream(stream);\
6289 if (!stream) {\
6290 return;\
6291 }\
6292 stream.eof = false;\
6293 stream.error = false;\
6294 }\
6295 function __isFloat(text) {\
6296 return !!(/^[+-]?[0-9]*\\.?[0-9]+([eE][+-]?[0-9]+)?$/.exec(text));\
6297 }function __scanString(format, get, unget, varargs) {\
6298 if (!__scanString.whiteSpace) {\
6299 __scanString.whiteSpace = {};\
6300 __scanString.whiteSpace[32] = 1;\
6301 __scanString.whiteSpace[9] = 1;\
6302 __scanString.whiteSpace[10] = 1;\
6303 __scanString.whiteSpace[11] = 1;\
6304 __scanString.whiteSpace[12] = 1;\
6305 __scanString.whiteSpace[13] = 1;\
6306 __scanString.whiteSpace[' '] = 1;\
6307 __scanString.whiteSpace['\\t'] = 1;\
6308 __scanString.whiteSpace['\\n'] = 1;\
6309 __scanString.whiteSpace['\\v'] = 1;\
6310 __scanString.whiteSpace['\\f'] = 1;\
6311 __scanString.whiteSpace['\\r'] = 1;\
6312 }\
6313 // Supports %x, %4x, %d.%d, %lld, %s, %f, %lf.\
6314 // TODO: Support all format specifiers.\
6315 format = Pointer_stringify(format);\
6316 var soFar = 0;\
6317 if (format.indexOf('%n') >= 0) {\
6318 // need to track soFar\
6319 var _get = get;\
6320 get = function() {\
6321 soFar++;\
6322 return _get();\
6323 }\
6324 var _unget = unget;\
6325 unget = function() {\
6326 soFar--;\
6327 return _unget();\
6328 }\
6329 }\
6330 var formatIndex = 0;\
6331 var argsi = 0;\
6332 var fields = 0;\
6333 var argIndex = 0;\
6334 var next;\
6335 mainLoop:\
6336 for (var formatIndex = 0; formatIndex < format.length;) {\
6337 if (format[formatIndex] === '%' && format[formatIndex+1] == 'n') {\
6338 var argPtr = HEAP32[(((varargs)+(argIndex))>>2)];\
6339 argIndex += Runtime.getAlignSize('void*', null, true);\
6340 HEAP32[((argPtr)>>2)]=soFar;\
6341 formatIndex += 2;\
6342 continue;\
6343 }\
6344 if (format[formatIndex] === '%') {\
6345 var nextC = format.indexOf('c', formatIndex+1);\
6346 if (nextC > 0) {\
6347 var maxx = 1;\
6348 if (nextC > formatIndex+1) {\
6349 var sub = format.substring(formatIndex+1, nextC)\
6350 maxx = parseInt(sub);\
6351 if (maxx != sub) maxx = 0;\
6352 }\
6353 if (maxx) {\
6354 var argPtr = HEAP32[(((varargs)+(argIndex))>>2)];\
6355 argIndex += Runtime.getAlignSize('void*', null, true);\
6356 fields++;\
6357 for (var i = 0; i < maxx; i++) {\
6358 next = get();\
6359 HEAP8[((argPtr++)|0)]=next;\
6360 }\
6361 formatIndex += nextC - formatIndex + 1;\
6362 continue;\
6363 }\
6364 }\
6365 }\
6366 // remove whitespace\
6367 while (1) {\
6368 next = get();\
6369 if (next == 0) return fields;\
6370 if (!(next in __scanString.whiteSpace)) break;\
6371 }\
6372 unget();\
6373 if (format[formatIndex] === '%') {\
6374 formatIndex++;\
6375 var suppressAssignment = false;\
6376 if (format[formatIndex] == '*') {\
6377 suppressAssignment = true;\
6378 formatIndex++;\
6379 }\
6380 var maxSpecifierStart = formatIndex;\
6381 while (format[formatIndex].charCodeAt(0) >= 48 &&\
6382 format[formatIndex].charCodeAt(0) <= 57) {\
6383 formatIndex++;\
6384 }\
6385 var max_;\
6386 if (formatIndex != maxSpecifierStart) {\
6387 max_ = parseInt(format.slice(maxSpecifierStart, formatIndex), 10);\
6388 }\
6389 var long_ = false;\
6390 var half = false;\
6391 var longLong = false;\
6392 if (format[formatIndex] == 'l') {\
6393 long_ = true;\
6394 formatIndex++;\
6395 if (format[formatIndex] == 'l') {\
6396 longLong = true;\
6397 formatIndex++;\
6398 }\
6399 } else if (format[formatIndex] == 'h') {\
6400 half = true;\
6401 formatIndex++;\
6402 }\
6403 var type = format[formatIndex];\
6404 formatIndex++;\
6405 var curr = 0;\
6406 var buffer = [];\
6407 // Read characters according to the format. floats are trickier, they may be in an unfloat state in the middle, then be a valid float later\
6408 if (type == 'f' || type == 'e' || type == 'g' ||\
6409 type == 'F' || type == 'E' || type == 'G') {\
6410 var last = 0;\
6411 next = get();\
6412 while (next > 0) {\
6413 buffer.push(String.fromCharCode(next));\
6414 if (__isFloat(buffer.join(''))) {\
6415 last = buffer.length;\
6416 }\
6417 next = get();\
6418 }\
6419 for (var i = 0; i < buffer.length - last + 1; i++) {\
6420 unget();\
6421 }\
6422 buffer.length = last;\
6423 } else {\
6424 next = get();\
6425 var first = true;\
6426 while ((curr < max_ || isNaN(max_)) && next > 0) {\
6427 if (!(next in __scanString.whiteSpace) && // stop on whitespace\
6428 (type == 's' ||\
6429 ((type === 'd' || type == 'u' || type == 'i') && ((next >= 48 && next <= 57) ||\
6430 (first && next == 45))) ||\
6431 ((type === 'x' || type === 'X') && (next >= 48 && next <= 57 ||\
6432 next >= 97 && next <= 102 ||\
6433 next >= 65 && next <= 70))) &&\
6434 (formatIndex >= format.length || next !== format[formatIndex].charCodeAt(0))) { // Stop when we read something that is coming up\
6435 buffer.push(String.fromCharCode(next));\
6436 next = get();\
6437 curr++;\
6438 first = false;\
6439 } else {\
6440 break;\
6441 }\
6442 }\
6443 unget();\
6444 }\
6445 if (buffer.length === 0) return 0; // Failure.\
6446 if (suppressAssignment) continue;\
6447 var text = buffer.join('');\
6448 var argPtr = HEAP32[(((varargs)+(argIndex))>>2)];\
6449 argIndex += Runtime.getAlignSize('void*', null, true);\
6450 switch (type) {\
6451 case 'd': case 'u': case 'i':\
6452 if (half) {\
6453 HEAP16[((argPtr)>>1)]=parseInt(text, 10);\
6454 } else if (longLong) {\
6455 (tempI64 = [parseInt(text, 10)>>>0,(tempDouble=parseInt(text, 10),(+(Math.abs(tempDouble))) >= (+(1)) ? (tempDouble > (+(0)) ? ((Math.min((+(Math.floor((tempDouble)/(+(4294967296))))), (+(4294967295))))|0)>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/(+(4294967296)))))))>>>0) : 0)],HEAP32[((argPtr)>>2)]=tempI64[0],HEAP32[(((argPtr)+(4))>>2)]=tempI64[1]);\
6456 } else {\
6457 HEAP32[((argPtr)>>2)]=parseInt(text, 10);\
6458 }\
6459 break;\
6460 case 'X':\
6461 case 'x':\
6462 HEAP32[((argPtr)>>2)]=parseInt(text, 16)\
6463 break;\
6464 case 'F':\
6465 case 'f':\
6466 case 'E':\
6467 case 'e':\
6468 case 'G':\
6469 case 'g':\
6470 case 'E':\
6471 // fallthrough intended\
6472 if (long_) {\
6473 HEAPF64[((argPtr)>>3)]=parseFloat(text)\
6474 } else {\
6475 HEAPF32[((argPtr)>>2)]=parseFloat(text)\
6476 }\
6477 break;\
6478 case 's':\
6479 var array = intArrayFromString(text);\
6480 for (var j = 0; j < array.length; j++) {\
6481 HEAP8[(((argPtr)+(j))|0)]=array[j]\
6482 }\
6483 break;\
6484 }\
6485 fields++;\
6486 } else if (format[formatIndex] in __scanString.whiteSpace) {\
6487 next = get();\
6488 while (next in __scanString.whiteSpace) {\
6489 if (next <= 0) break mainLoop; // End of input.\
6490 next = get();\
6491 }\
6492 unget(next);\
6493 formatIndex++;\
6494 } else {\
6495 // Not a specifier.\
6496 next = get();\
6497 if (format[formatIndex].charCodeAt(0) !== next) {\
6498 unget(next);\
6499 break mainLoop;\
6500 }\
6501 formatIndex++;\
6502 }\
6503 }\
6504 return fields;\
6505 }function _fscanf(stream, format, varargs) {\
6506 // int fscanf(FILE *restrict stream, const char *restrict format, ... );\
6507 // http://pubs.opengroup.org/onlinepubs/000095399/functions/scanf.html\
6508 var streamObj = FS.getStream(stream);\
6509 if (!streamObj) {\
6510 return -1;\
6511 }\
6512 var buffer = [];\
6513 var get = function() {\
6514 var c = _fgetc(stream);\
6515 buffer.push(c);\
6516 return c;\
6517 };\
6518 var unget = function() {\
6519 _ungetc(buffer.pop(), stream);\
6520 };\
6521 return __scanString(format, get, unget, varargs);\
6522 }\
6523 function _setvbuf(stream, buf, type, size) {\
6524 // int setvbuf(FILE *restrict stream, char *restrict buf, int type, size_t size);\
6525 // http://pubs.opengroup.org/onlinepubs/000095399/functions/setvbuf.html\
6526 // TODO: Implement custom buffering.\
6527 return 0;\
6528 }\
6529 function _lseek(fildes, offset, whence) {\
6530 // off_t lseek(int fildes, off_t offset, int whence);\
6531 // http://pubs.opengroup.org/onlinepubs/000095399/functions/lseek.html\
6532 var stream = FS.getStream(fildes);\
6533 if (!stream) {\
6534 ___setErrNo(ERRNO_CODES.EBADF);\
6535 return -1;\
6536 }\
6537 try {\
6538 return FS.llseek(stream, offset, whence);\
6539 } catch (e) {\
6540 FS.handleFSError(e);\
6541 return -1;\
6542 }\
6543 }function _fseek(stream, offset, whence) {\
6544 // int fseek(FILE *stream, long offset, int whence);\
6545 // http://pubs.opengroup.org/onlinepubs/000095399/functions/fseek.html\
6546 var ret = _lseek(stream, offset, whence);\
6547 if (ret == -1) {\
6548 return -1;\
6549 }\
6550 stream = FS.getStream(stream);\
6551 stream.eof = false;\
6552 return 0;\
6553 }\
6554 function _ftell(stream) {\
6555 // long ftell(FILE *stream);\
6556 // http://pubs.opengroup.org/onlinepubs/000095399/functions/ftell.html\
6557 stream = FS.getStream(stream);\
6558 if (!stream) {\
6559 ___setErrNo(ERRNO_CODES.EBADF);\
6560 return -1;\
6561 }\
6562 if (FS.isChrdev(stream.node.mode)) {\
6563 ___setErrNo(ERRNO_CODES.ESPIPE);\
6564 return -1;\
6565 } else {\
6566 return stream.position;\
6567 }\
6568 }\
6569 var _tan=Math.tan;\
6570 function _sinh(x) {\
6571 var p = Math.pow(Math.E, x);\
6572 return (p - (1 / p)) / 2;\
6573 }\
6574 function _cosh(x) {\
6575 var p = Math.pow(Math.E, x);\
6576 return (p + (1 / p)) / 2;\
6577 }function _tanh(x) {\
6578 return _sinh(x) / _cosh(x);\
6579 }\
6580 var _sqrt=Math.sqrt;\
6581 var _sin=Math.sin;\
6582 function _srand(seed) {}\
6583 function _rand() {\
6584 return Math.floor(Math.random()*0x80000000);\
6585 }\
6586 function _modf(x, intpart) {\
6587 HEAPF64[((intpart)>>3)]=Math.floor(x)\
6588 return x - HEAPF64[((intpart)>>3)];\
6589 }\
6590 var _log=Math.log;\
6591 function _log10(x) {\
6592 return Math.log(x) / Math.LN10;\
6593 }\
6594 function _ldexp(x, exp_) {\
6595 return x * Math.pow(2, exp_);\
6596 }\
6597 function _frexp(x, exp_addr) {\
6598 var sig = 0, exp_ = 0;\
6599 if (x !== 0) {\
6600 var sign = 1;\
6601 if (x < 0) {\
6602 x = -x;\
6603 sign = -1;\
6604 }\
6605 var raw_exp = Math.log(x)/Math.log(2);\
6606 exp_ = Math.ceil(raw_exp);\
6607 if (exp_ === raw_exp) exp_ += 1;\
6608 sig = sign*x/Math.pow(2, exp_);\
6609 }\
6610 HEAP32[((exp_addr)>>2)]=exp_\
6611 return sig;\
6612 }\
6613 function _fmod(x, y) {\
6614 return x % y;\
6615 }\
6616 var _exp=Math.exp;\
6617 var _cos=Math.cos;\
6618 var _ceil=Math.ceil;\
6619 var _atan=Math.atan;\
6620 var _atan2=Math.atan2;\
6621 var _asin=Math.asin;\
6622 var _acos=Math.acos;\
6623 var _fabs=Math.abs;\
6624 function _time(ptr) {\
6625 var ret = Math.floor(Date.now()/1000);\
6626 if (ptr) {\
6627 HEAP32[((ptr)>>2)]=ret\
6628 }\
6629 return ret;\
6630 }\
6631 var ___tm_struct_layout={__size__:44,tm_sec:0,tm_min:4,tm_hour:8,tm_mday:12,tm_mon:16,tm_year:20,tm_wday:24,tm_yday:28,tm_isdst:32,tm_gmtoff:36,tm_zone:40};\
6632 var __tzname=allocate(8, \"i32*\", ALLOC_STATIC);\
6633 var __daylight=allocate(1, \"i32*\", ALLOC_STATIC);\
6634 var __timezone=allocate(1, \"i32*\", ALLOC_STATIC);function _tzset() {\
6635 // TODO: Use (malleable) environment variables instead of system settings.\
6636 if (_tzset.called) return;\
6637 _tzset.called = true;\
6638 HEAP32[((__timezone)>>2)]=-(new Date()).getTimezoneOffset() * 60\
6639 var winter = new Date(2000, 0, 1);\
6640 var summer = new Date(2000, 6, 1);\
6641 HEAP32[((__daylight)>>2)]=Number(winter.getTimezoneOffset() != summer.getTimezoneOffset())\
6642 var winterName = 'GMT'; // XXX do not rely on browser timezone info, it is very unpredictable | winter.toString().match(/\\(([A-Z]+)\\)/)[1];\
6643 var summerName = 'GMT'; // XXX do not rely on browser timezone info, it is very unpredictable | summer.toString().match(/\\(([A-Z]+)\\)/)[1];\
6644 var winterNamePtr = allocate(intArrayFromString(winterName), 'i8', ALLOC_NORMAL);\
6645 var summerNamePtr = allocate(intArrayFromString(summerName), 'i8', ALLOC_NORMAL);\
6646 HEAP32[((__tzname)>>2)]=winterNamePtr\
6647 HEAP32[(((__tzname)+(4))>>2)]=summerNamePtr\
6648 }function _mktime(tmPtr) {\
6649 _tzset();\
6650 var offsets = ___tm_struct_layout;\
6651 var year = HEAP32[(((tmPtr)+(offsets.tm_year))>>2)];\
6652 var timestamp = new Date(year >= 1900 ? year : year + 1900,\
6653 HEAP32[(((tmPtr)+(offsets.tm_mon))>>2)],\
6654 HEAP32[(((tmPtr)+(offsets.tm_mday))>>2)],\
6655 HEAP32[(((tmPtr)+(offsets.tm_hour))>>2)],\
6656 HEAP32[(((tmPtr)+(offsets.tm_min))>>2)],\
6657 HEAP32[(((tmPtr)+(offsets.tm_sec))>>2)],\
6658 0).getTime() / 1000;\
6659 HEAP32[(((tmPtr)+(offsets.tm_wday))>>2)]=new Date(timestamp).getDay()\
6660 var yday = Math.round((timestamp - (new Date(year, 0, 1)).getTime()) / (1000 * 60 * 60 * 24));\
6661 HEAP32[(((tmPtr)+(offsets.tm_yday))>>2)]=yday\
6662 return timestamp;\
6663 }\
6664 function _setlocale(category, locale) {\
6665 if (!_setlocale.ret) _setlocale.ret = allocate([0], 'i8', ALLOC_NORMAL);\
6666 return _setlocale.ret;\
6667 }\
6668 function _rename(old_path, new_path) {\
6669 // int rename(const char *old, const char *new);\
6670 // http://pubs.opengroup.org/onlinepubs/000095399/functions/rename.html\
6671 old_path = Pointer_stringify(old_path);\
6672 new_path = Pointer_stringify(new_path);\
6673 try {\
6674 FS.rename(old_path, new_path);\
6675 return 0;\
6676 } catch (e) {\
6677 FS.handleFSError(e);\
6678 return -1;\
6679 }\
6680 }\
6681 function _unlink(path) {\
6682 // int unlink(const char *path);\
6683 // http://pubs.opengroup.org/onlinepubs/000095399/functions/unlink.html\
6684 path = Pointer_stringify(path);\
6685 try {\
6686 FS.unlink(path);\
6687 return 0;\
6688 } catch (e) {\
6689 FS.handleFSError(e);\
6690 return -1;\
6691 }\
6692 }\
6693 function _rmdir(path) {\
6694 // int rmdir(const char *path);\
6695 // http://pubs.opengroup.org/onlinepubs/000095399/functions/rmdir.html\
6696 path = Pointer_stringify(path);\
6697 try {\
6698 FS.rmdir(path);\
6699 return 0;\
6700 } catch (e) {\
6701 FS.handleFSError(e);\
6702 return -1;\
6703 }\
6704 }function _remove(path) {\
6705 // int remove(const char *path);\
6706 // http://pubs.opengroup.org/onlinepubs/000095399/functions/remove.html\
6707 var ret = _unlink(path);\
6708 if (ret == -1) ret = _rmdir(path);\
6709 return ret;\
6710 }\
6711 var _environ=allocate(1, \"i32*\", ALLOC_STATIC);var ___environ=_environ;function ___buildEnvironment(env) {\
6712 // WARNING: Arbitrary limit!\
6713 var MAX_ENV_VALUES = 64;\
6714 var TOTAL_ENV_SIZE = 1024;\
6715 // Statically allocate memory for the environment.\
6716 var poolPtr;\
6717 var envPtr;\
6718 if (!___buildEnvironment.called) {\
6719 ___buildEnvironment.called = true;\
6720 // Set default values. Use string keys for Closure Compiler compatibility.\
6721 ENV['USER'] = 'root';\
6722 ENV['PATH'] = '/';\
6723 ENV['PWD'] = '/';\
6724 ENV['HOME'] = '/home/emscripten';\
6725 ENV['LANG'] = 'en_US.UTF-8';\
6726 ENV['_'] = './this.program';\
6727 // Allocate memory.\
6728 poolPtr = allocate(TOTAL_ENV_SIZE, 'i8', ALLOC_STATIC);\
6729 envPtr = allocate(MAX_ENV_VALUES * 4,\
6730 'i8*', ALLOC_STATIC);\
6731 HEAP32[((envPtr)>>2)]=poolPtr\
6732 HEAP32[((_environ)>>2)]=envPtr;\
6733 } else {\
6734 envPtr = HEAP32[((_environ)>>2)];\
6735 poolPtr = HEAP32[((envPtr)>>2)];\
6736 }\
6737 // Collect key=value lines.\
6738 var strings = [];\
6739 var totalSize = 0;\
6740 for (var key in env) {\
6741 if (typeof env[key] === 'string') {\
6742 var line = key + '=' + env[key];\
6743 strings.push(line);\
6744 totalSize += line.length;\
6745 }\
6746 }\
6747 if (totalSize > TOTAL_ENV_SIZE) {\
6748 throw new Error('Environment size exceeded TOTAL_ENV_SIZE!');\
6749 }\
6750 // Make new.\
6751 var ptrSize = 4;\
6752 for (var i = 0; i < strings.length; i++) {\
6753 var line = strings[i];\
6754 for (var j = 0; j < line.length; j++) {\
6755 HEAP8[(((poolPtr)+(j))|0)]=line.charCodeAt(j);\
6756 }\
6757 HEAP8[(((poolPtr)+(j))|0)]=0;\
6758 HEAP32[(((envPtr)+(i * ptrSize))>>2)]=poolPtr;\
6759 poolPtr += line.length + 1;\
6760 }\
6761 HEAP32[(((envPtr)+(strings.length * ptrSize))>>2)]=0;\
6762 }var ENV={};function _getenv(name) {\
6763 // char *getenv(const char *name);\
6764 // http://pubs.opengroup.org/onlinepubs/009695399/functions/getenv.html\
6765 if (name === 0) return 0;\
6766 name = Pointer_stringify(name);\
6767 if (!ENV.hasOwnProperty(name)) return 0;\
6768 if (_getenv.ret) _free(_getenv.ret);\
6769 _getenv.ret = allocate(intArrayFromString(ENV[name]), 'i8', ALLOC_NORMAL);\
6770 return _getenv.ret;\
6771 }\
6772 function _system(command) {\
6773 // int system(const char *command);\
6774 // http://pubs.opengroup.org/onlinepubs/000095399/functions/system.html\
6775 // Can't call external programs.\
6776 ___setErrNo(ERRNO_CODES.EAGAIN);\
6777 return -1;\
6778 }\
6779 function _difftime(time1, time0) {\
6780 return time1 - time0;\
6781 }\
6782 var ___tm_current=allocate(4*26, \"i8\", ALLOC_STATIC);\
6783 var ___tm_timezone=allocate(intArrayFromString(\"GMT\"), \"i8\", ALLOC_STATIC);function _gmtime_r(time, tmPtr) {\
6784 var date = new Date(HEAP32[((time)>>2)]*1000);\
6785 var offsets = ___tm_struct_layout;\
6786 HEAP32[(((tmPtr)+(offsets.tm_sec))>>2)]=date.getUTCSeconds()\
6787 HEAP32[(((tmPtr)+(offsets.tm_min))>>2)]=date.getUTCMinutes()\
6788 HEAP32[(((tmPtr)+(offsets.tm_hour))>>2)]=date.getUTCHours()\
6789 HEAP32[(((tmPtr)+(offsets.tm_mday))>>2)]=date.getUTCDate()\
6790 HEAP32[(((tmPtr)+(offsets.tm_mon))>>2)]=date.getUTCMonth()\
6791 HEAP32[(((tmPtr)+(offsets.tm_year))>>2)]=date.getUTCFullYear()-1900\
6792 HEAP32[(((tmPtr)+(offsets.tm_wday))>>2)]=date.getUTCDay()\
6793 HEAP32[(((tmPtr)+(offsets.tm_gmtoff))>>2)]=0\
6794 HEAP32[(((tmPtr)+(offsets.tm_isdst))>>2)]=0\
6795 var start = new Date(date); // define date using UTC, start from Jan 01 00:00:00 UTC\
6796 start.setUTCDate(1);\
6797 start.setUTCMonth(0);\
6798 start.setUTCHours(0);\
6799 start.setUTCMinutes(0);\
6800 start.setUTCSeconds(0);\
6801 start.setUTCMilliseconds(0);\
6802 var yday = Math.floor((date.getTime() - start.getTime()) / (1000 * 60 * 60 * 24));\
6803 HEAP32[(((tmPtr)+(offsets.tm_yday))>>2)]=yday\
6804 HEAP32[(((tmPtr)+(offsets.tm_zone))>>2)]=___tm_timezone\
6805 return tmPtr;\
6806 }function _gmtime(time) {\
6807 return _gmtime_r(time, ___tm_current);\
6808 }\
6809 function _localtime_r(time, tmPtr) {\
6810 _tzset();\
6811 var offsets = ___tm_struct_layout;\
6812 var date = new Date(HEAP32[((time)>>2)]*1000);\
6813 HEAP32[(((tmPtr)+(offsets.tm_sec))>>2)]=date.getSeconds()\
6814 HEAP32[(((tmPtr)+(offsets.tm_min))>>2)]=date.getMinutes()\
6815 HEAP32[(((tmPtr)+(offsets.tm_hour))>>2)]=date.getHours()\
6816 HEAP32[(((tmPtr)+(offsets.tm_mday))>>2)]=date.getDate()\
6817 HEAP32[(((tmPtr)+(offsets.tm_mon))>>2)]=date.getMonth()\
6818 HEAP32[(((tmPtr)+(offsets.tm_year))>>2)]=date.getFullYear()-1900\
6819 HEAP32[(((tmPtr)+(offsets.tm_wday))>>2)]=date.getDay()\
6820 var start = new Date(date.getFullYear(), 0, 1);\
6821 var yday = Math.floor((date.getTime() - start.getTime()) / (1000 * 60 * 60 * 24));\
6822 HEAP32[(((tmPtr)+(offsets.tm_yday))>>2)]=yday\
6823 HEAP32[(((tmPtr)+(offsets.tm_gmtoff))>>2)]=start.getTimezoneOffset() * 60\
6824 var dst = Number(start.getTimezoneOffset() != date.getTimezoneOffset());\
6825 HEAP32[(((tmPtr)+(offsets.tm_isdst))>>2)]=dst\
6826 HEAP32[(((tmPtr)+(offsets.tm_zone))>>2)]=___tm_timezone\
6827 return tmPtr;\
6828 }function _localtime(time) {\
6829 return _localtime_r(time, ___tm_current);\
6830 }\
6831 function __isLeapYear(year) {\
6832 return year%4 === 0 && (year%100 !== 0 || year%400 === 0);\
6833 }\
6834 function __arraySum(array, index) {\
6835 var sum = 0;\
6836 for (var i = 0; i <= index; sum += array[i++]);\
6837 return sum;\
6838 }\
6839 var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];\
6840 var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date, days) {\
6841 var newDate = new Date(date.getTime());\
6842 while(days > 0) {\
6843 var leap = __isLeapYear(newDate.getFullYear());\
6844 var currentMonth = newDate.getMonth();\
6845 var daysInCurrentMonth = (leap ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR)[currentMonth];\
6846 if (days > daysInCurrentMonth-newDate.getDate()) {\
6847 // we spill over to next month\
6848 days -= (daysInCurrentMonth-newDate.getDate()+1);\
6849 newDate.setDate(1);\
6850 if (currentMonth < 11) {\
6851 newDate.setMonth(currentMonth+1)\
6852 } else {\
6853 newDate.setMonth(0);\
6854 newDate.setFullYear(newDate.getFullYear()+1);\
6855 }\
6856 } else {\
6857 // we stay in current month \
6858 newDate.setDate(newDate.getDate()+days);\
6859 return newDate;\
6860 }\
6861 }\
6862 return newDate;\
6863 }function _strftime(s, maxsize, format, tm) {\
6864 // size_t strftime(char *restrict s, size_t maxsize, const char *restrict format, const struct tm *restrict timeptr);\
6865 // http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html\
6866 var date = {\
6867 tm_sec: HEAP32[(((tm)+(___tm_struct_layout.tm_sec))>>2)],\
6868 tm_min: HEAP32[(((tm)+(___tm_struct_layout.tm_min))>>2)],\
6869 tm_hour: HEAP32[(((tm)+(___tm_struct_layout.tm_hour))>>2)],\
6870 tm_mday: HEAP32[(((tm)+(___tm_struct_layout.tm_mday))>>2)],\
6871 tm_mon: HEAP32[(((tm)+(___tm_struct_layout.tm_mon))>>2)],\
6872 tm_year: HEAP32[(((tm)+(___tm_struct_layout.tm_year))>>2)],\
6873 tm_wday: HEAP32[(((tm)+(___tm_struct_layout.tm_wday))>>2)],\
6874 tm_yday: HEAP32[(((tm)+(___tm_struct_layout.tm_yday))>>2)],\
6875 tm_isdst: HEAP32[(((tm)+(___tm_struct_layout.tm_isdst))>>2)]\
6876 };\
6877 var pattern = Pointer_stringify(format);\
6878 // expand format\
6879 var EXPANSION_RULES_1 = {\
6880 '%c': '%a %b %d %H:%M:%S %Y', // Replaced by the locale's appropriate date and time representation - e.g., Mon Aug 3 14:02:01 2013\
6881 '%D': '%m/%d/%y', // Equivalent to %m / %d / %y\
6882 '%F': '%Y-%m-%d', // Equivalent to %Y - %m - %d\
6883 '%h': '%b', // Equivalent to %b\
6884 '%r': '%I:%M:%S %p', // Replaced by the time in a.m. and p.m. notation\
6885 '%R': '%H:%M', // Replaced by the time in 24-hour notation\
6886 '%T': '%H:%M:%S', // Replaced by the time\
6887 '%x': '%m/%d/%y', // Replaced by the locale's appropriate date representation\
6888 '%X': '%H:%M:%S', // Replaced by the locale's appropriate date representation\
6889 };\
6890 for (var rule in EXPANSION_RULES_1) {\
6891 pattern = pattern.replace(new RegExp(rule, 'g'), EXPANSION_RULES_1[rule]);\
6892 }\
6893 var WEEKDAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\
6894 var MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\
6895 var leadingSomething = function(value, digits, character) {\
6896 var str = typeof value === 'number' ? value.toString() : (value || '');\
6897 while (str.length < digits) {\
6898 str = character[0]+str;\
6899 }\
6900 return str;\
6901 };\
6902 var leadingNulls = function(value, digits) {\
6903 return leadingSomething(value, digits, '0');\
6904 };\
6905 var compareByDay = function(date1, date2) {\
6906 var sgn = function(value) {\
6907 return value < 0 ? -1 : (value > 0 ? 1 : 0);\
6908 };\
6909 var compare;\
6910 if ((compare = sgn(date1.getFullYear()-date2.getFullYear())) === 0) {\
6911 if ((compare = sgn(date1.getMonth()-date2.getMonth())) === 0) {\
6912 compare = sgn(date1.getDate()-date2.getDate());\
6913 }\
6914 }\
6915 return compare;\
6916 };\
6917 var getFirstWeekStartDate = function(janFourth) {\
6918 switch (janFourth.getDay()) {\
6919 case 0: // Sunday\
6920 return new Date(janFourth.getFullYear()-1, 11, 29);\
6921 case 1: // Monday\
6922 return janFourth;\
6923 case 2: // Tuesday\
6924 return new Date(janFourth.getFullYear(), 0, 3);\
6925 case 3: // Wednesday\
6926 return new Date(janFourth.getFullYear(), 0, 2);\
6927 case 4: // Thursday\
6928 return new Date(janFourth.getFullYear(), 0, 1);\
6929 case 5: // Friday\
6930 return new Date(janFourth.getFullYear()-1, 11, 31);\
6931 case 6: // Saturday\
6932 return new Date(janFourth.getFullYear()-1, 11, 30);\
6933 }\
6934 };\
6935 var getWeekBasedYear = function(date) {\
6936 var thisDate = __addDays(new Date(date.tm_year+1900, 0, 1), date.tm_yday);\
6937 var janFourthThisYear = new Date(thisDate.getFullYear(), 0, 4);\
6938 var janFourthNextYear = new Date(thisDate.getFullYear()+1, 0, 4);\
6939 var firstWeekStartThisYear = getFirstWeekStartDate(janFourthThisYear);\
6940 var firstWeekStartNextYear = getFirstWeekStartDate(janFourthNextYear);\
6941 if (compareByDay(firstWeekStartThisYear, thisDate) <= 0) {\
6942 // this date is after the start of the first week of this year\
6943 if (compareByDay(firstWeekStartNextYear, thisDate) <= 0) {\
6944 return thisDate.getFullYear()+1;\
6945 } else {\
6946 return thisDate.getFullYear();\
6947 }\
6948 } else { \
6949 return thisDate.getFullYear()-1;\
6950 }\
6951 };\
6952 var EXPANSION_RULES_2 = {\
6953 '%a': function(date) {\
6954 return WEEKDAYS[date.tm_wday].substring(0,3);\
6955 },\
6956 '%A': function(date) {\
6957 return WEEKDAYS[date.tm_wday];\
6958 },\
6959 '%b': function(date) {\
6960 return MONTHS[date.tm_mon].substring(0,3);\
6961 },\
6962 '%B': function(date) {\
6963 return MONTHS[date.tm_mon];\
6964 },\
6965 '%C': function(date) {\
6966 var year = date.tm_year+1900;\
6967 return leadingNulls(Math.floor(year/100),2);\
6968 },\
6969 '%d': function(date) {\
6970 return leadingNulls(date.tm_mday, 2);\
6971 },\
6972 '%e': function(date) {\
6973 return leadingSomething(date.tm_mday, 2, ' ');\
6974 },\
6975 '%g': function(date) {\
6976 // %g, %G, and %V give values according to the ISO 8601:2000 standard week-based year. \
6977 // In this system, weeks begin on a Monday and week 1 of the year is the week that includes \
6978 // January 4th, which is also the week that includes the first Thursday of the year, and \
6979 // is also the first week that contains at least four days in the year. \
6980 // If the first Monday of January is the 2nd, 3rd, or 4th, the preceding days are part of \
6981 // the last week of the preceding year; thus, for Saturday 2nd January 1999, \
6982 // %G is replaced by 1998 and %V is replaced by 53. If December 29th, 30th, \
6983 // or 31st is a Monday, it and any following days are part of week 1 of the following year. \
6984 // Thus, for Tuesday 30th December 1997, %G is replaced by 1998 and %V is replaced by 01.\
6985 return getWeekBasedYear(date).toString().substring(2);\
6986 },\
6987 '%G': function(date) {\
6988 return getWeekBasedYear(date);\
6989 },\
6990 '%H': function(date) {\
6991 return leadingNulls(date.tm_hour, 2);\
6992 },\
6993 '%I': function(date) {\
6994 return leadingNulls(date.tm_hour < 13 ? date.tm_hour : date.tm_hour-12, 2);\
6995 },\
6996 '%j': function(date) {\
6997 // Day of the year (001-366)\
6998 return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900) ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR, date.tm_mon-1), 3);\
6999 },\
7000 '%m': function(date) {\
7001 return leadingNulls(date.tm_mon+1, 2);\
7002 },\
7003 '%M': function(date) {\
7004 return leadingNulls(date.tm_min, 2);\
7005 },\
7006 '%n': function() {\
7007 return '\\n';\
7008 },\
7009 '%p': function(date) {\
7010 if (date.tm_hour > 0 && date.tm_hour < 13) {\
7011 return 'AM';\
7012 } else {\
7013 return 'PM';\
7014 }\
7015 },\
7016 '%S': function(date) {\
7017 return leadingNulls(date.tm_sec, 2);\
7018 },\
7019 '%t': function() {\
7020 return '\\t';\
7021 },\
7022 '%u': function(date) {\
7023 var day = new Date(date.tm_year+1900, date.tm_mon+1, date.tm_mday, 0, 0, 0, 0);\
7024 return day.getDay() || 7;\
7025 },\
7026 '%U': function(date) {\
7027 // Replaced by the week number of the year as a decimal number [00,53]. \
7028 // The first Sunday of January is the first day of week 1; \
7029 // days in the new year before this are in week 0. [ tm_year, tm_wday, tm_yday]\
7030 var janFirst = new Date(date.tm_year+1900, 0, 1);\
7031 var firstSunday = janFirst.getDay() === 0 ? janFirst : __addDays(janFirst, 7-janFirst.getDay());\
7032 var endDate = new Date(date.tm_year+1900, date.tm_mon, date.tm_mday);\
7033 // is target date after the first Sunday?\
7034 if (compareByDay(firstSunday, endDate) < 0) {\
7035 // calculate difference in days between first Sunday and endDate\
7036 var februaryFirstUntilEndMonth = __arraySum(__isLeapYear(endDate.getFullYear()) ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR, endDate.getMonth()-1)-31;\
7037 var firstSundayUntilEndJanuary = 31-firstSunday.getDate();\
7038 var days = firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();\
7039 return leadingNulls(Math.ceil(days/7), 2);\
7040 }\
7041 return compareByDay(firstSunday, janFirst) === 0 ? '01': '00';\
7042 },\
7043 '%V': function(date) {\
7044 // Replaced by the week number of the year (Monday as the first day of the week) \
7045 // as a decimal number [01,53]. If the week containing 1 January has four \
7046 // or more days in the new year, then it is considered week 1. \
7047 // Otherwise, it is the last week of the previous year, and the next week is week 1. \
7048 // Both January 4th and the first Thursday of January are always in week 1. [ tm_year, tm_wday, tm_yday]\
7049 var janFourthThisYear = new Date(date.tm_year+1900, 0, 4);\
7050 var janFourthNextYear = new Date(date.tm_year+1901, 0, 4);\
7051 var firstWeekStartThisYear = getFirstWeekStartDate(janFourthThisYear);\
7052 var firstWeekStartNextYear = getFirstWeekStartDate(janFourthNextYear);\
7053 var endDate = __addDays(new Date(date.tm_year+1900, 0, 1), date.tm_yday);\
7054 if (compareByDay(endDate, firstWeekStartThisYear) < 0) {\
7055 // if given date is before this years first week, then it belongs to the 53rd week of last year\
7056 return '53';\
7057 } \
7058 if (compareByDay(firstWeekStartNextYear, endDate) <= 0) {\
7059 // if given date is after next years first week, then it belongs to the 01th week of next year\
7060 return '01';\
7061 }\
7062 // given date is in between CW 01..53 of this calendar year\
7063 var daysDifference;\
7064 if (firstWeekStartThisYear.getFullYear() < date.tm_year+1900) {\
7065 // first CW of this year starts last year\
7066 daysDifference = date.tm_yday+32-firstWeekStartThisYear.getDate()\
7067 } else {\
7068 // first CW of this year starts this year\
7069 daysDifference = date.tm_yday+1-firstWeekStartThisYear.getDate();\
7070 }\
7071 return leadingNulls(Math.ceil(daysDifference/7), 2);\
7072 },\
7073 '%w': function(date) {\
7074 var day = new Date(date.tm_year+1900, date.tm_mon+1, date.tm_mday, 0, 0, 0, 0);\
7075 return day.getDay();\
7076 },\
7077 '%W': function(date) {\
7078 // Replaced by the week number of the year as a decimal number [00,53]. \
7079 // The first Monday of January is the first day of week 1; \
7080 // days in the new year before this are in week 0. [ tm_year, tm_wday, tm_yday]\
7081 var janFirst = new Date(date.tm_year, 0, 1);\
7082 var firstMonday = janFirst.getDay() === 1 ? janFirst : __addDays(janFirst, janFirst.getDay() === 0 ? 1 : 7-janFirst.getDay()+1);\
7083 var endDate = new Date(date.tm_year+1900, date.tm_mon, date.tm_mday);\
7084 // is target date after the first Monday?\
7085 if (compareByDay(firstMonday, endDate) < 0) {\
7086 var februaryFirstUntilEndMonth = __arraySum(__isLeapYear(endDate.getFullYear()) ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR, endDate.getMonth()-1)-31;\
7087 var firstMondayUntilEndJanuary = 31-firstMonday.getDate();\
7088 var days = firstMondayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();\
7089 return leadingNulls(Math.ceil(days/7), 2);\
7090 }\
7091 return compareByDay(firstMonday, janFirst) === 0 ? '01': '00';\
7092 },\
7093 '%y': function(date) {\
7094 // Replaced by the last two digits of the year as a decimal number [00,99]. [ tm_year]\
7095 return (date.tm_year+1900).toString().substring(2);\
7096 },\
7097 '%Y': function(date) {\
7098 // Replaced by the year as a decimal number (for example, 1997). [ tm_year]\
7099 return date.tm_year+1900;\
7100 },\
7101 '%z': function(date) {\
7102 // Replaced by the offset from UTC in the ISO 8601:2000 standard format ( +hhmm or -hhmm ),\
7103 // or by no characters if no timezone is determinable. \
7104 // For example, \"-0430\" means 4 hours 30 minutes behind UTC (west of Greenwich). \
7105 // If tm_isdst is zero, the standard time offset is used. \
7106 // If tm_isdst is greater than zero, the daylight savings time offset is used. \
7107 // If tm_isdst is negative, no characters are returned. \
7108 // FIXME: we cannot determine time zone (or can we?)\
7109 return '';\
7110 },\
7111 '%Z': function(date) {\
7112 // Replaced by the timezone name or abbreviation, or by no bytes if no timezone information exists. [ tm_isdst]\
7113 // FIXME: we cannot determine time zone (or can we?)\
7114 return '';\
7115 },\
7116 '%%': function() {\
7117 return '%';\
7118 }\
7119 };\
7120 for (var rule in EXPANSION_RULES_2) {\
7121 if (pattern.indexOf(rule) >= 0) {\
7122 pattern = pattern.replace(new RegExp(rule, 'g'), EXPANSION_RULES_2[rule](date));\
7123 }\
7124 }\
7125 var bytes = intArrayFromString(pattern, false);\
7126 if (bytes.length > maxsize) {\
7127 return 0;\
7128 } \
7129 writeArrayToMemory(bytes, s);\
7130 return bytes.length-1;\
7131 }\
7132 function _clock() {\
7133 if (_clock.start === undefined) _clock.start = Date.now();\
7134 return Math.floor((Date.now() - _clock.start) * (1000/1000));\
7135 }\
7136 function _toupper(chr) {\
7137 if (chr >= 97 && chr <= 122) {\
7138 return chr - 97 + 65;\
7139 } else {\
7140 return chr;\
7141 }\
7142 }\
7143 function _strpbrk(ptr1, ptr2) {\
7144 var curr;\
7145 var searchSet = {};\
7146 while (1) {\
7147 var curr = HEAP8[((ptr2++)|0)];\
7148 if (!curr) break;\
7149 searchSet[curr] = 1;\
7150 }\
7151 while (1) {\
7152 curr = HEAP8[(ptr1)];\
7153 if (!curr) break;\
7154 if (curr in searchSet) return ptr1;\
7155 ptr1++;\
7156 }\
7157 return 0;\
7158 }\
7159 Module[\"_tolower\"] = _tolower;\
7160 function _islower(chr) {\
7161 return chr >= 97 && chr <= 122;\
7162 }\
7163 function _ispunct(chr) {\
7164 return (chr >= 33 && chr <= 47) ||\
7165 (chr >= 58 && chr <= 64) ||\
7166 (chr >= 91 && chr <= 96) ||\
7167 (chr >= 123 && chr <= 126);\
7168 }\
7169 function _isupper(chr) {\
7170 return chr >= 65 && chr <= 90;\
7171 }\
7172 function _isxdigit(chr) {\
7173 return (chr >= 48 && chr <= 57) ||\
7174 (chr >= 97 && chr <= 102) ||\
7175 (chr >= 65 && chr <= 70);\
7176 }\
7177 function _strrchr(ptr, chr) {\
7178 var ptr2 = ptr + _strlen(ptr);\
7179 do {\
7180 if (HEAP8[(ptr2)] == chr) return ptr2;\
7181 ptr2--;\
7182 } while (ptr2 >= ptr);\
7183 return 0;\
7184 }\
7185 function _abort() {\
7186 Module['abort']();\
7187 }\
7188 function _sbrk(bytes) {\
7189 // Implement a Linux-like 'memory area' for our 'process'.\
7190 // Changes the size of the memory area by |bytes|; returns the\
7191 // address of the previous top ('break') of the memory area\
7192 // We control the \"dynamic\" memory - DYNAMIC_BASE to DYNAMICTOP\
7193 var self = _sbrk;\
7194 if (!self.called) {\
7195 DYNAMICTOP = alignMemoryPage(DYNAMICTOP); // make sure we start out aligned\
7196 self.called = true;\
7197 assert(Runtime.dynamicAlloc);\
7198 self.alloc = Runtime.dynamicAlloc;\
7199 Runtime.dynamicAlloc = function() { abort('cannot dynamically allocate, sbrk now has control') };\
7200 }\
7201 var ret = DYNAMICTOP;\
7202 if (bytes != 0) self.alloc(bytes);\
7203 return ret; // Previous break location.\
7204 }\
7205 function _sysconf(name) {\
7206 // long sysconf(int name);\
7207 // http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html\
7208 switch(name) {\
7209 case 8: return PAGE_SIZE;\
7210 case 54:\
7211 case 56:\
7212 case 21:\
7213 case 61:\
7214 case 63:\
7215 case 22:\
7216 case 67:\
7217 case 23:\
7218 case 24:\
7219 case 25:\
7220 case 26:\
7221 case 27:\
7222 case 69:\
7223 case 28:\
7224 case 101:\
7225 case 70:\
7226 case 71:\
7227 case 29:\
7228 case 30:\
7229 case 199:\
7230 case 75:\
7231 case 76:\
7232 case 32:\
7233 case 43:\
7234 case 44:\
7235 case 80:\
7236 case 46:\
7237 case 47:\
7238 case 45:\
7239 case 48:\
7240 case 49:\
7241 case 42:\
7242 case 82:\
7243 case 33:\
7244 case 7:\
7245 case 108:\
7246 case 109:\
7247 case 107:\
7248 case 112:\
7249 case 119:\
7250 case 121:\
7251 return 200809;\
7252 case 13:\
7253 case 104:\
7254 case 94:\
7255 case 95:\
7256 case 34:\
7257 case 35:\
7258 case 77:\
7259 case 81:\
7260 case 83:\
7261 case 84:\
7262 case 85:\
7263 case 86:\
7264 case 87:\
7265 case 88:\
7266 case 89:\
7267 case 90:\
7268 case 91:\
7269 case 94:\
7270 case 95:\
7271 case 110:\
7272 case 111:\
7273 case 113:\
7274 case 114:\
7275 case 115:\
7276 case 116:\
7277 case 117:\
7278 case 118:\
7279 case 120:\
7280 case 40:\
7281 case 16:\
7282 case 79:\
7283 case 19:\
7284 return -1;\
7285 case 92:\
7286 case 93:\
7287 case 5:\
7288 case 72:\
7289 case 6:\
7290 case 74:\
7291 case 92:\
7292 case 93:\
7293 case 96:\
7294 case 97:\
7295 case 98:\
7296 case 99:\
7297 case 102:\
7298 case 103:\
7299 case 105:\
7300 return 1;\
7301 case 38:\
7302 case 66:\
7303 case 50:\
7304 case 51:\
7305 case 4:\
7306 return 1024;\
7307 case 15:\
7308 case 64:\
7309 case 41:\
7310 return 32;\
7311 case 55:\
7312 case 37:\
7313 case 17:\
7314 return 2147483647;\
7315 case 18:\
7316 case 1:\
7317 return 47839;\
7318 case 59:\
7319 case 57:\
7320 return 99;\
7321 case 68:\
7322 case 58:\
7323 return 2048;\
7324 case 0: return 2097152;\
7325 case 3: return 65536;\
7326 case 14: return 32768;\
7327 case 73: return 32767;\
7328 case 39: return 16384;\
7329 case 60: return 1000;\
7330 case 106: return 700;\
7331 case 52: return 256;\
7332 case 62: return 255;\
7333 case 2: return 100;\
7334 case 65: return 64;\
7335 case 36: return 20;\
7336 case 100: return 16;\
7337 case 20: return 6;\
7338 case 53: return 4;\
7339 case 10: return 1;\
7340 }\
7341 ___setErrNo(ERRNO_CODES.EINVAL);\
7342 return -1;\
7343 }\
7344 var Browser={mainLoop:{scheduler:null,shouldPause:false,paused:false,queue:[],pause:function () {\
7345 Browser.mainLoop.shouldPause = true;\
7346 },resume:function () {\
7347 if (Browser.mainLoop.paused) {\
7348 Browser.mainLoop.paused = false;\
7349 Browser.mainLoop.scheduler();\
7350 }\
7351 Browser.mainLoop.shouldPause = false;\
7352 },updateStatus:function () {\
7353 if (Module['setStatus']) {\
7354 var message = Module['statusMessage'] || 'Please wait...';\
7355 var remaining = Browser.mainLoop.remainingBlockers;\
7356 var expected = Browser.mainLoop.expectedBlockers;\
7357 if (remaining) {\
7358 if (remaining < expected) {\
7359 Module['setStatus'](message + ' (' + (expected - remaining) + '/' + expected + ')');\
7360 } else {\
7361 Module['setStatus'](message);\
7362 }\
7363 } else {\
7364 Module['setStatus']('');\
7365 }\
7366 }\
7367 }},isFullScreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function () {\
7368 if (!Module[\"preloadPlugins\"]) Module[\"preloadPlugins\"] = []; // needs to exist even in workers\
7369 if (Browser.initted || ENVIRONMENT_IS_WORKER) return;\
7370 Browser.initted = true;\
7371 try {\
7372 new Blob();\
7373 Browser.hasBlobConstructor = true;\
7374 } catch(e) {\
7375 Browser.hasBlobConstructor = false;\
7376 console.log(\"warning: no blob constructor, cannot create blobs with mimetypes\");\
7377 }\
7378 Browser.BlobBuilder = typeof MozBlobBuilder != \"undefined\" ? MozBlobBuilder : (typeof WebKitBlobBuilder != \"undefined\" ? WebKitBlobBuilder : (!Browser.hasBlobConstructor ? console.log(\"warning: no BlobBuilder\") : null));\
7379 Browser.URLObject = typeof window != \"undefined\" ? (window.URL ? window.URL : window.webkitURL) : undefined;\
7380 if (!Module.noImageDecoding && typeof Browser.URLObject === 'undefined') {\
7381 console.log(\"warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.\");\
7382 Module.noImageDecoding = true;\
7383 }\
7384 // Support for plugins that can process preloaded files. You can add more of these to\
7385 // your app by creating and appending to Module.preloadPlugins.\
7386 //\
7387 // Each plugin is asked if it can handle a file based on the file's name. If it can,\
7388 // it is given the file's raw data. When it is done, it calls a callback with the file's\
7389 // (possibly modified) data. For example, a plugin might decompress a file, or it\
7390 // might create some side data structure for use later (like an Image element, etc.).\
7391 var imagePlugin = {};\
7392 imagePlugin['canHandle'] = function(name) {\
7393 return !Module.noImageDecoding && /\\.(jpg|jpeg|png|bmp)$/i.test(name);\
7394 };\
7395 imagePlugin['handle'] = function(byteArray, name, onload, onerror) {\
7396 var b = null;\
7397 if (Browser.hasBlobConstructor) {\
7398 try {\
7399 b = new Blob([byteArray], { type: Browser.getMimetype(name) });\
7400 if (b.size !== byteArray.length) { // Safari bug #118630\
7401 // Safari's Blob can only take an ArrayBuffer\
7402 b = new Blob([(new Uint8Array(byteArray)).buffer], { type: Browser.getMimetype(name) });\
7403 }\
7404 } catch(e) {\
7405 Runtime.warnOnce('Blob constructor present but fails: ' + e + '; falling back to blob builder');\
7406 }\
7407 }\
7408 if (!b) {\
7409 var bb = new Browser.BlobBuilder();\
7410 bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range\
7411 b = bb.getBlob();\
7412 }\
7413 var url = Browser.URLObject.createObjectURL(b);\
7414 var img = new Image();\
7415 img.onload = function() {\
7416 assert(img.complete, 'Image ' + name + ' could not be decoded');\
7417 var canvas = document.createElement('canvas');\
7418 canvas.width = img.width;\
7419 canvas.height = img.height;\
7420 var ctx = canvas.getContext('2d');\
7421 ctx.drawImage(img, 0, 0);\
7422 Module[\"preloadedImages\"][name] = canvas;\
7423 Browser.URLObject.revokeObjectURL(url);\
7424 if (onload) onload(byteArray);\
7425 };\
7426 img.onerror = function(event) {\
7427 console.log('Image ' + url + ' could not be decoded');\
7428 if (onerror) onerror();\
7429 };\
7430 img.src = url;\
7431 };\
7432 Module['preloadPlugins'].push(imagePlugin);\
7433 var audioPlugin = {};\
7434 audioPlugin['canHandle'] = function(name) {\
7435 return !Module.noAudioDecoding && name.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 };\
7436 };\
7437 audioPlugin['handle'] = function(byteArray, name, onload, onerror) {\
7438 var done = false;\
7439 function finish(audio) {\
7440 if (done) return;\
7441 done = true;\
7442 Module[\"preloadedAudios\"][name] = audio;\
7443 if (onload) onload(byteArray);\
7444 }\
7445 function fail() {\
7446 if (done) return;\
7447 done = true;\
7448 Module[\"preloadedAudios\"][name] = new Audio(); // empty shim\
7449 if (onerror) onerror();\
7450 }\
7451 if (Browser.hasBlobConstructor) {\
7452 try {\
7453 var b = new Blob([byteArray], { type: Browser.getMimetype(name) });\
7454 } catch(e) {\
7455 return fail();\
7456 }\
7457 var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this!\
7458 var audio = new Audio();\
7459 audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926\
7460 audio.onerror = function(event) {\
7461 if (done) return;\
7462 console.log('warning: browser could not fully decode audio ' + name + ', trying slower base64 approach');\
7463 function encode64(data) {\
7464 var BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\
7465 var PAD = '=';\
7466 var ret = '';\
7467 var leftchar = 0;\
7468 var leftbits = 0;\
7469 for (var i = 0; i < data.length; i++) {\
7470 leftchar = (leftchar << 8) | data[i];\
7471 leftbits += 8;\
7472 while (leftbits >= 6) {\
7473 var curr = (leftchar >> (leftbits-6)) & 0x3f;\
7474 leftbits -= 6;\
7475 ret += BASE[curr];\
7476 }\
7477 }\
7478 if (leftbits == 2) {\
7479 ret += BASE[(leftchar&3) << 4];\
7480 ret += PAD + PAD;\
7481 } else if (leftbits == 4) {\
7482 ret += BASE[(leftchar&0xf) << 2];\
7483 ret += PAD;\
7484 }\
7485 return ret;\
7486 }\
7487 audio.src = 'data:audio/x-' + name.substr(-3) + ';base64,' + encode64(byteArray);\
7488 finish(audio); // we don't wait for confirmation this worked - but it's worth trying\
7489 };\
7490 audio.src = url;\
7491 // workaround for chrome bug 124926 - we do not always get oncanplaythrough or onerror\
7492 Browser.safeSetTimeout(function() {\
7493 finish(audio); // try to use it even though it is not necessarily ready to play\
7494 }, 10000);\
7495 } else {\
7496 return fail();\
7497 }\
7498 };\
7499 Module['preloadPlugins'].push(audioPlugin);\
7500 // Canvas event setup\
7501 var canvas = Module['canvas'];\
7502 canvas.requestPointerLock = canvas['requestPointerLock'] ||\
7503 canvas['mozRequestPointerLock'] ||\
7504 canvas['webkitRequestPointerLock'];\
7505 canvas.exitPointerLock = document['exitPointerLock'] ||\
7506 document['mozExitPointerLock'] ||\
7507 document['webkitExitPointerLock'] ||\
7508 function(){}; // no-op if function does not exist\
7509 canvas.exitPointerLock = canvas.exitPointerLock.bind(document);\
7510 function pointerLockChange() {\
7511 Browser.pointerLock = document['pointerLockElement'] === canvas ||\
7512 document['mozPointerLockElement'] === canvas ||\
7513 document['webkitPointerLockElement'] === canvas;\
7514 }\
7515 document.addEventListener('pointerlockchange', pointerLockChange, false);\
7516 document.addEventListener('mozpointerlockchange', pointerLockChange, false);\
7517 document.addEventListener('webkitpointerlockchange', pointerLockChange, false);\
7518 if (Module['elementPointerLock']) {\
7519 canvas.addEventListener(\"click\", function(ev) {\
7520 if (!Browser.pointerLock && canvas.requestPointerLock) {\
7521 canvas.requestPointerLock();\
7522 ev.preventDefault();\
7523 }\
7524 }, false);\
7525 }\
7526 },createContext:function (canvas, useWebGL, setInModule) {\
7527 var ctx;\
7528 try {\
7529 if (useWebGL) {\
7530 ctx = canvas.getContext('experimental-webgl', {\
7531 alpha: false\
7532 });\
7533 } else {\
7534 ctx = canvas.getContext('2d');\
7535 }\
7536 if (!ctx) throw ':(';\
7537 } catch (e) {\
7538 Module.print('Could not create canvas - ' + e);\
7539 return null;\
7540 }\
7541 if (useWebGL) {\
7542 // Set the background of the WebGL canvas to black\
7543 canvas.style.backgroundColor = \"black\";\
7544 // Warn on context loss\
7545 canvas.addEventListener('webglcontextlost', function(event) {\
7546 alert('WebGL context lost. You will need to reload the page.');\
7547 }, false);\
7548 }\
7549 if (setInModule) {\
7550 Module.ctx = ctx;\
7551 Module.useWebGL = useWebGL;\
7552 Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() });\
7553 Browser.init();\
7554 }\
7555 return ctx;\
7556 },destroyContext:function (canvas, useWebGL, setInModule) {},fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function (lockPointer, resizeCanvas) {\
7557 Browser.lockPointer = lockPointer;\
7558 Browser.resizeCanvas = resizeCanvas;\
7559 if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true;\
7560 if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false;\
7561 var canvas = Module['canvas'];\
7562 function fullScreenChange() {\
7563 Browser.isFullScreen = false;\
7564 if ((document['webkitFullScreenElement'] || document['webkitFullscreenElement'] ||\
7565 document['mozFullScreenElement'] || document['mozFullscreenElement'] ||\
7566 document['fullScreenElement'] || document['fullscreenElement']) === canvas) {\
7567 canvas.cancelFullScreen = document['cancelFullScreen'] ||\
7568 document['mozCancelFullScreen'] ||\
7569 document['webkitCancelFullScreen'];\
7570 canvas.cancelFullScreen = canvas.cancelFullScreen.bind(document);\
7571 if (Browser.lockPointer) canvas.requestPointerLock();\
7572 Browser.isFullScreen = true;\
7573 if (Browser.resizeCanvas) Browser.setFullScreenCanvasSize();\
7574 } else if (Browser.resizeCanvas){\
7575 Browser.setWindowedCanvasSize();\
7576 }\
7577 if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullScreen);\
7578 }\
7579 if (!Browser.fullScreenHandlersInstalled) {\
7580 Browser.fullScreenHandlersInstalled = true;\
7581 document.addEventListener('fullscreenchange', fullScreenChange, false);\
7582 document.addEventListener('mozfullscreenchange', fullScreenChange, false);\
7583 document.addEventListener('webkitfullscreenchange', fullScreenChange, false);\
7584 }\
7585 canvas.requestFullScreen = canvas['requestFullScreen'] ||\
7586 canvas['mozRequestFullScreen'] ||\
7587 (canvas['webkitRequestFullScreen'] ? function() { canvas['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null);\
7588 canvas.requestFullScreen();\
7589 },requestAnimationFrame:function (func) {\
7590 if (!window.requestAnimationFrame) {\
7591 window.requestAnimationFrame = window['requestAnimationFrame'] ||\
7592 window['mozRequestAnimationFrame'] ||\
7593 window['webkitRequestAnimationFrame'] ||\
7594 window['msRequestAnimationFrame'] ||\
7595 window['oRequestAnimationFrame'] ||\
7596 window['setTimeout'];\
7597 }\
7598 window.requestAnimationFrame(func);\
7599 },safeCallback:function (func) {\
7600 return function() {\
7601 if (!ABORT) return func.apply(null, arguments);\
7602 };\
7603 },safeRequestAnimationFrame:function (func) {\
7604 return Browser.requestAnimationFrame(function() {\
7605 if (!ABORT) func();\
7606 });\
7607 },safeSetTimeout:function (func, timeout) {\
7608 return setTimeout(function() {\
7609 if (!ABORT) func();\
7610 }, timeout);\
7611 },safeSetInterval:function (func, timeout) {\
7612 return setInterval(function() {\
7613 if (!ABORT) func();\
7614 }, timeout);\
7615 },getMimetype:function (name) {\
7616 return {\
7617 'jpg': 'image/jpeg',\
7618 'jpeg': 'image/jpeg',\
7619 'png': 'image/png',\
7620 'bmp': 'image/bmp',\
7621 'ogg': 'audio/ogg',\
7622 'wav': 'audio/wav',\
7623 'mp3': 'audio/mpeg'\
7624 }[name.substr(name.lastIndexOf('.')+1)];\
7625 },getUserMedia:function (func) {\
7626 if(!window.getUserMedia) {\
7627 window.getUserMedia = navigator['getUserMedia'] ||\
7628 navigator['mozGetUserMedia'];\
7629 }\
7630 window.getUserMedia(func);\
7631 },getMovementX:function (event) {\
7632 return event['movementX'] ||\
7633 event['mozMovementX'] ||\
7634 event['webkitMovementX'] ||\
7635 0;\
7636 },getMovementY:function (event) {\
7637 return event['movementY'] ||\
7638 event['mozMovementY'] ||\
7639 event['webkitMovementY'] ||\
7640 0;\
7641 },mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,calculateMouseEvent:function (event) { // event should be mousemove, mousedown or mouseup\
7642 if (Browser.pointerLock) {\
7643 // When the pointer is locked, calculate the coordinates\
7644 // based on the movement of the mouse.\
7645 // Workaround for Firefox bug 764498\
7646 if (event.type != 'mousemove' &&\
7647 ('mozMovementX' in event)) {\
7648 Browser.mouseMovementX = Browser.mouseMovementY = 0;\
7649 } else {\
7650 Browser.mouseMovementX = Browser.getMovementX(event);\
7651 Browser.mouseMovementY = Browser.getMovementY(event);\
7652 }\
7653 // check if SDL is available\
7654 if (typeof SDL != \"undefined\") {\
7655 Browser.mouseX = SDL.mouseX + Browser.mouseMovementX;\
7656 Browser.mouseY = SDL.mouseY + Browser.mouseMovementY;\
7657 } else {\
7658 // just add the mouse delta to the current absolut mouse position\
7659 // FIXME: ideally this should be clamped against the canvas size and zero\
7660 Browser.mouseX += Browser.mouseMovementX;\
7661 Browser.mouseY += Browser.mouseMovementY;\
7662 } \
7663 } else {\
7664 // Otherwise, calculate the movement based on the changes\
7665 // in the coordinates.\
7666 var rect = Module[\"canvas\"].getBoundingClientRect();\
7667 var x, y;\
7668 if (event.type == 'touchstart' ||\
7669 event.type == 'touchend' ||\
7670 event.type == 'touchmove') {\
7671 var t = event.touches.item(0);\
7672 if (t) {\
7673 x = t.pageX - (window.scrollX + rect.left);\
7674 y = t.pageY - (window.scrollY + rect.top);\
7675 } else {\
7676 return;\
7677 }\
7678 } else {\
7679 x = event.pageX - (window.scrollX + rect.left);\
7680 y = event.pageY - (window.scrollY + rect.top);\
7681 }\
7682 // the canvas might be CSS-scaled compared to its backbuffer;\
7683 // SDL-using content will want mouse coordinates in terms\
7684 // of backbuffer units.\
7685 var cw = Module[\"canvas\"].width;\
7686 var ch = Module[\"canvas\"].height;\
7687 x = x * (cw / rect.width);\
7688 y = y * (ch / rect.height);\
7689 Browser.mouseMovementX = x - Browser.mouseX;\
7690 Browser.mouseMovementY = y - Browser.mouseY;\
7691 Browser.mouseX = x;\
7692 Browser.mouseY = y;\
7693 }\
7694 },xhrLoad:function (url, onload, onerror) {\
7695 var xhr = new XMLHttpRequest();\
7696 xhr.open('GET', url, true);\
7697 xhr.responseType = 'arraybuffer';\
7698 xhr.onload = function() {\
7699 if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0\
7700 onload(xhr.response);\
7701 } else {\
7702 onerror();\
7703 }\
7704 };\
7705 xhr.onerror = onerror;\
7706 xhr.send(null);\
7707 },asyncLoad:function (url, onload, onerror, noRunDep) {\
7708 Browser.xhrLoad(url, function(arrayBuffer) {\
7709 assert(arrayBuffer, 'Loading data file \"' + url + '\" failed (no arrayBuffer).');\
7710 onload(new Uint8Array(arrayBuffer));\
7711 if (!noRunDep) removeRunDependency('al ' + url);\
7712 }, function(event) {\
7713 if (onerror) {\
7714 onerror();\
7715 } else {\
7716 throw 'Loading data file \"' + url + '\" failed.';\
7717 }\
7718 });\
7719 if (!noRunDep) addRunDependency('al ' + url);\
7720 },resizeListeners:[],updateResizeListeners:function () {\
7721 var canvas = Module['canvas'];\
7722 Browser.resizeListeners.forEach(function(listener) {\
7723 listener(canvas.width, canvas.height);\
7724 });\
7725 },setCanvasSize:function (width, height, noUpdates) {\
7726 var canvas = Module['canvas'];\
7727 canvas.width = width;\
7728 canvas.height = height;\
7729 if (!noUpdates) Browser.updateResizeListeners();\
7730 },windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function () {\
7731 var canvas = Module['canvas'];\
7732 this.windowedWidth = canvas.width;\
7733 this.windowedHeight = canvas.height;\
7734 canvas.width = screen.width;\
7735 canvas.height = screen.height;\
7736 // check if SDL is available \
7737 if (typeof SDL != \"undefined\") {\
7738 var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)];\
7739 flags = flags | 0x00800000; // set SDL_FULLSCREEN flag\
7740 HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags\
7741 }\
7742 Browser.updateResizeListeners();\
7743 },setWindowedCanvasSize:function () {\
7744 var canvas = Module['canvas'];\
7745 canvas.width = this.windowedWidth;\
7746 canvas.height = this.windowedHeight;\
7747 // check if SDL is available \
7748 if (typeof SDL != \"undefined\") {\
7749 var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)];\
7750 flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag\
7751 HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags\
7752 }\
7753 Browser.updateResizeListeners();\
7754 }};\
7755 _fputc.ret = allocate([0], \"i8\", ALLOC_STATIC);\
7756 FS.staticInit();__ATINIT__.unshift({ func: function() { if (!Module[\"noFSInit\"] && !FS.init.initialized) FS.init() } });__ATMAIN__.push({ func: function() { FS.ignorePermissions = false } });__ATEXIT__.push({ func: function() { FS.quit() } });Module[\"FS_createFolder\"] = FS.createFolder;Module[\"FS_createPath\"] = FS.createPath;Module[\"FS_createDataFile\"] = FS.createDataFile;Module[\"FS_createPreloadedFile\"] = FS.createPreloadedFile;Module[\"FS_createLazyFile\"] = FS.createLazyFile;Module[\"FS_createLink\"] = FS.createLink;Module[\"FS_createDevice\"] = FS.createDevice;\
7757 ___errno_state = Runtime.staticAlloc(4); HEAP32[((___errno_state)>>2)]=0;\
7758 __ATINIT__.unshift({ func: function() { TTY.init() } });__ATEXIT__.push({ func: function() { TTY.shutdown() } });TTY.utf8 = new Runtime.UTF8Processor();\
7759 __ATINIT__.push({ func: function() { SOCKFS.root = FS.mount(SOCKFS, {}, null); } });\
7760 _fgetc.ret = allocate([0], \"i8\", ALLOC_STATIC);\
7761 ___buildEnvironment(ENV);\
7762 Module[\"requestFullScreen\"] = function(lockPointer, resizeCanvas) { Browser.requestFullScreen(lockPointer, resizeCanvas) };\
7763 Module[\"requestAnimationFrame\"] = function(func) { Browser.requestAnimationFrame(func) };\
7764 Module[\"setCanvasSize\"] = function(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) };\
7765 Module[\"pauseMainLoop\"] = function() { Browser.mainLoop.pause() };\
7766 Module[\"resumeMainLoop\"] = function() { Browser.mainLoop.resume() };\
7767 Module[\"getUserMedia\"] = function() { Browser.getUserMedia() }\
7768 STACK_BASE = STACKTOP = Runtime.alignMemory(STATICTOP);\
7769 staticSealed = true; // seal the static portion of memory\
7770 STACK_MAX = STACK_BASE + 5242880;\
7771 DYNAMIC_BASE = DYNAMICTOP = Runtime.alignMemory(STACK_MAX);\
7772 assert(DYNAMIC_BASE < TOTAL_MEMORY); // Stack must fit in TOTAL_MEMORY; allocations from here on may enlarge TOTAL_MEMORY\
7773 var Math_min = Math.min;\
7774 function invoke_ii(index,a1) {\
7775 try {\
7776 return Module[\"dynCall_ii\"](index,a1);\
7777 } catch(e) {\
7778 if (typeof e !== 'number' && e !== 'longjmp') throw e;\
7779 asm[\"setThrew\"](1, 0);\
7780 }\
7781 }\
7782 function invoke_vi(index,a1) {\
7783 try {\
7784 Module[\"dynCall_vi\"](index,a1);\
7785 } catch(e) {\
7786 if (typeof e !== 'number' && e !== 'longjmp') throw e;\
7787 asm[\"setThrew\"](1, 0);\
7788 }\
7789 }\
7790 function invoke_vii(index,a1,a2) {\
7791 try {\
7792 Module[\"dynCall_vii\"](index,a1,a2);\
7793 } catch(e) {\
7794 if (typeof e !== 'number' && e !== 'longjmp') throw e;\
7795 asm[\"setThrew\"](1, 0);\
7796 }\
7797 }\
7798 function invoke_iiiii(index,a1,a2,a3,a4) {\
7799 try {\
7800 return Module[\"dynCall_iiiii\"](index,a1,a2,a3,a4);\
7801 } catch(e) {\
7802 if (typeof e !== 'number' && e !== 'longjmp') throw e;\
7803 asm[\"setThrew\"](1, 0);\
7804 }\
7805 }\
7806 function invoke_iiii(index,a1,a2,a3) {\
7807 try {\
7808 return Module[\"dynCall_iiii\"](index,a1,a2,a3);\
7809 } catch(e) {\
7810 if (typeof e !== 'number' && e !== 'longjmp') throw e;\
7811 asm[\"setThrew\"](1, 0);\
7812 }\
7813 }\
7814 function invoke_v(index) {\
7815 try {\
7816 Module[\"dynCall_v\"](index);\
7817 } catch(e) {\
7818 if (typeof e !== 'number' && e !== 'longjmp') throw e;\
7819 asm[\"setThrew\"](1, 0);\
7820 }\
7821 }\
7822 function invoke_iii(index,a1,a2) {\
7823 try {\
7824 return Module[\"dynCall_iii\"](index,a1,a2);\
7825 } catch(e) {\
7826 if (typeof e !== 'number' && e !== 'longjmp') throw e;\
7827 asm[\"setThrew\"](1, 0);\
7828 }\
7829 }\
7830 function asmPrintInt(x, y) {\
7831 Module.print('int ' + x + ',' + y);// + ' ' + new Error().stack);\
7832 }\
7833 function asmPrintFloat(x, y) {\
7834 Module.print('float ' + x + ',' + y);// + ' ' + new Error().stack);\
7835 }\
7836 // EMSCRIPTEN_START_ASM\
7837 var asm=(function(global,env,buffer){\"use asm\";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.STACKTOP|0;var j=env.STACK_MAX|0;var k=env.tempDoublePtr|0;var l=env.ABORT|0;var m=env._stdin|0;var n=env._stderr|0;var o=env._stdout|0;var p=+env.NaN;var q=+env.Infinity;var r=0;var s=0;var t=0;var u=0;var v=0,w=0,x=0,y=0,z=0.0,A=0,B=0,C=0,D=0.0;var E=0;var F=0;var G=0;var H=0;var I=0;var J=0;var K=0;var L=0;var M=0;var N=0;var O=global.Math.floor;var P=global.Math.abs;var Q=global.Math.sqrt;var R=global.Math.pow;var S=global.Math.cos;var T=global.Math.sin;var U=global.Math.tan;var V=global.Math.acos;var W=global.Math.asin;var X=global.Math.atan;var Y=global.Math.atan2;var Z=global.Math.exp;var _=global.Math.log;var $=global.Math.ceil;var aa=global.Math.imul;var ab=env.abort;var ac=env.assert;var ad=env.asmPrintInt;var ae=env.asmPrintFloat;var af=env.min;var ag=env.jsCall;var ah=env.invoke_ii;var ai=env.invoke_vi;var aj=env.invoke_vii;var ak=env.invoke_iiiii;var al=env.invoke_iiii;var am=env.invoke_v;var an=env.invoke_iii;var ao=env._llvm_lifetime_end;var ap=env._lseek;var aq=env.__scanString;var ar=env._fclose;var as=env._strtoul;var at=env.__isFloat;var au=env._fflush;var av=env._fputc;var aw=env._fwrite;var ax=env._strncmp;var ay=env._send;var az=env._fputs;var aA=env._tmpnam;var aB=env._isspace;var aC=env._localtime;var aD=env._read;var aE=env._ceil;var aF=env._strstr;var aG=env._fsync;var aH=env._fscanf;var aI=env._fmod;var aJ=env._remove;var aK=env._modf;var aL=env._strcmp;var aM=env._memchr;var aN=env._llvm_va_end;var aO=env._tmpfile;var aP=env._snprintf;var aQ=env._fgetc;var aR=env._cosh;var aS=env._fgets;var aT=env._close;var aU=env._strchr;var aV=env._asin;var aW=env._clock;var aX=env.___setErrNo;var aY=env._isxdigit;var aZ=env._ftell;var a_=env._exit;var a$=env._sprintf;var a0=env._strrchr;var a1=env._freopen;var a2=env._strcspn;var a3=env.__isLeapYear;var a4=env._ferror;var a5=env._gmtime;var a6=env._localtime_r;var a7=env._sinh;var a8=env._recv;var a9=env._cos;var ba=env._putchar;var bb=env._islower;var bc=env.__exit;var bd=env._isupper;var be=env._strftime;var bf=env._rand;var bg=env._tzset;var bh=env._setlocale;var bi=env._ldexp;var bj=env._toupper;var bk=env._pread;var bl=env._fopen;var bm=env._open;var bn=env._frexp;var bo=env.__arraySum;var bp=env._log;var bq=env._isalnum;var br=env._mktime;var bs=env._system;var bt=env._isalpha;var bu=env._rmdir;var bv=env._log10;var bw=env._fread;var bx=env.__reallyNegative;var by=env.__formatString;var bz=env._getenv;var bA=env._llvm_pow_f64;var bB=env._sbrk;var bC=env._tanh;var bD=env._localeconv;var bE=env.___errno_location;var bF=env._strerror;var bG=env._llvm_lifetime_start;var bH=env.__parseInt;var bI=env._ungetc;var bJ=env._rename;var bK=env._sysconf;var bL=env._srand;var bM=env._abort;var bN=env._fprintf;var bO=env._tan;var bP=env.___buildEnvironment;var bQ=env._feof;var bR=env.__addDays;var bS=env._strncat;var bT=env._gmtime_r;var bU=env._ispunct;var bV=env._clearerr;var bW=env._fabs;var bX=env._floor;var bY=env._fseek;var bZ=env._sqrt;var b_=env._write;var b$=env._sin;var b0=env._longjmp;var b1=env._atan;var b2=env._strpbrk;var b3=env._unlink;var b4=env._acos;var b5=env._pwrite;var b6=env._strerror_r;var b7=env._difftime;var b8=env._iscntrl;var b9=env._atan2;var ca=env._exp;var cb=env._time;var cc=env._setvbuf;\
7838 // EMSCRIPTEN_START_FUNCS\
7839 function ck(a){a=a|0;var b=0;b=i;i=i+a|0;i=i+7>>3<<3;return b|0}function cl(){return i|0}function cm(a){a=a|0;i=a}function cn(a,b){a=a|0;b=b|0;if((r|0)==0){r=a;s=b}}function co(b){b=b|0;a[k]=a[b];a[k+1|0]=a[b+1|0];a[k+2|0]=a[b+2|0];a[k+3|0]=a[b+3|0]}function cp(b){b=b|0;a[k]=a[b];a[k+1|0]=a[b+1|0];a[k+2|0]=a[b+2|0];a[k+3|0]=a[b+3|0];a[k+4|0]=a[b+4|0];a[k+5|0]=a[b+5|0];a[k+6|0]=a[b+6|0];a[k+7|0]=a[b+7|0]}function cq(a){a=a|0;E=a}function cr(a){a=a|0;F=a}function cs(a){a=a|0;G=a}function ct(a){a=a|0;H=a}function cu(a){a=a|0;I=a}function cv(a){a=a|0;J=a}function cw(a){a=a|0;K=a}function cx(a){a=a|0;L=a}function cy(a){a=a|0;M=a}function cz(a){a=a|0;N=a}function cA(){}function cB(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=a+8|0;a=c[d>>2]|0;e=b;f=a;g=c[e+4>>2]|0;c[f>>2]=c[e>>2];c[f+4>>2]=g;c[a+8>>2]=c[b+8>>2];c[d>>2]=(c[d>>2]|0)+16;return}function cC(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;if((a|0)==(b|0)){return}e=a+8|0;a=(c[e>>2]|0)+(-d<<4)|0;c[e>>2]=a;if((d|0)<=0){return}f=b+8|0;b=0;g=a;while(1){a=c[f>>2]|0;c[f>>2]=a+16;h=g+(b<<4)|0;i=a;j=c[h+4>>2]|0;c[i>>2]=c[h>>2];c[i+4>>2]=j;c[a+8>>2]=c[g+(b<<4)+8>>2];a=b+1|0;if((a|0)>=(d|0)){break}b=a;g=c[e>>2]|0}return}function cD(a,c){a=a|0;c=c|0;b[c+52>>1]=b[a+52>>1]|0;return}function cE(a,b){a=a|0;b=b|0;var d=0;d=(c[a+16>>2]|0)+88|0;a=c[d>>2]|0;c[d>>2]=b;return a|0}function cF(a){a=a|0;return(c[a+8>>2]|0)-(c[a+12>>2]|0)>>4|0}function cG(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;if((b|0)<=-1){d=a+8|0;c[d>>2]=(c[d>>2]|0)+(b+1<<4);return}d=a+8|0;e=c[d>>2]|0;f=a+12|0;a=(c[f>>2]|0)+(b<<4)|0;if(e>>>0<a>>>0){g=e;while(1){c[d>>2]=g+16;c[g+8>>2]=0;e=c[d>>2]|0;h=(c[f>>2]|0)+(b<<4)|0;if(e>>>0<h>>>0){g=e}else{i=h;break}}}else{i=a}c[d>>2]=i;return}function cH(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else if((b|0)==(-10002|0)){f=a+72|0;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){f=1032;break}f=e+24+(g-1<<4)|0;break}}}while(0);b=f+16|0;g=a+8|0;a=c[g>>2]|0;if(b>>>0<a>>>0){h=f;i=b}else{j=a;k=j-16|0;c[g>>2]=k;return}while(1){a=i;b=h;f=c[a+4>>2]|0;c[b>>2]=c[a>>2];c[b+4>>2]=f;c[h+8>>2]=c[h+24>>2];f=i+16|0;b=c[g>>2]|0;if(f>>>0<b>>>0){h=i;i=f}else{j=b;break}}k=j-16|0;c[g>>2]=k;return}function cI(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else if((b|0)==(-10002|0)){f=a+72|0;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){f=1032;break}f=e+24+(g-1<<4)|0;break}}}while(0);b=a+8|0;a=c[b>>2]|0;if(a>>>0>f>>>0){h=a}else{i=a;j=i;k=f;l=j|0;m=c[l>>2]|0;n=j+4|0;o=c[n>>2]|0;p=k|0;c[p>>2]=m;q=k+4|0;c[q>>2]=o;r=i+8|0;s=c[r>>2]|0;t=f+8|0;c[t>>2]=s;return}while(1){a=h-16|0;g=a;e=h;u=c[g+4>>2]|0;c[e>>2]=c[g>>2];c[e+4>>2]=u;c[h+8>>2]=c[h-16+8>>2];if(a>>>0>f>>>0){h=a}else{break}}i=c[b>>2]|0;j=i;k=f;l=j|0;m=c[l>>2]|0;n=j+4|0;o=c[n>>2]|0;p=k|0;c[p>>2]=m;q=k+4|0;c[q>>2]=o;r=i+8|0;s=c[r>>2]|0;t=f+8|0;c[t>>2]=s;return}function cJ(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else if((b|0)==(-10002|0)){f=a+72|0;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){f=1032;break}f=e+24+(g-1<<4)|0;break}}}while(0);b=a+8|0;a=c[b>>2]|0;g=f;e=a;h=c[g+4>>2]|0;c[e>>2]=c[g>>2];c[e+4>>2]=h;c[a+8>>2]=c[f+8>>2];c[b>>2]=(c[b>>2]|0)+16;return}function cK(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else if((b|0)==(-10002|0)){f=a+72|0;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){h=-1;return h|0}else{f=e+24+(g-1<<4)|0;break}}}}while(0);if((f|0)==1032){h=-1;return h|0}h=c[f+8>>2]|0;return h|0}function cL(a,b){a=a|0;b=b|0;var d=0;if((b|0)==-1){d=10432}else{d=c[872+(b<<2)>>2]|0}return d|0}function cM(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0;do{if((e|0)>0){f=(c[b+12>>2]|0)+(e-1<<4)|0;g=f>>>0<(c[b+8>>2]|0)>>>0?f:1032}else{if((e|0)>-1e4){g=(c[b+8>>2]|0)+(e<<4)|0;break}if((e|0)==(-1e4|0)){g=(c[b+16>>2]|0)+96|0;break}else if((e|0)==(-10001|0)){f=b+88|0;c[f>>2]=c[(c[c[(c[b+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[b+96>>2]=5;g=f;break}else if((e|0)==(-10002|0)){g=b+72|0;break}else{f=c[c[(c[b+20>>2]|0)+4>>2]>>2]|0;h=-10002-e|0;if((h|0)>(d[f+7|0]|0)){g=1032;break}g=f+24+(h-1<<4)|0;break}}}while(0);if((c[g+8>>2]|0)!=6){i=0;return i|0}i=(a[(c[g>>2]|0)+6|0]|0)!=0|0;return i|0}function cN(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;if((b|0)>8e3){d=0;return d|0}e=a+8|0;f=c[e>>2]|0;g=f;if(((g-(c[a+12>>2]|0)>>4)+b|0)>8e3){d=0;return d|0}if((b|0)<=0){d=1;return d|0}if(((c[a+28>>2]|0)-g|0)>(b<<4|0)){h=f}else{eA(a,b);h=c[e>>2]|0}e=(c[a+20>>2]|0)+8|0;a=h+(b<<4)|0;if((c[e>>2]|0)>>>0>=a>>>0){d=1;return d|0}c[e>>2]=a;d=1;return d|0}function cO(a){a=a|0;var b=0,d=0;b=c[a+16>>2]|0;if((c[b+68>>2]|0)>>>0>=(c[b+64>>2]|0)>>>0){e1(a)}b=fT(a)|0;d=a+8|0;a=c[d>>2]|0;c[a>>2]=b;c[a+8>>2]=8;c[d>>2]=(c[d>>2]|0)+16;return b|0}function cP(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;g=(e|0)==-10001;do{if(g){h=c[b+20>>2]|0;if((h|0)!=(c[b+40>>2]|0)){j=h;k=124;break}es(b,10448,(h=i,i=i+1|0,i=i+7>>3<<3,c[h>>2]=0,h)|0);i=h;k=117}else{k=117}}while(0);do{if((k|0)==117){if((e|0)>0){h=(c[b+12>>2]|0)+(e-1<<4)|0;l=h>>>0<(c[b+8>>2]|0)>>>0?h:1032;break}if((e|0)>-1e4){l=(c[b+8>>2]|0)+(e<<4)|0;break}if((e|0)==(-1e4|0)){l=(c[b+16>>2]|0)+96|0;break}else if((e|0)==(-10001|0)){j=c[b+20>>2]|0;k=124;break}else if((e|0)==(-10002|0)){l=b+72|0;break}else{h=c[c[(c[b+20>>2]|0)+4>>2]>>2]|0;m=-10002-e|0;if((m|0)>(d[h+7|0]|0|0)){l=1032;break}l=h+24+(m-1<<4)|0;break}}}while(0);if((k|0)==124){k=b+88|0;c[k>>2]=c[(c[c[j+4>>2]>>2]|0)+12>>2];c[b+96>>2]=5;l=k}do{if(g){k=c[c[(c[b+20>>2]|0)+4>>2]>>2]|0;j=b+8|0;c[k+12>>2]=c[(c[j>>2]|0)-16>>2];m=c[j>>2]|0;if((c[m-16+8>>2]|0)<=3){break}j=c[m-16>>2]|0;if((a[j+5|0]&3)==0){break}if((a[k+5|0]&4)==0){break}e7(b,k,j)}else{j=b+8|0;k=c[j>>2]|0;m=k-16|0;h=l;n=c[m+4>>2]|0;c[h>>2]=c[m>>2];c[h+4>>2]=n;c[l+8>>2]=c[k-16+8>>2];if((e|0)>=-10002){break}k=c[j>>2]|0;if((c[k-16+8>>2]|0)<=3){break}j=c[k-16>>2]|0;if((a[j+5|0]&3)==0){break}k=c[c[(c[b+20>>2]|0)+4>>2]>>2]|0;if((a[k+5|0]&4)==0){break}e7(b,k,j)}}while(0);e=b+8|0;c[e>>2]=(c[e>>2]|0)-16;i=f;return}function cQ(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032;g=149}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;g=149;break}if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;g=149;break}else if((b|0)==(-10002|0)){f=a+72|0;g=149;break}else if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;g=149;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;h=-10002-b|0;if((h|0)>(d[e+7|0]|0|0)){i=-1;break}f=e+24+(h-1<<4)|0;g=149;break}}}while(0);do{if((g|0)==149){if((f|0)==1032){i=-1;break}b=c[f+8>>2]|0;if((b|0)==4){j=1}else{i=b;break}return j|0}}while(0);j=(i|0)==3|0;return j|0}function cR(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else if((b|0)==(-10002|0)){f=a+72|0;break}else if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){f=1032;break}f=e+24+(g-1<<4)|0;break}}}while(0);b=c[f+8>>2]|0;if((b|0)==7){h=1;return h|0}h=(b|0)==2|0;return h|0}function cS(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+16|0;f=e|0;do{if((b|0)>0){g=(c[a+12>>2]|0)+(b-1<<4)|0;h=g>>>0<(c[a+8>>2]|0)>>>0?g:1032}else{if((b|0)>-1e4){h=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10001|0)){g=a+88|0;c[g>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;h=g;break}else if((b|0)==(-1e4|0)){h=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10002|0)){h=a+72|0;break}else{g=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;j=-10002-b|0;if((j|0)>(d[g+7|0]|0|0)){h=1032;break}h=g+24+(j-1<<4)|0;break}}}while(0);if((c[h+8>>2]|0)==3){k=1;i=e;return k|0}k=(gk(h,f)|0)!=0|0;i=e;return k|0}function cT(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;do{if((b|0)>0){f=(c[a+12>>2]|0)+(b-1<<4)|0;g=f>>>0<(c[a+8>>2]|0)>>>0?f:1032}else{if((b|0)>-1e4){g=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10002|0)){g=a+72|0;break}else if((b|0)==(-10001|0)){f=a+88|0;c[f>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;g=f;break}else if((b|0)==(-1e4|0)){g=(c[a+16>>2]|0)+96|0;break}else{f=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;h=-10002-b|0;if((h|0)>(d[f+7|0]|0|0)){g=1032;break}g=f+24+(h-1<<4)|0;break}}}while(0);do{if((e|0)>0){b=(c[a+12>>2]|0)+(e-1<<4)|0;i=b>>>0<(c[a+8>>2]|0)>>>0?b:1032}else{if((e|0)>-1e4){i=(c[a+8>>2]|0)+(e<<4)|0;break}if((e|0)==(-10001|0)){b=a+88|0;c[b>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;i=b;break}else if((e|0)==(-10002|0)){i=a+72|0;break}else if((e|0)==(-1e4|0)){i=(c[a+16>>2]|0)+96|0;break}else{b=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;h=-10002-e|0;if((h|0)>(d[b+7|0]|0|0)){j=0;return j|0}else{i=b+24+(h-1<<4)|0;break}}}}while(0);if((g|0)==1032|(i|0)==1032){j=0;return j|0}j=fr(g,i)|0;return j|0}function cU(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;do{if((b|0)>0){f=(c[a+12>>2]|0)+(b-1<<4)|0;g=f>>>0<(c[a+8>>2]|0)>>>0?f:1032}else{if((b|0)>-1e4){g=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10002|0)){g=a+72|0;break}else if((b|0)==(-1e4|0)){g=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10001|0)){f=a+88|0;c[f>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;g=f;break}else{f=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;h=-10002-b|0;if((h|0)>(d[f+7|0]|0|0)){g=1032;break}g=f+24+(h-1<<4)|0;break}}}while(0);do{if((e|0)>0){b=(c[a+12>>2]|0)+(e-1<<4)|0;i=b>>>0<(c[a+8>>2]|0)>>>0?b:1032}else{if((e|0)>-1e4){i=(c[a+8>>2]|0)+(e<<4)|0;break}if((e|0)==(-10001|0)){b=a+88|0;c[b>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;i=b;break}else if((e|0)==(-10002|0)){i=a+72|0;break}else if((e|0)==(-1e4|0)){i=(c[a+16>>2]|0)+96|0;break}else{b=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;h=-10002-e|0;if((h|0)>(d[b+7|0]|0|0)){j=0;return j|0}else{i=b+24+(h-1<<4)|0;break}}}}while(0);if((g|0)==1032|(i|0)==1032){j=0;return j|0}if((c[g+8>>2]|0)!=(c[i+8>>2]|0)){j=0;return j|0}j=(gp(a,g,i)|0)!=0|0;return j|0}function cV(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;do{if((b|0)>0){f=(c[a+12>>2]|0)+(b-1<<4)|0;g=f>>>0<(c[a+8>>2]|0)>>>0?f:1032}else{if((b|0)>-1e4){g=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10002|0)){g=a+72|0;break}else if((b|0)==(-10001|0)){f=a+88|0;c[f>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;g=f;break}else if((b|0)==(-1e4|0)){g=(c[a+16>>2]|0)+96|0;break}else{f=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;h=-10002-b|0;if((h|0)>(d[f+7|0]|0|0)){g=1032;break}g=f+24+(h-1<<4)|0;break}}}while(0);do{if((e|0)>0){b=(c[a+12>>2]|0)+(e-1<<4)|0;i=b>>>0<(c[a+8>>2]|0)>>>0?b:1032}else{if((e|0)>-1e4){i=(c[a+8>>2]|0)+(e<<4)|0;break}if((e|0)==(-10001|0)){b=a+88|0;c[b>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;i=b;break}else if((e|0)==(-10002|0)){i=a+72|0;break}else if((e|0)==(-1e4|0)){i=(c[a+16>>2]|0)+96|0;break}else{b=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;h=-10002-e|0;if((h|0)>(d[b+7|0]|0|0)){j=0;return j|0}else{i=b+24+(h-1<<4)|0;break}}}}while(0);if((g|0)==1032|(i|0)==1032){j=0;return j|0}j=go(a,g,i)|0;return j|0}function cW(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0.0;e=i;i=i+16|0;f=e|0;do{if((b|0)>0){g=(c[a+12>>2]|0)+(b-1<<4)|0;j=g>>>0<(c[a+8>>2]|0)>>>0?g:1032}else{if((b|0)>-1e4){j=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10001|0)){g=a+88|0;c[g>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;j=g;break}else if((b|0)==(-10002|0)){j=a+72|0;break}else if((b|0)==(-1e4|0)){j=(c[a+16>>2]|0)+96|0;break}else{g=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;k=-10002-b|0;if((k|0)>(d[g+7|0]|0|0)){j=1032;break}j=g+24+(k-1<<4)|0;break}}}while(0);do{if((c[j+8>>2]|0)==3){l=j}else{b=gk(j,f)|0;if((b|0)==0){m=0.0}else{l=b;break}i=e;return+m}}while(0);m=+h[l>>3];i=e;return+m}function cX(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else if((b|0)==(-10002|0)){f=a+72|0;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){f=1032;break}f=e+24+(g-1<<4)|0;break}}}while(0);b=c[f+8>>2]|0;if((b|0)==0){h=0;return h|0}if((b|0)!=1){h=1;return h|0}h=(c[f>>2]|0)!=0|0;return h|0}function cY(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0;do{if((e|0)>0){f=(c[b+12>>2]|0)+(e-1<<4)|0;g=f>>>0<(c[b+8>>2]|0)>>>0?f:1032}else{if((e|0)>-1e4){g=(c[b+8>>2]|0)+(e<<4)|0;break}if((e|0)==(-10001|0)){f=b+88|0;c[f>>2]=c[(c[c[(c[b+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[b+96>>2]=5;g=f;break}else if((e|0)==(-1e4|0)){g=(c[b+16>>2]|0)+96|0;break}else if((e|0)==(-10002|0)){g=b+72|0;break}else{f=c[c[(c[b+20>>2]|0)+4>>2]>>2]|0;h=-10002-e|0;if((h|0)>(d[f+7|0]|0)){g=1032;break}g=f+24+(h-1<<4)|0;break}}}while(0);if((c[g+8>>2]|0)!=6){i=0;return i|0}e=c[g>>2]|0;if((a[e+6|0]|0)==0){i=0;return i|0}i=c[e+16>>2]|0;return i|0}function cZ(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else if((b|0)==(-10002|0)){f=a+72|0;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){f=1032;break}f=e+24+(g-1<<4)|0;break}}}while(0);b=c[f+8>>2]|0;if((b|0)==7){h=(c[f>>2]|0)+24|0;return h|0}else if((b|0)==2){h=c[f>>2]|0;return h|0}else{h=0;return h|0}return 0}function c_(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else if((b|0)==(-10002|0)){f=a+72|0;break}else if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){f=1032;break}f=e+24+(g-1<<4)|0;break}}}while(0);if((c[f+8>>2]|0)!=8){h=0;return h|0}h=c[f>>2]|0;return h|0}function c$(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0;e=i;i=i+16|0;f=e|0;do{if((b|0)>0){g=(c[a+12>>2]|0)+(b-1<<4)|0;j=g>>>0<(c[a+8>>2]|0)>>>0?g:1032}else{if((b|0)>-1e4){j=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10002|0)){j=a+72|0;break}else if((b|0)==(-1e4|0)){j=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10001|0)){g=a+88|0;c[g>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;j=g;break}else{g=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;k=-10002-b|0;if((k|0)>(d[g+7|0]|0|0)){j=1032;break}j=g+24+(k-1<<4)|0;break}}}while(0);do{if((c[j+8>>2]|0)==3){l=j}else{b=gk(j,f)|0;if((b|0)==0){m=0}else{l=b;break}i=e;return m|0}}while(0);m=~~+h[l>>3];i=e;return m|0}function c0(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=(b|0)>0;do{if(f){g=(c[a+12>>2]|0)+(b-1<<4)|0;h=g>>>0<(c[a+8>>2]|0)>>>0?g:1032}else{if((b|0)>-1e4){h=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10001|0)){g=a+88|0;c[g>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;h=g;break}else if((b|0)==(-1e4|0)){h=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10002|0)){h=a+72|0;break}else{g=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;i=-10002-b|0;if((i|0)>(d[g+7|0]|0|0)){h=1032;break}h=g+24+(i-1<<4)|0;break}}}while(0);do{if((c[h+8>>2]|0)==4){j=h}else{if((gl(a,h)|0)==0){if((e|0)==0){k=0;return k|0}c[e>>2]=0;k=0;return k|0}i=a+16|0;g=c[i>>2]|0;if((c[g+68>>2]|0)>>>0>=(c[g+64>>2]|0)>>>0){e1(a)}if(f){g=(c[a+12>>2]|0)+(b-1<<4)|0;j=g>>>0<(c[a+8>>2]|0)>>>0?g:1032;break}if((b|0)>-1e4){j=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-1e4|0)){j=(c[i>>2]|0)+96|0;break}else if((b|0)==(-10001|0)){i=a+88|0;c[i>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;j=i;break}else if((b|0)==(-10002|0)){j=a+72|0;break}else{i=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[i+7|0]|0|0)){j=1032;break}j=i+24+(g-1<<4)|0;break}}}while(0);b=j;if((e|0)!=0){c[e>>2]=c[(c[b>>2]|0)+12>>2]}k=(c[b>>2]|0)+16|0;return k|0}function c1(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else if((b|0)==(-10002|0)){f=a+72|0;break}else if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){f=1032;break}f=e+24+(g-1<<4)|0;break}}}while(0);b=c[f+8>>2]|0;if((b|0)==4){h=c[(c[f>>2]|0)+12>>2]|0;return h|0}else if((b|0)==3){if((gl(a,f)|0)==0){h=0;return h|0}h=c[(c[f>>2]|0)+12>>2]|0;return h|0}else if((b|0)==7){h=c[(c[f>>2]|0)+16>>2]|0;return h|0}else if((b|0)==5){h=ga(c[f>>2]|0)|0;return h|0}else{h=0;return h|0}return 0}function c2(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=(b|0)>0;do{if(e){f=(c[a+12>>2]|0)+(b-1<<4)|0;g=f>>>0<(c[a+8>>2]|0)>>>0?f:1032}else{if((b|0)>-1e4){g=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-1e4|0)){g=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10002|0)){g=a+72|0;break}else if((b|0)==(-10001|0)){f=a+88|0;c[f>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;g=f;break}else{f=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;h=-10002-b|0;if((h|0)>(d[f+7|0]|0|0)){g=1032;break}g=f+24+(h-1<<4)|0;break}}}while(0);switch(c[g+8>>2]|0){case 5:{i=c[g>>2]|0;return i|0};case 6:{i=c[g>>2]|0;return i|0};case 8:{i=c[g>>2]|0;return i|0};case 7:case 2:{do{if(e){g=(c[a+12>>2]|0)+(b-1<<4)|0;j=g>>>0<(c[a+8>>2]|0)>>>0?g:1032}else{if((b|0)>-1e4){j=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10002|0)){j=a+72|0;break}else if((b|0)==(-10001|0)){g=a+88|0;c[g>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;j=g;break}else if((b|0)==(-1e4|0)){j=(c[a+16>>2]|0)+96|0;break}else{g=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;h=-10002-b|0;if((h|0)>(d[g+7|0]|0|0)){j=1032;break}j=g+24+(h-1<<4)|0;break}}}while(0);b=c[j+8>>2]|0;if((b|0)==2){i=c[j>>2]|0;return i|0}else if((b|0)==7){i=(c[j>>2]|0)+24|0;return i|0}else{i=0;return i|0}break};default:{i=0;return i|0}}return 0}function c3(a){a=a|0;var b=0;b=a+8|0;c[(c[b>>2]|0)+8>>2]=0;c[b>>2]=(c[b>>2]|0)+16;return}function c4(a,b){a=a|0;b=+b;var d=0;d=a+8|0;a=c[d>>2]|0;h[a>>3]=b;c[a+8>>2]=3;c[d>>2]=(c[d>>2]|0)+16;return}function c5(a,b){a=a|0;b=b|0;var d=0;d=a+8|0;a=c[d>>2]|0;h[a>>3]=+(b|0);c[a+8>>2]=3;c[d>>2]=(c[d>>2]|0)+16;return}function c6(a,b){a=a|0;b=b|0;var d=0;d=a+8|0;a=c[d>>2]|0;c[a>>2]=(b|0)!=0;c[a+8>>2]=1;c[d>>2]=(c[d>>2]|0)+16;return}function c7(a,b){a=a|0;b=b|0;var d=0;d=a+8|0;a=c[d>>2]|0;c[a>>2]=b;c[a+8>>2]=2;c[d>>2]=(c[d>>2]|0)+16;return}function c8(a){a=a|0;var b=0,d=0;b=a+8|0;d=c[b>>2]|0;c[d>>2]=a;c[d+8>>2]=8;c[b>>2]=(c[b>>2]|0)+16;return(c[(c[a+16>>2]|0)+112>>2]|0)==(a|0)|0}function c9(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=c[a+16>>2]|0;if((c[e+68>>2]|0)>>>0>=(c[e+64>>2]|0)>>>0){e1(a)}e=a+8|0;f=c[e>>2]|0;c[f>>2]=f_(a,b,d)|0;c[f+8>>2]=4;c[e>>2]=(c[e>>2]|0)+16;return}function da(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;if((b|0)==0){d=a+8|0;c[(c[d>>2]|0)+8>>2]=0;c[d>>2]=(c[d>>2]|0)+16;return}d=j_(b|0)|0;e=c[a+16>>2]|0;if((c[e+68>>2]|0)>>>0>=(c[e+64>>2]|0)>>>0){e1(a)}e=a+8|0;f=c[e>>2]|0;c[f>>2]=f_(a,b,d)|0;c[f+8>>2]=4;c[e>>2]=(c[e>>2]|0)+16;return}function db(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=c[a+16>>2]|0;if((c[e+68>>2]|0)>>>0>=(c[e+64>>2]|0)>>>0){e1(a)}return fx(a,b,d)|0}function dc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=i;i=i+16|0;f=e|0;g=c[a+16>>2]|0;if((c[g+68>>2]|0)>>>0>=(c[g+64>>2]|0)>>>0){e1(a)}g=f;c[g>>2]=d;c[g+4>>2]=0;g=fx(a,b,f|0)|0;i=e;return g|0}function dd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=c[a+16>>2]|0;if((c[e+68>>2]|0)>>>0>=(c[e+64>>2]|0)>>>0){e1(a)}e=c[a+20>>2]|0;if((e|0)==(c[a+40>>2]|0)){f=c[a+72>>2]|0}else{f=c[(c[c[e+4>>2]>>2]|0)+12>>2]|0}e=eO(a,d,f)|0;c[e+16>>2]=b;b=a+8|0;a=(c[b>>2]|0)+(-d<<4)|0;c[b>>2]=a;if((d|0)==0){g=a;h=e;i=g;c[i>>2]=h;j=g+8|0;c[j>>2]=6;k=c[b>>2]|0;l=k+16|0;c[b>>2]=l;return}else{m=d;n=a}while(1){a=m-1|0;d=n+(a<<4)|0;f=e+24+(a<<4)|0;o=c[d+4>>2]|0;c[f>>2]=c[d>>2];c[f+4>>2]=o;c[e+24+(a<<4)+8>>2]=c[n+(a<<4)+8>>2];o=c[b>>2]|0;if((a|0)==0){g=o;break}else{m=a;n=o}}h=e;i=g;c[i>>2]=h;j=g+8|0;c[j>>2]=6;k=c[b>>2]|0;l=k+16|0;c[b>>2]=l;return}function de(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10002|0)){f=a+72|0;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){f=1032;break}f=e+24+(g-1<<4)|0;break}}}while(0);b=(c[a+8>>2]|0)-16|0;gm(a,f,b,b);return}function df(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f|0;do{if((b|0)>0){h=(c[a+12>>2]|0)+(b-1<<4)|0;j=h>>>0<(c[a+8>>2]|0)>>>0?h:1032}else{if((b|0)>-1e4){j=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-1e4|0)){j=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10001|0)){h=a+88|0;c[h>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;j=h;break}else if((b|0)==(-10002|0)){j=a+72|0;break}else{h=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;k=-10002-b|0;if((k|0)>(d[h+7|0]|0|0)){j=1032;break}j=h+24+(k-1<<4)|0;break}}}while(0);c[g>>2]=f_(a,e,j_(e|0)|0)|0;c[g+8>>2]=4;e=a+8|0;gm(a,j,g,c[e>>2]|0);c[e>>2]=(c[e>>2]|0)+16;i=f;return}function dg(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10002|0)){f=a+72|0;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){f=1032;break}f=e+24+(g-1<<4)|0;break}}}while(0);b=a+8|0;a=f8(c[f>>2]|0,(c[b>>2]|0)-16|0)|0;f=c[b>>2]|0;b=a;g=f-16|0;e=c[b+4>>2]|0;c[g>>2]=c[b>>2];c[g+4>>2]=e;c[f-16+8>>2]=c[a+8>>2];return}function dh(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0;do{if((b|0)>0){f=(c[a+12>>2]|0)+(b-1<<4)|0;g=f>>>0<(c[a+8>>2]|0)>>>0?f:1032}else{if((b|0)>-1e4){g=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-1e4|0)){g=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10001|0)){f=a+88|0;c[f>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;g=f;break}else if((b|0)==(-10002|0)){g=a+72|0;break}else{f=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;h=-10002-b|0;if((h|0)>(d[f+7|0]|0|0)){g=1032;break}g=f+24+(h-1<<4)|0;break}}}while(0);b=f3(c[g>>2]|0,e)|0;e=a+8|0;a=c[e>>2]|0;g=b;h=a;f=c[g+4>>2]|0;c[h>>2]=c[g>>2];c[h+4>>2]=f;c[a+8>>2]=c[b+8>>2];c[e>>2]=(c[e>>2]|0)+16;return}function di(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=c[a+16>>2]|0;if((c[e+68>>2]|0)>>>0>=(c[e+64>>2]|0)>>>0){e1(a)}e=a+8|0;f=c[e>>2]|0;c[f>>2]=f5(a,b,d)|0;c[f+8>>2]=5;c[e>>2]=(c[e>>2]|0)+16;return}function dj(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else if((b|0)==(-10002|0)){f=a+72|0;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){f=1032;break}f=e+24+(g-1<<4)|0;break}}}while(0);b=c[f+8>>2]|0;if((b|0)==5){h=c[(c[f>>2]|0)+8>>2]|0}else if((b|0)==7){h=c[(c[f>>2]|0)+8>>2]|0}else{h=c[(c[a+16>>2]|0)+152+(b<<2)>>2]|0}if((h|0)==0){i=0;return i|0}b=a+8|0;a=c[b>>2]|0;c[a>>2]=h;c[a+8>>2]=5;c[b>>2]=(c[b>>2]|0)+16;i=1;return i|0}function dk(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10002|0)){f=a+72|0;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){f=1032;break}f=e+24+(g-1<<4)|0;break}}}while(0);b=c[f+8>>2]|0;if((b|0)==6){g=c[a+8>>2]|0;c[g>>2]=c[(c[f>>2]|0)+12>>2];c[g+8>>2]=5;h=a+8|0;i=c[h>>2]|0;j=i+16|0;c[h>>2]=j;return}else if((b|0)==7){g=c[a+8>>2]|0;c[g>>2]=c[(c[f>>2]|0)+12>>2];c[g+8>>2]=5;h=a+8|0;i=c[h>>2]|0;j=i+16|0;c[h>>2]=j;return}else if((b|0)==8){b=c[f>>2]|0;f=c[a+8>>2]|0;g=b+72|0;e=f;k=c[g+4>>2]|0;c[e>>2]=c[g>>2];c[e+4>>2]=k;c[f+8>>2]=c[b+80>>2];h=a+8|0;i=c[h>>2]|0;j=i+16|0;c[h>>2]=j;return}else{c[(c[a+8>>2]|0)+8>>2]=0;h=a+8|0;i=c[h>>2]|0;j=i+16|0;c[h>>2]=j;return}}function dl(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else if((b|0)==(-10002|0)){f=a+72|0;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){f=1032;break}f=e+24+(g-1<<4)|0;break}}}while(0);b=a+8|0;g=c[b>>2]|0;gn(a,f,g-32|0,g-16|0);c[b>>2]=(c[b>>2]|0)-32;return}function dm(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f|0;do{if((b|0)>0){h=(c[a+12>>2]|0)+(b-1<<4)|0;j=h>>>0<(c[a+8>>2]|0)>>>0?h:1032}else{if((b|0)>-1e4){j=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10001|0)){h=a+88|0;c[h>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;j=h;break}else if((b|0)==(-1e4|0)){j=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10002|0)){j=a+72|0;break}else{h=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;k=-10002-b|0;if((k|0)>(d[h+7|0]|0|0)){j=1032;break}j=h+24+(k-1<<4)|0;break}}}while(0);c[g>>2]=f_(a,e,j_(e|0)|0)|0;c[g+8>>2]=4;e=a+8|0;gn(a,j,g,(c[e>>2]|0)-16|0);c[e>>2]=(c[e>>2]|0)-16;i=f;return}function dn(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;do{if((e|0)>0){f=(c[b+12>>2]|0)+(e-1<<4)|0;g=f>>>0<(c[b+8>>2]|0)>>>0?f:1032}else{if((e|0)>-1e4){g=(c[b+8>>2]|0)+(e<<4)|0;break}if((e|0)==(-1e4|0)){g=(c[b+16>>2]|0)+96|0;break}else if((e|0)==(-10001|0)){f=b+88|0;c[f>>2]=c[(c[c[(c[b+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[b+96>>2]=5;g=f;break}else if((e|0)==(-10002|0)){g=b+72|0;break}else{f=c[c[(c[b+20>>2]|0)+4>>2]>>2]|0;h=-10002-e|0;if((h|0)>(d[f+7|0]|0|0)){g=1032;break}g=f+24+(h-1<<4)|0;break}}}while(0);e=b+8|0;h=c[e>>2]|0;f=g;g=f9(b,c[f>>2]|0,h-32|0)|0;i=h-16|0;j=g;k=c[i+4>>2]|0;c[j>>2]=c[i>>2];c[j+4>>2]=k;c[g+8>>2]=c[h-16+8>>2];h=c[e>>2]|0;if((c[h-16+8>>2]|0)<=3){l=h;m=l-32|0;c[e>>2]=m;return}if((a[(c[h-16>>2]|0)+5|0]&3)==0){l=h;m=l-32|0;c[e>>2]=m;return}g=c[f>>2]|0;if((a[g+5|0]&4)==0){l=h;m=l-32|0;c[e>>2]=m;return}e2(b,g);l=c[e>>2]|0;m=l-32|0;c[e>>2]=m;return}function dp(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;do{if((e|0)>0){g=(c[b+12>>2]|0)+(e-1<<4)|0;h=g>>>0<(c[b+8>>2]|0)>>>0?g:1032}else{if((e|0)>-1e4){h=(c[b+8>>2]|0)+(e<<4)|0;break}if((e|0)==(-10001|0)){g=b+88|0;c[g>>2]=c[(c[c[(c[b+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[b+96>>2]=5;h=g;break}else if((e|0)==(-10002|0)){h=b+72|0;break}else if((e|0)==(-1e4|0)){h=(c[b+16>>2]|0)+96|0;break}else{g=c[c[(c[b+20>>2]|0)+4>>2]>>2]|0;i=-10002-e|0;if((i|0)>(d[g+7|0]|0|0)){h=1032;break}h=g+24+(i-1<<4)|0;break}}}while(0);e=b+8|0;i=c[e>>2]|0;g=h;h=gc(b,c[g>>2]|0,f)|0;f=i-16|0;j=h;k=c[f+4>>2]|0;c[j>>2]=c[f>>2];c[j+4>>2]=k;c[h+8>>2]=c[i-16+8>>2];i=c[e>>2]|0;if((c[i-16+8>>2]|0)<=3){l=i;m=l-16|0;c[e>>2]=m;return}if((a[(c[i-16>>2]|0)+5|0]&3)==0){l=i;m=l-16|0;c[e>>2]=m;return}h=c[g>>2]|0;if((a[h+5|0]&4)==0){l=i;m=l-16|0;c[e>>2]=m;return}e2(b,h);l=c[e>>2]|0;m=l-16|0;c[e>>2]=m;return}function dq(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;do{if((e|0)>0){f=(c[b+12>>2]|0)+(e-1<<4)|0;g=f>>>0<(c[b+8>>2]|0)>>>0?f:1032}else{if((e|0)>-1e4){g=(c[b+8>>2]|0)+(e<<4)|0;break}if((e|0)==(-10001|0)){f=b+88|0;c[f>>2]=c[(c[c[(c[b+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[b+96>>2]=5;g=f;break}else if((e|0)==(-1e4|0)){g=(c[b+16>>2]|0)+96|0;break}else if((e|0)==(-10002|0)){g=b+72|0;break}else{f=c[c[(c[b+20>>2]|0)+4>>2]>>2]|0;h=-10002-e|0;if((h|0)>(d[f+7|0]|0|0)){g=1032;break}g=f+24+(h-1<<4)|0;break}}}while(0);e=b+8|0;h=c[e>>2]|0;if((c[h-16+8>>2]|0)==0){i=0}else{i=c[h-16>>2]|0}h=c[g+8>>2]|0;do{if((h|0)==5){f=g;c[(c[f>>2]|0)+8>>2]=i;if((i|0)==0){break}if((a[i+5|0]&3)==0){break}j=c[f>>2]|0;if((a[j+5|0]&4)==0){break}e2(b,j)}else if((h|0)==7){j=g;c[(c[j>>2]|0)+8>>2]=i;if((i|0)==0){break}if((a[i+5|0]&3)==0){break}f=c[j>>2]|0;if((a[f+5|0]&4)==0){break}e7(b,f,i)}else{c[(c[b+16>>2]|0)+152+(h<<2)>>2]=i}}while(0);c[e>>2]=(c[e>>2]|0)-16;return 1}function dr(a){a=a|0;return d[a+6|0]|0|0}function ds(a,b){a=a|0;b=b|0;var d=0;d=a+16|0;if((b|0)!=0){c[b>>2]=c[(c[d>>2]|0)+16>>2]}return c[(c[d>>2]|0)+12>>2]|0}function dt(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=a+16|0;c[(c[e>>2]|0)+16>>2]=d;c[(c[e>>2]|0)+12>>2]=b;return}function du(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;do{if((e|0)>0){g=(c[b+12>>2]|0)+(e-1<<4)|0;h=g>>>0<(c[b+8>>2]|0)>>>0?g:1032}else{if((e|0)>-1e4){h=(c[b+8>>2]|0)+(e<<4)|0;break}if((e|0)==(-10002|0)){h=b+72|0;break}else if((e|0)==(-10001|0)){g=b+88|0;c[g>>2]=c[(c[c[(c[b+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[b+96>>2]=5;h=g;break}else if((e|0)==(-1e4|0)){h=(c[b+16>>2]|0)+96|0;break}else{g=c[c[(c[b+20>>2]|0)+4>>2]>>2]|0;i=-10002-e|0;if((i|0)>(d[g+7|0]|0)){h=1032;break}h=g+24+(i-1<<4)|0;break}}}while(0);if((c[h+8>>2]|0)!=6){j=0;return j|0}e=c[h>>2]|0;h=e;do{if((a[e+6|0]|0)==0){i=c[e+16>>2]|0;if((f|0)<=0){j=0;return j|0}if((c[i+36>>2]|0)<(f|0)){j=0;return j|0}g=f-1|0;k=(c[(c[i+28>>2]|0)+(g<<2)>>2]|0)+16|0;if((k|0)==0){j=0;return j|0}else{l=c[(c[e+20+(g<<2)>>2]|0)+8>>2]|0;m=k;break}}else{if((f|0)<=0){j=0;return j|0}if((d[h+7|0]|0)<(f|0)){j=0;return j|0}else{l=e+24+(f-1<<4)|0;m=10544;break}}}while(0);f=b+8|0;b=c[f>>2]|0;e=l;h=b;k=c[e+4>>2]|0;c[h>>2]=c[e>>2];c[h+4>>2]=k;c[b+8>>2]=c[l+8>>2];c[f>>2]=(c[f>>2]|0)+16;j=m;return j|0}function dv(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;do{if((e|0)>0){f=(c[b+12>>2]|0)+(e-1<<4)|0;g=f>>>0<(c[b+8>>2]|0)>>>0?f:1032}else{if((e|0)>-1e4){g=(c[b+8>>2]|0)+(e<<4)|0;break}if((e|0)==(-10002|0)){g=b+72|0;break}else if((e|0)==(-10001|0)){f=b+88|0;c[f>>2]=c[(c[c[(c[b+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[b+96>>2]=5;g=f;break}else if((e|0)==(-1e4|0)){g=(c[b+16>>2]|0)+96|0;break}else{f=c[c[(c[b+20>>2]|0)+4>>2]>>2]|0;h=-10002-e|0;if((h|0)>(d[f+7|0]|0|0)){g=1032;break}g=f+24+(h-1<<4)|0;break}}}while(0);e=c[g+8>>2]|0;if((e|0)==7){c[(c[g>>2]|0)+12>>2]=c[(c[b+8>>2]|0)-16>>2]}else if((e|0)==6){c[(c[g>>2]|0)+12>>2]=c[(c[b+8>>2]|0)-16>>2]}else if((e|0)==8){e=c[g>>2]|0;c[e+72>>2]=c[(c[b+8>>2]|0)-16>>2];c[e+80>>2]=5}else{i=0;j=b+8|0;k=c[j>>2]|0;l=k-16|0;c[j>>2]=l;return i|0}e=b+8|0;h=c[(c[e>>2]|0)-16>>2]|0;if((a[h+5|0]&3)==0){i=1;j=e;k=c[j>>2]|0;l=k-16|0;c[j>>2]=l;return i|0}f=c[g>>2]|0;if((a[f+5|0]&4)==0){i=1;j=e;k=c[j>>2]|0;l=k-16|0;c[j>>2]=l;return i|0}e7(b,f,h);i=1;j=e;k=c[j>>2]|0;l=k-16|0;c[j>>2]=l;return i|0}function dw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=a+8|0;eG(a,(c[e>>2]|0)+(~b<<4)|0,d);if((d|0)!=-1){return}d=c[e>>2]|0;e=(c[a+20>>2]|0)+8|0;if(d>>>0<(c[e>>2]|0)>>>0){return}c[e>>2]=d;return}function dx(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0;g=i;i=i+8|0;h=g|0;if((f|0)==0){j=0;k=c[a+32>>2]|0}else{do{if((f|0)>0){l=(c[a+12>>2]|0)+(f-1<<4)|0;m=l>>>0<(c[a+8>>2]|0)>>>0?l:1032}else{if((f|0)>-1e4){m=(c[a+8>>2]|0)+(f<<4)|0;break}if((f|0)==(-1e4|0)){m=(c[a+16>>2]|0)+96|0;break}else if((f|0)==(-10002|0)){m=a+72|0;break}else if((f|0)==(-10001|0)){l=a+88|0;c[l>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;m=l;break}else{l=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;n=-10002-f|0;if((n|0)>(d[l+7|0]|0|0)){m=1032;break}m=l+24+(n-1<<4)|0;break}}}while(0);f=c[a+32>>2]|0;j=m-f|0;k=f}f=a+8|0;m=(c[f>>2]|0)+(~b<<4)|0;c[h>>2]=m;c[h+4>>2]=e;b=eJ(a,252,h,m-k|0,j)|0;if((e|0)!=-1){i=g;return b|0}e=c[f>>2]|0;f=(c[a+20>>2]|0)+8|0;if(e>>>0<(c[f>>2]|0)>>>0){i=g;return b|0}c[f>>2]=e;i=g;return b|0}function dy(a,b){a=a|0;b=b|0;eG(a,c[b>>2]|0,c[b+4>>2]|0);return}function dz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=i;i=i+8|0;f=e|0;c[f>>2]=b;c[f+4>>2]=d;d=eJ(a,264,f,(c[a+8>>2]|0)-(c[a+32>>2]|0)|0,0)|0;i=e;return d|0}function dA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=c[a+20>>2]|0;if((d|0)==(c[a+40>>2]|0)){e=c[a+72>>2]|0}else{e=c[(c[c[d+4>>2]>>2]|0)+12>>2]|0}d=eO(a,0,e)|0;c[d+16>>2]=c[b>>2];e=a+8|0;f=c[e>>2]|0;c[f>>2]=d;c[f+8>>2]=6;f=c[e>>2]|0;d=f+16|0;c[e>>2]=d;c[d>>2]=c[b+4>>2];c[f+24>>2]=2;f=c[e>>2]|0;c[e>>2]=f+16;eG(a,f-16|0,0);return}function dB(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=i;i=i+24|0;f=e|0;gs(a,f,b,c);c=eK(a,f,(d|0)==0?8488:d)|0;i=e;return c|0}function dC(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=c[b+8>>2]|0;if((c[f-16+8>>2]|0)!=6){g=1;return g|0}h=c[f-16>>2]|0;if((a[h+6|0]|0)!=0){g=1;return g|0}g=eM(b,c[h+16>>2]|0,d,e,0)|0;return g|0}function dD(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=c[b+16>>2]|0;L931:do{switch(d|0){case 0:{c[f+64>>2]=-3;g=0;break};case 1:{c[f+64>>2]=c[f+68>>2];g=0;break};case 5:{h=e<<10;i=f+68|0;j=c[i>>2]|0;if(h>>>0>j>>>0){c[f+64>>2]=0;k=0}else{l=j-h|0;c[f+64>>2]=l;k=l}l=f+64|0;h=f+21|0;m=k;n=j;while(1){if(m>>>0>n>>>0){g=0;break L931}e1(b);if((a[h]|0)==0){g=1;break L931}m=c[l>>2]|0;n=c[i>>2]|0}break};case 2:{e5(b);g=0;break};case 6:{i=f+80|0;n=c[i>>2]|0;c[i>>2]=e;g=n;break};case 7:{n=f+84|0;i=c[n>>2]|0;c[n>>2]=e;g=i;break};case 4:{g=c[f+68>>2]&1023;break};case 3:{g=(c[f+68>>2]|0)>>>10;break};default:{g=-1}}}while(0);return g|0}function dE(a){a=a|0;ew(a);return 0}function dF(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;do{if((b|0)>0){e=(c[a+12>>2]|0)+(b-1<<4)|0;f=e>>>0<(c[a+8>>2]|0)>>>0?e:1032}else{if((b|0)>-1e4){f=(c[a+8>>2]|0)+(b<<4)|0;break}if((b|0)==(-10002|0)){f=a+72|0;break}else if((b|0)==(-1e4|0)){f=(c[a+16>>2]|0)+96|0;break}else if((b|0)==(-10001|0)){e=a+88|0;c[e>>2]=c[(c[c[(c[a+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[a+96>>2]=5;f=e;break}else{e=c[c[(c[a+20>>2]|0)+4>>2]>>2]|0;g=-10002-b|0;if((g|0)>(d[e+7|0]|0|0)){f=1032;break}f=e+24+(g-1<<4)|0;break}}}while(0);b=a+8|0;g=f0(a,c[f>>2]|0,(c[b>>2]|0)-16|0)|0;f=c[b>>2]|0;c[b>>2]=(g|0)==0?f-16|0:f+16|0;return g|0}function dG(a,b){a=a|0;b=b|0;var d=0;if((b|0)>1){d=c[a+16>>2]|0;if((c[d+68>>2]|0)>>>0>=(c[d+64>>2]|0)>>>0){e1(a)}d=a+8|0;gq(a,b,((c[d>>2]|0)-(c[a+12>>2]|0)>>4)-1|0);c[d>>2]=(c[d>>2]|0)+(1-b<<4);return}else{if((b|0)!=0){return}b=a+8|0;d=c[b>>2]|0;c[d>>2]=f_(a,10544,0)|0;c[d+8>>2]=4;c[b>>2]=(c[b>>2]|0)+16;return}}function dH(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a+16>>2]|0;if((c[d+68>>2]|0)>>>0>=(c[d+64>>2]|0)>>>0){e1(a)}d=c[a+20>>2]|0;if((d|0)==(c[a+40>>2]|0)){e=c[a+72>>2]|0}else{e=c[(c[c[d+4>>2]>>2]|0)+12>>2]|0}d=f$(a,b,e)|0;e=a+8|0;a=c[e>>2]|0;c[a>>2]=d;c[a+8>>2]=7;c[e>>2]=(c[e>>2]|0)+16;return d+24|0}function dI(a){a=a|0;var b=0;b=c[a+24>>2]|0;c[a+28>>2]=b;return b|0}function dJ(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;do{if((e|0)>0){g=(c[b+12>>2]|0)+(e-1<<4)|0;h=g>>>0<(c[b+8>>2]|0)>>>0?g:1032}else{if((e|0)>-1e4){h=(c[b+8>>2]|0)+(e<<4)|0;break}if((e|0)==(-10002|0)){h=b+72|0;break}else if((e|0)==(-10001|0)){g=b+88|0;c[g>>2]=c[(c[c[(c[b+20>>2]|0)+4>>2]>>2]|0)+12>>2];c[b+96>>2]=5;h=g;break}else if((e|0)==(-1e4|0)){h=(c[b+16>>2]|0)+96|0;break}else{g=c[c[(c[b+20>>2]|0)+4>>2]>>2]|0;i=-10002-e|0;if((i|0)>(d[g+7|0]|0)){h=1032;break}h=g+24+(i-1<<4)|0;break}}}while(0);if((c[h+8>>2]|0)!=6){j=0;return j|0}e=h;h=c[e>>2]|0;i=h;do{if((a[h+6|0]|0)==0){g=c[h+16>>2]|0;if((f|0)<=0){j=0;return j|0}if((c[g+36>>2]|0)<(f|0)){j=0;return j|0}k=f-1|0;l=(c[(c[g+28>>2]|0)+(k<<2)>>2]|0)+16|0;if((l|0)==0){j=0;return j|0}else{m=c[(c[h+20+(k<<2)>>2]|0)+8>>2]|0;n=l;break}}else{if((f|0)<=0){j=0;return j|0}if((d[i+7|0]|0)<(f|0)){j=0;return j|0}else{m=h+24+(f-1<<4)|0;n=10544;break}}}while(0);f=b+8|0;h=c[f>>2]|0;i=h-16|0;c[f>>2]=i;l=i;i=m;k=c[l+4>>2]|0;c[i>>2]=c[l>>2];c[i+4>>2]=k;c[m+8>>2]=c[h-16+8>>2];h=c[f>>2]|0;if((c[h+8>>2]|0)<=3){j=n;return j|0}f=c[h>>2]|0;if((a[f+5|0]&3)==0){j=n;return j|0}h=c[e>>2]|0;if((a[h+5|0]&4)==0){j=n;return j|0}e7(b,h,f);j=n;return j|0}function dK(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=c[a+24>>2]|0;do{if((f|0)>(c[a+28>>2]|0)){if((f|0)==0){if((d[a+50|0]|0|0)>(b|0)){break}return}g=(c[(c[a>>2]|0)+12>>2]|0)+(f-1<<2)|0;h=c[g>>2]|0;if((h&63|0)!=3){break}i=h>>>23;if((h>>>6&255|0)>(b|0)){break}if((i+1|0)<(b|0)){break}j=b-1+e|0;if((j|0)<=(i|0)){return}c[g>>2]=h&8388607|j<<23;return}}while(0);ec(a,b<<6|(e+b<<23)-8388608|3,c[(c[a+12>>2]|0)+8>>2]|0)|0;return}function dL(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;return ec(a,d<<6|b|e<<23|f<<14,c[(c[a+12>>2]|0)+8>>2]|0)|0}function dM(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;b=a+32|0;d=c[b>>2]|0;c[b>>2]=-1;b=a+12|0;e=ec(a,2147450902,c[(c[b>>2]|0)+8>>2]|0)|0;if((d|0)==-1){f=e;return f|0}if((e|0)==-1){f=d;return f|0}g=c[(c[a>>2]|0)+12>>2]|0;a=e;while(1){h=g+(a<<2)|0;i=c[h>>2]|0;j=(i>>>14)-131071|0;if((j|0)==-1){break}k=a+1+j|0;if((k|0)==-1){break}else{a=k}}g=d+~a|0;if((((g|0)>-1?g:-g|0)|0)>131071){ff(c[b>>2]|0,5464);l=c[h>>2]|0}else{l=i}c[h>>2]=l&16383|(g<<14)+2147467264;f=e;return f|0}function dN(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;return ec(a,d<<6|b|e<<14,c[(c[a+12>>2]|0)+8>>2]|0)|0}function dO(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;if((d|0)==-1){return}e=c[b>>2]|0;if((e|0)==-1){c[b>>2]=d;return}b=c[(c[a>>2]|0)+12>>2]|0;f=e;while(1){g=b+(f<<2)|0;h=c[g>>2]|0;e=(h>>>14)-131071|0;if((e|0)==-1){break}i=f+1+e|0;if((i|0)==-1){break}else{f=i}}b=~f+d|0;if((((b|0)>-1?b:-b|0)|0)>131071){ff(c[a+12>>2]|0,5464);j=c[g>>2]|0}else{j=h}c[g>>2]=j&16383|(b<<14)+2147467264;return}function dP(a,b,d){a=a|0;b=b|0;d=d|0;ec(a,b<<6|(d<<23)+8388608|30,c[(c[a+12>>2]|0)+8>>2]|0)|0;return}function dQ(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((c[b+24>>2]|0)==(e|0)){c[b+28>>2]=e;f=b+32|0;if((d|0)==-1){return}g=c[f>>2]|0;if((g|0)==-1){c[f>>2]=d;return}f=c[(c[b>>2]|0)+12>>2]|0;h=g;while(1){i=f+(h<<2)|0;j=c[i>>2]|0;g=(j>>>14)-131071|0;if((g|0)==-1){break}k=h+1+g|0;if((k|0)==-1){break}else{h=k}}f=~h+d|0;if((((f|0)>-1?f:-f|0)|0)>131071){ff(c[b+12>>2]|0,5464);l=c[i>>2]|0}else{l=j}c[i>>2]=l&16383|(f<<14)+2147467264;return}if((d|0)==-1){return}f=b|0;l=b+12|0;b=d;while(1){d=c[(c[f>>2]|0)+12>>2]|0;i=d+(b<<2)|0;j=c[i>>2]|0;h=(j>>>14)-131071|0;if((h|0)==-1){m=-1}else{m=b+1+h|0}if((b|0)>0){h=d+(b-1<<2)|0;d=c[h>>2]|0;if((a[992+(d&63)|0]|0)<0){n=h;o=d}else{p=890}}else{p=890}if((p|0)==890){p=0;n=i;o=j}if((o&63|0)==27){c[n>>2]=o&8372224|o>>>23<<6|26;d=(c[(c[f>>2]|0)+12>>2]|0)+(b<<2)|0;h=~b+e|0;if((((h|0)>-1?h:-h|0)|0)>131071){ff(c[l>>2]|0,5464)}c[d>>2]=c[d>>2]&16383|(h<<14)+2147467264}else{h=~b+e|0;if((((h|0)>-1?h:-h|0)|0)>131071){ff(c[l>>2]|0,5464);q=c[i>>2]|0}else{q=j}c[i>>2]=q&16383|(h<<14)+2147467264}if((m|0)==-1){break}else{b=m}}return}function dR(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;c[a+28>>2]=c[a+24>>2];d=a+32|0;if((b|0)==-1){return}e=c[d>>2]|0;if((e|0)==-1){c[d>>2]=b;return}d=c[(c[a>>2]|0)+12>>2]|0;f=e;while(1){g=d+(f<<2)|0;h=c[g>>2]|0;e=(h>>>14)-131071|0;if((e|0)==-1){break}i=f+1+e|0;if((i|0)==-1){break}else{f=i}}d=~f+b|0;if((((d|0)>-1?d:-d|0)|0)>131071){ff(c[a+12>>2]|0,5464);j=c[g>>2]|0}else{j=h}c[g>>2]=j&16383|(d<<14)+2147467264;return}function dS(b,e){b=b|0;e=e|0;var f=0,g=0,h=0;f=(c[b+36>>2]|0)+e|0;e=b|0;g=c[e>>2]|0;if((f|0)<=(d[g+75|0]|0|0)){return}if((f|0)>249){ff(c[b+12>>2]|0,5128);h=c[e>>2]|0}else{h=g}a[h+75|0]=f&255;return}function dT(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;f=b+36|0;g=c[f>>2]|0;h=g+e|0;i=b|0;j=c[i>>2]|0;if((h|0)<=(d[j+75|0]|0|0)){k=g;l=k+e|0;c[f>>2]=l;return}if((h|0)>249){ff(c[b+12>>2]|0,5128);m=c[i>>2]|0}else{m=j}a[m+75|0]=h&255;k=c[f>>2]|0;l=k+e|0;c[f>>2]=l;return}function dU(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d|0;c[e>>2]=b;c[e+8>>2]=4;b=dV(a,e,e)|0;i=d;return b|0}function dV(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0;f=c[b+16>>2]|0;g=f9(f,c[b+4>>2]|0,d)|0;d=c[b>>2]|0;i=d+40|0;j=c[i>>2]|0;k=g+8|0;if((c[k>>2]|0)==3){l=~~+h[g>>3];return l|0}m=b+40|0;h[g>>3]=+(c[m>>2]|0);c[k>>2]=3;k=c[i>>2]|0;if(((c[m>>2]|0)+1|0)>(k|0)){g=d+8|0;c[g>>2]=ft(f,c[g>>2]|0,i,16,262143,7128)|0;n=c[i>>2]|0}else{n=k}k=d+8|0;if((j|0)<(n|0)){n=j;while(1){j=n+1|0;c[(c[k>>2]|0)+(n<<4)+8>>2]=0;if((j|0)<(c[i>>2]|0)){n=j}else{break}}}n=c[m>>2]|0;i=c[k>>2]|0;k=e;j=i+(n<<4)|0;g=c[k+4>>2]|0;c[j>>2]=c[k>>2];c[j+4>>2]=g;g=e+8|0;c[i+(n<<4)+8>>2]=c[g>>2];do{if((c[g>>2]|0)>3){n=c[e>>2]|0;if((a[n+5|0]&3)==0){break}if((a[d+5|0]&4)==0){break}e7(f,d,n)}}while(0);d=c[m>>2]|0;c[m>>2]=d+1;l=d;return l|0}function dW(a,b){a=a|0;b=+b;var d=0,e=0,f=0;d=i;i=i+16|0;e=d|0;h[e>>3]=b;c[e+8>>2]=3;f=dV(a,e,e)|0;i=d;return f|0}function dX(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;g=c[e>>2]|0;if((g|0)==13){h=(c[(c[b>>2]|0)+12>>2]|0)+(c[e+8>>2]<<2)|0;c[h>>2]=c[h>>2]&-8372225|(f<<14)+16384&8372224;return}else if((g|0)==14){g=e+8|0;e=b|0;h=(c[(c[e>>2]|0)+12>>2]|0)+(c[g>>2]<<2)|0;c[h>>2]=c[h>>2]&8388607|(f<<23)+8388608;f=(c[(c[e>>2]|0)+12>>2]|0)+(c[g>>2]<<2)|0;g=b+36|0;c[f>>2]=c[g>>2]<<6&16320|c[f>>2]&-16321;f=c[g>>2]|0;h=f+1|0;i=c[e>>2]|0;if((h|0)>(d[i+75|0]|0|0)){if((h|0)>249){ff(c[b+12>>2]|0,5128);j=c[e>>2]|0}else{j=i}a[j+75|0]=h&255;k=c[g>>2]|0}else{k=f}c[g>>2]=k+1;return}else{return}}function dY(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=b|0;e=c[d>>2]|0;if((e|0)==13){c[d>>2]=12;f=b+8|0;c[f>>2]=(c[(c[(c[a>>2]|0)+12>>2]|0)+(c[f>>2]<<2)>>2]|0)>>>6&255;return}else if((e|0)==14){e=(c[(c[a>>2]|0)+12>>2]|0)+(c[b+8>>2]<<2)|0;c[e>>2]=c[e>>2]&8388607|16777216;c[d>>2]=11;return}else{return}}function dZ(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=b|0;switch(c[e>>2]|0){case 6:{c[e>>2]=12;return};case 8:{f=b+8|0;c[f>>2]=ec(a,c[f>>2]<<14|5,c[(c[a+12>>2]|0)+8>>2]|0)|0;c[e>>2]=11;return};case 14:{f=(c[(c[a>>2]|0)+12>>2]|0)+(c[b+8>>2]<<2)|0;c[f>>2]=c[f>>2]&8388607|16777216;c[e>>2]=11;return};case 7:{f=b+8|0;c[f>>2]=ec(a,c[f>>2]<<23|4,c[(c[a+12>>2]|0)+8>>2]|0)|0;c[e>>2]=11;return};case 9:{f=b+8|0;g=f+4|0;h=c[g>>2]|0;do{if((h&256|0)==0){if((d[a+50|0]|0|0)>(h|0)){break}i=a+36|0;c[i>>2]=(c[i>>2]|0)-1}}while(0);h=f;f=c[h>>2]|0;do{if((f&256|0)==0){if((d[a+50|0]|0|0)>(f|0)){j=f;break}i=a+36|0;c[i>>2]=(c[i>>2]|0)-1;j=c[h>>2]|0}else{j=f}}while(0);c[h>>2]=ec(a,j<<23|c[g>>2]<<14|6,c[(c[a+12>>2]|0)+8>>2]|0)|0;c[e>>2]=11;return};case 13:{c[e>>2]=12;e=b+8|0;c[e>>2]=(c[(c[(c[a>>2]|0)+12>>2]|0)+(c[e>>2]<<2)>>2]|0)>>>6&255;return};default:{return}}}function d_(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;dZ(b,e);do{if((c[e>>2]|0)==12){f=c[e+8>>2]|0;if((f&256|0)!=0){break}if((d[b+50|0]|0|0)>(f|0)){break}f=b+36|0;c[f>>2]=(c[f>>2]|0)-1}}while(0);f=b+36|0;g=c[f>>2]|0;h=g+1|0;i=b|0;j=c[i>>2]|0;if((h|0)<=(d[j+75|0]|0|0)){k=g;l=k+1|0;c[f>>2]=l;d$(b,e,k);return}if((h|0)>249){ff(c[b+12>>2]|0,5128);m=c[i>>2]|0}else{m=j}a[m+75|0]=h&255;k=c[f>>2]|0;l=k+1|0;c[f>>2]=l;d$(b,e,k);return}function d$(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;ek(b,d,e);f=d|0;g=d+16|0;do{if((c[f>>2]|0)==10){h=c[d+8>>2]|0;if((h|0)==-1){break}i=c[g>>2]|0;if((i|0)==-1){c[g>>2]=h;break}j=c[(c[b>>2]|0)+12>>2]|0;k=i;while(1){l=j+(k<<2)|0;m=c[l>>2]|0;i=(m>>>14)-131071|0;if((i|0)==-1){break}n=k+1+i|0;if((n|0)==-1){break}else{k=n}}j=h+~k|0;if((((j|0)>-1?j:-j|0)|0)>131071){ff(c[b+12>>2]|0,5464);o=c[l>>2]|0}else{o=m}c[l>>2]=o&16383|(j<<14)+2147467264}}while(0);o=c[g>>2]|0;l=d+20|0;m=c[l>>2]|0;if((o|0)==(m|0)){c[g>>2]=-1;c[l>>2]=-1;p=d+8|0;q=p;c[q>>2]=e;c[f>>2]=12;return}L1250:do{if((o|0)==-1){r=1017}else{j=c[(c[b>>2]|0)+12>>2]|0;n=o;while(1){i=j+(n<<2)|0;if((n|0)>0){s=c[j+(n-1<<2)>>2]|0;if((a[992+(s&63)|0]|0)<0){t=s}else{r=1013}}else{r=1013}if((r|0)==1013){r=0;t=c[i>>2]|0}if((t&63|0)!=27){r=1025;break L1250}s=((c[i>>2]|0)>>>14)-131071|0;if((s|0)==-1){r=1017;break L1250}i=n+1+s|0;if((i|0)==-1){r=1017;break}else{n=i}}}}while(0);L1261:do{if((r|0)==1017){if((m|0)==-1){u=-1;v=-1;break}t=c[(c[b>>2]|0)+12>>2]|0;o=m;while(1){n=t+(o<<2)|0;if((o|0)>0){j=c[t+(o-1<<2)>>2]|0;if((a[992+(j&63)|0]|0)<0){w=j}else{r=1021}}else{r=1021}if((r|0)==1021){r=0;w=c[n>>2]|0}if((w&63|0)!=27){r=1025;break L1261}j=((c[n>>2]|0)>>>14)-131071|0;if((j|0)==-1){u=-1;v=-1;break L1261}n=o+1+j|0;if((n|0)==-1){u=-1;v=-1;break}else{o=n}}}}while(0);do{if((r|0)==1025){do{if((c[f>>2]|0)==10){x=-1;y=b+12|0;z=b+32|0}else{w=b+32|0;m=c[w>>2]|0;c[w>>2]=-1;o=b+12|0;t=ec(b,2147450902,c[(c[o>>2]|0)+8>>2]|0)|0;if((m|0)==-1){x=t;y=o;z=w;break}if((t|0)==-1){x=m;y=o;z=w;break}n=c[(c[b>>2]|0)+12>>2]|0;j=t;while(1){A=n+(j<<2)|0;B=c[A>>2]|0;k=(B>>>14)-131071|0;if((k|0)==-1){break}h=j+1+k|0;if((h|0)==-1){break}else{j=h}}n=m+~j|0;if((((n|0)>-1?n:-n|0)|0)>131071){ff(c[o>>2]|0,5464);C=c[A>>2]|0}else{C=B}c[A>>2]=C&16383|(n<<14)+2147467264;x=t;y=o;z=w}}while(0);n=b+24|0;h=b+28|0;c[h>>2]=c[n>>2];k=e<<6;i=ec(b,k|16386,c[(c[y>>2]|0)+8>>2]|0)|0;c[h>>2]=c[n>>2];s=ec(b,k|8388610,c[(c[y>>2]|0)+8>>2]|0)|0;c[h>>2]=c[n>>2];if((x|0)==-1){u=i;v=s;break}n=c[z>>2]|0;if((n|0)==-1){c[z>>2]=x;u=i;v=s;break}h=c[(c[b>>2]|0)+12>>2]|0;k=n;while(1){D=h+(k<<2)|0;E=c[D>>2]|0;n=(E>>>14)-131071|0;if((n|0)==-1){break}F=k+1+n|0;if((F|0)==-1){break}else{k=F}}h=x+~k|0;if((((h|0)>-1?h:-h|0)|0)>131071){ff(c[y>>2]|0,5464);G=c[D>>2]|0}else{G=E}c[D>>2]=G&16383|(h<<14)+2147467264;u=i;v=s}}while(0);G=c[b+24>>2]|0;c[b+28>>2]=G;D=c[l>>2]|0;if((D|0)!=-1){E=b|0;y=(e|0)==255;x=b+12|0;z=e<<6&16320;C=D;while(1){D=c[(c[E>>2]|0)+12>>2]|0;A=D+(C<<2)|0;B=c[A>>2]|0;h=(B>>>14)-131071|0;if((h|0)==-1){H=-1}else{H=C+1+h|0}if((C|0)>0){h=D+(C-1<<2)|0;D=c[h>>2]|0;if((a[992+(D&63)|0]|0)<0){I=h;J=D}else{r=1050}}else{r=1050}if((r|0)==1050){r=0;I=A;J=B}if((J&63|0)==27){D=J>>>23;if(y|(D|0)==(e|0)){K=J&8372224|D<<6|26}else{K=J&-16321|z}c[I>>2]=K;D=(c[(c[E>>2]|0)+12>>2]|0)+(C<<2)|0;h=G+~C|0;if((((h|0)>-1?h:-h|0)|0)>131071){ff(c[x>>2]|0,5464)}c[D>>2]=c[D>>2]&16383|(h<<14)+2147467264}else{h=u+~C|0;if((((h|0)>-1?h:-h|0)|0)>131071){ff(c[x>>2]|0,5464);L=c[A>>2]|0}else{L=B}c[A>>2]=L&16383|(h<<14)+2147467264}if((H|0)==-1){break}else{C=H}}}H=c[g>>2]|0;if((H|0)==-1){c[g>>2]=-1;c[l>>2]=-1;p=d+8|0;q=p;c[q>>2]=e;c[f>>2]=12;return}C=b|0;L=b+12|0;b=e<<6;x=b&16320;if((e|0)==255){u=H;while(1){E=c[(c[C>>2]|0)+12>>2]|0;K=E+(u<<2)|0;I=c[K>>2]|0;z=(I>>>14)-131071|0;if((z|0)==-1){M=-1}else{M=u+1+z|0}if((u|0)>0){z=E+(u-1<<2)|0;E=c[z>>2]|0;if((a[992+(E&63)|0]|0)<0){N=z;O=E}else{r=1068}}else{r=1068}if((r|0)==1068){r=0;N=K;O=I}if((O&63|0)==27){c[N>>2]=O&8372224|O>>>23<<6|26;E=(c[(c[C>>2]|0)+12>>2]|0)+(u<<2)|0;z=G+~u|0;if((((z|0)>-1?z:-z|0)|0)>131071){ff(c[L>>2]|0,5464)}c[E>>2]=c[E>>2]&16383|(z<<14)+2147467264}else{z=v+~u|0;if((((z|0)>-1?z:-z|0)|0)>131071){ff(c[L>>2]|0,5464);P=c[K>>2]|0}else{P=I}c[K>>2]=P&16383|(z<<14)+2147467264}if((M|0)==-1){break}else{u=M}}c[g>>2]=-1;c[l>>2]=-1;p=d+8|0;q=p;c[q>>2]=e;c[f>>2]=12;return}else{Q=H}while(1){H=c[(c[C>>2]|0)+12>>2]|0;M=H+(Q<<2)|0;u=c[M>>2]|0;P=(u>>>14)-131071|0;if((P|0)==-1){R=-1}else{R=Q+1+P|0}if((Q|0)>0){P=H+(Q-1<<2)|0;H=c[P>>2]|0;if((a[992+(H&63)|0]|0)<0){S=P;T=H}else{r=1081}}else{r=1081}if((r|0)==1081){r=0;S=M;T=u}if((T&63|0)==27){if((T>>>23|0)==(e|0)){U=T&8372224|b|26}else{U=T&-16321|x}c[S>>2]=U;H=(c[(c[C>>2]|0)+12>>2]|0)+(Q<<2)|0;P=G+~Q|0;if((((P|0)>-1?P:-P|0)|0)>131071){ff(c[L>>2]|0,5464)}c[H>>2]=c[H>>2]&16383|(P<<14)+2147467264}else{P=v+~Q|0;if((((P|0)>-1?P:-P|0)|0)>131071){ff(c[L>>2]|0,5464);V=c[M>>2]|0}else{V=u}c[M>>2]=V&16383|(P<<14)+2147467264}if((R|0)==-1){break}else{Q=R}}c[g>>2]=-1;c[l>>2]=-1;p=d+8|0;q=p;c[q>>2]=e;c[f>>2]=12;return}function d0(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0;dZ(a,b);do{if((c[b>>2]|0)==12){e=b+8|0;f=c[e>>2]|0;if((c[b+16>>2]|0)==(c[b+20>>2]|0)){g=f;return g|0}if((f|0)<(d[a+50|0]|0|0)){h=e;break}d$(a,b,f);g=c[e>>2]|0;return g|0}else{h=b+8|0}}while(0);d_(a,b);g=c[h>>2]|0;return g|0}function d1(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;e=b+16|0;f=b+20|0;if((c[e>>2]|0)==(c[f>>2]|0)){dZ(a,b);return}dZ(a,b);do{if((c[b>>2]|0)==12){g=c[b+8>>2]|0;if((c[e>>2]|0)==(c[f>>2]|0)){return}if((g|0)<(d[a+50|0]|0|0)){break}d$(a,b,g);return}}while(0);d_(a,b);return}function d2(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=i;i=i+64|0;f=e|0;g=e+16|0;j=e+32|0;k=e+48|0;l=b+16|0;m=b+20|0;n=(c[l>>2]|0)==(c[m>>2]|0);dZ(a,b);o=b|0;L1403:do{if(!n){do{if((c[o>>2]|0)==12){p=c[b+8>>2]|0;if((c[l>>2]|0)==(c[m>>2]|0)){break L1403}if((p|0)<(d[a+50|0]|0|0)){break}d$(a,b,p);break L1403}}while(0);d_(a,b)}}while(0);n=c[o>>2]|0;L1411:do{switch(n|0){case 5:case 2:case 3:case 1:{if((c[a+40>>2]|0)>=256){break L1411}if((n|0)==5){h[g>>3]=+h[b+8>>3];c[g+8>>2]=3;q=dV(a,g,g)|0}else if((n|0)==1){c[k+8>>2]=0;c[j>>2]=c[a+4>>2];c[j+8>>2]=5;q=dV(a,j,k)|0}else{c[f>>2]=(n|0)==2;c[f+8>>2]=1;q=dV(a,f,f)|0}c[b+8>>2]=q;c[o>>2]=4;r=q|256;i=e;return r|0};case 4:{p=c[b+8>>2]|0;if((p|0)>=256){break L1411}r=p|256;i=e;return r|0};default:{}}}while(0);dZ(a,b);do{if((c[o>>2]|0)==12){q=b+8|0;f=c[q>>2]|0;if((c[l>>2]|0)==(c[m>>2]|0)){r=f;i=e;return r|0}if((f|0)<(d[a+50|0]|0|0)){s=q;break}d$(a,b,f);r=c[q>>2]|0;i=e;return r|0}else{s=b+8|0}}while(0);d_(a,b);r=c[s>>2]|0;i=e;return r|0}function d3(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;f=c[b>>2]|0;if((f|0)==6){do{if((c[e>>2]|0)==12){g=c[e+8>>2]|0;if((g&256|0)!=0){break}if((d[a+50|0]|0|0)>(g|0)){break}g=a+36|0;c[g>>2]=(c[g>>2]|0)-1}}while(0);d$(a,e,c[b+8>>2]|0);return}else if((f|0)==7){dZ(a,e);do{if((c[e>>2]|0)==12){g=e+8|0;h=c[g>>2]|0;if((c[e+16>>2]|0)==(c[e+20>>2]|0)){i=h;break}if((h|0)<(d[a+50|0]|0|0)){j=g;k=1158;break}d$(a,e,h);i=c[g>>2]|0}else{j=e+8|0;k=1158}}while(0);if((k|0)==1158){d_(a,e);i=c[j>>2]|0}ec(a,i<<6|c[b+8>>2]<<23|8,c[(c[a+12>>2]|0)+8>>2]|0)|0}else if((f|0)==9){i=d2(a,e)|0;j=b+8|0;ec(a,i<<14|c[j>>2]<<6|c[j+4>>2]<<23|9,c[(c[a+12>>2]|0)+8>>2]|0)|0}else if((f|0)==8){dZ(a,e);do{if((c[e>>2]|0)==12){f=e+8|0;j=c[f>>2]|0;if((c[e+16>>2]|0)==(c[e+20>>2]|0)){l=j;break}if((j|0)<(d[a+50|0]|0|0)){m=f;k=1165;break}d$(a,e,j);l=c[f>>2]|0}else{m=e+8|0;k=1165}}while(0);if((k|0)==1165){d_(a,e);l=c[m>>2]|0}ec(a,l<<6|c[b+8>>2]<<14|7,c[(c[a+12>>2]|0)+8>>2]|0)|0}if((c[e>>2]|0)!=12){return}b=c[e+8>>2]|0;if((b&256|0)!=0){return}if((d[a+50|0]|0|0)>(b|0)){return}b=a+36|0;c[b>>2]=(c[b>>2]|0)-1;return}function d4(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;dZ(b,e);g=e|0;do{if((c[g>>2]|0)==12){h=c[e+8>>2]|0;if((c[e+16>>2]|0)==(c[e+20>>2]|0)){break}if((h|0)<(d[b+50|0]|0|0)){i=1182;break}d$(b,e,h)}else{i=1182}}while(0);if((i|0)==1182){d_(b,e)}do{if((c[g>>2]|0)==12){i=c[e+8>>2]|0;if((i&256|0)!=0){break}if((d[b+50|0]|0|0)>(i|0)){break}i=b+36|0;c[i>>2]=(c[i>>2]|0)-1}}while(0);i=b+36|0;h=c[i>>2]|0;j=h+2|0;k=b|0;l=c[k>>2]|0;if((j|0)>(d[l+75|0]|0|0)){if((j|0)>249){ff(c[b+12>>2]|0,5128);m=c[k>>2]|0}else{m=l}a[m+75|0]=j&255;n=c[i>>2]|0}else{n=h}c[i>>2]=n+2;n=e+8|0;e=c[n>>2]|0;j=h<<6|e<<23|(d2(b,f)|0)<<14|11;ec(b,j,c[(c[b+12>>2]|0)+8>>2]|0)|0;if((c[f>>2]|0)!=12){c[n>>2]=h;c[g>>2]=12;return}j=c[f+8>>2]|0;if((j&256|0)!=0){c[n>>2]=h;c[g>>2]=12;return}if((d[b+50|0]|0|0)>(j|0)){c[n>>2]=h;c[g>>2]=12;return}c[i>>2]=(c[i>>2]|0)-1;c[n>>2]=h;c[g>>2]=12;return}function d5(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;dZ(b,e);f=e|0;g=c[f>>2]|0;L1503:do{if((g|0)==10){h=c[(c[b>>2]|0)+12>>2]|0;i=e+8|0;j=c[i>>2]|0;k=h+(j<<2)|0;if((j|0)>0){l=h+(j-1<<2)|0;j=c[l>>2]|0;if((a[992+(j&63)|0]|0)<0){m=l;n=j}else{o=1203}}else{o=1203}if((o|0)==1203){m=k;n=c[k>>2]|0}c[m>>2]=((n&16320|0)==0)<<6|n&-16321;p=c[i>>2]|0;o=1217}else if(!((g|0)==4|(g|0)==5|(g|0)==2)){i=e+8|0;do{if((g|0)==11){k=c[(c[(c[b>>2]|0)+12>>2]|0)+(c[i>>2]<<2)>>2]|0;if((k&63|0)!=19){o=1208;break}j=b+24|0;c[j>>2]=(c[j>>2]|0)-1;p=ee(b,26,k>>>23,0,1)|0;o=1217;break L1503}else if((g|0)==12){o=1213}else{o=1208}}while(0);if((o|0)==1208){k=b+36|0;j=c[k>>2]|0;l=j+1|0;h=b|0;q=c[h>>2]|0;if((l|0)>(d[q+75|0]|0)){if((l|0)>249){ff(c[b+12>>2]|0,5128);r=c[h>>2]|0}else{r=q}a[r+75|0]=l&255;s=c[k>>2]|0}else{s=j}c[k>>2]=s+1;ek(b,e,s);if((c[f>>2]|0)==12){o=1213}}do{if((o|0)==1213){k=c[i>>2]|0;if((k&256|0)!=0){break}if((d[b+50|0]|0)>(k|0)){break}k=b+36|0;c[k>>2]=(c[k>>2]|0)-1}}while(0);p=ee(b,27,255,c[i>>2]|0,0)|0;o=1217}}while(0);do{if((o|0)==1217){f=e+20|0;if((p|0)==-1){break}s=c[f>>2]|0;if((s|0)==-1){c[f>>2]=p;break}f=c[(c[b>>2]|0)+12>>2]|0;r=s;while(1){t=f+(r<<2)|0;u=c[t>>2]|0;s=(u>>>14)-131071|0;if((s|0)==-1){break}g=r+1+s|0;if((g|0)==-1){break}else{r=g}}f=p+~r|0;if((((f|0)>-1?f:-f|0)|0)>131071){ff(c[b+12>>2]|0,5464);v=c[t>>2]|0}else{v=u}c[t>>2]=v&16383|(f<<14)+2147467264}}while(0);v=e+16|0;e=c[v>>2]|0;c[b+28>>2]=c[b+24>>2];t=b+32|0;if((e|0)==-1){c[v>>2]=-1;return}u=c[t>>2]|0;if((u|0)==-1){c[t>>2]=e;c[v>>2]=-1;return}t=c[(c[b>>2]|0)+12>>2]|0;p=u;while(1){w=t+(p<<2)|0;x=c[w>>2]|0;u=(x>>>14)-131071|0;if((u|0)==-1){break}o=p+1+u|0;if((o|0)==-1){break}else{p=o}}t=e+~p|0;if((((t|0)>-1?t:-t|0)|0)>131071){ff(c[b+12>>2]|0,5464);y=c[w>>2]|0}else{y=x}c[w>>2]=y&16383|(t<<14)+2147467264;c[v>>2]=-1;return}function d6(a,b,d){a=a|0;b=b|0;d=d|0;c[b+12>>2]=d2(a,d)|0;c[b>>2]=9;return}function d7(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;g=i;i=i+24|0;j=g|0;c[j+20>>2]=-1;c[j+16>>2]=-1;c[j>>2]=5;h[j+8>>3]=0.0;if((e|0)==0){k=f|0;do{if((c[k>>2]|0)==5){if((c[f+16>>2]|0)!=-1){l=1244;break}if((c[f+20>>2]|0)!=-1){l=1244}}else{l=1244}}while(0);L1563:do{if((l|0)==1244){dZ(b,f);do{if((c[k>>2]|0)==12){m=c[f+8>>2]|0;if((c[f+16>>2]|0)==(c[f+20>>2]|0)){break L1563}if((m|0)<(d[b+50|0]|0)){break}d$(b,f,m);break L1563}}while(0);d_(b,f)}}while(0);d8(b,18,f,j);i=g;return}else if((e|0)==2){dZ(b,f);do{if((c[f>>2]|0)==12){k=c[f+8>>2]|0;if((c[f+16>>2]|0)==(c[f+20>>2]|0)){break}if((k|0)<(d[b+50|0]|0)){l=1290;break}d$(b,f,k)}else{l=1290}}while(0);if((l|0)==1290){d_(b,f)}d8(b,20,f,j);i=g;return}else if((e|0)==1){dZ(b,f);e=f|0;L1583:do{switch(c[e>>2]|0){case 1:case 3:{c[e>>2]=2;break};case 4:case 5:case 2:{c[e>>2]=3;break};case 10:{j=c[(c[b>>2]|0)+12>>2]|0;k=c[f+8>>2]|0;m=j+(k<<2)|0;if((k|0)>0){n=j+(k-1<<2)|0;k=c[n>>2]|0;if((a[992+(k&63)|0]|0)<0){o=n;p=k}else{l=1255}}else{l=1255}if((l|0)==1255){o=m;p=c[m>>2]|0}c[o>>2]=((p&16320|0)==0)<<6|p&-16321;break};case 11:{m=b+36|0;k=c[m>>2]|0;n=k+1|0;j=b|0;q=c[j>>2]|0;if((n|0)>(d[q+75|0]|0)){if((n|0)>249){ff(c[b+12>>2]|0,5128);r=c[j>>2]|0}else{r=q}a[r+75|0]=n&255;s=c[m>>2]|0}else{s=k}c[m>>2]=s+1;ek(b,f,s);if((c[e>>2]|0)==12){l=1263;break L1583}t=f+8|0;l=1266;break};case 12:{l=1263;break};default:{}}}while(0);do{if((l|0)==1263){s=f+8|0;r=c[s>>2]|0;if((r&256|0)!=0){t=s;l=1266;break}if((d[b+50|0]|0)>(r|0)){t=s;l=1266;break}r=b+36|0;c[r>>2]=(c[r>>2]|0)-1;t=s;l=1266}}while(0);if((l|0)==1266){c[t>>2]=ec(b,c[t>>2]<<23|19,c[(c[b+12>>2]|0)+8>>2]|0)|0;c[e>>2]=11}e=f+20|0;t=c[e>>2]|0;s=f+16|0;f=c[s>>2]|0;c[e>>2]=f;c[s>>2]=t;if((f|0)==-1){u=t}else{t=b|0;e=f;f=c[(c[t>>2]|0)+12>>2]|0;while(1){r=f+(e<<2)|0;if((e|0)>0){p=f+(e-1<<2)|0;o=c[p>>2]|0;if((a[992+(o&63)|0]|0)<0){v=p;w=o}else{l=1271}}else{l=1271}if((l|0)==1271){l=0;v=r;w=c[r>>2]|0}if((w&63|0)==27){c[v>>2]=w&8372224|w>>>23<<6|26;x=c[(c[t>>2]|0)+12>>2]|0}else{x=f}r=((c[x+(e<<2)>>2]|0)>>>14)-131071|0;if((r|0)==-1){break}o=e+1+r|0;if((o|0)==-1){break}else{e=o;f=x}}u=c[s>>2]|0}if((u|0)==-1){i=g;return}s=b|0;b=u;u=c[(c[s>>2]|0)+12>>2]|0;while(1){x=u+(b<<2)|0;if((b|0)>0){f=u+(b-1<<2)|0;e=c[f>>2]|0;if((a[992+(e&63)|0]|0)<0){y=f;z=e}else{l=1281}}else{l=1281}if((l|0)==1281){l=0;y=x;z=c[x>>2]|0}if((z&63|0)==27){c[y>>2]=z&8372224|z>>>23<<6|26;A=c[(c[s>>2]|0)+12>>2]|0}else{A=u}x=((c[A+(b<<2)>>2]|0)>>>14)-131071|0;if((x|0)==-1){l=1297;break}e=b+1+x|0;if((e|0)==-1){l=1298;break}else{b=e;u=A}}if((l|0)==1297){i=g;return}else if((l|0)==1298){i=g;return}}else{i=g;return}}function d8(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0,o=0.0;g=e|0;L1640:do{if((c[g>>2]|0)==5){if((c[e+16>>2]|0)!=-1){i=1317;break}if((c[e+20>>2]|0)!=-1){i=1317;break}if((c[f>>2]|0)!=5){i=1317;break}if((c[f+16>>2]|0)!=-1){i=1317;break}if((c[f+20>>2]|0)!=-1){i=1317;break}j=e+8|0;k=+h[j>>3];l=+h[f+8>>3];switch(b|0){case 12:{m=k+l;i=1315;break};case 16:{if(l==0.0){i=1318;break L1640}m=k-l*+O(+(k/l));i=1315;break};case 18:{m=-0.0-k;i=1315;break};case 13:{m=k-l;i=1315;break};case 15:{if(l==0.0){i=1318;break L1640}m=k/l;i=1315;break};case 14:{m=k*l;i=1315;break};case 20:{n=0;break L1640;break};case 17:{m=+R(+k,+l);i=1315;break};default:{o=0.0}}if((i|0)==1315){if(m==m&!(D=0.0,D!=D)){o=m}else{i=1317;break}}h[j>>3]=o;return}else{i=1317}}while(0);if((i|0)==1317){if((b|0)==20|(b|0)==18){n=0}else{i=1318}}if((i|0)==1318){n=d2(a,f)|0}i=d2(a,e)|0;do{if((i|0)>(n|0)){do{if((c[g>>2]|0)==12){j=c[e+8>>2]|0;if((j&256|0)!=0){break}if((d[a+50|0]|0|0)>(j|0)){break}j=a+36|0;c[j>>2]=(c[j>>2]|0)-1}}while(0);if((c[f>>2]|0)!=12){break}j=c[f+8>>2]|0;if((j&256|0)!=0){break}if((d[a+50|0]|0|0)>(j|0)){break}j=a+36|0;c[j>>2]=(c[j>>2]|0)-1}else{do{if((c[f>>2]|0)==12){j=c[f+8>>2]|0;if((j&256|0)!=0){break}if((d[a+50|0]|0|0)>(j|0)){break}j=a+36|0;c[j>>2]=(c[j>>2]|0)-1}}while(0);if((c[g>>2]|0)!=12){break}j=c[e+8>>2]|0;if((j&256|0)!=0){break}if((d[a+50|0]|0|0)>(j|0)){break}j=a+36|0;c[j>>2]=(c[j>>2]|0)-1}}while(0);c[e+8>>2]=ec(a,n<<14|b|i<<23,c[(c[a+12>>2]|0)+8>>2]|0)|0;c[g>>2]=11;return}function d9(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;switch(e|0){case 13:{d5(b,f);return};case 14:{dZ(b,f);e=f|0;g=c[e>>2]|0;L1692:do{if((g|0)==10){h=c[f+8>>2]|0;i=1357}else if(!((g|0)==1|(g|0)==3)){j=f+8|0;do{if((g|0)==11){k=c[b>>2]|0;l=c[(c[k+12>>2]|0)+(c[j>>2]<<2)>>2]|0;if((l&63|0)!=19){m=k;i=1348;break}k=b+24|0;c[k>>2]=(c[k>>2]|0)-1;h=ee(b,26,l>>>23,0,0)|0;i=1357;break L1692}else if((g|0)==12){i=1353}else{m=c[b>>2]|0;i=1348}}while(0);if((i|0)==1348){l=b+36|0;k=c[l>>2]|0;n=k+1|0;o=b|0;if((n|0)>(d[m+75|0]|0|0)){if((n|0)>249){ff(c[b+12>>2]|0,5128);p=c[o>>2]|0}else{p=m}a[p+75|0]=n&255;q=c[l>>2]|0}else{q=k}c[l>>2]=q+1;ek(b,f,q);if((c[e>>2]|0)==12){i=1353}}do{if((i|0)==1353){l=c[j>>2]|0;if((l&256|0)!=0){break}if((d[b+50|0]|0|0)>(l|0)){break}l=b+36|0;c[l>>2]=(c[l>>2]|0)-1}}while(0);h=ee(b,27,255,c[j>>2]|0,1)|0;i=1357}}while(0);do{if((i|0)==1357){e=f+16|0;if((h|0)==-1){break}q=c[e>>2]|0;if((q|0)==-1){c[e>>2]=h;break}e=c[(c[b>>2]|0)+12>>2]|0;p=q;while(1){r=e+(p<<2)|0;s=c[r>>2]|0;q=(s>>>14)-131071|0;if((q|0)==-1){break}m=p+1+q|0;if((m|0)==-1){break}else{p=m}}e=h+~p|0;if((((e|0)>-1?e:-e|0)|0)>131071){ff(c[b+12>>2]|0,5464);t=c[r>>2]|0}else{t=s}c[r>>2]=t&16383|(e<<14)+2147467264}}while(0);t=f+20|0;r=c[t>>2]|0;c[b+28>>2]=c[b+24>>2];s=b+32|0;do{if((r|0)!=-1){h=c[s>>2]|0;if((h|0)==-1){c[s>>2]=r;break}i=c[(c[b>>2]|0)+12>>2]|0;e=h;while(1){u=i+(e<<2)|0;v=c[u>>2]|0;h=(v>>>14)-131071|0;if((h|0)==-1){break}j=e+1+h|0;if((j|0)==-1){break}else{e=j}}i=r+~e|0;if((((i|0)>-1?i:-i|0)|0)>131071){ff(c[b+12>>2]|0,5464);w=c[u>>2]|0}else{w=v}c[u>>2]=w&16383|(i<<14)+2147467264}}while(0);c[t>>2]=-1;return};case 6:{d_(b,f);return};case 0:case 1:case 2:case 3:case 4:case 5:{do{if((c[f>>2]|0)==5){if((c[f+16>>2]|0)!=-1){break}if((c[f+20>>2]|0)!=-1){break}return}}while(0);d2(b,f)|0;return};default:{d2(b,f)|0;return}}}function ea(a,b){a=a|0;b=b|0;c[(c[(c[a>>2]|0)+20>>2]|0)+((c[a+24>>2]|0)-1<<2)>>2]=b;return}function eb(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;switch(b|0){case 13:{dZ(a,f);b=f+20|0;g=c[e+20>>2]|0;do{if((g|0)!=-1){h=c[b>>2]|0;if((h|0)==-1){c[b>>2]=g;break}i=c[(c[a>>2]|0)+12>>2]|0;j=h;while(1){k=i+(j<<2)|0;l=c[k>>2]|0;h=(l>>>14)-131071|0;if((h|0)==-1){break}m=j+1+h|0;if((m|0)==-1){break}else{j=m}}i=g+~j|0;if((((i|0)>-1?i:-i|0)|0)>131071){ff(c[a+12>>2]|0,5464);n=c[k>>2]|0}else{n=l}c[k>>2]=n&16383|(i<<14)+2147467264}}while(0);n=e;k=f;c[n>>2]=c[k>>2];c[n+4>>2]=c[k+4>>2];c[n+8>>2]=c[k+8>>2];c[n+12>>2]=c[k+12>>2];c[n+16>>2]=c[k+16>>2];c[n+20>>2]=c[k+20>>2];return};case 10:{k=d2(a,e)|0;n=d2(a,f)|0;do{if((c[f>>2]|0)==12){l=c[f+8>>2]|0;if((l&256|0)!=0){break}if((d[a+50|0]|0|0)>(l|0)){break}l=a+36|0;c[l>>2]=(c[l>>2]|0)-1}}while(0);l=e|0;g=e+8|0;do{if((c[l>>2]|0)==12){b=c[g>>2]|0;if((b&256|0)!=0){break}if((d[a+50|0]|0|0)>(b|0)){break}b=a+36|0;c[b>>2]=(c[b>>2]|0)-1}}while(0);c[g>>2]=ee(a,25,1,k,n)|0;c[l>>2]=10;return};case 9:{l=d2(a,e)|0;n=d2(a,f)|0;do{if((c[f>>2]|0)==12){k=c[f+8>>2]|0;if((k&256|0)!=0){break}if((d[a+50|0]|0|0)>(k|0)){break}k=a+36|0;c[k>>2]=(c[k>>2]|0)-1}}while(0);k=e|0;g=e+8|0;do{if((c[k>>2]|0)==12){b=c[g>>2]|0;if((b&256|0)!=0){break}if((d[a+50|0]|0|0)>(b|0)){break}b=a+36|0;c[b>>2]=(c[b>>2]|0)-1}}while(0);c[g>>2]=ee(a,24,1,l,n)|0;c[k>>2]=10;return};case 11:{k=d2(a,e)|0;n=d2(a,f)|0;do{if((c[f>>2]|0)==12){l=c[f+8>>2]|0;if((l&256|0)!=0){break}if((d[a+50|0]|0|0)>(l|0)){break}l=a+36|0;c[l>>2]=(c[l>>2]|0)-1}}while(0);l=e|0;g=e+8|0;do{if((c[l>>2]|0)==12){b=c[g>>2]|0;if((b&256|0)!=0){break}if((d[a+50|0]|0|0)>(b|0)){break}b=a+36|0;c[b>>2]=(c[b>>2]|0)-1}}while(0);c[g>>2]=ee(a,24,1,n,k)|0;c[l>>2]=10;return};case 14:{dZ(a,f);l=f+16|0;k=c[e+16>>2]|0;do{if((k|0)!=-1){n=c[l>>2]|0;if((n|0)==-1){c[l>>2]=k;break}g=c[(c[a>>2]|0)+12>>2]|0;b=n;while(1){o=g+(b<<2)|0;p=c[o>>2]|0;n=(p>>>14)-131071|0;if((n|0)==-1){break}i=b+1+n|0;if((i|0)==-1){break}else{b=i}}g=k+~b|0;if((((g|0)>-1?g:-g|0)|0)>131071){ff(c[a+12>>2]|0,5464);q=c[o>>2]|0}else{q=p}c[o>>2]=q&16383|(g<<14)+2147467264}}while(0);q=e;o=f;c[q>>2]=c[o>>2];c[q+4>>2]=c[o+4>>2];c[q+8>>2]=c[o+8>>2];c[q+12>>2]=c[o+12>>2];c[q+16>>2]=c[o+16>>2];c[q+20>>2]=c[o+20>>2];return};case 6:{o=f+16|0;q=f+20|0;p=(c[o>>2]|0)==(c[q>>2]|0);dZ(a,f);k=f|0;L1821:do{if(!p){do{if((c[k>>2]|0)==12){l=c[f+8>>2]|0;if((c[o>>2]|0)==(c[q>>2]|0)){break L1821}if((l|0)<(d[a+50|0]|0|0)){break}d$(a,f,l);break L1821}}while(0);d_(a,f)}}while(0);do{if((c[k>>2]|0)==11){q=f+8|0;o=c[q>>2]|0;p=(c[a>>2]|0)+12|0;b=c[p>>2]|0;l=c[b+(o<<2)>>2]|0;if((l&63|0)!=21){break}g=e|0;j=e+8|0;do{if((c[g>>2]|0)==12){i=c[j>>2]|0;if((i&256|0)!=0){r=o;s=b;t=l;break}if((d[a+50|0]|0|0)>(i|0)){r=o;s=b;t=l;break}i=a+36|0;c[i>>2]=(c[i>>2]|0)-1;i=c[q>>2]|0;n=c[p>>2]|0;r=i;s=n;t=c[n+(i<<2)>>2]|0}else{r=o;s=b;t=l}}while(0);c[s+(r<<2)>>2]=c[j>>2]<<23|t&8388607;c[g>>2]=11;c[j>>2]=c[q>>2];return}}while(0);d_(a,f);d8(a,21,e,f);return};case 0:{d8(a,12,e,f);return};case 1:{d8(a,13,e,f);return};case 2:{d8(a,14,e,f);return};case 3:{d8(a,15,e,f);return};case 4:{d8(a,16,e,f);return};case 5:{d8(a,17,e,f);return};case 8:{t=d2(a,e)|0;r=d2(a,f)|0;do{if((c[f>>2]|0)==12){s=c[f+8>>2]|0;if((s&256|0)!=0){break}if((d[a+50|0]|0|0)>(s|0)){break}s=a+36|0;c[s>>2]=(c[s>>2]|0)-1}}while(0);s=e|0;k=e+8|0;do{if((c[s>>2]|0)==12){l=c[k>>2]|0;if((l&256|0)!=0){break}if((d[a+50|0]|0|0)>(l|0)){break}l=a+36|0;c[l>>2]=(c[l>>2]|0)-1}}while(0);c[k>>2]=ee(a,23,1,t,r)|0;c[s>>2]=10;return};case 7:{s=d2(a,e)|0;r=d2(a,f)|0;do{if((c[f>>2]|0)==12){t=c[f+8>>2]|0;if((t&256|0)!=0){break}if((d[a+50|0]|0|0)>(t|0)){break}t=a+36|0;c[t>>2]=(c[t>>2]|0)-1}}while(0);t=e|0;k=e+8|0;do{if((c[t>>2]|0)==12){l=c[k>>2]|0;if((l&256|0)!=0){break}if((d[a+50|0]|0|0)>(l|0)){break}l=a+36|0;c[l>>2]=(c[l>>2]|0)-1}}while(0);c[k>>2]=ee(a,23,0,s,r)|0;c[t>>2]=10;return};case 12:{t=d2(a,e)|0;r=d2(a,f)|0;do{if((c[f>>2]|0)==12){s=c[f+8>>2]|0;if((s&256|0)!=0){break}if((d[a+50|0]|0|0)>(s|0)){break}s=a+36|0;c[s>>2]=(c[s>>2]|0)-1}}while(0);f=e|0;s=e+8|0;do{if((c[f>>2]|0)==12){e=c[s>>2]|0;if((e&256|0)!=0){break}if((d[a+50|0]|0|0)>(e|0)){break}e=a+36|0;c[e>>2]=(c[e>>2]|0)-1}}while(0);c[s>>2]=ee(a,25,1,r,t)|0;c[f>>2]=10;return};default:{return}}}function ec(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;f=b|0;g=c[f>>2]|0;h=b+32|0;i=c[h>>2]|0;j=b+24|0;k=c[j>>2]|0;if((i|0)==-1){l=k}else{m=b+12|0;n=i;i=g;while(1){o=c[i+12>>2]|0;p=o+(n<<2)|0;q=c[p>>2]|0;r=(q>>>14)-131071|0;if((r|0)==-1){s=-1}else{s=n+1+r|0}if((n|0)>0){r=o+(n-1<<2)|0;o=c[r>>2]|0;if((a[992+(o&63)|0]|0)<0){t=r;u=o}else{v=1509}}else{v=1509}if((v|0)==1509){v=0;t=p;u=q}if((u&63|0)==27){c[t>>2]=u&8372224|u>>>23<<6|26;o=(c[(c[f>>2]|0)+12>>2]|0)+(n<<2)|0;r=k+~n|0;if((((r|0)>-1?r:-r|0)|0)>131071){ff(c[m>>2]|0,5464)}c[o>>2]=c[o>>2]&16383|(r<<14)+2147467264}else{r=k+~n|0;if((((r|0)>-1?r:-r|0)|0)>131071){ff(c[m>>2]|0,5464);w=c[p>>2]|0}else{w=q}c[p>>2]=w&16383|(r<<14)+2147467264}if((s|0)==-1){break}n=s;i=c[f>>2]|0}l=c[j>>2]|0}c[h>>2]=-1;h=g+44|0;if((l+1|0)>(c[h>>2]|0)){f=g+12|0;i=ft(c[b+16>>2]|0,c[f>>2]|0,h,4,2147483645,9304)|0;c[f>>2]=i;x=c[j>>2]|0;y=i}else{x=l;y=c[g+12>>2]|0}c[y+(x<<2)>>2]=d;d=c[j>>2]|0;x=g+48|0;if((d+1|0)>(c[x>>2]|0)){y=g+20|0;l=ft(c[b+16>>2]|0,c[y>>2]|0,x,4,2147483645,9304)|0;c[y>>2]=l;z=c[j>>2]|0;A=l;B=A+(z<<2)|0;c[B>>2]=e;C=c[j>>2]|0;D=C+1|0;c[j>>2]=D;return C|0}else{z=d;A=c[g+20>>2]|0;B=A+(z<<2)|0;c[B>>2]=e;C=c[j>>2]|0;D=C+1|0;c[j>>2]=D;return C|0}return 0}function ed(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=((d-1|0)/50|0)+1|0;d=b<<6|((e|0)==-1?0:e<<23)|34;if((f|0)<512){e=f<<14|d;g=c[(c[a+12>>2]|0)+8>>2]|0;ec(a,e,g)|0;h=b+1|0;i=a+36|0;c[i>>2]=h;return}else{g=a+12|0;e=c[(c[g>>2]|0)+8>>2]|0;ec(a,d,e)|0;e=c[(c[g>>2]|0)+8>>2]|0;ec(a,f,e)|0;h=b+1|0;i=a+36|0;c[i>>2]=h;return}}function ee(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;g=a+12|0;ec(a,d<<6|b|e<<23|f<<14,c[(c[g>>2]|0)+8>>2]|0)|0;f=a+32|0;e=c[f>>2]|0;c[f>>2]=-1;f=ec(a,2147450902,c[(c[g>>2]|0)+8>>2]|0)|0;if((e|0)==-1){h=f;return h|0}if((f|0)==-1){h=e;return h|0}b=c[(c[a>>2]|0)+12>>2]|0;a=f;while(1){i=b+(a<<2)|0;j=c[i>>2]|0;d=(j>>>14)-131071|0;if((d|0)==-1){break}k=a+1+d|0;if((k|0)==-1){break}else{a=k}}b=e+~a|0;if((((b|0)>-1?b:-b|0)|0)>131071){ff(c[g>>2]|0,5464);l=c[i>>2]|0}else{l=j}c[i>>2]=l&16383|(b<<14)+2147467264;h=f;return h|0}function ef(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;if((d|0)==0){g=1549}else{if((e|0)==0){g=1549}else{h=d;i=e&255}}if((g|0)==1549){h=0;i=0}c[b+68>>2]=h;c[b+60>>2]=f;c[b+64>>2]=f;a[b+56|0]=i;return 1}function eg(a){a=a|0;return c[a+68>>2]|0}function eh(a){a=a|0;return d[a+56|0]|0|0}function ei(a){a=a|0;return c[a+60>>2]|0}function ej(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=c[b+20>>2]|0;L1955:do{if((d|0)>0){g=c[b+40>>2]|0;h=d;i=f;while(1){if(i>>>0<=g>>>0){j=0;break}k=h-1|0;if((a[(c[c[i+4>>2]>>2]|0)+6|0]|0)==0){l=k-(c[i+20>>2]|0)|0}else{l=k}k=i-24|0;if((l|0)>0){h=l;i=k}else{m=l;n=k;break L1955}}return j|0}else{m=d;n=f}}while(0);if((m|0)!=0){c[e+96>>2]=0;j=1;return j|0}m=c[b+40>>2]|0;if(n>>>0<=m>>>0){j=0;return j|0}c[e+96>>2]=(n-m|0)/24|0;j=1;return j|0}function ek(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;i=i+16|0;g=f|0;dZ(a,b);j=b|0;k=c[j>>2]|0;L1974:do{switch(k|0){case 1:{l=c[a+24>>2]|0;do{if((l|0)>(c[a+28>>2]|0)){if((l|0)==0){if((d[a+50|0]|0|0)>(e|0)){break}else{break L1974}}m=(c[(c[a>>2]|0)+12>>2]|0)+(l-1<<2)|0;n=c[m>>2]|0;if((n&63|0)!=3){break}o=n>>>23;if((n>>>6&255|0)>(e|0)){break}if((o+1|0)<(e|0)){break}if((o|0)>=(e|0)){break L1974}c[m>>2]=n&8388607|e<<23;break L1974}}while(0);ec(a,e<<23|e<<6|3,c[(c[a+12>>2]|0)+8>>2]|0)|0;break};case 5:{h[g>>3]=+h[b+8>>3];c[g+8>>2]=3;ec(a,e<<6|(dV(a,g,g)|0)<<14|1,c[(c[a+12>>2]|0)+8>>2]|0)|0;break};case 4:{ec(a,e<<6|c[b+8>>2]<<14|1,c[(c[a+12>>2]|0)+8>>2]|0)|0;break};case 11:{l=(c[(c[a>>2]|0)+12>>2]|0)+(c[b+8>>2]<<2)|0;c[l>>2]=c[l>>2]&-16321|e<<6&16320;break};case 12:{l=c[b+8>>2]|0;if((l|0)==(e|0)){break L1974}ec(a,l<<23|e<<6,c[(c[a+12>>2]|0)+8>>2]|0)|0;break};case 3:case 2:{ec(a,e<<6|((k|0)==2)<<23|2,c[(c[a+12>>2]|0)+8>>2]|0)|0;break};default:{i=f;return}}}while(0);c[b+8>>2]=e;c[j>>2]=12;i=f;return}function el(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;f=c[b+40>>2]|0;g=c[d+96>>2]|0;d=f+(g*24|0)|0;h=c[f+(g*24|0)+4>>2]|0;do{if((c[h+8>>2]|0)==6){i=h;j=c[i>>2]|0;if((a[j+6|0]|0)!=0){k=1597;break}l=c[j+16>>2]|0;if((l|0)==0){k=1597;break}if((c[b+20>>2]|0)==(d|0)){j=c[b+24>>2]|0;c[f+(g*24|0)+12>>2]=j;m=j;n=c[(c[i>>2]|0)+16>>2]|0}else{m=c[f+(g*24|0)+12>>2]|0;n=l}i=eT(l,e,(m-(c[n+12>>2]|0)>>2)-1|0)|0;if((i|0)==0){k=1597;break}o=i;p=c[d>>2]|0}else{k=1597}}while(0);do{if((k|0)==1597){n=c[d>>2]|0;m=((c[((c[b+20>>2]|0)==(d|0)?b+8|0:f+((g+1|0)*24|0)+4|0)>>2]|0)-n>>4|0)>=(e|0)&(e|0)>0;if(m){o=m?8472:0;p=n;break}else{q=0}return q|0}}while(0);cB(b,p+(e-1<<4)|0);q=o;return q|0}function em(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;f=c[b+40>>2]|0;g=c[d+96>>2]|0;d=f+(g*24|0)|0;h=c[f+(g*24|0)+4>>2]|0;do{if((c[h+8>>2]|0)==6){i=h;j=c[i>>2]|0;if((a[j+6|0]|0)!=0){k=1610;break}l=c[j+16>>2]|0;if((l|0)==0){k=1610;break}if((c[b+20>>2]|0)==(d|0)){j=c[b+24>>2]|0;c[f+(g*24|0)+12>>2]=j;m=j;n=c[(c[i>>2]|0)+16>>2]|0}else{m=c[f+(g*24|0)+12>>2]|0;n=l}i=eT(l,e,(m-(c[n+12>>2]|0)>>2)-1|0)|0;if((i|0)==0){k=1610;break}o=i;p=c[d>>2]|0;q=b+8|0}else{k=1610}}while(0);do{if((k|0)==1610){n=b+8|0;m=c[d>>2]|0;h=((c[((c[b+20>>2]|0)==(d|0)?n:f+((g+1|0)*24|0)+4|0)>>2]|0)-m>>4|0)>=(e|0)&(e|0)>0;if(h){o=h?8472:0;p=m;q=n;break}else{r=0}s=b+8|0;t=c[s>>2]|0;u=t-16|0;c[s>>2]=u;return r|0}}while(0);g=c[q>>2]|0;q=e-1|0;e=g-16|0;f=p+(q<<4)|0;d=c[e+4>>2]|0;c[f>>2]=c[e>>2];c[f+4>>2]=d;c[p+(q<<4)+8>>2]=c[g-16+8>>2];r=o;s=b+8|0;t=c[s>>2]|0;u=t-16|0;c[s>>2]=u;return r|0}function en(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0;do{if((a[e]|0)==62){g=b+8|0;h=(c[g>>2]|0)-16|0;i=c[h>>2]|0;c[g>>2]=h;j=e+1|0;k=i;l=0;m=1619}else{i=c[f+96>>2]|0;if((i|0)==0){n=e;m=1622;break}h=c[b+40>>2]|0;j=e;k=c[c[h+(i*24|0)+4>>2]>>2]|0;l=h+(i*24|0)|0;m=1619}}while(0);L2030:do{if((m|0)==1619){e=k;if((k|0)==0){n=j;m=1622;break}i=a[j]|0;if(i<<24>>24==0){o=1;p=e;q=j;r=0;break}h=k+6|0;g=k+16|0;s=f+16|0;t=f+28|0;u=f+32|0;v=f+12|0;w=f+36|0;x=(l|0)==0;y=f+20|0;z=l+4|0;A=b+20|0;B=b+24|0;C=l+12|0;D=e+7|0;E=f+24|0;F=f+8|0;G=f+4|0;H=l+20|0;I=l-24|0;J=l-24+4|0;K=l-24+12|0;L=j;M=1;N=i;while(1){L2036:do{switch(N<<24>>24|0){case 110:{L2038:do{if(x){m=1649}else{i=c[z>>2]|0;do{if((c[i+8>>2]|0)==6){if((a[(c[i>>2]|0)+6|0]|0)!=0){break}if((c[H>>2]|0)>0){m=1649;break L2038}}}while(0);i=c[J>>2]|0;if((c[i+8>>2]|0)!=6){m=1649;break}O=i;i=c[O>>2]|0;if((a[i+6|0]|0)!=0){m=1649;break}if((c[A>>2]|0)==(I|0)){P=c[B>>2]|0;c[K>>2]=P;Q=c[O>>2]|0;R=P}else{Q=i;R=c[K>>2]|0}i=c[(c[Q+16>>2]|0)+12>>2]|0;P=c[i+((R-i>>2)-1<<2)>>2]|0;i=P&63;if(!((i|0)==28|(i|0)==29|(i|0)==33)){m=1649;break}i=er(b,I,P>>>6&255,G)|0;c[F>>2]=i;if((i|0)!=0){S=M;break L2036}}}while(0);if((m|0)==1649){m=0;c[F>>2]=0}c[F>>2]=10576;c[G>>2]=0;S=M;break};case 117:{c[E>>2]=d[D]|0;S=M;break};case 108:{do{if(x){T=-1}else{i=c[z>>2]|0;if((c[i+8>>2]|0)!=6){T=-1;break}P=i;i=c[P>>2]|0;if((a[i+6|0]|0)!=0){T=-1;break}if((c[A>>2]|0)==(l|0)){O=c[B>>2]|0;c[C>>2]=O;U=c[P>>2]|0;V=O}else{U=i;V=c[C>>2]|0}i=c[U+16>>2]|0;O=(V-(c[i+12>>2]|0)>>2)-1|0;if((O|0)<0){T=-1;break}P=c[i+20>>2]|0;if((P|0)==0){T=0;break}T=c[P+(O<<2)>>2]|0}}while(0);c[y>>2]=T;S=M;break};case 83:{if((a[h]|0)==0){O=(c[(c[g>>2]|0)+32>>2]|0)+16|0;c[s>>2]=O;P=c[(c[g>>2]|0)+60>>2]|0;c[t>>2]=P;c[u>>2]=c[(c[g>>2]|0)+64>>2];W=O;X=(P|0)==0?9144:9024}else{c[s>>2]=9536;c[t>>2]=-1;c[u>>2]=-1;W=9536;X=9288}c[v>>2]=X;fz(w,W,60);S=M;break};case 76:case 102:{S=M;break};default:{S=0}}}while(0);P=L+1|0;O=a[P]|0;if(O<<24>>24==0){o=S;p=e;q=j;r=0;break L2030}else{L=P;M=S;N=O}}}}while(0);if((m|0)==1622){c[f+8>>2]=10576;c[f+4>>2]=10576;c[f+12>>2]=8864;c[f+20>>2]=-1;c[f+28>>2]=-1;c[f+32>>2]=-1;c[f+16>>2]=8648;fz(f+36|0,8648,60);c[f+24>>2]=0;o=1;p=0;q=n;r=1}if((aU(q|0,102)|0)!=0){n=b+8|0;f=c[n>>2]|0;if(r){c[f+8>>2]=0}else{c[f>>2]=p;c[f+8>>2]=6}f=c[n>>2]|0;if(((c[b+28>>2]|0)-f|0)<17){eA(b,1);Y=c[n>>2]|0}else{Y=f}c[n>>2]=Y+16}if((aU(q|0,76)|0)==0){return o|0}do{if(r){m=1664}else{if((a[p+6|0]|0)!=0){m=1664;break}q=f5(b,0,0)|0;Y=p+16|0;n=c[Y>>2]|0;f=c[n+20>>2]|0;if((c[n+48>>2]|0)>0){n=0;do{S=gc(b,q,c[f+(n<<2)>>2]|0)|0;c[S>>2]=1;c[S+8>>2]=1;n=n+1|0;}while((n|0)<(c[(c[Y>>2]|0)+48>>2]|0))}Y=c[b+8>>2]|0;c[Y>>2]=q;c[Y+8>>2]=5}}while(0);if((m|0)==1664){c[(c[b+8>>2]|0)+8>>2]=0}m=b+8|0;p=c[m>>2]|0;if(((c[b+28>>2]|0)-p|0)<17){eA(b,1);Z=c[m>>2]|0}else{Z=p}c[m>>2]=Z+16;return o|0}function eo(a){a=a|0;return(ep(a,c[a+44>>2]|0,255)|0)!=0|0}function ep(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;g=c[b+44>>2]|0;h=a[b+75|0]|0;if((h&255)>=251){i=0;return i|0}j=h&255;k=a[b+74|0]|0;l=k&255;if(((l&1)+(d[b+73|0]|0)|0)>(j|0)|(l&5|0)==4){i=0;return i|0}l=d[b+72|0]|0;if((c[b+36>>2]|0)>(l|0)){i=0;return i|0}m=c[b+48>>2]|0;if(!(((m|0)==(g|0)|(m|0)==0)&(g|0)>0)){i=0;return i|0}m=g-1|0;n=c[b+12>>2]|0;o=c[n+(m<<2)>>2]|0;if((o&63|0)!=30){i=0;return i|0}if((e|0)<=0){i=o;return i|0}o=b+8|0;p=(f|0)==255;q=b+52|0;r=b+16|0;s=b+40|0;b=m;m=0;L2124:while(1){t=c[n+(m<<2)>>2]|0;u=t&63;v=t>>>6&255;if(u>>>0>=38){i=0;w=1754;break}x=h&255;if(v>>>0>=x>>>0){i=0;w=1755;break}y=a[992+u|0]|0;z=y&255;A=z&3;do{if((A|0)==0){B=t>>>23;C=t>>>14;D=C&511;E=z>>>4&3;do{if((E|0)==0){if((B|0)!=0){i=0;w=1763;break L2124}}else if((E|0)==2){if(x>>>0<=B>>>0){i=0;w=1764;break L2124}}else if((E|0)==3){if((B&256|0)==0){if(x>>>0>B>>>0){break}else{i=0;w=1766;break L2124}}else{if((B&255|0)<(c[s>>2]|0)){break}else{i=0;w=1765;break L2124}}}}while(0);E=z>>>2&3;if((E|0)==0){if((D|0)==0){F=B;G=0;break}else{i=0;w=1767;break L2124}}else if((E|0)==2){if(j>>>0>D>>>0){F=B;G=D;break}else{i=0;w=1768;break L2124}}else if((E|0)==3){if((C&256|0)==0){if(j>>>0>D>>>0){F=B;G=D;break}else{i=0;w=1770;break L2124}}else{if((C&255|0)<(c[s>>2]|0)){F=B;G=D;break}else{i=0;w=1769;break L2124}}}else{F=B;G=D;break}}else if((A|0)==1){E=t>>>14;if((z&48|0)!=48){F=E;G=0;break}if((E|0)<(c[s>>2]|0)){F=E;G=0}else{i=0;w=1771;break L2124}}else if((A|0)==2){E=(t>>>14)-131071|0;if((z&48|0)!=32){F=E;G=0;break}H=m+1+E|0;if(!((H|0)>-1&(H|0)<(g|0))){i=0;w=1772;break L2124}if((H|0)<=0){F=E;G=0;break}I=E+m|0;J=0;while(1){if((J|0)>=(H|0)){break}if((c[n+(I-J<<2)>>2]&8372287|0)==34){J=J+1|0}else{break}}if((J&1|0)==0){F=E;G=0}else{i=0;w=1773;break L2124}}else{F=0;G=0}}while(0);z=(y&64)!=0&(v|0)==(f|0)?m:b;if(y<<24>>24<0){if((m+2|0)>=(g|0)){i=0;w=1774;break}if((c[n+(m+1<<2)>>2]&63|0)!=22){i=0;w=1775;break}}L2160:do{switch(u|0){case 2:{if((G|0)!=1){K=m;L=z;break L2160}if((m+2|0)>=(g|0)){i=0;w=1776;break L2124}if((c[n+(m+1<<2)>>2]&8372287|0)==34){i=0;w=1777;break L2124}else{K=m;L=z}break};case 3:{K=m;L=(v|0)>(f|0)|(F|0)<(f|0)?z:m;break};case 4:case 8:{if((F|0)<(l|0)){K=m;L=z}else{i=0;w=1778;break L2124}break};case 5:case 7:{if((c[(c[o>>2]|0)+(F<<4)+8>>2]|0)==4){K=m;L=z}else{i=0;w=1779;break L2124}break};case 11:{t=v+1|0;if(t>>>0>=(h&255)>>>0){i=0;w=1780;break L2124}K=m;L=(t|0)==(f|0)?m:z;break};case 21:{if((F|0)<(G|0)){K=m;L=z}else{i=0;w=1781;break L2124}break};case 33:{if((G|0)==0){i=0;w=1782;break L2124}t=v+2|0;if((G+t|0)>=(h&255|0)){i=0;w=1783;break L2124}K=m;L=(t|0)>(f|0)?z:m;break};case 31:case 32:{if((v+3|0)>>>0<(h&255)>>>0){w=1723}else{i=0;w=1784;break L2124}break};case 22:{w=1723;break};case 28:case 29:{if((F|0)!=0){if((v-1+F|0)>=(h&255|0)){i=0;w=1785;break L2124}}t=G-1|0;do{if((G|0)==0){A=c[n+(m+1<<2)>>2]|0;x=A&63;if(!((x|0)==28|(x|0)==29|(x|0)==30|(x|0)==34)){i=0;w=1786;break L2124}if(A>>>0>=8388608){i=0;w=1787;break L2124}}else{if((t|0)==0){break}if((v-1+t|0)>=(h&255|0)){i=0;w=1788;break L2124}}}while(0);K=m;L=(v|0)>(f|0)?z:m;break};case 30:{t=F-1|0;if((t|0)<=0){K=m;L=z;break L2160}if((v-1+t|0)<(h&255|0)){K=m;L=z}else{i=0;w=1789;break L2124}break};case 34:{if((F|0)>0){if((F+v|0)>=(h&255|0)){i=0;w=1790;break L2124}}if((G|0)!=0){K=m;L=z;break L2160}t=m+1|0;if((t|0)<(g-1|0)){K=t;L=z}else{i=0;w=1791;break L2124}break};case 36:{if((F|0)>=(c[q>>2]|0)){i=0;w=1792;break L2124}t=a[(c[(c[r>>2]|0)+(F<<2)>>2]|0)+72|0]|0;E=t&255;J=E+m|0;if((J|0)>=(g|0)){i=0;w=1793;break L2124}if(t<<24>>24!=0){t=1;do{A=c[n+(t+m<<2)>>2]&63;if(!((A|0)==4|(A|0)==0)){i=0;w=1794;break L2124}t=t+1|0;}while((t|0)<=(E|0))}K=p?m:J;L=z;break};case 37:{if((k&6)!=2){i=0;w=1795;break L2124}if((F|0)==0){E=c[n+(m+1<<2)>>2]|0;t=E&63;if(!((t|0)==28|(t|0)==29|(t|0)==30|(t|0)==34)){i=0;w=1796;break L2124}if(E>>>0>=8388608){i=0;w=1760;break L2124}}if((v-2+F|0)<(h&255|0)){K=m;L=z}else{i=0;w=1761;break L2124}break};default:{K=m;L=z}}}while(0);if((w|0)==1723){w=0;v=m+1+F|0;K=((m|0)>=(v|0)|p|(v|0)>(e|0)?0:F)+m|0;L=z}v=K+1|0;if((v|0)<(e|0)){b=L;m=v}else{w=1750;break}}if((w|0)==1750){i=c[n+(L<<2)>>2]|0;return i|0}else if((w|0)==1754){return i|0}else if((w|0)==1755){return i|0}else if((w|0)==1760){return i|0}else if((w|0)==1761){return i|0}else if((w|0)==1763){return i|0}else if((w|0)==1764){return i|0}else if((w|0)==1765){return i|0}else if((w|0)==1766){return i|0}else if((w|0)==1767){return i|0}else if((w|0)==1768){return i|0}else if((w|0)==1769){return i|0}else if((w|0)==1770){return i|0}else if((w|0)==1771){return i|0}else if((w|0)==1772){return i|0}else if((w|0)==1773){return i|0}else if((w|0)==1774){return i|0}else if((w|0)==1775){return i|0}else if((w|0)==1776){return i|0}else if((w|0)==1777){return i|0}else if((w|0)==1778){return i|0}else if((w|0)==1779){return i|0}else if((w|0)==1780){return i|0}else if((w|0)==1781){return i|0}else if((w|0)==1782){return i|0}else if((w|0)==1783){return i|0}else if((w|0)==1784){return i|0}else if((w|0)==1785){return i|0}else if((w|0)==1786){return i|0}else if((w|0)==1787){return i|0}else if((w|0)==1788){return i|0}else if((w|0)==1789){return i|0}else if((w|0)==1790){return i|0}else if((w|0)==1791){return i|0}else if((w|0)==1792){return i|0}else if((w|0)==1793){return i|0}else if((w|0)==1794){return i|0}else if((w|0)==1795){return i|0}else if((w|0)==1796){return i|0}return 0}function eq(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+8|0;f=e|0;c[f>>2]=0;g=c[872+(c[b+8>>2]<<2)>>2]|0;h=c[a+20>>2]|0;j=c[h+8>>2]|0;k=c[h>>2]|0;while(1){if(k>>>0>=j>>>0){break}if((k|0)==(b|0)){l=1800;break}else{k=k+16|0}}do{if((l|0)==1800){k=er(a,h,b-(c[a+12>>2]|0)>>4,f)|0;if((k|0)==0){break}j=c[f>>2]|0;es(a,2592,(m=i,i=i+32|0,c[m>>2]=d,c[m+8>>2]=k,c[m+16>>2]=j,c[m+24>>2]=g,m)|0);i=m;i=e;return}}while(0);es(a,8664,(m=i,i=i+16|0,c[m>>2]=d,c[m+8>>2]=g,m)|0);i=m;i=e;return}function er(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;g=d+4|0;h=b+20|0;i=b+24|0;b=d+12|0;j=e;L2260:while(1){e=c[g>>2]|0;if((c[e+8>>2]|0)!=6){k=0;l=1828;break}m=e;e=c[m>>2]|0;if((a[e+6|0]|0)!=0){k=0;l=1831;break}n=c[e+16>>2]|0;e=n;if((c[h>>2]|0)==(d|0)){o=c[i>>2]|0;c[b>>2]=o;p=o;q=c[(c[m>>2]|0)+16>>2]|0}else{p=c[b>>2]|0;q=n}m=(p-(c[q+12>>2]|0)>>2)-1|0;o=eT(e,j+1|0,m)|0;c[f>>2]=o;if((o|0)!=0){k=2944;l=1829;break}r=ep(e,m,j)|0;switch(r&63|0){case 4:{l=1820;break L2260;break};case 0:{break};case 5:{l=1814;break L2260;break};case 11:{l=1823;break L2260;break};case 6:{l=1816;break L2260;break};default:{k=0;l=1830;break L2260}}m=r>>>23;if(m>>>0<(r>>>6&255)>>>0){j=m}else{k=0;l=1832;break}}if((l|0)==1828){return k|0}else if((l|0)==1820){j=c[n+28>>2]|0;if((j|0)==0){s=10424}else{s=(c[j+(r>>>23<<2)>>2]|0)+16|0}c[f>>2]=s;k=10256;return k|0}else if((l|0)==1831){return k|0}else if((l|0)==1814){c[f>>2]=(c[(c[n+8>>2]|0)+(r>>>14<<4)>>2]|0)+16;k=2584;return k|0}else if((l|0)==1823){s=r>>>14;do{if((s&256|0)==0){t=10424}else{j=s&255;q=c[n+8>>2]|0;if((c[q+(j<<4)+8>>2]|0)!=4){t=10424;break}t=(c[q+(j<<4)>>2]|0)+16|0}}while(0);c[f>>2]=t;k=10008;return k|0}else if((l|0)==1830){return k|0}else if((l|0)==1832){return k|0}else if((l|0)==1829){return k|0}else if((l|0)==1816){l=r>>>14;do{if((l&256|0)==0){u=10424}else{r=l&255;t=c[n+8>>2]|0;if((c[t+(r<<4)+8>>2]|0)!=4){u=10424;break}u=(c[t+(r<<4)>>2]|0)+16|0}}while(0);c[f>>2]=u;k=2280;return k|0}return 0}function es(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+80|0;g=f+64|0;h=g;c[h>>2]=e;c[h+4>>2]=0;h=fx(b,d,g|0)|0;g=f|0;d=c[b+20>>2]|0;e=c[d+4>>2]|0;if((c[e+8>>2]|0)!=6){ew(b);i=f;return}j=e;if((a[(c[j>>2]|0)+6|0]|0)!=0){ew(b);i=f;return}e=c[b+24>>2]|0;c[d+12>>2]=e;d=c[(c[j>>2]|0)+16>>2]|0;j=(e-(c[d+12>>2]|0)>>2)-1|0;do{if((j|0)<0){k=-1}else{e=c[d+20>>2]|0;if((e|0)==0){k=0;break}k=c[e+(j<<2)>>2]|0}}while(0);fz(g,(c[d+32>>2]|0)+16|0,60);fy(b,3576,(d=i,i=i+24|0,c[d>>2]=g,c[d+8>>2]=k,c[d+16>>2]=h,d)|0)|0;i=d;ew(b);i=f;return}function et(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+8|0;f=e|0;g=((c[b+8>>2]|0)-3|0)>>>0<2?d:b;c[f>>2]=0;b=c[872+(c[g+8>>2]<<2)>>2]|0;d=c[a+20>>2]|0;h=c[d+8>>2]|0;j=c[d>>2]|0;while(1){if(j>>>0>=h>>>0){break}if((j|0)==(g|0)){k=1850;break}else{j=j+16|0}}do{if((k|0)==1850){j=er(a,d,g-(c[a+12>>2]|0)>>4,f)|0;if((j|0)==0){break}h=c[f>>2]|0;es(a,2592,(l=i,i=i+32|0,c[l>>2]=8264,c[l+8>>2]=j,c[l+16>>2]=h,c[l+24>>2]=b,l)|0);i=l;i=e;return}}while(0);es(a,8664,(l=i,i=i+16|0,c[l>>2]=8264,c[l+8>>2]=b,l)|0);i=l;i=e;return}function eu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+24|0;f=e|0;g=(gk(b,e+8|0)|0)==0?b:d;c[f>>2]=0;d=c[872+(c[g+8>>2]<<2)>>2]|0;b=c[a+20>>2]|0;h=c[b+8>>2]|0;j=c[b>>2]|0;while(1){if(j>>>0>=h>>>0){break}if((j|0)==(g|0)){k=1859;break}else{j=j+16|0}}do{if((k|0)==1859){j=er(a,b,g-(c[a+12>>2]|0)>>4,f)|0;if((j|0)==0){break}h=c[f>>2]|0;es(a,2592,(l=i,i=i+32|0,c[l>>2]=6392,c[l+8>>2]=j,c[l+16>>2]=h,c[l+24>>2]=d,l)|0);i=l;i=e;return}}while(0);es(a,8664,(l=i,i=i+16|0,c[l>>2]=6392,c[l+8>>2]=d,l)|0);i=l;i=e;return}function ev(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=i;g=c[872+(c[d+8>>2]<<2)>>2]|0;d=c[872+(c[e+8>>2]<<2)>>2]|0;if((a[g+2|0]|0)==(a[d+2|0]|0)){es(b,4944,(h=i,i=i+8|0,c[h>>2]=g,h)|0);i=h;i=f;return 0}else{es(b,4104,(h=i,i=i+16|0,c[h>>2]=g,c[h+8>>2]=d,h)|0);i=h;i=f;return 0}return 0}function ew(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;b=c[a+116>>2]|0;if((b|0)==0){eC(a,2);return}d=c[a+32>>2]|0;e=d+(b+8)|0;if((c[e>>2]|0)!=6){eC(a,5)}f=a+8|0;g=c[f>>2]|0;h=g-16|0;i=g;j=c[h+4>>2]|0;c[i>>2]=c[h>>2];c[i+4>>2]=j;c[g+8>>2]=c[g-16+8>>2];g=c[f>>2]|0;j=d+b|0;b=g-16|0;d=c[j+4>>2]|0;c[b>>2]=c[j>>2];c[b+4>>2]=d;c[g-16+8>>2]=c[e>>2];e=c[f>>2]|0;if(((c[a+28>>2]|0)-e|0)<17){eA(a,1);k=c[f>>2]|0}else{k=e}c[f>>2]=k+16;eG(a,k-16|0,1);eC(a,2);return}function ex(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;e=i;i=i+48|0;f=1;g=0;h=i;i=i+168|0;c[h>>2]=0;while(1)switch(f|0){case 1:j=e|0;k=j+44|0;c[k>>2]=0;l=a+112|0;m=j|0;c[m>>2]=c[l>>2];c[l>>2]=j;n=j0(j+4|0,f,h)|0;f=4;break;case 4:if((n|0)==0){f=2;break}else{f=3;break};case 2:aj(b|0,a|0,d|0);if((r|0)!=0&(s|0)!=0){g=j1(c[r>>2]|0,h)|0;if((g|0)>0){f=-1;break}else return 0}r=s=0;f=3;break;case 3:c[l>>2]=c[m>>2];i=e;return c[k>>2]|0;case-1:if((g|0)==1){n=s;f=4}r=s=0;break}return 0}function ey(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+32|0;e=c[d>>2]|0;f=b+6|0;if((b+7|0)>>>0<268435456){g=a+44|0;h=fu(a,e,c[g>>2]<<4,f<<4)|0;i=g}else{h=fv(a)|0;i=a+44|0}g=h;c[d>>2]=g;c[i>>2]=f;c[a+28>>2]=g+(b<<4);b=a+8|0;f=e;c[b>>2]=g+((c[b>>2]|0)-f>>4<<4);b=c[a+104>>2]|0;do{if((b|0)!=0){e=b+8|0;c[e>>2]=g+((c[e>>2]|0)-f>>4<<4);e=c[b>>2]|0;if((e|0)==0){break}else{j=e}do{e=j+8|0;c[e>>2]=(c[d>>2]|0)+((c[e>>2]|0)-f>>4<<4);j=c[j>>2]|0;}while((j|0)!=0)}}while(0);j=c[a+40>>2]|0;b=a+20|0;if(j>>>0>(c[b>>2]|0)>>>0){k=a+12|0;l=c[k>>2]|0;m=l;n=m-f|0;o=n>>4;p=c[d>>2]|0;q=p+(o<<4)|0;c[k>>2]=q;return}else{r=j}do{j=r+8|0;c[j>>2]=(c[d>>2]|0)+((c[j>>2]|0)-f>>4<<4);j=r|0;c[j>>2]=(c[d>>2]|0)+((c[j>>2]|0)-f>>4<<4);j=r+4|0;c[j>>2]=(c[d>>2]|0)+((c[j>>2]|0)-f>>4<<4);r=r+24|0;}while(r>>>0<=(c[b>>2]|0)>>>0);k=a+12|0;l=c[k>>2]|0;m=l;n=m-f|0;o=n>>4;p=c[d>>2]|0;q=p+(o<<4)|0;c[k>>2]=q;return}function ez(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=a+40|0;e=c[d>>2]|0;if((b+1|0)>>>0<178956971){f=a+48|0;g=fu(a,e,(c[f>>2]|0)*24|0,b*24|0)|0;h=f}else{g=fv(a)|0;h=a+48|0}f=g;c[d>>2]=f;c[h>>2]=b;h=a+20|0;c[h>>2]=f+((((c[h>>2]|0)-e|0)/24|0)*24|0);c[a+36>>2]=f+((b-1|0)*24|0);return}function eA(a,b){a=a|0;b=b|0;var d=0;d=c[a+44>>2]|0;if((d|0)<(b|0)){ey(a,d+b|0);return}else{ey(a,d<<1);return}}function eB(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=i;i=i+104|0;g=f|0;h=c[b+68>>2]|0;if((h|0)==0){i=f;return}j=b+57|0;if((a[j]|0)==0){i=f;return}k=b+8|0;l=b+32|0;m=c[k>>2]|0;n=c[l>>2]|0;o=m-n|0;p=b+20|0;q=c[p>>2]|0;r=(c[q+8>>2]|0)-n|0;c[g>>2]=d;c[g+20>>2]=e;if((d|0)==4){c[g+96>>2]=0}else{c[g+96>>2]=(q-(c[b+40>>2]|0)|0)/24|0}do{if(((c[b+28>>2]|0)-m|0)<321){q=c[b+44>>2]|0;if((q|0)<20){ey(b,q+20|0);break}else{ey(b,q<<1);break}}}while(0);c[(c[p>>2]|0)+8>>2]=(c[k>>2]|0)+320;a[j]=0;cf[h&511](b,g);a[j]=1;c[(c[p>>2]|0)+8>>2]=(c[l>>2]|0)+r;c[k>>2]=(c[l>>2]|0)+o;i=f;return}function eC(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=d+112|0;g=c[f>>2]|0;if((g|0)!=0){c[g+44>>2]=e;b0((c[f>>2]|0)+4|0,1)}a[d+6|0]=e&255;g=d+16|0;if((c[(c[g>>2]|0)+88>>2]|0)==0){a_(1)}h=d+40|0;i=c[h>>2]|0;j=d+20|0;c[j>>2]=i;k=c[i>>2]|0;i=d+12|0;c[i>>2]=k;eU(d,k);k=c[i>>2]|0;if((e|0)==4){c[k>>2]=f_(d,8280,17)|0;c[k+8>>2]=4}else if((e|0)==3|(e|0)==2){i=c[d+8>>2]|0;l=i-16|0;m=k;n=c[l+4>>2]|0;c[m>>2]=c[l>>2];c[m+4>>2]=n;c[k+8>>2]=c[i-16+8>>2]}else if((e|0)==5){c[k>>2]=f_(d,9920,23)|0;c[k+8>>2]=4}c[d+8>>2]=k+16;b[d+52>>1]=b[d+54>>1]|0;a[d+57|0]=1;k=d+48|0;e=c[k>>2]|0;do{if((e|0)>2e4){i=c[h>>2]|0;n=i;if(((((c[j>>2]|0)-n|0)/24|0)+1|0)>=2e4){break}m=fu(d,i,e*24|0,48e4)|0;i=m;c[h>>2]=i;c[k>>2]=2e4;c[j>>2]=i+((((c[j>>2]|0)-n|0)/24|0)*24|0);c[d+36>>2]=m+479976}}while(0);c[d+116>>2]=0;c[f>>2]=0;cd[c[(c[g>>2]|0)+88>>2]&1023](d)|0;a_(1)}function eD(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=b+56|0;if((a[e]&2)==0){f=d;g=b+20|0}else{h=b+32|0;i=d-(c[h>>2]|0)|0;eB(b,1,-1);d=b+20|0;j=c[d>>2]|0;L2409:do{if((a[(c[c[j+4>>2]>>2]|0)+6|0]|0)==0){if((a[e]&2)==0){break}k=j+20|0;l=c[k>>2]|0;c[k>>2]=l-1;if((l|0)==0){break}do{eB(b,4,-1);if((a[e]&2)==0){break L2409}l=(c[d>>2]|0)+20|0;k=c[l>>2]|0;c[l>>2]=k-1;}while((k|0)!=0)}}while(0);f=(c[h>>2]|0)+i|0;g=d}d=c[g>>2]|0;i=d-24|0;c[g>>2]=i;g=c[d+4>>2]|0;h=c[d+16>>2]|0;c[b+12>>2]=c[i>>2];c[b+24>>2]=c[d-24+12>>2];d=b+8|0;if((h|0)==0){m=g;c[d>>2]=m;n=h+1|0;return n|0}else{o=h;p=g;q=f}while(1){if(q>>>0>=(c[d>>2]|0)>>>0){break}f=p+16|0;g=q;b=p;i=c[g+4>>2]|0;c[b>>2]=c[g>>2];c[b+4>>2]=i;c[p+8>>2]=c[q+8>>2];i=o-1|0;if((i|0)==0){m=f;r=1946;break}else{o=i;p=f;q=q+16|0}}if((r|0)==1946){c[d>>2]=m;n=h+1|0;return n|0}if((o|0)>0){s=o;t=p}else{m=p;c[d>>2]=m;n=h+1|0;return n|0}while(1){r=s-1|0;c[t+8>>2]=0;if((r|0)>0){s=r;t=t+16|0}else{break}}m=p+(o<<4)|0;c[d>>2]=m;n=h+1|0;return n|0}function eE(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=e+6|0;h=a[g]|0;if((h<<24>>24|0)==0){i=c[e+20>>2]|0;if((i|0)!=(c[e+40>>2]|0)){j=i;k=1951}}else if((h<<24>>24|0)!=1){j=c[e+20>>2]|0;k=1951}if((k|0)==1951){k=c[j>>2]|0;j=e+8|0;c[j>>2]=k;c[k>>2]=f_(e,6152,37)|0;c[k+8>>2]=4;do{if(((c[e+28>>2]|0)-(c[j>>2]|0)|0)<17){k=c[e+44>>2]|0;if((k|0)<1){ey(e,k+1|0);break}else{ey(e,k<<1);break}}}while(0);c[j>>2]=(c[j>>2]|0)+16;l=2;return l|0}j=e+52|0;k=b[j>>1]|0;if((k&65535)>199){h=c[c[e+20>>2]>>2]|0;i=e+8|0;c[i>>2]=h;c[h>>2]=f_(e,7968,16)|0;c[h+8>>2]=4;do{if(((c[e+28>>2]|0)-(c[i>>2]|0)|0)<17){h=c[e+44>>2]|0;if((h|0)<1){ey(e,h+1|0);break}else{ey(e,h<<1);break}}}while(0);c[i>>2]=(c[i>>2]|0)+16;l=2;return l|0}i=k+1&65535;b[j>>1]=i;b[e+54>>1]=i;i=e+8|0;k=ex(e,260,(c[i>>2]|0)+(-f<<4)|0)|0;if((k|0)==0){m=d[g]|0}else{a[g]=k&255;g=c[i>>2]|0;if((k|0)==4){c[g>>2]=f_(e,8280,17)|0;c[g+8>>2]=4}else if((k|0)==5){c[g>>2]=f_(e,9920,23)|0;c[g+8>>2]=4}else if((k|0)==3|(k|0)==2){f=g-16|0;h=g;n=c[f+4>>2]|0;c[h>>2]=c[f>>2];c[h+4>>2]=n;c[g+8>>2]=c[g-16+8>>2]}n=g+16|0;c[i>>2]=n;c[(c[e+20>>2]|0)+8>>2]=n;m=k}b[j>>1]=(b[j>>1]|0)-1&65535;l=m;return l|0}function eF(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;g=i;if((c[e+8>>2]|0)==6){j=e;k=b+32|0}else{l=gg(b,e,16)|0;m=b+32|0;n=e-(c[m>>2]|0)|0;o=l+8|0;if((c[o>>2]|0)!=6){eq(b,e,2472)}p=b+8|0;q=c[p>>2]|0;if(q>>>0>e>>>0){r=q;while(1){s=r-16|0;t=s;u=r;v=c[t+4>>2]|0;c[u>>2]=c[t>>2];c[u+4>>2]=v;c[r+8>>2]=c[r-16+8>>2];if(s>>>0>e>>>0){r=s}else{break}}w=c[p>>2]|0}else{w=q}do{if(((c[b+28>>2]|0)-w|0)<17){q=c[b+44>>2]|0;if((q|0)<1){ey(b,q+1|0);break}else{ey(b,q<<1);break}}}while(0);c[p>>2]=(c[p>>2]|0)+16;p=c[m>>2]|0;w=p+n|0;q=l;l=w;r=c[q+4>>2]|0;c[l>>2]=c[q>>2];c[l+4>>2]=r;c[p+(n+8)>>2]=c[o>>2];j=w;k=m}m=j-(c[k>>2]|0)|0;w=c[j>>2]|0;j=b+24|0;o=b+20|0;c[(c[o>>2]|0)+12>>2]=c[j>>2];if((a[w+6|0]|0)!=0){n=b+8|0;do{if(((c[b+28>>2]|0)-(c[n>>2]|0)|0)<321){p=c[b+44>>2]|0;if((p|0)<20){ey(b,p+20|0);break}else{ey(b,p<<1);break}}}while(0);p=c[o>>2]|0;r=b+36|0;do{if((p|0)==(c[r>>2]|0)){l=b+48|0;q=c[l>>2]|0;if((q|0)>2e4){eC(b,5);return 0}e=q<<1;s=b+40|0;v=c[s>>2]|0;if((e|1)>>>0<178956971){x=fu(b,v,q*24|0,q*48|0)|0}else{x=fv(b)|0}q=x;c[s>>2]=q;c[l>>2]=e;l=q+((((c[o>>2]|0)-v|0)/24|0)*24|0)|0;c[o>>2]=l;c[r>>2]=q+((e-1|0)*24|0);if((e|0)<=2e4){y=l;break}es(b,3400,(z=i,i=i+1|0,i=i+7>>3<<3,c[z>>2]=0,z)|0);i=z;y=c[o>>2]|0}else{y=p}}while(0);p=y+24|0;c[o>>2]=p;r=c[k>>2]|0;c[y+28>>2]=r+m;x=r+(m+16)|0;c[p>>2]=x;c[b+12>>2]=x;c[y+32>>2]=(c[n>>2]|0)+320;c[y+40>>2]=f;if((a[b+56|0]&1)!=0){eB(b,0,-1)}y=cd[c[(c[c[(c[o>>2]|0)+4>>2]>>2]|0)+16>>2]&1023](b)|0;if((y|0)<0){A=2;i=g;return A|0}x=(c[n>>2]|0)+(-y<<4)|0;eD(b,x)|0;A=1;i=g;return A|0}x=c[w+16>>2]|0;w=x;y=b+28|0;n=b+8|0;p=w+75|0;r=d[p]|0;do{if(((c[y>>2]|0)-(c[n>>2]|0)|0)<=(r<<4|0)){l=c[b+44>>2]|0;if((l|0)<(r|0)){ey(b,l+r|0);break}else{ey(b,l<<1);break}}}while(0);r=c[k>>2]|0;l=r+m|0;e=l;q=w+74|0;v=a[q]|0;do{if(v<<24>>24==0){s=r+(m+16)|0;u=s+(d[w+73|0]<<4)|0;if((c[n>>2]|0)>>>0<=u>>>0){B=e;C=s;break}c[n>>2]=u;B=e;C=s}else{s=c[n>>2]|0;u=(s-l>>4)-1|0;t=a[w+73|0]|0;D=t&255;if((D|0)>(u|0)){E=u;F=s;while(1){c[n>>2]=F+16;c[F+8>>2]=0;s=E+1|0;if((s|0)>=(D|0)){break}E=s;F=c[n>>2]|0}G=D;H=a[q]|0}else{G=u;H=v}if((H&4)==0){I=0}else{F=G-D|0;E=c[b+16>>2]|0;if((c[E+68>>2]|0)>>>0>=(c[E+64>>2]|0)>>>0){e1(b)}E=d[p]|0;do{if(((c[y>>2]|0)-(c[n>>2]|0)|0)<=(E<<4|0)){s=c[b+44>>2]|0;if((s|0)<(E|0)){ey(b,s+E|0);break}else{ey(b,s<<1);break}}}while(0);E=f5(b,F,1)|0;if((F|0)>0){u=0;do{s=c[n>>2]|0;J=u-F|0;u=u+1|0;K=gc(b,E,u)|0;L=s+(J<<4)|0;M=K;N=c[L+4>>2]|0;c[M>>2]=c[L>>2];c[M+4>>2]=N;c[K+8>>2]=c[s+(J<<4)+8>>2];}while((u|0)<(F|0))}u=gd(b,E,f_(b,2864,1)|0)|0;h[u>>3]=+(F|0);c[u+8>>2]=3;I=E}u=c[n>>2]|0;do{if(t<<24>>24!=0){J=-G|0;c[n>>2]=u+16;s=u+(J<<4)|0;K=u;N=c[s+4>>2]|0;c[K>>2]=c[s>>2];c[K+4>>2]=N;N=u+(J<<4)+8|0;c[u+8>>2]=c[N>>2];c[N>>2]=0;if((t&255)>1){O=1}else{break}do{N=c[n>>2]|0;J=O-G|0;c[n>>2]=N+16;K=u+(J<<4)|0;s=N;M=c[K+4>>2]|0;c[s>>2]=c[K>>2];c[s+4>>2]=M;M=u+(J<<4)+8|0;c[N+8>>2]=c[M>>2];c[M>>2]=0;O=O+1|0;}while((O|0)<(D|0))}}while(0);if((I|0)!=0){D=c[n>>2]|0;c[n>>2]=D+16;c[D>>2]=I;c[D+8>>2]=5}B=(c[k>>2]|0)+m|0;C=u}}while(0);m=c[o>>2]|0;k=b+36|0;do{if((m|0)==(c[k>>2]|0)){I=b+48|0;O=c[I>>2]|0;if((O|0)>2e4){eC(b,5);return 0}G=O<<1;y=b+40|0;H=c[y>>2]|0;if((G|1)>>>0<178956971){P=fu(b,H,O*24|0,O*48|0)|0}else{P=fv(b)|0}O=P;c[y>>2]=O;c[I>>2]=G;I=O+((((c[o>>2]|0)-H|0)/24|0)*24|0)|0;c[o>>2]=I;c[k>>2]=O+((G-1|0)*24|0);if((G|0)<=2e4){Q=I;break}es(b,3400,(z=i,i=i+1|0,i=i+7>>3<<3,c[z>>2]=0,z)|0);i=z;Q=c[o>>2]|0}else{Q=m}}while(0);m=Q+24|0;c[o>>2]=m;c[Q+28>>2]=B;c[m>>2]=C;c[b+12>>2]=C;m=Q+32|0;c[m>>2]=C+(d[p]<<4);c[j>>2]=c[x+12>>2];c[Q+44>>2]=0;c[Q+40>>2]=f;f=c[n>>2]|0;Q=c[m>>2]|0;if(f>>>0<Q>>>0){x=f;while(1){c[x+8>>2]=0;f=x+16|0;p=c[m>>2]|0;if(f>>>0<p>>>0){x=f}else{R=p;break}}}else{R=Q}c[n>>2]=R;if((a[b+56|0]&1)==0){A=0;i=g;return A|0}c[j>>2]=(c[j>>2]|0)+4;eB(b,0,-1);c[j>>2]=(c[j>>2]|0)-4;A=0;i=g;return A|0}function eG(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;g=a+52|0;h=(b[g>>1]|0)+1&65535;b[g>>1]=h;do{if((h&65535)>199){if(h<<16>>16==200){es(a,7968,(j=i,i=i+1|0,i=i+7>>3<<3,c[j>>2]=0,j)|0);i=j;break}if((h&65535)<=224){break}eC(a,5)}}while(0);if((eF(a,d,e)|0)==0){gr(a,1)}b[g>>1]=(b[g>>1]|0)-1&65535;g=c[a+16>>2]|0;if((c[g+68>>2]|0)>>>0<(c[g+64>>2]|0)>>>0){i=f;return}e1(a);i=f;return}function eH(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=d;f=b+20|0;g=b+6|0;do{if((a[g]|0)==0){if((eF(b,d-16|0,-1)|0)==0){break}return}else{h=c[f>>2]|0;a[g]=0;if((a[(c[c[h+4>>2]>>2]|0)+6|0]|0)==0){c[b+12>>2]=c[h>>2];break}if((eD(b,e)|0)==0){break}c[b+8>>2]=c[(c[f>>2]|0)+8>>2]}}while(0);gr(b,((c[f>>2]|0)-(c[b+40>>2]|0)|0)/24|0);return}function eI(b,d){b=b|0;d=d|0;var f=0,g=0;f=i;if((e[b+52>>1]|0)>(e[b+54>>1]|0)){es(b,4752,(g=i,i=i+1|0,i=i+7>>3<<3,c[g>>2]=0,g)|0);i=g}c[b+12>>2]=(c[b+8>>2]|0)+(-d<<4);a[b+6|0]=1;i=f;return-1|0}function eJ(d,e,f,g,h){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;i=d+52|0;j=b[i>>1]|0;k=d+20|0;l=c[k>>2]|0;m=d+40|0;n=c[m>>2]|0;o=d+57|0;p=a[o]|0;q=d+116|0;r=c[q>>2]|0;c[q>>2]=h;h=ex(d,e,f)|0;if((h|0)==0){c[q>>2]=r;return h|0}f=l-n|0;n=c[d+32>>2]|0;l=n+g|0;eU(d,l);if((h|0)==4){c[l>>2]=f_(d,8280,17)|0;c[n+(g+8)>>2]=4}else if((h|0)==3|(h|0)==2){e=c[d+8>>2]|0;s=e-16|0;t=l;u=c[s+4>>2]|0;c[t>>2]=c[s>>2];c[t+4>>2]=u;c[n+(g+8)>>2]=c[e-16+8>>2]}else if((h|0)==5){c[l>>2]=f_(d,9920,23)|0;c[n+(g+8)>>2]=4}c[d+8>>2]=n+(g+16);b[i>>1]=j;j=c[m>>2]|0;i=j;g=i+f|0;c[k>>2]=g;c[d+12>>2]=c[g>>2];c[d+24>>2]=c[i+(f+12)>>2];a[o]=p;p=d+48|0;o=c[p>>2]|0;if((o|0)<=2e4){c[q>>2]=r;return h|0}f=j;if((((g-f|0)/24|0)+1|0)>=2e4){c[q>>2]=r;return h|0}g=fu(d,i,o*24|0,48e4)|0;o=g;c[m>>2]=o;c[p>>2]=2e4;c[k>>2]=o+((((c[k>>2]|0)-f|0)/24|0)*24|0);c[d+36>>2]=g+479976;c[q>>2]=r;return h|0}function eK(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=i;i=i+24|0;f=e|0;c[f>>2]=b;c[f+16>>2]=d;d=f+4|0;c[d>>2]=0;b=f+12|0;c[b>>2]=0;g=eJ(a,258,f,(c[a+8>>2]|0)-(c[a+32>>2]|0)|0,c[a+116>>2]|0)|0;fu(a,c[d>>2]|0,c[b>>2]|0,0)|0;i=e;return g|0}function eL(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=e;g=gv(c[f>>2]|0)|0;h=c[b+16>>2]|0;if((c[h+68>>2]|0)>>>0>=(c[h+64>>2]|0)>>>0){e1(b)}h=cg[((g|0)==27?256:258)&511](b,c[f>>2]|0,e+4|0,c[e+16>>2]|0)|0;e=h+72|0;f=eP(b,d[e]|0,c[b+72>>2]|0)|0;g=f;c[f+16>>2]=h;if((a[e]|0)!=0){h=0;do{c[g+20+(h<<2)>>2]=eQ(b)|0;h=h+1|0;}while((h|0)<(d[e]|0))}e=b+8|0;h=c[e>>2]|0;c[h>>2]=f;c[h+8>>2]=6;if(((c[b+28>>2]|0)-(c[e>>2]|0)|0)>=17){i=c[e>>2]|0;j=i+16|0;c[e>>2]=j;return}h=c[b+44>>2]|0;if((h|0)<1){ey(b,h+1|0);i=c[e>>2]|0;j=i+16|0;c[e>>2]=j;return}else{ey(b,h<<1);i=c[e>>2]|0;j=i+16|0;c[e>>2]=j;return}}function eM(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0;g=i;i=i+40|0;h=g+16|0;c[h>>2]=a;c[h+4>>2]=d;c[h+8>>2]=e;c[h+12>>2]=f;f=h+16|0;j=g|0;gj(j);c[f>>2]=cg[d&511](a,j,12,e)|0;eN(b,0,h);i=g;return c[f>>2]|0}function eN(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0;f=i;i=i+200|0;g=f|0;j=f+8|0;k=f+16|0;l=f+24|0;m=f+32|0;n=f+40|0;o=f+48|0;p=f+56|0;q=f+64|0;r=f+72|0;s=f+80|0;t=f+88|0;u=f+96|0;v=f+104|0;w=f+112|0;x=f+120|0;y=f+128|0;z=f+136|0;A=f+144|0;B=f+152|0;C=f+160|0;D=f+168|0;E=f+176|0;F=f+184|0;G=f+192|0;H=b+32|0;I=c[H>>2]|0;do{if((I|0)==(d|0)){J=w;K=x;L=2103}else{M=(c[e+12>>2]|0)==0?I:0;N=w;O=x;if((M|0)==0){J=N;K=O;L=2103;break}P=M+16|0;if((P|0)==0){J=N;K=O;L=2103;break}c[x>>2]=(c[M+12>>2]|0)+1;M=e+16|0;if((c[M>>2]|0)!=0){Q=N;R=O;break}S=e+4|0;T=e|0;U=e+8|0;V=cg[c[S>>2]&511](c[T>>2]|0,O,4,c[U>>2]|0)|0;c[M>>2]=V;if((V|0)!=0){Q=N;R=O;break}c[M>>2]=cg[c[S>>2]&511](c[T>>2]|0,P,c[x>>2]|0,c[U>>2]|0)|0;Q=N;R=O}}while(0);do{if((L|0)==2103){c[w>>2]=0;x=e+16|0;if((c[x>>2]|0)!=0){Q=J;R=K;break}c[x>>2]=cg[c[e+4>>2]&511](c[e>>2]|0,J,4,c[e+8>>2]|0)|0;Q=J;R=K}}while(0);c[v>>2]=c[b+60>>2];K=e+16|0;R=c[K>>2]|0;if((R|0)==0){J=cg[c[e+4>>2]&511](c[e>>2]|0,v,4,c[e+8>>2]|0)|0;c[K>>2]=J;W=J}else{W=R}c[u>>2]=c[b+64>>2];if((W|0)==0){R=cg[c[e+4>>2]&511](c[e>>2]|0,u,4,c[e+8>>2]|0)|0;c[K>>2]=R;X=R}else{X=W}a[t]=a[b+72|0]|0;if((X|0)==0){W=cg[c[e+4>>2]&511](c[e>>2]|0,t,1,c[e+8>>2]|0)|0;c[K>>2]=W;Y=W}else{Y=X}a[s]=a[b+73|0]|0;if((Y|0)==0){X=cg[c[e+4>>2]&511](c[e>>2]|0,s,1,c[e+8>>2]|0)|0;c[K>>2]=X;Z=X}else{Z=Y}a[r]=a[b+74|0]|0;if((Z|0)==0){Y=cg[c[e+4>>2]&511](c[e>>2]|0,r,1,c[e+8>>2]|0)|0;c[K>>2]=Y;_=Y}else{_=Z}a[q]=a[b+75|0]|0;if((_|0)==0){Z=cg[c[e+4>>2]&511](c[e>>2]|0,q,1,c[e+8>>2]|0)|0;c[K>>2]=Z;$=Z}else{$=_}_=c[b+12>>2]|0;Z=c[b+44>>2]|0;c[p>>2]=Z;do{if(($|0)==0){q=e+4|0;Y=e|0;r=e+8|0;X=cg[c[q>>2]&511](c[Y>>2]|0,p,4,c[r>>2]|0)|0;c[K>>2]=X;if((X|0)!=0){aa=X;L=2122;break}X=cg[c[q>>2]&511](c[Y>>2]|0,_,Z<<2,c[r>>2]|0)|0;c[K>>2]=X;r=c[b+40>>2]|0;c[o>>2]=r;if((X|0)!=0){ab=X;ac=r;break}X=cg[c[e+4>>2]&511](c[e>>2]|0,o,4,c[e+8>>2]|0)|0;c[K>>2]=X;ab=X;ac=r}else{aa=$;L=2122}}while(0);if((L|0)==2122){$=c[b+40>>2]|0;c[o>>2]=$;ab=aa;ac=$}if((ac|0)>0){$=b+8|0;aa=e+4|0;o=e|0;Z=e+8|0;_=j;p=k;r=l;X=0;Y=ab;while(1){q=c[$>>2]|0;s=q+(X<<4)|0;W=q+(X<<4)+8|0;q=c[W>>2]|0;a[n]=q&255;if((Y|0)==0){t=cg[c[aa>>2]&511](c[o>>2]|0,n,1,c[Z>>2]|0)|0;c[K>>2]=t;ad=t;ae=c[W>>2]|0}else{ad=Y;ae=q}L2679:do{if((ae|0)==3){h[l>>3]=+h[s>>3];if((ad|0)!=0){af=ad;break}q=cg[c[aa>>2]&511](c[o>>2]|0,r,8,c[Z>>2]|0)|0;c[K>>2]=q;af=q}else if((ae|0)==1){a[m]=c[s>>2]&255;if((ad|0)!=0){af=ad;break}q=cg[c[aa>>2]&511](c[o>>2]|0,m,1,c[Z>>2]|0)|0;c[K>>2]=q;af=q}else if((ae|0)==4){q=c[s>>2]|0;do{if((q|0)!=0){W=q+16|0;if((W|0)==0){break}c[k>>2]=(c[q+12>>2]|0)+1;if((ad|0)!=0){af=ad;break L2679}t=cg[c[aa>>2]&511](c[o>>2]|0,p,4,c[Z>>2]|0)|0;c[K>>2]=t;if((t|0)!=0){af=t;break L2679}t=cg[c[aa>>2]&511](c[o>>2]|0,W,c[k>>2]|0,c[Z>>2]|0)|0;c[K>>2]=t;af=t;break L2679}}while(0);c[j>>2]=0;if((ad|0)!=0){af=ad;break}q=cg[c[aa>>2]&511](c[o>>2]|0,_,4,c[Z>>2]|0)|0;c[K>>2]=q;af=q}else{af=ad}}while(0);s=X+1|0;if((s|0)<(ac|0)){X=s;Y=af}else{ag=af;break}}}else{ag=ab}ab=c[b+52>>2]|0;c[g>>2]=ab;if((ag|0)==0){c[K>>2]=cg[c[e+4>>2]&511](c[e>>2]|0,g,4,c[e+8>>2]|0)|0}if((ab|0)>0){g=b+16|0;ag=0;do{eN(c[(c[g>>2]|0)+(ag<<2)>>2]|0,c[H>>2]|0,e);ag=ag+1|0;}while((ag|0)<(ab|0))}ab=e+12|0;if((c[ab>>2]|0)==0){ah=c[b+48>>2]|0}else{ah=0}ag=c[b+20>>2]|0;c[G>>2]=ah;H=c[K>>2]|0;do{if((H|0)==0){g=e+4|0;af=e|0;Y=e+8|0;X=cg[c[g>>2]&511](c[af>>2]|0,G,4,c[Y>>2]|0)|0;c[K>>2]=X;if((X|0)!=0){ai=X;break}X=cg[c[g>>2]&511](c[af>>2]|0,ag,ah<<2,c[Y>>2]|0)|0;c[K>>2]=X;ai=X}else{ai=H}}while(0);if((c[ab>>2]|0)==0){aj=c[b+56>>2]|0}else{aj=0}c[F>>2]=aj;if((ai|0)==0){H=cg[c[e+4>>2]&511](c[e>>2]|0,F,4,c[e+8>>2]|0)|0;c[K>>2]=H;ak=H}else{ak=ai}if((aj|0)>0){ai=b+24|0;H=D;F=E;ah=e+4|0;ag=e|0;G=e+8|0;X=C;Y=B;af=0;g=ak;while(1){ac=c[(c[ai>>2]|0)+(af*12|0)>>2]|0;do{if((ac|0)==0){L=2160}else{ad=ac+16|0;if((ad|0)==0){L=2160;break}c[E>>2]=(c[ac+12>>2]|0)+1;if((g|0)!=0){al=g;break}Z=cg[c[ah>>2]&511](c[ag>>2]|0,F,4,c[G>>2]|0)|0;c[K>>2]=Z;if((Z|0)!=0){al=Z;break}Z=cg[c[ah>>2]&511](c[ag>>2]|0,ad,c[E>>2]|0,c[G>>2]|0)|0;c[K>>2]=Z;al=Z}}while(0);do{if((L|0)==2160){L=0;c[D>>2]=0;if((g|0)!=0){al=g;break}ac=cg[c[ah>>2]&511](c[ag>>2]|0,H,4,c[G>>2]|0)|0;c[K>>2]=ac;al=ac}}while(0);ac=c[ai>>2]|0;c[C>>2]=c[ac+(af*12|0)+4>>2];if((al|0)==0){Z=cg[c[ah>>2]&511](c[ag>>2]|0,X,4,c[G>>2]|0)|0;c[K>>2]=Z;am=c[ai>>2]|0;an=Z}else{am=ac;an=al}c[B>>2]=c[am+(af*12|0)+8>>2];if((an|0)==0){ac=cg[c[ah>>2]&511](c[ag>>2]|0,Y,4,c[G>>2]|0)|0;c[K>>2]=ac;ao=ac}else{ao=an}ac=af+1|0;if((ac|0)<(aj|0)){af=ac;g=ao}else{ap=ao;break}}}else{ap=ak}if((c[ab>>2]|0)==0){aq=c[b+36>>2]|0}else{aq=0}c[A>>2]=aq;if((ap|0)==0){ab=cg[c[e+4>>2]&511](c[e>>2]|0,A,4,c[e+8>>2]|0)|0;c[K>>2]=ab;ar=ab}else{ar=ap}if((aq|0)<=0){i=f;return}ap=b+28|0;b=y;ab=z;A=e+4|0;ak=e|0;ao=e+8|0;e=0;g=ar;while(1){ar=c[(c[ap>>2]|0)+(e<<2)>>2]|0;do{if((ar|0)==0){L=2178}else{af=ar+16|0;if((af|0)==0){L=2178;break}c[z>>2]=(c[ar+12>>2]|0)+1;if((g|0)!=0){as=g;break}aj=cg[c[A>>2]&511](c[ak>>2]|0,ab,4,c[ao>>2]|0)|0;c[K>>2]=aj;if((aj|0)!=0){as=aj;break}aj=cg[c[A>>2]&511](c[ak>>2]|0,af,c[z>>2]|0,c[ao>>2]|0)|0;c[K>>2]=aj;as=aj}}while(0);do{if((L|0)==2178){L=0;c[y>>2]=0;if((g|0)!=0){as=g;break}ar=cg[c[A>>2]&511](c[ak>>2]|0,b,4,c[ao>>2]|0)|0;c[K>>2]=ar;as=ar}}while(0);ar=e+1|0;if((ar|0)<(aq|0)){e=ar;g=as}else{break}}i=f;return}function eO(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=fu(b,0,0,(d<<4)+24|0)|0;e3(b,f,6);a[f+6|0]=1;c[f+12>>2]=e;a[f+7|0]=d&255;return f|0}function eP(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;f=fu(b,0,0,(d<<2)+20|0)|0;g=f;e3(b,f,6);a[f+6|0]=0;c[f+12>>2]=e;a[f+7|0]=d&255;if((d|0)==0){return g|0}e=f+20|0;f=d;do{f=f-1|0;c[e+(f<<2)>>2]=0;}while((f|0)!=0);return g|0}function eQ(a){a=a|0;var b=0;b=fu(a,0,0,32)|0;e3(a,b,10);c[b+8>>2]=b+16;c[b+24>>2]=0;return b|0}function eR(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=c[b+16>>2]|0;g=b+104|0;while(1){h=c[g>>2]|0;if((h|0)==0){i=2201;break}j=c[h+8>>2]|0;if(j>>>0<e>>>0){i=2201;break}k=h;if((j|0)==(e|0)){break}else{g=h|0}}if((i|0)==2201){i=fu(b,0,0,32)|0;b=i;a[i+4|0]=10;a[i+5|0]=a[f+20|0]&3;c[i+8>>2]=e;c[i>>2]=c[g>>2];c[g>>2]=i;c[i+16>>2]=f+120;g=f+140|0;e=c[g>>2]|0;c[i+20>>2]=e;c[e+16>>2]=b;c[g>>2]=b;l=b;return l|0}b=h+5|0;h=a[b]|0;if((h&3&((d[f+20|0]|0)^3)|0)==0){l=k;return l|0}a[b]=h^3;l=k;return l|0}function eS(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;if((c[b+8>>2]|0)==(b+16|0)){d=b;e=fu(a,d,32,0)|0;return}f=b+16|0;g=f;h=f+4|0;c[(c[h>>2]|0)+16>>2]=c[g>>2];c[(c[g>>2]|0)+20>>2]=c[h>>2];d=b;e=fu(a,d,32,0)|0;return}function eT(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=c[a+56>>2]|0;if((e|0)<=0){f=0;return f|0}g=c[a+24>>2]|0;a=b;b=0;while(1){if((c[g+(b*12|0)+4>>2]|0)>(d|0)){f=0;h=2220;break}if((c[g+(b*12|0)+8>>2]|0)>(d|0)){i=a-1|0;if((i|0)==0){h=2216;break}else{j=i}}else{j=a}i=b+1|0;if((i|0)<(e|0)){a=j;b=i}else{f=0;h=2219;break}}if((h|0)==2216){f=(c[g+(b*12|0)>>2]|0)+16|0;return f|0}else if((h|0)==2220){return f|0}else if((h|0)==2219){return f|0}return 0}function eU(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;f=b+104|0;g=c[f>>2]|0;if((g|0)==0){return}h=(c[b+16>>2]|0)+20|0;i=g;while(1){g=i+8|0;if((c[g>>2]|0)>>>0<e>>>0){j=2234;break}c[f>>2]=c[i>>2];if((a[i+5|0]&3&((d[h]|0)^3)|0)==0){k=i+16|0;l=k+4|0;c[(c[l>>2]|0)+16>>2]=c[k>>2];c[(c[k>>2]|0)+20>>2]=c[l>>2];l=c[g>>2]|0;m=l;n=k;o=c[m+4>>2]|0;c[n>>2]=c[m>>2];c[n+4>>2]=o;c[k+8>>2]=c[l+8>>2];c[g>>2]=k;e9(b,i)}else{k=i+16|0;if((c[g>>2]|0)!=(k|0)){g=k+4|0;c[(c[g>>2]|0)+16>>2]=c[k>>2];c[(c[k>>2]|0)+20>>2]=c[g>>2]}g=i;fu(b,g,32,0)|0}g=c[f>>2]|0;if((g|0)==0){j=2235;break}else{i=g}}if((j|0)==2235){return}else if((j|0)==2234){return}}function eV(b){b=b|0;var c=0;c=fu(b,0,0,76)|0;e3(b,c,9);j2(c+8|0,0,60);b=c+72|0;w=0;a[b]=w&255;w=w>>8;a[b+1|0]=w&255;w=w>>8;a[b+2|0]=w&255;w=w>>8;a[b+3|0]=w&255;return c|0}function eW(a,b){a=a|0;b=b|0;fu(a,c[b+12>>2]|0,c[b+44>>2]<<2,0)|0;fu(a,c[b+16>>2]|0,c[b+52>>2]<<2,0)|0;fu(a,c[b+8>>2]|0,c[b+40>>2]<<4,0)|0;fu(a,c[b+20>>2]|0,c[b+48>>2]<<2,0)|0;fu(a,c[b+24>>2]|0,(c[b+56>>2]|0)*12|0,0)|0;fu(a,c[b+28>>2]|0,c[b+36>>2]<<2,0)|0;fu(a,b,76,0)|0;return}function eX(b,c){b=b|0;c=c|0;var e=0,f=0;e=d[c+7|0]|0;if((a[c+6|0]|0)==0){f=(e<<2)+20|0}else{f=(e<<4)+24|0}fu(b,c,f,0)|0;return}function eY(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=b+16|0;b=c[e>>2]|0;f=c[b+112>>2]|0;g=c[f>>2]|0;if((g|0)==0){h=0;return h|0}i=(d|0)==0;d=b+48|0;b=f;f=0;j=g;L2826:while(1){L2828:do{if(i){g=f;k=j;while(1){l=k+5|0;m=a[l]|0;if(!((m&3)!=0&(m&8)==0)){n=g;o=k;break L2828}m=c[k+8>>2]|0;p=m;if((m|0)==0){q=g;r=k;s=l;t=2258;break L2828}if((a[p+6|0]&4)!=0){q=g;r=k;s=l;t=2258;break L2828}if((gf(p,2,c[(c[e>>2]|0)+196>>2]|0)|0)==0){q=g;r=k;s=l;t=2258;break L2828}p=g+24+(c[k+16>>2]|0)|0;a[l]=a[l]|8;l=k|0;c[b>>2]=c[l>>2];m=c[d>>2]|0;if((m|0)==0){c[l>>2]=k}else{c[l>>2]=c[m>>2];c[c[d>>2]>>2]=k}c[d>>2]=k;m=c[b>>2]|0;if((m|0)==0){h=p;t=2265;break L2826}else{g=p;k=m}}}else{k=f;g=j;while(1){m=g+5|0;if((a[m]&8)!=0){n=k;o=g;break L2828}p=c[g+8>>2]|0;l=p;if((p|0)==0){q=k;r=g;s=m;t=2258;break L2828}if((a[l+6|0]&4)!=0){q=k;r=g;s=m;t=2258;break L2828}if((gf(l,2,c[(c[e>>2]|0)+196>>2]|0)|0)==0){q=k;r=g;s=m;t=2258;break L2828}l=k+24+(c[g+16>>2]|0)|0;a[m]=a[m]|8;m=g|0;c[b>>2]=c[m>>2];p=c[d>>2]|0;if((p|0)==0){c[m>>2]=g}else{c[m>>2]=c[p>>2];c[c[d>>2]>>2]=g}c[d>>2]=g;p=c[b>>2]|0;if((p|0)==0){h=l;t=2266;break L2826}else{k=l;g=p}}}}while(0);if((t|0)==2258){t=0;a[s]=a[s]|8;n=q;o=r}g=o|0;k=c[g>>2]|0;if((k|0)==0){h=n;t=2267;break}else{b=g;f=n;j=k}}if((t|0)==2266){return h|0}else if((t|0)==2267){return h|0}else if((t|0)==2265){return h|0}return 0}function eZ(a){a=a|0;var b=0;b=a+16|0;if((c[(c[b>>2]|0)+48>>2]|0)==0){return}do{e_(a);}while((c[(c[b>>2]|0)+48>>2]|0)!=0);return}function e_(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=b+16|0;e=c[d>>2]|0;f=e+48|0;g=c[f>>2]|0;h=g|0;i=c[h>>2]|0;if((i|0)==(g|0)){c[f>>2]=0;j=i|0}else{f=i|0;c[h>>2]=c[f>>2];j=f}f=e+112|0;c[j>>2]=c[c[f>>2]>>2];c[c[f>>2]>>2]=i;f=i+5|0;a[f]=a[e+20|0]&3|a[f]&-8;f=c[i+8>>2]|0;j=f;if((f|0)==0){return}if((a[j+6|0]&4)!=0){return}f=gf(j,2,c[(c[d>>2]|0)+196>>2]|0)|0;if((f|0)==0){return}d=b+57|0;j=a[d]|0;h=e+64|0;g=c[h>>2]|0;a[d]=0;c[h>>2]=c[e+68>>2]<<1;e=b+8|0;k=c[e>>2]|0;l=f;m=k;n=c[l+4>>2]|0;c[m>>2]=c[l>>2];c[m+4>>2]=n;c[k+8>>2]=c[f+8>>2];f=c[e>>2]|0;c[f+16>>2]=i;c[f+24>>2]=7;f=c[e>>2]|0;c[e>>2]=f+32;eG(b,f,0);a[d]=j;c[h>>2]=g;return}function e$(b){b=b|0;var d=0,e=0,f=0;d=c[b+16>>2]|0;a[d+20|0]=67;e0(b,d+28|0,-3)|0;e=d+8|0;if((c[e>>2]|0)<=0){return}f=d|0;d=0;do{e0(b,(c[f>>2]|0)+(d<<2)|0,-3)|0;d=d+1|0;}while((d|0)<(c[e>>2]|0));return}function e0(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;g=b+16|0;h=c[g>>2]|0;i=h+20|0;j=d[i]^3;k=c[e>>2]|0;if((k|0)==0){l=e;return l|0}m=h+28|0;h=f;f=e;e=k;while(1){k=h-1|0;if((h|0)==0){l=f;n=2310;break}o=e+4|0;if((a[o]|0)==8){p=e+104|0;e0(b,p,-3)|0}p=e+5|0;q=a[p]|0;L2894:do{if(((q&255^3)&j|0)==0){r=e|0;c[f>>2]=c[r>>2];if((e|0)==(c[m>>2]|0)){c[m>>2]=c[r>>2]}switch(d[o]|0){case 5:{f7(b,e);s=f;break L2894;break};case 4:{r=(c[g>>2]|0)+4|0;c[r>>2]=(c[r>>2]|0)-1;fu(b,e,(c[e+12>>2]|0)+17|0,0)|0;s=f;break L2894;break};case 7:{fu(b,e,(c[e+16>>2]|0)+24|0,0)|0;s=f;break L2894;break};case 9:{eW(b,e);s=f;break L2894;break};case 6:{eX(b,e);s=f;break L2894;break};case 8:{fU(b,e|0);s=f;break L2894;break};case 10:{eS(b,e);s=f;break L2894;break};default:{s=f;break L2894}}}else{a[p]=a[i]&3|q&-8;s=e|0}}while(0);q=c[s>>2]|0;if((q|0)==0){l=s;n=2312;break}else{h=k;f=s;e=q}}if((n|0)==2310){return l|0}else if((n|0)==2312){return l|0}return 0}function e1(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=c[b+16>>2]|0;e=(c[d+84>>2]|0)*10|0;f=d+68|0;g=d+64|0;h=d+76|0;c[h>>2]=(c[f>>2]|0)-(c[g>>2]|0)+(c[h>>2]|0);i=d+21|0;j=(e|0)==0?2147483646:e;do{j=j-(e4(b)|0)|0;k=a[i]|0;}while(k<<24>>24!=0&(j|0)>0);if(k<<24>>24==0){c[g>>2]=aa(c[d+80>>2]|0,((c[d+72>>2]|0)>>>0)/100|0)|0;return}d=c[h>>2]|0;if(d>>>0<1024){c[g>>2]=(c[f>>2]|0)+1024;return}else{c[h>>2]=d-1024;c[g>>2]=c[f>>2];return}}function e2(b,d){b=b|0;d=d|0;var e=0;e=c[b+16>>2]|0;b=d+5|0;a[b]=a[b]&-5;b=e+40|0;c[d+24>>2]=c[b>>2];c[b>>2]=d;return}function e3(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=c[b+16>>2]|0;b=f+28|0;c[d>>2]=c[b>>2];c[b>>2]=d;a[d+5|0]=a[f+20|0]&3;a[d+4|0]=e;return}function e4(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;e=b+16|0;f=c[e>>2]|0;g=f+21|0;switch(d[g]|0|0){case 0:{e6(b);h=0;return h|0};case 1:{i=f+36|0;if((c[i>>2]|0)!=0){h=fb(f)|0;return h|0}j=f+120|0;k=c[f+140>>2]|0;do{if((k|0)!=(j|0)){l=k;do{do{if((a[l+5|0]&7)==0){m=c[l+8>>2]|0;if((c[m+8>>2]|0)<=3){break}n=c[m>>2]|0;if((a[n+5|0]&3)==0){break}e8(f,n)}}while(0);l=c[l+20>>2]|0;}while((l|0)!=(j|0));if((c[i>>2]|0)==0){break}do{fb(f)|0;}while((c[i>>2]|0)!=0)}}while(0);j=f+44|0;c[i>>2]=c[j>>2];c[j>>2]=0;if((a[b+5|0]&3)!=0){e8(f,b)}fa(f);if((c[i>>2]|0)!=0){do{fb(f)|0;}while((c[i>>2]|0)!=0)}k=f+40|0;l=c[k>>2]|0;c[i>>2]=l;c[k>>2]=0;if((l|0)!=0){do{fb(f)|0;}while((c[i>>2]|0)!=0)}l=eY(b,0)|0;k=f+48|0;n=c[k>>2]|0;if((n|0)!=0){m=f+20|0;o=n;do{o=c[o>>2]|0;n=o+5|0;a[n]=a[m]&3|a[n]&-8;e8(f,o);}while((o|0)!=(c[k>>2]|0))}if((c[i>>2]|0)==0){p=0}else{k=0;while(1){o=(fb(f)|0)+k|0;if((c[i>>2]|0)==0){p=o;break}else{k=o}}}k=c[j>>2]|0;if((k|0)!=0){j=k;do{k=j;i=c[j+28>>2]|0;if(!((a[j+5|0]&16)==0|(i|0)==0)){o=j+12|0;m=i;do{m=m-1|0;i=c[o>>2]|0;n=i+(m<<4)+8|0;q=c[n>>2]|0;do{if((q|0)>3){r=(c[i+(m<<4)>>2]|0)+5|0;s=a[r]|0;if((q|0)==4){a[r]=s&-4;break}if((s&3)==0){if((q|0)!=7){break}if((s&8)==0){break}}c[n>>2]=0}}while(0);}while((m|0)!=0)}m=j+16|0;o=1<<(d[k+7|0]|0);do{o=o-1|0;n=c[m>>2]|0;q=n+(o<<5)|0;i=n+(o<<5)+8|0;s=c[i>>2]|0;L2988:do{if((s|0)!=0){r=n+(o<<5)+24|0;t=c[r>>2]|0;do{if((t|0)>3){u=(c[n+(o<<5)+16>>2]|0)+5|0;v=a[u]|0;if((t|0)==4){a[u]=v&-4;w=c[i>>2]|0;x=2367;break}else{if((v&3)==0){w=s;x=2367;break}else{break}}}else{w=s;x=2367}}while(0);do{if((x|0)==2367){x=0;if((w|0)<=3){break L2988}t=(c[q>>2]|0)+5|0;v=a[t]|0;if((w|0)==4){a[t]=v&-4;break L2988}if((v&3)!=0){break}if((w|0)!=7){break L2988}if((v&8)==0){break L2988}}}while(0);c[i>>2]=0;if((c[r>>2]|0)<=3){break}c[r>>2]=11}}while(0);}while((o|0)!=0);j=c[j+24>>2]|0;}while((j|0)!=0)}j=f+20|0;a[j]=a[j]^3;c[f+24>>2]=0;c[f+32>>2]=f+28;a[g]=2;c[f+72>>2]=(c[f+68>>2]|0)-(p+l);h=0;return h|0};case 4:{if((c[f+48>>2]|0)==0){a[g]=0;c[f+76>>2]=0;h=0;return h|0}e_(b);l=f+72|0;p=c[l>>2]|0;if(p>>>0<=100){h=100;return h|0}c[l>>2]=p-100;h=100;return h|0};case 2:{p=f+68|0;l=c[p>>2]|0;j=f+24|0;w=c[j>>2]|0;c[j>>2]=w+1;e0(b,(c[f>>2]|0)+(w<<2)|0,-3)|0;if((c[j>>2]|0)>=(c[f+8>>2]|0)){a[g]=3}j=f+72|0;c[j>>2]=(c[p>>2]|0)-l+(c[j>>2]|0);h=10;return h|0};case 3:{j=f+68|0;l=c[j>>2]|0;p=f+32|0;w=e0(b,c[p>>2]|0,40)|0;c[p>>2]=w;if((c[w>>2]|0)==0){w=c[e>>2]|0;e=c[w+8>>2]|0;if((c[w+4>>2]|0)>>>0<((e|0)/4|0)>>>0&(e|0)>64){fZ(b,(e|0)/2|0)}e=w+52|0;p=w+60|0;w=c[p>>2]|0;if(w>>>0>64){x=w>>>1;if((x+1|0)>>>0<4294967294){o=e|0;y=fu(b,c[o>>2]|0,w,x)|0;z=o}else{y=fv(b)|0;z=e|0}c[z>>2]=y;c[p>>2]=x}a[g]=4}g=f+72|0;c[g>>2]=(c[j>>2]|0)-l+(c[g>>2]|0);h=400;return h|0};default:{h=0;return h|0}}return 0}function e5(b){b=b|0;var d=0,e=0,f=0,g=0;d=c[b+16>>2]|0;e=d+21|0;f=a[e]|0;if((f&255)<2){c[d+24>>2]=0;c[d+32>>2]=d+28;c[d+36>>2]=0;c[d+40>>2]=0;c[d+44>>2]=0;a[e]=2;g=2407}else{if(f<<24>>24!=4){g=2407}}if((g|0)==2407){while(1){g=0;e4(b)|0;if((a[e]|0)==4){break}else{g=2407}}}e6(b);if((a[e]|0)!=0){do{e4(b)|0;}while((a[e]|0)!=0)}c[d+64>>2]=aa(c[d+80>>2]|0,((c[d+72>>2]|0)>>>0)/100|0)|0;return}function e6(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=b+16|0;b=c[d>>2]|0;c[b+36>>2]=0;c[b+40>>2]=0;c[b+44>>2]=0;e=b+112|0;f=c[e>>2]|0;if((a[f+5|0]&3)==0){g=f}else{e8(b,f);g=c[e>>2]|0}do{if((c[g+80>>2]|0)>3){e=c[g+72>>2]|0;if((a[e+5|0]&3)==0){break}e8(b,e)}}while(0);g=c[d>>2]|0;if((c[g+104>>2]|0)<=3){fa(b);h=b+21|0;a[h]=1;return}d=c[g+96>>2]|0;if((a[d+5|0]&3)==0){fa(b);h=b+21|0;a[h]=1;return}e8(b,d);fa(b);h=b+21|0;a[h]=1;return}function e7(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=c[b+16>>2]|0;if((a[f+21|0]|0)==1){e8(f,e);return}else{e=d+5|0;a[e]=a[f+20|0]&3|a[e]&-8;return}}function e8(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=e;L3073:while(1){g=f+5|0;e=a[g]&-4;a[g]=e;switch(d[f+4|0]|0|0){case 7:{break};case 5:{h=2442;break L3073;break};case 6:{h=2441;break L3073;break};case 9:{h=2444;break L3073;break};case 8:{h=2443;break L3073;break};case 10:{h=2436;break L3073;break};default:{h=2446;break L3073}}i=c[f+8>>2]|0;a[g]=e|4;do{if((i|0)!=0){if((a[i+5|0]&3)==0){break}e8(b,i)}}while(0);i=c[f+12>>2]|0;if((a[i+5|0]&3)==0){h=2448;break}f=i}if((h|0)==2442){i=b+36|0;c[f+24>>2]=c[i>>2];c[i>>2]=f;return}else if((h|0)==2441){i=b+36|0;c[f+8>>2]=c[i>>2];c[i>>2]=f;return}else if((h|0)==2444){i=b+36|0;c[f+68>>2]=c[i>>2];c[i>>2]=f;return}else if((h|0)==2443){i=b+36|0;c[f+108>>2]=c[i>>2];c[i>>2]=f;return}else if((h|0)==2436){i=f+8|0;e=c[i>>2]|0;do{if((c[e+8>>2]|0)>3){j=c[e>>2]|0;if((a[j+5|0]&3)==0){k=e;break}e8(b,j);k=c[i>>2]|0}else{k=e}}while(0);if((k|0)!=(f+16|0)){return}a[g]=a[g]|4;return}else if((h|0)==2446){return}else if((h|0)==2448){return}}function e9(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=b+16|0;b=c[e>>2]|0;f=b+28|0;c[d>>2]=c[f>>2];c[f>>2]=d;f=d+5|0;g=a[f]|0;if((g&7)!=0){return}if((a[b+21|0]|0)!=1){a[f]=a[b+20|0]&3|g&-8;return}a[f]=g|4;b=c[d+8>>2]|0;if((c[b+8>>2]|0)<=3){return}d=c[b>>2]|0;if((a[d+5|0]&3)==0){return}b=c[e>>2]|0;if((a[b+21|0]|0)==1){e8(b,d);return}else{a[f]=a[b+20|0]&3|g&-8;return}}function fa(b){b=b|0;var d=0;d=c[b+152>>2]|0;do{if((d|0)!=0){if((a[d+5|0]&3)==0){break}e8(b,d)}}while(0);d=c[b+156>>2]|0;do{if((d|0)!=0){if((a[d+5|0]&3)==0){break}e8(b,d)}}while(0);d=c[b+160>>2]|0;do{if((d|0)!=0){if((a[d+5|0]&3)==0){break}e8(b,d)}}while(0);d=c[b+164>>2]|0;do{if((d|0)!=0){if((a[d+5|0]&3)==0){break}e8(b,d)}}while(0);d=c[b+168>>2]|0;do{if((d|0)!=0){if((a[d+5|0]&3)==0){break}e8(b,d)}}while(0);d=c[b+172>>2]|0;do{if((d|0)!=0){if((a[d+5|0]&3)==0){break}e8(b,d)}}while(0);d=c[b+176>>2]|0;do{if((d|0)!=0){if((a[d+5|0]&3)==0){break}e8(b,d)}}while(0);d=c[b+180>>2]|0;do{if((d|0)!=0){if((a[d+5|0]&3)==0){break}e8(b,d)}}while(0);d=c[b+184>>2]|0;if((d|0)==0){return}if((a[d+5|0]&3)==0){return}e8(b,d);return}function fb(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;e=b+36|0;f=c[e>>2]|0;g=f+5|0;a[g]=a[g]|4;h=d[f+4|0]|0;if((h|0)==5){i=f;j=f+24|0;c[e>>2]=c[j>>2];k=f+8|0;l=c[k>>2]|0;m=l;do{if((l|0)==0){n=0;o=2512}else{if((a[m+5|0]&3)==0){p=m}else{e8(b,l);q=c[k>>2]|0;if((q|0)==0){n=0;o=2512;break}else{p=q}}if((a[p+6|0]&8)!=0){n=0;o=2512;break}q=gf(p,3,c[b+200>>2]|0)|0;if((q|0)==0){n=0;o=2512;break}if((c[q+8>>2]|0)!=4){n=0;o=2512;break}r=(c[q>>2]|0)+16|0;q=(aU(r|0,107)|0)!=0;s=(aU(r|0,118)|0)!=0;r=s&1;if(q|s){a[g]=(r<<4|(q&1)<<3|a[g]&-25&255)&255;t=b+44|0;c[j>>2]=c[t>>2];c[t>>2]=f}if(q&s){u=i+7|0;o=2541;break}else{if(s){v=q;w=r;x=1;o=2518;break}else{n=q;o=2512;break}}}}while(0);do{if((o|0)==2512){j=c[f+28>>2]|0;if((j|0)==0){v=n;w=0;x=0;o=2518;break}p=f+12|0;k=j;while(1){j=k-1|0;l=c[p>>2]|0;do{if((c[l+(j<<4)+8>>2]|0)>3){m=c[l+(j<<4)>>2]|0;if((a[m+5|0]&3)==0){break}e8(b,m)}}while(0);if((j|0)==0){v=n;w=0;x=0;o=2518;break}else{k=j}}}}while(0);if((o|0)==2518){n=i+7|0;i=(1<<d[n])-1|0;k=f+16|0;L3188:do{if(v){p=x^1;l=i;while(1){m=c[k>>2]|0;q=m+(l<<5)|0;r=c[m+(l<<5)+8>>2]|0;do{if((r|0)==0){s=m+(l<<5)+24|0;if((c[s>>2]|0)<=3){break}c[s>>2]=11}else{if(!((r|0)>3&p)){break}s=c[q>>2]|0;if((a[s+5|0]&3)==0){break}e8(b,s)}}while(0);if((l|0)==0){break L3188}l=l-1|0}}else{l=i;while(1){p=c[k>>2]|0;q=p+(l<<5)|0;r=p+(l<<5)+8|0;m=p+(l<<5)+24|0;j=(c[m>>2]|0)>3;do{if((c[r>>2]|0)==0){if(!j){break}c[m>>2]=11}else{do{if(j){s=c[p+(l<<5)+16>>2]|0;if((a[s+5|0]&3)==0){break}e8(b,s)}}while(0);if(x){break}if((c[r>>2]|0)<=3){break}s=c[q>>2]|0;if((a[s+5|0]&3)==0){break}e8(b,s)}}while(0);if((l|0)==0){break L3188}l=l-1|0}}}while(0);if((w|0)==0&(v^1)){y=n}else{u=n;o=2541}}if((o|0)==2541){a[g]=a[g]&-5;y=u}z=(c[f+28>>2]<<4)+32+(32<<d[y])|0;return z|0}else if((h|0)==6){y=f;c[e>>2]=c[f+8>>2];u=c[f+12>>2]|0;if((a[u+5|0]&3)!=0){e8(b,u)}u=f+6|0;do{if((a[u]|0)==0){o=f;n=c[f+16>>2]|0;if((a[n+5|0]&3)!=0){e8(b,n)}n=y+7|0;v=a[n]|0;if(v<<24>>24==0){A=0;break}else{B=0;C=v}while(1){v=c[o+20+(B<<2)>>2]|0;if((a[v+5|0]&3)==0){D=C}else{e8(b,v);D=a[n]|0}v=B+1|0;if((v|0)<(D&255|0)){B=v;C=D}else{A=D;break}}}else{n=y+7|0;o=a[n]|0;if(o<<24>>24==0){A=0;break}else{E=0;F=o}while(1){do{if((c[y+24+(E<<4)+8>>2]|0)>3){o=c[y+24+(E<<4)>>2]|0;if((a[o+5|0]&3)==0){G=F;break}e8(b,o);G=a[n]|0}else{G=F}}while(0);o=E+1|0;if((o|0)<(G&255|0)){E=o;F=G}else{A=G;break}}}}while(0);G=A&255;if((a[u]|0)==0){z=(G<<2)+20|0;return z|0}else{z=(G<<4)+24|0;return z|0}}else if((h|0)==8){G=f|0;u=f+108|0;c[e>>2]=c[u>>2];A=b+40|0;c[u>>2]=c[A>>2];c[A>>2]=f;a[g]=a[g]&-5;do{if((c[f+80>>2]|0)>3){g=c[f+72>>2]|0;if((a[g+5|0]&3)==0){break}e8(b,g)}}while(0);g=f+8|0;A=c[g>>2]|0;u=f+40|0;F=c[u>>2]|0;E=f+20|0;y=c[E>>2]|0;if(F>>>0>y>>>0){H=A}else{D=A;C=F;while(1){F=c[C+8>>2]|0;B=D>>>0<F>>>0?F:D;F=C+24|0;if(F>>>0>y>>>0){H=B;break}else{D=B;C=F}}}C=f+32|0;D=c[C>>2]|0;if(D>>>0<A>>>0){y=D;F=A;while(1){do{if((c[y+8>>2]|0)>3){A=c[y>>2]|0;if((a[A+5|0]&3)==0){I=F;break}e8(b,A);I=c[g>>2]|0}else{I=F}}while(0);A=y+16|0;if(A>>>0<I>>>0){y=A;F=I}else{J=A;break}}}else{J=D}if(J>>>0<=H>>>0){D=J;do{c[D+8>>2]=0;D=D+16|0;}while(D>>>0<=H>>>0)}D=H-(c[C>>2]|0)|0;C=f+48|0;H=c[C>>2]|0;do{if((H|0)>2e4){K=f+44|0}else{if(((((c[E>>2]|0)-(c[u>>2]|0)|0)/24|0)<<2|0)<(H|0)&(H|0)>16){ez(G,(H|0)/2|0)}J=f+44|0;I=c[J>>2]|0;if(!((D>>2|0)<(I|0)&(I|0)>90)){K=J;break}ey(G,(I|0)/2|0);K=J}}while(0);z=(c[K>>2]<<4)+120+((c[C>>2]|0)*24|0)|0;return z|0}else if((h|0)==9){c[e>>2]=c[f+68>>2];e=c[f+32>>2]|0;if((e|0)!=0){h=e+5|0;a[h]=a[h]&-4}h=f+40|0;e=c[h>>2]|0;if((e|0)>0){C=f+8|0;K=0;G=e;while(1){e=c[C>>2]|0;do{if((c[e+(K<<4)+8>>2]|0)>3){D=c[e+(K<<4)>>2]|0;if((a[D+5|0]&3)==0){L=G;break}e8(b,D);L=c[h>>2]|0}else{L=G}}while(0);e=K+1|0;if((e|0)<(L|0)){K=e;G=L}else{break}}}L=f+36|0;G=c[L>>2]|0;if((G|0)>0){K=f+28|0;C=0;e=G;while(1){G=c[(c[K>>2]|0)+(C<<2)>>2]|0;if((G|0)==0){M=e}else{D=G+5|0;a[D]=a[D]&-4;M=c[L>>2]|0}D=C+1|0;if((D|0)<(M|0)){C=D;e=M}else{break}}}M=f+52|0;e=c[M>>2]|0;if((e|0)>0){C=f+16|0;K=0;D=e;while(1){G=c[(c[C>>2]|0)+(K<<2)>>2]|0;do{if((G|0)==0){N=D}else{if((a[G+5|0]&3)==0){N=D;break}e8(b,G);N=c[M>>2]|0}}while(0);G=K+1|0;if((G|0)<(N|0)){K=G;D=N}else{O=N;break}}}else{O=e}e=f+56|0;N=c[e>>2]|0;if((N|0)>0){D=f+24|0;K=0;b=N;while(1){C=c[(c[D>>2]|0)+(K*12|0)>>2]|0;if((C|0)==0){P=b}else{G=C+5|0;a[G]=a[G]&-4;P=c[e>>2]|0}G=K+1|0;if((G|0)<(P|0)){K=G;b=P}else{break}}Q=c[M>>2]|0;R=P}else{Q=O;R=N}z=(c[h>>2]<<4)+76+(R*12|0)+(Q+(c[f+44>>2]|0)+(c[f+48>>2]|0)+(c[L>>2]|0)<<2)|0;return z|0}else{z=0;return z|0}return 0}function fc(b){b=b|0;var d=0,e=0,f=0;d=0;do{e=c[744+(d<<2)>>2]|0;f=f_(b,e,j_(e|0)|0)|0;e=f+5|0;a[e]=a[e]|32;d=d+1|0;a[f+6|0]=d&255;}while((d|0)<21);return}function fd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;if((b|0)>=257){e=c[744+(b-257<<2)>>2]|0;i=d;return e|0}f=(b8(b|0)|0)==0;g=c[a+52>>2]|0;if(f){f=fy(g,6208,(h=i,i=i+8|0,c[h>>2]=b,h)|0)|0;i=h;e=f;i=d;return e|0}else{f=fy(g,6424,(h=i,i=i+8|0,c[h>>2]=b,h)|0)|0;i=h;e=f;i=d;return e|0}return 0}function fe(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;f=i;i=i+160|0;g=f|0;h=f+80|0;j=b+64|0;fz(h,(c[j>>2]|0)+16|0,80);k=b+52|0;l=b+4|0;m=c[l>>2]|0;n=fy(c[k>>2]|0,5960,(o=i,i=i+24|0,c[o>>2]=h,c[o+8>>2]=m,c[o+16>>2]=d,o)|0)|0;i=o;if((e|0)==0){p=c[k>>2]|0;eC(p,3);i=f;return}d=c[k>>2]|0;do{if((e-284|0)>>>0<3){m=b+60|0;h=c[m>>2]|0;q=h+4|0;r=c[q>>2]|0;s=h+8|0;t=c[s>>2]|0;if((r+1|0)>>>0>t>>>0){if(t>>>0>2147483645){u=g|0;fz(u,(c[j>>2]|0)+16|0,80);v=c[k>>2]|0;w=c[l>>2]|0;fy(v,5960,(o=i,i=i+24|0,c[o>>2]=u,c[o+8>>2]=w,c[o+16>>2]=5096,o)|0)|0;i=o;eC(c[k>>2]|0,3);x=c[s>>2]|0;y=c[k>>2]|0}else{x=t;y=d}t=x<<1;if((t|0)==-2){z=fv(y)|0;A=h|0}else{w=h|0;z=fu(y,c[w>>2]|0,x,t)|0;A=w}c[A>>2]=z;c[s>>2]=t;B=c[q>>2]|0;C=z}else{B=r;C=c[h>>2]|0}c[q>>2]=B+1;a[C+B|0]=0;D=c[c[m>>2]>>2]|0}else{if((e|0)>=257){D=c[744+(e-257<<2)>>2]|0;break}m=(b8(e|0)|0)==0;q=c[k>>2]|0;if(m){m=fy(q,6208,(o=i,i=i+8|0,c[o>>2]=e,o)|0)|0;i=o;D=m;break}else{m=fy(q,6424,(o=i,i=i+8|0,c[o>>2]=e,o)|0)|0;i=o;D=m;break}}}while(0);fy(d,5768,(o=i,i=i+16|0,c[o>>2]=n,c[o+8>>2]=D,o)|0)|0;i=o;p=c[k>>2]|0;eC(p,3);i=f;return}function ff(a,b){a=a|0;b=b|0;fe(a,b,c[a+16>>2]|0);return}function fg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=c[a+52>>2]|0;f=f_(e,b,d)|0;d=gd(e,c[(c[a+48>>2]|0)+4>>2]|0,f)|0;a=d+8|0;if((c[a>>2]|0)!=0){return f|0}c[d>>2]=1;c[a>>2]=1;a=c[e+16>>2]|0;if((c[a+68>>2]|0)>>>0<(c[a+64>>2]|0)>>>0){return f|0}e1(e);return f|0}function fh(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;a[e+68|0]=46;c[e+52>>2]=b;c[e+32>>2]=287;h=e+56|0;c[h>>2]=f;c[e+48>>2]=0;c[e+4>>2]=1;c[e+8>>2]=1;c[e+64>>2]=g;g=e+60|0;f=c[g>>2]|0;i=fu(b,c[f>>2]|0,c[f+8>>2]|0,32)|0;c[c[g>>2]>>2]=i;c[(c[g>>2]|0)+8>>2]=32;g=c[h>>2]|0;i=c[g>>2]|0;c[g>>2]=i-1;g=c[h>>2]|0;if((i|0)==0){j=gu(g)|0;k=e|0;c[k>>2]=j;return}else{i=g+4|0;g=c[i>>2]|0;c[i>>2]=g+1;j=d[g]|0;k=e|0;c[k>>2]=j;return}}function fi(a){a=a|0;var b=0,d=0,e=0;c[a+8>>2]=c[a+4>>2];b=a+32|0;d=b|0;if((c[d>>2]|0)==287){c[a+16>>2]=fj(a,a+24|0)|0;return}else{e=a+16|0;a=b;c[e>>2]=c[a>>2];c[e+4>>2]=c[a+4>>2];c[e+8>>2]=c[a+8>>2];c[e+12>>2]=c[a+12>>2];c[d>>2]=287;return}}function fj(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aL=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0,aW=0,aX=0,aY=0,aZ=0,a_=0,a$=0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0,a8=0,a9=0,ba=0,bb=0,bc=0,bd=0,be=0,bf=0,bg=0,bh=0,bi=0,bj=0,bk=0,bl=0,bm=0,bn=0,bo=0;f=i;i=i+960|0;g=f|0;h=f+80|0;j=f+160|0;k=f+240|0;l=f+320|0;m=f+400|0;n=f+480|0;o=f+560|0;p=f+640|0;q=f+720|0;r=f+800|0;s=f+880|0;t=b+60|0;c[(c[t>>2]|0)+4>>2]=0;u=b|0;v=b+56|0;L3380:while(1){w=c[u>>2]|0;L3382:while(1){switch(w|0){case 126:{x=2712;break L3380;break};case 62:{x=2704;break L3380;break};case 10:case 13:{x=2667;break L3382;break};case 91:{x=2684;break L3380;break};case 60:{x=2696;break L3380;break};case 45:{break L3382;break};case 34:case 39:{x=2720;break L3380;break};case 61:{break L3380;break};case 46:{x=2827;break L3380;break};case-1:{y=287;x=2903;break L3380;break};default:{}}if((aB(w|0)|0)==0){x=2873;break L3380}z=c[v>>2]|0;A=c[z>>2]|0;c[z>>2]=A-1;z=c[v>>2]|0;if((A|0)==0){B=gu(z)|0}else{A=z+4|0;z=c[A>>2]|0;c[A>>2]=z+1;B=d[z]|0}c[u>>2]=B;w=B}if((x|0)==2667){x=0;fl(b);continue}z=c[v>>2]|0;A=c[z>>2]|0;c[z>>2]=A-1;z=c[v>>2]|0;if((A|0)==0){C=gu(z)|0}else{A=z+4|0;z=c[A>>2]|0;c[A>>2]=z+1;C=d[z]|0}c[u>>2]=C;if((C|0)!=45){y=45;x=2904;break}z=c[v>>2]|0;A=c[z>>2]|0;c[z>>2]=A-1;z=c[v>>2]|0;if((A|0)==0){D=gu(z)|0}else{A=z+4|0;z=c[A>>2]|0;c[A>>2]=z+1;D=d[z]|0}c[u>>2]=D;do{if((D|0)==91){z=fm(b)|0;c[(c[t>>2]|0)+4>>2]=0;if((z|0)>-1){fn(b,0,z);c[(c[t>>2]|0)+4>>2]=0;continue L3380}else{E=c[u>>2]|0;break}}else{E=D}}while(0);while(1){if((E|0)==10|(E|0)==13|(E|0)==(-1|0)){continue L3380}z=c[v>>2]|0;A=c[z>>2]|0;c[z>>2]=A-1;z=c[v>>2]|0;if((A|0)==0){F=gu(z)|0}else{A=z+4|0;z=c[A>>2]|0;c[A>>2]=z+1;F=d[z]|0}c[u>>2]=F;E=F}}do{if((x|0)==2712){F=c[v>>2]|0;E=c[F>>2]|0;c[F>>2]=E-1;F=c[v>>2]|0;if((E|0)==0){G=gu(F)|0}else{E=F+4|0;F=c[E>>2]|0;c[E>>2]=F+1;G=d[F]|0}c[u>>2]=G;if((G|0)!=61){y=126;i=f;return y|0}F=c[v>>2]|0;E=c[F>>2]|0;c[F>>2]=E-1;F=c[v>>2]|0;if((E|0)==0){H=gu(F)|0}else{E=F+4|0;F=c[E>>2]|0;c[E>>2]=F+1;H=d[F]|0}c[u>>2]=H;y=283;i=f;return y|0}else if((x|0)==2704){F=c[v>>2]|0;E=c[F>>2]|0;c[F>>2]=E-1;F=c[v>>2]|0;if((E|0)==0){I=gu(F)|0}else{E=F+4|0;F=c[E>>2]|0;c[E>>2]=F+1;I=d[F]|0}c[u>>2]=I;if((I|0)!=61){y=62;i=f;return y|0}F=c[v>>2]|0;E=c[F>>2]|0;c[F>>2]=E-1;F=c[v>>2]|0;if((E|0)==0){J=gu(F)|0}else{E=F+4|0;F=c[E>>2]|0;c[E>>2]=F+1;J=d[F]|0}c[u>>2]=J;y=281;i=f;return y|0}else if((x|0)==2684){F=fm(b)|0;if((F|0)>-1){fn(b,e,F);y=286;i=f;return y|0}if((F|0)==-1){y=91;i=f;return y|0}else{fe(b,5680,286);break}}else if((x|0)==2696){F=c[v>>2]|0;E=c[F>>2]|0;c[F>>2]=E-1;F=c[v>>2]|0;if((E|0)==0){K=gu(F)|0}else{E=F+4|0;F=c[E>>2]|0;c[E>>2]=F+1;K=d[F]|0}c[u>>2]=K;if((K|0)!=61){y=60;i=f;return y|0}F=c[v>>2]|0;E=c[F>>2]|0;c[F>>2]=E-1;F=c[v>>2]|0;if((E|0)==0){L=gu(F)|0}else{E=F+4|0;F=c[E>>2]|0;c[E>>2]=F+1;L=d[F]|0}c[u>>2]=L;y=282;i=f;return y|0}else if((x|0)==2720){F=c[t>>2]|0;E=F+4|0;D=c[E>>2]|0;C=F+8|0;B=c[C>>2]|0;if((D+1|0)>>>0>B>>>0){if(B>>>0>2147483645){z=r|0;fz(z,(c[b+64>>2]|0)+16|0,80);A=b+52|0;M=c[A>>2]|0;N=c[b+4>>2]|0;fy(M,5960,(O=i,i=i+24|0,c[O>>2]=z,c[O+8>>2]=N,c[O+16>>2]=5096,O)|0)|0;i=O;eC(c[A>>2]|0,3);P=c[C>>2]|0;Q=A}else{P=B;Q=b+52|0}B=P<<1;A=c[Q>>2]|0;if((B|0)==-2){R=fv(A)|0;S=F|0}else{N=F|0;R=fu(A,c[N>>2]|0,P,B)|0;S=N}c[S>>2]=R;c[C>>2]=B;T=c[E>>2]|0;U=R}else{T=D;U=c[F>>2]|0}F=w&255;c[E>>2]=T+1;a[U+T|0]=F;E=c[v>>2]|0;D=c[E>>2]|0;c[E>>2]=D-1;E=c[v>>2]|0;if((D|0)==0){V=gu(E)|0}else{D=E+4|0;E=c[D>>2]|0;c[D>>2]=E+1;V=d[E]|0}c[u>>2]=V;if((V|0)==(w|0)){W=V&255}else{E=m|0;D=b+64|0;B=b+52|0;C=b+4|0;N=s|0;A=p|0;z=o|0;M=n|0;X=q|0;Y=V;while(1){L3483:do{if((Y|0)==(-1|0)){fz(N,(c[D>>2]|0)+16|0,80);Z=c[C>>2]|0;_=fy(c[B>>2]|0,5960,(O=i,i=i+24|0,c[O>>2]=N,c[O+8>>2]=Z,c[O+16>>2]=4984,O)|0)|0;i=O;Z=c[B>>2]|0;fy(Z,5768,(O=i,i=i+16|0,c[O>>2]=_,c[O+8>>2]=6584,O)|0)|0;i=O;eC(c[B>>2]|0,3);x=2734}else if((Y|0)==10|(Y|0)==13){fe(b,4984,286);x=2734}else if((Y|0)==92){_=c[v>>2]|0;Z=c[_>>2]|0;c[_>>2]=Z-1;_=c[v>>2]|0;if((Z|0)==0){$=gu(_)|0}else{Z=_+4|0;_=c[Z>>2]|0;c[Z>>2]=_+1;$=d[_]|0}c[u>>2]=$;switch($|0){case 98:{aa=8;break};case 102:{aa=12;break};case 110:{aa=10;break};case 114:{aa=13;break};case 116:{aa=9;break};case-1:{ab=-1;break L3483;break};case 118:{aa=11;break};case 10:case 13:{_=c[t>>2]|0;Z=_+4|0;ac=c[Z>>2]|0;ad=_+8|0;ae=c[ad>>2]|0;if((ac+1|0)>>>0>ae>>>0){if(ae>>>0>2147483645){fz(X,(c[D>>2]|0)+16|0,80);af=c[B>>2]|0;ag=c[C>>2]|0;fy(af,5960,(O=i,i=i+24|0,c[O>>2]=X,c[O+8>>2]=ag,c[O+16>>2]=5096,O)|0)|0;i=O;eC(c[B>>2]|0,3);ah=c[ad>>2]|0}else{ah=ae}ae=ah<<1;ag=c[B>>2]|0;if((ae|0)==-2){ai=fv(ag)|0;aj=_|0}else{af=_|0;ai=fu(ag,c[af>>2]|0,ah,ae)|0;aj=af}c[aj>>2]=ai;c[ad>>2]=ae;ak=c[Z>>2]|0;al=ai}else{ak=ac;al=c[_>>2]|0}c[Z>>2]=ak+1;a[al+ak|0]=10;fl(b);x=2734;break L3483;break};case 97:{aa=7;break};default:{if(($-48|0)>>>0<10){am=0;an=0;ao=$}else{Z=c[t>>2]|0;_=Z+4|0;ac=c[_>>2]|0;ae=Z+8|0;ad=c[ae>>2]|0;if((ac+1|0)>>>0>ad>>>0){if(ad>>>0>2147483645){fz(A,(c[D>>2]|0)+16|0,80);af=c[B>>2]|0;ag=c[C>>2]|0;fy(af,5960,(O=i,i=i+24|0,c[O>>2]=A,c[O+8>>2]=ag,c[O+16>>2]=5096,O)|0)|0;i=O;eC(c[B>>2]|0,3);ap=c[ae>>2]|0}else{ap=ad}ad=ap<<1;ag=c[B>>2]|0;if((ad|0)==-2){aq=fv(ag)|0;ar=Z|0}else{af=Z|0;aq=fu(ag,c[af>>2]|0,ap,ad)|0;ar=af}c[ar>>2]=aq;c[ae>>2]=ad;as=c[_>>2]|0;at=aq}else{as=ac;at=c[Z>>2]|0}c[_>>2]=as+1;a[at+as|0]=$&255;_=c[v>>2]|0;Z=c[_>>2]|0;c[_>>2]=Z-1;_=c[v>>2]|0;if((Z|0)==0){au=gu(_)|0}else{Z=_+4|0;_=c[Z>>2]|0;c[Z>>2]=_+1;au=d[_]|0}c[u>>2]=au;ab=au;break L3483}while(1){av=ao-48+(an*10|0)|0;_=c[v>>2]|0;Z=c[_>>2]|0;c[_>>2]=Z-1;_=c[v>>2]|0;if((Z|0)==0){aw=gu(_)|0}else{Z=_+4|0;_=c[Z>>2]|0;c[Z>>2]=_+1;aw=d[_]|0}c[u>>2]=aw;_=am+1|0;if((_|0)>=3){break}if((aw-48|0)>>>0<10){am=_;an=av;ao=aw}else{break}}if((av|0)>255){fe(b,4848,286)}_=c[t>>2]|0;Z=_+4|0;ac=c[Z>>2]|0;ad=_+8|0;ae=c[ad>>2]|0;if((ac+1|0)>>>0>ae>>>0){if(ae>>>0>2147483645){fz(z,(c[D>>2]|0)+16|0,80);af=c[B>>2]|0;ag=c[C>>2]|0;fy(af,5960,(O=i,i=i+24|0,c[O>>2]=z,c[O+8>>2]=ag,c[O+16>>2]=5096,O)|0)|0;i=O;eC(c[B>>2]|0,3);ax=c[ad>>2]|0}else{ax=ae}ae=ax<<1;ag=c[B>>2]|0;if((ae|0)==-2){ay=fv(ag)|0;az=_|0}else{af=_|0;ay=fu(ag,c[af>>2]|0,ax,ae)|0;az=af}c[az>>2]=ay;c[ad>>2]=ae;aA=c[Z>>2]|0;aC=ay}else{aA=ac;aC=c[_>>2]|0}c[Z>>2]=aA+1;a[aC+aA|0]=av&255;x=2734;break L3483}}Z=c[t>>2]|0;_=Z+4|0;ac=c[_>>2]|0;ae=Z+8|0;ad=c[ae>>2]|0;if((ac+1|0)>>>0>ad>>>0){if(ad>>>0>2147483645){fz(M,(c[D>>2]|0)+16|0,80);af=c[B>>2]|0;ag=c[C>>2]|0;fy(af,5960,(O=i,i=i+24|0,c[O>>2]=M,c[O+8>>2]=ag,c[O+16>>2]=5096,O)|0)|0;i=O;eC(c[B>>2]|0,3);aD=c[ae>>2]|0}else{aD=ad}ad=aD<<1;ag=c[B>>2]|0;if((ad|0)==-2){aE=fv(ag)|0;aF=Z|0}else{af=Z|0;aE=fu(ag,c[af>>2]|0,aD,ad)|0;aF=af}c[aF>>2]=aE;c[ae>>2]=ad;aG=c[_>>2]|0;aH=aE}else{aG=ac;aH=c[Z>>2]|0}c[_>>2]=aG+1;a[aH+aG|0]=aa;_=c[v>>2]|0;Z=c[_>>2]|0;c[_>>2]=Z-1;_=c[v>>2]|0;if((Z|0)==0){aI=gu(_)|0}else{Z=_+4|0;_=c[Z>>2]|0;c[Z>>2]=_+1;aI=d[_]|0}c[u>>2]=aI;ab=aI}else{_=c[t>>2]|0;Z=_+4|0;ac=c[Z>>2]|0;ad=_+8|0;ae=c[ad>>2]|0;if((ac+1|0)>>>0>ae>>>0){if(ae>>>0>2147483645){fz(E,(c[D>>2]|0)+16|0,80);af=c[B>>2]|0;ag=c[C>>2]|0;fy(af,5960,(O=i,i=i+24|0,c[O>>2]=E,c[O+8>>2]=ag,c[O+16>>2]=5096,O)|0)|0;i=O;eC(c[B>>2]|0,3);aJ=c[ad>>2]|0}else{aJ=ae}ae=aJ<<1;ag=c[B>>2]|0;if((ae|0)==-2){aK=fv(ag)|0;aL=_|0}else{af=_|0;aK=fu(ag,c[af>>2]|0,aJ,ae)|0;aL=af}c[aL>>2]=aK;c[ad>>2]=ae;aN=c[Z>>2]|0;aO=aK}else{aN=ac;aO=c[_>>2]|0}c[Z>>2]=aN+1;a[aO+aN|0]=Y&255;Z=c[v>>2]|0;_=c[Z>>2]|0;c[Z>>2]=_-1;Z=c[v>>2]|0;if((_|0)==0){aP=gu(Z)|0}else{_=Z+4|0;Z=c[_>>2]|0;c[_>>2]=Z+1;aP=d[Z]|0}c[u>>2]=aP;ab=aP}}while(0);if((x|0)==2734){x=0;ab=c[u>>2]|0}if((ab|0)==(w|0)){W=F;break}else{Y=ab}}}Y=c[t>>2]|0;F=Y+4|0;B=c[F>>2]|0;E=Y+8|0;C=c[E>>2]|0;if((B+1|0)>>>0>C>>>0){if(C>>>0>2147483645){D=l|0;fz(D,(c[b+64>>2]|0)+16|0,80);M=b+52|0;z=c[M>>2]|0;A=c[b+4>>2]|0;fy(z,5960,(O=i,i=i+24|0,c[O>>2]=D,c[O+8>>2]=A,c[O+16>>2]=5096,O)|0)|0;i=O;eC(c[M>>2]|0,3);aQ=c[E>>2]|0;aR=M}else{aQ=C;aR=b+52|0}C=aQ<<1;M=c[aR>>2]|0;if((C|0)==-2){aS=fv(M)|0;aT=Y|0}else{A=Y|0;aS=fu(M,c[A>>2]|0,aQ,C)|0;aT=A}c[aT>>2]=aS;c[E>>2]=C;aU=c[F>>2]|0;aV=aS}else{aU=B;aV=c[Y>>2]|0}c[F>>2]=aU+1;a[aV+aU|0]=W;F=c[v>>2]|0;Y=c[F>>2]|0;c[F>>2]=Y-1;F=c[v>>2]|0;if((Y|0)==0){aW=gu(F)|0}else{Y=F+4|0;F=c[Y>>2]|0;c[Y>>2]=F+1;aW=d[F]|0}c[u>>2]=aW;F=c[t>>2]|0;Y=c[b+52>>2]|0;B=f_(Y,(c[F>>2]|0)+1|0,(c[F+4>>2]|0)-2|0)|0;F=gd(Y,c[(c[b+48>>2]|0)+4>>2]|0,B)|0;C=F+8|0;do{if((c[C>>2]|0)==0){c[F>>2]=1;c[C>>2]=1;E=c[Y+16>>2]|0;if((c[E+68>>2]|0)>>>0<(c[E+64>>2]|0)>>>0){break}e1(Y)}}while(0);c[e>>2]=B;y=286;i=f;return y|0}else if((x|0)==2827){Y=c[t>>2]|0;C=Y+4|0;F=c[C>>2]|0;E=Y+8|0;A=c[E>>2]|0;if((F+1|0)>>>0>A>>>0){if(A>>>0>2147483645){M=k|0;fz(M,(c[b+64>>2]|0)+16|0,80);D=b+52|0;z=c[D>>2]|0;X=c[b+4>>2]|0;fy(z,5960,(O=i,i=i+24|0,c[O>>2]=M,c[O+8>>2]=X,c[O+16>>2]=5096,O)|0)|0;i=O;eC(c[D>>2]|0,3);aX=c[E>>2]|0;aY=D}else{aX=A;aY=b+52|0}A=aX<<1;D=c[aY>>2]|0;if((A|0)==-2){aZ=fv(D)|0;a_=Y|0}else{X=Y|0;aZ=fu(D,c[X>>2]|0,aX,A)|0;a_=X}c[a_>>2]=aZ;c[E>>2]=A;a$=c[C>>2]|0;a0=aZ}else{a$=F;a0=c[Y>>2]|0}c[C>>2]=a$+1;a[a0+a$|0]=46;C=c[v>>2]|0;Y=c[C>>2]|0;c[C>>2]=Y-1;C=c[v>>2]|0;if((Y|0)==0){a1=gu(C)|0}else{Y=C+4|0;C=c[Y>>2]|0;c[Y>>2]=C+1;a1=d[C]|0}c[u>>2]=a1;if((aM(5600,a1|0,2)|0)==0){if((a1-48|0)>>>0>=10){y=46;i=f;return y|0}fs(b,e);y=284;i=f;return y|0}C=c[t>>2]|0;Y=C+4|0;F=c[Y>>2]|0;A=C+8|0;E=c[A>>2]|0;if((F+1|0)>>>0>E>>>0){if(E>>>0>2147483645){X=h|0;fz(X,(c[b+64>>2]|0)+16|0,80);D=b+52|0;M=c[D>>2]|0;z=c[b+4>>2]|0;fy(M,5960,(O=i,i=i+24|0,c[O>>2]=X,c[O+8>>2]=z,c[O+16>>2]=5096,O)|0)|0;i=O;eC(c[D>>2]|0,3);a2=c[A>>2]|0;a3=D}else{a2=E;a3=b+52|0}E=a2<<1;D=c[a3>>2]|0;if((E|0)==-2){a4=fv(D)|0;a5=C|0}else{z=C|0;a4=fu(D,c[z>>2]|0,a2,E)|0;a5=z}c[a5>>2]=a4;c[A>>2]=E;a6=c[Y>>2]|0;a7=a4}else{a6=F;a7=c[C>>2]|0}c[Y>>2]=a6+1;a[a7+a6|0]=a1&255;Y=c[v>>2]|0;C=c[Y>>2]|0;c[Y>>2]=C-1;Y=c[v>>2]|0;if((C|0)==0){a8=gu(Y)|0}else{C=Y+4|0;Y=c[C>>2]|0;c[C>>2]=Y+1;a8=d[Y]|0}c[u>>2]=a8;if((aM(5600,a8|0,2)|0)==0){y=278;i=f;return y|0}Y=c[t>>2]|0;C=Y+4|0;F=c[C>>2]|0;E=Y+8|0;A=c[E>>2]|0;if((F+1|0)>>>0>A>>>0){if(A>>>0>2147483645){z=g|0;fz(z,(c[b+64>>2]|0)+16|0,80);D=b+52|0;X=c[D>>2]|0;M=c[b+4>>2]|0;fy(X,5960,(O=i,i=i+24|0,c[O>>2]=z,c[O+8>>2]=M,c[O+16>>2]=5096,O)|0)|0;i=O;eC(c[D>>2]|0,3);a9=c[E>>2]|0;ba=D}else{a9=A;ba=b+52|0}A=a9<<1;D=c[ba>>2]|0;if((A|0)==-2){bb=fv(D)|0;bc=Y|0}else{M=Y|0;bb=fu(D,c[M>>2]|0,a9,A)|0;bc=M}c[bc>>2]=bb;c[E>>2]=A;bd=c[C>>2]|0;be=bb}else{bd=F;be=c[Y>>2]|0}c[C>>2]=bd+1;a[be+bd|0]=a8&255;C=c[v>>2]|0;Y=c[C>>2]|0;c[C>>2]=Y-1;C=c[v>>2]|0;if((Y|0)==0){bf=gu(C)|0}else{Y=C+4|0;C=c[Y>>2]|0;c[Y>>2]=C+1;bf=d[C]|0}c[u>>2]=bf;y=279;i=f;return y|0}else if((x|0)==2873){C=c[u>>2]|0;if((C-48|0)>>>0<10){fs(b,e);y=284;i=f;return y|0}do{if((bt(C|0)|0)==0){Y=c[u>>2]|0;if((Y|0)==95){break}F=c[v>>2]|0;A=c[F>>2]|0;c[F>>2]=A-1;F=c[v>>2]|0;if((A|0)==0){bg=gu(F)|0}else{A=F+4|0;F=c[A>>2]|0;c[A>>2]=F+1;bg=d[F]|0}c[u>>2]=bg;y=Y;i=f;return y|0}}while(0);C=j|0;B=b+64|0;Y=b+52|0;F=b+4|0;while(1){A=c[u>>2]|0;E=c[t>>2]|0;M=E+4|0;D=c[M>>2]|0;z=E+8|0;X=c[z>>2]|0;if((D+1|0)>>>0>X>>>0){if(X>>>0>2147483645){fz(C,(c[B>>2]|0)+16|0,80);N=c[Y>>2]|0;Z=c[F>>2]|0;fy(N,5960,(O=i,i=i+24|0,c[O>>2]=C,c[O+8>>2]=Z,c[O+16>>2]=5096,O)|0)|0;i=O;eC(c[Y>>2]|0,3);bh=c[z>>2]|0}else{bh=X}X=bh<<1;Z=c[Y>>2]|0;if((X|0)==-2){bi=fv(Z)|0;bj=E|0}else{N=E|0;bi=fu(Z,c[N>>2]|0,bh,X)|0;bj=N}c[bj>>2]=bi;c[z>>2]=X;bk=c[M>>2]|0;bl=bi}else{bk=D;bl=c[E>>2]|0}c[M>>2]=bk+1;a[bl+bk|0]=A&255;A=c[v>>2]|0;M=c[A>>2]|0;c[A>>2]=M-1;A=c[v>>2]|0;if((M|0)==0){bm=gu(A)|0}else{M=A+4|0;A=c[M>>2]|0;c[M>>2]=A+1;bm=d[A]|0}c[u>>2]=bm;if((bq(bm|0)|0)!=0){continue}if((c[u>>2]|0)!=95){break}}C=c[t>>2]|0;F=c[Y>>2]|0;B=f_(F,c[C>>2]|0,c[C+4>>2]|0)|0;C=gd(F,c[(c[b+48>>2]|0)+4>>2]|0,B)|0;A=C+8|0;do{if((c[A>>2]|0)==0){c[C>>2]=1;c[A>>2]=1;M=c[F+16>>2]|0;if((c[M+68>>2]|0)>>>0<(c[M+64>>2]|0)>>>0){break}e1(F)}}while(0);F=a[B+6|0]|0;if(F<<24>>24==0){c[e>>2]=B;y=285;i=f;return y|0}else{y=F&255|256;i=f;return y|0}}else if((x|0)==2903){i=f;return y|0}else if((x|0)==2904){i=f;return y|0}}while(0);x=c[v>>2]|0;e=c[x>>2]|0;c[x>>2]=e-1;x=c[v>>2]|0;if((e|0)==0){bn=gu(x)|0}else{e=x+4|0;x=c[e>>2]|0;c[e>>2]=x+1;bn=d[x]|0}c[u>>2]=bn;if((bn|0)!=61){y=61;i=f;return y|0}bn=c[v>>2]|0;x=c[bn>>2]|0;c[bn>>2]=x-1;bn=c[v>>2]|0;if((x|0)==0){bo=gu(bn)|0}else{x=bn+4|0;bn=c[x>>2]|0;c[x>>2]=bn+1;bo=d[bn]|0}c[u>>2]=bo;y=280;i=f;return y|0}function fk(a){a=a|0;c[a+32>>2]=fj(a,a+40|0)|0;return}function fl(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,i=0,j=0;b=a|0;e=c[b>>2]|0;f=a+56|0;g=c[f>>2]|0;h=c[g>>2]|0;c[g>>2]=h-1;g=c[f>>2]|0;if((h|0)==0){i=gu(g)|0}else{h=g+4|0;g=c[h>>2]|0;c[h>>2]=g+1;i=d[g]|0}c[b>>2]=i;do{if((i|0)==10|(i|0)==13){if((i|0)==(e|0)){break}g=c[f>>2]|0;h=c[g>>2]|0;c[g>>2]=h-1;g=c[f>>2]|0;if((h|0)==0){j=gu(g)|0}else{h=g+4|0;g=c[h>>2]|0;c[h>>2]=g+1;j=d[g]|0}c[b>>2]=j}}while(0);j=a+4|0;b=(c[j>>2]|0)+1|0;c[j>>2]=b;if((b|0)<=2147483644){return}fe(a,4344,c[a+16>>2]|0);return}function fm(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;e=i;i=i+160|0;f=e|0;g=e+80|0;h=b|0;j=c[h>>2]|0;k=b+60|0;l=c[k>>2]|0;m=l+4|0;n=c[m>>2]|0;o=l+8|0;p=c[o>>2]|0;if((n+1|0)>>>0>p>>>0){if(p>>>0>2147483645){q=g|0;fz(q,(c[b+64>>2]|0)+16|0,80);g=b+52|0;r=c[g>>2]|0;s=c[b+4>>2]|0;fy(r,5960,(t=i,i=i+24|0,c[t>>2]=q,c[t+8>>2]=s,c[t+16>>2]=5096,t)|0)|0;i=t;eC(c[g>>2]|0,3);u=c[o>>2]|0;v=g}else{u=p;v=b+52|0}p=u<<1;g=c[v>>2]|0;if((p|0)==-2){w=fv(g)|0;x=l|0}else{v=l|0;w=fu(g,c[v>>2]|0,u,p)|0;x=v}c[x>>2]=w;c[o>>2]=p;y=c[m>>2]|0;z=w}else{y=n;z=c[l>>2]|0}c[m>>2]=y+1;a[z+y|0]=j&255;y=b+56|0;z=c[y>>2]|0;m=c[z>>2]|0;c[z>>2]=m-1;z=c[y>>2]|0;if((m|0)==0){A=gu(z)|0}else{m=z+4|0;z=c[m>>2]|0;c[m>>2]=z+1;A=d[z]|0}c[h>>2]=A;if((A|0)!=61){B=A;C=0;D=(B|0)!=(j|0);E=D<<31>>31;F=E^C;i=e;return F|0}A=f|0;f=b+64|0;z=b+52|0;m=b+4|0;b=61;l=0;while(1){n=c[k>>2]|0;w=n+4|0;p=c[w>>2]|0;o=n+8|0;x=c[o>>2]|0;if((p+1|0)>>>0>x>>>0){if(x>>>0>2147483645){fz(A,(c[f>>2]|0)+16|0,80);v=c[z>>2]|0;u=c[m>>2]|0;fy(v,5960,(t=i,i=i+24|0,c[t>>2]=A,c[t+8>>2]=u,c[t+16>>2]=5096,t)|0)|0;i=t;eC(c[z>>2]|0,3);G=c[o>>2]|0}else{G=x}x=G<<1;u=c[z>>2]|0;if((x|0)==-2){H=fv(u)|0;I=n|0}else{v=n|0;H=fu(u,c[v>>2]|0,G,x)|0;I=v}c[I>>2]=H;c[o>>2]=x;J=c[w>>2]|0;K=H}else{J=p;K=c[n>>2]|0}c[w>>2]=J+1;a[K+J|0]=b;w=c[y>>2]|0;n=c[w>>2]|0;c[w>>2]=n-1;w=c[y>>2]|0;if((n|0)==0){L=gu(w)|0}else{n=w+4|0;w=c[n>>2]|0;c[n>>2]=w+1;L=d[w]|0}c[h>>2]=L;w=l+1|0;if((L|0)==61){b=L&255;l=w}else{B=L;C=w;break}}D=(B|0)!=(j|0);E=D<<31>>31;F=E^C;i=e;return F|0}function fn(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0;g=i;i=i+480|0;h=g|0;j=g+80|0;k=g+160|0;l=g+240|0;m=g+320|0;n=g+400|0;o=b|0;p=c[o>>2]|0;q=b+60|0;r=c[q>>2]|0;s=r+4|0;t=c[s>>2]|0;u=r+8|0;v=c[u>>2]|0;if((t+1|0)>>>0>v>>>0){if(v>>>0>2147483645){w=m|0;fz(w,(c[b+64>>2]|0)+16|0,80);m=b+52|0;x=c[m>>2]|0;y=c[b+4>>2]|0;fy(x,5960,(z=i,i=i+24|0,c[z>>2]=w,c[z+8>>2]=y,c[z+16>>2]=5096,z)|0)|0;i=z;eC(c[m>>2]|0,3);A=c[u>>2]|0;B=m}else{A=v;B=b+52|0}v=A<<1;m=c[B>>2]|0;if((v|0)==-2){C=fv(m)|0;D=r|0}else{B=r|0;C=fu(m,c[B>>2]|0,A,v)|0;D=B}c[D>>2]=C;c[u>>2]=v;E=c[s>>2]|0;F=C}else{E=t;F=c[r>>2]|0}c[s>>2]=E+1;a[F+E|0]=p&255;p=b+56|0;E=c[p>>2]|0;F=c[E>>2]|0;c[E>>2]=F-1;E=c[p>>2]|0;if((F|0)==0){G=gu(E)|0}else{F=E+4|0;E=c[F>>2]|0;c[F>>2]=E+1;G=d[E]|0}c[o>>2]=G;if((G|0)==10|(G|0)==13){fl(b);H=2981}else{I=G}L3799:while(1){if((H|0)==2981){H=0;I=c[o>>2]|0}J=(e|0)==0;G=h|0;K=b+64|0;L=b+52|0;M=b+4|0;E=l|0;F=(f|0)==0;s=I;L3803:while(1){L3805:do{if(J){r=s;while(1){switch(r|0){case 10:case 13:{H=3018;break L3803;break};case 93:{H=3005;break L3803;break};case 91:{break L3805;break};case-1:{H=2990;break L3803;break};default:{}}t=c[p>>2]|0;C=c[t>>2]|0;c[t>>2]=C-1;t=c[p>>2]|0;if((C|0)==0){N=gu(t)|0}else{C=t+4|0;t=c[C>>2]|0;c[C>>2]=t+1;N=d[t]|0}c[o>>2]=N;r=N}}else{r=s;while(1){switch(r|0){case 10:case 13:{H=3018;break L3803;break};case 93:{H=3005;break L3803;break};case 91:{break L3805;break};case-1:{H=2990;break L3803;break};default:{}}t=c[q>>2]|0;C=t+4|0;v=c[C>>2]|0;u=t+8|0;D=c[u>>2]|0;if((v+1|0)>>>0>D>>>0){if(D>>>0>2147483645){fz(G,(c[K>>2]|0)+16|0,80);B=c[L>>2]|0;A=c[M>>2]|0;fy(B,5960,(z=i,i=i+24|0,c[z>>2]=G,c[z+8>>2]=A,c[z+16>>2]=5096,z)|0)|0;i=z;eC(c[L>>2]|0,3);O=c[u>>2]|0}else{O=D}D=O<<1;A=c[L>>2]|0;if((D|0)==-2){P=fv(A)|0;Q=t|0}else{B=t|0;P=fu(A,c[B>>2]|0,O,D)|0;Q=B}c[Q>>2]=P;c[u>>2]=D;R=c[C>>2]|0;S=P}else{R=v;S=c[t>>2]|0}c[C>>2]=R+1;a[S+R|0]=r&255;C=c[p>>2]|0;t=c[C>>2]|0;c[C>>2]=t-1;C=c[p>>2]|0;if((t|0)==0){T=gu(C)|0}else{t=C+4|0;C=c[t>>2]|0;c[t>>2]=C+1;T=d[C]|0}c[o>>2]=T;r=T}}}while(0);if((fm(b)|0)!=(f|0)){H=2981;continue L3799}r=c[o>>2]|0;C=c[q>>2]|0;t=C+4|0;v=c[t>>2]|0;D=C+8|0;u=c[D>>2]|0;if((v+1|0)>>>0>u>>>0){if(u>>>0>2147483645){fz(E,(c[K>>2]|0)+16|0,80);B=c[L>>2]|0;A=c[M>>2]|0;fy(B,5960,(z=i,i=i+24|0,c[z>>2]=E,c[z+8>>2]=A,c[z+16>>2]=5096,z)|0)|0;i=z;eC(c[L>>2]|0,3);U=c[D>>2]|0}else{U=u}u=U<<1;A=c[L>>2]|0;if((u|0)==-2){V=fv(A)|0;W=C|0}else{B=C|0;V=fu(A,c[B>>2]|0,U,u)|0;W=B}c[W>>2]=V;c[D>>2]=u;X=c[t>>2]|0;Y=V}else{X=v;Y=c[C>>2]|0}c[t>>2]=X+1;a[Y+X|0]=r&255;r=c[p>>2]|0;t=c[r>>2]|0;c[r>>2]=t-1;r=c[p>>2]|0;if((t|0)==0){Z=gu(r)|0}else{t=r+4|0;r=c[t>>2]|0;c[t>>2]=r+1;Z=d[r]|0}c[o>>2]=Z;if(F){H=3004;break}else{s=Z}}if((H|0)==3018){H=0;s=c[q>>2]|0;F=s+4|0;E=c[F>>2]|0;G=s+8|0;r=c[G>>2]|0;if((E+1|0)>>>0>r>>>0){if(r>>>0>2147483645){t=j|0;fz(t,(c[K>>2]|0)+16|0,80);C=c[L>>2]|0;v=c[M>>2]|0;fy(C,5960,(z=i,i=i+24|0,c[z>>2]=t,c[z+8>>2]=v,c[z+16>>2]=5096,z)|0)|0;i=z;eC(c[L>>2]|0,3);_=c[G>>2]|0}else{_=r}r=_<<1;v=c[L>>2]|0;if((r|0)==-2){$=fv(v)|0;aa=s|0}else{t=s|0;$=fu(v,c[t>>2]|0,_,r)|0;aa=t}c[aa>>2]=$;c[G>>2]=r;ab=c[F>>2]|0;ac=$}else{ab=E;ac=c[s>>2]|0}c[F>>2]=ab+1;a[ac+ab|0]=10;fl(b);if(!J){H=2981;continue}c[(c[q>>2]|0)+4>>2]=0;H=2981;continue}else if((H|0)==3004){H=0;fe(b,4472,91);H=2981;continue}else if((H|0)==3005){H=0;if((fm(b)|0)==(f|0)){break}else{H=2981;continue}}else if((H|0)==2990){H=0;F=n|0;fz(F,(c[K>>2]|0)+16|0,80);s=c[M>>2]|0;E=fy(c[L>>2]|0,5960,(z=i,i=i+24|0,c[z>>2]=F,c[z+8>>2]=s,c[z+16>>2]=(e|0)!=0?4664:4560,z)|0)|0;i=z;fy(c[L>>2]|0,5768,(z=i,i=i+16|0,c[z>>2]=E,c[z+8>>2]=6584,z)|0)|0;i=z;eC(c[L>>2]|0,3);H=2981;continue}}H=c[o>>2]|0;n=c[q>>2]|0;ab=n+4|0;ac=c[ab>>2]|0;$=n+8|0;aa=c[$>>2]|0;if((ac+1|0)>>>0>aa>>>0){if(aa>>>0>2147483645){_=k|0;fz(_,(c[K>>2]|0)+16|0,80);K=c[L>>2]|0;k=c[M>>2]|0;fy(K,5960,(z=i,i=i+24|0,c[z>>2]=_,c[z+8>>2]=k,c[z+16>>2]=5096,z)|0)|0;i=z;eC(c[L>>2]|0,3);ad=c[$>>2]|0}else{ad=aa}aa=ad<<1;z=c[L>>2]|0;if((aa|0)==-2){ae=fv(z)|0;af=n|0}else{k=n|0;ae=fu(z,c[k>>2]|0,ad,aa)|0;af=k}c[af>>2]=ae;c[$>>2]=aa;ag=c[ab>>2]|0;ah=ae}else{ag=ac;ah=c[n>>2]|0}c[ab>>2]=ag+1;a[ah+ag|0]=H&255;H=c[p>>2]|0;ag=c[H>>2]|0;c[H>>2]=ag-1;H=c[p>>2]|0;if((ag|0)==0){ai=gu(H)|0}else{ag=H+4|0;H=c[ag>>2]|0;c[ag>>2]=H+1;ai=d[H]|0}c[o>>2]=ai;if(J){i=g;return}J=c[q>>2]|0;q=f+2|0;f=c[L>>2]|0;L=f_(f,(c[J>>2]|0)+q|0,(c[J+4>>2]|0)-(q<<1)|0)|0;q=gd(f,c[(c[b+48>>2]|0)+4>>2]|0,L)|0;b=q+8|0;do{if((c[b>>2]|0)==0){c[q>>2]=1;c[b>>2]=1;J=c[f+16>>2]|0;if((c[J+68>>2]|0)>>>0<(c[J+64>>2]|0)>>>0){break}e1(f)}}while(0);c[e>>2]=L;i=g;return}function fo(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;if(a>>>0>15){b=a;c=1;do{d=b+1|0;b=d>>>1;c=c+1|0;}while(d>>>0>31);e=b;f=c<<3}else{e=a;f=8}if(e>>>0<8){g=e;return g|0}g=f|e-8;return g|0}function fp(a){a=a|0;var b=0,c=0;b=a>>>3&31;if((b|0)==0){c=a;return c|0}c=(a&7|8)<<b-1;return c|0}function fq(a){a=a|0;var b=0,c=0,e=0,f=0,g=0,h=0;if(a>>>0>255){b=a;c=-1;while(1){e=c+8|0;f=b>>>8;if(b>>>0>65535){b=f;c=e}else{g=f;h=e;break}}}else{g=a;h=-1}return(d[1048+g|0]|0)+h|0}function fr(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a+8>>2]|0;if((d|0)!=(c[b+8>>2]|0)){e=0;return e|0}if((d|0)==1){e=(c[a>>2]|0)==(c[b>>2]|0)|0;return e|0}else if((d|0)==2){e=(c[a>>2]|0)==(c[b>>2]|0)|0;return e|0}else if((d|0)==0){e=1;return e|0}else if((d|0)==3){e=+h[a>>3]==+h[b>>3]|0;return e|0}else{e=(c[a>>2]|0)==(c[b>>2]|0)|0;return e|0}return 0}function fs(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0;f=i;i=i+400|0;g=f|0;h=f+80|0;j=f+160|0;k=f+240|0;l=b|0;m=b+60|0;n=f+320|0;o=b+64|0;p=b+52|0;q=b+4|0;r=b+56|0;s=c[l>>2]&255;while(1){t=c[m>>2]|0;u=t+4|0;v=c[u>>2]|0;w=t+8|0;x=c[w>>2]|0;if((v+1|0)>>>0>x>>>0){if(x>>>0>2147483645){fz(n,(c[o>>2]|0)+16|0,80);y=c[p>>2]|0;z=c[q>>2]|0;fy(y,5960,(A=i,i=i+24|0,c[A>>2]=n,c[A+8>>2]=z,c[A+16>>2]=5096,A)|0)|0;i=A;eC(c[p>>2]|0,3);B=c[w>>2]|0}else{B=x}x=B<<1;z=c[p>>2]|0;if((x|0)==-2){C=fv(z)|0;D=t|0}else{y=t|0;C=fu(z,c[y>>2]|0,B,x)|0;D=y}c[D>>2]=C;c[w>>2]=x;E=c[u>>2]|0;F=C}else{E=v;F=c[t>>2]|0}c[u>>2]=E+1;a[F+E|0]=s;u=c[r>>2]|0;t=c[u>>2]|0;c[u>>2]=t-1;u=c[r>>2]|0;if((t|0)==0){G=gu(u)|0}else{t=u+4|0;u=c[t>>2]|0;c[t>>2]=u+1;G=d[u]|0}c[l>>2]=G;if((G-48|0)>>>0<10){s=G&255;continue}if((G|0)==46){s=46}else{break}}do{if((aM(5344,G|0,3)|0)==0){H=G}else{s=c[m>>2]|0;E=s+4|0;F=c[E>>2]|0;C=s+8|0;D=c[C>>2]|0;if((F+1|0)>>>0>D>>>0){if(D>>>0>2147483645){B=h|0;fz(B,(c[o>>2]|0)+16|0,80);n=c[p>>2]|0;u=c[q>>2]|0;fy(n,5960,(A=i,i=i+24|0,c[A>>2]=B,c[A+8>>2]=u,c[A+16>>2]=5096,A)|0)|0;i=A;eC(c[p>>2]|0,3);I=c[C>>2]|0}else{I=D}D=I<<1;u=c[p>>2]|0;if((D|0)==-2){J=fv(u)|0;K=s|0}else{B=s|0;J=fu(u,c[B>>2]|0,I,D)|0;K=B}c[K>>2]=J;c[C>>2]=D;L=c[E>>2]|0;M=J}else{L=F;M=c[s>>2]|0}c[E>>2]=L+1;a[M+L|0]=G&255;E=c[r>>2]|0;s=c[E>>2]|0;c[E>>2]=s-1;E=c[r>>2]|0;if((s|0)==0){N=gu(E)|0}else{s=E+4|0;E=c[s>>2]|0;c[s>>2]=E+1;N=d[E]|0}c[l>>2]=N;if((aM(5336,N|0,3)|0)==0){H=N;break}E=c[m>>2]|0;s=E+4|0;F=c[s>>2]|0;D=E+8|0;C=c[D>>2]|0;if((F+1|0)>>>0>C>>>0){if(C>>>0>2147483645){B=g|0;fz(B,(c[o>>2]|0)+16|0,80);u=c[p>>2]|0;n=c[q>>2]|0;fy(u,5960,(A=i,i=i+24|0,c[A>>2]=B,c[A+8>>2]=n,c[A+16>>2]=5096,A)|0)|0;i=A;eC(c[p>>2]|0,3);O=c[D>>2]|0}else{O=C}C=O<<1;n=c[p>>2]|0;if((C|0)==-2){P=fv(n)|0;Q=E|0}else{B=E|0;P=fu(n,c[B>>2]|0,O,C)|0;Q=B}c[Q>>2]=P;c[D>>2]=C;R=c[s>>2]|0;S=P}else{R=F;S=c[E>>2]|0}c[s>>2]=R+1;a[S+R|0]=N&255;s=c[r>>2]|0;E=c[s>>2]|0;c[s>>2]=E-1;s=c[r>>2]|0;if((E|0)==0){T=gu(s)|0}else{E=s+4|0;s=c[E>>2]|0;c[E>>2]=s+1;T=d[s]|0}c[l>>2]=T;H=T}}while(0);T=k|0;k=H;while(1){H=(bq(k|0)|0)==0;N=c[l>>2]|0;if(H){if((N|0)==95){U=95}else{break}}else{U=N&255}N=c[m>>2]|0;H=N+4|0;R=c[H>>2]|0;S=N+8|0;P=c[S>>2]|0;if((R+1|0)>>>0>P>>>0){if(P>>>0>2147483645){fz(T,(c[o>>2]|0)+16|0,80);Q=c[p>>2]|0;O=c[q>>2]|0;fy(Q,5960,(A=i,i=i+24|0,c[A>>2]=T,c[A+8>>2]=O,c[A+16>>2]=5096,A)|0)|0;i=A;eC(c[p>>2]|0,3);V=c[S>>2]|0}else{V=P}P=V<<1;O=c[p>>2]|0;if((P|0)==-2){W=fv(O)|0;X=N|0}else{Q=N|0;W=fu(O,c[Q>>2]|0,V,P)|0;X=Q}c[X>>2]=W;c[S>>2]=P;Y=c[H>>2]|0;Z=W}else{Y=R;Z=c[N>>2]|0}c[H>>2]=Y+1;a[Z+Y|0]=U;H=c[r>>2]|0;N=c[H>>2]|0;c[H>>2]=N-1;H=c[r>>2]|0;if((N|0)==0){_=gu(H)|0}else{N=H+4|0;H=c[N>>2]|0;c[N>>2]=H+1;_=d[H]|0}c[l>>2]=_;k=_}_=c[m>>2]|0;k=_+4|0;l=c[k>>2]|0;r=_+8|0;U=c[r>>2]|0;if((l+1|0)>>>0>U>>>0){if(U>>>0>2147483645){Y=j|0;fz(Y,(c[o>>2]|0)+16|0,80);o=c[p>>2]|0;j=c[q>>2]|0;fy(o,5960,(A=i,i=i+24|0,c[A>>2]=Y,c[A+8>>2]=j,c[A+16>>2]=5096,A)|0)|0;i=A;eC(c[p>>2]|0,3);$=c[r>>2]|0}else{$=U}U=$<<1;A=c[p>>2]|0;if((U|0)==-2){aa=fv(A)|0;ab=_|0}else{p=_|0;aa=fu(A,c[p>>2]|0,$,U)|0;ab=p}c[ab>>2]=aa;c[r>>2]=U;ac=c[k>>2]|0;ad=aa}else{ac=l;ad=c[_>>2]|0}c[k>>2]=ac+1;a[ad+ac|0]=0;ac=b+68|0;ad=a[ac]|0;k=c[m>>2]|0;_=c[k>>2]|0;l=c[k+4>>2]|0;if((l|0)==0){ae=_}else{k=l;do{k=k-1|0;l=_+k|0;if((a[l]|0)==46){a[l]=ad}}while((k|0)!=0);ae=c[c[m>>2]>>2]|0}k=e|0;if((fw(ae,k)|0)!=0){i=f;return}ae=bD()|0;e=a[ac]|0;if((ae|0)==0){af=46}else{af=a[c[ae>>2]|0]|0}a[ac]=af;ae=c[m>>2]|0;ad=c[ae>>2]|0;_=c[ae+4>>2]|0;if((_|0)==0){ag=ad}else{ae=_;do{ae=ae-1|0;_=ad+ae|0;if((a[_]|0)==e<<24>>24){a[_]=af}}while((ae|0)!=0);ag=c[c[m>>2]>>2]|0}if((fw(ag,k)|0)!=0){i=f;return}k=a[ac]|0;ac=c[m>>2]|0;m=c[ac>>2]|0;ag=c[ac+4>>2]|0;if((ag|0)!=0){ac=ag;do{ac=ac-1|0;ag=m+ac|0;if((a[ag]|0)==k<<24>>24){a[ag]=46}}while((ac|0)!=0)}fe(b,5232,284);i=f;return}function ft(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0;h=i;j=c[d>>2]|0;do{if((j|0)<((f|0)/2|0|0)){k=j<<1;l=(k|0)<4?4:k}else{if((j|0)<(f|0)){l=f;break}es(a,g,(m=i,i=i+1|0,i=i+7>>3<<3,c[m>>2]=0,m)|0);i=m;l=f}}while(0);if((l+1|0)>>>0>(4294967293/(e>>>0)|0)>>>0){es(a,2288,(m=i,i=i+1|0,i=i+7>>3<<3,c[m>>2]=0,m)|0);i=m;n=0;c[d>>2]=l;i=h;return n|0}m=aa(c[d>>2]|0,e)|0;f=aa(l,e)|0;e=c[a+16>>2]|0;g=cg[c[e+12>>2]&511](c[e+16>>2]|0,b,m,f)|0;if(!((g|0)!=0|(f|0)==0)){eC(a,4)}a=e+68|0;c[a>>2]=f-m+(c[a>>2]|0);n=g;c[d>>2]=l;i=h;return n|0}function fu(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=c[a+16>>2]|0;g=cg[c[f+12>>2]&511](c[f+16>>2]|0,b,d,e)|0;if(!((g|0)!=0|(e|0)==0)){eC(a,4)}a=f+68|0;c[a>>2]=e-d+(c[a>>2]|0);return g|0}function fv(a){a=a|0;var b=0;b=i;es(a,2288,(a=i,i=i+1|0,i=i+7>>3<<3,c[a>>2]=0,a)|0);i=a;i=b;return 0}function fw(b,e){b=b|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;i=i+8|0;g=f|0;h[e>>3]=+jZ(b,g);j=c[g>>2]|0;if((j|0)==(b|0)){k=0;i=f;return k|0}l=a[j]|0;if((l<<24>>24|0)==120|(l<<24>>24|0)==88){h[e>>3]=+((as(b|0,g|0,16)|0)>>>0>>>0);b=c[g>>2]|0;m=b;n=a[b]|0}else{m=j;n=l}if(n<<24>>24==0){k=1;i=f;return k|0}if((aB(n&255|0)|0)==0){o=m}else{n=m;do{n=n+1|0;}while((aB(d[n]|0)|0)!=0);c[g>>2]=n;o=n}k=(a[o]|0)==0|0;i=f;return k|0}function fx(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0;f=i;i=i+40|0;g=f|0;j=f+32|0;k=b+8|0;l=c[k>>2]|0;c[l>>2]=f_(b,10512,0)|0;c[l+8>>2]=4;l=b+28|0;m=c[k>>2]|0;if(((c[l>>2]|0)-m|0)<17){eA(b,1);n=c[k>>2]|0}else{n=m}m=n+16|0;c[k>>2]=m;n=aU(d|0,37)|0;L4082:do{if((n|0)==0){o=1;p=d;q=m}else{r=j|0;s=j+1|0;t=j+2|0;u=g|0;w=g+1|0;x=f+8|0;y=1;z=d;A=n;B=m;while(1){c[B>>2]=f_(b,z,A-z|0)|0;c[B+8>>2]=4;C=c[k>>2]|0;if(((c[l>>2]|0)-C|0)<17){eA(b,1);D=c[k>>2]|0}else{D=C}C=D+16|0;c[k>>2]=C;E=A+1|0;switch(a[E]|0){case 115:{F=(v=c[e+4>>2]|0,c[e+4>>2]=v+8,c[(c[e>>2]|0)+v>>2]|0);G=(F|0)==0?8496:F;F=c[k>>2]|0;c[F>>2]=f_(b,G,j_(G|0)|0)|0;c[F+8>>2]=4;F=c[k>>2]|0;if(((c[l>>2]|0)-F|0)<17){eA(b,1);H=c[k>>2]|0}else{H=F}F=H+16|0;c[k>>2]=F;I=F;break};case 100:{h[C>>3]=+((v=c[e+4>>2]|0,c[e+4>>2]=v+8,c[(c[e>>2]|0)+v>>2]|0)|0);c[D+24>>2]=3;F=c[k>>2]|0;if(((c[l>>2]|0)-F|0)<17){eA(b,1);J=c[k>>2]|0}else{J=F}F=J+16|0;c[k>>2]=F;I=F;break};case 99:{a[u]=(v=c[e+4>>2]|0,c[e+4>>2]=v+8,c[(c[e>>2]|0)+v>>2]|0)&255;a[w]=0;F=c[k>>2]|0;c[F>>2]=f_(b,u,j_(u|0)|0)|0;c[F+8>>2]=4;F=c[k>>2]|0;if(((c[l>>2]|0)-F|0)<17){eA(b,1);K=c[k>>2]|0}else{K=F}F=K+16|0;c[k>>2]=F;I=F;break};case 112:{F=(v=c[e+4>>2]|0,c[e+4>>2]=v+8,c[(c[e>>2]|0)+v>>2]|0);a$(x|0,8256,(G=i,i=i+8|0,c[G>>2]=F,G)|0)|0;i=G;G=c[k>>2]|0;c[G>>2]=f_(b,x,j_(x|0)|0)|0;c[G+8>>2]=4;G=c[k>>2]|0;if(((c[l>>2]|0)-G|0)<17){eA(b,1);L=c[k>>2]|0}else{L=G}G=L+16|0;c[k>>2]=G;I=G;break};case 37:{c[C>>2]=f_(b,6416,1)|0;c[D+24>>2]=4;G=c[k>>2]|0;if(((c[l>>2]|0)-G|0)<17){eA(b,1);M=c[k>>2]|0}else{M=G}G=M+16|0;c[k>>2]=G;I=G;break};case 102:{h[C>>3]=(v=c[e+4>>2]|0,c[e+4>>2]=v+8,+h[(c[e>>2]|0)+v>>3]);c[D+24>>2]=3;G=c[k>>2]|0;if(((c[l>>2]|0)-G|0)<17){eA(b,1);N=c[k>>2]|0}else{N=G}G=N+16|0;c[k>>2]=G;I=G;break};default:{a[r]=37;a[s]=a[E]|0;a[t]=0;c[C>>2]=f_(b,r,j_(r|0)|0)|0;c[D+24>>2]=4;C=c[k>>2]|0;if(((c[l>>2]|0)-C|0)<17){eA(b,1);O=c[k>>2]|0}else{O=C}C=O+16|0;c[k>>2]=C;I=C}}C=y+2|0;E=A+2|0;G=aU(E|0,37)|0;if((G|0)==0){o=C;p=E;q=I;break L4082}else{y=C;z=E;A=G;B=I}}}}while(0);c[q>>2]=f_(b,p,j_(p|0)|0)|0;c[q+8>>2]=4;q=c[k>>2]|0;if(((c[l>>2]|0)-q|0)>=17){P=q;Q=P+16|0;c[k>>2]=Q;R=o+1|0;S=b+12|0;T=c[S>>2]|0;U=Q;V=T;W=U-V|0;X=W>>4;Y=X-1|0;gq(b,R,Y);Z=c[k>>2]|0;_=-o|0;$=Z+(_<<4)|0;c[k>>2]=$;aa=~o;ab=Z+(aa<<4)|0;ac=ab;ad=c[ac>>2]|0;ae=ad+16|0;af=ae;i=f;return af|0}eA(b,1);P=c[k>>2]|0;Q=P+16|0;c[k>>2]=Q;R=o+1|0;S=b+12|0;T=c[S>>2]|0;U=Q;V=T;W=U-V|0;X=W>>4;Y=X-1|0;gq(b,R,Y);Z=c[k>>2]|0;_=-o|0;$=Z+(_<<4)|0;c[k>>2]=$;aa=~o;ab=Z+(aa<<4)|0;ac=ab;ad=c[ac>>2]|0;ae=ad+16|0;af=ae;i=f;return af|0}function fy(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=i;i=i+16|0;f=e|0;g=f;c[g>>2]=d;c[g+4>>2]=0;g=fx(a,b,f|0)|0;i=e;return g|0}function fz(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;e=a[c]|0;if((e<<24>>24|0)==61){f=c+1|0;j3(b|0,f|0,d|0)|0;a[b+(d-1)|0]=0;return}else if((e<<24>>24|0)==64){e=c+1|0;f=j_(e|0)|0;a[b]=0;if(f>>>0>(d-8|0)>>>0){g=b+(j_(b|0)|0)|0;w=3026478;a[g]=w&255;w=w>>8;a[g+1|0]=w&255;w=w>>8;a[g+2|0]=w&255;w=w>>8;a[g+3|0]=w&255;h=c+(8-d+1+f)|0}else{h=e}j4(b|0,h|0)|0;return}else{h=a2(c|0,4048)|0;e=d-17|0;d=h>>>0>e>>>0?e:h;j$(b|0,3536,10)|0;if((a[c+d|0]|0)==0){j4(b|0,c|0)|0}else{bS(b|0,c|0,d|0)|0;d=b+(j_(b|0)|0)|0;w=3026478;a[d]=w&255;w=w>>8;a[d+1|0]=w&255;w=w>>8;a[d+2|0]=w&255;w=w>>8;a[d+3|0]=w&255}d=b+(j_(b|0)|0)|0;a[d]=a[2920]|0;a[d+1|0]=a[2921|0]|0;a[d+2|0]=a[2922|0]|0;return}}function fA(e,f,g,h){e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0;j=i;i=i+648|0;k=j|0;l=j+72|0;c[k+60>>2]=g;fh(e,k,f,f_(e,h,j_(h|0)|0)|0);fB(k,l);h=l|0;a[(c[h>>2]|0)+74|0]=2;fi(k);l=k+52|0;e=(c[l>>2]|0)+52|0;f=(b[e>>1]|0)+1&65535;b[e>>1]=f;if((f&65535)>200){fe(k,6912,0)}f=k+16|0;e=k+48|0;L4144:do{switch(c[f>>2]|0){case 260:case 261:case 262:case 276:case 287:{break L4144;break};default:{}}g=fD(k)|0;if((c[f>>2]|0)==59){fi(k)}m=c[e>>2]|0;c[m+36>>2]=d[m+50|0]|0;}while((g|0)==0);e=(c[l>>2]|0)+52|0;b[e>>1]=(b[e>>1]|0)-1&65535;if((c[f>>2]|0)==287){fC(k);n=c[h>>2]|0;i=j;return n|0}f=c[l>>2]|0;l=fd(k,287)|0;e=fy(f,7112,(f=i,i=i+8|0,c[f>>2]=l,f)|0)|0;i=f;ff(k,e);fC(k);n=c[h>>2]|0;i=j;return n|0}function fB(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=c[b+52>>2]|0;f=eV(e)|0;c[d>>2]=f;g=b+48|0;c[d+8>>2]=c[g>>2];c[d+12>>2]=b;c[d+16>>2]=e;c[g>>2]=d;c[d+24>>2]=0;c[d+28>>2]=-1;c[d+32>>2]=-1;c[d+20>>2]=0;j2(d+36|0,0,15);c[f+32>>2]=c[b+64>>2];a[f+75|0]=2;b=f5(e,0,0)|0;c[d+4>>2]=b;d=e+8|0;g=c[d>>2]|0;c[g>>2]=b;c[g+8>>2]=5;g=e+28|0;b=c[d>>2]|0;if(((c[g>>2]|0)-b|0)<17){eA(e,1);h=c[d>>2]|0}else{h=b}b=h+16|0;c[d>>2]=b;c[b>>2]=f;c[h+24>>2]=9;h=c[d>>2]|0;if(((c[g>>2]|0)-h|0)>=17){i=h;j=i+16|0;c[d>>2]=j;return}eA(e,1);i=c[d>>2]|0;j=i+16|0;c[d>>2]=j;return}function fC(f){f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;g=c[f+52>>2]|0;h=f+48|0;i=c[h>>2]|0;j=i|0;k=c[j>>2]|0;l=i+50|0;m=a[l]|0;n=i+24|0;L4164:do{if(m<<24>>24!=0){o=m;p=k;while(1){q=c[n>>2]|0;r=o-1&255;a[l]=r;c[(c[p+24>>2]|0)+((e[i+172+((r&255)<<1)>>1]|0)*12|0)+8>>2]=q;q=a[l]|0;if(q<<24>>24==0){break L4164}o=q;p=c[j>>2]|0}}}while(0);dP(i,0,0);j=c[n>>2]|0;if((j+1|0)>>>0<1073741824){l=k+12|0;m=k+44|0;s=fu(g,c[l>>2]|0,c[m>>2]<<2,j<<2)|0;t=l;u=m}else{s=fv(g)|0;t=k+12|0;u=k+44|0}c[t>>2]=s;c[u>>2]=c[n>>2];u=c[n>>2]|0;if((u+1|0)>>>0<1073741824){s=k+20|0;t=k+48|0;v=fu(g,c[s>>2]|0,c[t>>2]<<2,u<<2)|0;w=s;x=t}else{v=fv(g)|0;w=k+20|0;x=k+48|0}c[w>>2]=v;c[x>>2]=c[n>>2];n=i+40|0;x=c[n>>2]|0;if((x+1|0)>>>0<268435456){v=k+8|0;w=k+40|0;y=fu(g,c[v>>2]|0,c[w>>2]<<4,x<<4)|0;z=v;A=w}else{y=fv(g)|0;z=k+8|0;A=k+40|0}c[z>>2]=y;c[A>>2]=c[n>>2];n=i+44|0;A=c[n>>2]|0;if((A+1|0)>>>0<1073741824){y=k+16|0;z=k+52|0;B=fu(g,c[y>>2]|0,c[z>>2]<<2,A<<2)|0;C=y;D=z}else{B=fv(g)|0;C=k+16|0;D=k+52|0}c[C>>2]=B;c[D>>2]=c[n>>2];n=i+48|0;D=b[n>>1]|0;if((D+1|0)>>>0<357913942){B=k+24|0;C=k+56|0;E=fu(g,c[B>>2]|0,(c[C>>2]|0)*12|0,D*12|0)|0;F=B;G=C}else{E=fv(g)|0;F=k+24|0;G=k+56|0}c[F>>2]=E;c[G>>2]=b[n>>1]|0;n=k+72|0;G=k+28|0;E=k+36|0;c[G>>2]=fu(g,c[G>>2]|0,c[E>>2]<<2,d[n]<<2)|0;c[E>>2]=d[n]|0;c[h>>2]=c[i+8>>2];if((i|0)==0){H=g+8|0;I=c[H>>2]|0;J=I-32|0;c[H>>2]=J;return}if(((c[f+16>>2]|0)-285|0)>>>0>=2){H=g+8|0;I=c[H>>2]|0;J=I-32|0;c[H>>2]=J;return}i=c[f+24>>2]|0;fg(f,i+16|0,c[i+12>>2]|0)|0;H=g+8|0;I=c[H>>2]|0;J=I-32|0;c[H>>2]=J;return}function fD(f){f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0;g=i;i=i+392|0;h=g|0;j=g+24|0;k=g+48|0;l=g+72|0;m=g+104|0;n=g+128|0;o=g+152|0;p=g+176|0;q=g+200|0;r=g+224|0;s=g+248|0;t=g+272|0;u=g+288|0;v=g+304|0;w=g+328|0;x=g+344|0;y=g+368|0;z=g+384|0;A=f+4|0;B=c[A>>2]|0;C=f+16|0;switch(c[C>>2]|0){case 266:{D=c[f+48>>2]|0;c[z>>2]=-1;E=fS(f)|0;while(1){F=c[C>>2]|0;if((F|0)==260){G=3286;break}else if((F|0)!=261){G=3287;break}dO(D,z,dM(D)|0);dR(D,E);E=fS(f)|0}if((G|0)==3286){dO(D,z,dM(D)|0);dR(D,E);fi(f);fE(f)}else if((G|0)==3287){dO(D,z,E)}dR(D,c[z>>2]|0);fF(f,262,266,B);H=0;i=g;return H|0};case 277:{z=f+48|0;D=c[z>>2]|0;fi(f);E=dI(D)|0;fI(f,x,0)|0;F=x|0;if((c[F>>2]|0)==1){c[F>>2]=3}d5(c[z>>2]|0,x);z=c[x+20>>2]|0;c[y+4>>2]=-1;a[y+10|0]=1;x=D+50|0;a[y+8|0]=a[x]|0;a[y+9|0]=0;F=D+20|0;c[y>>2]=c[F>>2];c[F>>2]=y;if((c[C>>2]|0)!=259){y=c[f+52>>2]|0;I=fd(f,259)|0;J=fy(y,7112,(K=i,i=i+8|0,c[K>>2]=I,K)|0)|0;i=K;ff(f,J)}fi(f);fE(f);dQ(D,dM(D)|0,E);fF(f,262,277,B);E=c[F>>2]|0;c[F>>2]=c[E>>2];F=E+8|0;J=a[F]|0;I=c[(c[D+12>>2]|0)+48>>2]|0;y=I+50|0;L=a[y]|0;if((L&255)>(J&255)){M=I+24|0;N=I|0;O=L;do{L=c[M>>2]|0;P=O-1&255;a[y]=P;c[(c[(c[N>>2]|0)+24>>2]|0)+((e[I+172+((P&255)<<1)>>1]|0)*12|0)+8>>2]=L;O=a[y]|0;}while((O&255)>(J&255))}if((a[E+9|0]|0)!=0){J=d[F]|0;dL(D,35,J,0,0)|0}c[D+36>>2]=d[x]|0;dR(D,c[E+4>>2]|0);dR(D,z);H=0;i=g;return H|0};case 272:{z=f+48|0;D=c[z>>2]|0;E=dI(D)|0;c[t+4>>2]=-1;a[t+10|0]=1;x=D+50|0;a[t+8|0]=a[x]|0;a[t+9|0]=0;J=D+20|0;c[t>>2]=c[J>>2];c[J>>2]=t;c[u+4>>2]=-1;a[u+10|0]=0;a[u+8|0]=a[x]|0;t=u+9|0;a[t]=0;c[u>>2]=c[J>>2];c[J>>2]=u;fi(f);u=f+52|0;F=(c[u>>2]|0)+52|0;O=(b[F>>1]|0)+1&65535;b[F>>1]=O;if((O&65535)>200){fe(f,6912,0)}L4226:do{switch(c[C>>2]|0){case 260:case 261:case 262:case 276:case 287:{break L4226;break};default:{}}O=fD(f)|0;if((c[C>>2]|0)==59){fi(f)}F=c[z>>2]|0;c[F+36>>2]=d[F+50|0]|0;}while((O|0)==0);O=(c[u>>2]|0)+52|0;b[O>>1]=(b[O>>1]|0)-1&65535;fF(f,276,272,B);fI(f,s,0)|0;O=s|0;if((c[O>>2]|0)==1){c[O>>2]=3}d5(c[z>>2]|0,s);O=c[s+20>>2]|0;if((a[t]|0)==0){t=c[J>>2]|0;c[J>>2]=c[t>>2];s=t+8|0;u=a[s]|0;F=c[(c[D+12>>2]|0)+48>>2]|0;y=F+50|0;I=a[y]|0;if((I&255)>(u&255)){N=F+24|0;M=F|0;L=I;do{I=c[N>>2]|0;P=L-1&255;a[y]=P;c[(c[(c[M>>2]|0)+24>>2]|0)+((e[F+172+((P&255)<<1)>>1]|0)*12|0)+8>>2]=I;L=a[y]|0;}while((L&255)>(u&255))}if((a[t+9|0]|0)!=0){u=d[s]|0;dL(D,35,u,0,0)|0}c[D+36>>2]=d[x]|0;dR(D,c[t+4>>2]|0);dQ(c[z>>2]|0,O,E)}else{t=c[z>>2]|0;u=c[t+20>>2]|0;L4238:do{if((u|0)==0){Q=0;G=3353}else{s=0;L=u;while(1){if((a[L+10|0]|0)!=0){R=s;S=L;break L4238}y=d[L+9|0]|s;F=c[L>>2]|0;if((F|0)==0){Q=y;G=3353;break}else{s=y;L=F}}}}while(0);if((G|0)==3353){ff(f,9e3);R=Q;S=0}if((R|0)!=0){R=d[S+8|0]|0;dL(t,35,R,0,0)|0}dO(t,S+4|0,dM(t)|0);dR(c[z>>2]|0,O);O=c[J>>2]|0;c[J>>2]=c[O>>2];t=O+8|0;S=a[t]|0;R=c[(c[D+12>>2]|0)+48>>2]|0;Q=R+50|0;u=a[Q]|0;if((u&255)>(S&255)){L=R+24|0;s=R|0;F=u;do{u=c[L>>2]|0;y=F-1&255;a[Q]=y;c[(c[(c[s>>2]|0)+24>>2]|0)+((e[R+172+((y&255)<<1)>>1]|0)*12|0)+8>>2]=u;F=a[Q]|0;}while((F&255)>(S&255))}if((a[O+9|0]|0)!=0){S=d[t]|0;dL(D,35,S,0,0)|0}c[D+36>>2]=d[x]|0;dR(D,c[O+4>>2]|0);O=c[z>>2]|0;dQ(O,dM(D)|0,E)}E=c[J>>2]|0;c[J>>2]=c[E>>2];J=E+8|0;O=a[J]|0;z=c[(c[D+12>>2]|0)+48>>2]|0;S=z+50|0;t=a[S]|0;if((t&255)>(O&255)){F=z+24|0;Q=z|0;R=t;do{t=c[F>>2]|0;s=R-1&255;a[S]=s;c[(c[(c[Q>>2]|0)+24>>2]|0)+((e[z+172+((s&255)<<1)>>1]|0)*12|0)+8>>2]=t;R=a[S]|0;}while((R&255)>(O&255))}if((a[E+9|0]|0)!=0){O=d[J]|0;dL(D,35,O,0,0)|0}c[D+36>>2]=d[x]|0;dR(D,c[E+4>>2]|0);H=0;i=g;return H|0};case 259:{fi(f);fE(f);fF(f,262,259,B);H=0;i=g;return H|0};case 258:{fi(f);E=c[f+48>>2]|0;D=c[E+20>>2]|0;L4278:do{if((D|0)==0){T=0;G=3412}else{x=0;O=D;while(1){if((a[O+10|0]|0)!=0){U=x;V=O;break L4278}J=d[O+9|0]|x;R=c[O>>2]|0;if((R|0)==0){T=J;G=3412;break}else{x=J;O=R}}}}while(0);if((G|0)==3412){ff(f,9e3);U=T;V=0}if((U|0)!=0){U=d[V+8|0]|0;dL(E,35,U,0,0)|0}dO(E,V+4|0,dM(E)|0);H=1;i=g;return H|0};case 273:{E=f+48|0;V=c[E>>2]|0;fi(f);L4296:do{switch(c[C>>2]|0){case 260:case 261:case 262:case 276:case 287:case 59:{W=0;X=0;break};default:{fI(f,m,0)|0;if((c[C>>2]|0)==44){U=1;while(1){fi(f);d_(c[E>>2]|0,m);fI(f,m,0)|0;T=U+1|0;if((c[C>>2]|0)==44){U=T}else{Y=T;break}}}else{Y=1}U=m|0;if(((c[U>>2]|0)-13|0)>>>0<2){dX(V,m,-1);if((c[U>>2]|0)==13&(Y|0)==1){U=(c[(c[V>>2]|0)+12>>2]|0)+(c[m+8>>2]<<2)|0;c[U>>2]=c[U>>2]&-64|29}W=-1;X=d[V+50|0]|0;break L4296}else{if((Y|0)==1){W=1;X=d0(V,m)|0;break L4296}else{d_(V,m);W=Y;X=d[V+50|0]|0;break L4296}}}}}while(0);dP(V,X,W);H=1;i=g;return H|0};case 264:{W=f+48|0;X=c[W>>2]|0;c[w+4>>2]=-1;a[w+10|0]=1;V=X+50|0;a[w+8|0]=a[V]|0;a[w+9|0]=0;Y=X+20|0;c[w>>2]=c[Y>>2];c[Y>>2]=w;fi(f);if((c[C>>2]|0)!=285){w=c[f+52>>2]|0;m=fd(f,285)|0;E=fy(w,7112,(K=i,i=i+8|0,c[K>>2]=m,K)|0)|0;i=K;ff(f,E)}E=f+24|0;m=c[E>>2]|0;fi(f);w=c[C>>2]|0;if((w|0)==44|(w|0)==267){U=c[W>>2]|0;T=c[U+36>>2]|0;fL(f,fg(f,8632,15)|0,0);fL(f,fg(f,8456,11)|0,1);fL(f,fg(f,8240,13)|0,2);fL(f,m,3);D=c[C>>2]|0;if((D|0)==44){O=f+52|0;x=4;while(1){fi(f);if((c[C>>2]|0)!=285){R=c[O>>2]|0;J=fd(f,285)|0;S=fy(R,7112,(K=i,i=i+8|0,c[K>>2]=J,K)|0)|0;i=K;ff(f,S)}S=c[E>>2]|0;fi(f);fL(f,S,x);Z=c[C>>2]|0;if((Z|0)==44){x=x+1|0}else{break}}_=x-2|0;$=Z}else{_=1;$=D}if(($|0)!=267){$=c[f+52>>2]|0;D=fd(f,267)|0;Z=fy($,7112,(K=i,i=i+8|0,c[K>>2]=D,K)|0)|0;i=K;ff(f,Z)}fi(f);Z=c[A>>2]|0;fI(f,v,0)|0;if((c[C>>2]|0)==44){D=1;while(1){fi(f);d_(c[W>>2]|0,v);fI(f,v,0)|0;$=D+1|0;if((c[C>>2]|0)==44){D=$}else{aa=$;break}}}else{aa=1}D=c[W>>2]|0;$=3-aa|0;aa=c[v>>2]|0;do{if((aa|0)==13|(aa|0)==14){x=$+1|0;E=(x|0)<0?0:x;dX(D,v,E);if((E|0)<=1){break}dT(D,E-1|0)}else if((aa|0)==0){G=3325}else{d_(D,v);G=3325}}while(0);do{if((G|0)==3325){if(($|0)<=0){break}v=c[D+36>>2]|0;dT(D,$);dK(D,v,$)}}while(0);dS(U,3);fR(f,T,Z,_,0)}else if((w|0)==61){w=c[W>>2]|0;_=w+36|0;Z=c[_>>2]|0;fL(f,fg(f,8016,11)|0,0);fL(f,fg(f,7784,11)|0,1);fL(f,fg(f,7544,10)|0,2);fL(f,m,3);if((c[C>>2]|0)!=61){m=c[f+52>>2]|0;T=fd(f,61)|0;U=fy(m,7112,(K=i,i=i+8|0,c[K>>2]=T,K)|0)|0;i=K;ff(f,U)}fi(f);fI(f,k,0)|0;d_(c[W>>2]|0,k);if((c[C>>2]|0)!=44){k=c[f+52>>2]|0;U=fd(f,44)|0;T=fy(k,7112,(K=i,i=i+8|0,c[K>>2]=U,K)|0)|0;i=K;ff(f,T)}fi(f);fI(f,j,0)|0;d_(c[W>>2]|0,j);if((c[C>>2]|0)==44){fi(f);fI(f,h,0)|0;d_(c[W>>2]|0,h)}else{h=c[_>>2]|0;_=dW(w,1.0)|0;dN(w,1,h,_)|0;dT(w,1)}fR(f,Z,B,1,1)}else{ff(f,8840)}fF(f,262,264,B);Z=c[Y>>2]|0;c[Y>>2]=c[Z>>2];Y=Z+8|0;w=a[Y]|0;_=c[(c[X+12>>2]|0)+48>>2]|0;h=_+50|0;W=a[h]|0;if((W&255)>(w&255)){j=_+24|0;T=_|0;U=W;do{W=c[j>>2]|0;k=U-1&255;a[h]=k;c[(c[(c[T>>2]|0)+24>>2]|0)+((e[_+172+((k&255)<<1)>>1]|0)*12|0)+8>>2]=W;U=a[h]|0;}while((U&255)>(w&255))}if((a[Z+9|0]|0)!=0){w=d[Y]|0;dL(X,35,w,0,0)|0}c[X+36>>2]=d[V]|0;dR(X,c[Z+4>>2]|0);H=0;i=g;return H|0};case 265:{fi(f);if((c[C>>2]|0)!=285){Z=c[f+52>>2]|0;X=fd(f,285)|0;V=fy(Z,7112,(K=i,i=i+8|0,c[K>>2]=X,K)|0)|0;i=K;ff(f,V)}V=c[f+24>>2]|0;fi(f);X=f+48|0;Z=c[X>>2]|0;if((fQ(Z,V,q,1)|0)==8){c[q+8>>2]=dU(Z,V)|0}while(1){V=c[C>>2]|0;if((V|0)==58){G=3374;break}else if((V|0)!=46){ab=0;break}fO(f,q)}if((G|0)==3374){fO(f,q);ab=1}fK(f,r,ab,B);d3(c[X>>2]|0,q,r);ea(c[X>>2]|0,B);H=0;i=g;return H|0};case 268:{fi(f);B=c[C>>2]|0;if((B|0)==265){fi(f);X=f+48|0;r=c[X>>2]|0;if((c[C>>2]|0)!=285){q=c[f+52>>2]|0;ab=fd(f,285)|0;V=fy(q,7112,(K=i,i=i+8|0,c[K>>2]=ab,K)|0)|0;i=K;ff(f,V)}V=c[f+24>>2]|0;fi(f);fL(f,V,0);V=c[r+36>>2]|0;c[o+16>>2]=-1;c[o+20>>2]=-1;c[o>>2]=6;c[o+8>>2]=V;dT(r,1);V=c[X>>2]|0;X=V+50|0;ab=(a[X]|0)+1&255;a[X]=ab;c[(c[(c[V>>2]|0)+24>>2]|0)+((e[V+172+((ab&255)-1<<1)>>1]|0)*12|0)+4>>2]=c[V+24>>2];fK(f,p,0,c[A>>2]|0);d3(r,o,p);c[(c[(c[r>>2]|0)+24>>2]|0)+((e[r+172+((d[r+50|0]|0)-1<<1)>>1]|0)*12|0)+4>>2]=c[r+24>>2];H=0;i=g;return H|0}r=f+24|0;p=f+52|0;o=0;A=B;while(1){if((A|0)!=285){B=c[p>>2]|0;V=fd(f,285)|0;ab=fy(B,7112,(K=i,i=i+8|0,c[K>>2]=V,K)|0)|0;i=K;ff(f,ab)}ab=c[r>>2]|0;fi(f);ac=o+1|0;fL(f,ab,o);ab=c[C>>2]|0;if((ab|0)==61){G=3385;break}else if((ab|0)!=44){G=3388;break}fi(f);o=ac;A=c[C>>2]|0}do{if((G|0)==3385){fi(f);fI(f,n,0)|0;if((c[C>>2]|0)==44){A=f+48|0;r=1;while(1){fi(f);d_(c[A>>2]|0,n);fI(f,n,0)|0;K=r+1|0;if((c[C>>2]|0)==44){r=K}else{ad=K;break}}}else{ad=1}r=c[n>>2]|0;A=f+48|0;K=c[A>>2]|0;p=ac-ad|0;if((r|0)==0){ae=A;af=K;ag=p;G=3393;break}else if(!((r|0)==13|(r|0)==14)){d_(K,n);ae=A;af=K;ag=p;G=3393;break}r=p+1|0;p=(r|0)<0?0:r;dX(K,n,p);if((p|0)<=1){ah=A;break}dT(K,p-1|0);ah=A}else if((G|0)==3388){c[n>>2]=0;A=f+48|0;ae=A;af=c[A>>2]|0;ag=ac;G=3393}}while(0);do{if((G|0)==3393){if((ag|0)<=0){ah=ae;break}n=c[af+36>>2]|0;dT(af,ag);dK(af,n,ag);ah=ae}}while(0);ae=c[ah>>2]|0;ah=ae+50|0;ag=(d[ah]|0)+ac|0;a[ah]=ag&255;if((ac|0)==0){H=0;i=g;return H|0}af=ae+24|0;G=ae|0;c[(c[(c[G>>2]|0)+24>>2]|0)+((e[ae+172+((ag&255)-ac<<1)>>1]|0)*12|0)+4>>2]=c[af>>2];if((o|0)==0){H=0;i=g;return H|0}else{ai=o}while(1){c[(c[(c[G>>2]|0)+24>>2]|0)+((e[ae+172+((d[ah]|0)-ai<<1)>>1]|0)*12|0)+4>>2]=c[af>>2];o=ai-1|0;if((o|0)==0){H=0;break}else{ai=o}}i=g;return H|0};default:{ai=c[f+48>>2]|0;af=l+8|0;fG(f,af);if((c[af>>2]|0)==13){af=(c[(c[ai>>2]|0)+12>>2]|0)+(c[l+16>>2]<<2)|0;c[af>>2]=c[af>>2]&-8372225|16384;H=0;i=g;return H|0}else{c[l>>2]=0;fH(f,l,1);H=0;i=g;return H|0}}}return 0}function fE(f){f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;g=i;i=i+16|0;h=g|0;j=f+48|0;k=c[j>>2]|0;c[h+4>>2]=-1;a[h+10|0]=0;l=k+50|0;a[h+8|0]=a[l]|0;a[h+9|0]=0;m=k+20|0;c[h>>2]=c[m>>2];c[m>>2]=h;h=f+52|0;n=(c[h>>2]|0)+52|0;o=(b[n>>1]|0)+1&65535;b[n>>1]=o;if((o&65535)>200){fe(f,6912,0)}o=f+16|0;L4:do{switch(c[o>>2]|0){case 260:case 261:case 262:case 276:case 287:{break L4;break};default:{}}n=fD(f)|0;if((c[o>>2]|0)==59){fi(f)}p=c[j>>2]|0;c[p+36>>2]=d[p+50|0]|0;}while((n|0)==0);j=(c[h>>2]|0)+52|0;b[j>>1]=(b[j>>1]|0)-1&65535;j=c[m>>2]|0;c[m>>2]=c[j>>2];m=j+8|0;h=a[m]|0;f=c[(c[k+12>>2]|0)+48>>2]|0;o=f+50|0;n=a[o]|0;if((n&255)>(h&255)){p=f+24|0;q=f|0;r=n;do{n=c[p>>2]|0;s=r-1&255;a[o]=s;c[(c[(c[q>>2]|0)+24>>2]|0)+((e[f+172+((s&255)<<1)>>1]|0)*12|0)+8>>2]=n;r=a[o]|0;}while((r&255)>(h&255))}if((a[j+9|0]|0)==0){t=a[l]|0;u=t&255;v=k+36|0;c[v>>2]=u;w=j+4|0;x=c[w>>2]|0;dR(k,x);i=g;return}dL(k,35,d[m]|0,0,0)|0;t=a[l]|0;u=t&255;v=k+36|0;c[v>>2]=u;w=j+4|0;x=c[w>>2]|0;dR(k,x);i=g;return}function fF(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;if((c[a+16>>2]|0)==(b|0)){fi(a);i=f;return}g=(c[a+4>>2]|0)==(e|0);h=c[a+52>>2]|0;j=fd(a,b)|0;if(g){g=fy(h,7112,(k=i,i=i+8|0,c[k>>2]=j,k)|0)|0;i=k;ff(a,g);i=f;return}else{g=fd(a,d)|0;d=fy(h,7320,(k=i,i=i+24|0,c[k>>2]=j,c[k+8>>2]=g,c[k+16>>2]=e,k)|0)|0;i=k;ff(a,d);i=f;return}}function fG(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=i;i=i+48|0;e=d|0;f=d+24|0;g=a+48|0;h=c[g>>2]|0;j=a+16|0;k=c[j>>2]|0;do{if((k|0)==40){l=c[a+4>>2]|0;fi(a);fI(a,b,0)|0;fF(a,41,40,l);dZ(c[g>>2]|0,b)}else if((k|0)==285){l=c[a+24>>2]|0;fi(a);m=c[g>>2]|0;if((fQ(m,l,b,1)|0)!=8){break}c[b+8>>2]=dU(m,l)|0}else{ff(a,9512)}}while(0);k=a+24|0;l=f+16|0;m=f+20|0;n=f|0;o=f+8|0;p=a+52|0;L37:while(1){switch(c[j>>2]|0){case 46:{fO(a,b);continue L37;break};case 91:{d0(h,b)|0;fN(a,e);d6(h,b,e);continue L37;break};case 58:{fi(a);if((c[j>>2]|0)!=285){q=c[p>>2]|0;r=fd(a,285)|0;s=fy(q,7112,(q=i,i=i+8|0,c[q>>2]=r,q)|0)|0;i=q;ff(a,s)}s=c[k>>2]|0;fi(a);q=dU(c[g>>2]|0,s)|0;c[l>>2]=-1;c[m>>2]=-1;c[n>>2]=4;c[o>>2]=q;d4(h,b,f);fP(a,b);continue L37;break};case 40:case 286:case 123:{d_(h,b);fP(a,b);continue L37;break};default:{break L37}}}i=d;return}function fH(a,b,d){a=a|0;b=b|0;d=d|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;f=i;i=i+56|0;g=f|0;h=f+24|0;j=b+8|0;if(((c[j>>2]|0)-6|0)>>>0>=4){ff(a,9200)}k=a+16|0;l=c[k>>2]|0;if((l|0)==61){m=60}else if((l|0)==44){fi(a);c[h>>2]=b;l=h+8|0;fG(a,l);do{if((c[l>>2]|0)==6){n=c[a+48>>2]|0;o=n+36|0;p=c[o>>2]|0;if((b|0)==0){break}q=h+16|0;r=b;s=0;while(1){do{if((c[r+8>>2]|0)==9){t=r+16|0;u=t;v=c[q>>2]|0;if((c[u>>2]|0)==(v|0)){c[u>>2]=p;w=1;x=c[q>>2]|0}else{w=s;x=v}v=t+4|0;if((c[v>>2]|0)!=(x|0)){y=w;break}c[v>>2]=p;y=1}else{y=s}}while(0);v=c[r>>2]|0;if((v|0)==0){break}else{r=v;s=y}}if((y|0)==0){break}dL(n,0,c[o>>2]|0,c[q>>2]|0,0)|0;dT(n,1)}}while(0);y=200-(e[(c[a+52>>2]|0)+52>>1]|0)|0;w=a+48|0;if((y|0)<(d|0)){x=c[w>>2]|0;b=c[(c[x>>2]|0)+60>>2]|0;l=c[x+16>>2]|0;if((b|0)==0){s=fy(l,10384,(z=i,i=i+16|0,c[z>>2]=y,c[z+8>>2]=10064,z)|0)|0;i=z;A=s}else{s=fy(l,10216,(z=i,i=i+24|0,c[z>>2]=b,c[z+8>>2]=y,c[z+16>>2]=10064,z)|0)|0;i=z;A=s}fe(c[x+12>>2]|0,A,0)}fH(a,h,d+1|0);B=w;C=g|0}else{w=c[a+52>>2]|0;h=fd(a,61)|0;A=fy(w,7112,(z=i,i=i+8|0,c[z>>2]=h,z)|0)|0;i=z;ff(a,A);m=60}do{if((m|0)==60){fi(a);fI(a,g,0)|0;A=a+48|0;if((c[k>>2]|0)==44){z=1;while(1){fi(a);d_(c[A>>2]|0,g);fI(a,g,0)|0;h=z+1|0;if((c[k>>2]|0)==44){z=h}else{D=h;break}}}else{D=1}z=c[A>>2]|0;if((D|0)==(d|0)){dY(z,g);d3(c[A>>2]|0,j,g);i=f;return}n=d-D|0;q=g|0;o=c[q>>2]|0;do{if((o|0)==13|(o|0)==14){h=n+1|0;w=(h|0)<0?0:h;dX(z,g,w);if((w|0)<=1){break}dT(z,w-1|0)}else if((o|0)==0){m=67}else{d_(z,g);m=67}}while(0);do{if((m|0)==67){if((n|0)<=0){break}o=c[z+36>>2]|0;dT(z,n);dK(z,o,n)}}while(0);if((D|0)<=(d|0)){B=A;C=q;break}z=(c[A>>2]|0)+36|0;c[z>>2]=n+(c[z>>2]|0);B=A;C=q}}while(0);d=c[B>>2]|0;B=(c[d+36>>2]|0)-1|0;c[g+16>>2]=-1;c[g+20>>2]=-1;c[C>>2]=12;c[g+8>>2]=B;d3(d,j,g);i=f;return}function fI(e,f,g){e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;j=i;i=i+24|0;k=j|0;l=e+52|0;m=(c[l>>2]|0)+52|0;n=(b[m>>1]|0)+1&65535;b[m>>1]=n;if((n&65535)>200){fe(e,6912,0)}n=e+16|0;switch(c[n>>2]|0){case 265:{fi(e);fK(e,f,0,c[e+4>>2]|0);break};case 45:{o=0;p=81;break};case 35:{o=2;p=81;break};case 270:{o=1;p=81;break};case 284:{c[f+16>>2]=-1;c[f+20>>2]=-1;c[f>>2]=5;c[f+8>>2]=0;h[f+8>>3]=+h[e+24>>3];p=93;break};case 286:{m=dU(c[e+48>>2]|0,c[e+24>>2]|0)|0;c[f+16>>2]=-1;c[f+20>>2]=-1;c[f>>2]=4;c[f+8>>2]=m;p=93;break};case 269:{c[f+16>>2]=-1;c[f+20>>2]=-1;c[f>>2]=1;c[f+8>>2]=0;p=93;break};case 275:{c[f+16>>2]=-1;c[f+20>>2]=-1;c[f>>2]=2;c[f+8>>2]=0;p=93;break};case 263:{c[f+16>>2]=-1;c[f+20>>2]=-1;c[f>>2]=3;c[f+8>>2]=0;p=93;break};case 279:{m=c[e+48>>2]|0;q=m|0;r=c[q>>2]|0;s=a[r+74|0]|0;if(s<<24>>24==0){ff(e,8128);t=c[q>>2]|0;u=t;v=a[t+74|0]|0}else{u=r;v=s}a[u+74|0]=v&-5;v=dL(m,37,0,1,0)|0;c[f+16>>2]=-1;c[f+20>>2]=-1;c[f>>2]=14;c[f+8>>2]=v;p=93;break};case 123:{fJ(e|0,f|0);break};default:{fG(e,f)}}if((p|0)==93){fi(e)}else if((p|0)==81){fi(e);fI(e,f,8)|0;d7(c[e+48>>2]|0,o,f)}switch(c[n>>2]|0){case 45:{w=1;break};case 42:{w=2;break};case 47:{w=3;break};case 37:{w=4;break};case 94:{w=5;break};case 278:{w=6;break};case 283:{w=7;break};case 280:{w=8;break};case 60:{w=9;break};case 282:{w=10;break};case 62:{w=11;break};case 281:{w=12;break};case 257:{w=13;break};case 271:{w=14;break};case 43:{w=0;break};default:{x=15;y=c[l>>2]|0;z=y+52|0;A=b[z>>1]|0;B=A-1&65535;b[z>>1]=B;i=j;return x|0}}n=e+48|0;o=w;while(1){if((d[328+(o<<1)|0]|0)>>>0<=g>>>0){x=o;p=114;break}fi(e);d9(c[n>>2]|0,o,f);w=fI(e,k,d[329+(o<<1)|0]|0)|0;eb(c[n>>2]|0,o,f,k);if((w|0)==15){x=15;p=115;break}else{o=w}}if((p|0)==114){y=c[l>>2]|0;z=y+52|0;A=b[z>>1]|0;B=A-1&65535;b[z>>1]=B;i=j;return x|0}else if((p|0)==115){y=c[l>>2]|0;z=y+52|0;A=b[z>>1]|0;B=A-1&65535;b[z>>1]=B;i=j;return x|0}return 0}function fJ(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;d=i;i=i+40|0;e=d|0;f=a+48|0;g=c[f>>2]|0;h=c[a+4>>2]|0;j=dL(g,10,0,0,0)|0;k=e+36|0;c[k>>2]=0;l=e+28|0;c[l>>2]=0;m=e+32|0;c[m>>2]=0;n=e+24|0;c[n>>2]=b;c[b+16>>2]=-1;c[b+20>>2]=-1;c[b>>2]=11;c[b+8>>2]=j;o=e|0;c[e+16>>2]=-1;c[e+20>>2]=-1;p=e|0;c[p>>2]=0;c[e+8>>2]=0;d_(c[f>>2]|0,b);b=a+16|0;if((c[b>>2]|0)!=123){q=c[a+52>>2]|0;r=fd(a,123)|0;s=fy(q,7112,(t=i,i=i+8|0,c[t>>2]=r,t)|0)|0;i=t;ff(a,s)}fi(a);L148:do{if((c[b>>2]|0)!=125){s=a+32|0;do{do{if((c[p>>2]|0)!=0){d_(g,o);c[p>>2]=0;if((c[k>>2]|0)!=50){break}ed(g,c[(c[n>>2]|0)+8>>2]|0,c[m>>2]|0,50);c[k>>2]=0}}while(0);r=c[b>>2]|0;do{if((r|0)==91){fM(a,e)}else if((r|0)==285){fk(a);if((c[s>>2]|0)==61){fM(a,e);break}fI(a,o,0)|0;q=c[m>>2]|0;if((q|0)>2147483645){u=c[f>>2]|0;v=c[(c[u>>2]|0)+60>>2]|0;w=c[u+16>>2]|0;if((v|0)==0){x=fy(w,10384,(t=i,i=i+16|0,c[t>>2]=2147483645,c[t+8>>2]=2256,t)|0)|0;i=t;y=x}else{x=fy(w,10216,(t=i,i=i+24|0,c[t>>2]=v,c[t+8>>2]=2147483645,c[t+16>>2]=2256,t)|0)|0;i=t;y=x}fe(c[u+12>>2]|0,y,0);z=c[m>>2]|0}else{z=q}c[m>>2]=z+1;c[k>>2]=(c[k>>2]|0)+1}else{fI(a,o,0)|0;q=c[m>>2]|0;if((q|0)>2147483645){u=c[f>>2]|0;x=c[(c[u>>2]|0)+60>>2]|0;v=c[u+16>>2]|0;if((x|0)==0){w=fy(v,10384,(t=i,i=i+16|0,c[t>>2]=2147483645,c[t+8>>2]=2256,t)|0)|0;i=t;A=w}else{w=fy(v,10216,(t=i,i=i+24|0,c[t>>2]=x,c[t+8>>2]=2147483645,c[t+16>>2]=2256,t)|0)|0;i=t;A=w}fe(c[u+12>>2]|0,A,0);B=c[m>>2]|0}else{B=q}c[m>>2]=B+1;c[k>>2]=(c[k>>2]|0)+1}}while(0);r=c[b>>2]|0;if((r|0)==44){fi(a)}else if((r|0)==59){fi(a)}else{break L148}}while((c[b>>2]|0)!=125)}}while(0);fF(a,125,123,h);h=c[k>>2]|0;do{if((h|0)!=0){a=c[p>>2]|0;if((a|0)==13|(a|0)==14){dX(g,o,-1);ed(g,c[(c[n>>2]|0)+8>>2]|0,c[m>>2]|0,-1);c[m>>2]=(c[m>>2]|0)-1;break}else if((a|0)==0){C=h}else{d_(g,o);C=c[k>>2]|0}ed(g,c[(c[n>>2]|0)+8>>2]|0,c[m>>2]|0,C)}}while(0);C=g|0;g=c[(c[(c[C>>2]|0)+12>>2]|0)+(j<<2)>>2]&8388607;n=(fo(c[m>>2]|0)|0)<<23|g;c[(c[(c[C>>2]|0)+12>>2]|0)+(j<<2)>>2]=n;n=c[(c[(c[C>>2]|0)+12>>2]|0)+(j<<2)>>2]&-8372225;g=(fo(c[l>>2]|0)|0)<<14&8372224|n;c[(c[(c[C>>2]|0)+12>>2]|0)+(j<<2)>>2]=g;i=d;return}function fK(f,g,h,j){f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;k=i;i=i+576|0;l=k|0;fB(f,l);m=l|0;c[(c[m>>2]|0)+60>>2]=j;n=f+16|0;if((c[n>>2]|0)!=40){o=c[f+52>>2]|0;p=fd(f,40)|0;q=fy(o,7112,(r=i,i=i+8|0,c[r>>2]=p,r)|0)|0;i=r;ff(f,q)}fi(f);if((h|0)==0){s=f+48|0}else{fL(f,fg(f,6328,4)|0,0);h=f+48|0;q=c[h>>2]|0;p=q+50|0;o=(a[p]|0)+1&255;a[p]=o;c[(c[(c[q>>2]|0)+24>>2]|0)+((e[q+172+((o&255)-1<<1)>>1]|0)*12|0)+4>>2]=c[q+24>>2];s=h}h=c[s>>2]|0;q=c[h>>2]|0;o=q+74|0;a[o]=0;p=c[n>>2]|0;L198:do{if((p|0)==41){t=0}else{u=f+24|0;v=0;w=p;while(1){if((w|0)==279){break}else if((w|0)==285){x=c[u>>2]|0;fi(f);fL(f,x,v);y=v+1|0}else{ff(f,3504);y=v}if((a[o]|0)!=0){t=y;break L198}if((c[n>>2]|0)!=44){t=y;break L198}fi(f);v=y;w=c[n>>2]|0}fi(f);fL(f,fg(f,4032,3)|0,v);a[o]=7;t=v+1|0}}while(0);y=c[s>>2]|0;p=y+50|0;w=(d[p]|0)+t|0;a[p]=w&255;do{if((t|0)!=0){u=y+24|0;x=y|0;c[(c[(c[x>>2]|0)+24>>2]|0)+((e[y+172+((w&255)-t<<1)>>1]|0)*12|0)+4>>2]=c[u>>2];z=t-1|0;if((z|0)==0){break}else{A=z}do{c[(c[(c[x>>2]|0)+24>>2]|0)+((e[y+172+((d[p]|0)-A<<1)>>1]|0)*12|0)+4>>2]=c[u>>2];A=A-1|0;}while((A|0)!=0)}}while(0);A=h+50|0;a[q+73|0]=(a[A]|0)-(a[o]&1)&255;dT(h,d[A]|0);A=f+52|0;if((c[n>>2]|0)!=41){h=c[A>>2]|0;o=fd(f,41)|0;q=fy(h,7112,(r=i,i=i+8|0,c[r>>2]=o,r)|0)|0;i=r;ff(f,q)}fi(f);q=(c[A>>2]|0)+52|0;r=(b[q>>1]|0)+1&65535;b[q>>1]=r;if((r&65535)>200){fe(f,6912,0)}L220:do{switch(c[n>>2]|0){case 260:case 261:case 262:case 276:case 287:{break L220;break};default:{}}r=fD(f)|0;if((c[n>>2]|0)==59){fi(f)}q=c[s>>2]|0;c[q+36>>2]=d[q+50|0]|0;}while((r|0)==0);n=(c[A>>2]|0)+52|0;b[n>>1]=(b[n>>1]|0)-1&65535;c[(c[m>>2]|0)+64>>2]=c[f+4>>2];fF(f,262,265,j);fC(f);f=c[s>>2]|0;s=c[f>>2]|0;j=s+52|0;n=c[j>>2]|0;r=f+44|0;if(((c[r>>2]|0)+1|0)>(n|0)){q=s+16|0;c[q>>2]=ft(c[A>>2]|0,c[q>>2]|0,j,4,262143,4888)|0;B=c[j>>2]|0;C=q}else{B=n;C=s+16|0}if((n|0)<(B|0)){B=n;while(1){n=B+1|0;c[(c[C>>2]|0)+(B<<2)>>2]=0;if((n|0)<(c[j>>2]|0)){B=n}else{break}}}B=c[m>>2]|0;j=c[r>>2]|0;c[r>>2]=j+1;c[(c[C>>2]|0)+(j<<2)>>2]=B;B=c[m>>2]|0;j=B;do{if((a[B+5|0]&3)!=0){if((a[s+5|0]&4)==0){break}e7(c[A>>2]|0,s,j)}}while(0);j=dN(f,36,0,(c[r>>2]|0)-1|0)|0;c[g+16>>2]=-1;c[g+20>>2]=-1;c[g>>2]=11;c[g+8>>2]=j;if((a[(c[m>>2]|0)+72|0]|0)==0){i=k;return}else{D=0}do{dL(f,(a[l+51+(D<<1)|0]|0)==6?0:4,0,d[l+51+(D<<1)+1|0]|0,0)|0;D=D+1|0;}while((D|0)<(d[(c[m>>2]|0)+72|0]|0));i=k;return}function fL(e,f,g){e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;h=i;j=e+48|0;k=c[j>>2]|0;l=k+50|0;if((g+1+(d[l]|0)|0)>200){m=c[(c[k>>2]|0)+60>>2]|0;n=c[k+16>>2]|0;if((m|0)==0){o=fy(n,10384,(p=i,i=i+16|0,c[p>>2]=200,c[p+8>>2]=2904,p)|0)|0;i=p;q=o}else{o=fy(n,10216,(p=i,i=i+24|0,c[p>>2]=m,c[p+8>>2]=200,c[p+16>>2]=2904,p)|0)|0;i=p;q=o}fe(c[k+12>>2]|0,q,0);r=c[j>>2]|0}else{r=k}j=c[r>>2]|0;q=j+56|0;o=c[q>>2]|0;p=r+48|0;if(((b[p>>1]|0)+1|0)>(o|0)){r=j+24|0;c[r>>2]=ft(c[e+52>>2]|0,c[r>>2]|0,q,12,32767,2552)|0;s=c[q>>2]|0;t=r}else{s=o;t=j+24|0}if((o|0)<(s|0)){s=o;while(1){o=s+1|0;c[(c[t>>2]|0)+(s*12|0)>>2]=0;if((o|0)<(c[q>>2]|0)){s=o}else{break}}}c[(c[t>>2]|0)+((b[p>>1]|0)*12|0)>>2]=f;if((a[f+5|0]&3)==0){u=b[p>>1]|0;v=u+1&65535;b[p>>1]=v;w=a[l]|0;x=w&255;y=x+g|0;z=k+172+(y<<1)|0;b[z>>1]=u;i=h;return}if((a[j+5|0]&4)==0){u=b[p>>1]|0;v=u+1&65535;b[p>>1]=v;w=a[l]|0;x=w&255;y=x+g|0;z=k+172+(y<<1)|0;b[z>>1]=u;i=h;return}e7(c[e+52>>2]|0,j,f);u=b[p>>1]|0;v=u+1&65535;b[p>>1]=v;w=a[l]|0;x=w&255;y=x+g|0;z=k+172+(y<<1)|0;b[z>>1]=u;i=h;return}function fM(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;d=i;i=i+48|0;e=d|0;f=d+24|0;g=a+48|0;h=c[g>>2]|0;j=h+36|0;k=c[j>>2]|0;l=a+16|0;if((c[l>>2]|0)==285){m=b+28|0;do{if((c[m>>2]|0)>2147483645){n=c[(c[h>>2]|0)+60>>2]|0;o=c[h+16>>2]|0;if((n|0)==0){p=fy(o,10384,(q=i,i=i+16|0,c[q>>2]=2147483645,c[q+8>>2]=2256,q)|0)|0;i=q;r=p}else{p=fy(o,10216,(q=i,i=i+24|0,c[q>>2]=n,c[q+8>>2]=2147483645,c[q+16>>2]=2256,q)|0)|0;i=q;r=p}fe(c[h+12>>2]|0,r,0);if((c[l>>2]|0)==285){break}p=c[a+52>>2]|0;n=fd(a,285)|0;o=fy(p,7112,(q=i,i=i+8|0,c[q>>2]=n,q)|0)|0;i=q;ff(a,o)}}while(0);r=c[a+24>>2]|0;fi(a);o=dU(c[g>>2]|0,r)|0;c[e+16>>2]=-1;c[e+20>>2]=-1;c[e>>2]=4;c[e+8>>2]=o;s=m}else{fN(a,e);s=b+28|0}c[s>>2]=(c[s>>2]|0)+1;if((c[l>>2]|0)==61){fi(a);t=d2(h,e)|0;u=fI(a,f,0)|0;v=b+24|0;w=c[v>>2]|0;x=w+8|0;y=x;z=c[y>>2]|0;A=d2(h,f)|0;B=dL(h,9,z,t,A)|0;c[j>>2]=k;i=d;return}l=c[a+52>>2]|0;s=fd(a,61)|0;m=fy(l,7112,(q=i,i=i+8|0,c[q>>2]=s,q)|0)|0;i=q;ff(a,m);fi(a);t=d2(h,e)|0;u=fI(a,f,0)|0;v=b+24|0;w=c[v>>2]|0;x=w+8|0;y=x;z=c[y>>2]|0;A=d2(h,f)|0;B=dL(h,9,z,t,A)|0;c[j>>2]=k;i=d;return}function fN(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;fi(a);fI(a,b,0)|0;d1(c[a+48>>2]|0,b);if((c[a+16>>2]|0)==93){fi(a);i=d;return}b=c[a+52>>2]|0;e=fd(a,93)|0;f=fy(b,7112,(b=i,i=i+8|0,c[b>>2]=e,b)|0)|0;i=b;ff(a,f);fi(a);i=d;return}function fO(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+24|0;e=d|0;f=a+48|0;g=c[f>>2]|0;d0(g,b)|0;fi(a);if((c[a+16>>2]|0)!=285){h=c[a+52>>2]|0;j=fd(a,285)|0;k=fy(h,7112,(h=i,i=i+8|0,c[h>>2]=j,h)|0)|0;i=h;ff(a,k)}k=c[a+24>>2]|0;fi(a);a=dU(c[f>>2]|0,k)|0;c[e+16>>2]=-1;c[e+20>>2]=-1;c[e>>2]=4;c[e+8>>2]=a;d6(g,b,e);i=d;return}function fP(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;i=i+24|0;e=d|0;f=a+48|0;g=c[f>>2]|0;h=c[a+4>>2]|0;j=a+16|0;k=c[j>>2]|0;if((k|0)==123){fJ(a|0,e|0)}else if((k|0)==286){l=dU(g,c[a+24>>2]|0)|0;c[e+16>>2]=-1;c[e+20>>2]=-1;c[e>>2]=4;c[e+8>>2]=l;fi(a)}else if((k|0)==40){if((h|0)!=(c[a+8>>2]|0)){ff(a,9952)}fi(a);if((c[j>>2]|0)==41){c[e>>2]=0}else{fI(a,e,0)|0;if((c[j>>2]|0)==44){do{fi(a);d_(c[f>>2]|0,e);fI(a,e,0)|0;}while((c[j>>2]|0)==44)}dX(g,e,-1)}fF(a,41,40,h)}else{ff(a,9704);i=d;return}a=b+8|0;j=c[a>>2]|0;f=c[e>>2]|0;if((f|0)==0){m=240}else if((f|0)==13|(f|0)==14){n=0}else{d_(g,e);m=240}if((m|0)==240){n=(c[g+36>>2]|0)-j|0}m=dL(g,28,j,n,2)|0;c[b+16>>2]=-1;c[b+20>>2]=-1;c[b>>2]=13;c[a>>2]=m;ea(g,h);c[g+36>>2]=j+1;i=d;return}function fQ(b,f,g,h){b=b|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;j=i;if((b|0)==0){c[g+16>>2]=-1;c[g+20>>2]=-1;c[g>>2]=8;c[g+8>>2]=255;k=8;i=j;return k|0}l=b|0;m=d[b+50|0]|0;while(1){n=m-1|0;if((m|0)<=0){break}if((c[(c[(c[l>>2]|0)+24>>2]|0)+((e[b+172+(n<<1)>>1]|0)*12|0)>>2]|0)==(f|0)){o=250;break}else{m=n}}if((o|0)==250){c[g+16>>2]=-1;c[g+20>>2]=-1;c[g>>2]=6;c[g+8>>2]=n;if((h|0)!=0){k=6;i=j;return k|0}h=b+20|0;while(1){p=c[h>>2]|0;if((p|0)==0){k=6;o=279;break}if((d[p+8|0]|0|0)>(n|0)){h=p|0}else{break}}if((o|0)==279){i=j;return k|0}a[p+9|0]=1;k=6;i=j;return k|0}if((fQ(c[b+8>>2]|0,f,g,0)|0)==8){k=8;i=j;return k|0}p=c[l>>2]|0;l=p+36|0;h=c[l>>2]|0;n=p+72|0;m=a[n]|0;q=m&255;L342:do{if(m<<24>>24==0){r=0;o=261}else{s=c[g>>2]|0;t=g+8|0;u=0;while(1){if((d[b+51+(u<<1)|0]|0|0)==(s|0)){if((d[b+51+(u<<1)+1|0]|0|0)==(c[t>>2]|0)){v=u;break L342}}w=u+1|0;if((w|0)<(q|0)){u=w}else{r=m;o=261;break}}}}while(0);if((o|0)==261){if((q+1|0)>>>0>60){q=c[p+60>>2]|0;o=c[b+16>>2]|0;if((q|0)==0){m=fy(o,10384,(x=i,i=i+16|0,c[x>>2]=60,c[x+8>>2]=9272,x)|0)|0;i=x;y=m}else{m=fy(o,10216,(x=i,i=i+24|0,c[x>>2]=q,c[x+8>>2]=60,c[x+16>>2]=9272,x)|0)|0;i=x;y=m}fe(c[b+12>>2]|0,y,0);z=a[n]|0;A=c[l>>2]|0}else{z=r;A=h}if(((z&255)+1|0)>(A|0)){z=p+28|0;c[z>>2]=ft(c[b+16>>2]|0,c[z>>2]|0,l,4,2147483645,10560)|0;B=c[l>>2]|0;C=z}else{B=A;C=p+28|0}if((h|0)<(B|0)){B=h;while(1){h=B+1|0;c[(c[C>>2]|0)+(B<<2)>>2]=0;if((h|0)<(c[l>>2]|0)){B=h}else{break}}}c[(c[C>>2]|0)+((d[n]|0)<<2)>>2]=f;C=f;do{if((a[f+5|0]&3)!=0){if((a[p+5|0]&4)==0){break}e7(c[b+16>>2]|0,p,C)}}while(0);a[b+51+((d[n]|0)<<1)|0]=c[g>>2]&255;a[b+51+((d[n]|0)<<1)+1|0]=c[g+8>>2]&255;b=a[n]|0;a[n]=b+1&255;v=b&255}c[g+8>>2]=v;c[g>>2]=7;k=7;i=j;return k|0}function fR(b,f,g,h,j){b=b|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;k=i;i=i+16|0;l=k|0;m=b+48|0;n=c[m>>2]|0;o=n+50|0;p=(a[o]|0)+3&255;a[o]=p;q=n+24|0;r=n|0;c[(c[(c[r>>2]|0)+24>>2]|0)+((e[n+172+((p&255)-3<<1)>>1]|0)*12|0)+4>>2]=c[q>>2];c[(c[(c[r>>2]|0)+24>>2]|0)+((e[n+172+((d[o]|0)-2<<1)>>1]|0)*12|0)+4>>2]=c[q>>2];c[(c[(c[r>>2]|0)+24>>2]|0)+((e[n+172+((d[o]|0)-1<<1)>>1]|0)*12|0)+4>>2]=c[q>>2];if((c[b+16>>2]|0)!=259){q=c[b+52>>2]|0;r=fd(b,259)|0;p=fy(q,7112,(q=i,i=i+8|0,c[q>>2]=r,q)|0)|0;i=q;ff(b,p)}fi(b);p=(j|0)!=0;if(p){s=dN(n,32,f,131070)|0}else{s=dM(n)|0}c[l+4>>2]=-1;a[l+10|0]=0;a[l+8|0]=a[o]|0;a[l+9|0]=0;j=n+20|0;c[l>>2]=c[j>>2];c[j>>2]=l;l=c[m>>2]|0;m=l+50|0;q=(d[m]|0)+h|0;a[m]=q&255;do{if((h|0)!=0){r=l+24|0;t=l|0;c[(c[(c[t>>2]|0)+24>>2]|0)+((e[l+172+((q&255)-h<<1)>>1]|0)*12|0)+4>>2]=c[r>>2];u=h-1|0;if((u|0)==0){break}else{v=u}do{c[(c[(c[t>>2]|0)+24>>2]|0)+((e[l+172+((d[m]|0)-v<<1)>>1]|0)*12|0)+4>>2]=c[r>>2];v=v-1|0;}while((v|0)!=0)}}while(0);dT(n,h);fE(b);b=c[j>>2]|0;c[j>>2]=c[b>>2];j=b+8|0;v=a[j]|0;m=c[(c[n+12>>2]|0)+48>>2]|0;l=m+50|0;q=a[l]|0;if((q&255)>(v&255)){r=m+24|0;t=m|0;u=q;do{q=c[r>>2]|0;w=u-1&255;a[l]=w;c[(c[(c[t>>2]|0)+24>>2]|0)+((e[m+172+((w&255)<<1)>>1]|0)*12|0)+8>>2]=q;u=a[l]|0;}while((u&255)>(v&255))}if((a[b+9|0]|0)!=0){v=d[j]|0;dL(n,35,v,0,0)|0}c[n+36>>2]=d[o]|0;dR(n,c[b+4>>2]|0);dR(n,s);if(p){p=dN(n,31,f,131070)|0;ea(n,g);x=p;y=s+1|0;dQ(n,x,y);i=k;return}else{dL(n,33,f,0,h)|0;ea(n,g);x=dM(n)|0;y=s+1|0;dQ(n,x,y);i=k;return}}function fS(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+24|0;d=b|0;fi(a);fI(a,d,0)|0;e=d|0;if((c[e>>2]|0)==1){c[e>>2]=3}d5(c[a+48>>2]|0,d);e=c[d+20>>2]|0;if((c[a+16>>2]|0)==274){fi(a);fE(a);i=b;return e|0}d=c[a+52>>2]|0;f=fd(a,274)|0;g=fy(d,7112,(d=i,i=i+8|0,c[d>>2]=f,d)|0)|0;i=d;ff(a,g);fi(a);fE(a);i=b;return e|0}function fT(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=fu(b,0,0,120)|0;e3(b,d,8);c[d+16>>2]=c[b+16>>2];e=d+32|0;c[e>>2]=0;f=d+44|0;c[f>>2]=0;c[d+112>>2]=0;g=d+68|0;c[g>>2]=0;h=d+56|0;a[h]=0;i=d+60|0;c[i>>2]=0;a[d+57|0]=1;j=d+64|0;c[j>>2]=0;c[d+104>>2]=0;k=d+48|0;a[d+6|0]=0;l=d+20|0;c[l>>2]=0;m=d+40|0;c[m>>2]=0;c[d+24>>2]=0;c[d+116>>2]=0;n=d+80|0;c[n>>2]=0;o=k;c[o>>2]=0;c[o+4>>2]=0;o=fu(b,0,0,192)|0;p=o;c[m>>2]=p;c[l>>2]=p;c[k>>2]=8;c[d+36>>2]=o+168;o=fu(b,0,0,720)|0;k=o;c[e>>2]=k;c[f>>2]=45;f=d+8|0;c[f>>2]=k;c[d+28>>2]=o+624;c[(c[l>>2]|0)+4>>2]=k;k=c[f>>2]|0;c[f>>2]=k+16;c[k+8>>2]=0;k=c[f>>2]|0;c[c[l>>2]>>2]=k;c[d+12>>2]=k;c[(c[l>>2]|0)+8>>2]=(c[f>>2]|0)+320;f=b+72|0;l=d+72|0;k=c[f+4>>2]|0;c[l>>2]=c[f>>2];c[l+4>>2]=k;c[n>>2]=c[b+80>>2];a[h]=a[b+56|0]|0;h=c[b+60>>2]|0;c[i>>2]=h;c[g>>2]=c[b+68>>2];c[j>>2]=h;return d|0}function fU(a,b){a=a|0;b=b|0;var d=0;d=b+32|0;eU(b,c[d>>2]|0);fu(a,c[b+40>>2]|0,(c[b+48>>2]|0)*24|0,0)|0;fu(a,c[d>>2]|0,c[b+44>>2]<<4,0)|0;fu(a,b,120,0)|0;return}function fV(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=cg[b&511](d,0,0,376)|0;if((e|0)==0){f=0;return f|0}g=e;h=e+120|0;c[e>>2]=0;a[e+4|0]=8;a[e+140|0]=33;a[e+5|0]=97;i=e+16|0;c[i>>2]=h;j=e+32|0;c[j>>2]=0;k=e+44|0;c[k>>2]=0;c[e+112>>2]=0;c[e+68>>2]=0;a[e+56|0]=0;c[e+60>>2]=0;a[e+57|0]=1;c[e+64>>2]=0;c[e+104>>2]=0;l=e+48|0;a[e+6|0]=0;c[e+20>>2]=0;m=e+40|0;c[m>>2]=0;c[e+24>>2]=0;c[e+116>>2]=0;c[e+80>>2]=0;n=l;c[n>>2]=0;c[n+4>>2]=0;c[e+132>>2]=b;c[e+136>>2]=d;c[e+232>>2]=g;d=e+240|0;c[e+256>>2]=d;c[e+260>>2]=d;c[e+184>>2]=0;c[e+128>>2]=0;c[e+124>>2]=0;c[h>>2]=0;c[e+224>>2]=0;c[e+172>>2]=0;c[e+180>>2]=0;c[e+208>>2]=0;a[e+141|0]=0;h=e+148|0;c[h>>2]=e;c[e+144>>2]=0;c[e+152>>2]=h;j2(e+156|0,0,16);c[e+188>>2]=376;c[e+200>>2]=200;c[e+204>>2]=200;c[e+196>>2]=0;j2(e+272|0,0,36);if((ex(g,254,0)|0)==0){f=g;return f|0}h=c[i>>2]|0;eU(g,c[j>>2]|0);e$(g);d=c[i>>2]|0;fu(g,c[d>>2]|0,c[d+8>>2]<<2,0)|0;d=h+52|0;i=h+60|0;c[d>>2]=fu(g,c[d>>2]|0,c[i>>2]|0,0)|0;c[i>>2]=0;fu(g,c[m>>2]|0,(c[l>>2]|0)*24|0,0)|0;fu(g,c[j>>2]|0,c[k>>2]<<4,0)|0;cg[c[h+12>>2]&511](c[h+16>>2]|0,e,376,0)|0;f=0;return f|0}function fW(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;d=b+16|0;e=c[d>>2]|0;f=fu(b,0,0,192)|0;g=f;c[b+40>>2]=g;h=b+20|0;c[h>>2]=g;c[b+48>>2]=8;c[b+36>>2]=f+168;f=fu(b,0,0,720)|0;g=f;c[b+32>>2]=g;c[b+44>>2]=45;i=b+8|0;c[i>>2]=g;c[b+28>>2]=f+624;c[(c[h>>2]|0)+4>>2]=g;g=c[i>>2]|0;c[i>>2]=g+16;c[g+8>>2]=0;g=c[i>>2]|0;c[c[h>>2]>>2]=g;c[b+12>>2]=g;c[(c[h>>2]|0)+8>>2]=(c[i>>2]|0)+320;c[b+72>>2]=f5(b,0,2)|0;c[b+80>>2]=5;i=c[d>>2]|0;c[i+96>>2]=f5(b,0,2)|0;c[i+104>>2]=5;fZ(b,32);ge(b);fc(b);i=(f_(b,8768,17)|0)+5|0;a[i]=a[i]|32;c[e+64>>2]=c[e+68>>2]<<2;return}function fX(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=c[(c[a+16>>2]|0)+112>>2]|0;a=d+32|0;eU(d,c[a>>2]|0);eY(d,1)|0;c[d+116>>2]=0;e=d+40|0;f=d+20|0;g=d+8|0;h=d+12|0;i=d+54|0;j=d+52|0;do{k=c[e>>2]|0;c[f>>2]=k;l=c[k>>2]|0;c[g>>2]=l;c[h>>2]=l;b[i>>1]=0;b[j>>1]=0;}while((ex(d,256,0)|0)!=0);j=d+16|0;i=c[j>>2]|0;eU(d,c[a>>2]|0);e$(d);h=c[j>>2]|0;fu(d,c[h>>2]|0,c[h+8>>2]<<2,0)|0;h=i+52|0;j=i+60|0;c[h>>2]=fu(d,c[h>>2]|0,c[j>>2]|0,0)|0;c[j>>2]=0;fu(d,c[e>>2]|0,(c[d+48>>2]|0)*24|0,0)|0;fu(d,c[a>>2]|0,c[d+44>>2]<<4,0)|0;cg[c[i+12>>2]&511](c[i+16>>2]|0,d,376,0)|0;return}function fY(a,b){a=a|0;b=b|0;eZ(a);return}function fZ(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;e=b+16|0;if((a[(c[e>>2]|0)+21|0]|0)==2){return}if((d+1|0)>>>0<1073741824){f=fu(b,0,0,d<<2)|0}else{f=fv(b)|0}g=f;h=c[e>>2]|0;if((d|0)>0){j2(f|0,0,d<<2|0)}f=h+8|0;e=c[f>>2]|0;i=h|0;h=c[i>>2]|0;if((e|0)>0){j=d-1|0;k=0;l=h;m=e;while(1){n=c[l+(k<<2)>>2]|0;if((n|0)==0){o=m;p=l}else{q=n;while(1){n=q|0;r=c[n>>2]|0;s=g+((c[q+8>>2]&j)<<2)|0;c[n>>2]=c[s>>2];c[s>>2]=q;if((r|0)==0){break}else{q=r}}o=c[f>>2]|0;p=c[i>>2]|0}q=k+1|0;if((q|0)<(o|0)){k=q;l=p;m=o}else{t=o;u=p;break}}}else{t=e;u=h}fu(b,u,t<<2,0)|0;c[f>>2]=d;c[i>>2]=g;return}function f_(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;g=(f>>>5)+1|0;if(g>>>0>f>>>0){h=f}else{i=f;j=f;while(1){k=(i<<5)+(i>>>2)+(d[e+(j-1)|0]|0)^i;l=j-g|0;if(l>>>0<g>>>0){h=k;break}else{i=k;j=l}}}j=b+16|0;i=c[j>>2]|0;g=c[(c[i>>2]|0)+(((c[i+8>>2]|0)-1&h)<<2)>>2]|0;L449:do{if((g|0)!=0){l=g;while(1){if((c[l+12>>2]|0)==(f|0)){m=l;if((j5(e|0,l+16|0,f|0)|0)==0){break}}k=c[l>>2]|0;if((k|0)==0){break L449}else{l=k}}k=l+5|0;n=a[k]|0;if((n&3&((d[i+20|0]|0)^3)|0)==0){o=m;return o|0}a[k]=n^3;o=m;return o|0}}while(0);if((f+1|0)>>>0>4294967277){fv(b)|0}m=fu(b,0,0,f+17|0)|0;i=m;c[m+12>>2]=f;c[m+8>>2]=h;a[m+5|0]=a[(c[j>>2]|0)+20|0]&3;a[m+4|0]=4;a[m+6|0]=0;g=m+16|0;j$(g|0,e|0,f)|0;a[m+(f+16)|0]=0;f=c[j>>2]|0;j=f+8|0;e=(c[j>>2]|0)-1&h;h=f|0;c[m>>2]=c[(c[h>>2]|0)+(e<<2)>>2];c[(c[h>>2]|0)+(e<<2)>>2]=m;m=f+4|0;f=(c[m>>2]|0)+1|0;c[m>>2]=f;m=c[j>>2]|0;if(!(f>>>0>m>>>0&(m|0)<1073741823)){o=i;return o|0}fZ(b,m<<1);o=i;return o|0}function f$(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;if(d>>>0>4294967269){fv(b)|0}f=fu(b,0,0,d+24|0)|0;g=b+16|0;a[f+5|0]=a[(c[g>>2]|0)+20|0]&3;a[f+4|0]=7;c[f+16>>2]=d;c[f+8>>2]=0;c[f+12>>2]=e;c[f>>2]=c[c[(c[g>>2]|0)+112>>2]>>2];c[c[(c[g>>2]|0)+112>>2]>>2]=f;return f|0}function f0(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;f=i;g=e+8|0;L473:do{switch(c[g>>2]|0){case 4:{j=(c[b+16>>2]|0)+(((1<<(d[b+7|0]|0))-1&c[(c[e>>2]|0)+8>>2])<<5)|0;k=370;break};case 1:{j=(c[b+16>>2]|0)+(((1<<(d[b+7|0]|0))-1&c[e>>2])<<5)|0;k=370;break};case 2:{j=(c[b+16>>2]|0)+((((c[e>>2]|0)>>>0)%(((1<<(d[b+7|0]|0))-1|1)>>>0)|0)<<5)|0;k=370;break};case 0:{l=-1;break};case 3:{m=e|0;n=+h[m>>3];o=c[m>>2]|0;p=c[m+4>>2]|0;m=~~n;do{if(+(m|0)==n&(m|0)>0){if((m|0)>(c[b+28>>2]|0)){break}l=m-1|0;break L473}}while(0);if(n==0.0){j=c[b+16>>2]|0;k=370;break L473}else{j=(c[b+16>>2]|0)+((((p+o|0)>>>0)%(((1<<(d[b+7|0]|0))-1|1)>>>0)|0)<<5)|0;k=370;break L473}break};default:{j=(c[b+16>>2]|0)+((((c[e>>2]|0)>>>0)%(((1<<(d[b+7|0]|0))-1|1)>>>0)|0)<<5)|0;k=370}}}while(0);do{if((k|0)==370){m=e;q=j;L488:while(1){r=q+16|0;if((fr(r,e)|0)!=0){k=375;break}do{if((c[q+24>>2]|0)==11){if((c[g>>2]|0)<=3){break}if((c[r>>2]|0)==(c[m>>2]|0)){k=375;break L488}}}while(0);r=c[q+28>>2]|0;if((r|0)==0){k=377;break}else{q=r}}if((k|0)==375){l=(q-(c[b+16>>2]|0)>>5)+(c[b+28>>2]|0)|0;break}else if((k|0)==377){es(a,6216,(m=i,i=i+1|0,i=i+7>>3<<3,c[m>>2]=0,m)|0);i=m;l=0;break}}}while(0);a=c[b+28>>2]|0;j=b+12|0;m=l;while(1){s=m+1|0;if((s|0)>=(a|0)){break}if((c[(c[j>>2]|0)+(s<<4)+8>>2]|0)==0){m=s}else{k=381;break}}if((k|0)==381){h[e>>3]=+(m+2|0);c[g>>2]=3;m=c[j>>2]|0;j=m+(s<<4)|0;l=e+16|0;o=c[j+4>>2]|0;c[l>>2]=c[j>>2];c[l+4>>2]=o;c[e+24>>2]=c[m+(s<<4)+8>>2];t=1;i=f;return t|0}m=1<<(d[b+7|0]|0);o=b+16|0;b=s-a|0;while(1){if((b|0)>=(m|0)){t=0;k=389;break}u=c[o>>2]|0;if((c[u+(b<<5)+8>>2]|0)==0){b=b+1|0}else{break}}if((k|0)==389){i=f;return t|0}k=u+(b<<5)+16|0;m=e;a=c[k+4>>2]|0;c[m>>2]=c[k>>2];c[m+4>>2]=a;c[g>>2]=c[u+(b<<5)+24>>2];u=c[o>>2]|0;o=u+(b<<5)|0;g=e+16|0;a=c[o+4>>2]|0;c[g>>2]=c[o>>2];c[g+4>>2]=a;c[e+24>>2]=c[u+(b<<5)+8>>2];t=1;i=f;return t|0}function f1(a,b,e){a=a|0;b=b|0;e=e|0;var f=0;if((c[b+16>>2]|0)==1656){f=0}else{f=1<<(d[b+7|0]|0)}f2(a,b,e,f);return}function f2(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0.0,B=0,C=0,E=0.0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;j=i;i=i+16|0;l=j|0;m=e+28|0;n=c[m>>2]|0;o=e+7|0;p=d[o]|0;q=e+16|0;r=c[q>>2]|0;if((n|0)<(f|0)){if((f+1|0)>>>0<268435456){s=e+12|0;t=fu(b,c[s>>2]|0,n<<4,f<<4)|0;u=s}else{t=fv(b)|0;u=e+12|0}s=t;c[u>>2]=s;t=c[m>>2]|0;do{if((t|0)<(f|0)){c[s+(t<<4)+8>>2]=0;v=t+1|0;if((v|0)<(f|0)){w=v}else{break}do{c[(c[u>>2]|0)+(w<<4)+8>>2]=0;w=w+1|0;}while((w|0)<(f|0))}}while(0);c[m>>2]=f}f6(b,e,g);if((n|0)>(f|0)){c[m>>2]=f;g=e+12|0;w=l|0;u=l+8|0;t=f;while(1){s=c[g>>2]|0;v=s+(t<<4)+8|0;x=t+1|0;if((c[v>>2]|0)!=0){L536:do{if(t>>>0<(c[m>>2]|0)>>>0){y=s+(t<<4)|0;z=413}else{A=+(x|0);if((x|0)==0){B=c[q>>2]|0}else{h[k>>3]=A;B=(c[q>>2]|0)+(((((c[k+4>>2]|0)+(c[k>>2]|0)|0)>>>0)%(((1<<(d[o]|0))-1|1)>>>0)|0)<<5)|0}while(1){if((c[B+24>>2]|0)==3){if(+h[B+16>>3]==A){break}}C=c[B+28>>2]|0;if((C|0)==0){E=A;z=415;break L536}else{B=C}}y=B|0;z=413}}while(0);do{if((z|0)==413){z=0;if((y|0)!=1032){F=y;break}E=+(x|0);z=415}}while(0);if((z|0)==415){z=0;h[w>>3]=E;c[u>>2]=3;F=gb(b,e,l)|0}C=s+(t<<4)|0;G=F;H=c[C+4>>2]|0;c[G>>2]=c[C>>2];c[G+4>>2]=H;c[F+8>>2]=c[v>>2]}if((x|0)<(n|0)){t=x}else{break}}if((f+1|0)>>>0<268435456){t=e+12|0;I=fu(b,c[t>>2]|0,n<<4,f<<4)|0;J=t}else{I=fv(b)|0;J=e+12|0}c[J>>2]=I}I=1<<p;if((I|0)>0){p=e+6|0;J=I;do{J=J-1|0;t=r+(J<<5)+8|0;if((c[t>>2]|0)!=0){f=r+(J<<5)|0;n=r+(J<<5)+16|0;F=n;l=f8(e,F)|0;a[p]=0;if((l|0)==1032){u=c[r+(J<<5)+24>>2]|0;do{if((u|0)==3){E=+h[n>>3];if(E==E&!(D=0.0,D!=D)){break}es(b,10016,(K=i,i=i+1|0,i=i+7>>3<<3,c[K>>2]=0,K)|0);i=K}else if((u|0)==0){es(b,8512,(K=i,i=i+1|0,i=i+7>>3<<3,c[K>>2]=0,K)|0);i=K}}while(0);L=gb(b,e,F)|0}else{L=l}u=f;n=L;x=c[u+4>>2]|0;c[n>>2]=c[u>>2];c[n+4>>2]=x;c[L+8>>2]=c[t>>2]}}while((J|0)>0)}if((r|0)==1656){i=j;return}fu(b,r,I<<5,0)|0;i=j;return}function f3(a,b){a=a|0;b=b|0;var e=0,f=0,g=0.0,i=0,j=0;e=b-1|0;if(e>>>0<(c[a+28>>2]|0)>>>0){f=(c[a+12>>2]|0)+(e<<4)|0;return f|0}g=+(b|0);if((b|0)==0){i=c[a+16>>2]|0}else{h[k>>3]=g;i=(c[a+16>>2]|0)+(((((c[k+4>>2]|0)+(c[k>>2]|0)|0)>>>0)%(((1<<(d[a+7|0]|0))-1|1)>>>0)|0)<<5)|0}while(1){if((c[i+24>>2]|0)==3){if(+h[i+16>>3]==g){break}}a=c[i+28>>2]|0;if((a|0)==0){f=1032;j=449;break}else{i=a}}if((j|0)==449){return f|0}f=i|0;return f|0}function f4(a,b){a=a|0;b=b|0;var e=0,f=0,g=0;e=(c[a+16>>2]|0)+(((1<<(d[a+7|0]|0))-1&c[b+8>>2])<<5)|0;while(1){if((c[e+24>>2]|0)==4){if((c[e+16>>2]|0)==(b|0)){break}}a=c[e+28>>2]|0;if((a|0)==0){f=1032;g=458;break}else{e=a}}if((g|0)==458){return f|0}f=e|0;return f|0}function f5(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=fu(b,0,0,32)|0;g=f;e3(b,f,5);c[f+8>>2]=0;a[f+6|0]=-1;h=f+12|0;c[h>>2]=0;i=f+28|0;c[i>>2]=0;a[f+7|0]=0;c[f+16>>2]=1656;if((d+1|0)>>>0<268435456){j=fu(b,0,0,d<<4)|0}else{j=fv(b)|0}f=j;c[h>>2]=f;j=c[i>>2]|0;if((j|0)>=(d|0)){c[i>>2]=d;f6(b,g,e);return g|0}c[f+(j<<4)+8>>2]=0;f=j+1|0;if((f|0)<(d|0)){k=f}else{c[i>>2]=d;f6(b,g,e);return g|0}do{c[(c[h>>2]|0)+(k<<4)+8>>2]=0;k=k+1|0;}while((k|0)<(d|0));c[i>>2]=d;f6(b,g,e);return g|0}function f6(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=i;do{if((e|0)==0){c[d+16>>2]=1656;g=0;h=0;j=1656}else{k=(fq(e-1|0)|0)+1|0;if((k|0)>26){es(b,8040,(l=i,i=i+1|0,i=i+7>>3<<3,c[l>>2]=0,l)|0);i=l}l=1<<k;if((l+1|0)>>>0<134217728){m=fu(b,0,0,l<<5)|0}else{m=fv(b)|0}n=m;o=d+16|0;c[o>>2]=n;p=k&255;if((l|0)>0){q=0;r=n}else{g=l;h=p;j=n;break}while(1){c[r+(q<<5)+28>>2]=0;c[r+(q<<5)+24>>2]=0;c[r+(q<<5)+8>>2]=0;n=q+1|0;k=c[o>>2]|0;if((n|0)<(l|0)){q=n;r=k}else{g=l;h=p;j=k;break}}}}while(0);a[d+7|0]=h;c[d+20>>2]=j+(g<<5);i=f;return}function f7(a,b){a=a|0;b=b|0;var e=0,f=0;e=c[b+16>>2]|0;if((e|0)!=1656){f=e;e=32<<(d[b+7|0]|0);fu(a,f,e,0)|0}fu(a,c[b+12>>2]|0,c[b+28>>2]<<4,0)|0;fu(a,b,32,0)|0;return}function f8(a,b){a=a|0;b=b|0;var e=0,f=0,g=0.0,i=0,j=0.0,l=0,m=0,n=0,o=0;L640:do{switch(c[b+8>>2]|0){case 0:{e=1032;return e|0};case 1:{f=(c[a+16>>2]|0)+(((1<<(d[a+7|0]|0))-1&c[b>>2])<<5)|0;break};case 2:{f=(c[a+16>>2]|0)+((((c[b>>2]|0)>>>0)%(((1<<(d[a+7|0]|0))-1|1)>>>0)|0)<<5)|0;break};case 3:{g=+h[b>>3];i=~~g;j=+(i|0);if(j!=g){l=b|0;if(+h[l>>3]==0.0){f=c[a+16>>2]|0;break L640}else{f=(c[a+16>>2]|0)+(((((c[l+4>>2]|0)+(c[l>>2]|0)|0)>>>0)%(((1<<(d[a+7|0]|0))-1|1)>>>0)|0)<<5)|0;break L640}}l=i-1|0;if(l>>>0<(c[a+28>>2]|0)>>>0){e=(c[a+12>>2]|0)+(l<<4)|0;return e|0}if((i|0)==0){m=c[a+16>>2]|0}else{h[k>>3]=j;m=(c[a+16>>2]|0)+(((((c[k+4>>2]|0)+(c[k>>2]|0)|0)>>>0)%(((1<<(d[a+7|0]|0))-1|1)>>>0)|0)<<5)|0}while(1){if((c[m+24>>2]|0)==3){if(+h[m+16>>3]==j){break}}i=c[m+28>>2]|0;if((i|0)==0){e=1032;n=514;break}else{m=i}}if((n|0)==514){return e|0}e=m|0;return e|0};case 4:{i=c[b>>2]|0;l=(c[a+16>>2]|0)+(((1<<(d[a+7|0]|0))-1&c[i+8>>2])<<5)|0;while(1){if((c[l+24>>2]|0)==4){if((c[l+16>>2]|0)==(i|0)){break}}o=c[l+28>>2]|0;if((o|0)==0){e=1032;n=511;break}else{l=o}}if((n|0)==511){return e|0}e=l|0;return e|0};default:{f=(c[a+16>>2]|0)+((((c[b>>2]|0)>>>0)%(((1<<(d[a+7|0]|0))-1|1)>>>0)|0)<<5)|0}}}while(0);while(1){if((fr(f+16|0,b)|0)!=0){break}a=c[f+28>>2]|0;if((a|0)==0){e=1032;n=510;break}else{f=a}}if((n|0)==510){return e|0}e=f|0;return e|0}function f9(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0.0;f=i;g=f8(d,e)|0;a[d+6|0]=0;if((g|0)!=1032){j=g;i=f;return j|0}g=c[e+8>>2]|0;do{if((g|0)==0){es(b,8512,(k=i,i=i+1|0,i=i+7>>3<<3,c[k>>2]=0,k)|0);i=k}else if((g|0)==3){l=+h[e>>3];if(l==l&!(D=0.0,D!=D)){break}es(b,10016,(k=i,i=i+1|0,i=i+7>>3<<3,c[k>>2]=0,k)|0);i=k}}while(0);j=gb(b,d,e)|0;i=f;return j|0}function ga(a){a=a|0;var b=0,e=0,f=0,g=0,i=0,j=0,l=0,m=0,n=0,o=0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;b=c[a+28>>2]|0;do{if((b|0)!=0){e=c[a+12>>2]|0;if((c[e+(b-1<<4)+8>>2]|0)!=0){break}if(b>>>0>1){f=b;g=0}else{i=0;return i|0}while(1){j=(g+f|0)>>>1;l=(c[e+(j-1<<4)+8>>2]|0)==0;m=l?j:f;n=l?g:j;if((m-n|0)>>>0>1){f=m;g=n}else{i=n;break}}return i|0}}while(0);g=c[a+16>>2]|0;if((g|0)==1656){i=b;return i|0}f=a+12|0;e=a+7|0;a=b;n=b+1|0;while(1){m=n-1|0;L710:do{if(m>>>0<b>>>0){o=(c[f>>2]|0)+(m<<4)|0}else{p=+(n|0);if((n|0)==0){q=g}else{h[k>>3]=p;q=g+(((((c[k+4>>2]|0)+(c[k>>2]|0)|0)>>>0)%(((1<<(d[e]|0))-1|1)>>>0)|0)<<5)|0}while(1){if((c[q+24>>2]|0)==3){if(+h[q+16>>3]==p){break}}j=c[q+28>>2]|0;if((j|0)==0){o=1032;break L710}else{q=j}}o=q|0}}while(0);if((c[o+8>>2]|0)==0){break}m=n<<1;if(m>>>0>2147483645){r=1;s=542;break}else{a=n;n=m}}if((s|0)==542){while(1){s=0;o=r-1|0;L726:do{if(o>>>0<b>>>0){t=(c[f>>2]|0)+(o<<4)|0}else{p=+(r|0);if((r|0)==0){u=g}else{h[k>>3]=p;u=g+(((((c[k+4>>2]|0)+(c[k>>2]|0)|0)>>>0)%(((1<<(d[e]|0))-1|1)>>>0)|0)<<5)|0}while(1){if((c[u+24>>2]|0)==3){if(+h[u+16>>3]==p){break}}q=c[u+28>>2]|0;if((q|0)==0){t=1032;break L726}else{u=q}}t=u|0}}while(0);if((c[t+8>>2]|0)==0){i=o;break}else{r=r+1|0;s=542}}return i|0}if((n-a|0)>>>0>1){v=n;w=a}else{i=a;return i|0}while(1){a=(v+w|0)>>>1;n=a-1|0;L744:do{if(n>>>0<b>>>0){x=(c[f>>2]|0)+(n<<4)|0}else{p=+(a|0);if((a|0)==0){y=g}else{h[k>>3]=p;y=g+(((((c[k+4>>2]|0)+(c[k>>2]|0)|0)>>>0)%(((1<<(d[e]|0))-1|1)>>>0)|0)<<5)|0}while(1){if((c[y+24>>2]|0)==3){if(+h[y+16>>3]==p){break}}s=c[y+28>>2]|0;if((s|0)==0){x=1032;break L744}else{y=s}}x=y|0}}while(0);n=(c[x+8>>2]|0)==0;o=n?a:v;s=n?w:a;if((o-s|0)>>>0>1){v=o;w=s}else{i=s;break}}return i|0}function gb(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;g=i;i=i+112|0;j=g|0;k=j;l=f+8|0;m=c[l>>2]|0;do{if((m|0)==2){n=c[e+16>>2]|0;o=n+((((c[f>>2]|0)>>>0)%(((1<<(d[e+7|0]|0))-1|1)>>>0)|0)<<5)|0;p=n}else if((m|0)==1){n=c[e+16>>2]|0;o=n+(((1<<(d[e+7|0]|0))-1&c[f>>2])<<5)|0;p=n}else if((m|0)==3){n=f|0;if(+h[n>>3]==0.0){q=c[e+16>>2]|0;o=q;p=q;break}else{q=c[e+16>>2]|0;o=q+(((((c[n+4>>2]|0)+(c[n>>2]|0)|0)>>>0)%(((1<<(d[e+7|0]|0))-1|1)>>>0)|0)<<5)|0;p=q;break}}else if((m|0)==4){q=c[e+16>>2]|0;o=q+(((1<<(d[e+7|0]|0))-1&c[(c[f>>2]|0)+8>>2])<<5)|0;p=q}else{q=c[e+16>>2]|0;o=q+((((c[f>>2]|0)>>>0)%(((1<<(d[e+7|0]|0))-1|1)>>>0)|0)<<5)|0;p=q}}while(0);m=o+8|0;L768:do{if((c[m>>2]|0)!=0|(o|0)==1656){q=e+20|0;n=e+16|0;r=c[q>>2]|0;while(1){s=r-32|0;c[q>>2]=s;if(r>>>0<=p>>>0){break}if((c[r-32+24>>2]|0)==0){t=579;break}else{r=s}}do{if((t|0)==579){if((s|0)==0){break}q=o+16|0;u=c[o+24>>2]|0;do{if((u|0)==4){v=p+(((1<<(d[e+7|0]|0))-1&c[(c[q>>2]|0)+8>>2])<<5)|0}else if((u|0)==1){v=p+(((1<<(d[e+7|0]|0))-1&c[q>>2])<<5)|0}else if((u|0)==2){v=p+((((c[q>>2]|0)>>>0)%(((1<<(d[e+7|0]|0))-1|1)>>>0)|0)<<5)|0}else if((u|0)==3){w=q|0;if(+h[w>>3]==0.0){v=p;break}v=p+(((((c[w+4>>2]|0)+(c[w>>2]|0)|0)>>>0)%(((1<<(d[e+7|0]|0))-1|1)>>>0)|0)<<5)|0}else{v=p+((((c[q>>2]|0)>>>0)%(((1<<(d[e+7|0]|0))-1|1)>>>0)|0)<<5)|0}}while(0);if((v|0)==(o|0)){q=o+28|0;c[r-32+28>>2]=c[q>>2];c[q>>2]=s;x=s;break L768}else{y=v}do{z=y+28|0;y=c[z>>2]|0;}while((y|0)!=(o|0));c[z>>2]=s;q=s;u=o;c[q>>2]=c[u>>2];c[q+4>>2]=c[u+4>>2];c[q+8>>2]=c[u+8>>2];c[q+12>>2]=c[u+12>>2];c[q+16>>2]=c[u+16>>2];c[q+20>>2]=c[u+20>>2];c[q+24>>2]=c[u+24>>2];c[q+28>>2]=c[u+28>>2];c[o+28>>2]=0;c[m>>2]=0;x=o;break L768}}while(0);j2(k|0,0,108);r=e+12|0;u=c[e+28>>2]|0;q=0;w=1;A=0;B=1;while(1){if((w|0)>(u|0)){if((B|0)>(u|0)){C=A;break}else{E=u}}else{E=w}if((B|0)>(E|0)){F=B;G=0}else{H=c[r>>2]|0;I=B;J=0;while(1){K=((c[H+(I-1<<4)+8>>2]|0)!=0)+J|0;L=I+1|0;if((L|0)>(E|0)){F=L;G=K;break}else{I=L;J=K}}}J=j+(q<<2)|0;c[J>>2]=(c[J>>2]|0)+G;J=G+A|0;I=q+1|0;if((I|0)<27){q=I;w=w<<1;A=J;B=F}else{C=J;break}}B=0;A=1<<(d[e+7|0]|0);w=0;L801:while(1){q=A;while(1){M=q-1|0;if((q|0)==0){break L801}N=c[n>>2]|0;if((c[N+(M<<5)+8>>2]|0)==0){q=M}else{break}}do{if((c[N+(M<<5)+24>>2]|0)==3){O=+h[N+(M<<5)+16>>3];q=~~O;r=q-1|0;if(!(+(q|0)==O&r>>>0<67108864)){P=0;break}q=j+((fq(r)|0)+1<<2)|0;c[q>>2]=(c[q>>2]|0)+1;P=1}else{P=0}}while(0);B=B+1|0;A=M;w=P+w|0}A=w+C|0;do{if((c[l>>2]|0)==3){O=+h[f>>3];n=~~O;q=n-1|0;if(!(+(n|0)==O&q>>>0<67108864)){Q=0;break}n=j+((fq(q)|0)+1<<2)|0;c[n>>2]=(c[n>>2]|0)+1;Q=1}else{Q=0}}while(0);w=A+Q|0;L816:do{if((w|0)>0){n=0;q=1;r=0;u=0;J=0;I=0;while(1){H=c[j+(n<<2)>>2]|0;if((H|0)>0){K=H+r|0;H=(K|0)>(I|0);R=H?q:J;S=H?K:u;T=K}else{R=J;S=u;T=r}if((T|0)==(w|0)){U=R;V=S;break L816}K=q<<1;H=(K|0)/2|0;if((H|0)<(w|0)){n=n+1|0;q=K;r=T;u=S;J=R;I=H}else{U=R;V=S;break}}}else{U=0;V=0}}while(0);f2(b,e,U,C+1+B-V|0);w=f8(e,f)|0;a[e+6|0]=0;if((w|0)!=1032){W=w;i=g;return W|0}w=c[l>>2]|0;do{if((w|0)==0){es(b,8512,(X=i,i=i+1|0,i=i+7>>3<<3,c[X>>2]=0,X)|0);i=X}else if((w|0)==3){O=+h[f>>3];if(O==O&!(D=0.0,D!=D)){break}es(b,10016,(X=i,i=i+1|0,i=i+7>>3<<3,c[X>>2]=0,X)|0);i=X}}while(0);W=gb(b,e,f)|0;i=g;return W|0}else{x=o}}while(0);o=f;X=x+16|0;V=c[o+4>>2]|0;c[X>>2]=c[o>>2];c[X+4>>2]=V;c[x+24>>2]=c[l>>2];do{if((c[l>>2]|0)>3){if((a[(c[f>>2]|0)+5|0]&3)==0){break}if((a[e+5|0]&4)==0){break}e2(b,e)}}while(0);W=x|0;i=g;return W|0}function gc(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,j=0,l=0,m=0,n=0.0,o=0,p=0,q=0.0,r=0;f=i;i=i+16|0;g=f|0;j=e-1|0;L841:do{if(j>>>0<(c[b+28>>2]|0)>>>0){l=(c[b+12>>2]|0)+(j<<4)|0;m=638}else{n=+(e|0);if((e|0)==0){o=c[b+16>>2]|0}else{h[k>>3]=n;o=(c[b+16>>2]|0)+(((((c[k+4>>2]|0)+(c[k>>2]|0)|0)>>>0)%(((1<<(d[b+7|0]|0))-1|1)>>>0)|0)<<5)|0}while(1){if((c[o+24>>2]|0)==3){if(+h[o+16>>3]==n){break}}p=c[o+28>>2]|0;if((p|0)==0){q=n;break L841}else{o=p}}l=o|0;m=638}}while(0);do{if((m|0)==638){if((l|0)==1032){q=+(e|0);break}else{r=l;i=f;return r|0}}}while(0);h[g>>3]=q;c[g+8>>2]=3;r=gb(a,b,g)|0;i=f;return r|0}function gd(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+16|0;g=f|0;h=(c[b+16>>2]|0)+(((1<<(d[b+7|0]|0))-1&c[e+8>>2])<<5)|0;while(1){if((c[h+24>>2]|0)==4){if((c[h+16>>2]|0)==(e|0)){j=648;break}}k=c[h+28>>2]|0;if((k|0)==0){break}else{h=k}}do{if((j|0)==648){k=h|0;if((k|0)==1032){break}else{l=k}i=f;return l|0}}while(0);c[g>>2]=e;c[g+8>>2]=4;l=gb(a,b,g)|0;i=f;return l|0}function ge(b){b=b|0;var d=0,e=0,f=0,g=0;d=b+16|0;e=0;do{f=c[920+(e<<2)>>2]|0;g=f_(b,f,j_(f|0)|0)|0;c[(c[d>>2]|0)+188+(e<<2)>>2]=g;g=(c[(c[d>>2]|0)+188+(e<<2)>>2]|0)+5|0;a[g]=a[g]|32;e=e+1|0;}while((e|0)<17);return}function gf(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0;g=f4(b,f)|0;if((c[g+8>>2]|0)!=0){h=g;return h|0}g=b+6|0;a[g]=(d[g]|0|1<<e)&255;h=0;return h|0}function gg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=c[b+8>>2]|0;if((e|0)==5){f=c[(c[b>>2]|0)+8>>2]|0}else if((e|0)==7){f=c[(c[b>>2]|0)+8>>2]|0}else{f=c[(c[a+16>>2]|0)+152+(e<<2)>>2]|0}if((f|0)==0){g=1032;return g|0}g=f4(f,c[(c[a+16>>2]|0)+188+(d<<2)>>2]|0)|0;return g|0}function gh(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;g=i;i=i+48|0;h=g|0;j=g+16|0;k=g+32|0;l=a[f]|0;if((l<<24>>24|0)==64|(l<<24>>24|0)==61){m=f+1|0;c[k+12>>2]=m;n=m}else if((l<<24>>24|0)==27){c[k+12>>2]=9800;n=9800}else{c[k+12>>2]=f;n=f}f=k|0;c[f>>2]=b;c[k+4>>2]=d;c[k+8>>2]=e;e=h;l=j|0;c[h>>2]=1635077147;a[h+4|0]=81;a[e+5|0]=0;a[e+6|0]=1;a[e+7|0]=4;a[h+8|0]=4;a[e+9|0]=4;a[e+10|0]=8;a[e+11|0]=0;if((gw(d,l,12)|0)!=0){fy(b,2512,(o=i,i=i+16|0,c[o>>2]=n,c[o+8>>2]=3968,o)|0)|0;i=o;eC(c[f>>2]|0,3)}if((j5(e|0,l|0,12)|0)==0){p=f_(b,7888,2)|0;q=gi(k,p)|0;i=g;return q|0}fy(c[f>>2]|0,2512,(o=i,i=i+16|0,c[o>>2]=c[k+12>>2],c[o+8>>2]=2232,o)|0)|0;i=o;eC(c[f>>2]|0,3);p=f_(b,7888,2)|0;q=gi(k,p)|0;i=g;return q|0}function gi(d,e){d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0;f=i;i=i+168|0;g=f|0;j=f+8|0;k=f+16|0;l=f+24|0;m=f+32|0;n=f+40|0;o=f+48|0;p=f+56|0;q=f+64|0;r=f+72|0;s=f+80|0;t=f+88|0;u=f+96|0;v=f+104|0;w=f+112|0;x=f+120|0;y=f+128|0;z=f+136|0;A=f+144|0;B=f+152|0;C=f+160|0;D=d|0;E=(c[D>>2]|0)+52|0;F=(b[E>>1]|0)+1&65535;b[E>>1]=F;if((F&65535)>200){F=c[D>>2]|0;E=c[d+12>>2]|0;fy(F,2512,(G=i,i=i+16|0,c[G>>2]=E,c[G+8>>2]=6088,G)|0)|0;i=G;eC(c[D>>2]|0,3)}E=eV(c[D>>2]|0)|0;F=c[(c[D>>2]|0)+8>>2]|0;c[F>>2]=E;c[F+8>>2]=9;F=c[D>>2]|0;H=c[F+8>>2]|0;if(((c[F+28>>2]|0)-H|0)<17){eA(F,1);I=c[D>>2]|0;J=I;K=c[I+8>>2]|0}else{J=F;K=H}c[J+8>>2]=K+16;K=d+4|0;if((gw(c[K>>2]|0,C,4)|0)!=0){J=c[D>>2]|0;H=c[d+12>>2]|0;fy(J,2512,(G=i,i=i+16|0,c[G>>2]=H,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}H=c[C>>2]|0;if((H|0)==0){L=0}else{J=gx(c[D>>2]|0,c[d+8>>2]|0,H)|0;if((gw(c[K>>2]|0,J,c[C>>2]|0)|0)!=0){H=c[D>>2]|0;F=c[d+12>>2]|0;fy(H,2512,(G=i,i=i+16|0,c[G>>2]=F,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}L=f_(c[D>>2]|0,J,(c[C>>2]|0)-1|0)|0}C=E+32|0;c[C>>2]=(L|0)==0?e:L;if((gw(c[K>>2]|0,B,4)|0)!=0){L=c[D>>2]|0;e=c[d+12>>2]|0;fy(L,2512,(G=i,i=i+16|0,c[G>>2]=e,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}e=c[B>>2]|0;if((e|0)<0){L=c[D>>2]|0;J=c[d+12>>2]|0;fy(L,2512,(G=i,i=i+16|0,c[G>>2]=J,c[G+8>>2]=2872,G)|0)|0;i=G;eC(c[D>>2]|0,3);M=c[B>>2]|0}else{M=e}c[E+60>>2]=M;if((gw(c[K>>2]|0,A,4)|0)!=0){M=c[D>>2]|0;e=c[d+12>>2]|0;fy(M,2512,(G=i,i=i+16|0,c[G>>2]=e,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}e=c[A>>2]|0;if((e|0)<0){M=c[D>>2]|0;B=c[d+12>>2]|0;fy(M,2512,(G=i,i=i+16|0,c[G>>2]=B,c[G+8>>2]=2872,G)|0)|0;i=G;eC(c[D>>2]|0,3);N=c[A>>2]|0}else{N=e}c[E+64>>2]=N;if((gw(c[K>>2]|0,z,1)|0)!=0){N=c[D>>2]|0;e=c[d+12>>2]|0;fy(N,2512,(G=i,i=i+16|0,c[G>>2]=e,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}a[E+72|0]=a[z]|0;if((gw(c[K>>2]|0,y,1)|0)!=0){z=c[D>>2]|0;e=c[d+12>>2]|0;fy(z,2512,(G=i,i=i+16|0,c[G>>2]=e,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}a[E+73|0]=a[y]|0;if((gw(c[K>>2]|0,x,1)|0)!=0){y=c[D>>2]|0;e=c[d+12>>2]|0;fy(y,2512,(G=i,i=i+16|0,c[G>>2]=e,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}a[E+74|0]=a[x]|0;if((gw(c[K>>2]|0,w,1)|0)!=0){x=c[D>>2]|0;e=c[d+12>>2]|0;fy(x,2512,(G=i,i=i+16|0,c[G>>2]=e,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}a[E+75|0]=a[w]|0;if((gw(c[K>>2]|0,v,4)|0)!=0){w=c[D>>2]|0;e=c[d+12>>2]|0;fy(w,2512,(G=i,i=i+16|0,c[G>>2]=e,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}e=c[v>>2]|0;if((e|0)<0){w=c[D>>2]|0;x=c[d+12>>2]|0;fy(w,2512,(G=i,i=i+16|0,c[G>>2]=x,c[G+8>>2]=2872,G)|0)|0;i=G;eC(c[D>>2]|0,3);O=c[v>>2]|0}else{O=e}e=c[D>>2]|0;if((O+1|0)>>>0<1073741824){v=O<<2;P=fu(e,0,0,v)|0;Q=v}else{P=fv(e)|0;Q=O<<2}c[E+12>>2]=P;c[E+44>>2]=O;if((gw(c[K>>2]|0,P,Q)|0)!=0){Q=c[D>>2]|0;P=c[d+12>>2]|0;fy(Q,2512,(G=i,i=i+16|0,c[G>>2]=P,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}if((gw(c[K>>2]|0,n,4)|0)!=0){P=c[D>>2]|0;Q=c[d+12>>2]|0;fy(P,2512,(G=i,i=i+16|0,c[G>>2]=Q,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}Q=c[n>>2]|0;if((Q|0)<0){P=c[D>>2]|0;O=c[d+12>>2]|0;fy(P,2512,(G=i,i=i+16|0,c[G>>2]=O,c[G+8>>2]=2872,G)|0)|0;i=G;eC(c[D>>2]|0,3);R=c[n>>2]|0}else{R=Q}Q=c[D>>2]|0;if((R+1|0)>>>0<268435456){S=fu(Q,0,0,R<<4)|0}else{S=fv(Q)|0}Q=S;S=E+8|0;c[S>>2]=Q;c[E+40>>2]=R;n=(R|0)>0;do{if(n){O=0;P=Q;while(1){c[P+(O<<4)+8>>2]=0;e=O+1|0;if((e|0)>=(R|0)){break}O=e;P=c[S>>2]|0}if(!n){break}P=d+12|0;O=k;e=j;v=d+8|0;x=0;do{w=c[S>>2]|0;y=w+(x<<4)|0;if((gw(c[K>>2]|0,m,1)|0)!=0){z=c[D>>2]|0;N=c[P>>2]|0;fy(z,2512,(G=i,i=i+16|0,c[G>>2]=N,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}N=a[m]|0;if((N|0)==0){c[w+(x<<4)+8>>2]=0}else if((N|0)==1){if((gw(c[K>>2]|0,l,1)|0)!=0){z=c[D>>2]|0;A=c[P>>2]|0;fy(z,2512,(G=i,i=i+16|0,c[G>>2]=A,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}c[y>>2]=(a[l]|0)!=0;c[w+(x<<4)+8>>2]=1}else if((N|0)==3){if((gw(c[K>>2]|0,O,8)|0)!=0){A=c[D>>2]|0;z=c[P>>2]|0;fy(A,2512,(G=i,i=i+16|0,c[G>>2]=z,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}h[y>>3]=+h[k>>3];c[w+(x<<4)+8>>2]=3}else if((N|0)==4){if((gw(c[K>>2]|0,e,4)|0)!=0){N=c[D>>2]|0;z=c[P>>2]|0;fy(N,2512,(G=i,i=i+16|0,c[G>>2]=z,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}z=c[j>>2]|0;if((z|0)==0){T=0}else{N=gx(c[D>>2]|0,c[v>>2]|0,z)|0;if((gw(c[K>>2]|0,N,c[j>>2]|0)|0)!=0){z=c[D>>2]|0;A=c[P>>2]|0;fy(z,2512,(G=i,i=i+16|0,c[G>>2]=A,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}T=f_(c[D>>2]|0,N,(c[j>>2]|0)-1|0)|0}c[y>>2]=T;c[w+(x<<4)+8>>2]=4}else{fy(c[D>>2]|0,2512,(G=i,i=i+16|0,c[G>>2]=c[P>>2],c[G+8>>2]=3416,G)|0)|0;i=G;eC(c[D>>2]|0,3)}x=x+1|0;}while((x|0)<(R|0))}}while(0);if((gw(c[K>>2]|0,g,4)|0)!=0){R=c[D>>2]|0;T=c[d+12>>2]|0;fy(R,2512,(G=i,i=i+16|0,c[G>>2]=T,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}T=c[g>>2]|0;if((T|0)<0){R=c[D>>2]|0;j=c[d+12>>2]|0;fy(R,2512,(G=i,i=i+16|0,c[G>>2]=j,c[G+8>>2]=2872,G)|0)|0;i=G;eC(c[D>>2]|0,3);U=c[g>>2]|0}else{U=T}T=c[D>>2]|0;if((U+1|0)>>>0<1073741824){V=fu(T,0,0,U<<2)|0}else{V=fv(T)|0}T=V;V=E+16|0;c[V>>2]=T;c[E+52>>2]=U;g=(U|0)>0;do{if(g){j=0;R=T;while(1){c[R+(j<<2)>>2]=0;k=j+1|0;if((k|0)>=(U|0)){break}j=k;R=c[V>>2]|0}if(g){W=0}else{break}do{R=gi(d,c[C>>2]|0)|0;c[(c[V>>2]|0)+(W<<2)>>2]=R;W=W+1|0;}while((W|0)<(U|0))}}while(0);if((gw(c[K>>2]|0,u,4)|0)!=0){U=c[D>>2]|0;W=c[d+12>>2]|0;fy(U,2512,(G=i,i=i+16|0,c[G>>2]=W,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}W=c[u>>2]|0;if((W|0)<0){U=c[D>>2]|0;V=c[d+12>>2]|0;fy(U,2512,(G=i,i=i+16|0,c[G>>2]=V,c[G+8>>2]=2872,G)|0)|0;i=G;eC(c[D>>2]|0,3);X=c[u>>2]|0}else{X=W}W=c[D>>2]|0;if((X+1|0)>>>0<1073741824){u=X<<2;Y=fu(W,0,0,u)|0;Z=u}else{Y=fv(W)|0;Z=X<<2}c[E+20>>2]=Y;c[E+48>>2]=X;if((gw(c[K>>2]|0,Y,Z)|0)!=0){Z=c[D>>2]|0;Y=c[d+12>>2]|0;fy(Z,2512,(G=i,i=i+16|0,c[G>>2]=Y,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}if((gw(c[K>>2]|0,t,4)|0)!=0){Y=c[D>>2]|0;Z=c[d+12>>2]|0;fy(Y,2512,(G=i,i=i+16|0,c[G>>2]=Z,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}Z=c[t>>2]|0;if((Z|0)<0){Y=c[D>>2]|0;X=c[d+12>>2]|0;fy(Y,2512,(G=i,i=i+16|0,c[G>>2]=X,c[G+8>>2]=2872,G)|0)|0;i=G;eC(c[D>>2]|0,3);_=c[t>>2]|0}else{_=Z}Z=c[D>>2]|0;if((_+1|0)>>>0<357913942){$=fu(Z,0,0,_*12|0)|0}else{$=fv(Z)|0}Z=E+24|0;c[Z>>2]=$;c[E+56>>2]=_;if((_|0)>0){c[$>>2]=0;if((_|0)>1){$=1;do{c[(c[Z>>2]|0)+($*12|0)>>2]=0;$=$+1|0;}while(($|0)<(_|0))}$=s;t=r;X=d+12|0;Y=q;W=d+8|0;u=0;do{if((gw(c[K>>2]|0,$,4)|0)!=0){V=c[D>>2]|0;U=c[X>>2]|0;fy(V,2512,(G=i,i=i+16|0,c[G>>2]=U,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}U=c[s>>2]|0;if((U|0)==0){aa=0}else{V=gx(c[D>>2]|0,c[W>>2]|0,U)|0;if((gw(c[K>>2]|0,V,c[s>>2]|0)|0)!=0){U=c[D>>2]|0;C=c[X>>2]|0;fy(U,2512,(G=i,i=i+16|0,c[G>>2]=C,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}aa=f_(c[D>>2]|0,V,(c[s>>2]|0)-1|0)|0}c[(c[Z>>2]|0)+(u*12|0)>>2]=aa;if((gw(c[K>>2]|0,t,4)|0)!=0){V=c[D>>2]|0;C=c[X>>2]|0;fy(V,2512,(G=i,i=i+16|0,c[G>>2]=C,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}C=c[r>>2]|0;if((C|0)<0){V=c[D>>2]|0;U=c[X>>2]|0;fy(V,2512,(G=i,i=i+16|0,c[G>>2]=U,c[G+8>>2]=2872,G)|0)|0;i=G;eC(c[D>>2]|0,3);ab=c[r>>2]|0}else{ab=C}c[(c[Z>>2]|0)+(u*12|0)+4>>2]=ab;if((gw(c[K>>2]|0,Y,4)|0)!=0){C=c[D>>2]|0;U=c[X>>2]|0;fy(C,2512,(G=i,i=i+16|0,c[G>>2]=U,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}U=c[q>>2]|0;if((U|0)<0){C=c[D>>2]|0;V=c[X>>2]|0;fy(C,2512,(G=i,i=i+16|0,c[G>>2]=V,c[G+8>>2]=2872,G)|0)|0;i=G;eC(c[D>>2]|0,3);ac=c[q>>2]|0}else{ac=U}c[(c[Z>>2]|0)+(u*12|0)+8>>2]=ac;u=u+1|0;}while((u|0)<(_|0))}if((gw(c[K>>2]|0,p,4)|0)!=0){_=c[D>>2]|0;u=c[d+12>>2]|0;fy(_,2512,(G=i,i=i+16|0,c[G>>2]=u,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}u=c[p>>2]|0;if((u|0)<0){_=c[D>>2]|0;ac=c[d+12>>2]|0;fy(_,2512,(G=i,i=i+16|0,c[G>>2]=ac,c[G+8>>2]=2872,G)|0)|0;i=G;eC(c[D>>2]|0,3);ad=c[p>>2]|0}else{ad=u}u=c[D>>2]|0;if((ad+1|0)>>>0<1073741824){ae=fu(u,0,0,ad<<2)|0}else{ae=fv(u)|0}u=ae;ae=E+28|0;c[ae>>2]=u;c[E+36>>2]=ad;if((ad|0)>0){c[u>>2]=0;if((ad|0)>1){u=1;do{c[(c[ae>>2]|0)+(u<<2)>>2]=0;u=u+1|0;}while((u|0)<(ad|0))}u=o;p=d+8|0;ac=d+12|0;_=0;do{if((gw(c[K>>2]|0,u,4)|0)!=0){Z=c[D>>2]|0;q=c[ac>>2]|0;fy(Z,2512,(G=i,i=i+16|0,c[G>>2]=q,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}q=c[o>>2]|0;if((q|0)==0){af=0}else{Z=gx(c[D>>2]|0,c[p>>2]|0,q)|0;if((gw(c[K>>2]|0,Z,c[o>>2]|0)|0)!=0){q=c[D>>2]|0;X=c[ac>>2]|0;fy(q,2512,(G=i,i=i+16|0,c[G>>2]=X,c[G+8>>2]=3968,G)|0)|0;i=G;eC(c[D>>2]|0,3)}af=f_(c[D>>2]|0,Z,(c[o>>2]|0)-1|0)|0}c[(c[ae>>2]|0)+(_<<2)>>2]=af;_=_+1|0;}while((_|0)<(ad|0))}if((eo(E)|0)!=0){ag=c[D>>2]|0;ah=ag+8|0;ai=c[ah>>2]|0;aj=ai-16|0;c[ah>>2]=aj;ak=c[D>>2]|0;al=ak+52|0;am=b[al>>1]|0;an=am-1&65535;b[al>>1]=an;i=f;return E|0}fy(c[D>>2]|0,2512,(G=i,i=i+16|0,c[G>>2]=c[d+12>>2],c[G+8>>2]=4736,G)|0)|0;i=G;eC(c[D>>2]|0,3);ag=c[D>>2]|0;ah=ag+8|0;ai=c[ah>>2]|0;aj=ai-16|0;c[ah>>2]=aj;ak=c[D>>2]|0;al=ak+52|0;am=b[al>>1]|0;an=am-1&65535;b[al>>1]=an;i=f;return E|0}function gj(b){b=b|0;var c=0;c=b;w=1635077147;a[c]=w&255;w=w>>8;a[c+1|0]=w&255;w=w>>8;a[c+2|0]=w&255;w=w>>8;a[c+3|0]=w&255;a[b+4|0]=81;a[b+5|0]=0;a[b+6|0]=1;a[b+7|0]=4;a[b+8|0]=4;a[b+9|0]=4;a[b+10|0]=8;a[b+11|0]=0;return}function gk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0;d=i;i=i+8|0;e=d|0;f=c[a+8>>2]|0;do{if((f|0)==3){g=a}else if((f|0)==4){if((fw((c[a>>2]|0)+16|0,e)|0)==0){j=821;break}h[b>>3]=+h[e>>3];c[b+8>>2]=3;g=b}else{j=821}}while(0);if((j|0)==821){g=0}i=d;return g|0}function gl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0;d=i;i=i+32|0;e=b+8|0;if((c[e>>2]|0)!=3){f=0;i=d;return f|0}g=d|0;a$(g|0,6992,(j=i,i=i+8|0,h[j>>3]=+h[b>>3],j)|0)|0;i=j;c[b>>2]=f_(a,g,j_(g|0)|0)|0;c[e>>2]=4;f=1;i=d;return f|0}function gm(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;g=i;h=b+16|0;j=d;d=0;L1117:while(1){if((d|0)>=100){k=842;break}l=j+8|0;do{if((c[l>>2]|0)==5){m=c[j>>2]|0;n=f8(m,e)|0;o=n+8|0;if((c[o>>2]|0)!=0){k=835;break L1117}p=c[m+8>>2]|0;m=p;if((p|0)==0){k=835;break L1117}if((a[m+6|0]&1)!=0){k=835;break L1117}p=gf(m,0,c[(c[h>>2]|0)+188>>2]|0)|0;if((p|0)==0){k=835;break L1117}else{q=p}}else{p=gg(b,j,0)|0;if((c[p+8>>2]|0)!=0){q=p;break}eq(b,j,9752);q=p}}while(0);r=q+8|0;if((c[r>>2]|0)==6){k=839;break}else{j=q;d=d+1|0}}if((k|0)==839){d=b+32|0;h=f-(c[d>>2]|0)|0;p=b+8|0;m=c[p>>2]|0;s=q;q=m;t=c[s+4>>2]|0;c[q>>2]=c[s>>2];c[q+4>>2]=t;c[m+8>>2]=c[r>>2];r=c[p>>2]|0;m=j;j=r+16|0;t=c[m+4>>2]|0;c[j>>2]=c[m>>2];c[j+4>>2]=t;c[r+24>>2]=c[l>>2];l=c[p>>2]|0;r=e;t=l+32|0;j=c[r+4>>2]|0;c[t>>2]=c[r>>2];c[t+4>>2]=j;c[l+40>>2]=c[e+8>>2];e=c[p>>2]|0;if(((c[b+28>>2]|0)-e|0)<49){eA(b,3);u=c[p>>2]|0}else{u=e}c[p>>2]=u+48;eG(b,u,1);u=c[d>>2]|0;d=c[p>>2]|0;e=d-16|0;c[p>>2]=e;p=e;e=u+h|0;l=c[p+4>>2]|0;c[e>>2]=c[p>>2];c[e+4>>2]=l;c[u+(h+8)>>2]=c[d-16+8>>2];i=g;return}else if((k|0)==842){es(b,7816,(b=i,i=i+1|0,i=i+7>>3<<3,c[b>>2]=0,b)|0);i=b;i=g;return}else if((k|0)==835){k=n;n=f;b=c[k+4>>2]|0;c[n>>2]=c[k>>2];c[n+4>>2]=b;c[f+8>>2]=c[o>>2];i=g;return}}function gn(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;g=i;i=i+16|0;h=g|0;j=b+16|0;k=h;l=h+8|0;m=0;n=d;o=c[d+8>>2]|0;L1139:while(1){p=n+8|0;do{if((o|0)==5){q=c[n>>2]|0;r=q;s=f9(b,r,e)|0;t=s+8|0;if((c[t>>2]|0)!=0){u=853;break L1139}d=c[q+8>>2]|0;v=d;if((d|0)==0){u=853;break L1139}if((a[v+6|0]&2)!=0){u=853;break L1139}d=gf(v,1,c[(c[j>>2]|0)+192>>2]|0)|0;if((d|0)==0){u=853;break L1139}else{w=d}}else{d=gg(b,n,1)|0;if((c[d+8>>2]|0)!=0){w=d;break}eq(b,n,9752);w=d}}while(0);x=w+8|0;if((c[x>>2]|0)==6){u=860;break}d=w;v=c[d+4>>2]|0;c[k>>2]=c[d>>2];c[k+4>>2]=v;v=c[x>>2]|0;c[l>>2]=v;d=m+1|0;if((d|0)<100){m=d;n=h;o=v}else{u=864;break}}if((u|0)==853){o=f;h=s;s=c[o+4>>2]|0;c[h>>2]=c[o>>2];c[h+4>>2]=s;s=f+8|0;c[t>>2]=c[s>>2];a[q+6|0]=0;if((c[s>>2]|0)<=3){i=g;return}if((a[(c[f>>2]|0)+5|0]&3)==0){i=g;return}if((a[q+5|0]&4)==0){i=g;return}e2(b,r);i=g;return}else if((u|0)==860){r=b+8|0;q=c[r>>2]|0;s=w;w=q;t=c[s+4>>2]|0;c[w>>2]=c[s>>2];c[w+4>>2]=t;c[q+8>>2]=c[x>>2];x=c[r>>2]|0;q=n;n=x+16|0;t=c[q+4>>2]|0;c[n>>2]=c[q>>2];c[n+4>>2]=t;c[x+24>>2]=c[p>>2];p=c[r>>2]|0;x=e;t=p+32|0;n=c[x+4>>2]|0;c[t>>2]=c[x>>2];c[t+4>>2]=n;c[p+40>>2]=c[e+8>>2];e=c[r>>2]|0;p=f;n=e+48|0;t=c[p+4>>2]|0;c[n>>2]=c[p>>2];c[n+4>>2]=t;c[e+56>>2]=c[f+8>>2];f=c[r>>2]|0;if(((c[b+28>>2]|0)-f|0)<65){eA(b,4);y=c[r>>2]|0}else{y=f}c[r>>2]=y+64;eG(b,y,0);i=g;return}else if((u|0)==864){es(b,5976,(b=i,i=i+1|0,i=i+7>>3<<3,c[b>>2]=0,b)|0);i=b;i=g;return}}function go(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=b+8|0;f=c[e>>2]|0;g=d+8|0;if((f|0)!=(c[g>>2]|0)){i=ev(a,b,d)|0;return i|0}if((f|0)==4){j=c[b>>2]|0;k=c[d>>2]|0;l=j+16|0;m=k+16|0;n=aL(l|0,m|0)|0;L1192:do{if((n|0)==0){o=l;p=c[j+12>>2]|0;q=m;r=c[k+12>>2]|0;while(1){s=j_(o|0)|0;t=(s|0)==(p|0);if((s|0)==(r|0)){break}if(t){u=-1;break L1192}v=s+1|0;s=o+v|0;w=q+v|0;x=aL(s|0,w|0)|0;if((x|0)==0){o=s;p=p-v|0;q=w;r=r-v|0}else{u=x;break L1192}}u=t&1^1}else{u=n}}while(0);i=u>>>31;return i|0}else if((f|0)==3){i=+h[b>>3]<+h[d>>3]|0;return i|0}else{f=gg(a,b,13)|0;u=f+8|0;do{if((c[u>>2]|0)!=0){if((fr(f,gg(a,d,13)|0)|0)==0){break}n=a+8|0;t=c[n>>2]|0;k=a+32|0;m=t-(c[k>>2]|0)|0;j=f;l=t;r=c[j+4>>2]|0;c[l>>2]=c[j>>2];c[l+4>>2]=r;c[t+8>>2]=c[u>>2];t=c[n>>2]|0;r=b;l=t+16|0;j=c[r+4>>2]|0;c[l>>2]=c[r>>2];c[l+4>>2]=j;c[t+24>>2]=c[e>>2];t=c[n>>2]|0;j=d;l=t+32|0;r=c[j+4>>2]|0;c[l>>2]=c[j>>2];c[l+4>>2]=r;c[t+40>>2]=c[g>>2];t=c[n>>2]|0;if(((c[a+28>>2]|0)-t|0)<49){eA(a,3);y=c[n>>2]|0}else{y=t}c[n>>2]=y+48;eG(a,y,1);t=c[k>>2]|0;k=c[n>>2]|0;r=k-16|0;c[n>>2]=r;l=r;r=t+m|0;j=c[l+4>>2]|0;c[r>>2]=c[l>>2];c[r+4>>2]=j;c[t+(m+8)>>2]=c[k-16+8>>2];k=c[n>>2]|0;n=c[k+8>>2]|0;if((n|0)==0){i=0;return i|0}if((n|0)!=1){i=1;return i|0}i=(c[k>>2]|0)!=0|0;return i|0}}while(0);i=ev(a,b,d)|0;return i|0}return 0}function gp(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=d+8|0;L1204:do{switch(c[f>>2]|0){case 0:{g=1;return g|0};case 3:{g=+h[d>>3]==+h[e>>3]|0;return g|0};case 1:{g=(c[d>>2]|0)==(c[e>>2]|0)|0;return g|0};case 7:{i=c[d>>2]|0;j=c[e>>2]|0;if((i|0)==(j|0)){g=1;return g|0}k=c[i+8>>2]|0;i=k;l=c[j+8>>2]|0;j=l;if((k|0)==0){g=0;return g|0}if((a[i+6|0]&16)!=0){g=0;return g|0}m=b+16|0;n=gf(i,4,c[(c[m>>2]|0)+204>>2]|0)|0;if((n|0)==0){g=0;return g|0}if((k|0)==(l|0)){o=n;break L1204}if((l|0)==0){g=0;return g|0}if((a[j+6|0]&16)!=0){g=0;return g|0}l=gf(j,4,c[(c[m>>2]|0)+204>>2]|0)|0;if((l|0)==0){g=0;return g|0}else{p=(fr(n,l)|0)==0?0:n;q=922;break L1204}break};case 2:{g=(c[d>>2]|0)==(c[e>>2]|0)|0;return g|0};case 5:{n=c[d>>2]|0;l=c[e>>2]|0;if((n|0)==(l|0)){g=1;return g|0}m=c[n+8>>2]|0;n=m;j=c[l+8>>2]|0;l=j;if((m|0)==0){g=0;return g|0}if((a[n+6|0]&16)!=0){g=0;return g|0}k=b+16|0;i=gf(n,4,c[(c[k>>2]|0)+204>>2]|0)|0;if((i|0)==0){g=0;return g|0}if((m|0)==(j|0)){o=i;break L1204}if((j|0)==0){g=0;return g|0}if((a[l+6|0]&16)!=0){g=0;return g|0}j=gf(l,4,c[(c[k>>2]|0)+204>>2]|0)|0;if((j|0)==0){g=0;return g|0}else{p=(fr(i,j)|0)==0?0:i;q=922;break L1204}break};default:{g=(c[d>>2]|0)==(c[e>>2]|0)|0;return g|0}}}while(0);do{if((q|0)==922){if((p|0)==0){g=0}else{o=p;break}return g|0}}while(0);p=b+8|0;q=c[p>>2]|0;i=b+32|0;j=q-(c[i>>2]|0)|0;k=o;l=q;m=c[k+4>>2]|0;c[l>>2]=c[k>>2];c[l+4>>2]=m;c[q+8>>2]=c[o+8>>2];o=c[p>>2]|0;q=d;d=o+16|0;m=c[q+4>>2]|0;c[d>>2]=c[q>>2];c[d+4>>2]=m;c[o+24>>2]=c[f>>2];f=c[p>>2]|0;o=e;m=f+32|0;d=c[o+4>>2]|0;c[m>>2]=c[o>>2];c[m+4>>2]=d;c[f+40>>2]=c[e+8>>2];e=c[p>>2]|0;if(((c[b+28>>2]|0)-e|0)<49){eA(b,3);r=c[p>>2]|0}else{r=e}c[p>>2]=r+48;eG(b,r,1);r=c[i>>2]|0;i=c[p>>2]|0;b=i-16|0;c[p>>2]=b;e=b;b=r+j|0;f=c[e+4>>2]|0;c[b>>2]=c[e>>2];c[b+4>>2]=f;c[r+(j+8)>>2]=c[i-16+8>>2];i=c[p>>2]|0;p=c[i+8>>2]|0;if((p|0)==0){g=0;return g|0}if((p|0)!=1){g=1;return g|0}g=(c[i>>2]|0)!=0|0;return g|0}function gq(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;e=i;i=i+32|0;f=a+12|0;g=e|0;j=a+16|0;k=a+32|0;l=a+8|0;m=a+28|0;n=b;b=d;while(1){d=c[f>>2]|0;o=b+1|0;p=b-1|0;q=d+(p<<4)|0;r=d+(p<<4)+8|0;p=d+(b<<4)|0;do{if(((c[r>>2]|0)-3|0)>>>0<2){s=d+(b<<4)+8|0;t=c[s>>2]|0;if((t|0)==4){u=p}else{if((t|0)!=3){v=958;break}w=+h[p>>3];a$(g|0,6992,(x=i,i=i+8|0,h[x>>3]=w,x)|0)|0;i=x;t=p;c[t>>2]=f_(a,g,j_(g|0)|0)|0;c[s>>2]=4;u=t}t=c[(c[u>>2]|0)+12>>2]|0;if((t|0)==0){s=c[r>>2]|0;if((s|0)==4){y=2;break}if((s|0)!=3){y=2;break}w=+h[q>>3];a$(g|0,6992,(x=i,i=i+8|0,h[x>>3]=w,x)|0)|0;i=x;c[q>>2]=f_(a,g,j_(g|0)|0)|0;c[r>>2]=4;y=2;break}L1289:do{if((n|0)>1){s=t;z=1;while(1){A=o-z-1|0;B=d+(A<<4)|0;C=d+(A<<4)+8|0;A=c[C>>2]|0;if((A|0)==4){D=B}else{if((A|0)!=3){E=s;F=z;break L1289}w=+h[B>>3];a$(g|0,6992,(x=i,i=i+8|0,h[x>>3]=w,x)|0)|0;i=x;A=B;c[A>>2]=f_(a,g,j_(g|0)|0)|0;c[C>>2]=4;D=A}A=c[(c[D>>2]|0)+12>>2]|0;if(A>>>0>=(-3-s|0)>>>0){es(a,4688,(x=i,i=i+1|0,i=i+7>>3<<3,c[x>>2]=0,x)|0);i=x}C=A+s|0;A=z+1|0;if((A|0)<(n|0)){s=C;z=A}else{E=C;F=A;break}}}else{E=t;F=1}}while(0);t=gx(a,(c[j>>2]|0)+52|0,E)|0;if((F|0)>0){z=0;s=F;while(1){A=c[d+(o-s<<4)>>2]|0;C=c[A+12>>2]|0;B=t+z|0;G=A+16|0;j$(B|0,G|0,C)|0;G=C+z|0;C=s-1|0;if((C|0)>0){z=G;s=C}else{H=G;break}}}else{H=0}s=o-F|0;c[d+(s<<4)>>2]=f_(a,t,H)|0;c[d+(s<<4)+8>>2]=4;y=F}else{v=958}}while(0);L1305:do{if((v|0)==958){v=0;o=gg(a,q,15)|0;do{if((c[o+8>>2]|0)==0){s=gg(a,p,15)|0;if((c[s+8>>2]|0)!=0){I=s;break}et(a,q,p);y=2;break L1305}else{I=o}}while(0);o=q-(c[k>>2]|0)|0;t=c[l>>2]|0;s=I;z=t;G=c[s+4>>2]|0;c[z>>2]=c[s>>2];c[z+4>>2]=G;c[t+8>>2]=c[I+8>>2];t=c[l>>2]|0;G=q;z=t+16|0;s=c[G+4>>2]|0;c[z>>2]=c[G>>2];c[z+4>>2]=s;c[t+24>>2]=c[r>>2];t=c[l>>2]|0;s=p;z=t+32|0;G=c[s+4>>2]|0;c[z>>2]=c[s>>2];c[z+4>>2]=G;c[t+40>>2]=c[d+(b<<4)+8>>2];t=c[l>>2]|0;if(((c[m>>2]|0)-t|0)<49){eA(a,3);J=c[l>>2]|0}else{J=t}c[l>>2]=J+48;eG(a,J,1);t=c[k>>2]|0;G=c[l>>2]|0;z=G-16|0;c[l>>2]=z;s=z;z=t+o|0;C=c[s+4>>2]|0;c[z>>2]=c[s>>2];c[z+4>>2]=C;c[t+(o+8)>>2]=c[G-16+8>>2];y=2}}while(0);d=y-1|0;p=n-d|0;if((p|0)<=1){break}n=p;b=b-d|0}i=e;return}function gr(b,e){b=b|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0,Q=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0,aJ=0,aK=0,aM=0,aN=0,aO=0,aP=0,aQ=0,aR=0,aS=0,aT=0,aU=0,aV=0.0,aW=0,aX=0,aY=0,aZ=0,a_=0,a$=0.0,a0=0,a1=0,a2=0,a3=0,a4=0,a5=0.0,a6=0,a7=0,a8=0,a9=0,ba=0,bb=0.0,bc=0,bd=0,be=0,bf=0,bg=0.0,bh=0.0,bi=0,bj=0.0,bk=0,bl=0,bm=0,bn=0,bo=0,bp=0.0,bq=0,br=0,bs=0,bt=0,bu=0,bv=0,bw=0,bx=0,by=0,bz=0,bA=0,bB=0,bC=0,bD=0,bE=0,bF=0,bG=0,bH=0,bI=0,bJ=0,bK=0,bL=0,bM=0,bN=0,bO=0,bP=0,bQ=0,bR=0,bS=0,bT=0,bU=0,bV=0,bW=0,bX=0,bY=0.0,bZ=0,b_=0,b$=0,b0=0,b1=0,b2=0,b3=0,b4=0,b5=0,b6=0,b7=0;f=i;i=i+280|0;g=f|0;j=f+8|0;k=f+16|0;l=f+24|0;m=f+32|0;n=f+40|0;o=f+48|0;p=f+56|0;q=f+64|0;r=f+72|0;s=f+80|0;t=f+88|0;u=f+96|0;v=f+104|0;w=f+112|0;x=f+120|0;y=f+128|0;z=f+136|0;A=f+152|0;B=f+168|0;C=f+184|0;D=f+200|0;E=f+216|0;F=f+232|0;G=f+248|0;H=f+264|0;I=b+24|0;J=b+20|0;K=b+12|0;L=b+56|0;M=G;N=G+8|0;P=H;Q=H+8|0;S=b+16|0;T=b+32|0;U=b+8|0;V=b+28|0;W=F|0;X=F+8|0;Y=E|0;Z=E+8|0;_=D|0;$=D+8|0;aa=C|0;ab=C+8|0;ac=B|0;ad=B+8|0;ae=A|0;af=A+8|0;ag=z|0;ah=z+8|0;ai=c[260]|0;aj=b+64|0;ak=b+6|0;al=b+60|0;am=b+104|0;an=e;L1318:while(1){e=c[J>>2]|0;L1320:while(1){ao=c[c[e+4>>2]>>2]|0;ap=ao+16|0;aq=c[(c[ap>>2]|0)+8>>2]|0;ar=ao+20|0;as=ao+12|0;ao=c[K>>2]|0;at=c[I>>2]|0;L1322:while(1){au=at+4|0;av=c[at>>2]|0;aw=a[L]|0;do{if((aw&12)==0){ax=ao}else{ay=(c[aj>>2]|0)-1|0;c[aj>>2]=ay;az=(ay|0)==0;if(!az){if((aw&4)==0){ax=ao;break}}ay=c[I>>2]|0;c[I>>2]=au;aA=aw&255;if(!((aA&8|0)==0|az^1)){c[aj>>2]=c[al>>2];eB(b,3,-1)}do{if((aA&4|0)!=0){az=c[(c[c[(c[J>>2]|0)+4>>2]>>2]|0)+16>>2]|0;aB=c[az+12>>2]|0;aC=(au-aB>>2)-1|0;aD=c[az+20>>2]|0;az=(aD|0)==0;if(az){aE=0}else{aE=c[aD+(aC<<2)>>2]|0}if((aC|0)!=0&ay>>>0<au>>>0){if(az){aF=0}else{aF=c[aD+((ay-aB>>2)-1<<2)>>2]|0}if((aE|0)==(aF|0)){break}}eB(b,2,aE)}}while(0);if((a[ak]|0)==1){aG=999;break L1318}ax=c[K>>2]|0}}while(0);aH=av>>>6&255;aI=ax+(aH<<4)|0;switch(av&63|0){case 18:{aw=av>>>23;ay=ax+(aw<<4)|0;aA=ax+(aw<<4)+8|0;if((c[aA>>2]|0)==3){h[aI>>3]=-0.0- +h[ay>>3];c[ax+(aH<<4)+8>>2]=3;ao=ax;at=au;continue L1322}c[I>>2]=au;aw=c[aA>>2]|0;do{if((aw|0)==3){if((ay|0)==0){aG=1198}else{aJ=ay;aG=1194}}else if((aw|0)==4){if((fw((c[ay>>2]|0)+16|0,j)|0)==0){aG=1198;break}h[ag>>3]=+h[j>>3];c[ah>>2]=3;aJ=z;aG=1194}else{aG=1198}}while(0);do{if((aG|0)==1194){aG=0;aw=c[aA>>2]|0;if((aw|0)==4){if((fw((c[ay>>2]|0)+16|0,g)|0)==0){aG=1198;break}}else if((aw|0)==3){if((ay|0)==0){aG=1198;break}}else{aG=1198;break}h[aI>>3]=-0.0- +h[aJ>>3];c[ax+(aH<<4)+8>>2]=3}}while(0);L1361:do{if((aG|0)==1198){aG=0;aw=gg(b,ay,11)|0;do{if((c[aw+8>>2]|0)==0){aB=gg(b,ay,11)|0;if((c[aB+8>>2]|0)!=0){aK=aB;break}eu(b,ay,ay);break L1361}else{aK=aw}}while(0);aw=aI-(c[T>>2]|0)|0;aB=c[U>>2]|0;aD=aK;az=aB;aC=c[aD+4>>2]|0;c[az>>2]=c[aD>>2];c[az+4>>2]=aC;c[aB+8>>2]=c[aK+8>>2];aB=c[U>>2]|0;aC=ay;az=aB+16|0;aD=c[aC+4>>2]|0;c[az>>2]=c[aC>>2];c[az+4>>2]=aD;c[aB+24>>2]=c[aA>>2];aB=c[U>>2]|0;aD=aB+32|0;az=c[aC+4>>2]|0;c[aD>>2]=c[aC>>2];c[aD+4>>2]=az;c[aB+40>>2]=c[aA>>2];aB=c[U>>2]|0;if(((c[V>>2]|0)-aB|0)<49){eA(b,3);aM=c[U>>2]|0}else{aM=aB}c[U>>2]=aM+48;eG(b,aM,1);aB=c[T>>2]|0;az=c[U>>2]|0;aD=az-16|0;c[U>>2]=aD;aC=aD;aD=aB+aw|0;aN=c[aC+4>>2]|0;c[aD>>2]=c[aC>>2];c[aD+4>>2]=aN;c[aB+(aw+8)>>2]=c[az-16+8>>2]}}while(0);ao=c[K>>2]|0;at=au;continue L1322;break};case 0:{aA=av>>>23;ay=ax+(aA<<4)|0;az=aI;aw=c[ay+4>>2]|0;c[az>>2]=c[ay>>2];c[az+4>>2]=aw;c[ax+(aH<<4)+8>>2]=c[ax+(aA<<4)+8>>2];ao=ax;at=au;continue L1322;break};case 1:{aA=av>>>14;aw=aq+(aA<<4)|0;az=aI;ay=c[aw+4>>2]|0;c[az>>2]=c[aw>>2];c[az+4>>2]=ay;c[ax+(aH<<4)+8>>2]=c[aq+(aA<<4)+8>>2];ao=ax;at=au;continue L1322;break};case 2:{c[aI>>2]=av>>>23;c[ax+(aH<<4)+8>>2]=1;ao=ax;at=(av&8372224|0)==0?au:at+8|0;continue L1322;break};case 3:{aA=ax+(av>>>23<<4)|0;while(1){ay=aA-16|0;c[aA+8>>2]=0;if(ay>>>0<aI>>>0){ao=ax;at=au;continue L1322}else{aA=ay}}break};case 4:{aA=c[(c[ar+(av>>>23<<2)>>2]|0)+8>>2]|0;ay=aA;az=aI;aw=c[ay+4>>2]|0;c[az>>2]=c[ay>>2];c[az+4>>2]=aw;c[ax+(aH<<4)+8>>2]=c[aA+8>>2];ao=ax;at=au;continue L1322;break};case 5:{c[M>>2]=c[as>>2];c[N>>2]=5;c[I>>2]=au;gm(b,G,aq+(av>>>14<<4)|0,aI);ao=c[K>>2]|0;at=au;continue L1322;break};case 6:{c[I>>2]=au;aA=av>>>14;if((aA&256|0)==0){aO=ax+((aA&511)<<4)|0}else{aO=aq+((aA&255)<<4)|0}gm(b,ax+(av>>>23<<4)|0,aO,aI);ao=c[K>>2]|0;at=au;continue L1322;break};case 7:{c[P>>2]=c[as>>2];c[Q>>2]=5;c[I>>2]=au;gn(b,H,aq+(av>>>14<<4)|0,aI);ao=c[K>>2]|0;at=au;continue L1322;break};case 8:{aA=c[ar+(av>>>23<<2)>>2]|0;aw=c[aA+8>>2]|0;az=aI;ay=aw;aB=c[az+4>>2]|0;c[ay>>2]=c[az>>2];c[ay+4>>2]=aB;aB=ax+(aH<<4)+8|0;c[aw+8>>2]=c[aB>>2];if((c[aB>>2]|0)<=3){ao=ax;at=au;continue L1322}aB=c[aI>>2]|0;if((a[aB+5|0]&3)==0){ao=ax;at=au;continue L1322}if((a[aA+5|0]&4)==0){ao=ax;at=au;continue L1322}e7(b,aA,aB);ao=ax;at=au;continue L1322;break};case 9:{c[I>>2]=au;aB=av>>>23;if((aB&256|0)==0){aP=ax+(aB<<4)|0}else{aP=aq+((aB&255)<<4)|0}aB=av>>>14;if((aB&256|0)==0){aQ=ax+((aB&511)<<4)|0}else{aQ=aq+((aB&255)<<4)|0}gn(b,aI,aP,aQ);ao=c[K>>2]|0;at=au;continue L1322;break};case 10:{aB=fp(av>>>23)|0;c[aI>>2]=f5(b,aB,fp(av>>>14&511)|0)|0;c[ax+(aH<<4)+8>>2]=5;c[I>>2]=au;aB=c[S>>2]|0;if((c[aB+68>>2]|0)>>>0>=(c[aB+64>>2]|0)>>>0){e1(b)}ao=c[K>>2]|0;at=au;continue L1322;break};case 11:{aB=av>>>23;aA=ax+(aB<<4)|0;aw=aH+1|0;ay=aA;az=ax+(aw<<4)|0;aN=c[ay+4>>2]|0;c[az>>2]=c[ay>>2];c[az+4>>2]=aN;c[ax+(aw<<4)+8>>2]=c[ax+(aB<<4)+8>>2];c[I>>2]=au;aB=av>>>14;if((aB&256|0)==0){aR=ax+((aB&511)<<4)|0}else{aR=aq+((aB&255)<<4)|0}gm(b,aA,aR,aI);ao=c[K>>2]|0;at=au;continue L1322;break};case 12:{aA=av>>>23;if((aA&256|0)==0){aS=ax+(aA<<4)|0}else{aS=aq+((aA&255)<<4)|0}aA=av>>>14;if((aA&256|0)==0){aT=ax+((aA&511)<<4)|0}else{aT=aq+((aA&255)<<4)|0}aA=aS+8|0;do{if((c[aA>>2]|0)==3){if((c[aT+8>>2]|0)!=3){break}h[aI>>3]=+h[aS>>3]+ +h[aT>>3];c[ax+(aH<<4)+8>>2]=3;ao=ax;at=au;continue L1322}}while(0);c[I>>2]=au;aB=c[aA>>2]|0;do{if((aB|0)==4){if((fw((c[aS>>2]|0)+16|0,v)|0)==0){aG=1051;break}h[W>>3]=+h[v>>3];c[X>>2]=3;aU=F;aG=1045}else if((aB|0)==3){if((aS|0)==0){aG=1051}else{aU=aS;aG=1045}}else{aG=1051}}while(0);do{if((aG|0)==1045){aG=0;aB=c[aT+8>>2]|0;if((aB|0)==4){if((fw((c[aT>>2]|0)+16|0,u)|0)==0){aG=1051;break}aV=+h[u>>3]}else if((aB|0)==3){if((aT|0)==0){aG=1051;break}aV=+h[aT>>3]}else{aG=1051;break}h[aI>>3]=+h[aU>>3]+aV;c[ax+(aH<<4)+8>>2]=3}}while(0);L1432:do{if((aG|0)==1051){aG=0;aB=gg(b,aS,5)|0;do{if((c[aB+8>>2]|0)==0){aw=gg(b,aT,5)|0;if((c[aw+8>>2]|0)!=0){aW=aw;break}eu(b,aS,aT);break L1432}else{aW=aB}}while(0);aB=aI-(c[T>>2]|0)|0;aw=c[U>>2]|0;aN=aW;az=aw;ay=c[aN+4>>2]|0;c[az>>2]=c[aN>>2];c[az+4>>2]=ay;c[aw+8>>2]=c[aW+8>>2];aw=c[U>>2]|0;ay=aS;az=aw+16|0;aN=c[ay+4>>2]|0;c[az>>2]=c[ay>>2];c[az+4>>2]=aN;c[aw+24>>2]=c[aA>>2];aw=c[U>>2]|0;aN=aT;az=aw+32|0;ay=c[aN+4>>2]|0;c[az>>2]=c[aN>>2];c[az+4>>2]=ay;c[aw+40>>2]=c[aT+8>>2];aw=c[U>>2]|0;if(((c[V>>2]|0)-aw|0)<49){eA(b,3);aX=c[U>>2]|0}else{aX=aw}c[U>>2]=aX+48;eG(b,aX,1);aw=c[T>>2]|0;ay=c[U>>2]|0;az=ay-16|0;c[U>>2]=az;aN=az;az=aw+aB|0;aD=c[aN+4>>2]|0;c[az>>2]=c[aN>>2];c[az+4>>2]=aD;c[aw+(aB+8)>>2]=c[ay-16+8>>2]}}while(0);ao=c[K>>2]|0;at=au;continue L1322;break};case 13:{aA=av>>>23;if((aA&256|0)==0){aY=ax+(aA<<4)|0}else{aY=aq+((aA&255)<<4)|0}aA=av>>>14;if((aA&256|0)==0){aZ=ax+((aA&511)<<4)|0}else{aZ=aq+((aA&255)<<4)|0}aA=aY+8|0;do{if((c[aA>>2]|0)==3){if((c[aZ+8>>2]|0)!=3){break}h[aI>>3]=+h[aY>>3]- +h[aZ>>3];c[ax+(aH<<4)+8>>2]=3;ao=ax;at=au;continue L1322}}while(0);c[I>>2]=au;ay=c[aA>>2]|0;do{if((ay|0)==4){if((fw((c[aY>>2]|0)+16|0,t)|0)==0){aG=1077;break}h[Y>>3]=+h[t>>3];c[Z>>2]=3;a_=E;aG=1071}else if((ay|0)==3){if((aY|0)==0){aG=1077}else{a_=aY;aG=1071}}else{aG=1077}}while(0);do{if((aG|0)==1071){aG=0;ay=c[aZ+8>>2]|0;if((ay|0)==4){if((fw((c[aZ>>2]|0)+16|0,s)|0)==0){aG=1077;break}a$=+h[s>>3]}else if((ay|0)==3){if((aZ|0)==0){aG=1077;break}a$=+h[aZ>>3]}else{aG=1077;break}h[aI>>3]=+h[a_>>3]-a$;c[ax+(aH<<4)+8>>2]=3}}while(0);L1467:do{if((aG|0)==1077){aG=0;ay=gg(b,aY,6)|0;do{if((c[ay+8>>2]|0)==0){aB=gg(b,aZ,6)|0;if((c[aB+8>>2]|0)!=0){a0=aB;break}eu(b,aY,aZ);break L1467}else{a0=ay}}while(0);ay=aI-(c[T>>2]|0)|0;aB=c[U>>2]|0;aw=a0;aD=aB;az=c[aw+4>>2]|0;c[aD>>2]=c[aw>>2];c[aD+4>>2]=az;c[aB+8>>2]=c[a0+8>>2];aB=c[U>>2]|0;az=aY;aD=aB+16|0;aw=c[az+4>>2]|0;c[aD>>2]=c[az>>2];c[aD+4>>2]=aw;c[aB+24>>2]=c[aA>>2];aB=c[U>>2]|0;aw=aZ;aD=aB+32|0;az=c[aw+4>>2]|0;c[aD>>2]=c[aw>>2];c[aD+4>>2]=az;c[aB+40>>2]=c[aZ+8>>2];aB=c[U>>2]|0;if(((c[V>>2]|0)-aB|0)<49){eA(b,3);a1=c[U>>2]|0}else{a1=aB}c[U>>2]=a1+48;eG(b,a1,1);aB=c[T>>2]|0;az=c[U>>2]|0;aD=az-16|0;c[U>>2]=aD;aw=aD;aD=aB+ay|0;aN=c[aw+4>>2]|0;c[aD>>2]=c[aw>>2];c[aD+4>>2]=aN;c[aB+(ay+8)>>2]=c[az-16+8>>2]}}while(0);ao=c[K>>2]|0;at=au;continue L1322;break};case 14:{aA=av>>>23;if((aA&256|0)==0){a2=ax+(aA<<4)|0}else{a2=aq+((aA&255)<<4)|0}aA=av>>>14;if((aA&256|0)==0){a3=ax+((aA&511)<<4)|0}else{a3=aq+((aA&255)<<4)|0}aA=a2+8|0;do{if((c[aA>>2]|0)==3){if((c[a3+8>>2]|0)!=3){break}h[aI>>3]=+h[a2>>3]*+h[a3>>3];c[ax+(aH<<4)+8>>2]=3;ao=ax;at=au;continue L1322}}while(0);c[I>>2]=au;az=c[aA>>2]|0;do{if((az|0)==4){if((fw((c[a2>>2]|0)+16|0,r)|0)==0){aG=1103;break}h[_>>3]=+h[r>>3];c[$>>2]=3;a4=D;aG=1097}else if((az|0)==3){if((a2|0)==0){aG=1103}else{a4=a2;aG=1097}}else{aG=1103}}while(0);do{if((aG|0)==1097){aG=0;az=c[a3+8>>2]|0;if((az|0)==4){if((fw((c[a3>>2]|0)+16|0,q)|0)==0){aG=1103;break}a5=+h[q>>3]}else if((az|0)==3){if((a3|0)==0){aG=1103;break}a5=+h[a3>>3]}else{aG=1103;break}h[aI>>3]=+h[a4>>3]*a5;c[ax+(aH<<4)+8>>2]=3}}while(0);L1502:do{if((aG|0)==1103){aG=0;az=gg(b,a2,7)|0;do{if((c[az+8>>2]|0)==0){ay=gg(b,a3,7)|0;if((c[ay+8>>2]|0)!=0){a6=ay;break}eu(b,a2,a3);break L1502}else{a6=az}}while(0);az=aI-(c[T>>2]|0)|0;ay=c[U>>2]|0;aB=a6;aN=ay;aD=c[aB+4>>2]|0;c[aN>>2]=c[aB>>2];c[aN+4>>2]=aD;c[ay+8>>2]=c[a6+8>>2];ay=c[U>>2]|0;aD=a2;aN=ay+16|0;aB=c[aD+4>>2]|0;c[aN>>2]=c[aD>>2];c[aN+4>>2]=aB;c[ay+24>>2]=c[aA>>2];ay=c[U>>2]|0;aB=a3;aN=ay+32|0;aD=c[aB+4>>2]|0;c[aN>>2]=c[aB>>2];c[aN+4>>2]=aD;c[ay+40>>2]=c[a3+8>>2];ay=c[U>>2]|0;if(((c[V>>2]|0)-ay|0)<49){eA(b,3);a7=c[U>>2]|0}else{a7=ay}c[U>>2]=a7+48;eG(b,a7,1);ay=c[T>>2]|0;aD=c[U>>2]|0;aN=aD-16|0;c[U>>2]=aN;aB=aN;aN=ay+az|0;aw=c[aB+4>>2]|0;c[aN>>2]=c[aB>>2];c[aN+4>>2]=aw;c[ay+(az+8)>>2]=c[aD-16+8>>2]}}while(0);ao=c[K>>2]|0;at=au;continue L1322;break};case 15:{aA=av>>>23;if((aA&256|0)==0){a8=ax+(aA<<4)|0}else{a8=aq+((aA&255)<<4)|0}aA=av>>>14;if((aA&256|0)==0){a9=ax+((aA&511)<<4)|0}else{a9=aq+((aA&255)<<4)|0}aA=a8+8|0;do{if((c[aA>>2]|0)==3){if((c[a9+8>>2]|0)!=3){break}h[aI>>3]=+h[a8>>3]/+h[a9>>3];c[ax+(aH<<4)+8>>2]=3;ao=ax;at=au;continue L1322}}while(0);c[I>>2]=au;aD=c[aA>>2]|0;do{if((aD|0)==4){if((fw((c[a8>>2]|0)+16|0,p)|0)==0){aG=1129;break}h[aa>>3]=+h[p>>3];c[ab>>2]=3;ba=C;aG=1123}else if((aD|0)==3){if((a8|0)==0){aG=1129}else{ba=a8;aG=1123}}else{aG=1129}}while(0);do{if((aG|0)==1123){aG=0;aD=c[a9+8>>2]|0;if((aD|0)==4){if((fw((c[a9>>2]|0)+16|0,o)|0)==0){aG=1129;break}bb=+h[o>>3]}else if((aD|0)==3){if((a9|0)==0){aG=1129;break}bb=+h[a9>>3]}else{aG=1129;break}h[aI>>3]=+h[ba>>3]/bb;c[ax+(aH<<4)+8>>2]=3}}while(0);L1537:do{if((aG|0)==1129){aG=0;aD=gg(b,a8,8)|0;do{if((c[aD+8>>2]|0)==0){az=gg(b,a9,8)|0;if((c[az+8>>2]|0)!=0){bc=az;break}eu(b,a8,a9);break L1537}else{bc=aD}}while(0);aD=aI-(c[T>>2]|0)|0;az=c[U>>2]|0;ay=bc;aw=az;aN=c[ay+4>>2]|0;c[aw>>2]=c[ay>>2];c[aw+4>>2]=aN;c[az+8>>2]=c[bc+8>>2];az=c[U>>2]|0;aN=a8;aw=az+16|0;ay=c[aN+4>>2]|0;c[aw>>2]=c[aN>>2];c[aw+4>>2]=ay;c[az+24>>2]=c[aA>>2];az=c[U>>2]|0;ay=a9;aw=az+32|0;aN=c[ay+4>>2]|0;c[aw>>2]=c[ay>>2];c[aw+4>>2]=aN;c[az+40>>2]=c[a9+8>>2];az=c[U>>2]|0;if(((c[V>>2]|0)-az|0)<49){eA(b,3);bd=c[U>>2]|0}else{bd=az}c[U>>2]=bd+48;eG(b,bd,1);az=c[T>>2]|0;aN=c[U>>2]|0;aw=aN-16|0;c[U>>2]=aw;ay=aw;aw=az+aD|0;aB=c[ay+4>>2]|0;c[aw>>2]=c[ay>>2];c[aw+4>>2]=aB;c[az+(aD+8)>>2]=c[aN-16+8>>2]}}while(0);ao=c[K>>2]|0;at=au;continue L1322;break};case 16:{aA=av>>>23;if((aA&256|0)==0){be=ax+(aA<<4)|0}else{be=aq+((aA&255)<<4)|0}aA=av>>>14;if((aA&256|0)==0){bf=ax+((aA&511)<<4)|0}else{bf=aq+((aA&255)<<4)|0}aA=be+8|0;do{if((c[aA>>2]|0)==3){if((c[bf+8>>2]|0)!=3){break}bg=+h[be>>3];bh=+h[bf>>3];h[aI>>3]=bg-bh*+O(+(bg/bh));c[ax+(aH<<4)+8>>2]=3;ao=ax;at=au;continue L1322}}while(0);c[I>>2]=au;aN=c[aA>>2]|0;do{if((aN|0)==4){if((fw((c[be>>2]|0)+16|0,n)|0)==0){aG=1155;break}h[ac>>3]=+h[n>>3];c[ad>>2]=3;bi=B;aG=1149}else if((aN|0)==3){if((be|0)==0){aG=1155}else{bi=be;aG=1149}}else{aG=1155}}while(0);do{if((aG|0)==1149){aG=0;aN=c[bf+8>>2]|0;if((aN|0)==4){if((fw((c[bf>>2]|0)+16|0,m)|0)==0){aG=1155;break}bj=+h[m>>3]}else if((aN|0)==3){if((bf|0)==0){aG=1155;break}bj=+h[bf>>3]}else{aG=1155;break}bh=+h[bi>>3];h[aI>>3]=bh-bj*+O(+(bh/bj));c[ax+(aH<<4)+8>>2]=3}}while(0);L1572:do{if((aG|0)==1155){aG=0;aN=gg(b,be,9)|0;do{if((c[aN+8>>2]|0)==0){aD=gg(b,bf,9)|0;if((c[aD+8>>2]|0)!=0){bk=aD;break}eu(b,be,bf);break L1572}else{bk=aN}}while(0);aN=aI-(c[T>>2]|0)|0;aD=c[U>>2]|0;az=bk;aB=aD;aw=c[az+4>>2]|0;c[aB>>2]=c[az>>2];c[aB+4>>2]=aw;c[aD+8>>2]=c[bk+8>>2];aD=c[U>>2]|0;aw=be;aB=aD+16|0;az=c[aw+4>>2]|0;c[aB>>2]=c[aw>>2];c[aB+4>>2]=az;c[aD+24>>2]=c[aA>>2];aD=c[U>>2]|0;az=bf;aB=aD+32|0;aw=c[az+4>>2]|0;c[aB>>2]=c[az>>2];c[aB+4>>2]=aw;c[aD+40>>2]=c[bf+8>>2];aD=c[U>>2]|0;if(((c[V>>2]|0)-aD|0)<49){eA(b,3);bl=c[U>>2]|0}else{bl=aD}c[U>>2]=bl+48;eG(b,bl,1);aD=c[T>>2]|0;aw=c[U>>2]|0;aB=aw-16|0;c[U>>2]=aB;az=aB;aB=aD+aN|0;ay=c[az+4>>2]|0;c[aB>>2]=c[az>>2];c[aB+4>>2]=ay;c[aD+(aN+8)>>2]=c[aw-16+8>>2]}}while(0);ao=c[K>>2]|0;at=au;continue L1322;break};case 17:{aA=av>>>23;if((aA&256|0)==0){bm=ax+(aA<<4)|0}else{bm=aq+((aA&255)<<4)|0}aA=av>>>14;if((aA&256|0)==0){bn=ax+((aA&511)<<4)|0}else{bn=aq+((aA&255)<<4)|0}aA=bm+8|0;do{if((c[aA>>2]|0)==3){if((c[bn+8>>2]|0)!=3){break}h[aI>>3]=+R(+(+h[bm>>3]),+(+h[bn>>3]));c[ax+(aH<<4)+8>>2]=3;ao=ax;at=au;continue L1322}}while(0);c[I>>2]=au;aw=c[aA>>2]|0;do{if((aw|0)==4){if((fw((c[bm>>2]|0)+16|0,l)|0)==0){aG=1181;break}h[ae>>3]=+h[l>>3];c[af>>2]=3;bo=A;aG=1175}else if((aw|0)==3){if((bm|0)==0){aG=1181}else{bo=bm;aG=1175}}else{aG=1181}}while(0);do{if((aG|0)==1175){aG=0;aw=c[bn+8>>2]|0;if((aw|0)==4){if((fw((c[bn>>2]|0)+16|0,k)|0)==0){aG=1181;break}bp=+h[k>>3]}else if((aw|0)==3){if((bn|0)==0){aG=1181;break}bp=+h[bn>>3]}else{aG=1181;break}h[aI>>3]=+R(+(+h[bo>>3]),+bp);c[ax+(aH<<4)+8>>2]=3}}while(0);L1607:do{if((aG|0)==1181){aG=0;aw=gg(b,bm,10)|0;do{if((c[aw+8>>2]|0)==0){aN=gg(b,bn,10)|0;if((c[aN+8>>2]|0)!=0){bq=aN;break}eu(b,bm,bn);break L1607}else{bq=aw}}while(0);aw=aI-(c[T>>2]|0)|0;aN=c[U>>2]|0;aD=bq;ay=aN;aB=c[aD+4>>2]|0;c[ay>>2]=c[aD>>2];c[ay+4>>2]=aB;c[aN+8>>2]=c[bq+8>>2];aN=c[U>>2]|0;aB=bm;ay=aN+16|0;aD=c[aB+4>>2]|0;c[ay>>2]=c[aB>>2];c[ay+4>>2]=aD;c[aN+24>>2]=c[aA>>2];aN=c[U>>2]|0;aD=bn;ay=aN+32|0;aB=c[aD+4>>2]|0;c[ay>>2]=c[aD>>2];c[ay+4>>2]=aB;c[aN+40>>2]=c[bn+8>>2];aN=c[U>>2]|0;if(((c[V>>2]|0)-aN|0)<49){eA(b,3);br=c[U>>2]|0}else{br=aN}c[U>>2]=br+48;eG(b,br,1);aN=c[T>>2]|0;aB=c[U>>2]|0;ay=aB-16|0;c[U>>2]=ay;aD=ay;ay=aN+aw|0;az=c[aD+4>>2]|0;c[ay>>2]=c[aD>>2];c[ay+4>>2]=az;c[aN+(aw+8)>>2]=c[aB-16+8>>2]}}while(0);ao=c[K>>2]|0;at=au;continue L1322;break};case 19:{aA=av>>>23;aB=c[ax+(aA<<4)+8>>2]|0;do{if((aB|0)==0){bs=1}else{if((aB|0)!=1){bs=0;break}bs=(c[ax+(aA<<4)>>2]|0)==0|0}}while(0);c[aI>>2]=bs;c[ax+(aH<<4)+8>>2]=1;ao=ax;at=au;continue L1322;break};case 20:{aA=av>>>23;aB=ax+(aA<<4)|0;aw=ax+(aA<<4)+8|0;aA=c[aw>>2]|0;if((aA|0)==5){h[aI>>3]=+(ga(c[aB>>2]|0)|0);c[ax+(aH<<4)+8>>2]=3;ao=ax;at=au;continue L1322}else if((aA|0)==4){h[aI>>3]=+((c[(c[aB>>2]|0)+12>>2]|0)>>>0>>>0);c[ax+(aH<<4)+8>>2]=3;ao=ax;at=au;continue L1322}else{c[I>>2]=au;aA=gg(b,aB,12)|0;do{if((c[aA+8>>2]|0)==0){aN=gg(b,1032,12)|0;if((c[aN+8>>2]|0)!=0){bt=aN;aG=1214;break}eq(b,aB,3952)}else{bt=aA;aG=1214}}while(0);if((aG|0)==1214){aG=0;aA=aI-(c[T>>2]|0)|0;aN=c[U>>2]|0;az=bt;ay=aN;aD=c[az+4>>2]|0;c[ay>>2]=c[az>>2];c[ay+4>>2]=aD;c[aN+8>>2]=c[bt+8>>2];aN=c[U>>2]|0;aD=aB;ay=aN+16|0;az=c[aD+4>>2]|0;c[ay>>2]=c[aD>>2];c[ay+4>>2]=az;c[aN+24>>2]=c[aw>>2];aN=c[U>>2]|0;az=aN+32|0;ay=1032;aD=c[ay+4>>2]|0;c[az>>2]=c[ay>>2];c[az+4>>2]=aD;c[aN+40>>2]=ai;aN=c[U>>2]|0;if(((c[V>>2]|0)-aN|0)<49){eA(b,3);bu=c[U>>2]|0}else{bu=aN}c[U>>2]=bu+48;eG(b,bu,1);aN=c[T>>2]|0;aD=c[U>>2]|0;az=aD-16|0;c[U>>2]=az;ay=az;az=aN+aA|0;aC=c[ay+4>>2]|0;c[az>>2]=c[ay>>2];c[az+4>>2]=aC;c[aN+(aA+8)>>2]=c[aD-16+8>>2]}ao=c[K>>2]|0;at=au;continue L1322}break};case 21:{aD=av>>>23;aA=av>>>14&511;c[I>>2]=au;gq(b,1-aD+aA|0,aA);aA=c[S>>2]|0;if((c[aA+68>>2]|0)>>>0>=(c[aA+64>>2]|0)>>>0){e1(b)}aA=c[K>>2]|0;aN=aA+(aD<<4)|0;aC=aA+(aH<<4)|0;az=c[aN+4>>2]|0;c[aC>>2]=c[aN>>2];c[aC+4>>2]=az;c[aA+(aH<<4)+8>>2]=c[aA+(aD<<4)+8>>2];ao=aA;at=au;continue L1322;break};case 22:{ao=ax;at=at+((av>>>14)-131070<<2)|0;continue L1322;break};case 23:{aA=av>>>23;if((aA&256|0)==0){bv=ax+(aA<<4)|0}else{bv=aq+((aA&255)<<4)|0}aA=av>>>14;if((aA&256|0)==0){bw=ax+((aA&511)<<4)|0}else{bw=aq+((aA&255)<<4)|0}c[I>>2]=au;if((c[bv+8>>2]|0)==(c[bw+8>>2]|0)){bx=(gp(b,bv,bw)|0)!=0|0}else{bx=0}if((bx|0)==(aH|0)){by=at+(((c[au>>2]|0)>>>14)-131070<<2)|0}else{by=au}ao=c[K>>2]|0;at=by+4|0;continue L1322;break};case 24:{c[I>>2]=au;aA=av>>>23;if((aA&256|0)==0){bz=ax+(aA<<4)|0}else{bz=aq+((aA&255)<<4)|0}aA=av>>>14;if((aA&256|0)==0){bA=ax+((aA&511)<<4)|0}else{bA=aq+((aA&255)<<4)|0}if((go(b,bz,bA)|0)==(aH|0)){bB=at+(((c[au>>2]|0)>>>14)-131070<<2)|0}else{bB=au}ao=c[K>>2]|0;at=bB+4|0;continue L1322;break};case 25:{c[I>>2]=au;aA=av>>>23;if((aA&256|0)==0){bC=ax+(aA<<4)|0}else{bC=aq+((aA&255)<<4)|0}aA=av>>>14;if((aA&256|0)==0){bD=ax+((aA&511)<<4)|0}else{bD=aq+((aA&255)<<4)|0}aA=bC+8|0;aD=c[aA>>2]|0;az=bD+8|0;L1677:do{if((aD|0)==(c[az>>2]|0)){if((aD|0)==3){bE=+h[bC>>3]<=+h[bD>>3]|0;break}else if((aD|0)==4){aC=c[bC>>2]|0;aN=c[bD>>2]|0;ay=aC+16|0;bF=aN+16|0;bG=aL(ay|0,bF|0)|0;L1683:do{if((bG|0)==0){bH=ay;bI=c[aC+12>>2]|0;bJ=bF;bK=c[aN+12>>2]|0;while(1){bL=j_(bH|0)|0;bM=(bL|0)==(bI|0);if((bL|0)==(bK|0)){break}if(bM){bN=-1;break L1683}bO=bL+1|0;bL=bH+bO|0;bP=bJ+bO|0;bQ=aL(bL|0,bP|0)|0;if((bQ|0)==0){bH=bL;bI=bI-bO|0;bJ=bP;bK=bK-bO|0}else{bN=bQ;break L1683}}bN=bM&1^1}else{bN=bG}}while(0);bE=(bN|0)<1|0;break}else{bG=gg(b,bC,14)|0;aN=bG+8|0;do{if((c[aN>>2]|0)!=0){if((fr(bG,gg(b,bD,14)|0)|0)==0){break}bF=c[U>>2]|0;aC=bF-(c[T>>2]|0)|0;ay=bG;bK=bF;bJ=c[ay+4>>2]|0;c[bK>>2]=c[ay>>2];c[bK+4>>2]=bJ;c[bF+8>>2]=c[aN>>2];bF=c[U>>2]|0;bJ=bC;bK=bF+16|0;ay=c[bJ+4>>2]|0;c[bK>>2]=c[bJ>>2];c[bK+4>>2]=ay;c[bF+24>>2]=c[aA>>2];bF=c[U>>2]|0;ay=bD;bK=bF+32|0;bJ=c[ay+4>>2]|0;c[bK>>2]=c[ay>>2];c[bK+4>>2]=bJ;c[bF+40>>2]=c[az>>2];bF=c[U>>2]|0;if(((c[V>>2]|0)-bF|0)<49){eA(b,3);bR=c[U>>2]|0}else{bR=bF}c[U>>2]=bR+48;eG(b,bR,1);bF=c[T>>2]|0;bJ=c[U>>2]|0;bK=bJ-16|0;c[U>>2]=bK;ay=bK;bK=bF+aC|0;bI=c[ay+4>>2]|0;c[bK>>2]=c[ay>>2];c[bK+4>>2]=bI;c[bF+(aC+8)>>2]=c[bJ-16+8>>2];bJ=c[U>>2]|0;aC=c[bJ+8>>2]|0;if((aC|0)==0){bE=0;break L1677}if((aC|0)!=1){bE=1;break L1677}bE=(c[bJ>>2]|0)!=0|0;break L1677}}while(0);aN=gg(b,bD,13)|0;bG=aN+8|0;do{if((c[bG>>2]|0)!=0){if((fr(aN,gg(b,bC,13)|0)|0)==0){break}bJ=c[U>>2]|0;aC=bJ-(c[T>>2]|0)|0;bF=aN;bI=bJ;bK=c[bF+4>>2]|0;c[bI>>2]=c[bF>>2];c[bI+4>>2]=bK;c[bJ+8>>2]=c[bG>>2];bJ=c[U>>2]|0;bK=bD;bI=bJ+16|0;bF=c[bK+4>>2]|0;c[bI>>2]=c[bK>>2];c[bI+4>>2]=bF;c[bJ+24>>2]=c[az>>2];bJ=c[U>>2]|0;bF=bC;bI=bJ+32|0;bK=c[bF+4>>2]|0;c[bI>>2]=c[bF>>2];c[bI+4>>2]=bK;c[bJ+40>>2]=c[aA>>2];bJ=c[U>>2]|0;if(((c[V>>2]|0)-bJ|0)<49){eA(b,3);bS=c[U>>2]|0}else{bS=bJ}c[U>>2]=bS+48;eG(b,bS,1);bJ=c[T>>2]|0;bK=c[U>>2]|0;bI=bK-16|0;c[U>>2]=bI;bF=bI;bI=bJ+aC|0;ay=c[bF+4>>2]|0;c[bI>>2]=c[bF>>2];c[bI+4>>2]=ay;c[bJ+(aC+8)>>2]=c[bK-16+8>>2];bK=c[U>>2]|0;aC=c[bK+8>>2]|0;if((aC|0)==0){bE=1;break L1677}if((aC|0)!=1){bE=0;break L1677}bE=(c[bK>>2]|0)==0|0;break L1677}}while(0);bE=ev(b,bC,bD)|0;break}}else{bE=ev(b,bC,bD)|0}}while(0);if((bE|0)==(aH|0)){bT=at+(((c[au>>2]|0)>>>14)-131070<<2)|0}else{bT=au}ao=c[K>>2]|0;at=bT+4|0;continue L1322;break};case 26:{aA=c[ax+(aH<<4)+8>>2]|0;do{if((aA|0)==0){bU=1}else{if((aA|0)!=1){bU=0;break}bU=(c[aI>>2]|0)==0|0}}while(0);if((bU|0)==(av>>>14&511|0)){bV=au}else{bV=at+(((c[au>>2]|0)>>>14)-131070<<2)|0}ao=ax;at=bV+4|0;continue L1322;break};case 27:{aA=av>>>23;az=ax+(aA<<4)|0;aD=c[ax+(aA<<4)+8>>2]|0;do{if((aD|0)==0){bW=1}else{if((aD|0)!=1){bW=0;break}bW=(c[az>>2]|0)==0|0}}while(0);if((bW|0)==(av>>>14&511|0)){bX=au}else{aA=az;aw=aI;aB=c[aA+4>>2]|0;c[aw>>2]=c[aA>>2];c[aw+4>>2]=aB;c[ax+(aH<<4)+8>>2]=aD;bX=at+(((c[au>>2]|0)>>>14)-131070<<2)|0}ao=ax;at=bX+4|0;continue L1322;break};case 28:{aB=av>>>23;aw=av>>>14&511;if((aB|0)!=0){c[U>>2]=ax+(aH+aB<<4)}c[I>>2]=au;aB=eF(b,aI,aw-1|0)|0;if((aB|0)==0){aG=1293;break L1320}else if((aB|0)!=1){aG=1376;break L1318}if((aw|0)!=0){c[U>>2]=c[(c[J>>2]|0)+8>>2]}ao=c[K>>2]|0;at=au;continue L1322;break};case 29:{aw=av>>>23;if((aw|0)!=0){c[U>>2]=ax+(aH+aw<<4)}c[I>>2]=au;aw=eF(b,aI,-1)|0;if((aw|0)==0){break L1322}else if((aw|0)!=1){aG=1377;break L1318}ao=c[K>>2]|0;at=au;continue L1322;break};case 30:{break L1320;break};case 31:{bh=+h[ax+(aH+2<<4)>>3];aw=aI|0;bg=bh+ +h[aw>>3];bY=+h[ax+(aH+1<<4)>>3];if(bh>0.0){if(bg>bY){ao=ax;at=au;continue L1322}}else{if(bY>bg){ao=ax;at=au;continue L1322}}h[aw>>3]=bg;c[ax+(aH<<4)+8>>2]=3;aw=aH+3|0;h[ax+(aw<<4)>>3]=bg;c[ax+(aw<<4)+8>>2]=3;ao=ax;at=at+((av>>>14)-131070<<2)|0;continue L1322;break};case 32:{aw=aH+1|0;aB=ax+(aw<<4)|0;aA=aH+2|0;bG=ax+(aA<<4)|0;c[I>>2]=au;aN=ax+(aH<<4)+8|0;bK=c[aN>>2]|0;L1749:do{if((bK|0)==3){aG=1322}else{do{if((bK|0)==4){if((fw((c[aI>>2]|0)+16|0,y)|0)==0){break}h[aI>>3]=+h[y>>3];c[aN>>2]=3;if((aI|0)!=0){aG=1322;break L1749}}}while(0);es(b,3360,(bZ=i,i=i+1|0,i=i+7>>3<<3,c[bZ>>2]=0,bZ)|0);i=bZ}}while(0);L1755:do{if((aG|0)==1322){aG=0;bK=ax+(aw<<4)+8|0;aD=c[bK>>2]|0;L1757:do{if((aD|0)!=3){do{if((aD|0)==4){if((fw((c[aB>>2]|0)+16|0,x)|0)==0){break}h[aB>>3]=+h[x>>3];c[bK>>2]=3;if((aB|0)!=0){break L1757}}}while(0);es(b,2832,(bZ=i,i=i+1|0,i=i+7>>3<<3,c[bZ>>2]=0,bZ)|0);i=bZ;break L1755}}while(0);bK=ax+(aA<<4)+8|0;aD=c[bK>>2]|0;if((aD|0)==3){break}if((aD|0)!=4){aG=1372;break L1318}if((fw((c[bG>>2]|0)+16|0,w)|0)==0){aG=1373;break L1318}h[bG>>3]=+h[w>>3];c[bK>>2]=3;if((bG|0)==0){aG=1374;break L1318}}}while(0);aA=aI|0;h[aA>>3]=+h[aA>>3]- +h[bG>>3];c[aN>>2]=3;ao=ax;at=at+((av>>>14)-131070<<2)|0;continue L1322;break};case 33:{aA=aH+3|0;aB=ax+(aA<<4)|0;aw=aH+2|0;bK=aH+5|0;aD=ax+(aw<<4)|0;az=ax+(bK<<4)|0;aC=c[aD+4>>2]|0;c[az>>2]=c[aD>>2];c[az+4>>2]=aC;c[ax+(bK<<4)+8>>2]=c[ax+(aw<<4)+8>>2];bK=aH+1|0;aC=aH+4|0;az=ax+(bK<<4)|0;aD=ax+(aC<<4)|0;bJ=c[az+4>>2]|0;c[aD>>2]=c[az>>2];c[aD+4>>2]=bJ;c[ax+(aC<<4)+8>>2]=c[ax+(bK<<4)+8>>2];bK=aI;aC=aB;bJ=c[bK+4>>2]|0;c[aC>>2]=c[bK>>2];c[aC+4>>2]=bJ;c[ax+(aA<<4)+8>>2]=c[ax+(aH<<4)+8>>2];c[U>>2]=ax+(aH+6<<4);c[I>>2]=au;eG(b,aB,av>>>14&511);aB=c[K>>2]|0;c[U>>2]=c[(c[J>>2]|0)+8>>2];bJ=c[aB+(aA<<4)+8>>2]|0;if((bJ|0)==0){b_=au}else{aC=aB+(aA<<4)|0;aA=aB+(aw<<4)|0;bK=c[aC+4>>2]|0;c[aA>>2]=c[aC>>2];c[aA+4>>2]=bK;c[aB+(aw<<4)+8>>2]=bJ;b_=at+(((c[au>>2]|0)>>>14)-131070<<2)|0}ao=aB;at=b_+4|0;continue L1322;break};case 34:{aB=av>>>23;bJ=av>>>14&511;if((aB|0)==0){aw=((c[U>>2]|0)-aI>>4)-1|0;c[U>>2]=c[(c[J>>2]|0)+8>>2];b$=aw}else{b$=aB}if((bJ|0)==0){b0=at+8|0;b1=c[au>>2]|0}else{b0=au;b1=bJ}if((c[ax+(aH<<4)+8>>2]|0)!=5){ao=ax;at=b0;continue L1322}bJ=c[aI>>2]|0;aB=bJ;aw=b$-50+(b1*50|0)|0;if((aw|0)>(c[bJ+28>>2]|0)){f1(b,aB,aw)}if((b$|0)<=0){ao=ax;at=b0;continue L1322}bK=bJ+5|0;bJ=aw;aw=b$;while(1){aA=aw+aH|0;aC=ax+(aA<<4)|0;aD=bJ-1|0;az=gc(b,aB,bJ)|0;ay=aC;bI=az;bF=c[ay+4>>2]|0;c[bI>>2]=c[ay>>2];c[bI+4>>2]=bF;bF=ax+(aA<<4)+8|0;c[az+8>>2]=c[bF>>2];do{if((c[bF>>2]|0)>3){if((a[(c[aC>>2]|0)+5|0]&3)==0){break}if((a[bK]&4)==0){break}e2(b,aB)}}while(0);aC=aw-1|0;if((aC|0)>0){bJ=aD;aw=aC}else{ao=ax;at=b0;continue L1322}}break};case 35:{eU(b,aI);ao=ax;at=au;continue L1322;break};case 36:{aw=c[(c[(c[ap>>2]|0)+16>>2]|0)+(av>>>14<<2)>>2]|0;bJ=a[aw+72|0]|0;aB=bJ&255;bK=eP(b,aB,c[as>>2]|0)|0;aN=bK;c[bK+16>>2]=aw;if(bJ<<24>>24==0){b2=au}else{aw=(bJ&255)>1;bJ=0;bG=au;while(1){aC=c[bG>>2]|0;bF=aC>>>23;if((aC&63|0)==4){c[aN+20+(bJ<<2)>>2]=c[ar+(bF<<2)>>2]}else{c[aN+20+(bJ<<2)>>2]=eR(b,ax+(bF<<4)|0)|0}bF=bJ+1|0;if((bF|0)<(aB|0)){bJ=bF;bG=bG+4|0}else{break}}b2=at+((aw?aB+1|0:2)<<2)|0}c[aI>>2]=bK;c[ax+(aH<<4)+8>>2]=6;c[I>>2]=b2;bG=c[S>>2]|0;if((c[bG+68>>2]|0)>>>0>=(c[bG+64>>2]|0)>>>0){e1(b)}ao=c[K>>2]|0;at=b2;continue L1322;break};case 37:{bG=av>>>23;bJ=bG-1|0;aN=c[J>>2]|0;bF=aN|0;aC=((c[bF>>2]|0)-(c[aN+4>>2]|0)>>4)-(d[(c[ap>>2]|0)+73|0]|0)|0;aN=aC-1|0;if((bG|0)==0){c[I>>2]=au;if(((c[V>>2]|0)-(c[U>>2]|0)|0)<=(aN<<4|0)){eA(b,aN)}bG=c[K>>2]|0;c[U>>2]=bG+(aN+aH<<4);b3=bG;b4=bG+(aH<<4)|0;b5=aN}else{b3=ax;b4=aI;b5=bJ}if((b5|0)<=0){ao=b3;at=au;continue L1322}bJ=1-aC|0;aC=0;while(1){if((aC|0)<(aN|0)){bG=c[bF>>2]|0;az=aC+bJ|0;aA=bG+(az<<4)|0;bI=b4+(aC<<4)|0;ay=c[aA+4>>2]|0;c[bI>>2]=c[aA>>2];c[bI+4>>2]=ay;c[b4+(aC<<4)+8>>2]=c[bG+(az<<4)+8>>2]}else{c[b4+(aC<<4)+8>>2]=0}az=aC+1|0;if((az|0)<(b5|0)){aC=az}else{ao=b3;at=au;continue L1322}}break};default:{ao=ax;at=au;continue L1322}}}ao=c[J>>2]|0;ap=ao-24+4|0;ar=c[ap>>2]|0;as=c[ao+4>>2]|0;aq=ao-24|0;if((c[am>>2]|0)==0){b6=ar}else{eU(b,c[aq>>2]|0);b6=c[ap>>2]|0}ap=b6+((c[ao>>2]|0)-as>>4<<4)|0;c[aq>>2]=ap;c[K>>2]=ap;if(as>>>0<(c[U>>2]|0)>>>0){ap=0;aq=as;aC=ar;while(1){bJ=aq;bF=aC;aN=c[bJ+4>>2]|0;c[bF>>2]=c[bJ>>2];c[bF+4>>2]=aN;c[ar+(ap<<4)+8>>2]=c[as+(ap<<4)+8>>2];aN=ap+1|0;bF=as+(aN<<4)|0;bJ=ar+(aN<<4)|0;if(bF>>>0<(c[U>>2]|0)>>>0){ap=aN;aq=bF;aC=bJ}else{b7=bJ;break}}}else{b7=ar}c[U>>2]=b7;c[ao-24+8>>2]=b7;c[ao-24+12>>2]=c[I>>2];aC=ao-24+20|0;c[aC>>2]=(c[aC>>2]|0)+1;aC=(c[J>>2]|0)-24|0;c[J>>2]=aC;e=aC}if((aG|0)==1293){aG=0;an=an+1|0;continue}e=av>>>23;if((e|0)!=0){c[U>>2]=ax+(e-1+aH<<4)}if((c[am>>2]|0)!=0){eU(b,ax)}c[I>>2]=au;e=eD(b,aI)|0;aC=an-1|0;if((aC|0)==0){aG=1378;break}if((e|0)==0){an=aC;continue}c[U>>2]=c[(c[J>>2]|0)+8>>2];an=aC}if((aG|0)==999){c[I>>2]=at;i=f;return}else if((aG|0)==1372){es(b,2480,(bZ=i,i=i+1|0,i=i+7>>3<<3,c[bZ>>2]=0,bZ)|0);i=bZ}else if((aG|0)==1373){es(b,2480,(bZ=i,i=i+1|0,i=i+7>>3<<3,c[bZ>>2]=0,bZ)|0);i=bZ}else if((aG|0)==1374){es(b,2480,(bZ=i,i=i+1|0,i=i+7>>3<<3,c[bZ>>2]=0,bZ)|0);i=bZ}else if((aG|0)==1376){i=f;return}else if((aG|0)==1377){i=f;return}else if((aG|0)==1378){i=f;return}}function gs(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[b+16>>2]=a;c[b+8>>2]=d;c[b+12>>2]=e;c[b>>2]=0;c[b+4>>2]=0;return}function gt(a,b){a=a|0;b=b|0;c[b+8>>2]=a;c[b>>2]=b+12;c[b+4>>2]=0;return}function gu(a){a=a|0;var b=0,e=0,f=0,g=0,h=0;b=i;i=i+8|0;e=b|0;f=ch[c[a+8>>2]&511](c[a+16>>2]|0,c[a+12>>2]|0,e)|0;if((f|0)==0){g=-1;i=b;return g|0}h=c[e>>2]|0;if((h|0)==0){g=-1;i=b;return g|0}c[a>>2]=h-1;c[a+4>>2]=f+1;g=d[f]|0;i=b;return g|0}\
7840 function gv(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,j=0,k=0;b=i;i=i+8|0;e=b|0;f=a|0;do{if((c[f>>2]|0)==0){g=ch[c[a+8>>2]&511](c[a+16>>2]|0,c[a+12>>2]|0,e)|0;if((g|0)==0){h=-1;i=b;return h|0}j=c[e>>2]|0;if((j|0)==0){h=-1;i=b;return h|0}else{c[f>>2]=j;c[a+4>>2]=g;k=g;break}}else{k=c[a+4>>2]|0}}while(0);h=d[k]|0;i=b;return h|0}function gw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;i=i+8|0;f=e|0;if((d|0)==0){g=0;i=e;return g|0}h=a|0;j=a+16|0;k=a+8|0;l=a+12|0;m=a+4|0;a=b;b=d;d=c[h>>2]|0;while(1){if((d|0)==0){n=ch[c[k>>2]&511](c[j>>2]|0,c[l>>2]|0,f)|0;if((n|0)==0){g=b;o=1410;break}p=c[f>>2]|0;if((p|0)==0){g=b;o=1409;break}c[h>>2]=p;c[m>>2]=n;q=p;r=n}else{q=d;r=c[m>>2]|0}n=b>>>0>q>>>0?q:b;j$(a|0,r|0,n)|0;p=(c[h>>2]|0)-n|0;c[h>>2]=p;c[m>>2]=(c[m>>2]|0)+n;if((b|0)==(n|0)){g=0;o=1408;break}else{a=a+n|0;b=b-n|0;d=p}}if((o|0)==1409){i=e;return g|0}else if((o|0)==1408){i=e;return g|0}else if((o|0)==1410){i=e;return g|0}return 0}function gx(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=b+8|0;f=c[e>>2]|0;if(f>>>0>=d>>>0){g=c[b>>2]|0;return g|0}h=d>>>0<32?32:d;if((h+1|0)>>>0<4294967294){d=b|0;i=fu(a,c[d>>2]|0,f,h)|0;j=d}else{i=fv(a)|0;j=b|0}c[j>>2]=i;c[e>>2]=h;g=i;return g|0}function gy(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+104|0;f=e|0;if((ej(a,0,f)|0)==0){g=gz(a,6560,(h=i,i=i+16|0,c[h>>2]=b,c[h+8>>2]=d,h)|0)|0;i=h;j=g;i=e;return j|0}en(a,9736,f)|0;do{if((aL(c[f+8>>2]|0,7800)|0)==0){g=b-1|0;if((g|0)!=0){k=g;break}g=gz(a,5928,(h=i,i=i+16|0,c[h>>2]=c[f+4>>2],c[h+8>>2]=d,h)|0)|0;i=h;j=g;i=e;return j|0}else{k=b}}while(0);b=f+4|0;f=c[b>>2]|0;if((f|0)==0){c[b>>2]=4656;l=4656}else{l=f}f=gz(a,3912,(h=i,i=i+24|0,c[h>>2]=k,c[h+8>>2]=l,c[h+16>>2]=d,h)|0)|0;i=h;j=f;i=e;return j|0}function gz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+120|0;f=e|0;g=e+104|0;h=g|0;j=g;c[j>>2]=d;c[j+4>>2]=0;do{if((ej(a,1,f)|0)!=0){en(a,2816,f)|0;j=c[f+20>>2]|0;if((j|0)<=0){break}d=f+36|0;dc(a,2464,(g=i,i=i+16|0,c[g>>2]=d,c[g+8>>2]=j,g)|0)|0;i=g;k=db(a,b,h)|0;dG(a,2);l=dE(a)|0;i=e;return l|0}}while(0);c9(a,10520,0);k=db(a,b,h)|0;dG(a,2);l=dE(a)|0;i=e;return l|0}function gA(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;f=cL(a,cK(a,b)|0)|0;g=dc(a,3328,(h=i,i=i+16|0,c[h>>2]=d,c[h+8>>2]=f,h)|0)|0;i=h;h=gy(a,b,g)|0;i=e;return h|0}function gB(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+104|0;e=d|0;do{if((ej(a,b,e)|0)!=0){en(a,2816,e)|0;f=c[e+20>>2]|0;if((f|0)<=0){break}g=e+36|0;dc(a,2464,(h=i,i=i+16|0,c[h>>2]=g,c[h+8>>2]=f,h)|0)|0;i=h;i=d;return}}while(0);c9(a,10520,0);i=d;return}function gC(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;do{if((d|0)==0){g=c0(a,b,0)|0;if((g|0)!=0){h=g;break}g=cL(a,4)|0;j=cL(a,cK(a,b)|0)|0;k=dc(a,3328,(l=i,i=i+16|0,c[l>>2]=g,c[l+8>>2]=j,l)|0)|0;i=l;gy(a,b,k)|0;h=0}else{h=gD(a,b,d,0)|0}}while(0);d=0;while(1){k=c[e+(d<<2)>>2]|0;if((k|0)==0){break}if((aL(k|0,h|0)|0)==0){m=d;n=1457;break}else{d=d+1|0}}if((n|0)==1457){i=f;return m|0}n=dc(a,10352,(l=i,i=i+8|0,c[l>>2]=h,l)|0)|0;i=l;m=gy(a,b,n)|0;i=f;return m|0}function gD(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;if((cK(a,b)|0)>=1){g=c0(a,b,e)|0;if((g|0)!=0){h=g;i=f;return h|0}g=cL(a,4)|0;j=cL(a,cK(a,b)|0)|0;k=dc(a,3328,(l=i,i=i+16|0,c[l>>2]=g,c[l+8>>2]=j,l)|0)|0;i=l;gy(a,b,k)|0;h=0;i=f;return h|0}if((e|0)==0){h=d;i=f;return h|0}if((d|0)==0){m=0}else{m=j_(d|0)|0}c[e>>2]=m;h=d;i=f;return h|0}function gE(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;f=c0(a,b,d)|0;if((f|0)!=0){i=e;return f|0}d=cL(a,4)|0;g=cL(a,cK(a,b)|0)|0;h=dc(a,3328,(j=i,i=i+16|0,c[j>>2]=d,c[j+8>>2]=g,j)|0)|0;i=j;gy(a,b,h)|0;i=e;return f|0}function gF(a,b){a=a|0;b=b|0;var c=0;df(a,-1e4,b);if((cK(a,-1)|0)!=0){c=0;return c|0}cG(a,-2);di(a,0,0);cJ(a,-1);dm(a,-1e4,b);c=1;return c|0}function gG(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;f=cZ(a,b)|0;do{if((f|0)!=0){if((dj(a,b)|0)==0){break}df(a,-1e4,d);if((cT(a,-1,-2)|0)==0){break}cG(a,-3);g=f;i=e;return g|0}}while(0);f=cL(a,cK(a,b)|0)|0;h=dc(a,3328,(j=i,i=i+16|0,c[j>>2]=d,c[j+8>>2]=f,j)|0)|0;i=j;gy(a,b,h)|0;g=0;i=e;return g|0}function gH(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=i;if((cN(a,b)|0)!=0){i=e;return}gz(a,10176,(a=i,i=i+8|0,c[a>>2]=d,a)|0)|0;i=a;i=e;return}function gI(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;if((cK(a,b)|0)==(d|0)){i=e;return}f=cL(a,d)|0;d=cL(a,cK(a,b)|0)|0;g=dc(a,3328,(h=i,i=i+16|0,c[h>>2]=f,c[h+8>>2]=d,h)|0)|0;i=h;gy(a,b,g)|0;i=e;return}function gJ(a,b){a=a|0;b=b|0;if((cK(a,b)|0)!=-1){return}gy(a,b,9896)|0;return}function gK(a,b){a=a|0;b=b|0;var d=0,e=0.0,f=0,g=0,h=0,j=0;d=i;e=+cW(a,b);if(e!=0.0){i=d;return+e}if((cS(a,b)|0)!=0){i=d;return+e}f=cL(a,3)|0;g=cL(a,cK(a,b)|0)|0;h=dc(a,3328,(j=i,i=i+16|0,c[j>>2]=f,c[j+8>>2]=g,j)|0)|0;i=j;gy(a,b,h)|0;i=d;return+e}function gL(a,b,c){a=a|0;b=b|0;c=+c;var d=0.0;if((cK(a,b)|0)<1){d=c;return+d}d=+gK(a,b);return+d}function gM(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;e=c$(a,b)|0;if((e|0)!=0){i=d;return e|0}if((cS(a,b)|0)!=0){i=d;return e|0}f=cL(a,3)|0;g=cL(a,cK(a,b)|0)|0;h=dc(a,3328,(j=i,i=i+16|0,c[j>>2]=f,c[j+8>>2]=g,j)|0)|0;i=j;gy(a,b,h)|0;i=d;return e|0}function gN(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((cK(a,b)|0)<1){d=c;return d|0}d=gM(a,b)|0;return d|0}function gO(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((dj(a,b)|0)==0){d=0;return d|0}da(a,c);dg(a,-2);if((cK(a,-1)|0)==0){cG(a,-3);d=0;return d|0}else{cH(a,-2);d=1;return d|0}return 0}function gP(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if((b+9999|0)>>>0>9999){d=b}else{d=b+1+(cF(a)|0)|0}if((dj(a,d)|0)==0){e=0;return e|0}da(a,c);dg(a,-2);if((cK(a,-1)|0)==0){cG(a,-3);e=0;return e|0}else{cH(a,-2);cJ(a,d);dw(a,1,1);e=1;return e|0}return 0}function gQ(a,b,c){a=a|0;b=b|0;c=c|0;gR(a,b,c,0);return}function gR(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;g=d|0;if((b|0)!=0){if((c[g>>2]|0)==0){h=0}else{j=d;d=0;while(1){k=d+1|0;l=j+8|0;if((c[l>>2]|0)==0){h=k;break}else{j=l;d=k}}}gS(a,-1e4,9680,1)|0;df(a,-1,b);if((cK(a,-1)|0)!=5){cG(a,-2);if((gS(a,-10002,b,h)|0)!=0){gz(a,9464,(h=i,i=i+8|0,c[h>>2]=b,h)|0)|0;i=h}cJ(a,-1);dm(a,-3,b)}cH(a,-2);cI(a,~e)}if((c[g>>2]|0)==0){m=~e;cG(a,m);i=f;return}b=-2-e|0;h=-e|0;if((e|0)>0){n=g}else{d=g;do{dd(a,c[d+4>>2]|0,e);dm(a,b,c[d>>2]|0);d=d+8|0;}while((c[d>>2]|0)!=0);m=~e;cG(a,m);i=f;return}do{d=0;do{cJ(a,h);d=d+1|0;}while((d|0)<(e|0));dd(a,c[n+4>>2]|0,e);dm(a,b,c[n>>2]|0);n=n+8|0;}while((c[n>>2]|0)!=0);m=~e;cG(a,m);i=f;return}function gS(b,c,d,e){b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;cJ(b,c);c=d;while(1){d=aU(c|0,46)|0;if((d|0)==0){f=c+(j_(c|0)|0)|0}else{f=d}d=f-c|0;c9(b,c,d);dg(b,-2);if((cK(b,-1)|0)==0){cG(b,-2);di(b,0,(a[f]|0)==46?1:e);c9(b,c,d);cJ(b,-2);dl(b,-4)}else{if((cK(b,-1)|0)!=5){break}}cH(b,-2);if((a[f]|0)==46){c=f+1|0}else{g=0;h=1573;break}}if((h|0)==1573){return g|0}cG(b,-3);g=c;return g|0}function gT(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;g=i;i=i+1040|0;h=g|0;j=j_(e|0)|0;k=h+8|0;c[k>>2]=b;l=h+12|0;m=h|0;c[m>>2]=l;n=h+4|0;c[n>>2]=0;o=aF(d|0,e|0)|0;if((o|0)==0){p=d}else{q=h+1036|0;r=d;d=o;while(1){L2080:do{if((d|0)!=(r|0)){o=r;s=d-r|0;while(1){t=s-1|0;u=c[m>>2]|0;if(u>>>0<q>>>0){v=u}else{gY(h)|0;v=c[m>>2]|0}u=a[o]|0;c[m>>2]=v+1;a[v]=u;if((t|0)==0){break L2080}o=o+1|0;s=t}}}while(0);s=j_(f|0)|0;L2089:do{if((s|0)!=0){o=f;t=s;while(1){u=t-1|0;w=c[m>>2]|0;if(w>>>0<q>>>0){x=w}else{gY(h)|0;x=c[m>>2]|0}w=a[o]|0;c[m>>2]=x+1;a[x]=w;if((u|0)==0){break L2089}o=o+1|0;t=u}}}while(0);s=d+j|0;t=aF(s|0,e|0)|0;if((t|0)==0){p=s;break}else{r=s;d=t}}}d=j_(p|0)|0;L2098:do{if((d|0)!=0){r=h+1036|0;e=p;j=d;while(1){x=j-1|0;q=c[m>>2]|0;if(q>>>0<r>>>0){y=q}else{gY(h)|0;y=c[m>>2]|0}q=a[e]|0;c[m>>2]=y+1;a[y]=q;if((x|0)==0){break L2098}e=e+1|0;j=x}}}while(0);y=c[m>>2]|0;if((y|0)==(l|0)){z=c[n>>2]|0;A=c[k>>2]|0;dG(A,z);c[n>>2]=1;B=c0(b,-1,0)|0;i=g;return B|0}else{c9(c[k>>2]|0,l,y-l|0);c[m>>2]=l;l=(c[n>>2]|0)+1|0;c[n>>2]=l;z=l;A=c[k>>2]|0;dG(A,z);c[n>>2]=1;B=c0(b,-1,0)|0;i=g;return B|0}return 0}function gU(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;a=b+4|0;e=c[a>>2]|0;if((e|0)==0){f=0;return f|0}c[d>>2]=e;c[a>>2]=0;f=c[b>>2]|0;return f|0}function gV(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if((e|0)==0){return}f=b|0;g=b+1036|0;h=d;d=e;while(1){e=d-1|0;i=c[f>>2]|0;if(i>>>0<g>>>0){j=i}else{gY(b)|0;j=c[f>>2]|0}i=a[h]|0;c[f>>2]=j+1;a[j]=i;if((e|0)==0){break}else{h=h+1|0;d=e}}return}function gW(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=j_(d|0)|0;if((e|0)==0){return}f=b|0;g=b+1036|0;h=d;d=e;while(1){e=d-1|0;i=c[f>>2]|0;if(i>>>0<g>>>0){j=i}else{gY(b)|0;j=c[f>>2]|0}i=a[h]|0;c[f>>2]=j+1;a[j]=i;if((e|0)==0){break}else{h=h+1|0;d=e}}return}function gX(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=a|0;d=c[b>>2]|0;e=a+12|0;if((d|0)==(e|0)){f=c[a+4>>2]|0;g=a+8|0}else{h=a+8|0;c9(c[h>>2]|0,e,d-e|0);c[b>>2]=e;e=a+4|0;b=(c[e>>2]|0)+1|0;c[e>>2]=b;f=b;g=h}dG(c[g>>2]|0,f);c[a+4>>2]=1;return}function gY(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=a|0;d=c[b>>2]|0;e=a+12|0;if((d|0)==(e|0)){return e|0}f=a+8|0;c9(c[f>>2]|0,e,d-e|0);c[b>>2]=e;b=a+4|0;a=c[b>>2]|0;c[b>>2]=a+1;if((a|0)<=0){return e|0}a=c[f>>2]|0;f=1;d=c1(a,-1)|0;while(1){g=f+1|0;h=c1(a,~f)|0;i=c[b>>2]|0;if(!((1-f+i|0)>9|d>>>0>h>>>0)){j=f;break}if((g|0)<(i|0)){f=g;d=h+d|0}else{j=g;break}}dG(a,j);c[b>>2]=1-j+(c[b>>2]|0);return e|0}function gZ(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=i;i=i+8|0;d=b|0;e=a+8|0;f=c[e>>2]|0;g=c0(f,-1,d)|0;h=c[d>>2]|0;j=a|0;k=c[j>>2]|0;l=a+12|0;m=k;n=l;if(h>>>0<=(n+1024-m|0)>>>0){j$(k|0,g|0,h)|0;c[j>>2]=(c[j>>2]|0)+(c[d>>2]|0);cG(f,-2);i=b;return}if((k|0)==(l|0)){o=a+4|0}else{c9(c[e>>2]|0,l,m-n|0);c[j>>2]=l;l=a+4|0;c[l>>2]=(c[l>>2]|0)+1;cI(f,-2);o=l}l=c[o>>2]|0;c[o>>2]=l+1;if((l|0)<=0){i=b;return}l=c[e>>2]|0;e=1;f=c1(l,-1)|0;while(1){a=e+1|0;j=c1(l,~e)|0;n=c[o>>2]|0;if(!((1-e+n|0)>9|f>>>0>j>>>0)){p=e;break}if((a|0)<(n|0)){e=a;f=j+f|0}else{p=a;break}}dG(l,p);c[o>>2]=1-p+(c[o>>2]|0);i=b;return}function g_(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;if((b+9999|0)>>>0>9999){c=b}else{c=b+1+(cF(a)|0)|0}if((cK(a,-1)|0)==0){cG(a,-2);d=-1;return d|0}dh(a,c,0);b=c$(a,-1)|0;cG(a,-2);if((b|0)==0){e=(c1(a,c)|0)+1|0}else{dh(a,c,b);dp(a,c,0);e=b}dp(a,c,e);d=e;return d|0}function g$(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((c|0)<=-1){return}if((b+9999|0)>>>0>9999){d=b}else{d=b+1+(cF(a)|0)|0}dh(a,d,0);dp(a,d,c);c5(a,c);dp(a,d,0);return}function g0(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=i;i=i+1032|0;e=d|0;f=(cF(a)|0)+1|0;g=e|0;c[g>>2]=0;h=(b|0)==0;do{if(h){c9(a,9256,6);j=c[m>>2]|0;c[e+4>>2]=j;k=j}else{dc(a,9128,(l=i,i=i+8|0,c[l>>2]=b,l)|0)|0;i=l;j=bl(b|0,8984)|0;c[e+4>>2]=j;if((j|0)!=0){k=j;break}j=bF(c[(bE()|0)>>2]|0)|0;n=(c0(a,f,0)|0)+1|0;dc(a,7280,(l=i,i=i+24|0,c[l>>2]=8824,c[l+8>>2]=n,c[l+16>>2]=j,l)|0)|0;i=l;cH(a,f);o=6;i=d;return o|0}}while(0);j=e+4|0;n=aQ(k|0)|0;L2199:do{if((n|0)==35){c[g>>2]=1;while(1){k=aQ(c[j>>2]|0)|0;if((k|0)==10){break}else if((k|0)==(-1|0)){p=-1;break L2199}}q=aQ(c[j>>2]|0)|0;r=1676}else{q=n;r=1676}}while(0);do{if((r|0)==1676){if((q|0)!=27|h){p=q;break}n=a1(b|0,8440,c[j>>2]|0)|0;c[j>>2]=n;if((n|0)==0){k=bF(c[(bE()|0)>>2]|0)|0;s=(c0(a,f,0)|0)+1|0;dc(a,7280,(l=i,i=i+24|0,c[l>>2]=8224,c[l+8>>2]=s,c[l+16>>2]=k,l)|0)|0;i=l;cH(a,f);o=6;i=d;return o|0}else{t=n}while(1){u=aQ(t|0)|0;if((u|0)==(-1|0)|(u|0)==27){break}t=c[j>>2]|0}c[g>>2]=0;p=u}}while(0);bI(p|0,c[j>>2]|0)|0;p=dB(a,254,e,c0(a,-1,0)|0)|0;e=c[j>>2]|0;j=a4(e|0)|0;if(!h){ar(e|0)|0}if((j|0)==0){cH(a,f);o=p;i=d;return o|0}else{cG(a,f);p=bF(c[(bE()|0)>>2]|0)|0;j=(c0(a,f,0)|0)+1|0;dc(a,7280,(l=i,i=i+24|0,c[l>>2]=7960,c[l+8>>2]=j,c[l+16>>2]=p,l)|0)|0;i=l;cH(a,f);o=6;i=d;return o|0}return 0}function g1(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;a=b;if((c[a>>2]|0)!=0){c[a>>2]=0;c[d>>2]=1;e=7520;return e|0}a=b+4|0;if((bQ(c[a>>2]|0)|0)!=0){e=0;return e|0}f=b+8|0;b=bw(f|0,1,1024,c[a>>2]|0)|0;c[d>>2]=b;e=(b|0)==0?0:f;return e|0}function g2(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=i;i=i+8|0;g=f|0;c[g>>2]=b;c[g+4>>2]=d;d=dB(a,256,g,e)|0;i=f;return d|0}function g3(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+8|0;e=d|0;f=j_(b|0)|0;c[e>>2]=b;c[e+4>>2]=f;f=dB(a,256,e,b)|0;i=d;return f|0}function g4(){var a=0;a=fV(254,0)|0;if((a|0)==0){return a|0}cE(a,332)|0;return a|0}function g5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if((d|0)==0){jV(b);e=0}else{e=jW(b,d)|0}return e|0}function g6(a){a=a|0;var b=0,d=0,e=0;b=i;d=c[n>>2]|0;e=c0(a,-1,0)|0;bN(d|0,7712|0,(d=i,i=i+8|0,c[d>>2]=e,d)|0)|0;i=d;i=b;return 0}function g7(a){a=a|0;cJ(a,-10002);dm(a,-10002,9248);gQ(a,9248,1864);c9(a,9120,7);dm(a,-10002,8968);dd(a,404,0);dd(a,502,1);dm(a,-2,8816);dd(a,264,0);dd(a,254,1);dm(a,-2,8616);di(a,0,1);cJ(a,-1);dq(a,-2)|0;c9(a,8432,2);dm(a,-2,8216);dd(a,352,1);dm(a,-10002,7944);gQ(a,6064,1808);return 2}function g8(a){a=a|0;var b=0,c=0;b=cO(a)|0;if((cK(a,1)|0)==6){if((cM(a,1)|0)!=0){c=1715}}else{c=1715}if((c|0)==1715){gy(a,1,9440)|0}cJ(a,1);cC(a,b,1);return 1}function g9(a){a=a|0;var b=0,c=0,d=0;b=c_(a,1)|0;if((b|0)==0){gy(a,1,9656)|0}c=hf(a,b,(cF(a)|0)-1|0)|0;if((c|0)<0){c6(a,0);cI(a,-2);d=2;return d|0}else{c6(a,1);cI(a,~c);d=c+1|0;return d|0}return 0}function ha(a){a=a|0;if((c8(a)|0)!=0){c3(a)}return 1}function hb(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+104|0;d=b|0;e=c_(a,1)|0;if((e|0)==0){gy(a,1,9656)|0}do{if((e|0)==(a|0)){f=0}else{g=dr(e)|0;if((g|0)==1){f=1;break}else if((g|0)!=0){f=3;break}if((ej(e,0,d)|0)>0){f=2;break}f=(cF(e)|0)==0?3:1}}while(0);da(a,c[312+(f<<2)>>2]|0);i=b;return 1}function hc(a){a=a|0;var b=0,c=0;b=cO(a)|0;if((cK(a,1)|0)==6){if((cM(a,1)|0)!=0){c=1738}}else{c=1738}if((c|0)==1738){gy(a,1,9440)|0}cJ(a,1);cC(a,b,1);dd(a,316,1);return 1}function hd(a){a=a|0;return eI(a,cF(a)|0)|0}function he(a){a=a|0;var b=0,c=0;b=c_(a,-10003)|0;c=hf(a,b,cF(a)|0)|0;if((c|0)>=0){return c|0}if((cQ(a,-1)|0)!=0){gB(a,1);cI(a,-2);dG(a,2)}dE(a)|0;return c|0}function hf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+104|0;f=e|0;do{if((a|0)==(b|0)){g=0}else{h=dr(b)|0;if((h|0)==1){g=1;break}else if((h|0)!=0){g=3;break}if((ej(b,0,f)|0)>0){g=2;break}g=(cF(b)|0)==0?3:1}}while(0);if((cN(b,d)|0)==0){gz(a,2784,(j=i,i=i+1|0,i=i+7>>3<<3,c[j>>2]=0,j)|0)|0;i=j}if((g|0)!=1){f=c[312+(g<<2)>>2]|0;dc(a,2432,(j=i,i=i+8|0,c[j>>2]=f,j)|0)|0;i=j;k=-1;i=e;return k|0}cC(a,b,d);cD(a,b);if((eE(b,d)|0)>>>0>=2){cC(b,a,1);k=-1;i=e;return k|0}d=cF(b)|0;if((cN(a,d+1|0)|0)==0){gz(a,2200,(j=i,i=i+1|0,i=i+7>>3<<3,c[j>>2]=0,j)|0)|0;i=j}cC(b,a,d);k=d;i=e;return k|0}function hg(a){a=a|0;gI(a,1,5);cJ(a,-10003);cJ(a,1);c5(a,0);return 3}function hh(a){a=a|0;var b=0,c=0;b=gM(a,2)|0;gI(a,1,5);c=b+1|0;c5(a,c);dh(a,1,c);return((cK(a,-1)|0)==0?0:2)|0}function hi(a){a=a|0;gI(a,1,5);cJ(a,-10003);cJ(a,1);c3(a);return 3}function hj(a){a=a|0;var b=0;gI(a,1,5);cG(a,2);if((dF(a,1)|0)!=0){b=2;return b|0}c3(a);b=1;return b|0}function hk(a){a=a|0;var b=0,c=0;cG(a,1);dH(a,0)|0;if((cX(a,1)|0)==0){return 1}if((cK(a,1)|0)==1){di(a,0,0);cJ(a,-1);c6(a,1);dn(a,-10003)}else{if((dj(a,1)|0)==0){b=1779}else{dg(a,-10003);c=cX(a,-1)|0;cG(a,-2);if((c|0)==0){b=1779}}if((b|0)==1779){gy(a,1,7680)|0}dj(a,1)|0}dq(a,2)|0;return 1}function hl(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;gJ(a,1);if((cX(a,1)|0)==0){d=gD(a,2,2632,0)|0;e=gz(a,2664,(f=i,i=i+8|0,c[f>>2]=d,f)|0)|0;i=f;g=e;i=b;return g|0}else{g=cF(a)|0;i=b;return g|0}return 0}function hm(a){a=a|0;var b=0,d=0,e=0;b=gC(a,1,2896,1336)|0;d=gN(a,2,0)|0;e=c[1304+(b<<2)>>2]|0;b=dD(a,e,d)|0;if((e|0)==3){c4(a,+(b|0)+ +(dD(a,4,0)|0)*.0009765625);return 1}else if((e|0)==5){c6(a,b);return 1}else{c4(a,+(b|0));return 1}return 0}function hn(a){a=a|0;var b=0,c=0;b=gD(a,1,0,0)|0;c=cF(a)|0;if((g0(a,b)|0)!=0){dE(a)|0}dw(a,0,-1);return(cF(a)|0)-c|0}function ho(a){a=a|0;var b=0,c=0;b=gN(a,2,1)|0;cG(a,1);if(!((cQ(a,1)|0)!=0&(b|0)>0)){c=dE(a)|0;return c|0}gB(a,b);cJ(a,1);dG(a,2);c=dE(a)|0;return c|0}function hp(a){a=a|0;c5(a,dD(a,3,0)|0);return 1}function hq(a){a=a|0;hI(a,1);if((cM(a,-1)|0)==0){dk(a,-1);return 1}else{cJ(a,-10002);return 1}return 0}function hr(a){a=a|0;gJ(a,1);if((dj(a,1)|0)==0){c3(a);return 1}else{gO(a,1,3752)|0;return 1}return 0}function hs(a){a=a|0;var b=0;if((g0(a,gD(a,1,0,0)|0)|0)==0){b=1;return b|0}c3(a);cI(a,-2);b=2;return b|0}function ht(a){a=a|0;var b=0,c=0;b=gD(a,2,3024,0)|0;gI(a,1,6);cG(a,3);if((dB(a,252,0,b)|0)==0){c=1;return c|0}c3(a);cI(a,-2);c=2;return c|0}function hu(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+8|0;d=b|0;e=gE(a,1,d)|0;f=gD(a,2,e,0)|0;if((g2(a,e,c[d>>2]|0,f)|0)==0){g=1;i=b;return g|0}c3(a);cI(a,-2);g=2;i=b;return g|0}function hv(a){a=a|0;gJ(a,1);c6(a,(dx(a,(cF(a)|0)-1|0,-1,0)|0)==0|0);cI(a,1);return cF(a)|0}function hw(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;d=cF(a)|0;df(a,-10002,4536);L2389:do{if((d|0)>=1){e=1;while(1){cJ(a,-1);cJ(a,e);dw(a,1,1);f=c0(a,-1,0)|0;if((f|0)==0){break}if((e|0)>1){g=c[o>>2]|0;av(9,g|0)|0}az(f|0,c[o>>2]|0)|0;cG(a,-2);e=e+1|0;if((e|0)>(d|0)){break L2389}}e=gz(a,3232,(f=i,i=i+1|0,i=i+7>>3<<3,c[f>>2]=0,f)|0)|0;i=f;h=e;i=b;return h|0}}while(0);av(10,c[o>>2]|0)|0;h=0;i=b;return h|0}function hx(a){a=a|0;gJ(a,1);gJ(a,2);c6(a,cT(a,1,2)|0);return 1}function hy(a){a=a|0;gI(a,1,5);gJ(a,2);cG(a,2);dg(a,1);return 1}function hz(a){a=a|0;gI(a,1,5);gJ(a,2);gJ(a,3);cG(a,3);dn(a,1);return 1}function hA(b){b=b|0;var c=0,d=0,e=0,f=0;c=cF(b)|0;do{if((cK(b,1)|0)==4){if((a[c0(b,1,0)|0]|0)!=35){break}c5(b,c-1|0);d=1;return d|0}}while(0);e=gM(b,1)|0;if((e|0)<0){f=e+c|0}else{f=(e|0)>(c|0)?c:e}if((f|0)<=0){gy(b,1,3296)|0}d=c-f|0;return d|0}function hB(a){a=a|0;var b=0,d=0;b=i;gI(a,2,5);hI(a,0);cJ(a,2);do{if((cS(a,1)|0)!=0){if(+cW(a,1)!=0.0){break}c8(a)|0;cI(a,-2);dv(a,-2)|0;d=0;i=b;return d|0}}while(0);do{if((cM(a,-2)|0)==0){if((dv(a,-2)|0)==0){break}else{d=1}i=b;return d|0}}while(0);gz(a,3640,(a=i,i=i+1|0,i=i+7>>3<<3,c[a>>2]=0,a)|0)|0;i=a;d=1;i=b;return d|0}function hC(a){a=a|0;var b=0,d=0,e=0;b=i;d=cK(a,2)|0;gI(a,1,5);if(!((d|0)==5|(d|0)==0)){gy(a,2,3816)|0}if((gO(a,1,3752)|0)==0){cG(a,2);e=dq(a,1)|0;i=b;return 1}gz(a,3696,(d=i,i=i+1|0,i=i+7>>3<<3,c[d>>2]=0,d)|0)|0;i=d;cG(a,2);e=dq(a,1)|0;i=b;return 1}function hD(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+8|0;f=e|0;g=gN(b,2,10)|0;do{if((g|0)==10){gJ(b,1);if((cS(b,1)|0)==0){break}c4(b,+cW(b,1));i=e;return 1}else{h=gE(b,1,0)|0;if((g-2|0)>>>0>=35){gy(b,2,3856)|0}j=as(h|0,f|0,g|0)|0;k=c[f>>2]|0;if((h|0)==(k|0)){break}if((aB(d[k]|0)|0)==0){l=k}else{h=k;do{h=h+1|0;}while((aB(d[h]|0)|0)!=0);c[f>>2]=h;l=h}if((a[l]|0)!=0){break}c4(b,+(j>>>0>>>0));i=e;return 1}}while(0);c3(b);i=e;return 1}function hE(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;gJ(a,1);do{if((gP(a,1,4160)|0)==0){d=cK(a,1)|0;if((d|0)==1){da(a,(cX(a,1)|0)!=0?4096:4056);break}else if((d|0)==4){cJ(a,1);break}else if((d|0)==3){da(a,c0(a,1,0)|0);break}else if((d|0)==0){c9(a,4016,3);break}else{d=cL(a,cK(a,1)|0)|0;e=c2(a,1)|0;dc(a,3944,(f=i,i=i+16|0,c[f>>2]=d,c[f+8>>2]=e,f)|0)|0;i=f;break}}}while(0);i=b;return 1}function hF(a){a=a|0;gJ(a,1);da(a,cL(a,cK(a,1)|0)|0);return 1}function hG(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0;b=i;gI(a,1,5);d=gN(a,2,1)|0;if((cK(a,3)|0)<1){e=c1(a,1)|0}else{e=gM(a,3)|0}if((d|0)>(e|0)){f=0;i=b;return f|0}g=e-d|0;h=g+1|0;do{if((g|0)>=0){if((cN(a,h)|0)==0){break}dh(a,1,d);if((d|0)<(e|0)){j=d}else{f=h;i=b;return f|0}while(1){k=j+1|0;dh(a,1,k);if((k|0)<(e|0)){j=k}else{f=h;break}}i=b;return f|0}}while(0);h=gz(a,4192,(a=i,i=i+1|0,i=i+7>>3<<3,c[a>>2]=0,a)|0)|0;i=a;f=h;i=b;return f|0}function hH(a){a=a|0;gJ(a,2);cG(a,2);cI(a,1);c6(a,(dx(a,0,-1,1)|0)==0|0);cP(a,1);return cF(a)|0}function hI(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+104|0;e=d|0;if((cK(a,1)|0)==6){cJ(a,1);i=d;return}if((b|0)==0){f=gM(a,1)|0}else{f=gN(a,1,1)|0}if((f|0)<=-1){gy(a,1,3608)|0}if((ej(a,f,e)|0)==0){gy(a,1,3560)|0}en(a,3552,e)|0;if((cK(a,-1)|0)!=0){i=d;return}gz(a,3448,(a=i,i=i+8|0,c[a>>2]=f,a)|0)|0;i=a;i=d;return}function hJ(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;b=i;gH(a,2,2992);cJ(a,1);dw(a,0,1);if((cK(a,-1)|0)==0){c[d>>2]=0;e=0;i=b;return e|0}if((cQ(a,-1)|0)==0){gz(a,2952,(f=i,i=i+1|0,i=i+7>>3<<3,c[f>>2]=0,f)|0)|0;i=f;e=0;i=b;return e|0}else{cP(a,3);e=c0(a,3,d)|0;i=b;return e|0}return 0}function hK(a){a=a|0;gQ(a,5440,1688);return 1}function hL(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+256|0;aw(4080,11,1,c[n>>2]|0)|0;d=b|0;if((aS(d|0,250,c[m>>2]|0)|0)==0){i=b;return 0}while(1){if((aL(d|0,4040)|0)==0){e=1950;break}if((g2(a,d,j_(d|0)|0,3984)|0)==0){if((dx(a,0,0,0)|0)!=0){e=1948}}else{e=1948}if((e|0)==1948){e=0;f=c0(a,-1,0)|0;g=c[n>>2]|0;az(f|0,g|0)|0;g=c[n>>2]|0;av(10,g|0)|0}cG(a,0);aw(4080,11,1,c[n>>2]|0)|0;if((aS(d|0,250,c[m>>2]|0)|0)==0){e=1951;break}}if((e|0)==1951){i=b;return 0}else if((e|0)==1950){i=b;return 0}return 0}function hM(a){a=a|0;gJ(a,1);dk(a,1);return 1}function hN(b){b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;c=i;i=i+8|0;d=c|0;if((cK(b,1)|0)==8){e=c_(b,1)|0}else{e=b}f=eh(e)|0;g=eg(e)|0;if((g|0)!=0&(g|0)!=262){c9(b,4144,13)}else{h$(b);c7(b,e);dg(b,-2);cH(b,-2)}g=d|0;if((f&1|0)==0){h=0}else{a[g]=99;h=1}if((f&2|0)==0){j=h}else{a[d+h|0]=114;j=h+1|0}if((f&4|0)==0){k=j;l=d+k|0;a[l]=0;da(b,g);m=ei(e)|0;c5(b,m);i=c;return 3}a[d+j|0]=108;k=j+1|0;l=d+k|0;a[l]=0;da(b,g);m=ei(e)|0;c5(b,m);i=c;return 3}function hO(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+104|0;d=b|0;if((cK(a,1)|0)==8){e=c_(a,1)|0;f=1}else{e=a;f=0}g=f|2;h=gD(a,g,5744,0)|0;j=f+1|0;do{if((cS(a,j)|0)==0){if((cK(a,j)|0)==6){dc(a,5648,(f=i,i=i+8|0,c[f>>2]=h,f)|0)|0;i=f;f=c0(a,-1,0)|0;cJ(a,j);cC(a,e,1);k=f;break}l=gy(a,j,5560)|0;i=b;return l|0}else{if((ej(e,c$(a,j)|0,d)|0)!=0){k=h;break}c3(a);l=1;i=b;return l|0}}while(0);if((en(e,k,d)|0)==0){l=gy(a,g,5424)|0;i=b;return l|0}di(a,0,2);if((aU(k|0,83)|0)!=0){da(a,c[d+16>>2]|0);dm(a,-2,5320);da(a,d+36|0);dm(a,-2,5208);c5(a,c[d+28>>2]|0);dm(a,-2,5072);c5(a,c[d+32>>2]|0);dm(a,-2,4920);da(a,c[d+12>>2]|0);dm(a,-2,4816)}if((aU(k|0,108)|0)!=0){c5(a,c[d+20>>2]|0);dm(a,-2,4616)}if((aU(k|0,117)|0)!=0){c5(a,c[d+24>>2]|0);dm(a,-2,4528)}if((aU(k|0,110)|0)!=0){da(a,c[d+4>>2]|0);dm(a,-2,4448);da(a,c[d+8>>2]|0);dm(a,-2,4320)}if((aU(k|0,76)|0)!=0){if((e|0)==(a|0)){cJ(a,-2);cH(a,-3)}else{cC(e,a,1)}dm(a,-2,4232)}if((aU(k|0,102)|0)==0){l=1;i=b;return l|0}if((e|0)==(a|0)){cJ(a,-2);cH(a,-3)}else{cC(e,a,1)}dm(a,-2,4184);l=1;i=b;return l|0}function hP(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=i;i=i+104|0;c=b|0;if((cK(a,1)|0)==8){d=c_(a,1)|0;e=1}else{d=a;e=0}f=e+1|0;if((ej(d,gM(a,f)|0,c)|0)==0){g=gy(a,f,6880)|0;i=b;return g|0}f=el(d,c,gM(a,e|2)|0)|0;if((f|0)==0){c3(a);g=1;i=b;return g|0}else{cC(d,a,1);da(a,f);cJ(a,-2);g=2;i=b;return g|0}return 0}function hQ(a){a=a|0;cJ(a,-1e4);return 1}function hR(a){a=a|0;gJ(a,1);if((dj(a,1)|0)!=0){return 1}c3(a);return 1}function hS(a){a=a|0;return hZ(a,1)|0}function hT(a){a=a|0;var b=0;b=i;gI(a,2,5);cG(a,2);if((dv(a,1)|0)!=0){i=b;return 1}gz(a,5848,(a=i,i=i+1|0,i=i+7>>3<<3,c[a>>2]=0,a)|0)|0;i=a;i=b;return 1}function hU(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;if((cK(a,1)|0)==8){b=c_(a,1)|0;c=1}else{b=a;c=0}d=c+1|0;if((cK(a,d)|0)<1){cG(a,d);e=0;f=0;g=0}else{h=gE(a,c|2,0)|0;gI(a,d,6);i=gN(a,c+3|0,0)|0;c=(aU(h|0,99)|0)!=0|0;j=(aU(h|0,114)|0)==0?c:c|2;c=(aU(h|0,108)|0)==0?j:j|4;e=(i|0)>0?c|8:c;f=i;g=262}h$(a);c7(a,b);cJ(a,d);dn(a,-3);cG(a,-2);ef(b,g,e,f)|0;return 0}function hV(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=i;i=i+104|0;c=b|0;if((cK(a,1)|0)==8){d=c_(a,1)|0;e=1}else{d=a;e=0}f=e+1|0;if((ej(d,gM(a,f)|0,c)|0)==0){g=gy(a,f,6880)|0;i=b;return g|0}else{f=e+3|0;gJ(a,f);cG(a,f);cC(a,d,1);da(a,em(d,c,gM(a,e|2)|0)|0);g=1;i=b;return g|0}return 0}function hW(a){a=a|0;var b=0;b=cK(a,2)|0;if(!((b|0)==5|(b|0)==0)){gy(a,2,7072)|0}cG(a,2);c6(a,dq(a,1)|0);return 1}function hX(a){a=a|0;gJ(a,3);return hZ(a,0)|0}function hY(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=i;i=i+104|0;e=d|0;if((cK(b,1)|0)==8){f=c_(b,1)|0;g=1}else{f=b;g=0}h=g|2;if((cS(b,h)|0)==0){j=(f|0)==(b|0)|0}else{k=c$(b,h)|0;cG(b,-2);j=k}do{if((cF(b)|0)==(g|0)){c9(b,10568,0)}else{if((cQ(b,g+1|0)|0)==0){i=d;return 1}else{c9(b,9240,1);break}}}while(0);c9(b,9096,16);k=e+36|0;h=e+20|0;l=e+8|0;m=e+12|0;n=e+28|0;o=e+4|0;p=1;q=j;L2655:while(1){j=q+1|0;r=q+11|0;L2657:do{if((j|0)<13){if((ej(f,q,e)|0)==0){break L2655}else{s=p}}else{t=p;while(1){if((ej(f,q,e)|0)==0){break L2655}if((t|0)==0){s=0;break L2657}if((ej(f,r,e)|0)==0){t=0}else{break}}c9(b,8960,5);t=j;while(1){if((ej(f,t+10|0,e)|0)==0){p=0;q=t;continue L2655}else{t=t+1|0}}}}while(0);c9(b,8808,2);en(f,8608,e)|0;dc(b,8424,(r=i,i=i+8|0,c[r>>2]=k,r)|0)|0;i=r;t=c[h>>2]|0;if((t|0)>0){dc(b,8208,(r=i,i=i+8|0,c[r>>2]=t,r)|0)|0;i=r}do{if((a[c[l>>2]|0]|0)==0){t=a[c[m>>2]|0]|0;if((t<<24>>24|0)==109){dc(b,7664,(r=i,i=i+1|0,i=i+7>>3<<3,c[r>>2]=0,r)|0)|0;i=r;break}else if((t<<24>>24|0)==67|(t<<24>>24|0)==116){c9(b,7504,2);break}else{t=c[n>>2]|0;dc(b,7240,(r=i,i=i+16|0,c[r>>2]=k,c[r+8>>2]=t,r)|0)|0;i=r;break}}else{t=c[o>>2]|0;dc(b,7920,(r=i,i=i+8|0,c[r>>2]=t,r)|0)|0;i=r}}while(0);dG(b,(cF(b)|0)-g|0);p=s;q=j}dG(b,(cF(b)|0)-g|0);i=d;return 1}function hZ(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=gM(a,2)|0;gI(a,1,6);if((cM(a,1)|0)!=0){d=0;return d|0}if((b|0)==0){e=dJ(a,1,c)|0}else{e=du(a,1,c)|0}if((e|0)==0){d=0;return d|0}da(a,e);cI(a,~b);d=b+1|0;return d|0}function h_(a,b){a=a|0;b=b|0;var d=0;c7(a,10472);dg(a,-1e4);c7(a,a);dg(a,-2);if((cK(a,-1)|0)!=6){return}da(a,c[1488+(c[b>>2]<<2)>>2]|0);d=c[b+20>>2]|0;if((d|0)>-1){c5(a,d)}else{c3(a)}dw(a,2,0);return}function h$(a){a=a|0;c7(a,10472);dg(a,-1e4);if((cK(a,-1)|0)==5){return}cG(a,-2);di(a,0,1);c7(a,10472);cJ(a,-2);dn(a,-1e4);return}function h0(a){a=a|0;var b=0,d=0;gF(a,3848)|0;cJ(a,-1);dm(a,-2,5840);gQ(a,0,1512);di(a,0,1);dd(a,550,0);dm(a,-2,6128);cP(a,-10001);gQ(a,4712,1392);di(a,0,1);dd(a,402,0);dm(a,-2,6128);b=c[m>>2]|0;d=dH(a,4)|0;c[d>>2]=0;df(a,-1e4,3848);dq(a,-2)|0;c[d>>2]=b;cJ(a,-1);dp(a,-10001,1);cJ(a,-2);dv(a,-2)|0;dm(a,-3,9496);b=c[o>>2]|0;d=dH(a,4)|0;c[d>>2]=0;df(a,-1e4,3848);dq(a,-2)|0;c[d>>2]=b;cJ(a,-1);dp(a,-10001,2);cJ(a,-2);dv(a,-2)|0;dm(a,-3,7528);b=c[n>>2]|0;d=dH(a,4)|0;c[d>>2]=0;df(a,-1e4,3848);dq(a,-2)|0;c[d>>2]=b;cJ(a,-2);dv(a,-2)|0;dm(a,-3,5760);cG(a,-2);df(a,-1,4552);di(a,0,1);dd(a,538,0);dm(a,-2,6128);dv(a,-2)|0;cG(a,-2);return 1}function h1(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;d=gG(a,1,3848)|0;e=(ar(c[d>>2]|0)|0)==0;c[d>>2]=0;d=c[(bE()|0)>>2]|0;if(e){c6(a,1);f=1;i=b;return f|0}else{c3(a);e=bF(d|0)|0;dc(a,2752,(g=i,i=i+8|0,c[g>>2]=e,g)|0)|0;i=g;c5(a,d);f=3;i=b;return f|0}return 0}function h2(a){a=a|0;c3(a);c9(a,2392,26);return 2}function h3(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;c[(gG(a,1,3848)|0)>>2]=0;d=c[(bE()|0)>>2]|0;c3(a);e=bF(d|0)|0;dc(a,2752,(f=i,i=i+8|0,c[f>>2]=e,f)|0)|0;i=f;c5(a,d);i=b;return 3}function h4(a){a=a|0;var b=0,d=0;b=i;if((cK(a,1)|0)==-1){dh(a,-10001,2)}if((c[(gG(a,1,3848)|0)>>2]|0)==0){gz(a,6504,(d=i,i=i+1|0,i=i+7>>3<<3,c[d>>2]=0,d)|0)|0;i=d}dk(a,1);df(a,-1,6128);d=cd[(cY(a,-1)|0)&1023](a)|0;i=b;return d|0}function h5(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;dh(a,-10001,2);d=c[(cZ(a,-1)|0)>>2]|0;if((d|0)==0){gz(a,8576,(e=i,i=i+8|0,c[e>>2]=9432,e)|0)|0;i=e}f=(au(d|0)|0)==0;d=c[(bE()|0)>>2]|0;if(f){c6(a,1);g=1;i=b;return g|0}else{c3(a);f=bF(d|0)|0;dc(a,2752,(e=i,i=i+8|0,c[e>>2]=f,e)|0)|0;i=e;c5(a,d);g=3;i=b;return g|0}return 0}function h6(a){a=a|0;ik(a,1,6872);return 1}function h7(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;if((cK(a,1)|0)<1){dh(a,-10001,1);if((c[(gG(a,1,3848)|0)>>2]|0)==0){gz(a,6504,(d=i,i=i+1|0,i=i+7>>3<<3,c[d>>2]=0,d)|0)|0;i=d}cJ(a,1);c6(a,0);dd(a,396,2);i=b;return 1}else{e=gE(a,1,0)|0;f=dH(a,4)|0;c[f>>2]=0;df(a,-1e4,3848);dq(a,-2)|0;g=bl(e|0,6872)|0;c[f>>2]=g;if((g|0)==0){g=bF(c[(bE()|0)>>2]|0)|0;dc(a,3224,(d=i,i=i+16|0,c[d>>2]=e,c[d+8>>2]=g,d)|0)|0;i=d;d=c0(a,-1,0)|0;gy(a,1,d)|0}cJ(a,cF(a)|0);c6(a,1);dd(a,396,2);i=b;return 1}return 0}function h8(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;d=gE(a,1,0)|0;e=gD(a,2,6872,0)|0;f=dH(a,4)|0;c[f>>2]=0;df(a,-1e4,3848);dq(a,-2)|0;g=bl(d|0,e|0)|0;c[f>>2]=g;if((g|0)!=0){h=1;i=b;return h|0}g=c[(bE()|0)>>2]|0;c3(a);f=bF(g|0)|0;if((d|0)==0){dc(a,2752,(j=i,i=i+8|0,c[j>>2]=f,j)|0)|0;i=j}else{dc(a,3224,(j=i,i=i+16|0,c[j>>2]=d,c[j+8>>2]=f,j)|0)|0;i=j}c5(a,g);h=3;i=b;return h|0}function h9(a){a=a|0;ik(a,2,6664);return 1}function ia(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;d=gE(a,1,0)|0;gD(a,2,6872,0)|0;e=dH(a,4)|0;c[e>>2]=0;df(a,-1e4,3848);dq(a,-2)|0;gz(a,6768,(f=i,i=i+1|0,i=i+7>>3<<3,c[f>>2]=0,f)|0)|0;i=f;c[e>>2]=0;e=c[(bE()|0)>>2]|0;c3(a);g=bF(e|0)|0;if((d|0)==0){dc(a,2752,(f=i,i=i+8|0,c[f>>2]=g,f)|0)|0;i=f;c5(a,e);i=b;return 3}else{dc(a,3224,(f=i,i=i+16|0,c[f>>2]=d,c[f+8>>2]=g,f)|0)|0;i=f;c5(a,e);i=b;return 3}return 0}function ib(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;dh(a,-10001,1);d=c[(cZ(a,-1)|0)>>2]|0;if((d|0)!=0){e=ih(a,d,1)|0;i=b;return e|0}gz(a,8576,(f=i,i=i+8|0,c[f>>2]=10144,f)|0)|0;i=f;e=ih(a,d,1)|0;i=b;return e|0}function ic(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;d=dH(a,4)|0;c[d>>2]=0;df(a,-1e4,3848);dq(a,-2)|0;e=aO()|0;c[d>>2]=e;if((e|0)!=0){f=1;i=b;return f|0}e=c[(bE()|0)>>2]|0;c3(a);d=bF(e|0)|0;dc(a,2752,(g=i,i=i+8|0,c[g>>2]=d,g)|0)|0;i=g;c5(a,e);f=3;i=b;return f|0}function id(a){a=a|0;var b=0;gJ(a,1);b=cZ(a,1)|0;df(a,-1e4,3848);do{if((b|0)!=0){if((dj(a,1)|0)==0){break}if((cT(a,-2,-1)|0)==0){break}if((c[b>>2]|0)==0){c9(a,8192,11);return 1}else{c9(a,7912,4);return 1}}}while(0);c3(a);return 1}function ie(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;dh(a,-10001,2);d=c[(cZ(a,-1)|0)>>2]|0;if((d|0)!=0){e=ig(a,d,1)|0;i=b;return e|0}gz(a,8576,(f=i,i=i+8|0,c[f>>2]=9432,f)|0)|0;i=f;e=ig(a,d,1)|0;i=b;return e|0}function ig(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0,q=0,r=0;e=i;i=i+8|0;f=e|0;g=(cF(a)|0)-1|0;do{if((g|0)==0){bE()|0}else{j=1;k=d;l=g;while(1){do{if((cK(a,k)|0)==3){if((j|0)==0){m=0;break}n=+cW(a,k);o=bN(b|0,8416,(p=i,i=i+8|0,h[p>>3]=n,p)|0)|0;i=p;m=(o|0)>0|0}else{o=gE(a,k,f)|0;if((j|0)==0){m=0;break}q=aw(o|0,1,c[f>>2]|0,b|0)|0;m=(q|0)==(c[f>>2]|0)|0}}while(0);q=l-1|0;if((q|0)==0){break}else{j=m;k=k+1|0;l=q}}l=c[(bE()|0)>>2]|0;if((m|0)!=0){break}c3(a);k=bF(l|0)|0;dc(a,2752,(p=i,i=i+8|0,c[p>>2]=k,p)|0)|0;i=p;c5(a,l);r=3;i=e;return r|0}}while(0);c6(a,1);r=1;i=e;return r|0}function ih(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;f=i;i=i+8|0;g=f|0;j=cF(b)|0;bV(d|0);L2804:do{if((j|0)==1){k=e+1|0;l=ii(b,d)|0}else{gH(b,j+19|0,7640);m=e;n=j-2|0;L2806:while(1){do{if((cK(b,m)|0)==3){o=c$(b,m)|0;if((o|0)==0){p=aQ(d|0)|0;bI(p|0,d|0)|0;c9(b,0,0);q=(p|0)!=-1|0;break}else{q=ij(b,d,o)|0;break}}else{o=c0(b,m,0)|0;if((o|0)==0){r=2193}else{if((a[o]|0)!=42){r=2193}}if((r|0)==2193){r=0;gy(b,m,7488)|0}p=a[o+1|0]|0;if((p|0)==108){q=ii(b,d)|0;break}else if((p|0)==97){ij(b,d,-1)|0;q=1;break}else if((p|0)==110){p=aH(d|0,7056,(s=i,i=i+8|0,c[s>>2]=g,s)|0)|0;i=s;if((p|0)!=1){r=2197;break L2806}c4(b,+h[g>>3]);q=1;break}else{break L2806}}}while(0);p=m+1|0;if((n|0)==0|(q|0)==0){k=p;l=q;break L2804}else{m=p;n=n-1|0}}if((r|0)==2197){c3(b);k=m+1|0;l=0;break}t=gy(b,m,7216)|0;i=f;return t|0}}while(0);if((a4(d|0)|0)!=0){d=c[(bE()|0)>>2]|0;c3(b);r=bF(d|0)|0;dc(b,2752,(s=i,i=i+8|0,c[s>>2]=r,s)|0)|0;i=s;c5(b,d);t=3;i=f;return t|0}if((l|0)==0){cG(b,-2);c3(b)}t=k-e|0;i=f;return t|0}function ii(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+1040|0;f=e|0;gt(b,f);g=gY(f)|0;L2840:do{if((aS(g|0,1024,d|0)|0)!=0){h=f|0;j=g;while(1){k=j_(j|0)|0;if((k|0)!=0){l=k-1|0;if((a[j+l|0]|0)==10){break}}c[h>>2]=(c[h>>2]|0)+k;j=gY(f)|0;if((aS(j|0,1024,d|0)|0)==0){break L2840}}c[h>>2]=(c[h>>2]|0)+l;gX(f);m=1;i=e;return m|0}}while(0);gX(f);m=(c1(b,-1)|0)!=0|0;i=e;return m|0}function ij(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+1040|0;f=e|0;gt(a,f);g=f|0;h=d;d=1024;while(1){j=d>>>0>h>>>0?h:d;k=bw(gY(f)|0,1,j|0,b|0)|0;c[g>>2]=(c[g>>2]|0)+k;if((h|0)==(k|0)){l=2223;break}if((k|0)==(j|0)){h=h-k|0;d=j}else{l=2225;break}}if((l|0)==2225){gX(f);m=(c1(a,-1)|0)!=0|0;i=e;return m|0}else if((l|0)==2223){gX(f);m=1;i=e;return m|0}return 0}function ik(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;if((cK(a,1)|0)<1){dh(a,-10001,b);i=e;return}f=c0(a,1,0)|0;do{if((f|0)==0){if((c[(gG(a,1,3848)|0)>>2]|0)==0){gz(a,6504,(g=i,i=i+1|0,i=i+7>>3<<3,c[g>>2]=0,g)|0)|0;i=g}cJ(a,1)}else{h=dH(a,4)|0;c[h>>2]=0;df(a,-1e4,3848);dq(a,-2)|0;j=bl(f|0,d|0)|0;c[h>>2]=j;if((j|0)!=0){break}j=bF(c[(bE()|0)>>2]|0)|0;dc(a,3224,(g=i,i=i+16|0,c[g>>2]=f,c[g+8>>2]=j,g)|0)|0;i=g;j=c0(a,-1,0)|0;gy(a,1,j)|0}}while(0);dp(a,-10001,b);dh(a,-10001,b);i=e;return}function il(a){a=a|0;var b=0,d=0;b=i;if((c[(gG(a,1,3848)|0)>>2]|0)==0){gz(a,6504,(d=i,i=i+1|0,i=i+7>>3<<3,c[d>>2]=0,d)|0)|0;i=d}cJ(a,1);c6(a,0);dd(a,396,2);i=b;return 1}function im(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;d=c[(cZ(a,-10003)|0)>>2]|0;if((d|0)==0){gz(a,6344,(e=i,i=i+1|0,i=i+7>>3<<3,c[e>>2]=0,e)|0)|0;i=e}f=ii(a,d)|0;if((a4(d|0)|0)!=0){d=bF(c[(bE()|0)>>2]|0)|0;g=gz(a,2752,(e=i,i=i+8|0,c[e>>2]=d,e)|0)|0;i=e;h=g;i=b;return h|0}if((f|0)!=0){h=1;i=b;return h|0}if((cX(a,-10004)|0)==0){h=0;i=b;return h|0}cG(a,0);cJ(a,-10003);dk(a,1);df(a,-1,6128);cd[(cY(a,-1)|0)&1023](a)|0;h=0;i=b;return h|0}function io(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;d=gG(a,1,3848)|0;e=c[d>>2]|0;if((e|0)==0){gz(a,6504,(f=i,i=i+1|0,i=i+7>>3<<3,c[f>>2]=0,f)|0)|0;i=f;g=c[d>>2]|0}else{g=e}e=(au(g|0)|0)==0;g=c[(bE()|0)>>2]|0;if(e){c6(a,1);h=1;i=b;return h|0}else{c3(a);e=bF(g|0)|0;dc(a,2752,(f=i,i=i+8|0,c[f>>2]=e,f)|0)|0;i=f;c5(a,g);h=3;i=b;return h|0}return 0}function ip(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;d=gG(a,1,3848)|0;e=c[d>>2]|0;if((e|0)!=0){f=e;g=ih(a,f,2)|0;i=b;return g|0}gz(a,6504,(e=i,i=i+1|0,i=i+7>>3<<3,c[e>>2]=0,e)|0)|0;i=e;f=c[d>>2]|0;g=ih(a,f,2)|0;i=b;return g|0}function iq(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;d=gG(a,1,3848)|0;e=c[d>>2]|0;if((e|0)==0){gz(a,6504,(f=i,i=i+1|0,i=i+7>>3<<3,c[f>>2]=0,f)|0)|0;i=f;g=c[d>>2]|0}else{g=e}e=gC(a,2,4520,1624)|0;d=gN(a,3,0)|0;if((bY(g|0,d|0,c[1640+(e<<2)>>2]|0)|0)==0){c5(a,aZ(g|0)|0);h=1;i=b;return h|0}else{g=c[(bE()|0)>>2]|0;c3(a);e=bF(g|0)|0;dc(a,2752,(f=i,i=i+8|0,c[f>>2]=e,f)|0)|0;i=f;c5(a,g);h=3;i=b;return h|0}return 0}function ir(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;d=gG(a,1,3848)|0;e=c[d>>2]|0;if((e|0)==0){gz(a,6504,(f=i,i=i+1|0,i=i+7>>3<<3,c[f>>2]=0,f)|0)|0;i=f;g=c[d>>2]|0}else{g=e}e=gC(a,2,0,1592)|0;d=gN(a,3,1024)|0;h=(cc(g|0,0,c[1608+(e<<2)>>2]|0,d|0)|0)==0;d=c[(bE()|0)>>2]|0;if(h){c6(a,1);j=1;i=b;return j|0}else{c3(a);h=bF(d|0)|0;dc(a,2752,(f=i,i=i+8|0,c[f>>2]=h,f)|0)|0;i=f;c5(a,d);j=3;i=b;return j|0}return 0}function is(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;d=gG(a,1,3848)|0;e=c[d>>2]|0;if((e|0)!=0){f=e;g=ig(a,f,2)|0;i=b;return g|0}gz(a,6504,(e=i,i=i+1|0,i=i+7>>3<<3,c[e>>2]=0,e)|0)|0;i=e;f=c[d>>2]|0;g=ig(a,f,2)|0;i=b;return g|0}function it(a){a=a|0;if((c[(gG(a,1,3848)|0)>>2]|0)==0){return 0}dk(a,1);df(a,-1,6128);cd[(cY(a,-1)|0)&1023](a)|0;return 0}function iu(a){a=a|0;var b=0,d=0;b=i;d=c[(gG(a,1,3848)|0)>>2]|0;if((d|0)==0){c9(a,5304,13);i=b;return 1}else{dc(a,5192,(a=i,i=i+8|0,c[a>>2]=d,a)|0)|0;i=a;i=b;return 1}return 0}function iv(a){a=a|0;gQ(a,4248,512);c4(a,3.141592653589793);dm(a,-2,9336);c4(a,+q);dm(a,-2,7384);df(a,-1,5712);dm(a,-2,4512);return 1}function iw(a){a=a|0;c4(a,+P(+(+gK(a,1))));return 1}function ix(a){a=a|0;c4(a,+V(+(+gK(a,1))));return 1}function iy(a){a=a|0;c4(a,+W(+(+gK(a,1))));return 1}function iz(a){a=a|0;var b=0.0;b=+gK(a,1);c4(a,+Y(+b,+(+gK(a,2))));return 1}function iA(a){a=a|0;c4(a,+X(+(+gK(a,1))));return 1}function iB(a){a=a|0;c4(a,+$(+(+gK(a,1))));return 1}function iC(a){a=a|0;c4(a,+aR(+(+gK(a,1))));return 1}function iD(a){a=a|0;c4(a,+S(+(+gK(a,1))));return 1}function iE(a){a=a|0;c4(a,+gK(a,1)/.017453292519943295);return 1}function iF(a){a=a|0;c4(a,+Z(+(+gK(a,1))));return 1}function iG(a){a=a|0;c4(a,+O(+(+gK(a,1))));return 1}function iH(a){a=a|0;var b=0.0;b=+gK(a,1);c4(a,+aI(+b,+(+gK(a,2))));return 1}function iI(a){a=a|0;var b=0,d=0;b=i;i=i+8|0;d=b|0;c4(a,+bn(+(+gK(a,1)),d|0));c5(a,c[d>>2]|0);i=b;return 2}function iJ(a){a=a|0;var b=0.0;b=+gK(a,1);c4(a,+bi(+b,gM(a,2)|0));return 1}function iK(a){a=a|0;c4(a,+bv(+(+gK(a,1))));return 1}function iL(a){a=a|0;c4(a,+_(+(+gK(a,1))));return 1}function iM(a){a=a|0;var b=0,c=0.0,d=0.0,e=0,f=0.0,g=0.0,h=0;b=cF(a)|0;c=+gK(a,1);if((b|0)<2){d=c}else{e=2;f=c;while(1){c=+gK(a,e);g=c>f?c:f;h=e+1|0;if((h|0)>(b|0)){d=g;break}else{e=h;f=g}}}c4(a,d);return 1}function iN(a){a=a|0;var b=0,c=0.0,d=0.0,e=0,f=0.0,g=0.0,h=0;b=cF(a)|0;c=+gK(a,1);if((b|0)<2){d=c}else{e=2;f=c;while(1){c=+gK(a,e);g=c<f?c:f;h=e+1|0;if((h|0)>(b|0)){d=g;break}else{e=h;f=g}}}c4(a,d);return 1}function iO(a){a=a|0;var b=0,c=0,d=0.0;b=i;i=i+8|0;c=b|0;d=+aK(+(+gK(a,1)),c|0);c4(a,+h[c>>3]);c4(a,d);i=b;return 2}function iP(a){a=a|0;var b=0.0;b=+gK(a,1);c4(a,+R(+b,+(+gK(a,2))));return 1}function iQ(a){a=a|0;c4(a,+gK(a,1)*.017453292519943295);return 1}function iR(a){a=a|0;var b=0,d=0.0,e=0,f=0,g=0,h=0;b=i;d=+((bf()|0)%2147483647|0|0)/2147483647.0;e=cF(a)|0;if((e|0)==1){f=gM(a,1)|0;if((f|0)<=0){gy(a,1,6104)|0}c4(a,+O(+(d*+(f|0)))+1.0);g=1;i=b;return g|0}else if((e|0)==2){f=gM(a,1)|0;h=gM(a,2)|0;if((f|0)>(h|0)){gy(a,2,6104)|0}c4(a,+(f|0)+ +O(+(d*+(1-f+h|0))));g=1;i=b;return g|0}else if((e|0)==0){c4(a,d);g=1;i=b;return g|0}else{e=gz(a,5808,(a=i,i=i+1|0,i=i+7>>3<<3,c[a>>2]=0,a)|0)|0;i=a;g=e;i=b;return g|0}return 0}function iS(a){a=a|0;bL(gM(a,1)|0);return 0}function iT(a){a=a|0;c4(a,+a7(+(+gK(a,1))));return 1}function iU(a){a=a|0;c4(a,+T(+(+gK(a,1))));return 1}function iV(a){a=a|0;c4(a,+Q(+(+gK(a,1))));return 1}function iW(a){a=a|0;c4(a,+bC(+(+gK(a,1))));return 1}function iX(a){a=a|0;c4(a,+U(+(+gK(a,1))));return 1}function iY(a){a=a|0;gQ(a,4064,88);return 1}function iZ(a){a=a|0;c4(a,+((aW()|0)>>>0>>>0)/1.0e3);return 1}function i_(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=i;i=i+1256|0;e=d|0;f=d+8|0;g=d+16|0;h=d+1056|0;j=gD(b,1,6856,0)|0;if((cK(b,2)|0)<1){k=cb(0)|0}else{k=~~+gK(b,2)}c[e>>2]=k;if((a[j]|0)==33){l=j+1|0;m=a5(e|0)|0}else{l=j;m=aC(e|0)|0}if((m|0)==0){c3(b);i=d;return 1}if((aL(l|0,6752)|0)==0){di(b,0,9);c5(b,c[m>>2]|0);dm(b,-2,9616);c5(b,c[m+4>>2]|0);dm(b,-2,9416);c5(b,c[m+8>>2]|0);dm(b,-2,9192);c5(b,c[m+12>>2]|0);dm(b,-2,9056);c5(b,(c[m+16>>2]|0)+1|0);dm(b,-2,8936);c5(b,(c[m+20>>2]|0)+1900|0);dm(b,-2,8760);c5(b,(c[m+24>>2]|0)+1|0);dm(b,-2,6648);c5(b,(c[m+28>>2]|0)+1|0);dm(b,-2,6488);e=c[m+32>>2]|0;if((e|0)<0){i=d;return 1}c6(b,e);dm(b,-2,8560);i=d;return 1}e=f|0;a[e]=37;a[f+2|0]=0;gt(b,g);b=g|0;j=g+1036|0;k=f+1|0;f=h|0;h=l;L3014:while(1){l=a[h]|0;do{if((l<<24>>24|0)==0){break L3014}else if((l<<24>>24|0)==37){n=h+1|0;o=a[n]|0;if(o<<24>>24==0){p=2362;break}a[k]=o;gV(g,f,be(f|0,200,e|0,m|0)|0);q=n}else{p=2362}}while(0);if((p|0)==2362){p=0;n=c[b>>2]|0;if(n>>>0<j>>>0){r=l;s=n}else{gY(g)|0;r=a[h]|0;s=c[b>>2]|0}c[b>>2]=s+1;a[s]=r;q=h}h=q+1|0}gX(g);i=d;return 1}function i$(a){a=a|0;var b=0;b=~~+gK(a,1);c4(a,+b7(b|0,~~+gL(a,2,0.0)|0));return 1}function i0(a){a=a|0;c5(a,bs(gD(a,1,0,0)|0)|0);return 1}function i1(a){a=a|0;da(a,bz(gE(a,1,0)|0)|0);return 1}function i2(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;d=gE(a,1,0)|0;e=(aJ(d|0)|0)==0;f=c[(bE()|0)>>2]|0;if(e){c6(a,1);g=1;i=b;return g|0}else{c3(a);e=bF(f|0)|0;dc(a,7024,(h=i,i=i+16|0,c[h>>2]=d,c[h+8>>2]=e,h)|0)|0;i=h;c5(a,f);g=3;i=b;return g|0}return 0}function i3(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;d=gE(a,1,0)|0;e=(bJ(d|0,gE(a,2,0)|0)|0)==0;f=c[(bE()|0)>>2]|0;if(e){c6(a,1);g=1;i=b;return g|0}else{c3(a);e=bF(f|0)|0;dc(a,7024,(h=i,i=i+16|0,c[h>>2]=d,c[h+8>>2]=e,h)|0)|0;i=h;c5(a,f);g=3;i=b;return g|0}return 0}function i4(a){a=a|0;var b=0;b=gD(a,1,0,0)|0;da(a,bh(c[488+((gC(a,2,8176,456)|0)<<2)>>2]|0,b|0)|0);return 1}function i5(a){a=a|0;a_(gN(a,1,0)|0);return 0}function i6(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;b=i;i=i+48|0;d=b|0;if((cK(a,1)|0)<1){e=cb(0)|0}else{gI(a,1,5);cG(a,1);df(a,-1,9616);if((cS(a,-1)|0)==0){f=0}else{f=c$(a,-1)|0}cG(a,-2);c[d>>2]=f;df(a,-1,9416);if((cS(a,-1)|0)==0){g=0}else{g=c$(a,-1)|0}cG(a,-2);c[d+4>>2]=g;df(a,-1,9192);if((cS(a,-1)|0)==0){h=12}else{h=c$(a,-1)|0}cG(a,-2);c[d+8>>2]=h;df(a,-1,9056);if((cS(a,-1)|0)==0){h=gz(a,8368,(j=i,i=i+8|0,c[j>>2]=9056,j)|0)|0;i=j;k=h}else{h=c$(a,-1)|0;cG(a,-2);k=h}c[d+12>>2]=k;df(a,-1,8936);if((cS(a,-1)|0)==0){k=gz(a,8368,(j=i,i=i+8|0,c[j>>2]=8936,j)|0)|0;i=j;l=k}else{k=c$(a,-1)|0;cG(a,-2);l=k}c[d+16>>2]=l-1;df(a,-1,8760);if((cS(a,-1)|0)==0){l=gz(a,8368,(j=i,i=i+8|0,c[j>>2]=8760,j)|0)|0;i=j;m=l}else{l=c$(a,-1)|0;cG(a,-2);m=l}c[d+20>>2]=m-1900;df(a,-1,8560);if((cK(a,-1)|0)==0){n=-1}else{n=cX(a,-1)|0}cG(a,-2);c[d+32>>2]=n;e=br(d|0)|0}if((e|0)==-1){c3(a);i=b;return 1}else{c4(a,+(e|0));i=b;return 1}return 0}function i7(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+1024|0;d=b|0;if((aA(d|0)|0)==0){e=gz(a,9816,(f=i,i=i+1|0,i=i+7>>3<<3,c[f>>2]=0,f)|0)|0;i=f;g=e;i=b;return g|0}else{da(a,d);g=1;i=b;return g|0}return 0}function i8(a){a=a|0;gQ(a,3880,8);return 1}function i9(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+1048|0;d=b|0;e=b+1040|0;f=gD(a,2,10584,e)|0;gI(a,1,5);g=gN(a,3,1)|0;if((cK(a,4)|0)<1){h=c1(a,1)|0}else{h=gM(a,4)|0}gt(a,d);do{if((g|0)<(h|0)){j=g;do{dh(a,1,j);if((cQ(a,-1)|0)==0){k=cL(a,cK(a,-1)|0)|0;gz(a,9360,(l=i,i=i+16|0,c[l>>2]=k,c[l+8>>2]=j,l)|0)|0;i=l}gZ(d);gV(d,f,c[e>>2]|0);j=j+1|0;}while((j|0)<(h|0))}else{if((g|0)==(h|0)){break}gX(d);i=b;return 1}}while(0);dh(a,1,h);if((cQ(a,-1)|0)==0){g=cL(a,cK(a,-1)|0)|0;gz(a,9360,(l=i,i=i+16|0,c[l>>2]=g,c[l+8>>2]=h,l)|0)|0;i=l}gZ(d);gX(d);i=b;return 1}function ja(a){a=a|0;var b=0,c=0;gI(a,1,5);gI(a,2,6);c3(a);if((dF(a,1)|0)==0){b=0;return b|0}while(1){cJ(a,2);cJ(a,-3);cJ(a,-3);dw(a,2,1);if((cK(a,-1)|0)!=0){b=1;c=2443;break}cG(a,-3);if((dF(a,1)|0)==0){b=0;c=2442;break}}if((c|0)==2442){return b|0}else if((c|0)==2443){return b|0}return 0}function jb(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;gI(a,1,5);b=c1(a,1)|0;gI(a,2,6);if((b|0)<1){c=0;return c|0}else{d=1}while(1){cJ(a,2);c5(a,d);dh(a,1,d);dw(a,2,1);if((cK(a,-1)|0)!=0){c=1;e=2450;break}cG(a,-2);f=d+1|0;if((f|0)>(b|0)){c=0;e=2448;break}else{d=f}}if((e|0)==2450){return c|0}else if((e|0)==2448){return c|0}return 0}function jc(a){a=a|0;gI(a,1,5);c5(a,c1(a,1)|0);return 1}function jd(a){a=a|0;var b=0.0,c=0.0,d=0.0;gI(a,1,5);c3(a);L3123:do{if((dF(a,1)|0)==0){b=0.0}else{c=0.0;while(1){while(1){cG(a,-2);if((cK(a,-1)|0)==3){d=+cW(a,-1);if(d>c){break}}if((dF(a,1)|0)==0){b=c;break L3123}}if((dF(a,1)|0)==0){b=d;break}else{c=d}}}}while(0);c4(a,b);return 1}function je(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0;b=i;gI(a,1,5);d=(c1(a,1)|0)+1|0;e=cF(a)|0;do{if((e|0)==3){f=gM(a,2)|0;g=(f|0)>(d|0)?f:d;if((g|0)>(f|0)){h=g}else{j=f;break}while(1){g=h-1|0;dh(a,1,g);dp(a,1,h);if((g|0)>(f|0)){h=g}else{j=f;break}}}else if((e|0)==2){j=d}else{f=gz(a,9576,(g=i,i=i+1|0,i=i+7>>3<<3,c[g>>2]=0,g)|0)|0;i=g;k=f;i=b;return k|0}}while(0);dp(a,1,j);k=0;i=b;return k|0}function jf(a){a=a|0;var b=0,c=0,d=0,e=0;gI(a,1,5);b=c1(a,1)|0;c=gN(a,2,b)|0;if((c|0)<1|(c|0)>(b|0)){d=0;return d|0}dh(a,1,c);if((c|0)<(b|0)){e=c;while(1){c=e+1|0;dh(a,1,c);dp(a,1,e);if((c|0)<(b|0)){e=c}else{break}}}c3(a);dp(a,1,b);d=1;return d|0}function jg(a){a=a|0;var b=0,d=0;b=i;gI(a,1,5);gz(a,9776,(d=i,i=i+1|0,i=i+7>>3<<3,c[d>>2]=0,d)|0)|0;i=d;cJ(a,1);i=b;return 1}function jh(a){a=a|0;var b=0;gI(a,1,5);b=c1(a,1)|0;gH(a,40,10584);if((cK(a,2)|0)>=1){gI(a,2,6)}cG(a,2);ji(a,1,b);return 0}function ji(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;if((b|0)<(d|0)){f=b;g=d}else{i=e;return}while(1){dh(a,1,f);dh(a,1,g);if((jj(a,-1,-2)|0)==0){cG(a,-3)}else{dp(a,1,f);dp(a,1,g)}d=g-f|0;if((d|0)==1){h=2505;break}b=(g+f|0)/2|0;dh(a,1,b);dh(a,1,f);do{if((jj(a,-2,-1)|0)==0){cG(a,-2);dh(a,1,g);if((jj(a,-1,-2)|0)==0){cG(a,-3);break}else{dp(a,1,b);dp(a,1,g);break}}else{dp(a,1,b);dp(a,1,f)}}while(0);if((d|0)==2){h=2502;break}dh(a,1,b);cJ(a,-1);j=g-1|0;dh(a,1,j);dp(a,1,b);dp(a,1,j);k=j;l=f;while(1){m=l+1|0;dh(a,1,m);if((jj(a,-1,-2)|0)==0){n=l;o=m}else{p=m;while(1){if((p|0)>(g|0)){gz(a,10088,(q=i,i=i+1|0,i=i+7>>3<<3,c[q>>2]=0,q)|0)|0;i=q}cG(a,-2);m=p+1|0;dh(a,1,m);if((jj(a,-1,-2)|0)==0){n=p;o=m;break}else{p=m}}}p=k-1|0;dh(a,1,p);if((jj(a,-3,-1)|0)==0){r=p}else{m=p;while(1){if((m|0)<(f|0)){gz(a,10088,(q=i,i=i+1|0,i=i+7>>3<<3,c[q>>2]=0,q)|0)|0;i=q}cG(a,-2);p=m-1|0;dh(a,1,p);if((jj(a,-3,-1)|0)==0){r=p;break}else{m=p}}}if((r|0)<(o|0)){break}dp(a,1,o);dp(a,1,r);k=r;l=o}cG(a,-4);dh(a,1,j);dh(a,1,o);dp(a,1,j);dp(a,1,o);l=(o-f|0)<(g-o|0);k=n+2|0;b=l?k:f;d=l?g:n;ji(a,l?f:k,l?n:g);if((b|0)<(d|0)){f=b;g=d}else{h=2504;break}}if((h|0)==2502){i=e;return}else if((h|0)==2504){i=e;return}else if((h|0)==2505){i=e;return}}function jj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((cK(a,2)|0)==0){d=cV(a,b,c)|0;return d|0}else{cJ(a,2);cJ(a,b-1|0);cJ(a,c-2|0);dw(a,2,1);c=cX(a,-1)|0;cG(a,-2);d=c;return d|0}return 0}function jk(a){a=a|0;gQ(a,3800,184);df(a,-1,9184);dm(a,-2,7192);di(a,0,1);c9(a,10536,0);cJ(a,-2);dq(a,-2)|0;cG(a,-2);cJ(a,-2);dm(a,-2,4424);cG(a,-2);return 1}function jl(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+8|0;e=b|0;f=gE(a,1,e)|0;g=gN(a,2,1)|0;if((g|0)<0){h=g+1+(c[e>>2]|0)|0}else{h=g}g=(h|0)<0?0:h;h=gN(a,3,g)|0;j=c[e>>2]|0;if((h|0)<0){k=h+1+j|0}else{k=h}h=(k|0)<0?0:k;k=(g|0)<1?1:g;g=h>>>0>j>>>0?j:h;if((k|0)>(g|0)){l=0;i=b;return l|0}h=g-k+1|0;if((g|0)==2147483647){gz(a,5040,(g=i,i=i+1|0,i=i+7>>3<<3,c[g>>2]=0,g)|0)|0;i=g}gH(a,h,5040);if((h|0)<=0){l=h;i=b;return l|0}g=k-1|0;k=0;while(1){c5(a,d[f+(g+k)|0]|0);j=k+1|0;if((j|0)<(h|0)){k=j}else{l=h;break}}i=b;return l|0}function jm(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;d=i;i=i+1040|0;e=d|0;f=cF(b)|0;gt(b,e);if((f|0)<1){gX(e);i=d;return 1}g=e|0;h=e+1036|0;j=1;do{k=gM(b,j)|0;if((k&255|0)!=(k|0)){gy(b,j,5176)|0}l=c[g>>2]|0;if(l>>>0<h>>>0){m=l}else{gY(e)|0;m=c[g>>2]|0}c[g>>2]=m+1;a[m]=k&255;j=j+1|0;}while((j|0)<=(f|0));gX(e);i=d;return 1}function jn(a){a=a|0;var b=0,d=0;b=i;i=i+1040|0;d=b|0;gI(a,1,6);cG(a,1);gt(a,d);if((dC(a,252,d)|0)==0){gX(d);i=b;return 1}gz(a,5272,(a=i,i=i+1|0,i=i+7>>3<<3,c[a>>2]=0,a)|0)|0;i=a;gX(d);i=b;return 1}function jo(a){a=a|0;return jA(a,1)|0}function jp(b){b=b|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0.0,Y=0;e=i;i=i+1600|0;f=e|0;g=e+8|0;j=e+16|0;k=e+1056|0;l=e+1592|0;m=cF(b)|0;n=gE(b,1,g)|0;o=c[g>>2]|0;g=n+o|0;gt(b,j);L3242:do{if((o|0)>0){p=j|0;q=j+1036|0;r=k|0;s=k+1|0;t=e+1080|0;u=n;v=1;L3244:while(1){x=u;while(1){y=a[x]|0;if(y<<24>>24==37){z=x+1|0;if((a[z]|0)!=37){break}A=c[p>>2]|0;if(A>>>0<q>>>0){B=37;C=A}else{gY(j)|0;B=a[z]|0;C=c[p>>2]|0}c[p>>2]=C+1;a[C]=B;D=x+2|0}else{A=c[p>>2]|0;if(A>>>0<q>>>0){E=y;F=A}else{gY(j)|0;E=a[x]|0;F=c[p>>2]|0}c[p>>2]=F+1;a[F]=E;D=x+1|0}if(D>>>0<g>>>0){x=D}else{break L3242}}v=v+1|0;if((v|0)>(m|0)){gy(b,v,6472)|0;G=z}else{G=z}while(1){x=a[G]|0;if(x<<24>>24==0){H=0;break}if((aM(5616,x<<24>>24|0,6)|0)==0){H=x;break}G=G+1|0}x=z;if((G-x|0)>>>0>5){gz(b,5512,(I=i,i=i+1|0,i=i+7>>3<<3,c[I>>2]=0,I)|0)|0;i=I;J=a[G]|0}else{J=H}A=((J&255)-48|0)>>>0<10?G+1|0:G;y=((d[A]|0)-48|0)>>>0<10?A+1|0:A;A=a[y]|0;do{if(A<<24>>24==46){K=y+1|0;L=((d[K]|0)-48|0)>>>0<10?y+2|0:K;K=a[L]|0;if(((K&255)-48|0)>>>0>=10){M=L;N=K;break}K=L+1|0;M=K;N=a[K]|0}else{M=y;N=A}}while(0);if(((N&255)-48|0)>>>0<10){gz(b,5360,(I=i,i=i+1|0,i=i+7>>3<<3,c[I>>2]=0,I)|0)|0;i=I}a[r]=37;A=M-x|0;j3(s|0,z|0,A+1|0)|0;a[k+(A+2)|0]=0;u=M+1|0;O=a[M]|0;L3277:do{switch(O|0){case 113:{A=gE(b,v,f)|0;y=c[p>>2]|0;if(y>>>0<q>>>0){P=y}else{gY(j)|0;P=c[p>>2]|0}c[p>>2]=P+1;a[P]=34;y=c[f>>2]|0;c[f>>2]=y-1;L3282:do{if((y|0)!=0){K=A;while(1){L=a[K]|0;switch(L<<24>>24|0){case 34:case 92:case 10:{Q=c[p>>2]|0;if(Q>>>0<q>>>0){R=Q}else{gY(j)|0;R=c[p>>2]|0}c[p>>2]=R+1;a[R]=92;Q=c[p>>2]|0;if(Q>>>0<q>>>0){S=Q}else{gY(j)|0;S=c[p>>2]|0}Q=a[K]|0;c[p>>2]=S+1;a[S]=Q;break};case 13:{gV(j,6080,2);break};case 0:{gV(j,5800,4);break};default:{Q=c[p>>2]|0;if(Q>>>0<q>>>0){T=L;U=Q}else{gY(j)|0;T=a[K]|0;U=c[p>>2]|0}c[p>>2]=U+1;a[U]=T}}Q=c[f>>2]|0;c[f>>2]=Q-1;if((Q|0)==0){break L3282}else{K=K+1|0}}}}while(0);A=c[p>>2]|0;if(A>>>0<q>>>0){V=A}else{gY(j)|0;V=c[p>>2]|0}c[p>>2]=V+1;a[V]=34;break};case 115:{A=gE(b,v,l)|0;do{if((aU(r|0,46)|0)==0){if((c[l>>2]|0)>>>0<=99){break}cJ(b,v);gZ(j);break L3277}}while(0);a$(t|0,r|0,(I=i,i=i+8|0,c[I>>2]=A,I)|0)|0;i=I;W=2595;break};case 99:{y=~~+gK(b,v);a$(t|0,r|0,(I=i,i=i+8|0,c[I>>2]=y,I)|0)|0;i=I;W=2595;break};case 100:case 105:{y=j_(r|0)|0;K=k+(y-1)|0;Q=a[K]|0;L=K;w=108;a[L]=w&255;w=w>>8;a[L+1|0]=w&255;a[k+y|0]=Q;a[k+(y+1)|0]=0;y=~~+gK(b,v);a$(t|0,r|0,(I=i,i=i+8|0,c[I>>2]=y,I)|0)|0;i=I;W=2595;break};case 111:case 117:case 120:case 88:{y=j_(r|0)|0;Q=k+(y-1)|0;L=a[Q]|0;K=Q;w=108;a[K]=w&255;w=w>>8;a[K+1|0]=w&255;a[k+y|0]=L;a[k+(y+1)|0]=0;y=~~+gK(b,v);a$(t|0,r|0,(I=i,i=i+8|0,c[I>>2]=y,I)|0)|0;i=I;W=2595;break};case 101:case 69:case 102:case 103:case 71:{X=+gK(b,v);a$(t|0,r|0,(I=i,i=i+8|0,h[I>>3]=X,I)|0)|0;i=I;W=2595;break};default:{break L3244}}}while(0);if((W|0)==2595){W=0;gV(j,t,j_(t|0)|0)}if(u>>>0>=g>>>0){break L3242}}u=gz(b,6288,(I=i,i=i+8|0,c[I>>2]=O,I)|0)|0;i=I;Y=u;i=e;return Y|0}}while(0);gX(j);Y=1;i=e;return Y|0}function jq(a){a=a|0;var b=0,d=0;b=i;d=gz(a,6600,(a=i,i=i+1|0,i=i+7>>3<<3,c[a>>2]=0,a)|0)|0;i=a;i=b;return d|0}function jr(a){a=a|0;gE(a,1,0)|0;gE(a,2,0)|0;cG(a,2);c5(a,0);dd(a,286,3);return 1}function js(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0;d=i;i=i+1328|0;e=d|0;f=d+8|0;g=d+16|0;h=d+288|0;j=gE(b,1,f)|0;k=gE(b,2,0)|0;l=cK(b,3)|0;m=gN(b,4,(c[f>>2]|0)+1|0)|0;n=(a[k]|0)==94;o=n?k+1|0:k;if(!((l-3|0)>>>0<2|(l|0)==6|(l|0)==5)){gy(b,3,6824)|0}gt(b,h);l=g+8|0;c[l>>2]=b;k=g|0;c[k>>2]=j;p=g+4|0;c[p>>2]=j+(c[f>>2]|0);f=g+12|0;q=h|0;r=h+1036|0;s=g+20|0;t=g+16|0;u=j;j=0;while(1){if((j|0)>=(m|0)){v=u;w=j;x=2646;break}c[f>>2]=0;y=jB(g,u,o)|0;if((y|0)==0){z=j;x=2640}else{A=j+1|0;B=c[l>>2]|0;C=cK(B,3)|0;do{if((C|0)==3|(C|0)==4){D=c0(c[l>>2]|0,3,e)|0;if((c[e>>2]|0)==0){break}E=y-u|0;F=0;do{G=D+F|0;H=a[G]|0;do{if(H<<24>>24==37){I=F+1|0;J=D+I|0;K=a[J]|0;if(((K&255)-48|0)>>>0<10){if(K<<24>>24==48){gV(h,u,E);L=I;break}else{jC(g,(K<<24>>24)-49|0,u,y);gZ(h);L=I;break}}else{M=c[q>>2]|0;if(M>>>0<r>>>0){N=K;O=M}else{gY(h)|0;N=a[J]|0;O=c[q>>2]|0}c[q>>2]=O+1;a[O]=N;L=I;break}}else{I=c[q>>2]|0;if(I>>>0<r>>>0){P=H;Q=I}else{gY(h)|0;P=a[G]|0;Q=c[q>>2]|0}c[q>>2]=Q+1;a[Q]=P;L=F}}while(0);F=L+1|0;}while(F>>>0<(c[e>>2]|0)>>>0)}else if((C|0)==6){cJ(B,3);F=c[f>>2]|0;E=(F|0)!=0|(u|0)==0?F:1;gH(c[l>>2]|0,E,8536);if((E|0)>0){F=0;do{jC(g,F,u,y);F=F+1|0;}while((F|0)<(E|0))}dw(B,E,1);x=2634}else if((C|0)==5){L3358:do{if((c[f>>2]|0)>0){F=c[s>>2]|0;do{if((F|0)==-1){D=c[l>>2]|0;gz(D,8104,(R=i,i=i+1|0,i=i+7>>3<<3,c[R>>2]=0,R)|0)|0;i=R;S=c[l>>2]|0;T=c[t>>2]|0}else{D=c[l>>2]|0;G=c[t>>2]|0;if((F|0)!=-2){S=D;T=G;break}c5(D,G+1-(c[k>>2]|0)|0);break L3358}}while(0);c9(S,T,F)}else{c9(c[l>>2]|0,u,y-u|0)}}while(0);de(B,3);x=2634}else{x=2634}}while(0);if((x|0)==2634){x=0;do{if((cX(B,-1)|0)==0){cG(B,-2);c9(B,u,y-u|0)}else{if((cQ(B,-1)|0)!=0){break}C=cL(B,cK(B,-1)|0)|0;gz(B,6712,(R=i,i=i+8|0,c[R>>2]=C,R)|0)|0;i=R}}while(0);gZ(h)}if(y>>>0>u>>>0){U=y;V=A}else{z=A;x=2640}}if((x|0)==2640){x=0;if(u>>>0>=(c[p>>2]|0)>>>0){v=u;w=z;x=2647;break}B=c[q>>2]|0;if(B>>>0<r>>>0){W=B}else{gY(h)|0;W=c[q>>2]|0}B=a[u]|0;c[q>>2]=W+1;a[W]=B;U=u+1|0;V=z}if(n){v=U;w=V;x=2648;break}else{u=U;j=V}}if((x|0)==2646){X=c[p>>2]|0;Y=X;Z=v;_=Y-Z|0;gV(h,v,_);gX(h);c5(b,w);i=d;return 2}else if((x|0)==2647){X=c[p>>2]|0;Y=X;Z=v;_=Y-Z|0;gV(h,v,_);gX(h);c5(b,w);i=d;return 2}else if((x|0)==2648){X=c[p>>2]|0;Y=X;Z=v;_=Y-Z|0;gV(h,v,_);gX(h);c5(b,w);i=d;return 2}return 0}function jt(a){a=a|0;var b=0,d=0;b=i;i=i+8|0;d=b|0;gE(a,1,d)|0;c5(a,c[d>>2]|0);i=b;return 1}function ju(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+1048|0;f=e|0;g=e+8|0;h=gE(b,1,f)|0;gt(b,g);if((c[f>>2]|0)==0){gX(g);i=e;return 1}b=g|0;j=g+1036|0;k=0;do{if((c[b>>2]|0)>>>0>=j>>>0){gY(g)|0}l=(j6(d[h+k|0]|0|0)|0)&255;m=c[b>>2]|0;c[b>>2]=m+1;a[m]=l;k=k+1|0;}while(k>>>0<(c[f>>2]|0)>>>0);gX(g);i=e;return 1}function jv(a){a=a|0;return jA(a,0)|0}function jw(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+1048|0;d=b|0;e=b+8|0;f=gE(a,1,d)|0;g=gM(a,2)|0;gt(a,e);if((g|0)>0){h=g}else{gX(e);i=b;return 1}do{h=h-1|0;gV(e,f,c[d>>2]|0);}while((h|0)>0);gX(e);i=b;return 1}function jx(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;d=i;i=i+1048|0;e=d|0;f=d+8|0;g=gE(b,1,e)|0;gt(b,f);b=c[e>>2]|0;h=b-1|0;c[e>>2]=h;if((b|0)==0){gX(f);i=d;return 1}b=f|0;j=f+1036|0;k=h;do{h=c[b>>2]|0;if(h>>>0<j>>>0){l=k;m=h}else{gY(f)|0;l=c[e>>2]|0;m=c[b>>2]|0}h=a[g+l|0]|0;c[b>>2]=m+1;a[m]=h;h=c[e>>2]|0;k=h-1|0;c[e>>2]=k;}while((h|0)!=0);gX(f);i=d;return 1}function jy(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+8|0;d=b|0;e=gE(a,1,d)|0;f=gM(a,2)|0;if((f|0)<0){g=f+1+(c[d>>2]|0)|0}else{g=f}f=(g|0)<0?0:g;g=gN(a,3,-1)|0;h=c[d>>2]|0;if((g|0)<0){j=g+1+h|0}else{j=g}g=(j|0)<0?0:j;j=(f|0)<1?1:f;f=(g|0)>(h|0)?h:g;if((j|0)>(f|0)){c9(a,10536,0);i=b;return 1}else{c9(a,e+(j-1)|0,1-j+f|0);i=b;return 1}return 0}function jz(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+1048|0;f=e|0;g=e+8|0;h=gE(b,1,f)|0;gt(b,g);if((c[f>>2]|0)==0){gX(g);i=e;return 1}b=g|0;j=g+1036|0;k=0;do{if((c[b>>2]|0)>>>0>=j>>>0){gY(g)|0}l=(bj(d[h+k|0]|0|0)|0)&255;m=c[b>>2]|0;c[b>>2]=m+1;a[m]=l;k=k+1|0;}while(k>>>0<(c[f>>2]|0)>>>0);gX(g);i=e;return 1}function jA(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;e=i;i=i+288|0;f=e|0;g=e+8|0;h=e+16|0;j=gE(b,1,f)|0;k=gE(b,2,g)|0;l=gN(b,3,1)|0;if((l|0)<0){m=l+1+(c[f>>2]|0)|0}else{m=l}l=(m|0)<0?-1:m-1|0;if((l|0)<0){n=0}else{m=c[f>>2]|0;n=l>>>0>m>>>0?m:l}l=(d|0)!=0;L3443:do{if(l){if((cX(b,4)|0)==0){if((b2(k|0,8744)|0)!=0){o=2706;break}}d=j+n|0;m=(c[f>>2]|0)-n|0;p=c[g>>2]|0;L3448:do{if((p|0)==0){if((d|0)==0){break L3443}else{q=d}}else{if(p>>>0>m>>>0){break L3443}r=p-1|0;if((r|0)==(m|0)){break L3443}s=a[k]|0;t=k+1|0;u=d;v=m-r|0;while(1){w=aM(u|0,s|0,v|0)|0;if((w|0)==0){break L3443}x=w+1|0;if((j5(x|0,t|0,r|0)|0)==0){q=w;break L3448}w=x;y=u+v|0;if((y|0)==(w|0)){break L3443}else{u=x;v=y-w|0}}}}while(0);m=q-j|0;c5(b,m+1|0);c5(b,m+(c[g>>2]|0)|0);z=2;i=e;return z|0}else{o=2706}}while(0);L3459:do{if((o|0)==2706){g=(a[k]|0)==94;q=g?k+1|0:k;m=j+n|0;d=h+8|0;c[d>>2]=b;c[h>>2]=j;p=h+4|0;c[p>>2]=j+(c[f>>2]|0);v=h+12|0;L3461:do{if(g){c[v>>2]=0;u=jB(h,m,q)|0;if((u|0)==0){break L3459}else{A=m;B=u}}else{u=m;while(1){c[v>>2]=0;r=jB(h,u,q)|0;if((r|0)!=0){A=u;B=r;break L3461}if(u>>>0>=(c[p>>2]|0)>>>0){break L3459}u=u+1|0}}}while(0);if(l){p=j;c5(b,1-p+A|0);c5(b,B-p|0);p=c[v>>2]|0;gH(c[d>>2]|0,p,8536);if((p|0)>0){q=0;do{jC(h,q,0,0);q=q+1|0;}while((q|0)<(p|0))}z=p+2|0;i=e;return z|0}else{q=c[v>>2]|0;m=(q|0)!=0|(A|0)==0?q:1;gH(c[d>>2]|0,m,8536);if((m|0)>0){C=0}else{z=m;i=e;return z|0}while(1){jC(h,C,A,B);q=C+1|0;if((q|0)<(m|0)){C=q}else{z=m;break}}i=e;return z|0}}}while(0);c3(b);z=1;i=e;return z|0}function jB(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0;g=i;h=b+4|0;j=b+8|0;k=b|0;l=b+12|0;m=e;e=f;L3484:while(1){n=m+1|0;f=m-1|0;o=e;L3486:while(1){p=a[o]|0;L3488:do{switch(p|0){case 36:{q=o+1|0;if((a[q]|0)==0){r=2800;break L3484}else{s=q;t=q}break};case 0:{u=m;r=2859;break L3484;break};case 41:{r=2737;break L3484;break};case 37:{q=o+1|0;v=a[q]|0;w=v<<24>>24;if((w|0)==98){r=2744;break L3486}else if((w|0)!=102){x=v&255;if((x-48|0)>>>0<10){r=2791;break L3486}else{y=q;r=2801;break L3488}}q=o+2|0;do{if((a[q]|0)==91){z=o+3|0;r=2761}else{v=c[j>>2]|0;gz(v,7848,(A=i,i=i+1|0,i=i+7>>3<<3,c[A>>2]=0,A)|0)|0;i=A;v=a[q]|0;w=o+3|0;if((v|0)==91){z=w;r=2761;break}else if((v|0)!=37){B=w;C=w;break}if((a[w]|0)==0){v=c[j>>2]|0;gz(v,7584,(A=i,i=i+1|0,i=i+7>>3<<3,c[A>>2]=0,A)|0)|0;i=A}B=o+4|0;C=w}}while(0);if((r|0)==2761){r=0;w=(a[z]|0)==94?o+4|0:z;v=w;D=a[w]|0;while(1){if(D<<24>>24==0){w=c[j>>2]|0;gz(w,7432,(A=i,i=i+1|0,i=i+7>>3<<3,c[A>>2]=0,A)|0)|0;i=A;E=a[v]|0}else{E=D}w=v+1|0;if(E<<24>>24==37){F=(a[w]|0)==0?w:v+2|0}else{F=w}w=a[F]|0;if(w<<24>>24==93){break}else{v=F;D=w}}B=F+1|0;C=z}if((m|0)==(c[k>>2]|0)){G=0}else{G=d[f]|0}D=B-1|0;v=(a[C]|0)==94;w=v?C:q;H=v&1;v=H^1;I=w+1|0;L3517:do{if(I>>>0<D>>>0){J=w;K=I;while(1){L=a[K]|0;M=J+2|0;N=a[M]|0;L3520:do{if(L<<24>>24==37){if((jE(G,N&255)|0)==0){O=M}else{P=v;break L3517}}else{do{if(N<<24>>24==45){Q=J+3|0;if(Q>>>0>=D>>>0){break}if((L&255)>>>0>G>>>0){O=Q;break L3520}if((d[Q]|0)>>>0<G>>>0){O=Q;break L3520}else{P=v;break L3517}}}while(0);if((L&255|0)==(G|0)){P=v;break L3517}else{O=K}}}while(0);L=O+1|0;if(L>>>0<D>>>0){J=O;K=L}else{P=H;break}}}else{P=H}}while(0);if((P|0)!=0){u=0;r=2870;break L3484}H=a[m]|0;v=H&255;I=(a[C]|0)==94;w=I?C:q;K=I&1;I=K^1;J=w+1|0;L3531:do{if(J>>>0<D>>>0){L=w;N=J;while(1){M=a[N]|0;Q=L+2|0;R=a[Q]|0;L3534:do{if(M<<24>>24==37){if((jE(v,R&255)|0)==0){S=Q}else{T=I;break L3531}}else{do{if(R<<24>>24==45){U=L+3|0;if(U>>>0>=D>>>0){break}if((M&255)>(H&255)){S=U;break L3534}if((d[U]|0)<(H&255)){S=U;break L3534}else{T=I;break L3531}}}while(0);if(M<<24>>24==H<<24>>24){T=I;break L3531}else{S=N}}}while(0);M=S+1|0;if(M>>>0<D>>>0){L=S;N=M}else{T=K;break}}}else{T=K}}while(0);if((T|0)==0){u=0;r=2853;break L3484}else{o=B;continue L3486}break};case 40:{r=2728;break L3484;break};default:{y=o+1|0;r=2801}}}while(0);do{if((r|0)==2801){r=0;if((p|0)==37){if((a[y]|0)==0){K=c[j>>2]|0;gz(K,7584,(A=i,i=i+1|0,i=i+7>>3<<3,c[A>>2]=0,A)|0)|0;i=A}s=o+2|0;t=y;break}else if((p|0)!=91){s=y;t=y;break}K=(a[y]|0)==94?o+2|0:y;D=K;I=a[K]|0;while(1){if(I<<24>>24==0){K=c[j>>2]|0;gz(K,7432,(A=i,i=i+1|0,i=i+7>>3<<3,c[A>>2]=0,A)|0)|0;i=A;V=a[D]|0}else{V=I}K=D+1|0;if(V<<24>>24==37){W=(a[K]|0)==0?K:D+2|0}else{W=K}K=a[W]|0;if(K<<24>>24==93){break}else{D=W;I=K}}s=W+1|0;t=y}}while(0);if(m>>>0<(c[h>>2]|0)>>>0){p=a[m]|0;I=p&255;D=a[o]|0;K=D<<24>>24;L3564:do{if((K|0)==37){X=jE(I,d[t]|0)|0}else if((K|0)==91){H=s-1|0;v=(a[t]|0)==94;J=v?t:o;w=v&1;v=w^1;q=J+1|0;if(q>>>0<H>>>0){Y=J;Z=q}else{X=w;break}while(1){q=a[Z]|0;J=Y+2|0;N=a[J]|0;L3569:do{if(q<<24>>24==37){if((jE(I,N&255)|0)==0){_=J}else{X=v;break L3564}}else{do{if(N<<24>>24==45){L=Y+3|0;if(L>>>0>=H>>>0){break}if((q&255)>(p&255)){_=L;break L3569}if((d[L]|0)<(p&255)){_=L;break L3569}else{X=v;break L3564}}}while(0);if(q<<24>>24==p<<24>>24){X=v;break L3564}else{_=Z}}}while(0);q=_+1|0;if(q>>>0<H>>>0){Y=_;Z=q}else{X=w;break}}}else if((K|0)==46){X=1}else{X=D<<24>>24==p<<24>>24|0}}while(0);$=(X|0)!=0}else{$=0}p=a[s]|0;if((p|0)==45){r=2827;break L3484}else if((p|0)==42){r=2831;break L3484}else if((p|0)==43){r=2832;break L3484}else if((p|0)!=63){r=2849;break}p=s+1|0;if(!$){o=p;continue}D=jB(b,n,p)|0;if((D|0)==0){o=p}else{u=D;r=2862;break L3484}}if((r|0)==2791){r=0;f=x-49|0;do{if((f|0)<0){r=2794}else{if((f|0)>=(c[l>>2]|0)){r=2794;break}D=c[b+16+(f<<3)+4>>2]|0;if((D|0)==-1){r=2794}else{aa=f;ab=D}}}while(0);if((r|0)==2794){r=0;f=gz(c[j>>2]|0,8344,(A=i,i=i+1|0,i=i+7>>3<<3,c[A>>2]=0,A)|0)|0;i=A;aa=f;ab=c[b+16+(f<<3)+4>>2]|0}if(((c[h>>2]|0)-m|0)>>>0<ab>>>0){u=0;r=2851;break}if((j5(c[b+16+(aa<<3)>>2]|0,m|0,ab|0)|0)!=0){u=0;r=2854;break}f=m+ab|0;if((f|0)==0){u=0;r=2855;break}m=f;e=o+2|0;continue}else if((r|0)==2744){r=0;f=o+2|0;D=a[f]|0;if(D<<24>>24==0){r=2746}else{if((a[o+3|0]|0)==0){r=2746}else{ac=D}}if((r|0)==2746){r=0;D=c[j>>2]|0;gz(D,7168,(A=i,i=i+1|0,i=i+7>>3<<3,c[A>>2]=0,A)|0)|0;i=A;ac=a[f]|0}if((a[m]|0)!=ac<<24>>24){u=0;r=2857;break}f=a[o+3|0]|0;D=c[h>>2]|0;if(n>>>0<D>>>0){ad=m;ae=1;af=n}else{u=0;r=2858;break}while(1){p=a[af]|0;if(p<<24>>24==f<<24>>24){K=ae-1|0;if((K|0)==0){break}else{ag=K}}else{ag=(p<<24>>24==ac<<24>>24)+ae|0}p=af+1|0;if(p>>>0<D>>>0){ad=af;ae=ag;af=p}else{u=0;r=2852;break L3484}}D=ad+2|0;if((D|0)==0){u=0;r=2860;break}m=D;e=o+4|0;continue}else if((r|0)==2849){r=0;if($){m=n;e=s;continue}else{u=0;r=2869;break}}}if((r|0)==2800){u=(m|0)==(c[h>>2]|0)?m:0;i=g;return u|0}else if((r|0)==2827){e=s+1|0;ad=jB(b,m,e)|0;if((ad|0)!=0){u=ad;i=g;return u|0}ad=s-1|0;af=m;while(1){if(af>>>0>=(c[h>>2]|0)>>>0){u=0;r=2866;break}ag=a[af]|0;ae=ag&255;ac=a[o]|0;ab=ac<<24>>24;L3620:do{if((ab|0)==37){ah=jE(ae,d[t]|0)|0;r=2847}else if((ab|0)==91){aa=(a[t]|0)==94;x=aa?t:o;X=aa&1;aa=X^1;Z=x+1|0;if(Z>>>0<ad>>>0){ai=x;aj=Z}else{ah=X;r=2847;break}while(1){Z=a[aj]|0;x=ai+2|0;_=a[x]|0;L3625:do{if(Z<<24>>24==37){if((jE(ae,_&255)|0)==0){ak=x}else{ah=aa;r=2847;break L3620}}else{do{if(_<<24>>24==45){Y=ai+3|0;if(Y>>>0>=ad>>>0){break}if((Z&255)>(ag&255)){ak=Y;break L3625}if((d[Y]|0)<(ag&255)){ak=Y;break L3625}else{ah=aa;r=2847;break L3620}}}while(0);if(Z<<24>>24==ag<<24>>24){ah=aa;r=2847;break L3620}else{ak=aj}}}while(0);Z=ak+1|0;if(Z>>>0<ad>>>0){ai=ak;aj=Z}else{ah=X;r=2847;break}}}else if((ab|0)!=46){ah=ac<<24>>24==ag<<24>>24|0;r=2847}}while(0);if((r|0)==2847){r=0;if((ah|0)==0){u=0;r=2867;break}}ag=af+1|0;ac=jB(b,ag,e)|0;if((ac|0)==0){af=ag}else{u=ac;r=2868;break}}if((r|0)==2866){i=g;return u|0}else if((r|0)==2867){i=g;return u|0}else if((r|0)==2868){i=g;return u|0}}else if((r|0)==2831){u=jD(b,m,o,s)|0;i=g;return u|0}else if((r|0)==2832){if(!$){u=0;i=g;return u|0}u=jD(b,n,o,s)|0;i=g;return u|0}else if((r|0)==2851){i=g;return u|0}else if((r|0)==2852){i=g;return u|0}else if((r|0)==2853){i=g;return u|0}else if((r|0)==2854){i=g;return u|0}else if((r|0)==2855){i=g;return u|0}else if((r|0)==2857){i=g;return u|0}else if((r|0)==2858){i=g;return u|0}else if((r|0)==2859){i=g;return u|0}else if((r|0)==2860){i=g;return u|0}else if((r|0)==2862){i=g;return u|0}else if((r|0)==2869){i=g;return u|0}else if((r|0)==2870){i=g;return u|0}else if((r|0)==2737){s=o+1|0;n=c[l>>2]|0;while(1){$=n-1|0;if((n|0)<=0){r=2740;break}if((c[b+16+($<<3)+4>>2]|0)==-1){al=$;break}else{n=$}}if((r|0)==2740){n=gz(c[j>>2]|0,7e3,(A=i,i=i+1|0,i=i+7>>3<<3,c[A>>2]=0,A)|0)|0;i=A;al=n}n=b+16+(al<<3)+4|0;c[n>>2]=m-(c[b+16+(al<<3)>>2]|0);al=jB(b,m,s)|0;if((al|0)!=0){u=al;i=g;return u|0}c[n>>2]=-1;u=0;i=g;return u|0}else if((r|0)==2728){r=o+1|0;if((a[r]|0)==41){n=c[l>>2]|0;if((n|0)>31){al=c[j>>2]|0;gz(al,8536,(A=i,i=i+1|0,i=i+7>>3<<3,c[A>>2]=0,A)|0)|0;i=A}c[b+16+(n<<3)>>2]=m;c[b+16+(n<<3)+4>>2]=-2;c[l>>2]=n+1;n=jB(b,m,o+2|0)|0;if((n|0)!=0){u=n;i=g;return u|0}c[l>>2]=(c[l>>2]|0)-1;u=0;i=g;return u|0}else{n=c[l>>2]|0;if((n|0)>31){o=c[j>>2]|0;gz(o,8536,(A=i,i=i+1|0,i=i+7>>3<<3,c[A>>2]=0,A)|0)|0;i=A}c[b+16+(n<<3)>>2]=m;c[b+16+(n<<3)+4>>2]=-1;c[l>>2]=n+1;n=jB(b,m,r)|0;if((n|0)!=0){u=n;i=g;return u|0}c[l>>2]=(c[l>>2]|0)-1;u=0;i=g;return u|0}}return 0}function jC(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;if((c[a+12>>2]|0)<=(b|0)){g=c[a+8>>2]|0;if((b|0)==0){c9(g,d,e-d|0);i=f;return}else{gz(g,8344,(h=i,i=i+1|0,i=i+7>>3<<3,c[h>>2]=0,h)|0)|0;i=h;i=f;return}}g=c[a+16+(b<<3)+4>>2]|0;do{if((g|0)==-1){d=a+8|0;e=c[d>>2]|0;gz(e,8104,(h=i,i=i+1|0,i=i+7>>3<<3,c[h>>2]=0,h)|0)|0;i=h;j=c[d>>2]|0;k=c[a+16+(b<<3)>>2]|0}else{d=c[a+8>>2]|0;e=c[a+16+(b<<3)>>2]|0;if((g|0)!=-2){j=d;k=e;break}c5(d,e+1-(c[a>>2]|0)|0);i=f;return}}while(0);c9(j,k,g);i=f;return}function jD(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;h=b+4|0;i=c[h>>2]|0;L3707:do{if(i>>>0>e>>>0){j=f+1|0;k=g-1|0;l=0;m=e;n=i;while(1){o=a[m]|0;p=o&255;q=a[f]|0;r=q<<24>>24;L3711:do{if((r|0)==37){s=jE(p,d[j]|0)|0;t=2905}else if((r|0)==46){u=n}else if((r|0)==91){v=(a[j]|0)==94;w=v?j:f;x=v&1;v=x^1;y=w+1|0;if(y>>>0<k>>>0){z=w;A=y}else{s=x;t=2905;break}while(1){y=a[A]|0;w=z+2|0;B=a[w]|0;L3717:do{if(y<<24>>24==37){if((jE(p,B&255)|0)==0){C=w}else{s=v;t=2905;break L3711}}else{do{if(B<<24>>24==45){D=z+3|0;if(D>>>0>=k>>>0){break}if((y&255)>(o&255)){C=D;break L3717}if((d[D]|0)<(o&255)){C=D;break L3717}else{s=v;t=2905;break L3711}}}while(0);if(y<<24>>24==o<<24>>24){s=v;t=2905;break L3711}else{C=A}}}while(0);y=C+1|0;if(y>>>0<k>>>0){z=C;A=y}else{s=x;t=2905;break}}}else{s=q<<24>>24==o<<24>>24|0;t=2905}}while(0);if((t|0)==2905){t=0;if((s|0)==0){E=l;break L3707}u=c[h>>2]|0}o=l+1|0;q=e+o|0;if(q>>>0<u>>>0){l=o;m=q;n=u}else{E=o;break}}}else{E=0}}while(0);u=g+1|0;g=E;while(1){if((g|0)<=-1){F=0;t=2912;break}E=jB(b,e+g|0,u)|0;if((E|0)==0){g=g-1|0}else{F=E;t=2913;break}}if((t|0)==2913){return F|0}else if((t|0)==2912){return F|0}return 0}function jE(a,b){a=a|0;b=b|0;var c=0,d=0;switch(j6(b|0)|0){case 120:{c=aY(a|0)|0;break};case 122:{c=(a|0)==0|0;break};case 119:{c=bq(a|0)|0;break};case 115:{c=aB(a|0)|0;break};case 112:{c=bU(a|0)|0;break};case 97:{c=bt(a|0)|0;break};case 117:{c=bd(a|0)|0;break};case 108:{c=bb(a|0)|0;break};case 100:{c=(a-48|0)>>>0<10|0;break};case 99:{c=b8(a|0)|0;break};default:{d=(b|0)==(a|0)|0;return d|0}}if((bb(b|0)|0)!=0){d=c;return d|0}d=(c|0)==0|0;return d|0}function jF(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=i;i=i+280|0;d=b|0;e=b+272|0;f=c0(a,-10003,e)|0;g=c0(a,-10004,0)|0;h=d+8|0;c[h>>2]=a;c[d>>2]=f;j=f+(c[e>>2]|0)|0;e=d+4|0;c[e>>2]=j;k=d+12|0;l=f+(c$(a,-10005)|0)|0;m=j;while(1){if(l>>>0>m>>>0){n=0;o=2939;break}c[k>>2]=0;p=jB(d,l,g)|0;if((p|0)!=0){break}l=l+1|0;m=c[e>>2]|0}if((o|0)==2939){i=b;return n|0}c5(a,p-f+((p|0)==(l|0))|0);cP(a,-10005);a=c[k>>2]|0;k=(a|0)!=0|(l|0)==0?a:1;gH(c[h>>2]|0,k,8536);if((k|0)>0){q=0}else{n=k;i=b;return n|0}while(1){jC(d,q,l,p);h=q+1|0;if((h|0)<(k|0)){q=h}else{n=k;break}}i=b;return n|0}function jG(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;gV(d,b,c);return 0}function jH(a){a=a|0;var b=0,c=0;gF(a,3592)|0;dd(a,380,0);dm(a,-2,9152);gQ(a,7152,432);cJ(a,-1);cP(a,-10001);di(a,4,0);dd(a,388,0);dp(a,-2,1);dd(a,320,0);dp(a,-2,2);dd(a,524,0);dp(a,-2,3);dd(a,276,0);dp(a,-2,4);dm(a,-2,5608);b=bz(3768|0)|0;if((b|0)==0){da(a,3048)}else{c=gT(a,b,6816,6704)|0;gT(a,c,6592,3048)|0;cH(a,-2)}dm(a,-2,4376);c=bz(2344|0)|0;if((c|0)==0){da(a,2072)}else{b=gT(a,c,6816,6704)|0;gT(a,b,6592,2072)|0;cH(a,-2)}dm(a,-2,2680);c9(a,10272,9);dm(a,-2,10048);gS(a,-1e4,9760,2)|0;dm(a,-2,9560);di(a,0,0);dm(a,-2,9344);cJ(a,-10002);gQ(a,0,1368);cG(a,-2);return 1}function jI(a){a=a|0;c[(gG(a,1,3592)|0)>>2]=0;return 0}function jJ(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;b=i;i=i+104|0;d=b|0;e=gE(a,1,0)|0;f=cF(a)|0;g=f+1|0;df(a,-1e4,9760);df(a,g,e);do{if((cK(a,-1)|0)!=5){cG(a,-2);if((gS(a,-10002,e,1)|0)==0){cJ(a,-1);dm(a,g,e);break}h=gz(a,8072,(j=i,i=i+8|0,c[j>>2]=e,j)|0)|0;i=j;k=h;i=b;return k|0}}while(0);df(a,-1,7840);g=(cK(a,-1)|0)==0;cG(a,-2);if(g){cJ(a,-1);dm(a,-2,7160);da(a,e);dm(a,-2,7840);g=a0(e|0,46)|0;c9(a,e,((g|0)==0?e:g+1|0)-e|0);dm(a,-2,6976)}cJ(a,-1);do{if((ej(a,1,d)|0)==0){l=2960}else{if((en(a,7576,d)|0)==0){l=2960;break}if((cM(a,-1)|0)!=0){l=2960}}}while(0);if((l|0)==2960){gz(a,7392,(j=i,i=i+1|0,i=i+7>>3<<3,c[j>>2]=0,j)|0)|0;i=j}cJ(a,-2);dv(a,-2)|0;cG(a,-2);if((f|0)<2){k=0;i=b;return k|0}else{m=2}while(1){cJ(a,m);cJ(a,-2);dw(a,1,0);j=m+1|0;if((j|0)>(f|0)){k=0;break}else{m=j}}i=b;return k|0}function jK(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;d=gE(a,1,0)|0;cG(a,1);df(a,-1e4,9760);df(a,2,d);if((cX(a,-1)|0)!=0){if((cZ(a,-1)|0)!=10480){i=b;return 1}gz(a,8880,(e=i,i=i+8|0,c[e>>2]=d,e)|0)|0;i=e;i=b;return 1}df(a,-10001,5608);if((cK(a,-1)|0)!=5){gz(a,8704,(e=i,i=i+1|0,i=i+7>>3<<3,c[e>>2]=0,e)|0)|0;i=e}c9(a,10552,0);f=1;while(1){dh(a,-2,f);if((cK(a,-1)|0)==0){g=c0(a,-2,0)|0;gz(a,8312,(e=i,i=i+16|0,c[e>>2]=d,c[e+8>>2]=g,e)|0)|0;i=e}da(a,d);dw(a,1,1);if((cK(a,-1)|0)==6){break}if((cQ(a,-1)|0)==0){cG(a,-2)}else{dG(a,2)}f=f+1|0}c7(a,10480);dm(a,2,d);da(a,d);dw(a,1,1);if((cK(a,-1)|0)!=0){dm(a,2,d)}df(a,2,d);if((cZ(a,-1)|0)!=10480){i=b;return 1}c6(a,1);cJ(a,-1);dm(a,2,d);i=b;return 1}function jL(a){a=a|0;var b=0,d=0,e=0;b=i;d=gE(a,1,0)|0;df(a,-10001,9344);if((cK(a,-1)|0)!=5){gz(a,4384,(e=i,i=i+1|0,i=i+7>>3<<3,c[e>>2]=0,e)|0)|0;i=e}df(a,-1,d);if((cK(a,-1)|0)!=0){i=b;return 1}dc(a,4272,(e=i,i=i+8|0,c[e>>2]=d,e)|0)|0;i=e;i=b;return 1}function jM(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;d=jP(a,gE(a,1,0)|0,4376)|0;if((d|0)==0){i=b;return 1}if((g0(a,d)|0)==0){i=b;return 1}e=c0(a,1,0)|0;f=c0(a,-1,0)|0;gz(a,6240,(a=i,i=i+24|0,c[a>>2]=e,c[a+8>>2]=d,c[a+16>>2]=f,a)|0)|0;i=a;i=b;return 1}function jN(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;d=gE(a,1,0)|0;e=jP(a,d,2680)|0;if((e|0)==0){i=b;return 1}f=aU(d|0,45)|0;g=gT(a,(f|0)==0?d:f+1|0,5496,5352)|0;dc(a,5256,(f=i,i=i+8|0,c[f>>2]=g,f)|0)|0;i=f;cH(a,-2);if((jQ(a,e)|0)==0){i=b;return 1}g=c0(a,1,0)|0;d=c0(a,-1,0)|0;gz(a,6240,(f=i,i=i+24|0,c[f>>2]=g,c[f+8>>2]=e,c[f+16>>2]=d,f)|0)|0;i=f;i=b;return 1}function jO(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;d=gE(a,1,0)|0;e=aU(d|0,46)|0;if((e|0)==0){f=0;i=b;return f|0}c9(a,d,e-d|0);e=jP(a,c0(a,-1,0)|0,2680)|0;if((e|0)==0){f=1;i=b;return f|0}g=aU(d|0,45)|0;h=gT(a,(g|0)==0?d:g+1|0,5496,5352)|0;dc(a,5256,(g=i,i=i+8|0,c[g>>2]=h,g)|0)|0;i=g;cH(a,-2);h=jQ(a,e)|0;if((h|0)==0){f=1;i=b;return f|0}else if((h|0)!=2){h=c0(a,1,0)|0;j=c0(a,-1,0)|0;gz(a,6240,(g=i,i=i+24|0,c[g>>2]=h,c[g+8>>2]=e,c[g+16>>2]=j,g)|0)|0;i=g}dc(a,6440,(g=i,i=i+16|0,c[g>>2]=d,c[g+8>>2]=e,g)|0)|0;i=g;f=1;i=b;return f|0}function jP(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;g=gT(b,d,5496,5168)|0;df(b,-10001,e);d=c0(b,-1,0)|0;if((d|0)==0){gz(b,5008,(h=i,i=i+8|0,c[h>>2]=e,h)|0)|0;i=h}c9(b,10552,0);e=d;while(1){d=a[e]|0;if((d<<24>>24|0)==0){j=0;k=3034;break}else if((d<<24>>24|0)==59){e=e+1|0;continue}d=aU(e|0,59)|0;if((d|0)==0){l=e+(j_(e|0)|0)|0}else{l=d}c9(b,e,l-e|0);if((l|0)==0){j=0;k=3033;break}m=gT(b,c0(b,-1,0)|0,4880,g)|0;cH(b,-2);n=bl(m|0,4600|0)|0;if((n|0)!=0){k=3029;break}dc(b,4720,(h=i,i=i+8|0,c[h>>2]=m,h)|0)|0;i=h;cH(b,-2);dG(b,2);e=l}if((k|0)==3029){ar(n|0)|0;j=m;i=f;return j|0}else if((k|0)==3033){i=f;return j|0}else if((k|0)==3034){i=f;return j|0}return 0}function jQ(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;dc(a,5792,(e=i,i=i+16|0,c[e>>2]=5720,c[e+8>>2]=b,e)|0)|0;i=e;de(a,-1e4);if((cK(a,-1)|0)==0){cG(a,-2);f=dH(a,4)|0;c[f>>2]=0;df(a,-1e4,3592);dq(a,-2)|0;dc(a,5792,(e=i,i=i+16|0,c[e>>2]=5720,c[e+8>>2]=b,e)|0)|0;i=e;cJ(a,-2);dl(a,-1e4);g=f}else{g=cZ(a,-1)|0}f=(c[g>>2]|0)==0;c9(a,6e3,58);if(!f){h=2;i=d;return h|0}c[g>>2]=0;h=1;i=d;return h|0}function jR(a){a=a|0;var b=0,c=0,d=0;b=gE(a,1,0)|0;gE(a,2,0)|0;c=jQ(a,b)|0;if((c|0)==0){d=1;return d|0}c3(a);cI(a,-2);da(a,(c|0)==1?4072:4024);d=3;return d|0}function jS(a){a=a|0;gI(a,1,5);if((dj(a,1)|0)==0){di(a,0,1);cJ(a,-1);dq(a,1)|0}cJ(a,-10002);dm(a,-2,4136);return 0}function jT(a){a=a|0;dd(a,504,0);da(a,10528);dw(a,1,0);dd(a,398,0);da(a,9080);dw(a,1,0);dd(a,350,0);da(a,7064);dw(a,1,0);dd(a,282,0);da(a,5552);dw(a,1,0);dd(a,356,0);da(a,4312);dw(a,1,0);dd(a,324,0);da(a,3744);dw(a,1,0);dd(a,296,0);da(a,3040);dw(a,1,0);dd(a,412,0);da(a,2672);dw(a,1,0);return}function jU(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,am=0,an=0,ao=0,ap=0,aq=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0;do{if(a>>>0<245){if(a>>>0<11){b=16}else{b=a+11&-8}d=b>>>3;e=c[2648]|0;f=e>>>(d>>>0);if((f&3|0)!=0){g=(f&1^1)+d|0;h=g<<1;i=10632+(h<<2)|0;j=10632+(h+2<<2)|0;h=c[j>>2]|0;k=h+8|0;l=c[k>>2]|0;do{if((i|0)==(l|0)){c[2648]=e&~(1<<g)}else{if(l>>>0<(c[2652]|0)>>>0){bM();return 0}m=l+12|0;if((c[m>>2]|0)==(h|0)){c[m>>2]=i;c[j>>2]=l;break}else{bM();return 0}}}while(0);l=g<<3;c[h+4>>2]=l|3;j=h+(l|4)|0;c[j>>2]=c[j>>2]|1;n=k;return n|0}if(b>>>0<=(c[2650]|0)>>>0){o=b;break}if((f|0)!=0){j=2<<d;l=f<<d&(j|-j);j=(l&-l)-1|0;l=j>>>12&16;i=j>>>(l>>>0);j=i>>>5&8;m=i>>>(j>>>0);i=m>>>2&4;p=m>>>(i>>>0);m=p>>>1&2;q=p>>>(m>>>0);p=q>>>1&1;r=(j|l|i|m|p)+(q>>>(p>>>0))|0;p=r<<1;q=10632+(p<<2)|0;m=10632+(p+2<<2)|0;p=c[m>>2]|0;i=p+8|0;l=c[i>>2]|0;do{if((q|0)==(l|0)){c[2648]=e&~(1<<r)}else{if(l>>>0<(c[2652]|0)>>>0){bM();return 0}j=l+12|0;if((c[j>>2]|0)==(p|0)){c[j>>2]=q;c[m>>2]=l;break}else{bM();return 0}}}while(0);l=r<<3;m=l-b|0;c[p+4>>2]=b|3;q=p;e=q+b|0;c[q+(b|4)>>2]=m|1;c[q+l>>2]=m;l=c[2650]|0;if((l|0)!=0){q=c[2653]|0;d=l>>>3;l=d<<1;f=10632+(l<<2)|0;k=c[2648]|0;h=1<<d;do{if((k&h|0)==0){c[2648]=k|h;s=f;t=10632+(l+2<<2)|0}else{d=10632+(l+2<<2)|0;g=c[d>>2]|0;if(g>>>0>=(c[2652]|0)>>>0){s=g;t=d;break}bM();return 0}}while(0);c[t>>2]=q;c[s+12>>2]=q;c[q+8>>2]=s;c[q+12>>2]=f}c[2650]=m;c[2653]=e;n=i;return n|0}l=c[2649]|0;if((l|0)==0){o=b;break}h=(l&-l)-1|0;l=h>>>12&16;k=h>>>(l>>>0);h=k>>>5&8;p=k>>>(h>>>0);k=p>>>2&4;r=p>>>(k>>>0);p=r>>>1&2;d=r>>>(p>>>0);r=d>>>1&1;g=c[10896+((h|l|k|p|r)+(d>>>(r>>>0))<<2)>>2]|0;r=g;d=g;p=(c[g+4>>2]&-8)-b|0;while(1){g=c[r+16>>2]|0;if((g|0)==0){k=c[r+20>>2]|0;if((k|0)==0){break}else{u=k}}else{u=g}g=(c[u+4>>2]&-8)-b|0;k=g>>>0<p>>>0;r=u;d=k?u:d;p=k?g:p}r=d;i=c[2652]|0;if(r>>>0<i>>>0){bM();return 0}e=r+b|0;m=e;if(r>>>0>=e>>>0){bM();return 0}e=c[d+24>>2]|0;f=c[d+12>>2]|0;do{if((f|0)==(d|0)){q=d+20|0;g=c[q>>2]|0;if((g|0)==0){k=d+16|0;l=c[k>>2]|0;if((l|0)==0){v=0;break}else{w=l;x=k}}else{w=g;x=q}while(1){q=w+20|0;g=c[q>>2]|0;if((g|0)!=0){w=g;x=q;continue}q=w+16|0;g=c[q>>2]|0;if((g|0)==0){break}else{w=g;x=q}}if(x>>>0<i>>>0){bM();return 0}else{c[x>>2]=0;v=w;break}}else{q=c[d+8>>2]|0;if(q>>>0<i>>>0){bM();return 0}g=q+12|0;if((c[g>>2]|0)!=(d|0)){bM();return 0}k=f+8|0;if((c[k>>2]|0)==(d|0)){c[g>>2]=f;c[k>>2]=q;v=f;break}else{bM();return 0}}}while(0);L4106:do{if((e|0)!=0){f=d+28|0;i=10896+(c[f>>2]<<2)|0;do{if((d|0)==(c[i>>2]|0)){c[i>>2]=v;if((v|0)!=0){break}c[2649]=c[2649]&~(1<<c[f>>2]);break L4106}else{if(e>>>0<(c[2652]|0)>>>0){bM();return 0}q=e+16|0;if((c[q>>2]|0)==(d|0)){c[q>>2]=v}else{c[e+20>>2]=v}if((v|0)==0){break L4106}}}while(0);if(v>>>0<(c[2652]|0)>>>0){bM();return 0}c[v+24>>2]=e;f=c[d+16>>2]|0;do{if((f|0)!=0){if(f>>>0<(c[2652]|0)>>>0){bM();return 0}else{c[v+16>>2]=f;c[f+24>>2]=v;break}}}while(0);f=c[d+20>>2]|0;if((f|0)==0){break}if(f>>>0<(c[2652]|0)>>>0){bM();return 0}else{c[v+20>>2]=f;c[f+24>>2]=v;break}}}while(0);if(p>>>0<16){e=p+b|0;c[d+4>>2]=e|3;f=r+(e+4)|0;c[f>>2]=c[f>>2]|1}else{c[d+4>>2]=b|3;c[r+(b|4)>>2]=p|1;c[r+(p+b)>>2]=p;f=c[2650]|0;if((f|0)!=0){e=c[2653]|0;i=f>>>3;f=i<<1;q=10632+(f<<2)|0;k=c[2648]|0;g=1<<i;do{if((k&g|0)==0){c[2648]=k|g;y=q;z=10632+(f+2<<2)|0}else{i=10632+(f+2<<2)|0;l=c[i>>2]|0;if(l>>>0>=(c[2652]|0)>>>0){y=l;z=i;break}bM();return 0}}while(0);c[z>>2]=e;c[y+12>>2]=e;c[e+8>>2]=y;c[e+12>>2]=q}c[2650]=p;c[2653]=m}f=d+8|0;if((f|0)==0){o=b;break}else{n=f}return n|0}else{if(a>>>0>4294967231){o=-1;break}f=a+11|0;g=f&-8;k=c[2649]|0;if((k|0)==0){o=g;break}r=-g|0;i=f>>>8;do{if((i|0)==0){A=0}else{if(g>>>0>16777215){A=31;break}f=(i+1048320|0)>>>16&8;l=i<<f;h=(l+520192|0)>>>16&4;j=l<<h;l=(j+245760|0)>>>16&2;B=14-(h|f|l)+(j<<l>>>15)|0;A=g>>>((B+7|0)>>>0)&1|B<<1}}while(0);i=c[10896+(A<<2)>>2]|0;L3914:do{if((i|0)==0){C=0;D=r;E=0}else{if((A|0)==31){F=0}else{F=25-(A>>>1)|0}d=0;m=r;p=i;q=g<<F;e=0;while(1){B=c[p+4>>2]&-8;l=B-g|0;if(l>>>0<m>>>0){if((B|0)==(g|0)){C=p;D=l;E=p;break L3914}else{G=p;H=l}}else{G=d;H=m}l=c[p+20>>2]|0;B=c[p+16+(q>>>31<<2)>>2]|0;j=(l|0)==0|(l|0)==(B|0)?e:l;if((B|0)==0){C=G;D=H;E=j;break}else{d=G;m=H;p=B;q=q<<1;e=j}}}}while(0);if((E|0)==0&(C|0)==0){i=2<<A;r=k&(i|-i);if((r|0)==0){o=g;break}i=(r&-r)-1|0;r=i>>>12&16;e=i>>>(r>>>0);i=e>>>5&8;q=e>>>(i>>>0);e=q>>>2&4;p=q>>>(e>>>0);q=p>>>1&2;m=p>>>(q>>>0);p=m>>>1&1;I=c[10896+((i|r|e|q|p)+(m>>>(p>>>0))<<2)>>2]|0}else{I=E}if((I|0)==0){J=D;K=C}else{p=I;m=D;q=C;while(1){e=(c[p+4>>2]&-8)-g|0;r=e>>>0<m>>>0;i=r?e:m;e=r?p:q;r=c[p+16>>2]|0;if((r|0)!=0){p=r;m=i;q=e;continue}r=c[p+20>>2]|0;if((r|0)==0){J=i;K=e;break}else{p=r;m=i;q=e}}}if((K|0)==0){o=g;break}if(J>>>0>=((c[2650]|0)-g|0)>>>0){o=g;break}q=K;m=c[2652]|0;if(q>>>0<m>>>0){bM();return 0}p=q+g|0;k=p;if(q>>>0>=p>>>0){bM();return 0}e=c[K+24>>2]|0;i=c[K+12>>2]|0;do{if((i|0)==(K|0)){r=K+20|0;d=c[r>>2]|0;if((d|0)==0){j=K+16|0;B=c[j>>2]|0;if((B|0)==0){L=0;break}else{M=B;N=j}}else{M=d;N=r}while(1){r=M+20|0;d=c[r>>2]|0;if((d|0)!=0){M=d;N=r;continue}r=M+16|0;d=c[r>>2]|0;if((d|0)==0){break}else{M=d;N=r}}if(N>>>0<m>>>0){bM();return 0}else{c[N>>2]=0;L=M;break}}else{r=c[K+8>>2]|0;if(r>>>0<m>>>0){bM();return 0}d=r+12|0;if((c[d>>2]|0)!=(K|0)){bM();return 0}j=i+8|0;if((c[j>>2]|0)==(K|0)){c[d>>2]=i;c[j>>2]=r;L=i;break}else{bM();return 0}}}while(0);L3964:do{if((e|0)!=0){i=K+28|0;m=10896+(c[i>>2]<<2)|0;do{if((K|0)==(c[m>>2]|0)){c[m>>2]=L;if((L|0)!=0){break}c[2649]=c[2649]&~(1<<c[i>>2]);break L3964}else{if(e>>>0<(c[2652]|0)>>>0){bM();return 0}r=e+16|0;if((c[r>>2]|0)==(K|0)){c[r>>2]=L}else{c[e+20>>2]=L}if((L|0)==0){break L3964}}}while(0);if(L>>>0<(c[2652]|0)>>>0){bM();return 0}c[L+24>>2]=e;i=c[K+16>>2]|0;do{if((i|0)!=0){if(i>>>0<(c[2652]|0)>>>0){bM();return 0}else{c[L+16>>2]=i;c[i+24>>2]=L;break}}}while(0);i=c[K+20>>2]|0;if((i|0)==0){break}if(i>>>0<(c[2652]|0)>>>0){bM();return 0}else{c[L+20>>2]=i;c[i+24>>2]=L;break}}}while(0);do{if(J>>>0<16){e=J+g|0;c[K+4>>2]=e|3;i=q+(e+4)|0;c[i>>2]=c[i>>2]|1}else{c[K+4>>2]=g|3;c[q+(g|4)>>2]=J|1;c[q+(J+g)>>2]=J;i=J>>>3;if(J>>>0<256){e=i<<1;m=10632+(e<<2)|0;r=c[2648]|0;j=1<<i;do{if((r&j|0)==0){c[2648]=r|j;O=m;P=10632+(e+2<<2)|0}else{i=10632+(e+2<<2)|0;d=c[i>>2]|0;if(d>>>0>=(c[2652]|0)>>>0){O=d;P=i;break}bM();return 0}}while(0);c[P>>2]=k;c[O+12>>2]=k;c[q+(g+8)>>2]=O;c[q+(g+12)>>2]=m;break}e=p;j=J>>>8;do{if((j|0)==0){Q=0}else{if(J>>>0>16777215){Q=31;break}r=(j+1048320|0)>>>16&8;i=j<<r;d=(i+520192|0)>>>16&4;B=i<<d;i=(B+245760|0)>>>16&2;l=14-(d|r|i)+(B<<i>>>15)|0;Q=J>>>((l+7|0)>>>0)&1|l<<1}}while(0);j=10896+(Q<<2)|0;c[q+(g+28)>>2]=Q;c[q+(g+20)>>2]=0;c[q+(g+16)>>2]=0;m=c[2649]|0;l=1<<Q;if((m&l|0)==0){c[2649]=m|l;c[j>>2]=e;c[q+(g+24)>>2]=j;c[q+(g+12)>>2]=e;c[q+(g+8)>>2]=e;break}if((Q|0)==31){R=0}else{R=25-(Q>>>1)|0}l=J<<R;m=c[j>>2]|0;while(1){if((c[m+4>>2]&-8|0)==(J|0)){break}S=m+16+(l>>>31<<2)|0;j=c[S>>2]|0;if((j|0)==0){T=3202;break}else{l=l<<1;m=j}}if((T|0)==3202){if(S>>>0<(c[2652]|0)>>>0){bM();return 0}else{c[S>>2]=e;c[q+(g+24)>>2]=m;c[q+(g+12)>>2]=e;c[q+(g+8)>>2]=e;break}}l=m+8|0;j=c[l>>2]|0;i=c[2652]|0;if(m>>>0<i>>>0){bM();return 0}if(j>>>0<i>>>0){bM();return 0}else{c[j+12>>2]=e;c[l>>2]=e;c[q+(g+8)>>2]=j;c[q+(g+12)>>2]=m;c[q+(g+24)>>2]=0;break}}}while(0);q=K+8|0;if((q|0)==0){o=g;break}else{n=q}return n|0}}while(0);K=c[2650]|0;if(o>>>0<=K>>>0){S=K-o|0;J=c[2653]|0;if(S>>>0>15){R=J;c[2653]=R+o;c[2650]=S;c[R+(o+4)>>2]=S|1;c[R+K>>2]=S;c[J+4>>2]=o|3}else{c[2650]=0;c[2653]=0;c[J+4>>2]=K|3;S=J+(K+4)|0;c[S>>2]=c[S>>2]|1}n=J+8|0;return n|0}J=c[2651]|0;if(o>>>0<J>>>0){S=J-o|0;c[2651]=S;J=c[2654]|0;K=J;c[2654]=K+o;c[K+(o+4)>>2]=S|1;c[J+4>>2]=o|3;n=J+8|0;return n|0}do{if((c[2622]|0)==0){J=bK(8)|0;if((J-1&J|0)==0){c[2624]=J;c[2623]=J;c[2625]=-1;c[2626]=-1;c[2627]=0;c[2759]=0;c[2622]=(cb(0)|0)&-16^1431655768;break}else{bM();return 0}}}while(0);J=o+48|0;S=c[2624]|0;K=o+47|0;R=S+K|0;Q=-S|0;S=R&Q;if(S>>>0<=o>>>0){n=0;return n|0}O=c[2758]|0;do{if((O|0)!=0){P=c[2756]|0;L=P+S|0;if(L>>>0<=P>>>0|L>>>0>O>>>0){n=0}else{break}return n|0}}while(0);L4173:do{if((c[2759]&4|0)==0){O=c[2654]|0;L4175:do{if((O|0)==0){T=3232}else{L=O;P=11040;while(1){U=P|0;M=c[U>>2]|0;if(M>>>0<=L>>>0){V=P+4|0;if((M+(c[V>>2]|0)|0)>>>0>L>>>0){break}}M=c[P+8>>2]|0;if((M|0)==0){T=3232;break L4175}else{P=M}}if((P|0)==0){T=3232;break}L=R-(c[2651]|0)&Q;if(L>>>0>=2147483647){W=0;break}m=bB(L|0)|0;e=(m|0)==((c[U>>2]|0)+(c[V>>2]|0)|0);X=e?m:-1;Y=e?L:0;Z=m;_=L;T=3241}}while(0);do{if((T|0)==3232){O=bB(0)|0;if((O|0)==-1){W=0;break}g=O;L=c[2623]|0;m=L-1|0;if((m&g|0)==0){$=S}else{$=S-g+(m+g&-L)|0}L=c[2756]|0;g=L+$|0;if(!($>>>0>o>>>0&$>>>0<2147483647)){W=0;break}m=c[2758]|0;if((m|0)!=0){if(g>>>0<=L>>>0|g>>>0>m>>>0){W=0;break}}m=bB($|0)|0;g=(m|0)==(O|0);X=g?O:-1;Y=g?$:0;Z=m;_=$;T=3241}}while(0);L4195:do{if((T|0)==3241){m=-_|0;if((X|0)!=-1){aa=Y;ab=X;T=3252;break L4173}do{if((Z|0)!=-1&_>>>0<2147483647&_>>>0<J>>>0){g=c[2624]|0;O=K-_+g&-g;if(O>>>0>=2147483647){ac=_;break}if((bB(O|0)|0)==-1){bB(m|0)|0;W=Y;break L4195}else{ac=O+_|0;break}}else{ac=_}}while(0);if((Z|0)==-1){W=Y}else{aa=ac;ab=Z;T=3252;break L4173}}}while(0);c[2759]=c[2759]|4;ad=W;T=3249}else{ad=0;T=3249}}while(0);do{if((T|0)==3249){if(S>>>0>=2147483647){break}W=bB(S|0)|0;Z=bB(0)|0;if(!((Z|0)!=-1&(W|0)!=-1&W>>>0<Z>>>0)){break}ac=Z-W|0;Z=ac>>>0>(o+40|0)>>>0;Y=Z?W:-1;if((Y|0)!=-1){aa=Z?ac:ad;ab=Y;T=3252}}}while(0);do{if((T|0)==3252){ad=(c[2756]|0)+aa|0;c[2756]=ad;if(ad>>>0>(c[2757]|0)>>>0){c[2757]=ad}ad=c[2654]|0;L4215:do{if((ad|0)==0){S=c[2652]|0;if((S|0)==0|ab>>>0<S>>>0){c[2652]=ab}c[2760]=ab;c[2761]=aa;c[2763]=0;c[2657]=c[2622];c[2656]=-1;S=0;do{Y=S<<1;ac=10632+(Y<<2)|0;c[10632+(Y+3<<2)>>2]=ac;c[10632+(Y+2<<2)>>2]=ac;S=S+1|0;}while(S>>>0<32);S=ab+8|0;if((S&7|0)==0){ae=0}else{ae=-S&7}S=aa-40-ae|0;c[2654]=ab+ae;c[2651]=S;c[ab+(ae+4)>>2]=S|1;c[ab+(aa-36)>>2]=40;c[2655]=c[2626]}else{S=11040;while(1){af=c[S>>2]|0;ag=S+4|0;ah=c[ag>>2]|0;if((ab|0)==(af+ah|0)){T=3264;break}ac=c[S+8>>2]|0;if((ac|0)==0){break}else{S=ac}}do{if((T|0)==3264){if((c[S+12>>2]&8|0)!=0){break}ac=ad;if(!(ac>>>0>=af>>>0&ac>>>0<ab>>>0)){break}c[ag>>2]=ah+aa;ac=c[2654]|0;Y=(c[2651]|0)+aa|0;Z=ac;W=ac+8|0;if((W&7|0)==0){ai=0}else{ai=-W&7}W=Y-ai|0;c[2654]=Z+ai;c[2651]=W;c[Z+(ai+4)>>2]=W|1;c[Z+(Y+4)>>2]=40;c[2655]=c[2626];break L4215}}while(0);if(ab>>>0<(c[2652]|0)>>>0){c[2652]=ab}S=ab+aa|0;Y=11040;while(1){aj=Y|0;if((c[aj>>2]|0)==(S|0)){T=3274;break}Z=c[Y+8>>2]|0;if((Z|0)==0){break}else{Y=Z}}do{if((T|0)==3274){if((c[Y+12>>2]&8|0)!=0){break}c[aj>>2]=ab;S=Y+4|0;c[S>>2]=(c[S>>2]|0)+aa;S=ab+8|0;if((S&7|0)==0){ak=0}else{ak=-S&7}S=ab+(aa+8)|0;if((S&7|0)==0){al=0}else{al=-S&7}S=ab+(al+aa)|0;Z=S;W=ak+o|0;ac=ab+W|0;_=ac;K=S-(ab+ak)-o|0;c[ab+(ak+4)>>2]=o|3;do{if((Z|0)==(c[2654]|0)){J=(c[2651]|0)+K|0;c[2651]=J;c[2654]=_;c[ab+(W+4)>>2]=J|1}else{if((Z|0)==(c[2653]|0)){J=(c[2650]|0)+K|0;c[2650]=J;c[2653]=_;c[ab+(W+4)>>2]=J|1;c[ab+(J+W)>>2]=J;break}J=aa+4|0;X=c[ab+(J+al)>>2]|0;if((X&3|0)==1){$=X&-8;V=X>>>3;L4260:do{if(X>>>0<256){U=c[ab+((al|8)+aa)>>2]|0;Q=c[ab+(aa+12+al)>>2]|0;R=10632+(V<<1<<2)|0;do{if((U|0)!=(R|0)){if(U>>>0<(c[2652]|0)>>>0){bM();return 0}if((c[U+12>>2]|0)==(Z|0)){break}bM();return 0}}while(0);if((Q|0)==(U|0)){c[2648]=c[2648]&~(1<<V);break}do{if((Q|0)==(R|0)){am=Q+8|0}else{if(Q>>>0<(c[2652]|0)>>>0){bM();return 0}m=Q+8|0;if((c[m>>2]|0)==(Z|0)){am=m;break}bM();return 0}}while(0);c[U+12>>2]=Q;c[am>>2]=U}else{R=S;m=c[ab+((al|24)+aa)>>2]|0;P=c[ab+(aa+12+al)>>2]|0;do{if((P|0)==(R|0)){O=al|16;g=ab+(J+O)|0;L=c[g>>2]|0;if((L|0)==0){e=ab+(O+aa)|0;O=c[e>>2]|0;if((O|0)==0){an=0;break}else{ao=O;ap=e}}else{ao=L;ap=g}while(1){g=ao+20|0;L=c[g>>2]|0;if((L|0)!=0){ao=L;ap=g;continue}g=ao+16|0;L=c[g>>2]|0;if((L|0)==0){break}else{ao=L;ap=g}}if(ap>>>0<(c[2652]|0)>>>0){bM();return 0}else{c[ap>>2]=0;an=ao;break}}else{g=c[ab+((al|8)+aa)>>2]|0;if(g>>>0<(c[2652]|0)>>>0){bM();return 0}L=g+12|0;if((c[L>>2]|0)!=(R|0)){bM();return 0}e=P+8|0;if((c[e>>2]|0)==(R|0)){c[L>>2]=P;c[e>>2]=g;an=P;break}else{bM();return 0}}}while(0);if((m|0)==0){break}P=ab+(aa+28+al)|0;U=10896+(c[P>>2]<<2)|0;do{if((R|0)==(c[U>>2]|0)){c[U>>2]=an;if((an|0)!=0){break}c[2649]=c[2649]&~(1<<c[P>>2]);break L4260}else{if(m>>>0<(c[2652]|0)>>>0){bM();return 0}Q=m+16|0;if((c[Q>>2]|0)==(R|0)){c[Q>>2]=an}else{c[m+20>>2]=an}if((an|0)==0){break L4260}}}while(0);if(an>>>0<(c[2652]|0)>>>0){bM();return 0}c[an+24>>2]=m;R=al|16;P=c[ab+(R+aa)>>2]|0;do{if((P|0)!=0){if(P>>>0<(c[2652]|0)>>>0){bM();return 0}else{c[an+16>>2]=P;c[P+24>>2]=an;break}}}while(0);P=c[ab+(J+R)>>2]|0;if((P|0)==0){break}if(P>>>0<(c[2652]|0)>>>0){bM();return 0}else{c[an+20>>2]=P;c[P+24>>2]=an;break}}}while(0);aq=ab+(($|al)+aa)|0;ar=$+K|0}else{aq=Z;ar=K}J=aq+4|0;c[J>>2]=c[J>>2]&-2;c[ab+(W+4)>>2]=ar|1;c[ab+(ar+W)>>2]=ar;J=ar>>>3;if(ar>>>0<256){V=J<<1;X=10632+(V<<2)|0;P=c[2648]|0;m=1<<J;do{if((P&m|0)==0){c[2648]=P|m;as=X;at=10632+(V+2<<2)|0}else{J=10632+(V+2<<2)|0;U=c[J>>2]|0;if(U>>>0>=(c[2652]|0)>>>0){as=U;at=J;break}bM();return 0}}while(0);c[at>>2]=_;c[as+12>>2]=_;c[ab+(W+8)>>2]=as;c[ab+(W+12)>>2]=X;break}V=ac;m=ar>>>8;do{if((m|0)==0){au=0}else{if(ar>>>0>16777215){au=31;break}P=(m+1048320|0)>>>16&8;$=m<<P;J=($+520192|0)>>>16&4;U=$<<J;$=(U+245760|0)>>>16&2;Q=14-(J|P|$)+(U<<$>>>15)|0;au=ar>>>((Q+7|0)>>>0)&1|Q<<1}}while(0);m=10896+(au<<2)|0;c[ab+(W+28)>>2]=au;c[ab+(W+20)>>2]=0;c[ab+(W+16)>>2]=0;X=c[2649]|0;Q=1<<au;if((X&Q|0)==0){c[2649]=X|Q;c[m>>2]=V;c[ab+(W+24)>>2]=m;c[ab+(W+12)>>2]=V;c[ab+(W+8)>>2]=V;break}if((au|0)==31){av=0}else{av=25-(au>>>1)|0}Q=ar<<av;X=c[m>>2]|0;while(1){if((c[X+4>>2]&-8|0)==(ar|0)){break}aw=X+16+(Q>>>31<<2)|0;m=c[aw>>2]|0;if((m|0)==0){T=3347;break}else{Q=Q<<1;X=m}}if((T|0)==3347){if(aw>>>0<(c[2652]|0)>>>0){bM();return 0}else{c[aw>>2]=V;c[ab+(W+24)>>2]=X;c[ab+(W+12)>>2]=V;c[ab+(W+8)>>2]=V;break}}Q=X+8|0;m=c[Q>>2]|0;$=c[2652]|0;if(X>>>0<$>>>0){bM();return 0}if(m>>>0<$>>>0){bM();return 0}else{c[m+12>>2]=V;c[Q>>2]=V;c[ab+(W+8)>>2]=m;c[ab+(W+12)>>2]=X;c[ab+(W+24)>>2]=0;break}}}while(0);n=ab+(ak|8)|0;return n|0}}while(0);Y=ad;W=11040;while(1){ax=c[W>>2]|0;if(ax>>>0<=Y>>>0){ay=c[W+4>>2]|0;az=ax+ay|0;if(az>>>0>Y>>>0){break}}W=c[W+8>>2]|0}W=ax+(ay-39)|0;if((W&7|0)==0){aA=0}else{aA=-W&7}W=ax+(ay-47+aA)|0;ac=W>>>0<(ad+16|0)>>>0?Y:W;W=ac+8|0;_=ab+8|0;if((_&7|0)==0){aB=0}else{aB=-_&7}_=aa-40-aB|0;c[2654]=ab+aB;c[2651]=_;c[ab+(aB+4)>>2]=_|1;c[ab+(aa-36)>>2]=40;c[2655]=c[2626];c[ac+4>>2]=27;c[W>>2]=c[2760];c[W+4>>2]=c[11044>>2];c[W+8>>2]=c[11048>>2];c[W+12>>2]=c[11052>>2];c[2760]=ab;c[2761]=aa;c[2763]=0;c[2762]=W;W=ac+28|0;c[W>>2]=7;if((ac+32|0)>>>0<az>>>0){_=W;while(1){W=_+4|0;c[W>>2]=7;if((_+8|0)>>>0<az>>>0){_=W}else{break}}}if((ac|0)==(Y|0)){break}_=ac-ad|0;W=Y+(_+4)|0;c[W>>2]=c[W>>2]&-2;c[ad+4>>2]=_|1;c[Y+_>>2]=_;W=_>>>3;if(_>>>0<256){K=W<<1;Z=10632+(K<<2)|0;S=c[2648]|0;m=1<<W;do{if((S&m|0)==0){c[2648]=S|m;aC=Z;aD=10632+(K+2<<2)|0}else{W=10632+(K+2<<2)|0;Q=c[W>>2]|0;if(Q>>>0>=(c[2652]|0)>>>0){aC=Q;aD=W;break}bM();return 0}}while(0);c[aD>>2]=ad;c[aC+12>>2]=ad;c[ad+8>>2]=aC;c[ad+12>>2]=Z;break}K=ad;m=_>>>8;do{if((m|0)==0){aE=0}else{if(_>>>0>16777215){aE=31;break}S=(m+1048320|0)>>>16&8;Y=m<<S;ac=(Y+520192|0)>>>16&4;W=Y<<ac;Y=(W+245760|0)>>>16&2;Q=14-(ac|S|Y)+(W<<Y>>>15)|0;aE=_>>>((Q+7|0)>>>0)&1|Q<<1}}while(0);m=10896+(aE<<2)|0;c[ad+28>>2]=aE;c[ad+20>>2]=0;c[ad+16>>2]=0;Z=c[2649]|0;Q=1<<aE;if((Z&Q|0)==0){c[2649]=Z|Q;c[m>>2]=K;c[ad+24>>2]=m;c[ad+12>>2]=ad;c[ad+8>>2]=ad;break}if((aE|0)==31){aF=0}else{aF=25-(aE>>>1)|0}Q=_<<aF;Z=c[m>>2]|0;while(1){if((c[Z+4>>2]&-8|0)==(_|0)){break}aG=Z+16+(Q>>>31<<2)|0;m=c[aG>>2]|0;if((m|0)==0){T=3382;break}else{Q=Q<<1;Z=m}}if((T|0)==3382){if(aG>>>0<(c[2652]|0)>>>0){bM();return 0}else{c[aG>>2]=K;c[ad+24>>2]=Z;c[ad+12>>2]=ad;c[ad+8>>2]=ad;break}}Q=Z+8|0;_=c[Q>>2]|0;m=c[2652]|0;if(Z>>>0<m>>>0){bM();return 0}if(_>>>0<m>>>0){bM();return 0}else{c[_+12>>2]=K;c[Q>>2]=K;c[ad+8>>2]=_;c[ad+12>>2]=Z;c[ad+24>>2]=0;break}}}while(0);ad=c[2651]|0;if(ad>>>0<=o>>>0){break}_=ad-o|0;c[2651]=_;ad=c[2654]|0;Q=ad;c[2654]=Q+o;c[Q+(o+4)>>2]=_|1;c[ad+4>>2]=o|3;n=ad+8|0;return n|0}}while(0);c[(bE()|0)>>2]=12;n=0;return n|0}function jV(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;if((a|0)==0){return}b=a-8|0;d=b;e=c[2652]|0;if(b>>>0<e>>>0){bM()}f=c[a-4>>2]|0;g=f&3;if((g|0)==1){bM()}h=f&-8;i=a+(h-8)|0;j=i;L10:do{if((f&1|0)==0){k=c[b>>2]|0;if((g|0)==0){return}l=-8-k|0;m=a+l|0;n=m;o=k+h|0;if(m>>>0<e>>>0){bM()}if((n|0)==(c[2653]|0)){p=a+(h-4)|0;if((c[p>>2]&3|0)!=3){q=n;r=o;break}c[2650]=o;c[p>>2]=c[p>>2]&-2;c[a+(l+4)>>2]=o|1;c[i>>2]=o;return}p=k>>>3;if(k>>>0<256){k=c[a+(l+8)>>2]|0;s=c[a+(l+12)>>2]|0;t=10632+(p<<1<<2)|0;do{if((k|0)!=(t|0)){if(k>>>0<e>>>0){bM()}if((c[k+12>>2]|0)==(n|0)){break}bM()}}while(0);if((s|0)==(k|0)){c[2648]=c[2648]&~(1<<p);q=n;r=o;break}do{if((s|0)==(t|0)){u=s+8|0}else{if(s>>>0<e>>>0){bM()}v=s+8|0;if((c[v>>2]|0)==(n|0)){u=v;break}bM()}}while(0);c[k+12>>2]=s;c[u>>2]=k;q=n;r=o;break}t=m;p=c[a+(l+24)>>2]|0;v=c[a+(l+12)>>2]|0;do{if((v|0)==(t|0)){w=a+(l+20)|0;x=c[w>>2]|0;if((x|0)==0){y=a+(l+16)|0;z=c[y>>2]|0;if((z|0)==0){A=0;break}else{B=z;C=y}}else{B=x;C=w}while(1){w=B+20|0;x=c[w>>2]|0;if((x|0)!=0){B=x;C=w;continue}w=B+16|0;x=c[w>>2]|0;if((x|0)==0){break}else{B=x;C=w}}if(C>>>0<e>>>0){bM()}else{c[C>>2]=0;A=B;break}}else{w=c[a+(l+8)>>2]|0;if(w>>>0<e>>>0){bM()}x=w+12|0;if((c[x>>2]|0)!=(t|0)){bM()}y=v+8|0;if((c[y>>2]|0)==(t|0)){c[x>>2]=v;c[y>>2]=w;A=v;break}else{bM()}}}while(0);if((p|0)==0){q=n;r=o;break}v=a+(l+28)|0;m=10896+(c[v>>2]<<2)|0;do{if((t|0)==(c[m>>2]|0)){c[m>>2]=A;if((A|0)!=0){break}c[2649]=c[2649]&~(1<<c[v>>2]);q=n;r=o;break L10}else{if(p>>>0<(c[2652]|0)>>>0){bM()}k=p+16|0;if((c[k>>2]|0)==(t|0)){c[k>>2]=A}else{c[p+20>>2]=A}if((A|0)==0){q=n;r=o;break L10}}}while(0);if(A>>>0<(c[2652]|0)>>>0){bM()}c[A+24>>2]=p;t=c[a+(l+16)>>2]|0;do{if((t|0)!=0){if(t>>>0<(c[2652]|0)>>>0){bM()}else{c[A+16>>2]=t;c[t+24>>2]=A;break}}}while(0);t=c[a+(l+20)>>2]|0;if((t|0)==0){q=n;r=o;break}if(t>>>0<(c[2652]|0)>>>0){bM()}else{c[A+20>>2]=t;c[t+24>>2]=A;q=n;r=o;break}}else{q=d;r=h}}while(0);d=q;if(d>>>0>=i>>>0){bM()}A=a+(h-4)|0;e=c[A>>2]|0;if((e&1|0)==0){bM()}do{if((e&2|0)==0){if((j|0)==(c[2654]|0)){B=(c[2651]|0)+r|0;c[2651]=B;c[2654]=q;c[q+4>>2]=B|1;if((q|0)!=(c[2653]|0)){return}c[2653]=0;c[2650]=0;return}if((j|0)==(c[2653]|0)){B=(c[2650]|0)+r|0;c[2650]=B;c[2653]=q;c[q+4>>2]=B|1;c[d+B>>2]=B;return}B=(e&-8)+r|0;C=e>>>3;L112:do{if(e>>>0<256){u=c[a+h>>2]|0;g=c[a+(h|4)>>2]|0;b=10632+(C<<1<<2)|0;do{if((u|0)!=(b|0)){if(u>>>0<(c[2652]|0)>>>0){bM()}if((c[u+12>>2]|0)==(j|0)){break}bM()}}while(0);if((g|0)==(u|0)){c[2648]=c[2648]&~(1<<C);break}do{if((g|0)==(b|0)){D=g+8|0}else{if(g>>>0<(c[2652]|0)>>>0){bM()}f=g+8|0;if((c[f>>2]|0)==(j|0)){D=f;break}bM()}}while(0);c[u+12>>2]=g;c[D>>2]=u}else{b=i;f=c[a+(h+16)>>2]|0;t=c[a+(h|4)>>2]|0;do{if((t|0)==(b|0)){p=a+(h+12)|0;v=c[p>>2]|0;if((v|0)==0){m=a+(h+8)|0;k=c[m>>2]|0;if((k|0)==0){E=0;break}else{F=k;G=m}}else{F=v;G=p}while(1){p=F+20|0;v=c[p>>2]|0;if((v|0)!=0){F=v;G=p;continue}p=F+16|0;v=c[p>>2]|0;if((v|0)==0){break}else{F=v;G=p}}if(G>>>0<(c[2652]|0)>>>0){bM()}else{c[G>>2]=0;E=F;break}}else{p=c[a+h>>2]|0;if(p>>>0<(c[2652]|0)>>>0){bM()}v=p+12|0;if((c[v>>2]|0)!=(b|0)){bM()}m=t+8|0;if((c[m>>2]|0)==(b|0)){c[v>>2]=t;c[m>>2]=p;E=t;break}else{bM()}}}while(0);if((f|0)==0){break}t=a+(h+20)|0;u=10896+(c[t>>2]<<2)|0;do{if((b|0)==(c[u>>2]|0)){c[u>>2]=E;if((E|0)!=0){break}c[2649]=c[2649]&~(1<<c[t>>2]);break L112}else{if(f>>>0<(c[2652]|0)>>>0){bM()}g=f+16|0;if((c[g>>2]|0)==(b|0)){c[g>>2]=E}else{c[f+20>>2]=E}if((E|0)==0){break L112}}}while(0);if(E>>>0<(c[2652]|0)>>>0){bM()}c[E+24>>2]=f;b=c[a+(h+8)>>2]|0;do{if((b|0)!=0){if(b>>>0<(c[2652]|0)>>>0){bM()}else{c[E+16>>2]=b;c[b+24>>2]=E;break}}}while(0);b=c[a+(h+12)>>2]|0;if((b|0)==0){break}if(b>>>0<(c[2652]|0)>>>0){bM()}else{c[E+20>>2]=b;c[b+24>>2]=E;break}}}while(0);c[q+4>>2]=B|1;c[d+B>>2]=B;if((q|0)!=(c[2653]|0)){H=B;break}c[2650]=B;return}else{c[A>>2]=e&-2;c[q+4>>2]=r|1;c[d+r>>2]=r;H=r}}while(0);r=H>>>3;if(H>>>0<256){d=r<<1;e=10632+(d<<2)|0;A=c[2648]|0;E=1<<r;do{if((A&E|0)==0){c[2648]=A|E;I=e;J=10632+(d+2<<2)|0}else{r=10632+(d+2<<2)|0;h=c[r>>2]|0;if(h>>>0>=(c[2652]|0)>>>0){I=h;J=r;break}bM()}}while(0);c[J>>2]=q;c[I+12>>2]=q;c[q+8>>2]=I;c[q+12>>2]=e;return}e=q;I=H>>>8;do{if((I|0)==0){K=0}else{if(H>>>0>16777215){K=31;break}J=(I+1048320|0)>>>16&8;d=I<<J;E=(d+520192|0)>>>16&4;A=d<<E;d=(A+245760|0)>>>16&2;r=14-(E|J|d)+(A<<d>>>15)|0;K=H>>>((r+7|0)>>>0)&1|r<<1}}while(0);I=10896+(K<<2)|0;c[q+28>>2]=K;c[q+20>>2]=0;c[q+16>>2]=0;r=c[2649]|0;d=1<<K;do{if((r&d|0)==0){c[2649]=r|d;c[I>>2]=e;c[q+24>>2]=I;c[q+12>>2]=q;c[q+8>>2]=q}else{if((K|0)==31){L=0}else{L=25-(K>>>1)|0}A=H<<L;J=c[I>>2]|0;while(1){if((c[J+4>>2]&-8|0)==(H|0)){break}M=J+16+(A>>>31<<2)|0;E=c[M>>2]|0;if((E|0)==0){N=129;break}else{A=A<<1;J=E}}if((N|0)==129){if(M>>>0<(c[2652]|0)>>>0){bM()}else{c[M>>2]=e;c[q+24>>2]=J;c[q+12>>2]=q;c[q+8>>2]=q;break}}A=J+8|0;B=c[A>>2]|0;E=c[2652]|0;if(J>>>0<E>>>0){bM()}if(B>>>0<E>>>0){bM()}else{c[B+12>>2]=e;c[A>>2]=e;c[q+8>>2]=B;c[q+12>>2]=J;c[q+24>>2]=0;break}}}while(0);q=(c[2656]|0)-1|0;c[2656]=q;if((q|0)==0){O=11048}else{return}while(1){q=c[O>>2]|0;if((q|0)==0){break}else{O=q+8|0}}c[2656]=-1;return}function jW(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;if((a|0)==0){d=jU(b)|0;return d|0}if(b>>>0>4294967231){c[(bE()|0)>>2]=12;d=0;return d|0}if(b>>>0<11){e=16}else{e=b+11&-8}f=jX(a-8|0,e)|0;if((f|0)!=0){d=f+8|0;return d|0}f=jU(b)|0;if((f|0)==0){d=0;return d|0}e=c[a-4>>2]|0;g=(e&-8)-((e&3|0)==0?8:4)|0;e=g>>>0<b>>>0?g:b;j$(f|0,a|0,e)|0;jV(a);d=f;return d|0}function jX(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;d=a+4|0;e=c[d>>2]|0;f=e&-8;g=a;h=g+f|0;i=h;j=c[2652]|0;if(g>>>0<j>>>0){bM();return 0}k=e&3;if(!((k|0)!=1&g>>>0<h>>>0)){bM();return 0}l=g+(f|4)|0;m=c[l>>2]|0;if((m&1|0)==0){bM();return 0}if((k|0)==0){if(b>>>0<256){n=0;return n|0}do{if(f>>>0>=(b+4|0)>>>0){if((f-b|0)>>>0>c[2624]<<1>>>0){break}else{n=a}return n|0}}while(0);n=0;return n|0}if(f>>>0>=b>>>0){k=f-b|0;if(k>>>0<=15){n=a;return n|0}c[d>>2]=e&1|b|2;c[g+(b+4)>>2]=k|3;c[l>>2]=c[l>>2]|1;jY(g+b|0,k);n=a;return n|0}if((i|0)==(c[2654]|0)){k=(c[2651]|0)+f|0;if(k>>>0<=b>>>0){n=0;return n|0}l=k-b|0;c[d>>2]=e&1|b|2;c[g+(b+4)>>2]=l|1;c[2654]=g+b;c[2651]=l;n=a;return n|0}if((i|0)==(c[2653]|0)){l=(c[2650]|0)+f|0;if(l>>>0<b>>>0){n=0;return n|0}k=l-b|0;if(k>>>0>15){c[d>>2]=e&1|b|2;c[g+(b+4)>>2]=k|1;c[g+l>>2]=k;o=g+(l+4)|0;c[o>>2]=c[o>>2]&-2;p=g+b|0;q=k}else{c[d>>2]=e&1|l|2;e=g+(l+4)|0;c[e>>2]=c[e>>2]|1;p=0;q=0}c[2650]=q;c[2653]=p;n=a;return n|0}if((m&2|0)!=0){n=0;return n|0}p=(m&-8)+f|0;if(p>>>0<b>>>0){n=0;return n|0}q=p-b|0;e=m>>>3;L299:do{if(m>>>0<256){l=c[g+(f+8)>>2]|0;k=c[g+(f+12)>>2]|0;o=10632+(e<<1<<2)|0;do{if((l|0)!=(o|0)){if(l>>>0<j>>>0){bM();return 0}if((c[l+12>>2]|0)==(i|0)){break}bM();return 0}}while(0);if((k|0)==(l|0)){c[2648]=c[2648]&~(1<<e);break}do{if((k|0)==(o|0)){r=k+8|0}else{if(k>>>0<j>>>0){bM();return 0}s=k+8|0;if((c[s>>2]|0)==(i|0)){r=s;break}bM();return 0}}while(0);c[l+12>>2]=k;c[r>>2]=l}else{o=h;s=c[g+(f+24)>>2]|0;t=c[g+(f+12)>>2]|0;do{if((t|0)==(o|0)){u=g+(f+20)|0;v=c[u>>2]|0;if((v|0)==0){w=g+(f+16)|0;x=c[w>>2]|0;if((x|0)==0){y=0;break}else{z=x;A=w}}else{z=v;A=u}while(1){u=z+20|0;v=c[u>>2]|0;if((v|0)!=0){z=v;A=u;continue}u=z+16|0;v=c[u>>2]|0;if((v|0)==0){break}else{z=v;A=u}}if(A>>>0<j>>>0){bM();return 0}else{c[A>>2]=0;y=z;break}}else{u=c[g+(f+8)>>2]|0;if(u>>>0<j>>>0){bM();return 0}v=u+12|0;if((c[v>>2]|0)!=(o|0)){bM();return 0}w=t+8|0;if((c[w>>2]|0)==(o|0)){c[v>>2]=t;c[w>>2]=u;y=t;break}else{bM();return 0}}}while(0);if((s|0)==0){break}t=g+(f+28)|0;l=10896+(c[t>>2]<<2)|0;do{if((o|0)==(c[l>>2]|0)){c[l>>2]=y;if((y|0)!=0){break}c[2649]=c[2649]&~(1<<c[t>>2]);break L299}else{if(s>>>0<(c[2652]|0)>>>0){bM();return 0}k=s+16|0;if((c[k>>2]|0)==(o|0)){c[k>>2]=y}else{c[s+20>>2]=y}if((y|0)==0){break L299}}}while(0);if(y>>>0<(c[2652]|0)>>>0){bM();return 0}c[y+24>>2]=s;o=c[g+(f+16)>>2]|0;do{if((o|0)!=0){if(o>>>0<(c[2652]|0)>>>0){bM();return 0}else{c[y+16>>2]=o;c[o+24>>2]=y;break}}}while(0);o=c[g+(f+20)>>2]|0;if((o|0)==0){break}if(o>>>0<(c[2652]|0)>>>0){bM();return 0}else{c[y+20>>2]=o;c[o+24>>2]=y;break}}}while(0);if(q>>>0<16){c[d>>2]=p|c[d>>2]&1|2;y=g+(p|4)|0;c[y>>2]=c[y>>2]|1;n=a;return n|0}else{c[d>>2]=c[d>>2]&1|b|2;c[g+(b+4)>>2]=q|3;d=g+(p|4)|0;c[d>>2]=c[d>>2]|1;jY(g+b|0,q);n=a;return n|0}return 0}function jY(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;d=a;e=d+b|0;f=e;g=c[a+4>>2]|0;L375:do{if((g&1|0)==0){h=c[a>>2]|0;if((g&3|0)==0){return}i=d+(-h|0)|0;j=i;k=h+b|0;l=c[2652]|0;if(i>>>0<l>>>0){bM()}if((j|0)==(c[2653]|0)){m=d+(b+4)|0;if((c[m>>2]&3|0)!=3){n=j;o=k;break}c[2650]=k;c[m>>2]=c[m>>2]&-2;c[d+(4-h)>>2]=k|1;c[e>>2]=k;return}m=h>>>3;if(h>>>0<256){p=c[d+(8-h)>>2]|0;q=c[d+(12-h)>>2]|0;r=10632+(m<<1<<2)|0;do{if((p|0)!=(r|0)){if(p>>>0<l>>>0){bM()}if((c[p+12>>2]|0)==(j|0)){break}bM()}}while(0);if((q|0)==(p|0)){c[2648]=c[2648]&~(1<<m);n=j;o=k;break}do{if((q|0)==(r|0)){s=q+8|0}else{if(q>>>0<l>>>0){bM()}t=q+8|0;if((c[t>>2]|0)==(j|0)){s=t;break}bM()}}while(0);c[p+12>>2]=q;c[s>>2]=p;n=j;o=k;break}r=i;m=c[d+(24-h)>>2]|0;t=c[d+(12-h)>>2]|0;do{if((t|0)==(r|0)){u=16-h|0;v=d+(u+4)|0;w=c[v>>2]|0;if((w|0)==0){x=d+u|0;u=c[x>>2]|0;if((u|0)==0){y=0;break}else{z=u;A=x}}else{z=w;A=v}while(1){v=z+20|0;w=c[v>>2]|0;if((w|0)!=0){z=w;A=v;continue}v=z+16|0;w=c[v>>2]|0;if((w|0)==0){break}else{z=w;A=v}}if(A>>>0<l>>>0){bM()}else{c[A>>2]=0;y=z;break}}else{v=c[d+(8-h)>>2]|0;if(v>>>0<l>>>0){bM()}w=v+12|0;if((c[w>>2]|0)!=(r|0)){bM()}x=t+8|0;if((c[x>>2]|0)==(r|0)){c[w>>2]=t;c[x>>2]=v;y=t;break}else{bM()}}}while(0);if((m|0)==0){n=j;o=k;break}t=d+(28-h)|0;l=10896+(c[t>>2]<<2)|0;do{if((r|0)==(c[l>>2]|0)){c[l>>2]=y;if((y|0)!=0){break}c[2649]=c[2649]&~(1<<c[t>>2]);n=j;o=k;break L375}else{if(m>>>0<(c[2652]|0)>>>0){bM()}i=m+16|0;if((c[i>>2]|0)==(r|0)){c[i>>2]=y}else{c[m+20>>2]=y}if((y|0)==0){n=j;o=k;break L375}}}while(0);if(y>>>0<(c[2652]|0)>>>0){bM()}c[y+24>>2]=m;r=16-h|0;t=c[d+r>>2]|0;do{if((t|0)!=0){if(t>>>0<(c[2652]|0)>>>0){bM()}else{c[y+16>>2]=t;c[t+24>>2]=y;break}}}while(0);t=c[d+(r+4)>>2]|0;if((t|0)==0){n=j;o=k;break}if(t>>>0<(c[2652]|0)>>>0){bM()}else{c[y+20>>2]=t;c[t+24>>2]=y;n=j;o=k;break}}else{n=a;o=b}}while(0);a=c[2652]|0;if(e>>>0<a>>>0){bM()}y=d+(b+4)|0;z=c[y>>2]|0;do{if((z&2|0)==0){if((f|0)==(c[2654]|0)){A=(c[2651]|0)+o|0;c[2651]=A;c[2654]=n;c[n+4>>2]=A|1;if((n|0)!=(c[2653]|0)){return}c[2653]=0;c[2650]=0;return}if((f|0)==(c[2653]|0)){A=(c[2650]|0)+o|0;c[2650]=A;c[2653]=n;c[n+4>>2]=A|1;c[n+A>>2]=A;return}A=(z&-8)+o|0;s=z>>>3;L474:do{if(z>>>0<256){g=c[d+(b+8)>>2]|0;t=c[d+(b+12)>>2]|0;h=10632+(s<<1<<2)|0;do{if((g|0)!=(h|0)){if(g>>>0<a>>>0){bM()}if((c[g+12>>2]|0)==(f|0)){break}bM()}}while(0);if((t|0)==(g|0)){c[2648]=c[2648]&~(1<<s);break}do{if((t|0)==(h|0)){B=t+8|0}else{if(t>>>0<a>>>0){bM()}m=t+8|0;if((c[m>>2]|0)==(f|0)){B=m;break}bM()}}while(0);c[g+12>>2]=t;c[B>>2]=g}else{h=e;m=c[d+(b+24)>>2]|0;l=c[d+(b+12)>>2]|0;do{if((l|0)==(h|0)){i=d+(b+20)|0;p=c[i>>2]|0;if((p|0)==0){q=d+(b+16)|0;v=c[q>>2]|0;if((v|0)==0){C=0;break}else{D=v;E=q}}else{D=p;E=i}while(1){i=D+20|0;p=c[i>>2]|0;if((p|0)!=0){D=p;E=i;continue}i=D+16|0;p=c[i>>2]|0;if((p|0)==0){break}else{D=p;E=i}}if(E>>>0<a>>>0){bM()}else{c[E>>2]=0;C=D;break}}else{i=c[d+(b+8)>>2]|0;if(i>>>0<a>>>0){bM()}p=i+12|0;if((c[p>>2]|0)!=(h|0)){bM()}q=l+8|0;if((c[q>>2]|0)==(h|0)){c[p>>2]=l;c[q>>2]=i;C=l;break}else{bM()}}}while(0);if((m|0)==0){break}l=d+(b+28)|0;g=10896+(c[l>>2]<<2)|0;do{if((h|0)==(c[g>>2]|0)){c[g>>2]=C;if((C|0)!=0){break}c[2649]=c[2649]&~(1<<c[l>>2]);break L474}else{if(m>>>0<(c[2652]|0)>>>0){bM()}t=m+16|0;if((c[t>>2]|0)==(h|0)){c[t>>2]=C}else{c[m+20>>2]=C}if((C|0)==0){break L474}}}while(0);if(C>>>0<(c[2652]|0)>>>0){bM()}c[C+24>>2]=m;h=c[d+(b+16)>>2]|0;do{if((h|0)!=0){if(h>>>0<(c[2652]|0)>>>0){bM()}else{c[C+16>>2]=h;c[h+24>>2]=C;break}}}while(0);h=c[d+(b+20)>>2]|0;if((h|0)==0){break}if(h>>>0<(c[2652]|0)>>>0){bM()}else{c[C+20>>2]=h;c[h+24>>2]=C;break}}}while(0);c[n+4>>2]=A|1;c[n+A>>2]=A;if((n|0)!=(c[2653]|0)){F=A;break}c[2650]=A;return}else{c[y>>2]=z&-2;c[n+4>>2]=o|1;c[n+o>>2]=o;F=o}}while(0);o=F>>>3;if(F>>>0<256){z=o<<1;y=10632+(z<<2)|0;C=c[2648]|0;b=1<<o;do{if((C&b|0)==0){c[2648]=C|b;G=y;H=10632+(z+2<<2)|0}else{o=10632+(z+2<<2)|0;d=c[o>>2]|0;if(d>>>0>=(c[2652]|0)>>>0){G=d;H=o;break}bM()}}while(0);c[H>>2]=n;c[G+12>>2]=n;c[n+8>>2]=G;c[n+12>>2]=y;return}y=n;G=F>>>8;do{if((G|0)==0){I=0}else{if(F>>>0>16777215){I=31;break}H=(G+1048320|0)>>>16&8;z=G<<H;b=(z+520192|0)>>>16&4;C=z<<b;z=(C+245760|0)>>>16&2;o=14-(b|H|z)+(C<<z>>>15)|0;I=F>>>((o+7|0)>>>0)&1|o<<1}}while(0);G=10896+(I<<2)|0;c[n+28>>2]=I;c[n+20>>2]=0;c[n+16>>2]=0;o=c[2649]|0;z=1<<I;if((o&z|0)==0){c[2649]=o|z;c[G>>2]=y;c[n+24>>2]=G;c[n+12>>2]=n;c[n+8>>2]=n;return}if((I|0)==31){J=0}else{J=25-(I>>>1)|0}I=F<<J;J=c[G>>2]|0;while(1){if((c[J+4>>2]&-8|0)==(F|0)){break}K=J+16+(I>>>31<<2)|0;G=c[K>>2]|0;if((G|0)==0){L=409;break}else{I=I<<1;J=G}}if((L|0)==409){if(K>>>0<(c[2652]|0)>>>0){bM()}c[K>>2]=y;c[n+24>>2]=J;c[n+12>>2]=n;c[n+8>>2]=n;return}K=J+8|0;L=c[K>>2]|0;I=c[2652]|0;if(J>>>0<I>>>0){bM()}if(L>>>0<I>>>0){bM()}c[L+12>>2]=y;c[K>>2]=y;c[n+8>>2]=L;c[n+12>>2]=J;c[n+24>>2]=0;return}function jZ(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0,u=0,v=0.0,w=0,x=0,y=0,z=0.0,A=0.0,B=0,C=0,D=0,E=0.0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0.0,O=0,P=0,Q=0.0,R=0.0,S=0.0;e=b;while(1){f=e+1|0;if((aB(a[e]|0)|0)==0){break}else{e=f}}g=a[e]|0;if((g<<24>>24|0)==43){i=f;j=0}else if((g<<24>>24|0)==45){i=f;j=1}else{i=e;j=0}e=-1;f=0;g=i;while(1){k=a[g]|0;if(((k<<24>>24)-48|0)>>>0<10){l=e}else{if(k<<24>>24!=46|(e|0)>-1){break}else{l=f}}e=l;f=f+1|0;g=g+1|0}l=g+(-f|0)|0;i=(e|0)<0;m=((i^1)<<31>>31)+f|0;n=(m|0)>18;o=(n?-18:-m|0)+(i?f:e)|0;e=n?18:m;do{if((e|0)==0){p=b;q=0.0}else{if((e|0)>9){m=l;n=e;f=0;while(1){i=a[m]|0;r=m+1|0;if(i<<24>>24==46){s=a[r]|0;t=m+2|0}else{s=i;t=r}u=(f*10|0)-48+(s<<24>>24)|0;r=n-1|0;if((r|0)>9){m=t;n=r;f=u}else{break}}v=+(u|0)*1.0e9;w=9;x=t;y=457}else{if((e|0)>0){v=0.0;w=e;x=l;y=457}else{z=0.0;A=0.0}}if((y|0)==457){f=x;n=w;m=0;while(1){r=a[f]|0;i=f+1|0;if(r<<24>>24==46){B=a[i]|0;C=f+2|0}else{B=r;C=i}D=(m*10|0)-48+(B<<24>>24)|0;i=n-1|0;if((i|0)>0){f=C;n=i;m=D}else{break}}z=+(D|0);A=v}E=A+z;do{if((k<<24>>24|0)==69|(k<<24>>24|0)==101){m=g+1|0;n=a[m]|0;if((n<<24>>24|0)==45){F=g+2|0;G=1}else if((n<<24>>24|0)==43){F=g+2|0;G=0}else{F=m;G=0}m=a[F]|0;if(((m<<24>>24)-48|0)>>>0<10){H=F;I=0;J=m}else{K=0;L=F;M=G;break}while(1){m=(I*10|0)-48+(J<<24>>24)|0;n=H+1|0;f=a[n]|0;if(((f<<24>>24)-48|0)>>>0<10){H=n;I=m;J=f}else{K=m;L=n;M=G;break}}}else{K=0;L=g;M=0}}while(0);n=o+((M|0)==0?K:-K|0)|0;m=(n|0)<0?-n|0:n;if((m|0)>511){c[(bE()|0)>>2]=34;N=1.0;O=360;P=511;y=474}else{if((m|0)==0){Q=1.0}else{N=1.0;O=360;P=m;y=474}}if((y|0)==474){while(1){y=0;if((P&1|0)==0){R=N}else{R=N*+h[O>>3]}m=P>>1;if((m|0)==0){Q=R;break}else{N=R;O=O+8|0;P=m;y=474}}}if((n|0)>-1){p=L;q=E*Q;break}else{p=L;q=E/Q;break}}}while(0);if((d|0)!=0){c[d>>2]=p}if((j|0)==0){S=q;return+S}S=-0.0-q;return+S}function j_(b){b=b|0;var c=0;c=b;while(a[c]|0){c=c+1|0}return c-b|0}function j$(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=b|0;if((b&3)==(d&3)){while(b&3){if((e|0)==0)return f|0;a[b]=a[d]|0;b=b+1|0;d=d+1|0;e=e-1|0}while((e|0)>=4){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0;e=e-4|0}}while((e|0)>0){a[b]=a[d]|0;b=b+1|0;d=d+1|0;e=e-1|0}return f|0}function j0(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;t=t+1|0;c[a>>2]=t;while((e|0)<40){if((c[d+(e<<2)>>2]|0)==0){c[d+(e<<2)>>2]=t;c[d+((e<<2)+4)>>2]=b;c[d+((e<<2)+8)>>2]=0;return 0}e=e+2|0}ba(116);ba(111);ba(111);ba(32);ba(109);ba(97);ba(110);ba(121);ba(32);ba(115);ba(101);ba(116);ba(106);ba(109);ba(112);ba(115);ba(32);ba(105);ba(110);ba(32);ba(97);ba(32);ba(102);ba(117);ba(110);ba(99);ba(116);ba(105);ba(111);ba(110);ba(32);ba(99);ba(97);ba(108);ba(108);ba(44);ba(32);ba(98);ba(117);ba(105);ba(108);ba(100);ba(32);ba(119);ba(105);ba(116);ba(104);ba(32);ba(97);ba(32);ba(104);ba(105);ba(103);ba(104);ba(101);ba(114);ba(32);ba(118);ba(97);ba(108);ba(117);ba(101);ba(32);ba(102);ba(111);ba(114);ba(32);ba(77);ba(65);ba(88);ba(95);ba(83);ba(69);ba(84);ba(74);ba(77);ba(80);ba(83);ba(10);ab(0);return 0}function j1(a,b){a=a|0;b=b|0;var d=0,e=0;while((d|0)<20){e=c[b+(d<<2)>>2]|0;if((e|0)==0)break;if((e|0)==(a|0)){return c[b+((d<<2)+4)>>2]|0}d=d+2|0}return 0}function j2(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=b+e|0;if((e|0)>=20){d=d&255;e=b&3;g=d|d<<8|d<<16|d<<24;h=f&~3;if(e){e=b+4-e|0;while((b|0)<(e|0)){a[b]=d;b=b+1|0}}while((b|0)<(h|0)){c[b>>2]=g;b=b+4|0}}while((b|0)<(f|0)){a[b]=d;b=b+1|0}}function j3(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;while((e|0)<(d|0)){a[b+e|0]=f?0:a[c+e|0]|0;f=f?1:(a[c+e|0]|0)==0;e=e+1|0}return b|0}function j4(b,c){b=b|0;c=c|0;var d=0,e=0;d=b+(j_(b)|0)|0;do{a[d+e|0]=a[c+e|0];e=e+1|0}while(a[c+(e-1)|0]|0);return b|0}function j5(a,b,c){a=a|0;b=b|0;c=c|0;var e=0,f=0,g=0;while((e|0)<(c|0)){f=d[a+e|0]|0;g=d[b+e|0]|0;if((f|0)!=(g|0))return((f|0)>(g|0)?1:-1)|0;e=e+1|0}return 0}function j6(a){a=a|0;if((a|0)<65)return a|0;if((a|0)>90)return a|0;return a-65+97|0}function j7(a,b){a=a|0;b=b|0;return cd[a&1023](b|0)|0}function j8(a){a=a|0;return ag(0,a|0)|0}function j9(a){a=a|0;return ag(1,a|0)|0}function ka(a){a=a|0;return ag(2,a|0)|0}function kb(a){a=a|0;return ag(3,a|0)|0}function kc(a){a=a|0;return ag(4,a|0)|0}function kd(a){a=a|0;return ag(5,a|0)|0}function ke(a){a=a|0;return ag(6,a|0)|0}function kf(a){a=a|0;return ag(7,a|0)|0}function kg(a){a=a|0;return ag(8,a|0)|0}function kh(a){a=a|0;return ag(9,a|0)|0}function ki(a){a=a|0;return ag(10,a|0)|0}function kj(a){a=a|0;return ag(11,a|0)|0}function kk(a){a=a|0;return ag(12,a|0)|0}function kl(a){a=a|0;return ag(13,a|0)|0}function km(a){a=a|0;return ag(14,a|0)|0}function kn(a){a=a|0;return ag(15,a|0)|0}function ko(a){a=a|0;return ag(16,a|0)|0}function kp(a){a=a|0;return ag(17,a|0)|0}function kq(a){a=a|0;return ag(18,a|0)|0}function kr(a){a=a|0;return ag(19,a|0)|0}function ks(a){a=a|0;return ag(20,a|0)|0}function kt(a){a=a|0;return ag(21,a|0)|0}function ku(a){a=a|0;return ag(22,a|0)|0}function kv(a){a=a|0;return ag(23,a|0)|0}function kw(a){a=a|0;return ag(24,a|0)|0}function kx(a){a=a|0;return ag(25,a|0)|0}function ky(a){a=a|0;return ag(26,a|0)|0}function kz(a){a=a|0;return ag(27,a|0)|0}function kA(a){a=a|0;return ag(28,a|0)|0}function kB(a){a=a|0;return ag(29,a|0)|0}function kC(a){a=a|0;return ag(30,a|0)|0}function kD(a){a=a|0;return ag(31,a|0)|0}function kE(a){a=a|0;return ag(32,a|0)|0}function kF(a){a=a|0;return ag(33,a|0)|0}function kG(a){a=a|0;return ag(34,a|0)|0}function kH(a){a=a|0;return ag(35,a|0)|0}function kI(a){a=a|0;return ag(36,a|0)|0}function kJ(a){a=a|0;return ag(37,a|0)|0}function kK(a){a=a|0;return ag(38,a|0)|0}function kL(a){a=a|0;return ag(39,a|0)|0}function kM(a){a=a|0;return ag(40,a|0)|0}function kN(a){a=a|0;return ag(41,a|0)|0}function kO(a){a=a|0;return ag(42,a|0)|0}function kP(a){a=a|0;return ag(43,a|0)|0}function kQ(a){a=a|0;return ag(44,a|0)|0}function kR(a){a=a|0;return ag(45,a|0)|0}function kS(a){a=a|0;return ag(46,a|0)|0}function kT(a){a=a|0;return ag(47,a|0)|0}function kU(a){a=a|0;return ag(48,a|0)|0}function kV(a){a=a|0;return ag(49,a|0)|0}function kW(a){a=a|0;return ag(50,a|0)|0}function kX(a){a=a|0;return ag(51,a|0)|0}function kY(a){a=a|0;return ag(52,a|0)|0}function kZ(a){a=a|0;return ag(53,a|0)|0}function k_(a){a=a|0;return ag(54,a|0)|0}function k$(a){a=a|0;return ag(55,a|0)|0}function k0(a){a=a|0;return ag(56,a|0)|0}function k1(a){a=a|0;return ag(57,a|0)|0}function k2(a){a=a|0;return ag(58,a|0)|0}function k3(a){a=a|0;return ag(59,a|0)|0}function k4(a){a=a|0;return ag(60,a|0)|0}function k5(a){a=a|0;return ag(61,a|0)|0}function k6(a){a=a|0;return ag(62,a|0)|0}function k7(a){a=a|0;return ag(63,a|0)|0}function k8(a){a=a|0;return ag(64,a|0)|0}function k9(a){a=a|0;return ag(65,a|0)|0}function la(a){a=a|0;return ag(66,a|0)|0}function lb(a){a=a|0;return ag(67,a|0)|0}function lc(a){a=a|0;return ag(68,a|0)|0}function ld(a){a=a|0;return ag(69,a|0)|0}function le(a){a=a|0;return ag(70,a|0)|0}function lf(a){a=a|0;return ag(71,a|0)|0}function lg(a){a=a|0;return ag(72,a|0)|0}function lh(a){a=a|0;return ag(73,a|0)|0}function li(a){a=a|0;return ag(74,a|0)|0}function lj(a){a=a|0;return ag(75,a|0)|0}function lk(a){a=a|0;return ag(76,a|0)|0}function ll(a){a=a|0;return ag(77,a|0)|0}function lm(a){a=a|0;return ag(78,a|0)|0}function ln(a){a=a|0;return ag(79,a|0)|0}function lo(a){a=a|0;return ag(80,a|0)|0}function lp(a){a=a|0;return ag(81,a|0)|0}function lq(a){a=a|0;return ag(82,a|0)|0}function lr(a){a=a|0;return ag(83,a|0)|0}function ls(a){a=a|0;return ag(84,a|0)|0}function lt(a){a=a|0;return ag(85,a|0)|0}function lu(a){a=a|0;return ag(86,a|0)|0}function lv(a){a=a|0;return ag(87,a|0)|0}function lw(a){a=a|0;return ag(88,a|0)|0}function lx(a){a=a|0;return ag(89,a|0)|0}function ly(a){a=a|0;return ag(90,a|0)|0}function lz(a){a=a|0;return ag(91,a|0)|0}function lA(a){a=a|0;return ag(92,a|0)|0}function lB(a){a=a|0;return ag(93,a|0)|0}function lC(a){a=a|0;return ag(94,a|0)|0}function lD(a){a=a|0;return ag(95,a|0)|0}function lE(a){a=a|0;return ag(96,a|0)|0}function lF(a){a=a|0;return ag(97,a|0)|0}function lG(a){a=a|0;return ag(98,a|0)|0}function lH(a){a=a|0;return ag(99,a|0)|0}function lI(a){a=a|0;return ag(100,a|0)|0}function lJ(a){a=a|0;return ag(101,a|0)|0}function lK(a){a=a|0;return ag(102,a|0)|0}function lL(a){a=a|0;return ag(103,a|0)|0}function lM(a){a=a|0;return ag(104,a|0)|0}function lN(a){a=a|0;return ag(105,a|0)|0}function lO(a){a=a|0;return ag(106,a|0)|0}function lP(a){a=a|0;return ag(107,a|0)|0}function lQ(a){a=a|0;return ag(108,a|0)|0}function lR(a){a=a|0;return ag(109,a|0)|0}function lS(a){a=a|0;return ag(110,a|0)|0}function lT(a){a=a|0;return ag(111,a|0)|0}function lU(a){a=a|0;return ag(112,a|0)|0}function lV(a){a=a|0;return ag(113,a|0)|0}function lW(a){a=a|0;return ag(114,a|0)|0}function lX(a){a=a|0;return ag(115,a|0)|0}function lY(a){a=a|0;return ag(116,a|0)|0}function lZ(a){a=a|0;return ag(117,a|0)|0}function l_(a){a=a|0;return ag(118,a|0)|0}function l$(a){a=a|0;return ag(119,a|0)|0}function l0(a){a=a|0;return ag(120,a|0)|0}function l1(a){a=a|0;return ag(121,a|0)|0}function l2(a){a=a|0;return ag(122,a|0)|0}function l3(a){a=a|0;return ag(123,a|0)|0}function l4(a){a=a|0;return ag(124,a|0)|0}function l5(a,b){a=a|0;b=b|0;ce[a&255](b|0)}function l6(a){a=a|0;ag(0,a|0)}function l7(a){a=a|0;ag(1,a|0)}function l8(a){a=a|0;ag(2,a|0)}function l9(a){a=a|0;ag(3,a|0)}function ma(a){a=a|0;ag(4,a|0)}function mb(a){a=a|0;ag(5,a|0)}function mc(a){a=a|0;ag(6,a|0)}function md(a){a=a|0;ag(7,a|0)}function me(a){a=a|0;ag(8,a|0)}function mf(a){a=a|0;ag(9,a|0)}function mg(a){a=a|0;ag(10,a|0)}function mh(a){a=a|0;ag(11,a|0)}function mi(a){a=a|0;ag(12,a|0)}function mj(a){a=a|0;ag(13,a|0)}function mk(a){a=a|0;ag(14,a|0)}function ml(a){a=a|0;ag(15,a|0)}function mm(a){a=a|0;ag(16,a|0)}function mn(a){a=a|0;ag(17,a|0)}function mo(a){a=a|0;ag(18,a|0)}function mp(a){a=a|0;ag(19,a|0)}function mq(a){a=a|0;ag(20,a|0)}function mr(a){a=a|0;ag(21,a|0)}function ms(a){a=a|0;ag(22,a|0)}function mt(a){a=a|0;ag(23,a|0)}function mu(a){a=a|0;ag(24,a|0)}function mv(a){a=a|0;ag(25,a|0)}function mw(a){a=a|0;ag(26,a|0)}function mx(a){a=a|0;ag(27,a|0)}function my(a){a=a|0;ag(28,a|0)}function mz(a){a=a|0;ag(29,a|0)}function mA(a){a=a|0;ag(30,a|0)}function mB(a){a=a|0;ag(31,a|0)}function mC(a){a=a|0;ag(32,a|0)}function mD(a){a=a|0;ag(33,a|0)}function mE(a){a=a|0;ag(34,a|0)}function mF(a){a=a|0;ag(35,a|0)}function mG(a){a=a|0;ag(36,a|0)}function mH(a){a=a|0;ag(37,a|0)}function mI(a){a=a|0;ag(38,a|0)}function mJ(a){a=a|0;ag(39,a|0)}function mK(a){a=a|0;ag(40,a|0)}function mL(a){a=a|0;ag(41,a|0)}function mM(a){a=a|0;ag(42,a|0)}function mN(a){a=a|0;ag(43,a|0)}function mO(a){a=a|0;ag(44,a|0)}function mP(a){a=a|0;ag(45,a|0)}function mQ(a){a=a|0;ag(46,a|0)}function mR(a){a=a|0;ag(47,a|0)}function mS(a){a=a|0;ag(48,a|0)}function mT(a){a=a|0;ag(49,a|0)}function mU(a){a=a|0;ag(50,a|0)}function mV(a){a=a|0;ag(51,a|0)}function mW(a){a=a|0;ag(52,a|0)}function mX(a){a=a|0;ag(53,a|0)}function mY(a){a=a|0;ag(54,a|0)}function mZ(a){a=a|0;ag(55,a|0)}function m_(a){a=a|0;ag(56,a|0)}function m$(a){a=a|0;ag(57,a|0)}function m0(a){a=a|0;ag(58,a|0)}function m1(a){a=a|0;ag(59,a|0)}function m2(a){a=a|0;ag(60,a|0)}function m3(a){a=a|0;ag(61,a|0)}function m4(a){a=a|0;ag(62,a|0)}function m5(a){a=a|0;ag(63,a|0)}function m6(a){a=a|0;ag(64,a|0)}function m7(a){a=a|0;ag(65,a|0)}function m8(a){a=a|0;ag(66,a|0)}function m9(a){a=a|0;ag(67,a|0)}function na(a){a=a|0;ag(68,a|0)}function nb(a){a=a|0;ag(69,a|0)}function nc(a){a=a|0;ag(70,a|0)}function nd(a){a=a|0;ag(71,a|0)}function ne(a){a=a|0;ag(72,a|0)}function nf(a){a=a|0;ag(73,a|0)}function ng(a){a=a|0;ag(74,a|0)}function nh(a){a=a|0;ag(75,a|0)}function ni(a){a=a|0;ag(76,a|0)}function nj(a){a=a|0;ag(77,a|0)}function nk(a){a=a|0;ag(78,a|0)}function nl(a){a=a|0;ag(79,a|0)}function nm(a){a=a|0;ag(80,a|0)}function nn(a){a=a|0;ag(81,a|0)}function no(a){a=a|0;ag(82,a|0)}function np(a){a=a|0;ag(83,a|0)}function nq(a){a=a|0;ag(84,a|0)}function nr(a){a=a|0;ag(85,a|0)}function ns(a){a=a|0;ag(86,a|0)}function nt(a){a=a|0;ag(87,a|0)}function nu(a){a=a|0;ag(88,a|0)}function nv(a){a=a|0;ag(89,a|0)}function nw(a){a=a|0;ag(90,a|0)}function nx(a){a=a|0;ag(91,a|0)}function ny(a){a=a|0;ag(92,a|0)}function nz(a){a=a|0;ag(93,a|0)}function nA(a){a=a|0;ag(94,a|0)}function nB(a){a=a|0;ag(95,a|0)}function nC(a){a=a|0;ag(96,a|0)}function nD(a){a=a|0;ag(97,a|0)}function nE(a){a=a|0;ag(98,a|0)}function nF(a){a=a|0;ag(99,a|0)}function nG(a){a=a|0;ag(100,a|0)}function nH(a){a=a|0;ag(101,a|0)}function nI(a){a=a|0;ag(102,a|0)}function nJ(a){a=a|0;ag(103,a|0)}function nK(a){a=a|0;ag(104,a|0)}function nL(a){a=a|0;ag(105,a|0)}function nM(a){a=a|0;ag(106,a|0)}function nN(a){a=a|0;ag(107,a|0)}function nO(a){a=a|0;ag(108,a|0)}function nP(a){a=a|0;ag(109,a|0)}function nQ(a){a=a|0;ag(110,a|0)}function nR(a){a=a|0;ag(111,a|0)}function nS(a){a=a|0;ag(112,a|0)}function nT(a){a=a|0;ag(113,a|0)}function nU(a){a=a|0;ag(114,a|0)}function nV(a){a=a|0;ag(115,a|0)}function nW(a){a=a|0;ag(116,a|0)}function nX(a){a=a|0;ag(117,a|0)}function nY(a){a=a|0;ag(118,a|0)}function nZ(a){a=a|0;ag(119,a|0)}function n_(a){a=a|0;ag(120,a|0)}function n$(a){a=a|0;ag(121,a|0)}function n0(a){a=a|0;ag(122,a|0)}function n1(a){a=a|0;ag(123,a|0)}function n2(a){a=a|0;ag(124,a|0)}function n3(a,b,c){a=a|0;b=b|0;c=c|0;cf[a&511](b|0,c|0)}function n4(a,b){a=a|0;b=b|0;ag(0,a|0,b|0)}function n5(a,b){a=a|0;b=b|0;ag(1,a|0,b|0)}function n6(a,b){a=a|0;b=b|0;ag(2,a|0,b|0)}function n7(a,b){a=a|0;b=b|0;ag(3,a|0,b|0)}function n8(a,b){a=a|0;b=b|0;ag(4,a|0,b|0)}function n9(a,b){a=a|0;b=b|0;ag(5,a|0,b|0)}function oa(a,b){a=a|0;b=b|0;ag(6,a|0,b|0)}function ob(a,b){a=a|0;b=b|0;ag(7,a|0,b|0)}function oc(a,b){a=a|0;b=b|0;ag(8,a|0,b|0)}function od(a,b){a=a|0;b=b|0;ag(9,a|0,b|0)}function oe(a,b){a=a|0;b=b|0;ag(10,a|0,b|0)}function of(a,b){a=a|0;b=b|0;ag(11,a|0,b|0)}function og(a,b){a=a|0;b=b|0;ag(12,a|0,b|0)}function oh(a,b){a=a|0;b=b|0;ag(13,a|0,b|0)}function oi(a,b){a=a|0;b=b|0;ag(14,a|0,b|0)}function oj(a,b){a=a|0;b=b|0;ag(15,a|0,b|0)}function ok(a,b){a=a|0;b=b|0;ag(16,a|0,b|0)}function ol(a,b){a=a|0;b=b|0;ag(17,a|0,b|0)}function om(a,b){a=a|0;b=b|0;ag(18,a|0,b|0)}function on(a,b){a=a|0;b=b|0;ag(19,a|0,b|0)}function oo(a,b){a=a|0;b=b|0;ag(20,a|0,b|0)}function op(a,b){a=a|0;b=b|0;ag(21,a|0,b|0)}function oq(a,b){a=a|0;b=b|0;ag(22,a|0,b|0)}function or(a,b){a=a|0;b=b|0;ag(23,a|0,b|0)}function os(a,b){a=a|0;b=b|0;ag(24,a|0,b|0)}function ot(a,b){a=a|0;b=b|0;ag(25,a|0,b|0)}function ou(a,b){a=a|0;b=b|0;ag(26,a|0,b|0)}function ov(a,b){a=a|0;b=b|0;ag(27,a|0,b|0)}function ow(a,b){a=a|0;b=b|0;ag(28,a|0,b|0)}function ox(a,b){a=a|0;b=b|0;ag(29,a|0,b|0)}function oy(a,b){a=a|0;b=b|0;ag(30,a|0,b|0)}function oz(a,b){a=a|0;b=b|0;ag(31,a|0,b|0)}function oA(a,b){a=a|0;b=b|0;ag(32,a|0,b|0)}function oB(a,b){a=a|0;b=b|0;ag(33,a|0,b|0)}function oC(a,b){a=a|0;b=b|0;ag(34,a|0,b|0)}function oD(a,b){a=a|0;b=b|0;ag(35,a|0,b|0)}function oE(a,b){a=a|0;b=b|0;ag(36,a|0,b|0)}function oF(a,b){a=a|0;b=b|0;ag(37,a|0,b|0)}function oG(a,b){a=a|0;b=b|0;ag(38,a|0,b|0)}function oH(a,b){a=a|0;b=b|0;ag(39,a|0,b|0)}function oI(a,b){a=a|0;b=b|0;ag(40,a|0,b|0)}function oJ(a,b){a=a|0;b=b|0;ag(41,a|0,b|0)}function oK(a,b){a=a|0;b=b|0;ag(42,a|0,b|0)}function oL(a,b){a=a|0;b=b|0;ag(43,a|0,b|0)}function oM(a,b){a=a|0;b=b|0;ag(44,a|0,b|0)}function oN(a,b){a=a|0;b=b|0;ag(45,a|0,b|0)}function oO(a,b){a=a|0;b=b|0;ag(46,a|0,b|0)}function oP(a,b){a=a|0;b=b|0;ag(47,a|0,b|0)}function oQ(a,b){a=a|0;b=b|0;ag(48,a|0,b|0)}function oR(a,b){a=a|0;b=b|0;ag(49,a|0,b|0)}function oS(a,b){a=a|0;b=b|0;ag(50,a|0,b|0)}function oT(a,b){a=a|0;b=b|0;ag(51,a|0,b|0)}function oU(a,b){a=a|0;b=b|0;ag(52,a|0,b|0)}function oV(a,b){a=a|0;b=b|0;ag(53,a|0,b|0)}function oW(a,b){a=a|0;b=b|0;ag(54,a|0,b|0)}function oX(a,b){a=a|0;b=b|0;ag(55,a|0,b|0)}function oY(a,b){a=a|0;b=b|0;ag(56,a|0,b|0)}function oZ(a,b){a=a|0;b=b|0;ag(57,a|0,b|0)}function o_(a,b){a=a|0;b=b|0;ag(58,a|0,b|0)}function o$(a,b){a=a|0;b=b|0;ag(59,a|0,b|0)}function o0(a,b){a=a|0;b=b|0;ag(60,a|0,b|0)}function o1(a,b){a=a|0;b=b|0;ag(61,a|0,b|0)}function o2(a,b){a=a|0;b=b|0;ag(62,a|0,b|0)}function o3(a,b){a=a|0;b=b|0;ag(63,a|0,b|0)}function o4(a,b){a=a|0;b=b|0;ag(64,a|0,b|0)}function o5(a,b){a=a|0;b=b|0;ag(65,a|0,b|0)}function o6(a,b){a=a|0;b=b|0;ag(66,a|0,b|0)}function o7(a,b){a=a|0;b=b|0;ag(67,a|0,b|0)}function o8(a,b){a=a|0;b=b|0;ag(68,a|0,b|0)}function o9(a,b){a=a|0;b=b|0;ag(69,a|0,b|0)}function pa(a,b){a=a|0;b=b|0;ag(70,a|0,b|0)}function pb(a,b){a=a|0;b=b|0;ag(71,a|0,b|0)}function pc(a,b){a=a|0;b=b|0;ag(72,a|0,b|0)}function pd(a,b){a=a|0;b=b|0;ag(73,a|0,b|0)}function pe(a,b){a=a|0;b=b|0;ag(74,a|0,b|0)}function pf(a,b){a=a|0;b=b|0;ag(75,a|0,b|0)}function pg(a,b){a=a|0;b=b|0;ag(76,a|0,b|0)}function ph(a,b){a=a|0;b=b|0;ag(77,a|0,b|0)}function pi(a,b){a=a|0;b=b|0;ag(78,a|0,b|0)}function pj(a,b){a=a|0;b=b|0;ag(79,a|0,b|0)}function pk(a,b){a=a|0;b=b|0;ag(80,a|0,b|0)}function pl(a,b){a=a|0;b=b|0;ag(81,a|0,b|0)}function pm(a,b){a=a|0;b=b|0;ag(82,a|0,b|0)}function pn(a,b){a=a|0;b=b|0;ag(83,a|0,b|0)}function po(a,b){a=a|0;b=b|0;ag(84,a|0,b|0)}function pp(a,b){a=a|0;b=b|0;ag(85,a|0,b|0)}function pq(a,b){a=a|0;b=b|0;ag(86,a|0,b|0)}function pr(a,b){a=a|0;b=b|0;ag(87,a|0,b|0)}function ps(a,b){a=a|0;b=b|0;ag(88,a|0,b|0)}function pt(a,b){a=a|0;b=b|0;ag(89,a|0,b|0)}function pu(a,b){a=a|0;b=b|0;ag(90,a|0,b|0)}function pv(a,b){a=a|0;b=b|0;ag(91,a|0,b|0)}function pw(a,b){a=a|0;b=b|0;ag(92,a|0,b|0)}function px(a,b){a=a|0;b=b|0;ag(93,a|0,b|0)}function py(a,b){a=a|0;b=b|0;ag(94,a|0,b|0)}function pz(a,b){a=a|0;b=b|0;ag(95,a|0,b|0)}function pA(a,b){a=a|0;b=b|0;ag(96,a|0,b|0)}function pB(a,b){a=a|0;b=b|0;ag(97,a|0,b|0)}function pC(a,b){a=a|0;b=b|0;ag(98,a|0,b|0)}function pD(a,b){a=a|0;b=b|0;ag(99,a|0,b|0)}function pE(a,b){a=a|0;b=b|0;ag(100,a|0,b|0)}function pF(a,b){a=a|0;b=b|0;ag(101,a|0,b|0)}function pG(a,b){a=a|0;b=b|0;ag(102,a|0,b|0)}function pH(a,b){a=a|0;b=b|0;ag(103,a|0,b|0)}function pI(a,b){a=a|0;b=b|0;ag(104,a|0,b|0)}function pJ(a,b){a=a|0;b=b|0;ag(105,a|0,b|0)}function pK(a,b){a=a|0;b=b|0;ag(106,a|0,b|0)}function pL(a,b){a=a|0;b=b|0;ag(107,a|0,b|0)}function pM(a,b){a=a|0;b=b|0;ag(108,a|0,b|0)}function pN(a,b){a=a|0;b=b|0;ag(109,a|0,b|0)}function pO(a,b){a=a|0;b=b|0;ag(110,a|0,b|0)}function pP(a,b){a=a|0;b=b|0;ag(111,a|0,b|0)}function pQ(a,b){a=a|0;b=b|0;ag(112,a|0,b|0)}function pR(a,b){a=a|0;b=b|0;ag(113,a|0,b|0)}function pS(a,b){a=a|0;b=b|0;ag(114,a|0,b|0)}function pT(a,b){a=a|0;b=b|0;ag(115,a|0,b|0)}function pU(a,b){a=a|0;b=b|0;ag(116,a|0,b|0)}function pV(a,b){a=a|0;b=b|0;ag(117,a|0,b|0)}function pW(a,b){a=a|0;b=b|0;ag(118,a|0,b|0)}function pX(a,b){a=a|0;b=b|0;ag(119,a|0,b|0)}function pY(a,b){a=a|0;b=b|0;ag(120,a|0,b|0)}function pZ(a,b){a=a|0;b=b|0;ag(121,a|0,b|0)}function p_(a,b){a=a|0;b=b|0;ag(122,a|0,b|0)}function p$(a,b){a=a|0;b=b|0;ag(123,a|0,b|0)}function p0(a,b){a=a|0;b=b|0;ag(124,a|0,b|0)}function p1(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return cg[a&511](b|0,c|0,d|0,e|0)|0}function p2(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(0,a|0,b|0,c|0,d|0)|0}function p3(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(1,a|0,b|0,c|0,d|0)|0}function p4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(2,a|0,b|0,c|0,d|0)|0}function p5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(3,a|0,b|0,c|0,d|0)|0}function p6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(4,a|0,b|0,c|0,d|0)|0}function p7(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(5,a|0,b|0,c|0,d|0)|0}function p8(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(6,a|0,b|0,c|0,d|0)|0}function p9(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(7,a|0,b|0,c|0,d|0)|0}function qa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(8,a|0,b|0,c|0,d|0)|0}function qb(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(9,a|0,b|0,c|0,d|0)|0}function qc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(10,a|0,b|0,c|0,d|0)|0}function qd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(11,a|0,b|0,c|0,d|0)|0}function qe(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(12,a|0,b|0,c|0,d|0)|0}function qf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(13,a|0,b|0,c|0,d|0)|0}function qg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(14,a|0,b|0,c|0,d|0)|0}function qh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(15,a|0,b|0,c|0,d|0)|0}function qi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(16,a|0,b|0,c|0,d|0)|0}function qj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(17,a|0,b|0,c|0,d|0)|0}function qk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(18,a|0,b|0,c|0,d|0)|0}function ql(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(19,a|0,b|0,c|0,d|0)|0}function qm(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(20,a|0,b|0,c|0,d|0)|0}function qn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(21,a|0,b|0,c|0,d|0)|0}function qo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(22,a|0,b|0,c|0,d|0)|0}function qp(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(23,a|0,b|0,c|0,d|0)|0}function qq(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(24,a|0,b|0,c|0,d|0)|0}function qr(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(25,a|0,b|0,c|0,d|0)|0}function qs(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(26,a|0,b|0,c|0,d|0)|0}function qt(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(27,a|0,b|0,c|0,d|0)|0}function qu(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(28,a|0,b|0,c|0,d|0)|0}function qv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(29,a|0,b|0,c|0,d|0)|0}function qw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(30,a|0,b|0,c|0,d|0)|0}function qx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(31,a|0,b|0,c|0,d|0)|0}function qy(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(32,a|0,b|0,c|0,d|0)|0}function qz(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(33,a|0,b|0,c|0,d|0)|0}function qA(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(34,a|0,b|0,c|0,d|0)|0}function qB(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(35,a|0,b|0,c|0,d|0)|0}function qC(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(36,a|0,b|0,c|0,d|0)|0}function qD(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(37,a|0,b|0,c|0,d|0)|0}function qE(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(38,a|0,b|0,c|0,d|0)|0}function qF(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(39,a|0,b|0,c|0,d|0)|0}function qG(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(40,a|0,b|0,c|0,d|0)|0}function qH(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(41,a|0,b|0,c|0,d|0)|0}function qI(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(42,a|0,b|0,c|0,d|0)|0}function qJ(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(43,a|0,b|0,c|0,d|0)|0}function qK(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(44,a|0,b|0,c|0,d|0)|0}function qL(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(45,a|0,b|0,c|0,d|0)|0}function qM(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(46,a|0,b|0,c|0,d|0)|0}function qN(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(47,a|0,b|0,c|0,d|0)|0}function qO(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(48,a|0,b|0,c|0,d|0)|0}function qP(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(49,a|0,b|0,c|0,d|0)|0}function qQ(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(50,a|0,b|0,c|0,d|0)|0}function qR(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(51,a|0,b|0,c|0,d|0)|0}function qS(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(52,a|0,b|0,c|0,d|0)|0}function qT(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(53,a|0,b|0,c|0,d|0)|0}function qU(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(54,a|0,b|0,c|0,d|0)|0}function qV(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(55,a|0,b|0,c|0,d|0)|0}function qW(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(56,a|0,b|0,c|0,d|0)|0}function qX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(57,a|0,b|0,c|0,d|0)|0}function qY(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(58,a|0,b|0,c|0,d|0)|0}function qZ(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(59,a|0,b|0,c|0,d|0)|0}function q_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(60,a|0,b|0,c|0,d|0)|0}function q$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(61,a|0,b|0,c|0,d|0)|0}function q0(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(62,a|0,b|0,c|0,d|0)|0}function q1(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(63,a|0,b|0,c|0,d|0)|0}function q2(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(64,a|0,b|0,c|0,d|0)|0}function q3(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(65,a|0,b|0,c|0,d|0)|0}function q4(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(66,a|0,b|0,c|0,d|0)|0}function q5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(67,a|0,b|0,c|0,d|0)|0}function q6(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(68,a|0,b|0,c|0,d|0)|0}function q7(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(69,a|0,b|0,c|0,d|0)|0}function q8(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(70,a|0,b|0,c|0,d|0)|0}function q9(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(71,a|0,b|0,c|0,d|0)|0}function ra(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(72,a|0,b|0,c|0,d|0)|0}function rb(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(73,a|0,b|0,c|0,d|0)|0}function rc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(74,a|0,b|0,c|0,d|0)|0}function rd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(75,a|0,b|0,c|0,d|0)|0}function re(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(76,a|0,b|0,c|0,d|0)|0}function rf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(77,a|0,b|0,c|0,d|0)|0}function rg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(78,a|0,b|0,c|0,d|0)|0}function rh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(79,a|0,b|0,c|0,d|0)|0}function ri(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(80,a|0,b|0,c|0,d|0)|0}function rj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(81,a|0,b|0,c|0,d|0)|0}function rk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(82,a|0,b|0,c|0,d|0)|0}function rl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(83,a|0,b|0,c|0,d|0)|0}function rm(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(84,a|0,b|0,c|0,d|0)|0}function rn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(85,a|0,b|0,c|0,d|0)|0}function ro(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(86,a|0,b|0,c|0,d|0)|0}function rp(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(87,a|0,b|0,c|0,d|0)|0}function rq(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(88,a|0,b|0,c|0,d|0)|0}function rr(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(89,a|0,b|0,c|0,d|0)|0}function rs(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(90,a|0,b|0,c|0,d|0)|0}function rt(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(91,a|0,b|0,c|0,d|0)|0}function ru(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(92,a|0,b|0,c|0,d|0)|0}function rv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(93,a|0,b|0,c|0,d|0)|0}function rw(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(94,a|0,b|0,c|0,d|0)|0}function rx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(95,a|0,b|0,c|0,d|0)|0}function ry(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(96,a|0,b|0,c|0,d|0)|0}function rz(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(97,a|0,b|0,c|0,d|0)|0}function rA(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(98,a|0,b|0,c|0,d|0)|0}function rB(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(99,a|0,b|0,c|0,d|0)|0}function rC(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(100,a|0,b|0,c|0,d|0)|0}function rD(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(101,a|0,b|0,c|0,d|0)|0}function rE(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(102,a|0,b|0,c|0,d|0)|0}function rF(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(103,a|0,b|0,c|0,d|0)|0}function rG(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(104,a|0,b|0,c|0,d|0)|0}function rH(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(105,a|0,b|0,c|0,d|0)|0}function rI(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(106,a|0,b|0,c|0,d|0)|0}function rJ(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(107,a|0,b|0,c|0,d|0)|0}function rK(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(108,a|0,b|0,c|0,d|0)|0}function rL(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(109,a|0,b|0,c|0,d|0)|0}function rM(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(110,a|0,b|0,c|0,d|0)|0}function rN(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(111,a|0,b|0,c|0,d|0)|0}function rO(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(112,a|0,b|0,c|0,d|0)|0}function rP(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(113,a|0,b|0,c|0,d|0)|0}function rQ(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(114,a|0,b|0,c|0,d|0)|0}function rR(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(115,a|0,b|0,c|0,d|0)|0}function rS(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(116,a|0,b|0,c|0,d|0)|0}function rT(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(117,a|0,b|0,c|0,d|0)|0}function rU(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(118,a|0,b|0,c|0,d|0)|0}function rV(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(119,a|0,b|0,c|0,d|0)|0}function rW(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(120,a|0,b|0,c|0,d|0)|0}function rX(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(121,a|0,b|0,c|0,d|0)|0}function rY(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(122,a|0,b|0,c|0,d|0)|0}function rZ(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(123,a|0,b|0,c|0,d|0)|0}function r_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ag(124,a|0,b|0,c|0,d|0)|0}function r$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ch[a&511](b|0,c|0,d|0)|0}function r0(a,b,c){a=a|0;b=b|0;c=c|0;return ag(0,a|0,b|0,c|0)|0}function r1(a,b,c){a=a|0;b=b|0;c=c|0;return ag(1,a|0,b|0,c|0)|0}function r2(a,b,c){a=a|0;b=b|0;c=c|0;return ag(2,a|0,b|0,c|0)|0}function r3(a,b,c){a=a|0;b=b|0;c=c|0;return ag(3,a|0,b|0,c|0)|0}function r4(a,b,c){a=a|0;b=b|0;c=c|0;return ag(4,a|0,b|0,c|0)|0}function r5(a,b,c){a=a|0;b=b|0;c=c|0;return ag(5,a|0,b|0,c|0)|0}function r6(a,b,c){a=a|0;b=b|0;c=c|0;return ag(6,a|0,b|0,c|0)|0}function r7(a,b,c){a=a|0;b=b|0;c=c|0;return ag(7,a|0,b|0,c|0)|0}function r8(a,b,c){a=a|0;b=b|0;c=c|0;return ag(8,a|0,b|0,c|0)|0}function r9(a,b,c){a=a|0;b=b|0;c=c|0;return ag(9,a|0,b|0,c|0)|0}function sa(a,b,c){a=a|0;b=b|0;c=c|0;return ag(10,a|0,b|0,c|0)|0}function sb(a,b,c){a=a|0;b=b|0;c=c|0;return ag(11,a|0,b|0,c|0)|0}function sc(a,b,c){a=a|0;b=b|0;c=c|0;return ag(12,a|0,b|0,c|0)|0}function sd(a,b,c){a=a|0;b=b|0;c=c|0;return ag(13,a|0,b|0,c|0)|0}function se(a,b,c){a=a|0;b=b|0;c=c|0;return ag(14,a|0,b|0,c|0)|0}function sf(a,b,c){a=a|0;b=b|0;c=c|0;return ag(15,a|0,b|0,c|0)|0}function sg(a,b,c){a=a|0;b=b|0;c=c|0;return ag(16,a|0,b|0,c|0)|0}function sh(a,b,c){a=a|0;b=b|0;c=c|0;return ag(17,a|0,b|0,c|0)|0}function si(a,b,c){a=a|0;b=b|0;c=c|0;return ag(18,a|0,b|0,c|0)|0}function sj(a,b,c){a=a|0;b=b|0;c=c|0;return ag(19,a|0,b|0,c|0)|0}function sk(a,b,c){a=a|0;b=b|0;c=c|0;return ag(20,a|0,b|0,c|0)|0}function sl(a,b,c){a=a|0;b=b|0;c=c|0;return ag(21,a|0,b|0,c|0)|0}function sm(a,b,c){a=a|0;b=b|0;c=c|0;return ag(22,a|0,b|0,c|0)|0}function sn(a,b,c){a=a|0;b=b|0;c=c|0;return ag(23,a|0,b|0,c|0)|0}function so(a,b,c){a=a|0;b=b|0;c=c|0;return ag(24,a|0,b|0,c|0)|0}function sp(a,b,c){a=a|0;b=b|0;c=c|0;return ag(25,a|0,b|0,c|0)|0}function sq(a,b,c){a=a|0;b=b|0;c=c|0;return ag(26,a|0,b|0,c|0)|0}function sr(a,b,c){a=a|0;b=b|0;c=c|0;return ag(27,a|0,b|0,c|0)|0}function ss(a,b,c){a=a|0;b=b|0;c=c|0;return ag(28,a|0,b|0,c|0)|0}function st(a,b,c){a=a|0;b=b|0;c=c|0;return ag(29,a|0,b|0,c|0)|0}function su(a,b,c){a=a|0;b=b|0;c=c|0;return ag(30,a|0,b|0,c|0)|0}function sv(a,b,c){a=a|0;b=b|0;c=c|0;return ag(31,a|0,b|0,c|0)|0}function sw(a,b,c){a=a|0;b=b|0;c=c|0;return ag(32,a|0,b|0,c|0)|0}function sx(a,b,c){a=a|0;b=b|0;c=c|0;return ag(33,a|0,b|0,c|0)|0}function sy(a,b,c){a=a|0;b=b|0;c=c|0;return ag(34,a|0,b|0,c|0)|0}function sz(a,b,c){a=a|0;b=b|0;c=c|0;return ag(35,a|0,b|0,c|0)|0}function sA(a,b,c){a=a|0;b=b|0;c=c|0;return ag(36,a|0,b|0,c|0)|0}function sB(a,b,c){a=a|0;b=b|0;c=c|0;return ag(37,a|0,b|0,c|0)|0}function sC(a,b,c){a=a|0;b=b|0;c=c|0;return ag(38,a|0,b|0,c|0)|0}function sD(a,b,c){a=a|0;b=b|0;c=c|0;return ag(39,a|0,b|0,c|0)|0}function sE(a,b,c){a=a|0;b=b|0;c=c|0;return ag(40,a|0,b|0,c|0)|0}function sF(a,b,c){a=a|0;b=b|0;c=c|0;return ag(41,a|0,b|0,c|0)|0}function sG(a,b,c){a=a|0;b=b|0;c=c|0;return ag(42,a|0,b|0,c|0)|0}function sH(a,b,c){a=a|0;b=b|0;c=c|0;return ag(43,a|0,b|0,c|0)|0}function sI(a,b,c){a=a|0;b=b|0;c=c|0;return ag(44,a|0,b|0,c|0)|0}function sJ(a,b,c){a=a|0;b=b|0;c=c|0;return ag(45,a|0,b|0,c|0)|0}function sK(a,b,c){a=a|0;b=b|0;c=c|0;return ag(46,a|0,b|0,c|0)|0}function sL(a,b,c){a=a|0;b=b|0;c=c|0;return ag(47,a|0,b|0,c|0)|0}function sM(a,b,c){a=a|0;b=b|0;c=c|0;return ag(48,a|0,b|0,c|0)|0}function sN(a,b,c){a=a|0;b=b|0;c=c|0;return ag(49,a|0,b|0,c|0)|0}function sO(a,b,c){a=a|0;b=b|0;c=c|0;return ag(50,a|0,b|0,c|0)|0}function sP(a,b,c){a=a|0;b=b|0;c=c|0;return ag(51,a|0,b|0,c|0)|0}function sQ(a,b,c){a=a|0;b=b|0;c=c|0;return ag(52,a|0,b|0,c|0)|0}function sR(a,b,c){a=a|0;b=b|0;c=c|0;return ag(53,a|0,b|0,c|0)|0}function sS(a,b,c){a=a|0;b=b|0;c=c|0;return ag(54,a|0,b|0,c|0)|0}function sT(a,b,c){a=a|0;b=b|0;c=c|0;return ag(55,a|0,b|0,c|0)|0}function sU(a,b,c){a=a|0;b=b|0;c=c|0;return ag(56,a|0,b|0,c|0)|0}function sV(a,b,c){a=a|0;b=b|0;c=c|0;return ag(57,a|0,b|0,c|0)|0}function sW(a,b,c){a=a|0;b=b|0;c=c|0;return ag(58,a|0,b|0,c|0)|0}function sX(a,b,c){a=a|0;b=b|0;c=c|0;return ag(59,a|0,b|0,c|0)|0}function sY(a,b,c){a=a|0;b=b|0;c=c|0;return ag(60,a|0,b|0,c|0)|0}function sZ(a,b,c){a=a|0;b=b|0;c=c|0;return ag(61,a|0,b|0,c|0)|0}function s_(a,b,c){a=a|0;b=b|0;c=c|0;return ag(62,a|0,b|0,c|0)|0}function s$(a,b,c){a=a|0;b=b|0;c=c|0;return ag(63,a|0,b|0,c|0)|0}function s0(a,b,c){a=a|0;b=b|0;c=c|0;return ag(64,a|0,b|0,c|0)|0}function s1(a,b,c){a=a|0;b=b|0;c=c|0;return ag(65,a|0,b|0,c|0)|0}function s2(a,b,c){a=a|0;b=b|0;c=c|0;return ag(66,a|0,b|0,c|0)|0}function s3(a,b,c){a=a|0;b=b|0;c=c|0;return ag(67,a|0,b|0,c|0)|0}function s4(a,b,c){a=a|0;b=b|0;c=c|0;return ag(68,a|0,b|0,c|0)|0}function s5(a,b,c){a=a|0;b=b|0;c=c|0;return ag(69,a|0,b|0,c|0)|0}function s6(a,b,c){a=a|0;b=b|0;c=c|0;return ag(70,a|0,b|0,c|0)|0}function s7(a,b,c){a=a|0;b=b|0;c=c|0;return ag(71,a|0,b|0,c|0)|0}function s8(a,b,c){a=a|0;b=b|0;c=c|0;return ag(72,a|0,b|0,c|0)|0}function s9(a,b,c){a=a|0;b=b|0;c=c|0;return ag(73,a|0,b|0,c|0)|0}function ta(a,b,c){a=a|0;b=b|0;c=c|0;return ag(74,a|0,b|0,c|0)|0}function tb(a,b,c){a=a|0;b=b|0;c=c|0;return ag(75,a|0,b|0,c|0)|0}function tc(a,b,c){a=a|0;b=b|0;c=c|0;return ag(76,a|0,b|0,c|0)|0}function td(a,b,c){a=a|0;b=b|0;c=c|0;return ag(77,a|0,b|0,c|0)|0}function te(a,b,c){a=a|0;b=b|0;c=c|0;return ag(78,a|0,b|0,c|0)|0}function tf(a,b,c){a=a|0;b=b|0;c=c|0;return ag(79,a|0,b|0,c|0)|0}function tg(a,b,c){a=a|0;b=b|0;c=c|0;return ag(80,a|0,b|0,c|0)|0}function th(a,b,c){a=a|0;b=b|0;c=c|0;return ag(81,a|0,b|0,c|0)|0}function ti(a,b,c){a=a|0;b=b|0;c=c|0;return ag(82,a|0,b|0,c|0)|0}function tj(a,b,c){a=a|0;b=b|0;c=c|0;return ag(83,a|0,b|0,c|0)|0}function tk(a,b,c){a=a|0;b=b|0;c=c|0;return ag(84,a|0,b|0,c|0)|0}function tl(a,b,c){a=a|0;b=b|0;c=c|0;return ag(85,a|0,b|0,c|0)|0}function tm(a,b,c){a=a|0;b=b|0;c=c|0;return ag(86,a|0,b|0,c|0)|0}function tn(a,b,c){a=a|0;b=b|0;c=c|0;return ag(87,a|0,b|0,c|0)|0}function to(a,b,c){a=a|0;b=b|0;c=c|0;return ag(88,a|0,b|0,c|0)|0}function tp(a,b,c){a=a|0;b=b|0;c=c|0;return ag(89,a|0,b|0,c|0)|0}function tq(a,b,c){a=a|0;b=b|0;c=c|0;return ag(90,a|0,b|0,c|0)|0}function tr(a,b,c){a=a|0;b=b|0;c=c|0;return ag(91,a|0,b|0,c|0)|0}function ts(a,b,c){a=a|0;b=b|0;c=c|0;return ag(92,a|0,b|0,c|0)|0}function tt(a,b,c){a=a|0;b=b|0;c=c|0;return ag(93,a|0,b|0,c|0)|0}function tu(a,b,c){a=a|0;b=b|0;c=c|0;return ag(94,a|0,b|0,c|0)|0}function tv(a,b,c){a=a|0;b=b|0;c=c|0;return ag(95,a|0,b|0,c|0)|0}function tw(a,b,c){a=a|0;b=b|0;c=c|0;return ag(96,a|0,b|0,c|0)|0}function tx(a,b,c){a=a|0;b=b|0;c=c|0;return ag(97,a|0,b|0,c|0)|0}function ty(a,b,c){a=a|0;b=b|0;c=c|0;return ag(98,a|0,b|0,c|0)|0}function tz(a,b,c){a=a|0;b=b|0;c=c|0;return ag(99,a|0,b|0,c|0)|0}function tA(a,b,c){a=a|0;b=b|0;c=c|0;return ag(100,a|0,b|0,c|0)|0}function tB(a,b,c){a=a|0;b=b|0;c=c|0;return ag(101,a|0,b|0,c|0)|0}function tC(a,b,c){a=a|0;b=b|0;c=c|0;return ag(102,a|0,b|0,c|0)|0}function tD(a,b,c){a=a|0;b=b|0;c=c|0;return ag(103,a|0,b|0,c|0)|0}function tE(a,b,c){a=a|0;b=b|0;c=c|0;return ag(104,a|0,b|0,c|0)|0}function tF(a,b,c){a=a|0;b=b|0;c=c|0;return ag(105,a|0,b|0,c|0)|0}function tG(a,b,c){a=a|0;b=b|0;c=c|0;return ag(106,a|0,b|0,c|0)|0}function tH(a,b,c){a=a|0;b=b|0;c=c|0;return ag(107,a|0,b|0,c|0)|0}function tI(a,b,c){a=a|0;b=b|0;c=c|0;return ag(108,a|0,b|0,c|0)|0}function tJ(a,b,c){a=a|0;b=b|0;c=c|0;return ag(109,a|0,b|0,c|0)|0}function tK(a,b,c){a=a|0;b=b|0;c=c|0;return ag(110,a|0,b|0,c|0)|0}function tL(a,b,c){a=a|0;b=b|0;c=c|0;return ag(111,a|0,b|0,c|0)|0}function tM(a,b,c){a=a|0;b=b|0;c=c|0;return ag(112,a|0,b|0,c|0)|0}function tN(a,b,c){a=a|0;b=b|0;c=c|0;return ag(113,a|0,b|0,c|0)|0}function tO(a,b,c){a=a|0;b=b|0;c=c|0;return ag(114,a|0,b|0,c|0)|0}function tP(a,b,c){a=a|0;b=b|0;c=c|0;return ag(115,a|0,b|0,c|0)|0}function tQ(a,b,c){a=a|0;b=b|0;c=c|0;return ag(116,a|0,b|0,c|0)|0}function tR(a,b,c){a=a|0;b=b|0;c=c|0;return ag(117,a|0,b|0,c|0)|0}function tS(a,b,c){a=a|0;b=b|0;c=c|0;return ag(118,a|0,b|0,c|0)|0}function tT(a,b,c){a=a|0;b=b|0;c=c|0;return ag(119,a|0,b|0,c|0)|0}function tU(a,b,c){a=a|0;b=b|0;c=c|0;return ag(120,a|0,b|0,c|0)|0}function tV(a,b,c){a=a|0;b=b|0;c=c|0;return ag(121,a|0,b|0,c|0)|0}function tW(a,b,c){a=a|0;b=b|0;c=c|0;return ag(122,a|0,b|0,c|0)|0}function tX(a,b,c){a=a|0;b=b|0;c=c|0;return ag(123,a|0,b|0,c|0)|0}function tY(a,b,c){a=a|0;b=b|0;c=c|0;return ag(124,a|0,b|0,c|0)|0}function tZ(a){a=a|0;ci[a&255]()}function t_(){ag(0)}function t$(){ag(1)}function t0(){ag(2)}function t1(){ag(3)}function t2(){ag(4)}function t3(){ag(5)}function t4(){ag(6)}function t5(){ag(7)}function t6(){ag(8)}function t7(){ag(9)}function t8(){ag(10)}function t9(){ag(11)}function ua(){ag(12)}function ub(){ag(13)}function uc(){ag(14)}function ud(){ag(15)}function ue(){ag(16)}function uf(){ag(17)}function ug(){ag(18)}function uh(){ag(19)}function ui(){ag(20)}function uj(){ag(21)}function uk(){ag(22)}function ul(){ag(23)}function um(){ag(24)}function un(){ag(25)}function uo(){ag(26)}function up(){ag(27)}function uq(){ag(28)}function ur(){ag(29)}function us(){ag(30)}function ut(){ag(31)}function uu(){ag(32)}function uv(){ag(33)}function uw(){ag(34)}function ux(){ag(35)}function uy(){ag(36)}function uz(){ag(37)}function uA(){ag(38)}function uB(){ag(39)}function uC(){ag(40)}function uD(){ag(41)}function uE(){ag(42)}function uF(){ag(43)}function uG(){ag(44)}function uH(){ag(45)}function uI(){ag(46)}function uJ(){ag(47)}function uK(){ag(48)}function uL(){ag(49)}function uM(){ag(50)}function uN(){ag(51)}function uO(){ag(52)}function uP(){ag(53)}function uQ(){ag(54)}function uR(){ag(55)}function uS(){ag(56)}function uT(){ag(57)}function uU(){ag(58)}function uV(){ag(59)}function uW(){ag(60)}function uX(){ag(61)}function uY(){ag(62)}function uZ(){ag(63)}function u_(){ag(64)}function u$(){ag(65)}function u0(){ag(66)}function u1(){ag(67)}function u2(){ag(68)}function u3(){ag(69)}function u4(){ag(70)}function u5(){ag(71)}function u6(){ag(72)}function u7(){ag(73)}function u8(){ag(74)}function u9(){ag(75)}function va(){ag(76)}function vb(){ag(77)}function vc(){ag(78)}function vd(){ag(79)}function ve(){ag(80)}function vf(){ag(81)}function vg(){ag(82)}function vh(){ag(83)}function vi(){ag(84)}function vj(){ag(85)}function vk(){ag(86)}function vl(){ag(87)}function vm(){ag(88)}function vn(){ag(89)}function vo(){ag(90)}function vp(){ag(91)}function vq(){ag(92)}function vr(){ag(93)}function vs(){ag(94)}function vt(){ag(95)}function vu(){ag(96)}function vv(){ag(97)}function vw(){ag(98)}function vx(){ag(99)}function vy(){ag(100)}function vz(){ag(101)}function vA(){ag(102)}function vB(){ag(103)}function vC(){ag(104)}function vD(){ag(105)}function vE(){ag(106)}function vF(){ag(107)}function vG(){ag(108)}function vH(){ag(109)}function vI(){ag(110)}function vJ(){ag(111)}function vK(){ag(112)}function vL(){ag(113)}function vM(){ag(114)}function vN(){ag(115)}function vO(){ag(116)}function vP(){ag(117)}function vQ(){ag(118)}function vR(){ag(119)}function vS(){ag(120)}function vT(){ag(121)}function vU(){ag(122)}function vV(){ag(123)}function vW(){ag(124)}function vX(a,b,c){a=a|0;b=b|0;c=c|0;return cj[a&255](b|0,c|0)|0}function vY(a,b){a=a|0;b=b|0;return ag(0,a|0,b|0)|0}function vZ(a,b){a=a|0;b=b|0;return ag(1,a|0,b|0)|0}function v_(a,b){a=a|0;b=b|0;return ag(2,a|0,b|0)|0}function v$(a,b){a=a|0;b=b|0;return ag(3,a|0,b|0)|0}function v0(a,b){a=a|0;b=b|0;return ag(4,a|0,b|0)|0}function v1(a,b){a=a|0;b=b|0;return ag(5,a|0,b|0)|0}function v2(a,b){a=a|0;b=b|0;return ag(6,a|0,b|0)|0}function v3(a,b){a=a|0;b=b|0;return ag(7,a|0,b|0)|0}function v4(a,b){a=a|0;b=b|0;return ag(8,a|0,b|0)|0}function v5(a,b){a=a|0;b=b|0;return ag(9,a|0,b|0)|0}function v6(a,b){a=a|0;b=b|0;return ag(10,a|0,b|0)|0}function v7(a,b){a=a|0;b=b|0;return ag(11,a|0,b|0)|0}function v8(a,b){a=a|0;b=b|0;return ag(12,a|0,b|0)|0}function v9(a,b){a=a|0;b=b|0;return ag(13,a|0,b|0)|0}function wa(a,b){a=a|0;b=b|0;return ag(14,a|0,b|0)|0}function wb(a,b){a=a|0;b=b|0;return ag(15,a|0,b|0)|0}function wc(a,b){a=a|0;b=b|0;return ag(16,a|0,b|0)|0}function wd(a,b){a=a|0;b=b|0;return ag(17,a|0,b|0)|0}function we(a,b){a=a|0;b=b|0;return ag(18,a|0,b|0)|0}function wf(a,b){a=a|0;b=b|0;return ag(19,a|0,b|0)|0}function wg(a,b){a=a|0;b=b|0;return ag(20,a|0,b|0)|0}function wh(a,b){a=a|0;b=b|0;return ag(21,a|0,b|0)|0}function wi(a,b){a=a|0;b=b|0;return ag(22,a|0,b|0)|0}function wj(a,b){a=a|0;b=b|0;return ag(23,a|0,b|0)|0}function wk(a,b){a=a|0;b=b|0;return ag(24,a|0,b|0)|0}function wl(a,b){a=a|0;b=b|0;return ag(25,a|0,b|0)|0}function wm(a,b){a=a|0;b=b|0;return ag(26,a|0,b|0)|0}function wn(a,b){a=a|0;b=b|0;return ag(27,a|0,b|0)|0}function wo(a,b){a=a|0;b=b|0;return ag(28,a|0,b|0)|0}function wp(a,b){a=a|0;b=b|0;return ag(29,a|0,b|0)|0}function wq(a,b){a=a|0;b=b|0;return ag(30,a|0,b|0)|0}function wr(a,b){a=a|0;b=b|0;return ag(31,a|0,b|0)|0}function ws(a,b){a=a|0;b=b|0;return ag(32,a|0,b|0)|0}function wt(a,b){a=a|0;b=b|0;return ag(33,a|0,b|0)|0}function wu(a,b){a=a|0;b=b|0;return ag(34,a|0,b|0)|0}function wv(a,b){a=a|0;b=b|0;return ag(35,a|0,b|0)|0}function ww(a,b){a=a|0;b=b|0;return ag(36,a|0,b|0)|0}function wx(a,b){a=a|0;b=b|0;return ag(37,a|0,b|0)|0}function wy(a,b){a=a|0;b=b|0;return ag(38,a|0,b|0)|0}function wz(a,b){a=a|0;b=b|0;return ag(39,a|0,b|0)|0}function wA(a,b){a=a|0;b=b|0;return ag(40,a|0,b|0)|0}function wB(a,b){a=a|0;b=b|0;return ag(41,a|0,b|0)|0}function wC(a,b){a=a|0;b=b|0;return ag(42,a|0,b|0)|0}function wD(a,b){a=a|0;b=b|0;return ag(43,a|0,b|0)|0}function wE(a,b){a=a|0;b=b|0;return ag(44,a|0,b|0)|0}function wF(a,b){a=a|0;b=b|0;return ag(45,a|0,b|0)|0}function wG(a,b){a=a|0;b=b|0;return ag(46,a|0,b|0)|0}function wH(a,b){a=a|0;b=b|0;return ag(47,a|0,b|0)|0}function wI(a,b){a=a|0;b=b|0;return ag(48,a|0,b|0)|0}function wJ(a,b){a=a|0;b=b|0;return ag(49,a|0,b|0)|0}function wK(a,b){a=a|0;b=b|0;return ag(50,a|0,b|0)|0}function wL(a,b){a=a|0;b=b|0;return ag(51,a|0,b|0)|0}function wM(a,b){a=a|0;b=b|0;return ag(52,a|0,b|0)|0}function wN(a,b){a=a|0;b=b|0;return ag(53,a|0,b|0)|0}function wO(a,b){a=a|0;b=b|0;return ag(54,a|0,b|0)|0}function wP(a,b){a=a|0;b=b|0;return ag(55,a|0,b|0)|0}function wQ(a,b){a=a|0;b=b|0;return ag(56,a|0,b|0)|0}function wR(a,b){a=a|0;b=b|0;return ag(57,a|0,b|0)|0}function wS(a,b){a=a|0;b=b|0;return ag(58,a|0,b|0)|0}function wT(a,b){a=a|0;b=b|0;return ag(59,a|0,b|0)|0}function wU(a,b){a=a|0;b=b|0;return ag(60,a|0,b|0)|0}function wV(a,b){a=a|0;b=b|0;return ag(61,a|0,b|0)|0}function wW(a,b){a=a|0;b=b|0;return ag(62,a|0,b|0)|0}function wX(a,b){a=a|0;b=b|0;return ag(63,a|0,b|0)|0}function wY(a,b){a=a|0;b=b|0;return ag(64,a|0,b|0)|0}function wZ(a,b){a=a|0;b=b|0;return ag(65,a|0,b|0)|0}function w_(a,b){a=a|0;b=b|0;return ag(66,a|0,b|0)|0}function w$(a,b){a=a|0;b=b|0;return ag(67,a|0,b|0)|0}function w0(a,b){a=a|0;b=b|0;return ag(68,a|0,b|0)|0}function w1(a,b){a=a|0;b=b|0;return ag(69,a|0,b|0)|0}function w2(a,b){a=a|0;b=b|0;return ag(70,a|0,b|0)|0}function w3(a,b){a=a|0;b=b|0;return ag(71,a|0,b|0)|0}function w4(a,b){a=a|0;b=b|0;return ag(72,a|0,b|0)|0}function w5(a,b){a=a|0;b=b|0;return ag(73,a|0,b|0)|0}function w6(a,b){a=a|0;b=b|0;return ag(74,a|0,b|0)|0}function w7(a,b){a=a|0;b=b|0;return ag(75,a|0,b|0)|0}function w8(a,b){a=a|0;b=b|0;return ag(76,a|0,b|0)|0}function w9(a,b){a=a|0;b=b|0;return ag(77,a|0,b|0)|0}function xa(a,b){a=a|0;b=b|0;return ag(78,a|0,b|0)|0}function xb(a,b){a=a|0;b=b|0;return ag(79,a|0,b|0)|0}function xc(a,b){a=a|0;b=b|0;return ag(80,a|0,b|0)|0}function xd(a,b){a=a|0;b=b|0;return ag(81,a|0,b|0)|0}function xe(a,b){a=a|0;b=b|0;return ag(82,a|0,b|0)|0}function xf(a,b){a=a|0;b=b|0;return ag(83,a|0,b|0)|0}function xg(a,b){a=a|0;b=b|0;return ag(84,a|0,b|0)|0}function xh(a,b){a=a|0;b=b|0;return ag(85,a|0,b|0)|0}function xi(a,b){a=a|0;b=b|0;return ag(86,a|0,b|0)|0}function xj(a,b){a=a|0;b=b|0;return ag(87,a|0,b|0)|0}function xk(a,b){a=a|0;b=b|0;return ag(88,a|0,b|0)|0}function xl(a,b){a=a|0;b=b|0;return ag(89,a|0,b|0)|0}function xm(a,b){a=a|0;b=b|0;return ag(90,a|0,b|0)|0}function xn(a,b){a=a|0;b=b|0;return ag(91,a|0,b|0)|0}function xo(a,b){a=a|0;b=b|0;return ag(92,a|0,b|0)|0}function xp(a,b){a=a|0;b=b|0;return ag(93,a|0,b|0)|0}function xq(a,b){a=a|0;b=b|0;return ag(94,a|0,b|0)|0}function xr(a,b){a=a|0;b=b|0;return ag(95,a|0,b|0)|0}function xs(a,b){a=a|0;b=b|0;return ag(96,a|0,b|0)|0}function xt(a,b){a=a|0;b=b|0;return ag(97,a|0,b|0)|0}function xu(a,b){a=a|0;b=b|0;return ag(98,a|0,b|0)|0}function xv(a,b){a=a|0;b=b|0;return ag(99,a|0,b|0)|0}function xw(a,b){a=a|0;b=b|0;return ag(100,a|0,b|0)|0}function xx(a,b){a=a|0;b=b|0;return ag(101,a|0,b|0)|0}function xy(a,b){a=a|0;b=b|0;return ag(102,a|0,b|0)|0}function xz(a,b){a=a|0;b=b|0;return ag(103,a|0,b|0)|0}function xA(a,b){a=a|0;b=b|0;return ag(104,a|0,b|0)|0}function xB(a,b){a=a|0;b=b|0;return ag(105,a|0,b|0)|0}function xC(a,b){a=a|0;b=b|0;return ag(106,a|0,b|0)|0}function xD(a,b){a=a|0;b=b|0;return ag(107,a|0,b|0)|0}function xE(a,b){a=a|0;b=b|0;return ag(108,a|0,b|0)|0}function xF(a,b){a=a|0;b=b|0;return ag(109,a|0,b|0)|0}function xG(a,b){a=a|0;b=b|0;return ag(110,a|0,b|0)|0}function xH(a,b){a=a|0;b=b|0;return ag(111,a|0,b|0)|0}function xI(a,b){a=a|0;b=b|0;return ag(112,a|0,b|0)|0}function xJ(a,b){a=a|0;b=b|0;return ag(113,a|0,b|0)|0}function xK(a,b){a=a|0;b=b|0;return ag(114,a|0,b|0)|0}function xL(a,b){a=a|0;b=b|0;return ag(115,a|0,b|0)|0}function xM(a,b){a=a|0;b=b|0;return ag(116,a|0,b|0)|0}function xN(a,b){a=a|0;b=b|0;return ag(117,a|0,b|0)|0}function xO(a,b){a=a|0;b=b|0;return ag(118,a|0,b|0)|0}function xP(a,b){a=a|0;b=b|0;return ag(119,a|0,b|0)|0}function xQ(a,b){a=a|0;b=b|0;return ag(120,a|0,b|0)|0}function xR(a,b){a=a|0;b=b|0;return ag(121,a|0,b|0)|0}function xS(a,b){a=a|0;b=b|0;return ag(122,a|0,b|0)|0}function xT(a,b){a=a|0;b=b|0;return ag(123,a|0,b|0)|0}function xU(a,b){a=a|0;b=b|0;return ag(124,a|0,b|0)|0}function xV(a){a=a|0;ab(0);return 0}function xW(a){a=a|0;ab(1)}function xX(a,b){a=a|0;b=b|0;ab(2)}function xY(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ab(3);return 0}function xZ(a,b,c){a=a|0;b=b|0;c=c|0;ab(4);return 0}function x_(){ab(5)}function x$(a,b){a=a|0;b=b|0;ab(6);return 0}\
7841 // EMSCRIPTEN_END_FUNCS\
7842 var cd=[xV,xV,j8,xV,j9,xV,ka,xV,kb,xV,kc,xV,kd,xV,ke,xV,kf,xV,kg,xV,kh,xV,ki,xV,kj,xV,kk,xV,kl,xV,km,xV,kn,xV,ko,xV,kp,xV,kq,xV,kr,xV,ks,xV,kt,xV,ku,xV,kv,xV,kw,xV,kx,xV,ky,xV,kz,xV,kA,xV,kB,xV,kC,xV,kD,xV,kE,xV,kF,xV,kG,xV,kH,xV,kI,xV,kJ,xV,kK,xV,kL,xV,kM,xV,kN,xV,kO,xV,kP,xV,kQ,xV,kR,xV,kS,xV,kT,xV,kU,xV,kV,xV,kW,xV,kX,xV,kY,xV,kZ,xV,k_,xV,k$,xV,k0,xV,k1,xV,k2,xV,k3,xV,k4,xV,k5,xV,k6,xV,k7,xV,k8,xV,k9,xV,la,xV,lb,xV,lc,xV,ld,xV,le,xV,lf,xV,lg,xV,lh,xV,li,xV,lj,xV,lk,xV,ll,xV,lm,xV,ln,xV,lo,xV,lp,xV,lq,xV,lr,xV,ls,xV,lt,xV,lu,xV,lv,xV,lw,xV,lx,xV,ly,xV,lz,xV,lA,xV,lB,xV,lC,xV,lD,xV,lE,xV,lF,xV,lG,xV,lH,xV,lI,xV,lJ,xV,lK,xV,lL,xV,lM,xV,lN,xV,lO,xV,lP,xV,lQ,xV,lR,xV,lS,xV,lT,xV,lU,xV,lV,xV,lW,xV,lX,xV,lY,xV,lZ,xV,l_,xV,l$,xV,l0,xV,l1,xV,l2,xV,l3,xV,l4,xV,iq,xV,hi,xV,hF,xV,ie,xV,hR,xV,iA,xV,hj,xV,iK,xV,hx,xV,iT,xV,iw,xV,hN,xV,jO,xV,ix,xV,hB,xV,h0,xV,il,xV,jF,xV,it,xV,iZ,xV,hP,xV,is,xV,iv,xV,jx,xV,jm,xV,i6,xV,hX,xV,ic,xV,i2,xV,hM,xV,jo,xV,iE,xV,he,xV,jv,xV,jM,xV,iQ,xV,jk,xV,hl,xV,hE,xV,iG,xV,g6,xV,iF,xV,je,xV,jz,xV,h7,xV,jn,xV,hO,xV,hW,xV,iO,xV,i8,xV,hk,xV,jr,xV,iY,xV,jg,xV,iy,xV,jw,xV,i7,xV,hS,xV,hD,xV,g8,xV,jp,xV,jK,xV,h4,xV,js,xV,jI,xV,iR,xV,hH,xV,ip,xV,jL,xV,hc,xV,ha,xV,iz,xV,im,xV,jH,xV,iP,xV,h2,xV,hh,xV,iX,xV,hp,xV,ia,xV,hK,xV,iI,xV,iB,xV,hv,xV,iD,xV,iW,xV,jq,xV,h9,xV,jf,xV,hd,xV,hT,xV,hU,xV,i$,xV,ho,xV,ju,xV,iN,xV,hn,xV,iM,xV,jl,xV,i4,xV,iS,xV,hQ,xV,io,xV,hr,xV,iH,xV,ib,xV,iJ,xV,jd,xV,hs,xV,i1,xV,hw,xV,hu,xV,h8,xV,iL,xV,hb,xV,jy,xV,hG,xV,hV,xV,g9,xV,jt,xV,hY,xV,hL,xV,hC,xV,i3,xV,i9,xV,hg,xV,g7,xV,iu,xV,id,xV,iU,xV,jb,xV,ja,xV,i_,xV,i5,xV,hA,xV,h6,xV,jN,xV,hz,xV,jR,xV,hm,xV,jS,xV,hq,xV,ht,xV,h3,xV,jc,xV,iV,xV,iC,xV,hy,xV,i0,xV,h1,xV,jh,xV,h5,xV,ir,xV,jJ,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV,xV];var ce=[xW,xW,l6,xW,l7,xW,l8,xW,l9,xW,ma,xW,mb,xW,mc,xW,md,xW,me,xW,mf,xW,mg,xW,mh,xW,mi,xW,mj,xW,mk,xW,ml,xW,mm,xW,mn,xW,mo,xW,mp,xW,mq,xW,mr,xW,ms,xW,mt,xW,mu,xW,mv,xW,mw,xW,mx,xW,my,xW,mz,xW,mA,xW,mB,xW,mC,xW,mD,xW,mE,xW,mF,xW,mG,xW,mH,xW,mI,xW,mJ,xW,mK,xW,mL,xW,mM,xW,mN,xW,mO,xW,mP,xW,mQ,xW,mR,xW,mS,xW,mT,xW,mU,xW,mV,xW,mW,xW,mX,xW,mY,xW,mZ,xW,m_,xW,m$,xW,m0,xW,m1,xW,m2,xW,m3,xW,m4,xW,m5,xW,m6,xW,m7,xW,m8,xW,m9,xW,na,xW,nb,xW,nc,xW,nd,xW,ne,xW,nf,xW,ng,xW,nh,xW,ni,xW,nj,xW,nk,xW,nl,xW,nm,xW,nn,xW,no,xW,np,xW,nq,xW,nr,xW,ns,xW,nt,xW,nu,xW,nv,xW,nw,xW,nx,xW,ny,xW,nz,xW,nA,xW,nB,xW,nC,xW,nD,xW,nE,xW,nF,xW,nG,xW,nH,xW,nI,xW,nJ,xW,nK,xW,nL,xW,nM,xW,nN,xW,nO,xW,nP,xW,nQ,xW,nR,xW,nS,xW,nT,xW,nU,xW,nV,xW,nW,xW,nX,xW,nY,xW,nZ,xW,n_,xW,n$,xW,n0,xW,n1,xW,n2,xW,xW,xW,xW,xW];var cf=[xX,xX,n4,xX,n5,xX,n6,xX,n7,xX,n8,xX,n9,xX,oa,xX,ob,xX,oc,xX,od,xX,oe,xX,of,xX,og,xX,oh,xX,oi,xX,oj,xX,ok,xX,ol,xX,om,xX,on,xX,oo,xX,op,xX,oq,xX,or,xX,os,xX,ot,xX,ou,xX,ov,xX,ow,xX,ox,xX,oy,xX,oz,xX,oA,xX,oB,xX,oC,xX,oD,xX,oE,xX,oF,xX,oG,xX,oH,xX,oI,xX,oJ,xX,oK,xX,oL,xX,oM,xX,oN,xX,oO,xX,oP,xX,oQ,xX,oR,xX,oS,xX,oT,xX,oU,xX,oV,xX,oW,xX,oX,xX,oY,xX,oZ,xX,o_,xX,o$,xX,o0,xX,o1,xX,o2,xX,o3,xX,o4,xX,o5,xX,o6,xX,o7,xX,o8,xX,o9,xX,pa,xX,pb,xX,pc,xX,pd,xX,pe,xX,pf,xX,pg,xX,ph,xX,pi,xX,pj,xX,pk,xX,pl,xX,pm,xX,pn,xX,po,xX,pp,xX,pq,xX,pr,xX,ps,xX,pt,xX,pu,xX,pv,xX,pw,xX,px,xX,py,xX,pz,xX,pA,xX,pB,xX,pC,xX,pD,xX,pE,xX,pF,xX,pG,xX,pH,xX,pI,xX,pJ,xX,pK,xX,pL,xX,pM,xX,pN,xX,pO,xX,pP,xX,pQ,xX,pR,xX,pS,xX,pT,xX,pU,xX,pV,xX,pW,xX,pX,xX,pY,xX,pZ,xX,p_,xX,p$,xX,p0,xX,dy,xX,fW,xX,fY,xX,eL,xX,eH,xX,h_,xX,dA,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX,xX];var cg=[xY,xY,p2,xY,p3,xY,p4,xY,p5,xY,p6,xY,p7,xY,p8,xY,p9,xY,qa,xY,qb,xY,qc,xY,qd,xY,qe,xY,qf,xY,qg,xY,qh,xY,qi,xY,qj,xY,qk,xY,ql,xY,qm,xY,qn,xY,qo,xY,qp,xY,qq,xY,qr,xY,qs,xY,qt,xY,qu,xY,qv,xY,qw,xY,qx,xY,qy,xY,qz,xY,qA,xY,qB,xY,qC,xY,qD,xY,qE,xY,qF,xY,qG,xY,qH,xY,qI,xY,qJ,xY,qK,xY,qL,xY,qM,xY,qN,xY,qO,xY,qP,xY,qQ,xY,qR,xY,qS,xY,qT,xY,qU,xY,qV,xY,qW,xY,qX,xY,qY,xY,qZ,xY,q_,xY,q$,xY,q0,xY,q1,xY,q2,xY,q3,xY,q4,xY,q5,xY,q6,xY,q7,xY,q8,xY,q9,xY,ra,xY,rb,xY,rc,xY,rd,xY,re,xY,rf,xY,rg,xY,rh,xY,ri,xY,rj,xY,rk,xY,rl,xY,rm,xY,rn,xY,ro,xY,rp,xY,rq,xY,rr,xY,rs,xY,rt,xY,ru,xY,rv,xY,rw,xY,rx,xY,ry,xY,rz,xY,rA,xY,rB,xY,rC,xY,rD,xY,rE,xY,rF,xY,rG,xY,rH,xY,rI,xY,rJ,xY,rK,xY,rL,xY,rM,xY,rN,xY,rO,xY,rP,xY,rQ,xY,rR,xY,rS,xY,rT,xY,rU,xY,rV,xY,rW,xY,rX,xY,rY,xY,rZ,xY,r_,xY,jG,xY,g5,xY,gh,xY,fA,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY,xY];var ch=[xZ,xZ,r0,xZ,r1,xZ,r2,xZ,r3,xZ,r4,xZ,r5,xZ,r6,xZ,r7,xZ,r8,xZ,r9,xZ,sa,xZ,sb,xZ,sc,xZ,sd,xZ,se,xZ,sf,xZ,sg,xZ,sh,xZ,si,xZ,sj,xZ,sk,xZ,sl,xZ,sm,xZ,sn,xZ,so,xZ,sp,xZ,sq,xZ,sr,xZ,ss,xZ,st,xZ,su,xZ,sv,xZ,sw,xZ,sx,xZ,sy,xZ,sz,xZ,sA,xZ,sB,xZ,sC,xZ,sD,xZ,sE,xZ,sF,xZ,sG,xZ,sH,xZ,sI,xZ,sJ,xZ,sK,xZ,sL,xZ,sM,xZ,sN,xZ,sO,xZ,sP,xZ,sQ,xZ,sR,xZ,sS,xZ,sT,xZ,sU,xZ,sV,xZ,sW,xZ,sX,xZ,sY,xZ,sZ,xZ,s_,xZ,s$,xZ,s0,xZ,s1,xZ,s2,xZ,s3,xZ,s4,xZ,s5,xZ,s6,xZ,s7,xZ,s8,xZ,s9,xZ,ta,xZ,tb,xZ,tc,xZ,td,xZ,te,xZ,tf,xZ,tg,xZ,th,xZ,ti,xZ,tj,xZ,tk,xZ,tl,xZ,tm,xZ,tn,xZ,to,xZ,tp,xZ,tq,xZ,tr,xZ,ts,xZ,tt,xZ,tu,xZ,tv,xZ,tw,xZ,tx,xZ,ty,xZ,tz,xZ,tA,xZ,tB,xZ,tC,xZ,tD,xZ,tE,xZ,tF,xZ,tG,xZ,tH,xZ,tI,xZ,tJ,xZ,tK,xZ,tL,xZ,tM,xZ,tN,xZ,tO,xZ,tP,xZ,tQ,xZ,tR,xZ,tS,xZ,tT,xZ,tU,xZ,tV,xZ,tW,xZ,tX,xZ,tY,xZ,hJ,xZ,g1,xZ,gU,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ,xZ];var ci=[x_,x_,t_,x_,t$,x_,t0,x_,t1,x_,t2,x_,t3,x_,t4,x_,t5,x_,t6,x_,t7,x_,t8,x_,t9,x_,ua,x_,ub,x_,uc,x_,ud,x_,ue,x_,uf,x_,ug,x_,uh,x_,ui,x_,uj,x_,uk,x_,ul,x_,um,x_,un,x_,uo,x_,up,x_,uq,x_,ur,x_,us,x_,ut,x_,uu,x_,uv,x_,uw,x_,ux,x_,uy,x_,uz,x_,uA,x_,uB,x_,uC,x_,uD,x_,uE,x_,uF,x_,uG,x_,uH,x_,uI,x_,uJ,x_,uK,x_,uL,x_,uM,x_,uN,x_,uO,x_,uP,x_,uQ,x_,uR,x_,uS,x_,uT,x_,uU,x_,uV,x_,uW,x_,uX,x_,uY,x_,uZ,x_,u_,x_,u$,x_,u0,x_,u1,x_,u2,x_,u3,x_,u4,x_,u5,x_,u6,x_,u7,x_,u8,x_,u9,x_,va,x_,vb,x_,vc,x_,vd,x_,ve,x_,vf,x_,vg,x_,vh,x_,vi,x_,vj,x_,vk,x_,vl,x_,vm,x_,vn,x_,vo,x_,vp,x_,vq,x_,vr,x_,vs,x_,vt,x_,vu,x_,vv,x_,vw,x_,vx,x_,vy,x_,vz,x_,vA,x_,vB,x_,vC,x_,vD,x_,vE,x_,vF,x_,vG,x_,vH,x_,vI,x_,vJ,x_,vK,x_,vL,x_,vM,x_,vN,x_,vO,x_,vP,x_,vQ,x_,vR,x_,vS,x_,vT,x_,vU,x_,vV,x_,vW,x_,x_,x_,x_,x_];var cj=[x$,x$,vY,x$,vZ,x$,v_,x$,v$,x$,v0,x$,v1,x$,v2,x$,v3,x$,v4,x$,v5,x$,v6,x$,v7,x$,v8,x$,v9,x$,wa,x$,wb,x$,wc,x$,wd,x$,we,x$,wf,x$,wg,x$,wh,x$,wi,x$,wj,x$,wk,x$,wl,x$,wm,x$,wn,x$,wo,x$,wp,x$,wq,x$,wr,x$,ws,x$,wt,x$,wu,x$,wv,x$,ww,x$,wx,x$,wy,x$,wz,x$,wA,x$,wB,x$,wC,x$,wD,x$,wE,x$,wF,x$,wG,x$,wH,x$,wI,x$,wJ,x$,wK,x$,wL,x$,wM,x$,wN,x$,wO,x$,wP,x$,wQ,x$,wR,x$,wS,x$,wT,x$,wU,x$,wV,x$,wW,x$,wX,x$,wY,x$,wZ,x$,w_,x$,w$,x$,w0,x$,w1,x$,w2,x$,w3,x$,w4,x$,w5,x$,w6,x$,w7,x$,w8,x$,w9,x$,xa,x$,xb,x$,xc,x$,xd,x$,xe,x$,xf,x$,xg,x$,xh,x$,xi,x$,xj,x$,xk,x$,xl,x$,xm,x$,xn,x$,xo,x$,xp,x$,xq,x$,xr,x$,xs,x$,xt,x$,xu,x$,xv,x$,xw,x$,xx,x$,xy,x$,xz,x$,xA,x$,xB,x$,xC,x$,xD,x$,xE,x$,xF,x$,xG,x$,xH,x$,xI,x$,xJ,x$,xK,x$,xL,x$,xM,x$,xN,x$,xO,x$,xP,x$,xQ,x$,xR,x$,xS,x$,xT,x$,xU,x$,x$,x$,x$,x$];return{_luaL_checkstack:gH,_strlen:j_,_strcat:j4,_lua_pushlightuserdata:c7,_lua_createtable:di,_luaL_optinteger:gN,_lua_rawset:dn,_strncpy:j3,_lua_setmetatable:dq,_lua_concat:dG,_luaL_optlstring:gD,_luaopen_io:h0,_memcpy:j$,_lua_pcall:dx,_lua_pushthread:c8,_lua_close:fX,_luaopen_math:iv,_lua_setupvalue:dJ,_lua_replace:cP,_memcmp:j5,_lua_gethookmask:eh,_lua_xmove:cC,_lua_load:dB,_lua_touserdata:cZ,_lua_rawget:dg,_free:jV,_lua_pushcclosure:dd,_lua_pushstring:da,_tolower:j6,_lua_getfenv:dk,_luaopen_string:jk,_lua_isuserdata:cR,_luaL_buffinit:gt,_lua_resume:eE,_lua_iscfunction:cM,_lua_remove:cH,_luaL_checkoption:gC,_lua_tointeger:c$,_lua_pushvfstring:db,_luaL_prepbuffer:gY,_lua_isnumber:cS,_luaL_checklstring:gE,_lua_isstring:cQ,_lua_pushlstring:c9,_lua_setfenv:dv,_lua_lessthan:cV,_luaopen_os:iY,_lua_yield:eI,_luaL_checkany:gJ,_luaL_addstring:gW,_lua_pushfstring:dc,_lua_insert:cI,_lua_tolstring:c0,_lua_pushnil:c3,_luaL_register:gQ,_lua_getupvalue:du,_lua_checkstack:cN,_luaopen_package:jH,_luaL_pushresult:gX,_lua_topointer:c2,_lua_error:dE,_lua_gettable:de,_luaopen_debug:hK,_lua_tonumber:cW,_luaL_checkinteger:gM,_lua_getstack:ej,_lua_gettop:cF,_lua_getlocal:el,_luaL_checktype:gI,_lua_newuserdata:dH,_lua_settable:dl,_luaL_addlstring:gV,_luaL_loadbuffer:g2,_lua_toboolean:cX,_lua_setallocf:dt,_memset:j2,_lua_gethook:eg,_lua_gethookcount:ei,_luaL_openlibs:jT,_lua_setlocal:em,_lua_tothread:c_,_lua_newstate:fV,_lua_pushvalue:cJ,_lua_tocfunction:cY,_lua_newthread:cO,_lua_typename:cL,_luaL_argerror:gy,_lua_rawgeti:dh,_testSetjmp:j1,_lua_sethook:ef,_lua_equal:cU,_luaL_callmeta:gP,_lua_call:dw,_luaL_typerror:gA,_malloc:jU,_lua_rawequal:cT,_lua_type:cK,_lua_getfield:df,_lua_objlen:c1,_luaL_checknumber:gK,_luaL_newmetatable:gF,_lua_getmetatable:dj,_luaL_newstate:g4,_luaopen_base:g7,_luaL_gsub:gT,_luaL_addvalue:gZ,_lua_atpanic:cE,_luaL_getmetafield:gO,_lua_getinfo:en,_lua_gc:dD,_lua_settop:cG,_lua_pushboolean:c6,_lua_setfield:dm,_luaL_ref:g_,_lua_next:dF,_luaL_findtable:gS,_luaL_checkudata:gG,_realloc:jW,_luaopen_table:i8,_lua_setlevel:cD,_luaL_loadfile:g0,_lua_pushnumber:c4,_lua_rawseti:dp,_saveSetjmp:j0,_luaL_optnumber:gL,_lua_pushinteger:c5,_lua_getallocf:ds,_lua_dump:dC,_lua_status:dr,_luaL_where:gB,_lua_cpcall:dz,_luaL_error:gz,_luaL_loadstring:g3,_luaL_unref:g$,runPostSets:cA,stackAlloc:ck,stackSave:cl,stackRestore:cm,setThrew:cn,setTempRet0:cq,setTempRet1:cr,setTempRet2:cs,setTempRet3:ct,setTempRet4:cu,setTempRet5:cv,setTempRet6:cw,setTempRet7:cx,setTempRet8:cy,setTempRet9:cz,dynCall_ii:j7,dynCall_vi:l5,dynCall_vii:n3,dynCall_iiiii:p1,dynCall_iiii:r$,dynCall_v:tZ,dynCall_iii:vX}})\
7843 // EMSCRIPTEN_END_ASM\
7844 ({ \"Math\": Math, \"Int8Array\": Int8Array, \"Int16Array\": Int16Array, \"Int32Array\": Int32Array, \"Uint8Array\": Uint8Array, \"Uint16Array\": Uint16Array, \"Uint32Array\": Uint32Array, \"Float32Array\": Float32Array, \"Float64Array\": Float64Array }, { \"abort\": abort, \"assert\": assert, \"asmPrintInt\": asmPrintInt, \"asmPrintFloat\": asmPrintFloat, \"min\": Math_min, \"jsCall\": jsCall, \"invoke_ii\": invoke_ii, \"invoke_vi\": invoke_vi, \"invoke_vii\": invoke_vii, \"invoke_iiiii\": invoke_iiiii, \"invoke_iiii\": invoke_iiii, \"invoke_v\": invoke_v, \"invoke_iii\": invoke_iii, \"_llvm_lifetime_end\": _llvm_lifetime_end, \"_lseek\": _lseek, \"__scanString\": __scanString, \"_fclose\": _fclose, \"_strtoul\": _strtoul, \"__isFloat\": __isFloat, \"_fflush\": _fflush, \"_fputc\": _fputc, \"_fwrite\": _fwrite, \"_strncmp\": _strncmp, \"_send\": _send, \"_fputs\": _fputs, \"_tmpnam\": _tmpnam, \"_isspace\": _isspace, \"_localtime\": _localtime, \"_read\": _read, \"_ceil\": _ceil, \"_strstr\": _strstr, \"_fsync\": _fsync, \"_fscanf\": _fscanf, \"_fmod\": _fmod, \"_remove\": _remove, \"_modf\": _modf, \"_strcmp\": _strcmp, \"_memchr\": _memchr, \"_llvm_va_end\": _llvm_va_end, \"_tmpfile\": _tmpfile, \"_snprintf\": _snprintf, \"_fgetc\": _fgetc, \"_cosh\": _cosh, \"_fgets\": _fgets, \"_close\": _close, \"_strchr\": _strchr, \"_asin\": _asin, \"_clock\": _clock, \"___setErrNo\": ___setErrNo, \"_isxdigit\": _isxdigit, \"_ftell\": _ftell, \"_exit\": _exit, \"_sprintf\": _sprintf, \"_strrchr\": _strrchr, \"_freopen\": _freopen, \"_strcspn\": _strcspn, \"__isLeapYear\": __isLeapYear, \"_ferror\": _ferror, \"_gmtime\": _gmtime, \"_localtime_r\": _localtime_r, \"_sinh\": _sinh, \"_recv\": _recv, \"_cos\": _cos, \"_putchar\": _putchar, \"_islower\": _islower, \"__exit\": __exit, \"_isupper\": _isupper, \"_strftime\": _strftime, \"_rand\": _rand, \"_tzset\": _tzset, \"_setlocale\": _setlocale, \"_ldexp\": _ldexp, \"_toupper\": _toupper, \"_pread\": _pread, \"_fopen\": _fopen, \"_open\": _open, \"_frexp\": _frexp, \"__arraySum\": __arraySum, \"_log\": _log, \"_isalnum\": _isalnum, \"_mktime\": _mktime, \"_system\": _system, \"_isalpha\": _isalpha, \"_rmdir\": _rmdir, \"_log10\": _log10, \"_fread\": _fread, \"__reallyNegative\": __reallyNegative, \"__formatString\": __formatString, \"_getenv\": _getenv, \"_llvm_pow_f64\": _llvm_pow_f64, \"_sbrk\": _sbrk, \"_tanh\": _tanh, \"_localeconv\": _localeconv, \"___errno_location\": ___errno_location, \"_strerror\": _strerror, \"_llvm_lifetime_start\": _llvm_lifetime_start, \"__parseInt\": __parseInt, \"_ungetc\": _ungetc, \"_rename\": _rename, \"_sysconf\": _sysconf, \"_srand\": _srand, \"_abort\": _abort, \"_fprintf\": _fprintf, \"_tan\": _tan, \"___buildEnvironment\": ___buildEnvironment, \"_feof\": _feof, \"__addDays\": __addDays, \"_strncat\": _strncat, \"_gmtime_r\": _gmtime_r, \"_ispunct\": _ispunct, \"_clearerr\": _clearerr, \"_fabs\": _fabs, \"_floor\": _floor, \"_fseek\": _fseek, \"_sqrt\": _sqrt, \"_write\": _write, \"_sin\": _sin, \"_longjmp\": _longjmp, \"_atan\": _atan, \"_strpbrk\": _strpbrk, \"_unlink\": _unlink, \"_acos\": _acos, \"_pwrite\": _pwrite, \"_strerror_r\": _strerror_r, \"_difftime\": _difftime, \"_iscntrl\": _iscntrl, \"_atan2\": _atan2, \"_exp\": _exp, \"_time\": _time, \"_setvbuf\": _setvbuf, \"STACKTOP\": STACKTOP, \"STACK_MAX\": STACK_MAX, \"tempDoublePtr\": tempDoublePtr, \"ABORT\": ABORT, \"NaN\": NaN, \"Infinity\": Infinity, \"_stdin\": _stdin, \"_stderr\": _stderr, \"_stdout\": _stdout }, buffer);\
7845 var _luaL_checkstack = Module[\"_luaL_checkstack\"] = asm[\"_luaL_checkstack\"];\
7846 var _strlen = Module[\"_strlen\"] = asm[\"_strlen\"];\
7847 var _strcat = Module[\"_strcat\"] = asm[\"_strcat\"];\
7848 var _lua_pushlightuserdata = Module[\"_lua_pushlightuserdata\"] = asm[\"_lua_pushlightuserdata\"];\
7849 var _lua_createtable = Module[\"_lua_createtable\"] = asm[\"_lua_createtable\"];\
7850 var _luaL_optinteger = Module[\"_luaL_optinteger\"] = asm[\"_luaL_optinteger\"];\
7851 var _lua_rawset = Module[\"_lua_rawset\"] = asm[\"_lua_rawset\"];\
7852 var _strncpy = Module[\"_strncpy\"] = asm[\"_strncpy\"];\
7853 var _lua_setmetatable = Module[\"_lua_setmetatable\"] = asm[\"_lua_setmetatable\"];\
7854 var _lua_concat = Module[\"_lua_concat\"] = asm[\"_lua_concat\"];\
7855 var _luaL_optlstring = Module[\"_luaL_optlstring\"] = asm[\"_luaL_optlstring\"];\
7856 var _luaopen_io = Module[\"_luaopen_io\"] = asm[\"_luaopen_io\"];\
7857 var _memcpy = Module[\"_memcpy\"] = asm[\"_memcpy\"];\
7858 var _lua_pcall = Module[\"_lua_pcall\"] = asm[\"_lua_pcall\"];\
7859 var _lua_pushthread = Module[\"_lua_pushthread\"] = asm[\"_lua_pushthread\"];\
7860 var _lua_close = Module[\"_lua_close\"] = asm[\"_lua_close\"];\
7861 var _luaopen_math = Module[\"_luaopen_math\"] = asm[\"_luaopen_math\"];\
7862 var _lua_setupvalue = Module[\"_lua_setupvalue\"] = asm[\"_lua_setupvalue\"];\
7863 var _lua_replace = Module[\"_lua_replace\"] = asm[\"_lua_replace\"];\
7864 var _memcmp = Module[\"_memcmp\"] = asm[\"_memcmp\"];\
7865 var _lua_gethookmask = Module[\"_lua_gethookmask\"] = asm[\"_lua_gethookmask\"];\
7866 var _lua_xmove = Module[\"_lua_xmove\"] = asm[\"_lua_xmove\"];\
7867 var _lua_load = Module[\"_lua_load\"] = asm[\"_lua_load\"];\
7868 var _lua_touserdata = Module[\"_lua_touserdata\"] = asm[\"_lua_touserdata\"];\
7869 var _lua_rawget = Module[\"_lua_rawget\"] = asm[\"_lua_rawget\"];\
7870 var _free = Module[\"_free\"] = asm[\"_free\"];\
7871 var _lua_pushcclosure = Module[\"_lua_pushcclosure\"] = asm[\"_lua_pushcclosure\"];\
7872 var _lua_pushstring = Module[\"_lua_pushstring\"] = asm[\"_lua_pushstring\"];\
7873 var _tolower = Module[\"_tolower\"] = asm[\"_tolower\"];\
7874 var _lua_getfenv = Module[\"_lua_getfenv\"] = asm[\"_lua_getfenv\"];\
7875 var _luaopen_string = Module[\"_luaopen_string\"] = asm[\"_luaopen_string\"];\
7876 var _lua_isuserdata = Module[\"_lua_isuserdata\"] = asm[\"_lua_isuserdata\"];\
7877 var _luaL_buffinit = Module[\"_luaL_buffinit\"] = asm[\"_luaL_buffinit\"];\
7878 var _lua_resume = Module[\"_lua_resume\"] = asm[\"_lua_resume\"];\
7879 var _lua_iscfunction = Module[\"_lua_iscfunction\"] = asm[\"_lua_iscfunction\"];\
7880 var _lua_remove = Module[\"_lua_remove\"] = asm[\"_lua_remove\"];\
7881 var _luaL_checkoption = Module[\"_luaL_checkoption\"] = asm[\"_luaL_checkoption\"];\
7882 var _lua_tointeger = Module[\"_lua_tointeger\"] = asm[\"_lua_tointeger\"];\
7883 var _lua_pushvfstring = Module[\"_lua_pushvfstring\"] = asm[\"_lua_pushvfstring\"];\
7884 var _luaL_prepbuffer = Module[\"_luaL_prepbuffer\"] = asm[\"_luaL_prepbuffer\"];\
7885 var _lua_isnumber = Module[\"_lua_isnumber\"] = asm[\"_lua_isnumber\"];\
7886 var _luaL_checklstring = Module[\"_luaL_checklstring\"] = asm[\"_luaL_checklstring\"];\
7887 var _lua_isstring = Module[\"_lua_isstring\"] = asm[\"_lua_isstring\"];\
7888 var _lua_pushlstring = Module[\"_lua_pushlstring\"] = asm[\"_lua_pushlstring\"];\
7889 var _lua_setfenv = Module[\"_lua_setfenv\"] = asm[\"_lua_setfenv\"];\
7890 var _lua_lessthan = Module[\"_lua_lessthan\"] = asm[\"_lua_lessthan\"];\
7891 var _luaopen_os = Module[\"_luaopen_os\"] = asm[\"_luaopen_os\"];\
7892 var _lua_yield = Module[\"_lua_yield\"] = asm[\"_lua_yield\"];\
7893 var _luaL_checkany = Module[\"_luaL_checkany\"] = asm[\"_luaL_checkany\"];\
7894 var _luaL_addstring = Module[\"_luaL_addstring\"] = asm[\"_luaL_addstring\"];\
7895 var _lua_pushfstring = Module[\"_lua_pushfstring\"] = asm[\"_lua_pushfstring\"];\
7896 var _lua_insert = Module[\"_lua_insert\"] = asm[\"_lua_insert\"];\
7897 var _lua_tolstring = Module[\"_lua_tolstring\"] = asm[\"_lua_tolstring\"];\
7898 var _lua_pushnil = Module[\"_lua_pushnil\"] = asm[\"_lua_pushnil\"];\
7899 var _luaL_register = Module[\"_luaL_register\"] = asm[\"_luaL_register\"];\
7900 var _lua_getupvalue = Module[\"_lua_getupvalue\"] = asm[\"_lua_getupvalue\"];\
7901 var _lua_checkstack = Module[\"_lua_checkstack\"] = asm[\"_lua_checkstack\"];\
7902 var _luaopen_package = Module[\"_luaopen_package\"] = asm[\"_luaopen_package\"];\
7903 var _luaL_pushresult = Module[\"_luaL_pushresult\"] = asm[\"_luaL_pushresult\"];\
7904 var _lua_topointer = Module[\"_lua_topointer\"] = asm[\"_lua_topointer\"];\
7905 var _lua_error = Module[\"_lua_error\"] = asm[\"_lua_error\"];\
7906 var _lua_gettable = Module[\"_lua_gettable\"] = asm[\"_lua_gettable\"];\
7907 var _luaopen_debug = Module[\"_luaopen_debug\"] = asm[\"_luaopen_debug\"];\
7908 var _lua_tonumber = Module[\"_lua_tonumber\"] = asm[\"_lua_tonumber\"];\
7909 var _luaL_checkinteger = Module[\"_luaL_checkinteger\"] = asm[\"_luaL_checkinteger\"];\
7910 var _lua_getstack = Module[\"_lua_getstack\"] = asm[\"_lua_getstack\"];\
7911 var _lua_gettop = Module[\"_lua_gettop\"] = asm[\"_lua_gettop\"];\
7912 var _lua_getlocal = Module[\"_lua_getlocal\"] = asm[\"_lua_getlocal\"];\
7913 var _luaL_checktype = Module[\"_luaL_checktype\"] = asm[\"_luaL_checktype\"];\
7914 var _lua_newuserdata = Module[\"_lua_newuserdata\"] = asm[\"_lua_newuserdata\"];\
7915 var _lua_settable = Module[\"_lua_settable\"] = asm[\"_lua_settable\"];\
7916 var _luaL_addlstring = Module[\"_luaL_addlstring\"] = asm[\"_luaL_addlstring\"];\
7917 var _luaL_loadbuffer = Module[\"_luaL_loadbuffer\"] = asm[\"_luaL_loadbuffer\"];\
7918 var _lua_toboolean = Module[\"_lua_toboolean\"] = asm[\"_lua_toboolean\"];\
7919 var _lua_setallocf = Module[\"_lua_setallocf\"] = asm[\"_lua_setallocf\"];\
7920 var _memset = Module[\"_memset\"] = asm[\"_memset\"];\
7921 var _lua_gethook = Module[\"_lua_gethook\"] = asm[\"_lua_gethook\"];\
7922 var _lua_gethookcount = Module[\"_lua_gethookcount\"] = asm[\"_lua_gethookcount\"];\
7923 var _luaL_openlibs = Module[\"_luaL_openlibs\"] = asm[\"_luaL_openlibs\"];\
7924 var _lua_setlocal = Module[\"_lua_setlocal\"] = asm[\"_lua_setlocal\"];\
7925 var _lua_tothread = Module[\"_lua_tothread\"] = asm[\"_lua_tothread\"];\
7926 var _lua_newstate = Module[\"_lua_newstate\"] = asm[\"_lua_newstate\"];\
7927 var _lua_pushvalue = Module[\"_lua_pushvalue\"] = asm[\"_lua_pushvalue\"];\
7928 var _lua_tocfunction = Module[\"_lua_tocfunction\"] = asm[\"_lua_tocfunction\"];\
7929 var _lua_newthread = Module[\"_lua_newthread\"] = asm[\"_lua_newthread\"];\
7930 var _lua_typename = Module[\"_lua_typename\"] = asm[\"_lua_typename\"];\
7931 var _luaL_argerror = Module[\"_luaL_argerror\"] = asm[\"_luaL_argerror\"];\
7932 var _lua_rawgeti = Module[\"_lua_rawgeti\"] = asm[\"_lua_rawgeti\"];\
7933 var _testSetjmp = Module[\"_testSetjmp\"] = asm[\"_testSetjmp\"];\
7934 var _lua_sethook = Module[\"_lua_sethook\"] = asm[\"_lua_sethook\"];\
7935 var _lua_equal = Module[\"_lua_equal\"] = asm[\"_lua_equal\"];\
7936 var _luaL_callmeta = Module[\"_luaL_callmeta\"] = asm[\"_luaL_callmeta\"];\
7937 var _lua_call = Module[\"_lua_call\"] = asm[\"_lua_call\"];\
7938 var _luaL_typerror = Module[\"_luaL_typerror\"] = asm[\"_luaL_typerror\"];\
7939 var _malloc = Module[\"_malloc\"] = asm[\"_malloc\"];\
7940 var _lua_rawequal = Module[\"_lua_rawequal\"] = asm[\"_lua_rawequal\"];\
7941 var _lua_type = Module[\"_lua_type\"] = asm[\"_lua_type\"];\
7942 var _lua_getfield = Module[\"_lua_getfield\"] = asm[\"_lua_getfield\"];\
7943 var _lua_objlen = Module[\"_lua_objlen\"] = asm[\"_lua_objlen\"];\
7944 var _luaL_checknumber = Module[\"_luaL_checknumber\"] = asm[\"_luaL_checknumber\"];\
7945 var _luaL_newmetatable = Module[\"_luaL_newmetatable\"] = asm[\"_luaL_newmetatable\"];\
7946 var _lua_getmetatable = Module[\"_lua_getmetatable\"] = asm[\"_lua_getmetatable\"];\
7947 var _luaL_newstate = Module[\"_luaL_newstate\"] = asm[\"_luaL_newstate\"];\
7948 var _luaopen_base = Module[\"_luaopen_base\"] = asm[\"_luaopen_base\"];\
7949 var _luaL_gsub = Module[\"_luaL_gsub\"] = asm[\"_luaL_gsub\"];\
7950 var _luaL_addvalue = Module[\"_luaL_addvalue\"] = asm[\"_luaL_addvalue\"];\
7951 var _lua_atpanic = Module[\"_lua_atpanic\"] = asm[\"_lua_atpanic\"];\
7952 var _luaL_getmetafield = Module[\"_luaL_getmetafield\"] = asm[\"_luaL_getmetafield\"];\
7953 var _lua_getinfo = Module[\"_lua_getinfo\"] = asm[\"_lua_getinfo\"];\
7954 var _lua_gc = Module[\"_lua_gc\"] = asm[\"_lua_gc\"];\
7955 var _lua_settop = Module[\"_lua_settop\"] = asm[\"_lua_settop\"];\
7956 var _lua_pushboolean = Module[\"_lua_pushboolean\"] = asm[\"_lua_pushboolean\"];\
7957 var _lua_setfield = Module[\"_lua_setfield\"] = asm[\"_lua_setfield\"];\
7958 var _luaL_ref = Module[\"_luaL_ref\"] = asm[\"_luaL_ref\"];\
7959 var _lua_next = Module[\"_lua_next\"] = asm[\"_lua_next\"];\
7960 var _luaL_findtable = Module[\"_luaL_findtable\"] = asm[\"_luaL_findtable\"];\
7961 var _luaL_checkudata = Module[\"_luaL_checkudata\"] = asm[\"_luaL_checkudata\"];\
7962 var _realloc = Module[\"_realloc\"] = asm[\"_realloc\"];\
7963 var _luaopen_table = Module[\"_luaopen_table\"] = asm[\"_luaopen_table\"];\
7964 var _lua_setlevel = Module[\"_lua_setlevel\"] = asm[\"_lua_setlevel\"];\
7965 var _luaL_loadfile = Module[\"_luaL_loadfile\"] = asm[\"_luaL_loadfile\"];\
7966 var _lua_pushnumber = Module[\"_lua_pushnumber\"] = asm[\"_lua_pushnumber\"];\
7967 var _lua_rawseti = Module[\"_lua_rawseti\"] = asm[\"_lua_rawseti\"];\
7968 var _saveSetjmp = Module[\"_saveSetjmp\"] = asm[\"_saveSetjmp\"];\
7969 var _luaL_optnumber = Module[\"_luaL_optnumber\"] = asm[\"_luaL_optnumber\"];\
7970 var _lua_pushinteger = Module[\"_lua_pushinteger\"] = asm[\"_lua_pushinteger\"];\
7971 var _lua_getallocf = Module[\"_lua_getallocf\"] = asm[\"_lua_getallocf\"];\
7972 var _lua_dump = Module[\"_lua_dump\"] = asm[\"_lua_dump\"];\
7973 var _lua_status = Module[\"_lua_status\"] = asm[\"_lua_status\"];\
7974 var _luaL_where = Module[\"_luaL_where\"] = asm[\"_luaL_where\"];\
7975 var _lua_cpcall = Module[\"_lua_cpcall\"] = asm[\"_lua_cpcall\"];\
7976 var _luaL_error = Module[\"_luaL_error\"] = asm[\"_luaL_error\"];\
7977 var _luaL_loadstring = Module[\"_luaL_loadstring\"] = asm[\"_luaL_loadstring\"];\
7978 var _luaL_unref = Module[\"_luaL_unref\"] = asm[\"_luaL_unref\"];\
7979 var runPostSets = Module[\"runPostSets\"] = asm[\"runPostSets\"];\
7980 var dynCall_ii = Module[\"dynCall_ii\"] = asm[\"dynCall_ii\"];\
7981 var dynCall_vi = Module[\"dynCall_vi\"] = asm[\"dynCall_vi\"];\
7982 var dynCall_vii = Module[\"dynCall_vii\"] = asm[\"dynCall_vii\"];\
7983 var dynCall_iiiii = Module[\"dynCall_iiiii\"] = asm[\"dynCall_iiiii\"];\
7984 var dynCall_iiii = Module[\"dynCall_iiii\"] = asm[\"dynCall_iiii\"];\
7985 var dynCall_v = Module[\"dynCall_v\"] = asm[\"dynCall_v\"];\
7986 var dynCall_iii = Module[\"dynCall_iii\"] = asm[\"dynCall_iii\"];\
7987 Runtime.stackAlloc = function(size) { return asm['stackAlloc'](size) };\
7988 Runtime.stackSave = function() { return asm['stackSave']() };\
7989 Runtime.stackRestore = function(top) { asm['stackRestore'](top) };\
7990 // Warning: printing of i64 values may be slightly rounded! No deep i64 math used, so precise i64 code not included\
7991 var i64Math = null;\
7992 // === Auto-generated postamble setup entry stuff ===\
7993 function ExitStatus(status) {\
7994 this.name = \"ExitStatus\";\
7995 this.message = \"Program terminated with exit(\" + status + \")\";\
7996 this.status = status;\
7997 };\
7998 ExitStatus.prototype = new Error();\
7999 ExitStatus.prototype.constructor = ExitStatus;\
8000 var initialStackTop;\
8001 var preloadStartTime = null;\
8002 var calledMain = false;\
8003 Module['callMain'] = Module.callMain = function callMain(args) {\
8004 assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on __ATMAIN__)');\
8005 assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called');\
8006 args = args || [];\
8007 if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) {\
8008 Module.printErr('preload time: ' + (Date.now() - preloadStartTime) + ' ms');\
8009 }\
8010 ensureInitRuntime();\
8011 var argc = args.length+1;\
8012 function pad() {\
8013 for (var i = 0; i < 4-1; i++) {\
8014 argv.push(0);\
8015 }\
8016 }\
8017 var argv = [allocate(intArrayFromString(\"/bin/this.program\"), 'i8', ALLOC_NORMAL) ];\
8018 pad();\
8019 for (var i = 0; i < argc-1; i = i + 1) {\
8020 argv.push(allocate(intArrayFromString(args[i]), 'i8', ALLOC_NORMAL));\
8021 pad();\
8022 }\
8023 argv.push(0);\
8024 argv = allocate(argv, 'i32', ALLOC_NORMAL);\
8025 initialStackTop = STACKTOP;\
8026 try {\
8027 var ret = Module['_main'](argc, argv, 0);\
8028 // if we're not running an evented main loop, it's time to exit\
8029 if (!Module['noExitRuntime']) {\
8030 exit(ret);\
8031 }\
8032 }\
8033 catch(e) {\
8034 if (e instanceof ExitStatus) {\
8035 // exit() throws this once it's done to make sure execution\
8036 // has been stopped completely\
8037 return;\
8038 } else if (e == 'SimulateInfiniteLoop') {\
8039 // running an evented main loop, don't immediately exit\
8040 Module['noExitRuntime'] = true;\
8041 return;\
8042 } else {\
8043 throw e;\
8044 }\
8045 } finally {\
8046 calledMain = true;\
8047 }\
8048 }\
8049 function run(args) {\
8050 args = args || Module['arguments'];\
8051 if (preloadStartTime === null) preloadStartTime = Date.now();\
8052 if (runDependencies > 0) {\
8053 Module.printErr('run() called, but dependencies remain, so not running');\
8054 return;\
8055 }\
8056 preRun();\
8057 if (runDependencies > 0) {\
8058 // a preRun added a dependency, run will be called later\
8059 return;\
8060 }\
8061 function doRun() {\
8062 ensureInitRuntime();\
8063 preMain();\
8064 calledRun = true;\
8065 if (Module['_main'] && shouldRunNow) {\
8066 Module['callMain'](args);\
8067 }\
8068 postRun();\
8069 }\
8070 if (Module['setStatus']) {\
8071 Module['setStatus']('Running...');\
8072 setTimeout(function() {\
8073 setTimeout(function() {\
8074 Module['setStatus']('');\
8075 }, 1);\
8076 if (!ABORT) doRun();\
8077 }, 1);\
8078 } else {\
8079 doRun();\
8080 }\
8081 }\
8082 Module['run'] = Module.run = run;\
8083 function exit(status) {\
8084 ABORT = true;\
8085 EXITSTATUS = status;\
8086 STACKTOP = initialStackTop;\
8087 // exit the runtime\
8088 exitRuntime();\
8089 // TODO We should handle this differently based on environment.\
8090 // In the browser, the best we can do is throw an exception\
8091 // to halt execution, but in node we could process.exit and\
8092 // I'd imagine SM shell would have something equivalent.\
8093 // This would let us set a proper exit status (which\
8094 // would be great for checking test exit statuses).\
8095 // https://github.com/kripken/emscripten/issues/1371\
8096 // throw an exception to halt the current execution\
8097 throw new ExitStatus(status);\
8098 }\
8099 Module['exit'] = Module.exit = exit;\
8100 function abort(text) {\
8101 if (text) {\
8102 Module.print(text);\
8103 Module.printErr(text);\
8104 }\
8105 ABORT = true;\
8106 EXITSTATUS = 1;\
8107 throw 'abort() at ' + (new Error().stack);\
8108 }\
8109 Module['abort'] = Module.abort = abort;\
8110 // {{PRE_RUN_ADDITIONS}}\
8111 if (Module['preInit']) {\
8112 if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']];\
8113 while (Module['preInit'].length > 0) {\
8114 Module['preInit'].pop()();\
8115 }\
8116 }\
8117 // shouldRunNow refers to calling main(), not run().\
8118 var shouldRunNow = true;\
8119 if (Module['noInitialRun']) {\
8120 shouldRunNow = false;\
8121 }\
8122 run();\
8123 // {{POST_RUN_ADDITIONS}}\
8124 // {{MODULE_ADDITIONS}}\
8125 \
8126 \
8127 ////////////////////////////////////////////////////////////////////////////////\
8128 \
8129 var C = { };\
8130 \
8131 var F = Module.cwrap;\
8132 \
8133 ////////////////////////////////////////////////////////////////////////////////\
8134 // c_type.js: basic C \"types\" for Lua 5.1 C API cwraps (fragment file)\
8135 // This file is a part of lua5.1.js project:\
8136 // Copyright (c) LogicEditor <info@logiceditor.com>\
8137 // Copyright (c) lua5.1.js authors\
8138 // See file `COPYRIGHT` for the license\
8139 ////////////////////////////////////////////////////////////////////////////////\
8140 \
8141 var void_t = null;\
8142 var void_ptr_t = \"number\";\
8143 var void_ptr_t_ptr_t = \"number\";\
8144 var const_void_ptr_t = \"number\";\
8145 var int_t = \"number\";\
8146 var size_t_ptr_t = \"number\";\
8147 var size_t = \"number\";\
8148 var const_char_ptr_t = \"string\";\
8149 \
8150 var NULL = 0;\
8151 \
8152 ////////////////////////////////////////////////////////////////////////////////\
8153 // lua.h.js: Lua 5.1 C API, lua.h definitions (fragment file)\
8154 // This file is a part of lua5.1.js project:\
8155 // Copyright (c) LogicEditor <info@logiceditor.com>\
8156 // Copyright (c) lua5.1.js authors\
8157 // See file `COPYRIGHT` for the license\
8158 // Based on original Lua 5.1.5 header files:\
8159 // Copyright (c) 1994-2012 Lua.org, PUC-Rio\
8160 ////////////////////////////////////////////////////////////////////////////////\
8161 // Note: Keeping this file as close to Lua sources as possible.\
8162 // This includes avoiding breaking lines at 80 char limit\
8163 // to keep original formatting despite JS code being somewhat longer.\
8164 ////////////////////////////////////////////////////////////////////////////////\
8165 \
8166 var lua_Number = \"number\";\
8167 var lua_Integer = \"number\";\
8168 \
8169 C.LUA_VERSION = \"Lua 5.1\";\
8170 C.LUA_RELEASE = \"Lua 5.1.5\";\
8171 C.LUA_VERSION_NUM = 501;\
8172 C.LUA_COPYRIGHT = \"Copyright (C) 1994-2012 Lua.org, PUC-Rio\";\
8173 C.LUA_AUTHORS = \"R. Ierusalimschy, L. H. de Figueiredo & W. Celes\";\
8174 \
8175 /* mark for precompiled code (`<esc>Lua') */\
8176 C.LUA_SIGNATURE = \"\\033Lua\";\
8177 \
8178 /* option for multiple returns in `lua_pcall' and `lua_call' */\
8179 C.LUA_MULTRET = (-1);\
8180 \
8181 /*\
8182 ** pseudo-indices\
8183 */\
8184 C.LUA_REGISTRYINDEX = (-10000);\
8185 C.LUA_ENVIRONINDEX = (-10001);\
8186 C.LUA_GLOBALSINDEX = (-10002);\
8187 C.lua_upvalueindex = function(i) { return (C.LUA_GLOBALSINDEX-(i)); };\
8188 \
8189 /* thread status; 0 is OK */\
8190 C.LUA_YIELD = 1;\
8191 C.LUA_ERRRUN = 2;\
8192 C.LUA_ERRSYNTAX = 3;\
8193 C.LUA_ERRMEM = 4;\
8194 C.LUA_ERRERR = 5;\
8195 \
8196 var lua_State = \"number\";\
8197 \
8198 // typedef int (*lua_CFunction) (lua_State *L);\
8199 var lua_CFunction = \"number\";\
8200 \
8201 /*\
8202 ** functions that read/write blocks when loading/dumping Lua chunks\
8203 */\
8204 // typedef const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz);\
8205 var lua_Reader = \"number\";\
8206 \
8207 // typedef int (*lua_Writer) (lua_State *L, const void* p, size_t sz, void* ud);\
8208 var lua_Writer = \"number\";\
8209 \
8210 /*\
8211 ** prototype for memory-allocation functions\
8212 */\
8213 // typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize);\
8214 var lua_Alloc = \"number\";\
8215 \
8216 /*\
8217 ** basic types\
8218 */\
8219 C.LUA_TNONE = (-1);\
8220 \
8221 C.LUA_TNIL = 0;\
8222 C.LUA_TBOOLEAN = 1;\
8223 C.LUA_TLIGHTUSERDATA = 2;\
8224 C.LUA_TNUMBER = 3;\
8225 C.LUA_TSTRING = 4;\
8226 C.LUA_TTABLE = 5;\
8227 C.LUA_TFUNCTION = 6;\
8228 C.LUA_TUSERDATA = 7;\
8229 C.LUA_TTHREAD = 8;\
8230 \
8231 /* minimum Lua stack available to a C function */\
8232 C.LUA_MINSTACK = 20;\
8233 \
8234 /* type of numbers in Lua */\
8235 var LUA_NUMBER = lua_Number;\
8236 \
8237 /* type for integer functions */\
8238 var LUA_INTEGER = lua_Integer;\
8239 \
8240 /*\
8241 ** state manipulation\
8242 */\
8243 C.lua_newstate = F(\"lua_newstate\", lua_State, [lua_Alloc, void_ptr_t]);\
8244 C.lua_close = F(\"lua_close\", void_t, [lua_State]);\
8245 C.lua_newthread = F(\"lua_newthread\", lua_State, [lua_State]);\
8246 \
8247 C.lua_atpanic = F(\"lua_atpanic\", lua_CFunction, [lua_State, lua_CFunction]);\
8248 \
8249 /*\
8250 ** basic stack manipulation\
8251 */\
8252 C.lua_gettop = F(\"lua_gettop\", int_t, [lua_State]);\
8253 C.lua_settop = F(\"lua_settop\", void_t, [lua_State, int_t]);\
8254 C.lua_pushvalue = F(\"lua_pushvalue\", void_t, [lua_State, int_t]);\
8255 C.lua_remove = F(\"lua_remove\", void_t, [lua_State, int_t]);\
8256 C.lua_insert = F(\"lua_insert\", void_t, [lua_State, int_t]);\
8257 C.lua_replace = F(\"lua_replace\", void_t, [lua_State, int_t]);\
8258 C.lua_checkstack = F(\"lua_checkstack\", int_t, [lua_State, int_t]);\
8259 \
8260 C.lua_xmove = F(\"lua_xmove\", void_t, [lua_State, lua_State, int_t]);\
8261 \
8262 /*\
8263 ** access functions (stack -> C)\
8264 */\
8265 \
8266 C.lua_isnumber = F(\"lua_isnumber\", int_t, [lua_State, int_t]);\
8267 C.lua_isstring = F(\"lua_isstring\", int_t, [lua_State, int_t]);\
8268 C.lua_iscfunction = F(\"lua_iscfunction\", int_t, [lua_State, int_t]);\
8269 C.lua_isuserdata = F(\"lua_isuserdata\", int_t, [lua_State, int_t]);\
8270 C.lua_type = F(\"lua_type\", int_t, [lua_State, int_t]);\
8271 C.lua_typename = F(\"lua_typename\", const_char_ptr_t, [lua_State, int_t]);\
8272 \
8273 C.lua_equal = F(\"lua_equal\", int_t, [lua_State, int_t, int_t]);\
8274 C.lua_rawequal = F(\"lua_rawequal\", int_t, [lua_State, int_t, int_t]);\
8275 C.lua_lessthan = F(\"lua_lessthan\", int_t, [lua_State, int_t, int_t]);\
8276 \
8277 C.lua_tonumber = F(\"lua_tonumber\", lua_Number, [lua_State, int_t]);\
8278 C.lua_tointeger = F(\"lua_tointeger\", lua_Integer, [lua_State, int_t]);\
8279 C.lua_toboolean = F(\"lua_toboolean\", int_t, [lua_State, int_t]);\
8280 C.lua_tolstring = F(\"lua_tolstring\", const_char_ptr_t, [lua_State, int_t, size_t_ptr_t]);\
8281 C.lua_objlen = F(\"lua_objlen\", size_t, [lua_State, int_t]);\
8282 C.lua_tocfunction = F(\"lua_tocfunction\", lua_CFunction, [lua_State, int_t]);\
8283 C.lua_touserdata = F(\"lua_touserdata\", void_ptr_t, [lua_State, int_t]);\
8284 C.lua_tothread = F(\"lua_tothread\", lua_State, [lua_State, int_t]);\
8285 C.lua_topointer = F(\"lua_topointer\", const_void_ptr_t, [lua_State, int_t]);\
8286 \
8287 /*\
8288 ** push functions (C -> stack)\
8289 */\
8290 C.lua_pushnil = F(\"lua_pushnil\", void_t, [lua_State]);\
8291 C.lua_pushnumber = F(\"lua_pushnumber\", void_t, [lua_State, lua_Number]);\
8292 C.lua_pushinteger = F(\"lua_pushinteger\", void_t, [lua_State, lua_Integer]);\
8293 C.lua_pushlstring = F(\"lua_pushlstring\", void_t, [lua_State, const_char_ptr_t, size_t]);\
8294 C.lua_pushstring = F(\"lua_pushstring\", void_t, [lua_State, const_char_ptr_t]);\
8295 /*\
8296 // TODO: Support these.\
8297 LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt,\
8298 va_list argp);\
8299 LUA_API const char *(lua_pushfstring) (lua_State *L, const char *fmt, ...);\
8300 */\
8301 C.lua_pushcclosure = F(\"lua_pushcclosure\", void_t, [lua_State, lua_CFunction, int_t]);\
8302 C.lua_pushboolean = F(\"lua_pushboolean\", void_t, [lua_State, int_t]);\
8303 C.lua_pushlightuserdata = F(\"lua_pushlightuserdata\", void_t, [lua_State, void_ptr_t]);\
8304 C.lua_pushthread = F(\"lua_pushthread\", int_t, [lua_State]);\
8305 \
8306 /*\
8307 ** get functions (Lua -> stack)\
8308 */\
8309 C.lua_gettable = F(\"lua_gettable\", void_t, [lua_State, int_t]);\
8310 C.lua_getfield = F(\"lua_getfield\", void_t, [lua_State, int_t, const_char_ptr_t]);\
8311 C.lua_rawget = F(\"lua_rawget\", void_t, [lua_State, int_t]);\
8312 C.lua_rawgeti = F(\"lua_rawgeti\", void_t, [lua_State, int_t, int_t]);\
8313 C.lua_createtable = F(\"lua_createtable\", void_t, [lua_State, int_t, int_t]);\
8314 C.lua_newuserdata = F(\"lua_newuserdata\", void_ptr_t, [lua_State, size_t]);\
8315 C.lua_getmetatable = F(\"lua_getmetatable\", int_t, [lua_State, int_t]);\
8316 C.lua_getfenv = F(\"lua_getfenv\", void_t, [lua_State, int_t]);\
8317 \
8318 /*\
8319 ** set functions (stack -> Lua)\
8320 */\
8321 C.lua_settable = F(\"lua_settable\", void_t, [lua_State, int_t]);\
8322 C.lua_setfield = F(\"lua_setfield\", void_t, [lua_State, int_t, const_char_ptr_t]);\
8323 C.lua_rawset = F(\"lua_rawset\", void_t, [lua_State, int_t]);\
8324 C.lua_rawseti = F(\"lua_rawseti\", void_t, [lua_State, int_t, int_t]);\
8325 C.lua_setmetatable = F(\"lua_setmetatable\", int_t, [lua_State, int_t]);\
8326 C.lua_setfenv = F(\"lua_setfenv\", int_t, [lua_State, int_t]);\
8327 \
8328 /*\
8329 ** `load' and `call' functions (load and run Lua code)\
8330 */\
8331 C.lua_call = F(\"lua_call\", void_t, [lua_State, int_t, int_t]);\
8332 C.lua_pcall = F(\"lua_pcall\", int_t, [lua_State, int_t, int_t, int_t]);\
8333 C.lua_cpcall = F(\"lua_cpcall\", int_t, [lua_State, lua_CFunction, void_ptr_t]);\
8334 C.lua_load = F(\"lua_load\", int_t, [lua_State, lua_Reader, void_ptr_t,\
8335 const_char_ptr_t]);\
8336 \
8337 C.lua_dump = F(\"lua_dump\", int_t, [lua_State, lua_Writer, void_ptr_t]);\
8338 \
8339 /*\
8340 ** coroutine functions\
8341 */\
8342 C.lua_yield = F(\"lua_yield\", int_t, [lua_State, int_t]);\
8343 C.lua_resume = F(\"lua_resume\", int_t, [lua_State, int_t]);\
8344 C.lua_status = F(\"lua_status\", int_t, [lua_State]);\
8345 \
8346 /*\
8347 ** garbage-collection function and options\
8348 */\
8349 \
8350 C.LUA_GCSTOP = 0;\
8351 C.LUA_GCRESTART = 1;\
8352 C.LUA_GCCOLLECT = 2;\
8353 C.LUA_GCCOUNT = 3;\
8354 C.LUA_GCCOUNTB = 4;\
8355 C.LUA_GCSTEP = 5;\
8356 C.LUA_GCSETPAUSE = 6;\
8357 C.LUA_GCSETSTEPMUL = 7;\
8358 \
8359 C.lua_gc = F(\"lua_gc\", int_t, [lua_State, int_t, int_t]);\
8360 \
8361 /*\
8362 ** miscellaneous functions\
8363 */\
8364 \
8365 C.lua_error = F(\"lua_error\", int_t, [lua_State]);\
8366 \
8367 C.lua_next = F(\"lua_next\", int_t, [lua_State, int_t]);\
8368 \
8369 C.lua_concat = F(\"lua_concat\", void_t, [lua_State, int_t]);\
8370 \
8371 C.lua_getallocf = F(\"lua_getallocf\", lua_Alloc, [lua_State, void_ptr_t_ptr_t]);\
8372 C.lua_setallocf = F(\"lua_setallocf\", void_t, [lua_State, lua_Alloc, void_ptr_t]);\
8373 \
8374 /*\
8375 ** ===============================================================\
8376 ** some useful macros\
8377 ** ===============================================================\
8378 */\
8379 \
8380 C.lua_pop = function(L,n) { return C.lua_settop(L, -(n)-1); };\
8381 \
8382 C.lua_newtable = function(L) { return C.lua_createtable(L, 0, 0); };\
8383 \
8384 C.lua_register = function(L,n,f) { return (C.lua_pushcfunction(L, (f)), C.lua_setglobal(L, (n))); };\
8385 \
8386 C.lua_pushcfunction = function(L,f) { return C.lua_pushcclosure(L, (f), 0); };\
8387 \
8388 C.lua_strlen = function(L,i) { return C.lua_objlen(L, (i)); };\
8389 \
8390 C.lua_isfunction = function(L,n) { return (C.lua_type(L, (n)) == C.LUA_TFUNCTION); };\
8391 C.lua_istable = function(L,n) { return (C.lua_type(L, (n)) == C.LUA_TTABLE); };\
8392 C.lua_islightuserdata = function(L,n) { return (C.lua_type(L, (n)) == C.LUA_TLIGHTUSERDATA); };\
8393 C.lua_isnil = function(L,n) { return (C.lua_type(L, (n)) == C.LUA_TNIL); };\
8394 C.lua_isboolean = function(L,n) { return (C.lua_type(L, (n)) == C.LUA_TBOOLEAN); };\
8395 C.lua_isthread = function(L,n) { return (C.lua_type(L, (n)) == C.LUA_TTHREAD); };\
8396 C.lua_isnone = function(L,n) { return (C.lua_type(L, (n)) == C.LUA_TNONE); };\
8397 C.lua_isnoneornil = function(L, n) { return (C.lua_type(L, (n)) <= 0); };\
8398 \
8399 C.lua_pushliteral = C.lua_pushstring;\
8400 \
8401 C.lua_setglobal = function(L,s) { return C.lua_setfield(L, C.LUA_GLOBALSINDEX, (s)); };\
8402 C.lua_getglobal = function(L,s) { return C.lua_getfield(L, C.LUA_GLOBALSINDEX, (s)); };\
8403 \
8404 C.lua_tostring = function(L,i) { return C.lua_tolstring(L, (i), NULL); };\
8405 \
8406 /*\
8407 ** compatibility macros and functions\
8408 */\
8409 \
8410 C.lua_open = function() { return C.luaL_newstate(); };\
8411 \
8412 C.lua_getregistry = function(L) { return C.lua_pushvalue(L, C.LUA_REGISTRYINDEX); };\
8413 \
8414 C.lua_getgccount = function(L) { return C.lua_gc(L, C.LUA_GCCOUNT, 0); }\
8415 \
8416 var lua_Chunkreader = lua_Reader;\
8417 var lua_Chunkwriter = lua_Writer;\
8418 \
8419 /* hack */\
8420 C.lua_setlevel = F(\"lua_setlevel\", void_t, [lua_State, lua_State]);\
8421 \
8422 /*\
8423 ** {======================================================================\
8424 ** Debug API\
8425 ** =======================================================================\
8426 */\
8427 \
8428 /*\
8429 ** Event codes\
8430 */\
8431 C.LUA_HOOKCALL = 0;\
8432 C.LUA_HOOKRET = 1;\
8433 C.LUA_HOOKLINE = 2;\
8434 C.LUA_HOOKCOUNT = 3;\
8435 C.LUA_HOOKTAILRET = 4;\
8436 \
8437 /*\
8438 ** Event masks\
8439 */\
8440 C.LUA_MASKCALL = (1 << C.LUA_HOOKCALL);\
8441 C.LUA_MASKRET = (1 << C.LUA_HOOKRET);\
8442 C.LUA_MASKLINE = (1 << C.LUA_HOOKLINE);\
8443 C.LUA_MASKCOUNT = (1 << C.LUA_HOOKCOUNT);\
8444 \
8445 // TODO: Support these. (Note LUA_IDSIZE.)\
8446 /*\
8447 typedef struct lua_Debug lua_Debug; /* activation record * /\
8448 \
8449 /* Functions to be called by the debuger in specific events * /\
8450 typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);\
8451 \
8452 LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar);\
8453 LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar);\
8454 LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n);\
8455 LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n);\
8456 LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n);\
8457 LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n);\
8458 \
8459 LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count);\
8460 LUA_API lua_Hook lua_gethook (lua_State *L);\
8461 LUA_API int lua_gethookmask (lua_State *L);\
8462 LUA_API int lua_gethookcount (lua_State *L);\
8463 \
8464 struct lua_Debug {\
8465 int event;\
8466 const char *name; /* (n) * /\
8467 const char *namewhat; /* (n) `global', `local', `field', `method' * /\
8468 const char *what; /* (S) `Lua', `C', `main', `tail' * /\
8469 const char *source; /* (S) * /\
8470 int currentline; /* (l) * /\
8471 int nups; /* (u) number of upvalues * /\
8472 int linedefined; /* (S) * /\
8473 int lastlinedefined; /* (S) * /\
8474 char short_src[LUA_IDSIZE]; /* (S) * /\
8475 /* private part * /\
8476 int i_ci; /* active function * /\
8477 };\
8478 */\
8479 \
8480 ////////////////////////////////////////////////////////////////////////////////\
8481 // lualib.h.js: Lua 5.1 C API, lualib.h definitions (fragment file)\
8482 // This file is a part of lua5.1.js project:\
8483 // Copyright (c) LogicEditor <info@logiceditor.com>\
8484 // Copyright (c) lua5.1.js authors\
8485 // See file `COPYRIGHT` for the license\
8486 // Based on original Lua 5.1.5 header files:\
8487 // Copyright (c) 1994-2012 Lua.org, PUC-Rio\
8488 ////////////////////////////////////////////////////////////////////////////////\
8489 // Note: Keeping this file as close to Lua sources as possible.\
8490 // This includes avoiding breaking lines at 80 char limit\
8491 // to keep original formatting despite JS code being somewhat longer.\
8492 ////////////////////////////////////////////////////////////////////////////////\
8493 \
8494 /* Key to file-handle type */\
8495 C.LUA_FILEHANDLE = \"FILE*\";\
8496 \
8497 C.LUA_COLIBNAME = \"coroutine\";\
8498 C.luaopen_base = F(\"luaopen_base\", int_t, [lua_State]);\
8499 \
8500 C.LUA_TABLIBNAME = \"table\";\
8501 C.luaopen_table = F(\"luaopen_table\", int_t, [lua_State]);\
8502 \
8503 C.LUA_IOLIBNAME = \"io\";\
8504 C.luaopen_io = F(\"luaopen_io\", int_t, [lua_State]);\
8505 \
8506 C.LUA_OSLIBNAME = \"os\";\
8507 C.luaopen_os = F(\"luaopen_os\", int_t, [lua_State]);\
8508 \
8509 C.LUA_STRLIBNAME = \"string\";\
8510 C.luaopen_string = F(\"luaopen_string\", int_t, [lua_State]);\
8511 \
8512 C.LUA_MATHLIBNAME = \"math\";\
8513 C.luaopen_math = F(\"luaopen_math\", int_t, [lua_State]);\
8514 \
8515 C.LUA_DBLIBNAME = \"debug\";\
8516 C.luaopen_debug = F(\"luaopen_debug\", int_t, [lua_State]);\
8517 \
8518 C.LUA_LOADLIBNAME = \"package\";\
8519 C.luaopen_package = F(\"luaopen_package\", int_t, [lua_State]);\
8520 \
8521 /* open all previous libraries */\
8522 C.luaL_openlibs = F(\"luaL_openlibs\", void_t, [lua_State]);\
8523 \
8524 C.lua_assert = function() { }; // Do nothing.\
8525 \
8526 ////////////////////////////////////////////////////////////////////////////////\
8527 // lauxlib.h.js: Lua 5.1 C API, lauxlib.h definitions (fragment file)\
8528 // This file is a part of lua5.1.js project:\
8529 // Copyright (c) LogicEditor <info@logiceditor.com>\
8530 // Copyright (c) lua5.1.js authors\
8531 // See file `COPYRIGHT` for the license\
8532 // Based on original Lua 5.1.5 header files:\
8533 // Copyright (c) 1994-2012 Lua.org, PUC-Rio\
8534 ////////////////////////////////////////////////////////////////////////////////\
8535 // Note: Keeping this file as close to Lua sources as possible.\
8536 // This includes avoiding breaking lines at 80 char limit\
8537 // to keep original formatting despite JS code being somewhat longer.\
8538 ////////////////////////////////////////////////////////////////////////////////\
8539 \
8540 C.luaL_getn = function(L,i) { return C.lua_objlen(L, i); };\
8541 C.luaL_setn = function(L,i,j) { }; /* no op! */\
8542 \
8543 // C.luaI_openlib defined below\
8544 \
8545 /* extra error code for `luaL_load' */\
8546 C.LUA_ERRFILE = (C.LUA_ERRERR+1);\
8547 \
8548 /*\
8549 // TODO: Support these.\
8550 typedef struct luaL_Reg {\
8551 const char *name;\
8552 lua_CFunction func;\
8553 } luaL_Reg;\
8554 \
8555 LUALIB_API void (luaI_openlib) (lua_State *L, const char *libname,\
8556 const luaL_Reg *l, int nup);\
8557 LUALIB_API void (luaL_register) (lua_State *L, const char *libname,\
8558 const luaL_Reg *l);\
8559 */\
8560 \
8561 C.luaL_getmetafield = F(\"luaL_getmetafield\", int_t, [lua_State, int_t, const_char_ptr_t]);\
8562 C.luaL_callmeta = F(\"luaL_callmeta\", int_t, [lua_State, int_t, const_char_ptr_t]);\
8563 C.luaL_typerror = F(\"luaL_typerror\", int_t, [lua_State, int_t, const_char_ptr_t]);\
8564 C.luaL_argerror = F(\"luaL_argerror\", int_t, [lua_State, int_t, const_char_ptr_t]);\
8565 C.luaL_checklstring = F(\"luaL_checklstring\", const_char_ptr_t, [lua_State, int_t,\
8566 size_t_ptr_t]);\
8567 C.luaL_optlstring = F(\"luaL_optlstring\", const_char_ptr_t, [lua_State, int_t,\
8568 const_char_ptr_t, size_t_ptr_t]);\
8569 C.luaL_checknumber = F(\"luaL_checknumber\", lua_Number, [lua_State, int_t]);\
8570 C.luaL_optnumber = F(\"luaL_optnumber\", lua_Number, [lua_State, int_t, lua_Number]);\
8571 \
8572 C.luaL_checkinteger = F(\"luaL_checkinteger\", lua_Integer, [lua_State, int_t]);\
8573 C.luaL_optinteger = F(\"luaL_optinteger\", lua_Integer, [lua_State, int_t,\
8574 lua_Integer]);\
8575 \
8576 C.luaL_checkstack = F(\"luaL_checkstack\", void_t, [lua_State, int_t, const_char_ptr_t]);\
8577 C.luaL_checktype = F(\"luaL_checktype\", void_t, [lua_State, int_t, int_t]);\
8578 C.luaL_checkany = F(\"luaL_checkany\", void_t, [lua_State, int_t]);\
8579 \
8580 C.luaL_newmetatable = F(\"luaL_newmetatable\", int_t, [lua_State, const_char_ptr_t]);\
8581 C.luaL_checkudata = F(\"luaL_checkudata\", void_ptr_t, [lua_State, int_t, const_char_ptr_t]);\
8582 \
8583 C.luaL_where = F(\"luaL_where\", void_t, [lua_State, int_t]);\
8584 /*\
8585 // TODO: Support these\
8586 LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...);\
8587 \
8588 LUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def,\
8589 const char *const lst[]);\
8590 */\
8591 \
8592 C.luaL_ref = F(\"luaL_ref\", int_t, [lua_State, int_t]);\
8593 C.luaL_unref = F(\"luaL_unref\", void_t, [lua_State, int_t, int_t]);\
8594 \
8595 C.luaL_loadfile = F(\"luaL_loadfile\", int_t, [lua_State, const_char_ptr_t]);\
8596 C.luaL_loadbuffer = F(\"luaL_loadbuffer\", int_t, [lua_State, const_char_ptr_t, size_t,\
8597 const_char_ptr_t]);\
8598 C.luaL_loadstring = F(\"luaL_loadstring\", int_t, [lua_State, const_char_ptr_t]);\
8599 \
8600 C.luaL_newstate = F(\"luaL_newstate\", lua_State, []);\
8601 \
8602 \
8603 C.luaL_gsub = F(\"luaL_gsub\", const_char_ptr_t, [lua_State, const_char_ptr_t, const_char_ptr_t,\
8604 const_char_ptr_t]);\
8605 \
8606 C.luaL_findtable = F(\"luaL_findtable\", const_char_ptr_t, [lua_State, int_t,\
8607 const_char_ptr_t, int_t]);\
8608 \
8609 /*\
8610 ** ===============================================================\
8611 ** some useful macros\
8612 ** ===============================================================\
8613 */\
8614 \
8615 C.luaL_argcheck = function(L, cond,numarg,extramsg) {\
8616 if (!cond) { C.luaL_argerror(L, (numarg), (extramsg)); } };\
8617 C.luaL_checkstring = function(L,n) { return C.luaL_checklstring(L, (n), NULL); };\
8618 C.luaL_optstring = function(L,n,d) { return C.luaL_optlstring(L, (n), (d), NULL); };\
8619 C.luaL_checkint = C.luaL_checkinteger;\
8620 C.luaL_optint = C.luaL_optinteger;\
8621 C.luaL_checklong = C.luaL_checkinteger;\
8622 C.luaL_optlong = C.luaL_optinteger;\
8623 \
8624 C.luaL_typename = function(L,i) { return C.lua_typename(L, C.lua_type(L,(i))); };\
8625 \
8626 C.luaL_dofile = function(L, fn) {\
8627 return (C.luaL_loadfile(L, fn) || C.lua_pcall(L, 0, C.LUA_MULTRET, 0)); };\
8628 \
8629 C.luaL_dostring = function(L, s) {\
8630 return (C.luaL_loadstring(L, s) || C.lua_pcall(L, 0, C.LUA_MULTRET, 0)); };\
8631 \
8632 C.luaL_getmetatable = function(L,n) { return (C.lua_getfield(L, C.LUA_REGISTRYINDEX, (n))); };\
8633 \
8634 C.luaL_opt = function(L,f,n,d) { return (C.lua_isnoneornil(L,(n)) ? (d) : f(L,(n))); };\
8635 \
8636 /*\
8637 ** {======================================================\
8638 ** Generic Buffer manipulation\
8639 ** =======================================================\
8640 */\
8641 \
8642 /*\
8643 // TODO: Support these\
8644 typedef struct luaL_Buffer {\
8645 char *p; /* current position in buffer * /\
8646 int lvl; /* number of strings in the stack (level) * /\
8647 lua_State *L;\
8648 char buffer[LUAL_BUFFERSIZE];\
8649 } luaL_Buffer;\
8650 \
8651 #define luaL_addchar(B,c) \\\
8652 ((void)((B)->p < ((B)->buffer+LUAL_BUFFERSIZE) || luaL_prepbuffer(B)), \\\
8653 (*(B)->p++ = (char)(c)))\
8654 \
8655 /* compatibility only * /\
8656 #define luaL_putchar(B,c) luaL_addchar(B,c)\
8657 \
8658 #define luaL_addsize(B,n) ((B)->p += (n))\
8659 \
8660 LUALIB_API void (luaL_buffinit) (lua_State *L, luaL_Buffer *B);\
8661 LUALIB_API char *(luaL_prepbuffer) (luaL_Buffer *B);\
8662 LUALIB_API void (luaL_addlstring) (luaL_Buffer *B, const char *s, size_t l);\
8663 LUALIB_API void (luaL_addstring) (luaL_Buffer *B, const char *s);\
8664 LUALIB_API void (luaL_addvalue) (luaL_Buffer *B);\
8665 LUALIB_API void (luaL_pushresult) (luaL_Buffer *B);\
8666 */\
8667 \
8668 /* }====================================================== */\
8669 \
8670 /* compatibility with ref system */\
8671 \
8672 /* pre-defined references */\
8673 C.LUA_NOREF = (-2);\
8674 C.LUA_REFNIL = (-1);\
8675 \
8676 C.lua_ref = function(L,lock)\
8677 {\
8678 if (lock)\
8679 {\
8680 return C.luaL_ref(L, C.LUA_REGISTRYINDEX);\
8681 }\
8682 \
8683 C.lua_pushstring(L, \"unlocked references are obsolete\");\
8684 C.lua_error(L);\
8685 return 0;\
8686 }\
8687 \
8688 C.lua_unref = function(L,ref) { return C.luaL_unref(L, C.LUA_REGISTRYINDEX, (ref)); };\
8689 \
8690 C.lua_getref = function(L,ref) { return C.lua_rawgeti(L, C.LUA_REGISTRYINDEX, (ref)); };\
8691 \
8692 C.luaL_reg = C.luaL_Reg;\
8693 \
8694 ////////////////////////////////////////////////////////////////////////////////\
8695 \
8696 Lua5_1.C = C;\
8697 Lua5_1.Runtime = Runtime;\
8698 \
8699 Lua5_1.provide_file = function(parent, name, data, can_read, can_write)\
8700 {\
8701 if (typeof(parent) === \"string\" && parent !== \"/\")\
8702 {\
8703 if (parent.charAt(0) !== \"/\")\
8704 {\
8705 throw new Error(\"can't create relative path: `\" + parent + \"'\");\
8706 }\
8707 parent = parent.substr(1);\
8708 parent = FS.createPath(\"/\", parent, true, true);\
8709 }\
8710 return FS.createDataFile(parent, name, data, can_read, can_write);\
8711 }\
8712 \
8713 })(Lua5_1);\
8714 "e["LuaState.js"]="LuaState = (function () {\
8715 var C = Lua5_1.C;\
8716 \
8717 function push_jsfunction(L, func, return_type, args) {\
8718 var arg_getters = [];\
8719 for(var i = 0; i < args.length; i++) {\
8720 arg_getters.push(\"C.luaL_check\"+args[i]+\"(L, \"+(i+1)+\")\");\
8721 }\
8722 \
8723 var wrapper = eval(\"(function (func, return_type) { return (function (L) { \\\
8724 var ret = func(\"+arg_getters.join(\", \")+\"); \\\
8725 C.lua_push\"+return_type+\"(L, ret); \\\
8726 return 1; \\\
8727 }); })\")(func, return_type);\
8728 C.lua_pushcfunction(L, Lua5_1.Runtime.addFunction(wrapper));\
8729 return 1;\
8730 }\
8731 \
8732 function push_jsobject(L, obj) {\
8733 C.lua_newtable(L);\
8734 for (var key in obj) {\
8735 var val = obj[key];\
8736 if (obj.hasOwnProperty(key)) {\
8737 switch(typeof val) {\
8738 case \"string\":\
8739 C.lua_pushstring(L, val);\
8740 break;\
8741 case \"number\":\
8742 C.lua_pushnumber(L, val);\
8743 break;\
8744 case \"object\":\
8745 push_jsobject(L, val);\
8746 break;\
8747 default:\
8748 C.luaL_pushfstring(L, \"Unable to convert field '%s' from type '%s'\", key, typeof val);\
8749 return C.lua_error(L);\
8750 }\
8751 C.lua_setfield(L, key, -2);\
8752 }\
8753 }\
8754 \
8755 // TODO: metatable for __index if obj.constructor !== Object?\
8756 \
8757 return 1;\
8758 }\
8759 \
8760 function JSFunction(L) {\
8761 var funcname = C.luaL_checkstring(L, 1);\
8762 var ret = C.luaL_checkstring(L, 2);\
8763 var n_args = C.lua_gettop(L)-2;\
8764 var args = [];\
8765 for(var i = 0; i < n_args; i++) {\
8766 args.push(C.luaL_checkstring(L, i+3));\
8767 }\
8768 var func = eval(funcname);\
8769 if(funcname.indexOf(\".\")!=-1) {\
8770 func = func.bind(eval(funcname.substr(0, funcname.lastIndexOf(\".\"))));\
8771 }\
8772 return push_jsfunction(L, func, ret, args);\
8773 }\
8774 var JSFunction_ptr = Lua5_1.Runtime.addFunction(JSFunction);\
8775 \
8776 return (function() {\
8777 var L = C.lua_open();\
8778 C.luaL_openlibs(L);\
8779 \
8780 C.lua_pushcfunction(L, JSFunction_ptr);\
8781 C.lua_setglobal(L, \"JSFunction\");\
8782 \
8783 return {\
8784 run: function (s) {\
8785 if(L == 0) throw new Error(\"Lua state is invalid\"); // FIXME\
8786 if (C.luaL_dostring(L, s) != 0)\
8787 {\
8788 var err = C.lua_tostring(L, -1);\
8789 C.lua_close(L);\
8790 L = 0;\
8791 throw new Error(\"Lua error: \" + err);\
8792 } \
8793 }\
8794 };\
8795 });\
8796 })();\
8797 "function require_resource(t)return e[t]or error("resource '"..tostring(t).."' not found");end end
8798 pcall(require,"luarocks.require");
8799 local o={v="verbose",vv="very_verbose",o="output",q="quiet",qq="very_quiet",g="debug"}
8800 local e={use_http=false};
8801 for t,a in ipairs(arg)do
8802 if a:match("^%-")then
8803 local t=a:match("^%-%-?([^%s=]+)()")
8804 t=(o[t]or t):gsub("%-+","_");
8805 if t:match("^no_")then
8806 t=t:sub(4,-1);
8807 e[t]=false;
8808 else
8809 e[t]=a:match("=(.*)$")or true;
8810 end
8811 else
8812 base_path=a;
8813 end
8814 end
8815 if e.very_verbose then e.verbose=true;end
8816 if e.very_quiet then e.quiet=true;end
8817 local t=function()end
8818 local t,o,h,s=t,t,t,t;
8819 if not e.very_quiet then t=print;end
8820 if not e.quiet then o=print;end
8821 if e.verbose or e.very_verbose then h=print;end
8822 if e.very_verbose then s=print;end
8823 print=h;
8824 local i,d,n={},{},{};
8825 function Module(e)
8826 if i[e]then
8827 h("Ignoring duplicate module definition for "..e);
8828 return function()end
8829 end
8830 local t=#i+1;
8831 i[t]={name=e,url=___fetch_url};
8832 i[e]=i[t];
8833 return function(e)
8834 i[t].path=e;
8835 end
8836 end
8837 function Resource(e,a)
8838 local t=#n+1;
8839 n[t]={name=e,path=a or e};
8840 return function(e)
8841 n[t].path=e;
8842 end
8843 end
8844 function AutoFetchURL(e)
8845 ___fetch_url=e;
8846 end
8847 function Main(e)
8848 table.insert(d,e);
8849 end
8850 function Output(t)
8851 if e.output==nil then
8852 out_fn=t;
8853 end
8854 end
8855 function Option(t)
8856 t=t:gsub("%-","_");
8857 if e[t]==nil then
8858 e[t]=true;
8859 return function(a)
8860 e[t]=a;
8861 end
8862 else
8863 return function()end;
8864 end
8865 end
8866 function GetOption(t)
8867 return e[t:gsub('%-','_')];
8868 end
8869 function Message(t)
8870 if not e.quiet then
8871 o(t);
8872 end
8873 end
8874 function Error(a)
8875 if not e.very_quiet then
8876 t(a);
8877 end
8878 end
8879 function Exit()
8880 os.exit(1);
8881 end
8882 base_path=(base_path or"."):gsub("/$","").."/"
8883 squishy_file=base_path.."squishy";
8884 out_fn=e.output;
8885 local a,r=pcall(dofile,squishy_file);
8886 if not a then
8887 t("Couldn't read squishy file: "..r);
8888 os.exit(1);
8889 end
8890 if not out_fn then
8891 t("No output file specified by user or squishy file");
8892 os.exit(1);
8893 elseif#d==0 and#i==0 and#n==0 then
8894 t("No files, modules or resources. Not going to generate an empty file.");
8895 os.exit(1);
8896 end
8897 local r={};
8898 function r.filesystem(e)
8899 local e,t=io.open(e);
8900 if not e then return false,t;end
8901 local t=e:read("*a");
8902 e:close();
8903 return t;
8904 end
8905 if e.use_http then
8906 function r.http(e)
8907 local t=require"socket.http";
8908 local t,e=t.request(e);
8909 if e==200 then
8910 return t;
8911 end
8912 return false,"HTTP status code: "..tostring(e);
8913 end
8914 else
8915 function r.http(e)
8916 return false,"Module not found. Re-squish with --use-http option to fetch it from "..e;
8917 end
8918 end
8919 h("Resolving modules...");
8920 do
8921 local e=package.config:sub(1,1);
8922 local n=package.config:sub(5,5);
8923 local o=package.path:gsub("[^;]+",function(t)
8924 if not t:match("^%"..e)then
8925 return base_path..t;
8926 end
8927 end):gsub("/%./","/");
8928 local a=package.cpath:gsub("[^;]+",function(t)
8929 if not t:match("^%"..e)then
8930 return base_path..t;
8931 end
8932 end):gsub("/%./","/");
8933 function resolve_module(t,a)
8934 t=t:gsub("%.",e);
8935 for e in a:gmatch("[^;]+")do
8936 e=e:gsub("%"..n,t);
8937 s("Looking for "..e)
8938 local t=io.open(e);
8939 if t then
8940 s("Found!");
8941 t:close();
8942 return e;
8943 end
8944 end
8945 return nil;
8946 end
8947 for a,e in ipairs(i)do
8948 if not e.path then
8949 e.path=resolve_module(e.name,o);
8950 if not e.path then
8951 t("Couldn't resolve module: "..e.name);
8952 else
8953 e.path=e.path:gsub("^"..base_path:gsub("%p","%%%1"),"");
8954 end
8955 end
8956 end
8957 end
8958 for a,e in ipairs(i)do
8959 if not e.path then
8960 t("Exiting due to missing modules without a path");
8961 os.exit(1);
8962 end
8963 end
8964 if e.list_files or e.list_missing_files then
8965 local function t(t)
8966 if e.list_missing_files then
8967 local e=io.open(t);
8968 if e then
8969 e:close();
8970 return;
8971 end
8972 end
8973 io.write(t,"\n");
8974 end
8975 for a,e in pairs(d)do
8976 t(e);
8977 end
8978 for a,e in ipairs(i)do
8979 t(e.path);
8980 end
8981 for a,e in ipairs(n)do
8982 t(e.path);
8983 end
8984 return;
8985 end
8986 o("Writing "..out_fn.."...");
8987 local a,l=io.open(out_fn,"w+");
8988 if not a then
8989 t("Couldn't open output file: "..tostring(l));
8990 os.exit(1);
8991 end
8992 if e.executable then
8993 if e.executable==true then
8994 a:write("#!/usr/bin/env lua\n");
8995 else
8996 a:write(e.executable,"\n");
8997 end
8998 end
8999 h("Packing modules...");
9000 for o,i in ipairs(i)do
9001 local h,d=i.name,i.path;
9002 if i.path:sub(1,1)~="/"then
9003 d=base_path..i.path;
9004 end
9005 s("Packing "..h.." ("..d..")...");
9006 local o,n=r.filesystem(d);
9007 if(not o)and i.url then
9008 local e=i.url:gsub("%?",i.path);
9009 s("Fetching: "..e)
9010 if e:match("^https?://")then
9011 o,n=r.http(e);
9012 elseif e:match("^file://")or e:match("^[/%.]")then
9013 local e,t=io.open((e:gsub("^file://","")));
9014 if e then
9015 o,n=e:read("*a");
9016 e:close();
9017 else
9018 o,n=nil,t;
9019 end
9020 end
9021 end
9022 if o then
9023 o=o:gsub("^#[^\r\n]*\r?\n","");
9024 if not e.debug then
9025 a:write("package.preload['",h,"'] = (function (...)\n");
9026 a:write(o);
9027 a:write(" end)\n");
9028 else
9029 a:write("package.preload['",h,"'] = assert(loadstring(\n");
9030 a:write(("%q\n"):format(o));
9031 a:write(", ",("%q"):format("@"..d),"))\n");
9032 end
9033 else
9034 t("Couldn't pack module '"..h.."': "..(n or"unknown error... path to module file correct?"));
9035 os.exit(1);
9036 end
9037 end
9038 if#n>0 then
9039 h("Packing resources...")
9040 a:write("do local resources = {};\n");
9041 for o,e in ipairs(n)do
9042 local o,e=e.name,e.path;
9043 local e,i=io.open(base_path..e,"rb");
9044 if not e then
9045 t("Couldn't load resource: "..tostring(i));
9046 os.exit(1);
9047 end
9048 local t=e:read("*a");
9049 local e=0;
9050 t:gsub("(=+)",function(t)e=math.max(e,#t);end);
9051 a:write(("resources[%q] = %q"):format(o,t));
9052 end
9053 if e.virtual_io then
9054 local e=require_resource("vio");
9055 if not e then
9056 t("Virtual IO requested but is not enabled in this build of squish");
9057 else
9058 a:write(e,"\n")
9059 a:write[[local io_open, io_lines = io.open, io.lines; function io.open(fn, mode)
9060 if not resources[fn] then
9061 return io_open(fn, mode);
9062 else
9063 return vio.open(resources[fn]);
9064 end end
9065 function io.lines(fn)
9066 if not resources[fn] then
9067 return io_lines(fn);
9068 else
9069 return vio.open(resources[fn]):lines()
9070 end end
9071 local _dofile = dofile;
9072 function dofile(fn)
9073 if not resources[fn] then
9074 return _dofile(fn);
9075 else
9076 return assert(loadstring(resources[fn]))();
9077 end end
9078 local _loadfile = loadfile;
9079 function loadfile(fn)
9080 if not resources[fn] then
9081 return _loadfile(fn);
9082 else
9083 return loadstring(resources[fn], "@"..fn);
9084 end end ]]
9085 end
9086 end
9087 a:write[[function require_resource(name) return resources[name] or error("resource '"..tostring(name).."' not found"); end end ]]
9088 end
9089 s("Finalising...")
9090 for e,o in pairs(d)do
9091 local e,i=io.open(base_path..o);
9092 if not e then
9093 t("Failed to open "..o..": "..i);
9094 os.exit(1);
9095 else
9096 a:write((e:read("*a"):gsub("^#.-\n","")));
9097 e:close();
9098 end
9099 end
9100 a:close();
9101 o("OK!");
9102 local s=require"optlex"
9103 local h=require"optparser"
9104 local a=require"llex"
9105 local r=require"lparser"
9106 local i={
9107 none={};
9108 debug={"whitespace","locals","entropy","comments","numbers"};
9109 default={"comments","whitespace","emptylines","numbers","locals"};
9110 basic={"comments","whitespace","emptylines"};
9111 full={"comments","whitespace","emptylines","eols","strings","numbers","locals","entropy"};
9112 }
9113 if e.minify_level and not i[e.minify_level]then
9114 t("Unknown minify level: "..e.minify_level);
9115 t("Available minify levels: none, basic, default, full, debug");
9116 end
9117 for a,t in ipairs(i[e.minify_level or"default"]or{})do
9118 if e["minify_"..t]==nil then
9119 e["minify_"..t]=true;
9120 end
9121 end
9122 local n={
9123 ["opt-locals"]=e.minify_locals;
9124 ["opt-comments"]=e.minify_comments;
9125 ["opt-entropy"]=e.minify_entropy;
9126 ["opt-whitespace"]=e.minify_whitespace;
9127 ["opt-emptylines"]=e.minify_emptylines;
9128 ["opt-eols"]=e.minify_eols;
9129 ["opt-strings"]=e.minify_strings;
9130 ["opt-numbers"]=e.minify_numbers;
9131 }
9132 local function i(e)
9133 t("minify: "..e);os.exit(1);
9134 end
9135 local function l(e)
9136 local t=io.open(e,"rb")
9137 if not t then i("cannot open \""..e.."\" for reading")end
9138 local a=t:read("*a")
9139 if not a then i("cannot read from \""..e.."\"")end
9140 t:close()
9141 return a
9142 end
9143 local function d(e,a)
9144 local t=io.open(e,"wb")
9145 if not t then i("cannot open \""..e.."\" for writing")end
9146 local a=t:write(a)
9147 if not a then i("cannot write to \""..e.."\"")end
9148 t:close()
9149 end
9150 function minify_string(e)
9151 a.init(e)
9152 a.llex()
9153 local t,e,a
9154 =a.tok,a.seminfo,a.tokln
9155 if n["opt-locals"]then
9156 h.print=print
9157 r.init(t,e,a)
9158 local o,a=r.parser()
9159 h.optimize(n,t,e,o,a)
9160 end
9161 s.print=print
9162 t,e,a
9163 =s.optimize(n,t,e,a)
9164 local e=table.concat(e)
9165 if string.find(e,"\r\n",1,1)or
9166 string.find(e,"\n\r",1,1)then
9167 s.warn.mixedeol=true
9168 end
9169 return e;
9170 end
9171 function minify_file(e,t)
9172 local e=l(e);
9173 e=minify_string(e);
9174 d(t,e);
9175 end
9176 if e.minify~=false then
9177 o("Minifying "..out_fn.."...");
9178 minify_file(out_fn,out_fn);
9179 o("OK!");
9180 end
9181 local s=require"llex"
9182 local i=128;
9183 local n={"and","break","do","else","elseif",
9184 "end","false","for","function","if",
9185 "in","local","nil","not","or","repeat",
9186 "return","then","true","until","while"}
9187 function uglify_file(l,o)
9188 local h,a=io.open(l);
9189 if not h then
9190 t("Can't open input file for reading: "..tostring(a));
9191 return;
9192 end
9193 local a,r=io.open(o..".uglified","wb+");
9194 if not a then
9195 t("Can't open output file for writing: "..tostring(r));
9196 return;
9197 end
9198 local d=h:read("*a");
9199 h:close();
9200 local h,t=d:match("^(#.-\n)(.+)$");
9201 local t=t or d;
9202 if h then
9203 a:write(h)
9204 end
9205 while i+#n<=255 and t:find("["..string.char(i).."-"..string.char(i+#n-1).."]")do
9206 i=i+1;
9207 end
9208 if i+#n>255 then
9209 a:write(t);
9210 a:close();
9211 os.rename(o..".uglified",o);
9212 return;
9213 end
9214 local r={}
9215 for e,t in ipairs(n)do
9216 r[t]=string.char(i+e);
9217 end
9218 local h=0;
9219 d:gsub("(=+)",function(e)h=math.max(h,#e);end);
9220 s.init(t,"@"..l);
9221 s.llex()
9222 local t=s.seminfo;
9223 if e.uglify_level=="full"and i+#n<255 then
9224 local e={};
9225 for i,o in ipairs(s.tok)do
9226 if o=="TK_NAME"or o=="TK_STRING"then
9227 local a=string.format("%q,%q",o,t[i]);
9228 if not e[a]then
9229 e[a]={type=o,value=t[i],count=0};
9230 e[#e+1]=e[a];
9231 end
9232 e[a].count=e[a].count+1;
9233 end
9234 end
9235 for t=1,#e do
9236 local e=e[t];
9237 e.score=(e.count)*(#e.value-1)-#string.format("%q",e.value)-1;
9238 end
9239 table.sort(e,function(t,e)return t.score>e.score;end);
9240 local t=255-(i+#n);
9241 for t=t+1,#e do
9242 e[t]=nil;
9243 end
9244 local t=#n;
9245 for a,e in ipairs(e)do
9246 if e.score>0 then
9247 table.insert(n,e.value);
9248 r[e.value]=string.char(i+t+a);
9249 end
9250 end
9251 end
9252 a:write("local base_char,keywords=",tostring(i),",{");
9253 for t,e in ipairs(n)do
9254 a:write(string.format("%q",e),',');
9255 end
9256 a:write[[}; function prettify(code) return code:gsub("["..string.char(base_char).."-"..string.char(base_char+#keywords).."]",
9257 function (c) return keywords[c:byte()-base_char]; end) end ]]
9258 a:write[[return assert(loadstring(prettify]]
9259 a:write("[",string.rep("=",h+1),"[");
9260 for o,e in ipairs(s.tok)do
9261 if e=="TK_KEYWORD"or e=="TK_NAME"or e=="TK_STRING"then
9262 local e=r[t[o]];
9263 if e then
9264 a:write(e);
9265 else
9266 a:write(t[o]);
9267 end
9268 else
9269 a:write(t[o]);
9270 end
9271 end
9272 a:write("]",string.rep("=",h+1),"]");
9273 a:write(", '@",o,"'))()");
9274 a:close();
9275 os.rename(o..".uglified",o);
9276 end
9277 if e.uglify then
9278 o("Uglifying "..out_fn.."...");
9279 uglify_file(out_fn,out_fn);
9280 o("OK!");
9281 end
9282 function gzip_file(a,e)
9283 local o,a=io.open(a);
9284 if not o then
9285 t("Can't open input file for reading: "..tostring(a));
9286 return;
9287 end
9288 local a,i=io.open(e..".gzipped","wb+");
9289 if not a then
9290 t("Can't open output file for writing: "..tostring(i));
9291 return;
9292 end
9293 local i=o:read("*a");
9294 o:close();
9295 local n,o=i:match("^(#.-\n)(.+)$");
9296 local o=o or i;
9297 if n then
9298 a:write(n)
9299 end
9300 local i,n=io.open(e..".pregzip","wb+");
9301 if not i then
9302 t("Can't open temp file for writing: "..tostring(n));
9303 return;
9304 end
9305 i:write(o);
9306 i:close();
9307 local t=io.popen("gzip -c '"..e..".pregzip'");
9308 o=t:read("*a");
9309 t:close();
9310 os.remove(e..".pregzip");
9311 local t=0;
9312 o:gsub("(=+)",function(e)t=math.max(t,#e);end);
9313 a:write("local ungz = (function ()",require_resource"gunzip.lua"," end)()\n");
9314 a:write[[return assert(loadstring((function (i)local o={} ungz{input=i,output=function(b)table.insert(o,string.char(b))end}return table.concat(o)end) ]];
9315 a:write((string.format("%q",o):gsub("\026","\\026")));
9316 a:write(", '@",e,"'))()");
9317 a:close();
9318 os.rename(e..".gzipped",e);
9319 end
9320 if e.gzip then
9321 o("Gzipping "..out_fn.."...");
9322 gzip_file(out_fn,out_fn);
9323 o("OK!");
9324 end
9325 if e.js then
9326 o("Generating Javascript for "..out_fn.."...");
9327 local e={
9328 ["\""]="\\\"",["\\"]="\\\\",["\b"]="\\b",
9329 ["\f"]="\\f",["\n"]="\\\n",["\r"]="\\r",["\t"]="\\t"};
9330 for t=0,31 do
9331 local a=string.char(t);
9332 if not e[a]then e[a]=("\\u%.4X"):format(t);end
9333 end
9334 local t=io.open(out_fn);
9335 local a=t:read("*a");
9336 t:close();
9337 local t=io.open(out_fn,"w+");
9338 t:write("(function(){\n",
9339 require_resource("lua5.1.min.js"),"\n",
9340 require_resource("LuaState.js"),"\n",
9341 "LuaState().run(\""..a:gsub(".",e).."\")\n",
9342 "})()"
9343 );
9344 t:close();
9345 o("OK!");
9346 end