// Model Batch DHR
// ---- Created with 3Dmigoto v1.2.65 on Wed Sep 20 20:49:56 2017
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 s3_s : register(s3);

SamplerState s2_s : register(s2);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

cbuffer cb4 : register(b4)
{
  float4 cb4[24];
}

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

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

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

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




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



void main( 
  linear centroid float4 v0 : TEXCOORD10,
  linear centroid float4 v1 : TEXCOORD11,
  float4 v2 : COLOR0,
  float2 v3 : TEXCOORD0,
  float4 v4 : SV_Position0,
  uint v5 : 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,r9,r10;
  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.xyzw = cb0[37].xyzw * v4.yyyy;
  r1.xyzw = v4.xxxx * cb0[36].xyzw + r1.xyzw;
  r1.xyzw = v4.zzzz * cb0[38].xyzw + r1.xyzw;
  r1.xyzw = cb0[39].xyzw + r1.xyzw;
  r1.xyz = r1.xyz / r1.www;
  
  // Common SVPositionToTranslatedWorld fix:
float4 s = StereoParams.Load(0);
matrix TranslatedWorldToClip = MATRIX(cb0, 0);
matrix ClipToTranslatedWorld = MATRIX(cb0, 32);
float4 t = mul(r1.xyz, TranslatedWorldToClip);
t.x -= s.x * (t.w - s.y);
r1.xyz = mul(t, ClipToTranslatedWorld);
  
  r2.xyz = -cb0[58].xyz + r1.xyz;
  r0.w = dot(-r1.xyz, -r1.xyz);
  r0.w = rsqrt(r0.w);
  r1.xyz = -r1.xyz * r0.www;
  r3.xyzw = v3.xyxy / cb4[15].xxzz;
  r3.xyzw = float4(0.5,0.5,0.5,0.5) + r3.xyzw;
  r3.xyzw = -cb4[15].yyww + r3.xyzw;
  r3.xy = t0.Sample(s3_s, r3.xy).xy;
  r4.xy = r3.xy * float2(2,2) + float2(-1,-1);
  r0.w = dot(r4.xy, r4.xy);
  r0.w = 1 + -r0.w;
  r0.w = max(0, r0.w);
  r4.z = sqrt(r0.w);
  r3.xy = float2(-0.5,-0.5) + r3.zw;
  r0.w = dot(r3.xy, r3.xy);
  r0.w = sqrt(r0.w);
  r3.xy = cb4[16].zz + -cb4[1].xy;
  r3.xy = -r3.xy + r0.ww;
  r3.xy = r3.xy / cb4[1].xy;
  r3.xy = saturate(float2(1,1) + -r3.xy);
  r5.xy = r3.xy * float2(-2,-2) + float2(3,3);
  r3.xy = r3.xy * r3.xy;
  r3.xy = r5.xy * r3.xy;
  r1.w = 1 + -cb4[16].w;
  r1.w = r3.x * r1.w + cb4[16].w;
  r5.xyz = float3(0,0,1) + -r4.xyz;
  r4.xyz = r1.www * r5.xyz + r4.xyz;
  r4.xyz = r4.xyz * cb0[122].www + cb0[122].xyz;
  r1.w = dot(r4.xyz, r4.xyz);
  r1.w = rsqrt(r1.w);
  r4.xyz = r4.xyz * r1.www;
  r5.xyz = r4.yyy * r0.xyz;
  r4.xyw = r4.xxx * v0.xyz + r5.xyz;
  r4.xyz = r4.zzz * v1.xyz + r4.xyw;
  r1.w = dot(r4.xyz, r4.xyz);
  r1.w = rsqrt(r1.w);
  r4.xyz = r4.xyz * r1.www;
  r5.xyz = cb3[7].xyz + -r2.xyz;
  r1.w = dot(r5.xyz, r5.xyz);
  r1.w = sqrt(r1.w);
  r5.xyz = r5.xyz / r1.www;
  r1.w = dot(r5.xyz, cb3[6].xyz);
  r2.w = saturate(0.100000024 + -r1.w);
  r2.w = max(9.99999997e-007, r2.w);
  r2.w = log2(r2.w);
  r2.w = 10 * r2.w;
  r2.w = exp2(r2.w);
  r4.w = dot(r5.xyz, r4.xyz);
  r4.w = r4.w * r2.w;
  r5.xy = float2(0.5,0.0500000007) * cb3[1].yy;
  r6.xyz = -cb3[7].xyz + r2.xyz;
  r5.z = dot(r6.xyz, r6.xyz);
  r5.z = sqrt(r5.z);
  r5.zw = min(r5.zz, r5.xy);
  r5.xy = r5.zw / r5.xy;
  r5.x = 1 + -r5.x;
  r5.x = max(9.99999997e-007, abs(r5.x));
  r5.x = r5.x * r5.x;
  r4.w = r5.x * r4.w;
  r5.xzw = t1.Sample(s3_s, r3.zw).xyz;
  r6.x = t2.Sample(s0_s, v3.xy).x;
  r6.yzw = cb4[5].xyz * r6.xxx;
  r6.yzw = float3(50,50,50) * r6.yzw;
  r6.yzw = r5.xxx * cb4[3].xyz + r6.yzw;
  r6.yzw = r6.yzw * r2.www;
  r1.w = saturate(-r1.w);
  r1.w = max(9.99999997e-007, r1.w);
  r1.w = log2(r1.w);
  r1.w = 30 * r1.w;
  r1.w = exp2(r1.w);
  r7.xyz = r6.xxx * cb4[5].xyz + -r6.yzw;
  r6.xyz = r1.www * r7.xyz + r6.yzw;
  r6.xyz = r6.xyz * r4.www;
  r1.w = max(9.99999997e-007, abs(r5.y));
  r1.w = r1.w * r1.w;
  r1.w = r1.w * r1.w;
  r6.xyz = r6.xyz * r1.www;
  r6.xyz = cb3[5].yyy * r6.xyz + cb4[6].xyz;
  r0.w = -r0.w * cb4[17].z + 1;
  r0.w = saturate(cb4[18].z * r0.w);
  r7.xyz = float3(1,1,1) + -cb4[10].xyz;
  r7.xyz = r0.www * r7.xyz + cb4[10].xyz;
  r5.xyz = cb4[18].www * r5.xzw;
  r0.w = dot(v0.xyz, v0.xyz);
  r0.w = sqrt(r0.w);
  r8.xyz = v0.zxy / r0.www;
  r9.xy = t3.Sample(s1_s, v3.xy).xy;
  r9.xy = r9.xy * float2(2,2) + float2(-1,-1);
  r0.w = dot(r9.xy, r9.xy);
  r0.w = 1 + -r0.w;
  r0.w = max(0, r0.w);
  r0.w = sqrt(r0.w);
  r0.xyz = r9.yyy * r0.xyz;
  r0.xyz = r9.xxx * v0.xyz + r0.xyz;
  r0.xyz = r0.www * v1.xyz + r0.xyz;
  r0.w = dot(r8.yzx, r0.xyz);
  r8.xyz = -r0.www * r0.zxy + r8.xyz;
  r0.w = dot(r8.xyz, r8.xyz);
  r0.w = sqrt(r0.w);
  r8.xyz = r8.xyz / r0.www;
  r0.w = 1.00029004 / cb4[19].x;
  r1.w = dot(r4.xyz, r1.xyz);
  r2.w = r0.w * r1.w + -r0.w;
  r4.w = r0.w * r1.w + r0.w;
  r2.w = r2.w * r4.w + 1;
  r2.w = sqrt(r2.w);
  r1.w = r0.w * r1.w + -r2.w;
  r9.xyz = r0.www * r1.xyz;
  r9.xyz = r1.www * r4.xyz + -r9.xyz;
  r0.w = dot(r9.xyz, r9.xyz);
  r0.w = rsqrt(r0.w);
  r9.xyz = r9.xyz * r0.www;
  r10.xyz = t4.Sample(s2_s, v3.xy).xyz;
  r0.w = t4.Sample(s2_s, cb4[12].xy).x;
  r10.xyz = r10.xyz + -r0.www;
  r10.xyz = max(float3(0,0,0), r10.xyz);
  r10.xyz = cb4[19].www * r10.xyz;
  r0.w = dot(r1.xyz, r0.xyz);
  r0.w = r0.w * r0.w;
  r0.w = r0.w * 0.675000012 + 0.324999988;
  r1.xyz = r10.xyz / r0.www;
  r1.xyz = -r9.xyz * r1.xyz;
  r9.x = dot(r8.yzx, r1.xyz);
  r10.xyz = r8.xyz * r0.yzx;
  r8.xyz = r8.zxy * r0.zxy + -r10.xyz;
  r9.y = dot(r8.xyz, r1.xyz);
  r1.xy = cb4[13].xy * r9.xy;
  r1.zw = r3.xx * r1.xy;
  r1.xy = r3.xx * r1.xy + r3.zw;
  r1.zw = cb4[20].xx * r1.zw + r3.zw;
  r1.zw = float2(-0.5,-0.5) + r1.zw;
  r1.zw = cb4[20].zz * r1.zw;
  r0.w = dot(r1.zw, r1.zw);
  r2.w = sqrt(r0.w);
  r0.w = rsqrt(r0.w);
  r1.zw = r1.zw * r0.ww;
  r1.zw = float2(0.5,0.5) * r1.zw;
  r0.w = -r2.w * 2 + 1;
  r0.w = saturate(cb4[20].w * r0.w);
  r1.zw = r0.ww * -r1.zw + r1.zw;
  r3.zw = float2(0.5,0.5) + r1.zw;
  r8.xyz = t5.Sample(s3_s, r3.zw).xyz;
  r8.xyz = cb4[14].xyz * r8.xyz;
  r8.xyz = cb4[21].xxx * r8.xyz + r8.xyz;
  r1.zw = cb4[21].yy * r1.zw;
  r0.w = dot(r1.zw, r1.zw);
  r0.w = sqrt(r0.w);
  r0.w = max(9.99999997e-007, r0.w);
  r0.w = log2(r0.w);
  r0.w = cb4[21].z * r0.w;
  r0.w = exp2(r0.w);
  r0.w = 1 + -r0.w;
  r8.xyz = r8.xyz * r0.www + -r5.xyz;
  r5.xyz = r3.xxx * r8.xyz + r5.xyz;
  r5.xyz = r7.xyz * r5.xyz;
  r5.xyz = saturate(cb4[7].xyz * r5.xyz);
  r0.w = -cb4[22].x + cb4[21].w;
  r0.w = saturate(r3.x * r0.w + cb4[22].x);
  r1.z = cb4[22].y + -cb4[22].z;
  r1.z = saturate(r3.x * r1.z + cb4[22].z);
  o2.z = r1.z * cb0[123].y + cb0[123].x;
  r1.z = cmp(0 < cb1[11].y);
  o5.x = r1.z ? cb2[5].x : 1;
  r1.z = dot(r0.xyz, r0.xyz);
  r1.z = rsqrt(r1.z);
  r0.xyz = r1.zzz * r0.xyz;
  r1.z = dot(float3(1,1,1), abs(r0.xyz));
  r0.xy = r0.xy / r1.zz;
  r0.z = cmp(0 >= r0.z);
  r1.zw = float2(1,1) + -abs(r0.yx);
  r3.xz = cmp(r0.xy >= float2(0,0));
  r3.xz = r3.xz ? float2(1,1) : float2(-1,-1);
  r1.zw = r3.xz * r1.zw;
  r0.xy = r0.zz ? r1.zw : r0.xy;
  o4.xy = r0.xy * float2(0.5,0.5) + float2(0.5,0.5);
  o4.z = min(1, r3.y);
  r0.xy = float2(-0.5,-0.5) + r1.xy;
  r0.x = dot(r0.xy, r0.xy);
  r0.x = sqrt(r0.x);
  r0.x = r0.x / cb4[16].z;
  r0.x = cb4[22].w * r0.x;
  r0.x = max(9.99999997e-007, abs(r0.x));
  r0.x = log2(r0.x);
  r0.x = cb4[23].x * r0.x;
  r0.x = exp2(r0.x);
  o4.w = min(1, r0.x);
  r0.x = cb0[121].w * r0.w;
  r1.xyz = r5.xyz * cb0[120].www + cb0[120].xyz;
  r0.xyz = r0.xxx * float3(0.0799999982,0.0799999982,0.0799999982) + cb0[121].xyz;
  r0.xyz = r0.xyz * float3(0.449999988,0.449999988,0.449999988) + r1.xyz;
  r1.xyz = max(float3(0,0,0), r6.xyz);
  r1.w = cmp(0 < cb0[124].x);
  if (r1.w != 0) {
    r3.xyz = -cb1[8].xyz + r2.xyz;
    r6.xyz = float3(1,1,1) + cb1[9].xyz;
    r3.xyz = cmp(r6.xyz < abs(r3.xyz));
    r1.w = (int)r3.y | (int)r3.x;
    r1.w = (int)r3.z | (int)r1.w;
    r2.x = dot(r2.xyz, float3(0.577000022,0.577000022,0.577000022));
    r2.x = 0.00200000009 * r2.x;
    r2.x = frac(r2.x);
    r2.x = cmp(0.5 < r2.x);
    r2.xyz = r2.xxx ? float3(0,1,1) : float3(1,1,0);
    r1.xyz = r1.www ? r2.xyz : r1.xyz;
  }
  o0.xyz = cb0[128].xxx * r0.xyz + r1.xyz;
  r0.xyz = float3(0.0078125,0.0078125,0.0078125) * v4.xyx;
  r0.xyz = frac(r0.xyz);
  r0.xyz = r0.xyz * float3(128,128,128) + float3(-64.3406219,-72.4656219,-64.3406219);
  r0.xyz = r0.xyz * r0.xyy;
  r0.x = dot(r0.xyz, float3(20.390625,60.703125,2.42812085));
  r0.x = frac(r0.x);
  r0.x = -0.5 + r0.x;
  o1.xyz = r4.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  o3.w = 0.00392156886 * r0.x;
  o0.w = 0;
  o1.w = cb1[11].x;
  o2.xw = float2(0,0.788235307);
  o2.y = r0.w;
  o3.xyz = r5.xyz;
  o5.yzw = float3(1,1,1);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                10   xyzw        0     NONE   float   xyz 
// TEXCOORD                11   xyzw        1     NONE   float   xyzw
// COLOR                    0   xyzw        2     NONE   float       
// TEXCOORD                 0   xy          3     NONE   float   xy  
// SV_Position              0   xyzw        4      POS   float   xyz 
// SV_IsFrontFace           0   x           5    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[129], immediateIndexed
dcl_constantbuffer cb1[12], immediateIndexed
dcl_constantbuffer cb2[6], immediateIndexed
dcl_constantbuffer cb3[8], immediateIndexed
dcl_constantbuffer cb4[24], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, 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_input_ps linear centroid v0.xyz
dcl_input_ps linear centroid v1.xyzw
dcl_input_ps linear v3.xy
dcl_input_ps_siv linear noperspective v4.xyz, 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 11
mul r0.xyz, v0.yzxy, v1.zxyz
mad r0.xyz, v1.yzxy, v0.zxyz, -r0.xyzx
mul r0.xyz, r0.xyzx, v1.wwww
mul r1.xyzw, v4.yyyy, cb0[37].xyzw
mad r1.xyzw, v4.xxxx, cb0[36].xyzw, r1.xyzw
mad r1.xyzw, v4.zzzz, cb0[38].xyzw, r1.xyzw
add r1.xyzw, r1.xyzw, cb0[39].xyzw
div r1.xyz, r1.xyzx, r1.wwww
add r2.xyz, r1.xyzx, -cb0[58].xyzx
dp3 r0.w, -r1.xyzx, -r1.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, -r1.xyzx
div r3.xyzw, v3.xyxy, cb4[15].xxzz
add r3.xyzw, r3.xyzw, l(0.500000, 0.500000, 0.500000, 0.500000)
add r3.xyzw, r3.xyzw, -cb4[15].yyww
sample_indexable(texture2d)(float,float,float,float) r3.xy, r3.xyxx, t0.xyzw, s3
mad r4.xy, r3.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r0.w, r4.xyxx, r4.xyxx
add r0.w, -r0.w, l(1.000000)
max r0.w, r0.w, l(0.000000)
sqrt r4.z, r0.w
add r3.xy, r3.zwzz, l(-0.500000, -0.500000, 0.000000, 0.000000)
dp2 r0.w, r3.xyxx, r3.xyxx
sqrt r0.w, r0.w
add r3.xy, -cb4[1].xyxx, cb4[16].zzzz
add r3.xy, r0.wwww, -r3.xyxx
div r3.xy, r3.xyxx, cb4[1].xyxx
add_sat r3.xy, -r3.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
mad r5.xy, r3.xyxx, l(-2.000000, -2.000000, 0.000000, 0.000000), l(3.000000, 3.000000, 0.000000, 0.000000)
mul r3.xy, r3.xyxx, r3.xyxx
mul r3.xy, r3.xyxx, r5.xyxx
add r1.w, -cb4[16].w, l(1.000000)
mad r1.w, r3.x, r1.w, cb4[16].w
add r5.xyz, -r4.xyzx, l(0.000000, 0.000000, 1.000000, 0.000000)
mad r4.xyz, r1.wwww, r5.xyzx, r4.xyzx
mad r4.xyz, r4.xyzx, cb0[122].wwww, cb0[122].xyzx
dp3 r1.w, r4.xyzx, r4.xyzx
rsq r1.w, r1.w
mul r4.xyz, r1.wwww, r4.xyzx
mul r5.xyz, r0.xyzx, r4.yyyy
mad r4.xyw, r4.xxxx, v0.xyxz, r5.xyxz
mad r4.xyz, r4.zzzz, v1.xyzx, r4.xywx
dp3 r1.w, r4.xyzx, r4.xyzx
rsq r1.w, r1.w
mul r4.xyz, r1.wwww, r4.xyzx
add r5.xyz, -r2.xyzx, cb3[7].xyzx
dp3 r1.w, r5.xyzx, r5.xyzx
sqrt r1.w, r1.w
div r5.xyz, r5.xyzx, r1.wwww
dp3 r1.w, r5.xyzx, cb3[6].xyzx
add_sat r2.w, -r1.w, l(0.100000)
max r2.w, r2.w, l(0.000001)
log r2.w, r2.w
mul r2.w, r2.w, l(10.000000)
exp r2.w, r2.w
dp3 r4.w, r5.xyzx, r4.xyzx
mul r4.w, r2.w, r4.w
mul r5.xy, cb3[1].yyyy, l(0.500000, 0.050000, 0.000000, 0.000000)
add r6.xyz, r2.xyzx, -cb3[7].xyzx
dp3 r5.z, r6.xyzx, r6.xyzx
sqrt r5.z, r5.z
min r5.zw, r5.xxxy, r5.zzzz
div r5.xy, r5.zwzz, r5.xyxx
add r5.x, -r5.x, l(1.000000)
max r5.x, |r5.x|, l(0.000001)
mul r5.x, r5.x, r5.x
mul r4.w, r4.w, r5.x
sample_indexable(texture2d)(float,float,float,float) r5.xzw, r3.zwzz, t1.xwyz, s3
sample_indexable(texture2d)(float,float,float,float) r6.x, v3.xyxx, t2.xyzw, s0
mul r6.yzw, r6.xxxx, cb4[5].xxyz
mul r6.yzw, r6.yyzw, l(0.000000, 50.000000, 50.000000, 50.000000)
mad r6.yzw, r5.xxxx, cb4[3].xxyz, r6.yyzw
mul r6.yzw, r2.wwww, r6.yyzw
mov_sat r1.w, -r1.w
max r1.w, r1.w, l(0.000001)
log r1.w, r1.w
mul r1.w, r1.w, l(30.000000)
exp r1.w, r1.w
mad r7.xyz, r6.xxxx, cb4[5].xyzx, -r6.yzwy
mad r6.xyz, r1.wwww, r7.xyzx, r6.yzwy
mul r6.xyz, r4.wwww, r6.xyzx
max r1.w, |r5.y|, l(0.000001)
mul r1.w, r1.w, r1.w
mul r1.w, r1.w, r1.w
mul r6.xyz, r1.wwww, r6.xyzx
mad r6.xyz, cb3[5].yyyy, r6.xyzx, cb4[6].xyzx
mad r0.w, -r0.w, cb4[17].z, l(1.000000)
mul_sat r0.w, r0.w, cb4[18].z
add r7.xyz, -cb4[10].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad r7.xyz, r0.wwww, r7.xyzx, cb4[10].xyzx
mul r5.xyz, r5.xzwx, cb4[18].wwww
dp3 r0.w, v0.xyzx, v0.xyzx
sqrt r0.w, r0.w
div r8.xyz, v0.zxyz, r0.wwww
sample_indexable(texture2d)(float,float,float,float) r9.xy, v3.xyxx, t3.xyzw, s1
mad r9.xy, r9.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r0.w, r9.xyxx, r9.xyxx
add r0.w, -r0.w, l(1.000000)
max r0.w, r0.w, l(0.000000)
sqrt r0.w, r0.w
mul r0.xyz, r0.xyzx, r9.yyyy
mad r0.xyz, r9.xxxx, v0.xyzx, r0.xyzx
mad r0.xyz, r0.wwww, v1.xyzx, r0.xyzx
dp3 r0.w, r8.yzxy, r0.xyzx
mad r8.xyz, -r0.wwww, r0.zxyz, r8.xyzx
dp3 r0.w, r8.xyzx, r8.xyzx
sqrt r0.w, r0.w
div r8.xyz, r8.xyzx, r0.wwww
div r0.w, l(1.000290), cb4[19].x
dp3 r1.w, r4.xyzx, r1.xyzx
mad r2.w, r0.w, r1.w, -r0.w
mad r4.w, r0.w, r1.w, r0.w
mad r2.w, r2.w, r4.w, l(1.000000)
sqrt r2.w, r2.w
mad r1.w, r0.w, r1.w, -r2.w
mul r9.xyz, r1.xyzx, r0.wwww
mad r9.xyz, r1.wwww, r4.xyzx, -r9.xyzx
dp3 r0.w, r9.xyzx, r9.xyzx
rsq r0.w, r0.w
mul r9.xyz, r0.wwww, r9.xyzx
sample_indexable(texture2d)(float,float,float,float) r10.xyz, v3.xyxx, t4.xyzw, s2
sample_indexable(texture2d)(float,float,float,float) r0.w, cb4[12].xyxx, t4.yzwx, s2
add r10.xyz, -r0.wwww, r10.xyzx
max r10.xyz, r10.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mul r10.xyz, r10.xyzx, cb4[19].wwww
dp3 r0.w, r1.xyzx, r0.xyzx
mul r0.w, r0.w, r0.w
mad r0.w, r0.w, l(0.675000), l(0.325000)
div r1.xyz, r10.xyzx, r0.wwww
mul r1.xyz, r1.xyzx, -r9.xyzx
dp3 r9.x, r8.yzxy, r1.xyzx
mul r10.xyz, r0.yzxy, r8.xyzx
mad r8.xyz, r8.zxyz, r0.zxyz, -r10.xyzx
dp3 r9.y, r8.xyzx, r1.xyzx
mul r1.xy, r9.xyxx, cb4[13].xyxx
mul r1.zw, r1.xxxy, r3.xxxx
mad r1.xy, r3.xxxx, r1.xyxx, r3.zwzz
mad r1.zw, cb4[20].xxxx, r1.zzzw, r3.zzzw
add r1.zw, r1.zzzw, l(0.000000, 0.000000, -0.500000, -0.500000)
mul r1.zw, r1.zzzw, cb4[20].zzzz
dp2 r0.w, r1.zwzz, r1.zwzz
sqrt r2.w, r0.w
rsq r0.w, r0.w
mul r1.zw, r0.wwww, r1.zzzw
mul r1.zw, r1.zzzw, l(0.000000, 0.000000, 0.500000, 0.500000)
mad r0.w, -r2.w, l(2.000000), l(1.000000)
mul_sat r0.w, r0.w, cb4[20].w
mad r1.zw, r0.wwww, -r1.zzzw, r1.zzzw
add r3.zw, r1.zzzw, l(0.000000, 0.000000, 0.500000, 0.500000)
sample_indexable(texture2d)(float,float,float,float) r8.xyz, r3.zwzz, t5.xyzw, s3
mul r8.xyz, r8.xyzx, cb4[14].xyzx
mad r8.xyz, cb4[21].xxxx, r8.xyzx, r8.xyzx
mul r1.zw, r1.zzzw, cb4[21].yyyy
dp2 r0.w, r1.zwzz, r1.zwzz
sqrt r0.w, r0.w
max r0.w, r0.w, l(0.000001)
log r0.w, r0.w
mul r0.w, r0.w, cb4[21].z
exp r0.w, r0.w
add r0.w, -r0.w, l(1.000000)
mad r8.xyz, r8.xyzx, r0.wwww, -r5.xyzx
mad r5.xyz, r3.xxxx, r8.xyzx, r5.xyzx
mul r5.xyz, r5.xyzx, r7.xyzx
mul_sat r5.xyz, r5.xyzx, cb4[7].xyzx
add r0.w, cb4[21].w, -cb4[22].x
mad_sat r0.w, r3.x, r0.w, cb4[22].x
add r1.z, -cb4[22].z, cb4[22].y
mad_sat r1.z, r3.x, r1.z, cb4[22].z
mad o2.z, r1.z, cb0[123].y, cb0[123].x
lt r1.z, l(0.000000), cb1[11].y
movc o5.x, r1.z, cb2[5].x, l(1.000000)
dp3 r1.z, r0.xyzx, r0.xyzx
rsq r1.z, r1.z
mul r0.xyz, r0.xyzx, r1.zzzz
dp3 r1.z, l(1.000000, 1.000000, 1.000000, 0.000000), |r0.xyzx|
div r0.xy, r0.xyxx, r1.zzzz
ge r0.z, l(0.000000), r0.z
add r1.zw, -|r0.yyyx|, l(0.000000, 0.000000, 1.000000, 1.000000)
ge r3.xz, r0.xxyx, l(0.000000, 0.000000, 0.000000, 0.000000)
movc r3.xz, r3.xxzx, l(1.000000,0,1.000000,0), l(-1.000000,0,-1.000000,0)
mul r1.zw, r1.zzzw, r3.xxxz
movc r0.xy, r0.zzzz, r1.zwzz, r0.xyxx
mad o4.xy, r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
min o4.z, r3.y, l(1.000000)
add r0.xy, r1.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
dp2 r0.x, r0.xyxx, r0.xyxx
sqrt r0.x, r0.x
div r0.x, r0.x, cb4[16].z
mul r0.x, r0.x, cb4[22].w
max r0.x, |r0.x|, l(0.000001)
log r0.x, r0.x
mul r0.x, r0.x, cb4[23].x
exp r0.x, r0.x
min o4.w, r0.x, l(1.000000)
mul r0.x, r0.w, cb0[121].w
mad r1.xyz, r5.xyzx, cb0[120].wwww, cb0[120].xyzx
mad r0.xyz, r0.xxxx, l(0.080000, 0.080000, 0.080000, 0.000000), cb0[121].xyzx
mad r0.xyz, r0.xyzx, l(0.450000, 0.450000, 0.450000, 0.000000), r1.xyzx
max r1.xyz, r6.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
lt r1.w, l(0.000000), cb0[124].x
if_nz r1.w
  add r3.xyz, r2.xyzx, -cb1[8].xyzx
  add r6.xyz, cb1[9].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  lt r3.xyz, r6.xyzx, |r3.xyzx|
  or r1.w, r3.y, r3.x
  or r1.w, r3.z, r1.w
  dp3 r2.x, r2.xyzx, l(0.577000, 0.577000, 0.577000, 0.000000)
  mul r2.x, r2.x, l(0.002000)
  frc r2.x, r2.x
  lt r2.x, l(0.500000), r2.x
  movc r2.xyz, r2.xxxx, l(0,1.000000,1.000000,0), l(1.000000,1.000000,0,0)
  movc r1.xyz, r1.wwww, r2.xyzx, r1.xyzx
endif 
mad o0.xyz, cb0[128].xxxx, r0.xyzx, r1.xyzx
mul r0.xyz, v4.xyxx, l(0.007813, 0.007813, 0.007813, 0.000000)
frc r0.xyz, r0.xyzx
mad r0.xyz, r0.xyzx, l(128.000000, 128.000000, 128.000000, 0.000000), l(-64.340622, -72.465622, -64.340622, 0.000000)
mul r0.xyz, r0.xyyx, r0.xyzx
dp3 r0.x, r0.xyzx, l(20.390625, 60.703125, 2.428121, 0.000000)
frc r0.x, r0.x
add r0.x, r0.x, l(-0.500000)
mad o1.xyz, r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
mul o3.w, r0.x, l(0.003922)
mov o0.w, l(0)
mov o1.w, cb1[11].x
mov o2.xw, l(0,0,0,0.788235)
mov o2.y, r0.w
mov o3.xyz, r5.xyzx
mov o5.yzw, l(0,1.000000,1.000000,1.000000)
ret 
// Approximately 0 instruction slots used

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