#include <metal_stdlib>
using namespace metal;

struct tint_module_vars_struct {
  device float2* prevent_dce;
};

float2 fwidthFine_ff6aa0() {
  float2 arg_0 = float2(1.0f);
  float2 const v = arg_0;
  float2 const v_1 = dfdx(v);
  float2 const v_2 = dfdy(v);
  float2 const v_3 = abs(v_1);
  float2 res = (v_3 + abs(v_2));
  return res;
}

fragment void fragment_main(device float2* 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) = fwidthFine_ff6aa0();
}
