#include <metal_stdlib>
using namespace metal;

struct tint_module_vars_struct {
  texture2d<uint, access::read_write> arg_0;
};

void textureStore_d0d62c(tint_module_vars_struct tint_module_vars) {
  int2 arg_1 = int2(1);
  uint4 arg_2 = uint4(1u);
  uint4 const v = arg_2;
  tint_module_vars.arg_0.write(v, uint2(arg_1));
  const_cast<texture2d<uint, access::read_write>thread &>(tint_module_vars.arg_0).fence();
}

fragment void fragment_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
  textureStore_d0d62c(tint_module_vars);
}

kernel void compute_main(texture2d<uint, access::read_write> arg_0 [[texture(0)]]) {
  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
  textureStore_d0d62c(tint_module_vars);
}
