#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
  device float3* prevent_dce;
};
struct vertex_main_outputs {
  float4 tint_symbol [[position]];
};

void clamp_867397(tint_module_vars_struct tint_module_vars) {
  float3 res = float3(1.0f);
  (*tint_module_vars.prevent_dce) = res;
}
float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
  clamp_867397(tint_module_vars);
  return float4(0.0f);
}
fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
  clamp_867397(tint_module_vars);
}
kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
  clamp_867397(tint_module_vars);
}
vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
