// Icy Water PS2 (distant)

Texture2D<float4> t11 : register(t11);

Texture2D<float4> t10 : register(t10);

Texture2D<float4> t9 : register(t9);

Texture2D<float4> t8 : register(t8);

Texture2D<float4> t7 : register(t7);

Texture2D<float4> t4 : register(t4);

TextureCube<float4> t3 : register(t3);

Texture2D<float4> t1 : register(t1);

SamplerState s11_s : register(s11);

SamplerState s10_s : register(s10);

SamplerState s9_s : register(s9);

SamplerState s8_s : register(s8);

SamplerState s4_s : register(s4);

SamplerState s3_s : register(s3);

SamplerState s1_s : register(s1);

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

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

cbuffer cb0 : register(b0)
{
  float4 cb0[5];
}

cbuffer cb12 : register(b12)
{
  float4 cb12[45];
}




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


void main( 
  float4 v0 : SV_POSITION0,
  float4 v1 : COLOR0,
  float4 v2 : TEXCOORD0,
  float4 v3 : TEXCOORD1,
  float4 v4 : TEXCOORD2,
  float4 v5 : TEXCOORD3,
  nointerpolation float4 v6 : TEXCOORD4,
  float4 v7 : TEXCOORD5,
  float4 v8 : TEXCOORD6,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7, r10;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = float2(64,128) * v6.xx;
  r1.w = 1 / r0.y;
  r0.xy = v4.zw * r0.xx;
  r0.xy = frac(r0.xy);
  r0.xy = r0.xy * float2(2,2) + float2(-1,-1);
  r0.xy = float2(-0.5,-0.5) + abs(r0.xy);
  r0.xy = float2(0.5,0.5) + -r0.xy;
  r1.yz = float2(0,0);
  r2.xyzw = v4.zwzw + r1.wzzw;
  r0.zw = v4.zw + r1.ww;
  r3.xyzw = t8.Sample(s8_s, r0.zw).xyzw;
  r4.xyzw = t8.Sample(s8_s, r2.zw).xyzw;
  r2.xyzw = t8.Sample(s8_s, r2.xy).xyzw;
  r0.z = 1.00999999 + -r4.z;
  r0.z = sqrt(r0.z);
  r1.zw = float2(64,64) * v5.xy;
  r0.zw = r1.zw * r0.zz;
  r4.xy = r4.xy * float2(2,2) + float2(-1,-1);
  r4.z = -r4.y;
  r5.x = dot(r4.xz, r0.zw);
  r5.y = dot(r4.yx, r0.zw);
  r6.yw = float2(0,0);
  r0.z = 0.00100000005 * cb1[2].w;
  r0.w = r0.z * r4.w;
  r6.z = 10.6400003 * r0.w;
  r4.xy = -r6.zw + r5.xy;
  r4.xy = float2(0.270000011,0.270000011) + r4.xy;
  r4.xy = t9.Sample(s9_s, r4.xy).xy;
  r0.w = 1.00999999 + -r3.z;
  r0.w = sqrt(r0.w);
  r4.zw = r1.zw * r0.ww;
  r3.xy = r3.xy * float2(2,2) + float2(-1,-1);
  r0.w = r0.z * r3.w;
  r5.x = 9.92000008 * r0.w;
  r3.z = -r3.y;
  r7.x = dot(r3.xz, r4.zw);
  r7.y = dot(r3.yx, r4.zw);
  r5.yw = float2(0,1);
  r3.xy = r7.xy + -r5.xy;
  r3.xy = t9.Sample(s9_s, r3.xy).xy;
  r3.zw = float2(1,1) + -r0.xy;
  r3.xy = r3.zz * r3.xy;
  r3.xy = r0.xx * r4.xy + r3.xy;
  r3.xy = r3.ww * r3.xy;
  r4.xyzw = t8.Sample(s8_s, v4.zw).xyzw;
  r0.w = 1.00999999 + -r4.z;
  r0.w = sqrt(r0.w);
  r5.xy = r1.zw * r0.ww;
  r4.xy = r4.xy * float2(2,2) + float2(-1,-1);
  r0.w = r4.w * r0.z;
  r0.z = r0.z * r2.w;
  r6.x = 8.47999954 * r0.z;
  r1.x = 8 * r0.w;
  r4.z = -r4.y;
  r7.x = dot(r4.xz, r5.xy);
  r7.y = dot(r4.yx, r5.xy);
  r0.zw = r7.xy + -r1.xy;
  r0.zw = t9.Sample(s9_s, r0.zw).xy;
  r1.x = 1.00999999 + -r2.z;
  r2.xy = r2.xy * float2(2,2) + float2(-1,-1);
  r1.x = sqrt(r1.x);
  r1.xy = r1.zw * r1.xx;
  r2.z = -r2.y;
  r4.x = dot(r2.xz, r1.xy);
  r4.y = dot(r2.yx, r1.xy);
  r1.xy = r4.xy + -r6.xy;
  r1.xy = float2(0.620000005,0.620000005) + r1.xy;
  r1.xy = t9.Sample(s9_s, r1.xy).xy;
  r1.xy = r3.zz * r1.xy;
  r1.zw = r3.zw * r3.zw;
  r1.zw = r0.xy * r0.xy + r1.zw;
  r1.zw = sqrt(r1.zw);
  r1.z = r1.w * r1.z;
  r0.xz = r0.xx * r0.zw + r1.xy;
  r0.xy = r0.yy * r0.xz + r3.xy;
  r0.xy = float2(-0.5,-0.5) + r0.xy;
  r0.xy = r0.xy / r1.zz;
  r1.zw = float2(0,0);
  r0.zw = cb12[44].xy * v0.xy;
  r2.xy = cb12[43].xy * r0.zw;
  r1.xy = (int2)r2.xy;
  r1.x = t7.Load(r1.xyz).x;
  r1.x = -r1.x * cb0[2].z + cb0[2].x;
  r1.z = cb0[2].w / r1.x;
  r2.xy = r0.zw * cb0[0].xy + cb0[0].zw;
  r3.xy = r2.xy * float2(2,2) + float2(-1,-1);
  r3.xy = r3.xy * r1.zz;
  r1.xy = r3.xy / cb2[5].xy;
  r1.x = dot(r1.xyz, r1.xyz);
  r1.x = sqrt(r1.x);
  // r1.y = dot(v2.xyz, v2.xyz);
  // r1.y = rsqrt(r1.y);
  // r1.yzw = v2.xyz * r1.yyy;
  // r3.xyz = -r1.yzw * r1.xxx;
  
  r1.y = dot(v8.xyz, v8.xyz);
  r1.y = rsqrt(r1.y);
  r1.yzw = v8.xyz * r1.yyy;
  r3.xyz = -r1.yzw * r1.xxx;

  // corrected value
r10.x = dot(v2.xyz, v2.xyz);
r10.x = rsqrt(r10.x);
r10.xyz = v2.xyz * r10.xxx;
  // r3.xyz = -r1.yzw * r1.xxx;
r3.xyz = -r10.xyz * r1.xxx;

  r1.x = dot(r3.xyz, cb2[4].xyz);
  r2.w = dot(r3.xyz, r3.xyz);
  r2.w = sqrt(r2.w);
  r3.x = cb2[4].w / r1.x;
  r3.x = 1 + -r3.x;
  r1.x = r3.x * abs(r1.x);
  r2.w = r3.x * r2.w;
  r3.xy = saturate(r2.ww / cb1[10].zz);
  r3.zw = saturate(r1.xx / cb1[10].zz);
  r4.xyzw = float4(-1,-1,-1,-1) + r3.xyzw;
  r4.xyzw = cb1[11].xyzw * r4.xyzw + float4(1,1,1,1);
  r1.x = max(0.400000006, r4.z);
  r5.xy = r1.xx * r0.xy;
  r0.x = -r5.x * r5.x + 1;
  r0.x = -r5.y * r5.y + r0.x;
  r5.z = sqrt(r0.x);
  r3.xzw = t4.Sample(s4_s, v3.xy).xyz;
  r3.xzw = r3.xzw * float3(2,2,2) + float3(-1,-1,-1);
  r5.xyz = r5.xyz + -r3.xzw;
  r0.x = -8192 + v2.w;
  r0.y = -8192 + cb1[7].x;
  r0.x = r0.x / r0.y;
  r0.y = 1 + -cb12[42].w;
  r0.x = saturate(r0.x * r0.y + cb12[42].w);
  r3.xzw = r0.xxx * r5.xyz + r3.xzw;
  r0.y = dot(r3.xzw, r3.xzw);
  r0.y = rsqrt(r0.y);
  r3.xzw = r3.xzw * r0.yyy;
  r0.y = cb1[5].w * r4.y;
  r5.xy = r0.yy * r3.xz + v7.xy;
  r5.z = v7.z;
  r0.y = dot(cb2[1].xyzw, r5.xyzw);
  r6.z = dot(cb2[3].xyzw, r5.xyzw);
  r6.x = dot(cb2[0].xyzw, r5.xyzw);
  r6.y = r6.z + -r0.y;
  r4.yz = r6.xy / r6.zz;
  r5.xy = cb0[0].zw + r4.yz;
  r4.yz = r4.yz / cb0[0].xy;
  r4.yz = cb12[43].xy * r4.yz;
  r7.xy = (int2)r4.yz;
  r4.yz = r5.xy * float2(2,2) + float2(-1,-1);
  r7.zw = float2(0,0);
  r0.y = t7.Load(r7.xyz).x;
  r0.y = -r0.y * cb0[2].z + cb0[2].x;
  r5.z = cb0[2].w / r0.y;
  r4.yz = r5.zz * r4.yz;
  r5.xy = r4.yz / cb2[5].xy;
  r0.y = dot(r5.xyz, r5.xyz);
  r0.y = sqrt(r0.y);
  r5.xyz = -r1.yzw * r0.yyy;
  r0.y = dot(r5.xyz, cb2[4].xyz);
  r1.x = cmp(0 < r0.y);
  r2.w = cmp(r0.y < 0);
  r0.y = cb2[4].w / r0.y;
  r0.y = 1 + -r0.y;
  r1.x = (int)-r1.x + (int)r2.w;
  r1.x = (int)r1.x;
  r0.y = r1.x * r0.y;
  r0.y = cmp(r0.y < 0);
  r2.z = 1;
  r2.xyz = r0.yyy ? r2.xyz : r6.xyz;
  r2.xy = r2.xy / r2.zz;
  r2.xy = cb12[43].xy * r2.xy;
  r2.xy = max(float2(0,0), r2.xy);
  r5.x = cb12[44].z;
  r5.y = cb12[43].y;
  r2.xy = min(r5.xy, r2.xy);
  r2.xyz = t1.Sample(s1_s, r2.xy).xyz;
  r6.xyz = cb1[1].xyz + -cb1[0].xyz;
  r6.xyz = r3.yyy * r6.xyz + cb1[0].xyz;
  r0.y = -r3.y * cb1[10].z + cb1[10].z;
  r0.y = saturate(r0.y / cb1[10].w);
  r0.y = log2(r0.y);
  r0.y = cb1[8].w * r0.y;
  r0.y = exp2(r0.y);
  r0.y = 1 + -r0.y;
  r6.xyz = -r2.xyz * cb1[7].www + r6.xyz;
  r2.xyz = cb1[7].www * r2.xyz;
  r2.xyz = r0.yyy * r6.xyz + r2.xyz;
  r4.yz = cb1[13].xx * r3.xz;
  r0.yz = r0.zw * cb1[12].zw + r4.yz;
  r0.yz = cb12[43].xy * r0.yz;
  r0.yz = max(float2(0,0), r0.yz);
  r0.yz = min(r0.yz, r5.xy);
  r5.xyzw = t10.Sample(s10_s, r0.yz).xyzw;
  r6.xyzw = t11.Sample(s11_s, r0.yz).xyzw;
  r5.xyzw = -r6.xyzw + r5.xyzw;
  r5.xyzw = cb1[12].yyyy * r5.xyzw + r6.xyzw;
  r6.x = 0;
  r6.z = 1 + -cb1[7].y;
  r0.yzw = cb1[7].yyy * r3.xzw + r6.xxz;
  r1.x = dot(r1.yzw, r0.yzw);
  r1.x = r1.x + r1.x;
  r0.yzw = r0.yzw * -r1.xxx + r1.yzw;
  r0.yzw = t3.Sample(s3_s, r0.yzw).xyz;
  r5.xyz = -r0.yzw * cb1[7].www + r5.xyz;
  r0.yzw = cb1[7].www * r0.yzw;
  r1.x = cb1[12].x * r0.x;
  r1.x = saturate(r5.w * r1.x);
  r0.yzw = r1.xxx * r5.xyz + r0.yzw;
  r0.yzw = -cb1[2].xyz + r0.yzw;
  r0.yzw = cb1[5].yyy * r0.yzw + cb1[2].xyz;
  r0.yzw = r0.yzw + -r2.xyz;
  r1.x = saturate(dot(-r1.yzw, r3.xzw));
  r1.x = 1 + -r1.x;
  r2.w = r1.x * r1.x;
  r2.w = r2.w * r2.w;
  r1.x = r2.w * r1.x;
  r2.w = 1 + -cb1[3].x;
  r1.x = r2.w * r1.x + cb1[3].x;
  r1.x = r1.x * r4.x + -1;
  r0.x = r0.x * r1.x + 1;
  r0.xyz = r0.xxx * r0.yzw + r2.xyz;
  r0.w = dot(r1.yzw, r3.xzw);
  r0.w = r0.w + r0.w;
  r1.xyz = r3.xzw * -r0.www + r1.yzw;
  r0.w = saturate(dot(r3.xzw, float3(-0.0989999995,-0.0989999995,0.99000001)));
  r0.w = log2(r0.w);
  r0.w = cb1[0].w * r0.w;
  r0.w = exp2(r0.w);
  r1.x = saturate(dot(r1.xyz, cb0[3].xyz));
  r1.x = log2(r1.x);
  r1.x = cb1[5].x * r1.x;
  r1.x = exp2(r1.x);
  r1.yzw = cb0[4].xyz * cb0[3].www;
  r2.xyz = r1.xxx * r1.yzw;
  r1.xyz = r1.yzw * r0.www;
  r1.xyz = cb1[7].zzz * r1.xyz;
  r1.xyz = r2.xyz * cb1[1].www + r1.xyz;
  r0.xyz = r1.xyz * r4.www + r0.xyz;
  r1.xyz = v1.xyz + -r0.xyz;
  r0.xyz = v1.www * r1.xyz + r0.xyz;
  r0.w = cb0[1].w;
  o0.xyz = saturate(r0.xyz * r0.www);
  o0.w = saturate(0);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy  
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 1   xyzw        3     NONE   float   xy  
// TEXCOORD                 2   xyzw        4     NONE   float     zw
// TEXCOORD                 3   xyzw        5     NONE   float   xy  
// TEXCOORD                 4   x           6     NONE   float   x   
// TEXCOORD                 5   xyzw        7     NONE   float   xyz 
//
//
// 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 cb12[45], immediateIndexed
dcl_constantbuffer cb0[5], immediateIndexed
dcl_constantbuffer cb1[14], immediateIndexed
dcl_constantbuffer cb2[6], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s8, mode_default
dcl_sampler s9, mode_default
dcl_sampler s10, mode_default
dcl_sampler s11, mode_default
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texturecube (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture2d (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t9
dcl_resource_texture2d (float,float,float,float) t10
dcl_resource_texture2d (float,float,float,float) t11
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.xy
dcl_input_ps linear v4.zw
dcl_input_ps linear v5.xy
dcl_input_ps constant v6.x
dcl_input_ps linear v7.xyz
dcl_output o0.xyzw
dcl_temps 8
mul r0.xy, v6.xxxx, l(64.000000, 128.000000, 0.000000, 0.000000)
div r1.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.y
mul r0.xy, r0.xxxx, v4.zwzz
frc r0.xy, r0.xyxx
mad r0.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
add r0.xy, |r0.xyxx|, l(-0.500000, -0.500000, 0.000000, 0.000000)
add r0.xy, -r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
mov r1.yz, l(0,0,0,0)
add r2.xyzw, r1.wzzw, v4.zwzw
add r0.zw, r1.wwww, v4.zzzw
sample_indexable(texture2d)(float,float,float,float) r3.xyzw, r0.zwzz, t8.xyzw, s8
sample_indexable(texture2d)(float,float,float,float) r4.xyzw, r2.zwzz, t8.xyzw, s8
sample_indexable(texture2d)(float,float,float,float) r2.xyzw, r2.xyxx, t8.xyzw, s8
add r0.z, -r4.z, l(1.010000)
sqrt r0.z, r0.z
mul r1.zw, v5.xxxy, l(0.000000, 0.000000, 64.000000, 64.000000)
mul r0.zw, r0.zzzz, r1.zzzw
mad r4.xy, r4.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mov r4.z, -r4.y
dp2 r5.x, r4.xzxx, r0.zwzz
dp2 r5.y, r4.yxyy, r0.zwzz
mov r6.yw, l(0,0,0,0)
mul r0.z, cb1[2].w, l(0.001000)
mul r0.w, r4.w, r0.z
mul r6.z, r0.w, l(10.640000)
add r4.xy, r5.xyxx, -r6.zwzz
add r4.xy, r4.xyxx, l(0.270000, 0.270000, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r4.xy, r4.xyxx, t9.xyzw, s9
add r0.w, -r3.z, l(1.010000)
sqrt r0.w, r0.w
mul r4.zw, r0.wwww, r1.zzzw
mad r3.xy, r3.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mul r0.w, r3.w, r0.z
mul r5.x, r0.w, l(9.920000)
mov r3.z, -r3.y
dp2 r7.x, r3.xzxx, r4.zwzz
dp2 r7.y, r3.yxyy, r4.zwzz
mov r5.yw, l(0,0,0,1.000000)
add r3.xy, -r5.xyxx, r7.xyxx
sample_indexable(texture2d)(float,float,float,float) r3.xy, r3.xyxx, t9.xyzw, s9
add r3.zw, -r0.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000)
mul r3.xy, r3.xyxx, r3.zzzz
mad r3.xy, r0.xxxx, r4.xyxx, r3.xyxx
mul r3.xy, r3.xyxx, r3.wwww
sample_indexable(texture2d)(float,float,float,float) r4.xyzw, v4.zwzz, t8.xyzw, s8
add r0.w, -r4.z, l(1.010000)
sqrt r0.w, r0.w
mul r5.xy, r0.wwww, r1.zwzz
mad r4.xy, r4.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mul r0.w, r0.z, r4.w
mul r0.z, r2.w, r0.z
mul r6.x, r0.z, l(8.480000)
mul r1.x, r0.w, l(8.000000)
mov r4.z, -r4.y
dp2 r7.x, r4.xzxx, r5.xyxx
dp2 r7.y, r4.yxyy, r5.xyxx
add r0.zw, -r1.xxxy, r7.xxxy
sample_indexable(texture2d)(float,float,float,float) r0.zw, r0.zwzz, t9.zwxy, s9
add r1.x, -r2.z, l(1.010000)
mad r2.xy, r2.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
sqrt r1.x, r1.x
mul r1.xy, r1.xxxx, r1.zwzz
mov r2.z, -r2.y
dp2 r4.x, r2.xzxx, r1.xyxx
dp2 r4.y, r2.yxyy, r1.xyxx
add r1.xy, -r6.xyxx, r4.xyxx
add r1.xy, r1.xyxx, l(0.620000, 0.620000, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r1.xy, r1.xyxx, t9.xyzw, s9
mul r1.xy, r1.xyxx, r3.zzzz
mul r1.zw, r3.zzzw, r3.zzzw
mad r1.zw, r0.xxxy, r0.xxxy, r1.zzzw
sqrt r1.zw, r1.zzzw
mul r1.z, r1.z, r1.w
mad r0.xz, r0.xxxx, r0.zzwz, r1.xxyx
mad r0.xy, r0.yyyy, r0.xzxx, r3.xyxx
add r0.xy, r0.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
div r0.xy, r0.xyxx, r1.zzzz
mov r1.zw, l(0,0,0,0)
mul r0.zw, v0.xxxy, cb12[44].xxxy
mul r2.xy, r0.zwzz, cb12[43].xyxx
ftoi r1.xy, r2.xyxx
ld_indexable(texture2d)(float,float,float,float) r1.x, r1.xyzw, t7.xyzw
mad r1.x, -r1.x, cb0[2].z, cb0[2].x
div r1.z, cb0[2].w, r1.x
mad r2.xy, r0.zwzz, cb0[0].xyxx, cb0[0].zwzz
mad r3.xy, r2.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mul r3.xy, r1.zzzz, r3.xyxx
div r1.xy, r3.xyxx, cb2[5].xyxx
dp3 r1.x, r1.xyzx, r1.xyzx
sqrt r1.x, r1.x
dp3 r1.y, v2.xyzx, v2.xyzx
rsq r1.y, r1.y
mul r1.yzw, r1.yyyy, v2.xxyz
mul r3.xyz, r1.xxxx, -r1.yzwy
dp3 r1.x, r3.xyzx, cb2[4].xyzx
dp3 r2.w, r3.xyzx, r3.xyzx
sqrt r2.w, r2.w
div r3.x, cb2[4].w, r1.x
add r3.x, -r3.x, l(1.000000)
mul r1.x, |r1.x|, r3.x
mul r2.w, r2.w, r3.x
div_sat r3.xy, r2.wwww, cb1[10].zzzz
div_sat r3.zw, r1.xxxx, cb1[10].zzzz
add r4.xyzw, r3.xyzw, l(-1.000000, -1.000000, -1.000000, -1.000000)
mad r4.xyzw, cb1[11].xyzw, r4.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
max r1.x, r4.z, l(0.400000)
mul r5.xy, r0.xyxx, r1.xxxx
mad r0.x, -r5.x, r5.x, l(1.000000)
mad r0.x, -r5.y, r5.y, r0.x
sqrt r5.z, r0.x
sample_indexable(texture2d)(float,float,float,float) r3.xzw, v3.xyxx, t4.xwyz, s4
mad r3.xzw, r3.xxzw, l(2.000000, 0.000000, 2.000000, 2.000000), l(-1.000000, 0.000000, -1.000000, -1.000000)
add r5.xyz, -r3.xzwx, r5.xyzx
add r0.x, v2.w, l(-8192.000000)
add r0.y, cb1[7].x, l(-8192.000000)
div r0.x, r0.x, r0.y
add r0.y, -cb12[42].w, l(1.000000)
mad_sat r0.x, r0.x, r0.y, cb12[42].w
mad r3.xzw, r0.xxxx, r5.xxyz, r3.xxzw
dp3 r0.y, r3.xzwx, r3.xzwx
rsq r0.y, r0.y
mul r3.xzw, r0.yyyy, r3.xxzw
mul r0.y, r4.y, cb1[5].w
mad r5.xy, r0.yyyy, r3.xzxx, v7.xyxx
mov r5.z, v7.z
dp4 r0.y, cb2[1].xyzw, r5.xyzw
dp4 r6.z, cb2[3].xyzw, r5.xyzw
dp4 r6.x, cb2[0].xyzw, r5.xyzw
add r6.y, -r0.y, r6.z
div r4.yz, r6.xxyx, r6.zzzz
add r5.xy, r4.yzyy, cb0[0].zwzz
div r4.yz, r4.yyzy, cb0[0].xxyx
mul r4.yz, r4.yyzy, cb12[43].xxyx
ftoi r7.xy, r4.yzyy
mad r4.yz, r5.xxyx, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000)
mov r7.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r0.y, r7.xyzw, t7.yxzw
mad r0.y, -r0.y, cb0[2].z, cb0[2].x
div r5.z, cb0[2].w, r0.y
mul r4.yz, r4.yyzy, r5.zzzz
div r5.xy, r4.yzyy, cb2[5].xyxx
dp3 r0.y, r5.xyzx, r5.xyzx
sqrt r0.y, r0.y
mul r5.xyz, r0.yyyy, -r1.yzwy
dp3 r0.y, r5.xyzx, cb2[4].xyzx
lt r1.x, l(0.000000), r0.y
lt r2.w, r0.y, l(0.000000)
div r0.y, cb2[4].w, r0.y
add r0.y, -r0.y, l(1.000000)
iadd r1.x, -r1.x, r2.w
itof r1.x, r1.x
mul r0.y, r0.y, r1.x
lt r0.y, r0.y, l(0.000000)
mov r2.z, l(1.000000)
movc r2.xyz, r0.yyyy, r2.xyzx, r6.xyzx
div r2.xy, r2.xyxx, r2.zzzz
mul r2.xy, r2.xyxx, cb12[43].xyxx
max r2.xy, r2.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
mov r5.x, cb12[44].z
mov r5.y, cb12[43].y
min r2.xy, r2.xyxx, r5.xyxx
sample_indexable(texture2d)(float,float,float,float) r2.xyz, r2.xyxx, t1.xyzw, s1
add r6.xyz, -cb1[0].xyzx, cb1[1].xyzx
mad r6.xyz, r3.yyyy, r6.xyzx, cb1[0].xyzx
mad r0.y, -r3.y, cb1[10].z, cb1[10].z
div_sat r0.y, r0.y, cb1[10].w
log r0.y, r0.y
mul r0.y, r0.y, cb1[8].w
exp r0.y, r0.y
add r0.y, -r0.y, l(1.000000)
mad r6.xyz, -r2.xyzx, cb1[7].wwww, r6.xyzx
mul r2.xyz, r2.xyzx, cb1[7].wwww
mad r2.xyz, r0.yyyy, r6.xyzx, r2.xyzx
mul r4.yz, r3.xxzx, cb1[13].xxxx
mad r0.yz, r0.zzwz, cb1[12].zzwz, r4.yyzy
mul r0.yz, r0.yyzy, cb12[43].xxyx
max r0.yz, r0.yyzy, l(0.000000, 0.000000, 0.000000, 0.000000)
min r0.yz, r5.xxyx, r0.yyzy
sample_indexable(texture2d)(float,float,float,float) r5.xyzw, r0.yzyy, t10.xyzw, s10
sample_indexable(texture2d)(float,float,float,float) r6.xyzw, r0.yzyy, t11.xyzw, s11
add r5.xyzw, r5.xyzw, -r6.xyzw
mad r5.xyzw, cb1[12].yyyy, r5.xyzw, r6.xyzw
mov r6.x, l(0)
add r6.z, -cb1[7].y, l(1.000000)
mad r0.yzw, cb1[7].yyyy, r3.xxzw, r6.xxxz
dp3 r1.x, r1.yzwy, r0.yzwy
add r1.x, r1.x, r1.x
mad r0.yzw, r0.yyzw, -r1.xxxx, r1.yyzw
sample_indexable(texturecube)(float,float,float,float) r0.yzw, r0.yzwy, t3.wxyz, s3
mad r5.xyz, -r0.yzwy, cb1[7].wwww, r5.xyzx
mul r0.yzw, r0.yyzw, cb1[7].wwww
mul r1.x, r0.x, cb1[12].x
mul_sat r1.x, r1.x, r5.w
mad r0.yzw, r1.xxxx, r5.xxyz, r0.yyzw
add r0.yzw, r0.yyzw, -cb1[2].xxyz
mad r0.yzw, cb1[5].yyyy, r0.yyzw, cb1[2].xxyz
add r0.yzw, -r2.xxyz, r0.yyzw
dp3_sat r1.x, -r1.yzwy, r3.xzwx
add r1.x, -r1.x, l(1.000000)
mul r2.w, r1.x, r1.x
mul r2.w, r2.w, r2.w
mul r1.x, r1.x, r2.w
add r2.w, -cb1[3].x, l(1.000000)
mad r1.x, r2.w, r1.x, cb1[3].x
mad r1.x, r1.x, r4.x, l(-1.000000)
mad r0.x, r0.x, r1.x, l(1.000000)
mad r0.xyz, r0.xxxx, r0.yzwy, r2.xyzx
dp3 r0.w, r1.yzwy, r3.xzwx
add r0.w, r0.w, r0.w
mad r1.xyz, r3.xzwx, -r0.wwww, r1.yzwy
dp3_sat r0.w, r3.xzwx, l(-0.099000, -0.099000, 0.990000, 0.000000)
log r0.w, r0.w
mul r0.w, r0.w, cb1[0].w
exp r0.w, r0.w
dp3_sat r1.x, r1.xyzx, cb0[3].xyzx
log r1.x, r1.x
mul r1.x, r1.x, cb1[5].x
exp r1.x, r1.x
mul r1.yzw, cb0[3].wwww, cb0[4].xxyz
mul r2.xyz, r1.yzwy, r1.xxxx
mul r1.xyz, r0.wwww, r1.yzwy
mul r1.xyz, r1.xyzx, cb1[7].zzzz
mad r1.xyz, r2.xyzx, cb1[1].wwww, r1.xyzx
mad r0.xyz, r1.xyzx, r4.wwww, r0.xyzx
add r1.xyz, -r0.xyzx, v1.xyzx
mad r0.xyz, v1.wwww, r1.xyzx, r0.xyzx
mov r0.w, cb0[1].w
mul_sat o0.xyz, r0.wwww, r0.xyzx
mov_sat o0.w, l(0)
ret 
// Approximately 0 instruction slots used

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