#include <metal_stdlib>

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

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;
}

