func matrixMultiplyAdd(a, b, c uint64) uint64 { a |= a << 16 a |= a << 32 const ( shift1 = 15 mask1 = 0b_0000_0000_0000_0000_1010_1010_1010_1010_0000_0000_0000_0000_1010_1010_1010_1010 ) swap1 := (a>>shift1 ^ a) & mask1 a ^= swap1 a ^= swap1 << shift1 const ( shift2 = 30 mask2 = 0b_0000_0000_0000_0000_0000_0000_0000_0000_1100_1100_1100_1100_1100_1100_1100_1100 ) swap2 := (a>>shift2 ^ a) & mask2 a ^= swap2 a ^= swap2 << shift2 b |= b << 16 b |= b << 32 const ( shift3 = 12 mask3 = 0b_0000_0000_0000_0000_1111_0000_1111_0000_0000_0000_0000_0000_1111_0000_1111_0000 ) swap3 := (b>>shift3 ^ b) & mask3 b ^= swap3 b ^= swap3 << shift3 const ( shift4 = 24 mask4 = 0b_0000_0000_0000_0000_0000_0000_0000_0000_1111_1111_0000_0000_1111_1111_0000_0000 ) swap4 := (b>>shift4 ^ b) & mask4 b ^= swap4 b ^= swap4 << shift4 c ^= a & b c ^= c >> 32 c ^= c >> 16 return c & (1<<8 - 1) }
To receive a hint, submit unfixed code.