fn max_ce7c30() {
  var arg_0 = 1;
  var arg_1 = 1;
  var res : i32 = max(arg_0, arg_1);
}

@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
  max_ce7c30();
  return vec4<f32>();
}

@stage(fragment)
fn fragment_main() {
  max_ce7c30();
}

@stage(compute) @workgroup_size(1)
fn compute_main() {
  max_ce7c30();
}
