#include <metal_stdlib>
using namespace metal;

struct tint_module_vars_struct {
  device float* prevent_dce;
};

float quadBroadcast_960c6b() {
  float arg_0 = 1.0f;
  float res = quad_broadcast(arg_0, 1u);
  return res;
}

fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
  (*tint_module_vars.prevent_dce) = quadBroadcast_960c6b();
}

kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
  (*tint_module_vars.prevent_dce) = quadBroadcast_960c6b();
}
