#include <metal_stdlib>
using namespace metal;

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

void textureStore_706236(tint_module_vars_struct tint_module_vars) {
  int arg_1 = 1;
  float4 arg_2 = float4(1.0f);
  float4 const v = arg_2;
  tint_module_vars.arg_0.write(v, uint(arg_1));
  const_cast<texture1d<float, access::read_write>thread &>(tint_module_vars.arg_0).fence();
}

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

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