#include <metal_stdlib>

using namespace metal;
uint quadBroadcast_a2d2b4() {
  uint res = quad_broadcast(1u,1);
  return res;
}

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

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

