// ---- 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 BurnCloth_snp_0_color_0_0 : packoffset(c39);
  float BurnCloth_snp_0_color_0_1 : packoffset(c39.y);
  float BurnCloth_snp_0_color_0_2 : packoffset(c39.z);
  float BurnCloth_snp_0_color_0_3 : packoffset(c39.w);
  float BurnCloth_snp_0_float_0_0 : packoffset(c40);
  float BurnCloth_snp_0_float_1_0 : packoffset(c40.y);
  float BurnCloth_snp_0_float_2_0 : packoffset(c40.z);
  float BurnCloth_snp_0_float_3_0 : packoffset(c40.w);
  float BurnCloth_snp_0_float_5_0 : packoffset(c41);
  float BurnCloth_snp_0_float_6_0 : packoffset(c41.y);
}

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

SamplerState SS_DiffuseMap_s : register(s0);
SamplerState SS_WrapLinear_s : register(s8);
SamplerState SS_ClampLinear_s : register(s9);
Texture2D<float4> g_DiffuseTexture : register(t0);
Texture2D<float4> BurnCloth_snp_0_Texture2D_5 : register(t1);
Texture2D<float4> BurnCloth_snp_0_Texture2D_4 : register(t2);
Texture2D<float4> BurnCloth_snp_0_Texture2D_3 : register(t3);
Texture2D<float4> BurnCloth_snp_0_Texture2D_2 : register(t4);
Texture2D<float4> BurnCloth_snp_0_Texture2D_0 : register(t6);
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 : TEXCOORD0,
  float4 v5 : TEXCOORD1,
  uint v6 : SV_ISFRONTFACE0,
  out float4 o0 : SV_TARGET0,
  out float4 o1 : SV_TARGET1)
{
// 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;
  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 = v6.xxx ? r1.xyz : -r1.xyz;
  r3.xyz = BurnCloth_snp_0_float_6_0 + v5.xyz;
  r4.xy = v4.xy * FC_TextureTilingScale[2].xy + FC_TextureTilingScale[2].zw;
  r0.w = BurnCloth_snp_0_Texture2D_2.Sample(SS_DiffuseMap_s, r4.xy).x;
  r0.w = BurnCloth_snp_0_float_1_0 * r0.w;
  r4.y = r0.w * -r3.x;
  r4.zw = -BurnCloth_snp_0_float_0_0 + float2(0,1);
  r4.x = -r4.y;
  r4.xz = r4.xy * r4.zw + BurnCloth_snp_0_float_0_0;
  r0.w = cmp(0 < r4.y);
  r0.w = saturate(r0.w ? r4.x : r4.z);
  r1.w = r0.w * r0.w;
  r0.w = -r0.w * 2 + 3;
  r2.w = r1.w * r0.w;
  r4.xy = v4.xy * FC_TextureTilingScale[5].xy + FC_TextureTilingScale[5].zw;
  r4.xyzw = BurnCloth_snp_0_Texture2D_5.Sample(SS_DiffuseMap_s, r4.xy).xyzw;
  r5.xyzw = r4.xyzw * BurnCloth_snp_0_color_0_0 + -r4.xyzw;
  r4.xyzw = r2.wwww * r5.xyzw + r4.xyzw;
  r5.xy = v4.xy * FC_TextureTilingScale[4].xy + FC_TextureTilingScale[4].zw;
  r5.xy = BurnCloth_snp_0_Texture2D_4.Sample(SS_DiffuseMap_s, r5.xy).xy;
  r5.xy = r5.xy * float2(2,2) + float2(-1,-1);
  r3.w = dot(r5.xy, r5.xy);
  r3.w = 1 + -r3.w;
  r3.w = max(0, r3.w);
  r3.w = sqrt(r3.w);
  r5.yzw = r5.yyy * r2.xyz;
  r5.xyz = r5.xxx * r0.xyz + r5.yzw;
  r5.xyz = r3.www * r1.xyz + r5.xyz;
  r3.w = dot(r5.xyz, r5.xyz);
  r3.w = rsqrt(r3.w);
  r5.xyz = r5.xyz * r3.www;
  r5.xy = r5.xy * float2(2,2) + float2(-1,-1);
  r3.w = dot(r5.xy, r5.xy);
  r3.w = min(1, r3.w);
  r3.w = 1 + -r3.w;
  r3.w = sqrt(r3.w);
  r6.xyz = r5.yyy * r2.xyz;
  r5.xyw = r5.xxx * r0.xyz + r6.xyz;
  r5.xyw = r3.www * r1.xyz + r5.xyw;
  r3.w = dot(r5.xyw, r5.xyw);
  r3.w = rsqrt(r3.w);
  r6.xyz = r5.xyw * r3.www;
  r5.xy = v4.xy * FC_TextureTilingScale[0].xy + FC_TextureTilingScale[0].zw;
  r5.xyw = BurnCloth_snp_0_Texture2D_0.Sample(SS_DiffuseMap_s, r5.xy).xyz;
  r7.xyz = r5.xyw * BurnCloth_snp_0_float_2_0 + -r5.xyw;
  r5.xyw = r2.www * r7.xyz + r5.xyw;
  r0.w = r1.w * r0.w + 0.0500000007;
  r7.xy = r0.ww * FC_TextureTilingScale[3].xy + FC_TextureTilingScale[3].zw;
  r7.xyz = BurnCloth_snp_0_Texture2D_3.Sample(SS_DiffuseMap_s, r7.xy).xyz;
  r8.xyz = BurnCloth_snp_0_float_5_0 * r7.xyz;
  r0.w = round(v1.w);
  r0.w = (uint)r0.w;
  r9.x = dot(v3.xyzw, FC_MatrixInvViewProj._m00_m10_m20_m30);
  r9.y = dot(v3.xyzw, FC_MatrixInvViewProj._m01_m11_m21_m31);
  r9.z = dot(v3.xyzw, FC_MatrixInvViewProj._m02_m12_m22_m32);
  r1.w = dot(v3.xyzw, FC_MatrixInvViewProj._m03_m13_m23_m33);
  r10.xyz = r9.xyz / r1.www;
  r11.x = FC_MatrixInvView._m30 + -r10.x;
  r11.y = FC_MatrixInvView._m31 + -r10.y;
  r11.z = FC_MatrixInvView._m32 + -r10.z;
  r1.w = dot(r11.xyz, r11.xyz);
  r1.w = rsqrt(r1.w);
  r10.xyz = r11.xyz * r1.www;
  r12.xy = FC_ScreenSize.zw * v0.xy;
  r12.zw = float2(0.25,0.25) * v0.xy;
  r3.w = g_DitherTexture.Sample(SS_WrapLinear_s, r12.zw).w;
  r7.w = FC_GlobalReflectanceScale * FC_GlobalReflectanceScale;
  r13.xyz = r7.www * r5.xyw;
  r14.xyz = FC_GlobalRefRectanceRGBScale.xyz * FC_GlobalRefRectanceRGBScale.xyz;
  r15.xyz = r14.xyz * r13.xyz;
  r7.w = FC_GlobalShininessScale * r5.z;
  r8.w = 13 * r7.w;
  r8.w = exp2(r8.w);
  r10.w = g_DiffuseTexture.CalculateLevelOfDetailUnclamped(SS_DiffuseMap_s, v4.xy);
  r16.xyz = FC_GlobalAlbedoOffsetRGB.xyz * float3(0.00392156886,0.00392156886,0.00392156886) + r4.xyz;
  r11.w = dot(float3(0.298999995,0.587000012,0.114), r16.xyz);
  r17.y = dot(float3(0.5,-0.419,-0.0810000002), r16.xyz);
  r17.z = dot(float3(-0.169,-0.331999987,0.5), r16.xyz);
  r17.x = FC_GlobalAlbedoOffset * 0.00392156886 + r11.w;
  r16.x = dot(float2(1,1.40199995), r17.xy);
  r16.y = dot(float3(1,-0.713999987,-0.344000012), r17.xyz);
  r16.z = dot(float2(1,1.77199996), r17.xz);
  r11.w = g_SSAOTexture.Sample(SS_WrapLinear_s, r12.xy).x;
  r12.z = dot(r6.xyz, r10.xyz);
  r12.w = r12.z + r11.w;
  r12.w = r12.w * r12.w + -1;
  r12.w = saturate(r12.w + r11.w);
  r13.w = saturate(r12.z);
  r13.w = 1 + -r13.w;
  r14.w = r12.z + r12.z;
  r17.xyz = r14.www * r6.xyz + -r10.xyz;
  r14.w = r13.w * r13.w;
  r14.w = r14.w * r14.w;
  r13.w = r14.w * r13.w;
  r13.w = r13.w * r12.w;
  r14.w = -r7.w * 6.5 + 6.5;
  r14.w = min(6, r14.w);
  r13.xyz = -r13.xyz * r14.xyz + float3(1,1,1);
  r14.xyz = r13.xyz * r13.www;
  r7.w = r7.w * r7.w;
  r14.xyz = r14.xyz * r7.www + r15.xyz;
  r0.w = (int)r0.w * 17;
  r18.xyzw = cmp(float4(48,69,2,10) == FC_DebugOutputMode.xxxx);
  r14.xyz = r18.xxx ? float3(1,1,1) : r14.xyz;
  r7.w = r18.x ? 1 : VC_InstanceData[r0.w].parallaxCorrectedCubemapAabbMin_envMapColorScale0.w;
  r13.w = r18.x ? 1 : VC_InstanceData[r0.w].parallaxCorrectedCubemapAabbMax_envMapColorScale1.w;
  r19.xy = cmp(float2(0,0) < FC_ParallaxCorrectedCubemapObbAEnable);
  r9.w = 1;
  r20.x = dot(r9.xyzw, FC_ParallaxCorrectedCubemapInvObbA._m00_m10_m20_m30);
  r20.y = dot(r9.xyzw, FC_ParallaxCorrectedCubemapInvObbA._m01_m11_m21_m31);
  r20.z = dot(r9.xyzw, FC_ParallaxCorrectedCubemapInvObbA._m02_m12_m22_m32);
  r21.x = dot(r17.xyz, FC_ParallaxCorrectedCubemapInvObbA._m00_m10_m20);
  r21.y = dot(r17.xyz, FC_ParallaxCorrectedCubemapInvObbA._m01_m11_m21);
  r21.z = dot(r17.xyz, FC_ParallaxCorrectedCubemapInvObbA._m02_m12_m22);
  r22.xyz = cmp(float3(0,0,0) < r21.xyz);
  r23.xyz = ~(int3)r22.xyz;
  r22.xyz = r19.xxx ? r22.xyz : 0;
  r24.xyz = float3(1,1,1) + -r20.xyz;
  r24.xyz = r24.xyz / r21.xyz;
  r22.xyz = r22.xyz ? abs(r24.xyz) : float3(5000,5000,5000);
  r23.xyz = r19.xxx ? r23.xyz : 0;
  r24.xyz = cmp(r21.xyz < float3(0,0,0));
  r23.xyz = r24.xyz ? r23.xyz : 0;
  r24.xyz = float3(1,1,1) + r20.xyz;
  r24.xyz = r24.xyz / r21.xyz;
  r22.xyz = r23.xyz ? abs(r24.xyz) : r22.xyz;
  r15.w = min(r22.x, r22.y);
  r15.w = min(r15.w, r22.z);
  r20.xyz = r21.xyz * r15.www + r20.xyz;
  r16.w = -r15.w * 9.99999975e-005 + -1;
  r21.xyz = cmp(r20.xyz < r16.www);
  r15.w = r15.w * 9.99999975e-005 + 1;
  r22.xyz = cmp(r15.www < r20.xyz);
  r15.w = (int)r21.x | (int)r22.x;
  r15.w = (int)r21.y | (int)r15.w;
  r15.w = (int)r22.y | (int)r15.w;
  r15.w = (int)r21.z | (int)r15.w;
  r15.w = (int)r22.z | (int)r15.w;
  r20.w = 1;
  r21.x = dot(r20.xyzw, FC_ParallaxCorrectedCubemapObbA._m00_m10_m20_m30);
  r21.y = dot(r20.xyzw, FC_ParallaxCorrectedCubemapObbA._m01_m11_m21_m31);
  r21.z = dot(r20.xyzw, FC_ParallaxCorrectedCubemapObbA._m02_m12_m22_m32);
  r20.xyz = -FC_ParallaxCorrectedCubemapOriginA.xyz + r21.xyz;
  r20.xyz = g_IBLTexture.SampleLevel(SS_WrapLinear_s, r20.xyz, r14.w).xyz;
  r20.xyz = r20.xyz * r7.www;
  r20.xyz = r15.www ? float3(0,0,0) : r20.xyz;
  r21.xyz = g_IBLTexture.SampleLevel(SS_WrapLinear_s, r17.xyz, r14.w).xyz;
  r21.xyz = r21.xyz * r7.www;
  r19.xzw = r19.xxx ? r20.xyz : r21.xyz;
  r20.x = dot(r9.xyzw, FC_ParallaxCorrectedCubemapInvObbB._m00_m10_m20_m30);
  r20.y = dot(r9.xyzw, FC_ParallaxCorrectedCubemapInvObbB._m01_m11_m21_m31);
  r20.z = dot(r9.xyzw, FC_ParallaxCorrectedCubemapInvObbB._m02_m12_m22_m32);
  r9.x = dot(r17.xyz, FC_ParallaxCorrectedCubemapInvObbB._m00_m10_m20);
  r9.y = dot(r17.xyz, FC_ParallaxCorrectedCubemapInvObbB._m01_m11_m21);
  r9.z = dot(r17.xyz, FC_ParallaxCorrectedCubemapInvObbB._m02_m12_m22);
  r21.xyz = cmp(float3(0,0,0) < r9.xyz);
  r22.xyz = ~(int3)r21.xyz;
  r21.xyz = r19.yyy ? r21.xyz : 0;
  r23.xyz = float3(1,1,1) + -r20.xyz;
  r23.xyz = r23.xyz / r9.xyz;
  r21.xyz = r21.xyz ? abs(r23.xyz) : float3(5000,5000,5000);
  r22.xyz = r19.yyy ? r22.xyz : 0;
  r23.xyz = cmp(r9.xyz < float3(0,0,0));
  r22.xyz = r22.xyz ? r23.xyz : 0;
  r23.xyz = float3(1,1,1) + r20.xyz;
  r23.xyz = r23.xyz / r9.xyz;
  r21.xyz = r22.xyz ? abs(r23.xyz) : r21.xyz;
  r7.w = min(r21.x, r21.y);
  r7.w = min(r7.w, r21.z);
  r9.xyz = r9.xyz * r7.www + r20.xyz;
  r15.w = -r7.w * 9.99999975e-005 + -1;
  r20.xyz = cmp(r9.xyz < r15.www);
  r7.w = r7.w * 9.99999975e-005 + 1;
  r21.xyz = cmp(r7.www < r9.xyz);
  r7.w = (int)r20.x | (int)r21.x;
  r7.w = (int)r20.y | (int)r7.w;
  r7.w = (int)r21.y | (int)r7.w;
  r7.w = (int)r20.z | (int)r7.w;
  r7.w = (int)r21.z | (int)r7.w;
  r9.w = 1;
  r20.x = dot(r9.xyzw, FC_ParallaxCorrectedCubemapObbB._m00_m10_m20_m30);
  r20.y = dot(r9.xyzw, FC_ParallaxCorrectedCubemapObbB._m01_m11_m21_m31);
  r20.z = dot(r9.xyzw, FC_ParallaxCorrectedCubemapObbB._m02_m12_m22_m32);
  r9.xyz = -FC_ParallaxCorrectedCubemapOriginB.xyz + r20.xyz;
  r9.xyz = g_IBLTexture2.SampleLevel(SS_WrapLinear_s, r9.xyz, r14.w).xyz;
  r9.xyz = r9.xyz * r13.www;
  r9.xyz = r7.www ? float3(0,0,0) : r9.xyz;
  r20.xyz = g_IBLTexture2.SampleLevel(SS_WrapLinear_s, r17.xyz, r14.w).xyz;
  r20.xyz = r20.xyz * r13.www;
  r9.xyz = r19.yyy ? r9.xyz : r20.xyz;
  r9.xyz = r9.xyz + -r19.xzw;
  r9.xyz = VC_InstanceData[r0.w].parallaxCorrectedCubemapOrigin_envMapInterpRatio.www * r9.xyz + r19.xzw;
  r9.xyz = r9.xyz * r14.xyz;
  r9.xyz = r9.xyz * r11.www;
  r7.w = dot(r17.xyz, r1.xyz);
  r7.w = saturate(1 + r7.w);
  r7.w = r7.w * r7.w;
  r9.xyz = r9.xyz * r7.www;
  r6.w = 1;
  r17.x = dot(r6.xyzw, VC_InstanceData[r0.w].aSh[0].xyzw);
  r17.y = dot(r6.xyzw, VC_InstanceData[r0.w].aSh[1].xyzw);
  r17.z = dot(r6.xyzw, VC_InstanceData[r0.w].aSh[2].xyzw);
  r17.xyz = max(float3(0,0,0), r17.xyz);
  r17.xyz = r17.xyz * r13.xyz;
  r19.xyzw = g_RLRTexture.SampleLevel(SS_ClampLinear_s, r12.xy, r14.w).xyzw;
  r14.xyz = r14.xyz * r11.www;
  r14.xyz = r19.xyz * r14.xyz;
  r6.w = 1 + -r19.w;
  r9.xyz = r9.xyz * r6.www + r14.xyz;
  r14.xyz = VC_InstanceData[r0.w].ShLightMask.xxx * FC_DirLightCol_0.xyz;
  r19.x = dot(FC_DirLightVec_0.xyz, r6.xyz);
  r19.y = dot(FC_DirLightVec_1.xyz, r6.xyz);
  r19.zw = saturate(r19.xy);
  r20.xyz = r19.zzz * r13.xyz;
  r21.xyz = r19.www * r13.xyz;
  r21.xyz = FC_DirLightCol_1.xyz * r21.xyz;
  r14.xyz = r14.xyz * r20.xyz + r21.xyz;
  r20.xy = cmp(int2(0,0) < (uint2)FC_bLocalLight.xy);
  if (FC_bLocalLight.x != 0) {
    r6.w = dot(FC_DirLightVec_2.xyz, r6.xyz);
    r6.w = r6.w * 0.5 + 0.5;
    r6.w = r6.w * r6.w;
    r6.w = min(1, r6.w);
    r21.xyz = r6.www * r13.xyz;
    r14.xyz = FC_DirLightCol_2.xyz * r21.xyz + r14.xyz;
  }
  if (FC_bLocalLight.y != 0) {
    r6.w = dot(FC_DirLightVec_3.xyz, r6.xyz);
    r6.w = r6.w * 0.5 + 0.5;
    r6.w = r6.w * r6.w;
    r6.w = min(1, r6.w);
    r21.xyz = r6.www * r13.xyz;
    r14.xyz = FC_DirLightCol_3.xyz * r21.xyz + r14.xyz;
  }
  r21.xyz = VC_InstanceData[r0.w].ShLightMask.xxx * FC_DirLightSpc_0.xyz;
  r22.xyz = r11.xyz * r1.www + FC_DirLightVec_0.xyz;
  r6.w = dot(r22.xyz, r22.xyz);
  r6.w = rsqrt(r6.w);
  r22.xyz = r22.xyz * r6.www;
  r23.xyz = r11.xyz * r1.www + FC_DirLightVec_1.xyz;
  r6.w = dot(r23.xyz, r23.xyz);
  r6.w = rsqrt(r6.w);
  r23.xyz = r23.xyz * r6.www;
  r24.x = saturate(dot(r22.xyz, r6.xyz));
  r24.y = saturate(dot(r23.xyz, r6.xyz));
  r6.w = FC_DirLightVec_0.w * r8.w;
  r7.w = r8.w * 0.00999999978 + FC_DirLightVec_0.w;
  r6.w = r6.w / r7.w;
  r25.x = max(1, r6.w);
  r6.w = FC_DirLightVec_1.w * r8.w;
  r7.w = r8.w * 0.00999999978 + FC_DirLightVec_1.w;
  r6.w = r6.w / r7.w;
  r25.y = max(1, r6.w);
  r20.zw = log2(r24.xy);
  r20.zw = r25.xy * r20.zw;
  r20.zw = exp2(r20.zw);
  r22.x = saturate(dot(r10.xyz, r22.xyz));
  r22.y = saturate(dot(r10.xyz, r23.xyz));
  r22.xy = float2(1,1) + -r22.xy;
  r22.zw = r22.xy * r22.xy;
  r22.zw = r22.zw * r22.zw;
  r22.xy = r22.xy * r22.zw;
  r22.xzw = r22.xxx * r13.xyz + r15.xyz;
  r23.xyz = r22.yyy * r13.xyz + r15.xyz;
  r19.xy = max(r19.xy, r12.zz);
  r19.xy = max(float2(9.99999975e-005,9.99999975e-005), r19.xy);
  r19.xy = r19.zw / r19.xy;
  r22.xyz = r22.xzw * r20.zzz;
  r19.xzw = r22.xyz * r19.xxx;
  r22.xyz = r23.xyz * r20.www;
  r22.xyz = r22.xyz * r19.yyy;
  r20.zw = r25.xy * float2(0.125,0.125) + float2(0.25,0.25);
  r21.xyz = r20.zzz * r21.xyz;
  r23.xyz = FC_DirLightSpc_1.xyz * r20.www;
  r22.xyz = r23.xyz * r22.xyz;
  r19.xyz = r21.xyz * r19.xzw + r22.xyz;
  r6.w = dot(r6.xyz, FC_DirLightVec_2.xyz);
  r21.xyz = r11.xyz * r1.www + FC_DirLightVec_2.xyz;
  r7.w = dot(r21.xyz, r21.xyz);
  r7.w = rsqrt(r7.w);
  r21.xyz = r21.xyz * r7.www;
  r7.w = saturate(dot(r21.xyz, r6.xyz));
  r9.w = FC_DirLightVec_2.w * r8.w;
  r13.w = r8.w * 0.00999999978 + FC_DirLightVec_2.w;
  r9.w = r9.w / r13.w;
  r9.w = max(1, r9.w);
  r7.w = log2(r7.w);
  r7.w = r9.w * r7.w;
  r7.w = exp2(r7.w);
  r13.w = saturate(dot(r10.xyz, r21.xyz));
  r13.w = 1 + -r13.w;
  r14.w = r13.w * r13.w;
  r14.w = r14.w * r14.w;
  r13.w = r14.w * r13.w;
  r21.xyz = r13.www * r13.xyz + r15.xyz;
  r13.w = saturate(r6.w);
  r6.w = max(r6.w, r12.z);
  r6.w = max(9.99999975e-005, r6.w);
  r6.w = r13.w / r6.w;
  r21.xyz = r21.xyz * r7.www;
  r21.xyz = r21.xyz * r6.www;
  r6.w = r9.w * 0.125 + 0.25;
  r22.xyz = FC_DirLightSpc_2.xyz * r6.www;
  r21.xyz = r22.xyz * r21.xyz + r19.xyz;
  r19.xyz = r20.xxx ? r21.xyz : r19.xyz;
  r6.w = dot(r6.xyz, FC_DirLightVec_3.xyz);
  r20.xzw = r11.xyz * r1.www + FC_DirLightVec_3.xyz;
  r1.w = dot(r20.xzw, r20.xzw);
  r1.w = rsqrt(r1.w);
  r20.xzw = r20.xzw * r1.www;
  r1.w = saturate(dot(r20.xzw, r6.xyz));
  r7.w = FC_DirLightVec_3.w * r8.w;
  r9.w = r8.w * 0.00999999978 + FC_DirLightVec_3.w;
  r7.w = r7.w / r9.w;
  r7.w = max(1, r7.w);
  r1.w = log2(r1.w);
  r1.w = r7.w * r1.w;
  r1.w = exp2(r1.w);
  r9.w = saturate(dot(r10.xyz, r20.xzw));
  r9.w = 1 + -r9.w;
  r10.x = r9.w * r9.w;
  r10.x = r10.x * r10.x;
  r9.w = r10.x * r9.w;
  r10.xyz = r9.www * r13.xyz + r15.xyz;
  r9.w = saturate(r6.w);
  r6.w = max(r6.w, r12.z);
  r6.w = max(9.99999975e-005, r6.w);
  r6.w = r9.w / r6.w;
  r10.xyz = r10.xyz * r1.www;
  r10.xyz = r10.xyz * r6.www;
  r1.w = r7.w * 0.125 + 0.25;
  r13.xyz = FC_DirLightSpc_3.xyz * r1.www;
  r10.xyz = r13.xyz * r10.xyz + r19.xyz;
  r10.xyz = r20.yyy ? r10.xyz : r19.xyz;
  if (VC_InstanceData[r0.w].dynamicLightDisable == 0) {
    r13.x = dot(r6.xyz, FC_MatrixView._m00_m10_m20);
    r13.y = dot(r6.xyz, FC_MatrixView._m01_m11_m21);
    r13.z = dot(r6.xyz, 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;
    r12.xy = FC_ScreenSize.xy * r12.xy;
    r12.xy = (uint2)r12.xy;
    uiDest.xy = (uint2)r12.xy / FC_LightTile_Width;
    r12.xy = uiDest.xy;
    r12.xy = (uint2)r12.xy;
    r1.w = FC_LightTile_NumCellX;
    r1.w = r12.y * r1.w + r12.x;
    r1.w = (uint)r1.w;
    r6.w = -FC_FrustumNear + r19.z;
    r6.w = log2(r6.w);
    r6.w = -FC_FrustumSliceBias + r6.w;
    r6.w = r6.w / FC_FrustumSliceScale;
    r6.w = max(0, r6.w);
    r6.w = min(14, r6.w);
    r6.w = (uint)r6.w;
    r6.w = 1 << (int)r6.w;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=12)(mixed,mixed,mixed,mixed) r12.xyz, r1.w, l(0), t60.xyzx
  r12.x = SS_DiffuseMap[]..swiz;
  r12.y = SS_DiffuseMap[]..swiz;
  r12.z = SS_DiffuseMap[]..swiz;
    r1.w = dot(-r19.xyz, -r19.xyz);
    r1.w = rsqrt(r1.w);
    r20.xyz = -r19.xyz * r1.www;
    r21.xyz = float3(0,0,0);
    r22.xyz = float3(0,0,0);
    r1.w = r12.x;
    r7.w = 0;
    while (true) {
      r9.w = cmp((uint)r7.w >= (uint)r12.y);
      if (r9.w != 0) break;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r23.xy, r1.w, l(0), t59.xyxx
    r23.x = SS_DiffuseMap[]..swiz;
    r23.y = SS_DiffuseMap[]..swiz;
      r9.w = (int)r1.w + 1;
      r13.w = (int)r6.w & (int)r23.y;
      r14.w = (int)r7.w + 1;
      r7.w = r13.w ? r7.w : r14.w;
      r1.w = r9.w;
      if (r13.w == 0) continue;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r24.xyzw, r23.x, l(0), t61.xyzw
    r24.x = SS_DiffuseMap[]..swiz;
    r24.y = SS_DiffuseMap[]..swiz;
    r24.z = SS_DiffuseMap[]..swiz;
    r24.w = SS_DiffuseMap[]..swiz;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r25.xyzw, r23.x, l(16), 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) r23.xyz, r23.x, l(32), t61.xyzx
    r23.x = SS_DiffuseMap[]..swiz;
    r23.y = SS_DiffuseMap[]..swiz;
    r23.z = SS_DiffuseMap[]..swiz;
      r24.xyz = r24.xyz + -r19.xyz;
      r13.w = dot(r24.xyz, r24.xyz);
      r15.w = rsqrt(r13.w);
      r26.xyz = r24.xyz * r15.www;
      r16.w = saturate(dot(r13.xyz, r26.xyz));
      r13.w = saturate(r13.w * r24.w);
      r13.w = sqrt(r13.w);
      r13.w = 1 + -r13.w;
      r13.w = r13.w * r13.w;
      r24.xyz = r24.xyz * r15.www + r20.xyz;
      r15.w = dot(r24.xyz, r24.xyz);
      r15.w = rsqrt(r15.w);
      r24.xyz = r24.xyz * r15.www;
      r15.w = r25.w * r8.w;
      r17.w = r8.w * 0.00999999978 + r25.w;
      r15.w = r15.w / r17.w;
      r15.w = max(1, r15.w);
      r17.w = saturate(dot(r24.xyz, r13.xyz));
      r17.w = log2(r17.w);
      r17.w = r17.w * r15.w;
      r17.w = exp2(r17.w);
      r24.xyz = r25.xyz * r16.www;
      r23.xyz = r23.xyz * r17.www;
      r16.w = log2(r16.w);
      r16.w = 0.100000001 * r16.w;
      r16.w = exp2(r16.w);
      r23.xyz = r23.xyz * r16.www;
      r23.xyz = r23.xyz * r13.www;
      r15.w = r15.w * 0.125 + 0.25;
      r21.xyz = r24.xyz * r13.www + r21.xyz;
      r22.xyz = r23.xyz * r15.www + r22.xyz;
      r7.w = r14.w;
      r1.w = r9.w;
    }
    r7.w = dot(r19.xyz, r19.xyz);
    r7.w = rsqrt(r7.w);
    r23.xyz = r19.xyz * r7.www;
    r7.w = dot(r23.xyz, r13.xyz);
    r7.w = r7.w + r7.w;
    r23.xyz = r13.xyz * -r7.www + r23.xyz;
    r7.w = (uint)r12.z >> 16;
    r19.w = 1;
    r24.zw = float2(1,1);
    r12.xyz = r21.xyz;
    r25.xyz = r22.xyz;
    r9.w = r1.w;
    r13.w = 0;
    while (true) {
      r14.w = cmp((uint)r13.w >= (uint)r7.w);
      if (r14.w != 0) break;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r26.xy, r9.w, l(0), t59.xyxx
    r26.x = SS_DiffuseMap[]..swiz;
    r26.y = SS_DiffuseMap[]..swiz;
      r14.w = (int)r9.w + 1;
      r15.w = (int)r6.w & (int)r26.y;
      r16.w = (int)r13.w + 1;
      r13.w = r15.w ? r13.w : r16.w;
      r9.w = r14.w;
      if (r15.w == 0) continue;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.xyzw, r26.x, l(0), t62.xyzw
    r27.x = SS_DiffuseMap[]..swiz;
    r27.y = SS_DiffuseMap[]..swiz;
    r27.z = SS_DiffuseMap[]..swiz;
    r27.w = SS_DiffuseMap[]..swiz;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r28.xyzw, r26.x, l(16), 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) r26.yzw, r26.x, l(32), t62.xxyz
    r26.y = SS_DiffuseMap[]..swiz;
    r26.z = SS_DiffuseMap[]..swiz;
    r26.w = SS_DiffuseMap[]..swiz;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r29.xyzw, r26.x, l(60), 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) r30.xyzw, r26.x, l(76), t62.yzwx
    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, r26.x, l(92), 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, r26.x, l(108), t62.xyzw
    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.w, r26.x, l(124), t62.xxxx
    r33.w = SS_DiffuseMap[]..swiz;
      r34.xyz = r29.yzw;
      r34.w = r30.w;
      r34.x = dot(r19.xyzw, r34.xyzw);
      r30.w = r31.w;
      r34.y = dot(r19.xyzw, r30.xyzw);
      r31.w = r32.x;
      r15.w = dot(r19.xyzw, r31.xyzw);
      r33.xyz = r32.yzw;
      r17.w = dot(r19.xyzw, r33.xyzw);
      r15.w = cmp(0 < r15.w);
      r27.xyz = r27.xyz + -r19.xyz;
      r20.w = dot(r27.xyz, r27.xyz);
      r21.w = rsqrt(r20.w);
      r29.yzw = r27.xyz * r21.www;
      r22.w = cmp(0 < r29.x);
      r23.w = r27.w * r27.w;
      r23.w = 1 / r23.w;
      r30.x = 1 / r20.w;
      r25.w = r30.x + -r23.w;
      r30.w = max(0, r25.w);
      r25.w = saturate(dot(r29.yzw, r13.xyz));
      r31.xy = r34.xy / r17.ww;
      r26.x = dot(r31.xy, r31.xy);
      r26.x = 1 + -r26.x;
      r30.y = max(0, r26.x);
      r20.w = r23.w * r20.w;
      r20.w = min(1, r20.w);
      r30.z = 1 + -r20.w;
      r17.w = r17.w / r27.w;
      r17.w = saturate(1 + -r17.w);
      r24.y = r30.y * r30.y;
      r24.x = r17.w * r17.w;
      r30.xyzw = r22.wwww ? r30.xyzw : r24.xyzw;
      r27.xyz = r27.xyz * r21.www + r20.xyz;
      r17.w = dot(r27.xyz, r27.xyz);
      r17.w = rsqrt(r17.w);
      r27.xyz = r27.xyz * r17.www;
      r17.w = r28.w * r8.w;
      r20.w = r8.w * 0.00999999978 + r28.w;
      r17.w = r17.w / r20.w;
      r17.w = max(1, r17.w);
      r20.w = saturate(dot(r27.xyz, r13.xyz));
      r20.w = log2(r20.w);
      r20.w = r20.w * r17.w;
      r20.w = exp2(r20.w);
      r27.xyz = r30.yyy * r30.wzx;
      r28.xyz = r28.xyz * r25.www;
      r30.xyz = r28.xyz * r27.xxx;
      r31.xyz = r26.yzw * r20.www;
      r20.w = log2(r25.w);
      r20.w = 0.100000001 * r20.w;
      r20.w = exp2(r20.w);
      r31.xyz = r31.xyz * r20.www;
      r27.xyw = r31.xyz * r27.yyy;
      r20.w = 0.25 * r17.w;
      r17.w = r17.w * 0.125 + 0.25;
      r27.xyw = r27.xyw * r17.www;
      r21.w = saturate(dot(r29.yzw, r23.xyz));
      r21.w = log2(r21.w);
      r20.w = r21.w * r20.w;
      r20.w = exp2(r20.w);
      r17.w = r20.w * r17.w;
      r28.xyz = r28.xyz * r27.zzz;
      r26.xyz = r26.yzw * r17.www;
      r26.xyz = r26.xyz * r27.zzz;
      r28.xyz = r22.www ? r30.xyz : r28.xyz;
      r26.xyz = r22.www ? r27.xyw : r26.xyz;
      r27.xyz = r15.www ? r28.xyz : 0;
      r26.xyz = r15.www ? r26.xyz : 0;
      r12.xyz = r27.xyz + r12.xyz;
      r25.xyz = r26.xyz + r25.xyz;
      r13.w = r16.w;
      r9.w = r14.w;
    }
    r13.xyz = -r15.xyz * float3(0.5,0.5,0.5) + float3(1,1,1);
    r12.xyz = r13.xyz * r12.xyz;
    r13.xyz = r25.xyz * r15.xyz;
    r15.xyz = r12.xyz * r11.www;
    r19.xyz = r13.xyz * r11.www;
    r14.xyz = r12.xyz * r11.www + r14.xyz;
    r10.xyz = r13.xyz * r11.www + r10.xyz;
  } else {
    r15.xyz = float3(0,0,0);
    r19.xyz = float3(0,0,0);
  }
  r10.xyz = r10.xyz + r9.xyz;
  r12.xyz = r17.xyz * r11.www + r14.xyz;
  r10.xyz = r16.xyz * r12.xyz + r10.xyz;
  r7.xyz = r7.xyz * BurnCloth_snp_0_float_5_0 + r10.xyz;
  o1.xyz = FC_GlowScale.xyz * r8.xyz;
  r1.w = saturate(FC_GlowScale.w);
  r7.w = 1;
  r7.xyzw = VC_InstanceData[r0.w].mulCol.xyzw * r7.xyzw;
  r6.w = FC_HeightFogParam.w + -r11.y;
  r6.w = -FC_HeightFogParam.y + r6.w;
  r6.w = saturate(FC_HeightFogParam.z * r6.w);
  r8.x = dot(-r11.xz, -r11.xz);
  r8.x = sqrt(r8.x);
  r8.x = -FC_ExtFogParam.y + r8.x;
  r8.x = FC_ExtFogParam.z * r8.x;
  r8.x = exp2(-r8.x);
  r8.x = saturate(-r8.x * FC_ExtFogParam.x + FC_ExtFogParam.x);
  r6.w = saturate(FC_HeightFogParam.x * r6.w);
  r8.y = dot(r7.xyz, float3(0.298909992,0.586610019,0.114480004));
  r8.y = -1 + r8.y;
  r8.z = FC_FogCol.w * r8.y + 1;
  r8.y = FC_HeightFogCol.w * r8.y + 1;
  r10.xyz = FC_FogCol.xyz * r8.zzz + -r7.xyz;
  r7.xyz = r8.xxx * r10.xyz + r7.xyz;
  r8.xyz = FC_HeightFogCol.xyz * r8.yyy + -r7.xyz;
  r7.xyz = r6.www * r8.xyz + r7.xyz;
  r3.w = -0.5 + r3.w;
  o1.w = r7.w * r1.w;
  r1.w = cmp(0 < FC_DitherEnable);
  r6.w = cmp(0 != FC_isDitherAlpha);
  r1.w = r1.w ? r6.w : 0;
  r6.w = r3.w * 0.999000013 + VC_InstanceData[r0.w].ditherFadeAlpha;
  r6.w = cmp(r6.w < 0.5);
  r1.w = r1.w ? r6.w : 0;
  r6.w = cmp(0 < FC_AlphaRef.x);
  r8.x = cmp(0.000000 == VC_InstanceData[r0.w].mulCol.w);
  r6.w = r6.w ? r8.x : 0;
  r3.w = r3.w * FC_AlphaRef.y + r4.w;
  r3.w = cmp(r3.w < FC_AlphaRef.x);
  r3.w = (int)r3.w | (int)r6.w;
  r1.w = (int)r1.w | (int)r3.w;
  r1.w = r18.y ? r8.x : r1.w;
  if (r1.w != 0) discard;
  r8.w = r1.w ? 0 : r7.w;
  r6.xyz = r6.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  r6.xyz = r18.zzz ? r6.xyz : r7.xyz;
  r1.xyz = r1.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  r1.xyz = r18.www ? r1.xyz : r6.xyz;
  r6.xyzw = cmp(float4(20,21,11,12) == FC_DebugOutputMode.xxxx);
  r1.xyz = r6.xxx ? r15.xyz : r1.xyz;
  r1.xyz = r6.yyy ? r19.xyz : r1.xyz;
  r1.w = (int)r6.w | (int)r6.z;
  r1.xyz = r1.www ? float3(1,1,1) : r1.xyz;
  r6.xyzw = cmp(float4(3,4,5,8) == FC_DebugOutputMode.xxxx);
  r1.xyz = r6.xxx ? r5.zzz : r1.xyz;
  r5.xyz = sqrt(r5.xyw);
  r5.xyz = -FC_DebugOutputMode.yyy + r5.xyz;
  r5.xyz = r5.xyz / FC_DebugOutputMode.zzz;
  r5.yzw = saturate(r5.xyz);
  r1.xyz = r6.yyy ? r5.yzw : r1.xyz;
  r1.w = cmp(r5.x >= 0);
  r3.w = cmp(1 >= r5.x);
  r1.w = r1.w ? r3.w : 0;
  r7.xyzw = r5.xxxx * float4(0,4,0,4) + float4(0,0,1,-1);
  r5.yzw = r7.www * float3(0,0,-1) + float3(0,1,1);
  r10.xyz = cmp(r5.xxx < float3(0.25,0.5,0.75));
  r13.xyzw = r5.xxxx * float4(4,4,4,4) + float4(-2,-2,-3,-3);
  r11.xyz = r13.xyy * float3(1,0,0) + float3(0,1,0);
  r12.xyz = r13.zwz * float3(0,-1,0) + float3(1,1,0);
  r11.xyz = r10.zzz ? r11.xyz : r12.xyz;
  r5.xyz = r10.yyy ? r5.yzw : r11.xyz;
  r5.xyz = r10.xxx ? r7.xyz : r5.xyz;
  r5.xyz = r1.www ? r5.xyz : 0;
  r1.xyz = r6.zzz ? r5.xyz : r1.xyz;
  r5.xyzw = cmp(float4(9,1,49,34) == FC_DebugOutputMode.xxxx);
  r1.w = (int)r5.x | (int)r6.w;
  r1.xyz = r1.www ? float3(0,0,0) : r1.xyz;
  r4.xyz = sqrt(r4.xyz);
  r1.xyz = r5.yyy ? r4.xyz : r1.xyz;
  r1.w = dot(float3(0.298909992,0.586610019,0.114480004), r4.xyz);
  r3.w = cmp(r1.w < 0.125490203);
  r4.x = cmp(0.952941179 < r1.w);
  r4.xyz = r4.xxx ? float3(0,1,0) : r1.www;
  r4.xyz = r3.www ? float3(1,0,0) : r4.xyz;
  r1.xyz = r5.zzz ? r4.xyz : r1.xyz;
  r1.xyz = r5.www ? r12.www : r1.xyz;
  r4.xyzw = cmp(float4(30,32,33,31) == FC_DebugOutputMode.xxxx);
  r4.xy = (int2)r4.yw | (int2)r4.xz;
  r1.xyz = r4.xxx ? r11.www : r1.xyz;
  r1.xyz = r4.yyy ? float3(1,1,1) : r1.xyz;
  r4.xyzw = cmp(float4(13,14,17,55) == FC_DebugOutputMode.xxxx);
  r2.xyz = r2.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  r1.xyz = r4.xxx ? 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.yyy ? r0.xyz : r1.xyz;
  r1.x = FC_DebugOutputMode.z + -FC_DebugOutputMode.y;
  r1.y = -FC_DebugOutputMode.y / r1.x;
  r0.xyz = r4.zzz ? r1.yyy : r0.xyz;
  r5.xyzw = cmp(float4(56,16,40,41) == FC_DebugOutputMode.xxxx);
  r1.y = (int)r4.w | (int)r5.x;
  r0.xyz = r1.yyy ? float3(0,0,0) : r0.xyz;
  r1.y = -FC_DebugOutputMode.y + v3.w;
  r1.x = saturate(r1.y / r1.x);
  r0.xyz = r5.yyy ? r1.xxx : r0.xyz;
  r0.xyz = r5.zzz ? VC_InstanceData[r0.w].ShLightMask.xxx : r0.xyz;
  r0.xyz = r5.www ? float3(1,1,1) : r0.xyz;
  r1.xyzw = cmp(float4(42,50,15,57) == FC_DebugOutputMode.xxxx);
  r0.xyz = r1.xxx ? float3(0,0,0) : r0.xyz;
  r0.xyz = r18.xxx ? r9.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);
  r1.xy = (int2)r1.yw | (int2)r1.xz;
  r0.xyz = r1.xxx ? float3(1,1,1) : r0.xyz;
  r4.xyzw = cmp(float4(62,63,65,66) == FC_DebugOutputMode.xxxx);
  r0.w = (int)r1.y | (int)r4.x;
  r0.xyz = r0.www ? float3(0,0,0) : r0.xyz;
  r0.xyz = r4.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, r10.w);
  r0.w = min(15, r0.w);
  r0.w = (int)r0.w;
  r1.xyz = x0[r0.w+0].xyz;
  r0.xyz = r4.zzz ? r1.xyz : r0.xyz;
  r0.xyz = r4.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;
  r4.xyz = FC_DifColMul.xyz * FC_DifColMul.www;
  r8.xyz = r1.yyy ? r4.xyz : r0.xyz;
  r4.w = 1;
  r0.xyzw = r18.yyyy ? r4.xyzw : r8.xyzw;
  r0.xyz = r1.zzz ? r3.xyz : r0.xyz;
  r0.xyz = r1.www ? r2.www : r0.xyz;
  r1.x = cmp(77.000000 == FC_DebugOutputMode.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 BurnCloth_snp_0_color_0_0;   // Offset:  624 Size:     4
//   float BurnCloth_snp_0_color_0_1;   // Offset:  628 Size:     4
//   float BurnCloth_snp_0_color_0_2;   // Offset:  632 Size:     4
//   float BurnCloth_snp_0_color_0_3;   // Offset:  636 Size:     4
//   float BurnCloth_snp_0_float_0_0;   // Offset:  640 Size:     4
//   float BurnCloth_snp_0_float_1_0;   // Offset:  644 Size:     4
//   float BurnCloth_snp_0_float_2_0;   // Offset:  648 Size:     4
//   float BurnCloth_snp_0_float_3_0;   // Offset:  652 Size:     4 [unused]
//   float BurnCloth_snp_0_float_5_0;   // Offset:  656 Size:     4
//   float BurnCloth_snp_0_float_6_0;   // Offset:  660 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
//   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 [unused]
//   float FC_DominantSharpnesExponent; // Offset:  200 Size:     4 [unused]
//   float FC_DominantColorScale;       // Offset:  204 Size:     4 [unused]
//   float4 FC_DominantRgbScale;        // Offset:  208 Size:    16 [unused]
//
// }
//
// cbuffer cbInstanceData
// {
//
//   struct PerInstanceData
//   {
//       
//       float4x3 mWorld;               // Offset:    0
//       float4 atlasUvScaleOffset;     // Offset:   48
//       float4 userClipPlane;          // Offset:   64
//       uint4 matricesData;            // Offset:   80
//       uint envData;                  // Offset:   96
//       bool dynamicLightDisable;      // Offset:  100
//       uint2 envPad;                  // Offset:  104
//       float4 mulCol;                 // Offset:  112
//       float4 aSh[3];                 // Offset:  128
//       float4 ShLightMask;            // Offset:  176
//       float4 vDominantRotateParam;   // Offset:  192
//       float4 parallaxCorrectedCubemapOrigin_envMapInterpRatio;// Offset:  208
//       float4 parallaxCorrectedCubemapAabbMin_envMapColorScale0;// Offset:  224
//       float4 parallaxCorrectedCubemapAabbMax_envMapColorScale1;// Offset:  240
//       float ditherFadeAlpha;         // Offset:  256
//
//   } VC_InstanceData[2];              // Offset:    0 Size:   532
//
// }
//
// cbuffer cbLight
// {
//
//   float4 FC_DirLightVec_0;           // Offset:    0 Size:    16
//   float4 FC_DirLightVec_1;           // Offset:   16 Size:    16
//   float4 FC_DirLightVec_2;           // Offset:   32 Size:    16
//   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
//
// }
//
// 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_WrapLinear                     sampler      NA          NA    8        1
// SS_ClampLinear                    sampler      NA          NA    9        1
// g_DiffuseTexture                  texture  float4          2d    0        1
// BurnCloth_snp_0_Texture2D_5       texture  float4          2d    1        1
// BurnCloth_snp_0_Texture2D_4       texture  float4          2d    2        1
// BurnCloth_snp_0_Texture2D_3       texture  float4          2d    3        1
// BurnCloth_snp_0_Texture2D_2       texture  float4          2d    4        1
// BurnCloth_snp_0_Texture2D_0       texture  float4          2d    6        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
// 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
// TEXCOORD                 0   xy          4     NONE   float   xy  
// TEXCOORD                 1   xyzw        5     NONE   float   xyz 
// SV_ISFRONTFACE           0   x           6    FFACE    uint   x   
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET                0   xyzw        0   TARGET   float   xyzw
// SV_TARGET                1   xyzw        1   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[6], immediateIndexed
dcl_constantbuffer cb2[42], immediateIndexed
dcl_constantbuffer cb3[10], immediateIndexed
dcl_constantbuffer cb8[57], immediateIndexed
dcl_constantbuffer cb9[6], immediateIndexed
dcl_constantbuffer cb4[34], dynamicIndexed
dcl_constantbuffer cb5[17], immediateIndexed
dcl_constantbuffer cb6[5], immediateIndexed
dcl_constantbuffer cb7[27], immediateIndexed
dcl_sampler s0, 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) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t6
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.xy
dcl_input_ps linear v5.xyz
dcl_input_ps_sgv v6.x, is_front_face
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_temps 35
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, v6.xxxx, r1.xyzx, -r1.xyzx
add r3.xyz, v5.xyzx, cb2[41].yyyy
mad r4.xy, v4.xyxx, cb1[2].xyxx, cb1[2].zwzz
sample_indexable(texture2d)(float,float,float,float) r0.w, r4.xyxx, t4.yzwx, s0
mul r0.w, r0.w, cb2[40].y
mul r4.y, -r3.x, r0.w
add r4.zw, l(0.000000, 0.000000, 0.000000, 1.000000), -cb2[40].xxxx
mov r4.x, -r4.y
mad r4.xz, r4.xxyx, r4.zzwz, cb2[40].xxxx
lt r0.w, l(0.000000), r4.y
movc_sat r0.w, r0.w, r4.x, r4.z
mul r1.w, r0.w, r0.w
mad r0.w, -r0.w, l(2.000000), l(3.000000)
mul r2.w, r0.w, r1.w
mad r4.xy, v4.xyxx, cb1[5].xyxx, cb1[5].zwzz
sample_indexable(texture2d)(float,float,float,float) r4.xyzw, r4.xyxx, t1.xyzw, s0
mad r5.xyzw, r4.xyzw, cb2[39].xyzw, -r4.xyzw
mad r4.xyzw, r2.wwww, r5.xyzw, r4.xyzw
mad r5.xy, v4.xyxx, cb1[4].xyxx, cb1[4].zwzz
sample_indexable(texture2d)(float,float,float,float) r5.xy, r5.xyxx, t2.xyzw, s0
mad r5.xy, r5.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r3.w, r5.xyxx, r5.xyxx
add r3.w, -r3.w, l(1.000000)
max r3.w, r3.w, l(0.000000)
sqrt r3.w, r3.w
mul r5.yzw, r2.xxyz, r5.yyyy
mad r5.xyz, r5.xxxx, r0.xyzx, r5.yzwy
mad r5.xyz, r3.wwww, r1.xyzx, r5.xyzx
dp3 r3.w, r5.xyzx, r5.xyzx
rsq r3.w, r3.w
mul r5.xyz, r3.wwww, r5.xyzx
mad r5.xy, r5.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r3.w, r5.xyxx, r5.xyxx
min r3.w, r3.w, l(1.000000)
add r3.w, -r3.w, l(1.000000)
sqrt r3.w, r3.w
mul r6.xyz, r2.xyzx, r5.yyyy
mad r5.xyw, r5.xxxx, r0.xyxz, r6.xyxz
mad r5.xyw, r3.wwww, r1.xyxz, r5.xyxw
dp3 r3.w, r5.xywx, r5.xywx
rsq r3.w, r3.w
mul r6.xyz, r3.wwww, r5.xywx
mad r5.xy, v4.xyxx, cb1[0].xyxx, cb1[0].zwzz
sample_indexable(texture2d)(float,float,float,float) r5.xyw, r5.xyxx, t6.xywz, s0
mad r7.xyz, r5.xywx, cb2[40].zzzz, -r5.xywx
mad r5.xyw, r2.wwww, r7.xyxz, r5.xyxw
mad r0.w, r1.w, r0.w, l(0.050000)
mad r7.xy, r0.wwww, cb1[3].xyxx, cb1[3].zwzz
sample_indexable(texture2d)(float,float,float,float) r7.xyz, r7.xyxx, t3.xyzw, s0
mul r8.xyz, r7.xyzx, cb2[41].xxxx
round_ne r0.w, v1.w
ftou r0.w, r0.w
dp4 r9.x, v3.xyzw, cb8[8].xyzw
dp4 r9.y, v3.xyzw, cb8[9].xyzw
dp4 r9.z, v3.xyzw, cb8[10].xyzw
dp4 r1.w, v3.xyzw, cb8[11].xyzw
div r10.xyz, r9.xyzx, r1.wwww
add r11.x, -r10.x, cb8[20].w
add r11.y, -r10.y, cb8[21].w
add r11.z, -r10.z, cb8[22].w
dp3 r1.w, r11.xyzx, r11.xyzx
rsq r1.w, r1.w
mul r10.xyz, r1.wwww, r11.xyzx
mul r12.xy, v0.xyxx, cb8[1].zwzz
mul r12.zw, v0.xxxy, l(0.000000, 0.000000, 0.250000, 0.250000)
sample_indexable(texture2d)(float,float,float,float) r3.w, r12.zwzz, t38.xyzw, s8
mul r7.w, cb9[3].y, cb9[3].y
mul r13.xyz, r5.xywx, r7.wwww
mul r14.xyz, cb9[4].xyzx, cb9[4].xyzx
mul r15.xyz, r13.xyzx, r14.xyzx
mul r7.w, r5.z, cb9[3].z
mul r8.w, r7.w, l(13.000000)
exp r8.w, r8.w
lod r10.w, v4.xyxx, t0.y, s0
mad r16.xyz, cb9[5].xyzx, l(0.003922, 0.003922, 0.003922, 0.000000), r4.xyzx
dp3 r11.w, l(0.299000, 0.587000, 0.114000, 0.000000), r16.xyzx
dp3 r17.y, l(0.500000, -0.419000, -0.081000, 0.000000), r16.xyzx
dp3 r17.z, l(-0.169000, -0.332000, 0.500000, 0.000000), r16.xyzx
mad r17.x, cb9[3].w, l(0.003922), r11.w
dp2 r16.x, l(1.000000, 1.402000, 0.000000, 0.000000), r17.xyxx
dp3 r16.y, l(1.000000, -0.714000, -0.344000, 0.000000), r17.xyzx
dp2 r16.z, l(1.000000, 1.772000, 0.000000, 0.000000), r17.xzxx
sample_indexable(texture2d)(float,float,float,float) r11.w, r12.xyxx, t33.yzwx, s8
dp3 r12.z, r6.xyzx, r10.xyzx
add r12.w, r11.w, r12.z
mad r12.w, r12.w, r12.w, l(-1.000000)
add_sat r12.w, r11.w, r12.w
mov_sat r13.w, r12.z
add r13.w, -r13.w, l(1.000000)
add r14.w, r12.z, r12.z
mad r17.xyz, r14.wwww, r6.xyzx, -r10.xyzx
mul r14.w, r13.w, r13.w
mul r14.w, r14.w, r14.w
mul r13.w, r13.w, r14.w
mul r13.w, r12.w, r13.w
mad r14.w, -r7.w, l(6.500000), l(6.500000)
min r14.w, r14.w, l(6.000000)
mad r13.xyz, -r13.xyzx, r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mul r14.xyz, r13.wwww, r13.xyzx
mul r7.w, r7.w, r7.w
mad r14.xyz, r14.xyzx, r7.wwww, r15.xyzx
imul null, r0.w, r0.w, l(17)
eq r18.xyzw, l(48.000000, 69.000000, 2.000000, 10.000000), cb9[1].xxxx
movc r14.xyz, r18.xxxx, l(1.000000,1.000000,1.000000,0), r14.xyzx
movc r7.w, r18.x, l(1.000000), cb4[r0.w + 14].w
movc r13.w, r18.x, l(1.000000), cb4[r0.w + 15].w
lt r19.xy, l(0.000000, 0.000000, 0.000000, 0.000000), cb7[26].xyxx
mov r9.w, l(1.000000)
dp4 r20.x, r9.xyzw, cb7[14].xyzw
dp4 r20.y, r9.xyzw, cb7[15].xyzw
dp4 r20.z, r9.xyzw, cb7[16].xyzw
dp3 r21.x, r17.xyzx, cb7[14].xyzx
dp3 r21.y, r17.xyzx, cb7[15].xyzx
dp3 r21.z, r17.xyzx, cb7[16].xyzx
lt r22.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r21.xyzx
not r23.xyz, r22.xyzx
and r22.xyz, r19.xxxx, r22.xyzx
add r24.xyz, -r20.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
div r24.xyz, r24.xyzx, r21.xyzx
movc r22.xyz, r22.xyzx, |r24.xyzx|, l(5000.000000,5000.000000,5000.000000,0)
and r23.xyz, r19.xxxx, r23.xyzx
lt r24.xyz, r21.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
and r23.xyz, r23.xyzx, r24.xyzx
add r24.xyz, r20.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
div r24.xyz, r24.xyzx, r21.xyzx
movc r22.xyz, r23.xyzx, |r24.xyzx|, r22.xyzx
min r15.w, r22.y, r22.x
min r15.w, r22.z, r15.w
mad r20.xyz, r21.xyzx, r15.wwww, r20.xyzx
mad r16.w, -r15.w, l(0.000100), l(-1.000000)
lt r21.xyz, r20.xyzx, r16.wwww
mad r15.w, r15.w, l(0.000100), l(1.000000)
lt r22.xyz, r15.wwww, r20.xyzx
or r15.w, r21.x, r22.x
or r15.w, r21.y, r15.w
or r15.w, r22.y, r15.w
or r15.w, r21.z, r15.w
or r15.w, r22.z, r15.w
mov r20.w, l(1.000000)
dp4 r21.x, r20.xyzw, cb7[10].xyzw
dp4 r21.y, r20.xyzw, cb7[11].xyzw
dp4 r21.z, r20.xyzw, cb7[12].xyzw
add r20.xyz, r21.xyzx, -cb7[8].xyzx
sample_l_indexable(texturecube)(float,float,float,float) r20.xyz, r20.xyzx, t30.xyzw, s8, r14.w
mul r20.xyz, r7.wwww, r20.xyzx
movc r20.xyz, r15.wwww, l(0,0,0,0), r20.xyzx
sample_l_indexable(texturecube)(float,float,float,float) r21.xyz, r17.xyzx, t30.xyzw, s8, r14.w
mul r21.xyz, r7.wwww, r21.xyzx
movc r19.xzw, r19.xxxx, r20.xxyz, r21.xxyz
dp4 r20.x, r9.xyzw, cb7[22].xyzw
dp4 r20.y, r9.xyzw, cb7[23].xyzw
dp4 r20.z, r9.xyzw, cb7[24].xyzw
dp3 r9.x, r17.xyzx, cb7[22].xyzx
dp3 r9.y, r17.xyzx, cb7[23].xyzx
dp3 r9.z, r17.xyzx, cb7[24].xyzx
lt r21.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r9.xyzx
not r22.xyz, r21.xyzx
and r21.xyz, r19.yyyy, r21.xyzx
add r23.xyz, -r20.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
div r23.xyz, r23.xyzx, r9.xyzx
movc r21.xyz, r21.xyzx, |r23.xyzx|, l(5000.000000,5000.000000,5000.000000,0)
and r22.xyz, r19.yyyy, r22.xyzx
lt r23.xyz, r9.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
and r22.xyz, r22.xyzx, r23.xyzx
add r23.xyz, r20.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
div r23.xyz, r23.xyzx, r9.xyzx
movc r21.xyz, r22.xyzx, |r23.xyzx|, r21.xyzx
min r7.w, r21.y, r21.x
min r7.w, r21.z, r7.w
mad r9.xyz, r9.xyzx, r7.wwww, r20.xyzx
mad r15.w, -r7.w, l(0.000100), l(-1.000000)
lt r20.xyz, r9.xyzx, r15.wwww
mad r7.w, r7.w, l(0.000100), l(1.000000)
lt r21.xyz, r7.wwww, r9.xyzx
or r7.w, r20.x, r21.x
or r7.w, r20.y, r7.w
or r7.w, r21.y, r7.w
or r7.w, r20.z, r7.w
or r7.w, r21.z, r7.w
mov r9.w, l(1.000000)
dp4 r20.x, r9.xyzw, cb7[18].xyzw
dp4 r20.y, r9.xyzw, cb7[19].xyzw
dp4 r20.z, r9.xyzw, cb7[20].xyzw
add r9.xyz, r20.xyzx, -cb7[9].xyzx
sample_l_indexable(texturecube)(float,float,float,float) r9.xyz, r9.xyzx, t31.xyzw, s8, r14.w
mul r9.xyz, r13.wwww, r9.xyzx
movc r9.xyz, r7.wwww, l(0,0,0,0), r9.xyzx
sample_l_indexable(texturecube)(float,float,float,float) r20.xyz, r17.xyzx, t31.xyzw, s8, r14.w
mul r20.xyz, r13.wwww, r20.xyzx
movc r9.xyz, r19.yyyy, r9.xyzx, r20.xyzx
add r9.xyz, -r19.xzwx, r9.xyzx
mad r9.xyz, cb4[r0.w + 13].wwww, r9.xyzx, r19.xzwx
mul r9.xyz, r14.xyzx, r9.xyzx
mul r9.xyz, r11.wwww, r9.xyzx
dp3 r7.w, r17.xyzx, r1.xyzx
add_sat r7.w, r7.w, l(1.000000)
mul r7.w, r7.w, r7.w
mul r9.xyz, r7.wwww, r9.xyzx
mov r6.w, l(1.000000)
dp4 r17.x, r6.xyzw, cb4[r0.w + 8].xyzw
dp4 r17.y, r6.xyzw, cb4[r0.w + 9].xyzw
dp4 r17.z, r6.xyzw, cb4[r0.w + 10].xyzw
max r17.xyz, r17.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mul r17.xyz, r13.xyzx, r17.xyzx
sample_l_indexable(texture2d)(float,float,float,float) r19.xyzw, r12.xyxx, t44.xyzw, s9, r14.w
mul r14.xyz, r11.wwww, r14.xyzx
mul r14.xyz, r14.xyzx, r19.xyzx
add r6.w, -r19.w, l(1.000000)
mad r9.xyz, r9.xyzx, r6.wwww, r14.xyzx
mul r14.xyz, cb5[4].xyzx, cb4[r0.w + 11].xxxx
dp3 r19.x, cb5[0].xyzx, r6.xyzx
dp3 r19.y, cb5[1].xyzx, r6.xyzx
mov_sat r19.zw, r19.xxxy
mul r20.xyz, r13.xyzx, r19.zzzz
mul r21.xyz, r13.xyzx, r19.wwww
mul r21.xyz, r21.xyzx, cb5[5].xyzx
mad r14.xyz, r14.xyzx, r20.xyzx, r21.xyzx
ult r20.xy, l(0, 0, 0, 0), cb5[16].xyxx
if_nz cb5[16].x
  dp3 r6.w, cb5[2].xyzx, r6.xyzx
  mad r6.w, r6.w, l(0.500000), l(0.500000)
  mul r6.w, r6.w, r6.w
  min r6.w, r6.w, l(1.000000)
  mul r21.xyz, r13.xyzx, r6.wwww
  mad r14.xyz, cb5[6].xyzx, r21.xyzx, r14.xyzx
endif 
if_nz cb5[16].y
  dp3 r6.w, cb5[3].xyzx, r6.xyzx
  mad r6.w, r6.w, l(0.500000), l(0.500000)
  mul r6.w, r6.w, r6.w
  min r6.w, r6.w, l(1.000000)
  mul r21.xyz, r13.xyzx, r6.wwww
  mad r14.xyz, cb5[7].xyzx, r21.xyzx, r14.xyzx
endif 
mul r21.xyz, cb5[8].xyzx, cb4[r0.w + 11].xxxx
mad r22.xyz, r11.xyzx, r1.wwww, cb5[0].xyzx
dp3 r6.w, r22.xyzx, r22.xyzx
rsq r6.w, r6.w
mul r22.xyz, r6.wwww, r22.xyzx
mad r23.xyz, r11.xyzx, r1.wwww, cb5[1].xyzx
dp3 r6.w, r23.xyzx, r23.xyzx
rsq r6.w, r6.w
mul r23.xyz, r6.wwww, r23.xyzx
dp3_sat r24.x, r22.xyzx, r6.xyzx
dp3_sat r24.y, r23.xyzx, r6.xyzx
mul r6.w, r8.w, cb5[0].w
mad r7.w, r8.w, l(0.010000), cb5[0].w
div r6.w, r6.w, r7.w
max r25.x, r6.w, l(1.000000)
mul r6.w, r8.w, cb5[1].w
mad r7.w, r8.w, l(0.010000), cb5[1].w
div r6.w, r6.w, r7.w
max r25.y, r6.w, l(1.000000)
log r20.zw, r24.xxxy
mul r20.zw, r20.zzzw, r25.xxxy
exp r20.zw, r20.zzzw
dp3_sat r22.x, r10.xyzx, r22.xyzx
dp3_sat r22.y, r10.xyzx, r23.xyzx
add r22.xy, -r22.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
mul r22.zw, r22.xxxy, r22.xxxy
mul r22.zw, r22.zzzw, r22.zzzw
mul r22.xy, r22.zwzz, r22.xyxx
mad r22.xzw, r22.xxxx, r13.xxyz, r15.xxyz
mad r23.xyz, r22.yyyy, r13.xyzx, r15.xyzx
max r19.xy, r12.zzzz, r19.xyxx
max r19.xy, r19.xyxx, l(0.000100, 0.000100, 0.000000, 0.000000)
div r19.xy, r19.zwzz, r19.xyxx
mul r22.xyz, r20.zzzz, r22.xzwx
mul r19.xzw, r19.xxxx, r22.xxyz
mul r22.xyz, r20.wwww, r23.xyzx
mul r22.xyz, r19.yyyy, r22.xyzx
mad r20.zw, r25.xxxy, l(0.000000, 0.000000, 0.125000, 0.125000), l(0.000000, 0.000000, 0.250000, 0.250000)
mul r21.xyz, r21.xyzx, r20.zzzz
mul r23.xyz, r20.wwww, cb5[9].xyzx
mul r22.xyz, r22.xyzx, r23.xyzx
mad r19.xyz, r21.xyzx, r19.xzwx, r22.xyzx
dp3 r6.w, r6.xyzx, cb5[2].xyzx
mad r21.xyz, r11.xyzx, r1.wwww, cb5[2].xyzx
dp3 r7.w, r21.xyzx, r21.xyzx
rsq r7.w, r7.w
mul r21.xyz, r7.wwww, r21.xyzx
dp3_sat r7.w, r21.xyzx, r6.xyzx
mul r9.w, r8.w, cb5[2].w
mad r13.w, r8.w, l(0.010000), cb5[2].w
div r9.w, r9.w, r13.w
max r9.w, r9.w, l(1.000000)
log r7.w, r7.w
mul r7.w, r7.w, r9.w
exp r7.w, r7.w
dp3_sat r13.w, r10.xyzx, r21.xyzx
add r13.w, -r13.w, l(1.000000)
mul r14.w, r13.w, r13.w
mul r14.w, r14.w, r14.w
mul r13.w, r13.w, r14.w
mad r21.xyz, r13.wwww, r13.xyzx, r15.xyzx
mov_sat r13.w, r6.w
max r6.w, r12.z, r6.w
max r6.w, r6.w, l(0.000100)
div r6.w, r13.w, r6.w
mul r21.xyz, r7.wwww, r21.xyzx
mul r21.xyz, r6.wwww, r21.xyzx
mad r6.w, r9.w, l(0.125000), l(0.250000)
mul r22.xyz, r6.wwww, cb5[10].xyzx
mad r21.xyz, r22.xyzx, r21.xyzx, r19.xyzx
movc r19.xyz, r20.xxxx, r21.xyzx, r19.xyzx
dp3 r6.w, r6.xyzx, cb5[3].xyzx
mad r20.xzw, r11.xxyz, r1.wwww, cb5[3].xxyz
dp3 r1.w, r20.xzwx, r20.xzwx
rsq r1.w, r1.w
mul r20.xzw, r1.wwww, r20.xxzw
dp3_sat r1.w, r20.xzwx, r6.xyzx
mul r7.w, r8.w, cb5[3].w
mad r9.w, r8.w, l(0.010000), cb5[3].w
div r7.w, r7.w, r9.w
max r7.w, r7.w, l(1.000000)
log r1.w, r1.w
mul r1.w, r1.w, r7.w
exp r1.w, r1.w
dp3_sat r9.w, r10.xyzx, r20.xzwx
add r9.w, -r9.w, l(1.000000)
mul r10.x, r9.w, r9.w
mul r10.x, r10.x, r10.x
mul r9.w, r9.w, r10.x
mad r10.xyz, r9.wwww, r13.xyzx, r15.xyzx
mov_sat r9.w, r6.w
max r6.w, r12.z, r6.w
max r6.w, r6.w, l(0.000100)
div r6.w, r9.w, r6.w
mul r10.xyz, r1.wwww, r10.xyzx
mul r10.xyz, r6.wwww, r10.xyzx
mad r1.w, r7.w, l(0.125000), l(0.250000)
mul r13.xyz, r1.wwww, cb5[11].xyzx
mad r10.xyz, r13.xyzx, r10.xyzx, r19.xyzx
movc r10.xyz, r20.yyyy, r10.xyzx, r19.xyzx
if_z cb4[r0.w + 6].y
  dp3 r13.x, r6.xyzx, cb8[5].xyzx
  dp3 r13.y, r6.xyzx, cb8[6].xyzx
  dp3 r13.z, r6.xyzx, 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 r12.xy, r12.xyxx, cb8[1].xyxx
  ftou r12.xy, r12.xyxx
  udiv r12.xy, null, r12.xyxx, cb8[56].xxxx
  utof r12.xy, r12.xyxx
  utof r1.w, cb8[56].y
  mad r1.w, r12.y, r1.w, r12.x
  ftou r1.w, r1.w
  add r6.w, r19.z, -cb8[55].x
  log r6.w, r6.w
  add r6.w, r6.w, -cb8[55].z
  div r6.w, r6.w, cb8[55].y
  max r6.w, r6.w, l(0.000000)
  min r6.w, r6.w, l(14.000000)
  ftou r6.w, r6.w
  ishl r6.w, l(1), r6.w
  ld_structured_indexable(structured_buffer, stride=12)(mixed,mixed,mixed,mixed) r12.xyz, r1.w, l(0), t60.xyzx
  dp3 r1.w, -r19.xyzx, -r19.xyzx
  rsq r1.w, r1.w
  mul r20.xyz, r1.wwww, -r19.xyzx
  mov r21.xyz, l(0,0,0,0)
  mov r22.xyz, l(0,0,0,0)
  mov r1.w, r12.x
  mov r7.w, l(0)
  loop 
    uge r9.w, r7.w, r12.y
    breakc_nz r9.w
    ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r23.xy, r1.w, l(0), t59.xyxx
    iadd r9.w, r1.w, l(1)
    and r13.w, r6.w, r23.y
    iadd r14.w, r7.w, l(1)
    movc r7.w, r13.w, r7.w, r14.w
    mov r1.w, r9.w
    continuec_z r13.w
    ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r24.xyzw, r23.x, l(0), t61.xyzw
    ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r25.xyzw, r23.x, l(16), t61.xyzw
    ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r23.xyz, r23.x, l(32), t61.xyzx
    add r24.xyz, -r19.xyzx, r24.xyzx
    dp3 r13.w, r24.xyzx, r24.xyzx
    rsq r15.w, r13.w
    mul r26.xyz, r15.wwww, r24.xyzx
    dp3_sat r16.w, r13.xyzx, r26.xyzx
    mul_sat r13.w, r24.w, r13.w
    sqrt r13.w, r13.w
    add r13.w, -r13.w, l(1.000000)
    mul r13.w, r13.w, r13.w
    mad r24.xyz, r24.xyzx, r15.wwww, r20.xyzx
    dp3 r15.w, r24.xyzx, r24.xyzx
    rsq r15.w, r15.w
    mul r24.xyz, r15.wwww, r24.xyzx
    mul r15.w, r8.w, r25.w
    mad r17.w, r8.w, l(0.010000), r25.w
    div r15.w, r15.w, r17.w
    max r15.w, r15.w, l(1.000000)
    dp3_sat r17.w, r24.xyzx, r13.xyzx
    log r17.w, r17.w
    mul r17.w, r15.w, r17.w
    exp r17.w, r17.w
    mul r24.xyz, r16.wwww, r25.xyzx
    mul r23.xyz, r17.wwww, r23.xyzx
    log r16.w, r16.w
    mul r16.w, r16.w, l(0.100000)
    exp r16.w, r16.w
    mul r23.xyz, r16.wwww, r23.xyzx
    mul r23.xyz, r13.wwww, r23.xyzx
    mad r15.w, r15.w, l(0.125000), l(0.250000)
    mad r21.xyz, r24.xyzx, r13.wwww, r21.xyzx
    mad r22.xyz, r23.xyzx, r15.wwww, r22.xyzx
    mov r7.w, r14.w
    mov r1.w, r9.w
  endloop 
  dp3 r7.w, r19.xyzx, r19.xyzx
  rsq r7.w, r7.w
  mul r23.xyz, r7.wwww, r19.xyzx
  dp3 r7.w, r23.xyzx, r13.xyzx
  add r7.w, r7.w, r7.w
  mad r23.xyz, r13.xyzx, -r7.wwww, r23.xyzx
  ushr r7.w, r12.z, l(16)
  mov r19.w, l(1.000000)
  mov r24.zw, l(0,0,1.000000,1.000000)
  mov r12.xyz, r21.xyzx
  mov r25.xyz, r22.xyzx
  mov r9.w, r1.w
  mov r13.w, l(0)
  loop 
    uge r14.w, r13.w, r7.w
    breakc_nz r14.w
    ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r26.xy, r9.w, l(0), t59.xyxx
    iadd r14.w, r9.w, l(1)
    and r15.w, r6.w, r26.y
    iadd r16.w, r13.w, l(1)
    movc r13.w, r15.w, r13.w, r16.w
    mov r9.w, r14.w
    continuec_z r15.w
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.xyzw, r26.x, l(0), t62.xyzw
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r28.xyzw, r26.x, l(16), t62.xyzw
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.yzw, r26.x, l(32), t62.xxyz
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r29.xyzw, r26.x, l(60), t62.xyzw
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r30.xyzw, r26.x, l(76), t62.yzwx
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r31.xyzw, r26.x, l(92), t62.yzwx
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r32.xyzw, r26.x, l(108), t62.xyzw
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r33.w, r26.x, l(124), t62.xxxx
    mov r34.xyz, r29.yzwy
    mov r34.w, r30.w
    dp4 r34.x, r19.xyzw, r34.xyzw
    mov r30.w, r31.w
    dp4 r34.y, r19.xyzw, r30.xyzw
    mov r31.w, r32.x
    dp4 r15.w, r19.xyzw, r31.xyzw
    mov r33.xyz, r32.yzwy
    dp4 r17.w, r19.xyzw, r33.xyzw
    lt r15.w, l(0.000000), r15.w
    add r27.xyz, -r19.xyzx, r27.xyzx
    dp3 r20.w, r27.xyzx, r27.xyzx
    rsq r21.w, r20.w
    mul r29.yzw, r21.wwww, r27.xxyz
    lt r22.w, l(0.000000), r29.x
    mul r23.w, r27.w, r27.w
    div r23.w, l(1.000000, 1.000000, 1.000000, 1.000000), r23.w
    div r30.x, l(1.000000, 1.000000, 1.000000, 1.000000), r20.w
    add r25.w, -r23.w, r30.x
    max r30.w, r25.w, l(0.000000)
    dp3_sat r25.w, r29.yzwy, r13.xyzx
    div r31.xy, r34.xyxx, r17.wwww
    dp2 r26.x, r31.xyxx, r31.xyxx
    add r26.x, -r26.x, l(1.000000)
    max r30.y, r26.x, l(0.000000)
    mul r20.w, r20.w, r23.w
    min r20.w, r20.w, l(1.000000)
    add r30.z, -r20.w, l(1.000000)
    div r17.w, r17.w, r27.w
    add_sat r17.w, -r17.w, l(1.000000)
    mul r24.y, r30.y, r30.y
    mul r24.x, r17.w, r17.w
    movc r30.xyzw, r22.wwww, r30.xyzw, r24.xyzw
    mad r27.xyz, r27.xyzx, r21.wwww, r20.xyzx
    dp3 r17.w, r27.xyzx, r27.xyzx
    rsq r17.w, r17.w
    mul r27.xyz, r17.wwww, r27.xyzx
    mul r17.w, r8.w, r28.w
    mad r20.w, r8.w, l(0.010000), r28.w
    div r17.w, r17.w, r20.w
    max r17.w, r17.w, l(1.000000)
    dp3_sat r20.w, r27.xyzx, r13.xyzx
    log r20.w, r20.w
    mul r20.w, r17.w, r20.w
    exp r20.w, r20.w
    mul r27.xyz, r30.wzxw, r30.yyyy
    mul r28.xyz, r25.wwww, r28.xyzx
    mul r30.xyz, r27.xxxx, r28.xyzx
    mul r31.xyz, r20.wwww, r26.yzwy
    log r20.w, r25.w
    mul r20.w, r20.w, l(0.100000)
    exp r20.w, r20.w
    mul r31.xyz, r20.wwww, r31.xyzx
    mul r27.xyw, r27.yyyy, r31.xyxz
    mul r20.w, r17.w, l(0.250000)
    mad r17.w, r17.w, l(0.125000), l(0.250000)
    mul r27.xyw, r17.wwww, r27.xyxw
    dp3_sat r21.w, r29.yzwy, r23.xyzx
    log r21.w, r21.w
    mul r20.w, r20.w, r21.w
    exp r20.w, r20.w
    mul r17.w, r17.w, r20.w
    mul r28.xyz, r27.zzzz, r28.xyzx
    mul r26.xyz, r17.wwww, r26.yzwy
    mul r26.xyz, r27.zzzz, r26.xyzx
    movc r28.xyz, r22.wwww, r30.xyzx, r28.xyzx
    movc r26.xyz, r22.wwww, r27.xywx, r26.xyzx
    and r27.xyz, r15.wwww, r28.xyzx
    and r26.xyz, r15.wwww, r26.xyzx
    add r12.xyz, r12.xyzx, r27.xyzx
    add r25.xyz, r25.xyzx, r26.xyzx
    mov r13.w, r16.w
    mov r9.w, r14.w
  endloop 
  mad r13.xyz, -r15.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
  mul r12.xyz, r12.xyzx, r13.xyzx
  mul r13.xyz, r15.xyzx, r25.xyzx
  mul r15.xyz, r11.wwww, r12.xyzx
  mul r19.xyz, r11.wwww, r13.xyzx
  mad r14.xyz, r12.xyzx, r11.wwww, r14.xyzx
  mad r10.xyz, r13.xyzx, r11.wwww, r10.xyzx
else 
  mov r15.xyz, l(0,0,0,0)
  mov r19.xyz, l(0,0,0,0)
endif 
add r10.xyz, r9.xyzx, r10.xyzx
mad r12.xyz, r17.xyzx, r11.wwww, r14.xyzx
mad r10.xyz, r16.xyzx, r12.xyzx, r10.xyzx
mad r7.xyz, r7.xyzx, cb2[41].xxxx, r10.xyzx
mul o1.xyz, r8.xyzx, cb3[9].xyzx
mov_sat r1.w, cb3[9].w
mov r7.w, l(1.000000)
mul r7.xyzw, r7.xyzw, cb4[r0.w + 7].xyzw
add r6.w, -r11.y, cb6[3].w
add r6.w, r6.w, -cb6[3].y
mul_sat r6.w, r6.w, cb6[3].z
dp2 r8.x, -r11.xzxx, -r11.xzxx
sqrt r8.x, r8.x
add r8.x, r8.x, -cb6[2].y
mul r8.x, r8.x, cb6[2].z
exp r8.x, -r8.x
mad_sat r8.x, -r8.x, cb6[2].x, cb6[2].x
mul_sat r6.w, r6.w, cb6[3].x
dp3 r8.y, r7.xyzx, l(0.298910, 0.586610, 0.114480, 0.000000)
add r8.y, r8.y, l(-1.000000)
mad r8.z, cb6[1].w, r8.y, l(1.000000)
mad r8.y, cb6[4].w, r8.y, l(1.000000)
mad r10.xyz, cb6[1].xyzx, r8.zzzz, -r7.xyzx
mad r7.xyz, r8.xxxx, r10.xyzx, r7.xyzx
mad r8.xyz, cb6[4].xyzx, r8.yyyy, -r7.xyzx
mad r7.xyz, r6.wwww, r8.xyzx, r7.xyzx
add r3.w, r3.w, l(-0.500000)
mul o1.w, r1.w, r7.w
lt r1.w, l(0.000000), cb7[2].x
ine r6.w, l(0), cb2[0].x
and r1.w, r1.w, r6.w
mad r6.w, r3.w, l(0.999000), cb4[r0.w + 16].x
lt r6.w, r6.w, l(0.500000)
and r1.w, r1.w, r6.w
lt r6.w, l(0.000000), cb3[5].x
eq r8.x, l(0.000000), cb4[r0.w + 7].w
and r6.w, r6.w, r8.x
mad r3.w, r3.w, cb3[5].y, r4.w
lt r3.w, r3.w, cb3[5].x
or r3.w, r3.w, r6.w
or r1.w, r1.w, r3.w
movc r1.w, r18.y, r8.x, r1.w
discard_nz r1.w
movc r8.w, r1.w, l(0), r7.w
mad r6.xyz, r6.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
movc r6.xyz, r18.zzzz, r6.xyzx, r7.xyzx
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, r18.wwww, r1.xyzx, r6.xyzx
eq r6.xyzw, l(20.000000, 21.000000, 11.000000, 12.000000), cb9[1].xxxx
movc r1.xyz, r6.xxxx, r15.xyzx, r1.xyzx
movc r1.xyz, r6.yyyy, r19.xyzx, r1.xyzx
or r1.w, r6.w, r6.z
movc r1.xyz, r1.wwww, l(1.000000,1.000000,1.000000,0), r1.xyzx
eq r6.xyzw, l(3.000000, 4.000000, 5.000000, 8.000000), cb9[1].xxxx
movc r1.xyz, r6.xxxx, r5.zzzz, r1.xyzx
sqrt r5.xyz, r5.xywx
add r5.xyz, r5.xyzx, -cb9[1].yyyy
div r5.xyz, r5.xyzx, cb9[1].zzzz
mov_sat r5.yzw, r5.xxyz
movc r1.xyz, r6.yyyy, r5.yzwy, r1.xyzx
ge r1.w, r5.x, l(0.000000)
ge r3.w, l(1.000000), r5.x
and r1.w, r1.w, r3.w
mad r7.xyzw, r5.xxxx, l(0.000000, 4.000000, 0.000000, 4.000000), l(0.000000, 0.000000, 1.000000, -1.000000)
mad r5.yzw, r7.wwww, l(0.000000, 0.000000, 0.000000, -1.000000), l(0.000000, 0.000000, 1.000000, 1.000000)
lt r10.xyz, r5.xxxx, l(0.250000, 0.500000, 0.750000, 0.000000)
mad r13.xyzw, r5.xxxx, l(4.000000, 4.000000, 4.000000, 4.000000), l(-2.000000, -2.000000, -3.000000, -3.000000)
mad r11.xyz, r13.xyyx, l(1.000000, 0.000000, 0.000000, 0.000000), l(0.000000, 1.000000, 0.000000, 0.000000)
mad r12.xyz, r13.zwzz, l(0.000000, -1.000000, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
movc r11.xyz, r10.zzzz, r11.xyzx, r12.xyzx
movc r5.xyz, r10.yyyy, r5.yzwy, r11.xyzx
movc r5.xyz, r10.xxxx, r7.xyzx, r5.xyzx
and r5.xyz, r1.wwww, r5.xyzx
movc r1.xyz, r6.zzzz, r5.xyzx, r1.xyzx
eq r5.xyzw, l(9.000000, 1.000000, 49.000000, 34.000000), cb9[1].xxxx
or r1.w, r5.x, r6.w
movc r1.xyz, r1.wwww, l(0,0,0,0), r1.xyzx
sqrt r4.xyz, r4.xyzx
movc r1.xyz, r5.yyyy, r4.xyzx, r1.xyzx
dp3 r1.w, l(0.298910, 0.586610, 0.114480, 0.000000), r4.xyzx
lt r3.w, r1.w, l(0.125490)
lt r4.x, l(0.952941), r1.w
movc r4.xyz, r4.xxxx, l(0,1.000000,0,0), r1.wwww
movc r4.xyz, r3.wwww, l(1.000000,0,0,0), r4.xyzx
movc r1.xyz, r5.zzzz, r4.xyzx, r1.xyzx
movc r1.xyz, r5.wwww, r12.wwww, r1.xyzx
eq r4.xyzw, l(30.000000, 32.000000, 33.000000, 31.000000), cb9[1].xxxx
or r4.xy, r4.ywyy, r4.xzxx
movc r1.xyz, r4.xxxx, r11.wwww, r1.xyzx
movc r1.xyz, r4.yyyy, l(1.000000,1.000000,1.000000,0), r1.xyzx
eq r4.xyzw, l(13.000000, 14.000000, 17.000000, 55.000000), cb9[1].xxxx
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.xxxx, 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.yyyy, r0.xyzx, r1.xyzx
add r1.x, -cb9[1].y, cb9[1].z
div r1.y, -cb9[1].y, r1.x
movc r0.xyz, r4.zzzz, r1.yyyy, r0.xyzx
eq r5.xyzw, l(56.000000, 16.000000, 40.000000, 41.000000), cb9[1].xxxx
or r1.y, r4.w, r5.x
movc r0.xyz, r1.yyyy, l(0,0,0,0), r0.xyzx
add r1.y, v3.w, -cb9[1].y
div_sat r1.x, r1.y, r1.x
movc r0.xyz, r5.yyyy, r1.xxxx, r0.xyzx
movc r0.xyz, r5.zzzz, cb4[r0.w + 11].xxxx, r0.xyzx
movc r0.xyz, r5.wwww, l(1.000000,1.000000,1.000000,0), r0.xyzx
eq r1.xyzw, l(42.000000, 50.000000, 15.000000, 57.000000), cb9[1].xxxx
movc r0.xyz, r1.xxxx, l(0,0,0,0), r0.xyzx
movc r0.xyz, r18.xxxx, r9.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
or r1.xy, r1.ywyy, r1.xzxx
movc r0.xyz, r1.xxxx, l(1.000000,1.000000,1.000000,0), r0.xyzx
eq r4.xyzw, l(62.000000, 63.000000, 65.000000, 66.000000), cb9[1].xxxx
or r0.w, r1.y, r4.x
movc r0.xyz, r0.wwww, l(0,0,0,0), r0.xyzx
movc r0.xyz, r4.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, r10.w, l(0.000000)
min r0.w, r0.w, l(15.000000)
ftoi r0.w, r0.w
mov r1.xyz, x0[r0.w + 0].xyzx
movc r0.xyz, r4.zzzz, r1.xyzx, r0.xyzx
movc r0.xyz, r4.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 r4.xyz, cb7[0].wwww, cb7[0].xyzx
movc r8.xyz, r1.yyyy, r4.xyzx, r0.xyzx
mov r4.w, l(1.000000)
movc r0.xyzw, r18.yyyy, r4.xyzw, r8.xyzw
movc r0.xyz, r1.zzzz, r3.xyzx, r0.xyzx
movc r0.xyz, r1.wwww, r2.wwww, r0.xyzx
eq r1.x, l(77.000000), cb9[1].x
movc o0.xyz, r1.xxxx, l(0,0,0,0), r0.xyzx
mov o0.w, r0.w
ret 
// Approximately 694 instruction slots used

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