#include <metal_stdlib>
using namespace metal;

struct tint_module_vars_struct {
  device float* prevent_dce;
  depthcube_array<float, access::sample> arg_0;
  sampler arg_1;
};

float textureSample_7fd8cb(tint_module_vars_struct tint_module_vars) {
  float3 arg_2 = float3(1.0f);
  uint arg_3 = 1u;
  float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, arg_2, arg_3);
  return res;
}

fragment void fragment_main(device float* prevent_dce [[buffer(0)]], depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .arg_0=arg_0, .arg_1=arg_1};
  (*tint_module_vars.prevent_dce) = textureSample_7fd8cb(tint_module_vars);
}
