//Cutscene drink haloing or reflection.
// ---- Created with 3Dmigoto v1.3.16 on Mon May 13 17:26:18 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,
  float4 v2 : TEXCOORD2,
  float3 v3 : TEXCOORD3,
  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,r21,r22,r23,r24,r25,r26,r27;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 stereo = StereoParams.Load(0);

  r0.xyz = cmp(v3.xyz < float3(0,0,0));
  r0.x = (int)r0.y | (int)r0.x;
  r0.x = (int)r0.z | (int)r0.x;
  if (r0.x != 0) discard;
  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);
  r1.xy = -r1.xy;
  r2.x = dot(r1.xy, r1.xy);
  r2.x = sqrt(r2.x);
  r2.x = 1 + -r2.x;
  r2.x = max(0, r2.x);
  r1.z = sqrt(r2.x);
  r2.x = dot(v2.xyz, v2.xyz);
  r2.x = rsqrt(r2.x);
  r2.xyz = v2.xyz * r2.xxx;
  r0.z = r0.z / v0.z;
  r3.xyz = v0.xyz * r0.zzz;
  r4.xyz = v0.xyz;
  r4.w = 1;
  r5.x = dot(cb9[4].xyzw, r4.xyzw);
  r5.y = dot(cb9[5].xyzw, r4.xyzw);
  r5.z = t1.Sample(s1_s, r5.xy).w;
  r5.w = cb9[15].y + cb9[15].y;
  r5.z = r5.z * r5.w + -cb9[15].y;
  r5.z = v0.w + -r5.z;
  r3.w = 1;
  r6.x = dot(cb9[4].xyzw, r3.xyzw);
  r6.y = dot(cb9[5].xyzw, r3.xyzw);
  r6.z = t1.Sample(s1_s, r6.xy).w;
  r5.w = r6.z * r5.w + -cb9[15].y;
  r0.w = -r5.w + r0.w;
  r7.xyz = -r2.xyz;
  r7.w = 1;
  r5.w = dot(r7.xyzw, cb9[1].xyzw);
  r5.xy = cb9[15].ww * r5.xy;
  r5.x = t1.Sample(s1_s, r5.xy).w;
  r5.x = -r5.x * r5.w + r5.z;
  r1.w = 1;
  r1.w = dot(r1.xyzw, cb9[1].xyzw);
  r5.yz = cb9[15].ww * r6.xy;
  r5.y = t1.Sample(s1_s, r5.yz).w;
  r0.w = -r5.y * r1.w + r0.w;
  r1.w = dot(v0.xyz, v0.xyz);
  r1.w = rsqrt(r1.w);
  r6.xyz = v0.xyz * r1.www;
  r5.y = cmp(0 < r5.x);
  r5.z = dot(r2.xyz, r6.xyz);
  r5.w = r0.w + -r5.x;
  r5.x = -r5.x / r5.w;
  r7.xyz = v0.xyz * r0.zzz + -v0.xyz;
  r8.xyz = r7.xyz * r5.xxx;
  r9.xyz = r5.xxx * r7.xyz + v0.xyz;
  r9.w = 1;
  r10.x = dot(cb9[4].xyzw, r9.xyzw);
  r10.y = dot(cb9[5].xyzw, r9.xyzw);
  r5.xw = t1.Sample(s1_s, r10.xy).xy;
  r5.xw = r5.xw * float2(2,2) + float2(-1,-1);
  r10.x = dot(cb9[6].xy, r5.xw);
  r10.y = dot(cb9[6].zw, r5.xw);
  r10.z = dot(cb9[7].xy, r5.xw);
  r11.xyz = v0.xyz + -r9.xyz;
  r12.xyz = v0.xyz * r0.zzz + -r9.xyz;
  r0.z = dot(r11.xyz, r11.xyz);
  r0.z = r0.z * 9000 + 0.100000001;
  r0.z = 1 / r0.z;
  r5.x = dot(r12.xyz, r12.xyz);
  r5.w = r5.x * 9000 + 0.100000001;
  r5.w = 1 / r5.w;
  r11.xyz = r2.xyz * r0.zzz + cb9[0].xyz;
  r11.xyz = r1.xyz * r5.www + r11.xyz;
  r0.z = dot(r11.xyz, r11.xyz);
  r0.z = rsqrt(r0.z);
  r11.xyz = r11.xyz * r0.zzz;
  r0.z = dot(r11.xyz, r10.xyz);
  r0.z = cb9[15].z + -r0.z;
  r10.xyz = r11.xyz * r0.zzz + r10.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);
  r5.w = r0.z + r0.z;
  r11.xyz = r10.xyz * -r5.www + r6.xyz;
  r12.xy = r11.xy * cb9[13].ww + r0.xy;
  r12.xyz = t2.Sample(s2_s, r12.xy).xyz;
  r5.w = dot(r1.xyz, r6.xyz);
  r13.xy = r1.xy * r1.zz;
  r13.xy = cb9[15].xx * r13.xy + r0.xy;
  r13.xyz = t2.Sample(s2_s, r13.xy).xyz;
  r7.w = r5.w + r5.w;
  r14.xyz = r1.xyz * -r7.www + r6.xyz;
  r15.xy = r14.xy * cb9[13].ww + r0.xy;
  r15.xyz = t2.Sample(s2_s, r15.xy).xyz;
  r7.w = r5.z + r5.z;
  r16.xyz = r2.xyz * -r7.www + r6.xyz;
  r17.xy = r16.xy * cb9[13].ww + r0.xy;
  r17.xyz = t2.Sample(s2_s, r17.xy).xyz;
  r18.xy = r10.xy * r10.zz;
  r0.xy = cb9[15].xx * r18.xy + r0.xy;
  r18.xyz = t2.Sample(s2_s, r0.xy).xyz;
  if (r5.y != 0) {
    r0.x = cmp(0 < r0.w);
    if (r0.x != 0) {
      if (-1 != 0) discard;
      r19.xyz = float3(0,0,0);
    } else {
      r0.x = dot(cb9[17].xyz, r11.xyz);
      r0.x = max(0, r0.x);
      r0.x = log2(r0.x);
      r0.x = cb9[17].w * r0.x;
      r0.x = exp2(r0.x);
      r20.xyz = cb9[18].xyz * r0.xxx + r12.xyz;
      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(r5.x);
      r21.xyz = r5.www * r1.xyz;
      r22.xyz = v0.xyz * r1.www + -r21.xyz;
      r21.xyz = cb9[18].www * r22.xyz + r21.xyz;
      r5.x = dot(r21.xyz, r21.xyz);
      r5.x = rsqrt(r5.x);
      r21.xyz = r21.xyz * r5.xxx;
      r5.x = dot(cb9[17].xyz, r21.xyz);
      r5.x = max(0, r5.x);
      r5.x = log2(r5.x);
      r5.x = cb9[17].w * r5.x;
      r5.x = exp2(r5.x);
      r21.xyz = cb9[18].xyz * r5.xxx + r13.xyz;
      r21.xyz = cb9[14].www * r21.xyz;
      r5.x = 0.400000006 + r5.w;
      r5.x = saturate(-100.000099 * r5.x);
      r5.y = r5.x * -2 + 3;
      r5.x = r5.x * r5.x;
      r5.x = r5.y * r5.x;
      r5.y = dot(cb9[17].xyz, r14.xyz);
      r5.y = max(0, r5.y);
      r5.y = log2(r5.y);
      r5.y = cb9[17].w * r5.y;
      r5.y = exp2(r5.y);
      r22.xyz = cb9[18].xyz * r5.yyy + r15.xyz;
      r5.w = saturate(-r5.w);
      r5.y = 1 + -r5.w;
      r5.y = log2(r5.y);
      r5.y = cb9[14].z * r5.y;
      r5.y = exp2(r5.y);
      r7.w = cb9[14].y + -cb9[14].x;
      r5.y = r5.y * r7.w + cb9[14].x;
      r22.xyz = r22.xyz * r5.yyy;
      r21.xyz = r21.xyz * r5.xxx + r22.xyz;
      r5.x = 100 * r0.y;
      r22.xyz = log2(cb9[8].xyz);
      r23.xyz = r22.xyz * r5.xxx;
      r23.xyz = exp2(r23.xyz);
      r21.xyz = r23.xyz * r21.xyz;
      r5.x = dot(cb9[0].xyz, r6.xyz);
      r5.y = dot(cb9[0].xyzw, r4.xyzw);
      r7.w = dot(cb9[0].xyzw, r3.xyzw);
      r8.w = dot(cb9[0].xyz, cb9[0].xyz);
      r8.w = 100 / r8.w;
      r5.y = r8.w * -r5.y;
      r5.y = max(0, r5.y);
      r7.w = r8.w * -r7.w;
      r7.w = max(0, r7.w);
      r7.w = r7.w + -r5.y;
      r7.w = max(0.00100000005, r7.w);
      r7.w = r7.w / r0.y;
      r7.w = 1 + r7.w;
      r5.x = r5.x * r5.x + 1;
      r23.xyz = r5.yyy * r22.xyz;
      r23.xyz = exp2(r23.xyz);
      r23.xyz = r23.xyz * r5.xxx;
      r5.x = r7.w * r0.y;
      r24.xyz = r5.xxx * r22.xyz;
      r24.xyz = exp2(r24.xyz);
      r24.xyz = float3(-1,-1,-1) + r24.xyz;
      r24.xyz = cb9[9].xyz * r24.xyz;
      r24.xyz = r24.xyz / r7.www;
      r23.xyz = r24.xyz * r23.xyz;
      r23.xyz = cb9[13].xyz * r23.xyz;
      r5.x = dot(cb9[10].xyz, cb9[0].xyz);
      r24.xyz = cb9[12].xyz + -cb9[11].xyz;
      r25.xyz = r5.xxx * r24.xyz + cb9[11].xyz;
      r5.x = dot(r2.xyz, v0.xyz);
      r2.w = -r5.x;
      r5.x = dot(r2.xyzw, r4.xyzw);
      r5.y = dot(r2.xyzw, r3.xyzw);
      r7.w = dot(r2.xyz, r2.xyz);
      r7.w = 100 / r7.w;
      r5.xy = r7.ww * -r5.xy;
      r5.xy = max(float2(0,0), r5.xy);
      r5.y = r5.y + -r5.x;
      r5.y = max(0.00100000005, r5.y);
      r5.y = r5.y / r0.y;
      r5.y = 1 + r5.y;
      r7.w = r5.z * r5.z + 1;
      r26.xyz = r5.xxx * r22.xyz;
      r26.xyz = exp2(r26.xyz);
      r26.xyz = r26.xyz * r7.www;
      r5.x = r5.y * r0.y;
      r27.xyz = r5.xxx * r22.xyz;
      r27.xyz = exp2(r27.xyz);
      r27.xyz = float3(-1,-1,-1) + r27.xyz;
      r27.xyz = cb9[9].xyz * r27.xyz;
      r27.xyz = r27.xyz / r5.yyy;
      r26.xyz = r27.xyz * r26.xyz;
      r26.xyz = cb9[13].xyz * r26.xyz;
      r5.x = dot(cb9[10].xyz, r2.xyz);
      r27.xyz = r5.xxx * r24.xyz + cb9[11].xyz;
      r26.xyz = r27.xyz * r26.xyz;
      r5.x = dot(r6.xyz, r3.xyz);
      r6.w = -r5.x;
      r5.x = dot(r6.xyz, r6.xyz);
      r5.y = dot(r6.xyzw, r4.xyzw);
      r7.w = dot(r6.xyzw, r3.xyzw);
      r8.w = 100 / r5.x;
      r5.y = r8.w * -r5.y;
      r5.y = max(0, r5.y);
      r7.w = r8.w * -r7.w;
      r7.w = max(0, r7.w);
      r7.w = r7.w + -r5.y;
      r7.w = max(0.00100000005, r7.w);
      r7.w = r7.w / r0.y;
      r7.w = 1 + r7.w;
      r5.x = r5.x * r5.x + 1;
      r27.xyz = r5.yyy * r22.xyz;
      r27.xyz = exp2(r27.xyz);
      r27.xyz = r27.xyz * r5.xxx;
      r0.y = r7.w * r0.y;
      r22.xyz = r0.yyy * r22.xyz;
      r22.xyz = exp2(r22.xyz);
      r22.xyz = float3(-1,-1,-1) + r22.xyz;
      r22.xyz = cb9[9].xyz * r22.xyz;
      r22.xyz = r22.xyz / r7.www;
      r22.xyz = r27.xyz * r22.xyz;
      r22.xyz = cb9[13].xyz * r22.xyz;
      r0.y = dot(cb9[10].xyz, r6.xyz);
      r24.xyz = r0.yyy * r24.xyz + cb9[11].xyz;
      r23.xyz = r23.xyz * r25.xyz + r26.xyz;
      r22.xyz = r22.xyz * r24.xyz + r23.xyz;
      r20.xyz = r20.xyz * r0.xxx + r21.xyz;
      r19.xyz = r20.xyz + r22.xyz;
    }
  } else {
    r0.x = dot(cb9[17].xyz, r16.xyz);
    r0.x = max(0, r0.x);
    r0.x = log2(r0.x);
    r0.x = cb9[17].w * r0.x;
    r0.x = exp2(r0.x);
    r16.xyz = cb9[18].xyz * r0.xxx + r17.xyz;
    r0.x = saturate(-r5.z);
    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;
    r16.xyz = r16.xyz * r0.xxx;
    r0.x = cmp(0 < r0.w);
    if (r0.x != 0) {
      r0.x = dot(cb9[17].xyz, r11.xyz);
      r0.x = max(0, r0.x);
      r0.x = log2(r0.x);
      r0.x = cb9[17].w * r0.x;
      r0.x = exp2(r0.x);
      r0.xyw = cb9[18].xyz * r0.xxx + r12.xyz;
      r5.x = saturate(r0.z);
      r5.x = 1 + -r5.x;
      r0.xyw = r5.xxx * r0.xyw;
      r10.xyz = r10.xyz * r0.zzz;
      r11.xyz = v0.xyz * r1.www + -r10.xyz;
      r10.xyz = cb9[18].www * r11.xyz + r10.xyz;
      r5.x = dot(r10.xyz, r10.xyz);
      r5.x = rsqrt(r5.x);
      r10.xyz = r10.xyz * r5.xxx;
      r5.x = dot(cb9[17].xyz, r10.xyz);
      r5.x = max(0, r5.x);
      r5.x = log2(r5.x);
      r5.x = cb9[17].w * r5.x;
      r5.x = exp2(r5.x);
      r10.xyz = cb9[18].xyz * r5.xxx + r18.xyz;
      r0.z = -0.400000006 + r0.z;
      r0.z = saturate(100.000099 * r0.z);
      r5.x = r0.z * -2 + 3;
      r0.z = r0.z * r0.z;
      r0.z = r5.x * r0.z;
      r0.xyz = r10.xyz * r0.zzz + r0.xyw;
      r0.w = dot(r8.xyz, r8.xyz);
      r0.w = sqrt(r0.w);
      r5.x = 100 * r0.w;
      r8.xyz = log2(cb9[8].xyz);
      r10.xyz = r8.xyz * r5.xxx;
      r10.xyz = exp2(r10.xyz);
      r5.x = dot(cb9[0].xyz, r6.xyz);
      r5.y = dot(cb9[0].xyzw, r4.xyzw);
      r7.w = dot(cb9[0].xyzw, r9.xyzw);
      r8.w = dot(cb9[0].xyz, cb9[0].xyz);
      r8.w = 100 / r8.w;
      r5.y = r8.w * -r5.y;
      r5.y = max(0, r5.y);
      r7.w = r8.w * -r7.w;
      r7.w = max(0, r7.w);
      r7.w = r7.w + -r5.y;
      r7.w = max(0.00100000005, r7.w);
      r7.w = r7.w / r0.w;
      r7.w = 1 + r7.w;
      r5.x = r5.x * r5.x + 1;
      r11.xyz = r5.yyy * r8.xyz;
      r11.xyz = exp2(r11.xyz);
      r11.xyz = r11.xyz * r5.xxx;
      r5.x = r7.w * r0.w;
      r12.xyz = r5.xxx * r8.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 / r7.www;
      r11.xyz = r12.xyz * r11.xyz;
      r11.xyz = cb9[13].xyz * r11.xyz;
      r5.x = dot(cb9[10].xyz, cb9[0].xyz);
      r12.xyz = cb9[12].xyz + -cb9[11].xyz;
      r17.xyz = r5.xxx * r12.xyz + cb9[11].xyz;
      r5.x = dot(r2.xyz, v0.xyz);
      r2.w = -r5.x;
      r5.x = dot(r2.xyzw, r4.xyzw);
      r5.y = dot(r2.xyzw, r9.xyzw);
      r7.w = dot(r2.xyz, r2.xyz);
      r7.w = 100 / r7.w;
      r5.xy = r7.ww * -r5.xy;
      r5.xy = max(float2(0,0), r5.xy);
      r5.y = r5.y + -r5.x;
      r5.y = max(0.00100000005, r5.y);
      r5.y = r5.y / r0.w;
      r5.y = 1 + r5.y;
      r7.w = r5.z * r5.z + 1;
      r18.xyz = r5.xxx * r8.xyz;
      r18.xyz = exp2(r18.xyz);
      r18.xyz = r18.xyz * r7.www;
      r5.x = r5.y * r0.w;
      r20.xyz = r5.xxx * r8.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 / r5.yyy;
      r18.xyz = r20.xyz * r18.xyz;
      r18.xyz = cb9[13].xyz * r18.xyz;
      r5.x = dot(cb9[10].xyz, r2.xyz);
      r20.xyz = r5.xxx * r12.xyz + cb9[11].xyz;
      r18.xyz = r20.xyz * r18.xyz;
      r5.x = dot(r6.xyz, r9.xyz);
      r6.w = -r5.x;
      r5.x = dot(r6.xyz, r6.xyz);
      r5.y = dot(r6.xyzw, r4.xyzw);
      r7.w = dot(r6.xyzw, r9.xyzw);
      r8.w = 100 / r5.x;
      r5.y = r8.w * -r5.y;
      r5.y = max(0, r5.y);
      r7.w = r8.w * -r7.w;
      r7.w = max(0, r7.w);
      r7.w = r7.w + -r5.y;
      r7.w = max(0.00100000005, r7.w);
      r7.w = r7.w / r0.w;
      r7.w = 1 + r7.w;
      r5.x = r5.x * r5.x + 1;
      r9.xyz = r5.yyy * r8.xyz;
      r9.xyz = exp2(r9.xyz);
      r9.xyz = r9.xyz * r5.xxx;
      r0.w = r7.w * 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 / r7.www;
      r8.xyz = r9.xyz * r8.xyz;
      r8.xyz = cb9[13].xyz * r8.xyz;
      r0.w = dot(cb9[10].xyz, r6.xyz);
      r9.xyz = r0.www * r12.xyz + cb9[11].xyz;
      r11.xyz = r11.xyz * r17.xyz + r18.xyz;
      r8.xyz = r8.xyz * r9.xyz + r11.xyz;
      r0.xyz = r0.xyz * r10.xyz + r16.xyz;
      r19.xyz = r0.xyz + r8.xyz;
    } else {
      r0.x = dot(r7.xyz, r7.xyz);
      r0.x = sqrt(r0.x);
      r0.yzw = r5.www * r1.xyz;
      r1.xyz = v0.xyz * r1.www + -r0.yzw;
      r0.yzw = cb9[18].www * r1.xyz + r0.yzw;
      r1.x = dot(r0.yzw, r0.yzw);
      r1.x = rsqrt(r1.x);
      r0.yzw = r1.xxx * r0.yzw;
      r0.y = dot(cb9[17].xyz, r0.yzw);
      r0.y = max(0, r0.y);
      r0.y = log2(r0.y);
      r0.y = cb9[17].w * r0.y;
      r0.y = exp2(r0.y);
      r0.yzw = cb9[18].xyz * r0.yyy + r13.xyz;
      r0.yzw = cb9[14].www * r0.yzw;
      r1.x = 0.400000006 + r5.w;
      r1.x = saturate(-100.000099 * r1.x);
      r1.y = r1.x * -2 + 3;
      r1.x = r1.x * r1.x;
      r1.x = r1.y * r1.x;
      r1.y = dot(cb9[17].xyz, r14.xyz);
      r1.y = max(0, r1.y);
      r1.y = log2(r1.y);
      r1.y = cb9[17].w * r1.y;
      r1.y = exp2(r1.y);
      r1.yzw = cb9[18].xyz * r1.yyy + r15.xyz;
      r5.w = saturate(-r5.w);
      r5.x = 1 + -r5.w;
      r5.x = log2(r5.x);
      r5.x = cb9[14].z * r5.x;
      r5.x = exp2(r5.x);
      r5.y = cb9[14].y + -cb9[14].x;
      r5.x = r5.x * r5.y + cb9[14].x;
      r1.yzw = r5.xxx * r1.yzw;
      r0.yzw = r0.yzw * r1.xxx + r1.yzw;
      r1.x = 100 * r0.x;
      r1.yzw = log2(cb9[8].xyz);
      r5.xyw = r1.xxx * r1.yzw;
      r5.xyw = exp2(r5.xyw);
      r1.x = dot(cb9[0].xyz, r6.xyz);
      r7.x = dot(cb9[0].xyzw, r4.xyzw);
      r7.y = dot(cb9[0].xyzw, r3.xyzw);
      r7.z = dot(cb9[0].xyz, cb9[0].xyz);
      r7.z = 100 / r7.z;
      r7.xy = -r7.xy * r7.zz;
      r7.xy = max(float2(0,0), r7.xy);
      r7.y = r7.y + -r7.x;
      r7.y = max(0.00100000005, r7.y);
      r7.y = r7.y / r0.x;
      r7.y = 1 + r7.y;
      r1.x = r1.x * r1.x + 1;
      r7.xzw = r7.xxx * r1.yzw;
      r7.xzw = exp2(r7.xzw);
      r7.xzw = r7.xzw * r1.xxx;
      r1.x = r7.y * r0.x;
      r8.xyz = r1.xxx * r1.yzw;
      r8.xyz = exp2(r8.xyz);
      r8.xyz = float3(-1,-1,-1) + r8.xyz;
      r8.xyz = cb9[9].xyz * r8.xyz;
      r8.xyz = r8.xyz / r7.yyy;
      r7.xyz = r8.xyz * r7.xzw;
      r7.xyz = cb9[13].xyz * r7.xyz;
      r1.x = dot(cb9[10].xyz, cb9[0].xyz);
      r8.xyz = cb9[12].xyz + -cb9[11].xyz;
      r9.xyz = r1.xxx * r8.xyz + cb9[11].xyz;
      r1.x = dot(r2.xyz, v0.xyz);
      r2.w = -r1.x;
      r1.x = dot(r2.xyzw, r4.xyzw);
      r2.w = dot(r2.xyzw, r3.xyzw);
      r7.w = dot(r2.xyz, r2.xyz);
      r7.w = 100 / r7.w;
      r1.x = r7.w * -r1.x;
      r1.x = max(0, r1.x);
      r2.w = r7.w * -r2.w;
      r2.w = max(0, r2.w);
      r2.w = r2.w + -r1.x;
      r2.w = max(0.00100000005, r2.w);
      r2.w = r2.w / r0.x;
      r2.w = 1 + r2.w;
      r5.z = r5.z * r5.z + 1;
      r10.xyz = r1.xxx * r1.yzw;
      r10.xyz = exp2(r10.xyz);
      r10.xyz = r10.xyz * r5.zzz;
      r1.x = r2.w * r0.x;
      r11.xyz = r1.xxx * r1.yzw;
      r11.xyz = exp2(r11.xyz);
      r11.xyz = float3(-1,-1,-1) + r11.xyz;
      r11.xyz = cb9[9].xyz * r11.xyz;
      r11.xyz = r11.xyz / r2.www;
      r10.xyz = r11.xyz * r10.xyz;
      r10.xyz = cb9[13].xyz * r10.xyz;
      r1.x = dot(cb9[10].xyz, r2.xyz);
      r2.xyz = r1.xxx * r8.xyz + cb9[11].xyz;
      r2.xyz = r10.xyz * r2.xyz;
      r1.x = dot(r6.xyz, r3.xyz);
      r6.w = -r1.x;
      r1.x = dot(r6.xyz, r6.xyz);
      r2.w = dot(r6.xyzw, r4.xyzw);
      r3.x = dot(r6.xyzw, r3.xyzw);
      r3.y = 100 / r1.x;
      r2.w = r3.y * -r2.w;
      r2.w = max(0, r2.w);
      r3.x = -r3.x * r3.y;
      r3.x = max(0, r3.x);
      r3.x = r3.x + -r2.w;
      r3.x = max(0.00100000005, r3.x);
      r3.x = r3.x / r0.x;
      r3.x = 1 + r3.x;
      r1.x = r1.x * r1.x + 1;
      r3.yzw = r2.www * r1.yzw;
      r3.yzw = exp2(r3.yzw);
      r3.yzw = r3.yzw * r1.xxx;
      r0.x = r3.x * r0.x;
      r1.xyz = r0.xxx * r1.yzw;
      r1.xyz = exp2(r1.xyz);
      r1.xyz = float3(-1,-1,-1) + r1.xyz;
      r1.xyz = cb9[9].xyz * r1.xyz;
      r1.xyz = r1.xyz / r3.xxx;
      r1.xyz = r3.yzw * r1.xyz;
      r1.xyz = cb9[13].xyz * r1.xyz;
      r0.x = dot(cb9[10].xyz, r6.xyz);
      r3.xyz = r0.xxx * r8.xyz + cb9[11].xyz;
      r2.xyz = r7.xyz * r9.xyz + r2.xyz;
      r1.xyz = r1.xyz * r3.xyz + r2.xyz;
      r0.xyz = r0.yzw * r5.xyw + r16.xyz;
      r19.xyz = r0.xyz + r1.xyz;
    }
  }
  r0.xyz = cb9[19].xxx * r19.xyz;
  r1.xyz = cb9[19].xxx + r19.xyz;
  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 Mon May 13 17:26:18 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
// TEXCOORD                 3   xyz         3     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_input_ps linear v3.xyz
dcl_output o0.xyzw
dcl_temps 28
lt r0.xyz, v3.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
or r0.x, r0.y, r0.x
or r0.x, r0.z, r0.x
discard_nz r0.x
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 r1.xy, -r1.xyxx
dp2 r2.x, r1.xyxx, r1.xyxx
sqrt r2.x, r2.x
add r2.x, -r2.x, l(1.000000)
max r2.x, r2.x, l(0.000000)
sqrt r1.z, r2.x
dp3 r2.x, v2.xyzx, v2.xyzx
rsq r2.x, r2.x
mul r2.xyz, r2.xxxx, v2.xyzx
div r0.z, r0.z, v0.z
mul r3.xyz, r0.zzzz, v0.xyzx
mov r4.xyz, v0.xyzx
mov r4.w, l(1.000000)
dp4 r5.x, cb9[4].xyzw, r4.xyzw
dp4 r5.y, cb9[5].xyzw, r4.xyzw
sample_indexable(texture2d)(float,float,float,float) r5.z, r5.xyxx, t1.xywz, s1
add r5.w, cb9[15].y, cb9[15].y
mad r5.z, r5.z, r5.w, -cb9[15].y
add r5.z, -r5.z, v0.w
mov r3.w, l(1.000000)
dp4 r6.x, cb9[4].xyzw, r3.xyzw
dp4 r6.y, cb9[5].xyzw, r3.xyzw
sample_indexable(texture2d)(float,float,float,float) r6.z, r6.xyxx, t1.xywz, s1
mad r5.w, r6.z, r5.w, -cb9[15].y
add r0.w, r0.w, -r5.w
mov r7.xyz, -r2.xyzx
mov r7.w, l(1.000000)
dp4 r5.w, r7.xyzw, cb9[1].xyzw
mul r5.xy, r5.xyxx, cb9[15].wwww
sample_indexable(texture2d)(float,float,float,float) r5.x, r5.xyxx, t1.wxyz, s1
mad r5.x, -r5.x, r5.w, r5.z
mov r1.w, l(1.000000)
dp4 r1.w, r1.xyzw, cb9[1].xyzw
mul r5.yz, r6.xxyx, cb9[15].wwww
sample_indexable(texture2d)(float,float,float,float) r5.y, r5.yzyy, t1.xwyz, s1
mad r0.w, -r5.y, r1.w, r0.w
dp3 r1.w, v0.xyzx, v0.xyzx
rsq r1.w, r1.w
mul r6.xyz, r1.wwww, v0.xyzx
lt r5.y, l(0.000000), r5.x
dp3 r5.z, r2.xyzx, r6.xyzx
add r5.w, -r5.x, r0.w
div r5.x, -r5.x, r5.w
mad r7.xyz, v0.xyzx, r0.zzzz, -v0.xyzx
mul r8.xyz, r5.xxxx, r7.xyzx
mad r9.xyz, r5.xxxx, 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) r5.xw, r10.xyxx, t1.xzwy, s1
mad r5.xw, r5.xxxw, l(2.000000, 0.000000, 0.000000, 2.000000), l(-1.000000, 0.000000, 0.000000, -1.000000)
dp2 r10.x, cb9[6].xyxx, r5.xwxx
dp2 r10.y, cb9[6].zwzz, r5.xwxx
dp2 r10.z, cb9[7].xyxx, r5.xwxx
add r11.xyz, -r9.xyzx, v0.xyzx
mad r12.xyz, v0.xyzx, r0.zzzz, -r9.xyzx
dp3 r0.z, r11.xyzx, r11.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 r5.x, r12.xyzx, r12.xyzx
mad r5.w, r5.x, l(9000.000000), l(0.100000)
div r5.w, l(1.000000, 1.000000, 1.000000, 1.000000), r5.w
mad r11.xyz, r2.xyzx, r0.zzzz, cb9[0].xyzx
mad r11.xyz, r1.xyzx, r5.wwww, r11.xyzx
dp3 r0.z, r11.xyzx, r11.xyzx
rsq r0.z, r0.z
mul r11.xyz, r0.zzzz, r11.xyzx
dp3 r0.z, r11.xyzx, r10.xyzx
add r0.z, -r0.z, cb9[15].z
mad r10.xyz, r11.xyzx, r0.zzzz, r10.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 r5.w, r0.z, r0.z
mad r11.xyz, r10.xyzx, -r5.wwww, r6.xyzx
mad r12.xy, r11.xyxx, cb9[13].wwww, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r12.xyz, r12.xyxx, t2.xyzw, s2
dp3 r5.w, r1.xyzx, r6.xyzx
mul r13.xy, r1.zzzz, r1.xyxx
mad r13.xy, cb9[15].xxxx, r13.xyxx, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r13.xyz, r13.xyxx, t2.xyzw, s2
add r7.w, r5.w, r5.w
mad r14.xyz, r1.xyzx, -r7.wwww, r6.xyzx
mad r15.xy, r14.xyxx, cb9[13].wwww, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r15.xyz, r15.xyxx, t2.xyzw, s2
add r7.w, r5.z, r5.z
mad r16.xyz, r2.xyzx, -r7.wwww, r6.xyzx
mad r17.xy, r16.xyxx, cb9[13].wwww, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r17.xyz, r17.xyxx, t2.xyzw, s2
mul r18.xy, r10.zzzz, r10.xyxx
mad r0.xy, cb9[15].xxxx, r18.xyxx, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r18.xyz, r0.xyxx, t2.xyzw, s2
if_nz r5.y
  lt r0.x, l(0.000000), r0.w
  if_nz r0.x
    discard_nz l(-1)
    mov r19.xyz, l(0,0,0,0)
  else
    dp3 r0.x, cb9[17].xyzx, r11.xyzx
    max r0.x, r0.x, l(0.000000)
    log r0.x, r0.x
    mul r0.x, r0.x, cb9[17].w
    exp r0.x, r0.x
    mad r20.xyz, cb9[18].xyzx, r0.xxxx, r12.xyzx
    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, r5.x
    mul r21.xyz, r1.xyzx, r5.wwww
    mad r22.xyz, v0.xyzx, r1.wwww, -r21.xyzx
    mad r21.xyz, cb9[18].wwww, r22.xyzx, r21.xyzx
    dp3 r5.x, r21.xyzx, r21.xyzx
    rsq r5.x, r5.x
    mul r21.xyz, r5.xxxx, r21.xyzx
    dp3 r5.x, cb9[17].xyzx, r21.xyzx
    max r5.x, r5.x, l(0.000000)
    log r5.x, r5.x
    mul r5.x, r5.x, cb9[17].w
    exp r5.x, r5.x
    mad r21.xyz, cb9[18].xyzx, r5.xxxx, r13.xyzx
    mul r21.xyz, r21.xyzx, cb9[14].wwww
    add r5.x, r5.w, l(0.400000)
    mul_sat r5.x, r5.x, l(-100.000099)
    mad r5.y, r5.x, l(-2.000000), l(3.000000)
    mul r5.x, r5.x, r5.x
    mul r5.x, r5.x, r5.y
    dp3 r5.y, cb9[17].xyzx, r14.xyzx
    max r5.y, r5.y, l(0.000000)
    log r5.y, r5.y
    mul r5.y, r5.y, cb9[17].w
    exp r5.y, r5.y
    mad r22.xyz, cb9[18].xyzx, r5.yyyy, r15.xyzx
    mov_sat r5.w, -r5.w
    add r5.y, -r5.w, l(1.000000)
    log r5.y, r5.y
    mul r5.y, r5.y, cb9[14].z
    exp r5.y, r5.y
    add r7.w, -cb9[14].x, cb9[14].y
    mad r5.y, r5.y, r7.w, cb9[14].x
    mul r22.xyz, r5.yyyy, r22.xyzx
    mad r21.xyz, r21.xyzx, r5.xxxx, r22.xyzx
    mul r5.x, r0.y, l(100.000000)
    log r22.xyz, cb9[8].xyzx
    mul r23.xyz, r5.xxxx, r22.xyzx
    exp r23.xyz, r23.xyzx
    mul r21.xyz, r21.xyzx, r23.xyzx
    dp3 r5.x, cb9[0].xyzx, r6.xyzx
    dp4 r5.y, cb9[0].xyzw, r4.xyzw
    dp4 r7.w, cb9[0].xyzw, r3.xyzw
    dp3 r8.w, cb9[0].xyzx, cb9[0].xyzx
    div r8.w, l(100.000000), r8.w
    mul r5.y, -r5.y, r8.w
    max r5.y, r5.y, l(0.000000)
    mul r7.w, -r7.w, r8.w
    max r7.w, r7.w, l(0.000000)
    add r7.w, -r5.y, r7.w
    max r7.w, r7.w, l(0.001000)
    div r7.w, r7.w, r0.y
    add r7.w, r7.w, l(1.000000)
    mad r5.x, r5.x, r5.x, l(1.000000)
    mul r23.xyz, r22.xyzx, r5.yyyy
    exp r23.xyz, r23.xyzx
    mul r23.xyz, r5.xxxx, r23.xyzx
    mul r5.x, r0.y, r7.w
    mul r24.xyz, r22.xyzx, r5.xxxx
    exp r24.xyz, r24.xyzx
    add r24.xyz, r24.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    mul r24.xyz, r24.xyzx, cb9[9].xyzx
    div r24.xyz, r24.xyzx, r7.wwww
    mul r23.xyz, r23.xyzx, r24.xyzx
    mul r23.xyz, r23.xyzx, cb9[13].xyzx
    dp3 r5.x, cb9[10].xyzx, cb9[0].xyzx
    add r24.xyz, -cb9[11].xyzx, cb9[12].xyzx
    mad r25.xyz, r5.xxxx, r24.xyzx, cb9[11].xyzx
    dp3 r5.x, r2.xyzx, v0.xyzx
    mov r2.w, -r5.x
    dp4 r5.x, r2.xyzw, r4.xyzw
    dp4 r5.y, r2.xyzw, r3.xyzw
    dp3 r7.w, r2.xyzx, r2.xyzx
    div r7.w, l(100.000000), r7.w
    mul r5.xy, -r5.xyxx, r7.wwww
    max r5.xy, r5.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
    add r5.y, -r5.x, r5.y
    max r5.y, r5.y, l(0.001000)
    div r5.y, r5.y, r0.y
    add r5.y, r5.y, l(1.000000)
    mad r7.w, r5.z, r5.z, l(1.000000)
    mul r26.xyz, r22.xyzx, r5.xxxx
    exp r26.xyz, r26.xyzx
    mul r26.xyz, r7.wwww, r26.xyzx
    mul r5.x, r0.y, r5.y
    mul r27.xyz, r22.xyzx, r5.xxxx
    exp r27.xyz, r27.xyzx
    add r27.xyz, r27.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    mul r27.xyz, r27.xyzx, cb9[9].xyzx
    div r27.xyz, r27.xyzx, r5.yyyy
    mul r26.xyz, r26.xyzx, r27.xyzx
    mul r26.xyz, r26.xyzx, cb9[13].xyzx
    dp3 r5.x, cb9[10].xyzx, r2.xyzx
    mad r27.xyz, r5.xxxx, r24.xyzx, cb9[11].xyzx
    mul r26.xyz, r26.xyzx, r27.xyzx
    dp3 r5.x, r6.xyzx, r3.xyzx
    mov r6.w, -r5.x
    dp3 r5.x, r6.xyzx, r6.xyzx
    dp4 r5.y, r6.xyzw, r4.xyzw
    dp4 r7.w, r6.xyzw, r3.xyzw
    div r8.w, l(100.000000), r5.x
    mul r5.y, -r5.y, r8.w
    max r5.y, r5.y, l(0.000000)
    mul r7.w, -r7.w, r8.w
    max r7.w, r7.w, l(0.000000)
    add r7.w, -r5.y, r7.w
    max r7.w, r7.w, l(0.001000)
    div r7.w, r7.w, r0.y
    add r7.w, r7.w, l(1.000000)
    mad r5.x, r5.x, r5.x, l(1.000000)
    mul r27.xyz, r22.xyzx, r5.yyyy
    exp r27.xyz, r27.xyzx
    mul r27.xyz, r5.xxxx, r27.xyzx
    mul r0.y, r0.y, r7.w
    mul r22.xyz, r22.xyzx, r0.yyyy
    exp r22.xyz, r22.xyzx
    add r22.xyz, r22.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    mul r22.xyz, r22.xyzx, cb9[9].xyzx
    div r22.xyz, r22.xyzx, r7.wwww
    mul r22.xyz, r22.xyzx, r27.xyzx
    mul r22.xyz, r22.xyzx, cb9[13].xyzx
    dp3 r0.y, cb9[10].xyzx, r6.xyzx
    mad r24.xyz, r0.yyyy, r24.xyzx, cb9[11].xyzx
    mad r23.xyz, r23.xyzx, r25.xyzx, r26.xyzx
    mad r22.xyz, r22.xyzx, r24.xyzx, r23.xyzx
    mad r20.xyz, r20.xyzx, r0.xxxx, r21.xyzx
    add r19.xyz, r22.xyzx, r20.xyzx
  endif
else
  dp3 r0.x, cb9[17].xyzx, r16.xyzx
  max r0.x, r0.x, l(0.000000)
  log r0.x, r0.x
  mul r0.x, r0.x, cb9[17].w
  exp r0.x, r0.x
  mad r16.xyz, cb9[18].xyzx, r0.xxxx, r17.xyzx
  mov_sat r0.x, -r5.z
  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 r16.xyz, r0.xxxx, r16.xyzx
  lt r0.x, l(0.000000), r0.w
  if_nz r0.x
    dp3 r0.x, cb9[17].xyzx, r11.xyzx
    max r0.x, r0.x, l(0.000000)
    log r0.x, r0.x
    mul r0.x, r0.x, cb9[17].w
    exp r0.x, r0.x
    mad r0.xyw, cb9[18].xyxz, r0.xxxx, r12.xyxz
    mov_sat r5.x, r0.z
    add r5.x, -r5.x, l(1.000000)
    mul r0.xyw, r0.xyxw, r5.xxxx
    mul r10.xyz, r0.zzzz, r10.xyzx
    mad r11.xyz, v0.xyzx, r1.wwww, -r10.xyzx
    mad r10.xyz, cb9[18].wwww, r11.xyzx, r10.xyzx
    dp3 r5.x, r10.xyzx, r10.xyzx
    rsq r5.x, r5.x
    mul r10.xyz, r5.xxxx, r10.xyzx
    dp3 r5.x, cb9[17].xyzx, r10.xyzx
    max r5.x, r5.x, l(0.000000)
    log r5.x, r5.x
    mul r5.x, r5.x, cb9[17].w
    exp r5.x, r5.x
    mad r10.xyz, cb9[18].xyzx, r5.xxxx, r18.xyzx
    add r0.z, r0.z, l(-0.400000)
    mul_sat r0.z, r0.z, l(100.000099)
    mad r5.x, r0.z, l(-2.000000), l(3.000000)
    mul r0.z, r0.z, r0.z
    mul r0.z, r0.z, r5.x
    mad r0.xyz, r10.xyzx, r0.zzzz, r0.xywx
    dp3 r0.w, r8.xyzx, r8.xyzx
    sqrt r0.w, r0.w
    mul r5.x, r0.w, l(100.000000)
    log r8.xyz, cb9[8].xyzx
    mul r10.xyz, r5.xxxx, r8.xyzx
    exp r10.xyz, r10.xyzx
    dp3 r5.x, cb9[0].xyzx, r6.xyzx
    dp4 r5.y, cb9[0].xyzw, r4.xyzw
    dp4 r7.w, cb9[0].xyzw, r9.xyzw
    dp3 r8.w, cb9[0].xyzx, cb9[0].xyzx
    div r8.w, l(100.000000), r8.w
    mul r5.y, -r5.y, r8.w
    max r5.y, r5.y, l(0.000000)
    mul r7.w, -r7.w, r8.w
    max r7.w, r7.w, l(0.000000)
    add r7.w, -r5.y, r7.w
    max r7.w, r7.w, l(0.001000)
    div r7.w, r7.w, r0.w
    add r7.w, r7.w, l(1.000000)
    mad r5.x, r5.x, r5.x, l(1.000000)
    mul r11.xyz, r8.xyzx, r5.yyyy
    exp r11.xyz, r11.xyzx
    mul r11.xyz, r5.xxxx, r11.xyzx
    mul r5.x, r0.w, r7.w
    mul r12.xyz, r8.xyzx, r5.xxxx
    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, r7.wwww
    mul r11.xyz, r11.xyzx, r12.xyzx
    mul r11.xyz, r11.xyzx, cb9[13].xyzx
    dp3 r5.x, cb9[10].xyzx, cb9[0].xyzx
    add r12.xyz, -cb9[11].xyzx, cb9[12].xyzx
    mad r17.xyz, r5.xxxx, r12.xyzx, cb9[11].xyzx
    dp3 r5.x, r2.xyzx, v0.xyzx
    mov r2.w, -r5.x
    dp4 r5.x, r2.xyzw, r4.xyzw
    dp4 r5.y, r2.xyzw, r9.xyzw
    dp3 r7.w, r2.xyzx, r2.xyzx
    div r7.w, l(100.000000), r7.w
    mul r5.xy, -r5.xyxx, r7.wwww
    max r5.xy, r5.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
    add r5.y, -r5.x, r5.y
    max r5.y, r5.y, l(0.001000)
    div r5.y, r5.y, r0.w
    add r5.y, r5.y, l(1.000000)
    mad r7.w, r5.z, r5.z, l(1.000000)
    mul r18.xyz, r8.xyzx, r5.xxxx
    exp r18.xyz, r18.xyzx
    mul r18.xyz, r7.wwww, r18.xyzx
    mul r5.x, r0.w, r5.y
    mul r20.xyz, r8.xyzx, r5.xxxx
    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, r5.yyyy
    mul r18.xyz, r18.xyzx, r20.xyzx
    mul r18.xyz, r18.xyzx, cb9[13].xyzx
    dp3 r5.x, cb9[10].xyzx, r2.xyzx
    mad r20.xyz, r5.xxxx, r12.xyzx, cb9[11].xyzx
    mul r18.xyz, r18.xyzx, r20.xyzx
    dp3 r5.x, r6.xyzx, r9.xyzx
    mov r6.w, -r5.x
    dp3 r5.x, r6.xyzx, r6.xyzx
    dp4 r5.y, r6.xyzw, r4.xyzw
    dp4 r7.w, r6.xyzw, r9.xyzw
    div r8.w, l(100.000000), r5.x
    mul r5.y, -r5.y, r8.w
    max r5.y, r5.y, l(0.000000)
    mul r7.w, -r7.w, r8.w
    max r7.w, r7.w, l(0.000000)
    add r7.w, -r5.y, r7.w
    max r7.w, r7.w, l(0.001000)
    div r7.w, r7.w, r0.w
    add r7.w, r7.w, l(1.000000)
    mad r5.x, r5.x, r5.x, l(1.000000)
    mul r9.xyz, r8.xyzx, r5.yyyy
    exp r9.xyz, r9.xyzx
    mul r9.xyz, r5.xxxx, r9.xyzx
    mul r0.w, r0.w, r7.w
    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, r7.wwww
    mul r8.xyz, r8.xyzx, r9.xyzx
    mul r8.xyz, r8.xyzx, cb9[13].xyzx
    dp3 r0.w, cb9[10].xyzx, r6.xyzx
    mad r9.xyz, r0.wwww, r12.xyzx, cb9[11].xyzx
    mad r11.xyz, r11.xyzx, r17.xyzx, r18.xyzx
    mad r8.xyz, r8.xyzx, r9.xyzx, r11.xyzx
    mad r0.xyz, r0.xyzx, r10.xyzx, r16.xyzx
    add r19.xyz, r8.xyzx, r0.xyzx
  else
    dp3 r0.x, r7.xyzx, r7.xyzx
    sqrt r0.x, r0.x
    mul r0.yzw, r1.xxyz, r5.wwww
    mad r1.xyz, v0.xyzx, r1.wwww, -r0.yzwy
    mad r0.yzw, cb9[18].wwww, r1.xxyz, r0.yyzw
    dp3 r1.x, r0.yzwy, r0.yzwy
    rsq r1.x, r1.x
    mul r0.yzw, r0.yyzw, r1.xxxx
    dp3 r0.y, cb9[17].xyzx, r0.yzwy
    max r0.y, r0.y, l(0.000000)
    log r0.y, r0.y
    mul r0.y, r0.y, cb9[17].w
    exp r0.y, r0.y
    mad r0.yzw, cb9[18].xxyz, r0.yyyy, r13.xxyz
    mul r0.yzw, r0.yyzw, cb9[14].wwww
    add r1.x, r5.w, l(0.400000)
    mul_sat r1.x, r1.x, l(-100.000099)
    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
    dp3 r1.y, cb9[17].xyzx, r14.xyzx
    max r1.y, r1.y, l(0.000000)
    log r1.y, r1.y
    mul r1.y, r1.y, cb9[17].w
    exp r1.y, r1.y
    mad r1.yzw, cb9[18].xxyz, r1.yyyy, r15.xxyz
    mov_sat r5.w, -r5.w
    add r5.x, -r5.w, l(1.000000)
    log r5.x, r5.x
    mul r5.x, r5.x, cb9[14].z
    exp r5.x, r5.x
    add r5.y, -cb9[14].x, cb9[14].y
    mad r5.x, r5.x, r5.y, cb9[14].x
    mul r1.yzw, r1.yyzw, r5.xxxx
    mad r0.yzw, r0.yyzw, r1.xxxx, r1.yyzw
    mul r1.x, r0.x, l(100.000000)
    log r1.yzw, cb9[8].xxyz
    mul r5.xyw, r1.yzyw, r1.xxxx
    exp r5.xyw, r5.xyxw
    dp3 r1.x, cb9[0].xyzx, r6.xyzx
    dp4 r7.x, cb9[0].xyzw, r4.xyzw
    dp4 r7.y, cb9[0].xyzw, r3.xyzw
    dp3 r7.z, cb9[0].xyzx, cb9[0].xyzx
    div r7.z, l(100.000000), r7.z
    mul r7.xy, r7.zzzz, -r7.xyxx
    max r7.xy, r7.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
    add r7.y, -r7.x, r7.y
    max r7.y, r7.y, l(0.001000)
    div r7.y, r7.y, r0.x
    add r7.y, r7.y, l(1.000000)
    mad r1.x, r1.x, r1.x, l(1.000000)
    mul r7.xzw, r1.yyzw, r7.xxxx
    exp r7.xzw, r7.xxzw
    mul r7.xzw, r1.xxxx, r7.xxzw
    mul r1.x, r0.x, r7.y
    mul r8.xyz, r1.yzwy, r1.xxxx
    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, r7.yyyy
    mul r7.xyz, r7.xzwx, r8.xyzx
    mul r7.xyz, r7.xyzx, cb9[13].xyzx
    dp3 r1.x, cb9[10].xyzx, cb9[0].xyzx
    add r8.xyz, -cb9[11].xyzx, cb9[12].xyzx
    mad r9.xyz, r1.xxxx, r8.xyzx, cb9[11].xyzx
    dp3 r1.x, r2.xyzx, v0.xyzx
    mov r2.w, -r1.x
    dp4 r1.x, r2.xyzw, r4.xyzw
    dp4 r2.w, r2.xyzw, r3.xyzw
    dp3 r7.w, r2.xyzx, r2.xyzx
    div r7.w, l(100.000000), r7.w
    mul r1.x, -r1.x, r7.w
    max r1.x, r1.x, l(0.000000)
    mul r2.w, -r2.w, r7.w
    max r2.w, r2.w, l(0.000000)
    add r2.w, -r1.x, r2.w
    max r2.w, r2.w, l(0.001000)
    div r2.w, r2.w, r0.x
    add r2.w, r2.w, l(1.000000)
    mad r5.z, r5.z, r5.z, l(1.000000)
    mul r10.xyz, r1.yzwy, r1.xxxx
    exp r10.xyz, r10.xyzx
    mul r10.xyz, r5.zzzz, r10.xyzx
    mul r1.x, r0.x, r2.w
    mul r11.xyz, r1.yzwy, r1.xxxx
    exp r11.xyz, r11.xyzx
    add r11.xyz, r11.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    mul r11.xyz, r11.xyzx, cb9[9].xyzx
    div r11.xyz, r11.xyzx, r2.wwww
    mul r10.xyz, r10.xyzx, r11.xyzx
    mul r10.xyz, r10.xyzx, cb9[13].xyzx
    dp3 r1.x, cb9[10].xyzx, r2.xyzx
    mad r2.xyz, r1.xxxx, r8.xyzx, cb9[11].xyzx
    mul r2.xyz, r2.xyzx, r10.xyzx
    dp3 r1.x, r6.xyzx, r3.xyzx
    mov r6.w, -r1.x
    dp3 r1.x, r6.xyzx, r6.xyzx
    dp4 r2.w, r6.xyzw, r4.xyzw
    dp4 r3.x, r6.xyzw, r3.xyzw
    div r3.y, l(100.000000), r1.x
    mul r2.w, -r2.w, r3.y
    max r2.w, r2.w, l(0.000000)
    mul r3.x, r3.y, -r3.x
    max r3.x, r3.x, l(0.000000)
    add r3.x, -r2.w, r3.x
    max r3.x, r3.x, l(0.001000)
    div r3.x, r3.x, r0.x
    add r3.x, r3.x, l(1.000000)
    mad r1.x, r1.x, r1.x, l(1.000000)
    mul r3.yzw, r1.yyzw, r2.wwww
    exp r3.yzw, r3.yyzw
    mul r3.yzw, r1.xxxx, r3.yyzw
    mul r0.x, r0.x, r3.x
    mul r1.xyz, r1.yzwy, r0.xxxx
    exp r1.xyz, r1.xyzx
    add r1.xyz, r1.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    mul r1.xyz, r1.xyzx, cb9[9].xyzx
    div r1.xyz, r1.xyzx, r3.xxxx
    mul r1.xyz, r1.xyzx, r3.yzwy
    mul r1.xyz, r1.xyzx, cb9[13].xyzx
    dp3 r0.x, cb9[10].xyzx, r6.xyzx
    mad r3.xyz, r0.xxxx, r8.xyzx, cb9[11].xyzx
    mad r2.xyz, r7.xyzx, r9.xyzx, r2.xyzx
    mad r1.xyz, r1.xyzx, r3.xyzx, r2.xyzx
    mad r0.xyz, r0.yzwy, r5.xywx, r16.xyzx
    add r19.xyz, r1.xyzx, r0.xyzx
  endif
endif
mul r0.xyz, r19.xyzx, cb9[19].xxxx
add r1.xyz, r19.xyzx, 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

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