#include <metal_stdlib>

using namespace metal;
uint3 subgroupInclusiveMul_359176() {
  uint3 arg_0 = uint3(1u);
  uint3 res = simd_prefix_inclusive_product(arg_0);
  return res;
}

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

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

