#include <metal_stdlib>

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

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

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

