#include <metal_stdlib>

using namespace metal;
void textureStore_a9298c(texture1d<uint, access::read_write> tint_symbol) {
  tint_symbol.write(uint4(1u), uint(1u)); tint_symbol.fence();
}

fragment void fragment_main(texture1d<uint, access::read_write> tint_symbol_1 [[texture(0)]]) {
  textureStore_a9298c(tint_symbol_1);
  return;
}

kernel void compute_main(texture1d<uint, access::read_write> tint_symbol_2 [[texture(0)]]) {
  textureStore_a9298c(tint_symbol_2);
  return;
}

