// Directional Lighting - Max Quality

cbuffer _Globals : register(b0)
{
  row_major float4x4 m_shadow : packoffset(c0);
  float3 view_shadow_proj : packoffset(c4);
}

cbuffer static_globals : register(b1)
{
  row_major float3x4 m_V : packoffset(c0);
  row_major float4x4 m_P : packoffset(c3);
  row_major float4x4 m_VP : packoffset(c7);
  float4 timers : packoffset(c11);
  float4 fog_plane : packoffset(c12);
  float4 fog_params : packoffset(c13);
  float4 fog_color : packoffset(c14);
  float4 L_ambient : packoffset(c15);
  float3 L_sun_color : packoffset(c16);
  float3 L_sun_dir_w : packoffset(c17);
  float4 L_hemi_color : packoffset(c18);
  float3 eye_position : packoffset(c19);
  float4 pos_decompression_params : packoffset(c20);
  float4 pos_decompression_params2 : packoffset(c21);
}

cbuffer dynamic_light : register(b2)
{
  float4 Ldynamic_color : packoffset(c0);
  float4 Ldynamic_pos : packoffset(c1);
  float4 Ldynamic_dir : packoffset(c2);
}

SamplerState smp_nofilter_s : register(s0);
SamplerState smp_material_s : register(s1);
SamplerComparisonState smp_smap_s : register(s2);
Texture2D<float4> s_smap : register(t0);
Texture2DMS<float4,4> s_position : register(t1);
Texture3D<float4> s_material : register(t2);
Texture2D<float> s_smap_minmax : register(t3);


// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main( 
  float4 v0 : TEXCOORD0,
  float4 v1 : SV_Position0,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = (int2)v1.xy;
  r0.zw = float2(0,0);
  r0.xyzw = s_position.Load(r0.xy, 0).xyzw;
  r1.xy = v1.xy * pos_decompression_params.zw + -pos_decompression_params.xy;
  r1.xy = r1.xy * r0.zz;
float4 stereo = StereoParams.Load(0);
float4 params = IniParams.Load(0);
r1.x -= stereo.x * (r0.z - stereo.y)/m_P._m00;
  r2.x = abs(r0.y) * 2 + -1;
  r0.y = cmp(r0.y < 0);
  r0.y = r0.y ? -1 : 1;
  r1.w = -r2.x * r2.x + 1;
  r1.w = -r0.x * r0.x + r1.w;
  r1.w = sqrt(abs(r1.w));
  r2.y = r1.w * r0.y;
  if (4 == 0) r0.y = 0; else if (4+21 < 32) {   r0.y = (uint)r0.w << (32-(4 + 21)); r0.y = (uint)r0.y >> (32-4);  } else r0.y = (uint)r0.w >> 21;
  r0.w = (int)r0.w & 0x80000000;
  r0.w = r0.w ? 16 : 0;
  bitmask.y = ((~(-1 << 4)) << 0) & 0xffffffff;
  r0.y = (((uint)r0.y << 0) & bitmask.y) | ((uint)r0.w & ~bitmask.y);
  r0.y = (uint)r0.y;
  r3.z = 0.0430107526 * r0.y;
  r2.z = r0.x;
  r1.z = r0.z;
  r0.xyz = r2.xyz * float3(0.0149999997,0.0149999997,0.0149999997) + r1.xyz;
  r1.x = dot(r0.xyz, r0.xyz);
  r1.x = rsqrt(r1.x);
  r1.xyz = -r0.xyz * r1.xxx + -Ldynamic_dir.xyz;
  r1.w = dot(r1.xyz, r1.xyz);
  r1.w = rsqrt(r1.w);
  r1.xyz = r1.xyz * r1.www;
  r3.x = dot(-Ldynamic_dir.xyz, r2.xyz);
  r3.y = dot(r1.xyz, r2.xyz);
  r1.xy = s_material.Sample(smp_material_s, r3.xyz).xy;
  r0.w = 1;
  r2.y = dot(m_shadow._m00_m01_m02_m03, r0.xyzw);
  r2.z = dot(m_shadow._m10_m11_m12_m13, r0.xyzw);
  r2.x = dot(m_shadow._m20_m21_m22_m23, r0.xyzw);
  r0.x = dot(m_shadow._m30_m31_m32_m33, r0.xyzw);
  r0.xyz = r2.xyz / r0.xxx;
  r1.zw = float2(512,512) * r0.yz;
  r1.zw = frac(r1.zw);
  r2.xy = -r1.zw * float2(0.001953125,0.001953125) + r0.yz;
  r0.w = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(-1, 0)).x;
  r2.z = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(0, 0)).x;
  r2.w = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(0, -1)).x;
  r3.w = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(-1, -1)).x;
  r4.x = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(1, 0)).x;
  r4.y = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(2, 0)).x;
  r4.z = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(2, -1)).x;
  r5.w = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(1, -1)).x;
  r4.w = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(-1, 2)).x;
  r6.x = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(0, 2)).x;
  r6.y = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(0, 1)).x;
  r7.w = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(-1, 1)).x;
  r6.z = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(1, 2)).x;
  r6.w = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(2, 2)).x;
  r8.z = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(2, 1)).x;
  r2.x = s_smap_minmax.SampleLevel(smp_nofilter_s, r2.xy, 0, int2(1, 1)).x;
  r3.x = r0.w;
  r3.yz = r2.zw;
  r9.xyzw = cmp(r3.xyzw >= float4(0,0,0,0));
  r9.xyzw = r9.xyzw ? float4(1,1,1,1) : 0;
  r5.xyz = r4.xyz;
  r10.xyzw = cmp(r5.xyzw >= float4(0,0,0,0));
  r10.xyzw = r10.xyzw ? float4(1,1,1,1) : 0;
  r9.xyzw = (int4)r9.xyzw * (int4)r10.xyzw;
  r7.x = r4.w;
  r7.yz = r6.xy;
  r4.xyzw = cmp(r7.xyzw >= float4(0,0,0,0));
  r4.xyzw = r4.xyzw ? float4(1,1,1,1) : 0;
  r4.xyzw = (int4)r9.xyzw * (int4)r4.xyzw;
  r8.xy = r6.zw;
  r8.w = r2.x;
  r9.xyzw = cmp(r8.xyzw >= float4(0,0,0,0));
  r9.xyzw = r9.xyzw ? float4(1,1,1,1) : 0;
  r4.xyzw = (int4)r4.xyzw * (int4)r9.xyzw;
  r4.xyzw = cmp((int4)r4.xyzw != int4(0,0,0,0));
  r2.yw = r4.zw ? r4.xy : 0;
  r0.w = (int)r2.w & (int)r2.y;
  r4.xyzw = cmp(r3.xyzw < float4(0,0,0,0));
  r4.xyzw = r4.xyzw ? float4(1,1,1,1) : 0;
  r9.xyzw = cmp(r5.xyzw < float4(0,0,0,0));
  r9.xyzw = r9.xyzw ? float4(1,1,1,1) : 0;
  r4.xyzw = (int4)r4.xyzw * (int4)r9.xyzw;
  r9.xyzw = cmp(r7.xyzw < float4(0,0,0,0));
  r9.xyzw = r9.xyzw ? float4(1,1,1,1) : 0;
  r4.xyzw = (int4)r4.xyzw * (int4)r9.xyzw;
  r9.xyzw = cmp(r8.xyzw < float4(0,0,0,0));
  r9.xyzw = r9.xyzw ? float4(1,1,1,1) : 0;
  r4.xyzw = (int4)r4.xyzw * (int4)r9.xyzw;
  r4.xyzw = cmp((int4)r4.xyzw != int4(0,0,0,0));
  r2.yw = r4.zw ? r4.xy : 0;
  r2.y = (int)r2.w & (int)r2.y;
  r4.xyz = float3(-0.000500000024,-0.5,-0.5) + r0.xyz;
  r9.xyzw = cmp(-r3.xyzw < r4.xxxx);
  r9.xyzw = r9.xyzw ? float4(1,1,1,1) : 0;
  r10.xyzw = cmp(-r5.xyzw < r4.xxxx);
  r10.xyzw = r10.xyzw ? float4(1,1,1,1) : 0;
  r9.xyzw = (int4)r9.xyzw * (int4)r10.xyzw;
  r10.xyzw = cmp(-r7.xyzw < r4.xxxx);
  r10.xyzw = r10.xyzw ? float4(1,1,1,1) : 0;
  r9.xyzw = (int4)r9.xyzw * (int4)r10.xyzw;
  r8.xyzw = cmp(-r8.xyzw < r4.xxxx);
  r8.xyzw = r8.xyzw ? float4(1,1,1,1) : 0;
  r8.xyzw = (int4)r9.xyzw * (int4)r8.xyzw;
  r8.xyzw = cmp((int4)r8.xyzw != int4(0,0,0,0));
  r3.xz = r8.zw ? r8.xy : 0;
  r2.w = (int)r3.z & (int)r3.x;
  r8.w = (int)r2.w & (int)r2.y;
  r2.y = r5.x + -r3.y;
  r2.y = r1.z * r2.y + r2.z;
  r2.x = -r7.z + r2.x;
  r1.z = r1.z * r2.x + r6.y;
  r1.z = r1.z + -r2.y;
  r1.z = r1.w * r1.z + r2.y;
  r1.w = -9.99999975e-005 + r0.x;
  r8.x = cmp(r1.z >= r1.w);
  r8.yz = float2(-1,0);
  r2.xy = r0.ww ? r8.xy : r8.zw;
  if (r2.y != 0) {
    r0.w = cmp((int)r2.x == -1);
    if (r0.w != 0) {
      r0.w = 1;
    } else {
      r0.w = s_smap.SampleCmpLevelZero(smp_smap_s, r0.yz, r0.x).x;
    }
  } else {
    r2.xy = r0.yz * float2(2048,2048) + float2(0.5,0.5);
    r2.zw = floor(r2.xy);
    r2.xy = r2.xy + -r2.zw;
    r0.xy = -r2.xy * float2(0.00048828125,0.00048828125) + r0.yz;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-5, -5)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r0.z = dot(r5.xyzw, float4(1,1,1,1));
    r1.z = dot(r3.xyzw, r5.xyzw);
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-3, -5)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-1, -5)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(1, -5)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(3, -5)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(5, -5)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-5, -3)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-3, -3)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-1, -3)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(1, -3)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(3, -3)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(5, -3)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-5, -1)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-3, -1)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-1, -1)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(1, -1)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(3, -1)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(5, -1)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-5, 1)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-3, 1)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-1, 1)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(1, 1)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(3, 1)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(5, 1)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-5, 3)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-3, 3)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-1, 3)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(1, 3)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(3, 3)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(5, 3)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-5, 5)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-3, 5)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(-1, 5)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(1, 5)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(3, 5)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r3.xyzw = s_smap.Gather(smp_nofilter_s, r0.xy, int2(5, 5)).xyzw;
    r5.xyzw = cmp(r3.xyzw >= r1.wwww);
    r5.xyzw = r5.xyzw ? float4(0,0,0,0) : float4(1,1,1,1);
    r2.z = dot(r5.xyzw, float4(1,1,1,1));
    r0.z = r2.z + r0.z;
    r2.z = dot(r3.xyzw, r5.xyzw);
    r1.z = r2.z + r1.z;
    r2.z = cmp(0 < r0.z);
    r0.z = r1.z / r0.z;
    r1.z = r1.w + -r0.z;
    r1.z = 300 * r1.z;
    r0.z = saturate(r1.z / r0.z);
    r0.z = r0.z * r0.z;
    r0.z = r2.z ? r0.z : 0;
    r1.z = r0.z * r0.z;
    r2.z = r1.z * r0.z;
    r2.w = 3 * r1.z;
    r3.x = 1 + -r0.z;
    r3.y = r3.x * r2.w;
    r3.z = 0.200000003 * r3.y;
    r3.w = r3.y * 0.200000003 + r2.z;
    r4.x = 14 * r2.z;
    r4.x = r3.w * 10 + r4.x;
    r4.w = r3.x * r3.x;
    r5.x = r4.w * r0.z;
    r5.y = 3 * r5.x;
    r5.xz = r5.xx * float2(3,0.600000024) + r3.yy;
    r5.xz = r1.zz * r0.zz + r5.xz;
    r3.y = r5.z * 7 + r4.x;
    r3.y = r3.y + r3.w;
    r3.y = r2.z * 2 + r3.y;
    r3.y = r3.y + r3.w;
    r3.y = r3.y + r5.z;
    r3.y = r5.x * 5 + r3.y;
    r3.y = r3.y + r5.z;
    r3.y = r3.y + r3.w;
    r3.y = r2.z * 2 + r3.y;
    r3.y = r3.y + r3.w;
    r3.y = r3.y + r5.z;
    r3.y = r3.y + r5.x;
    r4.x = r4.w * r3.x;
    r4.x = r4.x * 0.100000001 + r5.y;
    r4.x = r2.w * r3.x + r4.x;
    r4.x = r1.z * r0.z + r4.x;
    r3.y = r4.x * 3 + r3.y;
    r3.y = r3.y + r5.x;
    r3.y = r3.y + r5.z;
    r3.y = r3.y + r3.w;
    r3.y = r2.z * 2 + r3.y;
    r3.y = r3.y + r3.w;
    r3.y = r3.y + r5.z;
    r3.y = r3.y + r5.x;
    r3.y = r3.y + r4.x;
    r4.w = r4.w * r3.x + r5.y;
    r2.w = r2.w * r3.x + r4.w;
    r2.w = r1.z * r0.z + r2.w;
    r3.x = r3.y + r2.w;
    r3.x = r3.x + r4.x;
    r3.x = r3.x + r5.x;
    r3.x = r3.x + r5.z;
    r3.x = r3.x + r3.w;
    r3.x = r2.z * 2 + r3.x;
    r3.x = r3.x + r3.w;
    r3.x = r3.x + r5.z;
    r3.x = r3.x + r5.x;
    r3.x = r4.x * 3 + r3.x;
    r3.x = r3.x + r5.x;
    r3.x = r3.x + r5.z;
    r3.x = r3.x + r3.w;
    r3.x = r2.z * 2 + r3.x;
    r3.x = r3.x + r3.w;
    r3.x = r3.x + r5.z;
    r3.x = r5.x * 5 + r3.x;
    r3.x = r3.x + r5.z;
    r3.x = r3.x + r3.w;
    r3.x = r2.z * 2 + r3.x;
    r3.x = r3.x + r3.w;
    r3.x = r5.z * 7 + r3.x;
    r3.x = r3.x + r3.w;
    r3.x = r2.z * 2 + r3.x;
    r3.x = r3.w * 9 + r3.x;
    r3.x = r2.z * 12 + r3.x;
    r6.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-5,-5)).xyzw;
    r3.y = 1 + -r2.y;
    r4.w = -r2.z * r2.x + r2.z;
    r5.yw = r6.wx * r4.ww;
    r6.xz = r6.zy * r2.zz + r5.yw;
    r5.y = r6.z * r2.y;
    r5.y = r3.y * r6.x + r5.y;
    r7.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-3,-5)).xyzw;
    r6.x = dot(r7.wz, r2.zz);
    r5.y = r3.y * r6.x + r5.y;
    r6.x = dot(r7.xy, r2.zz);
    r5.y = r2.y * r6.x + r5.y;
    r8.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-1,-5)).xyzw;
    r6.x = dot(r8.wz, r2.zz);
    r5.y = r3.y * r6.x + r5.y;
    r6.x = dot(r8.xy, r2.zz);
    r5.y = r2.y * r6.x + r5.y;
    r9.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(1,-5)).xyzw;
    r6.x = dot(r9.wz, r2.zz);
    r5.y = r3.y * r6.x + r5.y;
    r6.x = dot(r9.xy, r2.zz);
    r5.y = r2.y * r6.x + r5.y;
    r10.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(3,-5)).xyzw;
    r6.x = dot(r10.wz, r2.zz);
    r5.y = r3.y * r6.x + r5.y;
    r6.x = dot(r10.xy, r2.zz);
    r5.y = r2.y * r6.x + r5.y;
    r11.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(5,-5)).xyzw;
    r6.xz = r11.zy * r2.xx;
    r6.xz = r6.xz * r2.zz;
    r6.xw = r11.wx * r2.zz + r6.xz;
    r5.y = r3.y * r6.x + r5.y;
    r5.y = r2.y * r6.w + r5.y;
    r12.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-5,-3)).xyzw;
    r0.z = r1.z * r0.z + -r3.w;
    r0.z = r2.x * r0.z + r3.w;
    r6.xw = r12.yz * r0.zz;
    r6.xw = r12.xw * r4.ww + r6.xw;
    r1.z = r3.y * r6.w + r5.y;
    r1.z = r2.y * r6.x + r1.z;
    r5.y = r6.y * r0.z + r5.w;
    r1.z = r3.y * r5.y + r1.z;
    r1.z = r2.y * r6.w + r1.z;
    r12.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-3,-3)).xyzw;
    r5.y = -r5.z + r3.w;
    r5.y = r2.x * r5.y + r5.z;
    r6.yw = r12.wx * r5.yy;
    r7.zw = r12.zy * r5.zz + r6.yw;
    r1.z = r3.y * r7.z + r1.z;
    r1.z = r2.y * r7.w + r1.z;
    r5.w = dot(r7.xy, r3.ww);
    r1.z = r3.y * r5.w + r1.z;
    r5.w = dot(r12.wz, r3.ww);
    r1.z = r2.y * r5.w + r1.z;
    r7.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-1,-3)).xyzw;
    r5.w = dot(r7.wz, r5.zz);
    r1.z = r3.y * r5.w + r1.z;
    r5.w = dot(r7.xy, r5.zz);
    r1.z = r2.y * r5.w + r1.z;
    r5.w = dot(r8.xy, r3.ww);
    r1.z = r3.y * r5.w + r1.z;
    r5.w = dot(r7.wz, r3.ww);
    r1.z = r2.y * r5.w + r1.z;
    r8.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(1,-3)).xyzw;
    r5.w = dot(r8.wz, r5.zz);
    r1.z = r3.y * r5.w + r1.z;
    r5.w = dot(r8.xy, r5.zz);
    r1.z = r2.y * r5.w + r1.z;
    r5.w = dot(r9.xy, r3.ww);
    r1.z = r3.y * r5.w + r1.z;
    r5.w = dot(r8.wz, r3.ww);
    r1.z = r2.y * r5.w + r1.z;
    r9.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(3,-3)).xyzw;
    r5.w = r5.z + -r3.w;
    r5.w = r2.x * r5.w + r3.w;
    r7.zw = r9.zy * r5.ww;
    r8.zw = r9.wx * r5.zz + r7.zw;
    r1.z = r3.y * r8.z + r1.z;
    r1.z = r2.y * r8.w + r1.z;
    r6.y = dot(r10.xy, r3.ww);
    r1.z = r3.y * r6.y + r1.z;
    r6.y = dot(r9.wz, r3.ww);
    r1.z = r2.y * r6.y + r1.z;
    r10.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(5,-3)).xyzw;
    r3.z = r2.x * r3.z + r2.z;
    r8.zw = r10.yz * r2.xx;
    r8.zw = r8.zw * r2.zz;
    r8.zw = r10.xw * r3.zz + r8.zw;
    r1.z = r3.y * r8.w + r1.z;
    r1.z = r2.y * r8.z + r1.z;
    r6.y = r11.x * r3.z + r6.z;
    r1.z = r3.y * r6.y + r1.z;
    r1.z = r2.y * r8.w + r1.z;
    r10.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-5,-1)).xyzw;
    r6.yz = r10.yz * r0.zz;
    r6.yz = r10.xw * r4.ww + r6.yz;
    r1.z = r3.y * r6.z + r1.z;
    r1.z = r2.y * r6.y + r1.z;
    r1.z = r3.y * r6.x + r1.z;
    r1.z = r2.y * r6.z + r1.z;
    r10.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-3,-1)).xyzw;
    r6.xz = r5.zx + -r5.xz;
    r6.xz = r2.xx * r6.xz + r5.xz;
    r9.yz = r10.yz * r6.xx;
    r9.yz = r10.xw * r5.yy + r9.yz;
    r1.z = r3.y * r9.z + r1.z;
    r1.z = r2.y * r9.y + r1.z;
    r6.w = r12.y * r6.x + r6.w;
    r1.z = r3.y * r6.w + r1.z;
    r1.z = r2.y * r9.z + r1.z;
    r10.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-1,-1)).xyzw;
    r6.w = r5.x + -r4.x;
    r6.w = r2.x * r6.w + r4.x;
    r9.zw = r10.wx * r6.ww;
    r11.xy = r10.zy * r4.xx + r9.zw;
    r1.z = r3.y * r11.x + r1.z;
    r1.z = r2.y * r11.y + r1.z;
    r7.x = dot(r7.xy, r5.xx);
    r1.z = r3.y * r7.x + r1.z;
    r7.x = dot(r10.wz, r5.xx);
    r1.z = r2.y * r7.x + r1.z;
    r11.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(1,-1)).xyzw;
    r7.x = r4.x + -r5.x;
    r7.x = r2.x * r7.x + r5.x;
    r7.yz = r11.zy * r7.xx;
    r10.xz = r11.wx * r4.xx + r7.yz;
    r1.z = r3.y * r10.x + r1.z;
    r1.z = r2.y * r10.z + r1.z;
    r7.y = dot(r8.xy, r5.xx);
    r1.z = r3.y * r7.y + r1.z;
    r7.y = dot(r11.wz, r5.xx);
    r1.z = r2.y * r7.y + r1.z;
    r12.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(3,-1)).xyzw;
    r8.xy = r12.yz * r5.ww;
    r8.xy = r12.xw * r6.zz + r8.xy;
    r1.z = r3.y * r8.y + r1.z;
    r1.z = r2.y * r8.x + r1.z;
    r7.y = r9.x * r6.z + r7.w;
    r1.z = r3.y * r7.y + r1.z;
    r1.z = r2.y * r8.y + r1.z;
    r12.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(5,-1)).xyzw;
    r7.yw = r12.yz * r2.xx;
    r7.yw = r7.yw * r2.zz;
    r7.yw = r12.xw * r3.zz + r7.yw;
    r1.z = r3.y * r7.w + r1.z;
    r1.z = r2.y * r7.y + r1.z;
    r1.z = r3.y * r8.z + r1.z;
    r1.z = r2.y * r7.w + r1.z;
    r12.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-5,1)).xyzw;
    r8.yz = r12.yz * r0.zz;
    r8.yz = r12.xw * r4.ww + r8.yz;
    r1.z = r3.y * r8.z + r1.z;
    r1.z = r2.y * r8.y + r1.z;
    r1.z = r3.y * r6.y + r1.z;
    r1.z = r2.y * r8.z + r1.z;
    r12.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-3,1)).xyzw;
    r8.zw = r12.yz * r6.xx;
    r8.zw = r12.xw * r5.yy + r8.zw;
    r1.z = r3.y * r8.w + r1.z;
    r1.z = r2.y * r8.z + r1.z;
    r1.z = r3.y * r9.y + r1.z;
    r1.z = r2.y * r8.w + r1.z;
    r12.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-1,1)).xyzw;
    r6.yw = r12.wx * r6.ww;
    r9.xy = r12.zy * r4.xx + r6.yw;
    r1.z = r3.y * r9.x + r1.z;
    r1.z = r2.y * r9.y + r1.z;
    r6.w = r4.x + -r2.w;
    r6.w = r2.x * r6.w + r2.w;
    r7.w = r10.y * r6.w + r9.w;
    r1.z = r3.y * r7.w + r1.z;
    r6.y = r12.z * r6.w + r6.y;
    r1.z = r2.y * r6.y + r1.z;
    r9.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(1,1)).xyzw;
    r6.yw = r9.zy * r7.xx;
    r7.xw = r9.wx * r4.xx + r6.yw;
    r1.z = r3.y * r7.x + r1.z;
    r1.z = r2.y * r7.w + r1.z;
    r2.w = r2.w + -r4.x;
    r2.w = r2.x * r2.w + r4.x;
    r4.x = r11.x * r2.w + r7.z;
    r1.z = r3.y * r4.x + r1.z;
    r2.w = r9.w * r2.w + r6.y;
    r1.z = r2.y * r2.w + r1.z;
    r10.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(3,1)).xyzw;
    r6.yw = r10.yz * r5.ww;
    r6.yw = r10.xw * r6.zz + r6.yw;
    r1.z = r3.y * r6.w + r1.z;
    r1.z = r2.y * r6.y + r1.z;
    r1.z = r3.y * r8.x + r1.z;
    r1.z = r2.y * r6.w + r1.z;
    r10.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(5,1)).xyzw;
    r7.xz = r10.yz * r2.xx;
    r7.xz = r7.xz * r2.zz;
    r7.xz = r10.xw * r3.zz + r7.xz;
    r1.z = r3.y * r7.z + r1.z;
    r1.z = r2.y * r7.x + r1.z;
    r1.z = r3.y * r7.y + r1.z;
    r1.z = r2.y * r7.z + r1.z;
    r10.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-5,3)).xyzw;
    r7.yz = r10.yz * r0.zz;
    r7.yz = r10.xw * r4.ww + r7.yz;
    r1.z = r3.y * r7.z + r1.z;
    r1.z = r2.y * r7.y + r1.z;
    r1.z = r3.y * r8.y + r1.z;
    r1.z = r2.y * r7.z + r1.z;
    r10.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-3,3)).xyzw;
    r7.zw = r10.wx * r5.yy;
    r8.xy = r10.zy * r5.zz + r7.zw;
    r1.z = r3.y * r8.x + r1.z;
    r1.z = r2.y * r8.y + r1.z;
    r1.z = r3.y * r8.z + r1.z;
    r2.w = r10.z * r6.x + r7.z;
    r1.z = r2.y * r2.w + r1.z;
    r8.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-1,3)).xyzw;
    r2.w = dot(r8.wz, r5.zz);
    r1.z = r3.y * r2.w + r1.z;
    r2.w = dot(r8.xy, r5.zz);
    r1.z = r2.y * r2.w + r1.z;
    r2.w = dot(r12.xy, r5.xx);
    r1.z = r3.y * r2.w + r1.z;
    r2.w = dot(r8.wz, r5.xx);
    r1.z = r2.y * r2.w + r1.z;
    r11.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(1,3)).xyzw;
    r2.w = dot(r11.wz, r5.zz);
    r1.z = r3.y * r2.w + r1.z;
    r2.w = dot(r11.xy, r5.zz);
    r1.z = r2.y * r2.w + r1.z;
    r2.w = dot(r9.xy, r5.xx);
    r1.z = r3.y * r2.w + r1.z;
    r2.w = dot(r11.wz, r5.xx);
    r1.z = r2.y * r2.w + r1.z;
    r9.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(3,3)).xyzw;
    r5.xy = r9.zy * r5.ww;
    r5.yz = r9.wx * r5.zz + r5.xy;
    r1.z = r3.y * r5.y + r1.z;
    r1.z = r2.y * r5.z + r1.z;
    r1.z = r3.y * r6.y + r1.z;
    r2.w = r9.w * r6.z + r5.x;
    r1.z = r2.y * r2.w + r1.z;
    r5.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(5,3)).xyzw;
    r5.yz = r5.yz * r2.xx;
    r5.yz = r5.yz * r2.zz;
    r5.xy = r5.xw * r3.zz + r5.yz;
    r1.z = r3.y * r5.y + r1.z;
    r1.z = r2.y * r5.x + r1.z;
    r1.z = r3.y * r7.x + r1.z;
    r1.z = r2.y * r5.y + r1.z;
    r6.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-5,5)).xyzw;
    r4.xw = r6.wx * r4.ww;
    r5.yz = r6.zy * r2.zz + r4.xw;
    r1.z = r3.y * r5.y + r1.z;
    r1.z = r2.y * r5.z + r1.z;
    r1.z = r3.y * r7.y + r1.z;
    r0.z = r6.z * r0.z + r4.x;
    r0.z = r2.y * r0.z + r1.z;
    r6.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-3,5)).xyzw;
    r1.z = dot(r6.wz, r2.zz);
    r0.z = r3.y * r1.z + r0.z;
    r1.z = dot(r6.xy, r2.zz);
    r0.z = r2.y * r1.z + r0.z;
    r1.z = dot(r10.xy, r3.ww);
    r0.z = r3.y * r1.z + r0.z;
    r1.z = dot(r6.wz, r3.ww);
    r0.z = r2.y * r1.z + r0.z;
    r6.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(-1,5)).xyzw;
    r1.z = dot(r6.wz, r2.zz);
    r0.z = r3.y * r1.z + r0.z;
    r1.z = dot(r6.xy, r2.zz);
    r0.z = r2.y * r1.z + r0.z;
    r1.z = dot(r8.xy, r3.ww);
    r0.z = r3.y * r1.z + r0.z;
    r1.z = dot(r6.wz, r3.ww);
    r0.z = r2.y * r1.z + r0.z;
    r6.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(1,5)).xyzw;
    r1.z = dot(r6.wz, r2.zz);
    r0.z = r3.y * r1.z + r0.z;
    r1.z = dot(r6.xy, r2.zz);
    r0.z = r2.y * r1.z + r0.z;
    r1.z = dot(r11.xy, r3.ww);
    r0.z = r3.y * r1.z + r0.z;
    r1.z = dot(r6.wz, r3.ww);
    r0.z = r2.y * r1.z + r0.z;
    r6.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(3,5)).xyzw;
    r1.z = dot(r6.wz, r2.zz);
    r0.z = r3.y * r1.z + r0.z;
    r1.z = dot(r6.xy, r2.zz);
    r0.z = r2.y * r1.z + r0.z;
    r1.z = dot(r9.xy, r3.ww);
    r0.z = r3.y * r1.z + r0.z;
    r1.z = dot(r6.wz, r3.ww);
    r0.z = r2.y * r1.z + r0.z;
    r6.xyzw = s_smap.GatherCmp(smp_smap_s, r0.xy, r1.w, int2(5,5)).xyzw;
    r0.xy = r6.zy * r2.xx;
    r0.xy = r0.xy * r2.zz;
    r1.zw = r6.wx * r2.zz + r0.xy;
    r0.y = r3.y * r1.z + r0.z;
    r0.y = r2.y * r1.w + r0.y;
    r0.y = r3.y * r5.x + r0.y;
    r0.x = r6.w * r3.z + r0.x;
    r0.x = r2.y * r0.x + r0.y;
    r0.w = r0.x / r3.x;
  }
  r0.x = cmp(0.699999988 < r0.w);
  r0.y = saturate(1.42857146 * r0.w);
  r0.x = r0.x ? 1 : r0.y;
  r0.y = dot(r4.yz, view_shadow_proj.xy);
  r0.y = cmp(0 >= -r0.y);
  r0.y = r0.y ? 1.000000 : 0;
  r0.yz = r4.yz * r0.yy;
  r0.yz = float2(-0.400000006,-0.400000006) + abs(r0.yz);
  r0.yz = saturate(float2(10,10) * r0.yz);
  r0.yz = float2(1,1) + -r0.yz;
  r0.w = 1 + -r0.x;
  r0.y = -r0.y * r0.z + 1;
  r0.x = r0.w * r0.y + r0.x;
  r1.xyzw = Ldynamic_color.xyzw * r1.xxxy;
  o0.xyzw = r1.xyzw * r0.xxxx;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.27.952.3022
//
//
// Buffer Definitions: 
//
// cbuffer $Globals
// {
//
//   row_major float4x4 m_shadow;       // Offset:    0 Size:    64
//   float3 view_shadow_proj;           // Offset:   64 Size:    12
//
// }
//
// cbuffer static_globals
// {
//
//   row_major float3x4 m_V;            // Offset:    0 Size:    48 [unused]
//   row_major float4x4 m_P;            // Offset:   48 Size:    64 [unused]
//   row_major float4x4 m_VP;           // Offset:  112 Size:    64 [unused]
//   float4 timers;                     // Offset:  176 Size:    16 [unused]
//   float4 fog_plane;                  // Offset:  192 Size:    16 [unused]
//   float4 fog_params;                 // Offset:  208 Size:    16 [unused]
//   float4 fog_color;                  // Offset:  224 Size:    16 [unused]
//   float4 L_ambient;                  // Offset:  240 Size:    16 [unused]
//   float3 L_sun_color;                // Offset:  256 Size:    12 [unused]
//   float3 L_sun_dir_w;                // Offset:  272 Size:    12 [unused]
//   float4 L_hemi_color;               // Offset:  288 Size:    16 [unused]
//   float3 eye_position;               // Offset:  304 Size:    12 [unused]
//   float4 pos_decompression_params;   // Offset:  320 Size:    16
//   float4 pos_decompression_params2;  // Offset:  336 Size:    16 [unused]
//
// }
//
// cbuffer dynamic_light
// {
//
//   float4 Ldynamic_color;             // Offset:    0 Size:    16
//   float4 Ldynamic_pos;               // Offset:   16 Size:    16 [unused]
//   float4 Ldynamic_dir;               // Offset:   32 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// smp_nofilter                      sampler      NA          NA    0        1
// smp_material                      sampler      NA          NA    1        1
// smp_smap                        sampler_c      NA          NA    2        1
// s_smap                            texture  float4          2d    0        1
// s_position                        texture  float4       2dMS4    1        1
// s_material                        texture  float4          3d    2        1
// s_smap_minmax                     texture   float          2d    3        1
// $Globals                          cbuffer      NA          NA    0        1
// static_globals                    cbuffer      NA          NA    1        1
// dynamic_light                     cbuffer      NA          NA    2        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyzw        0     NONE   float       
// SV_Position              0   xyzw        1      POS   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[5], immediateIndexed
dcl_constantbuffer cb1[21], immediateIndexed
dcl_constantbuffer cb2[3], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_comparison
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2dms(4) (float,float,float,float) t1
dcl_resource_texture3d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_input_ps_siv linear noperspective v1.xy, position
dcl_output o0.xyzw
dcl_temps 13
ftoi r0.xy, v1.xyxx
mov r0.zw, l(0,0,0,0)
ldms_indexable(texture2dms)(float,float,float,float) r0.xyzw, r0.xyzw, t1.xyzw, l(0)
mad r1.xy, v1.xyxx, cb1[20].zwzz, -cb1[20].xyxx
mul r1.xy, r0.zzzz, r1.xyxx
mad r2.x, |r0.y|, l(2.000000), l(-1.000000)
lt r0.y, r0.y, l(0.000000)
movc r0.y, r0.y, l(-1.000000), l(1.000000)
mad r1.w, -r2.x, r2.x, l(1.000000)
mad r1.w, -r0.x, r0.x, r1.w
sqrt r1.w, |r1.w|
mul r2.y, r0.y, r1.w
ubfe r0.y, l(4), l(21), r0.w
and r0.w, r0.w, l(0x80000000)
movc r0.w, r0.w, l(16), l(0)
bfi r0.y, l(4), l(0), r0.y, r0.w
utof r0.y, r0.y
mul r3.z, r0.y, l(0.043011)
mov r2.z, r0.x
mov r1.z, r0.z
mad r0.xyz, r2.xyzx, l(0.015000, 0.015000, 0.015000, 0.000000), r1.xyzx
dp3 r1.x, r0.xyzx, r0.xyzx
rsq r1.x, r1.x
mad r1.xyz, -r0.xyzx, r1.xxxx, -cb2[2].xyzx
dp3 r1.w, r1.xyzx, r1.xyzx
rsq r1.w, r1.w
mul r1.xyz, r1.wwww, r1.xyzx
dp3 r3.x, -cb2[2].xyzx, r2.xyzx
dp3 r3.y, r1.xyzx, r2.xyzx
sample_indexable(texture3d)(float,float,float,float) r1.xy, r3.xyzx, t2.xyzw, s1
mov r0.w, l(1.000000)
dp4 r2.y, cb0[0].xyzw, r0.xyzw
dp4 r2.z, cb0[1].xyzw, r0.xyzw
dp4 r2.x, cb0[2].xyzw, r0.xyzw
dp4 r0.x, cb0[3].xyzw, r0.xyzw
div r0.xyz, r2.xyzx, r0.xxxx
mul r1.zw, r0.yyyz, l(0.000000, 0.000000, 512.000000, 512.000000)
frc r1.zw, r1.zzzw
mad r2.xy, -r1.zwzz, l(0.001953, 0.001953, 0.000000, 0.000000), r0.yzyy
sample_l_aoffimmi_indexable(-1,0,0)(texture2d)(float,float,float,float) r0.w, r2.xyxx, t3.yzwx, s0, l(0.000000)
sample_l_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r2.z, r2.xyxx, t3.yzxw, s0, l(0.000000)
sample_l_aoffimmi_indexable(0,-1,0)(texture2d)(float,float,float,float) r2.w, r2.xyxx, t3.yzwx, s0, l(0.000000)
sample_l_aoffimmi_indexable(-1,-1,0)(texture2d)(float,float,float,float) r3.w, r2.xyxx, t3.yzwx, s0, l(0.000000)
sample_l_aoffimmi_indexable(1,0,0)(texture2d)(float,float,float,float) r4.x, r2.xyxx, t3.xyzw, s0, l(0.000000)
sample_l_aoffimmi_indexable(2,0,0)(texture2d)(float,float,float,float) r4.y, r2.xyxx, t3.yxzw, s0, l(0.000000)
sample_l_aoffimmi_indexable(2,-1,0)(texture2d)(float,float,float,float) r4.z, r2.xyxx, t3.yzxw, s0, l(0.000000)
sample_l_aoffimmi_indexable(1,-1,0)(texture2d)(float,float,float,float) r5.w, r2.xyxx, t3.yzwx, s0, l(0.000000)
sample_l_aoffimmi_indexable(-1,2,0)(texture2d)(float,float,float,float) r4.w, r2.xyxx, t3.yzwx, s0, l(0.000000)
sample_l_aoffimmi_indexable(0,2,0)(texture2d)(float,float,float,float) r6.x, r2.xyxx, t3.xyzw, s0, l(0.000000)
sample_l_aoffimmi_indexable(0,1,0)(texture2d)(float,float,float,float) r6.y, r2.xyxx, t3.yxzw, s0, l(0.000000)
sample_l_aoffimmi_indexable(-1,1,0)(texture2d)(float,float,float,float) r7.w, r2.xyxx, t3.yzwx, s0, l(0.000000)
sample_l_aoffimmi_indexable(1,2,0)(texture2d)(float,float,float,float) r6.z, r2.xyxx, t3.yzxw, s0, l(0.000000)
sample_l_aoffimmi_indexable(2,2,0)(texture2d)(float,float,float,float) r6.w, r2.xyxx, t3.yzwx, s0, l(0.000000)
sample_l_aoffimmi_indexable(2,1,0)(texture2d)(float,float,float,float) r8.z, r2.xyxx, t3.yzxw, s0, l(0.000000)
sample_l_aoffimmi_indexable(1,1,0)(texture2d)(float,float,float,float) r2.x, r2.xyxx, t3.xyzw, s0, l(0.000000)
mov r3.x, r0.w
mov r3.yz, r2.zzwz
ge r9.xyzw, r3.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r9.xyzw, r9.xyzw, l(1, 1, 1, 1)
mov r5.xyz, r4.xyzx
ge r10.xyzw, r5.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r10.xyzw, r10.xyzw, l(1, 1, 1, 1)
imul null, r9.xyzw, r9.xyzw, r10.xyzw
mov r7.x, r4.w
mov r7.yz, r6.xxyx
ge r4.xyzw, r7.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r4.xyzw, r4.xyzw, l(1, 1, 1, 1)
imul null, r4.xyzw, r9.xyzw, r4.xyzw
mov r8.xy, r6.zwzz
mov r8.w, r2.x
ge r9.xyzw, r8.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r9.xyzw, r9.xyzw, l(1, 1, 1, 1)
imul null, r4.xyzw, r4.xyzw, r9.xyzw
ine r4.xyzw, r4.xyzw, l(0, 0, 0, 0)
and r2.yw, r4.zzzw, r4.xxxy
and r0.w, r2.w, r2.y
lt r4.xyzw, r3.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r4.xyzw, r4.xyzw, l(1, 1, 1, 1)
lt r9.xyzw, r5.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r9.xyzw, r9.xyzw, l(1, 1, 1, 1)
imul null, r4.xyzw, r4.xyzw, r9.xyzw
lt r9.xyzw, r7.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r9.xyzw, r9.xyzw, l(1, 1, 1, 1)
imul null, r4.xyzw, r4.xyzw, r9.xyzw
lt r9.xyzw, r8.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r9.xyzw, r9.xyzw, l(1, 1, 1, 1)
imul null, r4.xyzw, r4.xyzw, r9.xyzw
ine r4.xyzw, r4.xyzw, l(0, 0, 0, 0)
and r2.yw, r4.zzzw, r4.xxxy
and r2.y, r2.w, r2.y
add r4.xyz, r0.xyzx, l(-0.000500, -0.500000, -0.500000, 0.000000)
lt r9.xyzw, -r3.xyzw, r4.xxxx
and r9.xyzw, r9.xyzw, l(1, 1, 1, 1)
lt r10.xyzw, -r5.xyzw, r4.xxxx
and r10.xyzw, r10.xyzw, l(1, 1, 1, 1)
imul null, r9.xyzw, r9.xyzw, r10.xyzw
lt r10.xyzw, -r7.xyzw, r4.xxxx
and r10.xyzw, r10.xyzw, l(1, 1, 1, 1)
imul null, r9.xyzw, r9.xyzw, r10.xyzw
lt r8.xyzw, -r8.xyzw, r4.xxxx
and r8.xyzw, r8.xyzw, l(1, 1, 1, 1)
imul null, r8.xyzw, r9.xyzw, r8.xyzw
ine r8.xyzw, r8.xyzw, l(0, 0, 0, 0)
and r3.xz, r8.zzwz, r8.xxyx
and r2.w, r3.z, r3.x
and r8.w, r2.w, r2.y
add r2.y, -r3.y, r5.x
mad r2.y, r1.z, r2.y, r2.z
add r2.x, r2.x, -r7.z
mad r1.z, r1.z, r2.x, r6.y
add r1.z, -r2.y, r1.z
mad r1.z, r1.w, r1.z, r2.y
add r1.w, r0.x, l(-0.000100)
ge r8.x, r1.z, r1.w
mov r8.yz, l(0,-1,0,0)
movc r2.xy, r0.wwww, r8.xyxx, r8.zwzz
if_nz r2.y
  ieq r0.w, r2.x, l(-1)
  if_nz r0.w
    mov r0.w, l(1.000000)
  else 
    sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r0.yzyy, t0.xxxx, s2, r0.x
  endif 
else 
  mad r2.xy, r0.yzyy, l(2048.000000, 2048.000000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
  round_ni r2.zw, r2.xxxy
  add r2.xy, -r2.zwzz, r2.xyxx
  mad r0.xy, -r2.xyxx, l(0.000488, 0.000488, 0.000000, 0.000000), r0.yzyy
  gather4_aoffimmi_indexable(-5,-5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r0.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  dp4 r1.z, r3.xyzw, r5.xyzw
  gather4_aoffimmi_indexable(-3,-5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-1,-5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(1,-5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(3,-5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(5,-5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-5,-3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-3,-3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-1,-3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(1,-3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(3,-3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(5,-3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-5,-1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-3,-1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-1,-1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(1,-1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(3,-1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(5,-1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-5,1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-3,1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-1,1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(1,1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(3,1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(5,1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-5,3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-3,3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-1,3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(1,3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(3,3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(5,3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-5,5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-3,5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(-1,5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(1,5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(3,5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  gather4_aoffimmi_indexable(5,5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.xyxx, t0.xyzw, s0.x
  ge r5.xyzw, r3.xyzw, r1.wwww
  movc r5.xyzw, r5.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.z, r5.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.z, r0.z, r2.z
  dp4 r2.z, r3.xyzw, r5.xyzw
  add r1.z, r1.z, r2.z
  lt r2.z, l(0.000000), r0.z
  div r0.z, r1.z, r0.z
  add r1.z, -r0.z, r1.w
  mul r1.z, r1.z, l(300.000000)
  div_sat r0.z, r1.z, r0.z
  mul r0.z, r0.z, r0.z
  and r0.z, r0.z, r2.z
  mul r1.z, r0.z, r0.z
  mul r2.z, r0.z, r1.z
  mul r2.w, r1.z, l(3.000000)
  add r3.x, -r0.z, l(1.000000)
  mul r3.y, r2.w, r3.x
  mul r3.z, r3.y, l(0.200000)
  mad r3.w, r3.y, l(0.200000), r2.z
  mul r4.x, r2.z, l(14.000000)
  mad r4.x, r3.w, l(10.000000), r4.x
  mul r4.w, r3.x, r3.x
  mul r5.x, r0.z, r4.w
  mul r5.y, r5.x, l(3.000000)
  mad r5.xz, r5.xxxx, l(3.000000, 0.000000, 0.600000, 0.000000), r3.yyyy
  mad r5.xz, r1.zzzz, r0.zzzz, r5.xxzx
  mad r3.y, r5.z, l(7.000000), r4.x
  add r3.y, r3.w, r3.y
  mad r3.y, r2.z, l(2.000000), r3.y
  add r3.y, r3.w, r3.y
  add r3.y, r5.z, r3.y
  mad r3.y, r5.x, l(5.000000), r3.y
  add r3.y, r5.z, r3.y
  add r3.y, r3.w, r3.y
  mad r3.y, r2.z, l(2.000000), r3.y
  add r3.y, r3.w, r3.y
  add r3.y, r5.z, r3.y
  add r3.y, r5.x, r3.y
  mul r4.x, r3.x, r4.w
  mad r4.x, r4.x, l(0.100000), r5.y
  mad r4.x, r2.w, r3.x, r4.x
  mad r4.x, r1.z, r0.z, r4.x
  mad r3.y, r4.x, l(3.000000), r3.y
  add r3.y, r5.x, r3.y
  add r3.y, r5.z, r3.y
  add r3.y, r3.w, r3.y
  mad r3.y, r2.z, l(2.000000), r3.y
  add r3.y, r3.w, r3.y
  add r3.y, r5.z, r3.y
  add r3.y, r5.x, r3.y
  add r3.y, r4.x, r3.y
  mad r4.w, r4.w, r3.x, r5.y
  mad r2.w, r2.w, r3.x, r4.w
  mad r2.w, r1.z, r0.z, r2.w
  add r3.x, r2.w, r3.y
  add r3.x, r4.x, r3.x
  add r3.x, r5.x, r3.x
  add r3.x, r5.z, r3.x
  add r3.x, r3.w, r3.x
  mad r3.x, r2.z, l(2.000000), r3.x
  add r3.x, r3.w, r3.x
  add r3.x, r5.z, r3.x
  add r3.x, r5.x, r3.x
  mad r3.x, r4.x, l(3.000000), r3.x
  add r3.x, r5.x, r3.x
  add r3.x, r5.z, r3.x
  add r3.x, r3.w, r3.x
  mad r3.x, r2.z, l(2.000000), r3.x
  add r3.x, r3.w, r3.x
  add r3.x, r5.z, r3.x
  mad r3.x, r5.x, l(5.000000), r3.x
  add r3.x, r5.z, r3.x
  add r3.x, r3.w, r3.x
  mad r3.x, r2.z, l(2.000000), r3.x
  add r3.x, r3.w, r3.x
  mad r3.x, r5.z, l(7.000000), r3.x
  add r3.x, r3.w, r3.x
  mad r3.x, r2.z, l(2.000000), r3.x
  mad r3.x, r3.w, l(9.000000), r3.x
  mad r3.x, r2.z, l(12.000000), r3.x
  gather4_c_aoffimmi_indexable(-5,-5,0)(texture2d)(float,float,float,float) r6.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  add r3.y, -r2.y, l(1.000000)
  mad r4.w, -r2.z, r2.x, r2.z
  mul r5.yw, r4.wwww, r6.wwwx
  mad r6.xz, r6.zzyz, r2.zzzz, r5.yywy
  mul r5.y, r2.y, r6.z
  mad r5.y, r3.y, r6.x, r5.y
  gather4_c_aoffimmi_indexable(-3,-5,0)(texture2d)(float,float,float,float) r7.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  dp2 r6.x, r7.wzww, r2.zzzz
  mad r5.y, r3.y, r6.x, r5.y
  dp2 r6.x, r7.xyxx, r2.zzzz
  mad r5.y, r2.y, r6.x, r5.y
  gather4_c_aoffimmi_indexable(-1,-5,0)(texture2d)(float,float,float,float) r8.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  dp2 r6.x, r8.wzww, r2.zzzz
  mad r5.y, r3.y, r6.x, r5.y
  dp2 r6.x, r8.xyxx, r2.zzzz
  mad r5.y, r2.y, r6.x, r5.y
  gather4_c_aoffimmi_indexable(1,-5,0)(texture2d)(float,float,float,float) r9.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  dp2 r6.x, r9.wzww, r2.zzzz
  mad r5.y, r3.y, r6.x, r5.y
  dp2 r6.x, r9.xyxx, r2.zzzz
  mad r5.y, r2.y, r6.x, r5.y
  gather4_c_aoffimmi_indexable(3,-5,0)(texture2d)(float,float,float,float) r10.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  dp2 r6.x, r10.wzww, r2.zzzz
  mad r5.y, r3.y, r6.x, r5.y
  dp2 r6.x, r10.xyxx, r2.zzzz
  mad r5.y, r2.y, r6.x, r5.y
  gather4_c_aoffimmi_indexable(5,-5,0)(texture2d)(float,float,float,float) r11.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r6.xz, r2.xxxx, r11.zzyz
  mul r6.xz, r2.zzzz, r6.xxzx
  mad r6.xw, r11.wwwx, r2.zzzz, r6.xxxz
  mad r5.y, r3.y, r6.x, r5.y
  mad r5.y, r2.y, r6.w, r5.y
  gather4_c_aoffimmi_indexable(-5,-3,0)(texture2d)(float,float,float,float) r12.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mad r0.z, r1.z, r0.z, -r3.w
  mad r0.z, r2.x, r0.z, r3.w
  mul r6.xw, r0.zzzz, r12.yyyz
  mad r6.xw, r12.xxxw, r4.wwww, r6.xxxw
  mad r1.z, r3.y, r6.w, r5.y
  mad r1.z, r2.y, r6.x, r1.z
  mad r5.y, r6.y, r0.z, r5.w
  mad r1.z, r3.y, r5.y, r1.z
  mad r1.z, r2.y, r6.w, r1.z
  gather4_c_aoffimmi_indexable(-3,-3,0)(texture2d)(float,float,float,float) r12.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  add r5.y, r3.w, -r5.z
  mad r5.y, r2.x, r5.y, r5.z
  mul r6.yw, r5.yyyy, r12.wwwx
  mad r7.zw, r12.zzzy, r5.zzzz, r6.yyyw
  mad r1.z, r3.y, r7.z, r1.z
  mad r1.z, r2.y, r7.w, r1.z
  dp2 r5.w, r7.xyxx, r3.wwww
  mad r1.z, r3.y, r5.w, r1.z
  dp2 r5.w, r12.wzww, r3.wwww
  mad r1.z, r2.y, r5.w, r1.z
  gather4_c_aoffimmi_indexable(-1,-3,0)(texture2d)(float,float,float,float) r7.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  dp2 r5.w, r7.wzww, r5.zzzz
  mad r1.z, r3.y, r5.w, r1.z
  dp2 r5.w, r7.xyxx, r5.zzzz
  mad r1.z, r2.y, r5.w, r1.z
  dp2 r5.w, r8.xyxx, r3.wwww
  mad r1.z, r3.y, r5.w, r1.z
  dp2 r5.w, r7.wzww, r3.wwww
  mad r1.z, r2.y, r5.w, r1.z
  gather4_c_aoffimmi_indexable(1,-3,0)(texture2d)(float,float,float,float) r8.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  dp2 r5.w, r8.wzww, r5.zzzz
  mad r1.z, r3.y, r5.w, r1.z
  dp2 r5.w, r8.xyxx, r5.zzzz
  mad r1.z, r2.y, r5.w, r1.z
  dp2 r5.w, r9.xyxx, r3.wwww
  mad r1.z, r3.y, r5.w, r1.z
  dp2 r5.w, r8.wzww, r3.wwww
  mad r1.z, r2.y, r5.w, r1.z
  gather4_c_aoffimmi_indexable(3,-3,0)(texture2d)(float,float,float,float) r9.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  add r5.w, -r3.w, r5.z
  mad r5.w, r2.x, r5.w, r3.w
  mul r7.zw, r5.wwww, r9.zzzy
  mad r8.zw, r9.wwwx, r5.zzzz, r7.zzzw
  mad r1.z, r3.y, r8.z, r1.z
  mad r1.z, r2.y, r8.w, r1.z
  dp2 r6.y, r10.xyxx, r3.wwww
  mad r1.z, r3.y, r6.y, r1.z
  dp2 r6.y, r9.wzww, r3.wwww
  mad r1.z, r2.y, r6.y, r1.z
  gather4_c_aoffimmi_indexable(5,-3,0)(texture2d)(float,float,float,float) r10.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mad r3.z, r2.x, r3.z, r2.z
  mul r8.zw, r2.xxxx, r10.yyyz
  mul r8.zw, r2.zzzz, r8.zzzw
  mad r8.zw, r10.xxxw, r3.zzzz, r8.zzzw
  mad r1.z, r3.y, r8.w, r1.z
  mad r1.z, r2.y, r8.z, r1.z
  mad r6.y, r11.x, r3.z, r6.z
  mad r1.z, r3.y, r6.y, r1.z
  mad r1.z, r2.y, r8.w, r1.z
  gather4_c_aoffimmi_indexable(-5,-1,0)(texture2d)(float,float,float,float) r10.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r6.yz, r0.zzzz, r10.yyzy
  mad r6.yz, r10.xxwx, r4.wwww, r6.yyzy
  mad r1.z, r3.y, r6.z, r1.z
  mad r1.z, r2.y, r6.y, r1.z
  mad r1.z, r3.y, r6.x, r1.z
  mad r1.z, r2.y, r6.z, r1.z
  gather4_c_aoffimmi_indexable(-3,-1,0)(texture2d)(float,float,float,float) r10.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  add r6.xz, -r5.xxzx, r5.zzxz
  mad r6.xz, r2.xxxx, r6.xxzx, r5.xxzx
  mul r9.yz, r6.xxxx, r10.yyzy
  mad r9.yz, r10.xxwx, r5.yyyy, r9.yyzy
  mad r1.z, r3.y, r9.z, r1.z
  mad r1.z, r2.y, r9.y, r1.z
  mad r6.w, r12.y, r6.x, r6.w
  mad r1.z, r3.y, r6.w, r1.z
  mad r1.z, r2.y, r9.z, r1.z
  gather4_c_aoffimmi_indexable(-1,-1,0)(texture2d)(float,float,float,float) r10.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  add r6.w, -r4.x, r5.x
  mad r6.w, r2.x, r6.w, r4.x
  mul r9.zw, r6.wwww, r10.wwwx
  mad r11.xy, r10.zyzz, r4.xxxx, r9.zwzz
  mad r1.z, r3.y, r11.x, r1.z
  mad r1.z, r2.y, r11.y, r1.z
  dp2 r7.x, r7.xyxx, r5.xxxx
  mad r1.z, r3.y, r7.x, r1.z
  dp2 r7.x, r10.wzww, r5.xxxx
  mad r1.z, r2.y, r7.x, r1.z
  gather4_c_aoffimmi_indexable(1,-1,0)(texture2d)(float,float,float,float) r11.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  add r7.x, -r5.x, r4.x
  mad r7.x, r2.x, r7.x, r5.x
  mul r7.yz, r7.xxxx, r11.zzyz
  mad r10.xz, r11.wwxw, r4.xxxx, r7.yyzy
  mad r1.z, r3.y, r10.x, r1.z
  mad r1.z, r2.y, r10.z, r1.z
  dp2 r7.y, r8.xyxx, r5.xxxx
  mad r1.z, r3.y, r7.y, r1.z
  dp2 r7.y, r11.wzww, r5.xxxx
  mad r1.z, r2.y, r7.y, r1.z
  gather4_c_aoffimmi_indexable(3,-1,0)(texture2d)(float,float,float,float) r12.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r8.xy, r5.wwww, r12.yzyy
  mad r8.xy, r12.xwxx, r6.zzzz, r8.xyxx
  mad r1.z, r3.y, r8.y, r1.z
  mad r1.z, r2.y, r8.x, r1.z
  mad r7.y, r9.x, r6.z, r7.w
  mad r1.z, r3.y, r7.y, r1.z
  mad r1.z, r2.y, r8.y, r1.z
  gather4_c_aoffimmi_indexable(5,-1,0)(texture2d)(float,float,float,float) r12.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r7.yw, r2.xxxx, r12.yyyz
  mul r7.yw, r2.zzzz, r7.yyyw
  mad r7.yw, r12.xxxw, r3.zzzz, r7.yyyw
  mad r1.z, r3.y, r7.w, r1.z
  mad r1.z, r2.y, r7.y, r1.z
  mad r1.z, r3.y, r8.z, r1.z
  mad r1.z, r2.y, r7.w, r1.z
  gather4_c_aoffimmi_indexable(-5,1,0)(texture2d)(float,float,float,float) r12.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r8.yz, r0.zzzz, r12.yyzy
  mad r8.yz, r12.xxwx, r4.wwww, r8.yyzy
  mad r1.z, r3.y, r8.z, r1.z
  mad r1.z, r2.y, r8.y, r1.z
  mad r1.z, r3.y, r6.y, r1.z
  mad r1.z, r2.y, r8.z, r1.z
  gather4_c_aoffimmi_indexable(-3,1,0)(texture2d)(float,float,float,float) r12.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r8.zw, r6.xxxx, r12.yyyz
  mad r8.zw, r12.xxxw, r5.yyyy, r8.zzzw
  mad r1.z, r3.y, r8.w, r1.z
  mad r1.z, r2.y, r8.z, r1.z
  mad r1.z, r3.y, r9.y, r1.z
  mad r1.z, r2.y, r8.w, r1.z
  gather4_c_aoffimmi_indexable(-1,1,0)(texture2d)(float,float,float,float) r12.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r6.yw, r6.wwww, r12.wwwx
  mad r9.xy, r12.zyzz, r4.xxxx, r6.ywyy
  mad r1.z, r3.y, r9.x, r1.z
  mad r1.z, r2.y, r9.y, r1.z
  add r6.w, -r2.w, r4.x
  mad r6.w, r2.x, r6.w, r2.w
  mad r7.w, r10.y, r6.w, r9.w
  mad r1.z, r3.y, r7.w, r1.z
  mad r6.y, r12.z, r6.w, r6.y
  mad r1.z, r2.y, r6.y, r1.z
  gather4_c_aoffimmi_indexable(1,1,0)(texture2d)(float,float,float,float) r9.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r6.yw, r7.xxxx, r9.zzzy
  mad r7.xw, r9.wwwx, r4.xxxx, r6.yyyw
  mad r1.z, r3.y, r7.x, r1.z
  mad r1.z, r2.y, r7.w, r1.z
  add r2.w, -r4.x, r2.w
  mad r2.w, r2.x, r2.w, r4.x
  mad r4.x, r11.x, r2.w, r7.z
  mad r1.z, r3.y, r4.x, r1.z
  mad r2.w, r9.w, r2.w, r6.y
  mad r1.z, r2.y, r2.w, r1.z
  gather4_c_aoffimmi_indexable(3,1,0)(texture2d)(float,float,float,float) r10.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r6.yw, r5.wwww, r10.yyyz
  mad r6.yw, r10.xxxw, r6.zzzz, r6.yyyw
  mad r1.z, r3.y, r6.w, r1.z
  mad r1.z, r2.y, r6.y, r1.z
  mad r1.z, r3.y, r8.x, r1.z
  mad r1.z, r2.y, r6.w, r1.z
  gather4_c_aoffimmi_indexable(5,1,0)(texture2d)(float,float,float,float) r10.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r7.xz, r2.xxxx, r10.yyzy
  mul r7.xz, r2.zzzz, r7.xxzx
  mad r7.xz, r10.xxwx, r3.zzzz, r7.xxzx
  mad r1.z, r3.y, r7.z, r1.z
  mad r1.z, r2.y, r7.x, r1.z
  mad r1.z, r3.y, r7.y, r1.z
  mad r1.z, r2.y, r7.z, r1.z
  gather4_c_aoffimmi_indexable(-5,3,0)(texture2d)(float,float,float,float) r10.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r7.yz, r0.zzzz, r10.yyzy
  mad r7.yz, r10.xxwx, r4.wwww, r7.yyzy
  mad r1.z, r3.y, r7.z, r1.z
  mad r1.z, r2.y, r7.y, r1.z
  mad r1.z, r3.y, r8.y, r1.z
  mad r1.z, r2.y, r7.z, r1.z
  gather4_c_aoffimmi_indexable(-3,3,0)(texture2d)(float,float,float,float) r10.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r7.zw, r5.yyyy, r10.wwwx
  mad r8.xy, r10.zyzz, r5.zzzz, r7.zwzz
  mad r1.z, r3.y, r8.x, r1.z
  mad r1.z, r2.y, r8.y, r1.z
  mad r1.z, r3.y, r8.z, r1.z
  mad r2.w, r10.z, r6.x, r7.z
  mad r1.z, r2.y, r2.w, r1.z
  gather4_c_aoffimmi_indexable(-1,3,0)(texture2d)(float,float,float,float) r8.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  dp2 r2.w, r8.wzww, r5.zzzz
  mad r1.z, r3.y, r2.w, r1.z
  dp2 r2.w, r8.xyxx, r5.zzzz
  mad r1.z, r2.y, r2.w, r1.z
  dp2 r2.w, r12.xyxx, r5.xxxx
  mad r1.z, r3.y, r2.w, r1.z
  dp2 r2.w, r8.wzww, r5.xxxx
  mad r1.z, r2.y, r2.w, r1.z
  gather4_c_aoffimmi_indexable(1,3,0)(texture2d)(float,float,float,float) r11.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  dp2 r2.w, r11.wzww, r5.zzzz
  mad r1.z, r3.y, r2.w, r1.z
  dp2 r2.w, r11.xyxx, r5.zzzz
  mad r1.z, r2.y, r2.w, r1.z
  dp2 r2.w, r9.xyxx, r5.xxxx
  mad r1.z, r3.y, r2.w, r1.z
  dp2 r2.w, r11.wzww, r5.xxxx
  mad r1.z, r2.y, r2.w, r1.z
  gather4_c_aoffimmi_indexable(3,3,0)(texture2d)(float,float,float,float) r9.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r5.xy, r5.wwww, r9.zyzz
  mad r5.yz, r9.wwxw, r5.zzzz, r5.xxyx
  mad r1.z, r3.y, r5.y, r1.z
  mad r1.z, r2.y, r5.z, r1.z
  mad r1.z, r3.y, r6.y, r1.z
  mad r2.w, r9.w, r6.z, r5.x
  mad r1.z, r2.y, r2.w, r1.z
  gather4_c_aoffimmi_indexable(5,3,0)(texture2d)(float,float,float,float) r5.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r5.yz, r2.xxxx, r5.yyzy
  mul r5.yz, r2.zzzz, r5.yyzy
  mad r5.xy, r5.xwxx, r3.zzzz, r5.yzyy
  mad r1.z, r3.y, r5.y, r1.z
  mad r1.z, r2.y, r5.x, r1.z
  mad r1.z, r3.y, r7.x, r1.z
  mad r1.z, r2.y, r5.y, r1.z
  gather4_c_aoffimmi_indexable(-5,5,0)(texture2d)(float,float,float,float) r6.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r4.xw, r4.wwww, r6.wwwx
  mad r5.yz, r6.zzyz, r2.zzzz, r4.xxwx
  mad r1.z, r3.y, r5.y, r1.z
  mad r1.z, r2.y, r5.z, r1.z
  mad r1.z, r3.y, r7.y, r1.z
  mad r0.z, r6.z, r0.z, r4.x
  mad r0.z, r2.y, r0.z, r1.z
  gather4_c_aoffimmi_indexable(-3,5,0)(texture2d)(float,float,float,float) r6.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  dp2 r1.z, r6.wzww, r2.zzzz
  mad r0.z, r3.y, r1.z, r0.z
  dp2 r1.z, r6.xyxx, r2.zzzz
  mad r0.z, r2.y, r1.z, r0.z
  dp2 r1.z, r10.xyxx, r3.wwww
  mad r0.z, r3.y, r1.z, r0.z
  dp2 r1.z, r6.wzww, r3.wwww
  mad r0.z, r2.y, r1.z, r0.z
  gather4_c_aoffimmi_indexable(-1,5,0)(texture2d)(float,float,float,float) r6.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  dp2 r1.z, r6.wzww, r2.zzzz
  mad r0.z, r3.y, r1.z, r0.z
  dp2 r1.z, r6.xyxx, r2.zzzz
  mad r0.z, r2.y, r1.z, r0.z
  dp2 r1.z, r8.xyxx, r3.wwww
  mad r0.z, r3.y, r1.z, r0.z
  dp2 r1.z, r6.wzww, r3.wwww
  mad r0.z, r2.y, r1.z, r0.z
  gather4_c_aoffimmi_indexable(1,5,0)(texture2d)(float,float,float,float) r6.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  dp2 r1.z, r6.wzww, r2.zzzz
  mad r0.z, r3.y, r1.z, r0.z
  dp2 r1.z, r6.xyxx, r2.zzzz
  mad r0.z, r2.y, r1.z, r0.z
  dp2 r1.z, r11.xyxx, r3.wwww
  mad r0.z, r3.y, r1.z, r0.z
  dp2 r1.z, r6.wzww, r3.wwww
  mad r0.z, r2.y, r1.z, r0.z
  gather4_c_aoffimmi_indexable(3,5,0)(texture2d)(float,float,float,float) r6.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  dp2 r1.z, r6.wzww, r2.zzzz
  mad r0.z, r3.y, r1.z, r0.z
  dp2 r1.z, r6.xyxx, r2.zzzz
  mad r0.z, r2.y, r1.z, r0.z
  dp2 r1.z, r9.xyxx, r3.wwww
  mad r0.z, r3.y, r1.z, r0.z
  dp2 r1.z, r6.wzww, r3.wwww
  mad r0.z, r2.y, r1.z, r0.z
  gather4_c_aoffimmi_indexable(5,5,0)(texture2d)(float,float,float,float) r6.xyzw, r0.xyxx, t0.xyzw, s2.x, r1.w
  mul r0.xy, r2.xxxx, r6.zyzz
  mul r0.xy, r2.zzzz, r0.xyxx
  mad r1.zw, r6.wwwx, r2.zzzz, r0.xxxy
  mad r0.y, r3.y, r1.z, r0.z
  mad r0.y, r2.y, r1.w, r0.y
  mad r0.y, r3.y, r5.x, r0.y
  mad r0.x, r6.w, r3.z, r0.x
  mad r0.x, r2.y, r0.x, r0.y
  div r0.w, r0.x, r3.x
endif 
lt r0.x, l(0.700000), r0.w
mul_sat r0.y, r0.w, l(1.428571)
movc r0.x, r0.x, l(1.000000), r0.y
dp2 r0.y, r4.yzyy, cb0[4].xyxx
ge r0.y, l(0.000000), -r0.y
and r0.y, r0.y, l(0x3f800000)
mul r0.yz, r0.yyyy, r4.yyzy
add r0.yz, |r0.yyzy|, l(0.000000, -0.400000, -0.400000, 0.000000)
mul_sat r0.yz, r0.yyzy, l(0.000000, 10.000000, 10.000000, 0.000000)
add r0.yz, -r0.yyzy, l(0.000000, 1.000000, 1.000000, 0.000000)
add r0.w, -r0.x, l(1.000000)
mad r0.y, -r0.y, r0.z, l(1.000000)
mad r0.x, r0.w, r0.y, r0.x
mul r1.xyzw, r1.xxxy, cb2[0].xyzw
mul o0.xyzw, r0.xxxx, r1.xyzw
ret 
// Approximately 772 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/


/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Recompiled ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789
//
//   using 3Dmigoto v1.2.39 on Wed May 18 08:41:42 2016
//
//
// Buffer Definitions: 
//
// cbuffer _Globals
// {
//
//   row_major float4x4 m_shadow;       // Offset:    0 Size:    64
//   float3 view_shadow_proj;           // Offset:   64 Size:    12
//
// }
//
// cbuffer static_globals
// {
//
//   row_major float3x4 m_V;            // Offset:    0 Size:    48 [unused]
//   row_major float4x4 m_P;            // Offset:   48 Size:    64 [unused]
//   row_major float4x4 m_VP;           // Offset:  112 Size:    64 [unused]
//   float4 timers;                     // Offset:  176 Size:    16 [unused]
//   float4 fog_plane;                  // Offset:  192 Size:    16 [unused]
//   float4 fog_params;                 // Offset:  208 Size:    16 [unused]
//   float4 fog_color;                  // Offset:  224 Size:    16 [unused]
//   float4 L_ambient;                  // Offset:  240 Size:    16 [unused]
//   float3 L_sun_color;                // Offset:  256 Size:    12 [unused]
//   float3 L_sun_dir_w;                // Offset:  272 Size:    12 [unused]
//   float4 L_hemi_color;               // Offset:  288 Size:    16 [unused]
//   float3 eye_position;               // Offset:  304 Size:    12 [unused]
//   float4 pos_decompression_params;   // Offset:  320 Size:    16
//   float4 pos_decompression_params2;  // Offset:  336 Size:    16 [unused]
//
// }
//
// cbuffer dynamic_light
// {
//
//   float4 Ldynamic_color;             // Offset:    0 Size:    16
//   float4 Ldynamic_pos;               // Offset:   16 Size:    16 [unused]
//   float4 Ldynamic_dir;               // Offset:   32 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// smp_nofilter_s                    sampler      NA          NA    0        1
// smp_material_s                    sampler      NA          NA    1        1
// smp_smap_s                      sampler_c      NA          NA    2        1
// s_smap                            texture  float4          2d    0        1
// s_position                        texture  float4       2dMS4    1        1
// s_material                        texture  float4          3d    2        1
// s_smap_minmax                     texture   float          2d    3        1
// _Globals                          cbuffer      NA          NA    0        1
// static_globals                    cbuffer      NA          NA    1        1
// dynamic_light                     cbuffer      NA          NA    2        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyzw        0     NONE   float       
// SV_Position              0   xyzw        1      POS   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[5], immediateIndexed
dcl_constantbuffer cb1[21], immediateIndexed
dcl_constantbuffer cb2[3], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_comparison
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2dms(4) (float,float,float,float) t1
dcl_resource_texture3d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_input_ps_siv linear noperspective v1.xy, position
dcl_output o0.xyzw
dcl_temps 14
round_z r0.xy, v1.xyxx
ftoi r0.xy, r0.xyxx
mov r0.zw, l(0,0,0,0)
ldms_indexable(texture2dms)(float,float,float,float) r0.xyzw, r0.xyzw, t1.xyzw, l(0)
mad r1.xy, v1.xyxx, cb1[20].zwzz, -cb1[20].xyxx
mul r1.xy, r0.zzzz, r1.xyxx
mad r2.x, |r0.y|, l(2.000000), l(-1.000000)
lt r0.y, r0.y, l(0.000000)
movc r0.y, r0.y, l(-1.000000), l(1.000000)
mad r1.w, -r2.x, r2.x, l(1.000000)
mad r1.w, -r0.x, r0.x, r1.w
sqrt r1.w, |r1.w|
mul r2.y, r0.y, r1.w
ftou r0.y, r0.w
ubfe r0.y, l(4), l(21), r0.y
ftoi r0.w, r0.w
and r0.w, r0.w, l(0x80000000)
utof r0.w, r0.w
ne r0.w, l(0.000000, 0.000000, 0.000000, 0.000000), r0.w
and r0.w, r0.w, l(16)
iadd r0.y, r0.w, r0.y
utof r0.y, r0.y
mul r3.z, r0.y, l(0.0430107526)
mov r2.z, r0.x
mov r1.z, r0.z
mad r0.xyz, r2.xyzx, l(0.015000, 0.015000, 0.015000, 0.000000), r1.xyzx
dp3 r1.x, r0.xyzx, r0.xyzx
rsq r1.x, r1.x
mad r1.xyz, -r0.xyzx, r1.xxxx, -cb2[2].xyzx
dp3 r1.w, r1.xyzx, r1.xyzx
rsq r1.w, r1.w
mul r1.xyz, r1.wwww, r1.xyzx
dp3 r3.x, -cb2[2].xyzx, r2.xyzx
dp3 r3.y, r1.xyzx, r2.xyzx
sample_indexable(texture3d)(float,float,float,float) r1.xy, r3.xyzx, t2.xyzw, s1
mov r0.w, l(1.000000)
dp4 r2.y, cb0[0].xyzw, r0.xyzw
dp4 r2.z, cb0[1].xyzw, r0.xyzw
dp4 r2.x, cb0[2].xyzw, r0.xyzw
dp4 r0.x, cb0[3].xyzw, r0.xyzw
div r0.xyzw, r2.xyzx, r0.xxxx
mul r1.zw, r0.yyyz, l(0.000000, 0.000000, 512.000000, 512.000000)
frc r1.zw, r1.zzzw
mad r2.xy, r1.zwzz, l(-0.00195312500, -0.00195312500, 0.000000, 0.000000), r0.yzyy
sample_l_aoffimmi_indexable(-1,0,0)(texture2d)(float,float,float,float) r3.x, r2.xyxx, t3.xyzw, s0, l(0.000000)
sample_l_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r3.y, r2.xyxx, t3.yxzw, s0, l(0.000000)
sample_l_aoffimmi_indexable(0,-1,0)(texture2d)(float,float,float,float) r3.z, r2.xyxx, t3.yzxw, s0, l(0.000000)
sample_l_aoffimmi_indexable(-1,-1,0)(texture2d)(float,float,float,float) r3.w, r2.xyxx, t3.yzwx, s0, l(0.000000)
sample_l_aoffimmi_indexable(1,0,0)(texture2d)(float,float,float,float) r4.x, r2.xyxx, t3.xyzw, s0, l(0.000000)
sample_l_aoffimmi_indexable(2,0,0)(texture2d)(float,float,float,float) r4.y, r2.xyxx, t3.yxzw, s0, l(0.000000)
sample_l_aoffimmi_indexable(2,-1,0)(texture2d)(float,float,float,float) r4.z, r2.xyxx, t3.yzxw, s0, l(0.000000)
sample_l_aoffimmi_indexable(1,-1,0)(texture2d)(float,float,float,float) r4.w, r2.xyxx, t3.yzwx, s0, l(0.000000)
sample_l_aoffimmi_indexable(-1,2,0)(texture2d)(float,float,float,float) r5.x, r2.xyxx, t3.xyzw, s0, l(0.000000)
sample_l_aoffimmi_indexable(0,2,0)(texture2d)(float,float,float,float) r5.y, r2.xyxx, t3.yxzw, s0, l(0.000000)
sample_l_aoffimmi_indexable(0,1,0)(texture2d)(float,float,float,float) r5.z, r2.xyxx, t3.yzxw, s0, l(0.000000)
sample_l_aoffimmi_indexable(-1,1,0)(texture2d)(float,float,float,float) r5.w, r2.xyxx, t3.yzwx, s0, l(0.000000)
sample_l_aoffimmi_indexable(1,2,0)(texture2d)(float,float,float,float) r6.x, r2.xyxx, t3.xyzw, s0, l(0.000000)
sample_l_aoffimmi_indexable(2,2,0)(texture2d)(float,float,float,float) r6.y, r2.xyxx, t3.yxzw, s0, l(0.000000)
sample_l_aoffimmi_indexable(2,1,0)(texture2d)(float,float,float,float) r6.z, r2.xyxx, t3.yzxw, s0, l(0.000000)
sample_l_aoffimmi_indexable(1,1,0)(texture2d)(float,float,float,float) r6.w, r2.xyxx, t3.yzwx, s0, l(0.000000)
ge r2.xyzw, r3.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
ge r7.xyzw, r4.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r2.xyzw, r2.xyzw, l(1, 1, 1, 1)
and r7.xyzw, r7.xyzw, l(1, 1, 1, 1)
imul null, r2.xyzw, r2.xyzw, r7.xyzw
ge r7.xyzw, r5.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r7.xyzw, r7.xyzw, l(1, 1, 1, 1)
imul null, r2.xyzw, r2.xyzw, r7.xyzw
ge r7.xyzw, r6.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r7.xyzw, r7.xyzw, l(1, 1, 1, 1)
imul null, r2.xyzw, r2.xyzw, r7.xyzw
movc r2.xy, r2.yxyy, l(-1.000000,-1.000000,0,0), l(0,0,0,0)
ine r2.zw, r2.wwwz, l(0, 0, 0, 0)
and r2.xy, r2.xyxx, r2.zwzz
ftoi r2.xy, r2.xyxx
and r2.x, r2.y, r2.x
itof r2.x, r2.x
lt r7.xyzw, r3.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
lt r8.xyzw, r4.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r7.xyzw, r7.xyzw, l(1, 1, 1, 1)
and r8.xyzw, r8.xyzw, l(1, 1, 1, 1)
imul null, r7.xyzw, r7.xyzw, r8.xyzw
lt r8.xyzw, r5.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r8.xyzw, r8.xyzw, l(1, 1, 1, 1)
imul null, r7.xyzw, r7.xyzw, r8.xyzw
lt r8.xyzw, r6.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r8.xyzw, r8.xyzw, l(1, 1, 1, 1)
imul null, r7.xyzw, r7.xyzw, r8.xyzw
movc r2.yz, r7.yyxy, l(0,-1.000000,-1.000000,0), l(0,0,0,0)
ine r7.xy, r7.wzww, l(0, 0, 0, 0)
and r2.yz, r2.yyzy, r7.xxyx
ftoi r2.yz, r2.yyzy
and r2.y, r2.z, r2.y
add r7.xyzw, r0.xyzw, l(-0.000500, -0.500000, -0.500000, -0.000100)
lt r8.xyzw, -r3.xyzw, r7.xxxx
lt r9.xyzw, -r4.xyzw, r7.xxxx
and r8.xyzw, r8.xyzw, l(1, 1, 1, 1)
and r9.xyzw, r9.xyzw, l(1, 1, 1, 1)
imul null, r8.xyzw, r8.xyzw, r9.xyzw
lt r9.xyzw, -r5.xyzw, r7.xxxx
and r9.xyzw, r9.xyzw, l(1, 1, 1, 1)
imul null, r8.xyzw, r8.xyzw, r9.xyzw
lt r9.xyzw, -r6.xyzw, r7.xxxx
and r9.xyzw, r9.xyzw, l(1, 1, 1, 1)
imul null, r8.xyzw, r8.xyzw, r9.xyzw
movc r2.zw, r8.yyyx, l(0,0,-1.000000,-1.000000), l(0,0,0,0)
ine r3.xz, r8.wwzw, l(0, 0, 0, 0)
and r2.zw, r2.zzzw, r3.xxxz
ftoi r2.zw, r2.zzzw
and r0.x, r2.w, r2.z
and r0.x, r2.y, r0.x
itof r8.w, r0.x
add r0.x, -r3.y, r4.x
mad r0.x, r1.z, r0.x, r3.y
add r2.y, r6.w, -r5.z
mad r1.z, r1.z, r2.y, r5.z
add r1.z, -r0.x, r1.z
mad r0.x, r1.w, r1.z, r0.x
ge r0.x, r0.x, r7.w
and r8.x, r0.x, l(0xbf800000)
ne r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), r2.x
mov r8.yz, l(0,-1.000000,0,0)
movc r1.zw, r0.xxxx, r8.xxxy, r8.zzzw
ne r0.x, r1.w, l(0.000000)
if_nz r0.x
  ftoi r0.x, r1.z
  ieq r0.x, r0.x, l(-1)
  if_nz r0.x
    mov r0.x, l(1.000000)
  else 
    sample_c_lz_indexable(texture2d)(float,float,float,float) r0.x, r0.yzyy, t0.xxxx, s2, r0.w
  endif 
else 
  mad r1.zw, r0.yyyz, l(0.000000, 0.000000, 2048.000000, 2048.000000), l(0.000000, 0.000000, 0.500000, 0.500000)
  round_ni r2.xy, r1.zwzz
  add r1.zw, r1.zzzw, -r2.xxxy
  mad r0.yz, r1.zzwz, l(0.000000, -0.000488281250, -0.000488281250, 0.000000), r0.yyzy
  gather4_aoffimmi_indexable(-5,-5,0)(texture2d)(float,float,float,float) r2.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r3.xyzw, r2.xyzw, r7.wwww
  movc r3.xyzw, r3.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r0.w, r3.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  dp4 r2.x, r2.xyzw, r3.xyzw
  gather4_aoffimmi_indexable(-3,-5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-1,-5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(1,-5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(3,-5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(5,-5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-5,-3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-3,-3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-1,-3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(1,-3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(3,-3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(5,-3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-5,-1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-3,-1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-1,-1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(1,-1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(3,-1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(5,-1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-5,1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-3,1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-1,1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(1,1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(3,1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(5,1,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-5,3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-3,3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-1,3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(1,3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(3,3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(5,3,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-5,5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-3,5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(-1,5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(1,5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(3,5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  gather4_aoffimmi_indexable(5,5,0)(texture2d)(float,float,float,float) r3.xyzw, r0.yzyy, t0.xyzw, s0.x
  ge r4.xyzw, r3.xyzw, r7.wwww
  movc r4.xyzw, r4.xyzw, l(0,0,0,0), l(1.000000,1.000000,1.000000,1.000000)
  dp4 r2.y, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r0.w, r0.w, r2.y
  dp4 r2.y, r3.xyzw, r4.xyzw
  add r2.x, r2.x, r2.y
  lt r2.y, l(0.000000), r0.w
  div r0.w, r2.x, r0.w
  add r2.x, -r0.w, r7.w
  mul r2.x, r2.x, l(300.000000)
  div_sat r0.w, r2.x, r0.w
  mul r0.w, r0.w, r0.w
  and r0.w, r0.w, r2.y
  mul r2.x, r0.w, r0.w
  mul r2.y, r0.w, r2.x
  mul r2.z, r2.x, l(3.000000)
  add r2.w, -r0.w, l(1.000000)
  mul r3.x, r2.z, r2.w
  mul r3.y, r3.x, l(0.200000)
  mad r3.z, r3.x, l(0.200000), r2.y
  mul r3.w, r2.y, l(14.000000)
  mad r3.w, r3.z, l(10.000000), r3.w
  mul r4.x, r2.w, r2.w
  mul r4.y, r0.w, r4.x
  mul r4.z, r4.y, l(3.000000)
  mad r4.yw, r4.yyyy, l(0.000000, 3.000000, 0.000000, 0.600000), r3.xxxx
  mad r4.yw, r2.xxxx, r0.wwww, r4.yyyw
  mad r3.x, r4.w, l(7.000000), r3.w
  add r3.x, r3.z, r3.x
  mad r3.x, r2.y, l(2.000000), r3.x
  add r3.x, r3.z, r3.x
  add r3.x, r4.w, r3.x
  mad r3.x, r4.y, l(5.000000), r3.x
  add r3.x, r4.w, r3.x
  add r3.x, r3.z, r3.x
  mad r3.x, r2.y, l(2.000000), r3.x
  add r3.x, r3.z, r3.x
  add r3.x, r4.w, r3.x
  add r3.x, r4.y, r3.x
  mul r3.w, r2.w, r4.x
  mad r3.w, r3.w, l(0.100000), r4.z
  mad r3.w, r2.w, r2.z, r3.w
  mad r3.w, r2.x, r0.w, r3.w
  mad r3.x, r3.w, l(3.000000), r3.x
  add r3.x, r4.y, r3.x
  add r3.x, r4.w, r3.x
  add r3.x, r3.z, r3.x
  mad r3.x, r2.y, l(2.000000), r3.x
  add r3.x, r3.z, r3.x
  add r3.x, r4.w, r3.x
  add r3.x, r4.y, r3.x
  add r3.x, r3.w, r3.x
  mad r4.x, r4.x, r2.w, r4.z
  mad r2.z, r2.w, r2.z, r4.x
  mad r2.z, r2.x, r0.w, r2.z
  add r2.w, r2.z, r3.x
  add r2.w, r3.w, r2.w
  add r2.w, r4.y, r2.w
  add r2.w, r4.w, r2.w
  add r2.w, r3.z, r2.w
  mad r2.w, r2.y, l(2.000000), r2.w
  add r2.w, r3.z, r2.w
  add r2.w, r4.w, r2.w
  add r2.w, r4.y, r2.w
  mad r2.w, r3.w, l(3.000000), r2.w
  add r2.w, r4.y, r2.w
  add r2.w, r4.w, r2.w
  add r2.w, r3.z, r2.w
  mad r2.w, r2.y, l(2.000000), r2.w
  add r2.w, r3.z, r2.w
  add r2.w, r4.w, r2.w
  mad r2.w, r4.y, l(5.000000), r2.w
  add r2.w, r4.w, r2.w
  add r2.w, r3.z, r2.w
  mad r2.w, r2.y, l(2.000000), r2.w
  add r2.w, r3.z, r2.w
  mad r2.w, r4.w, l(7.000000), r2.w
  add r2.w, r3.z, r2.w
  mad r2.w, r2.y, l(2.000000), r2.w
  mad r2.w, r3.z, l(9.000000), r2.w
  mad r2.w, r2.y, l(12.000000), r2.w
  gather4_c_aoffimmi_indexable(-5,-5,0)(texture2d)(float,float,float,float) r5.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  add r3.x, -r1.w, l(1.000000)
  mad r4.x, -r2.y, r1.z, r2.y
  mul r5.xw, r4.xxxx, r5.wwwx
  mad r5.xz, r5.zzyz, r2.yyyy, r5.xxwx
  mul r4.z, r1.w, r5.z
  mad r4.z, r3.x, r5.x, r4.z
  gather4_c_aoffimmi_indexable(-3,-5,0)(texture2d)(float,float,float,float) r6.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  dp2 r5.x, r6.wzww, r2.yyyy
  mad r4.z, r3.x, r5.x, r4.z
  dp2 r5.x, r6.xyxx, r2.yyyy
  mad r4.z, r1.w, r5.x, r4.z
  gather4_c_aoffimmi_indexable(-1,-5,0)(texture2d)(float,float,float,float) r8.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  dp2 r5.x, r8.wzww, r2.yyyy
  mad r4.z, r3.x, r5.x, r4.z
  dp2 r5.x, r8.xyxx, r2.yyyy
  mad r4.z, r1.w, r5.x, r4.z
  gather4_c_aoffimmi_indexable(1,-5,0)(texture2d)(float,float,float,float) r9.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  dp2 r5.x, r9.wzww, r2.yyyy
  mad r4.z, r3.x, r5.x, r4.z
  dp2 r5.x, r9.xyxx, r2.yyyy
  mad r4.z, r1.w, r5.x, r4.z
  gather4_c_aoffimmi_indexable(3,-5,0)(texture2d)(float,float,float,float) r10.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  dp2 r5.x, r10.wzww, r2.yyyy
  mad r4.z, r3.x, r5.x, r4.z
  dp2 r5.x, r10.xyxx, r2.yyyy
  mad r4.z, r1.w, r5.x, r4.z
  gather4_c_aoffimmi_indexable(5,-5,0)(texture2d)(float,float,float,float) r11.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r5.xz, r1.zzzz, r11.zzyz
  mul r5.xz, r2.yyyy, r5.xxzx
  mad r6.zw, r11.wwwx, r2.yyyy, r5.xxxz
  mad r4.z, r3.x, r6.z, r4.z
  mad r4.z, r1.w, r6.w, r4.z
  gather4_c_aoffimmi_indexable(-5,-3,0)(texture2d)(float,float,float,float) r12.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mad r0.w, r2.x, r0.w, -r3.z
  mad r0.w, r1.z, r0.w, r3.z
  mul r6.zw, r0.wwww, r12.yyyz
  mad r6.zw, r12.xxxw, r4.xxxx, r6.zzzw
  mad r2.x, r3.x, r6.w, r4.z
  mad r2.x, r1.w, r6.z, r2.x
  mad r4.z, r5.y, r0.w, r5.w
  mad r2.x, r3.x, r4.z, r2.x
  mad r2.x, r1.w, r6.w, r2.x
  gather4_c_aoffimmi_indexable(-3,-3,0)(texture2d)(float,float,float,float) r12.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  add r4.z, r3.z, -r4.w
  mad r4.z, r1.z, r4.z, r4.w
  mul r5.xy, r4.zzzz, r12.wxww
  mad r5.xw, r12.zzzy, r4.wwww, r5.xxxy
  mad r2.x, r3.x, r5.x, r2.x
  mad r2.x, r1.w, r5.w, r2.x
  dp2 r5.x, r6.xyxx, r3.zzzz
  mad r2.x, r3.x, r5.x, r2.x
  dp2 r5.x, r12.wzww, r3.zzzz
  mad r2.x, r1.w, r5.x, r2.x
  gather4_c_aoffimmi_indexable(-1,-3,0)(texture2d)(float,float,float,float) r13.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  dp2 r5.x, r13.wzww, r4.wwww
  mad r2.x, r3.x, r5.x, r2.x
  dp2 r5.x, r13.xyxx, r4.wwww
  mad r2.x, r1.w, r5.x, r2.x
  dp2 r5.x, r8.xyxx, r3.zzzz
  mad r2.x, r3.x, r5.x, r2.x
  dp2 r5.x, r13.wzww, r3.zzzz
  mad r2.x, r1.w, r5.x, r2.x
  gather4_c_aoffimmi_indexable(1,-3,0)(texture2d)(float,float,float,float) r8.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  dp2 r5.x, r8.wzww, r4.wwww
  mad r2.x, r3.x, r5.x, r2.x
  dp2 r5.x, r8.xyxx, r4.wwww
  mad r2.x, r1.w, r5.x, r2.x
  dp2 r5.x, r9.xyxx, r3.zzzz
  mad r2.x, r3.x, r5.x, r2.x
  dp2 r5.x, r8.wzww, r3.zzzz
  mad r2.x, r1.w, r5.x, r2.x
  gather4_c_aoffimmi_indexable(3,-3,0)(texture2d)(float,float,float,float) r9.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  add r5.x, -r3.z, r4.w
  mad r5.x, r1.z, r5.x, r3.z
  mul r6.xy, r5.xxxx, r9.zyzz
  mad r6.xw, r9.wwwx, r4.wwww, r6.xxxy
  mad r2.x, r3.x, r6.x, r2.x
  mad r2.x, r1.w, r6.w, r2.x
  dp2 r5.w, r10.xyxx, r3.zzzz
  mad r2.x, r3.x, r5.w, r2.x
  dp2 r5.w, r9.wzww, r3.zzzz
  mad r2.x, r1.w, r5.w, r2.x
  gather4_c_aoffimmi_indexable(5,-3,0)(texture2d)(float,float,float,float) r10.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mad r3.y, r1.z, r3.y, r2.y
  mul r6.xw, r1.zzzz, r10.yyyz
  mul r6.xw, r2.yyyy, r6.xxxw
  mad r6.xw, r10.xxxw, r3.yyyy, r6.xxxw
  mad r2.x, r3.x, r6.w, r2.x
  mad r2.x, r1.w, r6.x, r2.x
  mad r5.z, r11.x, r3.y, r5.z
  mad r2.x, r3.x, r5.z, r2.x
  mad r2.x, r1.w, r6.w, r2.x
  gather4_c_aoffimmi_indexable(-5,-1,0)(texture2d)(float,float,float,float) r10.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r5.zw, r0.wwww, r10.yyyz
  mad r5.zw, r10.xxxw, r4.xxxx, r5.zzzw
  mad r2.x, r3.x, r5.w, r2.x
  mad r2.x, r1.w, r5.z, r2.x
  mad r2.x, r3.x, r6.z, r2.x
  mad r2.x, r1.w, r5.w, r2.x
  gather4_c_aoffimmi_indexable(-3,-1,0)(texture2d)(float,float,float,float) r10.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  add r6.zw, -r4.yyyw, r4.wwwy
  mad r6.zw, r1.zzzz, r6.zzzw, r4.yyyw
  mul r8.zw, r6.zzzz, r10.yyyz
  mad r8.zw, r10.xxxw, r4.zzzz, r8.zzzw
  mad r2.x, r3.x, r8.w, r2.x
  mad r2.x, r1.w, r8.z, r2.x
  mad r5.y, r12.y, r6.z, r5.y
  mad r2.x, r3.x, r5.y, r2.x
  mad r2.x, r1.w, r8.w, r2.x
  gather4_c_aoffimmi_indexable(-1,-1,0)(texture2d)(float,float,float,float) r10.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  add r5.y, -r3.w, r4.y
  mad r5.y, r1.z, r5.y, r3.w
  mul r9.yz, r5.yyyy, r10.wwxw
  mad r9.yw, r10.zzzy, r3.wwww, r9.yyyz
  mad r2.x, r3.x, r9.y, r2.x
  mad r2.x, r1.w, r9.w, r2.x
  dp2 r5.w, r13.xyxx, r4.yyyy
  mad r2.x, r3.x, r5.w, r2.x
  dp2 r5.w, r10.wzww, r4.yyyy
  mad r2.x, r1.w, r5.w, r2.x
  gather4_c_aoffimmi_indexable(1,-1,0)(texture2d)(float,float,float,float) r11.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  add r5.w, -r4.y, r3.w
  mad r5.w, r1.z, r5.w, r4.y
  mul r9.yw, r5.wwww, r11.zzzy
  mad r10.xz, r11.wwxw, r3.wwww, r9.yywy
  mad r2.x, r3.x, r10.x, r2.x
  mad r2.x, r1.w, r10.z, r2.x
  dp2 r7.x, r8.xyxx, r4.yyyy
  mad r2.x, r3.x, r7.x, r2.x
  dp2 r7.x, r11.wzww, r4.yyyy
  mad r2.x, r1.w, r7.x, r2.x
  gather4_c_aoffimmi_indexable(3,-1,0)(texture2d)(float,float,float,float) r12.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r8.xy, r5.xxxx, r12.yzyy
  mad r8.xy, r12.xwxx, r6.wwww, r8.xyxx
  mad r2.x, r3.x, r8.y, r2.x
  mad r2.x, r1.w, r8.x, r2.x
  mad r6.y, r9.x, r6.w, r6.y
  mad r2.x, r3.x, r6.y, r2.x
  mad r2.x, r1.w, r8.y, r2.x
  gather4_c_aoffimmi_indexable(5,-1,0)(texture2d)(float,float,float,float) r12.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r8.yw, r1.zzzz, r12.yyyz
  mul r8.yw, r2.yyyy, r8.yyyw
  mad r8.yw, r12.xxxw, r3.yyyy, r8.yyyw
  mad r2.x, r3.x, r8.w, r2.x
  mad r2.x, r1.w, r8.y, r2.x
  mad r2.x, r3.x, r6.x, r2.x
  mad r2.x, r1.w, r8.w, r2.x
  gather4_c_aoffimmi_indexable(-5,1,0)(texture2d)(float,float,float,float) r12.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r6.xy, r0.wwww, r12.yzyy
  mad r6.xy, r12.xwxx, r4.xxxx, r6.xyxx
  mad r2.x, r3.x, r6.y, r2.x
  mad r2.x, r1.w, r6.x, r2.x
  mad r2.x, r3.x, r5.z, r2.x
  mad r2.x, r1.w, r6.y, r2.x
  gather4_c_aoffimmi_indexable(-3,1,0)(texture2d)(float,float,float,float) r12.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r9.xy, r6.zzzz, r12.yzyy
  mad r9.xy, r12.xwxx, r4.zzzz, r9.xyxx
  mad r2.x, r3.x, r9.y, r2.x
  mad r2.x, r1.w, r9.x, r2.x
  mad r2.x, r3.x, r8.z, r2.x
  mad r2.x, r1.w, r9.y, r2.x
  gather4_c_aoffimmi_indexable(-1,1,0)(texture2d)(float,float,float,float) r12.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r5.yz, r5.yyyy, r12.wwxw
  mad r8.zw, r12.zzzy, r3.wwww, r5.yyyz
  mad r2.x, r3.x, r8.z, r2.x
  mad r2.x, r1.w, r8.w, r2.x
  add r5.z, -r2.z, r3.w
  mad r5.z, r1.z, r5.z, r2.z
  mad r6.y, r10.y, r5.z, r9.z
  mad r2.x, r3.x, r6.y, r2.x
  mad r5.y, r12.z, r5.z, r5.y
  mad r2.x, r1.w, r5.y, r2.x
  gather4_c_aoffimmi_indexable(1,1,0)(texture2d)(float,float,float,float) r10.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r5.yz, r5.wwww, r10.zzyz
  mad r5.zw, r10.wwwx, r3.wwww, r5.yyyz
  mad r2.x, r3.x, r5.z, r2.x
  mad r2.x, r1.w, r5.w, r2.x
  add r2.z, -r3.w, r2.z
  mad r2.z, r1.z, r2.z, r3.w
  mad r3.w, r11.x, r2.z, r9.w
  mad r2.x, r3.x, r3.w, r2.x
  mad r2.z, r10.w, r2.z, r5.y
  mad r2.x, r1.w, r2.z, r2.x
  gather4_c_aoffimmi_indexable(3,1,0)(texture2d)(float,float,float,float) r11.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r5.yz, r5.xxxx, r11.yyzy
  mad r5.yz, r11.xxwx, r6.wwww, r5.yyzy
  mad r2.x, r3.x, r5.z, r2.x
  mad r2.x, r1.w, r5.y, r2.x
  mad r2.x, r3.x, r8.x, r2.x
  mad r2.x, r1.w, r5.z, r2.x
  gather4_c_aoffimmi_indexable(5,1,0)(texture2d)(float,float,float,float) r11.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r5.zw, r1.zzzz, r11.yyyz
  mul r5.zw, r2.yyyy, r5.zzzw
  mad r5.zw, r11.xxxw, r3.yyyy, r5.zzzw
  mad r2.x, r3.x, r5.w, r2.x
  mad r2.x, r1.w, r5.z, r2.x
  mad r2.x, r3.x, r8.y, r2.x
  mad r2.x, r1.w, r5.w, r2.x
  gather4_c_aoffimmi_indexable(-5,3,0)(texture2d)(float,float,float,float) r8.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r8.yz, r0.wwww, r8.yyzy
  mad r8.xy, r8.xwxx, r4.xxxx, r8.yzyy
  mad r2.x, r3.x, r8.y, r2.x
  mad r2.x, r1.w, r8.x, r2.x
  mad r2.x, r3.x, r6.x, r2.x
  mad r2.x, r1.w, r8.y, r2.x
  gather4_c_aoffimmi_indexable(-3,3,0)(texture2d)(float,float,float,float) r11.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r6.xy, r4.zzzz, r11.wxww
  mad r8.yz, r11.zzyz, r4.wwww, r6.xxyx
  mad r2.x, r3.x, r8.y, r2.x
  mad r2.x, r1.w, r8.z, r2.x
  mad r2.x, r3.x, r9.x, r2.x
  mad r2.z, r11.z, r6.z, r6.x
  mad r2.x, r1.w, r2.z, r2.x
  gather4_c_aoffimmi_indexable(-1,3,0)(texture2d)(float,float,float,float) r9.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  dp2 r2.z, r9.wzww, r4.wwww
  mad r2.x, r3.x, r2.z, r2.x
  dp2 r2.z, r9.xyxx, r4.wwww
  mad r2.x, r1.w, r2.z, r2.x
  dp2 r2.z, r12.xyxx, r4.yyyy
  mad r2.x, r3.x, r2.z, r2.x
  dp2 r2.z, r9.wzww, r4.yyyy
  mad r2.x, r1.w, r2.z, r2.x
  gather4_c_aoffimmi_indexable(1,3,0)(texture2d)(float,float,float,float) r12.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  dp2 r2.z, r12.wzww, r4.wwww
  mad r2.x, r3.x, r2.z, r2.x
  dp2 r2.z, r12.xyxx, r4.wwww
  mad r2.x, r1.w, r2.z, r2.x
  dp2 r2.z, r10.xyxx, r4.yyyy
  mad r2.x, r3.x, r2.z, r2.x
  dp2 r2.z, r12.wzww, r4.yyyy
  mad r2.x, r1.w, r2.z, r2.x
  gather4_c_aoffimmi_indexable(3,3,0)(texture2d)(float,float,float,float) r10.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r4.yz, r5.xxxx, r10.zzyz
  mad r4.zw, r10.wwwx, r4.wwww, r4.yyyz
  mad r2.x, r3.x, r4.z, r2.x
  mad r2.x, r1.w, r4.w, r2.x
  mad r2.x, r3.x, r5.y, r2.x
  mad r2.z, r10.w, r6.w, r4.y
  mad r2.x, r1.w, r2.z, r2.x
  gather4_c_aoffimmi_indexable(5,3,0)(texture2d)(float,float,float,float) r6.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r4.yz, r1.zzzz, r6.yyzy
  mul r4.yz, r2.yyyy, r4.yyzy
  mad r4.yz, r6.xxwx, r3.yyyy, r4.yyzy
  mad r2.x, r3.x, r4.z, r2.x
  mad r2.x, r1.w, r4.y, r2.x
  mad r2.x, r3.x, r5.z, r2.x
  mad r2.x, r1.w, r4.z, r2.x
  gather4_c_aoffimmi_indexable(-5,5,0)(texture2d)(float,float,float,float) r5.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r4.xz, r4.xxxx, r5.wwxw
  mad r4.zw, r5.zzzy, r2.yyyy, r4.xxxz
  mad r2.x, r3.x, r4.z, r2.x
  mad r2.x, r1.w, r4.w, r2.x
  mad r2.x, r3.x, r8.x, r2.x
  mad r0.w, r5.z, r0.w, r4.x
  mad r0.w, r1.w, r0.w, r2.x
  gather4_c_aoffimmi_indexable(-3,5,0)(texture2d)(float,float,float,float) r5.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  dp2 r2.x, r5.wzww, r2.yyyy
  mad r0.w, r3.x, r2.x, r0.w
  dp2 r2.x, r5.xyxx, r2.yyyy
  mad r0.w, r1.w, r2.x, r0.w
  dp2 r2.x, r11.xyxx, r3.zzzz
  mad r0.w, r3.x, r2.x, r0.w
  dp2 r2.x, r5.wzww, r3.zzzz
  mad r0.w, r1.w, r2.x, r0.w
  gather4_c_aoffimmi_indexable(-1,5,0)(texture2d)(float,float,float,float) r5.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  dp2 r2.x, r5.wzww, r2.yyyy
  mad r0.w, r3.x, r2.x, r0.w
  dp2 r2.x, r5.xyxx, r2.yyyy
  mad r0.w, r1.w, r2.x, r0.w
  dp2 r2.x, r9.xyxx, r3.zzzz
  mad r0.w, r3.x, r2.x, r0.w
  dp2 r2.x, r5.wzww, r3.zzzz
  mad r0.w, r1.w, r2.x, r0.w
  gather4_c_aoffimmi_indexable(1,5,0)(texture2d)(float,float,float,float) r5.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  dp2 r2.x, r5.wzww, r2.yyyy
  mad r0.w, r3.x, r2.x, r0.w
  dp2 r2.x, r5.xyxx, r2.yyyy
  mad r0.w, r1.w, r2.x, r0.w
  dp2 r2.x, r12.xyxx, r3.zzzz
  mad r0.w, r3.x, r2.x, r0.w
  dp2 r2.x, r5.wzww, r3.zzzz
  mad r0.w, r1.w, r2.x, r0.w
  gather4_c_aoffimmi_indexable(3,5,0)(texture2d)(float,float,float,float) r5.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  dp2 r2.x, r5.wzww, r2.yyyy
  mad r0.w, r3.x, r2.x, r0.w
  dp2 r2.x, r5.xyxx, r2.yyyy
  mad r0.w, r1.w, r2.x, r0.w
  dp2 r2.x, r10.xyxx, r3.zzzz
  mad r0.w, r3.x, r2.x, r0.w
  dp2 r2.x, r5.wzww, r3.zzzz
  mad r0.w, r1.w, r2.x, r0.w
  gather4_c_aoffimmi_indexable(5,5,0)(texture2d)(float,float,float,float) r5.xyzw, r0.yzyy, t0.xyzw, s2.x, r7.w
  mul r0.yz, r1.zzzz, r5.zzyz
  mul r0.yz, r2.yyyy, r0.yyzy
  mad r2.xy, r5.wxww, r2.yyyy, r0.yzyy
  mad r0.z, r3.x, r2.x, r0.w
  mad r0.z, r1.w, r2.y, r0.z
  mad r0.z, r3.x, r4.y, r0.z
  mad r0.y, r5.w, r3.y, r0.y
  mad r0.y, r1.w, r0.y, r0.z
  div r0.x, r0.y, r2.w
endif 
lt r0.y, l(0.700000), r0.x
mul_sat r0.x, r0.x, l(1.42857146)
movc r0.x, r0.y, l(1.000000), r0.x
dp2 r0.y, r7.yzyy, cb0[4].xyxx
ge r0.y, l(0.000000), -r0.y
and r0.y, r0.y, l(0x3f800000)
mul r0.yz, r0.yyyy, r7.yyzy
add r0.yz, |r0.yyzy|, l(0.000000, -0.400000, -0.400000, 0.000000)
mul_sat r0.yz, r0.yyzy, l(0.000000, 10.000000, 10.000000, 0.000000)
add r0.yz, -r0.yyzy, l(0.000000, 1.000000, 1.000000, 0.000000)
add r0.w, -r0.x, l(1.000000)
mad r0.y, -r0.y, r0.z, l(1.000000)
mad r0.x, r0.w, r0.y, r0.x
mul r1.xyzw, r1.xxxy, cb2[0].xyzw
mul o0.xyzw, r0.xxxx, r1.xyzw
ret 
// Approximately 781 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
