#include <metal_stdlib>
using namespace metal;

struct tint_module_vars_struct {
  texture1d<int, access::write> arg_0;
};

void textureStore_bf775c(tint_module_vars_struct tint_module_vars) {
  int arg_1 = 1;
  int4 arg_2 = int4(1);
  int4 const v = arg_2;
  tint_module_vars.arg_0.write(v, uint(arg_1));
}

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

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