#include <metal_stdlib>

using namespace metal;
float2 subgroupBroadcast_5196c8() {
  float2 arg_0 = float2(1.0f);
  float2 res = simd_broadcast(arg_0,ushort(1u));
  return res;
}

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

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

