#include <metal_stdlib>

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

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

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

