#include <metal_stdlib>
using namespace metal;

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

void textureStore_33cec0(tint_module_vars_struct tint_module_vars) {
  uint2 arg_1 = uint2(1u);
  int arg_2 = 1;
  uint4 arg_3 = uint4(1u);
  tint_module_vars.arg_0.write(arg_3, arg_1, arg_2);
}

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

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