#include <metal_stdlib>

using namespace metal;
void textureStore_b7232c(texture1d<float, access::read_write> tint_symbol) {
  tint_symbol.write(float4(1.0f), uint(1u)); tint_symbol.fence();
}

fragment void fragment_main(texture1d<float, access::read_write> tint_symbol_1 [[texture(0)]]) {
  textureStore_b7232c(tint_symbol_1);
  return;
}

kernel void compute_main(texture1d<float, access::read_write> tint_symbol_2 [[texture(0)]]) {
  textureStore_b7232c(tint_symbol_2);
  return;
}

