#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
  device int* non_uniform_global;
  device float* output;
  thread bool* continue_execution;
};

fragment void tint_symbol(device int* non_uniform_global [[buffer(0)]], device float* output [[buffer(1)]]) {
  thread bool continue_execution = true;
  tint_module_vars_struct const tint_module_vars = {.non_uniform_global=non_uniform_global, .output=output, .continue_execution=(&continue_execution)};
  if (((*tint_module_vars.non_uniform_global) < 0)) {
    (*tint_module_vars.continue_execution) = false;
  }
  float const v = dfdx(1.0f);
  if ((*tint_module_vars.continue_execution)) {
    (*tint_module_vars.output) = v;
  }
  if (!((*tint_module_vars.continue_execution))) {
    discard_fragment();
  }
}
