func transpose(a *[64]uint64) { var ( dist = uint(32) mask = ^uint64(0) >> 32 ) for { for i1 := uint(0); i1 < 64; { var ( i2 = i1 + dist a1 = a[i1] a2 = a[i2] xor = a1>>dist ^ a2 edit = xor & mask ) a[i1] = a1 ^ edit a[i2] = a2 ^ edit<<dist i1 += 1 + dist i1 &^= dist } if dist >>= 1; dist == 0 { break } mask ^= mask << dist } }
To receive a hint, submit unfixed code.