#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
  depth2d_array<float, access::sample> arg_0;
  sampler arg_1;
  device float* prevent_dce;
};

void textureSample_60bf45(tint_module_vars_struct tint_module_vars) {
  float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), 1, int2(1));
  (*tint_module_vars.prevent_dce) = res;
}
fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]], device float* prevent_dce [[buffer(0)]]) {
  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1, .prevent_dce=prevent_dce};
  textureSample_60bf45(tint_module_vars);
}
