#include <metal_stdlib>

using namespace metal;
float3 subgroupExclusiveMul_0a04d5() {
  float3 res = simd_prefix_exclusive_product(float3(1.0f));
  return res;
}

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

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

