#include <metal_stdlib>

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

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

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

