#include <metal_stdlib>
#pragma clang diagnostic ignored "-Wparentheses-equality"
using namespace metal;
struct xlatMtlShaderInput {
  half2 xlv_TEXCOORD0;
};
struct xlatMtlShaderOutput {
  half4 _glesFragData_0 [[color(0)]];
};
struct xlatMtlShaderUniform {
};
fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]
  ,   texture2d<half> _MainTex [[texture(0)]], sampler _mtlsmp__MainTex [[sampler(0)]])
{
  xlatMtlShaderOutput _mtl_o;
  half4 xl_retval_1 = 0;
  half4 col_2 = 0;
  float4 mat_0_3 = 0;
  bool bar_4 = false;
  float4 foo_5 = 0;
  half4 tmpvar_6 = 0;
  tmpvar_6 = _MainTex.sample(_mtlsmp__MainTex, (float2)(_mtl_i.xlv_TEXCOORD0));
  col_2 = tmpvar_6;
  float4 tmpvar_7 = 0;
  if (bar_4) {
    tmpvar_7 = foo_5;
  } else {
    tmpvar_7 = float4(0.5, 0.5, 0.5, 0.5);
  };
  col_2 = (tmpvar_6 + (half4)(tmpvar_7));
  col_2 = (col_2 + (half4)(mat_0_3));
  xl_retval_1 = col_2;
  _mtl_o._glesFragData_0 = xl_retval_1;
  return _mtl_o;
}


// stats: 3 alu 1 tex 1 flow
// inputs: 1
//  #0: xlv_TEXCOORD0 (medium float) 2x1 [-1]
// textures: 1
//  #0: _MainTex (low 2d) 0x0 [-1] loc 0
