#include <metal_stdlib>
using namespace metal;

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

void textureStore_145061(tint_module_vars_struct tint_module_vars) {
  uint2 arg_1 = uint2(1u);
  uint4 arg_2 = uint4(1u);
  tint_module_vars.arg_0.write(arg_2, 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_145061(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_145061(tint_module_vars);
}
