// ---- Created with 3Dmigoto v1.2.35 on Tue Apr 26 22:31:33 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);
  float MultiBlend2_et1_em_snp_0_float_0_0 : packoffset(c39);
  float MultiBlend2_et1_em_snp_0_float_1_0 : packoffset(c39.y);
  float MultiBlend2_et1_em_snp_0_float_2_0 : packoffset(c39.z);
  float MultiBlend2_et1_em_snp_0_float_3_0 : packoffset(c39.w);
}

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_Falloff_InsideColor : packoffset(c15);
  float4 FC_Falloff_OutsideColor : packoffset(c16);
  float4 FC_Falloff_Offset : packoffset(c17);
  float4 FC_Falloff_EdgePower : packoffset(c18);
  float4 FC_Falloff_HeightFade : packoffset(c19);
  float4 FC_HairSpecularParam0 : packoffset(c20);
  float4 FC_HairSpecularParam1 : packoffset(c21);
  float4 FC_HairSpecularParam2 : packoffset(c22);
  float4 FC_RimLightingParam : packoffset(c23);
  float4 FC_SAT_DUMMMY_P7_8 : packoffset(c24);
  float4 FC_SAT_DUMMMY_P7_9 : packoffset(c25);
  float4 FC_SAT_DUMMMY_P7_10 : packoffset(c26);
}

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);
}

cbuffer cbModelParam : register(b7)
{
  float4 FC_DifColMul : packoffset(c0);
  float FC_EnvMapInterpRatio : packoffset(c1);
  float FC_EnvMapColorScale0 : packoffset(c1.y);
  float FC_EnvMapColorScale1 : packoffset(c1.z);
  float FC_DitherEnable : packoffset(c2);
  float FC_FROZEN_RATE : packoffset(c2.w);
  float FC_Perlin_Freq : packoffset(c3);
  float FC_Perlin_Amp : packoffset(c3.y);
  float FC_Perlin_Lacunarity : packoffset(c3.z);
  float FC_Perlin_Gain : packoffset(c3.w);
  float FC_SnowRate : packoffset(c4);
  float FC_SnowMinDot : packoffset(c4.y);
  float FC_SnowMaxDot : packoffset(c4.z);
  float FC_SparkleExponent : packoffset(c5);
  float FC_SparkleThreshold : packoffset(c5.y);
  float FC_SparkleMul : packoffset(c5.z);
  float FC_SparkleMaskExponent : packoffset(c5.w);
  float4 FC_SkinMatchColor : packoffset(c6);
  int FC_EnvId : packoffset(c7);
  float4 FC_ParallaxCorrectedCubemapOriginA : packoffset(c8);
  float4 FC_ParallaxCorrectedCubemapOriginB : packoffset(c9);
  float4x4 FC_ParallaxCorrectedCubemapObbA : packoffset(c10);
  float4x4 FC_ParallaxCorrectedCubemapInvObbA : packoffset(c14);
  float4x4 FC_ParallaxCorrectedCubemapObbB : packoffset(c18);
  float4x4 FC_ParallaxCorrectedCubemapInvObbB : packoffset(c22);
  float FC_ParallaxCorrectedCubemapObbAEnable : packoffset(c26);
  float FC_ParallaxCorrectedCubemapObbBEnable : packoffset(c26.y);
}

cbuffer cbTexHdrScaleParam : register(b0)
{
  float4 FC_TexHdrScaleParam : packoffset(c0);
}

SamplerState SS_DiffuseMap_s : register(s0);
SamplerState SS_SpecularMap_s : register(s1);
SamplerState SS_GIMap_s : register(s5);
SamplerState SS_WrapLinear_s : register(s8);
SamplerState SS_ClampLinear_s : register(s9);
Texture2D<float4> g_DiffuseTexture : register(t0);
Texture2D<float4> MultiBlend2_et1_em_snp_0_Texture2D_6 : register(t2);
Texture2D<float4> MultiBlend2_et1_em_snp_0_Texture2D_5 : register(t3);
Texture2D<float4> MultiBlend2_et1_em_snp_0_Texture2D_4 : register(t4);
Texture2D<float4> MultiBlend2_et1_em_snp_0_Texture2D_3 : register(t5);
Texture2D<float4> MultiBlend2_et1_em_snp_0_Texture2D_2 : register(t6);
Texture2D<float4> MultiBlend2_et1_em_snp_0_Texture2D_14 : register(t7);
Texture2D<float4> MultiBlend2_et1_em_snp_0_Texture2D_13 : register(t8);
Texture2D<float4> MultiBlend2_et1_em_snp_0_Texture2D_1 : register(t10);
Texture2D<float4> MultiBlend2_et1_em_snp_0_Texture2D_0 : register(t11);
Texture2D<float4> g_DOLTexture : register(t26);
Texture2D<float4> g_DOLTexture2 : register(t27);
TextureCube<float4> g_IBLTexture : register(t30);
TextureCube<float4> g_IBLTexture2 : register(t31);
Texture2D<float4> g_SSAOTexture : register(t33);
Texture2D<float4> g_DitherTexture : register(t38);
Texture2D<float4> g_RLRTexture : register(t44);
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 : NORMAL0,
  float4 v2 : TANGENT0,
  float4 v3 : POSITION1,
  float4 v4 : COLOR0,
  float4 v5 : TEXCOORD0,
  float4 v6 : TEXCOORD2,
  uint v7 : 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,r33,r34,r35;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 x0[16];
  r0.xyz = v2.yzx * v1.zxy;
  r0.xyz = v1.yzx * v2.zxy + -r0.xyz;
  r0.xyz = v2.www * r0.xyz;
  r0.w = dot(r0.xyz, r0.xyz);
  r0.w = rsqrt(r0.w);
  r0.xyz = r0.xyz * r0.www;
  r0.w = dot(v1.xyz, v1.xyz);
  r0.w = rsqrt(r0.w);
  r1.xyz = v1.xyz * r0.www;
  r0.w = dot(v2.xyz, v2.xyz);
  r0.w = rsqrt(r0.w);
  r2.xyz = v2.xyz * r0.www;
  r1.xyz = v7.xxx ? r1.xyz : -r1.xyz;
  r3.xy = v5.xy * FC_TextureTilingScale[1].xy + FC_TextureTilingScale[1].zw;
  r3.xyz = MultiBlend2_et1_em_snp_0_Texture2D_1.Sample(SS_DiffuseMap_s, r3.xy).xyz;
  r4.xy = v5.xy * FC_TextureTilingScale[2].xy + FC_TextureTilingScale[2].zw;
  r4.xyz = MultiBlend2_et1_em_snp_0_Texture2D_2.Sample(SS_DiffuseMap_s, r4.xy).xyz;
  r0.w = MultiBlend2_et1_em_snp_0_float_0_0 * 0.00999999978;
  r1.w = 1 + -v6.x;
  r0.w = -r0.w * r1.w + v6.x;
  r2.w = v4.w * MultiBlend2_et1_em_snp_0_float_1_0 + 1;
  r0.w = saturate(r2.w * r0.w);
  r4.xyz = r4.xyz + -r3.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r4.xy = v5.xy * FC_TextureTilingScale[13].xy + FC_TextureTilingScale[13].zw;
  r4.xyz = MultiBlend2_et1_em_snp_0_Texture2D_13.Sample(SS_DiffuseMap_s, r4.xy).xyz;
  r5.xy = v5.xy * FC_TextureTilingScale[14].xy + FC_TextureTilingScale[14].zw;
  r5.xyz = MultiBlend2_et1_em_snp_0_Texture2D_14.Sample(SS_DiffuseMap_s, r5.xy).xyz;
  r6.xy = MultiBlend2_et1_em_snp_0_float_2_0 * v5.xy;
  r6.xy = r6.xy * FC_TextureTilingScale[0].xy + FC_TextureTilingScale[0].zw;
  r0.w = MultiBlend2_et1_em_snp_0_Texture2D_0.Sample(SS_DiffuseMap_s, r6.xy).x;
  r0.w = 0.00999999978 + r0.w;
  r0.w = MultiBlend2_et1_em_snp_0_float_0_0 * r0.w;
  r0.w = -r0.w * r1.w + v6.x;
  r0.w = saturate(r0.w * r2.w);
  r5.xyz = r5.xyz + -r4.xyz;
  r4.xyz = r0.www * r5.xyz + r4.xyz;
  r4.xy = r4.xy * float2(2,2) + float2(-1,-1);
  r1.w = dot(r4.xy, r4.xy);
  r1.w = min(1, r1.w);
  r1.w = 1 + -r1.w;
  r1.w = sqrt(r1.w);
  r5.xyz = r4.yyy * r2.xyz;
  r4.xyw = r4.xxx * r0.xyz + r5.xyz;
  r4.xyw = r1.www * r1.xyz + r4.xyw;
  r1.w = dot(r4.xyw, r4.xyw);
  r1.w = rsqrt(r1.w);
  r4.xyw = r4.xyw * r1.www;
  r5.xy = v5.xy * FC_TextureTilingScale[5].xy + FC_TextureTilingScale[5].zw;
  r5.xyz = MultiBlend2_et1_em_snp_0_Texture2D_5.Sample(SS_DiffuseMap_s, r5.xy).xyz;
  r6.xy = v5.xy * FC_TextureTilingScale[6].xy + FC_TextureTilingScale[6].zw;
  r6.xyz = MultiBlend2_et1_em_snp_0_Texture2D_6.Sample(SS_DiffuseMap_s, r6.xy).xyz;
  r6.xyz = r6.xyz + -r5.xyz;
  r5.xyz = r0.www * r6.xyz + r5.xyz;
  r6.xy = v5.xy * FC_TextureTilingScale[3].xy + FC_TextureTilingScale[3].zw;
  r6.xyz = MultiBlend2_et1_em_snp_0_Texture2D_3.Sample(SS_SpecularMap_s, r6.xy).xyz;
  r7.xy = v5.xy * FC_TextureTilingScale[4].xy + FC_TextureTilingScale[4].zw;
  r7.xyz = MultiBlend2_et1_em_snp_0_Texture2D_4.Sample(SS_SpecularMap_s, r7.xy).xyz;
  r7.xyz = r7.xyz + -r6.xyz;
  r6.xyz = r0.www * r7.xyz + r6.xyz;
  r0.w = round(v1.w);
  r0.w = (uint)r0.w;
  r7.x = dot(v3.xyzw, FC_MatrixInvViewProj._m00_m10_m20_m30);
  r7.y = dot(v3.xyzw, FC_MatrixInvViewProj._m01_m11_m21_m31);
  r7.z = dot(v3.xyzw, FC_MatrixInvViewProj._m02_m12_m22_m32);
  r1.w = dot(v3.xyzw, FC_MatrixInvViewProj._m03_m13_m23_m33);
  r8.xyz = r7.xyz / r1.www;
  r9.x = FC_MatrixInvView._m30 + -r8.x;
  r9.y = FC_MatrixInvView._m31 + -r8.y;
  r9.z = FC_MatrixInvView._m32 + -r8.z;
  r1.w = dot(r9.xyz, r9.xyz);
  r1.w = rsqrt(r1.w);
  r8.xyz = r9.xyz * r1.www;
  r10.xy = FC_ScreenSize.zw * v0.xy;
  r10.zw = float2(0.25,0.25) * v0.xy;
  r2.w = g_DitherTexture.Sample(SS_WrapLinear_s, r10.zw).w;
  r3.w = FC_GlobalReflectanceScale * FC_GlobalReflectanceScale;
  r11.xyz = r5.xyz * r3.www;
  r12.xyz = FC_GlobalRefRectanceRGBScale.xyz * FC_GlobalRefRectanceRGBScale.xyz;
  r13.xyz = r12.xyz * r11.xyz;
  r3.w = FC_GlobalShininessScale * r4.z;
  r5.w = 13 * r3.w;
  r5.w = exp2(r5.w);
  r6.w = g_DiffuseTexture.CalculateLevelOfDetailUnclamped(SS_DiffuseMap_s, v5.xy);
  r14.xyz = FC_GlobalAlbedoOffsetRGB.xyz * float3(0.00392156886,0.00392156886,0.00392156886) + r3.xyz;
  r8.w = dot(float3(0.298999995,0.587000012,0.114), r14.xyz);
  r15.y = dot(float3(0.5,-0.419,-0.0810000002), r14.xyz);
  r15.z = dot(float3(-0.169,-0.331999987,0.5), r14.xyz);
  r15.x = FC_GlobalAlbedoOffset * 0.00392156886 + r8.w;
  r14.x = dot(float2(1,1.40199995), r15.xy);
  r14.y = dot(float3(1,-0.713999987,-0.344000012), r15.xyz);
  r14.z = dot(float2(1,1.77199996), r15.xz);
  r8.w = g_SSAOTexture.Sample(SS_WrapLinear_s, r10.xy).x;
  r9.w = dot(r4.xyw, r8.xyz);
  r10.z = r9.w + r8.w;
  r10.z = r10.z * r10.z + -1;
  r10.z = saturate(r10.z + r8.w);
  r10.w = saturate(r9.w);
  r10.w = 1 + -r10.w;
  r11.w = r9.w + r9.w;
  r15.xyz = r11.www * r4.xyw + -r8.xyz;
  r11.w = r10.w * r10.w;
  r11.w = r11.w * r11.w;
  r10.w = r11.w * r10.w;
  r10.w = r10.w * r10.z;
  r16.xyzw = g_DOLTexture.Sample(SS_GIMap_s, v5.zw).xyzw;
  r17.xyzw = g_DOLTexture2.Sample(SS_GIMap_s, v5.zw).xyzw;
  r18.xyzw = float4(-0.5,-0.5,-0.5,-0.5) + r17.yzzx;
  r18.xyzw = r18.xyzw + r18.xyzw;
  r11.w = dot(r18.xzw, r18.xzw);
  r11.w = rsqrt(r11.w);
  r18.xyzw = r18.xyzw * r11.wwww;
  r0.w = (int)r0.w * 17;
  r11.w = -VC_InstanceData[r0.w].vDominantRotateParam.z * r18.x;
  r11.w = r18.w * VC_InstanceData[r0.w].vDominantRotateParam.w + r11.w;
  r11.w = -r18.y * -VC_InstanceData[r0.w].vDominantRotateParam.y + r11.w;
  r12.w = dot(r18.wx, VC_InstanceData[r0.w].vDominantRotateParam.zw);
  r12.w = r18.z * -VC_InstanceData[r0.w].vDominantRotateParam.x + r12.w;
  r18.xy = -VC_InstanceData[r0.w].vDominantRotateParam.xy * r18.xx;
  r13.w = r18.w * -VC_InstanceData[r0.w].vDominantRotateParam.y + -r18.x;
  r13.w = r18.z * VC_InstanceData[r0.w].vDominantRotateParam.w + r13.w;
  r14.w = r18.w * VC_InstanceData[r0.w].vDominantRotateParam.x + -r18.y;
  r14.w = -r18.z * -VC_InstanceData[r0.w].vDominantRotateParam.z + r14.w;
  r15.w = VC_InstanceData[r0.w].vDominantRotateParam.x * r14.w;
  r15.w = VC_InstanceData[r0.w].vDominantRotateParam.w * r11.w + r15.w;
  r18.xy = VC_InstanceData[r0.w].vDominantRotateParam.xw * r13.ww;
  r13.w = VC_InstanceData[r0.w].vDominantRotateParam.y * r13.w + r15.w;
  r19.x = -VC_InstanceData[r0.w].vDominantRotateParam.z * r12.w + r13.w;
  r13.w = VC_InstanceData[r0.w].vDominantRotateParam.w * r12.w + -r18.x;
  r13.w = VC_InstanceData[r0.w].vDominantRotateParam.y * r14.w + r13.w;
  r19.y = VC_InstanceData[r0.w].vDominantRotateParam.z * r11.w + r13.w;
  r12.w = VC_InstanceData[r0.w].vDominantRotateParam.x * r12.w + r18.y;
  r11.w = -VC_InstanceData[r0.w].vDominantRotateParam.y * r11.w + r12.w;
  r19.z = VC_InstanceData[r0.w].vDominantRotateParam.z * r14.w + r11.w;
  r11.w = saturate(FC_DominantSharpnesOffset + r17.w);
  r16.xyz = r16.xyz * r16.xyz;
  r16.xyz = FC_TexHdrScaleParam.xyz * r16.xyz;
  r16.xyz = FC_DominantRgbScale.xyz * r16.xyz;
  r18.xyz = FC_DominantColorScale * r16.xyz;
  r20.xyz = r18.xyz * r11.www;
  r16.xyz = r16.xyz * FC_DominantColorScale + -r20.xyz;
  r11.w = saturate(dot(r19.xyz, r4.xyw));
  r11.xyz = -r11.xyz * r12.xyz + float3(1,1,1);
  r12.xyz = r11.www * r11.xyz;
  r12.xyz = r20.xyz * r12.xyz + r16.xyz;
  r16.xyz = sqrt(r12.xyz);
  r18.xyz = sqrt(r18.xyz);
  r12.xyz = r12.xyz * r11.xyz;
  r11.w = -r3.w * 6.5 + 6.5;
  r11.w = min(6, r11.w);
  r19.xyz = r11.xyz * r10.www;
  r3.w = r3.w * r3.w;
  r19.xyz = r19.xyz * r3.www + r13.xyz;
  r20.xyzw = cmp(float4(48,69,2,10) == FC_DebugOutputMode.xxxx);
  r19.xyz = r20.xxx ? float3(1,1,1) : r19.xyz;
  r3.w = r20.x ? 1 : VC_InstanceData[r0.w].parallaxCorrectedCubemapAabbMin_envMapColorScale0.w;
  r10.w = r20.x ? 1 : VC_InstanceData[r0.w].parallaxCorrectedCubemapAabbMax_envMapColorScale1.w;
  r21.xy = cmp(float2(0,0) < FC_ParallaxCorrectedCubemapObbAEnable);
  r7.w = 1;
  r22.x = dot(r7.xyzw, FC_ParallaxCorrectedCubemapInvObbA._m00_m10_m20_m30);
  r22.y = dot(r7.xyzw, FC_ParallaxCorrectedCubemapInvObbA._m01_m11_m21_m31);
  r22.z = dot(r7.xyzw, FC_ParallaxCorrectedCubemapInvObbA._m02_m12_m22_m32);
  r23.x = dot(r15.xyz, FC_ParallaxCorrectedCubemapInvObbA._m00_m10_m20);
  r23.y = dot(r15.xyz, FC_ParallaxCorrectedCubemapInvObbA._m01_m11_m21);
  r23.z = dot(r15.xyz, FC_ParallaxCorrectedCubemapInvObbA._m02_m12_m22);
  r24.xyz = cmp(float3(0,0,0) < r23.xyz);
  r25.xyz = ~(int3)r24.xyz;
  r24.xyz = r21.xxx ? r24.xyz : 0;
  r26.xyz = float3(1,1,1) + -r22.xyz;
  r26.xyz = r26.xyz / r23.xyz;
  r24.xyz = r24.xyz ? abs(r26.xyz) : float3(5000,5000,5000);
  r25.xyz = r21.xxx ? r25.xyz : 0;
  r26.xyz = cmp(r23.xyz < float3(0,0,0));
  r25.xyz = r26.xyz ? r25.xyz : 0;
  r26.xyz = float3(1,1,1) + r22.xyz;
  r26.xyz = r26.xyz / r23.xyz;
  r24.xyz = r25.xyz ? abs(r26.xyz) : r24.xyz;
  r12.w = min(r24.x, r24.y);
  r12.w = min(r12.w, r24.z);
  r22.xyz = r23.xyz * r12.www + r22.xyz;
  r13.w = -r12.w * 9.99999975e-005 + -1;
  r23.xyz = cmp(r22.xyz < r13.www);
  r12.w = r12.w * 9.99999975e-005 + 1;
  r24.xyz = cmp(r12.www < r22.xyz);
  r12.w = (int)r23.x | (int)r24.x;
  r12.w = (int)r23.y | (int)r12.w;
  r12.w = (int)r24.y | (int)r12.w;
  r12.w = (int)r23.z | (int)r12.w;
  r12.w = (int)r24.z | (int)r12.w;
  r22.w = 1;
  r23.x = dot(r22.xyzw, FC_ParallaxCorrectedCubemapObbA._m00_m10_m20_m30);
  r23.y = dot(r22.xyzw, FC_ParallaxCorrectedCubemapObbA._m01_m11_m21_m31);
  r23.z = dot(r22.xyzw, FC_ParallaxCorrectedCubemapObbA._m02_m12_m22_m32);
  r22.xyz = -FC_ParallaxCorrectedCubemapOriginA.xyz + r23.xyz;
  r22.xyz = g_IBLTexture.SampleLevel(SS_WrapLinear_s, r22.xyz, r11.w).xyz;
  r22.xyz = r22.xyz * r3.www;
  r22.xyz = r12.www ? float3(0,0,0) : r22.xyz;
  r23.xyz = g_IBLTexture.SampleLevel(SS_WrapLinear_s, r15.xyz, r11.w).xyz;
  r23.xyz = r23.xyz * r3.www;
  r21.xzw = r21.xxx ? r22.xyz : r23.xyz;
  r22.x = dot(r7.xyzw, FC_ParallaxCorrectedCubemapInvObbB._m00_m10_m20_m30);
  r22.y = dot(r7.xyzw, FC_ParallaxCorrectedCubemapInvObbB._m01_m11_m21_m31);
  r22.z = dot(r7.xyzw, FC_ParallaxCorrectedCubemapInvObbB._m02_m12_m22_m32);
  r7.x = dot(r15.xyz, FC_ParallaxCorrectedCubemapInvObbB._m00_m10_m20);
  r7.y = dot(r15.xyz, FC_ParallaxCorrectedCubemapInvObbB._m01_m11_m21);
  r7.z = dot(r15.xyz, FC_ParallaxCorrectedCubemapInvObbB._m02_m12_m22);
  r23.xyz = cmp(float3(0,0,0) < r7.xyz);
  r24.xyz = ~(int3)r23.xyz;
  r23.xyz = r21.yyy ? r23.xyz : 0;
  r25.xyz = float3(1,1,1) + -r22.xyz;
  r25.xyz = r25.xyz / r7.xyz;
  r23.xyz = r23.xyz ? abs(r25.xyz) : float3(5000,5000,5000);
  r24.xyz = r21.yyy ? r24.xyz : 0;
  r25.xyz = cmp(r7.xyz < float3(0,0,0));
  r24.xyz = r24.xyz ? r25.xyz : 0;
  r25.xyz = float3(1,1,1) + r22.xyz;
  r25.xyz = r25.xyz / r7.xyz;
  r23.xyz = r24.xyz ? abs(r25.xyz) : r23.xyz;
  r3.w = min(r23.x, r23.y);
  r3.w = min(r3.w, r23.z);
  r7.xyz = r7.xyz * r3.www + r22.xyz;
  r12.w = -r3.w * 9.99999975e-005 + -1;
  r22.xyz = cmp(r7.xyz < r12.www);
  r3.w = r3.w * 9.99999975e-005 + 1;
  r23.xyz = cmp(r3.www < r7.xyz);
  r3.w = (int)r22.x | (int)r23.x;
  r3.w = (int)r22.y | (int)r3.w;
  r3.w = (int)r23.y | (int)r3.w;
  r3.w = (int)r22.z | (int)r3.w;
  r3.w = (int)r23.z | (int)r3.w;
  r7.w = 1;
  r22.x = dot(r7.xyzw, FC_ParallaxCorrectedCubemapObbB._m00_m10_m20_m30);
  r22.y = dot(r7.xyzw, FC_ParallaxCorrectedCubemapObbB._m01_m11_m21_m31);
  r22.z = dot(r7.xyzw, FC_ParallaxCorrectedCubemapObbB._m02_m12_m22_m32);
  r7.xyz = -FC_ParallaxCorrectedCubemapOriginB.xyz + r22.xyz;
  r7.xyz = g_IBLTexture2.SampleLevel(SS_WrapLinear_s, r7.xyz, r11.w).xyz;
  r7.xyz = r7.xyz * r10.www;
  r7.xyz = r3.www ? float3(0,0,0) : r7.xyz;
  r22.xyz = g_IBLTexture2.SampleLevel(SS_WrapLinear_s, r15.xyz, r11.w).xyz;
  r22.xyz = r22.xyz * r10.www;
  r7.xyz = r21.yyy ? r7.xyz : r22.xyz;
  r7.xyz = r7.xyz + -r21.xzw;
  r7.xyz = VC_InstanceData[r0.w].parallaxCorrectedCubemapOrigin_envMapInterpRatio.www * r7.xyz + r21.xzw;
  r7.xyz = r7.xyz * r19.xyz;
  r7.xyz = r7.xyz * r8.www;
  r3.w = dot(r15.xyz, r1.xyz);
  r3.w = saturate(1 + r3.w);
  r3.w = r3.w * r3.w;
  r7.xyz = r7.xyz * r3.www;
  r15.xyzw = g_RLRTexture.SampleLevel(SS_ClampLinear_s, r10.xy, r11.w).xyzw;
  r19.xyz = r19.xyz * r8.www;
  r15.xyz = r19.xyz * r15.xyz;
  r3.w = 1 + -r15.w;
  r7.xyz = r7.xyz * r3.www + r15.xyz;
  r3.w = VC_InstanceData[r0.w].ShLightMask.x * r16.w;
  r15.xyz = FC_DirLightCol_0.xyz * r3.www;
  r19.x = dot(FC_DirLightVec_0.xyz, r4.xyw);
  r19.y = dot(FC_DirLightVec_1.xyz, r4.xyw);
  r19.zw = saturate(r19.xy);
  r21.xyz = r19.zzz * r11.xyz;
  r22.xyz = r19.www * r11.xyz;
  r22.xyz = FC_DirLightCol_1.xyz * r22.xyz;
  r15.xyz = r15.xyz * r21.xyz + r22.xyz;
  r21.xy = cmp(int2(0,0) < (uint2)FC_bLocalLight.xy);
  if (FC_bLocalLight.x != 0) {
    r7.w = dot(FC_DirLightVec_2.xyz, r4.xyw);
    r7.w = r7.w * 0.5 + 0.5;
    r7.w = r7.w * r7.w;
    r7.w = min(1, r7.w);
    r22.xyz = r7.www * r11.xyz;
    r15.xyz = FC_DirLightCol_2.xyz * r22.xyz + r15.xyz;
  }
  if (FC_bLocalLight.y != 0) {
    r7.w = dot(FC_DirLightVec_3.xyz, r4.xyw);
    r7.w = r7.w * 0.5 + 0.5;
    r7.w = r7.w * r7.w;
    r7.w = min(1, r7.w);
    r22.xyz = r7.www * r11.xyz;
    r15.xyz = FC_DirLightCol_3.xyz * r22.xyz + r15.xyz;
  }
  r22.xyz = FC_DirLightSpc_0.xyz * r3.www;
  r23.xyz = r9.xyz * r1.www + FC_DirLightVec_0.xyz;
  r7.w = dot(r23.xyz, r23.xyz);
  r7.w = rsqrt(r7.w);
  r23.xyz = r23.xyz * r7.www;
  r24.xyz = r9.xyz * r1.www + FC_DirLightVec_1.xyz;
  r7.w = dot(r24.xyz, r24.xyz);
  r7.w = rsqrt(r7.w);
  r24.xyz = r24.xyz * r7.www;
  r25.x = saturate(dot(r23.xyz, r4.xyw));
  r25.y = saturate(dot(r24.xyz, r4.xyw));
  r7.w = FC_DirLightVec_0.w * r5.w;
  r10.w = r5.w * 0.00999999978 + FC_DirLightVec_0.w;
  r7.w = r7.w / r10.w;
  r26.x = max(1, r7.w);
  r7.w = FC_DirLightVec_1.w * r5.w;
  r10.w = r5.w * 0.00999999978 + FC_DirLightVec_1.w;
  r7.w = r7.w / r10.w;
  r26.y = max(1, r7.w);
  r21.zw = log2(r25.xy);
  r21.zw = r26.xy * r21.zw;
  r21.zw = exp2(r21.zw);
  r23.x = saturate(dot(r8.xyz, r23.xyz));
  r23.y = saturate(dot(r8.xyz, r24.xyz));
  r23.xy = float2(1,1) + -r23.xy;
  r23.zw = r23.xy * r23.xy;
  r23.zw = r23.zw * r23.zw;
  r23.xy = r23.xy * r23.zw;
  r23.xzw = r23.xxx * r11.xyz + r13.xyz;
  r24.xyz = r23.yyy * r11.xyz + r13.xyz;
  r19.xy = max(r19.xy, r9.ww);
  r19.xy = max(float2(9.99999975e-005,9.99999975e-005), r19.xy);
  r19.xy = r19.zw / r19.xy;
  r23.xyz = r23.xzw * r21.zzz;
  r19.xzw = r23.xyz * r19.xxx;
  r23.xyz = r24.xyz * r21.www;
  r23.xyz = r23.xyz * r19.yyy;
  r21.zw = r26.xy * float2(0.125,0.125) + float2(0.25,0.25);
  r22.xyz = r21.zzz * r22.xyz;
  r24.xyz = FC_DirLightSpc_1.xyz * r21.www;
  r23.xyz = r24.xyz * r23.xyz;
  r19.xyz = r22.xyz * r19.xzw + r23.xyz;
  r7.w = dot(r4.xyw, FC_DirLightVec_2.xyz);
  r22.xyz = r9.xyz * r1.www + FC_DirLightVec_2.xyz;
  r10.w = dot(r22.xyz, r22.xyz);
  r10.w = rsqrt(r10.w);
  r22.xyz = r22.xyz * r10.www;
  r10.w = saturate(dot(r22.xyz, r4.xyw));
  r11.w = FC_DirLightVec_2.w * r5.w;
  r12.w = r5.w * 0.00999999978 + FC_DirLightVec_2.w;
  r11.w = r11.w / r12.w;
  r11.w = max(1, r11.w);
  r10.w = log2(r10.w);
  r10.w = r11.w * r10.w;
  r10.w = exp2(r10.w);
  r12.w = saturate(dot(r8.xyz, r22.xyz));
  r12.w = 1 + -r12.w;
  r13.w = r12.w * r12.w;
  r13.w = r13.w * r13.w;
  r12.w = r13.w * r12.w;
  r22.xyz = r12.www * r11.xyz + r13.xyz;
  r12.w = saturate(r7.w);
  r7.w = max(r7.w, r9.w);
  r7.w = max(9.99999975e-005, r7.w);
  r7.w = r12.w / r7.w;
  r22.xyz = r22.xyz * r10.www;
  r22.xyz = r22.xyz * r7.www;
  r7.w = r11.w * 0.125 + 0.25;
  r23.xyz = FC_DirLightSpc_2.xyz * r7.www;
  r22.xyz = r23.xyz * r22.xyz + r19.xyz;
  r19.xyz = r21.xxx ? r22.xyz : r19.xyz;
  r7.w = dot(r4.xyw, FC_DirLightVec_3.xyz);
  r21.xzw = r9.xyz * r1.www + FC_DirLightVec_3.xyz;
  r1.w = dot(r21.xzw, r21.xzw);
  r1.w = rsqrt(r1.w);
  r21.xzw = r21.xzw * r1.www;
  r1.w = saturate(dot(r21.xzw, r4.xyw));
  r10.w = FC_DirLightVec_3.w * r5.w;
  r11.w = r5.w * 0.00999999978 + FC_DirLightVec_3.w;
  r10.w = r10.w / r11.w;
  r10.w = max(1, r10.w);
  r1.w = log2(r1.w);
  r1.w = r10.w * r1.w;
  r1.w = exp2(r1.w);
  r8.x = saturate(dot(r8.xyz, r21.xzw));
  r8.x = 1 + -r8.x;
  r8.y = r8.x * r8.x;
  r8.y = r8.y * r8.y;
  r8.x = r8.x * r8.y;
  r8.xyz = r8.xxx * r11.xyz + r13.xyz;
  r11.x = saturate(r7.w);
  r7.w = max(r7.w, r9.w);
  r7.w = max(9.99999975e-005, r7.w);
  r7.w = r11.x / r7.w;
  r8.xyz = r8.xyz * r1.www;
  r8.xyz = r8.xyz * r7.www;
  r1.w = r10.w * 0.125 + 0.25;
  r11.xyz = FC_DirLightSpc_3.xyz * r1.www;
  r8.xyz = r11.xyz * r8.xyz + r19.xyz;
  r8.xyz = r21.yyy ? r8.xyz : r19.xyz;
  if (VC_InstanceData[r0.w].dynamicLightDisable == 0) {
    r11.x = dot(r4.xyw, FC_MatrixView._m00_m10_m20);
    r11.y = dot(r4.xyw, FC_MatrixView._m01_m11_m21);
    r11.z = dot(r4.xyw, FC_MatrixView._m02_m12_m22);
    r19.x = dot(v3.xyzw, FC_MatrixInvProj._m00_m10_m20_m30);
    r19.y = dot(v3.xyzw, FC_MatrixInvProj._m01_m11_m21_m31);
    r19.z = dot(v3.xyzw, FC_MatrixInvProj._m02_m12_m22_m32);
    r1.w = dot(v3.xyzw, FC_MatrixInvProj._m03_m13_m23_m33);
    r19.xyz = r19.xyz / r1.www;
    r10.xy = FC_ScreenSize.xy * r10.xy;
    r10.xy = (uint2)r10.xy;
    uiDest.xy = (uint2)r10.xy / FC_LightTile_Width;
    r10.xy = uiDest.xy;
    r10.xy = (uint2)r10.xy;
    r1.w = FC_LightTile_NumCellX;
    r1.w = r10.y * r1.w + r10.x;
    r1.w = (uint)r1.w;
    r7.w = -FC_FrustumNear + r19.z;
    r7.w = log2(r7.w);
    r7.w = -FC_FrustumSliceBias + r7.w;
    r7.w = r7.w / FC_FrustumSliceScale;
    r7.w = max(0, r7.w);
    r7.w = min(14, r7.w);
    r7.w = (uint)r7.w;
    r7.w = 1 << (int)r7.w;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=12)(mixed,mixed,mixed,mixed) r10.xyw, r1.w, l(0), t60.xyxz
  r10.x = SS_DiffuseMap[]..swiz;
  r10.y = SS_DiffuseMap[]..swiz;
  r10.w = SS_DiffuseMap[]..swiz;
    r1.w = dot(-r19.xyz, -r19.xyz);
    r1.w = rsqrt(r1.w);
    r21.xyz = -r19.xyz * r1.www;
    r22.xyz = float3(0,0,0);
    r23.xyz = float3(0,0,0);
    r1.w = r10.x;
    r9.w = 0;
    while (true) {
      r11.w = cmp((uint)r9.w >= (uint)r10.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) r24.xy, r1.w, l(0), t59.xyxx
    r24.x = SS_DiffuseMap[]..swiz;
    r24.y = SS_DiffuseMap[]..swiz;
      r11.w = (int)r1.w + 1;
      r12.w = (int)r7.w & (int)r24.y;
      r13.w = (int)r9.w + 1;
      r9.w = r12.w ? r9.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) r25.xyzw, r24.x, l(0), t61.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=64)(mixed,mixed,mixed,mixed) r26.xyzw, r24.x, l(16), t61.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=64)(mixed,mixed,mixed,mixed) r24.xyz, r24.x, l(32), t61.xyzx
    r24.x = SS_DiffuseMap[]..swiz;
    r24.y = SS_DiffuseMap[]..swiz;
    r24.z = SS_DiffuseMap[]..swiz;
      r25.xyz = r25.xyz + -r19.xyz;
      r12.w = dot(r25.xyz, r25.xyz);
      r14.w = rsqrt(r12.w);
      r27.xyz = r25.xyz * r14.www;
      r15.w = saturate(dot(r11.xyz, r27.xyz));
      r12.w = saturate(r12.w * r25.w);
      r12.w = sqrt(r12.w);
      r12.w = 1 + -r12.w;
      r12.w = r12.w * r12.w;
      r25.xyz = r25.xyz * r14.www + r21.xyz;
      r14.w = dot(r25.xyz, r25.xyz);
      r14.w = rsqrt(r14.w);
      r25.xyz = r25.xyz * r14.www;
      r14.w = r26.w * r5.w;
      r17.w = r5.w * 0.00999999978 + r26.w;
      r14.w = r14.w / r17.w;
      r14.w = max(1, r14.w);
      r17.w = saturate(dot(r25.xyz, r11.xyz));
      r17.w = log2(r17.w);
      r17.w = r17.w * r14.w;
      r17.w = exp2(r17.w);
      r25.xyz = r26.xyz * r15.www;
      r24.xyz = r24.xyz * r17.www;
      r15.w = log2(r15.w);
      r15.w = 0.100000001 * r15.w;
      r15.w = exp2(r15.w);
      r24.xyz = r24.xyz * r15.www;
      r24.xyz = r24.xyz * r12.www;
      r14.w = r14.w * 0.125 + 0.25;
      r22.xyz = r25.xyz * r12.www + r22.xyz;
      r23.xyz = r24.xyz * r14.www + r23.xyz;
      r9.w = r13.w;
      r1.w = r11.w;
    }
    r9.w = dot(r19.xyz, r19.xyz);
    r9.w = rsqrt(r9.w);
    r24.xyz = r19.xyz * r9.www;
    r9.w = dot(r24.xyz, r11.xyz);
    r9.w = r9.w + r9.w;
    r24.xyz = r11.xyz * -r9.www + r24.xyz;
    r9.w = (uint)r10.w >> 16;
    r19.w = 1;
    r25.zw = float2(1,1);
    r10.xyw = r22.xyz;
    r26.xyz = r23.xyz;
    r11.w = r1.w;
    r12.w = 0;
    while (true) {
      r13.w = cmp((uint)r12.w >= (uint)r9.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) r27.xy, r11.w, l(0), t59.xyxx
    r27.x = SS_DiffuseMap[]..swiz;
    r27.y = SS_DiffuseMap[]..swiz;
      r13.w = (int)r11.w + 1;
      r14.w = (int)r7.w & (int)r27.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) r28.xyzw, r27.x, l(0), t62.xyzw
    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, r27.x, l(16), t62.xyzw
    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) r27.yzw, r27.x, l(32), t62.xxyz
    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) r30.xyzw, r27.x, l(60), 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.xyzw, r27.x, l(76), t62.yzwx
    r31.x = SS_DiffuseMap[]..swiz;
    r31.y = SS_DiffuseMap[]..swiz;
    r31.z = SS_DiffuseMap[]..swiz;
    r31.w = SS_DiffuseMap[]..swiz;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r32.xyzw, r27.x, l(92), t62.yzwx
    r32.x = SS_DiffuseMap[]..swiz;
    r32.y = SS_DiffuseMap[]..swiz;
    r32.z = SS_DiffuseMap[]..swiz;
    r32.w = SS_DiffuseMap[]..swiz;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r33.xyzw, r27.x, l(108), t62.xyzw
    r33.x = SS_DiffuseMap[]..swiz;
    r33.y = SS_DiffuseMap[]..swiz;
    r33.z = SS_DiffuseMap[]..swiz;
    r33.w = SS_DiffuseMap[]..swiz;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r34.w, r27.x, l(124), t62.xxxx
    r34.w = SS_DiffuseMap[]..swiz;
      r35.xyz = r30.yzw;
      r35.w = r31.w;
      r35.x = dot(r19.xyzw, r35.xyzw);
      r31.w = r32.w;
      r35.y = dot(r19.xyzw, r31.xyzw);
      r32.w = r33.x;
      r14.w = dot(r19.xyzw, r32.xyzw);
      r34.xyz = r33.yzw;
      r17.w = dot(r19.xyzw, r34.xyzw);
      r14.w = cmp(0 < r14.w);
      r28.xyz = r28.xyz + -r19.xyz;
      r18.w = dot(r28.xyz, r28.xyz);
      r21.w = rsqrt(r18.w);
      r30.yzw = r28.xyz * r21.www;
      r22.w = cmp(0 < r30.x);
      r23.w = r28.w * r28.w;
      r23.w = 1 / r23.w;
      r31.x = 1 / r18.w;
      r24.w = r31.x + -r23.w;
      r31.w = max(0, r24.w);
      r24.w = saturate(dot(r30.yzw, r11.xyz));
      r32.xy = r35.xy / r17.ww;
      r26.w = dot(r32.xy, r32.xy);
      r26.w = 1 + -r26.w;
      r31.y = max(0, r26.w);
      r18.w = r23.w * r18.w;
      r18.w = min(1, r18.w);
      r31.z = 1 + -r18.w;
      r17.w = r17.w / r28.w;
      r17.w = saturate(1 + -r17.w);
      r25.y = r31.y * r31.y;
      r25.x = r17.w * r17.w;
      r31.xyzw = r22.wwww ? r31.xyzw : r25.xyzw;
      r28.xyz = r28.xyz * r21.www + r21.xyz;
      r17.w = dot(r28.xyz, r28.xyz);
      r17.w = rsqrt(r17.w);
      r28.xyz = r28.xyz * r17.www;
      r17.w = r29.w * r5.w;
      r18.w = r5.w * 0.00999999978 + r29.w;
      r17.w = r17.w / r18.w;
      r17.w = max(1, r17.w);
      r18.w = saturate(dot(r28.xyz, r11.xyz));
      r18.w = log2(r18.w);
      r18.w = r18.w * r17.w;
      r18.w = exp2(r18.w);
      r28.xyz = r31.yyy * r31.wzx;
      r29.xyz = r29.xyz * r24.www;
      r31.xyz = r29.xyz * r28.xxx;
      r32.xyz = r27.yzw * r18.www;
      r18.w = log2(r24.w);
      r18.w = 0.100000001 * r18.w;
      r18.w = exp2(r18.w);
      r32.xyz = r32.xyz * r18.www;
      r28.xyw = r32.xyz * r28.yyy;
      r18.w = 0.25 * r17.w;
      r17.w = r17.w * 0.125 + 0.25;
      r28.xyw = r28.xyw * r17.www;
      r21.w = saturate(dot(r30.yzw, r24.xyz));
      r21.w = log2(r21.w);
      r18.w = r21.w * r18.w;
      r18.w = exp2(r18.w);
      r17.w = r18.w * r17.w;
      r29.xyz = r29.xyz * r28.zzz;
      r27.xyz = r27.yzw * r17.www;
      r27.xyz = r27.xyz * r28.zzz;
      r29.xyz = r22.www ? r31.xyz : r29.xyz;
      r27.xyz = r22.www ? r28.xyw : r27.xyz;
      r28.xyz = r14.www ? r29.xyz : 0;
      r27.xyz = r14.www ? r27.xyz : 0;
      r10.xyw = r28.xyz + r10.xyw;
      r26.xyz = r27.xyz + r26.xyz;
      r12.w = r15.w;
      r11.w = r13.w;
    }
    r11.xyz = -r13.xyz * float3(0.5,0.5,0.5) + float3(1,1,1);
    r10.xyw = r11.xyz * r10.xyw;
    r11.xyz = r26.xyz * r13.xyz;
    r13.xyz = r10.xyw * r8.www;
    r19.xyz = r11.xyz * r8.www;
    r15.xyz = r10.xyw * r8.www + r15.xyz;
    r8.xyz = r11.xyz * r8.www + r8.xyz;
  } else {
    r13.xyz = float3(0,0,0);
    r19.xyz = float3(0,0,0);
  }
  r8.xyz = r8.xyz + r7.xyz;
  r10.xyw = r12.xyz * r8.www + r15.xyz;
  r8.xyz = r14.xyz * r10.xyw + r8.xyz;
  r11.xyz = MultiBlend2_et1_em_snp_0_float_3_0 * r6.xyz + r8.xyz;
  r11.w = 1;
  r11.xyzw = VC_InstanceData[r0.w].mulCol.xyzw * r11.xyzw;
  r1.w = FC_HeightFogParam.w + -r9.y;
  r1.w = -FC_HeightFogParam.y + r1.w;
  r1.w = saturate(FC_HeightFogParam.z * r1.w);
  r5.w = dot(-r9.xz, -r9.xz);
  r5.w = sqrt(r5.w);
  r5.w = -FC_ExtFogParam.y + r5.w;
  r5.w = FC_ExtFogParam.z * r5.w;
  r5.w = exp2(-r5.w);
  r5.w = saturate(-r5.w * FC_ExtFogParam.x + FC_ExtFogParam.x);
  r1.w = saturate(FC_HeightFogParam.x * r1.w);
  r6.x = dot(r11.xyz, float3(0.298909992,0.586610019,0.114480004));
  r6.x = -1 + r6.x;
  r6.y = FC_FogCol.w * r6.x + 1;
  r6.x = FC_HeightFogCol.w * r6.x + 1;
  r8.xyz = FC_FogCol.xyz * r6.yyy + -r11.xyz;
  r8.xyz = r5.www * r8.xyz + r11.xyz;
  r6.xyz = FC_HeightFogCol.xyz * r6.xxx + -r8.xyz;
  r6.xyz = r1.www * r6.xyz + r8.xyz;
  r1.w = -0.5 + r2.w;
  r2.w = cmp(0.000000 == VC_InstanceData[r0.w].mulCol.w);
  r5.w = cmp(0 < FC_DitherEnable);
  r7.w = cmp(0 != FC_isDitherAlpha);
  r5.w = r5.w ? r7.w : 0;
  r0.w = r1.w * 0.999000013 + VC_InstanceData[r0.w].ditherFadeAlpha;
  r0.w = cmp(r0.w < 0.5);
  r0.w = r0.w ? r5.w : 0;
  r5.w = cmp(0 < FC_AlphaRef.x);
  r5.w = r2.w ? r5.w : 0;
  r1.w = r1.w * FC_AlphaRef.y + 1;
  r1.w = cmp(r1.w < FC_AlphaRef.x);
  r1.w = (int)r1.w | (int)r5.w;
  r0.w = (int)r0.w | (int)r1.w;
  r0.w = r20.y ? r2.w : r0.w;
  if (r0.w != 0) discard;
  r9.w = r0.w ? 0 : r11.w;
  r4.xyw = r4.xyw * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  r4.xyw = r20.zzz ? r4.xyw : r6.xyz;
  r1.xyz = r1.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  r1.xyz = r20.www ? r1.xyz : r4.xyw;
  r11.xyzw = cmp(float4(20,21,11,12) == FC_DebugOutputMode.xxxx);
  r1.xyz = r11.xxx ? r13.xyz : r1.xyz;
  r1.xyz = r11.yyy ? r19.xyz : r1.xyz;
  r0.w = (int)r11.w | (int)r11.z;
  r1.xyz = r0.www ? float3(1,1,1) : r1.xyz;
  r11.xyzw = cmp(float4(3,4,5,1) == FC_DebugOutputMode.xxxx);
  r1.xyz = r11.xxx ? r4.zzz : r1.xyz;
  r4.xyz = sqrt(r5.xyz);
  r4.xyz = -FC_DebugOutputMode.yyy + r4.xyz;
  r4.xyz = r4.xyz / FC_DebugOutputMode.zzz;
  r4.yzw = saturate(r4.xyz);
  r1.xyz = r11.yyy ? r4.yzw : r1.xyz;
  r0.w = cmp(r4.x >= 0);
  r1.w = cmp(1 >= r4.x);
  r0.w = r0.w ? r1.w : 0;
  r5.xyzw = r4.xxxx * float4(0,4,0,4) + float4(0,0,1,-1);
  r4.yzw = r5.www * float3(0,0,-1) + float3(0,1,1);
  r6.xyz = cmp(r4.xxx < float3(0.25,0.5,0.75));
  r12.xyzw = r4.xxxx * float4(4,4,4,4) + float4(-2,-2,-3,-3);
  r8.xyz = r12.xyy * float3(1,0,0) + float3(0,1,0);
  r10.xyw = r12.zwz * float3(0,-1,0) + float3(1,1,0);
  r8.xyz = r6.zzz ? r8.xyz : r10.xyw;
  r4.xyz = r6.yyy ? r4.yzw : r8.xyz;
  r4.xyz = r6.xxx ? r5.xyz : r4.xyz;
  r4.xyz = r0.www ? r4.xyz : 0;
  r1.xyz = r11.zzz ? r4.xyz : r1.xyz;
  r3.xyz = sqrt(r3.xyz);
  r1.xyz = r11.www ? r3.xyz : r1.xyz;
  r4.xyzw = cmp(float4(49,34,30,32) == FC_DebugOutputMode.xxxx);
  r0.w = dot(float3(0.298909992,0.586610019,0.114480004), r3.xyz);
  r1.w = cmp(r0.w < 0.125490203);
  r2.w = cmp(0.952941179 < r0.w);
  r3.xyz = r2.www ? float3(0,1,0) : r0.www;
  r3.xyz = r1.www ? float3(1,0,0) : r3.xyz;
  r1.xyz = r4.xxx ? r3.xyz : r1.xyz;
  r1.xyz = r4.yyy ? r10.zzz : r1.xyz;
  r0.w = (int)r4.w | (int)r4.z;
  r1.xyz = r0.www ? r8.www : r1.xyz;
  r4.xyzw = cmp(float4(33,31,13,14) == FC_DebugOutputMode.xxxx);
  r0.w = (int)r4.y | (int)r4.x;
  r1.xyz = r0.www ? float3(1,1,1) : r1.xyz;
  r2.xyz = r2.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  r1.xyz = r4.zzz ? r2.xyz : r1.xyz;
  r0.xyz = r0.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  r0.xyz = r4.www ? r0.xyz : r1.xyz;
  r1.xyzw = cmp(float4(17,55,56,16) == FC_DebugOutputMode.xxxx);
  r0.w = FC_DebugOutputMode.z + -FC_DebugOutputMode.y;
  r2.x = -FC_DebugOutputMode.y / r0.w;
  r0.xyz = r1.xxx ? r2.xxx : r0.xyz;
  r1.x = (int)r1.z | (int)r1.y;
  r0.xyz = r1.xxx ? float3(0,0,0) : r0.xyz;
  r1.x = -FC_DebugOutputMode.y + v3.w;
  r0.w = saturate(r1.x / r0.w);
  r0.xyz = r1.www ? r0.www : r0.xyz;
  r1.xyzw = cmp(float4(40,41,42,46) == FC_DebugOutputMode.xxxx);
  r0.xyz = r1.xxx ? r3.www : r0.xyz;
  r0.xyz = r1.yyy ? r16.www : r0.xyz;
  r0.xyz = r1.zzz ? r16.xyz : r0.xyz;
  r0.xyz = r20.xxx ? r7.xyz : r0.xyz;
  r0.xyz = r1.www ? r18.xyz : r0.xyz;
  r1.xyzw = cmp(float4(47,50,15,57) == FC_DebugOutputMode.xxxx);
  r0.xyz = r1.xxx ? r17.xyz : r0.xyz;
  r0.xyz = r1.yyy ? float3(0,0,1) : r0.xyz;
  r0.w = (int)r1.w | (int)r1.z;
  r0.xyz = r0.www ? float3(0,0,0) : r0.xyz;
  r1.xyzw = cmp(float4(58,59,60,61) == FC_DebugOutputMode.xxxx);
  r0.xyz = r1.xxx ? float3(1,1,1) : r0.xyz;
  r0.w = (int)r1.z | (int)r1.y;
  r0.w = (int)r1.w | (int)r0.w;
  r1.xyzw = cmp(float4(62,63,65,66) == FC_DebugOutputMode.xxxx);
  r0.w = (int)r0.w | (int)r1.x;
  r0.xyz = r0.www ? float3(0,0,0) : r0.xyz;
  r0.xyz = r1.yyy ? float3(0.5,0.5,0.5) : r0.xyz;
  x0[0].xyz = float3(1,1,1);
  x0[1].xyz = float3(1,0,0);
  x0[2].xyz = float3(0,1,0);
  x0[3].xyz = float3(0,0,1);
  x0[4].xyz = float3(0.5,0.5,0.5);
  x0[5].xyz = float3(1,1,0);
  x0[6].xyz = float3(1,0,1);
  x0[7].xyz = float3(0,1,1);
  x0[8].xyz = float3(0.200000003,0.200000003,0.200000003);
  x0[9].xyz = float3(1,0.5,0);
  x0[10].xyz = float3(1,0,0.5);
  x0[11].xyz = float3(0,1,0.5);
  x0[12].xyz = float3(0.5,1,0);
  x0[13].xyz = float3(0.5,0,1);
  x0[14].xyz = float3(0,0.5,1);
  x0[15].xyz = float3(0,0,0);
  r0.w = max(0, r6.w);
  r0.w = min(15, r0.w);
  r0.w = (int)r0.w;
  r2.xyz = x0[r0.w+0].xyz;
  r0.xyz = r1.zzz ? r2.xyz : r0.xyz;
  r0.xyz = r1.www ? FC_DebugOutputMode.yyy : r0.xyz;
  r1.xyzw = cmp(float4(67,68,75,76) == FC_DebugOutputMode.xxxx);
  r0.xyz = r1.xxx ? FC_DebugOutputMode.zzz : r0.xyz;
  r2.xyz = FC_DifColMul.xyz * FC_DifColMul.www;
  r9.xyz = r1.yyy ? r2.xyz : r0.xyz;
  r2.w = 1;
  r0.xyzw = r20.yyyy ? r2.xyzw : r9.xyzw;
  r1.x = (int)r1.w | (int)r1.z;
  r1.y = cmp(77.000000 == FC_DebugOutputMode.x);
  r1.x = (int)r1.y | (int)r1.x;
  o0.xyz = r1.xxx ? float3(0,0,0) : r0.xyz;
  o0.w = r0.w;
  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
//   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 [unused]
//   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 [unused]
//   float4 FC_WaterDiffuseUvScrollSpeed;// Offset:  288 Size:    16 [unused]
//   float4 FC_WaterMiddleUvScrollSpeed;// Offset:  304 Size:    16 [unused]
//   float4 FC_WaterFogParam0;          // Offset:  320 Size:    16 [unused]
//   float4 FC_WaterFogParam1;          // Offset:  336 Size:    16 [unused]
//   float4 FC_WaterFresnel;            // Offset:  352 Size:    16 [unused]
//   float4 FC_WaterFadeParam;          // Offset:  368 Size:    16 [unused]
//   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]
//   float MultiBlend2_et1_em_snp_0_float_0_0;// Offset:  624 Size:     4
//   float MultiBlend2_et1_em_snp_0_float_1_0;// Offset:  628 Size:     4
//   float MultiBlend2_et1_em_snp_0_float_2_0;// Offset:  632 Size:     4
//   float MultiBlend2_et1_em_snp_0_float_3_0;// Offset:  636 Size:     4
//
// }
//
// cbuffer cbMtdParam
// {
//
//   float4 FC_DifMapMulCol;            // Offset:    0 Size:    16 [unused]
//   float4 FC_SpcMapMulCol;            // Offset:   16 Size:    16 [unused]
//   float4 FC_SpcParam;                // Offset:   32 Size:    16 [unused]
//   float4 FC_SSAOParam;               // Offset:   48 Size:    16 [unused]
//   float3 FC_CDRFParam;               // Offset:   64 Size:    12 [unused]
//   float4 FC_AlphaRef;                // Offset:   80 Size:    16
//   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_Falloff_InsideColor;     // Offset:  240 Size:    16 [unused]
//   float4 FC_Falloff_OutsideColor;    // Offset:  256 Size:    16 [unused]
//   float4 FC_Falloff_Offset;          // Offset:  272 Size:    16 [unused]
//   float4 FC_Falloff_EdgePower;       // Offset:  288 Size:    16 [unused]
//   float4 FC_Falloff_HeightFade;      // Offset:  304 Size:    16 [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]
//   float4 FC_SAT_DUMMMY_P7_8;         // Offset:  384 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P7_9;         // Offset:  400 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P7_10;        // Offset:  416 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 [unused]
//   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
//   float4 FC_DebugParam2;             // Offset:   32 Size:    16 [unused]
//   float FC_GlobalSpecularMask;       // Offset:   48 Size:     4 [unused]
//   float FC_GlobalReflectanceScale;   // Offset:   52 Size:     4
//   float FC_GlobalShininessScale;     // Offset:   56 Size:     4
//   float FC_GlobalAlbedoOffset;       // Offset:   60 Size:     4
//   float4 FC_GlobalRefRectanceRGBScale;// Offset:   64 Size:    16
//   float4 FC_GlobalAlbedoOffsetRGB;   // Offset:   80 Size:    16
//   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 [unused]
//   float FC_DominantSharpnesMinValue; // Offset:  192 Size:     4 [unused]
//   float FC_DominantSharpnesOffset;   // Offset:  196 Size:     4
//   float FC_DominantSharpnesExponent; // Offset:  200 Size:     4 [unused]
//   float FC_DominantColorScale;       // Offset:  204 Size:     4
//   float4 FC_DominantRgbScale;        // Offset:  208 Size:    16
//
// }
//
// 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
//   float4 FC_DirLightVec_3;           // Offset:   48 Size:    16
//   float4 FC_DirLightCol_0;           // Offset:   64 Size:    16
//   float4 FC_DirLightCol_1;           // Offset:   80 Size:    16
//   float4 FC_DirLightCol_2;           // Offset:   96 Size:    16
//   float4 FC_DirLightCol_3;           // Offset:  112 Size:    16
//   float4 FC_DirLightSpc_0;           // Offset:  128 Size:    16
//   float4 FC_DirLightSpc_1;           // Offset:  144 Size:    16
//   float4 FC_DirLightSpc_2;           // Offset:  160 Size:    16
//   float4 FC_DirLightSpc_3;           // Offset:  176 Size:    16
//   float4 FC_AmbientSH[3];            // Offset:  192 Size:    48 [unused]
//   float4 FC_AmbientReflection;       // Offset:  240 Size:    16 [unused]
//   uint4 FC_bLocalLight;              // Offset:  256 Size:    16
//   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]
//
// }
//
// cbuffer cbModelParam
// {
//
//   float4 FC_DifColMul;               // Offset:    0 Size:    16
//   float FC_EnvMapInterpRatio;        // Offset:   16 Size:     4 [unused]
//   float FC_EnvMapColorScale0;        // Offset:   20 Size:     4 [unused]
//   float FC_EnvMapColorScale1;        // Offset:   24 Size:     4 [unused]
//   float FC_DitherEnable;             // Offset:   32 Size:     4
//   float FC_FROZEN_RATE;              // Offset:   44 Size:     4 [unused]
//   float FC_Perlin_Freq;              // Offset:   48 Size:     4 [unused]
//   float FC_Perlin_Amp;               // Offset:   52 Size:     4 [unused]
//   float FC_Perlin_Lacunarity;        // Offset:   56 Size:     4 [unused]
//   float FC_Perlin_Gain;              // Offset:   60 Size:     4 [unused]
//   float FC_SnowRate;                 // Offset:   64 Size:     4 [unused]
//   float FC_SnowMinDot;               // Offset:   68 Size:     4 [unused]
//   float FC_SnowMaxDot;               // Offset:   72 Size:     4 [unused]
//   float FC_SparkleExponent;          // Offset:   80 Size:     4 [unused]
//   float FC_SparkleThreshold;         // Offset:   84 Size:     4 [unused]
//   float FC_SparkleMul;               // Offset:   88 Size:     4 [unused]
//   float FC_SparkleMaskExponent;      // Offset:   92 Size:     4 [unused]
//   float4 FC_SkinMatchColor;          // Offset:   96 Size:    16 [unused]
//   int FC_EnvId;                      // Offset:  112 Size:     4 [unused]
//   float4 FC_ParallaxCorrectedCubemapOriginA;// Offset:  128 Size:    16
//   float4 FC_ParallaxCorrectedCubemapOriginB;// Offset:  144 Size:    16
//   float4x4 FC_ParallaxCorrectedCubemapObbA;// Offset:  160 Size:    64
//   float4x4 FC_ParallaxCorrectedCubemapInvObbA;// Offset:  224 Size:    64
//   float4x4 FC_ParallaxCorrectedCubemapObbB;// Offset:  288 Size:    64
//   float4x4 FC_ParallaxCorrectedCubemapInvObbB;// Offset:  352 Size:    64
//   float FC_ParallaxCorrectedCubemapObbAEnable;// Offset:  416 Size:     4
//   float FC_ParallaxCorrectedCubemapObbBEnable;// Offset:  420 Size:     4
//
// }
//
// cbuffer cbTexHdrScaleParam
// {
//
//   float4 FC_TexHdrScaleParam;        // Offset:    0 Size:    16
//
// }
//
// 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_GIMap                          sampler      NA          NA    5        1
// SS_WrapLinear                     sampler      NA          NA    8        1
// SS_ClampLinear                    sampler      NA          NA    9        1
// g_DiffuseTexture                  texture  float4          2d    0        1
// MultiBlend2_et1_em_snp_0_Texture2D_6    texture  float4          2d    2        1
// MultiBlend2_et1_em_snp_0_Texture2D_5    texture  float4          2d    3        1
// MultiBlend2_et1_em_snp_0_Texture2D_4    texture  float4          2d    4        1
// MultiBlend2_et1_em_snp_0_Texture2D_3    texture  float4          2d    5        1
// MultiBlend2_et1_em_snp_0_Texture2D_2    texture  float4          2d    6        1
// MultiBlend2_et1_em_snp_0_Texture2D_14    texture  float4          2d    7        1
// MultiBlend2_et1_em_snp_0_Texture2D_13    texture  float4          2d    8        1
// MultiBlend2_et1_em_snp_0_Texture2D_1    texture  float4          2d   10        1
// MultiBlend2_et1_em_snp_0_Texture2D_0    texture  float4          2d   11        1
// g_DOLTexture                      texture  float4          2d   26        1
// g_DOLTexture2                     texture  float4          2d   27        1
// g_IBLTexture                      texture  float4        cube   30        1
// g_IBLTexture2                     texture  float4        cube   31        1
// g_SSAOTexture                     texture  float4          2d   33        1
// g_DitherTexture                   texture  float4          2d   38        1
// g_RLRTexture                      texture  float4          2d   44        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
// cbTexHdrScaleParam                cbuffer      NA          NA    0        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
// cbModelParam                      cbuffer      NA          NA    7        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  
// NORMAL                   0   xyzw        1     NONE   float   xyzw
// TANGENT                  0   xyzw        2     NONE   float   xyzw
// POSITION                 1   xyzw        3     NONE   float   xyzw
// COLOR                    0   xyzw        4     NONE   float      w
// TEXCOORD                 0   xyzw        5     NONE   float   xyzw
// TEXCOORD                 2   xyzw        6     NONE   float   x   
// SV_ISFRONTFACE           0   x           7    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[15], immediateIndexed
dcl_constantbuffer cb2[40], immediateIndexed
dcl_constantbuffer cb3[6], immediateIndexed
dcl_constantbuffer cb8[57], immediateIndexed
dcl_constantbuffer cb9[14], immediateIndexed
dcl_constantbuffer cb4[34], dynamicIndexed
dcl_constantbuffer cb5[17], immediateIndexed
dcl_constantbuffer cb6[5], immediateIndexed
dcl_constantbuffer cb7[27], immediateIndexed
dcl_constantbuffer cb0[1], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s5, mode_default
dcl_sampler s8, mode_default
dcl_sampler s9, mode_default
dcl_resource_texture2d (float,float,float,float) t0
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_resource_texture2d (float,float,float,float) t6
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) t11
dcl_resource_texture2d (float,float,float,float) t26
dcl_resource_texture2d (float,float,float,float) t27
dcl_resource_texturecube (float,float,float,float) t30
dcl_resource_texturecube (float,float,float,float) t31
dcl_resource_texture2d (float,float,float,float) t33
dcl_resource_texture2d (float,float,float,float) t38
dcl_resource_texture2d (float,float,float,float) t44
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 v3.xyzw
dcl_input_ps linear v4.w
dcl_input_ps linear v5.xyzw
dcl_input_ps linear v6.x
dcl_input_ps_sgv v7.x, is_front_face
dcl_output o0.xyzw
dcl_temps 36
dcl_indexableTemp x0[16], 4
mul r0.xyz, v1.zxyz, v2.yzxy
mad r0.xyz, v1.yzxy, v2.zxyz, -r0.xyzx
mul r0.xyz, r0.xyzx, v2.wwww
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
dp3 r0.w, v1.xyzx, v1.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, v1.xyzx
dp3 r0.w, v2.xyzx, v2.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, v2.xyzx
movc r1.xyz, v7.xxxx, r1.xyzx, -r1.xyzx
mad r3.xy, v5.xyxx, cb1[1].xyxx, cb1[1].zwzz
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t10.xyzw, s0
mad r4.xy, v5.xyxx, cb1[2].xyxx, cb1[2].zwzz
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r4.xyxx, t6.xyzw, s0
mul r0.w, l(0.010000), cb2[39].x
add r1.w, -v6.x, l(1.000000)
mad r0.w, -r0.w, r1.w, v6.x
mad r2.w, v4.w, cb2[39].y, l(1.000000)
mul_sat r0.w, r0.w, r2.w
add r4.xyz, -r3.xyzx, r4.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r4.xy, v5.xyxx, cb1[13].xyxx, cb1[13].zwzz
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r4.xyxx, t8.xyzw, s0
mad r5.xy, v5.xyxx, cb1[14].xyxx, cb1[14].zwzz
sample_indexable(texture2d)(float,float,float,float) r5.xyz, r5.xyxx, t7.xyzw, s0
mul r6.xy, v5.xyxx, cb2[39].zzzz
mad r6.xy, r6.xyxx, cb1[0].xyxx, cb1[0].zwzz
sample_indexable(texture2d)(float,float,float,float) r0.w, r6.xyxx, t11.yzwx, s0
add r0.w, r0.w, l(0.010000)
mul r0.w, r0.w, cb2[39].x
mad r0.w, -r0.w, r1.w, v6.x
mul_sat r0.w, r2.w, r0.w
add r5.xyz, -r4.xyzx, r5.xyzx
mad r4.xyz, r0.wwww, r5.xyzx, r4.xyzx
mad r4.xy, r4.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r1.w, r4.xyxx, r4.xyxx
min r1.w, r1.w, l(1.000000)
add r1.w, -r1.w, l(1.000000)
sqrt r1.w, r1.w
mul r5.xyz, r2.xyzx, r4.yyyy
mad r4.xyw, r4.xxxx, r0.xyxz, r5.xyxz
mad r4.xyw, r1.wwww, r1.xyxz, r4.xyxw
dp3 r1.w, r4.xywx, r4.xywx
rsq r1.w, r1.w
mul r4.xyw, r1.wwww, r4.xyxw
mad r5.xy, v5.xyxx, cb1[5].xyxx, cb1[5].zwzz
sample_indexable(texture2d)(float,float,float,float) r5.xyz, r5.xyxx, t3.xyzw, s0
mad r6.xy, v5.xyxx, cb1[6].xyxx, cb1[6].zwzz
sample_indexable(texture2d)(float,float,float,float) r6.xyz, r6.xyxx, t2.xyzw, s0
add r6.xyz, -r5.xyzx, r6.xyzx
mad r5.xyz, r0.wwww, r6.xyzx, r5.xyzx
mad r6.xy, v5.xyxx, cb1[3].xyxx, cb1[3].zwzz
sample_indexable(texture2d)(float,float,float,float) r6.xyz, r6.xyxx, t5.xyzw, s1
mad r7.xy, v5.xyxx, cb1[4].xyxx, cb1[4].zwzz
sample_indexable(texture2d)(float,float,float,float) r7.xyz, r7.xyxx, t4.xyzw, s1
add r7.xyz, -r6.xyzx, r7.xyzx
mad r6.xyz, r0.wwww, r7.xyzx, r6.xyzx
round_ne r0.w, v1.w
ftou r0.w, r0.w
dp4 r7.x, v3.xyzw, cb8[8].xyzw
dp4 r7.y, v3.xyzw, cb8[9].xyzw
dp4 r7.z, v3.xyzw, cb8[10].xyzw
dp4 r1.w, v3.xyzw, cb8[11].xyzw
div r8.xyz, r7.xyzx, r1.wwww
add r9.x, -r8.x, cb8[20].w
add r9.y, -r8.y, cb8[21].w
add r9.z, -r8.z, cb8[22].w
dp3 r1.w, r9.xyzx, r9.xyzx
rsq r1.w, r1.w
mul r8.xyz, r1.wwww, r9.xyzx
mul r10.xy, v0.xyxx, cb8[1].zwzz
mul r10.zw, v0.xxxy, l(0.000000, 0.000000, 0.250000, 0.250000)
sample_indexable(texture2d)(float,float,float,float) r2.w, r10.zwzz, t38.xyzw, s8
mul r3.w, cb9[3].y, cb9[3].y
mul r11.xyz, r3.wwww, r5.xyzx
mul r12.xyz, cb9[4].xyzx, cb9[4].xyzx
mul r13.xyz, r11.xyzx, r12.xyzx
mul r3.w, r4.z, cb9[3].z
mul r5.w, r3.w, l(13.000000)
exp r5.w, r5.w
lod r6.w, v5.xyxx, t0.y, s0
mad r14.xyz, cb9[5].xyzx, l(0.003922, 0.003922, 0.003922, 0.000000), r3.xyzx
dp3 r8.w, l(0.299000, 0.587000, 0.114000, 0.000000), r14.xyzx
dp3 r15.y, l(0.500000, -0.419000, -0.081000, 0.000000), r14.xyzx
dp3 r15.z, l(-0.169000, -0.332000, 0.500000, 0.000000), r14.xyzx
mad r15.x, cb9[3].w, l(0.003922), r8.w
dp2 r14.x, l(1.000000, 1.402000, 0.000000, 0.000000), r15.xyxx
dp3 r14.y, l(1.000000, -0.714000, -0.344000, 0.000000), r15.xyzx
dp2 r14.z, l(1.000000, 1.772000, 0.000000, 0.000000), r15.xzxx
sample_indexable(texture2d)(float,float,float,float) r8.w, r10.xyxx, t33.yzwx, s8
dp3 r9.w, r4.xywx, r8.xyzx
add r10.z, r8.w, r9.w
mad r10.z, r10.z, r10.z, l(-1.000000)
add_sat r10.z, r8.w, r10.z
mov_sat r10.w, r9.w
add r10.w, -r10.w, l(1.000000)
add r11.w, r9.w, r9.w
mad r15.xyz, r11.wwww, r4.xywx, -r8.xyzx
mul r11.w, r10.w, r10.w
mul r11.w, r11.w, r11.w
mul r10.w, r10.w, r11.w
mul r10.w, r10.z, r10.w
sample_indexable(texture2d)(float,float,float,float) r16.xyzw, v5.zwzz, t26.xyzw, s5
sample_indexable(texture2d)(float,float,float,float) r17.xyzw, v5.zwzz, t27.xyzw, s5
add r18.xyzw, r17.yzzx, l(-0.500000, -0.500000, -0.500000, -0.500000)
add r18.xyzw, r18.xyzw, r18.xyzw
dp3 r11.w, r18.xzwx, r18.xzwx
rsq r11.w, r11.w
mul r18.xyzw, r11.wwww, r18.xyzw
imul null, r0.w, r0.w, l(17)
mul r11.w, r18.x, -cb4[r0.w + 12].z
mad r11.w, r18.w, cb4[r0.w + 12].w, r11.w
mad r11.w, -r18.y, -cb4[r0.w + 12].y, r11.w
dp2 r12.w, r18.wxww, cb4[r0.w + 12].zwzz
mad r12.w, r18.z, -cb4[r0.w + 12].x, r12.w
mul r18.xy, r18.xxxx, -cb4[r0.w + 12].xyxx
mad r13.w, r18.w, -cb4[r0.w + 12].y, -r18.x
mad r13.w, r18.z, cb4[r0.w + 12].w, r13.w
mad r14.w, r18.w, cb4[r0.w + 12].x, -r18.y
mad r14.w, -r18.z, -cb4[r0.w + 12].z, r14.w
mul r15.w, r14.w, cb4[r0.w + 12].x
mad r15.w, cb4[r0.w + 12].w, r11.w, r15.w
mul r18.xy, r13.wwww, cb4[r0.w + 12].xwxx
mad r13.w, cb4[r0.w + 12].y, r13.w, r15.w
mad r19.x, -cb4[r0.w + 12].z, r12.w, r13.w
mad r13.w, cb4[r0.w + 12].w, r12.w, -r18.x
mad r13.w, cb4[r0.w + 12].y, r14.w, r13.w
mad r19.y, cb4[r0.w + 12].z, r11.w, r13.w
mad r12.w, cb4[r0.w + 12].x, r12.w, r18.y
mad r11.w, -cb4[r0.w + 12].y, r11.w, r12.w
mad r19.z, cb4[r0.w + 12].z, r14.w, r11.w
add_sat r11.w, r17.w, cb9[12].y
mul r16.xyz, r16.xyzx, r16.xyzx
mul r16.xyz, r16.xyzx, cb0[0].xyzx
mul r16.xyz, r16.xyzx, cb9[13].xyzx
mul r18.xyz, r16.xyzx, cb9[12].wwww
mul r20.xyz, r11.wwww, r18.xyzx
mad r16.xyz, r16.xyzx, cb9[12].wwww, -r20.xyzx
dp3_sat r11.w, r19.xyzx, r4.xywx
mad r11.xyz, -r11.xyzx, r12.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mul r12.xyz, r11.xyzx, r11.wwww
mad r12.xyz, r20.xyzx, r12.xyzx, r16.xyzx
sqrt r16.xyz, r12.xyzx
sqrt r18.xyz, r18.xyzx
mul r12.xyz, r11.xyzx, r12.xyzx
mad r11.w, -r3.w, l(6.500000), l(6.500000)
min r11.w, r11.w, l(6.000000)
mul r19.xyz, r10.wwww, r11.xyzx
mul r3.w, r3.w, r3.w
mad r19.xyz, r19.xyzx, r3.wwww, r13.xyzx
eq r20.xyzw, l(48.000000, 69.000000, 2.000000, 10.000000), cb9[1].xxxx
movc r19.xyz, r20.xxxx, l(1.000000,1.000000,1.000000,0), r19.xyzx
movc r3.w, r20.x, l(1.000000), cb4[r0.w + 14].w
movc r10.w, r20.x, l(1.000000), cb4[r0.w + 15].w
lt r21.xy, l(0.000000, 0.000000, 0.000000, 0.000000), cb7[26].xyxx
mov r7.w, l(1.000000)
dp4 r22.x, r7.xyzw, cb7[14].xyzw
dp4 r22.y, r7.xyzw, cb7[15].xyzw
dp4 r22.z, r7.xyzw, cb7[16].xyzw
dp3 r23.x, r15.xyzx, cb7[14].xyzx
dp3 r23.y, r15.xyzx, cb7[15].xyzx
dp3 r23.z, r15.xyzx, cb7[16].xyzx
lt r24.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r23.xyzx
not r25.xyz, r24.xyzx
and r24.xyz, r21.xxxx, r24.xyzx
add r26.xyz, -r22.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
div r26.xyz, r26.xyzx, r23.xyzx
movc r24.xyz, r24.xyzx, |r26.xyzx|, l(5000.000000,5000.000000,5000.000000,0)
and r25.xyz, r21.xxxx, r25.xyzx
lt r26.xyz, r23.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
and r25.xyz, r25.xyzx, r26.xyzx
add r26.xyz, r22.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
div r26.xyz, r26.xyzx, r23.xyzx
movc r24.xyz, r25.xyzx, |r26.xyzx|, r24.xyzx
min r12.w, r24.y, r24.x
min r12.w, r24.z, r12.w
mad r22.xyz, r23.xyzx, r12.wwww, r22.xyzx
mad r13.w, -r12.w, l(0.000100), l(-1.000000)
lt r23.xyz, r22.xyzx, r13.wwww
mad r12.w, r12.w, l(0.000100), l(1.000000)
lt r24.xyz, r12.wwww, r22.xyzx
or r12.w, r23.x, r24.x
or r12.w, r23.y, r12.w
or r12.w, r24.y, r12.w
or r12.w, r23.z, r12.w
or r12.w, r24.z, r12.w
mov r22.w, l(1.000000)
dp4 r23.x, r22.xyzw, cb7[10].xyzw
dp4 r23.y, r22.xyzw, cb7[11].xyzw
dp4 r23.z, r22.xyzw, cb7[12].xyzw
add r22.xyz, r23.xyzx, -cb7[8].xyzx
sample_l_indexable(texturecube)(float,float,float,float) r22.xyz, r22.xyzx, t30.xyzw, s8, r11.w
mul r22.xyz, r3.wwww, r22.xyzx
movc r22.xyz, r12.wwww, l(0,0,0,0), r22.xyzx
sample_l_indexable(texturecube)(float,float,float,float) r23.xyz, r15.xyzx, t30.xyzw, s8, r11.w
mul r23.xyz, r3.wwww, r23.xyzx
movc r21.xzw, r21.xxxx, r22.xxyz, r23.xxyz
dp4 r22.x, r7.xyzw, cb7[22].xyzw
dp4 r22.y, r7.xyzw, cb7[23].xyzw
dp4 r22.z, r7.xyzw, cb7[24].xyzw
dp3 r7.x, r15.xyzx, cb7[22].xyzx
dp3 r7.y, r15.xyzx, cb7[23].xyzx
dp3 r7.z, r15.xyzx, cb7[24].xyzx
lt r23.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r7.xyzx
not r24.xyz, r23.xyzx
and r23.xyz, r21.yyyy, r23.xyzx
add r25.xyz, -r22.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
div r25.xyz, r25.xyzx, r7.xyzx
movc r23.xyz, r23.xyzx, |r25.xyzx|, l(5000.000000,5000.000000,5000.000000,0)
and r24.xyz, r21.yyyy, r24.xyzx
lt r25.xyz, r7.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
and r24.xyz, r24.xyzx, r25.xyzx
add r25.xyz, r22.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
div r25.xyz, r25.xyzx, r7.xyzx
movc r23.xyz, r24.xyzx, |r25.xyzx|, r23.xyzx
min r3.w, r23.y, r23.x
min r3.w, r23.z, r3.w
mad r7.xyz, r7.xyzx, r3.wwww, r22.xyzx
mad r12.w, -r3.w, l(0.000100), l(-1.000000)
lt r22.xyz, r7.xyzx, r12.wwww
mad r3.w, r3.w, l(0.000100), l(1.000000)
lt r23.xyz, r3.wwww, r7.xyzx
or r3.w, r22.x, r23.x
or r3.w, r22.y, r3.w
or r3.w, r23.y, r3.w
or r3.w, r22.z, r3.w
or r3.w, r23.z, r3.w
mov r7.w, l(1.000000)
dp4 r22.x, r7.xyzw, cb7[18].xyzw
dp4 r22.y, r7.xyzw, cb7[19].xyzw
dp4 r22.z, r7.xyzw, cb7[20].xyzw
add r7.xyz, r22.xyzx, -cb7[9].xyzx
sample_l_indexable(texturecube)(float,float,float,float) r7.xyz, r7.xyzx, t31.xyzw, s8, r11.w
mul r7.xyz, r10.wwww, r7.xyzx
movc r7.xyz, r3.wwww, l(0,0,0,0), r7.xyzx
sample_l_indexable(texturecube)(float,float,float,float) r22.xyz, r15.xyzx, t31.xyzw, s8, r11.w
mul r22.xyz, r10.wwww, r22.xyzx
movc r7.xyz, r21.yyyy, r7.xyzx, r22.xyzx
add r7.xyz, -r21.xzwx, r7.xyzx
mad r7.xyz, cb4[r0.w + 13].wwww, r7.xyzx, r21.xzwx
mul r7.xyz, r19.xyzx, r7.xyzx
mul r7.xyz, r8.wwww, r7.xyzx
dp3 r3.w, r15.xyzx, r1.xyzx
add_sat r3.w, r3.w, l(1.000000)
mul r3.w, r3.w, r3.w
mul r7.xyz, r3.wwww, r7.xyzx
sample_l_indexable(texture2d)(float,float,float,float) r15.xyzw, r10.xyxx, t44.xyzw, s9, r11.w
mul r19.xyz, r8.wwww, r19.xyzx
mul r15.xyz, r15.xyzx, r19.xyzx
add r3.w, -r15.w, l(1.000000)
mad r7.xyz, r7.xyzx, r3.wwww, r15.xyzx
mul r3.w, r16.w, cb4[r0.w + 11].x
mul r15.xyz, r3.wwww, cb5[4].xyzx
dp3 r19.x, cb5[0].xyzx, r4.xywx
dp3 r19.y, cb5[1].xyzx, r4.xywx
mov_sat r19.zw, r19.xxxy
mul r21.xyz, r11.xyzx, r19.zzzz
mul r22.xyz, r11.xyzx, r19.wwww
mul r22.xyz, r22.xyzx, cb5[5].xyzx
mad r15.xyz, r15.xyzx, r21.xyzx, r22.xyzx
ult r21.xy, l(0, 0, 0, 0), cb5[16].xyxx
if_nz cb5[16].x
  dp3 r7.w, cb5[2].xyzx, r4.xywx
  mad r7.w, r7.w, l(0.500000), l(0.500000)
  mul r7.w, r7.w, r7.w
  min r7.w, r7.w, l(1.000000)
  mul r22.xyz, r11.xyzx, r7.wwww
  mad r15.xyz, cb5[6].xyzx, r22.xyzx, r15.xyzx
endif 
if_nz cb5[16].y
  dp3 r7.w, cb5[3].xyzx, r4.xywx
  mad r7.w, r7.w, l(0.500000), l(0.500000)
  mul r7.w, r7.w, r7.w
  min r7.w, r7.w, l(1.000000)
  mul r22.xyz, r11.xyzx, r7.wwww
  mad r15.xyz, cb5[7].xyzx, r22.xyzx, r15.xyzx
endif 
mul r22.xyz, r3.wwww, cb5[8].xyzx
mad r23.xyz, r9.xyzx, r1.wwww, cb5[0].xyzx
dp3 r7.w, r23.xyzx, r23.xyzx
rsq r7.w, r7.w
mul r23.xyz, r7.wwww, r23.xyzx
mad r24.xyz, r9.xyzx, r1.wwww, cb5[1].xyzx
dp3 r7.w, r24.xyzx, r24.xyzx
rsq r7.w, r7.w
mul r24.xyz, r7.wwww, r24.xyzx
dp3_sat r25.x, r23.xyzx, r4.xywx
dp3_sat r25.y, r24.xyzx, r4.xywx
mul r7.w, r5.w, cb5[0].w
mad r10.w, r5.w, l(0.010000), cb5[0].w
div r7.w, r7.w, r10.w
max r26.x, r7.w, l(1.000000)
mul r7.w, r5.w, cb5[1].w
mad r10.w, r5.w, l(0.010000), cb5[1].w
div r7.w, r7.w, r10.w
max r26.y, r7.w, l(1.000000)
log r21.zw, r25.xxxy
mul r21.zw, r21.zzzw, r26.xxxy
exp r21.zw, r21.zzzw
dp3_sat r23.x, r8.xyzx, r23.xyzx
dp3_sat r23.y, r8.xyzx, r24.xyzx
add r23.xy, -r23.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
mul r23.zw, r23.xxxy, r23.xxxy
mul r23.zw, r23.zzzw, r23.zzzw
mul r23.xy, r23.zwzz, r23.xyxx
mad r23.xzw, r23.xxxx, r11.xxyz, r13.xxyz
mad r24.xyz, r23.yyyy, r11.xyzx, r13.xyzx
max r19.xy, r9.wwww, r19.xyxx
max r19.xy, r19.xyxx, l(0.000100, 0.000100, 0.000000, 0.000000)
div r19.xy, r19.zwzz, r19.xyxx
mul r23.xyz, r21.zzzz, r23.xzwx
mul r19.xzw, r19.xxxx, r23.xxyz
mul r23.xyz, r21.wwww, r24.xyzx
mul r23.xyz, r19.yyyy, r23.xyzx
mad r21.zw, r26.xxxy, l(0.000000, 0.000000, 0.125000, 0.125000), l(0.000000, 0.000000, 0.250000, 0.250000)
mul r22.xyz, r22.xyzx, r21.zzzz
mul r24.xyz, r21.wwww, cb5[9].xyzx
mul r23.xyz, r23.xyzx, r24.xyzx
mad r19.xyz, r22.xyzx, r19.xzwx, r23.xyzx
dp3 r7.w, r4.xywx, cb5[2].xyzx
mad r22.xyz, r9.xyzx, r1.wwww, cb5[2].xyzx
dp3 r10.w, r22.xyzx, r22.xyzx
rsq r10.w, r10.w
mul r22.xyz, r10.wwww, r22.xyzx
dp3_sat r10.w, r22.xyzx, r4.xywx
mul r11.w, r5.w, cb5[2].w
mad r12.w, r5.w, l(0.010000), cb5[2].w
div r11.w, r11.w, r12.w
max r11.w, r11.w, l(1.000000)
log r10.w, r10.w
mul r10.w, r10.w, r11.w
exp r10.w, r10.w
dp3_sat r12.w, r8.xyzx, r22.xyzx
add r12.w, -r12.w, l(1.000000)
mul r13.w, r12.w, r12.w
mul r13.w, r13.w, r13.w
mul r12.w, r12.w, r13.w
mad r22.xyz, r12.wwww, r11.xyzx, r13.xyzx
mov_sat r12.w, r7.w
max r7.w, r9.w, r7.w
max r7.w, r7.w, l(0.000100)
div r7.w, r12.w, r7.w
mul r22.xyz, r10.wwww, r22.xyzx
mul r22.xyz, r7.wwww, r22.xyzx
mad r7.w, r11.w, l(0.125000), l(0.250000)
mul r23.xyz, r7.wwww, cb5[10].xyzx
mad r22.xyz, r23.xyzx, r22.xyzx, r19.xyzx
movc r19.xyz, r21.xxxx, r22.xyzx, r19.xyzx
dp3 r7.w, r4.xywx, cb5[3].xyzx
mad r21.xzw, r9.xxyz, r1.wwww, cb5[3].xxyz
dp3 r1.w, r21.xzwx, r21.xzwx
rsq r1.w, r1.w
mul r21.xzw, r1.wwww, r21.xxzw
dp3_sat r1.w, r21.xzwx, r4.xywx
mul r10.w, r5.w, cb5[3].w
mad r11.w, r5.w, l(0.010000), cb5[3].w
div r10.w, r10.w, r11.w
max r10.w, r10.w, l(1.000000)
log r1.w, r1.w
mul r1.w, r1.w, r10.w
exp r1.w, r1.w
dp3_sat r8.x, r8.xyzx, r21.xzwx
add r8.x, -r8.x, l(1.000000)
mul r8.y, r8.x, r8.x
mul r8.y, r8.y, r8.y
mul r8.x, r8.y, r8.x
mad r8.xyz, r8.xxxx, r11.xyzx, r13.xyzx
mov_sat r11.x, r7.w
max r7.w, r9.w, r7.w
max r7.w, r7.w, l(0.000100)
div r7.w, r11.x, r7.w
mul r8.xyz, r1.wwww, r8.xyzx
mul r8.xyz, r7.wwww, r8.xyzx
mad r1.w, r10.w, l(0.125000), l(0.250000)
mul r11.xyz, r1.wwww, cb5[11].xyzx
mad r8.xyz, r11.xyzx, r8.xyzx, r19.xyzx
movc r8.xyz, r21.yyyy, r8.xyzx, r19.xyzx
if_z cb4[r0.w + 6].y
  dp3 r11.x, r4.xywx, cb8[5].xyzx
  dp3 r11.y, r4.xywx, cb8[6].xyzx
  dp3 r11.z, r4.xywx, cb8[7].xyzx
  dp4 r19.x, v3.xyzw, cb8[12].xyzw
  dp4 r19.y, v3.xyzw, cb8[13].xyzw
  dp4 r19.z, v3.xyzw, cb8[14].xyzw
  dp4 r1.w, v3.xyzw, cb8[15].xyzw
  div r19.xyz, r19.xyzx, r1.wwww
  mul r10.xy, r10.xyxx, cb8[1].xyxx
  ftou r10.xy, r10.xyxx
  udiv r10.xy, null, r10.xyxx, cb8[56].xxxx
  utof r10.xy, r10.xyxx
  utof r1.w, cb8[56].y
  mad r1.w, r10.y, r1.w, r10.x
  ftou r1.w, r1.w
  add r7.w, r19.z, -cb8[55].x
  log r7.w, r7.w
  add r7.w, r7.w, -cb8[55].z
  div r7.w, r7.w, cb8[55].y
  max r7.w, r7.w, l(0.000000)
  min r7.w, r7.w, l(14.000000)
  ftou r7.w, r7.w
  ishl r7.w, l(1), r7.w
  ld_structured_indexable(structured_buffer, stride=12)(mixed,mixed,mixed,mixed) r10.xyw, r1.w, l(0), t60.xyxz
  dp3 r1.w, -r19.xyzx, -r19.xyzx
  rsq r1.w, r1.w
  mul r21.xyz, r1.wwww, -r19.xyzx
  mov r22.xyz, l(0,0,0,0)
  mov r23.xyz, l(0,0,0,0)
  mov r1.w, r10.x
  mov r9.w, l(0)
  loop 
    uge r11.w, r9.w, r10.y
    breakc_nz r11.w
    ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r24.xy, r1.w, l(0), t59.xyxx
    iadd r11.w, r1.w, l(1)
    and r12.w, r7.w, r24.y
    iadd r13.w, r9.w, l(1)
    movc r9.w, r12.w, r9.w, r13.w
    mov r1.w, r11.w
    continuec_z r12.w
    ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r25.xyzw, r24.x, l(0), t61.xyzw
    ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r26.xyzw, r24.x, l(16), t61.xyzw
    ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r24.xyz, r24.x, l(32), t61.xyzx
    add r25.xyz, -r19.xyzx, r25.xyzx
    dp3 r12.w, r25.xyzx, r25.xyzx
    rsq r14.w, r12.w
    mul r27.xyz, r14.wwww, r25.xyzx
    dp3_sat r15.w, r11.xyzx, r27.xyzx
    mul_sat r12.w, r25.w, r12.w
    sqrt r12.w, r12.w
    add r12.w, -r12.w, l(1.000000)
    mul r12.w, r12.w, r12.w
    mad r25.xyz, r25.xyzx, r14.wwww, r21.xyzx
    dp3 r14.w, r25.xyzx, r25.xyzx
    rsq r14.w, r14.w
    mul r25.xyz, r14.wwww, r25.xyzx
    mul r14.w, r5.w, r26.w
    mad r17.w, r5.w, l(0.010000), r26.w
    div r14.w, r14.w, r17.w
    max r14.w, r14.w, l(1.000000)
    dp3_sat r17.w, r25.xyzx, r11.xyzx
    log r17.w, r17.w
    mul r17.w, r14.w, r17.w
    exp r17.w, r17.w
    mul r25.xyz, r15.wwww, r26.xyzx
    mul r24.xyz, r17.wwww, r24.xyzx
    log r15.w, r15.w
    mul r15.w, r15.w, l(0.100000)
    exp r15.w, r15.w
    mul r24.xyz, r15.wwww, r24.xyzx
    mul r24.xyz, r12.wwww, r24.xyzx
    mad r14.w, r14.w, l(0.125000), l(0.250000)
    mad r22.xyz, r25.xyzx, r12.wwww, r22.xyzx
    mad r23.xyz, r24.xyzx, r14.wwww, r23.xyzx
    mov r9.w, r13.w
    mov r1.w, r11.w
  endloop 
  dp3 r9.w, r19.xyzx, r19.xyzx
  rsq r9.w, r9.w
  mul r24.xyz, r9.wwww, r19.xyzx
  dp3 r9.w, r24.xyzx, r11.xyzx
  add r9.w, r9.w, r9.w
  mad r24.xyz, r11.xyzx, -r9.wwww, r24.xyzx
  ushr r9.w, r10.w, l(16)
  mov r19.w, l(1.000000)
  mov r25.zw, l(0,0,1.000000,1.000000)
  mov r10.xyw, r22.xyxz
  mov r26.xyz, r23.xyzx
  mov r11.w, r1.w
  mov r12.w, l(0)
  loop 
    uge r13.w, r12.w, r9.w
    breakc_nz r13.w
    ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r27.xy, r11.w, l(0), t59.xyxx
    iadd r13.w, r11.w, l(1)
    and r14.w, r7.w, r27.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) r28.xyzw, r27.x, l(0), t62.xyzw
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r29.xyzw, r27.x, l(16), t62.xyzw
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.yzw, r27.x, l(32), t62.xxyz
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r30.xyzw, r27.x, l(60), t62.xyzw
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r31.xyzw, r27.x, l(76), t62.yzwx
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r32.xyzw, r27.x, l(92), t62.yzwx
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r33.xyzw, r27.x, l(108), t62.xyzw
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r34.w, r27.x, l(124), t62.xxxx
    mov r35.xyz, r30.yzwy
    mov r35.w, r31.w
    dp4 r35.x, r19.xyzw, r35.xyzw
    mov r31.w, r32.w
    dp4 r35.y, r19.xyzw, r31.xyzw
    mov r32.w, r33.x
    dp4 r14.w, r19.xyzw, r32.xyzw
    mov r34.xyz, r33.yzwy
    dp4 r17.w, r19.xyzw, r34.xyzw
    lt r14.w, l(0.000000), r14.w
    add r28.xyz, -r19.xyzx, r28.xyzx
    dp3 r18.w, r28.xyzx, r28.xyzx
    rsq r21.w, r18.w
    mul r30.yzw, r21.wwww, r28.xxyz
    lt r22.w, l(0.000000), r30.x
    mul r23.w, r28.w, r28.w
    div r23.w, l(1.000000, 1.000000, 1.000000, 1.000000), r23.w
    div r31.x, l(1.000000, 1.000000, 1.000000, 1.000000), r18.w
    add r24.w, -r23.w, r31.x
    max r31.w, r24.w, l(0.000000)
    dp3_sat r24.w, r30.yzwy, r11.xyzx
    div r32.xy, r35.xyxx, r17.wwww
    dp2 r26.w, r32.xyxx, r32.xyxx
    add r26.w, -r26.w, l(1.000000)
    max r31.y, r26.w, l(0.000000)
    mul r18.w, r18.w, r23.w
    min r18.w, r18.w, l(1.000000)
    add r31.z, -r18.w, l(1.000000)
    div r17.w, r17.w, r28.w
    add_sat r17.w, -r17.w, l(1.000000)
    mul r25.y, r31.y, r31.y
    mul r25.x, r17.w, r17.w
    movc r31.xyzw, r22.wwww, r31.xyzw, r25.xyzw
    mad r28.xyz, r28.xyzx, r21.wwww, r21.xyzx
    dp3 r17.w, r28.xyzx, r28.xyzx
    rsq r17.w, r17.w
    mul r28.xyz, r17.wwww, r28.xyzx
    mul r17.w, r5.w, r29.w
    mad r18.w, r5.w, l(0.010000), r29.w
    div r17.w, r17.w, r18.w
    max r17.w, r17.w, l(1.000000)
    dp3_sat r18.w, r28.xyzx, r11.xyzx
    log r18.w, r18.w
    mul r18.w, r17.w, r18.w
    exp r18.w, r18.w
    mul r28.xyz, r31.wzxw, r31.yyyy
    mul r29.xyz, r24.wwww, r29.xyzx
    mul r31.xyz, r28.xxxx, r29.xyzx
    mul r32.xyz, r18.wwww, r27.yzwy
    log r18.w, r24.w
    mul r18.w, r18.w, l(0.100000)
    exp r18.w, r18.w
    mul r32.xyz, r18.wwww, r32.xyzx
    mul r28.xyw, r28.yyyy, r32.xyxz
    mul r18.w, r17.w, l(0.250000)
    mad r17.w, r17.w, l(0.125000), l(0.250000)
    mul r28.xyw, r17.wwww, r28.xyxw
    dp3_sat r21.w, r30.yzwy, r24.xyzx
    log r21.w, r21.w
    mul r18.w, r18.w, r21.w
    exp r18.w, r18.w
    mul r17.w, r17.w, r18.w
    mul r29.xyz, r28.zzzz, r29.xyzx
    mul r27.xyz, r17.wwww, r27.yzwy
    mul r27.xyz, r28.zzzz, r27.xyzx
    movc r29.xyz, r22.wwww, r31.xyzx, r29.xyzx
    movc r27.xyz, r22.wwww, r28.xywx, r27.xyzx
    and r28.xyz, r14.wwww, r29.xyzx
    and r27.xyz, r14.wwww, r27.xyzx
    add r10.xyw, r10.xyxw, r28.xyxz
    add r26.xyz, r26.xyzx, r27.xyzx
    mov r12.w, r15.w
    mov r11.w, r13.w
  endloop 
  mad r11.xyz, -r13.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
  mul r10.xyw, r10.xyxw, r11.xyxz
  mul r11.xyz, r13.xyzx, r26.xyzx
  mul r13.xyz, r8.wwww, r10.xywx
  mul r19.xyz, r8.wwww, r11.xyzx
  mad r15.xyz, r10.xywx, r8.wwww, r15.xyzx
  mad r8.xyz, r11.xyzx, r8.wwww, r8.xyzx
else 
  mov r13.xyz, l(0,0,0,0)
  mov r19.xyz, l(0,0,0,0)
endif 
add r8.xyz, r7.xyzx, r8.xyzx
mad r10.xyw, r12.xyxz, r8.wwww, r15.xyxz
mad r8.xyz, r14.xyzx, r10.xywx, r8.xyzx
mad r11.xyz, cb2[39].wwww, r6.xyzx, r8.xyzx
mov r11.w, l(1.000000)
mul r11.xyzw, r11.xyzw, cb4[r0.w + 7].xyzw
add r1.w, -r9.y, cb6[3].w
add r1.w, r1.w, -cb6[3].y
mul_sat r1.w, r1.w, cb6[3].z
dp2 r5.w, -r9.xzxx, -r9.xzxx
sqrt r5.w, r5.w
add r5.w, r5.w, -cb6[2].y
mul r5.w, r5.w, cb6[2].z
exp r5.w, -r5.w
mad_sat r5.w, -r5.w, cb6[2].x, cb6[2].x
mul_sat r1.w, r1.w, cb6[3].x
dp3 r6.x, r11.xyzx, l(0.298910, 0.586610, 0.114480, 0.000000)
add r6.x, r6.x, l(-1.000000)
mad r6.y, cb6[1].w, r6.x, l(1.000000)
mad r6.x, cb6[4].w, r6.x, l(1.000000)
mad r8.xyz, cb6[1].xyzx, r6.yyyy, -r11.xyzx
mad r8.xyz, r5.wwww, r8.xyzx, r11.xyzx
mad r6.xyz, cb6[4].xyzx, r6.xxxx, -r8.xyzx
mad r6.xyz, r1.wwww, r6.xyzx, r8.xyzx
add r1.w, r2.w, l(-0.500000)
eq r2.w, l(0.000000), cb4[r0.w + 7].w
lt r5.w, l(0.000000), cb7[2].x
ine r7.w, l(0), cb2[0].x
and r5.w, r5.w, r7.w
mad r0.w, r1.w, l(0.999000), cb4[r0.w + 16].x
lt r0.w, r0.w, l(0.500000)
and r0.w, r0.w, r5.w
lt r5.w, l(0.000000), cb3[5].x
and r5.w, r2.w, r5.w
mad r1.w, r1.w, cb3[5].y, l(1.000000)
lt r1.w, r1.w, cb3[5].x
or r1.w, r1.w, r5.w
or r0.w, r0.w, r1.w
movc r0.w, r20.y, r2.w, r0.w
discard_nz r0.w
movc r9.w, r0.w, l(0), r11.w
mad r4.xyw, r4.xyxw, l(0.500000, 0.500000, 0.000000, 0.500000), l(0.500000, 0.500000, 0.000000, 0.500000)
movc r4.xyw, r20.zzzz, r4.xyxw, r6.xyxz
mad r1.xyz, r1.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
movc r1.xyz, r20.wwww, r1.xyzx, r4.xywx
eq r11.xyzw, l(20.000000, 21.000000, 11.000000, 12.000000), cb9[1].xxxx
movc r1.xyz, r11.xxxx, r13.xyzx, r1.xyzx
movc r1.xyz, r11.yyyy, r19.xyzx, r1.xyzx
or r0.w, r11.w, r11.z
movc r1.xyz, r0.wwww, l(1.000000,1.000000,1.000000,0), r1.xyzx
eq r11.xyzw, l(3.000000, 4.000000, 5.000000, 1.000000), cb9[1].xxxx
movc r1.xyz, r11.xxxx, r4.zzzz, r1.xyzx
sqrt r4.xyz, r5.xyzx
add r4.xyz, r4.xyzx, -cb9[1].yyyy
div r4.xyz, r4.xyzx, cb9[1].zzzz
mov_sat r4.yzw, r4.xxyz
movc r1.xyz, r11.yyyy, r4.yzwy, r1.xyzx
ge r0.w, r4.x, l(0.000000)
ge r1.w, l(1.000000), r4.x
and r0.w, r0.w, r1.w
mad r5.xyzw, r4.xxxx, l(0.000000, 4.000000, 0.000000, 4.000000), l(0.000000, 0.000000, 1.000000, -1.000000)
mad r4.yzw, r5.wwww, l(0.000000, 0.000000, 0.000000, -1.000000), l(0.000000, 0.000000, 1.000000, 1.000000)
lt r6.xyz, r4.xxxx, l(0.250000, 0.500000, 0.750000, 0.000000)
mad r12.xyzw, r4.xxxx, l(4.000000, 4.000000, 4.000000, 4.000000), l(-2.000000, -2.000000, -3.000000, -3.000000)
mad r8.xyz, r12.xyyx, l(1.000000, 0.000000, 0.000000, 0.000000), l(0.000000, 1.000000, 0.000000, 0.000000)
mad r10.xyw, r12.zwzz, l(0.000000, -1.000000, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
movc r8.xyz, r6.zzzz, r8.xyzx, r10.xywx
movc r4.xyz, r6.yyyy, r4.yzwy, r8.xyzx
movc r4.xyz, r6.xxxx, r5.xyzx, r4.xyzx
and r4.xyz, r0.wwww, r4.xyzx
movc r1.xyz, r11.zzzz, r4.xyzx, r1.xyzx
sqrt r3.xyz, r3.xyzx
movc r1.xyz, r11.wwww, r3.xyzx, r1.xyzx
eq r4.xyzw, l(49.000000, 34.000000, 30.000000, 32.000000), cb9[1].xxxx
dp3 r0.w, l(0.298910, 0.586610, 0.114480, 0.000000), r3.xyzx
lt r1.w, r0.w, l(0.125490)
lt r2.w, l(0.952941), r0.w
movc r3.xyz, r2.wwww, l(0,1.000000,0,0), r0.wwww
movc r3.xyz, r1.wwww, l(1.000000,0,0,0), r3.xyzx
movc r1.xyz, r4.xxxx, r3.xyzx, r1.xyzx
movc r1.xyz, r4.yyyy, r10.zzzz, r1.xyzx
or r0.w, r4.w, r4.z
movc r1.xyz, r0.wwww, r8.wwww, r1.xyzx
eq r4.xyzw, l(33.000000, 31.000000, 13.000000, 14.000000), cb9[1].xxxx
or r0.w, r4.y, r4.x
movc r1.xyz, r0.wwww, l(1.000000,1.000000,1.000000,0), r1.xyzx
mad r2.xyz, r2.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
movc r1.xyz, r4.zzzz, r2.xyzx, r1.xyzx
mad r0.xyz, r0.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
movc r0.xyz, r4.wwww, r0.xyzx, r1.xyzx
eq r1.xyzw, l(17.000000, 55.000000, 56.000000, 16.000000), cb9[1].xxxx
add r0.w, -cb9[1].y, cb9[1].z
div r2.x, -cb9[1].y, r0.w
movc r0.xyz, r1.xxxx, r2.xxxx, r0.xyzx
or r1.x, r1.z, r1.y
movc r0.xyz, r1.xxxx, l(0,0,0,0), r0.xyzx
add r1.x, v3.w, -cb9[1].y
div_sat r0.w, r1.x, r0.w
movc r0.xyz, r1.wwww, r0.wwww, r0.xyzx
eq r1.xyzw, l(40.000000, 41.000000, 42.000000, 46.000000), cb9[1].xxxx
movc r0.xyz, r1.xxxx, r3.wwww, r0.xyzx
movc r0.xyz, r1.yyyy, r16.wwww, r0.xyzx
movc r0.xyz, r1.zzzz, r16.xyzx, r0.xyzx
movc r0.xyz, r20.xxxx, r7.xyzx, r0.xyzx
movc r0.xyz, r1.wwww, r18.xyzx, r0.xyzx
eq r1.xyzw, l(47.000000, 50.000000, 15.000000, 57.000000), cb9[1].xxxx
movc r0.xyz, r1.xxxx, r17.xyzx, r0.xyzx
movc r0.xyz, r1.yyyy, l(0,0,1.000000,0), r0.xyzx
or r0.w, r1.w, r1.z
movc r0.xyz, r0.wwww, l(0,0,0,0), r0.xyzx
eq r1.xyzw, l(58.000000, 59.000000, 60.000000, 61.000000), cb9[1].xxxx
movc r0.xyz, r1.xxxx, l(1.000000,1.000000,1.000000,0), r0.xyzx
or r0.w, r1.z, r1.y
or r0.w, r1.w, r0.w
eq r1.xyzw, l(62.000000, 63.000000, 65.000000, 66.000000), cb9[1].xxxx
or r0.w, r0.w, r1.x
movc r0.xyz, r0.wwww, l(0,0,0,0), r0.xyzx
movc r0.xyz, r1.yyyy, l(0.500000,0.500000,0.500000,0), r0.xyzx
mov x0[0].xyz, l(1.000000,1.000000,1.000000,0)
mov x0[1].xyz, l(1.000000,0,0,0)
mov x0[2].xyz, l(0,1.000000,0,0)
mov x0[3].xyz, l(0,0,1.000000,0)
mov x0[4].xyz, l(0.500000,0.500000,0.500000,0)
mov x0[5].xyz, l(1.000000,1.000000,0,0)
mov x0[6].xyz, l(1.000000,0,1.000000,0)
mov x0[7].xyz, l(0,1.000000,1.000000,0)
mov x0[8].xyz, l(0.200000,0.200000,0.200000,0)
mov x0[9].xyz, l(1.000000,0.500000,0,0)
mov x0[10].xyz, l(1.000000,0,0.500000,0)
mov x0[11].xyz, l(0,1.000000,0.500000,0)
mov x0[12].xyz, l(0.500000,1.000000,0,0)
mov x0[13].xyz, l(0.500000,0,1.000000,0)
mov x0[14].xyz, l(0,0.500000,1.000000,0)
mov x0[15].xyz, l(0,0,0,0)
max r0.w, r6.w, l(0.000000)
min r0.w, r0.w, l(15.000000)
ftoi r0.w, r0.w
mov r2.xyz, x0[r0.w + 0].xyzx
movc r0.xyz, r1.zzzz, r2.xyzx, r0.xyzx
movc r0.xyz, r1.wwww, cb9[1].yyyy, r0.xyzx
eq r1.xyzw, l(67.000000, 68.000000, 75.000000, 76.000000), cb9[1].xxxx
movc r0.xyz, r1.xxxx, cb9[1].zzzz, r0.xyzx
mul r2.xyz, cb7[0].wwww, cb7[0].xyzx
movc r9.xyz, r1.yyyy, r2.xyzx, r0.xyzx
mov r2.w, l(1.000000)
movc r0.xyzw, r20.yyyy, r2.xyzw, r9.xyzw
or r1.x, r1.w, r1.z
eq r1.y, l(77.000000), cb9[1].x
or r1.x, r1.y, r1.x
movc o0.xyz, r1.xxxx, l(0,0,0,0), r0.xyzx
mov o0.w, r0.w
ret 
// Approximately 727 instruction slots used

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