#include <metal_stdlib>

using namespace metal;
uint4 subgroupShuffle_e13c81() {
  uint4 res = simd_shuffle(uint4(1u),1);
  return res;
}

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

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

