#include <metal_stdlib>

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

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

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

