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_5 = len ( var_0 ) + 1
      var_8 = var_6 = 0
      for var_11 in range ( 0 , var_5 - 1 , 2 ) :
          var_8 ^= var_0 [ var_11 ]
      for var_11 in range ( var_5 + 1 ) :
          var_6 ^= var_11
      var_12 = [ var_8 ^ var_6 ]
      for var_13 in var_0 [ : : - 1 ] :
          var_12.append ( var_12 [ - 1 ] ^ var_13 )
      return var_12 [ : : - 1 ]
  