#include <metal_stdlib>

using namespace metal;
void textureStore_b36bc1(texture3d<uint, access::read_write> tint_symbol) {
  uint3 arg_1 = uint3(1u);
  uint4 arg_2 = uint4(1u);
  tint_symbol.write(arg_2, uint3(arg_1)); tint_symbol.fence();
}

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

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

