#include <metal_stdlib>

using namespace metal;
float textureSample_38bbb9(depth2d<float, access::sample> tint_symbol, sampler tint_symbol_1) {
  float2 arg_2 = float2(1.0f);
  float res = tint_symbol.sample(tint_symbol_1, arg_2);
  return res;
}

fragment void fragment_main(device float* tint_symbol_2 [[buffer(0)]], depth2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) {
  *(tint_symbol_2) = textureSample_38bbb9(tint_symbol_3, tint_symbol_4);
  return;
}

