Texture2D<float4> t15 : register(t15);

Texture2DArray<float4> t14 : register(t14);

TextureCube<float4> t4 : register(t4);

Texture2D<float4> t2 : register(t2);

Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s15_s : register(s15);

SamplerState s14_s : register(s14);

SamplerState s4_s : register(s4);

SamplerState s2_s : register(s2);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

cbuffer cb2 : register(b2)
{
  float4 cb2[38];
}

cbuffer cb1 : register(b1)
{
  float4 cb1[8];
}


Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main( 
  float4 v0 : SV_POSITION0,
  float4 v1 : TEXCOORD0,
  float4 v2 : TEXCOORD4,
  float4 v3 : TEXCOORD1,
  float4 v4 : TEXCOORD2,
  float4 v5 : TEXCOORD3,
  float3 v6 : TEXCOORD5,
  float4 v7 : COLOR0,
  uint v8 : SV_IsFrontFace0,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = dot(v6.xyz, v6.xyz);
  r0.x = rsqrt(r0.x);
  r0.yzw = v6.xyz * r0.xxx;
  r1.xy = t0.Sample(s0_s, v1.xy).yw;
  r1.zw = t1.Sample(s1_s, v1.xy).xy;
  r2.xy = r1.zw * float2(2,2) + float2(-1,-1);
  r1.z = dot(r2.xy, r2.xy);
  r1.z = min(1, r1.z);
  r1.z = 1 + -r1.z;
  r2.z = sqrt(r1.z);
  r1.z = log2(v7.x);
  r1.z = 0.454545468 * r1.z;
  r1.z = exp2(r1.z);
  r1.x = log2(r1.x);
  r1.x = 0.454545468 * r1.x;
  r3.x = exp2(r1.x);
  r1.x = 1 + -r1.z;
  r3.y = cb1[1].x + -r1.x;
  r1.xzw = t15.SampleLevel(s15_s, r3.xy, 0).xyz;
  r3.xy = t2.Sample(s2_s, v1.xy).xy;
  r3.zw = cb2[11].xy * r3.yx;
  r2.w = -r3.y * cb2[11].x + 1;
  r2.w = r2.w * 2 + -1;
  r2.w = 8.65590954 * r2.w;
  r2.w = exp2(r2.w);
  r2.w = 1 + r2.w;
  r2.w = 3 / r2.w;
  r2.w = 3 + -r2.w;
  r3.w = 3.14159274 * r3.w;
  r3.z = r3.z * 10 + 1;
  r3.z = exp2(r3.z);
  r4.x = dot(v3.xyz, r2.xyz);
  r4.y = dot(v4.xyz, r2.xyz);
  r4.z = dot(v5.xyz, r2.xyz);
  r2.x = dot(r4.xyz, r4.xyz);
  r2.x = rsqrt(r2.x);
  r4.xyz = r4.xyz * r2.xxx;
  r4.w = v8.x ? r4.y : -r4.y;
  r2.x = cb2[10].x == 1.000000;
  if (r2.x != 0) {
    r2.x = v2.w < cb2[37].w;
    r5.xyz = cb2[37].zyx < v2.www;
    r6.xyzw = r5.zzzz ? cb2[28].xyzw : cb2[25].xyzw;
    r7.xyzw = r5.zzzz ? cb2[29].xyzw : cb2[26].xyzw;
    r2.y = r5.z ? 1.000000 : 0;
    r6.xyzw = r5.yyyy ? cb2[31].xyzw : r6.xyzw;
    r7.xyzw = r5.yyyy ? cb2[32].xyzw : r7.xyzw;
    r2.y = r5.y ? 2 : r2.y;
    r6.xyzw = r5.xxxx ? cb2[34].xyzw : r6.xyzw;
    r7.xyzw = r5.xxxx ? cb2[35].xyzw : r7.xyzw;
    r8.z = r5.x ? 3 : r2.y;
    r9.xyz = v2.xyz;
    r9.w = 1;
    r8.x = dot(r6.xyzw, r9.xyzw);
    r8.y = dot(r7.xyzw, r9.xyzw);
    r2.y = t14.Sample(s14_s, r8.xyz).x;
    if (r2.x != 0) {
      r6.xyzw = r5.zzzz ? cb2[30].xyzw : cb2[27].xyzw;
      r6.xyzw = r5.yyyy ? cb2[33].xyzw : r6.xyzw;
      r5.xyzw = r5.xxxx ? cb2[36].xyzw : r6.xyzw;
      r2.x = dot(r5.xyzw, r9.xyzw);
      r2.x = r2.y >= r2.x;
      r2.x = r2.x ? 1.000000 : 0;
    } else {
      r2.x = 1;
    }
  } else {
    r2.x = 1;
  }
  r2.y = 1 + -cb2[11].x;
  r2.z = dot(r0.ywz, r4.xzw);
  r4.y = dot(cb2[0].xzy, r4.xzw);
  r5.xyz = -r4.xwz * r2.zzz + r0.yzw;
  r6.xyz = -r4.xwz * r4.yyy + cb2[0].xyz;
  r5.w = dot(r5.xyz, r6.xyz);
  r6.x = r2.y * r2.y;
  r6.yz = r2.yy * r2.yy + float2(0.569999993,0.0900000036);
  r6.xy = r6.xx / r6.yz;
  r2.y = 0.449999988 * r6.y;
  r6.x = -r6.x * 0.5 + 1;
  r6.y = -r2.z * r2.z + 1;
  r6.z = -r4.y * r4.y + 1;
  r6.z = saturate(r6.y * r6.z);
  r6.z = sqrt(r6.z);
  r6.w = max(r4.y, r2.z);
  r6.z = r6.z / r6.w;
  r6.w = max(0, r4.y);
  r5.w = max(0, r5.w);
  r5.w = r5.w * r2.y;
  r5.w = r5.w * r6.z + r6.x;
  r5.w = r6.w * r5.w;
  r7.xyz = cb2[1].xyz * r5.www;
  r5.w = min(1, r6.w);
  r6.z = saturate(r2.z);
  r6.w = 1 + -r6.z;
  r6.w = log2(r6.w);
  r6.w = 0.00999999978 * r6.w;
  r6.w = exp2(r6.w);
  r7.w = saturate(dot(r0.yzw, -cb2[0].xyz));
  r7.w = r7.w * r6.w;
  r7.w = r7.w * r5.w;
  r8.xyz = cb2[1].xyz * r7.www;
  r8.xyz = r8.xyz * r2.www;
  r7.xyz = r7.xyz * r2.xxx + r8.xyz;
  r8.xyz = cb1[7].yyy * r1.xzw;
  r7.w = saturate(-r4.y);
  r8.xyz = r7.www * r8.xyz;
  r7.xyz = cb2[1].xyz * r8.xyz + r7.xyz;
  r4.y = cb1[7].x + r4.y;
  r7.w = 1 + cb1[7].x;
  r4.y = saturate(r4.y / r7.w);
  r4.y = r4.y + -r5.w;
  r4.y = max(0, r4.y);
  r8.xyz = cb2[1].xyz * r4.yyy;
  r7.xyz = r8.xyz * r1.xzw + r7.xyz;
  r7.xyz = r7.xyz * r2.xxx;
  r8.xyz = v6.xyz * r0.xxx + cb2[0].xyz;
  r4.y = dot(r8.xyz, r8.xyz);
  r4.y = rsqrt(r4.y);
  r8.xyz = r8.xyz * r4.yyy;
  r4.y = saturate(dot(r0.yzw, r8.xyz));
  r7.w = saturate(dot(r8.xzy, r4.xzw));
  r8.x = 2 + r3.z;
  r8.x = 0.159154937 * r8.x;
  r8.y = log2(r7.w);
  r8.y = r8.y * r3.z;
  r8.y = exp2(r8.y);
  r8.z = max(1.1920929e-007, r4.y);
  r8.w = min(r6.z, r5.w);
  r7.w = r7.w + r7.w;
  r9.x = r8.w * r7.w;
  r9.x = r8.z >= r9.x;
  r8.w = r6.z == r8.w;
  r9.y = r5.w / r6.z;
  r8.w = r8.w ? 1 : r9.y;
  r7.w = r8.w * r7.w;
  r7.w = r7.w / r8.z;
  r8.z = 1 / r6.z;
  r7.w = r9.x ? r7.w : r8.z;
  r4.y = 1 + -r4.y;
  r8.w = r4.y * r4.y;
  r8.yw = r8.xw * r8.yw;
  r9.x = r8.w * r4.y;
  r4.y = -r4.y * r8.w + 1;
  r4.y = r4.y * 0.200000003 + r9.x;
  r4.y = min(1, r4.y);
  r4.y = r4.y * r7.w;
  r4.y = r4.y * r8.y;
  r4.y = 0.25 * r4.y;
  r4.y = min(15, r4.y);
  r4.y = r4.y * r3.w;
  r9.xyz = cb2[1].xyz * r4.yyy;
  r9.xyz = r9.xyz * r5.www;
  r9.xyz = r9.xyz * r2.xxx;
  r2.x = frac(cb2[19].w);
  r2.x = cb2[19].w + -r2.x;
  r2.x = min(20, r2.x);
  r2.x = max(0, r2.x);
  r4.y = 0 < r2.x;
  if (r4.y != 0) {
    r10.xyz = r7.xyz;
    r11.xyz = r9.xyz;
    r4.y = 0;
    while (true) {
      r5.w = (int)r4.y;
      r5.w = r5.w >= r2.x;
      if (r5.w != 0) break;
      r12.xyz = cb2[r4.y+13].xyz + -v2.xyz;
      r5.w = dot(r12.xyz, r12.xyz);
      r7.w = sqrt(r5.w);
      r7.w = saturate(r7.w / cb2[r4.y+13].w);
      r7.w = -r7.w * r7.w + 1;
      r7.w = log2(r7.w);
      r7.w = 2.20000005 * r7.w;
      r7.w = exp2(r7.w);
      r5.w = rsqrt(r5.w);
      r12.xyz = r12.xyz * r5.www;
      r5.w = dot(r12.xzy, r4.xzw);
      r13.xyz = -r4.xwz * r5.www + r12.xyz;
      r8.y = dot(r5.xyz, r13.xyz);
      r8.w = -r5.w * r5.w + 1;
      r8.w = saturate(r8.w * r6.y);
      r8.w = sqrt(r8.w);
      r9.w = max(r5.w, r2.z);
      r8.w = r8.w / r9.w;
      r5.w = max(0, r5.w);
      r8.y = max(0, r8.y);
      r8.y = r8.y * r2.y;
      r8.y = r8.y * r8.w + r6.x;
      r8.y = r8.y * r5.w;
      r13.xyz = cb2[r4.y+19].xyz * r8.yyy;
      r8.y = r7.w * r7.w;
      r13.xyz = r8.yyy * r13.xyz + r10.xyz;
      r5.w = min(1, r5.w);
      r8.y = saturate(dot(r0.yzw, -r12.xyz));
      r8.y = r8.y * r6.w;
      r8.y = r8.y * r5.w;
      r14.xyz = cb2[r4.y+19].xyz * r8.yyy;
      r14.xyz = r14.xyz * r2.www;
      r10.xyz = r14.xyz * r7.www + r13.xyz;
      r12.xyz = v6.xyz * r0.xxx + r12.xyz;
      r8.y = dot(r12.xyz, r12.xyz);
      r8.y = rsqrt(r8.y);
      r12.xyz = r12.xyz * r8.yyy;
      r8.y = saturate(dot(r0.yzw, r12.xyz));
      r8.w = saturate(dot(r12.xzy, r4.xzw));
      r9.w = log2(r8.w);
      r9.w = r9.w * r3.z;
      r9.w = exp2(r9.w);
      r9.w = r9.w * r8.x;
      r10.w = max(1.1920929e-007, r8.y);
      r11.w = min(r6.z, r5.w);
      r8.w = r8.w + r8.w;
      r12.x = r11.w * r8.w;
      r12.x = r10.w >= r12.x;
      r11.w = r6.z == r11.w;
      r12.y = r5.w / r6.z;
      r11.w = r11.w ? 1 : r12.y;
      r8.w = r11.w * r8.w;
      r8.w = r8.w / r10.w;
      r8.w = r12.x ? r8.w : r8.z;
      r8.y = 1 + -r8.y;
      r10.w = r8.y * r8.y;
      r10.w = r10.w * r10.w;
      r11.w = r10.w * r8.y;
      r8.y = -r8.y * r10.w + 1;
      r8.y = r8.y * 0.200000003 + r11.w;
      r8.y = min(1, r8.y);
      r8.y = r8.y * r8.w;
      r8.y = r8.y * r9.w;
      r8.y = 0.25 * r8.y;
      r8.y = min(15, r8.y);
      r8.y = r8.y * r3.w;
      r12.xyz = cb2[r4.y+19].xyz * r8.yyy;
      r12.xyz = r12.xyz * r5.www;
      r11.xyz = r12.xyz * r7.www;
      r4.y = (int)r4.y + 1;
    }
    r7.xyz = r10.xyz;
    r9.xyz = r11.xyz;
  }
  r0.x = 1 + -r3.y;
  r0.x = 6 * r0.x;
  r0.x = v0.z * 0.001953125 + r0.x;
  r2.x = 3 * r3.x;
  r2.y = saturate(-0.300000012 + r3.y);
  r2.y = rsqrt(r2.y);
  r2.y = 1 / r2.y;
  r2.y = min(1, r2.y);
  r2.x = r2.x * r2.y;
  r2.x = cb2[11].y * r2.x;
  r2.y = r2.z + r2.z;
  r0.yzw = r2.yyy * r4.xwz + -r0.yzw;
  r0.yzw = -r0.yzw;
  r0.xyz = t4.SampleLevel(s4_s, r0.yzw, r0.x).xyz;
  r0.xyz = r0.xyz * r2.xxx;
  r0.xyz = cb1[2].xxx * r0.xyz;
  r2.xyz = cb2[3].yzw + r7.xyz;
  r1.xzw = r2.xyz * r1.xzw + r9.xyz;
  o0.xyz = r0.xyz * r2.xyz + r1.xzw;
  r0.x = r1.y * v7.w + -cb2[3].x;
  r0.x = r0.x < 0;
  if (r0.x != 0) discard;
  o0.w = cb2[2].z;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.9 on Mon Nov 23 23:29:07 2015
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float     z 
// TEXCOORD                 0   xy          1     NONE   float   xy  
// TEXCOORD                 4   xyzw        2     NONE   float   xyzw
// TEXCOORD                 1   xyz         3     NONE   float   xyz 
// TEXCOORD                 2   xyz         4     NONE   float   xyz 
// TEXCOORD                 3   xyz         5     NONE   float   xyz 
// TEXCOORD                 5   xyz         6     NONE   float   xyz 
// COLOR                    0   xyzw        7     NONE   float   x  w
// SV_IsFrontFace           0   x           8    FFACE    uint   x   
//
//
// 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 cb1[8], immediateIndexed
dcl_constantbuffer cb2[38], dynamicIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s4, mode_default
dcl_sampler s14, mode_default
dcl_sampler s15, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texturecube (float,float,float,float) t4
dcl_resource_texture2darray (float,float,float,float) t14
dcl_resource_texture2d (float,float,float,float) t15
dcl_input_ps_siv linear noperspective v0.z, position
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.xyz
dcl_input_ps linear v4.xyz
dcl_input_ps linear v5.xyz
dcl_input_ps linear v6.xyz
dcl_input_ps linear v7.xw
dcl_input_ps_sgv v8.x, is_front_face
dcl_output o0.xyzw
dcl_temps 15
dp3 r0.x, v6.xyzx, v6.xyzx
rsq r0.x, r0.x
mul r0.yzw, r0.xxxx, v6.xxyz
sample_indexable(texture2d)(float,float,float,float) r1.xy, v1.xyxx, t0.ywxz, s0
sample_indexable(texture2d)(float,float,float,float) r1.zw, v1.xyxx, t1.zwxy, s1
mad r2.xy, r1.zwzz, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r1.z, r2.xyxx, r2.xyxx
min r1.z, r1.z, l(1.000000)
add r1.z, -r1.z, l(1.000000)
sqrt r2.z, r1.z
log r1.z, v7.x
mul r1.z, r1.z, l(0.454545468)
exp r1.z, r1.z
log r1.x, r1.x
mul r1.x, r1.x, l(0.454545468)
exp r3.x, r1.x
add r1.x, -r1.z, l(1.000000)
add r3.y, -r1.x, cb1[1].x
sample_l_indexable(texture2d)(float,float,float,float) r1.xzw, r3.xyxx, t15.xwyz, s15, l(0.000000)
sample_indexable(texture2d)(float,float,float,float) r3.xy, v1.xyxx, t2.xyzw, s2
mul r3.zw, r3.yyyx, cb2[11].xxxy
mad r2.w, -r3.y, cb2[11].x, l(1.000000)
mad r2.w, r2.w, l(2.000000), l(-1.000000)
mul r2.w, r2.w, l(8.655910)
exp r2.w, r2.w
add r2.w, r2.w, l(1.000000)
div r2.w, l(3.000000), r2.w
add r2.w, -r2.w, l(3.000000)
mul r3.w, r3.w, l(3.14159274)
mad r3.z, r3.z, l(10.000000), l(1.000000)
exp r3.z, r3.z
dp3 r4.x, v3.xyzx, r2.xyzx
dp3 r4.y, v4.xyzx, r2.xyzx
dp3 r4.z, v5.xyzx, r2.xyzx
dp3 r2.x, r4.xyzx, r4.xyzx
rsq r2.x, r2.x
mul r4.xyz, r2.xxxx, r4.xyzx
movc r4.w, v8.x, r4.y, -r4.y
eq r2.x, cb2[10].x, l(1.000000)
if_nz r2.x
  lt r2.x, v2.w, cb2[37].w
  lt r5.xyz, cb2[37].zyxz, v2.wwww
  movc r6.xyzw, r5.zzzz, cb2[28].xyzw, cb2[25].xyzw
  movc r7.xyzw, r5.zzzz, cb2[29].xyzw, cb2[26].xyzw
  and r2.y, r5.z, l(0x3f800000)
  movc r6.xyzw, r5.yyyy, cb2[31].xyzw, r6.xyzw
  movc r7.xyzw, r5.yyyy, cb2[32].xyzw, r7.xyzw
  movc r2.y, r5.y, l(2.000000), r2.y
  movc r6.xyzw, r5.xxxx, cb2[34].xyzw, r6.xyzw
  movc r7.xyzw, r5.xxxx, cb2[35].xyzw, r7.xyzw
  movc r8.z, r5.x, l(3.000000), r2.y
  mov r9.xyz, v2.xyzx
  mov r9.w, l(1.000000)
  dp4 r8.x, r6.xyzw, r9.xyzw
  dp4 r8.y, r7.xyzw, r9.xyzw
  sample_indexable(texture2darray)(float,float,float,float) r2.y, r8.xyzx, t14.yxzw, s14
  if_nz r2.x
    movc r6.xyzw, r5.zzzz, cb2[30].xyzw, cb2[27].xyzw
    movc r6.xyzw, r5.yyyy, cb2[33].xyzw, r6.xyzw
    movc r5.xyzw, r5.xxxx, cb2[36].xyzw, r6.xyzw
    dp4 r2.x, r5.xyzw, r9.xyzw
    ge r2.x, r2.y, r2.x
    and r2.x, r2.x, l(0x3f800000)
  else 
    mov r2.x, l(1.000000)
  endif 
else 
  mov r2.x, l(1.000000)
endif 
add r2.y, -cb2[11].x, l(1.000000)
dp3 r2.z, r0.ywzy, r4.xzwx
dp3 r4.y, cb2[0].xzyx, r4.xzwx
mad r5.xyz, -r4.xwzx, r2.zzzz, r0.yzwy
mad r6.xyz, -r4.xwzx, r4.yyyy, cb2[0].xyzx
dp3 r5.w, r5.xyzx, r6.xyzx
mul r6.x, r2.y, r2.y
mad r6.yz, r2.yyyy, r2.yyyy, l(0.000000, 0.570000, 0.090000, 0.000000)
div r6.xy, r6.xxxx, r6.yzyy
mul r2.y, r6.y, l(0.450000)
mad r6.x, -r6.x, l(0.500000), l(1.000000)
mad r6.y, -r2.z, r2.z, l(1.000000)
mad r6.z, -r4.y, r4.y, l(1.000000)
mul_sat r6.z, r6.z, r6.y
sqrt r6.z, r6.z
max r6.w, r2.z, r4.y
div r6.z, r6.z, r6.w
max r6.w, r4.y, l(0.000000)
max r5.w, r5.w, l(0.000000)
mul r5.w, r2.y, r5.w
mad r5.w, r5.w, r6.z, r6.x
mul r5.w, r5.w, r6.w
mul r7.xyz, r5.wwww, cb2[1].xyzx
min r5.w, r6.w, l(1.000000)
mov_sat r6.z, r2.z
add r6.w, -r6.z, l(1.000000)
log r6.w, r6.w
mul r6.w, r6.w, l(0.010000)
exp r6.w, r6.w
dp3_sat r7.w, r0.yzwy, -cb2[0].xyzx
mul r7.w, r6.w, r7.w
mul r7.w, r5.w, r7.w
mul r8.xyz, r7.wwww, cb2[1].xyzx
mul r8.xyz, r2.wwww, r8.xyzx
mad r7.xyz, r7.xyzx, r2.xxxx, r8.xyzx
mul r8.xyz, r1.xzwx, cb1[7].yyyy
mov_sat r7.w, -r4.y
mul r8.xyz, r8.xyzx, r7.wwww
mad r7.xyz, cb2[1].xyzx, r8.xyzx, r7.xyzx
add r4.y, r4.y, cb1[7].x
add r7.w, cb1[7].x, l(1.000000)
div_sat r4.y, r4.y, r7.w
add r4.y, -r5.w, r4.y
max r4.y, r4.y, l(0.000000)
mul r8.xyz, r4.yyyy, cb2[1].xyzx
mad r7.xyz, r8.xyzx, r1.xzwx, r7.xyzx
mul r7.xyz, r2.xxxx, r7.xyzx
mad r8.xyz, v6.xyzx, r0.xxxx, cb2[0].xyzx
dp3 r4.y, r8.xyzx, r8.xyzx
rsq r4.y, r4.y
mul r8.xyz, r4.yyyy, r8.xyzx
dp3_sat r4.y, r0.yzwy, r8.xyzx
dp3_sat r7.w, r8.xzyx, r4.xzwx
add r8.x, r3.z, l(2.000000)
mul r8.x, r8.x, l(0.159154937)
log r8.y, r7.w
mul r8.y, r3.z, r8.y
exp r8.y, r8.y
max r8.z, r4.y, l(1.192092896E-007)
min r8.w, r5.w, r6.z
add r7.w, r7.w, r7.w
mul r9.x, r7.w, r8.w
ge r9.x, r8.z, r9.x
eq r8.w, r6.z, r8.w
div r9.y, r5.w, r6.z
movc r8.w, r8.w, l(1.000000), r9.y
mul r7.w, r7.w, r8.w
div r7.w, r7.w, r8.z
div r8.z, l(1.000000, 1.000000, 1.000000, 1.000000), r6.z
movc r7.w, r9.x, r7.w, r8.z
add r4.y, -r4.y, l(1.000000)
mul r8.w, r4.y, r4.y
mul r8.yw, r8.yyyw, r8.xxxw
mul r9.x, r4.y, r8.w
mad r4.y, -r4.y, r8.w, l(1.000000)
mad r4.y, r4.y, l(0.200000), r9.x
min r4.y, r4.y, l(1.000000)
mul r4.y, r7.w, r4.y
mul r4.y, r8.y, r4.y
mul r4.y, r4.y, l(0.250000)
min r4.y, r4.y, l(15.000000)
mul r4.y, r3.w, r4.y
mul r9.xyz, r4.yyyy, cb2[1].xyzx
mul r9.xyz, r5.wwww, r9.xyzx
mul r9.xyz, r2.xxxx, r9.xyzx
frc r2.x, cb2[19].w
add r2.x, -r2.x, cb2[19].w
min r2.x, r2.x, l(20.000000)
max r2.x, r2.x, l(0.000000)
lt r4.y, l(0.000000), r2.x
if_nz r4.y
  mov r10.xyz, r7.xyzx
  mov r11.xyz, r9.xyzx
  mov r4.y, l(0)
  loop 
    itof r5.w, r4.y
    ge r5.w, r5.w, r2.x
    breakc_nz r5.w
    add r12.xyz, -v2.xyzx, cb2[r4.y + 13].xyzx
    dp3 r5.w, r12.xyzx, r12.xyzx
    sqrt r7.w, r5.w
    div_sat r7.w, r7.w, cb2[r4.y + 13].w
    mad r7.w, -r7.w, r7.w, l(1.000000)
    log r7.w, r7.w
    mul r7.w, r7.w, l(2.200000)
    exp r7.w, r7.w
    rsq r5.w, r5.w
    mul r12.xyz, r5.wwww, r12.xyzx
    dp3 r5.w, r12.xzyx, r4.xzwx
    mad r13.xyz, -r4.xwzx, r5.wwww, r12.xyzx
    dp3 r8.y, r5.xyzx, r13.xyzx
    mad r8.w, -r5.w, r5.w, l(1.000000)
    mul_sat r8.w, r6.y, r8.w
    sqrt r8.w, r8.w
    max r9.w, r2.z, r5.w
    div r8.w, r8.w, r9.w
    max r5.w, r5.w, l(0.000000)
    max r8.y, r8.y, l(0.000000)
    mul r8.y, r2.y, r8.y
    mad r8.y, r8.y, r8.w, r6.x
    mul r8.y, r5.w, r8.y
    mul r13.xyz, r8.yyyy, cb2[r4.y + 19].xyzx
    mul r8.y, r7.w, r7.w
    mad r13.xyz, r8.yyyy, r13.xyzx, r10.xyzx
    min r5.w, r5.w, l(1.000000)
    dp3_sat r8.y, r0.yzwy, -r12.xyzx
    mul r8.y, r6.w, r8.y
    mul r8.y, r5.w, r8.y
    mul r14.xyz, r8.yyyy, cb2[r4.y + 19].xyzx
    mul r14.xyz, r2.wwww, r14.xyzx
    mad r10.xyz, r14.xyzx, r7.wwww, r13.xyzx
    mad r12.xyz, v6.xyzx, r0.xxxx, r12.xyzx
    dp3 r8.y, r12.xyzx, r12.xyzx
    rsq r8.y, r8.y
    mul r12.xyz, r8.yyyy, r12.xyzx
    dp3_sat r8.y, r0.yzwy, r12.xyzx
    dp3_sat r8.w, r12.xzyx, r4.xzwx
    log r9.w, r8.w
    mul r9.w, r3.z, r9.w
    exp r9.w, r9.w
    mul r9.w, r8.x, r9.w
    max r10.w, r8.y, l(1.192092896E-007)
    min r11.w, r5.w, r6.z
    add r8.w, r8.w, r8.w
    mul r12.x, r8.w, r11.w
    ge r12.x, r10.w, r12.x
    eq r11.w, r6.z, r11.w
    div r12.y, r5.w, r6.z
    movc r11.w, r11.w, l(1.000000), r12.y
    mul r8.w, r8.w, r11.w
    div r8.w, r8.w, r10.w
    movc r8.w, r12.x, r8.w, r8.z
    add r8.y, -r8.y, l(1.000000)
    mul r10.w, r8.y, r8.y
    mul r10.w, r10.w, r10.w
    mul r11.w, r8.y, r10.w
    mad r8.y, -r8.y, r10.w, l(1.000000)
    mad r8.y, r8.y, l(0.200000), r11.w
    min r8.y, r8.y, l(1.000000)
    mul r8.y, r8.w, r8.y
    mul r8.y, r9.w, r8.y
    mul r8.y, r8.y, l(0.250000)
    min r8.y, r8.y, l(15.000000)
    mul r8.y, r3.w, r8.y
    mul r12.xyz, r8.yyyy, cb2[r4.y + 19].xyzx
    mul r12.xyz, r5.wwww, r12.xyzx
    mul r11.xyz, r7.wwww, r12.xyzx
    iadd r4.y, r4.y, l(1)
  endloop 
  mov r7.xyz, r10.xyzx
  mov r9.xyz, r11.xyzx
endif 
add r0.x, -r3.y, l(1.000000)
mul r0.x, r0.x, l(6.000000)
mad r0.x, v0.z, l(0.00195312500), r0.x
mul r2.x, r3.x, l(3.000000)
add_sat r2.y, r3.y, l(-0.300000)
rsq r2.y, r2.y
div r2.y, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y
min r2.y, r2.y, l(1.000000)
mul r2.x, r2.y, r2.x
mul r2.x, r2.x, cb2[11].y
add r2.y, r2.z, r2.z
mad r0.yzw, r2.yyyy, r4.xxwz, -r0.yyzw
mov r0.yzw, -r0.yyzw
sample_l_indexable(texturecube)(float,float,float,float) r0.xyz, r0.yzwy, t4.xyzw, s4, r0.x
mul r0.xyz, r2.xxxx, r0.xyzx
mul r0.xyz, r0.xyzx, cb1[2].xxxx
add r2.xyz, r7.xyzx, cb2[3].yzwy
mad r1.xzw, r2.xxyz, r1.xxzw, r9.xxyz
mad o0.xyz, r0.xyzx, r2.xyzx, r1.xzwx
mad r0.x, r1.y, v7.w, -cb2[3].x
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
mov o0.w, cb2[2].z
ret 
// Approximately 0 instruction slots used

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