#include <metal_stdlib>

using namespace metal;
int3 subgroupMul_5a8c86() {
  int3 arg_0 = int3(1);
  int3 res = simd_product(arg_0);
  return res;
}

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

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

