#include <metal_stdlib>
using namespace metal;

struct tint_module_vars_struct {
  threadgroup int* v;
};

struct tint_symbol_2 {
  int tint_symbol_1;
};

void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
  if ((tint_local_index == 0u)) {
    (*tint_module_vars.v) = 0;
  }
  threadgroup_barrier(mem_flags::mem_threadgroup);
  int const i = (*tint_module_vars.v);
}

kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_1 [[threadgroup(0)]]) {
  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&(*v_1).tint_symbol_1)};
  tint_symbol_inner(tint_local_index, tint_module_vars);
}
