// ---- Created with 3Dmigoto v1.2.35 on Tue Apr 26 22:30:55 2016

cbuffer cbTextureTilingScale : register(b1)
{
  float4 FC_TextureTilingScale[25] : packoffset(c0);
}

cbuffer cbMatDynParam : register(b2)
{
  bool FC_isDitherAlpha : packoffset(c0);
  float FC_TranslucencyScale : packoffset(c1);
  float4 FC_EmissiveColor : packoffset(c2);
  float4 FC_BlendMaskParam : packoffset(c3);
  float FC_PomHeightScale : packoffset(c4);
  float FC_PomHeightBias : packoffset(c4.y);
  float FC_PomMinSamples : packoffset(c4.z);
  float FC_PomMaxSamples : packoffset(c4.w);
  float FC_PomShadowSoftening : packoffset(c5);
  bool FC_bPomDisplayShadows : packoffset(c5.y);
  float4 FC_ParallaxParam : packoffset(c6);
  float FC_Pom2HeightScale : packoffset(c7);
  float FC_Pom2HeightBias : packoffset(c7.y);
  float FC_Pom2MinSamples : packoffset(c7.z);
  float FC_Pom2MaxSamples : packoffset(c7.w);
  bool VC_isEnableCloth : packoffset(c8);
  float FC_EnvMapDolBlendRate : packoffset(c9);
  float4 FC_SnowMaskParam : packoffset(c10);
  float FC_FROZEN_THRESHOLD : packoffset(c11);
  float FC_FROZEN_POW : packoffset(c11.y);
  float FC_BlendRate : packoffset(c12);
  float4 FC_FlowMapUvTiling : packoffset(c13);
  float4 FC_FlowMapIntencity : packoffset(c14);
  float FC_SoftVolume : packoffset(c15);
  float FC_PointCloudRate : packoffset(c16);
  float4 FC_WaterNormalUvScrollSpeed : packoffset(c17);
  float4 FC_WaterDiffuseUvScrollSpeed : packoffset(c18);
  float4 FC_WaterMiddleUvScrollSpeed : packoffset(c19);
  float4 FC_WaterFogParam0 : packoffset(c20);
  float4 FC_WaterFogParam1 : packoffset(c21);
  float4 FC_WaterFresnel : packoffset(c22);
  float4 FC_WaterFadeParam : packoffset(c23);
  float4 FC_DynamicDiffuseColor : packoffset(c24);
  float FC_SSS_ID : packoffset(c25);
  float4 FC_PhantomEdgeColor : packoffset(c26);
  float4 FC_PhantomFrontColor : packoffset(c27);
  float4 FC_PhantomDiffColor : packoffset(c28);
  float4 FC_PhantomSpecColor : packoffset(c29);
  float4 FC_PhantomLightColor : packoffset(c30);
  float VC_VelocityOffset : packoffset(c31);
  float4 FC_DamagedNormalParam : packoffset(c32);
  float4 FC_DamagedNormalUvTiling : packoffset(c33);
  float4 FC_DamagedNormal2UvTiling : packoffset(c34);
  float4 FC_WetDiffuseColor : packoffset(c35);
  float4 FC_WetParam1 : packoffset(c36);
  float4 FC_WetRefrectanceColor : packoffset(c37);
  float4 FC_WetParam2 : packoffset(c38);
}

cbuffer cbMtdParam : register(b3)
{
  float4 FC_DifMapMulCol : packoffset(c0);
  float4 FC_SpcMapMulCol : packoffset(c1);
  float4 FC_SpcParam : packoffset(c2);
  float4 FC_SSAOParam : packoffset(c3);
  float3 FC_CDRFParam : packoffset(c4);
  float4 FC_AlphaRef : packoffset(c5);
  float FC_BloodAmount : packoffset(c6);
  float4 old_FC_ParallaxParam : packoffset(c7);
  float FC_IOR : packoffset(c8);
  float4 FC_GlowScale : packoffset(c9);
  float4 FC_GhostEdgeColor : packoffset(c10);
  float4 FC_GhostEdgeParam : packoffset(c11);
  float4 FC_BmpBlendParam0 : packoffset(c12);
  float4 FC_BmpBlendParam1 : packoffset(c13);
  float FC_UNUSED_SSS_ID : packoffset(c14);
  float4 FC_HairSpecularParam0 : packoffset(c20);
  float4 FC_HairSpecularParam1 : packoffset(c21);
  float4 FC_HairSpecularParam2 : packoffset(c22);
  float4 FC_RimLightingParam : packoffset(c23);
}

cbuffer cbSceneParam : register(b8)
{
  float4 FC_FarClipInfo : packoffset(c0);
  float4 FC_ScreenSize : packoffset(c1);
  float4 FC_DepthComputeParam : packoffset(c2);
  float4 SC_CameraPos : packoffset(c3);
  float4 VC_ClipPlane : packoffset(c4);
  float4x3 FC_MatrixView : packoffset(c5);
  float4x4 FC_MatrixInvViewProj : packoffset(c8);
  float4x4 FC_MatrixInvProj : packoffset(c12);
  float4x4 FC_MatrixProj : packoffset(c16);
  float4x4 FC_MatrixInvView : packoffset(c20);
  float4x4 VC_MatrixViewProj : packoffset(c24);
  float4 FC_ShadowMapParam : packoffset(c28);
  float4 FC_ShadowColor : packoffset(c29);
  float4 FC_ShadowDir : packoffset(c30);
  float4x4 VC_ShadowMapMatrix : packoffset(c31);
  float FC_ShadowDepthRate : packoffset(c35);
  float FC_ShadowDepthScale : packoffset(c35.y);
  float FC_ShadowKernelScale : packoffset(c35.z);
  float FC_ShadowRandTexInvScale : packoffset(c35.w);
  float FC_ShadowTexInvScaleX : packoffset(c36);
  float FC_ShadowTexInvScaleY : packoffset(c36.y);
  float FC_ShadowDepthOffsetScale : packoffset(c36.z);
  float4 FC_ShadowViewKernelScale : packoffset(c37);
  float4x4 FC_ProjSpaceToShadowMatrix[4] : packoffset(c38);
  float4 FC_CascadeSelectDist : packoffset(c54);
  float FC_FrustumNear : packoffset(c55);
  float FC_FrustumSliceScale : packoffset(c55.y);
  float FC_FrustumSliceBias : packoffset(c55.z);
  uint FC_LightTile_Width : packoffset(c56);
  uint FC_LightTile_NumCellX : packoffset(c56.y);
  float4 FC_CloudShadowParam0 : packoffset(c57);
  float4 FC_CloudShadowParam1 : packoffset(c58);
  float FC_ShadowScale0 : packoffset(c59);
  float FC_ShadowScale1 : packoffset(c59.y);
}

cbuffer cbPerFrame : register(b9)
{
  float4 FC_DebugParam : packoffset(c0);
  float4 FC_DebugOutputMode : packoffset(c1);
  float4 FC_DebugParam2 : packoffset(c2);
  float FC_GlobalSpecularMask : packoffset(c3);
  float FC_GlobalReflectanceScale : packoffset(c3.y);
  float FC_GlobalShininessScale : packoffset(c3.z);
  float FC_GlobalAlbedoOffset : packoffset(c3.w);
  float4 FC_GlobalRefRectanceRGBScale : packoffset(c4);
  float4 FC_GlobalAlbedoOffsetRGB : packoffset(c5);
  float4 FC_SnowDir : packoffset(c6);
  float4 FC_SnowTilingScale : packoffset(c7);
  float4 FC_SnowAlbedo : packoffset(c8);
  float FC_SnowReflectance : packoffset(c9);
  float FC_GroundPlaneHeight : packoffset(c9.y);
  float FC_RcpSnowHeightRange : packoffset(c9.z);
  float FC_SnowNormalScale : packoffset(c9.w);
  float4 FC_SnowSpakleTinlingScale : packoffset(c10);
  float FC_GlobalTime : packoffset(c11);
  float FC_DominantSharpnesMinValue : packoffset(c12);
  float FC_DominantSharpnesOffset : packoffset(c12.y);
  float FC_DominantSharpnesExponent : packoffset(c12.z);
  float FC_DominantColorScale : packoffset(c12.w);
  float4 FC_DominantRgbScale : packoffset(c13);
}

cbuffer cbInstanceData : register(b4)
{

  struct
  {
    float4x3 mWorld;
    float4 atlasUvScaleOffset;
    float4 userClipPlane;
    uint4 matricesData;
    uint envData;
    bool dynamicLightDisable;
    uint2 envPad;
    float4 mulCol;
    float4 aSh[3];
    float4 ShLightMask;
    float4 vDominantRotateParam;
    float4 parallaxCorrectedCubemapOrigin_envMapInterpRatio;
    float4 parallaxCorrectedCubemapAabbMin_envMapColorScale0;
    float4 parallaxCorrectedCubemapAabbMax_envMapColorScale1;
    float ditherFadeAlpha;
  } VC_InstanceData[2] : packoffset(c0);

}

cbuffer cbLight : register(b5)
{
  float4 FC_DirLightVec_0 : packoffset(c0);
  float4 FC_DirLightVec_1 : packoffset(c1);
  float4 FC_DirLightVec_2 : packoffset(c2);
  float4 FC_DirLightVec_3 : packoffset(c3);
  float4 FC_DirLightCol_0 : packoffset(c4);
  float4 FC_DirLightCol_1 : packoffset(c5);
  float4 FC_DirLightCol_2 : packoffset(c6);
  float4 FC_DirLightCol_3 : packoffset(c7);
  float4 FC_DirLightSpc_0 : packoffset(c8);
  float4 FC_DirLightSpc_1 : packoffset(c9);
  float4 FC_DirLightSpc_2 : packoffset(c10);
  float4 FC_DirLightSpc_3 : packoffset(c11);
  float4 FC_AmbientSH[3] : packoffset(c12);
  float4 FC_AmbientReflection : packoffset(c15);
  uint4 FC_bLocalLight : packoffset(c16);
  float4 FC_SsaoWeight : packoffset(c17);
}

cbuffer cbFog : register(b6)
{
  float4 FC_FogParam : packoffset(c0);
  float4 FC_FogCol : packoffset(c1);
  float4 FC_ExtFogParam : packoffset(c2);
  float4 FC_HeightFogParam : packoffset(c3);
  float4 FC_HeightFogCol : packoffset(c4);
  bool FC_FogType : packoffset(c5);
  float4 FC_LsBeta1PlusBeta2 : packoffset(c6);
  float4 FC_LsTerrainReflectance : packoffset(c7);
  float4 FC_LsOneOverBeta1PlusBeta2 : packoffset(c8);
  float4 FC_LsHGg : packoffset(c9);
  float4 FC_LsBetaDash1 : packoffset(c10);
  float4 FC_LsBetaDash2 : packoffset(c11);
  float4 FC_LsSunColor : packoffset(c12);
  float4 FC_LsLightDir : packoffset(c13);
}

SamplerState SS_DiffuseMap_s : register(s0);
SamplerState SS_SpecularMap_s : register(s1);
SamplerState SS_BumpMap_s : register(s2);
SamplerState SS_ClampPoint_s : register(s7);
SamplerState SS_ClampLinear_s : register(s9);
Texture2D<float4> g_DiffuseTexture : register(t0);
Texture2D<float4> g_SpecularTexture : register(t1);
Texture2D<float4> g_BumpmapTexture : register(t3);
Texture2D<float4> g_DiffuseTexture2 : register(t7);
Texture2D<float4> g_SpecularTexture2 : register(t8);
Texture2D<float4> g_BumpmapTexture2 : register(t10);
Texture2D<float4> g_BumpmapTexture3 : register(t16);
Texture2D<float4> g_BumpmapTexture4 : register(t18);
Texture2D<float4> g_SpecularTexture3 : register(t19);
Texture2D<float4> g_DiffuseTexture3 : register(t20);
Texture2D<float4> g_ReflectionTexture : register(t54);
Texture2D<float4> g_RefractionTexture : register(t55);
Texture2D<float4> g_DepthTexture : register(t56);
Texture2D<float4> g_WaterInteractTexture : register(t57);
Texture2D<float4> g_WaterNormalTexture : register(t58);
StructuredBuffer<g_LightIndices> g_LightIndices : register(t59);
StructuredBuffer<g_LightLookupBuffer> g_LightLookupBuffer : register(t60);
StructuredBuffer<g_LightBuffer> g_LightBuffer : register(t61);
StructuredBuffer<g_SpotLightBuffer> g_SpotLightBuffer : register(t62);


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


void main( 
  float4 v0 : SV_Position0,
  float4 v1 : TEXCOORD0,
  float4 v2 : TEXCOORD2,
  float4 v3 : TEXCOORD3,
  float4 v4 : TEXCOORD4,
  float4 v5 : COLOR1,
  float4 v6 : TEXCOORD8,
  float4 v7 : TEXCOORD9,
  float4 v8 : TEXCOORD11,
  float2 v9 : TEXCOORD5,
  float w9 : TEXCOORD6,
  uint v10 : SV_IsFrontFace0,
  out float4 o0 : SV_Target0)
{
// Needs manual fix for instruction: 
// unknown dcl_: dcl_resource_structured t59, 8 
// Needs manual fix for instruction: 
// unknown dcl_: dcl_resource_structured t60, 12 
// Needs manual fix for instruction: 
// unknown dcl_: dcl_resource_structured t61, 64 
// Needs manual fix for instruction: 
// unknown dcl_: dcl_resource_structured t62, 128 
  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,r28,r29,r30,r31,r32;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = dot(v1.xyz, v1.xyz);
  r0.x = rsqrt(r0.x);
  r0.xyz = v1.xyz * r0.xxx;
  r0.w = dot(v2.xyz, v2.xyz);
  r0.w = rsqrt(r0.w);
  r1.xyz = v2.xyz * r0.www;
  r2.xyz = r1.yzx * r0.zxy;
  r2.xyz = r0.yzx * r1.zxy + -r2.xyz;
  r2.xyz = v2.www * r2.xyz;
  r0.w = dot(r2.xyz, r2.xyz);
  r0.w = rsqrt(r0.w);
  r2.xyz = r2.xyz * r0.www;
  r0.w = round(v1.w);
  r0.w = (uint)r0.w;
  r3.xy = v7.zw * FC_TextureTilingScale[20].xy + FC_TextureTilingScale[20].zw;
  r3.xyzw = g_DiffuseTexture3.Sample(SS_DiffuseMap_s, r3.xy).xyzw;
  r4.xy = v7.zw * FC_TextureTilingScale[19].xy + FC_TextureTilingScale[19].zw;
  r4.xyz = g_SpecularTexture3.Sample(SS_SpecularMap_s, r4.xy).xyz;
  r5.x = dot(v8.xyzw, FC_MatrixInvViewProj._m00_m10_m20_m30);
  r5.y = dot(v8.xyzw, FC_MatrixInvViewProj._m01_m11_m21_m31);
  r5.z = dot(v8.xyzw, FC_MatrixInvViewProj._m02_m12_m22_m32);
  r1.w = dot(v8.xyzw, FC_MatrixInvViewProj._m03_m13_m23_m33);
  r5.xyz = r5.xyz / r1.www;
  r6.x = FC_MatrixInvView._m30 + -r5.x;
  r6.y = FC_MatrixInvView._m31 + -r5.y;
  r6.z = FC_MatrixInvView._m32 + -r5.z;
  r1.w = dot(r6.xyz, r6.xyz);
  r1.w = rsqrt(r1.w);
  r5.xyz = r6.xyz * r1.www;
  r7.x = dot(r2.xyz, r6.xyz);
  r7.y = dot(r1.xyz, r6.xyz);
  r7.z = dot(r0.xyz, r6.xyz);
  r2.w = dot(r7.xyz, r7.xyz);
  r2.w = rsqrt(r2.w);
  r7.xy = r7.xy * r2.ww;
  r8.xyzw = FC_WaterNormalUvScrollSpeed.xyzw * FC_GlobalTime + v6.xyzw;
  r7.zw = r8.xy * FC_TextureTilingScale[3].xy + FC_TextureTilingScale[3].zw;
  r2.w = g_BumpmapTexture.Sample(SS_BumpMap_s, r7.zw).w;
  r7.zw = r8.zw * FC_TextureTilingScale[10].xy + FC_TextureTilingScale[10].zw;
  r4.w = g_BumpmapTexture2.Sample(SS_BumpMap_s, r7.zw).w;
  r2.w = 1 + -r2.w;
  r4.w = 1 + -r4.w;
  r2.w = -r2.w * r4.w + 1;
  r7.zw = FC_WaterMiddleUvScrollSpeed.xy * FC_GlobalTime + v7.xy;
  r7.zw = r7.zw * FC_TextureTilingScale[16].xy + FC_TextureTilingScale[16].zw;
  r4.w = g_BumpmapTexture3.Sample(SS_BumpMap_s, r7.zw).w;
  r2.w = 1 + -r2.w;
  r4.w = 1 + -r4.w;
  r2.w = -r2.w * r4.w + 1;
  r4.w = r2.w * FC_ParallaxParam.x + FC_ParallaxParam.y;
  r2.w = -r2.w * r2.w + 1;
  r5.w = 1 + -v5.z;
  r2.w = -r2.w * r5.w + 1;
  r8.xyzw = r7.xyxy * r4.wwww + v6.xyzw;
  r7.xy = r7.xy * r4.ww + v7.xy;
  r9.yz = FC_ScreenSize.zw * v0.xy;
  r0.xyz = v10.xxx ? r0.xyz : -r0.xyz;
  r10.xyzw = FC_WaterNormalUvScrollSpeed.xyzw * FC_GlobalTime + r8.xyzw;
  r7.zw = r10.xy * FC_TextureTilingScale[3].xy + FC_TextureTilingScale[3].zw;
  r7.zw = g_BumpmapTexture.Sample(SS_BumpMap_s, r7.zw).xy;
  r10.xy = r10.zw * FC_TextureTilingScale[10].xy + FC_TextureTilingScale[10].zw;
  r10.xy = g_BumpmapTexture2.Sample(SS_BumpMap_s, r10.xy).xy;
  r7.xy = FC_WaterMiddleUvScrollSpeed.xy * FC_GlobalTime + r7.xy;
  r7.xy = r7.xy * FC_TextureTilingScale[16].xy + FC_TextureTilingScale[16].zw;
  r7.xy = g_BumpmapTexture3.Sample(SS_BumpMap_s, r7.xy).xy;
  r7.zw = r7.zw * float2(2,2) + float2(-1,-1);
  r7.zw = r10.xy * float2(2,2) + r7.zw;
  r7.xy = r7.xy * float2(2,2) + r7.zw;
  r7.xy = float2(-2,-2) + r7.xy;
  r4.w = dot(r7.xy, r7.xy);
  r4.w = min(1, r4.w);
  r4.w = 1 + -r4.w;
  r4.w = sqrt(r4.w);
  r7.yzw = r7.yyy * r1.xyz;
  r7.xyz = r7.xxx * r2.xyz + r7.yzw;
  r7.xyz = r4.www * r0.xyz + r7.xyz;
  r4.w = dot(r7.xyz, r7.xyz);
  r4.w = rsqrt(r4.w);
  r7.xyz = r7.xyz * r4.www;
  r4.w = g_WaterInteractTexture.Sample(SS_ClampLinear_s, r9.yz).x;
  r10.xyzw = FC_ScreenSize.zwzw * float4(2,0,0,2) + r9.yzyz;
  r5.w = g_WaterInteractTexture.Sample(SS_ClampLinear_s, r10.xy).x;
  r6.w = g_WaterInteractTexture.Sample(SS_ClampLinear_s, r10.zw).x;
  r7.w = -r5.w + r4.w;
  r9.w = -r6.w + r4.w;
  r4.w = r5.w + r4.w;
  r4.w = r4.w + r6.w;
  r4.w = r4.w * 0.6640625 + -1;
  r4.w = 1 + -abs(r4.w);
  r4.w = -r4.w * r4.w + 1;
  r10.xyz = -r6.xyz;
  r11.xyz = ddx_coarse(r10.xyz);
  r12.xyz = ddy_coarse(r10.xyz);
  r5.w = dot(r11.xyz, r11.xyz);
  r6.w = cmp(0 < r5.w);
  r5.w = rsqrt(r5.w);
  r11.xyz = r11.xyz * r5.www;
  r11.xyz = r6.www ? r11.xyz : 0;
  r5.w = dot(r12.xyz, r12.xyz);
  r6.w = cmp(0 < r5.w);
  r5.w = rsqrt(r5.w);
  r12.xyz = r12.xyz * r5.www;
  r12.xyz = r6.www ? r12.xyz : 0;
  r12.xyz = r12.xyz * r9.www;
  r11.xyz = r7.www * r11.xyz + r12.xyz;
  r11.xyz = float3(0,1,0) + r11.xyz;
  r5.w = dot(r11.xyz, r11.xyz);
  r5.w = rsqrt(r5.w);
  r11.xy = r11.xz * r5.ww;
  r4.w = 1 + -r4.w;
  r11.xy = float2(4,4) * r11.xy;
  r7.xz = r7.xz * r4.ww + r11.xy;
  r4.w = dot(r7.xyz, r7.xyz);
  r4.w = rsqrt(r4.w);
  r7.xyz = r7.xyz * r4.www;
  r11.xyz = g_WaterNormalTexture.Sample(SS_ClampLinear_s, v9.xy).xyz;
  r11.xyz = r11.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r4.w = dot(r11.xyz, r11.xyz);
  r4.w = rsqrt(r4.w);
  r11.xyz = r11.xyz * r4.www;
  r4.w = 1 + -w9.x;
  r11.xyz = w9.xzz * r11.xyz;
  r7.xyz = r7.xyz * r4.www + r11.xyz;
  r11.xy = v7.zw * FC_TextureTilingScale[18].xy + FC_TextureTilingScale[18].zw;
  r11.xy = g_BumpmapTexture4.Sample(SS_BumpMap_s, r11.xy).xy;
  r11.xy = r11.xy * float2(2,2) + float2(-1,-1);
  r4.w = dot(r11.xy, r11.xy);
  r4.w = min(1, r4.w);
  r4.w = 1 + -r4.w;
  r11.z = sqrt(r4.w);
  r11.xyz = r11.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r4.w = dot(r11.xyz, r11.xyz);
  r4.w = rsqrt(r4.w);
  r11.xy = r11.xy * r4.ww;
  r4.w = dot(r11.xy, r11.xy);
  r4.w = min(1, r4.w);
  r4.w = 1 + -r4.w;
  r4.w = sqrt(r4.w);
  r11.yzw = r11.yyy * r2.xyz;
  r1.xyz = r11.xxx * r1.xyz + r11.yzw;
  r1.xyz = r4.www * r0.xyz + r1.xyz;
  r4.w = dot(r1.xyz, r1.xyz);
  r4.w = rsqrt(r4.w);
  r1.xyz = r1.xyz * r4.www + -r7.xyz;
  r7.xyz = r3.www * r1.xyz + r7.xyz;
  r1.x = dot(r7.xyz, FC_MatrixView._m00_m10_m20);
  r1.y = dot(r7.xyz, FC_MatrixView._m01_m11_m21);
  r1.z = dot(r7.xyz, FC_MatrixView._m02_m12_m22);
  r11.xy = r8.xy * FC_TextureTilingScale[1].xy + FC_TextureTilingScale[1].zw;
  r11.xyz = g_SpecularTexture.Sample(SS_SpecularMap_s, r11.xy).xyz;
  r12.xy = r8.zw * FC_TextureTilingScale[8].xy + FC_TextureTilingScale[8].zw;
  r12.xyz = g_SpecularTexture2.Sample(SS_SpecularMap_s, r12.xy).xyz;
  r13.xy = r8.xy * FC_TextureTilingScale[3].xy + FC_TextureTilingScale[3].zw;
  r11.w = g_BumpmapTexture.Sample(SS_BumpMap_s, r13.xy).z;
  r13.xy = r8.zw * FC_TextureTilingScale[10].xy + FC_TextureTilingScale[10].zw;
  r12.w = g_BumpmapTexture2.Sample(SS_BumpMap_s, r13.xy).z;
  r12.xyzw = r12.xyzw + -r11.xyzw;
  r11.xyzw = r2.wwww * r12.xyzw + r11.xyzw;
  r4.w = FC_SpcParam.x * 0.00390625;
  r4.w = r11.w * r4.w;
  r4.w = 13 * r4.w;
  r4.w = exp2(r4.w);
  r4.xyz = -r11.xyz + r4.xyz;
  r4.xyz = r3.www * r4.xyz + r11.xyz;
  r5.w = dot(r5.xyz, r7.xyz);
  r6.w = saturate(r5.w);
  r6.w = 1 + -r6.w;
  r9.w = r6.w * r6.w;
  r9.w = r9.w * r9.w;
  r6.w = r9.w * r6.w;
  r11.xyz = float3(1,1,1) + -r4.xyz;
  r12.xyz = r11.xyz * r6.www + r4.xyz;
  r6.w = 1 + -abs(r5.w);
  r6.w = max(0, r6.w);
  r9.w = r6.w * r6.w;
  r9.w = r9.w * r9.w;
  r6.w = r9.w * r6.w;
  r6.w = r6.w * FC_WaterFresnel.x + FC_WaterFresnel.y;
  r6.w = r3.w * -r6.w + r6.w;
  r9.w = 10 + v8.w;
  r9.w = 10 / r9.w;
  r13.y = -v0.y * FC_ScreenSize.w + 1;
  r10.w = FC_WaterFogParam0.z * r7.x;
  r13.x = r10.w * r9.w + r9.y;
  r13.xyz = g_ReflectionTexture.Sample(SS_ClampLinear_s, r13.xy).xyz;
  r7.w = 1;
  r14.x = dot(r7.xyzw, FC_AmbientSH[0].xyzw);
  r14.y = dot(r7.xyzw, FC_AmbientSH[1].xyzw);
  r14.z = dot(r7.xyzw, FC_AmbientSH[2].xyzw);
  r14.xyz = max(float3(0,0,0), r14.xyz);
  r7.w = 1 + -r6.w;
  r0.w = (int)r0.w * 17;
  r15.xyz = VC_InstanceData[r0.w].ShLightMask.xxx * FC_DirLightCol_0.xyz;
  r15.xyz = v5.xxx * r15.xyz;
  r16.x = dot(FC_DirLightVec_0.xyz, r7.xyz);
  r16.y = dot(FC_DirLightVec_1.xyz, r7.xyz);
  r16.zw = saturate(r16.xy);
  r17.xyz = r16.zzz * r11.xyz;
  r18.xyz = r16.www * r11.xyz;
  r18.xyz = FC_DirLightCol_1.xyz * r18.xyz;
  r15.xyz = r15.xyz * r17.xyz + r18.xyz;
  r17.xyz = VC_InstanceData[r0.w].ShLightMask.xxx * FC_DirLightSpc_0.xyz;
  r17.xyz = v5.xxx * r17.xyz;
  r18.xyz = r6.xyz * r1.www + FC_DirLightVec_0.xyz;
  r10.w = dot(r18.xyz, r18.xyz);
  r10.w = rsqrt(r10.w);
  r18.xyz = r18.xyz * r10.www;
  r6.xyz = r6.xyz * r1.www + FC_DirLightVec_1.xyz;
  r1.w = dot(r6.xyz, r6.xyz);
  r1.w = rsqrt(r1.w);
  r6.xyz = r6.xyz * r1.www;
  r19.x = saturate(dot(r18.xyz, r7.xyz));
  r19.y = saturate(dot(r6.xyz, r7.xyz));
  r1.w = FC_DirLightVec_0.w * r4.w;
  r10.w = r4.w * 0.00999999978 + FC_DirLightVec_0.w;
  r1.w = r1.w / r10.w;
  r20.x = max(1, r1.w);
  r1.w = FC_DirLightVec_1.w * r4.w;
  r10.w = r4.w * 0.00999999978 + FC_DirLightVec_1.w;
  r1.w = r1.w / r10.w;
  r20.y = max(1, r1.w);
  r19.xy = log2(r19.xy);
  r19.xy = r20.xy * r19.xy;
  r19.xy = exp2(r19.xy);
  r18.x = saturate(dot(r5.xyz, r18.xyz));
  r18.y = saturate(dot(r5.xyz, r6.xyz));
  r6.xy = float2(1,1) + -r18.xy;
  r18.xy = r6.xy * r6.xy;
  r18.xy = r18.xy * r18.xy;
  r6.xy = r18.xy * r6.xy;
  r18.xyz = r6.xxx * r11.xyz + r4.xyz;
  r6.xyz = r6.yyy * r11.xyz + r4.xyz;
  r11.xy = max(r16.xy, r5.ww);
  r11.xy = max(float2(9.99999975e-005,9.99999975e-005), r11.xy);
  r11.xy = r16.zw / r11.xy;
  r16.xyz = r19.xxx * r18.xyz;
  r11.xzw = r16.xyz * r11.xxx;
  r6.xyz = r19.yyy * r6.xyz;
  r6.xyz = r6.xyz * r11.yyy;
  r16.xy = r20.xy * float2(0.125,0.125) + float2(0.25,0.25);
  r16.xzw = r16.xxx * r17.xyz;
  r17.xyz = FC_DirLightSpc_1.xyz * r16.yyy;
  r6.xyz = r17.xyz * r6.xyz;
  r6.xyz = r16.xzw * r11.xzw + r6.xyz;
  r11.xyz = FC_GlobalSpecularMask * FC_SpcMapMulCol.xyz;
  r16.x = dot(v8.xyzw, FC_MatrixInvProj._m00_m10_m20_m30);
  r16.y = dot(v8.xyzw, FC_MatrixInvProj._m01_m11_m21_m31);
  r16.z = dot(v8.xyzw, FC_MatrixInvProj._m02_m12_m22_m32);
  r1.w = dot(v8.xyzw, FC_MatrixInvProj._m03_m13_m23_m33);
  r16.xyz = r16.xyz / r1.www;
  r17.xy = FC_ScreenSize.xy * r9.yz;
  r17.xy = (uint2)r17.xy;
  uiDest.xy = (uint2)r17.xy / FC_LightTile_Width;
  r17.xy = uiDest.xy;
  r17.xy = (uint2)r17.xy;
  r1.w = FC_LightTile_NumCellX;
  r1.w = r17.y * r1.w + r17.x;
  r1.w = (uint)r1.w;
  r5.w = -FC_FrustumNear + r16.z;
  r5.w = log2(r5.w);
  r5.w = -FC_FrustumSliceBias + r5.w;
  r5.w = r5.w / FC_FrustumSliceScale;
  r5.w = max(0, r5.w);
  r5.w = min(14, r5.w);
  r5.w = (uint)r5.w;
  r5.w = 1 << (int)r5.w;
// Known bad code for instruction (needs manual fix):
ld_structured_indexable(structured_buffer, stride=12)(mixed,mixed,mixed,mixed) r17.xyz, r1.w, l(0), t60.xyzx
r17.x = SS_DiffuseMap[]..swiz;
r17.y = SS_DiffuseMap[]..swiz;
r17.z = SS_DiffuseMap[]..swiz;
  r1.w = dot(-r16.xyz, -r16.xyz);
  r1.w = rsqrt(r1.w);
  r18.xyz = -r16.xyz * r1.www;
  r19.xyz = float3(0,0,0);
  r20.xyz = float3(0,0,0);
  r1.w = r17.x;
  r10.w = 0;
  while (true) {
    r11.w = cmp((uint)r10.w >= (uint)r17.y);
    if (r11.w != 0) break;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r21.xy, r1.w, l(0), t59.xyxx
  r21.x = SS_DiffuseMap[]..swiz;
  r21.y = SS_DiffuseMap[]..swiz;
    r11.w = (int)r1.w + 1;
    r12.w = (int)r5.w & (int)r21.y;
    r13.w = (int)r10.w + 1;
    r10.w = r12.w ? r10.w : r13.w;
    r1.w = r11.w;
    if (r12.w == 0) continue;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r22.xyzw, r21.x, l(0), t61.xyzw
  r22.x = SS_DiffuseMap[]..swiz;
  r22.y = SS_DiffuseMap[]..swiz;
  r22.z = SS_DiffuseMap[]..swiz;
  r22.w = SS_DiffuseMap[]..swiz;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r23.xyzw, r21.x, l(16), t61.xyzw
  r23.x = SS_DiffuseMap[]..swiz;
  r23.y = SS_DiffuseMap[]..swiz;
  r23.z = SS_DiffuseMap[]..swiz;
  r23.w = SS_DiffuseMap[]..swiz;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r21.xyz, r21.x, l(32), t61.xyzx
  r21.x = SS_DiffuseMap[]..swiz;
  r21.y = SS_DiffuseMap[]..swiz;
  r21.z = SS_DiffuseMap[]..swiz;
    r22.xyz = r22.xyz + -r16.xyz;
    r12.w = dot(r22.xyz, r22.xyz);
    r14.w = rsqrt(r12.w);
    r24.xyz = r22.xyz * r14.www;
    r15.w = saturate(dot(r1.xyz, r24.xyz));
    r12.w = saturate(r12.w * r22.w);
    r12.w = sqrt(r12.w);
    r12.w = 1 + -r12.w;
    r12.w = r12.w * r12.w;
    r22.xyz = r22.xyz * r14.www + r18.xyz;
    r14.w = dot(r22.xyz, r22.xyz);
    r14.w = rsqrt(r14.w);
    r22.xyz = r22.xyz * r14.www;
    r14.w = r23.w * r4.w;
    r17.w = r4.w * 0.00999999978 + r23.w;
    r14.w = r14.w / r17.w;
    r14.w = max(1, r14.w);
    r17.w = saturate(dot(r22.xyz, r1.xyz));
    r17.w = log2(r17.w);
    r17.w = r17.w * r14.w;
    r17.w = exp2(r17.w);
    r22.xyz = r23.xyz * r15.www;
    r21.xyz = r21.xyz * r17.www;
    r15.w = log2(r15.w);
    r15.w = 0.100000001 * r15.w;
    r15.w = exp2(r15.w);
    r21.xyz = r21.xyz * r15.www;
    r21.xyz = r21.xyz * r12.www;
    r14.w = r14.w * 0.125 + 0.25;
    r19.xyz = r22.xyz * r12.www + r19.xyz;
    r20.xyz = r21.xyz * r14.www + r20.xyz;
    r10.w = r13.w;
    r1.w = r11.w;
  }
  r10.w = dot(r16.xyz, r16.xyz);
  r10.w = rsqrt(r10.w);
  r17.xyw = r16.xyz * r10.www;
  r10.w = dot(r17.xyw, r1.xyz);
  r10.w = r10.w + r10.w;
  r17.xyw = r1.xyz * -r10.www + r17.xyw;
  r10.w = (uint)r17.z >> 16;
  r16.w = 1;
  r21.zw = float2(1,1);
  r22.xyz = r19.xyz;
  r23.xyz = r20.xyz;
  r11.w = r1.w;
  r12.w = 0;
  while (true) {
    r13.w = cmp((uint)r12.w >= (uint)r10.w);
    if (r13.w != 0) break;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r24.xy, r11.w, l(0), t59.xyxx
  r24.x = SS_DiffuseMap[]..swiz;
  r24.y = SS_DiffuseMap[]..swiz;
    r13.w = (int)r11.w + 1;
    r14.w = (int)r5.w & (int)r24.y;
    r15.w = (int)r12.w + 1;
    r12.w = r14.w ? r12.w : r15.w;
    r11.w = r13.w;
    if (r14.w == 0) continue;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r25.xyzw, r24.x, l(0), t62.xyzw
  r25.x = SS_DiffuseMap[]..swiz;
  r25.y = SS_DiffuseMap[]..swiz;
  r25.z = SS_DiffuseMap[]..swiz;
  r25.w = SS_DiffuseMap[]..swiz;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyzw, r24.x, l(16), t62.xyzw
  r26.x = SS_DiffuseMap[]..swiz;
  r26.y = SS_DiffuseMap[]..swiz;
  r26.z = SS_DiffuseMap[]..swiz;
  r26.w = SS_DiffuseMap[]..swiz;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r24.yzw, r24.x, l(32), t62.xxyz
  r24.y = SS_DiffuseMap[]..swiz;
  r24.z = SS_DiffuseMap[]..swiz;
  r24.w = SS_DiffuseMap[]..swiz;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.xyzw, r24.x, l(60), t62.xyzw
  r27.x = SS_DiffuseMap[]..swiz;
  r27.y = SS_DiffuseMap[]..swiz;
  r27.z = SS_DiffuseMap[]..swiz;
  r27.w = SS_DiffuseMap[]..swiz;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r28.xyzw, r24.x, l(76), t62.yzwx
  r28.x = SS_DiffuseMap[]..swiz;
  r28.y = SS_DiffuseMap[]..swiz;
  r28.z = SS_DiffuseMap[]..swiz;
  r28.w = SS_DiffuseMap[]..swiz;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r29.xyzw, r24.x, l(92), t62.yzwx
  r29.x = SS_DiffuseMap[]..swiz;
  r29.y = SS_DiffuseMap[]..swiz;
  r29.z = SS_DiffuseMap[]..swiz;
  r29.w = SS_DiffuseMap[]..swiz;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r30.xyzw, r24.x, l(108), t62.xyzw
  r30.x = SS_DiffuseMap[]..swiz;
  r30.y = SS_DiffuseMap[]..swiz;
  r30.z = SS_DiffuseMap[]..swiz;
  r30.w = SS_DiffuseMap[]..swiz;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r31.w, r24.x, l(124), t62.xxxx
  r31.w = SS_DiffuseMap[]..swiz;
    r32.xyz = r27.yzw;
    r32.w = r28.w;
    r32.x = dot(r16.xyzw, r32.xyzw);
    r28.w = r29.w;
    r32.y = dot(r16.xyzw, r28.xyzw);
    r29.w = r30.x;
    r14.w = dot(r16.xyzw, r29.xyzw);
    r31.xyz = r30.yzw;
    r17.z = dot(r16.xyzw, r31.xyzw);
    r14.w = cmp(0 < r14.w);
    r25.xyz = r25.xyz + -r16.xyz;
    r18.w = dot(r25.xyz, r25.xyz);
    r19.w = rsqrt(r18.w);
    r27.yzw = r25.xyz * r19.www;
    r20.w = cmp(0 < r27.x);
    r22.w = r25.w * r25.w;
    r22.w = 1 / r22.w;
    r28.x = 1 / r18.w;
    r23.w = r28.x + -r22.w;
    r28.w = max(0, r23.w);
    r23.w = saturate(dot(r27.yzw, r1.xyz));
    r29.xy = r32.xy / r17.zz;
    r24.x = dot(r29.xy, r29.xy);
    r24.x = 1 + -r24.x;
    r28.y = max(0, r24.x);
    r18.w = r22.w * r18.w;
    r18.w = min(1, r18.w);
    r28.z = 1 + -r18.w;
    r17.z = r17.z / r25.w;
    r17.z = saturate(1 + -r17.z);
    r21.y = r28.y * r28.y;
    r21.x = r17.z * r17.z;
    r28.xyzw = r20.wwww ? r28.xyzw : r21.xyzw;
    r25.xyz = r25.xyz * r19.www + r18.xyz;
    r17.z = dot(r25.xyz, r25.xyz);
    r17.z = rsqrt(r17.z);
    r25.xyz = r25.xyz * r17.zzz;
    r17.z = r26.w * r4.w;
    r18.w = r4.w * 0.00999999978 + r26.w;
    r17.z = r17.z / r18.w;
    r17.z = max(1, r17.z);
    r18.w = saturate(dot(r25.xyz, r1.xyz));
    r18.w = log2(r18.w);
    r18.w = r18.w * r17.z;
    r18.w = exp2(r18.w);
    r25.xyz = r28.yyy * r28.wzx;
    r26.xyz = r26.xyz * r23.www;
    r28.xyz = r26.xyz * r25.xxx;
    r29.xyz = r24.yzw * r18.www;
    r18.w = log2(r23.w);
    r18.w = 0.100000001 * r18.w;
    r18.w = exp2(r18.w);
    r29.xyz = r29.xyz * r18.www;
    r25.xyw = r29.xyz * r25.yyy;
    r18.w = 0.25 * r17.z;
    r17.z = r17.z * 0.125 + 0.25;
    r25.xyw = r25.xyw * r17.zzz;
    r19.w = saturate(dot(r27.yzw, r17.xyw));
    r19.w = log2(r19.w);
    r18.w = r19.w * r18.w;
    r18.w = exp2(r18.w);
    r17.z = r18.w * r17.z;
    r26.xyz = r26.xyz * r25.zzz;
    r24.xyz = r24.yzw * r17.zzz;
    r24.xyz = r24.xyz * r25.zzz;
    r26.xyz = r20.www ? r28.xyz : r26.xyz;
    r24.xyz = r20.www ? r25.xyw : r24.xyz;
    r25.xyz = r14.www ? r26.xyz : 0;
    r24.xyz = r14.www ? r24.xyz : 0;
    r22.xyz = r25.xyz + r22.xyz;
    r23.xyz = r24.xyz + r23.xyz;
    r12.w = r15.w;
    r11.w = r13.w;
  }
  r1.xyz = -r4.xyz * float3(0.5,0.5,0.5) + float3(1,1,1);
  r1.xyz = r22.xyz * r1.xyz + r15.xyz;
  r4.xyz = r23.xyz * r12.xyz + r6.xyz;
  r8.xyzw = FC_WaterDiffuseUvScrollSpeed.xyzw * FC_GlobalTime + r8.xyzw;
  r6.xy = r8.xy * FC_TextureTilingScale[0].xy + FC_TextureTilingScale[0].zw;
  r8.xy = r8.zw * FC_TextureTilingScale[7].xy + FC_TextureTilingScale[7].zw;
  r12.xyzw = g_DiffuseTexture.Sample(SS_DiffuseMap_s, r6.xy).xyzw;
  r8.xyzw = g_DiffuseTexture2.Sample(SS_DiffuseMap_s, r8.xy).xyzw;
  r8.xyzw = r8.xyzw + -r12.xyzw;
  r8.xyzw = r2.wwww * r8.xyzw + r12.xyzw;
  r12.xyz = r8.xyz;
  r12.w = v5.w;
  r15.x = 1;
  r15.w = v5.w;
  r12.xyzw = r15.xxxw * r12.xyzw;
  r15.xyz = FC_DifMapMulCol.xyz * r12.xyz;
  r8.w = r12.w * r8.w;
  r15.w = FC_WaterFresnel.z;
  r12.xyzw = -r15.xyzw + r3.xyzw;
  r12.xyzw = r3.wwww * r12.xyzw + r15.xyzw;
  r1.w = dot(r7.xyz, r2.xyz);
  r1.w = FC_WaterFogParam0.w * r1.w;
  r9.x = r1.w * r9.w + r9.y;
  r2.xyzw = g_RefractionTexture.Sample(SS_ClampLinear_s, r9.xz).xyzw;
  r3.xyz = g_RefractionTexture.Sample(SS_ClampLinear_s, r9.yz).xyz;
  r1.w = cmp(r2.w == 0.000000);
  r6.xyz = r3.xyz + -r2.xyz;
  r2.xyz = r3.www * r6.xyz + r2.xyz;
  r2.xyz = r1.www ? r2.xyz : r3.xyz;
  r4.xyz = r13.xyz * r6.www + r4.xyz;
  r1.xyz = r14.xyz * r7.www + r1.xyz;
  r6.xyz = r11.xyz * r4.xyz;
  r2.xyz = r7.www * r2.xyz;
  r7.xyz = r12.xyz * r1.xyz + -r2.xyz;
  r2.xyz = r12.www * r7.xyz + r2.xyz;
  r8.xyz = r11.xyz * r4.xyz + r2.xyz;
  r12.xyz = r12.xyz * r1.xyz + r6.xyz;
  r1.xyzw = r12.xyzw + -r8.xyzw;
  r1.xyzw = r3.wwww * r1.xyzw + r8.xyzw;
  r2.xyzw = VC_InstanceData[r0.w].mulCol.xyzw * r1.xyzw;
  r4.x = FC_HeightFogParam.w + r10.y;
  r4.x = -FC_HeightFogParam.y + r4.x;
  r4.x = saturate(FC_HeightFogParam.z * r4.x);
  r4.y = dot(r10.xz, r10.xz);
  r4.y = sqrt(r4.y);
  r4.y = -FC_ExtFogParam.y + r4.y;
  r4.y = FC_ExtFogParam.z * r4.y;
  r4.y = exp2(-r4.y);
  r4.y = saturate(-r4.y * FC_ExtFogParam.x + FC_ExtFogParam.x);
  r4.x = saturate(FC_HeightFogParam.x * r4.x);
  r4.z = dot(r2.xyz, float3(0.298909992,0.586610019,0.114480004));
  r4.z = -1 + r4.z;
  r4.w = FC_FogCol.w * r4.z + 1;
  r4.z = FC_HeightFogCol.w * r4.z + 1;
  r6.xyz = FC_FogCol.xyz * r4.www + -r2.xyz;
  r6.xyz = r4.yyy * r6.xyz + r2.xyz;
  r4.yzw = FC_HeightFogCol.xyz * r4.zzz + -r6.xyz;
  r2.xyz = r4.xxx * r4.yzw + r6.xyz;
  r1.xyzw = r1.xyzw * VC_InstanceData[r0.w].mulCol.xyzw + -r2.xyzw;
  r1.xyzw = r3.wwww * r1.xyzw + r2.xyzw;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r9.yz).x;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = -v8.w + r0.w;
  r0.x = saturate(dot(r5.xyz, r0.xyz));
  r0.y = FC_WaterFadeParam.x + -FC_WaterFresnel.w;
  r0.x = r0.x * r0.y + FC_WaterFresnel.w;
  r0.x = saturate(r0.w * r0.x);
  r0.yzw = r1.xyz + -r3.xyz;
  r0.xyz = r0.xxx * r0.yzw + r3.xyz;
  r0.w = r1.w;
  r1.xyzw = r1.xyzw + -r0.xyzw;
  o0.xyzw = r3.wwww * r1.xyzw + r0.xyzw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions: 
//
// cbuffer cbTextureTilingScale
// {
//
//   float4 FC_TextureTilingScale[25];  // Offset:    0 Size:   400
//
// }
//
// cbuffer cbMatDynParam
// {
//
//   bool FC_isDitherAlpha;             // Offset:    0 Size:     4 [unused]
//   float FC_TranslucencyScale;        // Offset:   16 Size:     4 [unused]
//   float4 FC_EmissiveColor;           // Offset:   32 Size:    16 [unused]
//   float4 FC_BlendMaskParam;          // Offset:   48 Size:    16 [unused]
//   float FC_PomHeightScale;           // Offset:   64 Size:     4 [unused]
//   float FC_PomHeightBias;            // Offset:   68 Size:     4 [unused]
//   float FC_PomMinSamples;            // Offset:   72 Size:     4 [unused]
//   float FC_PomMaxSamples;            // Offset:   76 Size:     4 [unused]
//   float FC_PomShadowSoftening;       // Offset:   80 Size:     4 [unused]
//   bool FC_bPomDisplayShadows;        // Offset:   84 Size:     4 [unused]
//   float4 FC_ParallaxParam;           // Offset:   96 Size:    16
//   float FC_Pom2HeightScale;          // Offset:  112 Size:     4 [unused]
//   float FC_Pom2HeightBias;           // Offset:  116 Size:     4 [unused]
//   float FC_Pom2MinSamples;           // Offset:  120 Size:     4 [unused]
//   float FC_Pom2MaxSamples;           // Offset:  124 Size:     4 [unused]
//   bool VC_isEnableCloth;             // Offset:  128 Size:     4 [unused]
//   float FC_EnvMapDolBlendRate;       // Offset:  144 Size:     4 [unused]
//   float4 FC_SnowMaskParam;           // Offset:  160 Size:    16 [unused]
//   float FC_FROZEN_THRESHOLD;         // Offset:  176 Size:     4 [unused]
//   float FC_FROZEN_POW;               // Offset:  180 Size:     4 [unused]
//   float FC_BlendRate;                // Offset:  192 Size:     4 [unused]
//   float4 FC_FlowMapUvTiling;         // Offset:  208 Size:    16 [unused]
//   float4 FC_FlowMapIntencity;        // Offset:  224 Size:    16 [unused]
//   float FC_SoftVolume;               // Offset:  240 Size:     4 [unused]
//   float FC_PointCloudRate;           // Offset:  256 Size:     4 [unused]
//   float4 FC_WaterNormalUvScrollSpeed;// Offset:  272 Size:    16
//   float4 FC_WaterDiffuseUvScrollSpeed;// Offset:  288 Size:    16
//   float4 FC_WaterMiddleUvScrollSpeed;// Offset:  304 Size:    16
//   float4 FC_WaterFogParam0;          // Offset:  320 Size:    16
//   float4 FC_WaterFogParam1;          // Offset:  336 Size:    16 [unused]
//   float4 FC_WaterFresnel;            // Offset:  352 Size:    16
//   float4 FC_WaterFadeParam;          // Offset:  368 Size:    16
//   float4 FC_DynamicDiffuseColor;     // Offset:  384 Size:    16 [unused]
//   float FC_SSS_ID;                   // Offset:  400 Size:     4 [unused]
//   float4 FC_PhantomEdgeColor;        // Offset:  416 Size:    16 [unused]
//   float4 FC_PhantomFrontColor;       // Offset:  432 Size:    16 [unused]
//   float4 FC_PhantomDiffColor;        // Offset:  448 Size:    16 [unused]
//   float4 FC_PhantomSpecColor;        // Offset:  464 Size:    16 [unused]
//   float4 FC_PhantomLightColor;       // Offset:  480 Size:    16 [unused]
//   float VC_VelocityOffset;           // Offset:  496 Size:     4 [unused]
//   float4 FC_DamagedNormalParam;      // Offset:  512 Size:    16 [unused]
//   float4 FC_DamagedNormalUvTiling;   // Offset:  528 Size:    16 [unused]
//   float4 FC_DamagedNormal2UvTiling;  // Offset:  544 Size:    16 [unused]
//   float4 FC_WetDiffuseColor;         // Offset:  560 Size:    16 [unused]
//   float4 FC_WetParam1;               // Offset:  576 Size:    16 [unused]
//   float4 FC_WetRefrectanceColor;     // Offset:  592 Size:    16 [unused]
//   float4 FC_WetParam2;               // Offset:  608 Size:    16 [unused]
//
// }
//
// cbuffer cbMtdParam
// {
//
//   float4 FC_DifMapMulCol;            // Offset:    0 Size:    16
//   float4 FC_SpcMapMulCol;            // Offset:   16 Size:    16
//   float4 FC_SpcParam;                // Offset:   32 Size:    16
//   float4 FC_SSAOParam;               // Offset:   48 Size:    16 [unused]
//   float3 FC_CDRFParam;               // Offset:   64 Size:    12 [unused]
//   float4 FC_AlphaRef;                // Offset:   80 Size:    16 [unused]
//   float FC_BloodAmount;              // Offset:   96 Size:     4 [unused]
//   float4 old_FC_ParallaxParam;       // Offset:  112 Size:    16 [unused]
//   float FC_IOR;                      // Offset:  128 Size:     4 [unused]
//   float4 FC_GlowScale;               // Offset:  144 Size:    16 [unused]
//   float4 FC_GhostEdgeColor;          // Offset:  160 Size:    16 [unused]
//   float4 FC_GhostEdgeParam;          // Offset:  176 Size:    16 [unused]
//   float4 FC_BmpBlendParam0;          // Offset:  192 Size:    16 [unused]
//   float4 FC_BmpBlendParam1;          // Offset:  208 Size:    16 [unused]
//   float FC_UNUSED_SSS_ID;            // Offset:  224 Size:     4 [unused]
//   float4 FC_HairSpecularParam0;      // Offset:  320 Size:    16 [unused]
//   float4 FC_HairSpecularParam1;      // Offset:  336 Size:    16 [unused]
//   float4 FC_HairSpecularParam2;      // Offset:  352 Size:    16 [unused]
//   float4 FC_RimLightingParam;        // Offset:  368 Size:    16 [unused]
//
// }
//
// cbuffer cbSceneParam
// {
//
//   float4 FC_FarClipInfo;             // Offset:    0 Size:    16 [unused]
//   float4 FC_ScreenSize;              // Offset:   16 Size:    16
//   float4 FC_DepthComputeParam;       // Offset:   32 Size:    16
//   float4 SC_CameraPos;               // Offset:   48 Size:    16 [unused]
//   float4 VC_ClipPlane;               // Offset:   64 Size:    16 [unused]
//   float4x3 FC_MatrixView;            // Offset:   80 Size:    48
//   float4x4 FC_MatrixInvViewProj;     // Offset:  128 Size:    64
//   float4x4 FC_MatrixInvProj;         // Offset:  192 Size:    64
//   float4x4 FC_MatrixProj;            // Offset:  256 Size:    64 [unused]
//   float4x4 FC_MatrixInvView;         // Offset:  320 Size:    64
//   float4x4 VC_MatrixViewProj;        // Offset:  384 Size:    64 [unused]
//   float4 FC_ShadowMapParam;          // Offset:  448 Size:    16 [unused]
//   float4 FC_ShadowColor;             // Offset:  464 Size:    16 [unused]
//   float4 FC_ShadowDir;               // Offset:  480 Size:    16 [unused]
//   float4x4 VC_ShadowMapMatrix;       // Offset:  496 Size:    64 [unused]
//   float FC_ShadowDepthRate;          // Offset:  560 Size:     4 [unused]
//   float FC_ShadowDepthScale;         // Offset:  564 Size:     4 [unused]
//   float FC_ShadowKernelScale;        // Offset:  568 Size:     4 [unused]
//   float FC_ShadowRandTexInvScale;    // Offset:  572 Size:     4 [unused]
//   float FC_ShadowTexInvScaleX;       // Offset:  576 Size:     4 [unused]
//   float FC_ShadowTexInvScaleY;       // Offset:  580 Size:     4 [unused]
//   float FC_ShadowDepthOffsetScale;   // Offset:  584 Size:     4 [unused]
//   float4 FC_ShadowViewKernelScale;   // Offset:  592 Size:    16 [unused]
//   float4x4 FC_ProjSpaceToShadowMatrix[4];// Offset:  608 Size:   256 [unused]
//   float4 FC_CascadeSelectDist;       // Offset:  864 Size:    16 [unused]
//   float FC_FrustumNear;              // Offset:  880 Size:     4
//   float FC_FrustumSliceScale;        // Offset:  884 Size:     4
//   float FC_FrustumSliceBias;         // Offset:  888 Size:     4
//   uint FC_LightTile_Width;           // Offset:  896 Size:     4
//   uint FC_LightTile_NumCellX;        // Offset:  900 Size:     4
//   float4 FC_CloudShadowParam0;       // Offset:  912 Size:    16 [unused]
//   float4 FC_CloudShadowParam1;       // Offset:  928 Size:    16 [unused]
//   float FC_ShadowScale0;             // Offset:  944 Size:     4 [unused]
//   float FC_ShadowScale1;             // Offset:  948 Size:     4 [unused]
//
// }
//
// cbuffer cbPerFrame
// {
//
//   float4 FC_DebugParam;              // Offset:    0 Size:    16 [unused]
//   float4 FC_DebugOutputMode;         // Offset:   16 Size:    16 [unused]
//   float4 FC_DebugParam2;             // Offset:   32 Size:    16 [unused]
//   float FC_GlobalSpecularMask;       // Offset:   48 Size:     4
//   float FC_GlobalReflectanceScale;   // Offset:   52 Size:     4 [unused]
//   float FC_GlobalShininessScale;     // Offset:   56 Size:     4 [unused]
//   float FC_GlobalAlbedoOffset;       // Offset:   60 Size:     4 [unused]
//   float4 FC_GlobalRefRectanceRGBScale;// Offset:   64 Size:    16 [unused]
//   float4 FC_GlobalAlbedoOffsetRGB;   // Offset:   80 Size:    16 [unused]
//   float4 FC_SnowDir;                 // Offset:   96 Size:    16 [unused]
//   float4 FC_SnowTilingScale;         // Offset:  112 Size:    16 [unused]
//   float4 FC_SnowAlbedo;              // Offset:  128 Size:    16 [unused]
//   float FC_SnowReflectance;          // Offset:  144 Size:     4 [unused]
//   float FC_GroundPlaneHeight;        // Offset:  148 Size:     4 [unused]
//   float FC_RcpSnowHeightRange;       // Offset:  152 Size:     4 [unused]
//   float FC_SnowNormalScale;          // Offset:  156 Size:     4 [unused]
//   float4 FC_SnowSpakleTinlingScale;  // Offset:  160 Size:    16 [unused]
//   float FC_GlobalTime;               // Offset:  176 Size:     4
//   float FC_DominantSharpnesMinValue; // Offset:  192 Size:     4 [unused]
//   float FC_DominantSharpnesOffset;   // Offset:  196 Size:     4 [unused]
//   float FC_DominantSharpnesExponent; // Offset:  200 Size:     4 [unused]
//   float FC_DominantColorScale;       // Offset:  204 Size:     4 [unused]
//   float4 FC_DominantRgbScale;        // Offset:  208 Size:    16 [unused]
//
// }
//
// cbuffer cbInstanceData
// {
//
//   struct PerInstanceData
//   {
//       
//       float4x3 mWorld;               // Offset:    0
//       float4 atlasUvScaleOffset;     // Offset:   48
//       float4 userClipPlane;          // Offset:   64
//       uint4 matricesData;            // Offset:   80
//       uint envData;                  // Offset:   96
//       bool dynamicLightDisable;      // Offset:  100
//       uint2 envPad;                  // Offset:  104
//       float4 mulCol;                 // Offset:  112
//       float4 aSh[3];                 // Offset:  128
//       float4 ShLightMask;            // Offset:  176
//       float4 vDominantRotateParam;   // Offset:  192
//       float4 parallaxCorrectedCubemapOrigin_envMapInterpRatio;// Offset:  208
//       float4 parallaxCorrectedCubemapAabbMin_envMapColorScale0;// Offset:  224
//       float4 parallaxCorrectedCubemapAabbMax_envMapColorScale1;// Offset:  240
//       float ditherFadeAlpha;         // Offset:  256
//
//   } VC_InstanceData[2];              // Offset:    0 Size:   532
//
// }
//
// cbuffer cbLight
// {
//
//   float4 FC_DirLightVec_0;           // Offset:    0 Size:    16
//   float4 FC_DirLightVec_1;           // Offset:   16 Size:    16
//   float4 FC_DirLightVec_2;           // Offset:   32 Size:    16 [unused]
//   float4 FC_DirLightVec_3;           // Offset:   48 Size:    16 [unused]
//   float4 FC_DirLightCol_0;           // Offset:   64 Size:    16
//   float4 FC_DirLightCol_1;           // Offset:   80 Size:    16
//   float4 FC_DirLightCol_2;           // Offset:   96 Size:    16 [unused]
//   float4 FC_DirLightCol_3;           // Offset:  112 Size:    16 [unused]
//   float4 FC_DirLightSpc_0;           // Offset:  128 Size:    16
//   float4 FC_DirLightSpc_1;           // Offset:  144 Size:    16
//   float4 FC_DirLightSpc_2;           // Offset:  160 Size:    16 [unused]
//   float4 FC_DirLightSpc_3;           // Offset:  176 Size:    16 [unused]
//   float4 FC_AmbientSH[3];            // Offset:  192 Size:    48
//   float4 FC_AmbientReflection;       // Offset:  240 Size:    16 [unused]
//   uint4 FC_bLocalLight;              // Offset:  256 Size:    16 [unused]
//   float4 FC_SsaoWeight;              // Offset:  272 Size:    16 [unused]
//
// }
//
// cbuffer cbFog
// {
//
//   float4 FC_FogParam;                // Offset:    0 Size:    16 [unused]
//   float4 FC_FogCol;                  // Offset:   16 Size:    16
//   float4 FC_ExtFogParam;             // Offset:   32 Size:    16
//   float4 FC_HeightFogParam;          // Offset:   48 Size:    16
//   float4 FC_HeightFogCol;            // Offset:   64 Size:    16
//   bool FC_FogType;                   // Offset:   80 Size:     4 [unused]
//   float4 FC_LsBeta1PlusBeta2;        // Offset:   96 Size:    16 [unused]
//   float4 FC_LsTerrainReflectance;    // Offset:  112 Size:    16 [unused]
//   float4 FC_LsOneOverBeta1PlusBeta2; // Offset:  128 Size:    16 [unused]
//   float4 FC_LsHGg;                   // Offset:  144 Size:    16 [unused]
//   float4 FC_LsBetaDash1;             // Offset:  160 Size:    16 [unused]
//   float4 FC_LsBetaDash2;             // Offset:  176 Size:    16 [unused]
//   float4 FC_LsSunColor;              // Offset:  192 Size:    16 [unused]
//   float4 FC_LsLightDir;              // Offset:  208 Size:    16 [unused]
//
// }
//
// Resource bind info for g_LightIndices
// {
//
//   uint2 $Element;                    // Offset:    0 Size:     8
//
// }
//
// Resource bind info for g_LightLookupBuffer
// {
//
//   uint3 $Element;                    // Offset:    0 Size:    12
//
// }
//
// Resource bind info for g_LightBuffer
// {
//
//   struct PointLight
//   {
//       
//       float4 PositionAndRadius;      // Offset:    0
//       float4 DiffColor;              // Offset:   16
//       float4 SpecColor;              // Offset:   32
//       float4 TransLightParam;        // Offset:   48
//
//   } $Element;                        // Offset:    0 Size:    64
//
// }
//
// Resource bind info for g_SpotLightBuffer
// {
//
//   struct SpotLight
//   {
//       
//       float4 PositionAndRange;       // Offset:    0
//       float4 DiffColor;              // Offset:   16
//       float4 SpecColor;              // Offset:   32
//       float3 TransLightParam;        // Offset:   48
//       float ShadingMode;             // Offset:   60
//       float4x4 ViewToLightSpaceMatrix;// Offset:   64
//
//   } $Element;                        // Offset:    0 Size:   128
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SS_DiffuseMap                     sampler      NA          NA    0        1
// SS_SpecularMap                    sampler      NA          NA    1        1
// SS_BumpMap                        sampler      NA          NA    2        1
// SS_ClampPoint                     sampler      NA          NA    7        1
// SS_ClampLinear                    sampler      NA          NA    9        1
// g_DiffuseTexture                  texture  float4          2d    0        1
// g_SpecularTexture                 texture  float4          2d    1        1
// g_BumpmapTexture                  texture  float4          2d    3        1
// g_DiffuseTexture2                 texture  float4          2d    7        1
// g_SpecularTexture2                texture  float4          2d    8        1
// g_BumpmapTexture2                 texture  float4          2d   10        1
// g_BumpmapTexture3                 texture  float4          2d   16        1
// g_BumpmapTexture4                 texture  float4          2d   18        1
// g_SpecularTexture3                texture  float4          2d   19        1
// g_DiffuseTexture3                 texture  float4          2d   20        1
// g_ReflectionTexture               texture  float4          2d   54        1
// g_RefractionTexture               texture  float4          2d   55        1
// g_DepthTexture                    texture  float4          2d   56        1
// g_WaterInteractTexture            texture  float4          2d   57        1
// g_WaterNormalTexture              texture  float4          2d   58        1
// g_LightIndices                    texture  struct         r/o   59        1
// g_LightLookupBuffer               texture  struct         r/o   60        1
// g_LightBuffer                     texture  struct         r/o   61        1
// g_SpotLightBuffer                 texture  struct         r/o   62        1
// cbTextureTilingScale              cbuffer      NA          NA    1        1
// cbMatDynParam                     cbuffer      NA          NA    2        1
// cbMtdParam                        cbuffer      NA          NA    3        1
// cbInstanceData                    cbuffer      NA          NA    4        1
// cbLight                           cbuffer      NA          NA    5        1
// cbFog                             cbuffer      NA          NA    6        1
// cbSceneParam                      cbuffer      NA          NA    8        1
// cbPerFrame                        cbuffer      NA          NA    9        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xy  
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 2   xyzw        2     NONE   float   xyzw
// TEXCOORD                 3   xyzw        3     NONE   float       
// TEXCOORD                 4   xyzw        4     NONE   float       
// COLOR                    1   xyzw        5     NONE   float   x zw
// TEXCOORD                 8   xyzw        6     NONE   float   xyzw
// TEXCOORD                 9   xyzw        7     NONE   float   xyzw
// TEXCOORD                11   xyzw        8     NONE   float   xyzw
// TEXCOORD                 5   xy          9     NONE   float   xy  
// TEXCOORD                 6     z         9     NONE   float     z 
// SV_IsFrontFace           0   x          10    FFACE    uint   x   
//
//
// 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 cb1[21], immediateIndexed
dcl_constantbuffer cb2[24], immediateIndexed
dcl_constantbuffer cb3[3], immediateIndexed
dcl_constantbuffer cb8[57], immediateIndexed
dcl_constantbuffer cb9[12], immediateIndexed
dcl_constantbuffer cb4[34], dynamicIndexed
dcl_constantbuffer cb5[15], immediateIndexed
dcl_constantbuffer cb6[5], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s7, mode_default
dcl_sampler s9, 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) t3
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture2d (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t10
dcl_resource_texture2d (float,float,float,float) t16
dcl_resource_texture2d (float,float,float,float) t18
dcl_resource_texture2d (float,float,float,float) t19
dcl_resource_texture2d (float,float,float,float) t20
dcl_resource_texture2d (float,float,float,float) t54
dcl_resource_texture2d (float,float,float,float) t55
dcl_resource_texture2d (float,float,float,float) t56
dcl_resource_texture2d (float,float,float,float) t57
dcl_resource_texture2d (float,float,float,float) t58
dcl_resource_structured t59, 8 
dcl_resource_structured t60, 12 
dcl_resource_structured t61, 64 
dcl_resource_structured t62, 128 
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v5.xzw
dcl_input_ps linear v6.xyzw
dcl_input_ps linear v7.xyzw
dcl_input_ps linear v8.xyzw
dcl_input_ps linear v9.xy
dcl_input_ps linear v9.z
dcl_input_ps_sgv v10.x, is_front_face
dcl_output o0.xyzw
dcl_temps 33
dp3 r0.x, v1.xyzx, v1.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, v1.xyzx
dp3 r0.w, v2.xyzx, v2.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, v2.xyzx
mul r2.xyz, r0.zxyz, r1.yzxy
mad r2.xyz, r0.yzxy, r1.zxyz, -r2.xyzx
mul r2.xyz, r2.xyzx, v2.wwww
dp3 r0.w, r2.xyzx, r2.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, r2.xyzx
round_ne r0.w, v1.w
ftou r0.w, r0.w
mad r3.xy, v7.zwzz, cb1[20].xyxx, cb1[20].zwzz
sample_indexable(texture2d)(float,float,float,float) r3.xyzw, r3.xyxx, t20.xyzw, s0
mad r4.xy, v7.zwzz, cb1[19].xyxx, cb1[19].zwzz
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r4.xyxx, t19.xyzw, s1
dp4 r5.x, v8.xyzw, cb8[8].xyzw
dp4 r5.y, v8.xyzw, cb8[9].xyzw
dp4 r5.z, v8.xyzw, cb8[10].xyzw
dp4 r1.w, v8.xyzw, cb8[11].xyzw
div r5.xyz, r5.xyzx, r1.wwww
add r6.x, -r5.x, cb8[20].w
add r6.y, -r5.y, cb8[21].w
add r6.z, -r5.z, cb8[22].w
dp3 r1.w, r6.xyzx, r6.xyzx
rsq r1.w, r1.w
mul r5.xyz, r1.wwww, r6.xyzx
dp3 r7.x, r2.xyzx, r6.xyzx
dp3 r7.y, r1.xyzx, r6.xyzx
dp3 r7.z, r0.xyzx, r6.xyzx
dp3 r2.w, r7.xyzx, r7.xyzx
rsq r2.w, r2.w
mul r7.xy, r2.wwww, r7.xyxx
mad r8.xyzw, cb2[17].xyzw, cb9[11].xxxx, v6.xyzw
mad r7.zw, r8.xxxy, cb1[3].xxxy, cb1[3].zzzw
sample_indexable(texture2d)(float,float,float,float) r2.w, r7.zwzz, t3.xyzw, s2
mad r7.zw, r8.zzzw, cb1[10].xxxy, cb1[10].zzzw
sample_indexable(texture2d)(float,float,float,float) r4.w, r7.zwzz, t10.xyzw, s2
add r2.w, -r2.w, l(1.000000)
add r4.w, -r4.w, l(1.000000)
mad r2.w, -r2.w, r4.w, l(1.000000)
mad r7.zw, cb2[19].xxxy, cb9[11].xxxx, v7.xxxy
mad r7.zw, r7.zzzw, cb1[16].xxxy, cb1[16].zzzw
sample_indexable(texture2d)(float,float,float,float) r4.w, r7.zwzz, t16.xyzw, s2
add r2.w, -r2.w, l(1.000000)
add r4.w, -r4.w, l(1.000000)
mad r2.w, -r2.w, r4.w, l(1.000000)
mad r4.w, r2.w, cb2[6].x, cb2[6].y
mad r2.w, -r2.w, r2.w, l(1.000000)
add r5.w, -v5.z, l(1.000000)
mad r2.w, -r2.w, r5.w, l(1.000000)
mad r8.xyzw, r7.xyxy, r4.wwww, v6.xyzw
mad r7.xy, r7.xyxx, r4.wwww, v7.xyxx
mul r9.yz, v0.xxyx, cb8[1].zzwz
movc r0.xyz, v10.xxxx, r0.xyzx, -r0.xyzx
mad r10.xyzw, cb2[17].xyzw, cb9[11].xxxx, r8.xyzw
mad r7.zw, r10.xxxy, cb1[3].xxxy, cb1[3].zzzw
sample_indexable(texture2d)(float,float,float,float) r7.zw, r7.zwzz, t3.zwxy, s2
mad r10.xy, r10.zwzz, cb1[10].xyxx, cb1[10].zwzz
sample_indexable(texture2d)(float,float,float,float) r10.xy, r10.xyxx, t10.xyzw, s2
mad r7.xy, cb2[19].xyxx, cb9[11].xxxx, r7.xyxx
mad r7.xy, r7.xyxx, cb1[16].xyxx, cb1[16].zwzz
sample_indexable(texture2d)(float,float,float,float) r7.xy, r7.xyxx, t16.xyzw, s2
mad r7.zw, r7.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mad r7.zw, r10.xxxy, l(0.000000, 0.000000, 2.000000, 2.000000), r7.zzzw
mad r7.xy, r7.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), r7.zwzz
add r7.xy, r7.xyxx, l(-2.000000, -2.000000, 0.000000, 0.000000)
dp2 r4.w, r7.xyxx, r7.xyxx
min r4.w, r4.w, l(1.000000)
add r4.w, -r4.w, l(1.000000)
sqrt r4.w, r4.w
mul r7.yzw, r1.xxyz, r7.yyyy
mad r7.xyz, r7.xxxx, r2.xyzx, r7.yzwy
mad r7.xyz, r4.wwww, r0.xyzx, r7.xyzx
dp3 r4.w, r7.xyzx, r7.xyzx
rsq r4.w, r4.w
mul r7.xyz, r4.wwww, r7.xyzx
sample_indexable(texture2d)(float,float,float,float) r4.w, r9.yzyy, t57.yzwx, s9
mad r10.xyzw, cb8[1].zwzw, l(2.000000, 0.000000, 0.000000, 2.000000), r9.yzyz
sample_indexable(texture2d)(float,float,float,float) r5.w, r10.xyxx, t57.yzwx, s9
sample_indexable(texture2d)(float,float,float,float) r6.w, r10.zwzz, t57.yzwx, s9
add r7.w, r4.w, -r5.w
add r9.w, r4.w, -r6.w
add r4.w, r4.w, r5.w
add r4.w, r6.w, r4.w
mad r4.w, r4.w, l(0.664063), l(-1.000000)
add r4.w, -|r4.w|, l(1.000000)
mad r4.w, -r4.w, r4.w, l(1.000000)
mov r10.xyz, -r6.xyzx
deriv_rtx_coarse r11.xyz, r10.xyzx
deriv_rty_coarse r12.xyz, r10.xyzx
dp3 r5.w, r11.xyzx, r11.xyzx
lt r6.w, l(0.000000), r5.w
rsq r5.w, r5.w
mul r11.xyz, r5.wwww, r11.xyzx
and r11.xyz, r6.wwww, r11.xyzx
dp3 r5.w, r12.xyzx, r12.xyzx
lt r6.w, l(0.000000), r5.w
rsq r5.w, r5.w
mul r12.xyz, r5.wwww, r12.xyzx
and r12.xyz, r6.wwww, r12.xyzx
mul r12.xyz, r9.wwww, r12.xyzx
mad r11.xyz, r7.wwww, r11.xyzx, r12.xyzx
add r11.xyz, r11.xyzx, l(0.000000, 1.000000, 0.000000, 0.000000)
dp3 r5.w, r11.xyzx, r11.xyzx
rsq r5.w, r5.w
mul r11.xy, r5.wwww, r11.xzxx
add r4.w, -r4.w, l(1.000000)
mul r11.xy, r11.xyxx, l(4.000000, 4.000000, 0.000000, 0.000000)
mad r7.xz, r7.xxzx, r4.wwww, r11.xxyx
dp3 r4.w, r7.xyzx, r7.xyzx
rsq r4.w, r4.w
mul r7.xyz, r4.wwww, r7.xyzx
sample_indexable(texture2d)(float,float,float,float) r11.xyz, v9.xyxx, t58.xyzw, s9
mad r11.xyz, r11.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r4.w, r11.xyzx, r11.xyzx
rsq r4.w, r4.w
mul r11.xyz, r4.wwww, r11.xyzx
add r4.w, -v9.z, l(1.000000)
mul r11.xyz, r11.xyzx, v9.zzzz
mad r7.xyz, r7.xyzx, r4.wwww, r11.xyzx
mad r11.xy, v7.zwzz, cb1[18].xyxx, cb1[18].zwzz
sample_indexable(texture2d)(float,float,float,float) r11.xy, r11.xyxx, t18.xyzw, s2
mad r11.xy, r11.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r4.w, r11.xyxx, r11.xyxx
min r4.w, r4.w, l(1.000000)
add r4.w, -r4.w, l(1.000000)
sqrt r11.z, r4.w
mad r11.xyz, r11.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r4.w, r11.xyzx, r11.xyzx
rsq r4.w, r4.w
mul r11.xy, r4.wwww, r11.xyxx
dp2 r4.w, r11.xyxx, r11.xyxx
min r4.w, r4.w, l(1.000000)
add r4.w, -r4.w, l(1.000000)
sqrt r4.w, r4.w
mul r11.yzw, r2.xxyz, r11.yyyy
mad r1.xyz, r11.xxxx, r1.xyzx, r11.yzwy
mad r1.xyz, r4.wwww, r0.xyzx, r1.xyzx
dp3 r4.w, r1.xyzx, r1.xyzx
rsq r4.w, r4.w
mad r1.xyz, r1.xyzx, r4.wwww, -r7.xyzx
mad r7.xyz, r3.wwww, r1.xyzx, r7.xyzx
dp3 r1.x, r7.xyzx, cb8[5].xyzx
dp3 r1.y, r7.xyzx, cb8[6].xyzx
dp3 r1.z, r7.xyzx, cb8[7].xyzx
mad r11.xy, r8.xyxx, cb1[1].xyxx, cb1[1].zwzz
sample_indexable(texture2d)(float,float,float,float) r11.xyz, r11.xyxx, t1.xyzw, s1
mad r12.xy, r8.zwzz, cb1[8].xyxx, cb1[8].zwzz
sample_indexable(texture2d)(float,float,float,float) r12.xyz, r12.xyxx, t8.xyzw, s1
mad r13.xy, r8.xyxx, cb1[3].xyxx, cb1[3].zwzz
sample_indexable(texture2d)(float,float,float,float) r11.w, r13.xyxx, t3.xywz, s2
mad r13.xy, r8.zwzz, cb1[10].xyxx, cb1[10].zwzz
sample_indexable(texture2d)(float,float,float,float) r12.w, r13.xyxx, t10.xywz, s2
add r12.xyzw, -r11.xyzw, r12.xyzw
mad r11.xyzw, r2.wwww, r12.xyzw, r11.xyzw
mul r4.w, l(0.003906), cb3[2].x
mul r4.w, r4.w, r11.w
mul r4.w, r4.w, l(13.000000)
exp r4.w, r4.w
add r4.xyz, r4.xyzx, -r11.xyzx
mad r4.xyz, r3.wwww, r4.xyzx, r11.xyzx
dp3 r5.w, r5.xyzx, r7.xyzx
mov_sat r6.w, r5.w
add r6.w, -r6.w, l(1.000000)
mul r9.w, r6.w, r6.w
mul r9.w, r9.w, r9.w
mul r6.w, r6.w, r9.w
add r11.xyz, -r4.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad r12.xyz, r11.xyzx, r6.wwww, r4.xyzx
add r6.w, -|r5.w|, l(1.000000)
max r6.w, r6.w, l(0.000000)
mul r9.w, r6.w, r6.w
mul r9.w, r9.w, r9.w
mul r6.w, r6.w, r9.w
mad r6.w, r6.w, cb2[22].x, cb2[22].y
mad r6.w, r3.w, -r6.w, r6.w
add r9.w, v8.w, l(10.000000)
div r9.w, l(10.000000), r9.w
mad r13.y, -v0.y, cb8[1].w, l(1.000000)
mul r10.w, r7.x, cb2[20].z
mad r13.x, r10.w, r9.w, r9.y
sample_indexable(texture2d)(float,float,float,float) r13.xyz, r13.xyxx, t54.xyzw, s9
mov r7.w, l(1.000000)
dp4 r14.x, r7.xyzw, cb5[12].xyzw
dp4 r14.y, r7.xyzw, cb5[13].xyzw
dp4 r14.z, r7.xyzw, cb5[14].xyzw
max r14.xyz, r14.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
add r7.w, -r6.w, l(1.000000)
imul null, r0.w, r0.w, l(17)
mul r15.xyz, cb5[4].xyzx, cb4[r0.w + 11].xxxx
mul r15.xyz, r15.xyzx, v5.xxxx
dp3 r16.x, cb5[0].xyzx, r7.xyzx
dp3 r16.y, cb5[1].xyzx, r7.xyzx
mov_sat r16.zw, r16.xxxy
mul r17.xyz, r11.xyzx, r16.zzzz
mul r18.xyz, r11.xyzx, r16.wwww
mul r18.xyz, r18.xyzx, cb5[5].xyzx
mad r15.xyz, r15.xyzx, r17.xyzx, r18.xyzx
mul r17.xyz, cb5[8].xyzx, cb4[r0.w + 11].xxxx
mul r17.xyz, r17.xyzx, v5.xxxx
mad r18.xyz, r6.xyzx, r1.wwww, cb5[0].xyzx
dp3 r10.w, r18.xyzx, r18.xyzx
rsq r10.w, r10.w
mul r18.xyz, r10.wwww, r18.xyzx
mad r6.xyz, r6.xyzx, r1.wwww, cb5[1].xyzx
dp3 r1.w, r6.xyzx, r6.xyzx
rsq r1.w, r1.w
mul r6.xyz, r1.wwww, r6.xyzx
dp3_sat r19.x, r18.xyzx, r7.xyzx
dp3_sat r19.y, r6.xyzx, r7.xyzx
mul r1.w, r4.w, cb5[0].w
mad r10.w, r4.w, l(0.010000), cb5[0].w
div r1.w, r1.w, r10.w
max r20.x, r1.w, l(1.000000)
mul r1.w, r4.w, cb5[1].w
mad r10.w, r4.w, l(0.010000), cb5[1].w
div r1.w, r1.w, r10.w
max r20.y, r1.w, l(1.000000)
log r19.xy, r19.xyxx
mul r19.xy, r19.xyxx, r20.xyxx
exp r19.xy, r19.xyxx
dp3_sat r18.x, r5.xyzx, r18.xyzx
dp3_sat r18.y, r5.xyzx, r6.xyzx
add r6.xy, -r18.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
mul r18.xy, r6.xyxx, r6.xyxx
mul r18.xy, r18.xyxx, r18.xyxx
mul r6.xy, r6.xyxx, r18.xyxx
mad r18.xyz, r6.xxxx, r11.xyzx, r4.xyzx
mad r6.xyz, r6.yyyy, r11.xyzx, r4.xyzx
max r11.xy, r5.wwww, r16.xyxx
max r11.xy, r11.xyxx, l(0.000100, 0.000100, 0.000000, 0.000000)
div r11.xy, r16.zwzz, r11.xyxx
mul r16.xyz, r18.xyzx, r19.xxxx
mul r11.xzw, r11.xxxx, r16.xxyz
mul r6.xyz, r6.xyzx, r19.yyyy
mul r6.xyz, r11.yyyy, r6.xyzx
mad r16.xy, r20.xyxx, l(0.125000, 0.125000, 0.000000, 0.000000), l(0.250000, 0.250000, 0.000000, 0.000000)
mul r16.xzw, r17.xxyz, r16.xxxx
mul r17.xyz, r16.yyyy, cb5[9].xyzx
mul r6.xyz, r6.xyzx, r17.xyzx
mad r6.xyz, r16.xzwx, r11.xzwx, r6.xyzx
mul r11.xyz, cb3[1].xyzx, cb9[3].xxxx
dp4 r16.x, v8.xyzw, cb8[12].xyzw
dp4 r16.y, v8.xyzw, cb8[13].xyzw
dp4 r16.z, v8.xyzw, cb8[14].xyzw
dp4 r1.w, v8.xyzw, cb8[15].xyzw
div r16.xyz, r16.xyzx, r1.wwww
mul r17.xy, r9.yzyy, cb8[1].xyxx
ftou r17.xy, r17.xyxx
udiv r17.xy, null, r17.xyxx, cb8[56].xxxx
utof r17.xy, r17.xyxx
utof r1.w, cb8[56].y
mad r1.w, r17.y, r1.w, r17.x
ftou r1.w, r1.w
add r5.w, r16.z, -cb8[55].x
log r5.w, r5.w
add r5.w, r5.w, -cb8[55].z
div r5.w, r5.w, cb8[55].y
max r5.w, r5.w, l(0.000000)
min r5.w, r5.w, l(14.000000)
ftou r5.w, r5.w
ishl r5.w, l(1), r5.w
ld_structured_indexable(structured_buffer, stride=12)(mixed,mixed,mixed,mixed) r17.xyz, r1.w, l(0), t60.xyzx
dp3 r1.w, -r16.xyzx, -r16.xyzx
rsq r1.w, r1.w
mul r18.xyz, r1.wwww, -r16.xyzx
mov r19.xyz, l(0,0,0,0)
mov r20.xyz, l(0,0,0,0)
mov r1.w, r17.x
mov r10.w, l(0)
loop 
  uge r11.w, r10.w, r17.y
  breakc_nz r11.w
  ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r21.xy, r1.w, l(0), t59.xyxx
  iadd r11.w, r1.w, l(1)
  and r12.w, r5.w, r21.y
  iadd r13.w, r10.w, l(1)
  movc r10.w, r12.w, r10.w, r13.w
  mov r1.w, r11.w
  continuec_z r12.w
  ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r22.xyzw, r21.x, l(0), t61.xyzw
  ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r23.xyzw, r21.x, l(16), t61.xyzw
  ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r21.xyz, r21.x, l(32), t61.xyzx
  add r22.xyz, -r16.xyzx, r22.xyzx
  dp3 r12.w, r22.xyzx, r22.xyzx
  rsq r14.w, r12.w
  mul r24.xyz, r14.wwww, r22.xyzx
  dp3_sat r15.w, r1.xyzx, r24.xyzx
  mul_sat r12.w, r22.w, r12.w
  sqrt r12.w, r12.w
  add r12.w, -r12.w, l(1.000000)
  mul r12.w, r12.w, r12.w
  mad r22.xyz, r22.xyzx, r14.wwww, r18.xyzx
  dp3 r14.w, r22.xyzx, r22.xyzx
  rsq r14.w, r14.w
  mul r22.xyz, r14.wwww, r22.xyzx
  mul r14.w, r4.w, r23.w
  mad r17.w, r4.w, l(0.010000), r23.w
  div r14.w, r14.w, r17.w
  max r14.w, r14.w, l(1.000000)
  dp3_sat r17.w, r22.xyzx, r1.xyzx
  log r17.w, r17.w
  mul r17.w, r14.w, r17.w
  exp r17.w, r17.w
  mul r22.xyz, r15.wwww, r23.xyzx
  mul r21.xyz, r17.wwww, r21.xyzx
  log r15.w, r15.w
  mul r15.w, r15.w, l(0.100000)
  exp r15.w, r15.w
  mul r21.xyz, r15.wwww, r21.xyzx
  mul r21.xyz, r12.wwww, r21.xyzx
  mad r14.w, r14.w, l(0.125000), l(0.250000)
  mad r19.xyz, r22.xyzx, r12.wwww, r19.xyzx
  mad r20.xyz, r21.xyzx, r14.wwww, r20.xyzx
  mov r10.w, r13.w
  mov r1.w, r11.w
endloop 
dp3 r10.w, r16.xyzx, r16.xyzx
rsq r10.w, r10.w
mul r17.xyw, r10.wwww, r16.xyxz
dp3 r10.w, r17.xywx, r1.xyzx
add r10.w, r10.w, r10.w
mad r17.xyw, r1.xyxz, -r10.wwww, r17.xyxw
ushr r10.w, r17.z, l(16)
mov r16.w, l(1.000000)
mov r21.zw, l(0,0,1.000000,1.000000)
mov r22.xyz, r19.xyzx
mov r23.xyz, r20.xyzx
mov r11.w, r1.w
mov r12.w, l(0)
loop 
  uge r13.w, r12.w, r10.w
  breakc_nz r13.w
  ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r24.xy, r11.w, l(0), t59.xyxx
  iadd r13.w, r11.w, l(1)
  and r14.w, r5.w, r24.y
  iadd r15.w, r12.w, l(1)
  movc r12.w, r14.w, r12.w, r15.w
  mov r11.w, r13.w
  continuec_z r14.w
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r25.xyzw, r24.x, l(0), t62.xyzw
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyzw, r24.x, l(16), t62.xyzw
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r24.yzw, r24.x, l(32), t62.xxyz
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.xyzw, r24.x, l(60), t62.xyzw
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r28.xyzw, r24.x, l(76), t62.yzwx
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r29.xyzw, r24.x, l(92), t62.yzwx
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r30.xyzw, r24.x, l(108), t62.xyzw
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r31.w, r24.x, l(124), t62.xxxx
  mov r32.xyz, r27.yzwy
  mov r32.w, r28.w
  dp4 r32.x, r16.xyzw, r32.xyzw
  mov r28.w, r29.w
  dp4 r32.y, r16.xyzw, r28.xyzw
  mov r29.w, r30.x
  dp4 r14.w, r16.xyzw, r29.xyzw
  mov r31.xyz, r30.yzwy
  dp4 r17.z, r16.xyzw, r31.xyzw
  lt r14.w, l(0.000000), r14.w
  add r25.xyz, -r16.xyzx, r25.xyzx
  dp3 r18.w, r25.xyzx, r25.xyzx
  rsq r19.w, r18.w
  mul r27.yzw, r19.wwww, r25.xxyz
  lt r20.w, l(0.000000), r27.x
  mul r22.w, r25.w, r25.w
  div r22.w, l(1.000000, 1.000000, 1.000000, 1.000000), r22.w
  div r28.x, l(1.000000, 1.000000, 1.000000, 1.000000), r18.w
  add r23.w, -r22.w, r28.x
  max r28.w, r23.w, l(0.000000)
  dp3_sat r23.w, r27.yzwy, r1.xyzx
  div r29.xy, r32.xyxx, r17.zzzz
  dp2 r24.x, r29.xyxx, r29.xyxx
  add r24.x, -r24.x, l(1.000000)
  max r28.y, r24.x, l(0.000000)
  mul r18.w, r18.w, r22.w
  min r18.w, r18.w, l(1.000000)
  add r28.z, -r18.w, l(1.000000)
  div r17.z, r17.z, r25.w
  add_sat r17.z, -r17.z, l(1.000000)
  mul r21.y, r28.y, r28.y
  mul r21.x, r17.z, r17.z
  movc r28.xyzw, r20.wwww, r28.xyzw, r21.xyzw
  mad r25.xyz, r25.xyzx, r19.wwww, r18.xyzx
  dp3 r17.z, r25.xyzx, r25.xyzx
  rsq r17.z, r17.z
  mul r25.xyz, r17.zzzz, r25.xyzx
  mul r17.z, r4.w, r26.w
  mad r18.w, r4.w, l(0.010000), r26.w
  div r17.z, r17.z, r18.w
  max r17.z, r17.z, l(1.000000)
  dp3_sat r18.w, r25.xyzx, r1.xyzx
  log r18.w, r18.w
  mul r18.w, r17.z, r18.w
  exp r18.w, r18.w
  mul r25.xyz, r28.wzxw, r28.yyyy
  mul r26.xyz, r23.wwww, r26.xyzx
  mul r28.xyz, r25.xxxx, r26.xyzx
  mul r29.xyz, r18.wwww, r24.yzwy
  log r18.w, r23.w
  mul r18.w, r18.w, l(0.100000)
  exp r18.w, r18.w
  mul r29.xyz, r18.wwww, r29.xyzx
  mul r25.xyw, r25.yyyy, r29.xyxz
  mul r18.w, r17.z, l(0.250000)
  mad r17.z, r17.z, l(0.125000), l(0.250000)
  mul r25.xyw, r17.zzzz, r25.xyxw
  dp3_sat r19.w, r27.yzwy, r17.xywx
  log r19.w, r19.w
  mul r18.w, r18.w, r19.w
  exp r18.w, r18.w
  mul r17.z, r17.z, r18.w
  mul r26.xyz, r25.zzzz, r26.xyzx
  mul r24.xyz, r17.zzzz, r24.yzwy
  mul r24.xyz, r25.zzzz, r24.xyzx
  movc r26.xyz, r20.wwww, r28.xyzx, r26.xyzx
  movc r24.xyz, r20.wwww, r25.xywx, r24.xyzx
  and r25.xyz, r14.wwww, r26.xyzx
  and r24.xyz, r14.wwww, r24.xyzx
  add r22.xyz, r22.xyzx, r25.xyzx
  add r23.xyz, r23.xyzx, r24.xyzx
  mov r12.w, r15.w
  mov r11.w, r13.w
endloop 
mad r1.xyz, -r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
mad r1.xyz, r22.xyzx, r1.xyzx, r15.xyzx
mad r4.xyz, r23.xyzx, r12.xyzx, r6.xyzx
mad r8.xyzw, cb2[18].xyzw, cb9[11].xxxx, r8.xyzw
mad r6.xy, r8.xyxx, cb1[0].xyxx, cb1[0].zwzz
mad r8.xy, r8.zwzz, cb1[7].xyxx, cb1[7].zwzz
sample_indexable(texture2d)(float,float,float,float) r12.xyzw, r6.xyxx, t0.xyzw, s0
sample_indexable(texture2d)(float,float,float,float) r8.xyzw, r8.xyxx, t7.xyzw, s0
add r8.xyzw, -r12.xyzw, r8.xyzw
mad r8.xyzw, r2.wwww, r8.xyzw, r12.xyzw
mov r12.xyz, r8.xyzx
mov r12.w, v5.w
mov r15.x, l(1.000000)
mov r15.w, v5.w
mul r12.xyzw, r12.xyzw, r15.xxxw
mul r15.xyz, r12.xyzx, cb3[0].xyzx
mul r8.w, r8.w, r12.w
mov r15.w, cb2[22].z
add r12.xyzw, r3.xyzw, -r15.xyzw
mad r12.xyzw, r3.wwww, r12.xyzw, r15.xyzw
dp3 r1.w, r7.xyzx, r2.xyzx
mul r1.w, r1.w, cb2[20].w
mad r9.x, r1.w, r9.w, r9.y
sample_indexable(texture2d)(float,float,float,float) r2.xyzw, r9.xzxx, t55.xyzw, s9
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r9.yzyy, t55.xyzw, s9
eq r1.w, r2.w, l(0.000000)
add r6.xyz, -r2.xyzx, r3.xyzx
mad r2.xyz, r3.wwww, r6.xyzx, r2.xyzx
movc r2.xyz, r1.wwww, r2.xyzx, r3.xyzx
mad r4.xyz, r13.xyzx, r6.wwww, r4.xyzx
mad r1.xyz, r14.xyzx, r7.wwww, r1.xyzx
mul r6.xyz, r4.xyzx, r11.xyzx
mul r2.xyz, r2.xyzx, r7.wwww
mad r7.xyz, r12.xyzx, r1.xyzx, -r2.xyzx
mad r2.xyz, r12.wwww, r7.xyzx, r2.xyzx
mad r8.xyz, r11.xyzx, r4.xyzx, r2.xyzx
mad r12.xyz, r12.xyzx, r1.xyzx, r6.xyzx
add r1.xyzw, -r8.xyzw, r12.xyzw
mad r1.xyzw, r3.wwww, r1.xyzw, r8.xyzw
mul r2.xyzw, r1.xyzw, cb4[r0.w + 7].xyzw
add r4.x, r10.y, cb6[3].w
add r4.x, r4.x, -cb6[3].y
mul_sat r4.x, r4.x, cb6[3].z
dp2 r4.y, r10.xzxx, r10.xzxx
sqrt r4.y, r4.y
add r4.y, r4.y, -cb6[2].y
mul r4.y, r4.y, cb6[2].z
exp r4.y, -r4.y
mad_sat r4.y, -r4.y, cb6[2].x, cb6[2].x
mul_sat r4.x, r4.x, cb6[3].x
dp3 r4.z, r2.xyzx, l(0.298910, 0.586610, 0.114480, 0.000000)
add r4.z, r4.z, l(-1.000000)
mad r4.w, cb6[1].w, r4.z, l(1.000000)
mad r4.z, cb6[4].w, r4.z, l(1.000000)
mad r6.xyz, cb6[1].xyzx, r4.wwww, -r2.xyzx
mad r6.xyz, r4.yyyy, r6.xyzx, r2.xyzx
mad r4.yzw, cb6[4].xxyz, r4.zzzz, -r6.xxyz
mad r2.xyz, r4.xxxx, r4.yzwy, r6.xyzx
mad r1.xyzw, r1.xyzw, cb4[r0.w + 7].xyzw, -r2.xyzw
mad r1.xyzw, r3.wwww, r1.xyzw, r2.xyzw
sample_indexable(texture2d)(float,float,float,float) r0.w, r9.yzyy, t56.yzwx, s7
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, r0.w, -v8.w
dp3_sat r0.x, r5.xyzx, r0.xyzx
add r0.y, -cb2[22].w, cb2[23].x
mad r0.x, r0.x, r0.y, cb2[22].w
mul_sat r0.x, r0.x, r0.w
add r0.yzw, -r3.xxyz, r1.xxyz
mad r0.xyz, r0.xxxx, r0.yzwy, r3.xyzx
mov r0.w, r1.w
add r1.xyzw, -r0.xyzw, r1.xyzw
mad o0.xyzw, r3.wwww, r1.xyzw, r0.xyzw
ret 
// Approximately 499 instruction slots used

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