RWByteAddressBuffer prevent_dce : register(u0);

vector<float16_t, 3> subgroupMax_7c934c() {
  vector<float16_t, 3> res = WaveActiveMax((float16_t(1.0h)).xxx);
  return res;
}

void fragment_main() {
  prevent_dce.Store<vector<float16_t, 3> >(0u, subgroupMax_7c934c());
  return;
}

[numthreads(1, 1, 1)]
void compute_main() {
  prevent_dce.Store<vector<float16_t, 3> >(0u, subgroupMax_7c934c());
  return;
}
