#include <metal_stdlib>

using namespace metal;
void textureStore_75bbd5(texture2d_array<uint, access::read_write> tint_symbol) {
  int2 arg_1 = int2(1);
  uint arg_2 = 1u;
  uint4 arg_3 = uint4(1u);
  tint_symbol.write(arg_3, uint2(arg_1), arg_2); tint_symbol.fence();
}

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

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

