Skip to content

Instantly share code, notes, and snippets.

@m-ender
Last active August 29, 2015 14:05
Show Gist options
  • Save m-ender/6a8abb56d9bcf393e8a9 to your computer and use it in GitHub Desktop.
Save m-ender/6a8abb56d9bcf393e8a9 to your computer and use it in GitHub Desktop.
function z(y,_,$)
{
M=[];
N=[];
O=[];
C=1792814437;
P=72;
r=t=0;
(
f=function(a,k,L)
{
if (k<a.length)
{
for (L=a[k],a[k]=0; a[k]<L; a[k]++)
f(a, k+1)
}
else
if (!t)
{
f([P-1,P-1],0,++t);
N=M;
while (t<2*P)
{
s = !(t&1);
f([P,P,P,P], 0, ++t);
r=r||(s?0:t);
t&1&&(N=O);
O=[]
}
}
else
(
(t<2) &&
(
(
(d = P*a[0]+(P+1)*a[1]+P) < (P<<6)
) &&
(
M[d] = (((y^~_)>>a[0]) + ((_^~$)>>(a[0]-32))) & 1
),
(
(a[1] < P-a[0]) &&
(M[a[1]+(P+1)*a[0]]=(($^C)>>a[0]+16-a[1])&1)
) || 1
)
) ||
(
(t&1) &&
(
(
O[P*a[2]+a[3]] |= M[a[1]+P*a[2]] & N[P*a[0]+a[3]] && !(a[0]-a[1])
) || 1
)
) ||
(
s |= N[(a[0]+1)*a[1]+a[3]]
);
}
)([],0,0);
return r;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment