#include <metal_stdlib>

using namespace metal;
uint3 subgroupBroadcastFirst_5e5b6f() {
  uint3 res = simd_broadcast_first(uint3(1u));
  return res;
}

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

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

