#include <metal_stdlib>

using namespace metal;
int2 quadBroadcast_f5f923() {
  int2 arg_0 = int2(1);
  int2 res = quad_broadcast(arg_0,1u);
  return res;
}

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

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

