//Drink PS 1.
// ---- Created with 3Dmigoto v1.3.16 on Sat May 18 21:49:24 2019
Texture2D<float4> t2 : register(t2);

Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s2_s : register(s2);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

cbuffer cb9 : register(b9)
{
  float4 cb9[20];
}




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


void main(
  float4 v0 : TEXCOORD0,
  float4 v1 : TEXCOORD1,
  float3 v2 : TEXCOORD2,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16,r17,r18,r19,r20;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 stereo = StereoParams.Load(0);
  float4 iniparams = IniParams.Load(0);
  
  
  r0.xy = v1.xy / v1.zz;
  r0.zw = cb9[2].zw + -cb9[2].xy;
  r0.zw = r0.xy * r0.zw + cb9[2].xy;
  r0.zw = max(cb9[3].xy, r0.zw);
  r0.zw = min(cb9[3].zw, r0.zw);
  r1.xyzw = t0.Sample(s0_s, r0.zw).xyzw;
  r0.z = r1.z * cb9[7].w + cb9[7].z;
  r0.w = v0.z + -r0.z;
  r0.w = -cb9[19].y + r0.w;
  r0.w = cmp(r0.w < 0);
  if (r0.w != 0) discard;
  r0.w = r1.w * cb9[9].w + cb9[8].w;
  r1.xy = r1.xy * float2(2,2) + float2(-1,-1);
  r2.xy = -r1.xy;
  r1.z = dot(r2.xy, r2.xy);
  r1.z = sqrt(r1.z);
  
  r2.x+=stereo.x*(r1.z-stereo.y*0.5)*2;
  
  r1.z = 1 + -r1.z;
  
  
  
  r1.z = max(0, r1.z);
  r2.z = sqrt(r1.z);
  
  
  
  r1.z = dot(v2.xyz, v2.xyz);
  r1.z = rsqrt(r1.z);
  r3.xyz = v2.xyz * r1.zzz;
  r0.z = r0.z / v0.z;
  r4.xyz = v0.xyz * r0.zzz;
  
  //r4.x+=stereo.x*(r4.z+stereo.y*v0.z)/cb9[0].x;
  
  r5.xyz = v0.xyz;
  r5.w = 1;
  r6.x = dot(cb9[4].xyzw, r5.xyzw);
  r6.y = dot(cb9[5].xyzw, r5.xyzw);
  r1.z = t1.Sample(s1_s, r6.xy).w;
  r1.w = cb9[15].y + cb9[15].y;
  r1.z = r1.z * r1.w + -cb9[15].y;
  r1.z = v0.w + -r1.z;
  r4.w = 1;
  r7.x = dot(cb9[4].xyzw, r4.xyzw);
  r7.y = dot(cb9[5].xyzw, r4.xyzw);
  r6.z = t1.Sample(s1_s, r7.xy).w;
  r1.w = r6.z * r1.w + -cb9[15].y;
  r0.w = -r1.w + r0.w;
  r8.xyz = -r3.xyz;
  r8.w = 1;
  r1.w = dot(r8.xyzw, cb9[1].xyzw);
  r6.xy = cb9[15].ww * r6.xy;
  r6.x = t1.Sample(s1_s, r6.xy).w;
  r1.z = -r6.x * r1.w + r1.z;
  r2.w = 1;
  r1.w = dot(r2.xyzw, cb9[1].xyzw);
  r6.xy = cb9[15].ww * r7.xy;
  r2.w = t1.Sample(s1_s, r6.xy).w;
  r0.w = -r2.w * r1.w + r0.w;
  r1.w = dot(v0.xyz, v0.xyz);
  r1.w = rsqrt(r1.w);
  r6.xyz = v0.xyz * r1.www;
  r1.w = cmp(0 < r1.z);
  r2.w = dot(r3.xyz, r6.xyz);
  r7.x = r0.w + -r1.z;
  r1.z = -r1.z / r7.x;
  r7.xyz = v0.xyz * r0.zzz + -v0.xyz;
  r8.xyz = r7.xyz * r1.zzz;
  r9.xyz = r1.zzz * r7.xyz + v0.xyz;
  r9.w = 1;
  r10.x = dot(cb9[4].xyzw, r9.xyzw);
  r10.y = dot(cb9[5].xyzw, r9.xyzw);
  r10.xy = t1.Sample(s1_s, r10.xy).xy;
  r10.xy = r10.xy * float2(2,2) + float2(-1,-1);
  r11.x = dot(cb9[6].xy, r10.xy);
  r11.y = dot(cb9[6].zw, r10.xy);
  r11.z = dot(cb9[7].xy, r10.xy);
  r10.xyz = v0.xyz + -r9.xyz;
  r12.xyz = v0.xyz * r0.zzz + -r9.xyz;
  r0.z = dot(r10.xyz, r10.xyz);
  r0.z = r0.z * 9000 + 0.100000001;
  r0.z = 1 / r0.z;
  r1.z = dot(r12.xyz, r12.xyz);
  r7.w = r1.z * 9000 + 0.100000001;
  r7.w = 1 / r7.w;
  r10.xyz = r3.xyz * r0.zzz + cb9[0].xyz;
  r10.xyz = r2.xyz * r7.www + r10.xyz;
  r0.z = dot(r10.xyz, r10.xyz);
  r0.z = rsqrt(r0.z);
  r10.xyz = r10.xyz * r0.zzz;
  r0.z = dot(r10.xyz, r11.xyz);
  r0.z = cb9[15].z + -r0.z;
  r10.xyz = r10.xyz * r0.zzz + r11.xyz;
  r0.z = dot(r10.xyz, r10.xyz);
  r0.z = rsqrt(r0.z);
  r10.xyz = r10.xyz * r0.zzz;
  r0.z = dot(r6.xyz, r10.xyz);
  r7.w = r0.z + r0.z;
  r11.xy = r10.xy * -r7.ww + r6.xy;
  r11.xy = r11.xy * cb9[13].ww + r0.xy;
  r11.xyz = t2.Sample(s2_s, r11.xy).xyz;
  r7.w = dot(r2.xyz, r6.xyz);
  r2.xy = r2.xy * r2.zz;
  r2.xy = cb9[15].xx * r2.xy + r0.xy;
  r2.xyz = t2.Sample(s2_s, r2.xy).xyz;
  r8.w = r7.w + r7.w;
  r1.xy = r1.xy * r8.ww + r6.xy;
  r1.xy = r1.xy * cb9[13].ww + r0.xy;
  r12.xyz = t2.Sample(s2_s, r1.xy).xyz;
  r1.x = r2.w + r2.w;
  r1.xy = r3.xy * -r1.xx + r6.xy;
  r1.xy = r1.xy * cb9[13].ww + r0.xy;
  r13.xyz = t2.Sample(s2_s, r1.xy).xyz;
  r1.xy = r10.xy * r10.zz;
  r0.xy = cb9[15].xx * r1.xy + r0.xy;
  r10.xyz = t2.Sample(s2_s, r0.xy).xyz;
  if (r1.w != 0) {
    r0.x = cmp(0 < r0.w);
    if (r0.x != 0) {
      if (-1 != 0) discard;
      r1.xyw = float3(0,0,0);
    } else {
      r0.z = saturate(-r0.z);
      r0.x = 1 + -r0.z;
      r0.x = log2(r0.x);
      r0.x = cb9[12].w * r0.x;
      r0.x = exp2(r0.x);
      r0.y = cb9[11].w + -cb9[10].w;
      r0.x = r0.x * r0.y + cb9[10].w;
      r0.y = sqrt(r1.z);
      r14.xyz = cb9[14].www * r2.xyz;
      r1.z = 0.400000006 + r7.w;
      r1.z = saturate(-100.000099 * r1.z);
      r8.w = r1.z * -2 + 3;
      r1.z = r1.z * r1.z;
      r1.z = r8.w * r1.z;
      r7.w = saturate(-r7.w);
      r8.w = 1 + -r7.w;
      r8.w = log2(r8.w);
      r8.w = cb9[14].z * r8.w;
      r8.w = exp2(r8.w);
      r10.w = cb9[14].y + -cb9[14].x;
      r8.w = r8.w * r10.w + cb9[14].x;
      r15.xyz = r12.xyz * r8.www;
      r14.xyz = r14.xyz * r1.zzz + r15.xyz;
      r1.z = 100 * r0.y;
      r15.xyz = log2(cb9[8].xyz);
      r16.xyz = r15.xyz * r1.zzz;
      r16.xyz = exp2(r16.xyz);
      r14.xyz = r16.xyz * r14.xyz;
      r1.z = dot(cb9[0].xyz, r6.xyz);
      r8.w = dot(cb9[0].xyzw, r5.xyzw);
      r10.w = dot(cb9[0].xyzw, r4.xyzw);
      r11.w = dot(cb9[0].xyz, cb9[0].xyz);
      r11.w = 100 / r11.w;
      r8.w = r11.w * -r8.w;
      r8.w = max(0, r8.w);
      r10.w = r11.w * -r10.w;
      r10.w = max(0, r10.w);
      r10.w = r10.w + -r8.w;
      r10.w = max(0.00100000005, r10.w);
      r10.w = r10.w / r0.y;
      r10.w = 1 + r10.w;
      r1.z = r1.z * r1.z + 1;
      r16.xyz = r8.www * r15.xyz;
      r16.xyz = exp2(r16.xyz);
      r16.xyz = r16.xyz * r1.zzz;
      r1.z = r10.w * r0.y;
      r17.xyz = r1.zzz * r15.xyz;
      r17.xyz = exp2(r17.xyz);
      r17.xyz = float3(-1,-1,-1) + r17.xyz;
      r17.xyz = cb9[9].xyz * r17.xyz;
      r17.xyz = r17.xyz / r10.www;
      r16.xyz = r17.xyz * r16.xyz;
      r16.xyz = cb9[13].xyz * r16.xyz;
      r1.z = dot(cb9[10].xyz, cb9[0].xyz);
      r17.xyz = cb9[12].xyz + -cb9[11].xyz;
      r18.xyz = r1.zzz * r17.xyz + cb9[11].xyz;
      r1.z = dot(r3.xyz, v0.xyz);
      r3.w = -r1.z;
      r1.z = dot(r3.xyzw, r5.xyzw);
      r8.w = dot(r3.xyzw, r4.xyzw);
      r10.w = dot(r3.xyz, r3.xyz);
      r10.w = 100 / r10.w;
      r1.z = r10.w * -r1.z;
      r1.z = max(0, r1.z);
      r8.w = r10.w * -r8.w;
      r8.w = max(0, r8.w);
      r8.w = r8.w + -r1.z;
      r8.w = max(0.00100000005, r8.w);
      r8.w = r8.w / r0.y;
      r8.w = 1 + r8.w;
      r10.w = r2.w * r2.w + 1;
      r19.xyz = r1.zzz * r15.xyz;
      r19.xyz = exp2(r19.xyz);
      r19.xyz = r19.xyz * r10.www;
      r1.z = r8.w * r0.y;
      r20.xyz = r1.zzz * r15.xyz;
      r20.xyz = exp2(r20.xyz);
      r20.xyz = float3(-1,-1,-1) + r20.xyz;
      r20.xyz = cb9[9].xyz * r20.xyz;
      r20.xyz = r20.xyz / r8.www;
      r19.xyz = r20.xyz * r19.xyz;
      r19.xyz = cb9[13].xyz * r19.xyz;
      r1.z = dot(cb9[10].xyz, r3.xyz);
      r20.xyz = r1.zzz * r17.xyz + cb9[11].xyz;
      r19.xyz = r20.xyz * r19.xyz;
      r1.z = dot(r6.xyz, r4.xyz);
      r6.w = -r1.z;
      r1.z = dot(r6.xyz, r6.xyz);
      r8.w = dot(r6.xyzw, r5.xyzw);
      r10.w = dot(r6.xyzw, r4.xyzw);
      r11.w = 100 / r1.z;
      r8.w = r11.w * -r8.w;
      r8.w = max(0, r8.w);
      r10.w = r11.w * -r10.w;
      r10.w = max(0, r10.w);
      r10.w = r10.w + -r8.w;
      r10.w = max(0.00100000005, r10.w);
      r10.w = r10.w / r0.y;
      r10.w = 1 + r10.w;
      r1.z = r1.z * r1.z + 1;
      r20.xyz = r8.www * r15.xyz;
      r20.xyz = exp2(r20.xyz);
      r20.xyz = r20.xyz * r1.zzz;
      r0.y = r10.w * r0.y;
      r15.xyz = r0.yyy * r15.xyz;
      r15.xyz = exp2(r15.xyz);
      r15.xyz = float3(-1,-1,-1) + r15.xyz;
      r15.xyz = cb9[9].xyz * r15.xyz;
      r15.xyz = r15.xyz / r10.www;
      r15.xyz = r20.xyz * r15.xyz;
      r15.xyz = cb9[13].xyz * r15.xyz;
      r0.y = dot(cb9[10].xyz, r6.xyz);
      r17.xyz = r0.yyy * r17.xyz + cb9[11].xyz;
      r16.xyz = r16.xyz * r18.xyz + r19.xyz;
      r15.xyz = r15.xyz * r17.xyz + r16.xyz;
      r14.xyz = r11.xyz * r0.xxx + r14.xyz;
      r1.xyw = r14.xyz + r15.xyz;
    }
  } else {
    r0.x = saturate(-r2.w);
    r0.x = 1 + -r0.x;
    r0.x = log2(r0.x);
    r0.x = cb9[16].z * r0.x;
    r0.x = exp2(r0.x);
    r0.y = cb9[16].y + -cb9[16].x;
    r0.x = r0.x * r0.y + cb9[16].x;
    r13.xyz = r13.xyz * r0.xxx;
    r0.x = cmp(0 < r0.w);
    if (r0.x != 0) {
      r0.x = saturate(r0.z);
      r0.x = 1 + -r0.x;
      r0.xyw = r11.xyz * r0.xxx;
      r0.z = -0.400000006 + r0.z;
      r0.z = saturate(100.000099 * r0.z);
      r1.z = r0.z * -2 + 3;
      r0.z = r0.z * r0.z;
      r0.z = r1.z * r0.z;
      r0.xyz = r10.xyz * r0.zzz + r0.xyw;
      r0.w = dot(r8.xyz, r8.xyz);
      r0.w = sqrt(r0.w);
      r1.z = 100 * r0.w;
      r8.xyz = log2(cb9[8].xyz);
      r10.xyz = r8.xyz * r1.zzz;
      r10.xyz = exp2(r10.xyz);
      r1.z = dot(cb9[0].xyz, r6.xyz);
      r8.w = dot(cb9[0].xyzw, r5.xyzw);
      r10.w = dot(cb9[0].xyzw, r9.xyzw);
      r11.x = dot(cb9[0].xyz, cb9[0].xyz);
      r11.x = 100 / r11.x;
      r8.w = r11.x * -r8.w;
      r8.w = max(0, r8.w);
      r10.w = r11.x * -r10.w;
      r10.w = max(0, r10.w);
      r10.w = r10.w + -r8.w;
      r10.w = max(0.00100000005, r10.w);
      r10.w = r10.w / r0.w;
      r10.w = 1 + r10.w;
      r1.z = r1.z * r1.z + 1;
      r11.xyz = r8.www * r8.xyz;
      r11.xyz = exp2(r11.xyz);
      r11.xyz = r11.xyz * r1.zzz;
      r1.z = r10.w * r0.w;
      r14.xyz = r1.zzz * r8.xyz;
      r14.xyz = exp2(r14.xyz);
      r14.xyz = float3(-1,-1,-1) + r14.xyz;
      r14.xyz = cb9[9].xyz * r14.xyz;
      r14.xyz = r14.xyz / r10.www;
      r11.xyz = r14.xyz * r11.xyz;
      r11.xyz = cb9[13].xyz * r11.xyz;
      r1.z = dot(cb9[10].xyz, cb9[0].xyz);
      r14.xyz = cb9[12].xyz + -cb9[11].xyz;
      r15.xyz = r1.zzz * r14.xyz + cb9[11].xyz;
      r1.z = dot(r3.xyz, v0.xyz);
      r3.w = -r1.z;
      r1.z = dot(r3.xyzw, r5.xyzw);
      r8.w = dot(r3.xyzw, r9.xyzw);
      r10.w = dot(r3.xyz, r3.xyz);
      r10.w = 100 / r10.w;
      r1.z = r10.w * -r1.z;
      r1.z = max(0, r1.z);
      r8.w = r10.w * -r8.w;
      r8.w = max(0, r8.w);
      r8.w = r8.w + -r1.z;
      r8.w = max(0.00100000005, r8.w);
      r8.w = r8.w / r0.w;
      r8.w = 1 + r8.w;
      r10.w = r2.w * r2.w + 1;
      r16.xyz = r1.zzz * r8.xyz;
      r16.xyz = exp2(r16.xyz);
      r16.xyz = r16.xyz * r10.www;
      r1.z = r8.w * r0.w;
      r17.xyz = r1.zzz * r8.xyz;
      r17.xyz = exp2(r17.xyz);
      r17.xyz = float3(-1,-1,-1) + r17.xyz;
      r17.xyz = cb9[9].xyz * r17.xyz;
      r17.xyz = r17.xyz / r8.www;
      r16.xyz = r17.xyz * r16.xyz;
      r16.xyz = cb9[13].xyz * r16.xyz;
      r1.z = dot(cb9[10].xyz, r3.xyz);
      r17.xyz = r1.zzz * r14.xyz + cb9[11].xyz;
      r16.xyz = r17.xyz * r16.xyz;
      r1.z = dot(r6.xyz, r9.xyz);
      r6.w = -r1.z;
      r1.z = dot(r6.xyz, r6.xyz);
      r8.w = dot(r6.xyzw, r5.xyzw);
      r9.x = dot(r6.xyzw, r9.xyzw);
      r9.y = 100 / r1.z;
      r8.w = r9.y * -r8.w;
      r8.w = max(0, r8.w);
      r9.x = -r9.x * r9.y;
      r9.x = max(0, r9.x);
      r9.x = r9.x + -r8.w;
      r9.x = max(0.00100000005, r9.x);
      r9.x = r9.x / r0.w;
      r9.x = 1 + r9.x;
      r1.z = r1.z * r1.z + 1;
      r9.yzw = r8.www * r8.xyz;
      r9.yzw = exp2(r9.yzw);
      r9.yzw = r9.yzw * r1.zzz;
      r0.w = r9.x * r0.w;
      r8.xyz = r0.www * r8.xyz;
      r8.xyz = exp2(r8.xyz);
      r8.xyz = float3(-1,-1,-1) + r8.xyz;
      r8.xyz = cb9[9].xyz * r8.xyz;
      r8.xyz = r8.xyz / r9.xxx;
      r8.xyz = r9.yzw * r8.xyz;
      r8.xyz = cb9[13].xyz * r8.xyz;
      r0.w = dot(cb9[10].xyz, r6.xyz);
      r9.xyz = r0.www * r14.xyz + cb9[11].xyz;
      r11.xyz = r11.xyz * r15.xyz + r16.xyz;
      r8.xyz = r8.xyz * r9.xyz + r11.xyz;
      r0.xyz = r0.xyz * r10.xyz + r13.xyz;
      r1.xyw = r0.xyz + r8.xyz;
    } else {
      r0.x = dot(r7.xyz, r7.xyz);
      r0.x = sqrt(r0.x);
      r0.yzw = cb9[14].www * r2.xyz;
      r1.z = 0.400000006 + r7.w;
      r1.z = saturate(-100.000099 * r1.z);
      r2.x = r1.z * -2 + 3;
      r1.z = r1.z * r1.z;
      r1.z = r2.x * r1.z;
      r7.w = saturate(-r7.w);
      r2.x = 1 + -r7.w;
      r2.x = log2(r2.x);
      r2.x = cb9[14].z * r2.x;
      r2.x = exp2(r2.x);
      r2.y = cb9[14].y + -cb9[14].x;
      r2.x = r2.x * r2.y + cb9[14].x;
      r2.xyz = r12.xyz * r2.xxx;
      r0.yzw = r0.yzw * r1.zzz + r2.xyz;
      r1.z = 100 * r0.x;
      r2.xyz = log2(cb9[8].xyz);
      r7.xyz = r2.xyz * r1.zzz;
      r7.xyz = exp2(r7.xyz);
      r1.z = dot(cb9[0].xyz, r6.xyz);
      r7.w = dot(cb9[0].xyzw, r5.xyzw);
      r8.x = dot(cb9[0].xyzw, r4.xyzw);
      r8.y = dot(cb9[0].xyz, cb9[0].xyz);
      r8.y = 100 / r8.y;
      r7.w = r8.y * -r7.w;
      r7.w = max(0, r7.w);
      r8.x = -r8.x * r8.y;
      r8.x = max(0, r8.x);
      r8.x = r8.x + -r7.w;
      r8.x = max(0.00100000005, r8.x);
      r8.x = r8.x / r0.x;
      r8.x = 1 + r8.x;
      r1.z = r1.z * r1.z + 1;
      r8.yzw = r7.www * r2.xyz;
      r8.yzw = exp2(r8.yzw);
      r8.yzw = r8.yzw * r1.zzz;
      r1.z = r8.x * r0.x;
      r9.xyz = r1.zzz * r2.xyz;
      r9.xyz = exp2(r9.xyz);
      r9.xyz = float3(-1,-1,-1) + r9.xyz;
      r9.xyz = cb9[9].xyz * r9.xyz;
      r9.xyz = r9.xyz / r8.xxx;
      r8.xyz = r9.xyz * r8.yzw;
      r8.xyz = cb9[13].xyz * r8.xyz;
      r1.z = dot(cb9[10].xyz, cb9[0].xyz);
      r9.xyz = cb9[12].xyz + -cb9[11].xyz;
      r10.xyz = r1.zzz * r9.xyz + cb9[11].xyz;
      r1.z = dot(r3.xyz, v0.xyz);
      r3.w = -r1.z;
      r1.z = dot(r3.xyzw, r5.xyzw);
      r3.w = dot(r3.xyzw, r4.xyzw);
      r7.w = dot(r3.xyz, r3.xyz);
      r7.w = 100 / r7.w;
      r1.z = r7.w * -r1.z;
      r1.z = max(0, r1.z);
      r3.w = r7.w * -r3.w;
      r3.w = max(0, r3.w);
      r3.w = r3.w + -r1.z;
      r3.w = max(0.00100000005, r3.w);
      r3.w = r3.w / r0.x;
      r3.w = 1 + r3.w;
      r2.w = r2.w * r2.w + 1;
      r11.xyz = r1.zzz * r2.xyz;
      r11.xyz = exp2(r11.xyz);
      r11.xyz = r11.xyz * r2.www;
      r1.z = r3.w * r0.x;
      r12.xyz = r1.zzz * r2.xyz;
      r12.xyz = exp2(r12.xyz);
      r12.xyz = float3(-1,-1,-1) + r12.xyz;
      r12.xyz = cb9[9].xyz * r12.xyz;
      r12.xyz = r12.xyz / r3.www;
      r11.xyz = r12.xyz * r11.xyz;
      r11.xyz = cb9[13].xyz * r11.xyz;
      r1.z = dot(cb9[10].xyz, r3.xyz);
      r3.xyz = r1.zzz * r9.xyz + cb9[11].xyz;
      r3.xyz = r11.xyz * r3.xyz;
      r1.z = dot(r6.xyz, r4.xyz);
      r6.w = -r1.z;
      r1.z = dot(r6.xyz, r6.xyz);
      r2.w = dot(r6.xyzw, r5.xyzw);
      r3.w = dot(r6.xyzw, r4.xyzw);
      r4.x = 100 / r1.z;
      r2.w = r4.x * -r2.w;
      r2.w = max(0, r2.w);
      r3.w = r4.x * -r3.w;
      r3.w = max(0, r3.w);
      r3.w = r3.w + -r2.w;
      r3.w = max(0.00100000005, r3.w);
      r3.w = r3.w / r0.x;
      r3.w = 1 + r3.w;
      r1.z = r1.z * r1.z + 1;
      r4.xyz = r2.www * r2.xyz;
      r4.xyz = exp2(r4.xyz);
      r4.xyz = r4.xyz * r1.zzz;
      r0.x = r3.w * r0.x;
      r2.xyz = r0.xxx * r2.xyz;
      r2.xyz = exp2(r2.xyz);
      r2.xyz = float3(-1,-1,-1) + r2.xyz;
      r2.xyz = cb9[9].xyz * r2.xyz;
      r2.xyz = r2.xyz / r3.www;
      r2.xyz = r4.xyz * r2.xyz;
      r2.xyz = cb9[13].xyz * r2.xyz;
      r0.x = dot(cb9[10].xyz, r6.xyz);
      r4.xyz = r0.xxx * r9.xyz + cb9[11].xyz;
      r3.xyz = r8.xyz * r10.xyz + r3.xyz;
      r2.xyz = r2.xyz * r4.xyz + r3.xyz;
      r0.xyz = r0.yzw * r7.xyz + r13.xyz;
      r1.xyw = r0.xyz + r2.xyz;
    }
  }
  r0.xyz = cb9[19].xxx * r1.xyw;
  r1.xyz = cb9[19].xxx + r1.xyw;
  r0.xyz = r0.xyz / r1.xyz;
  o0.xyz = max(float3(0,0,0), r0.xyz);
  o0.w = cb9[16].w;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Sat May 18 21:49:24 2019
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 1   xyz         1     NONE   float   xyz
// TEXCOORD                 2   xyz         2     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[20], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, 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_input_ps linear v0.xyzw
dcl_input_ps linear v1.xyz
dcl_input_ps linear v2.xyz
dcl_output o0.xyzw
dcl_temps 21
div r0.xy, v1.xyxx, v1.zzzz
add r0.zw, -cb9[2].xxxy, cb9[2].zzzw
mad r0.zw, r0.xxxy, r0.zzzw, cb9[2].xxxy
max r0.zw, r0.zzzw, cb9[3].xxxy
min r0.zw, r0.zzzw, cb9[3].zzzw
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, r0.zwzz, t0.xyzw, s0
mad r0.z, r1.z, cb9[7].w, cb9[7].z
add r0.w, -r0.z, v0.z
add r0.w, r0.w, -cb9[19].y
lt r0.w, r0.w, l(0.000000)
discard_nz r0.w
mad r0.w, r1.w, cb9[9].w, cb9[8].w
mad r1.xy, r1.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mov r2.xy, -r1.xyxx
dp2 r1.z, r2.xyxx, r2.xyxx
sqrt r1.z, r1.z
add r1.z, -r1.z, l(1.000000)
max r1.z, r1.z, l(0.000000)
sqrt r2.z, r1.z
dp3 r1.z, v2.xyzx, v2.xyzx
rsq r1.z, r1.z
mul r3.xyz, r1.zzzz, v2.xyzx
div r0.z, r0.z, v0.z
mul r4.xyz, r0.zzzz, v0.xyzx
mov r5.xyz, v0.xyzx
mov r5.w, l(1.000000)
dp4 r6.x, cb9[4].xyzw, r5.xyzw
dp4 r6.y, cb9[5].xyzw, r5.xyzw
sample_indexable(texture2d)(float,float,float,float) r1.z, r6.xyxx, t1.xywz, s1
add r1.w, cb9[15].y, cb9[15].y
mad r1.z, r1.z, r1.w, -cb9[15].y
add r1.z, -r1.z, v0.w
mov r4.w, l(1.000000)
dp4 r7.x, cb9[4].xyzw, r4.xyzw
dp4 r7.y, cb9[5].xyzw, r4.xyzw
sample_indexable(texture2d)(float,float,float,float) r6.z, r7.xyxx, t1.xywz, s1
mad r1.w, r6.z, r1.w, -cb9[15].y
add r0.w, r0.w, -r1.w
mov r8.xyz, -r3.xyzx
mov r8.w, l(1.000000)
dp4 r1.w, r8.xyzw, cb9[1].xyzw
mul r6.xy, r6.xyxx, cb9[15].wwww
sample_indexable(texture2d)(float,float,float,float) r6.x, r6.xyxx, t1.wxyz, s1
mad r1.z, -r6.x, r1.w, r1.z
mov r2.w, l(1.000000)
dp4 r1.w, r2.xyzw, cb9[1].xyzw
mul r6.xy, r7.xyxx, cb9[15].wwww
sample_indexable(texture2d)(float,float,float,float) r2.w, r6.xyxx, t1.xyzw, s1
mad r0.w, -r2.w, r1.w, r0.w
dp3 r1.w, v0.xyzx, v0.xyzx
rsq r1.w, r1.w
mul r6.xyz, r1.wwww, v0.xyzx
lt r1.w, l(0.000000), r1.z
dp3 r2.w, r3.xyzx, r6.xyzx
add r7.x, -r1.z, r0.w
div r1.z, -r1.z, r7.x
mad r7.xyz, v0.xyzx, r0.zzzz, -v0.xyzx
mul r8.xyz, r1.zzzz, r7.xyzx
mad r9.xyz, r1.zzzz, r7.xyzx, v0.xyzx
mov r9.w, l(1.000000)
dp4 r10.x, cb9[4].xyzw, r9.xyzw
dp4 r10.y, cb9[5].xyzw, r9.xyzw
sample_indexable(texture2d)(float,float,float,float) r10.xy, r10.xyxx, t1.xyzw, s1
mad r10.xy, r10.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r11.x, cb9[6].xyxx, r10.xyxx
dp2 r11.y, cb9[6].zwzz, r10.xyxx
dp2 r11.z, cb9[7].xyxx, r10.xyxx
add r10.xyz, -r9.xyzx, v0.xyzx
mad r12.xyz, v0.xyzx, r0.zzzz, -r9.xyzx
dp3 r0.z, r10.xyzx, r10.xyzx
mad r0.z, r0.z, l(9000.000000), l(0.100000)
div r0.z, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z
dp3 r1.z, r12.xyzx, r12.xyzx
mad r7.w, r1.z, l(9000.000000), l(0.100000)
div r7.w, l(1.000000, 1.000000, 1.000000, 1.000000), r7.w
mad r10.xyz, r3.xyzx, r0.zzzz, cb9[0].xyzx
mad r10.xyz, r2.xyzx, r7.wwww, r10.xyzx
dp3 r0.z, r10.xyzx, r10.xyzx
rsq r0.z, r0.z
mul r10.xyz, r0.zzzz, r10.xyzx
dp3 r0.z, r10.xyzx, r11.xyzx
add r0.z, -r0.z, cb9[15].z
mad r10.xyz, r10.xyzx, r0.zzzz, r11.xyzx
dp3 r0.z, r10.xyzx, r10.xyzx
rsq r0.z, r0.z
mul r10.xyz, r0.zzzz, r10.xyzx
dp3 r0.z, r6.xyzx, r10.xyzx
add r7.w, r0.z, r0.z
mad r11.xy, r10.xyxx, -r7.wwww, r6.xyxx
mad r11.xy, r11.xyxx, cb9[13].wwww, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r11.xyz, r11.xyxx, t2.xyzw, s2
dp3 r7.w, r2.xyzx, r6.xyzx
mul r2.xy, r2.zzzz, r2.xyxx
mad r2.xy, cb9[15].xxxx, r2.xyxx, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r2.xyz, r2.xyxx, t2.xyzw, s2
add r8.w, r7.w, r7.w
mad r1.xy, r1.xyxx, r8.wwww, r6.xyxx
mad r1.xy, r1.xyxx, cb9[13].wwww, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r12.xyz, r1.xyxx, t2.xyzw, s2
add r1.x, r2.w, r2.w
mad r1.xy, r3.xyxx, -r1.xxxx, r6.xyxx
mad r1.xy, r1.xyxx, cb9[13].wwww, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r13.xyz, r1.xyxx, t2.xyzw, s2
mul r1.xy, r10.zzzz, r10.xyxx
mad r0.xy, cb9[15].xxxx, r1.xyxx, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r10.xyz, r0.xyxx, t2.xyzw, s2
if_nz r1.w
  lt r0.x, l(0.000000), r0.w
  if_nz r0.x
    discard_nz l(-1)
    mov r1.xyw, l(0,0,0,0)
  else
    mov_sat r0.z, -r0.z
    add r0.x, -r0.z, l(1.000000)
    log r0.x, r0.x
    mul r0.x, r0.x, cb9[12].w
    exp r0.x, r0.x
    add r0.y, -cb9[10].w, cb9[11].w
    mad r0.x, r0.x, r0.y, cb9[10].w
    sqrt r0.y, r1.z
    mul r14.xyz, r2.xyzx, cb9[14].wwww
    add r1.z, r7.w, l(0.400000)
    mul_sat r1.z, r1.z, l(-100.000099)
    mad r8.w, r1.z, l(-2.000000), l(3.000000)
    mul r1.z, r1.z, r1.z
    mul r1.z, r1.z, r8.w
    mov_sat r7.w, -r7.w
    add r8.w, -r7.w, l(1.000000)
    log r8.w, r8.w
    mul r8.w, r8.w, cb9[14].z
    exp r8.w, r8.w
    add r10.w, -cb9[14].x, cb9[14].y
    mad r8.w, r8.w, r10.w, cb9[14].x
    mul r15.xyz, r8.wwww, r12.xyzx
    mad r14.xyz, r14.xyzx, r1.zzzz, r15.xyzx
    mul r1.z, r0.y, l(100.000000)
    log r15.xyz, cb9[8].xyzx
    mul r16.xyz, r1.zzzz, r15.xyzx
    exp r16.xyz, r16.xyzx
    mul r14.xyz, r14.xyzx, r16.xyzx
    dp3 r1.z, cb9[0].xyzx, r6.xyzx
    dp4 r8.w, cb9[0].xyzw, r5.xyzw
    dp4 r10.w, cb9[0].xyzw, r4.xyzw
    dp3 r11.w, cb9[0].xyzx, cb9[0].xyzx
    div r11.w, l(100.000000), r11.w
    mul r8.w, -r8.w, r11.w
    max r8.w, r8.w, l(0.000000)
    mul r10.w, -r10.w, r11.w
    max r10.w, r10.w, l(0.000000)
    add r10.w, -r8.w, r10.w
    max r10.w, r10.w, l(0.001000)
    div r10.w, r10.w, r0.y
    add r10.w, r10.w, l(1.000000)
    mad r1.z, r1.z, r1.z, l(1.000000)
    mul r16.xyz, r15.xyzx, r8.wwww
    exp r16.xyz, r16.xyzx
    mul r16.xyz, r1.zzzz, r16.xyzx
    mul r1.z, r0.y, r10.w
    mul r17.xyz, r15.xyzx, r1.zzzz
    exp r17.xyz, r17.xyzx
    add r17.xyz, r17.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    mul r17.xyz, r17.xyzx, cb9[9].xyzx
    div r17.xyz, r17.xyzx, r10.wwww
    mul r16.xyz, r16.xyzx, r17.xyzx
    mul r16.xyz, r16.xyzx, cb9[13].xyzx
    dp3 r1.z, cb9[10].xyzx, cb9[0].xyzx
    add r17.xyz, -cb9[11].xyzx, cb9[12].xyzx
    mad r18.xyz, r1.zzzz, r17.xyzx, cb9[11].xyzx
    dp3 r1.z, r3.xyzx, v0.xyzx
    mov r3.w, -r1.z
    dp4 r1.z, r3.xyzw, r5.xyzw
    dp4 r8.w, r3.xyzw, r4.xyzw
    dp3 r10.w, r3.xyzx, r3.xyzx
    div r10.w, l(100.000000), r10.w
    mul r1.z, -r1.z, r10.w
    max r1.z, r1.z, l(0.000000)
    mul r8.w, -r8.w, r10.w
    max r8.w, r8.w, l(0.000000)
    add r8.w, -r1.z, r8.w
    max r8.w, r8.w, l(0.001000)
    div r8.w, r8.w, r0.y
    add r8.w, r8.w, l(1.000000)
    mad r10.w, r2.w, r2.w, l(1.000000)
    mul r19.xyz, r15.xyzx, r1.zzzz
    exp r19.xyz, r19.xyzx
    mul r19.xyz, r10.wwww, r19.xyzx
    mul r1.z, r0.y, r8.w
    mul r20.xyz, r15.xyzx, r1.zzzz
    exp r20.xyz, r20.xyzx
    add r20.xyz, r20.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    mul r20.xyz, r20.xyzx, cb9[9].xyzx
    div r20.xyz, r20.xyzx, r8.wwww
    mul r19.xyz, r19.xyzx, r20.xyzx
    mul r19.xyz, r19.xyzx, cb9[13].xyzx
    dp3 r1.z, cb9[10].xyzx, r3.xyzx
    mad r20.xyz, r1.zzzz, r17.xyzx, cb9[11].xyzx
    mul r19.xyz, r19.xyzx, r20.xyzx
    dp3 r1.z, r6.xyzx, r4.xyzx
    mov r6.w, -r1.z
    dp3 r1.z, r6.xyzx, r6.xyzx
    dp4 r8.w, r6.xyzw, r5.xyzw
    dp4 r10.w, r6.xyzw, r4.xyzw
    div r11.w, l(100.000000), r1.z
    mul r8.w, -r8.w, r11.w
    max r8.w, r8.w, l(0.000000)
    mul r10.w, -r10.w, r11.w
    max r10.w, r10.w, l(0.000000)
    add r10.w, -r8.w, r10.w
    max r10.w, r10.w, l(0.001000)
    div r10.w, r10.w, r0.y
    add r10.w, r10.w, l(1.000000)
    mad r1.z, r1.z, r1.z, l(1.000000)
    mul r20.xyz, r15.xyzx, r8.wwww
    exp r20.xyz, r20.xyzx
    mul r20.xyz, r1.zzzz, r20.xyzx
    mul r0.y, r0.y, r10.w
    mul r15.xyz, r15.xyzx, r0.yyyy
    exp r15.xyz, r15.xyzx
    add r15.xyz, r15.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    mul r15.xyz, r15.xyzx, cb9[9].xyzx
    div r15.xyz, r15.xyzx, r10.wwww
    mul r15.xyz, r15.xyzx, r20.xyzx
    mul r15.xyz, r15.xyzx, cb9[13].xyzx
    dp3 r0.y, cb9[10].xyzx, r6.xyzx
    mad r17.xyz, r0.yyyy, r17.xyzx, cb9[11].xyzx
    mad r16.xyz, r16.xyzx, r18.xyzx, r19.xyzx
    mad r15.xyz, r15.xyzx, r17.xyzx, r16.xyzx
    mad r14.xyz, r11.xyzx, r0.xxxx, r14.xyzx
    add r1.xyw, r15.xyxz, r14.xyxz
  endif
else
  mov_sat r0.x, -r2.w
  add r0.x, -r0.x, l(1.000000)
  log r0.x, r0.x
  mul r0.x, r0.x, cb9[16].z
  exp r0.x, r0.x
  add r0.y, -cb9[16].x, cb9[16].y
  mad r0.x, r0.x, r0.y, cb9[16].x
  mul r13.xyz, r0.xxxx, r13.xyzx
  lt r0.x, l(0.000000), r0.w
  if_nz r0.x
    mov_sat r0.x, r0.z
    add r0.x, -r0.x, l(1.000000)
    mul r0.xyw, r0.xxxx, r11.xyxz
    add r0.z, r0.z, l(-0.400000)
    mul_sat r0.z, r0.z, l(100.000099)
    mad r1.z, r0.z, l(-2.000000), l(3.000000)
    mul r0.z, r0.z, r0.z
    mul r0.z, r0.z, r1.z
    mad r0.xyz, r10.xyzx, r0.zzzz, r0.xywx
    dp3 r0.w, r8.xyzx, r8.xyzx
    sqrt r0.w, r0.w
    mul r1.z, r0.w, l(100.000000)
    log r8.xyz, cb9[8].xyzx
    mul r10.xyz, r1.zzzz, r8.xyzx
    exp r10.xyz, r10.xyzx
    dp3 r1.z, cb9[0].xyzx, r6.xyzx
    dp4 r8.w, cb9[0].xyzw, r5.xyzw
    dp4 r10.w, cb9[0].xyzw, r9.xyzw
    dp3 r11.x, cb9[0].xyzx, cb9[0].xyzx
    div r11.x, l(100.000000), r11.x
    mul r8.w, -r8.w, r11.x
    max r8.w, r8.w, l(0.000000)
    mul r10.w, -r10.w, r11.x
    max r10.w, r10.w, l(0.000000)
    add r10.w, -r8.w, r10.w
    max r10.w, r10.w, l(0.001000)
    div r10.w, r10.w, r0.w
    add r10.w, r10.w, l(1.000000)
    mad r1.z, r1.z, r1.z, l(1.000000)
    mul r11.xyz, r8.xyzx, r8.wwww
    exp r11.xyz, r11.xyzx
    mul r11.xyz, r1.zzzz, r11.xyzx
    mul r1.z, r0.w, r10.w
    mul r14.xyz, r8.xyzx, r1.zzzz
    exp r14.xyz, r14.xyzx
    add r14.xyz, r14.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    mul r14.xyz, r14.xyzx, cb9[9].xyzx
    div r14.xyz, r14.xyzx, r10.wwww
    mul r11.xyz, r11.xyzx, r14.xyzx
    mul r11.xyz, r11.xyzx, cb9[13].xyzx
    dp3 r1.z, cb9[10].xyzx, cb9[0].xyzx
    add r14.xyz, -cb9[11].xyzx, cb9[12].xyzx
    mad r15.xyz, r1.zzzz, r14.xyzx, cb9[11].xyzx
    dp3 r1.z, r3.xyzx, v0.xyzx
    mov r3.w, -r1.z
    dp4 r1.z, r3.xyzw, r5.xyzw
    dp4 r8.w, r3.xyzw, r9.xyzw
    dp3 r10.w, r3.xyzx, r3.xyzx
    div r10.w, l(100.000000), r10.w
    mul r1.z, -r1.z, r10.w
    max r1.z, r1.z, l(0.000000)
    mul r8.w, -r8.w, r10.w
    max r8.w, r8.w, l(0.000000)
    add r8.w, -r1.z, r8.w
    max r8.w, r8.w, l(0.001000)
    div r8.w, r8.w, r0.w
    add r8.w, r8.w, l(1.000000)
    mad r10.w, r2.w, r2.w, l(1.000000)
    mul r16.xyz, r8.xyzx, r1.zzzz
    exp r16.xyz, r16.xyzx
    mul r16.xyz, r10.wwww, r16.xyzx
    mul r1.z, r0.w, r8.w
    mul r17.xyz, r8.xyzx, r1.zzzz
    exp r17.xyz, r17.xyzx
    add r17.xyz, r17.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    mul r17.xyz, r17.xyzx, cb9[9].xyzx
    div r17.xyz, r17.xyzx, r8.wwww
    mul r16.xyz, r16.xyzx, r17.xyzx
    mul r16.xyz, r16.xyzx, cb9[13].xyzx
    dp3 r1.z, cb9[10].xyzx, r3.xyzx
    mad r17.xyz, r1.zzzz, r14.xyzx, cb9[11].xyzx
    mul r16.xyz, r16.xyzx, r17.xyzx
    dp3 r1.z, r6.xyzx, r9.xyzx
    mov r6.w, -r1.z
    dp3 r1.z, r6.xyzx, r6.xyzx
    dp4 r8.w, r6.xyzw, r5.xyzw
    dp4 r9.x, r6.xyzw, r9.xyzw
    div r9.y, l(100.000000), r1.z
    mul r8.w, -r8.w, r9.y
    max r8.w, r8.w, l(0.000000)
    mul r9.x, r9.y, -r9.x
    max r9.x, r9.x, l(0.000000)
    add r9.x, -r8.w, r9.x
    max r9.x, r9.x, l(0.001000)
    div r9.x, r9.x, r0.w
    add r9.x, r9.x, l(1.000000)
    mad r1.z, r1.z, r1.z, l(1.000000)
    mul r9.yzw, r8.xxyz, r8.wwww
    exp r9.yzw, r9.yyzw
    mul r9.yzw, r1.zzzz, r9.yyzw
    mul r0.w, r0.w, r9.x
    mul r8.xyz, r8.xyzx, r0.wwww
    exp r8.xyz, r8.xyzx
    add r8.xyz, r8.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    mul r8.xyz, r8.xyzx, cb9[9].xyzx
    div r8.xyz, r8.xyzx, r9.xxxx
    mul r8.xyz, r8.xyzx, r9.yzwy
    mul r8.xyz, r8.xyzx, cb9[13].xyzx
    dp3 r0.w, cb9[10].xyzx, r6.xyzx
    mad r9.xyz, r0.wwww, r14.xyzx, cb9[11].xyzx
    mad r11.xyz, r11.xyzx, r15.xyzx, r16.xyzx
    mad r8.xyz, r8.xyzx, r9.xyzx, r11.xyzx
    mad r0.xyz, r0.xyzx, r10.xyzx, r13.xyzx
    add r1.xyw, r8.xyxz, r0.xyxz
  else
    dp3 r0.x, r7.xyzx, r7.xyzx
    sqrt r0.x, r0.x
    mul r0.yzw, r2.xxyz, cb9[14].wwww
    add r1.z, r7.w, l(0.400000)
    mul_sat r1.z, r1.z, l(-100.000099)
    mad r2.x, r1.z, l(-2.000000), l(3.000000)
    mul r1.z, r1.z, r1.z
    mul r1.z, r1.z, r2.x
    mov_sat r7.w, -r7.w
    add r2.x, -r7.w, l(1.000000)
    log r2.x, r2.x
    mul r2.x, r2.x, cb9[14].z
    exp r2.x, r2.x
    add r2.y, -cb9[14].x, cb9[14].y
    mad r2.x, r2.x, r2.y, cb9[14].x
    mul r2.xyz, r2.xxxx, r12.xyzx
    mad r0.yzw, r0.yyzw, r1.zzzz, r2.xxyz
    mul r1.z, r0.x, l(100.000000)
    log r2.xyz, cb9[8].xyzx
    mul r7.xyz, r1.zzzz, r2.xyzx
    exp r7.xyz, r7.xyzx
    dp3 r1.z, cb9[0].xyzx, r6.xyzx
    dp4 r7.w, cb9[0].xyzw, r5.xyzw
    dp4 r8.x, cb9[0].xyzw, r4.xyzw
    dp3 r8.y, cb9[0].xyzx, cb9[0].xyzx
    div r8.y, l(100.000000), r8.y
    mul r7.w, -r7.w, r8.y
    max r7.w, r7.w, l(0.000000)
    mul r8.x, r8.y, -r8.x
    max r8.x, r8.x, l(0.000000)
    add r8.x, -r7.w, r8.x
    max r8.x, r8.x, l(0.001000)
    div r8.x, r8.x, r0.x
    add r8.x, r8.x, l(1.000000)
    mad r1.z, r1.z, r1.z, l(1.000000)
    mul r8.yzw, r2.xxyz, r7.wwww
    exp r8.yzw, r8.yyzw
    mul r8.yzw, r1.zzzz, r8.yyzw
    mul r1.z, r0.x, r8.x
    mul r9.xyz, r2.xyzx, r1.zzzz
    exp r9.xyz, r9.xyzx
    add r9.xyz, r9.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    mul r9.xyz, r9.xyzx, cb9[9].xyzx
    div r9.xyz, r9.xyzx, r8.xxxx
    mul r8.xyz, r8.yzwy, r9.xyzx
    mul r8.xyz, r8.xyzx, cb9[13].xyzx
    dp3 r1.z, cb9[10].xyzx, cb9[0].xyzx
    add r9.xyz, -cb9[11].xyzx, cb9[12].xyzx
    mad r10.xyz, r1.zzzz, r9.xyzx, cb9[11].xyzx
    dp3 r1.z, r3.xyzx, v0.xyzx
    mov r3.w, -r1.z
    dp4 r1.z, r3.xyzw, r5.xyzw
    dp4 r3.w, r3.xyzw, r4.xyzw
    dp3 r7.w, r3.xyzx, r3.xyzx
    div r7.w, l(100.000000), r7.w
    mul r1.z, -r1.z, r7.w
    max r1.z, r1.z, l(0.000000)
    mul r3.w, -r3.w, r7.w
    max r3.w, r3.w, l(0.000000)
    add r3.w, -r1.z, r3.w
    max r3.w, r3.w, l(0.001000)
    div r3.w, r3.w, r0.x
    add r3.w, r3.w, l(1.000000)
    mad r2.w, r2.w, r2.w, l(1.000000)
    mul r11.xyz, r2.xyzx, r1.zzzz
    exp r11.xyz, r11.xyzx
    mul r11.xyz, r2.wwww, r11.xyzx
    mul r1.z, r0.x, r3.w
    mul r12.xyz, r2.xyzx, r1.zzzz
    exp r12.xyz, r12.xyzx
    add r12.xyz, r12.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    mul r12.xyz, r12.xyzx, cb9[9].xyzx
    div r12.xyz, r12.xyzx, r3.wwww
    mul r11.xyz, r11.xyzx, r12.xyzx
    mul r11.xyz, r11.xyzx, cb9[13].xyzx
    dp3 r1.z, cb9[10].xyzx, r3.xyzx
    mad r3.xyz, r1.zzzz, r9.xyzx, cb9[11].xyzx
    mul r3.xyz, r3.xyzx, r11.xyzx
    dp3 r1.z, r6.xyzx, r4.xyzx
    mov r6.w, -r1.z
    dp3 r1.z, r6.xyzx, r6.xyzx
    dp4 r2.w, r6.xyzw, r5.xyzw
    dp4 r3.w, r6.xyzw, r4.xyzw
    div r4.x, l(100.000000), r1.z
    mul r2.w, -r2.w, r4.x
    max r2.w, r2.w, l(0.000000)
    mul r3.w, -r3.w, r4.x
    max r3.w, r3.w, l(0.000000)
    add r3.w, -r2.w, r3.w
    max r3.w, r3.w, l(0.001000)
    div r3.w, r3.w, r0.x
    add r3.w, r3.w, l(1.000000)
    mad r1.z, r1.z, r1.z, l(1.000000)
    mul r4.xyz, r2.xyzx, r2.wwww
    exp r4.xyz, r4.xyzx
    mul r4.xyz, r1.zzzz, r4.xyzx
    mul r0.x, r0.x, r3.w
    mul r2.xyz, r2.xyzx, r0.xxxx
    exp r2.xyz, r2.xyzx
    add r2.xyz, r2.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    mul r2.xyz, r2.xyzx, cb9[9].xyzx
    div r2.xyz, r2.xyzx, r3.wwww
    mul r2.xyz, r2.xyzx, r4.xyzx
    mul r2.xyz, r2.xyzx, cb9[13].xyzx
    dp3 r0.x, cb9[10].xyzx, r6.xyzx
    mad r4.xyz, r0.xxxx, r9.xyzx, cb9[11].xyzx
    mad r3.xyz, r8.xyzx, r10.xyzx, r3.xyzx
    mad r2.xyz, r2.xyzx, r4.xyzx, r3.xyzx
    mad r0.xyz, r0.yzwy, r7.xyzx, r13.xyzx
    add r1.xyw, r2.xyxz, r0.xyxz
  endif
endif
mul r0.xyz, r1.xywx, cb9[19].xxxx
add r1.xyz, r1.xywx, cb9[19].xxxx
div r0.xyz, r0.xyzx, r1.xyzx
max o0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mov o0.w, cb9[16].w
ret
// Approximately 0 instruction slots used

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