Skip to main content
added 15 characters in body
Source Link

Java (OpenJDK 8), 351 343 339 320 318318 247 + 56 bytes

Just a near 1:1 port of the reference to start golfing from.

void f(int[]x,int y,int z){int q=x[y];x[y]=x[z];x[z]=q;}

s->{for(int r=24,c,x,y,z;r>0;--r){for(c=0;c<4;x=s[c]<<24|s[c]>>>8,y=s[4+c]<<9|s[4+c]>>>23,z=s[8+c],s[8+c]=x^z<<1^(y&z)<<2,s[4+c]=y^x^(x|z)<<1,s[c++]=z^y^(x&y)<<3);if((r&3)<1==2){x=s[0];s[0]=s[1];s[1]=x;x=s[2];s[2]=s[3];s[3]=x;}if(f(r&3s,0,2)==2;f(s,1,3){x=s[0];s[0]=s[2];s[2]=x;x=s[1];s[1]=s[3];s[3]=x;;}if((r&3)<1)s[0]^=0x9e377900|r;{f(s,0,1);f(s,2,3);s[0]^=0x9e377900|r;}}}

Try it online!Try it online!

Java (OpenJDK 8), 351 343 339 320 318 bytes

Just a near 1:1 port of the reference to start golfing from.

s->{for(int r=24,c,x,y,z;r>0;--r){for(c=0;c<4;x=s[c]<<24|s[c]>>>8,y=s[4+c]<<9|s[4+c]>>>23,z=s[8+c],s[8+c]=x^z<<1^(y&z)<<2,s[4+c]=y^x^(x|z)<<1,s[c++]=z^y^(x&y)<<3);if((r&3)<1){x=s[0];s[0]=s[1];s[1]=x;x=s[2];s[2]=s[3];s[3]=x;}if((r&3)==2){x=s[0];s[0]=s[2];s[2]=x;x=s[1];s[1]=s[3];s[3]=x;}if((r&3)<1)s[0]^=0x9e377900|r;}}

Try it online!

Java (OpenJDK 8), 351 343 339 320 318 247 + 56 bytes

Just a near 1:1 port of the reference to start golfing from.

void f(int[]x,int y,int z){int q=x[y];x[y]=x[z];x[z]=q;}

s->{for(int r=24,c,x,y,z;r>0;--r){for(c=0;c<4;x=s[c]<<24|s[c]>>>8,y=s[4+c]<<9|s[4+c]>>>23,z=s[8+c],s[8+c]=x^z<<1^(y&z)<<2,s[4+c]=y^x^(x|z)<<1,s[c++]=z^y^(x&y)<<3);if((r&3)==2){f(s,0,2);f(s,1,3);}if((r&3)<1){f(s,0,1);f(s,2,3);s[0]^=0x9e377900|r;}}}

Try it online!

added 9 characters in body
Source Link

Java (OpenJDK 8), 351 343 339 320320 318 bytes

Just a near 1:1 port of the reference to start golfing from.

s->{for(int r=24,c,x,y,z;r>0;--r){for(c=0;c<4;x=s[c]<<24|s[c]>>>8,y=s[4+c]<<9|s[4+c]>>>23,z=s[8+c],s[8+c]=x^z<<1^(y&z)<<2,s[4+c]=y^x^(x|z)<<1,s[c++]=z^y^(x&y)<<3);if((r&3)==0<1){x=s[0];s[0]=s[1];s[1]=x;x=s[2];s[2]=s[3];s[3]=x;}if((r&3)==2){x=s[0];s[0]=s[2];s[2]=x;x=s[1];s[1]=s[3];s[3]=x;}if((r&3)==0<1)s[0]^=0x9e377900|r;}}

Try it online!Try it online!

Java (OpenJDK 8), 351 343 339 320 bytes

Just a near 1:1 port of the reference to start golfing from.

s->{for(int r=24,c,x,y,z;r>0;--r){for(c=0;c<4;x=s[c]<<24|s[c]>>>8,y=s[4+c]<<9|s[4+c]>>>23,z=s[8+c],s[8+c]=x^z<<1^(y&z)<<2,s[4+c]=y^x^(x|z)<<1,s[c++]=z^y^(x&y)<<3);if((r&3)==0){x=s[0];s[0]=s[1];s[1]=x;x=s[2];s[2]=s[3];s[3]=x;}if((r&3)==2){x=s[0];s[0]=s[2];s[2]=x;x=s[1];s[1]=s[3];s[3]=x;}if((r&3)==0)s[0]^=0x9e377900|r;}}

Try it online!

Java (OpenJDK 8), 351 343 339 320 318 bytes

Just a near 1:1 port of the reference to start golfing from.

s->{for(int r=24,c,x,y,z;r>0;--r){for(c=0;c<4;x=s[c]<<24|s[c]>>>8,y=s[4+c]<<9|s[4+c]>>>23,z=s[8+c],s[8+c]=x^z<<1^(y&z)<<2,s[4+c]=y^x^(x|z)<<1,s[c++]=z^y^(x&y)<<3);if((r&3)<1){x=s[0];s[0]=s[1];s[1]=x;x=s[2];s[2]=s[3];s[3]=x;}if((r&3)==2){x=s[0];s[0]=s[2];s[2]=x;x=s[1];s[1]=s[3];s[3]=x;}if((r&3)<1)s[0]^=0x9e377900|r;}}

Try it online!

deleted 22 characters in body
Source Link

Java (OpenJDK 8), 351 343 339339 320 bytes

Just a near 1:1 port of the reference to start golfing from.

s->{for(int r=24,c,x,y,z;for(;r>0;z;r>0;--r){for(c=0;c<4;x=(s[c]<<24)|(s[c]>>>(8))c=0;c<4;x=s[c]<<24|s[c]>>>8,y=(s[4+c]<<9)|(s[4+c]>>>23)y=s[4+c]<<9|s[4+c]>>>23,z=s[8+c],s[8+c]=x^(z<<1)^(s[8+c]=x^z<<1^(y&z)<<2),s[4+c]=y^x^((x|z)<<1),s[c++]=z^y^((x&y)<<3));if((r&3)==0){x=s[0];s[0]=s[1];s[1]=x;x=s[2];s[2]=s[3];s[3]=x;}if((r&3)==2){x=s[0];s[0]=s[2];s[2]=x;x=s[1];s[1]=s[3];s[3]=x;}if((r&3)==0)s[0]^=0x9e377900|r;}}

Try it online!Try it online!

Java (OpenJDK 8), 351 343 339 bytes

Just a near 1:1 port of the reference to start golfing from.

s->{int r=24,c,x,y,z;for(;r>0;--r){for(c=0;c<4;x=(s[c]<<24)|(s[c]>>>(8)),y=(s[4+c]<<9)|(s[4+c]>>>23),z=s[8+c],s[8+c]=x^(z<<1)^((y&z)<<2),s[4+c]=y^x^((x|z)<<1),s[c++]=z^y^((x&y)<<3));if((r&3)==0){x=s[0];s[0]=s[1];s[1]=x;x=s[2];s[2]=s[3];s[3]=x;}if((r&3)==2){x=s[0];s[0]=s[2];s[2]=x;x=s[1];s[1]=s[3];s[3]=x;}if((r&3)==0)s[0]^=0x9e377900|r;}}

Try it online!

Java (OpenJDK 8), 351 343 339 320 bytes

Just a near 1:1 port of the reference to start golfing from.

s->{for(int r=24,c,x,y,z;r>0;--r){for(c=0;c<4;x=s[c]<<24|s[c]>>>8,y=s[4+c]<<9|s[4+c]>>>23,z=s[8+c],s[8+c]=x^z<<1^(y&z)<<2,s[4+c]=y^x^(x|z)<<1,s[c++]=z^y^(x&y)<<3);if((r&3)==0){x=s[0];s[0]=s[1];s[1]=x;x=s[2];s[2]=s[3];s[3]=x;}if((r&3)==2){x=s[0];s[0]=s[2];s[2]=x;x=s[1];s[1]=s[3];s[3]=x;}if((r&3)==0)s[0]^=0x9e377900|r;}}

Try it online!

added 5 characters in body
Source Link
Loading
added 6 characters in body
Source Link
Loading
Source Link
Loading