#include <metal_stdlib>
using namespace metal;

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

void textureStore_5b4522(tint_module_vars_struct tint_module_vars) {
  tint_module_vars.arg_0.write(uint4(1u), 1u);
  const_cast<texture1d<uint, access::read_write>thread &>(tint_module_vars.arg_0).fence();
}

fragment void fragment_main(texture1d<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_5b4522(tint_module_vars);
}

kernel void compute_main(texture1d<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_5b4522(tint_module_vars);
}
