#include <metal_stdlib>

using namespace metal;
void textureStore_331aee(texture3d<float, access::write> tint_symbol) {
  int3 arg_1 = int3(1);
  float4 arg_2 = float4(1.0f);
  tint_symbol.write(arg_2, uint3(arg_1));
}

fragment void fragment_main(texture3d<float, access::write> tint_symbol_1 [[texture(0)]]) {
  textureStore_331aee(tint_symbol_1);
  return;
}

kernel void compute_main(texture3d<float, access::write> tint_symbol_2 [[texture(0)]]) {
  textureStore_331aee(tint_symbol_2);
  return;
}

