#include <metal_stdlib>

using namespace metal;
uint textureNumLayers_9695c6(texture2d_array<uint, access::write> tint_symbol) {
  uint res = tint_symbol.get_array_size();
  return res;
}

fragment void fragment_main(device uint* tint_symbol_1 [[buffer(0)]], texture2d_array<uint, access::write> tint_symbol_2 [[texture(0)]]) {
  *(tint_symbol_1) = textureNumLayers_9695c6(tint_symbol_2);
  return;
}

kernel void compute_main(device uint* tint_symbol_3 [[buffer(0)]], texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
  *(tint_symbol_3) = textureNumLayers_9695c6(tint_symbol_4);
  return;
}

