>2]=k;z=k}else z=r;if(l>2]=l;w=l}else w=u;if(p>2]=p;t=p}else t=s;p=z+ +((~~((v-z)*(65533.0/(v-r))+1.0)&65535|1)&65535)/(65533.0/(v-r))+1.0;l=w+ +((~~((x-w)*(65533.0/(x-u))+1.0)&65535|1)&65535)/(65533.0/(x-u))+1.0;k=t+ +((~~((y-t)*(65533.0/(y-s))+1.0)&65535|1)&65535)/(65533.0/(y-s))+1.0;if(v>2]=p;else p=v;if(x>2]=l;else l=x;if(y>2]=k;else k=y;g[d+36>>2]=65533.0/(p-z);g[d+40>>2]=65533.0/(l-w);g[d+44>>2]=65533.0/(k-t);g[d+48>>2]=0.0;c[A+144>>2]=8020;c[A+144+4>>2]=d+104;c[A+144+8>>2]=d;mc[c[(c[e>>2]|0)+8>>2]&127](e,A+144|0,d+4|0,d+20|0);f=c[d+108>>2]|0;c[A+128>>2]=0;c[A+128+4>>2]=0;c[A+128+8>>2]=0;c[A+128+12>>2]=0;m=c[d+128>>2]|0;if((m|0)<(f<<1|0)){if((c[d+132>>2]|0)<(f<<1|0)){if(!f){h=0;j=m}else{c[6435]=(c[6435]|0)+1;h=yc(f<<5|19)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}j=c[d+128>>2]|0}if((j|0)>0){e=0;do{q=h+(e<<4)|0;o=(c[d+136>>2]|0)+(e<<4)|0;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];e=e+1|0}while((e|0)!=(j|0))}j=c[d+136>>2]|0;if(j|0){if(a[d+140>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[j+-4>>2]|0)}c[d+136>>2]=0}a[d+140>>0]=1;c[d+136>>2]=h;c[d+132>>2]=f<<1;j=d+136|0}else j=d+136|0;h=m;do{q=(c[j>>2]|0)+(h<<4)|0;c[q>>2]=c[A+128>>2];c[q+4>>2]=c[A+128+4>>2];c[q+8>>2]=c[A+128+8>>2];c[q+12>>2]=c[A+128+12>>2];h=h+1|0}while((h|0)!=(f<<1|0))}c[d+128>>2]=f<<1}else{c[A+144>>2]=8040;c[A+144+4>>2]=d+64;c[A+112>>2]=-581039253;c[A+112+4>>2]=-581039253;c[A+112+8>>2]=-581039253;g[A+112+12>>2]=0.0;c[A+96>>2]=1566444395;c[A+96+4>>2]=1566444395;c[A+96+8>>2]=1566444395;g[A+96+12>>2]=0.0;mc[c[(c[e>>2]|0)+8>>2]&127](e,A+144|0,A+112|0,A+96|0);f=c[d+68>>2]|0;m=A+32|0;o=m+64|0;do{c[m>>2]=0;m=m+4|0}while((m|0)<(o|0));q=c[d+88>>2]|0;if((q|0)<(f<<1|0)){if((c[d+92>>2]|0)<(f<<1|0)){if(!f){h=0;j=q}else{c[6435]=(c[6435]|0)+1;h=yc(f<<7|19)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}j=c[d+88>>2]|0}if((j|0)>0){e=0;do{m=h+(e<<6)|0;n=(c[d+96>>2]|0)+(e<<6)|0;o=m+64|0;do{c[m>>2]=c[n>>2];m=m+4|0;n=n+4|0}while((m|0)<(o|0));e=e+1|0}while((e|0)!=(j|0))}j=c[d+96>>2]|0;if(j|0){if(a[d+100>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[j+-4>>2]|0)}c[d+96>>2]=0}a[d+100>>0]=1;c[d+96>>2]=h;c[d+92>>2]=f<<1;j=d+96|0}else j=d+96|0;h=q;do{m=(c[j>>2]|0)+(h<<6)|0;n=A+32|0;o=m+64|0;do{c[m>>2]=c[n>>2];m=m+4|0;n=n+4|0}while((m|0)<(o|0));h=h+1|0}while((h|0)!=(f<<1|0))}c[d+88>>2]=f<<1}c[d+56>>2]=0;Lc(d,0,f);if(a[d+60>>0]|0?(c[d+152>>2]|0)==0:0){if(!(c[d+156>>2]|0)){c[6435]=(c[6435]|0)+1;f=yc(51)|0;if(!f)e=0;else{c[(f+4+15&-16)+-4>>2]=f;e=f+4+15&-16}f=c[d+152>>2]|0;if((f|0)>0){h=0;do{q=e+(h<<5)|0;o=(c[d+160>>2]|0)+(h<<5)|0;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];c[q+24>>2]=c[o+24>>2];c[q+28>>2]=c[o+28>>2];h=h+1|0}while((h|0)!=(f|0))}f=c[d+160>>2]|0;if(f|0){if(a[d+164>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[f+-4>>2]|0)}c[d+160>>2]=0}a[d+164>>0]=1;c[d+160>>2]=e;c[d+156>>2]=1;h=d+160|0;j=(c[d+152>>2]|0)+1|0;f=e}else{h=d+160|0;j=1;f=c[d+160>>2]|0}c[d+152>>2]=j;c[f>>2]=c[A>>2];c[f+4>>2]=c[A+4>>2];c[f+8>>2]=c[A+8>>2];c[f+12>>2]=c[A+12>>2];c[f+16>>2]=c[A+16>>2];c[f+20>>2]=c[A+20>>2];c[f+24>>2]=c[A+24>>2];c[f+28>>2]=c[A+28>>2];q=c[h>>2]|0;o=c[d+136>>2]|0;b[q>>1]=b[o>>1]|0;b[q+2>>1]=b[o+2>>1]|0;b[q+4>>1]=b[o+4>>1]|0;b[q+6>>1]=b[o+6>>1]|0;b[q+8>>1]=b[o+8>>1]|0;b[q+10>>1]=b[o+10>>1]|0;c[q+12>>2]=0;o=c[o+12>>2]|0;c[q+16>>2]=(o|0)>-1?1:0-o|0}c[d+168>>2]=c[d+152>>2];f=c[d+116>>2]|0;if(f|0){if(a[d+120>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[f+-4>>2]|0)}c[d+116>>2]=0}a[d+120>>0]=1;c[d+116>>2]=0;c[d+108>>2]=0;c[d+112>>2]=0;f=c[d+76>>2]|0;if(!f){a[d+80>>0]=1;c[d+76>>2]=0;c[d+68>>2]=0;d=d+72|0;c[d>>2]=0;i=A;return}if(a[d+80>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[f+-4>>2]|0)}c[d+76>>2]=0;a[d+80>>0]=1;c[d+76>>2]=0;c[d+68>>2]=0;d=d+72|0;c[d>>2]=0;i=A;return}function qd(b,d,e,f,h,i,j,l,m,n,o){b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;l=l|0;m=+m;n=+n;o=+o;var p=0,q=0,r=0,s=0.0,t=0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0,N=0,O=0.0,P=0.0,Q=0.0,R=0.0;N=c[b+68>>2]|0;if((N|0)==(c[b+72>>2]|0)?(t=N|0?N<<1:1,(N|0)<(t|0)):0){if(!t){p=0;q=N}else{c[6435]=(c[6435]|0)+1;p=yc((t*152|3)+16|0)|0;if(!p)p=0;else{c[(p+4+15&-16)+-4>>2]=p;p=p+4+15&-16}q=c[b+68>>2]|0}if((q|0)>0){r=0;do{_m(p+(r*152|0)|0,(c[b+76>>2]|0)+(r*152|0)|0,152)|0;r=r+1|0}while((r|0)!=(q|0))}q=c[b+76>>2]|0;if(q|0){if(a[b+80>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[q+-4>>2]|0)}c[b+76>>2]=0}a[b+80>>0]=1;c[b+76>>2]=p;c[b+72>>2]=t;p=c[b+68>>2]|0}else p=N;c[b+68>>2]=p+1;M=c[b+76>>2]|0;c[M+(N*152|0)+140>>2]=h;r=c[b+16>>2]|0;p=c[r+(e*244|0)+240>>2]|0;t=c[r+(f*244|0)+240>>2]|0;c[M+(N*152|0)+144>>2]=e;c[M+(N*152|0)+148>>2]=f;q=c[i+84>>2]|0;c[M+(N*152|0)+104>>2]=q;c[M+(N*152|0)+132>>2]=0;g[M+(N*152|0)+100>>2]=0.0;g[M+(N*152|0)+96>>2]=0.0;L=(c[k>>2]=q,+g[k>>2]);if(p|0){c[M+(N*152|0)+16>>2]=c[d>>2];c[M+(N*152|0)+16+4>>2]=c[d+4>>2];c[M+(N*152|0)+16+8>>2]=c[d+8>>2];c[M+(N*152|0)+16+12>>2]=c[d+12>>2];K=+g[j+4>>2];D=+g[M+(N*152|0)+24>>2];H=+g[j+8>>2];I=+g[M+(N*152|0)+20>>2];E=+g[M+(N*152|0)+16>>2];J=+g[j>>2];g[M+(N*152|0)>>2]=K*D-H*I;g[M+(N*152|0)+4>>2]=H*E-D*J;g[M+(N*152|0)+8>>2]=I*J-K*E;g[M+(N*152|0)+12>>2]=0.0;v=((K*D-H*I)*+g[p+264>>2]+(H*E-D*J)*+g[p+268>>2]+(I*J-K*E)*+g[p+272>>2])*+g[p+544>>2];s=((K*D-H*I)*+g[p+280>>2]+(H*E-D*J)*+g[p+284>>2]+(I*J-K*E)*+g[p+288>>2])*+g[p+548>>2];u=((K*D-H*I)*+g[p+296>>2]+(H*E-D*J)*+g[p+300>>2]+(I*J-K*E)*+g[p+304>>2])*+g[p+552>>2];g[M+(N*152|0)+64>>2]=v;g[M+(N*152|0)+68>>2]=s;g[M+(N*152|0)+72>>2]=u;g[M+(N*152|0)+76>>2]=0.0;z=E;A=I;B=D;C=K*D-H*I;D=H*E-D*J;E=I*J-K*E}else{c[M+(N*152|0)+64>>2]=0;c[M+(N*152|0)+64+4>>2]=0;c[M+(N*152|0)+64+8>>2]=0;c[M+(N*152|0)+64+12>>2]=0;c[M+(N*152|0)>>2]=0;c[M+(N*152|0)+4>>2]=0;c[M+(N*152|0)+8>>2]=0;c[M+(N*152|0)+12>>2]=0;c[M+(N*152|0)+16>>2]=0;c[M+(N*152|0)+20>>2]=0;c[M+(N*152|0)+24>>2]=0;c[M+(N*152|0)+28>>2]=0;s=0.0;u=0.0;v=0.0;z=0.0;A=0.0;B=0.0;C=0.0;D=0.0;E=0.0}if(t|0){K=-+g[d>>2];P=-+g[d+4>>2];J=-+g[d+8>>2];g[M+(N*152|0)+48>>2]=K;g[M+(N*152|0)+52>>2]=P;g[M+(N*152|0)+56>>2]=J;g[M+(N*152|0)+60>>2]=0.0;O=+g[l+4>>2];R=+g[l+8>>2];Q=+g[l>>2];g[M+(N*152|0)+32>>2]=O*J-R*P;g[M+(N*152|0)+36>>2]=R*K-Q*J;g[M+(N*152|0)+40>>2]=Q*P-O*K;g[M+(N*152|0)+44>>2]=0.0;w=((O*J-R*P)*+g[t+264>>2]+(R*K-Q*J)*+g[t+268>>2]+(Q*P-O*K)*+g[t+272>>2])*+g[t+544>>2];x=((O*J-R*P)*+g[t+280>>2]+(R*K-Q*J)*+g[t+284>>2]+(Q*P-O*K)*+g[t+288>>2])*+g[t+548>>2];y=((O*J-R*P)*+g[t+296>>2]+(R*K-Q*J)*+g[t+300>>2]+(Q*P-O*K)*+g[t+304>>2])*+g[t+552>>2];g[M+(N*152|0)+80>>2]=w;g[M+(N*152|0)+84>>2]=x;g[M+(N*152|0)+88>>2]=y;g[M+(N*152|0)+92>>2]=0.0;F=K;G=P;H=J;I=O*J-R*P;J=R*K-Q*J;K=Q*P-O*K}else{c[M+(N*152|0)+80>>2]=0;c[M+(N*152|0)+80+4>>2]=0;c[M+(N*152|0)+80+8>>2]=0;c[M+(N*152|0)+80+12>>2]=0;c[M+(N*152|0)+32>>2]=0;c[M+(N*152|0)+32+4>>2]=0;c[M+(N*152|0)+32+8>>2]=0;c[M+(N*152|0)+32+12>>2]=0;c[M+(N*152|0)+32+16>>2]=0;c[M+(N*152|0)+32+20>>2]=0;c[M+(N*152|0)+32+24>>2]=0;c[M+(N*152|0)+32+28>>2]=0;w=0.0;x=0.0;y=0.0;F=0.0;G=0.0;H=0.0;I=0.0;J=0.0;K=0.0}if(p|0){P=+g[j+8>>2];Q=+g[j+4>>2];R=+g[j>>2];u=+g[p+344>>2]+((s*P-u*Q)*+g[d>>2]+(u*R-P*v)*+g[d+4>>2]+(Q*v-s*R)*+g[d+8>>2])}else u=0.0;if(t|0){Q=-w;s=-x;y=-y;O=+g[l+8>>2];P=+g[l+4>>2];R=+g[l>>2];s=+g[t+344>>2]+((O*s-P*y)*+g[d>>2]+(R*y-O*Q)*+g[d+4>>2]+(P*Q-R*s)*+g[d+8>>2])}else s=0.0;x=m/(u+s);g[M+(N*152|0)+108>>2]=x;if(p|0){u=+g[r+(e*244|0)+192>>2];v=+g[r+(e*244|0)+196>>2];w=+g[r+(e*244|0)+200>>2];s=(+g[r+(e*244|0)+176>>2]+ +g[r+(e*244|0)+208>>2])*z+(+g[r+(e*244|0)+180>>2]+ +g[r+(e*244|0)+212>>2])*A+(+g[r+(e*244|0)+184>>2]+ +g[r+(e*244|0)+216>>2])*B}else{u=0.0;v=0.0;w=0.0;s=z*0.0+A*0.0+B*0.0}s=s+(u*C+v*D+w*E);if(t|0){O=+g[r+(f*244|0)+192>>2];P=+g[r+(f*244|0)+196>>2];R=+g[r+(f*244|0)+200>>2];Q=(+g[r+(f*244|0)+176>>2]+ +g[r+(f*244|0)+208>>2])*F+(+g[r+(f*244|0)+180>>2]+ +g[r+(f*244|0)+212>>2])*G+(+g[r+(f*244|0)+184>>2]+ +g[r+(f*244|0)+216>>2])*H;O=O*I;P=P*J;P=O+P;R=R*K;R=P+R;R=Q+R;R=s+R;R=n-R;R=x*R;f=M+(N*152|0)+112|0;g[f>>2]=R;f=M+(N*152|0)+116|0;g[f>>2]=o;R=-L;f=M+(N*152|0)+120|0;g[f>>2]=R;f=M+(N*152|0)+124|0;c[f>>2]=q;return}else{O=0.0;P=0.0;R=0.0;Q=F*0.0+G*0.0+H*0.0;O=O*I;P=P*J;P=O+P;R=R*K;R=P+R;R=Q+R;R=s+R;R=n-R;R=x*R;f=M+(N*152|0)+112|0;g[f>>2]=R;f=M+(N*152|0)+116|0;g[f>>2]=o;R=-L;f=M+(N*152|0)+120|0;g[f>>2]=R;f=M+(N*152|0)+124|0;c[f>>2]=q;return}}function rd(b,d){b=b|0;d=+d;var e=0,f=0,h=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0;C=i;i=i+64|0;e=c[b+136>>2]|0;if((e|0)>0){f=0;do{Ae(c[b+116>>2]|0,c[b+144>>2]|0,f,0);f=f+1|0;e=c[b+136>>2]|0}while((f|0)<(e|0))}f=c[b+116>>2]|0;t=+g[f+312>>2];u=+g[f+316>>2];h=+g[f+320>>2];h=+O(+(t*t+u*u+h*h))*3.5999999046325684;g[b+112>>2]=h;B=c[b+128>>2]|0;if(+g[f+4+(B<<2)>>2]*+g[f+312>>2]+ +g[f+20+(B<<2)>>2]*+g[f+316>>2]+ +g[f+36+(B<<2)>>2]*+g[f+320>>2]<0.0)g[b+112>>2]=-h;if((e|0)>0){B=0;do{A=c[b+144>>2]|0;p=A+(B*284|0)|0;Tg(f,p,0);o=A+(B*284|0)+204|0;e=A+(B*284|0)+212|0;h=+g[o>>2]+ +g[e>>2];q=A+(B*284|0)+52|0;v=A+(B*284|0)+56|0;w=A+(B*284|0)+60|0;D=A+(B*284|0)+36|0;x=A+(B*284|0)+16|0;t=h*+g[v>>2]+ +g[A+(B*284|0)+40>>2];u=h*+g[w>>2]+ +g[A+(B*284|0)+44>>2];g[A+(B*284|0)+16>>2]=+g[q>>2]*h+ +g[D>>2];y=A+(B*284|0)+20|0;g[y>>2]=t;z=A+(B*284|0)+24|0;g[z>>2]=u;g[A+(B*284|0)+28>>2]=0.0;g[C+32>>2]=-1.0;f=c[b+100>>2]|0;D=Ib[c[(c[f>>2]|0)+8>>2]&31](f,D,x,C)|0;f=A+(B*284|0)+88|0;c[f>>2]=0;do if(D){h=h*+g[C+32>>2];c[p>>2]=c[C+16>>2];c[p+4>>2]=c[C+16+4>>2];c[p+8>>2]=c[C+16+8>>2];c[p+12>>2]=c[C+16+12>>2];a[A+(B*284|0)+84>>0]=1;if((a[22552]|0)==0?Wa(22552)|0:0){c[C+40>>2]=0;c[C+40+4>>2]=0;c[C+40+8>>2]=0;c[C+40+12>>2]=0;og(23888,0.0,0,0,C+40|0);_a(22552)}c[6023]=c[6023]|1;g[6058]=0.0;j=+g[6068]*0.0;k=+g[6069]*0.0;g[6063]=+g[6067]*0.0;g[6064]=j;g[6065]=k;g[6066]=0.0;c[6071]=0;c[6072]=0;c[6073]=0;c[6074]=0;k=+g[6060]*0.0;j=+g[6061]*0.0;g[6112]=+g[6059]*0.0;g[6113]=k;g[6114]=j;g[6115]=0.0;c[f>>2]=23888;h=h-+g[e>>2];e=A+(B*284|0)+32|0;g[e>>2]=h;j=+g[o>>2];k=+g[A+(B*284|0)+208>>2]*.009999999776482582;if(h>2]=j-k;h=j-k}if(h>j+k)g[e>>2]=j+k;c[x>>2]=c[C>>2];c[x+4>>2]=c[C+4>>2];c[x+8>>2]=c[C+8>>2];c[x+12>>2]=c[C+12>>2];s=+g[p>>2];t=+g[A+(B*284|0)+4>>2];u=+g[A+(B*284|0)+8>>2];r=s*+g[q>>2]+t*+g[v>>2]+u*+g[w>>2];e=c[b+116>>2]|0;n=+g[x>>2]-+g[e+52>>2];m=+g[y>>2]-+g[e+56>>2];h=+g[z>>2]-+g[e+60>>2];j=+g[e+332>>2];k=+g[e+336>>2];l=+g[e+328>>2];if(!(r>=-.10000000149011612)){g[A+(B*284|0)+272>>2]=-1.0/r*(s*(j*h-m*k+ +g[e+312>>2])+t*(n*k-h*l+ +g[e+316>>2])+u*(m*l-n*j+ +g[e+320>>2]));g[A+(B*284|0)+268>>2]=-1.0/r;break}else{g[A+(B*284|0)+272>>2]=0.0;g[A+(B*284|0)+268>>2]=10.0;break}}else{c[A+(B*284|0)+32>>2]=c[o>>2];g[A+(B*284|0)+272>>2]=0.0;t=-+g[v>>2];u=-+g[w>>2];g[p>>2]=-+g[q>>2];g[A+(B*284|0)+4>>2]=t;g[A+(B*284|0)+8>>2]=u;g[A+(B*284|0)+12>>2]=0.0;g[A+(B*284|0)+268>>2]=1.0}while(0);B=B+1|0;e=c[b+136>>2]|0;f=c[b+116>>2]|0}while((B|0)<(e|0));j=1.0/+g[f+344>>2];if((e|0)>0){f=0;do{e=c[b+144>>2]|0;if(!(a[e+(f*284|0)+84>>0]|0))h=0.0;else{h=+g[e+(f*284|0)+272>>2];h=j*(+g[e+(f*284|0)+216>>2]*(+g[e+(f*284|0)+204>>2]-+g[e+(f*284|0)+32>>2])*+g[e+(f*284|0)+268>>2]-h*+g[(h<0.0?e+(f*284|0)+220|0:e+(f*284|0)+224|0)>>2]);h=h<0.0?0.0:h}g[e+(f*284|0)+276>>2]=h;f=f+1|0;e=c[b+136>>2]|0}while((f|0)<(e|0));if((e|0)>0){e=0;do{B=c[b+144>>2]|0;s=+g[B+(e*284|0)+276>>2];u=+g[B+(e*284|0)+248>>2];s=s>u?u:s;u=s*+g[B+(e*284|0)+4>>2]*d;t=s*+g[B+(e*284|0)+8>>2]*d;g[C+40>>2]=+g[B+(e*284|0)>>2]*s*d;g[C+40+4>>2]=u;g[C+40+8>>2]=t;g[C+40+12>>2]=0.0;D=c[b+116>>2]|0;t=+g[B+(e*284|0)+20>>2]-+g[D+56>>2];u=+g[B+(e*284|0)+24>>2]-+g[D+60>>2];g[C>>2]=+g[B+(e*284|0)+16>>2]-+g[D+52>>2];g[C+4>>2]=t;g[C+8>>2]=u;g[C+12>>2]=0.0;gj(D,C+40|0,C);e=e+1|0}while((e|0)<(c[b+136>>2]|0))}}}zb[c[(c[b>>2]|0)+20>>2]&31](b,d);f=c[b+136>>2]|0;if((f|0)<=0){i=C;return}o=c[b+144>>2]|0;p=c[b+116>>2]|0;q=0;do{h=+g[o+(q*284|0)+36>>2]-+g[p+52>>2];j=+g[o+(q*284|0)+40>>2]-+g[p+56>>2];k=+g[o+(q*284|0)+44>>2]-+g[p+60>>2];l=+g[p+332>>2];m=+g[p+336>>2];n=+g[p+328>>2];if(!(a[o+(q*284|0)+84>>0]|0)){e=o+(q*284|0)+240|0;h=+g[e>>2];D=o+(q*284|0)+236|0;g[D>>2]=h+ +g[D>>2]}else{e=c[b+128>>2]|0;F=+g[p+4+(e<<2)>>2];r=+g[p+20+(e<<2)>>2];t=+g[p+36+(e<<2)>>2];E=+g[o+(q*284|0)>>2];s=+g[o+(q*284|0)+4>>2];u=+g[o+(q*284|0)+8>>2];h=((j*n-h*l+ +g[p+320>>2])*(t-u*(F*E+r*s+t*u))+((l*k-j*m+ +g[p+312>>2])*(F-E*(F*E+r*s+t*u))+(h*m-k*n+ +g[p+316>>2])*(r-s*(F*E+r*s+t*u))))*d/+g[o+(q*284|0)+212>>2];e=o+(q*284|0)+240|0;g[e>>2]=h;D=o+(q*284|0)+236|0;g[D>>2]=+g[D>>2]+h}g[e>>2]=h*.9900000095367432;q=q+1|0}while((q|0)!=(f|0));i=C;return}function sd(b,d,e){b=b|0;d=d|0;e=e|0;var f=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0;C=+g[b+48>>2];i=+g[d>>2];D=+g[b+64>>2];j=+g[d+4>>2];E=+g[b+80>>2];p=+g[d+8>>2];s=+g[b+52>>2];r=+g[b+68>>2];q=+g[b+84>>2];w=+g[b+56>>2];y=+g[b+72>>2];z=+g[b+88>>2];v=+g[d+16>>2];u=+g[d+20>>2];t=+g[d+24>>2];x=+g[d+32>>2];F=+g[d+36>>2];G=+g[d+40>>2];k=+g[b+96>>2];h=+g[b+100>>2];B=+g[b+104>>2];A=+g[d+48>>2]+(i*k+j*h+p*B);f=v*k+u*h+t*B+ +g[d+52>>2];B=x*k+F*h+G*B+ +g[d+56>>2];g[b+1064>>2]=C*i+D*j+E*p;g[b+1068>>2]=i*s+j*r+p*q;g[b+1072>>2]=i*w+j*y+p*z;g[b+1076>>2]=0.0;g[b+1080>>2]=C*v+D*u+E*t;g[b+1084>>2]=s*v+r*u+q*t;g[b+1088>>2]=w*v+y*u+z*t;g[b+1092>>2]=0.0;g[b+1096>>2]=C*x+D*F+E*G;g[b+1100>>2]=s*x+r*F+q*G;g[b+1104>>2]=w*x+y*F+z*G;g[b+1108>>2]=0.0;g[b+1112>>2]=A;g[b+1116>>2]=f;g[b+1120>>2]=B;g[b+1124>>2]=0.0;B=+g[b+112>>2];f=+g[e>>2];A=+g[b+128>>2];G=+g[e+4>>2];z=+g[b+144>>2];F=+g[e+8>>2];y=+g[b+116>>2];x=+g[b+132>>2];w=+g[b+148>>2];q=+g[b+120>>2];r=+g[b+136>>2];s=+g[b+152>>2];E=+g[e+16>>2];D=+g[e+20>>2];C=+g[e+24>>2];t=+g[e+32>>2];u=+g[e+36>>2];v=+g[e+40>>2];p=+g[b+160>>2];j=+g[b+164>>2];i=+g[b+168>>2];h=+g[e+48>>2]+(f*p+G*j+F*i);k=E*p+D*j+C*i+ +g[e+52>>2];i=t*p+u*j+v*i+ +g[e+56>>2];g[b+1128>>2]=B*f+A*G+z*F;g[b+1132>>2]=f*y+G*x+F*w;g[b+1136>>2]=f*q+G*r+F*s;g[b+1140>>2]=0.0;g[b+1144>>2]=B*E+A*D+z*C;g[b+1148>>2]=y*E+x*D+w*C;g[b+1152>>2]=q*E+r*D+s*C;g[b+1156>>2]=0.0;g[b+1160>>2]=B*t+A*u+z*v;g[b+1164>>2]=y*t+x*u+w*v;g[b+1168>>2]=q*t+r*u+s*v;g[b+1172>>2]=0.0;g[b+1176>>2]=h;g[b+1180>>2]=k;g[b+1184>>2]=i;g[b+1188>>2]=0.0;h=h-+g[b+1112>>2];k=k-+g[b+1116>>2];i=i-+g[b+1120>>2];w=+g[b+1084>>2];x=+g[b+1104>>2];y=+g[b+1088>>2];z=+g[b+1100>>2];A=+g[b+1096>>2];B=+g[b+1080>>2];C=+g[b+1064>>2];D=+g[b+1068>>2];E=+g[b+1072>>2];F=1.0/((w*x-y*z)*C+D*(y*A-x*B)+(z*B-w*A)*E);G=(z*B-w*A)*F;f=i*(y*D-w*E)*F+(h*(w*x-y*z)*F+k*(z*E-x*D)*F);j=i*(B*E-y*C)*F+(h*(y*A-x*B)*F+k*(x*C-A*E)*F);k=i*(w*C-B*D)*F+(h*G+k*(A*D-z*C)*F);g[b+1256>>2]=f;g[b+1260>>2]=j;g[b+1264>>2]=k;g[b+1268>>2]=0.0;g[b+840>>2]=f;h=+g[b+680>>2];i=+g[b+696>>2];do if(!(h>i)){if(h>f){c[b+856>>2]=2;g[b+824>>2]=f-h;break}if(i>2]=1;g[b+824>>2]=f-i;break}else{c[b+856>>2]=0;g[b+824>>2]=0.0;break}}else{c[b+856>>2]=0;g[b+824>>2]=0.0}while(0);g[b+844>>2]=j;f=+g[b+684>>2];h=+g[b+700>>2];do if(!(f>h)){if(f>j){c[b+860>>2]=2;g[b+828>>2]=j-f;break}if(h>2]=1;g[b+828>>2]=j-h;break}else{c[b+860>>2]=0;g[b+828>>2]=0.0;break}}else{c[b+860>>2]=0;g[b+828>>2]=0.0}while(0);g[b+848>>2]=k;f=+g[b+688>>2];h=+g[b+704>>2];do if(!(f>h)){if(f>k){c[b+864>>2]=2;g[b+832>>2]=k-f;break}if(h>2]=1;g[b+832>>2]=k-h;break}else{c[b+864>>2]=0;g[b+832>>2]=0.0;break}}else{c[b+864>>2]=0;g[b+832>>2]=0.0}while(0);h=+g[b+1128>>2];i=+g[b+1144>>2];j=+g[b+1160>>2];k=+g[b+1132>>2];l=+g[b+1148>>2];m=+g[b+1164>>2];n=(w*x-y*z)*F*k+(z*E-x*D)*F*l+(y*D-w*E)*F*m;o=k*(y*A-x*B)*F+(x*C-A*E)*F*l+(B*E-y*C)*F*m;p=j*(w*C-B*D)*F+(h*G+i*(A*D-z*C)*F);f=G*+g[b+1136>>2]+(A*D-z*C)*F*+g[b+1152>>2]+(w*C-B*D)*F*(q*t+r*u+s*v);do if(p<1.0)if(p>-1.0){g[b+1192>>2]=+W(+-(k*G+(A*D-z*C)*F*l+(w*C-B*D)*F*m),+f);G=p<-1.0?-1.0:p;g[b+1196>>2]=+U(+(G>1.0?1.0:G));g[b+1200>>2]=+W(+-(j*(B*E-y*C)*F+(h*(y*A-x*B)*F+i*(x*C-A*E)*F)),+(j*(y*D-w*E)*F+(h*(w*x-y*z)*F+i*(z*E-x*D)*F)));break}else{g[b+1192>>2]=-+W(+n,+o);g[b+1196>>2]=-1.5707963705062866;g[b+1200>>2]=0.0;break}else{g[b+1192>>2]=+W(+n,+o);g[b+1196>>2]=1.5707963705062866;g[b+1200>>2]=0.0}while(0);g[b+1236>>2]=0.0;z=x*(h*x-j*E)-y*(i*E-h*y);A=E*(i*E-h*y)-x*(j*y-i*x);B=y*(j*y-i*x)-E*(h*x-j*E);g[b+1220>>2]=0.0;C=i*(i*E-h*y)-j*(h*x-j*E);D=j*(j*y-i*x)-h*(i*E-h*y);F=h*(h*x-j*E)-i*(j*y-i*x);g[b+1252>>2]=0.0;G=1.0/+O(+(z*z+A*A+B*B));g[b+1208>>2]=z*G;g[b+1212>>2]=A*G;g[b+1216>>2]=B*G;G=1.0/+O(+((j*y-i*x)*(j*y-i*x)+(h*x-j*E)*(h*x-j*E)+(i*E-h*y)*(i*E-h*y)));g[b+1224>>2]=(j*y-i*x)*G;g[b+1228>>2]=(h*x-j*E)*G;g[b+1232>>2]=(i*E-h*y)*G;G=1.0/+O(+(C*C+D*D+F*F));g[b+1240>>2]=C*G;g[b+1244>>2]=D*G;g[b+1248>>2]=F*G;if(!(a[b+1301>>0]|0))return;F=+g[(c[b+28>>2]|0)+344>>2];G=+g[(c[b+32>>2]|0)+344>>2];a[b+1280>>0]=(F<1.1920928955078125e-07|G<1.1920928955078125e-07)&1;G=F+G>0.0?G/(F+G):.5;g[b+1272>>2]=G;g[b+1276>>2]=1.0-G;return}function td(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;x=i;i=i+80|0;e=c[b+8>>2]|0;if((e|0)>0){g=0;do{f=c[(c[b+16>>2]|0)+(g<<2)>>2]|0;if((c[f+236>>2]|0)==1){Cb[c[(c[f>>2]|0)+24>>2]&127](f,d);e=c[b+8>>2]|0}g=g+1|0}while((g|0)<(e|0))}a[x+16>>0]=1;c[x+12>>2]=0;c[x+4>>2]=0;c[x+8>>2]=0;a[x+36>>0]=1;c[x+32>>2]=0;c[x+24>>2]=0;c[x+28>>2]=0;a[x+56>>0]=1;c[x+52>>2]=0;c[x+44>>2]=0;c[x+48>>2]=0;a[x+76>>0]=1;c[x+72>>2]=0;c[x+64>>2]=0;c[x+68>>2]=0;if((e|0)<=0){pj(x);i=x;return}j=0;k=0;g=0;f=0;r=0;while(1){q=c[(c[(c[b+16>>2]|0)+(r<<2)>>2]|0)+192>>2]|0;p=(q+~(q<<15)>>10^q+~(q<<15))*9|0;p=(p>>6^p)+~((p>>6^p)<<11)>>16^(p>>6^p)+~((p>>6^p)<<11);o=p&j+-1;l=o>>>0>>0;a:do if(l){h=c[g+(o<<2)>>2]|0;if((h|0)!=-1){m=c[x+72>>2]|0;while(1){if((q|0)==(c[m+(h<<3)>>2]|0)){n=13;break}k=c[f+(h<<2)>>2]|0;if((k|0)==-1)break;else h=k}if((n|0)==13?(n=0,(c[x+52>>2]|0)+(h<<2)|0):0)break;if(!l){n=20;break}}e=c[g+(o<<2)>>2]|0;if((e|0)!=-1){h=c[x+72>>2]|0;while(1){if((q|0)==(c[h+(e<<3)>>2]|0))break;e=c[f+(e<<2)>>2]|0;if((e|0)==-1){n=20;break a}}c[(c[x+52>>2]|0)+(e<<2)>>2]=q;e=j;n=82}else n=20}else n=20;while(0);if((n|0)==20){l=c[x+44>>2]|0;if((l|0)==(j|0)){e=j|0?j<<1:1;if((j|0)<(e|0)){if((e|0)!=0?(c[6435]=(c[6435]|0)+1,w=yc((e<<2|3)+16|0)|0,(w|0)!=0):0){c[(w+4+15&-16)+-4>>2]=w;g=w+4+15&-16}else g=0;if((j|0)>0){f=0;do{c[g+(f<<2)>>2]=c[(c[x+52>>2]|0)+(f<<2)>>2];f=f+1|0}while((f|0)!=(j|0))}f=c[x+52>>2]|0;if(f|0){if(a[x+56>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[f+-4>>2]|0)}c[x+52>>2]=0}a[x+56>>0]=1;c[x+52>>2]=g;c[x+48>>2]=e;f=j}else{f=j;e=j}}else{f=l;e=j}c[(c[x+52>>2]|0)+(f<<2)>>2]=q;c[x+44>>2]=f+1;f=c[x+64>>2]|0;if((f|0)==(c[x+68>>2]|0)?(s=f|0?f<<1:1,(f|0)<(s|0)):0){if((s|0)!=0?(c[6435]=(c[6435]|0)+1,t=yc((s<<3|3)+16|0)|0,(t|0)!=0):0){c[(t+4+15&-16)+-4>>2]=t;g=t+4+15&-16}else g=0;if((f|0)>0){e=0;do{k=(c[x+72>>2]|0)+(e<<3)|0;m=c[k+4>>2]|0;n=g+(e<<3)|0;c[n>>2]=c[k>>2];c[n+4>>2]=m;e=e+1|0}while((e|0)!=(f|0))}e=c[x+72>>2]|0;if(e|0){if(a[x+76>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[e+-4>>2]|0)}c[x+72>>2]=0}a[x+76>>0]=1;c[x+72>>2]=g;c[x+68>>2]=s;f=c[x+64>>2]|0;e=c[x+48>>2]|0}n=(c[x+72>>2]|0)+(f<<3)|0;c[n>>2]=q;c[n+4>>2]=0;c[x+64>>2]=f+1;if((j|0)<(e|0)){k=c[x+4>>2]|0;do if((e|0)>(k|0)){if((e|0)>=(k|0)){do if((c[x+8>>2]|0)<(e|0)){if((e|0)!=0?(c[6435]=(c[6435]|0)+1,u=yc((e<<2|3)+16|0)|0,(u|0)!=0):0){c[(u+4+15&-16)+-4>>2]=u;f=u+4+15&-16}else f=0;g=c[x+12>>2]|0;if((k|0)<=0){if(!g){a[x+16>>0]=1;c[x+12>>2]=f;c[x+8>>2]=e;break}}else{h=0;do{c[f+(h<<2)>>2]=c[g+(h<<2)>>2];h=h+1|0}while((h|0)!=(k|0))}if(a[x+16>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[g+-4>>2]|0)}a[x+16>>0]=1;c[x+12>>2]=f;c[x+8>>2]=e}else f=c[x+12>>2]|0;while(0);Qn(f+(k<<2)|0,0,e-k<<2|0)|0}c[x+4>>2]=e;j=c[x+24>>2]|0;if((e|0)>(j|0)){do if((c[x+28>>2]|0)<(e|0)){if((e|0)!=0?(c[6435]=(c[6435]|0)+1,v=yc((e<<2|3)+16|0)|0,(v|0)!=0):0){c[(v+4+15&-16)+-4>>2]=v;f=v+4+15&-16}else f=0;g=c[x+32>>2]|0;if((j|0)<=0){if(!g){a[x+36>>0]=1;c[x+32>>2]=f;c[x+28>>2]=e;break}}else{h=0;do{c[f+(h<<2)>>2]=c[g+(h<<2)>>2];h=h+1|0}while((h|0)!=(j|0))}if(a[x+36>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[g+-4>>2]|0)}a[x+36>>0]=1;c[x+32>>2]=f;c[x+28>>2]=e}else f=c[x+32>>2]|0;while(0);Qn(f+(j<<2)|0,0,e-j<<2|0)|0}c[x+24>>2]=e;if((e|0)>0){o=e<<2;Qn(c[x+12>>2]|0,-1,o|0)|0;Qn(c[x+32>>2]|0,-1,o|0)|0}if((k|0)<=0){e=c[x+48>>2]|0;break}f=c[x+72>>2]|0;g=c[x+12>>2]|0;h=c[x+32>>2]|0;e=c[x+48>>2]|0;j=0;do{o=c[f+(j<<3)>>2]|0;o=(o+~(o<<15)>>10^o+~(o<<15))*9|0;o=g+((((o>>6^o)+~((o>>6^o)<<11)>>16^(o>>6^o)+~((o>>6^o)<<11))&e+-1)<<2)|0;c[h+(j<<2)>>2]=c[o>>2];c[o>>2]=j;j=j+1|0}while((j|0)!=(k|0))}while(0);f=e;e=p&e+-1}else{f=e;e=o}g=c[x+12>>2]|0;e=g+(e<<2)|0;n=c[x+32>>2]|0;c[n+(l<<2)>>2]=c[e>>2];c[e>>2]=l;e=f;f=n;n=82}if((n|0)==82){n=0;Cb[c[(c[q>>2]|0)+60>>2]&127](q,d);j=e;e=c[b+8>>2]|0}h=r+1|0;if((h|0)>=(e|0))break;k=c[x+4>>2]|0;r=h}pj(x);i=x;return}function ud(b,d){b=b|0;d=d|0;var e=0,f=0,h=0.0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=i;i=i+32|0;ig(b+4|0,((_(c[b+152>>2]|0,c[b+16>>2]|0)|0)/100|0)+1|0);if(c[b+164>>2]|0){p=((_(c[b+148>>2]|0,c[b+76>>2]|0)|0)/100|0)+1|0;ig(b+64|0,p);p=(c[b+164>>2]|0)-p|0;c[b+164>>2]=(p|0)<0?0:p}e=((c[b+144>>2]|0)+1|0)%2|0;c[b+144>>2]=e;e=c[b+124+(e<<2)>>2]|0;if(e|0){do{l=e+56|0;m=e;e=c[l>>2]|0;k=c[m+52>>2]|0;j=e;if(!k)c[b+124+(c[m+60>>2]<<2)>>2]=j;else c[k+56>>2]=j;j=c[l>>2]|0;if(j|0)c[j+52>>2]=c[m+52>>2];c[m+52>>2]=0;c[l>>2]=c[b+132>>2];j=c[b+132>>2]|0;if(j|0)c[j+52>>2]=m;c[b+132>>2]=m;j=c[m+48>>2]|0;hh(b+4|0,j)|0;k=c[b+8>>2]|0;if(k|0){c[6436]=(c[6436]|0)+1;hd(c[k+-4>>2]|0)}c[b+8>>2]=j;c[b+16>>2]=(c[b+16>>2]|0)+-1;c[r>>2]=c[m+16>>2];c[r+4>>2]=c[m+16+4>>2];c[r+8>>2]=c[m+16+8>>2];c[r+12>>2]=c[m+16+12>>2];c[r+16>>2]=c[m+32>>2];c[r+16+4>>2]=c[m+32+4>>2];c[r+16+8>>2]=c[m+32+8>>2];c[r+16+12>>2]=c[m+32+12>>2];j=c[b+68>>2]|0;if(!j){c[6435]=(c[6435]|0)+1;j=yc(63)|0;if(!j)j=0;else{c[(j+4+15&-16)+-4>>2]=j;j=j+4+15&-16}k=j;l=k+44|0;do{c[k>>2]=0;k=k+4|0}while((k|0)<(l|0))}else c[b+68>>2]=0;c[j+32>>2]=0;c[j+36>>2]=m;c[j+40>>2]=0;c[j>>2]=c[r>>2];c[j+4>>2]=c[r+4>>2];c[j+8>>2]=c[r+8>>2];c[j+12>>2]=c[r+12>>2];c[j+16>>2]=c[r+16>>2];c[j+20>>2]=c[r+20>>2];c[j+24>>2]=c[r+24>>2];c[j+28>>2]=c[r+28>>2];lf(b+64|0,c[b+64>>2]|0,j);k=(c[b+76>>2]|0)+1|0;c[b+76>>2]=k;c[m+48>>2]=j;c[m+60>>2]=2}while((e|0)!=0);c[b+164>>2]=k;a[b+194>>0]=1}c[r>>2]=8904;c[r+4>>2]=b;if(a[b+193>>0]|0?(we(b+4|0,c[b+4>>2]|0,c[b+64>>2]|0,r),a[b+193>>0]|0):0){p=c[b+4>>2]|0;we(b+4|0,p,p,r)}if(a[b+194>>0]|0?(n=c[b+136>>2]|0,n=Eb[c[(c[n>>2]|0)+28>>2]&127](n)|0,f=c[n+4>>2]|0,(f|0)>0):0){e=(_(c[b+156>>2]|0,f)|0)/100|0;p=c[b+160>>2]|0;e=(p|0)>(e|0)?p:e;e=(f|0)<(e|0)?f:e;if((e|0)>0){j=0;do{l=((c[b+184>>2]|0)+j|0)%(f|0)|0;o=c[n+12>>2]|0;k=c[o+(l<<4)>>2]|0;l=c[o+(l<<4)+4>>2]|0;o=c[k+48>>2]|0;p=c[l+48>>2]|0;if(!(((((+g[o>>2]<=+g[p+16>>2]?+g[o+16>>2]>=+g[p>>2]:0)?+g[o+4>>2]<=+g[p+20>>2]:0)?+g[o+20>>2]>=+g[p+4>>2]:0)?+g[o+8>>2]<=+g[p+24>>2]:0)?+g[o+24>>2]>=+g[p+8>>2]:0)){f=c[b+136>>2]|0;Ib[c[(c[f>>2]|0)+12>>2]&31](f,k,l,d)|0;f=c[n+4>>2]|0;j=j+-1|0;e=e+-1|0}j=j+1|0}while((j|0)<(e|0));if((f|0)>0)q=37;else e=0}else q=37;if((q|0)==37)e=((c[b+184>>2]|0)+e|0)%(f|0)|0;c[b+184>>2]=e}c[b+180>>2]=(c[b+180>>2]|0)+1;c[b+160>>2]=1;a[b+194>>0]=0;f=c[b+168>>2]|0;e=c[b+172>>2]|0;if(!f)h=0.0;else h=+(e>>>0)/+(f>>>0);g[b+176>>2]=h;c[b+172>>2]=e>>>1;c[b+168>>2]=f>>>1;p=c[b+136>>2]|0;if(!(Eb[c[(c[p>>2]|0)+56>>2]&127](p)|0)){i=r;return}p=c[b+136>>2]|0;p=Eb[c[(c[p>>2]|0)+28>>2]&127](p)|0;e=c[p+4>>2]|0;if((e|0)>1){Vd(p,0,e+-1|0);j=0;k=0;l=0;f=0;q=44}else{j=0;o=0;n=0;f=0}while(1){if((q|0)==44){q=0;e=c[p+4>>2]|0;o=k;n=l}if((j|0)>=(e|0))break;m=c[p+12>>2]|0;k=m+(j<<4)|0;l=c[k>>2]|0;m=m+(j<<4)+4|0;e=c[m>>2]|0;if(!((l|0)==(n|0)&(e|0)==(f|0))){f=c[l+48>>2]|0;n=c[e+48>>2]|0;if(((((+g[f>>2]<=+g[n+16>>2]?+g[f+16>>2]>=+g[n>>2]:0)?+g[f+4>>2]<=+g[n+20>>2]:0)?+g[f+20>>2]>=+g[n+4>>2]:0)?+g[f+8>>2]<=+g[n+24>>2]:0)?+g[f+24>>2]>=+g[n+8>>2]:0){f=e;e=o}else q=53}else{e=f;q=53}if((q|0)==53){f=c[b+136>>2]|0;ic[c[(c[f>>2]|0)+32>>2]&127](f,k,d);c[k>>2]=0;c[m>>2]=0;f=e;e=o+1|0}j=j+1|0;k=e;q=44}if((e|0)>1){Vd(p,0,e+-1|0);k=c[p+4>>2]|0}else k=e;l=k-o|0;if((o|0)<0){if((c[p+8>>2]|0)<(l|0)){if((k|0)!=(o|0)){c[6435]=(c[6435]|0)+1;e=yc((l<<4|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}f=c[p+4>>2]|0;if((f|0)>0){j=0;do{q=c[p+12>>2]|0;c[e+(j<<4)>>2]=c[q+(j<<4)>>2];c[e+(j<<4)+4>>2]=c[q+(j<<4)+4>>2];c[e+(j<<4)+8>>2]=c[q+(j<<4)+8>>2];c[e+(j<<4)+12>>2]=c[q+(j<<4)+12>>2];j=j+1|0}while((j|0)!=(f|0));f=p+12|0}else f=p+12|0}else{e=0;f=p+12|0}j=c[f>>2]|0;if(j|0){if(a[p+16>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[j+-4>>2]|0)}c[f>>2]=0}a[p+16>>0]=1;c[f>>2]=e;c[p+8>>2]=l}else f=p+12|0;e=k;do{q=(c[f>>2]|0)+(e<<4)|0;e=e+1|0;c[q>>2]=0;c[q+4>>2]=0;c[q+8>>2]=0;c[q+12>>2]=0}while((e|0)!=(l|0))}c[p+4>>2]=l;i=r;return}function vd(b,d){b=b|0;d=d|0;var e=0,f=0,h=0,i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0.0,v=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0;o=c[b+28>>2]|0;h=c[b+32>>2]|0;Fc(b,o+4|0,h+4|0,o+264|0,h+264|0);q=c[d+8>>2]|0;g[q>>2]=1.0;p=c[d+24>>2]|0;g[q+(p+1<<2)>>2]=1.0;g[q+((p<<1)+2<<2)>>2]=1.0;l=+g[b+348>>2];u=+g[b+352>>2];n=+g[b+356>>2];s=+g[o+4>>2]*l+ +g[o+8>>2]*u+ +g[o+12>>2]*n;m=l*+g[o+20>>2]+u*+g[o+24>>2]+n*+g[o+28>>2];n=l*+g[o+36>>2]+u*+g[o+40>>2]+n*+g[o+44>>2];q=c[d+12>>2]|0;c[q>>2]=0;g[q+4>>2]=n;g[q+8>>2]=-m;g[q+12>>2]=0.0;g[q+(p<<2)>>2]=-n;c[q+(p<<2)+4>>2]=0;g[q+(p<<2)+8>>2]=s;g[q+(p<<2)+12>>2]=0.0;g[q+(p<<1<<2)>>2]=m;g[q+(p<<1<<2)+4>>2]=-s;c[q+(p<<1<<2)+8>>2]=0;g[q+(p<<1<<2)+12>>2]=0.0;q=c[d+16>>2]|0;g[q>>2]=-1.0;g[q+(p+1<<2)>>2]=-1.0;g[q+((p<<1)+2<<2)>>2]=-1.0;u=+g[b+412>>2];l=+g[b+416>>2];k=+g[b+420>>2];t=+g[h+4>>2]*u+ +g[h+8>>2]*l+ +g[h+12>>2]*k;j=u*+g[h+20>>2]+l*+g[h+24>>2]+k*+g[h+28>>2];k=u*+g[h+36>>2]+l*+g[h+40>>2]+k*+g[h+44>>2];p=c[d+20>>2]|0;q=c[d+24>>2]|0;c[p>>2]=0;g[p+4>>2]=-k;g[p+8>>2]=j;g[p+12>>2]=0.0;g[p+(q<<2)>>2]=k;c[p+(q<<2)+4>>2]=0;g[p+(q<<2)+8>>2]=-t;g[p+(q<<2)+12>>2]=0.0;g[p+(q<<1<<2)>>2]=-j;g[p+(q<<1<<2)+4>>2]=t;c[p+(q<<1<<2)+8>>2]=0;g[p+(q<<1<<2)+12>>2]=0.0;q=c[b+592>>2]|0;l=+g[((q&2|0)==0?d+4|0:b+600|0)>>2]*+g[d>>2];r=c[d+24>>2]|0;i=c[d+28>>2]|0;f=c[d+36>>2]|0;e=c[d+40>>2]|0;g[i>>2]=l*(t+ +g[h+52>>2]-s-+g[o+52>>2]);g[f>>2]=-3402823466385288598117041.0e14;g[e>>2]=3402823466385288598117041.0e14;if(!(q&1)){g[i+(r<<2)>>2]=l*(j+ +g[h+56>>2]-m-+g[o+56>>2]);g[f+(r<<2)>>2]=-3402823466385288598117041.0e14;g[e+(r<<2)>>2]=3402823466385288598117041.0e14;g[i+(r<<1<<2)>>2]=l*(k+ +g[h+60>>2]-n-+g[o+60>>2]);g[f+(r<<1<<2)>>2]=-3402823466385288598117041.0e14;g[e+(r<<1<<2)>>2]=3402823466385288598117041.0e14}else{v=c[d+32>>2]|0;c[v>>2]=c[b+596>>2];g[i+(r<<2)>>2]=l*(j+ +g[h+56>>2]-m-+g[o+56>>2]);g[f+(r<<2)>>2]=-3402823466385288598117041.0e14;g[e+(r<<2)>>2]=3402823466385288598117041.0e14;c[v+(r<<2)>>2]=c[b+596>>2];g[i+(r<<1<<2)>>2]=l*(k+ +g[h+60>>2]-n-+g[o+60>>2]);g[f+(r<<1<<2)>>2]=-3402823466385288598117041.0e14;g[e+(r<<1<<2)>>2]=3402823466385288598117041.0e14;c[v+(r<<1<<2)>>2]=c[b+596>>2]}do if(!(a[b+526>>0]|0))h=r*3|0;else{h=c[d+12>>2]|0;u=+g[b+456>>2];if(+g[b+444>>2]>2]>2];y=+g[o+8>>2];x=+g[o+12>>2];D=+g[b+304>>2];C=+g[b+320>>2];B=+g[b+336>>2];l=+g[b+308>>2];n=+g[b+324>>2];t=+g[b+340>>2];w=+g[o+20>>2];j=+g[o+24>>2];k=+g[o+28>>2];m=+g[o+36>>2];s=+g[o+40>>2];u=+g[o+44>>2];g[h+(r*3<<2)>>2]=z*D+y*C+x*B;g[h+((r*3|0)+1<<2)>>2]=D*w+C*j+B*k;g[h+((r*3|0)+2<<2)>>2]=D*m+C*s+B*u;g[h+(r<<2<<2)>>2]=z*l+y*n+x*t;g[h+((r<<2|1)<<2)>>2]=l*w+n*j+t*k;g[h+((r<<2|2)<<2)>>2]=l*m+n*s+t*u;g[p+(r*3<<2)>>2]=-(z*D+y*C+x*B);g[p+((r*3|0)+1<<2)>>2]=-(D*w+C*j+B*k);g[p+((r*3|0)+2<<2)>>2]=-(D*m+C*s+B*u);g[p+(r<<2<<2)>>2]=-(z*l+y*n+x*t);g[p+((r<<2|1)<<2)>>2]=-(l*w+n*j+t*k);g[p+((r<<2|2)<<2)>>2]=-(l*m+n*s+t*u);A=+g[d>>2]*+g[b+436>>2];i=c[d+28>>2]|0;g[i+(r*3<<2)>>2]=A*((z*D+y*C+x*B)*+g[b+460>>2]+(D*w+C*j+B*k)*+g[b+464>>2]+(D*m+C*s+B*u)*+g[b+468>>2]);g[i+(r<<2<<2)>>2]=A*((z*l+y*n+x*t)*+g[b+460>>2]+(l*w+n*j+t*k)*+g[b+464>>2]+(l*m+n*s+t*u)*+g[b+468>>2]);f=c[d+36>>2]|0;g[f+(r*3<<2)>>2]=-3402823466385288598117041.0e14;e=c[d+40>>2]|0;g[e+(r*3<<2)>>2]=3402823466385288598117041.0e14;g[f+(r<<2<<2)>>2]=-3402823466385288598117041.0e14;g[e+(r<<2<<2)>>2]=3402823466385288598117041.0e14;h=(c[d+24>>2]|0)+(r<<2)|0;break}D=+g[b+436>>2];B=D*+g[b+460>>2]*D;C=D*D*+g[b+464>>2];D=D*D*+g[b+468>>2];g[h+(r*3<<2)>>2]=B;g[h+((r*3|0)+1<<2)>>2]=C;g[h+((r*3|0)+2<<2)>>2]=D;g[p+(r*3<<2)>>2]=-B;g[p+((r*3|0)+1<<2)>>2]=-C;g[p+((r*3|0)+2<<2)>>2]=-D;g[i+(r*3<<2)>>2]=+g[d>>2]*+g[b+432>>2]*+g[b+504>>2];if(q&4|0)c[(c[d+32>>2]|0)+(r*3<<2)>>2]=c[b+604>>2];g[f+(r*3<<2)>>2]=0.0;g[e+(r*3<<2)>>2]=3402823466385288598117041.0e14;h=r<<2}while(0);if(!(a[b+525>>0]|0))return;D=+g[b+436>>2];B=D*+g[b+476>>2]*D;C=D*D*+g[b+480>>2];D=D*D*+g[b+484>>2];p=c[d+12>>2]|0;r=c[d+20>>2]|0;g[p+(h<<2)>>2]=B;q=h+1|0;g[p+(q<<2)>>2]=C;v=h+2|0;g[p+(v<<2)>>2]=D;g[r+(h<<2)>>2]=-B;g[r+(q<<2)>>2]=-C;g[r+(v<<2)>>2]=-D;g[i+(h<<2)>>2]=+g[d>>2]*+g[b+432>>2]*+g[b+508>>2];if(c[b+592>>2]&4|0)c[(c[d+32>>2]|0)+(h<<2)>>2]=c[b+604>>2];if(!(+g[b+452>>2]>0.0)){g[f+(h<<2)>>2]=-3402823466385288598117041.0e14;g[e+(h<<2)>>2]=3402823466385288598117041.0e14;return}f=f+(h<<2)|0;e=c[d+40>>2]|0;if(+g[b+508>>2]>0.0){g[f>>2]=0.0;g[e+(h<<2)>>2]=3402823466385288598117041.0e14;return}else{g[f>>2]=-3402823466385288598117041.0e14;g[e+(h<<2)>>2]=0.0;return}}function wd(a,b,d,e,f,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;h=+h;var j=0.0,l=0,m=0.0,n=0,o=0.0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0,D=0,E=0.0,F=0.0,G=0.0,H=0,I=0,J=0,K=0,L=0.0,M=0.0,N=0.0,O=0.0;K=i;i=i+288|0;c[K+144>>2]=c[d>>2];c[K+144+4>>2]=c[d+4>>2];c[K+144+8>>2]=c[d+8>>2];c[K+144+12>>2]=c[d+12>>2];c[K+144+16>>2]=c[d+16>>2];c[K+144+16+4>>2]=c[d+16+4>>2];c[K+144+16+8>>2]=c[d+16+8>>2];c[K+144+16+12>>2]=c[d+16+12>>2];c[K+144+32>>2]=c[d+32>>2];c[K+144+32+4>>2]=c[d+32+4>>2];c[K+144+32+8>>2]=c[d+32+8>>2];c[K+144+32+12>>2]=c[d+32+12>>2];c[K+144+48>>2]=c[d+48>>2];c[K+144+48+4>>2]=c[d+48+4>>2];c[K+144+48+8>>2]=c[d+48+8>>2];c[K+144+48+12>>2]=c[d+48+12>>2];c[K+80>>2]=c[e>>2];c[K+80+4>>2]=c[e+4>>2];c[K+80+8>>2]=c[e+8>>2];c[K+80+12>>2]=c[e+12>>2];c[K+80+16>>2]=c[e+16>>2];c[K+80+16+4>>2]=c[e+16+4>>2];c[K+80+16+8>>2]=c[e+16+8>>2];c[K+80+16+12>>2]=c[e+16+12>>2];c[K+80+32>>2]=c[e+32>>2];c[K+80+32+4>>2]=c[e+32+4>>2];c[K+80+32+8>>2]=c[e+32+8>>2];c[K+80+32+12>>2]=c[e+32+12>>2];c[K+80+48>>2]=c[e+48>>2];c[K+80+48+4>>2]=c[e+48+4>>2];c[K+80+48+8>>2]=c[e+48+8>>2];c[K+80+48+12>>2]=c[e+48+12>>2];m=+g[K+80+52>>2]-+g[K+144+52>>2];O=+g[K+80+56>>2]-+g[K+144+56>>2];g[K+32>>2]=+g[K+80+48>>2]-+g[K+144+48>>2];g[K+32+4>>2]=m;g[K+32+8>>2]=O;g[K+32+12>>2]=0.0;Gf(K+144|0,K+80|0,K+224|0,K+208|0);O=+g[K+208>>2];m=O*+g[K+224+4>>2];L=O*+g[K+224+8>>2];g[K>>2]=+g[K+224>>2]*O;g[K+4>>2]=m;g[K+8>>2]=L;g[K+12>>2]=0.0;c[K+224+4>>2]=0;c[K+224+4+4>>2]=0;c[K+224+24>>2]=0;c[K+224+24+4>>2]=0;J=K+224+44|0;c[J>>2]=0;c[J+4>>2]=0;c[J+8>>2]=0;c[J+12>>2]=0;c[J+16>>2]=0;Wg(K+144|0,K+16|0);L=+g[K+16>>2];m=+g[K+16+4>>2];O=+g[K+16+8>>2];M=+g[K+16+12>>2];j=L*(2.0/(L*L+m*m+O*O+M*M));o=m*(2.0/(L*L+m*m+O*O+M*M));N=O*(2.0/(L*L+m*m+O*O+M*M));g[K+224>>2]=1.0-(m*o+O*N);g[K+224+4>>2]=L*o-M*N;g[K+224+8>>2]=L*N+M*o;g[K+224+12>>2]=0.0;g[K+224+16>>2]=L*o+M*N;g[K+224+20>>2]=1.0-(L*j+O*N);g[K+224+24>>2]=m*N-M*j;g[K+224+28>>2]=0.0;g[K+224+32>>2]=L*N-M*o;g[K+224+36>>2]=m*N+M*j;g[K+224+40>>2]=1.0-(L*j+m*o);g[J>>2]=0.0;rh(b,K+224|0,K+32|0,K,K+64|0,K+48|0);if((c[a+268>>2]|0)<=0){i=K;return}I=0;do{p=c[(c[a+276>>2]|0)+(I<<2)>>2]|0;if(Zb[c[(c[f>>2]|0)+8>>2]&31](f,c[p+188>>2]|0)|0?(C=c[p+192>>2]|0,mc[c[(c[C>>2]|0)+8>>2]&127](C,p+4|0,K+208|0,K+32|0),q=+g[K+208>>2]+ +g[K+64>>2],r=+g[K+208+4>>2]+ +g[K+64+4>>2],s=+g[K+208+8>>2]+ +g[K+64+8>>2],g[K+208>>2]=q,g[K+208+4>>2]=r,g[K+208+8>>2]=s,g[K+208+12>>2]=0.0,t=+g[K+32>>2]+ +g[K+48>>2],u=+g[K+32+4>>2]+ +g[K+48+4>>2],v=+g[K+32+8>>2]+ +g[K+48+8>>2],g[K+32>>2]=t,g[K+32+4>>2]=u,g[K+32+8>>2]=v,g[K+32+12>>2]=0.0,w=+g[d+48>>2]-(t+q)*.5,x=+g[d+52>>2]-(u+r)*.5,y=+g[d+56>>2]-(v+s)*.5,z=+g[e+48>>2]-(t+q)*.5,A=+g[e+52>>2]-(u+r)*.5,B=+g[e+56>>2]-(v+s)*.5,C=w<-((t-q)*.5)|(w>(t-q)*.5?8:0)|(x<-((u-r)*.5)?2:0)|(x>(u-r)*.5?16:0)|(y<-((v-s)*.5)?4:0)|(y>(v-s)*.5?32:0),D=z<-((t-q)*.5)|(z>(t-q)*.5?8:0)|(A<-((u-r)*.5)?2:0)|(A>(u-r)*.5?16:0)|(B<-((v-s)*.5)?4:0)|(B>(v-s)*.5?32:0),(C&D|0)==0):0){H=1;J=0;j=0.0;l=1065353216;o=1.0;while(1){if(!(H&C)){if((H&D|0)!=0?(E=(-w-o*(t-q)*.5)/(z-w),E<(c[k>>2]=l,+g[k>>2])):0)l=(g[k>>2]=E,c[k>>2]|0)}else{m=(-w-o*(t-q)*.5)/(z-w);if(j<=m)j=m}n=H<<1;if(!(n&C))if((n&D|0)!=0?(F=(-x-o*(u-r)*.5)/(A-x),F<(c[k>>2]=l,+g[k>>2])):0){m=j;l=(g[k>>2]=F,c[k>>2]|0)}else m=j;else{m=(-x-o*(u-r)*.5)/(A-x);if(!(j<=m))m=j}n=H<<2;if(!(n&C))if((n&D|0)!=0?(G=(-y-o*(v-s)*.5)/(B-y),G<(c[k>>2]=l,+g[k>>2])):0){j=m;l=(g[k>>2]=G,c[k>>2]|0)}else j=m;else{j=(-y-o*(v-s)*.5)/(B-y);if(!(m<=j))j=m}J=J+1|0;if((J|0)==2)break;else{H=H<<3;o=-1.0}}if(j<=(c[k>>2]=l,+g[k>>2])){J=c[p+192>>2]|0;c[K+224>>2]=0;c[K+224+4>>2]=J;c[K+224+8>>2]=p;c[K+224+12>>2]=p+4;c[K+224+16>>2]=-1;c[K+224+20>>2]=-1;Ic(b,K+144|0,K+80|0,K+224|0,f,h)}}I=I+1|0}while((I|0)<(c[a+268>>2]|0));i=K;return}function xd(d,e){d=d|0;e=e|0;var f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;q=i;i=i+112|0;g[d+20>>2]=+h[e+32>>3];g[d+24>>2]=+h[e+40>>3];g[d+28>>2]=+h[e+48>>3];g[d+32>>2]=+h[e+56>>3];g[d+4>>2]=+h[e>>3];g[d+8>>2]=+h[e+8>>3];g[d+12>>2]=+h[e+16>>3];g[d+16>>2]=+h[e+24>>3];g[d+36>>2]=+h[e+64>>3];g[d+40>>2]=+h[e+72>>3];g[d+44>>2]=+h[e+80>>3];g[d+48>>2]=+h[e+88>>3];c[d+56>>2]=c[e+96>>2];a[d+60>>0]=(c[e+100>>2]|0)!=0&1;p=c[e+104>>2]|0;l=q+48|0;n=l+64|0;do{c[l>>2]=0;l=l+4|0}while((l|0)<(n|0));o=c[d+88>>2]|0;if((o|0)<(p|0)){if((c[d+92>>2]|0)<(p|0)){if(!p){f=0;j=o}else{c[6435]=(c[6435]|0)+1;f=yc(p<<6|19)|0;if(!f)f=0;else{c[(f+4+15&-16)+-4>>2]=f;f=f+4+15&-16}j=c[d+88>>2]|0}if((j|0)>0){k=0;do{l=f+(k<<6)|0;m=(c[d+96>>2]|0)+(k<<6)|0;n=l+64|0;do{c[l>>2]=c[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));k=k+1|0}while((k|0)!=(j|0))}j=c[d+96>>2]|0;if(j|0){if(a[d+100>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[j+-4>>2]|0)}c[d+96>>2]=0}a[d+100>>0]=1;c[d+96>>2]=f;c[d+92>>2]=p;j=d+96|0}else j=d+96|0;f=o;do{l=(c[j>>2]|0)+(f<<6)|0;m=q+48|0;n=l+64|0;do{c[l>>2]=c[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));f=f+1|0}while((f|0)!=(p|0))}c[d+88>>2]=p;if((p|0)>0){f=c[d+96>>2]|0;j=0;k=c[e+112>>2]|0;while(1){g[f+(j<<6)+16>>2]=+h[k+32>>3];g[f+(j<<6)+20>>2]=+h[k+40>>3];g[f+(j<<6)+24>>2]=+h[k+48>>3];g[f+(j<<6)+28>>2]=+h[k+56>>3];g[f+(j<<6)>>2]=+h[k>>3];g[f+(j<<6)+4>>2]=+h[k+8>>3];g[f+(j<<6)+8>>2]=+h[k+16>>3];g[f+(j<<6)+12>>2]=+h[k+24>>3];c[f+(j<<6)+32>>2]=c[k+64>>2];c[f+(j<<6)+36>>2]=c[k+68>>2];c[f+(j<<6)+40>>2]=c[k+72>>2];j=j+1|0;if((j|0)==(p|0))break;else k=k+80|0}}m=c[e+108>>2]|0;c[q+32>>2]=0;c[q+32+4>>2]=0;c[q+32+8>>2]=0;c[q+32+12>>2]=0;l=c[d+128>>2]|0;if((l|0)<(m|0)){if((c[d+132>>2]|0)<(m|0)){if(!m){f=0;j=l}else{c[6435]=(c[6435]|0)+1;f=yc((m<<4|3)+16|0)|0;if(!f)f=0;else{c[(f+4+15&-16)+-4>>2]=f;f=f+4+15&-16}j=c[d+128>>2]|0}if((j|0)>0){k=0;do{p=f+(k<<4)|0;o=(c[d+136>>2]|0)+(k<<4)|0;c[p>>2]=c[o>>2];c[p+4>>2]=c[o+4>>2];c[p+8>>2]=c[o+8>>2];c[p+12>>2]=c[o+12>>2];k=k+1|0}while((k|0)!=(j|0))}j=c[d+136>>2]|0;if(j|0){if(a[d+140>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[j+-4>>2]|0)}c[d+136>>2]=0}a[d+140>>0]=1;c[d+136>>2]=f;c[d+132>>2]=m;j=d+136|0}else j=d+136|0;f=l;do{p=(c[j>>2]|0)+(f<<4)|0;c[p>>2]=c[q+32>>2];c[p+4>>2]=c[q+32+4>>2];c[p+8>>2]=c[q+32+8>>2];c[p+12>>2]=c[q+32+12>>2];f=f+1|0}while((f|0)!=(m|0))}c[d+128>>2]=m;if((m|0)>0){f=c[d+136>>2]|0;j=0;k=c[e+116>>2]|0;while(1){c[f+(j<<4)+12>>2]=c[k+12>>2];b[f+(j<<4)+6>>1]=b[k+6>>1]|0;b[f+(j<<4)+8>>1]=b[k+8>>1]|0;b[f+(j<<4)+10>>1]=b[k+10>>1]|0;b[f+(j<<4)>>1]=b[k>>1]|0;b[f+(j<<4)+2>>1]=b[k+2>>1]|0;b[f+(j<<4)+4>>1]=b[k+4>>1]|0;j=j+1|0;if((j|0)==(m|0))break;else k=k+16|0}}c[d+144>>2]=c[e+120>>2];m=c[e+124>>2]|0;l=c[d+152>>2]|0;if((l|0)<(m|0)){if((c[d+156>>2]|0)<(m|0)){if(!m){f=0;j=l}else{c[6435]=(c[6435]|0)+1;f=yc(m<<5|19)|0;if(!f)f=0;else{c[(f+4+15&-16)+-4>>2]=f;f=f+4+15&-16}j=c[d+152>>2]|0}if((j|0)>0){k=0;do{p=f+(k<<5)|0;o=(c[d+160>>2]|0)+(k<<5)|0;c[p>>2]=c[o>>2];c[p+4>>2]=c[o+4>>2];c[p+8>>2]=c[o+8>>2];c[p+12>>2]=c[o+12>>2];c[p+16>>2]=c[o+16>>2];c[p+20>>2]=c[o+20>>2];c[p+24>>2]=c[o+24>>2];c[p+28>>2]=c[o+28>>2];k=k+1|0}while((k|0)!=(j|0))}j=c[d+160>>2]|0;if(j|0){if(a[d+164>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[j+-4>>2]|0)}c[d+160>>2]=0}a[d+164>>0]=1;c[d+160>>2]=f;c[d+156>>2]=m;j=d+160|0}else j=d+160|0;f=l;do{p=(c[j>>2]|0)+(f<<5)|0;c[p>>2]=c[q>>2];c[p+4>>2]=c[q+4>>2];c[p+8>>2]=c[q+8>>2];c[p+12>>2]=c[q+12>>2];c[p+16>>2]=c[q+16>>2];c[p+20>>2]=c[q+20>>2];c[p+24>>2]=c[q+24>>2];c[p+28>>2]=c[q+28>>2];f=f+1|0}while((f|0)!=(m|0))}c[d+152>>2]=m;if((m|0)<=0){i=q;return}j=c[d+160>>2]|0;k=0;f=c[e+128>>2]|0;while(1){b[j+(k<<5)+6>>1]=b[f+14>>1]|0;b[j+(k<<5)+8>>1]=b[f+16>>1]|0;b[j+(k<<5)+10>>1]=b[f+18>>1]|0;b[j+(k<<5)>>1]=b[f+8>>1]|0;b[j+(k<<5)+2>>1]=b[f+10>>1]|0;b[j+(k<<5)+4>>1]=b[f+12>>1]|0;c[j+(k<<5)+12>>2]=c[f>>2];c[j+(k<<5)+16>>2]=c[f+4>>2];k=k+1|0;if((k|0)==(m|0))break;else f=f+20|0}i=q;return}function yd(a){a=a|0;var b=0,d=0,e=0.0,f=0.0,h=0.0,j=0.0,k=0.0,l=0.0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0;n=i;i=i+16|0;m=c[a+372>>2]|0;a:do switch(c[m+32>>2]|0){case 1:{d=1;b=0;while(1){c[n>>2]=0;c[n+4>>2]=0;c[n+8>>2]=0;c[n+12>>2]=0;g[n+(b<<2)>>2]=1.0;o=m+32|0;g[m+16+(d<<2)>>2]=0.0;d=(c[a+364>>2]|0)+-1|0;c[a+364>>2]=d;c[m+(c[o>>2]<<2)>>2]=c[a+348+(d<<2)>>2];d=c[o>>2]|0;c[o>>2]=d+1;e=+g[n>>2];f=+g[n+4>>2];h=+g[n+8>>2];Nh(a,e,f,h,c[m+(d<<2)>>2]|0);if(yd(a)|0)break;m=c[a+372>>2]|0;o=(c[m+32>>2]|0)+-1|0;c[m+32>>2]=o;o=c[m+(o<<2)>>2]|0;m=c[a+364>>2]|0;c[a+364>>2]=m+1;c[a+348+(m<<2)>>2]=o;m=c[a+372>>2]|0;g[m+16+(c[m+32>>2]<<2)>>2]=0.0;o=(c[a+364>>2]|0)+-1|0;c[a+364>>2]=o;c[m+(c[m+32>>2]<<2)>>2]=c[a+348+(o<<2)>>2];o=c[m+32>>2]|0;c[m+32>>2]=o+1;Nh(a,-e,-f,-h,c[m+(o<<2)>>2]|0);if(yd(a)|0)break;o=c[a+372>>2]|0;m=(c[o+32>>2]|0)+-1|0;c[o+32>>2]=m;m=c[o+(m<<2)>>2]|0;o=c[a+364>>2]|0;c[a+364>>2]=o+1;c[a+348+(o<<2)>>2]=m;b=b+1|0;if(b>>>0>=3)break a;m=c[a+372>>2]|0;d=c[m+32>>2]|0}o=1;i=n;return o|0}case 2:{o=c[m+4>>2]|0;b=c[m>>2]|0;e=+g[o+16>>2]-+g[b+16>>2];f=+g[o+20>>2]-+g[b+20>>2];h=+g[o+24>>2]-+g[b+24>>2];b=0;while(1){c[n>>2]=0;c[n+4>>2]=0;c[n+8>>2]=0;c[n+12>>2]=0;g[n+(b<<2)>>2]=1.0;j=+g[n+8>>2];k=+g[n+4>>2];l=+g[n>>2];if((f*j-h*k)*(f*j-h*k)+(h*l-e*j)*(h*l-e*j)+(e*k-f*l)*(e*k-f*l)>0.0){m=c[a+372>>2]|0;g[m+16+(c[m+32>>2]<<2)>>2]=0.0;o=(c[a+364>>2]|0)+-1|0;c[a+364>>2]=o;c[m+(c[m+32>>2]<<2)>>2]=c[a+348+(o<<2)>>2];o=c[m+32>>2]|0;c[m+32>>2]=o+1;Nh(a,f*j-h*k,h*l-e*j,e*k-f*l,c[m+(o<<2)>>2]|0);if(yd(a)|0)break;m=c[a+372>>2]|0;o=(c[m+32>>2]|0)+-1|0;c[m+32>>2]=o;o=c[m+(o<<2)>>2]|0;m=c[a+364>>2]|0;c[a+364>>2]=m+1;c[a+348+(m<<2)>>2]=o;m=c[a+372>>2]|0;g[m+16+(c[m+32>>2]<<2)>>2]=0.0;o=(c[a+364>>2]|0)+-1|0;c[a+364>>2]=o;c[m+(c[m+32>>2]<<2)>>2]=c[a+348+(o<<2)>>2];o=c[m+32>>2]|0;c[m+32>>2]=o+1;Nh(a,-(f*j-h*k),-(h*l-e*j),-(e*k-f*l),c[m+(o<<2)>>2]|0);if(yd(a)|0)break;o=c[a+372>>2]|0;m=(c[o+32>>2]|0)+-1|0;c[o+32>>2]=m;m=c[o+(m<<2)>>2]|0;o=c[a+364>>2]|0;c[a+364>>2]=o+1;c[a+348+(o<<2)>>2]=m}b=b+1|0;if(b>>>0>=3)break a}o=1;i=n;return o|0}case 3:{o=c[m+4>>2]|0;d=c[m>>2]|0;j=+g[d+16>>2];e=+g[o+16>>2]-j;k=+g[d+20>>2];f=+g[o+20>>2]-k;l=+g[d+24>>2];h=+g[o+24>>2]-l;o=c[m+8>>2]|0;j=+g[o+16>>2]-j;k=+g[o+20>>2]-k;l=+g[o+24>>2]-l;if((f*l-h*k)*(f*l-h*k)+(h*j-e*l)*(h*j-e*l)+(e*k-f*j)*(e*k-f*j)>0.0){g[m+28>>2]=0.0;o=(c[a+364>>2]|0)+-1|0;c[a+364>>2]=o;c[m+12>>2]=c[a+348+(o<<2)>>2];o=c[m+32>>2]|0;c[m+32>>2]=o+1;Nh(a,f*l-h*k,h*j-e*l,e*k-f*j,c[m+(o<<2)>>2]|0);if(yd(a)|0){o=1;i=n;return o|0}m=c[a+372>>2]|0;o=(c[m+32>>2]|0)+-1|0;c[m+32>>2]=o;o=c[m+(o<<2)>>2]|0;m=c[a+364>>2]|0;c[a+364>>2]=m+1;c[a+348+(m<<2)>>2]=o;m=c[a+372>>2]|0;g[m+16+(c[m+32>>2]<<2)>>2]=0.0;o=(c[a+364>>2]|0)+-1|0;c[a+364>>2]=o;c[m+(c[m+32>>2]<<2)>>2]=c[a+348+(o<<2)>>2];o=c[m+32>>2]|0;c[m+32>>2]=o+1;Nh(a,-(f*l-h*k),-(h*j-e*l),-(e*k-f*j),c[m+(o<<2)>>2]|0);if(yd(a)|0){o=1;i=n;return o|0}else{o=c[a+372>>2]|0;m=(c[o+32>>2]|0)+-1|0;c[o+32>>2]=m;m=c[o+(m<<2)>>2]|0;o=c[a+364>>2]|0;c[a+364>>2]=o+1;c[a+348+(o<<2)>>2]=m;break a}}break}case 4:{o=c[m>>2]|0;a=c[m+12>>2]|0;l=+g[a+16>>2];r=+g[o+16>>2]-l;p=+g[a+20>>2];e=+g[o+20>>2]-p;h=+g[a+24>>2];j=+g[o+24>>2]-h;o=c[m+4>>2]|0;f=+g[o+16>>2]-l;k=+g[o+20>>2]-p;q=+g[o+24>>2]-h;o=c[m+8>>2]|0;l=+g[o+16>>2]-l;p=+g[o+20>>2]-p;h=+g[o+24>>2]-h;if(!((0.0!=0.0?1:r*k*h+(e*q*l+j*f*p-r*q*p-e*f*h)-j*k*l!=r*k*h+(e*q*l+j*f*p-r*q*p-e*f*h)-j*k*l)|r*k*h+(e*q*l+j*f*p-r*q*p-e*f*h)-j*k*l==0.0)){o=1;i=n;return o|0}break}default:{}}while(0);o=0;i=n;return o|0}function zd(b,d,e){b=b|0;d=d|0;e=e|0;var f=0.0,h=0,i=0,j=0,k=0.0,l=0,m=0.0,n=0.0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0,Y=0,Z=0;Y=c[d+36>>2]|0;X=c[e+36>>2]|0;K=+g[Y+8>>2];L=+g[Y+12>>2];M=+g[Y+16>>2];d=c[X+8>>2]|0;R=+g[d+8>>2];S=+g[d+12>>2];T=+g[d+16>>2];e=c[X+12>>2]|0;N=+g[e+8>>2];P=+g[e+12>>2];Q=+g[e+16>>2];h=c[X+16>>2]|0;U=+g[h+8>>2];V=+g[h+12>>2];W=+g[h+16>>2];w=N-K-(R-K);D=P-L-(S-L);B=Q-M-(T-M);x=D*(W-M-(T-M))-B*(V-L-(S-L));E=B*(U-K-(R-K))-w*(W-M-(T-M));C=w*(V-L-(S-L))-D*(U-K-(R-K));do if(C*C+(x*x+E*E)>1.1920928955078125e-07?(G=1.0/+O(+(C*C+(x*x+E*E))),H=(T-M)*C*G+((R-K)*x*G+(S-L)*E*G),H*H<3402823466385288598117041.0e14):0){f=R-K-x*G*H;r=S-L-E*G*H;s=T-M-C*G*H;t=N-K-x*G*H;u=P-L-E*G*H;v=Q-M-C*G*H;if((C*(u*f-r*t)+(x*(r*v-s*u)+E*(s*t-v*f))>0.0?(y=U-K-x*G*H,z=V-L-E*G*H,A=W-M-C*G*H,C*(z*t-u*y)+(x*(u*A-v*z)+E*(v*y-A*t))>0.0):0)?C*(r*y-z*f)+(x*(z*s-A*r)+E*(A*f-s*y))>0.0:0){q=H*H;p=x*G*H;n=C*G*H;m=E*G*H;break}if(w*w+D*D+B*B>1.1920928955078125e-07?(F=-((R-K)*w+(S-L)*D+(T-M)*B)/(w*w+D*D+B*B),F=F<0.0?0.0:F>1.0?1.0:F,q=(T-M+B*F)*(T-M+B*F)+((R-K+w*F)*(R-K+w*F)+(S-L+D*F)*(S-L+D*F)),q<3402823466385288598117041.0e14):0){s=R-K+w*F;t=T-M+B*F;r=S-L+D*F}else{q=3402823466385288598117041.0e14;s=0.0;t=0.0;r=0.0}f=(U-K-(N-K))*(U-K-(N-K))+(V-L-(P-L))*(V-L-(P-L))+(W-M-(Q-M))*(W-M-(Q-M));if(f>1.1920928955078125e-07?(n=-((N-K)*(U-K-(N-K))+(P-L)*(V-L-(P-L))+(Q-M)*(W-M-(Q-M)))/f,n=n<0.0?0.0:n>1.0?1.0:n,p=N-K+(U-K-(N-K))*n,k=P-L+(V-L-(P-L))*n,n=Q-M+(W-M-(Q-M))*n,n*n+(p*p+k*k)1.1920928955078125e-07?(J=-((U-K)*(R-K-(U-K))+(V-L)*(S-L-(V-L))+(W-M)*(T-M-(W-M)))/f,J=J<0.0?0.0:J>1.0?1.0:J,I=U-K+(R-K-(U-K))*J,m=V-L+(S-L-(V-L))*J,J=W-M+(T-M-(W-M))*J,J*J+(I*I+m*m)>2];J=L-+g[Y+28>>2];u=M-+g[Y+32>>2];u=+g[b+12>>2]+ +O(+(I*I+J*J+u*u))*2.0;if(!(q>2];V=+g[d+88>>2];W=+g[e+88>>2];f=+g[h+88>>2];f=!(V<=0.0)&!(W<=0.0)&!(f<=0.0)?V*s*(1.0/(t+s+r))+W*r*(1.0/(t+s+r))+t*(1.0/(t+s+r))*f:0.0;if(!(k+f>0.0))return;W=1.0/-+O(+q);q=p*W;p=m*W;n=n*W;o=c[b+4>>2]|0;d=c[b+8>>2]|0;l=c[(+g[o+316>>2]>+g[d+316>>2]?o+316|0:d+316|0)>>2]|0;m=k/(k+f)*+g[o+332>>2];f=f/(k+f)*+g[d+332>>2];d=c[o+832>>2]|0;if((d|0)==(c[o+836>>2]|0)?(Z=d|0?d<<1:1,(d|0)<(Z|0)):0){if(!Z)j=0;else{c[6435]=(c[6435]|0)+1;d=yc((Z*56|3)+16|0)|0;if(!d)d=0;else{c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16}j=d;d=c[o+832>>2]|0}if((d|0)>0){e=0;do{h=j+(e*56|0)|0;b=(c[o+840>>2]|0)+(e*56|0)|0;i=h+56|0;do{c[h>>2]=c[b>>2];h=h+4|0;b=b+4|0}while((h|0)<(i|0));e=e+1|0}while((e|0)!=(d|0))}d=c[o+840>>2]|0;if(d|0){if(a[o+844>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[o+840>>2]=0}a[o+844>>0]=1;c[o+840>>2]=j;c[o+836>>2]=Z;d=c[o+832>>2]|0}Z=c[o+840>>2]|0;c[Z+(d*56|0)>>2]=Y;c[Z+(d*56|0)+4>>2]=X;g[Z+(d*56|0)+8>>2]=s*(1.0/(t+s+r));g[Z+(d*56|0)+12>>2]=r*(1.0/(t+s+r));g[Z+(d*56|0)+16>>2]=t*(1.0/(t+s+r));g[Z+(d*56|0)+20>>2]=0.0;g[Z+(d*56|0)+24>>2]=q;g[Z+(d*56|0)+28>>2]=p;g[Z+(d*56|0)+32>>2]=n;g[Z+(d*56|0)+36>>2]=0.0;g[Z+(d*56|0)+40>>2]=u;c[Z+(d*56|0)+44>>2]=l;g[Z+(d*56|0)+48>>2]=m;g[Z+(d*56|0)+52>>2]=f;c[o+832>>2]=(c[o+832>>2]|0)+1;return}function Ad(d,e){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;o=i;i=i+112|0;c[d+20>>2]=c[e+16>>2];c[d+24>>2]=c[e+20>>2];c[d+28>>2]=c[e+24>>2];c[d+32>>2]=c[e+28>>2];c[d+4>>2]=c[e>>2];c[d+8>>2]=c[e+4>>2];c[d+12>>2]=c[e+8>>2];c[d+16>>2]=c[e+12>>2];c[d+36>>2]=c[e+32>>2];c[d+40>>2]=c[e+36>>2];c[d+44>>2]=c[e+40>>2];c[d+48>>2]=c[e+44>>2];c[d+56>>2]=c[e+48>>2];a[d+60>>0]=(c[e+52>>2]|0)!=0&1;n=c[e+56>>2]|0;j=o+48|0;l=j+64|0;do{c[j>>2]=0;j=j+4|0}while((j|0)<(l|0));m=c[d+88>>2]|0;if((m|0)<(n|0)){if((c[d+92>>2]|0)<(n|0)){if(!n){f=0;g=m}else{c[6435]=(c[6435]|0)+1;f=yc(n<<6|19)|0;if(!f)f=0;else{c[(f+4+15&-16)+-4>>2]=f;f=f+4+15&-16}g=c[d+88>>2]|0}if((g|0)>0){h=0;do{j=f+(h<<6)|0;k=(c[d+96>>2]|0)+(h<<6)|0;l=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(l|0));h=h+1|0}while((h|0)!=(g|0))}g=c[d+96>>2]|0;if(g|0){if(a[d+100>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[g+-4>>2]|0)}c[d+96>>2]=0}a[d+100>>0]=1;c[d+96>>2]=f;c[d+92>>2]=n;g=d+96|0}else g=d+96|0;f=m;do{j=(c[g>>2]|0)+(f<<6)|0;k=o+48|0;l=j+64|0;do{c[j>>2]=c[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(l|0));f=f+1|0}while((f|0)!=(n|0))}c[d+88>>2]=n;if((n|0)>0){f=c[d+96>>2]|0;g=0;h=c[e+64>>2]|0;while(1){c[f+(g<<6)+16>>2]=c[h+16>>2];c[f+(g<<6)+20>>2]=c[h+20>>2];c[f+(g<<6)+24>>2]=c[h+24>>2];c[f+(g<<6)+28>>2]=c[h+28>>2];c[f+(g<<6)>>2]=c[h>>2];c[f+(g<<6)+4>>2]=c[h+4>>2];c[f+(g<<6)+8>>2]=c[h+8>>2];c[f+(g<<6)+12>>2]=c[h+12>>2];c[f+(g<<6)+32>>2]=c[h+32>>2];c[f+(g<<6)+36>>2]=c[h+36>>2];c[f+(g<<6)+40>>2]=c[h+40>>2];g=g+1|0;if((g|0)==(n|0))break;else h=h+48|0}}k=c[e+60>>2]|0;c[o+32>>2]=0;c[o+32+4>>2]=0;c[o+32+8>>2]=0;c[o+32+12>>2]=0;j=c[d+128>>2]|0;if((j|0)<(k|0)){if((c[d+132>>2]|0)<(k|0)){if(!k){f=0;g=j}else{c[6435]=(c[6435]|0)+1;f=yc((k<<4|3)+16|0)|0;if(!f)f=0;else{c[(f+4+15&-16)+-4>>2]=f;f=f+4+15&-16}g=c[d+128>>2]|0}if((g|0)>0){h=0;do{n=f+(h<<4)|0;m=(c[d+136>>2]|0)+(h<<4)|0;c[n>>2]=c[m>>2];c[n+4>>2]=c[m+4>>2];c[n+8>>2]=c[m+8>>2];c[n+12>>2]=c[m+12>>2];h=h+1|0}while((h|0)!=(g|0))}g=c[d+136>>2]|0;if(g|0){if(a[d+140>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[g+-4>>2]|0)}c[d+136>>2]=0}a[d+140>>0]=1;c[d+136>>2]=f;c[d+132>>2]=k;g=d+136|0}else g=d+136|0;f=j;do{n=(c[g>>2]|0)+(f<<4)|0;c[n>>2]=c[o+32>>2];c[n+4>>2]=c[o+32+4>>2];c[n+8>>2]=c[o+32+8>>2];c[n+12>>2]=c[o+32+12>>2];f=f+1|0}while((f|0)!=(k|0))}c[d+128>>2]=k;if((k|0)>0){f=c[d+136>>2]|0;g=0;h=c[e+68>>2]|0;while(1){c[f+(g<<4)+12>>2]=c[h+12>>2];b[f+(g<<4)+6>>1]=b[h+6>>1]|0;b[f+(g<<4)+8>>1]=b[h+8>>1]|0;b[f+(g<<4)+10>>1]=b[h+10>>1]|0;b[f+(g<<4)>>1]=b[h>>1]|0;b[f+(g<<4)+2>>1]=b[h+2>>1]|0;b[f+(g<<4)+4>>1]=b[h+4>>1]|0;g=g+1|0;if((g|0)==(k|0))break;else h=h+16|0}}c[d+144>>2]=c[e+76>>2];k=c[e+80>>2]|0;j=c[d+152>>2]|0;if((j|0)<(k|0)){if((c[d+156>>2]|0)<(k|0)){if(!k){f=0;g=j}else{c[6435]=(c[6435]|0)+1;f=yc(k<<5|19)|0;if(!f)f=0;else{c[(f+4+15&-16)+-4>>2]=f;f=f+4+15&-16}g=c[d+152>>2]|0}if((g|0)>0){h=0;do{n=f+(h<<5)|0;m=(c[d+160>>2]|0)+(h<<5)|0;c[n>>2]=c[m>>2];c[n+4>>2]=c[m+4>>2];c[n+8>>2]=c[m+8>>2];c[n+12>>2]=c[m+12>>2];c[n+16>>2]=c[m+16>>2];c[n+20>>2]=c[m+20>>2];c[n+24>>2]=c[m+24>>2];c[n+28>>2]=c[m+28>>2];h=h+1|0}while((h|0)!=(g|0))}g=c[d+160>>2]|0;if(g|0){if(a[d+164>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[g+-4>>2]|0)}c[d+160>>2]=0}a[d+164>>0]=1;c[d+160>>2]=f;c[d+156>>2]=k;g=d+160|0}else g=d+160|0;f=j;do{n=(c[g>>2]|0)+(f<<5)|0;c[n>>2]=c[o>>2];c[n+4>>2]=c[o+4>>2];c[n+8>>2]=c[o+8>>2];c[n+12>>2]=c[o+12>>2];c[n+16>>2]=c[o+16>>2];c[n+20>>2]=c[o+20>>2];c[n+24>>2]=c[o+24>>2];c[n+28>>2]=c[o+28>>2];f=f+1|0}while((f|0)!=(k|0))}c[d+152>>2]=k;if((k|0)<=0){i=o;return}g=c[d+160>>2]|0;h=0;f=c[e+72>>2]|0;while(1){b[g+(h<<5)+6>>1]=b[f+14>>1]|0;b[g+(h<<5)+8>>1]=b[f+16>>1]|0;b[g+(h<<5)+10>>1]=b[f+18>>1]|0;b[g+(h<<5)>>1]=b[f+8>>1]|0;b[g+(h<<5)+2>>1]=b[f+10>>1]|0;b[g+(h<<5)+4>>1]=b[f+12>>1]|0;c[g+(h<<5)+12>>2]=c[f>>2];c[g+(h<<5)+16>>2]=c[f+4>>2];h=h+1|0;if((h|0)==(k|0))break;else f=f+20|0}i=o;return}function Bd(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;c[b>>2]=3180;d=c[b+192>>2]|0;if(d|0)Ab[c[(c[d>>2]|0)+4>>2]&255](d);a:do if((c[b+1112>>2]|0)>0)do{h=c[c[b+1120>>2]>>2]|0;d=c[h+348>>2]|0;if(d|0){hh(b+1048|0,d)|0;e=c[b+1052>>2]|0;if(e|0){c[6436]=(c[6436]|0)+1;hd(c[e+-4>>2]|0)}c[b+1052>>2]=d;c[b+1060>>2]=(c[b+1060>>2]|0)+-1}Fk(h);if(h|0){c[6436]=(c[6436]|0)+1;hd(c[h+-4>>2]|0)}d=c[b+1112>>2]|0;if((d|0)<=0)break a;g=c[b+1120>>2]|0;e=0;do{f=g+(e<<2)|0;if((c[f>>2]|0)==(h|0)){i=18;break}e=e+1|0}while((e|0)<(d|0));if((i|0)==18){i=0;if((e|0)<(d|0)){c[f>>2]=c[g+(d+-1<<2)>>2];c[(c[b+1120>>2]|0)+(d+-1<<2)>>2]=h;c[b+1112>>2]=d+-1;d=d+-1|0}}}while((d|0)>0);while(0);d=c[b+872>>2]|0;if((d|0)>0){f=0;do{e=c[(c[b+880>>2]|0)+(f<<2)>>2]|0;if(e){c[6436]=(c[6436]|0)+1;hd(c[e+-4>>2]|0);d=c[b+872>>2]|0}f=f+1|0}while((f|0)<(d|0))}d=c[b+852>>2]|0;if((d|0)>0){f=0;do{e=c[(c[b+860>>2]|0)+(f<<2)>>2]|0;if(e){c[6436]=(c[6436]|0)+1;hd(c[e+-4>>2]|0);d=c[b+852>>2]|0}f=f+1|0}while((f|0)<(d|0))}d=c[b+1244>>2]|0;if(d|0){if(a[b+1248>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+1244>>2]=0}a[b+1248>>0]=1;c[b+1244>>2]=0;c[b+1236>>2]=0;c[b+1240>>2]=0;d=c[b+1140>>2]|0;if(d|0){if(a[b+1144>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+1140>>2]=0}a[b+1144>>0]=1;c[b+1140>>2]=0;c[b+1132>>2]=0;c[b+1136>>2]=0;d=c[b+1120>>2]|0;if(d|0){if(a[b+1124>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+1120>>2]=0}a[b+1124>>0]=1;c[b+1120>>2]=0;c[b+1112>>2]=0;c[b+1116>>2]=0;pi(b+1048|0);pi(b+988|0);pi(b+928|0);d=c[b+880>>2]|0;if(d|0){if(a[b+884>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+880>>2]=0}a[b+884>>0]=1;c[b+880>>2]=0;c[b+872>>2]=0;c[b+876>>2]=0;d=c[b+860>>2]|0;if(d|0){if(a[b+864>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+860>>2]=0}a[b+864>>0]=1;c[b+860>>2]=0;c[b+852>>2]=0;c[b+856>>2]=0;d=c[b+840>>2]|0;if(d|0){if(a[b+844>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+840>>2]=0}a[b+844>>0]=1;c[b+840>>2]=0;c[b+832>>2]=0;c[b+836>>2]=0;d=c[b+820>>2]|0;if(d|0){if(a[b+824>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+820>>2]=0}a[b+824>>0]=1;c[b+820>>2]=0;c[b+812>>2]=0;c[b+816>>2]=0;d=c[b+800>>2]|0;if(d|0){if(a[b+804>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+800>>2]=0}a[b+804>>0]=1;c[b+800>>2]=0;c[b+792>>2]=0;c[b+796>>2]=0;d=c[b+780>>2]|0;if(d|0){if(a[b+784>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+780>>2]=0}a[b+784>>0]=1;c[b+780>>2]=0;c[b+772>>2]=0;c[b+776>>2]=0;d=c[b+760>>2]|0;if(d|0){if(a[b+764>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+760>>2]=0}a[b+764>>0]=1;c[b+760>>2]=0;c[b+752>>2]=0;c[b+756>>2]=0;d=c[b+740>>2]|0;if(d|0){if(a[b+744>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+740>>2]=0}a[b+744>>0]=1;c[b+740>>2]=0;c[b+732>>2]=0;c[b+736>>2]=0;d=c[b+720>>2]|0;if(d|0){if(a[b+724>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+720>>2]=0}a[b+724>>0]=1;c[b+720>>2]=0;c[b+712>>2]=0;c[b+716>>2]=0;d=c[b+700>>2]|0;if(d|0){if(a[b+704>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+700>>2]=0}a[b+704>>0]=1;c[b+700>>2]=0;c[b+692>>2]=0;c[b+696>>2]=0;d=c[b+512>>2]|0;if(d|0){if(a[b+516>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+512>>2]=0}a[b+516>>0]=1;c[b+512>>2]=0;c[b+504>>2]=0;c[b+508>>2]=0;d=c[b+492>>2]|0;if(d|0){if(a[b+496>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+492>>2]=0}a[b+496>>0]=1;c[b+492>>2]=0;c[b+484>>2]=0;c[b+488>>2]=0;d=c[b+444>>2]|0;if(d|0){if(!((a[b+448>>0]&1)==0|(d|0)==0)){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+444>>2]=0}a[b+448>>0]=1;c[b+444>>2]=0;c[b+436>>2]=0;c[b+440>>2]=0;d=c[b+424>>2]|0;if(d|0){if(!((a[b+428>>0]&1)==0|(d|0)==0)){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+424>>2]=0}a[b+428>>0]=1;c[b+424>>2]=0;c[b+416>>2]=0;c[b+420>>2]=0;d=c[b+404>>2]|0;if(d|0){if(!((a[b+408>>0]&1)==0|(d|0)==0)){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+404>>2]=0}a[b+408>>0]=1;c[b+404>>2]=0;c[b+396>>2]=0;c[b+400>>2]=0;d=c[b+276>>2]|0;if(!d){a[b+280>>0]=1;c[b+276>>2]=0;c[b+268>>2]=0;i=b+272|0;c[i>>2]=0;c[b>>2]=5008;return}if(a[b+280>>0]|0){c[6436]=(c[6436]|0)+1;hd(c[d+-4>>2]|0)}c[b+276>>2]=0;a[b+280>>0]=1;c[b+276>>2]=0;c[b+268>>2]=0;i=b+272|0;c[i>>2]=0;c[b>>2]=5008;return}function Cd(a,d,f,h,j,k,l,m,n){a=a|0;d=d|0;f=f|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;w=i;i=i+16|0;Bj(a,w+6|0,+g[d>>2],+g[d+4>>2],+g[d+8>>2],0);Bj(a,w,+g[f>>2],+g[f+4>>2],+g[f+8>>2],1);v=b[a+64>>1]|0;u=c[a+60>>2]|0;b[a+64>>1]=b[u+((v&65535)<<6)+48>>1]|0;o=(b[a+56>>1]|0)+1<<16>>16;b[a+56>>1]=o;c[u+((v&65535)<<6)+12>>2]=v&65535;c[u+((v&65535)<<6)>>2]=j;b[u+((v&65535)<<6)+4>>1]=k;b[u+((v&65535)<<6)+6>>1]=l;c[u+((v&65535)<<6)+8>>2]=n;q=(o&65535)<<1&65534;b[u+54>>1]=(e[u+54>>1]|0)+2;p=c[a+68>>2]|0;n=e[p+(q+-1<<2)>>1]|e[p+(q+-1<<2)+2>>1]<<16;b[p+((q|1)<<2)>>1]=n;b[p+((q|1)<<2)+2>>1]=n>>>16;p=c[a+68>>2]|0;b[p+(q+-1<<2)>>1]=b[w+6>>1]|0;b[p+(q+-1<<2)+2>>1]=v;b[p+(q<<2)>>1]=b[w>>1]|0;b[p+(q<<2)+2>>1]=v;b[u+((v&65535)<<6)+48>>1]=q+-1;b[u+((v&65535)<<6)+54>>1]=(o&65535)<<1;p=(c[a+60>>2]|0)+56|0;b[p>>1]=(e[p>>1]|0)+2;p=c[a+72>>2]|0;n=e[p+(q+-1<<2)>>1]|e[p+(q+-1<<2)+2>>1]<<16;b[p+((q|1)<<2)>>1]=n;b[p+((q|1)<<2)+2>>1]=n>>>16;p=c[a+72>>2]|0;b[p+(q+-1<<2)>>1]=b[w+6+2>>1]|0;b[p+(q+-1<<2)+2>>1]=v;b[p+(q<<2)>>1]=b[w+2>>1]|0;b[p+(q<<2)+2>>1]=v;b[u+((v&65535)<<6)+50>>1]=q+-1;b[u+((v&65535)<<6)+56>>1]=(o&65535)<<1;p=(c[a+60>>2]|0)+58|0;b[p>>1]=(e[p>>1]|0)+2;p=c[a+76>>2]|0;n=e[p+(q+-1<<2)>>1]|e[p+(q+-1<<2)+2>>1]<<16;b[p+((q|1)<<2)>>1]=n;b[p+((q|1)<<2)+2>>1]=n>>>16;p=c[a+76>>2]|0;b[p+(q+-1<<2)>>1]=b[w+6+4>>1]|0;b[p+(q+-1<<2)+2>>1]=v;b[p+(q<<2)>>1]=b[w+4>>1]|0;b[p+(q<<2)+2>>1]=v;b[u+((v&65535)<<6)+52>>1]=q+-1;b[u+((v&65535)<<6)+58>>1]=(o&65535)<<1;o=c[a+68>>2]|0;q=e[u+((v&65535)<<6)+48>>1]|0;p=c[a+60>>2]|0;n=b[o+(q<<2)+-4>>1]|0;if((e[o+(q<<2)>>1]|0)<(n&65535)){s=p+((e[o+(q<<2)+2>>1]|0)<<6)+48|0;r=o+(q<<2)|0;q=o+(q<<2)+-4|0;while(1){o=e[r+-2>>1]|0;if(!(n&1)){t=p+(o<<6)+48|0;b[t>>1]=(b[t>>1]|0)+1<<16>>16}else{t=p+(o<<6)+54|0;b[t>>1]=(b[t>>1]|0)+1<<16>>16}b[s>>1]=(b[s>>1]|0)+-1<<16>>16;o=e[r>>1]|e[r+2>>1]<<16;n=e[q>>1]|e[q+2>>1]<<16;b[r>>1]=n;b[r+2>>1]=n>>>16;b[q>>1]=o;b[q+2>>1]=o>>>16;o=r+-4|0;q=q+-4|0;n=b[q>>1]|0;if((e[o>>1]|0)>=(n&65535))break;p=c[a+60>>2]|0;r=o}o=c[a+68>>2]|0}n=e[u+((v&65535)<<6)+54>>1]|0;q=o+(n<<2)|0;p=b[q+-4>>1]|0;a:do if((e[q>>1]|0)<(p&65535)){s=c[a+60>>2]|0;t=s+((e[o+(n<<2)+2>>1]|0)<<6)+54|0;n=p;r=q;p=q+-4|0;while(1){o=e[r+-2>>1]|0;if(!(n&1)){s=s+(o<<6)+48|0;b[s>>1]=(b[s>>1]|0)+1<<16>>16}else{s=s+(o<<6)+54|0;b[s>>1]=(b[s>>1]|0)+1<<16>>16}b[t>>1]=(b[t>>1]|0)+-1<<16>>16;o=e[r>>1]|e[r+2>>1]<<16;n=e[p>>1]|e[p+2>>1]<<16;b[r>>1]=n;b[r+2>>1]=n>>>16;b[p>>1]=o;b[p+2>>1]=o>>>16;o=r+-4|0;p=p+-4|0;n=b[p>>1]|0;if((e[o>>1]|0)>=(n&65535))break a;s=c[a+60>>2]|0;r=o}}while(0);o=c[a+72>>2]|0;q=e[u+((v&65535)<<6)+50>>1]|0;p=c[a+60>>2]|0;n=b[o+(q<<2)+-4>>1]|0;if((e[o+(q<<2)>>1]|0)<(n&65535)){s=p+((e[o+(q<<2)+2>>1]|0)<<6)+50|0;r=o+(q<<2)|0;q=o+(q<<2)+-4|0;while(1){o=e[r+-2>>1]|0;if(!(n&1)){t=p+(o<<6)+50|0;b[t>>1]=(b[t>>1]|0)+1<<16>>16}else{t=p+(o<<6)+56|0;b[t>>1]=(b[t>>1]|0)+1<<16>>16}b[s>>1]=(b[s>>1]|0)+-1<<16>>16;o=e[r>>1]|e[r+2>>1]<<16;n=e[q>>1]|e[q+2>>1]<<16;b[r>>1]=n;b[r+2>>1]=n>>>16;b[q>>1]=o;b[q+2>>1]=o>>>16;o=r+-4|0;q=q+-4|0;n=b[q>>1]|0;if((e[o>>1]|0)>=(n&65535))break;p=c[a+60>>2]|0;r=o}o=c[a+72>>2]|0}n=e[u+((v&65535)<<6)+56>>1]|0;q=o+(n<<2)|0;p=b[q+-4>>1]|0;b:do if((e[q>>1]|0)<(p&65535)){s=c[a+60>>2]|0;t=s+((e[o+(n<<2)+2>>1]|0)<<6)+56|0;n=p;r=q;p=q+-4|0;while(1){o=e[r+-2>>1]|0;if(!(n&1)){s=s+(o<<6)+50|0;b[s>>1]=(b[s>>1]|0)+1<<16>>16}else{s=s+(o<<6)+56|0;b[s>>1]=(b[s>>1]|0)+1<<16>>16}b[t>>1]=(b[t>>1]|0)+-1<<16>>16;o=e[r>>1]|e[r+2>>1]<<16;n=e[p>>1]|e[p+2>>1]<<16;b[r>>1]=n;b[r+2>>1]=n>>>16;b[p>>1]=o;b[p+2>>1]=o>>>16;o=r+-4|0;p=p+-4|0;n=b[p>>1]|0;if((e[o>>1]|0)>=(n&65535))break b;s=c[a+60>>2]|0;r=o}}while(0);wh(a,2,b[u+((v&65535)<<6)+52>>1]|0);uh(a,2,b[u+((v&65535)<<6)+58>>1]|0,m);o=c[a+60>>2]|0;n=c[a+108>>2]|0;if(!n){j=o+((v&65535)<<6)|0;i=w;return j|0}c[o+((v&65535)<<6)+60>>2]=gc[c[(c[n>>2]|0)+8>>2]&3](n,d,f,h,j,k,l,m,0)|0;j=o+((v&65535)<<6)|0;i=w;return j|0}function Dd(b,d,e,f,h,i,j,k,l,m,n,o,p){b=b|0;d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0,z=0,A=0,B=0,C=0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0;A=_(c[l+24>>2]|0,m)|0;m=a[d+44>>0]|0;z=c[d+56>>2]|0;if(!(m<<24>>24!=0|(z|0)!=0)){A=0;return A|0}C=c[(o|0?l+12|0:l+8|0)>>2]|0;B=c[(o|0?l+20|0:l+16|0)>>2]|0;c[C+(A<<2)>>2]=c[n>>2];c[C+(A+1<<2)>>2]=c[n+4>>2];c[C+(A+2<<2)>>2]=c[n+8>>2];g[B+(A<<2)>>2]=-+g[n>>2];g[B+(A+1<<2)>>2]=-+g[n+4>>2];g[B+(A+2<<2)>>2]=-+g[n+8>>2];do if(!o){q=+g[b+1176>>2];if(!(a[b+1301>>0]|0)){t=q-+g[e+48>>2];w=+g[b+1180>>2]-+g[e+52>>2];x=+g[b+1184>>2]-+g[e+56>>2];v=+g[n+8>>2];s=+g[n+4>>2];u=+g[n>>2];C=c[l+12>>2]|0;g[C+(A<<2)>>2]=w*v-x*s;g[C+(A+1<<2)>>2]=x*u-t*v;g[C+(A+2<<2)>>2]=t*s-w*u;u=+g[b+1176>>2]-+g[f+48>>2];w=+g[b+1180>>2]-+g[f+52>>2];s=+g[b+1184>>2]-+g[f+56>>2];t=+g[n+8>>2];v=+g[n+4>>2];x=+g[n>>2];C=c[l+20>>2]|0;g[C+(A<<2)>>2]=-(w*t-s*v);g[C+(A+1<<2)>>2]=-(s*x-u*t);g[C+(A+2<<2)>>2]=-(u*v-w*x);break}I=q-+g[f+48>>2];H=+g[b+1180>>2]-+g[f+52>>2];F=+g[b+1184>>2]-+g[f+56>>2];u=+g[n>>2];G=+g[n+4>>2];E=+g[n+8>>2];K=+g[b+1112>>2]-+g[e+48>>2];t=+g[b+1116>>2]-+g[e+52>>2];q=+g[b+1120>>2]-+g[e+56>>2];v=+g[d+52>>2]-+g[d+48>>2];J=u*(u*K+G*t+E*q)+u*v-u*(I*u+H*G+F*E);D=G*(u*K+G*t+E*q)+G*v-G*(I*u+H*G+F*E);v=E*(u*K+G*t+E*q)+E*v-E*(I*u+H*G+F*E);x=+g[b+1272>>2];w=+g[b+1276>>2];s=E*(t-G*(u*K+G*t+E*q)+x*D)-G*(q-E*(u*K+G*t+E*q)+x*v);r=u*(q-E*(u*K+G*t+E*q)+x*v)-E*(K-u*(u*K+G*t+E*q)+x*J);q=G*(K-u*(u*K+G*t+E*q)+x*J)-u*(t-G*(u*K+G*t+E*q)+x*D);t=(H-G*(I*u+H*G+F*E)-w*D)*E-(F-E*(I*u+H*G+F*E)-w*v)*G;v=(F-E*(I*u+H*G+F*E)-w*v)*u-(I-u*(I*u+H*G+F*E)-w*J)*E;u=(I-u*(I*u+H*G+F*E)-w*J)*G-(H-G*(I*u+H*G+F*E)-w*D)*u;if(!((p|0)!=0|(a[b+1280>>0]|0)==0)){t=w*t;v=w*v;u=w*u;s=x*s;r=x*r;q=x*q}C=(c[l+12>>2]|0)+(A<<2)|0;g[C>>2]=s;g[C+4>>2]=r;g[C+8>>2]=q;C=c[l+20>>2]|0;g[C+(A<<2)>>2]=-t;g[C+(A+1<<2)>>2]=-v;g[C+(A+2<<2)>>2]=-u}while(0);if(z|0?+g[d>>2]==+g[d+4>>2]:0){m=c[l+28>>2]|0;g[m+(A<<2)>>2]=0.0;q=0.0;e=l+28|0}else y=11;do if((y|0)==11){e=c[l+28>>2]|0;g[e+(A<<2)>>2]=0.0;if(!(m<<24>>24)){if(z|0){m=e;q=0.0;e=l+28|0;break}else m=1;return m|0}c[(c[l+32>>2]|0)+(A<<2)>>2]=c[d+28>>2];if(z|0){m=e;q=+g[e+(A<<2)>>2];e=l+28|0;break}v=+g[d+8>>2];q=o|0?v:-v;r=+g[d+52>>2];s=+g[d>>2];t=+g[d+4>>2];u=+g[l>>2]*+g[d+32>>2];do if(!(s>t))if(!(s==t)){if(q/u<0.0)if(r>=s?s-q/u>r:0){q=(s-r)/(q/u);break}else{q=r