#include <metal_stdlib>

using namespace metal;
int3 subgroupBroadcastFirst_e820d4() {
  int3 res = simd_broadcast_first(int3(1));
  return res;
}

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

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

