#include <metal_stdlib>

using namespace metal;
uint3 quadBroadcast_ae401e() {
  uint3 res = quad_broadcast(uint3(1u),1u);
  return res;
}

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

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

