#include <metal_stdlib>

using namespace metal;
float4 textureSampleBias_6a9113(texture2d<float, access::sample> tint_symbol, sampler tint_symbol_1) {
  float2 arg_2 = float2(1.0f);
  float arg_3 = 1.0f;
  float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3));
  return res;
}

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

