#include <metal_stdlib>

using namespace metal;
uint2 subgroupInclusiveAdd_9bbcb0() {
  uint2 res = simd_prefix_inclusive_sum(uint2(1u));
  return res;
}

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

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

