#include <metal_stdlib>
using namespace metal;

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

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

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

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