#include <metal_stdlib>

using namespace metal;
half subgroupExclusiveMul_6f431e() {
  half res = simd_prefix_exclusive_product(1.0h);
  return res;
}

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

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

