#include <metal_stdlib>
using namespace metal;

struct tint_module_vars_struct {
  device float4* prevent_dce;
};

float4 fwidthFine_68f4ef() {
  float4 const v = dfdx(float4(1.0f));
  float4 const v_1 = dfdy(float4(1.0f));
  float4 const v_2 = abs(v);
  float4 res = (v_2 + abs(v_1));
  return res;
}

fragment void fragment_main(device float4* 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_68f4ef();
}
