#include <metal_stdlib>

using namespace metal;
uint4 subgroupShuffleXor_08f588() {
  uint4 arg_0 = uint4(1u);
  uint arg_1 = 1u;
  uint4 res = simd_shuffle_xor(arg_0,arg_1);
  return res;
}

fragment void fragment_main(device uint4* tint_symbol [[buffer(0)]]) {
  *(tint_symbol) = subgroupShuffleXor_08f588();
  return;
}

kernel void compute_main(device uint4* tint_symbol_1 [[buffer(0)]]) {
  *(tint_symbol_1) = subgroupShuffleXor_08f588();
  return;
}

