#include <metal_stdlib>

using namespace metal;
half3 quadBroadcast_ef7d5d() {
  half3 arg_0 = half3(1.0h);
  half3 res = quad_broadcast(arg_0,1u);
  return res;
}

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

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

