#include <metal_stdlib>
using namespace metal;

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

void textureStore_d2b565(tint_module_vars_struct tint_module_vars) {
  tint_module_vars.arg_0.write(uint4(1u), uint3(1u));
}

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

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