#include <metal_stdlib>

using namespace metal;
int3 subgroupAdd_22d041() {
  int3 arg_0 = int3(1);
  int3 res = simd_sum(arg_0);
  return res;
}

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

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

