// Mirror Reflections 2
Texture2D<float4> t7 : register(t7);

Texture2D<float4> t6 : register(t6);

Texture2D<float4> t5 : register(t5);

Texture2D<float4> t4 : register(t4);

Texture2D<float4> t3 : register(t3);

Texture2D<float4> t2 : register(t2);

Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s5_s : register(s5);

SamplerState s4_s : register(s4);

SamplerState s3_s : register(s3);

SamplerState s2_s : register(s2);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

cbuffer cb3 : register(b3)
{
  float4 cb3[5];
}

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

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

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




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


void main( 
  linear centroid float4 v0 : TEXCOORD10,
  linear centroid float4 v1 : TEXCOORD11,
  float4 v2 : TEXCOORD0,
  float4 v3 : TEXCOORD4,
  float4 v4 : TEXCOORD8,
  float4 v5 : SV_Position0,
  uint v6 : SV_IsFrontFace0,
  out float4 o0 : SV_Target0,
  out float4 o1 : SV_Target1,
  out float4 o2 : SV_Target2,
  out float4 o3 : SV_Target3,
  out float4 o4 : SV_Target4,
  out float4 o5 : SV_Target5)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xyz = v1.zxy * v0.yzx;
  r0.xyz = v1.yzx * v0.zxy + -r0.xyz;
  r0.xyz = v1.www * r0.xyz;
  r1.xy = -cb1[42].xy + v5.xy;
  r1.xy = r1.xy / cb1[43].xy;
  r1.xy = float2(-0.5,-0.5) + r1.xy;
  r1.xy = v5.ww * r1.xy;
  
  float4 stereo = StereoParams.Load(0);
  r1.x -= stereo.x * (v5.w - stereo.y);
  
  r1.xy = float2(2,-2) * r1.xy;
  r2.xyz = cb1[49].www * float3(0,0,1) + cb1[49].xyz;
  r0.w = dot(r2.xyz, r2.xyz);
  r0.w = rsqrt(r0.w);
  r2.xyz = r2.xyz * r0.www;
  r0.xyz = r2.yyy * r0.xyz;
  r0.xyz = r2.xxx * v0.xyz + r0.xyz;
  r0.xyz = r2.zzz * v1.xyz + r0.xyz;
  r0.w = dot(r0.xyz, r0.xyz);
  r0.w = rsqrt(r0.w);
  r0.xyz = r0.xyz * r0.www;
  r2.xyz = t1.Sample(s1_s, v2.xy).xyz;
  r2.xyz = cb3[2].xyz * r2.xyz;
  r2.xyz = saturate(float3(1.5,1.5,1.5) * r2.xyz);
  r3.xyz = t2.Sample(s2_s, v2.xy).xzy;
  r3.xy = saturate(r3.xy);
  r1.z = saturate(0.5 * r3.z);
  r1.z = r1.z * cb1[50].y + cb1[50].x;
  r4.z = max(0.0399999991, r1.z);
  r1.z = cmp(0 < cb2[10].w);
  if (r1.z != 0) {
    r1.zw = r1.xy / v5.ww;
    r1.zw = r1.zw * cb1[41].xy + cb1[41].wz;
    r5.xyzw = t5.SampleLevel(s5_s, r1.zw, 0).xyzw;
    r6.xyzw = t6.SampleLevel(s5_s, r1.zw, 0).xyzw;
    r1.zw = t7.SampleLevel(s5_s, r1.zw, 0).xy;
    r6.xyz = r6.xyz * float3(2,2,2) + float3(-1.00392163,-1.00392163,-1.00392163);
    r0.xyz = r0.xyz * r6.www + r6.xyz;
    r4.z = r4.z * r1.w + r1.z;
    r2.xyz = r2.xyz * r5.www + r5.xyz;
    r4.x = r5.w * r3.x;
    r4.y = 0.5;
  } else {
    r4.x = r3.x;
    r4.y = 0.5;
  }
  r3.xzw = -r2.xyz * r4.xxx + r2.xyz;
  r5.xyz = float3(-0.0399999991,-0.0399999991,-0.0399999991) + r2.xyz;
  r5.xyz = r4.xxx * r5.xyz + float3(0.0399999991,0.0399999991,0.0399999991);
  r3.xzw = r3.xzw * cb1[47].www + cb1[47].xyz;
  r5.xyz = r5.xyz * cb1[48].www + cb1[48].xyz;
  r1.z = -r4.z * 0.333299994 + 1;
  r6.xyz = r3.xzw * r1.zzz;
  r7.xy = float2(1,0.5) * v3.xy;
  r7.zw = v3.xy * float2(1,0.5) + float2(0,0.5);
  r8.xyzw = t3.Sample(s3_s, r7.xy).xyzw;
  r7.xyzw = t3.Sample(s3_s, r7.zw).xyzw;
  r1.w = r7.w * 0.00392156886 + r8.w;
  r1.w = -0.00196078443 + r1.w;
  r1.w = r1.w * cb0[8].w + cb0[10].w;
  r8.xyz = r8.xyz * r8.xyz;
  r8.xyz = r8.xyz * cb0[8].xyz + cb0[10].xyz;
  r1.w = exp2(r1.w);
  r1.w = -0.0185813606 + r1.w;
  r7.xyzw = r7.xyzw * cb0[9].xyzw + cb0[11].xyzw;
  r0.w = 1;
  r0.w = dot(r7.zxyw, r0.xyzw);
  r0.w = max(0, r0.w);
  r0.w = r1.w * r0.w;
  r7.xyz = r0.www * r8.xyz;
  r7.xyz = cb1[104].xyz * r7.xyz;
  r0.w = cmp(0 < cb1[54].w);
  if (r0.w == 0) {
  }
  r0.w = dot(r7.xyz, float3(0.300000012,0.589999974,0.109999999));
  r6.xyz = r7.xyz * r6.xyz;
  r7.xyz = r6.xyz * r3.yyy;
  r3.xzw = r3.xzw * r1.zzz + r5.xyz;
  r3.xzw = -r6.xyz * r3.yyy + r3.xzw;
  r3.xzw = cb1[55].xxx * r3.xzw + r7.xyz;
  r1.zw = cb1[111].zw / cb1[43].xy;
  r1.xy = r1.xy / v5.ww;
  r1.xy = r1.xy * cb1[41].xy + cb1[41].wz;
  r1.xy = r1.zw * r1.xy;
  r1.z = cb1[43].y / cb1[43].x;
  r5.xy = float2(-1,1) * r1.xy;
  r1.x = 1 + -r1.z;
  r1.x = 0.5 * r1.x;
  r5.z = r5.y * r1.z + r1.x;
  r1.xyz = t0.Sample(s0_s, r5.xz).xyz;
  r1.xyz = cb3[4].xxx * r1.xyz + cb3[1].xyz;
  r1.xyz = max(float3(0,0,0), r1.xyz);
  r1.w = cmp(0 < cb1[51].w);
  if (r1.w != 0) {
    r5.xyz = -cb1[51].xyz + v4.xyz;
    r6.xyz = -cb2[8].xyz + r5.xyz;
    r7.xyz = float3(1,1,1) + cb2[9].xyz;
    r6.xyz = cmp(r7.xyz < abs(r6.xyz));
    r1.w = (int)r6.y | (int)r6.x;
    r1.w = (int)r6.z | (int)r1.w;
    r5.x = dot(r5.xyz, float3(0.577000022,0.577000022,0.577000022));
    r5.x = 0.00200000009 * r5.x;
    r5.x = frac(r5.x);
    r5.x = cmp(0.5 < r5.x);
    r5.xyz = r5.xxx ? float3(0,1,1) : float3(1,1,0);
    r1.xyz = r1.www ? r5.xyz : r1.xyz;
  }
  r1.xyz = r3.xzw + r1.xyz;
  o0.w = dot(r1.xyz, float3(0.300000012,0.589999974,0.109999999));
  r5.xyzw = t4.Sample(s4_s, v3.zw).xyzw;
  r5.xyzw = saturate(r5.xyzw * cb0[13].xxxx + cb0[13].yyyy);
  r5.xyzw = r5.xyzw * r5.xyzw;
  o5.xyzw = cb0[12].xyzw * r5.xyzw;
  r1.w = (uint)cb2[10].w;
  r3.xz = (uint2)cb2[11].xy;
  r5.xyz = float3(0.0078125,0.0078125,0.0078125) * v5.xyx;
  r5.xyz = frac(r5.xyz);
  r5.xyz = r5.xyz * float3(128,128,128) + float3(-64.3406219,-72.4656219,-64.3406219);
  r5.xyz = r5.xyz * r5.xyy;
  r3.w = dot(r5.xyz, float3(20.390625,60.703125,2.42812085));
  r3.w = frac(r3.w);
  r3.w = r3.w * 0.5 + -0.5;
  o1.xyz = r0.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  r0.x = (uint)r3.z << 1;
  r0.x = (int)r0.x + (int)r3.x;
  r0.x = (uint)r0.x;
  o1.w = 0.333333343 * r0.x;
  r0.x = r0.w * r3.y + 0.00390625;
  r0.x = log2(r0.x);
  r0.x = r0.x * 0.0625 + 0.5;
  r2.w = r3.w * 0.00392156886 + r0.x;
  r0.x = (uint)r1.w;
  r4.w = r0.x * 0.501960814 + 0.10672269;
  o0.xyz = r1.xyz;
  o2.xyzw = r4.xyzw;
  o3.xyzw = r2.xyzw;
  o4.xyzw = float4(1,0,0,0);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.34 on Sun May 22 19:46:18 2016
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                10   xyzw        0     NONE   float   xyz 
// TEXCOORD                11   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xyzw        2     NONE   float   xy  
// TEXCOORD                 4   xyzw        3     NONE   float   xyzw
// TEXCOORD                 8   xyzw        4     NONE   float   xyz 
// SV_Position              0   xyzw        5      POS   float   xy w
// SV_IsFrontFace           0   x           6    FFACE    uint       
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
// SV_Target                1   xyzw        1   TARGET   float   xyzw
// SV_Target                2   xyzw        2   TARGET   float   xyzw
// SV_Target                3   xyzw        3   TARGET   float   xyzw
// SV_Target                4   xyzw        4   TARGET   float   xyzw
// SV_Target                5   xyzw        5   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[14], immediateIndexed
dcl_constantbuffer cb1[112], immediateIndexed
dcl_constantbuffer cb2[12], immediateIndexed
dcl_constantbuffer cb3[5], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, 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_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_input_ps linear centroid v0.xyz
dcl_input_ps linear centroid v1.xyzw
dcl_input_ps linear v2.xy
dcl_input_ps linear v3.xyzw
dcl_input_ps linear v4.xyz
dcl_input_ps_siv linear noperspective v5.xyw, position
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_temps 9
mul r0.xyz, v0.yzxy, v1.zxyz
mad r0.xyz, v1.yzxy, v0.zxyz, -r0.xyzx
mul r0.xyz, r0.xyzx, v1.wwww
add r1.xy, v5.xyxx, -cb1[42].xyxx
div r1.xy, r1.xyxx, cb1[43].xyxx
add r1.xy, r1.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
mul r1.xy, r1.xyxx, v5.wwww
mul r1.xy, r1.xyxx, l(2.000000, -2.000000, 0.000000, 0.000000)
mad r2.xyz, cb1[49].wwww, l(0.000000, 0.000000, 1.000000, 0.000000), cb1[49].xyzx
dp3 r0.w, r2.xyzx, r2.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, r2.xyzx
mul r0.xyz, r0.xyzx, r2.yyyy
mad r0.xyz, r2.xxxx, v0.xyzx, r0.xyzx
mad r0.xyz, r2.zzzz, v1.xyzx, r0.xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
sample_indexable(texture2d)(float,float,float,float) r2.xyz, v2.xyxx, t1.xyzw, s1
mul r2.xyz, r2.xyzx, cb3[2].xyzx
mul_sat r2.xyz, r2.xyzx, l(1.500000, 1.500000, 1.500000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r3.xyz, v2.xyxx, t2.xzyw, s2
mov_sat r3.xy, r3.xyxx
mul_sat r1.z, r3.z, l(0.500000)
mad r1.z, r1.z, cb1[50].y, cb1[50].x
max r4.z, r1.z, l(0.040000)
lt r1.z, l(0.000000), cb2[10].w
if_nz r1.z
  div r1.zw, r1.xxxy, v5.wwww
  mad r1.zw, r1.zzzw, cb1[41].xxxy, cb1[41].wwwz
  sample_l_indexable(texture2d)(float,float,float,float) r5.xyzw, r1.zwzz, t5.xyzw, s5, l(0.000000)
  sample_l_indexable(texture2d)(float,float,float,float) r6.xyzw, r1.zwzz, t6.xyzw, s5, l(0.000000)
  sample_l_indexable(texture2d)(float,float,float,float) r1.zw, r1.zwzz, t7.zwxy, s5, l(0.000000)
  mad r6.xyz, r6.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.00392163, -1.00392163, -1.00392163, 0.000000)
  mad r0.xyz, r0.xyzx, r6.wwww, r6.xyzx
  mad r4.z, r4.z, r1.w, r1.z
  mad r2.xyz, r2.xyzx, r5.wwww, r5.xyzx
  mul r4.x, r3.x, r5.w
  mov r4.y, l(0.500000)
else 
  mov r4.x, r3.x
  mov r4.y, l(0.500000)
endif 
mad r3.xzw, -r2.xxyz, r4.xxxx, r2.xxyz
add r5.xyz, r2.xyzx, l(-0.040000, -0.040000, -0.040000, 0.000000)
mad r5.xyz, r4.xxxx, r5.xyzx, l(0.040000, 0.040000, 0.040000, 0.000000)
mad r3.xzw, r3.xxzw, cb1[47].wwww, cb1[47].xxyz
mad r5.xyz, r5.xyzx, cb1[48].wwww, cb1[48].xyzx
mad r1.z, -r4.z, l(0.333300), l(1.000000)
mul r6.xyz, r1.zzzz, r3.xzwx
mul r7.xy, v3.xyxx, l(1.000000, 0.500000, 0.000000, 0.000000)
mad r7.zw, v3.xxxy, l(0.000000, 0.000000, 1.000000, 0.500000), l(0.000000, 0.000000, 0.000000, 0.500000)
sample_indexable(texture2d)(float,float,float,float) r8.xyzw, r7.xyxx, t3.xyzw, s3
sample_indexable(texture2d)(float,float,float,float) r7.xyzw, r7.zwzz, t3.xyzw, s3
mad r1.w, r7.w, l(0.00392156886), r8.w
add r1.w, r1.w, l(-0.00196078443)
mad r1.w, r1.w, cb0[8].w, cb0[10].w
mul r8.xyz, r8.xyzx, r8.xyzx
mad r8.xyz, r8.xyzx, cb0[8].xyzx, cb0[10].xyzx
exp r1.w, r1.w
add r1.w, r1.w, l(-0.0185813606)
mad r7.xyzw, r7.xyzw, cb0[9].xyzw, cb0[11].xyzw
mov r0.w, l(1.000000)
dp4 r0.w, r7.zxyw, r0.xyzw
max r0.w, r0.w, l(0.000000)
mul r0.w, r0.w, r1.w
mul r7.xyz, r8.xyzx, r0.wwww
mul r7.xyz, r7.xyzx, cb1[104].xyzx
lt r0.w, l(0.000000), cb1[54].w
if_z r0.w
endif 
dp3 r0.w, r7.xyzx, l(0.300000, 0.590000, 0.110000, 0.000000)
mul r6.xyz, r6.xyzx, r7.xyzx
mul r7.xyz, r3.yyyy, r6.xyzx
mad r3.xzw, r3.xxzw, r1.zzzz, r5.xxyz
mad r3.xzw, -r6.xxyz, r3.yyyy, r3.xxzw
mad r3.xzw, cb1[55].xxxx, r3.xxzw, r7.xxyz
div r1.zw, cb1[111].zzzw, cb1[43].xxxy
div r1.xy, r1.xyxx, v5.wwww
mad r1.xy, r1.xyxx, cb1[41].xyxx, cb1[41].wzww
mul r1.xy, r1.xyxx, r1.zwzz
div r1.z, cb1[43].y, cb1[43].x
mul r5.xy, r1.xyxx, l(-1.000000, 1.000000, 0.000000, 0.000000)
add r1.x, -r1.z, l(1.000000)
mul r1.x, r1.x, l(0.500000)
mad r5.z, r5.y, r1.z, r1.x
sample_indexable(texture2d)(float,float,float,float) r1.xyz, r5.xzxx, t0.xyzw, s0
mad r1.xyz, cb3[4].xxxx, r1.xyzx, cb3[1].xyzx
max r1.xyz, r1.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
lt r1.w, l(0.000000), cb1[51].w
if_nz r1.w
  add r5.xyz, v4.xyzx, -cb1[51].xyzx
  add r6.xyz, r5.xyzx, -cb2[8].xyzx
  add r7.xyz, cb2[9].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  lt r6.xyz, r7.xyzx, |r6.xyzx|
  or r1.w, r6.y, r6.x
  or r1.w, r6.z, r1.w
  dp3 r5.x, r5.xyzx, l(0.577000, 0.577000, 0.577000, 0.000000)
  mul r5.x, r5.x, l(0.002000)
  frc r5.x, r5.x
  lt r5.x, l(0.500000), r5.x
  movc r5.xyz, r5.xxxx, l(0,1.000000,1.000000,0), l(1.000000,1.000000,0,0)
  movc r1.xyz, r1.wwww, r5.xyzx, r1.xyzx
endif 
add r1.xyz, r1.xyzx, r3.xzwx
dp3 o0.w, r1.xyzx, l(0.300000, 0.590000, 0.110000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r5.xyzw, v3.zwzz, t4.xyzw, s4
mad_sat r5.xyzw, r5.xyzw, cb0[13].xxxx, cb0[13].yyyy
mul r5.xyzw, r5.xyzw, r5.xyzw
mul o5.xyzw, r5.xyzw, cb0[12].xyzw
ftou r1.w, cb2[10].w
ftou r3.xz, cb2[11].xxyx
mul r5.xyz, v5.xyxx, l(0.00781250000, 0.00781250000, 0.00781250000, 0.000000)
frc r5.xyz, r5.xyzx
mad r5.xyz, r5.xyzx, l(128.000000, 128.000000, 128.000000, 0.000000), l(-64.340622, -72.465622, -64.340622, 0.000000)
mul r5.xyz, r5.xyyx, r5.xyzx
dp3 r3.w, r5.xyzx, l(20.390625, 60.703125, 2.42812085, 0.000000)
frc r3.w, r3.w
mad r3.w, r3.w, l(0.500000), l(-0.500000)
mad o1.xyz, r0.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
ishl r0.x, r3.z, l(1)
iadd r0.x, r0.x, r3.x
utof r0.x, r0.x
mul o1.w, r0.x, l(0.333333343)
mad r0.x, r0.w, r3.y, l(0.00390625000)
log r0.x, r0.x
mad r0.x, r0.x, l(0.062500), l(0.500000)
mad r2.w, r3.w, l(0.00392156886), r0.x
utof r0.x, r1.w
mad r4.w, r0.x, l(0.501960814), l(0.106722690)
mov o0.xyz, r1.xyzx
mov o2.xyzw, r4.xyzw
mov o3.xyzw, r2.xyzw
mov o4.xyzw, l(1.000000,0,0,0)
ret 
// Approximately 0 instruction slots used

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