#include <metal_stdlib>

using namespace metal;
void textureStore_de4b94(texture1d<int, access::write> tint_symbol) {
  uint arg_1 = 1u;
  int4 arg_2 = int4(1);
  tint_symbol.write(arg_2, uint(arg_1));
}

fragment void fragment_main(texture1d<int, access::write> tint_symbol_1 [[texture(0)]]) {
  textureStore_de4b94(tint_symbol_1);
  return;
}

kernel void compute_main(texture1d<int, access::write> tint_symbol_2 [[texture(0)]]) {
  textureStore_de4b94(tint_symbol_2);
  return;
}

