#include <metal_stdlib>

using namespace metal;
half2 subgroupExclusiveMul_e88d1c() {
  half2 res = simd_prefix_exclusive_product(half2(1.0h));
  return res;
}

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

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

