comefrom: <doocs>1734.Decode XORed Permutation_1.py
code: def decode( encoded: List[int]) -> List[int]:
      n = len(encoded) + 1
      a = b = 0
      for i in range(0, n - 1, 2):
          a ^= encoded[i]
      for i in range(n + 1):
          b ^= i
      ans = [a ^ b]
      for e in encoded[::-1]:
          ans.append(ans[-1] ^ e)
      return ans[::-1]
masked: def sample_funcname ( var_0 : List [ int ] ) -> List [ int ] :
      var_1 = len ( var_0 ) + 1
      var_3 = var_2 = 0
      for var_4 in range ( 0 , var_1 - 1 , 2 ) :
          var_3 ^= var_0 [ var_4 ]
      for var_4 in range ( var_1 + 1 ) :
          var_2 ^= var_4
      var_5 = [ var_3 ^ var_2 ]
      for var_6 in var_0 [ : : - 1 ] :
          var_5.append ( var_5 [ - 1 ] ^ var_6 )
      return var_5 [ : : - 1 ]
  