// PreFix
// ---- Created with 3Dmigoto v1.2.29 on Mon Apr 04 23:03:55 2016

cbuffer _Globals : register(b0)
{
  row_major float4x4 m_shadow : packoffset(c0);
  float4 volume_range : packoffset(c4);
  float4 sun_shafts_intensity : packoffset(c5);
  float4 screen_res : packoffset(c6);
}

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_jitter_s : register(s1);
SamplerComparisonState smp_smap_s : register(s0);
Texture2D<float4> s_smap : register(t0);
Texture2DMS<float4,2> s_position : register(t1);
Texture2D<float4> jitter0 : register(t2);


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


void main( 
  float4 v0 : TEXCOORD0,
  float4 v1 : SV_Position0,
  uint v2 : SV_SAMPLEINDEX0,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = v0.xy / v0.ww;
  r1.xy = (int2)v1.xy;
  r1.zw = float2(0,0);
  r1.z = s_position.Load(r1.xy, v2.x).z;
  r0.zw = v1.xy * pos_decompression_params.zw + -pos_decompression_params.xy;
  r1.xy = r1.zz * r0.zw;
float4 stereo = StereoParams.Load(0);
float4 params = IniParams.Load(0);
r1.x -= stereo.x * (r1.z - stereo.y)/m_P._m00;
  r0.xy = screen_res.xx * r0.xy;
  r0.xy = float2(0.015625,0.015625) * r0.xy;
  r0.x = jitter0.Sample(smp_jitter_s, r0.xy).x;
  r0.x = 40 + -r0.x;
  r0.x = 0.000624999986 * r0.x;
  r0.yzw = r1.xyz * r0.xxx;
  r1.w = 1;
  r2.x = dot(m_shadow._m00_m01_m02_m03, r1.xyzw);
  r2.y = dot(m_shadow._m10_m11_m12_m13, r1.xyzw);
  r2.z = dot(m_shadow._m20_m21_m22_m23, r1.xyzw);
  r2.w = dot(m_shadow._m30_m31_m32_m33, r1.xyzw);
  r3.x = dot(m_shadow._m00_m01_m02, r0.yzw);
  r3.y = dot(m_shadow._m10_m11_m12, r0.yzw);
  r3.z = dot(m_shadow._m20_m21_m22, r0.yzw);
  r3.w = dot(m_shadow._m30_m31_m32, r0.yzw);
  r0.y = 0.0250000004 * sun_shafts_intensity.x;
  r0.z = cmp(r1.z < 9.99999975e-005);
  r0.z = r0.z ? sun_shafts_intensity.x : 0;
  r0.w = cmp(0.300000012 < r1.z);
  if (r0.w != 0) {
    r1.xyw = r2.xyz / r2.www;
    r0.w = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r0.w + r0.z;
  }
  r0.w = -r1.z * r0.x + r1.z;
  r2.xyzw = -r3.xyzw + r2.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.w = -r1.z * r0.x + r0.w;
  r2.xyzw = r2.xyzw + -r3.xyzw;
  r1.x = cmp(0.300000012 < r0.w);
  if (r1.x != 0) {
    r1.xyw = r2.xyz / r2.www;
    r1.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.w).x;
    r0.z = r0.y * r1.x + r0.z;
  }
  r0.x = -r1.z * r0.x + r0.w;
  r0.x = cmp(0.300000012 < r0.x);
  if (r0.x != 0) {
    r1.xyzw = r2.xyzw + -r3.xyzw;
    r1.xyz = r1.xyz / r1.www;
    r0.x = s_smap.SampleCmpLevelZero(smp_smap_s, r1.xy, r1.z).x;
    r0.z = r0.y * r0.x + r0.z;
  }
  r0.x = Ldynamic_dir.z * -0.5 + 0.5;
  r0.x = r0.x * 0.800000012 + 0.200000003;
  r0.x = r0.z * r0.x;
  o0.xyzw = Ldynamic_color.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
//   float4 volume_range;               // Offset:   64 Size:    16 [unused]
//   float4 sun_shafts_intensity;       // Offset:   80 Size:    16
//   float4 screen_res;                 // Offset:   96 Size:    16
//
// }
//
// 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_smap                        sampler_c      NA          NA    0        1
// smp_jitter                        sampler      NA          NA    1        1
// s_smap                            texture  float4          2d    0        1
// s_position                        texture  float4       2dMS2    1        1
// jitter0                           texture  float4          2d    2        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   xyzw
// SV_Position              0   xyzw        1      POS   float   xy  
// SV_SAMPLEINDEX           0   x           2   SAMPLE    uint   x   
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
// Pixel Shader runs at sample frequency
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[7], immediateIndexed
dcl_constantbuffer cb1[21], immediateIndexed
dcl_constantbuffer cb2[3], immediateIndexed
dcl_sampler s0, mode_comparison
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2dms(2) (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_input_ps linear v0.xyw
dcl_input_ps_siv linear noperspective v1.xy, position
dcl_input_ps_sgv v2.x, sampleIndex
dcl_output o0.xyzw
dcl_temps 4
div r0.xy, v0.xyxx, v0.wwww
ftoi r1.xy, v1.xyxx
mov r1.zw, l(0,0,0,0)
ldms_indexable(texture2dms)(float,float,float,float) r1.z, r1.xyzw, t1.xyzw, v2.x
mad r0.zw, v1.xxxy, cb1[20].zzzw, -cb1[20].xxxy
mul r1.xy, r0.zwzz, r1.zzzz
mul r0.xy, r0.xyxx, cb0[6].xxxx
mul r0.xy, r0.xyxx, l(0.015625, 0.015625, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t2.xyzw, s1
add r0.x, -r0.x, l(40.000000)
mul r0.x, r0.x, l(0.000625)
mul r0.yzw, r0.xxxx, r1.xxyz
mov r1.w, l(1.000000)
dp4 r2.x, cb0[0].xyzw, r1.xyzw
dp4 r2.y, cb0[1].xyzw, r1.xyzw
dp4 r2.z, cb0[2].xyzw, r1.xyzw
dp4 r2.w, cb0[3].xyzw, r1.xyzw
dp3 r3.x, cb0[0].xyzx, r0.yzwy
dp3 r3.y, cb0[1].xyzx, r0.yzwy
dp3 r3.z, cb0[2].xyzx, r0.yzwy
dp3 r3.w, cb0[3].xyzx, r0.yzwy
mul r0.y, cb0[5].x, l(0.025000)
lt r0.z, r1.z, l(0.000100)
and r0.z, r0.z, cb0[5].x
lt r0.w, l(0.300000), r1.z
if_nz r0.w
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r0.w, r0.z
endif 
mad r0.w, -r1.z, r0.x, r1.z
add r2.xyzw, r2.xyzw, -r3.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.x, -r1.z, r0.x, r0.w
lt r0.x, l(0.300000), r0.x
if_nz r0.x
  add r1.xyzw, -r3.xyzw, r2.xyzw
  div r1.xyz, r1.xyzx, r1.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r0.x, r1.xyxx, t0.xxxx, s0, r1.z
  mad r0.z, r0.y, r0.x, r0.z
endif 
mad r0.x, cb2[2].z, l(-0.500000), l(0.500000)
mad r0.x, r0.x, l(0.800000), l(0.200000)
mul r0.x, r0.x, r0.z
mul o0.xyzw, r0.xxxx, cb2[0].xyzw
ret 
// Approximately 347 instruction slots used

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


/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Recompiled ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789
//
//   using 3Dmigoto v1.2.29 on Mon Apr 04 23:03:55 2016
//
//
// Buffer Definitions: 
//
// cbuffer _Globals
// {
//
//   row_major float4x4 m_shadow;       // Offset:    0 Size:    64
//   float4 volume_range;               // Offset:   64 Size:    16 [unused]
//   float4 sun_shafts_intensity;       // Offset:   80 Size:    16
//   float4 screen_res;                 // Offset:   96 Size:    16
//
// }
//
// 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_smap_s                      sampler_c      NA          NA    0        1
// smp_jitter_s                      sampler      NA          NA    1        1
// s_smap                            texture  float4          2d    0        1
// s_position                        texture  float4       2dMS2    1        1
// jitter0                           texture  float4          2d    2        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   xy w
// SV_Position              0   xyzw        1      POS   float   xy  
// SV_SAMPLEINDEX           0   x           2   SAMPLE    uint   x   
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
// Pixel Shader runs at sample frequency
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[7], immediateIndexed
dcl_constantbuffer cb1[21], immediateIndexed
dcl_constantbuffer cb2[3], immediateIndexed
dcl_sampler s0, mode_comparison
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2dms(2) (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_input_ps linear v0.xyw
dcl_input_ps_siv linear noperspective v1.xy, position
dcl_input_ps_sgv v2.x, sampleIndex
dcl_output o0.xyzw
dcl_temps 4
div r0.xy, v0.xyxx, v0.wwww
round_z r0.zw, v1.xxxy
ftoi r1.xy, r0.zwzz
mov r1.zw, l(0,0,0,0)
ldms_indexable(texture2dms)(float,float,float,float) r1.z, r1.xyzw, t1.xyzw, v2.x
mad r0.zw, v1.xxxy, cb1[20].zzzw, -cb1[20].xxxy
mul r1.xy, r0.zwzz, r1.zzzz
mul r0.xy, r0.xyxx, cb0[6].xxxx
mul r0.xy, r0.xyxx, l(0.015625, 0.015625, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t2.xyzw, s1
add r0.x, -r0.x, l(40.000000)
mul r0.x, r0.x, l(0.000625)
mul r0.yzw, r0.xxxx, r1.xxyz
mov r1.w, l(1.000000)
dp4 r2.x, cb0[0].xyzw, r1.xyzw
dp4 r2.y, cb0[1].xyzw, r1.xyzw
dp4 r2.z, cb0[2].xyzw, r1.xyzw
dp4 r2.w, cb0[3].xyzw, r1.xyzw
dp3 r3.x, cb0[0].xyzx, r0.yzwy
dp3 r3.y, cb0[1].xyzx, r0.yzwy
dp3 r3.z, cb0[2].xyzx, r0.yzwy
dp3 r3.w, cb0[3].xyzx, r0.yzwy
mul r0.y, l(0.025000), cb0[5].x
lt r0.z, r1.z, l(0.000100)
and r0.z, r0.z, cb0[5].x
lt r0.w, l(0.300000), r1.z
if_nz r0.w
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r0.w, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r0.w, r0.z
endif 
mad r0.w, -r1.z, r0.x, r1.z
add r2.xyzw, r2.xyzw, -r3.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.w, -r1.z, r0.x, r0.w
add r2.xyzw, -r3.xyzw, r2.xyzw
lt r1.x, l(0.300000), r0.w
if_nz r1.x
  div r1.xyw, r2.xyxz, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t0.xxxx, s0, r1.w
  mad r0.z, r0.y, r1.x, r0.z
endif 
mad r0.x, -r1.z, r0.x, r0.w
lt r0.x, l(0.300000), r0.x
if_nz r0.x
  add r1.xyzw, -r3.xyzw, r2.xyzw
  div r1.xyz, r1.xyzx, r1.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r0.x, r1.xyxx, t0.xxxx, s0, r1.z
  mad r0.z, r0.y, r0.x, r0.z
endif 
mad r0.x, cb2[2].z, l(-0.500000), l(0.500000)
mad r0.x, r0.x, l(0.800000), l(0.200000)
mul r0.x, r0.x, r0.z
mul o0.xyzw, r0.xxxx, cb2[0].xyzw
ret 
// Approximately 348 instruction slots used

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