#include <metal_stdlib>
using namespace metal;

struct tint_module_vars_struct {
  device int4* tint_symbol;
};

void deref(tint_module_vars_struct tint_module_vars) {
  device int4* const p = tint_module_vars.tint_symbol;
  (*tint_module_vars.tint_symbol) = (*p).wzyx;
}

void no_deref(tint_module_vars_struct tint_module_vars) {
  device int4* const p = tint_module_vars.tint_symbol;
  (*tint_module_vars.tint_symbol) = (*p).wzyx;
}

kernel void tint_symbol_1(device int4* tint_symbol [[buffer(0)]]) {
  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_symbol=tint_symbol};
  deref(tint_module_vars);
  no_deref(tint_module_vars);
}
