#include <metal_stdlib>

using namespace metal;
float tint_fwidth_fine(float v) {
  return (fabs(dfdx(v)) + fabs(dfdy(v)));
}

float fwidthFine_f1742d() {
  float arg_0 = 1.0f;
  float res = tint_fwidth_fine(arg_0);
  return res;
}

fragment void fragment_main(device float* tint_symbol [[buffer(0)]]) {
  *(tint_symbol) = fwidthFine_f1742d();
  return;
}

