//Purgatory decals. Old method: "mad r26.x, r25.y, v1.z, r1.z" and no v1 modification.
// ---- Created with 3Dmigoto v1.3.16 on Fri May 17 17:06:49 2019
//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 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 cb9 : register(b9)
//{
//  float4 cb9[10];
//}
//
//cbuffer cb13 : register(b13)
//{
//  float4 cb13[10];
//}
//
//
//// 3Dmigoto declarations
//#define cmp -
//Texture1D<float4> IniParams : register(t120);
//Texture2D<float4> StereoParams : register(t125);
//
//
//void main(
//  float4 v0 : TEXCOORD0,
//  float3 v1 : TEXCOORD1,
//  out float4 o0 : SV_Target0)
//{
//  float4 r0,r1,r2,r3,r4;
//  uint4 bitmask, uiDest;
//  float4 fDest;
//
//  float4 stereo = StereoParams.Load(0);
//
//  r0.xy = v0.xy / v0.zz;
//  r0.z = t0.Sample(s0_s, r0.xy).x;
//  r0.z = cb9[3].x + r0.z;
//  r0.z = -cb9[3].y / r0.z;
//  r1.xyz = v1.xyz * r0.zzz;
//  
//  r1.x+=stereo.x*(r1.z+stereo.y*v1.z)/cb13[0].x;
//  
//  r1.xyz = r1.xyz / v1.zzz;
//  r1.w = 1;
//  r2.x = dot(cb9[7].xyzw, r1.xyzw);
//  r2.y = dot(cb9[8].xyzw, r1.xyzw);
//  r0.z = dot(cb9[9].xyzw, r1.xyzw);
//  r0.zw = r2.xy / r0.zz;
//  r2.xy = float2(-0.5,-0.5) + r0.zw;
//  r1.w = dot(r2.xy, r2.xy);
//  r1.w = sqrt(r1.w);
//  r2.x = 0.5 + -r1.w;
//  r1.w = -0.5 + r1.w;
//  r2.x = cmp(r2.x < 0);
//  if (r2.x != 0) discard;
//  r2.xy = t2.Sample(s2_s, r0.xy).xy;
//  r3.xyz = t3.Sample(s3_s, r0.xy).xyz;
//  r0.xy = float2(4,4) * r2.xy;
//  r2.x = dot(r0.xy, r0.xy);
//  r2.zw = -r2.xx * float2(0.25,0.5) + float2(1,1);
//  r2.z = max(0, r2.z);
//  r2.z = sqrt(r2.z);
//  r2.xy = r2.zz * r0.xy;
//  r4.xyz = -cb9[0].xyz + r1.xyz;
//  r0.x = r1.z * r1.z;
//  r0.x = r0.x * cb9[5].w + 1;
//  r0.x = 1 / r0.x;
//  r0.y = dot(r4.xyz, r4.xyz);
//  r0.y = rsqrt(r0.y);
//  r1.xyz = r4.xyz * r0.yyy;
//  r0.y = dot(r4.xyz, cb9[2].xyz);
//  r1.x = dot(r2.xyw, r1.xyz);
//  r1.x = max(0, -r1.x);
//  r1.y = -cb9[0].w + r0.y;
//  r0.y = r0.y * r0.y;
//  r0.y = cb9[1].w * r0.y;
//  r0.y = 1 / r0.y;
//  r0.y = saturate(cb9[2].w + r0.y);
//  r1.y = saturate(10 * r1.y);
//  r1.z = r1.y * -2 + 3;
//  r1.y = r1.y * r1.y;
//  r1.y = r1.z * r1.y;
//  r0.y = r1.y * r0.y;
//  r0.y = r0.y * r1.x;
//  r1.x = cb9[5].z + -0.5;
//  r1.x = 1 / r1.x;
//  r1.x = saturate(r1.w * r1.x);
//  r1.y = r1.x * -2 + 3;
//  r1.x = r1.x * r1.x;
//  r1.x = r1.y * r1.x;
//  r0.y = r1.x * r0.y;
//  r0.x = r0.y * r0.x;
//  r1.xy = cb9[4].xy + -cb9[3].zw;
//  r1.xy = r0.zw * r1.xy + cb9[3].zw;
//  r0.yzw = t4.SampleLevel(s4_s, r0.zw, 0).xyz;
//  r1.xy = frac(r1.xy);
//  r1.zw = cb9[5].xy + -cb9[4].zw;
//  r1.xy = r1.xy * r1.zw + cb9[4].zw;
//  r1.xyz = t1.SampleLevel(s1_s, r1.xy, 0).xyz;
//  r1.xyz = cb9[1].xyz * r1.xyz;
//  r0.yzw = r0.yzw * cb9[6].xyz + r1.xyz;
//  r0.yzw = r0.yzw * r3.xyz;
//  r1.xyz = r0.yzw * r0.xxx + cb9[6].www;
//  r0.xyz = r0.yzw * r0.xxx;
//  r0.xyz = cb9[6].www * r0.xyz;
//  o0.xyz = r0.xyz / r1.xyz;
//  o0.w = 1;
//  return;
//}
//
///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Fri May 17 17:06:49 2019
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyz         0     NONE   float   xyz
// TEXCOORD                 1   xyz         1     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 cb9[10], immediateIndexed
dcl_constantbuffer cb13[10], 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_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_input_ps linear v0.xyz
dcl_input_ps linear v1.xyz
dcl_output o0.xyzw
dcl_temps 35
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r25.xyzw, l(0, 0, 0, 0), t125.xyzw

mov r30.xyz, v1.xyzx
div r25.w, r25.y, cb13[0].x
mad r30.x, -r25.x, r25.w, r30.x

mov r31.xyz, v0.xyzx
add r25.w, r31.z, -r25.y
mul r25.w, r25.w, l(0.5)
mad r31.x, r25.x, r25.w, r31.x

div r0.xy, r31.xyxx, r31.zzzz
sample_indexable(texture2d)(float,float,float,float) r0.z, r0.xyxx, t0.yzxw, s0
add r0.z, r0.z, cb9[3].x
div r0.z, -cb9[3].y, r0.z
mul r1.xyz, r0.zzzz, r30.xyzx

//mad r26.x, r25.y, v1.z, r1.z
mad r26.x, r25.y, v1.z, l(0.0)
div r26.x, r26.x, cb13[0].x
mad r1.x, r25.x, r26.x, r1.x


div r1.xyz, r1.xyzx, v1.zzzz
mov r1.w, l(1.000000)
dp4 r2.x, cb9[7].xyzw, r1.xyzw
dp4 r2.y, cb9[8].xyzw, r1.xyzw
dp4 r0.z, cb9[9].xyzw, r1.xyzw
div r0.zw, r2.xxxy, r0.zzzz
add r2.xy, r0.zwzz, l(-0.500000, -0.500000, 0.000000, 0.000000)
dp2 r1.w, r2.xyxx, r2.xyxx
sqrt r1.w, r1.w
add r2.x, -r1.w, l(0.500000)
add r1.w, r1.w, l(-0.500000)
lt r2.x, r2.x, l(0.000000)
discard_nz r2.x
sample_indexable(texture2d)(float,float,float,float) r2.xy, r0.xyxx, t2.xyzw, s2
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r0.xyxx, t3.xyzw, s3
mul r0.xy, r2.xyxx, l(4.000000, 4.000000, 0.000000, 0.000000)
dp2 r2.x, r0.xyxx, r0.xyxx
mad r2.zw, -r2.xxxx, l(0.000000, 0.000000, 0.250000, 0.500000), l(0.000000, 0.000000, 1.000000, 1.000000)
max r2.z, r2.z, l(0.000000)
sqrt r2.z, r2.z
mul r2.xy, r0.xyxx, r2.zzzz
add r4.xyz, r1.xyzx, -cb9[0].xyzx
mul r0.x, r1.z, r1.z
mad r0.x, r0.x, cb9[5].w, l(1.000000)
div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
dp3 r0.y, r4.xyzx, r4.xyzx
rsq r0.y, r0.y
mul r1.xyz, r0.yyyy, r4.xyzx
dp3 r0.y, r4.xyzx, cb9[2].xyzx
dp3 r1.x, r2.xywx, r1.xyzx
max r1.x, -r1.x, l(0.000000)
add r1.y, r0.y, -cb9[0].w
mul r0.y, r0.y, r0.y
mul r0.y, r0.y, cb9[1].w
div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), r0.y
add_sat r0.y, r0.y, cb9[2].w
mul_sat r1.y, r1.y, l(10.000000)
mad r1.z, r1.y, l(-2.000000), l(3.000000)
mul r1.y, r1.y, r1.y
mul r1.y, r1.y, r1.z
mul r0.y, r0.y, r1.y
mul r0.y, r1.x, r0.y
add r1.x, l(-0.500000), cb9[5].z
div r1.x, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x
mul_sat r1.x, r1.x, r1.w
mad r1.y, r1.x, l(-2.000000), l(3.000000)
mul r1.x, r1.x, r1.x
mul r1.x, r1.x, r1.y
mul r0.y, r0.y, r1.x
mul r0.x, r0.x, r0.y
add r1.xy, -cb9[3].zwzz, cb9[4].xyxx
mad r1.xy, r0.zwzz, r1.xyxx, cb9[3].zwzz
sample_l_indexable(texture2d)(float,float,float,float) r0.yzw, r0.zwzz, t4.wxyz, s4, l(0.000000)
frc r1.xy, r1.xyxx
add r1.zw, -cb9[4].zzzw, cb9[5].xxxy
mad r1.xy, r1.xyxx, r1.zwzz, cb9[4].zwzz
sample_l_indexable(texture2d)(float,float,float,float) r1.xyz, r1.xyxx, t1.xyzw, s1, l(0.000000)
mul r1.xyz, r1.xyzx, cb9[1].xyzx
mad r0.yzw, r0.yyzw, cb9[6].xxyz, r1.xxyz
mul r0.yzw, r3.xxyz, r0.yyzw
mad r1.xyz, r0.yzwy, r0.xxxx, cb9[6].wwww
mul r0.xyz, r0.xxxx, r0.yzwy
mul r0.xyz, r0.xyzx, cb9[6].wwww
div o0.xyz, r0.xyzx, r1.xyzx
mov o0.w, l(1.000000)
ret
// Approximately 0 instruction slots used
