#include <metal_stdlib>

using namespace metal;
uint3 quadBroadcast_ae401e() {
  uint3 arg_0 = uint3(1u);
  uint3 res = quad_broadcast(arg_0,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;
}

