#include <metal_stdlib>

using namespace metal;
void textureStore_e38281(texture2d_array<float, access::write> tint_symbol) {
  uint2 arg_1 = uint2(1u);
  uint arg_2 = 1u;
  float4 arg_3 = float4(1.0f);
  tint_symbol.write(arg_3, uint2(arg_1), arg_2);
}

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

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

