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

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

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

cbuffer cbMtdParam : register(b3)
{
  float4 FC_DifMapMulCol : packoffset(c0);
  float4 FC_SpcMapMulCol : packoffset(c1);
  float4 FC_SpcParam : packoffset(c2);
  float4 FC_SSAOParam : packoffset(c3);
  float3 FC_CDRFParam : packoffset(c4);
  float4 FC_AlphaRef : packoffset(c5);
  float FC_BloodAmount : packoffset(c6);
  float4 old_FC_ParallaxParam : packoffset(c7);
  float FC_IOR : packoffset(c8);
  float4 FC_GlowScale : packoffset(c9);
  float4 FC_GhostEdgeColor : packoffset(c10);
  float4 FC_GhostEdgeParam : packoffset(c11);
  float4 FC_BmpBlendParam0 : packoffset(c12);
  float4 FC_BmpBlendParam1 : packoffset(c13);
  float FC_UNUSED_SSS_ID : packoffset(c14);
  float4 FC_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);
SamplerComparisonState SS_Shadow_s : register(s12);
Texture2D<float4> g_DiffuseTexture : register(t0);
Texture2D<float4> SATTest_ARSN_snp_0_Texture2D_5 : register(t1);
Texture2D<float4> SATTest_ARSN_snp_0_Texture2D_13 : register(t2);
Texture2D<float4> SATTest_ARSN_snp_0_Texture2D_1 : register(t3);
Texture2D<float4> SATTest_ARSN_snp_0_Texture2D_0 : register(t4);
TextureCube<float4> g_IBLTexture : register(t30);
TextureCube<float4> g_IBLTexture2 : register(t31);
Texture2D<float4> g_ShadowTexture : register(t32);
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,
  float2 v4 : TEXCOORD0,
  uint v5 : 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;
  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 = v5.xxx ? r1.xyz : -r1.xyz;
  r3.xy = v4.xy * FC_TextureTilingScale[1].xy + FC_TextureTilingScale[1].zw;
  r3.xyzw = SATTest_ARSN_snp_0_Texture2D_1.Sample(SS_DiffuseMap_s, r3.xy).xyzw;
  r4.xy = v4.xy * FC_TextureTilingScale[13].xy + FC_TextureTilingScale[13].zw;
  r4.xy = SATTest_ARSN_snp_0_Texture2D_13.Sample(SS_DiffuseMap_s, r4.xy).xy;
  r4.xy = r4.xy * float2(2,2) + float2(-1,-1);
  r0.w = dot(r4.xy, r4.xy);
  r0.w = min(1, r0.w);
  r0.w = 1 + -r0.w;
  r0.w = sqrt(r0.w);
  r4.yzw = r4.yyy * r2.xyz;
  r4.xyz = r4.xxx * r0.xyz + r4.yzw;
  r4.xyz = r0.www * r1.xyz + r4.xyz;
  r0.w = dot(r4.xyz, r4.xyz);
  r0.w = rsqrt(r0.w);
  r4.xyz = r4.xyz * r0.www;
  r5.xy = v4.xy * FC_TextureTilingScale[5].xy + FC_TextureTilingScale[5].zw;
  r5.xyz = SATTest_ARSN_snp_0_Texture2D_5.Sample(SS_DiffuseMap_s, r5.xy).xyz;
  r6.xy = v4.xy * FC_TextureTilingScale[0].xy + FC_TextureTilingScale[0].zw;
  r0.w = SATTest_ARSN_snp_0_Texture2D_0.Sample(SS_DiffuseMap_s, r6.xy).x;
  r1.w = round(v1.w);
  r1.w = (uint)r1.w;
  r6.x = dot(v3.xyzw, FC_MatrixInvViewProj._m00_m10_m20_m30);
  r6.y = dot(v3.xyzw, FC_MatrixInvViewProj._m01_m11_m21_m31);
  r6.z = dot(v3.xyzw, FC_MatrixInvViewProj._m02_m12_m22_m32);
  r2.w = dot(v3.xyzw, FC_MatrixInvViewProj._m03_m13_m23_m33);
  r7.xyz = r6.xyz / r2.www;
  r8.x = FC_MatrixInvView._m30 + -r7.x;
  r8.y = FC_MatrixInvView._m31 + -r7.y;
  r8.z = FC_MatrixInvView._m32 + -r7.z;
  r2.w = dot(r8.xyz, r8.xyz);
  r2.w = rsqrt(r2.w);
  r7.xyz = r8.xyz * r2.www;
  r9.xy = FC_ScreenSize.zw * v0.xy;
  r9.zw = float2(0.25,0.25) * v0.xy;
  r5.w = g_DitherTexture.Sample(SS_WrapLinear_s, r9.zw).w;
  r7.w = FC_GlobalReflectanceScale * FC_GlobalReflectanceScale;
  r10.xyz = r7.www * r5.xyz;
  r11.xyz = FC_GlobalRefRectanceRGBScale.xyz * FC_GlobalRefRectanceRGBScale.xyz;
  r12.xyz = r11.xyz * r10.xyz;
  r7.w = FC_GlobalShininessScale * r0.w;
  r8.w = 13 * r7.w;
  r8.w = exp2(r8.w);
  r9.z = g_DiffuseTexture.CalculateLevelOfDetailUnclamped(SS_DiffuseMap_s, v4.xy);
  r13.xyz = FC_GlobalAlbedoOffsetRGB.xyz * float3(0.00392156886,0.00392156886,0.00392156886) + r3.xyz;
  r9.w = dot(float3(0.298999995,0.587000012,0.114), r13.xyz);
  r14.y = dot(float3(0.5,-0.419,-0.0810000002), r13.xyz);
  r14.z = dot(float3(-0.169,-0.331999987,0.5), r13.xyz);
  r14.x = FC_GlobalAlbedoOffset * 0.00392156886 + r9.w;
  r13.x = dot(float2(1,1.40199995), r14.xy);
  r13.y = dot(float3(1,-0.713999987,-0.344000012), r14.xyz);
  r13.z = dot(float2(1,1.77199996), r14.xz);
  r9.w = g_SSAOTexture.Sample(SS_WrapLinear_s, r9.xy).x;
  r10.w = dot(r4.xyz, r7.xyz);
  r11.w = r10.w + r9.w;
  r11.w = r11.w * r11.w + -1;
  r11.w = saturate(r11.w + r9.w);
  r12.w = saturate(r10.w);
  r12.w = 1 + -r12.w;
  r13.w = r10.w + r10.w;
  r14.xyz = r13.www * r4.xyz + -r7.xyz;
  r13.w = r12.w * r12.w;
  r13.w = r13.w * r13.w;
  r12.w = r13.w * r12.w;
  r12.w = r12.w * r11.w;
  r13.w = -r7.w * 6.5 + 6.5;
  r13.w = min(6, r13.w);
  r10.xyz = -r10.xyz * r11.xyz + float3(1,1,1);
  r11.xyz = r10.xyz * r12.www;
  r7.w = r7.w * r7.w;
  r11.xyz = r11.xyz * r7.www + r12.xyz;
  r1.w = (int)r1.w * 17;
  r15.xyzw = cmp(float4(48,69,2,10) == FC_DebugOutputMode.xxxx);
  r11.xyz = r15.xxx ? float3(1,1,1) : r11.xyz;
  r7.w = r15.x ? 1 : VC_InstanceData[r1.w].parallaxCorrectedCubemapAabbMin_envMapColorScale0.w;
  r12.w = r15.x ? 1 : VC_InstanceData[r1.w].parallaxCorrectedCubemapAabbMax_envMapColorScale1.w;
  r16.xy = cmp(float2(0,0) < FC_ParallaxCorrectedCubemapObbAEnable);
  r6.w = 1;
  r17.x = dot(r6.xyzw, FC_ParallaxCorrectedCubemapInvObbA._m00_m10_m20_m30);
  r17.y = dot(r6.xyzw, FC_ParallaxCorrectedCubemapInvObbA._m01_m11_m21_m31);
  r17.z = dot(r6.xyzw, FC_ParallaxCorrectedCubemapInvObbA._m02_m12_m22_m32);
  r18.x = dot(r14.xyz, FC_ParallaxCorrectedCubemapInvObbA._m00_m10_m20);
  r18.y = dot(r14.xyz, FC_ParallaxCorrectedCubemapInvObbA._m01_m11_m21);
  r18.z = dot(r14.xyz, FC_ParallaxCorrectedCubemapInvObbA._m02_m12_m22);
  r19.xyz = cmp(float3(0,0,0) < r18.xyz);
  r20.xyz = ~(int3)r19.xyz;
  r19.xyz = r16.xxx ? r19.xyz : 0;
  r21.xyz = float3(1,1,1) + -r17.xyz;
  r21.xyz = r21.xyz / r18.xyz;
  r19.xyz = r19.xyz ? abs(r21.xyz) : float3(5000,5000,5000);
  r20.xyz = r16.xxx ? r20.xyz : 0;
  r21.xyz = cmp(r18.xyz < float3(0,0,0));
  r20.xyz = r21.xyz ? r20.xyz : 0;
  r21.xyz = float3(1,1,1) + r17.xyz;
  r21.xyz = r21.xyz / r18.xyz;
  r19.xyz = r20.xyz ? abs(r21.xyz) : r19.xyz;
  r14.w = min(r19.x, r19.y);
  r14.w = min(r14.w, r19.z);
  r17.xyz = r18.xyz * r14.www + r17.xyz;
  r16.z = -r14.w * 9.99999975e-005 + -1;
  r18.xyz = cmp(r17.xyz < r16.zzz);
  r14.w = r14.w * 9.99999975e-005 + 1;
  r19.xyz = cmp(r14.www < r17.xyz);
  r14.w = (int)r18.x | (int)r19.x;
  r14.w = (int)r18.y | (int)r14.w;
  r14.w = (int)r19.y | (int)r14.w;
  r14.w = (int)r18.z | (int)r14.w;
  r14.w = (int)r19.z | (int)r14.w;
  r17.w = 1;
  r18.x = dot(r17.xyzw, FC_ParallaxCorrectedCubemapObbA._m00_m10_m20_m30);
  r18.y = dot(r17.xyzw, FC_ParallaxCorrectedCubemapObbA._m01_m11_m21_m31);
  r18.z = dot(r17.xyzw, FC_ParallaxCorrectedCubemapObbA._m02_m12_m22_m32);
  r17.xyz = -FC_ParallaxCorrectedCubemapOriginA.xyz + r18.xyz;
  r17.xyz = g_IBLTexture.SampleLevel(SS_WrapLinear_s, r17.xyz, r13.w).xyz;
  r17.xyz = r17.xyz * r7.www;
  r17.xyz = r14.www ? float3(0,0,0) : r17.xyz;
  r18.xyz = g_IBLTexture.SampleLevel(SS_WrapLinear_s, r14.xyz, r13.w).xyz;
  r18.xyz = r18.xyz * r7.www;
  r16.xzw = r16.xxx ? r17.xyz : r18.xyz;
  r17.x = dot(r6.xyzw, FC_ParallaxCorrectedCubemapInvObbB._m00_m10_m20_m30);
  r17.y = dot(r6.xyzw, FC_ParallaxCorrectedCubemapInvObbB._m01_m11_m21_m31);
  r17.z = dot(r6.xyzw, FC_ParallaxCorrectedCubemapInvObbB._m02_m12_m22_m32);
  r6.x = dot(r14.xyz, FC_ParallaxCorrectedCubemapInvObbB._m00_m10_m20);
  r6.y = dot(r14.xyz, FC_ParallaxCorrectedCubemapInvObbB._m01_m11_m21);
  r6.z = dot(r14.xyz, FC_ParallaxCorrectedCubemapInvObbB._m02_m12_m22);
  r18.xyz = cmp(float3(0,0,0) < r6.xyz);
  r19.xyz = ~(int3)r18.xyz;
  r18.xyz = r16.yyy ? r18.xyz : 0;
  r20.xyz = float3(1,1,1) + -r17.xyz;
  r20.xyz = r20.xyz / r6.xyz;
  r18.xyz = r18.xyz ? abs(r20.xyz) : float3(5000,5000,5000);
  r19.xyz = r16.yyy ? r19.xyz : 0;
  r20.xyz = cmp(r6.xyz < float3(0,0,0));
  r19.xyz = r19.xyz ? r20.xyz : 0;
  r20.xyz = float3(1,1,1) + r17.xyz;
  r20.xyz = r20.xyz / r6.xyz;
  r18.xyz = r19.xyz ? abs(r20.xyz) : r18.xyz;
  r6.w = min(r18.x, r18.y);
  r6.w = min(r6.w, r18.z);
  r17.xyz = r6.xyz * r6.www + r17.xyz;
  r6.x = -r6.w * 9.99999975e-005 + -1;
  r6.xyz = cmp(r17.xyz < r6.xxx);
  r6.w = r6.w * 9.99999975e-005 + 1;
  r18.xyz = cmp(r6.www < r17.xyz);
  r6.x = (int)r6.x | (int)r18.x;
  r6.x = (int)r6.y | (int)r6.x;
  r6.x = (int)r18.y | (int)r6.x;
  r6.x = (int)r6.z | (int)r6.x;
  r6.x = (int)r18.z | (int)r6.x;
  r17.w = 1;
  r18.x = dot(r17.xyzw, FC_ParallaxCorrectedCubemapObbB._m00_m10_m20_m30);
  r18.y = dot(r17.xyzw, FC_ParallaxCorrectedCubemapObbB._m01_m11_m21_m31);
  r18.z = dot(r17.xyzw, FC_ParallaxCorrectedCubemapObbB._m02_m12_m22_m32);
  r6.yzw = -FC_ParallaxCorrectedCubemapOriginB.xyz + r18.xyz;
  r6.yzw = g_IBLTexture2.SampleLevel(SS_WrapLinear_s, r6.yzw, r13.w).xyz;
  r6.yzw = r6.yzw * r12.www;
  r6.xyz = r6.xxx ? float3(0,0,0) : r6.yzw;
  r17.xyz = g_IBLTexture2.SampleLevel(SS_WrapLinear_s, r14.xyz, r13.w).xyz;
  r17.xyz = r17.xyz * r12.www;
  r6.xyz = r16.yyy ? r6.xyz : r17.xyz;
  r6.xyz = r6.xyz + -r16.xzw;
  r6.xyz = VC_InstanceData[r1.w].parallaxCorrectedCubemapOrigin_envMapInterpRatio.www * r6.xyz + r16.xzw;
  r6.xyz = r6.xyz * r11.xyz;
  r6.xyz = r6.xyz * r9.www;
  r6.w = dot(r14.xyz, r1.xyz);
  r6.w = saturate(1 + r6.w);
  r6.w = r6.w * r6.w;
  r6.xyz = r6.xyz * r6.www;
  r4.w = 1;
  r14.x = dot(r4.xyzw, VC_InstanceData[r1.w].aSh[0].xyzw);
  r14.y = dot(r4.xyzw, VC_InstanceData[r1.w].aSh[1].xyzw);
  r14.z = dot(r4.xyzw, VC_InstanceData[r1.w].aSh[2].xyzw);
  r14.xyz = max(float3(0,0,0), r14.xyz);
  r14.xyz = r14.xyz * r10.xyz;
  r16.xyzw = g_RLRTexture.SampleLevel(SS_ClampLinear_s, r9.xy, r13.w).xyzw;
  r11.xyz = r11.xyz * r9.www;
  r11.xyz = r16.xyz * r11.xyz;
  r4.w = 1 + -r16.w;
  r6.xyz = r6.xyz * r4.www + r11.xyz;
  r16.x = dot(v3.xyzw, FC_MatrixInvProj._m00_m10_m20_m30);
  r16.y = dot(v3.xyzw, FC_MatrixInvProj._m01_m11_m21_m31);
  r16.z = dot(v3.xyzw, FC_MatrixInvProj._m02_m12_m22_m32);
  r16.w = dot(v3.xyzw, FC_MatrixInvProj._m03_m13_m23_m33);
  r17.xyz = r16.xyz / r16.www;
  r11.xyz = cmp(FC_CascadeSelectDist.xyz < r17.zzz);
  r11.xyz = r11.xyz ? float3(1,1,1) : 0;
  r4.w = (int)r11.y + (int)r11.x;
  r4.w = (int)r11.z + (int)r4.w;
  r4.w = (uint)r4.w << 2;
  r18.x = dot(r16.xyzw, FC_ProjSpaceToShadowMatrix[r4.w/4]._m00_m10_m20_m30);
  r18.y = dot(r16.xyzw, FC_ProjSpaceToShadowMatrix[r4.w/4]._m01_m11_m21_m31);
  r18.z = dot(r16.xyzw, FC_ProjSpaceToShadowMatrix[r4.w/4]._m02_m12_m22_m32);
  r18.w = dot(r16.xyzw, FC_ProjSpaceToShadowMatrix[r4.w/4]._m03_m13_m23_m33);
  r16.xy = FC_ShadowMapParam.zw * r18.ww;
  r16.z = 0;
  r19.xyzw = r18.xyzw + r16.xyzz;
  r11.xyz = r19.xyz / r19.www;
  r19.x = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r11.xy, r11.z).x;
  r16.w = -r16.x;
  r20.xyzw = r18.xyzw + r16.ywzz;
  r11.xyz = r20.xyz / r20.www;
  r19.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r11.xy, r11.z).x;
  r20.xyzw = r16.xyzz * float4(-1,-1,1,1) + r18.xyzw;
  r11.xyz = r20.xyz / r20.www;
  r19.z = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r11.xy, r11.z).x;
  r16.xyzw = r16.yxzz * float4(-1,1,1,1) + r18.xyzw;
  r11.xyz = r16.xyz / r16.www;
  r19.w = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r11.xy, r11.z).x;
  r4.w = dot(r19.xyzw, float4(0.25,0.25,0.25,0.25));
  r4.w = 1 + -r4.w;
  r6.w = dot(r17.xyz, r17.xyz);
  r7.w = sqrt(r6.w);
  r7.w = FC_ShadowMapParam.x + -r7.w;
  r7.w = saturate(FC_ShadowMapParam.y * r7.w);
  r11.xyz = FC_ShadowColor.xyz * r7.www;
  r11.xyz = -r11.xyz * r4.www + float3(1,1,1);
  r11.xyz = VC_InstanceData[r1.w].ShLightMask.xxx * r11.xyz;
  r16.xyz = FC_DirLightCol_0.xyz * r11.xyz;
  r18.x = dot(FC_DirLightVec_0.xyz, r4.xyz);
  r18.y = dot(FC_DirLightVec_1.xyz, r4.xyz);
  r18.zw = saturate(r18.xy);
  r19.xyz = r18.zzz * r10.xyz;
  r20.xyz = r18.www * r10.xyz;
  r20.xyz = FC_DirLightCol_1.xyz * r20.xyz;
  r16.xyz = r16.xyz * r19.xyz + r20.xyz;
  r19.xy = cmp(int2(0,0) < (uint2)FC_bLocalLight.xy);
  if (FC_bLocalLight.x != 0) {
    r4.w = dot(FC_DirLightVec_2.xyz, r4.xyz);
    r4.w = r4.w * 0.5 + 0.5;
    r4.w = r4.w * r4.w;
    r4.w = min(1, r4.w);
    r20.xyz = r4.www * r10.xyz;
    r16.xyz = FC_DirLightCol_2.xyz * r20.xyz + r16.xyz;
  }
  if (FC_bLocalLight.y != 0) {
    r4.w = dot(FC_DirLightVec_3.xyz, r4.xyz);
    r4.w = r4.w * 0.5 + 0.5;
    r4.w = r4.w * r4.w;
    r4.w = min(1, r4.w);
    r20.xyz = r4.www * r10.xyz;
    r16.xyz = FC_DirLightCol_3.xyz * r20.xyz + r16.xyz;
  }
  r20.xyz = FC_DirLightSpc_0.xyz * r11.xyz;
  r21.xyz = r8.xyz * r2.www + FC_DirLightVec_0.xyz;
  r4.w = dot(r21.xyz, r21.xyz);
  r4.w = rsqrt(r4.w);
  r21.xyz = r21.xyz * r4.www;
  r22.xyz = r8.xyz * r2.www + FC_DirLightVec_1.xyz;
  r4.w = dot(r22.xyz, r22.xyz);
  r4.w = rsqrt(r4.w);
  r22.xyz = r22.xyz * r4.www;
  r23.x = saturate(dot(r21.xyz, r4.xyz));
  r23.y = saturate(dot(r22.xyz, r4.xyz));
  r4.w = FC_DirLightVec_0.w * r8.w;
  r7.w = r8.w * 0.00999999978 + FC_DirLightVec_0.w;
  r4.w = r4.w / r7.w;
  r24.x = max(1, r4.w);
  r4.w = FC_DirLightVec_1.w * r8.w;
  r7.w = r8.w * 0.00999999978 + FC_DirLightVec_1.w;
  r4.w = r4.w / r7.w;
  r24.y = max(1, r4.w);
  r19.zw = log2(r23.xy);
  r19.zw = r24.xy * r19.zw;
  r19.zw = exp2(r19.zw);
  r21.x = saturate(dot(r7.xyz, r21.xyz));
  r21.y = saturate(dot(r7.xyz, r22.xyz));
  r21.xy = float2(1,1) + -r21.xy;
  r21.zw = r21.xy * r21.xy;
  r21.zw = r21.zw * r21.zw;
  r21.xy = r21.xy * r21.zw;
  r21.xzw = r21.xxx * r10.xyz + r12.xyz;
  r22.xyz = r21.yyy * r10.xyz + r12.xyz;
  r18.xy = max(r18.xy, r10.ww);
  r18.xy = max(float2(9.99999975e-005,9.99999975e-005), r18.xy);
  r18.xy = r18.zw / r18.xy;
  r21.xyz = r21.xzw * r19.zzz;
  r18.xzw = r21.xyz * r18.xxx;
  r21.xyz = r22.xyz * r19.www;
  r21.xyz = r21.xyz * r18.yyy;
  r19.zw = r24.xy * float2(0.125,0.125) + float2(0.25,0.25);
  r20.xyz = r19.zzz * r20.xyz;
  r22.xyz = FC_DirLightSpc_1.xyz * r19.www;
  r21.xyz = r22.xyz * r21.xyz;
  r18.xyz = r20.xyz * r18.xzw + r21.xyz;
  r4.w = dot(r4.xyz, FC_DirLightVec_2.xyz);
  r20.xyz = r8.xyz * r2.www + FC_DirLightVec_2.xyz;
  r7.w = dot(r20.xyz, r20.xyz);
  r7.w = rsqrt(r7.w);
  r20.xyz = r20.xyz * r7.www;
  r7.w = saturate(dot(r20.xyz, r4.xyz));
  r12.w = FC_DirLightVec_2.w * r8.w;
  r13.w = r8.w * 0.00999999978 + FC_DirLightVec_2.w;
  r12.w = r12.w / r13.w;
  r12.w = max(1, r12.w);
  r7.w = log2(r7.w);
  r7.w = r12.w * r7.w;
  r7.w = exp2(r7.w);
  r13.w = saturate(dot(r7.xyz, r20.xyz));
  r13.w = 1 + -r13.w;
  r14.w = r13.w * r13.w;
  r14.w = r14.w * r14.w;
  r13.w = r14.w * r13.w;
  r20.xyz = r13.www * r10.xyz + r12.xyz;
  r13.w = saturate(r4.w);
  r4.w = max(r4.w, r10.w);
  r4.w = max(9.99999975e-005, r4.w);
  r4.w = r13.w / r4.w;
  r20.xyz = r20.xyz * r7.www;
  r20.xyz = r20.xyz * r4.www;
  r4.w = r12.w * 0.125 + 0.25;
  r21.xyz = FC_DirLightSpc_2.xyz * r4.www;
  r20.xyz = r21.xyz * r20.xyz + r18.xyz;
  r18.xyz = r19.xxx ? r20.xyz : r18.xyz;
  r4.w = dot(r4.xyz, FC_DirLightVec_3.xyz);
  r19.xzw = r8.xyz * r2.www + FC_DirLightVec_3.xyz;
  r2.w = dot(r19.xzw, r19.xzw);
  r2.w = rsqrt(r2.w);
  r19.xzw = r19.xzw * r2.www;
  r2.w = saturate(dot(r19.xzw, r4.xyz));
  r7.w = FC_DirLightVec_3.w * r8.w;
  r12.w = r8.w * 0.00999999978 + FC_DirLightVec_3.w;
  r7.w = r7.w / r12.w;
  r7.w = max(1, r7.w);
  r2.w = log2(r2.w);
  r2.w = r7.w * r2.w;
  r2.w = exp2(r2.w);
  r7.x = saturate(dot(r7.xyz, r19.xzw));
  r7.x = 1 + -r7.x;
  r7.y = r7.x * r7.x;
  r7.y = r7.y * r7.y;
  r7.x = r7.x * r7.y;
  r7.xyz = r7.xxx * r10.xyz + r12.xyz;
  r10.x = saturate(r4.w);
  r4.w = max(r4.w, r10.w);
  r4.w = max(9.99999975e-005, r4.w);
  r4.w = r10.x / r4.w;
  r7.xyz = r7.xyz * r2.www;
  r7.xyz = r7.xyz * r4.www;
  r2.w = r7.w * 0.125 + 0.25;
  r10.xyz = FC_DirLightSpc_3.xyz * r2.www;
  r7.xyz = r10.xyz * r7.xyz + r18.xyz;
  r7.xyz = r19.yyy ? r7.xyz : r18.xyz;
  if (VC_InstanceData[r1.w].dynamicLightDisable == 0) {
    r10.x = dot(r4.xyz, FC_MatrixView._m00_m10_m20);
    r10.y = dot(r4.xyz, FC_MatrixView._m01_m11_m21);
    r10.z = dot(r4.xyz, FC_MatrixView._m02_m12_m22);
    r9.xy = FC_ScreenSize.xy * r9.xy;
    r9.xy = (uint2)r9.xy;
    uiDest.xy = (uint2)r9.xy / FC_LightTile_Width;
    r9.xy = uiDest.xy;
    r9.xy = (uint2)r9.xy;
    r2.w = FC_LightTile_NumCellX;
    r2.w = r9.y * r2.w + r9.x;
    r2.w = (uint)r2.w;
    r4.w = -FC_FrustumNear + r17.z;
    r4.w = log2(r4.w);
    r4.w = -FC_FrustumSliceBias + r4.w;
    r4.w = r4.w / FC_FrustumSliceScale;
    r4.w = max(0, r4.w);
    r4.w = min(14, r4.w);
    r4.w = (uint)r4.w;
    r4.w = 1 << (int)r4.w;
  // Known bad code for instruction (needs manual fix):
    ld_structured_indexable(structured_buffer, stride=12)(mixed,mixed,mixed,mixed) r18.xyz, r2.w, l(0), t60.xyzx
  r18.x = SS_DiffuseMap[]..swiz;
  r18.y = SS_DiffuseMap[]..swiz;
  r18.z = SS_DiffuseMap[]..swiz;
    r2.w = dot(-r17.xyz, -r17.xyz);
    r2.w = rsqrt(r2.w);
    r19.xyz = -r17.xyz * r2.www;
    r20.xyz = float3(0,0,0);
    r21.xyz = float3(0,0,0);
    r2.w = r18.x;
    r7.w = 0;
    while (true) {
      r9.x = cmp((uint)r7.w >= (uint)r18.y);
      if (r9.x != 0) break;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r9.xy, r2.w, l(0), t59.xyxx
    r9.x = SS_DiffuseMap[]..swiz;
    r9.y = SS_DiffuseMap[]..swiz;
      r10.w = (int)r2.w + 1;
      r9.y = (int)r4.w & (int)r9.y;
      r12.w = (int)r7.w + 1;
      r7.w = r9.y ? r7.w : r12.w;
      r2.w = r10.w;
      if (r9.y == 0) continue;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r22.xyzw, r9.x, l(0), t61.xyzw
    r22.x = SS_DiffuseMap[]..swiz;
    r22.y = SS_DiffuseMap[]..swiz;
    r22.z = SS_DiffuseMap[]..swiz;
    r22.w = SS_DiffuseMap[]..swiz;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r23.xyzw, r9.x, l(16), t61.xyzw
    r23.x = SS_DiffuseMap[]..swiz;
    r23.y = SS_DiffuseMap[]..swiz;
    r23.z = SS_DiffuseMap[]..swiz;
    r23.w = SS_DiffuseMap[]..swiz;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r24.xyz, r9.x, l(32), t61.xyzx
    r24.x = SS_DiffuseMap[]..swiz;
    r24.y = SS_DiffuseMap[]..swiz;
    r24.z = SS_DiffuseMap[]..swiz;
      r22.xyz = r22.xyz + -r17.xyz;
      r9.x = dot(r22.xyz, r22.xyz);
      r9.y = rsqrt(r9.x);
      r25.xyz = r22.xyz * r9.yyy;
      r13.w = saturate(dot(r10.xyz, r25.xyz));
      r9.x = saturate(r9.x * r22.w);
      r9.x = sqrt(r9.x);
      r9.x = 1 + -r9.x;
      r9.x = r9.x * r9.x;
      r22.xyz = r22.xyz * r9.yyy + r19.xyz;
      r9.y = dot(r22.xyz, r22.xyz);
      r9.y = rsqrt(r9.y);
      r22.xyz = r22.xyz * r9.yyy;
      r9.y = r23.w * r8.w;
      r14.w = r8.w * 0.00999999978 + r23.w;
      r9.y = r9.y / r14.w;
      r9.y = max(1, r9.y);
      r14.w = saturate(dot(r22.xyz, r10.xyz));
      r14.w = log2(r14.w);
      r14.w = r14.w * r9.y;
      r14.w = exp2(r14.w);
      r22.xyz = r23.xyz * r13.www;
      r23.xyz = r24.xyz * r14.www;
      r13.w = log2(r13.w);
      r13.w = 0.100000001 * r13.w;
      r13.w = exp2(r13.w);
      r23.xyz = r23.xyz * r13.www;
      r23.xyz = r23.xyz * r9.xxx;
      r9.y = r9.y * 0.125 + 0.25;
      r20.xyz = r22.xyz * r9.xxx + r20.xyz;
      r21.xyz = r23.xyz * r9.yyy + r21.xyz;
      r7.w = r12.w;
      r2.w = r10.w;
    }
    r6.w = rsqrt(r6.w);
    r18.xyw = r17.xyz * r6.www;
    r6.w = dot(r18.xyw, r10.xyz);
    r6.w = r6.w + r6.w;
    r18.xyw = r10.xyz * -r6.www + r18.xyw;
    r6.w = (uint)r18.z >> 16;
    r17.w = 1;
    r22.zw = float2(1,1);
    r23.xyz = r20.xyz;
    r24.xyz = r21.xyz;
    r7.w = r2.w;
    r9.x = 0;
    while (true) {
      r9.y = cmp((uint)r9.x >= (uint)r6.w);
      if (r9.y != 0) break;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r25.xy, r7.w, l(0), t59.xyxx
    r25.x = SS_DiffuseMap[]..swiz;
    r25.y = SS_DiffuseMap[]..swiz;
      r9.y = (int)r7.w + 1;
      r10.w = (int)r4.w & (int)r25.y;
      r12.w = (int)r9.x + 1;
      r9.x = r10.w ? r9.x : r12.w;
      r7.w = r9.y;
      if (r10.w == 0) continue;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyzw, r25.x, l(0), t62.xyzw
    r26.x = SS_DiffuseMap[]..swiz;
    r26.y = SS_DiffuseMap[]..swiz;
    r26.z = SS_DiffuseMap[]..swiz;
    r26.w = SS_DiffuseMap[]..swiz;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.xyzw, r25.x, l(16), 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) r25.yzw, r25.x, l(32), t62.xxyz
    r25.y = SS_DiffuseMap[]..swiz;
    r25.z = SS_DiffuseMap[]..swiz;
    r25.w = SS_DiffuseMap[]..swiz;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r28.xyzw, r25.x, l(60), 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, r25.x, l(76), t62.yzwx
    r29.x = SS_DiffuseMap[]..swiz;
    r29.y = SS_DiffuseMap[]..swiz;
    r29.z = SS_DiffuseMap[]..swiz;
    r29.w = SS_DiffuseMap[]..swiz;
    // Known bad code for instruction (needs manual fix):
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r30.xyzw, r25.x, l(92), 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, r25.x, l(108), t62.xyzw
    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.w, r25.x, l(124), t62.xxxx
    r32.w = SS_DiffuseMap[]..swiz;
      r33.xyz = r28.yzw;
      r33.w = r29.w;
      r33.x = dot(r17.xyzw, r33.xyzw);
      r29.w = r30.w;
      r33.y = dot(r17.xyzw, r29.xyzw);
      r30.w = r31.x;
      r10.w = dot(r17.xyzw, r30.xyzw);
      r32.xyz = r31.yzw;
      r13.w = dot(r17.xyzw, r32.xyzw);
      r10.w = cmp(0 < r10.w);
      r26.xyz = r26.xyz + -r17.xyz;
      r14.w = dot(r26.xyz, r26.xyz);
      r16.w = rsqrt(r14.w);
      r28.yzw = r26.xyz * r16.www;
      r18.z = cmp(0 < r28.x);
      r19.w = r26.w * r26.w;
      r19.w = 1 / r19.w;
      r29.x = 1 / r14.w;
      r20.w = r29.x + -r19.w;
      r29.w = max(0, r20.w);
      r20.w = saturate(dot(r28.yzw, r10.xyz));
      r30.xy = r33.xy / r13.ww;
      r21.w = dot(r30.xy, r30.xy);
      r21.w = 1 + -r21.w;
      r29.y = max(0, r21.w);
      r14.w = r19.w * r14.w;
      r14.w = min(1, r14.w);
      r29.z = 1 + -r14.w;
      r13.w = r13.w / r26.w;
      r13.w = saturate(1 + -r13.w);
      r22.y = r29.y * r29.y;
      r22.x = r13.w * r13.w;
      r29.xyzw = r18.zzzz ? r29.xyzw : r22.xyzw;
      r26.xyz = r26.xyz * r16.www + r19.xyz;
      r13.w = dot(r26.xyz, r26.xyz);
      r13.w = rsqrt(r13.w);
      r26.xyz = r26.xyz * r13.www;
      r13.w = r27.w * r8.w;
      r14.w = r8.w * 0.00999999978 + r27.w;
      r13.w = r13.w / r14.w;
      r13.w = max(1, r13.w);
      r14.w = saturate(dot(r26.xyz, r10.xyz));
      r14.w = log2(r14.w);
      r14.w = r14.w * r13.w;
      r14.w = exp2(r14.w);
      r26.xyz = r29.yyy * r29.wzx;
      r27.xyz = r27.xyz * r20.www;
      r29.xyz = r27.xyz * r26.xxx;
      r30.xyz = r25.yzw * r14.www;
      r14.w = log2(r20.w);
      r14.w = 0.100000001 * r14.w;
      r14.w = exp2(r14.w);
      r30.xyz = r30.xyz * r14.www;
      r26.xyw = r30.xyz * r26.yyy;
      r14.w = 0.25 * r13.w;
      r13.w = r13.w * 0.125 + 0.25;
      r26.xyw = r26.xyw * r13.www;
      r16.w = saturate(dot(r28.yzw, r18.xyw));
      r16.w = log2(r16.w);
      r14.w = r16.w * r14.w;
      r14.w = exp2(r14.w);
      r13.w = r14.w * r13.w;
      r27.xyz = r27.xyz * r26.zzz;
      r25.xyz = r25.yzw * r13.www;
      r25.xyz = r25.xyz * r26.zzz;
      r27.xyz = r18.zzz ? r29.xyz : r27.xyz;
      r25.xyz = r18.zzz ? r26.xyw : r25.xyz;
      r26.xyz = r10.www ? r27.xyz : 0;
      r25.xyz = r10.www ? r25.xyz : 0;
      r23.xyz = r26.xyz + r23.xyz;
      r24.xyz = r25.xyz + r24.xyz;
      r9.x = r12.w;
      r7.w = r9.y;
    }
    r10.xyz = -r12.xyz * float3(0.5,0.5,0.5) + float3(1,1,1);
    r10.xyz = r23.xyz * r10.xyz;
    r12.xyz = r24.xyz * r12.xyz;
    r17.xyz = r10.xyz * r9.www;
    r18.xyz = r12.xyz * r9.www;
    r16.xyz = r10.xyz * r9.www + r16.xyz;
    r7.xyz = r12.xyz * r9.www + r7.xyz;
  } else {
    r17.xyz = float3(0,0,0);
    r18.xyz = float3(0,0,0);
  }
  r7.xyz = r7.xyz + r6.xyz;
  r10.xyz = r14.xyz * r9.www + r16.xyz;
  r7.xyz = r13.xyz * r10.xyz + r7.xyz;
  r7.w = 1;
  r7.xyzw = VC_InstanceData[r1.w].mulCol.xyzw * r7.xyzw;
  r2.w = FC_HeightFogParam.w + -r8.y;
  r2.w = -FC_HeightFogParam.y + r2.w;
  r2.w = saturate(FC_HeightFogParam.z * r2.w);
  r4.w = dot(-r8.xz, -r8.xz);
  r4.w = sqrt(r4.w);
  r4.w = -FC_ExtFogParam.y + r4.w;
  r4.w = FC_ExtFogParam.z * r4.w;
  r4.w = exp2(-r4.w);
  r4.w = saturate(-r4.w * FC_ExtFogParam.x + FC_ExtFogParam.x);
  r2.w = saturate(FC_HeightFogParam.x * r2.w);
  r6.w = dot(r7.xyz, float3(0.298909992,0.586610019,0.114480004));
  r6.w = -1 + r6.w;
  r8.x = FC_FogCol.w * r6.w + 1;
  r6.w = FC_HeightFogCol.w * r6.w + 1;
  r8.xyz = FC_FogCol.xyz * r8.xxx + -r7.xyz;
  r7.xyz = r4.www * r8.xyz + r7.xyz;
  r8.xyz = FC_HeightFogCol.xyz * r6.www + -r7.xyz;
  r7.xyz = r2.www * r8.xyz + r7.xyz;
  r2.w = -0.5 + r5.w;
  r4.w = cmp(0 < FC_DitherEnable);
  r5.w = cmp(0 != FC_isDitherAlpha);
  r4.w = r4.w ? r5.w : 0;
  r5.w = r2.w * 0.999000013 + VC_InstanceData[r1.w].ditherFadeAlpha;
  r5.w = cmp(r5.w < 0.5);
  r4.w = r4.w ? r5.w : 0;
  r5.w = cmp(0 < FC_AlphaRef.x);
  r1.w = cmp(0.000000 == VC_InstanceData[r1.w].mulCol.w);
  r5.w = r1.w ? r5.w : 0;
  r2.w = r2.w * FC_AlphaRef.y + r3.w;
  r2.w = cmp(r2.w < FC_AlphaRef.x);
  r2.w = (int)r2.w | (int)r5.w;
  r2.w = (int)r4.w | (int)r2.w;
  r1.w = r15.y ? r1.w : r2.w;
  if (r1.w != 0) discard;
  r8.w = r1.w ? 0 : r7.w;
  r4.xyz = r4.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  r4.xyz = r15.zzz ? r4.xyz : r7.xyz;
  r1.xyz = r1.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
  r1.xyz = r15.www ? r1.xyz : r4.xyz;
  r4.xyzw = cmp(float4(20,21,11,12) == FC_DebugOutputMode.xxxx);
  r1.xyz = r4.xxx ? r17.xyz : r1.xyz;
  r1.xyz = r4.yyy ? r18.xyz : r1.xyz;
  r1.w = (int)r4.w | (int)r4.z;
  r1.xyz = r1.www ? float3(1,1,1) : r1.xyz;
  r4.xyzw = cmp(float4(3,4,5,8) == FC_DebugOutputMode.xxxx);
  r1.xyz = r4.xxx ? r0.www : r1.xyz;
  r5.xyz = sqrt(r5.xyz);
  r5.xyz = -FC_DebugOutputMode.yyy + r5.xyz;
  r5.xyz = r5.xyz / FC_DebugOutputMode.zzz;
  r5.yzw = saturate(r5.xyz);
  r1.xyz = r4.yyy ? r5.yzw : r1.xyz;
  r0.w = cmp(r5.x >= 0);
  r1.w = cmp(1 >= r5.x);
  r0.w = r0.w ? r1.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));
  r12.xyzw = r5.xxxx * float4(4,4,4,4) + float4(-2,-2,-3,-3);
  r13.xyz = r12.xyy * float3(1,0,0) + float3(0,1,0);
  r12.xyz = r12.zwz * float3(0,-1,0) + float3(1,1,0);
  r12.xyz = r10.zzz ? r13.xyz : r12.xyz;
  r5.xyz = r10.yyy ? r5.yzw : r12.xyz;
  r5.xyz = r10.xxx ? r7.xyz : r5.xyz;
  r5.xyz = r0.www ? r5.xyz : 0;
  r1.xyz = r4.zzz ? r5.xyz : r1.xyz;
  r5.xyzw = cmp(float4(9,1,49,34) == FC_DebugOutputMode.xxxx);
  r0.w = (int)r4.w | (int)r5.x;
  r1.xyz = r0.www ? float3(0,0,0) : r1.xyz;
  r3.xyz = sqrt(r3.xyz);
  r1.xyz = r5.yyy ? r3.xyz : r1.xyz;
  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 = r5.zzz ? r3.xyz : r1.xyz;
  r1.xyz = r5.www ? r11.www : r1.xyz;
  r3.xyzw = cmp(float4(30,32,33,31) == FC_DebugOutputMode.xxxx);
  r3.xy = (int2)r3.yw | (int2)r3.xz;
  r1.xyz = r3.xxx ? r9.www : r1.xyz;
  r1.xyz = r3.yyy ? float3(1,1,1) : r1.xyz;
  r3.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 = r3.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 = r3.yyy ? r0.xyz : r1.xyz;
  r0.w = FC_DebugOutputMode.z + -FC_DebugOutputMode.y;
  r1.x = -FC_DebugOutputMode.y / r0.w;
  r0.xyz = r3.zzz ? r1.xxx : r0.xyz;
  r1.xyzw = cmp(float4(56,16,40,41) == FC_DebugOutputMode.xxxx);
  r1.x = (int)r1.x | (int)r3.w;
  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.yyy ? r0.www : r0.xyz;
  r0.xyz = r1.zzz ? r11.xyz : r0.xyz;
  r0.xyz = r1.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 = r15.xxx ? r6.xyz : r0.xyz;
  r0.xyz = r1.yyy ? float3(0,0,1) : r0.xyz;
  r0.w = (int)r1.w | (int)r1.z;
  r1.xyzw = cmp(float4(58,59,60,61) == FC_DebugOutputMode.xxxx);
  r0.w = (int)r0.w | (int)r1.x;
  r0.w = (int)r1.y | (int)r0.w;
  r0.w = (int)r1.z | (int)r0.w;
  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, r9.z);
  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;
  r8.xyz = r1.yyy ? r2.xyz : r0.xyz;
  r2.w = 1;
  r0.xyzw = r15.yyyy ? r2.xyzw : r8.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]
//
// }
//
// 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
//   float4 FC_ShadowColor;             // Offset:  464 Size:    16
//   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
//   float4 FC_CascadeSelectDist;       // Offset:  864 Size:    16
//   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
// SS_Shadow                       sampler_c      NA          NA   12        1
// g_DiffuseTexture                  texture  float4          2d    0        1
// SATTest_ARSN_snp_0_Texture2D_5    texture  float4          2d    1        1
// SATTest_ARSN_snp_0_Texture2D_13    texture  float4          2d    2        1
// SATTest_ARSN_snp_0_Texture2D_1    texture  float4          2d    3        1
// SATTest_ARSN_snp_0_Texture2D_0    texture  float4          2d    4        1
// g_IBLTexture                      texture  float4        cube   30        1
// g_IBLTexture2                     texture  float4        cube   31        1
// g_ShadowTexture                   texture  float4          2d   32        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  
// SV_ISFRONTFACE           0   x           5    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[14], immediateIndexed
dcl_constantbuffer cb2[1], immediateIndexed
dcl_constantbuffer cb3[6], immediateIndexed
dcl_constantbuffer cb8[57], dynamicIndexed
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_sampler s12, mode_comparison
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_texturecube (float,float,float,float) t30
dcl_resource_texturecube (float,float,float,float) t31
dcl_resource_texture2d (float,float,float,float) t32
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_sgv v5.x, is_front_face
dcl_output o0.xyzw
dcl_temps 34
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, v5.xxxx, r1.xyzx, -r1.xyzx
mad r3.xy, v4.xyxx, cb1[1].xyxx, cb1[1].zwzz
sample_indexable(texture2d)(float,float,float,float) r3.xyzw, r3.xyxx, t3.xyzw, s0
mad r4.xy, v4.xyxx, cb1[13].xyxx, cb1[13].zwzz
sample_indexable(texture2d)(float,float,float,float) r4.xy, r4.xyxx, t2.xyzw, s0
mad r4.xy, r4.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r0.w, r4.xyxx, r4.xyxx
min r0.w, r0.w, l(1.000000)
add r0.w, -r0.w, l(1.000000)
sqrt r0.w, r0.w
mul r4.yzw, r2.xxyz, r4.yyyy
mad r4.xyz, r4.xxxx, r0.xyzx, r4.yzwy
mad r4.xyz, r0.wwww, r1.xyzx, r4.xyzx
dp3 r0.w, r4.xyzx, r4.xyzx
rsq r0.w, r0.w
mul r4.xyz, r0.wwww, r4.xyzx
mad r5.xy, v4.xyxx, cb1[5].xyxx, cb1[5].zwzz
sample_indexable(texture2d)(float,float,float,float) r5.xyz, r5.xyxx, t1.xyzw, s0
mad r6.xy, v4.xyxx, cb1[0].xyxx, cb1[0].zwzz
sample_indexable(texture2d)(float,float,float,float) r0.w, r6.xyxx, t4.yzwx, s0
round_ne r1.w, v1.w
ftou r1.w, r1.w
dp4 r6.x, v3.xyzw, cb8[8].xyzw
dp4 r6.y, v3.xyzw, cb8[9].xyzw
dp4 r6.z, v3.xyzw, cb8[10].xyzw
dp4 r2.w, v3.xyzw, cb8[11].xyzw
div r7.xyz, r6.xyzx, r2.wwww
add r8.x, -r7.x, cb8[20].w
add r8.y, -r7.y, cb8[21].w
add r8.z, -r7.z, cb8[22].w
dp3 r2.w, r8.xyzx, r8.xyzx
rsq r2.w, r2.w
mul r7.xyz, r2.wwww, r8.xyzx
mul r9.xy, v0.xyxx, cb8[1].zwzz
mul r9.zw, v0.xxxy, l(0.000000, 0.000000, 0.250000, 0.250000)
sample_indexable(texture2d)(float,float,float,float) r5.w, r9.zwzz, t38.xyzw, s8
mul r7.w, cb9[3].y, cb9[3].y
mul r10.xyz, r5.xyzx, r7.wwww
mul r11.xyz, cb9[4].xyzx, cb9[4].xyzx
mul r12.xyz, r10.xyzx, r11.xyzx
mul r7.w, r0.w, cb9[3].z
mul r8.w, r7.w, l(13.000000)
exp r8.w, r8.w
lod r9.z, v4.xyxx, t0.y, s0
mad r13.xyz, cb9[5].xyzx, l(0.003922, 0.003922, 0.003922, 0.000000), r3.xyzx
dp3 r9.w, l(0.299000, 0.587000, 0.114000, 0.000000), r13.xyzx
dp3 r14.y, l(0.500000, -0.419000, -0.081000, 0.000000), r13.xyzx
dp3 r14.z, l(-0.169000, -0.332000, 0.500000, 0.000000), r13.xyzx
mad r14.x, cb9[3].w, l(0.003922), r9.w
dp2 r13.x, l(1.000000, 1.402000, 0.000000, 0.000000), r14.xyxx
dp3 r13.y, l(1.000000, -0.714000, -0.344000, 0.000000), r14.xyzx
dp2 r13.z, l(1.000000, 1.772000, 0.000000, 0.000000), r14.xzxx
sample_indexable(texture2d)(float,float,float,float) r9.w, r9.xyxx, t33.yzwx, s8
dp3 r10.w, r4.xyzx, r7.xyzx
add r11.w, r9.w, r10.w
mad r11.w, r11.w, r11.w, l(-1.000000)
add_sat r11.w, r9.w, r11.w
mov_sat r12.w, r10.w
add r12.w, -r12.w, l(1.000000)
add r13.w, r10.w, r10.w
mad r14.xyz, r13.wwww, r4.xyzx, -r7.xyzx
mul r13.w, r12.w, r12.w
mul r13.w, r13.w, r13.w
mul r12.w, r12.w, r13.w
mul r12.w, r11.w, r12.w
mad r13.w, -r7.w, l(6.500000), l(6.500000)
min r13.w, r13.w, l(6.000000)
mad r10.xyz, -r10.xyzx, r11.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mul r11.xyz, r12.wwww, r10.xyzx
mul r7.w, r7.w, r7.w
mad r11.xyz, r11.xyzx, r7.wwww, r12.xyzx
imul null, r1.w, r1.w, l(17)
eq r15.xyzw, l(48.000000, 69.000000, 2.000000, 10.000000), cb9[1].xxxx
movc r11.xyz, r15.xxxx, l(1.000000,1.000000,1.000000,0), r11.xyzx
movc r7.w, r15.x, l(1.000000), cb4[r1.w + 14].w
movc r12.w, r15.x, l(1.000000), cb4[r1.w + 15].w
lt r16.xy, l(0.000000, 0.000000, 0.000000, 0.000000), cb7[26].xyxx
mov r6.w, l(1.000000)
dp4 r17.x, r6.xyzw, cb7[14].xyzw
dp4 r17.y, r6.xyzw, cb7[15].xyzw
dp4 r17.z, r6.xyzw, cb7[16].xyzw
dp3 r18.x, r14.xyzx, cb7[14].xyzx
dp3 r18.y, r14.xyzx, cb7[15].xyzx
dp3 r18.z, r14.xyzx, cb7[16].xyzx
lt r19.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r18.xyzx
not r20.xyz, r19.xyzx
and r19.xyz, r16.xxxx, r19.xyzx
add r21.xyz, -r17.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
div r21.xyz, r21.xyzx, r18.xyzx
movc r19.xyz, r19.xyzx, |r21.xyzx|, l(5000.000000,5000.000000,5000.000000,0)
and r20.xyz, r16.xxxx, r20.xyzx
lt r21.xyz, r18.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
and r20.xyz, r20.xyzx, r21.xyzx
add r21.xyz, r17.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
div r21.xyz, r21.xyzx, r18.xyzx
movc r19.xyz, r20.xyzx, |r21.xyzx|, r19.xyzx
min r14.w, r19.y, r19.x
min r14.w, r19.z, r14.w
mad r17.xyz, r18.xyzx, r14.wwww, r17.xyzx
mad r16.z, -r14.w, l(0.000100), l(-1.000000)
lt r18.xyz, r17.xyzx, r16.zzzz
mad r14.w, r14.w, l(0.000100), l(1.000000)
lt r19.xyz, r14.wwww, r17.xyzx
or r14.w, r18.x, r19.x
or r14.w, r18.y, r14.w
or r14.w, r19.y, r14.w
or r14.w, r18.z, r14.w
or r14.w, r19.z, r14.w
mov r17.w, l(1.000000)
dp4 r18.x, r17.xyzw, cb7[10].xyzw
dp4 r18.y, r17.xyzw, cb7[11].xyzw
dp4 r18.z, r17.xyzw, cb7[12].xyzw
add r17.xyz, r18.xyzx, -cb7[8].xyzx
sample_l_indexable(texturecube)(float,float,float,float) r17.xyz, r17.xyzx, t30.xyzw, s8, r13.w
mul r17.xyz, r7.wwww, r17.xyzx
movc r17.xyz, r14.wwww, l(0,0,0,0), r17.xyzx
sample_l_indexable(texturecube)(float,float,float,float) r18.xyz, r14.xyzx, t30.xyzw, s8, r13.w
mul r18.xyz, r7.wwww, r18.xyzx
movc r16.xzw, r16.xxxx, r17.xxyz, r18.xxyz
dp4 r17.x, r6.xyzw, cb7[22].xyzw
dp4 r17.y, r6.xyzw, cb7[23].xyzw
dp4 r17.z, r6.xyzw, cb7[24].xyzw
dp3 r6.x, r14.xyzx, cb7[22].xyzx
dp3 r6.y, r14.xyzx, cb7[23].xyzx
dp3 r6.z, r14.xyzx, cb7[24].xyzx
lt r18.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r6.xyzx
not r19.xyz, r18.xyzx
and r18.xyz, r16.yyyy, r18.xyzx
add r20.xyz, -r17.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
div r20.xyz, r20.xyzx, r6.xyzx
movc r18.xyz, r18.xyzx, |r20.xyzx|, l(5000.000000,5000.000000,5000.000000,0)
and r19.xyz, r16.yyyy, r19.xyzx
lt r20.xyz, r6.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
and r19.xyz, r19.xyzx, r20.xyzx
add r20.xyz, r17.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
div r20.xyz, r20.xyzx, r6.xyzx
movc r18.xyz, r19.xyzx, |r20.xyzx|, r18.xyzx
min r6.w, r18.y, r18.x
min r6.w, r18.z, r6.w
mad r17.xyz, r6.xyzx, r6.wwww, r17.xyzx
mad r6.x, -r6.w, l(0.000100), l(-1.000000)
lt r6.xyz, r17.xyzx, r6.xxxx
mad r6.w, r6.w, l(0.000100), l(1.000000)
lt r18.xyz, r6.wwww, r17.xyzx
or r6.x, r6.x, r18.x
or r6.x, r6.y, r6.x
or r6.x, r18.y, r6.x
or r6.x, r6.z, r6.x
or r6.x, r18.z, r6.x
mov r17.w, l(1.000000)
dp4 r18.x, r17.xyzw, cb7[18].xyzw
dp4 r18.y, r17.xyzw, cb7[19].xyzw
dp4 r18.z, r17.xyzw, cb7[20].xyzw
add r6.yzw, r18.xxyz, -cb7[9].xxyz
sample_l_indexable(texturecube)(float,float,float,float) r6.yzw, r6.yzwy, t31.wxyz, s8, r13.w
mul r6.yzw, r12.wwww, r6.yyzw
movc r6.xyz, r6.xxxx, l(0,0,0,0), r6.yzwy
sample_l_indexable(texturecube)(float,float,float,float) r17.xyz, r14.xyzx, t31.xyzw, s8, r13.w
mul r17.xyz, r12.wwww, r17.xyzx
movc r6.xyz, r16.yyyy, r6.xyzx, r17.xyzx
add r6.xyz, -r16.xzwx, r6.xyzx
mad r6.xyz, cb4[r1.w + 13].wwww, r6.xyzx, r16.xzwx
mul r6.xyz, r11.xyzx, r6.xyzx
mul r6.xyz, r9.wwww, r6.xyzx
dp3 r6.w, r14.xyzx, r1.xyzx
add_sat r6.w, r6.w, l(1.000000)
mul r6.w, r6.w, r6.w
mul r6.xyz, r6.wwww, r6.xyzx
mov r4.w, l(1.000000)
dp4 r14.x, r4.xyzw, cb4[r1.w + 8].xyzw
dp4 r14.y, r4.xyzw, cb4[r1.w + 9].xyzw
dp4 r14.z, r4.xyzw, cb4[r1.w + 10].xyzw
max r14.xyz, r14.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mul r14.xyz, r10.xyzx, r14.xyzx
sample_l_indexable(texture2d)(float,float,float,float) r16.xyzw, r9.xyxx, t44.xyzw, s9, r13.w
mul r11.xyz, r9.wwww, r11.xyzx
mul r11.xyz, r11.xyzx, r16.xyzx
add r4.w, -r16.w, l(1.000000)
mad r6.xyz, r6.xyzx, r4.wwww, r11.xyzx
dp4 r16.x, v3.xyzw, cb8[12].xyzw
dp4 r16.y, v3.xyzw, cb8[13].xyzw
dp4 r16.z, v3.xyzw, cb8[14].xyzw
dp4 r16.w, v3.xyzw, cb8[15].xyzw
div r17.xyz, r16.xyzx, r16.wwww
lt r11.xyz, cb8[54].xyzx, r17.zzzz
and r11.xyz, r11.xyzx, l(1, 1, 1, 0)
iadd r4.w, r11.y, r11.x
iadd r4.w, r11.z, r4.w
ishl r4.w, r4.w, l(2)
dp4 r18.x, r16.xyzw, cb8[r4.w + 38].xyzw
dp4 r18.y, r16.xyzw, cb8[r4.w + 39].xyzw
dp4 r18.z, r16.xyzw, cb8[r4.w + 40].xyzw
dp4 r18.w, r16.xyzw, cb8[r4.w + 41].xyzw
mul r16.xy, r18.wwww, cb8[28].zwzz
mov r16.z, l(0)
add r19.xyzw, r16.xyzz, r18.xyzw
div r11.xyz, r19.xyzx, r19.wwww
sample_c_lz_indexable(texture2d)(float,float,float,float) r19.x, r11.xyxx, t32.xxxx, s12, r11.z
mov r16.w, -r16.x
add r20.xyzw, r16.ywzz, r18.xyzw
div r11.xyz, r20.xyzx, r20.wwww
sample_c_lz_indexable(texture2d)(float,float,float,float) r19.y, r11.xyxx, t32.xxxx, s12, r11.z
mad r20.xyzw, r16.xyzz, l(-1.000000, -1.000000, 1.000000, 1.000000), r18.xyzw
div r11.xyz, r20.xyzx, r20.wwww
sample_c_lz_indexable(texture2d)(float,float,float,float) r19.z, r11.xyxx, t32.xxxx, s12, r11.z
mad r16.xyzw, r16.yxzz, l(-1.000000, 1.000000, 1.000000, 1.000000), r18.xyzw
div r11.xyz, r16.xyzx, r16.wwww
sample_c_lz_indexable(texture2d)(float,float,float,float) r19.w, r11.xyxx, t32.xxxx, s12, r11.z
dp4 r4.w, r19.xyzw, l(0.250000, 0.250000, 0.250000, 0.250000)
add r4.w, -r4.w, l(1.000000)
dp3 r6.w, r17.xyzx, r17.xyzx
sqrt r7.w, r6.w
add r7.w, -r7.w, cb8[28].x
mul_sat r7.w, r7.w, cb8[28].y
mul r11.xyz, r7.wwww, cb8[29].xyzx
mad r11.xyz, -r11.xyzx, r4.wwww, l(1.000000, 1.000000, 1.000000, 0.000000)
mul r11.xyz, r11.xyzx, cb4[r1.w + 11].xxxx
mul r16.xyz, r11.xyzx, cb5[4].xyzx
dp3 r18.x, cb5[0].xyzx, r4.xyzx
dp3 r18.y, cb5[1].xyzx, r4.xyzx
mov_sat r18.zw, r18.xxxy
mul r19.xyz, r10.xyzx, r18.zzzz
mul r20.xyz, r10.xyzx, r18.wwww
mul r20.xyz, r20.xyzx, cb5[5].xyzx
mad r16.xyz, r16.xyzx, r19.xyzx, r20.xyzx
ult r19.xy, l(0, 0, 0, 0), cb5[16].xyxx
if_nz cb5[16].x
  dp3 r4.w, cb5[2].xyzx, r4.xyzx
  mad r4.w, r4.w, l(0.500000), l(0.500000)
  mul r4.w, r4.w, r4.w
  min r4.w, r4.w, l(1.000000)
  mul r20.xyz, r10.xyzx, r4.wwww
  mad r16.xyz, cb5[6].xyzx, r20.xyzx, r16.xyzx
endif 
if_nz cb5[16].y
  dp3 r4.w, cb5[3].xyzx, r4.xyzx
  mad r4.w, r4.w, l(0.500000), l(0.500000)
  mul r4.w, r4.w, r4.w
  min r4.w, r4.w, l(1.000000)
  mul r20.xyz, r10.xyzx, r4.wwww
  mad r16.xyz, cb5[7].xyzx, r20.xyzx, r16.xyzx
endif 
mul r20.xyz, r11.xyzx, cb5[8].xyzx
mad r21.xyz, r8.xyzx, r2.wwww, cb5[0].xyzx
dp3 r4.w, r21.xyzx, r21.xyzx
rsq r4.w, r4.w
mul r21.xyz, r4.wwww, r21.xyzx
mad r22.xyz, r8.xyzx, r2.wwww, cb5[1].xyzx
dp3 r4.w, r22.xyzx, r22.xyzx
rsq r4.w, r4.w
mul r22.xyz, r4.wwww, r22.xyzx
dp3_sat r23.x, r21.xyzx, r4.xyzx
dp3_sat r23.y, r22.xyzx, r4.xyzx
mul r4.w, r8.w, cb5[0].w
mad r7.w, r8.w, l(0.010000), cb5[0].w
div r4.w, r4.w, r7.w
max r24.x, r4.w, l(1.000000)
mul r4.w, r8.w, cb5[1].w
mad r7.w, r8.w, l(0.010000), cb5[1].w
div r4.w, r4.w, r7.w
max r24.y, r4.w, l(1.000000)
log r19.zw, r23.xxxy
mul r19.zw, r19.zzzw, r24.xxxy
exp r19.zw, r19.zzzw
dp3_sat r21.x, r7.xyzx, r21.xyzx
dp3_sat r21.y, r7.xyzx, r22.xyzx
add r21.xy, -r21.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
mul r21.zw, r21.xxxy, r21.xxxy
mul r21.zw, r21.zzzw, r21.zzzw
mul r21.xy, r21.zwzz, r21.xyxx
mad r21.xzw, r21.xxxx, r10.xxyz, r12.xxyz
mad r22.xyz, r21.yyyy, r10.xyzx, r12.xyzx
max r18.xy, r10.wwww, r18.xyxx
max r18.xy, r18.xyxx, l(0.000100, 0.000100, 0.000000, 0.000000)
div r18.xy, r18.zwzz, r18.xyxx
mul r21.xyz, r19.zzzz, r21.xzwx
mul r18.xzw, r18.xxxx, r21.xxyz
mul r21.xyz, r19.wwww, r22.xyzx
mul r21.xyz, r18.yyyy, r21.xyzx
mad r19.zw, r24.xxxy, l(0.000000, 0.000000, 0.125000, 0.125000), l(0.000000, 0.000000, 0.250000, 0.250000)
mul r20.xyz, r20.xyzx, r19.zzzz
mul r22.xyz, r19.wwww, cb5[9].xyzx
mul r21.xyz, r21.xyzx, r22.xyzx
mad r18.xyz, r20.xyzx, r18.xzwx, r21.xyzx
dp3 r4.w, r4.xyzx, cb5[2].xyzx
mad r20.xyz, r8.xyzx, r2.wwww, cb5[2].xyzx
dp3 r7.w, r20.xyzx, r20.xyzx
rsq r7.w, r7.w
mul r20.xyz, r7.wwww, r20.xyzx
dp3_sat r7.w, r20.xyzx, r4.xyzx
mul r12.w, r8.w, cb5[2].w
mad r13.w, r8.w, l(0.010000), cb5[2].w
div r12.w, r12.w, r13.w
max r12.w, r12.w, l(1.000000)
log r7.w, r7.w
mul r7.w, r7.w, r12.w
exp r7.w, r7.w
dp3_sat r13.w, r7.xyzx, r20.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 r20.xyz, r13.wwww, r10.xyzx, r12.xyzx
mov_sat r13.w, r4.w
max r4.w, r10.w, r4.w
max r4.w, r4.w, l(0.000100)
div r4.w, r13.w, r4.w
mul r20.xyz, r7.wwww, r20.xyzx
mul r20.xyz, r4.wwww, r20.xyzx
mad r4.w, r12.w, l(0.125000), l(0.250000)
mul r21.xyz, r4.wwww, cb5[10].xyzx
mad r20.xyz, r21.xyzx, r20.xyzx, r18.xyzx
movc r18.xyz, r19.xxxx, r20.xyzx, r18.xyzx
dp3 r4.w, r4.xyzx, cb5[3].xyzx
mad r19.xzw, r8.xxyz, r2.wwww, cb5[3].xxyz
dp3 r2.w, r19.xzwx, r19.xzwx
rsq r2.w, r2.w
mul r19.xzw, r2.wwww, r19.xxzw
dp3_sat r2.w, r19.xzwx, r4.xyzx
mul r7.w, r8.w, cb5[3].w
mad r12.w, r8.w, l(0.010000), cb5[3].w
div r7.w, r7.w, r12.w
max r7.w, r7.w, l(1.000000)
log r2.w, r2.w
mul r2.w, r2.w, r7.w
exp r2.w, r2.w
dp3_sat r7.x, r7.xyzx, r19.xzwx
add r7.x, -r7.x, l(1.000000)
mul r7.y, r7.x, r7.x
mul r7.y, r7.y, r7.y
mul r7.x, r7.y, r7.x
mad r7.xyz, r7.xxxx, r10.xyzx, r12.xyzx
mov_sat r10.x, r4.w
max r4.w, r10.w, r4.w
max r4.w, r4.w, l(0.000100)
div r4.w, r10.x, r4.w
mul r7.xyz, r2.wwww, r7.xyzx
mul r7.xyz, r4.wwww, r7.xyzx
mad r2.w, r7.w, l(0.125000), l(0.250000)
mul r10.xyz, r2.wwww, cb5[11].xyzx
mad r7.xyz, r10.xyzx, r7.xyzx, r18.xyzx
movc r7.xyz, r19.yyyy, r7.xyzx, r18.xyzx
if_z cb4[r1.w + 6].y
  dp3 r10.x, r4.xyzx, cb8[5].xyzx
  dp3 r10.y, r4.xyzx, cb8[6].xyzx
  dp3 r10.z, r4.xyzx, cb8[7].xyzx
  mul r9.xy, r9.xyxx, cb8[1].xyxx
  ftou r9.xy, r9.xyxx
  udiv r9.xy, null, r9.xyxx, cb8[56].xxxx
  utof r9.xy, r9.xyxx
  utof r2.w, cb8[56].y
  mad r2.w, r9.y, r2.w, r9.x
  ftou r2.w, r2.w
  add r4.w, r17.z, -cb8[55].x
  log r4.w, r4.w
  add r4.w, r4.w, -cb8[55].z
  div r4.w, r4.w, cb8[55].y
  max r4.w, r4.w, l(0.000000)
  min r4.w, r4.w, l(14.000000)
  ftou r4.w, r4.w
  ishl r4.w, l(1), r4.w
  ld_structured_indexable(structured_buffer, stride=12)(mixed,mixed,mixed,mixed) r18.xyz, r2.w, l(0), t60.xyzx
  dp3 r2.w, -r17.xyzx, -r17.xyzx
  rsq r2.w, r2.w
  mul r19.xyz, r2.wwww, -r17.xyzx
  mov r20.xyz, l(0,0,0,0)
  mov r21.xyz, l(0,0,0,0)
  mov r2.w, r18.x
  mov r7.w, l(0)
  loop 
    uge r9.x, r7.w, r18.y
    breakc_nz r9.x
    ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r9.xy, r2.w, l(0), t59.xyxx
    iadd r10.w, r2.w, l(1)
    and r9.y, r4.w, r9.y
    iadd r12.w, r7.w, l(1)
    movc r7.w, r9.y, r7.w, r12.w
    mov r2.w, r10.w
    continuec_z r9.y
    ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r22.xyzw, r9.x, l(0), t61.xyzw
    ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r23.xyzw, r9.x, l(16), t61.xyzw
    ld_structured_indexable(structured_buffer, stride=64)(mixed,mixed,mixed,mixed) r24.xyz, r9.x, l(32), t61.xyzx
    add r22.xyz, -r17.xyzx, r22.xyzx
    dp3 r9.x, r22.xyzx, r22.xyzx
    rsq r9.y, r9.x
    mul r25.xyz, r9.yyyy, r22.xyzx
    dp3_sat r13.w, r10.xyzx, r25.xyzx
    mul_sat r9.x, r22.w, r9.x
    sqrt r9.x, r9.x
    add r9.x, -r9.x, l(1.000000)
    mul r9.x, r9.x, r9.x
    mad r22.xyz, r22.xyzx, r9.yyyy, r19.xyzx
    dp3 r9.y, r22.xyzx, r22.xyzx
    rsq r9.y, r9.y
    mul r22.xyz, r9.yyyy, r22.xyzx
    mul r9.y, r8.w, r23.w
    mad r14.w, r8.w, l(0.010000), r23.w
    div r9.y, r9.y, r14.w
    max r9.y, r9.y, l(1.000000)
    dp3_sat r14.w, r22.xyzx, r10.xyzx
    log r14.w, r14.w
    mul r14.w, r9.y, r14.w
    exp r14.w, r14.w
    mul r22.xyz, r13.wwww, r23.xyzx
    mul r23.xyz, r14.wwww, r24.xyzx
    log r13.w, r13.w
    mul r13.w, r13.w, l(0.100000)
    exp r13.w, r13.w
    mul r23.xyz, r13.wwww, r23.xyzx
    mul r23.xyz, r9.xxxx, r23.xyzx
    mad r9.y, r9.y, l(0.125000), l(0.250000)
    mad r20.xyz, r22.xyzx, r9.xxxx, r20.xyzx
    mad r21.xyz, r23.xyzx, r9.yyyy, r21.xyzx
    mov r7.w, r12.w
    mov r2.w, r10.w
  endloop 
  rsq r6.w, r6.w
  mul r18.xyw, r6.wwww, r17.xyxz
  dp3 r6.w, r18.xywx, r10.xyzx
  add r6.w, r6.w, r6.w
  mad r18.xyw, r10.xyxz, -r6.wwww, r18.xyxw
  ushr r6.w, r18.z, l(16)
  mov r17.w, l(1.000000)
  mov r22.zw, l(0,0,1.000000,1.000000)
  mov r23.xyz, r20.xyzx
  mov r24.xyz, r21.xyzx
  mov r7.w, r2.w
  mov r9.x, l(0)
  loop 
    uge r9.y, r9.x, r6.w
    breakc_nz r9.y
    ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r25.xy, r7.w, l(0), t59.xyxx
    iadd r9.y, r7.w, l(1)
    and r10.w, r4.w, r25.y
    iadd r12.w, r9.x, l(1)
    movc r9.x, r10.w, r9.x, r12.w
    mov r7.w, r9.y
    continuec_z r10.w
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyzw, r25.x, l(0), t62.xyzw
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.xyzw, r25.x, l(16), t62.xyzw
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r25.yzw, r25.x, l(32), t62.xxyz
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r28.xyzw, r25.x, l(60), t62.xyzw
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r29.xyzw, r25.x, l(76), t62.yzwx
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r30.xyzw, r25.x, l(92), t62.yzwx
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r31.xyzw, r25.x, l(108), t62.xyzw
    ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r32.w, r25.x, l(124), t62.xxxx
    mov r33.xyz, r28.yzwy
    mov r33.w, r29.w
    dp4 r33.x, r17.xyzw, r33.xyzw
    mov r29.w, r30.w
    dp4 r33.y, r17.xyzw, r29.xyzw
    mov r30.w, r31.x
    dp4 r10.w, r17.xyzw, r30.xyzw
    mov r32.xyz, r31.yzwy
    dp4 r13.w, r17.xyzw, r32.xyzw
    lt r10.w, l(0.000000), r10.w
    add r26.xyz, -r17.xyzx, r26.xyzx
    dp3 r14.w, r26.xyzx, r26.xyzx
    rsq r16.w, r14.w
    mul r28.yzw, r16.wwww, r26.xxyz
    lt r18.z, l(0.000000), r28.x
    mul r19.w, r26.w, r26.w
    div r19.w, l(1.000000, 1.000000, 1.000000, 1.000000), r19.w
    div r29.x, l(1.000000, 1.000000, 1.000000, 1.000000), r14.w
    add r20.w, -r19.w, r29.x
    max r29.w, r20.w, l(0.000000)
    dp3_sat r20.w, r28.yzwy, r10.xyzx
    div r30.xy, r33.xyxx, r13.wwww
    dp2 r21.w, r30.xyxx, r30.xyxx
    add r21.w, -r21.w, l(1.000000)
    max r29.y, r21.w, l(0.000000)
    mul r14.w, r14.w, r19.w
    min r14.w, r14.w, l(1.000000)
    add r29.z, -r14.w, l(1.000000)
    div r13.w, r13.w, r26.w
    add_sat r13.w, -r13.w, l(1.000000)
    mul r22.y, r29.y, r29.y
    mul r22.x, r13.w, r13.w
    movc r29.xyzw, r18.zzzz, r29.xyzw, r22.xyzw
    mad r26.xyz, r26.xyzx, r16.wwww, r19.xyzx
    dp3 r13.w, r26.xyzx, r26.xyzx
    rsq r13.w, r13.w
    mul r26.xyz, r13.wwww, r26.xyzx
    mul r13.w, r8.w, r27.w
    mad r14.w, r8.w, l(0.010000), r27.w
    div r13.w, r13.w, r14.w
    max r13.w, r13.w, l(1.000000)
    dp3_sat r14.w, r26.xyzx, r10.xyzx
    log r14.w, r14.w
    mul r14.w, r13.w, r14.w
    exp r14.w, r14.w
    mul r26.xyz, r29.wzxw, r29.yyyy
    mul r27.xyz, r20.wwww, r27.xyzx
    mul r29.xyz, r26.xxxx, r27.xyzx
    mul r30.xyz, r14.wwww, r25.yzwy
    log r14.w, r20.w
    mul r14.w, r14.w, l(0.100000)
    exp r14.w, r14.w
    mul r30.xyz, r14.wwww, r30.xyzx
    mul r26.xyw, r26.yyyy, r30.xyxz
    mul r14.w, r13.w, l(0.250000)
    mad r13.w, r13.w, l(0.125000), l(0.250000)
    mul r26.xyw, r13.wwww, r26.xyxw
    dp3_sat r16.w, r28.yzwy, r18.xywx
    log r16.w, r16.w
    mul r14.w, r14.w, r16.w
    exp r14.w, r14.w
    mul r13.w, r13.w, r14.w
    mul r27.xyz, r26.zzzz, r27.xyzx
    mul r25.xyz, r13.wwww, r25.yzwy
    mul r25.xyz, r26.zzzz, r25.xyzx
    movc r27.xyz, r18.zzzz, r29.xyzx, r27.xyzx
    movc r25.xyz, r18.zzzz, r26.xywx, r25.xyzx
    and r26.xyz, r10.wwww, r27.xyzx
    and r25.xyz, r10.wwww, r25.xyzx
    add r23.xyz, r23.xyzx, r26.xyzx
    add r24.xyz, r24.xyzx, r25.xyzx
    mov r9.x, r12.w
    mov r7.w, r9.y
  endloop 
  mad r10.xyz, -r12.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
  mul r10.xyz, r10.xyzx, r23.xyzx
  mul r12.xyz, r12.xyzx, r24.xyzx
  mul r17.xyz, r9.wwww, r10.xyzx
  mul r18.xyz, r9.wwww, r12.xyzx
  mad r16.xyz, r10.xyzx, r9.wwww, r16.xyzx
  mad r7.xyz, r12.xyzx, r9.wwww, r7.xyzx
else 
  mov r17.xyz, l(0,0,0,0)
  mov r18.xyz, l(0,0,0,0)
endif 
add r7.xyz, r6.xyzx, r7.xyzx
mad r10.xyz, r14.xyzx, r9.wwww, r16.xyzx
mad r7.xyz, r13.xyzx, r10.xyzx, r7.xyzx
mov r7.w, l(1.000000)
mul r7.xyzw, r7.xyzw, cb4[r1.w + 7].xyzw
add r2.w, -r8.y, cb6[3].w
add r2.w, r2.w, -cb6[3].y
mul_sat r2.w, r2.w, cb6[3].z
dp2 r4.w, -r8.xzxx, -r8.xzxx
sqrt r4.w, r4.w
add r4.w, r4.w, -cb6[2].y
mul r4.w, r4.w, cb6[2].z
exp r4.w, -r4.w
mad_sat r4.w, -r4.w, cb6[2].x, cb6[2].x
mul_sat r2.w, r2.w, cb6[3].x
dp3 r6.w, r7.xyzx, l(0.298910, 0.586610, 0.114480, 0.000000)
add r6.w, r6.w, l(-1.000000)
mad r8.x, cb6[1].w, r6.w, l(1.000000)
mad r6.w, cb6[4].w, r6.w, l(1.000000)
mad r8.xyz, cb6[1].xyzx, r8.xxxx, -r7.xyzx
mad r7.xyz, r4.wwww, r8.xyzx, r7.xyzx
mad r8.xyz, cb6[4].xyzx, r6.wwww, -r7.xyzx
mad r7.xyz, r2.wwww, r8.xyzx, r7.xyzx
add r2.w, r5.w, l(-0.500000)
lt r4.w, l(0.000000), cb7[2].x
ine r5.w, l(0), cb2[0].x
and r4.w, r4.w, r5.w
mad r5.w, r2.w, l(0.999000), cb4[r1.w + 16].x
lt r5.w, r5.w, l(0.500000)
and r4.w, r4.w, r5.w
lt r5.w, l(0.000000), cb3[5].x
eq r1.w, l(0.000000), cb4[r1.w + 7].w
and r5.w, r1.w, r5.w
mad r2.w, r2.w, cb3[5].y, r3.w
lt r2.w, r2.w, cb3[5].x
or r2.w, r2.w, r5.w
or r2.w, r4.w, r2.w
movc r1.w, r15.y, r1.w, r2.w
discard_nz r1.w
movc r8.w, r1.w, l(0), r7.w
mad r4.xyz, r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
movc r4.xyz, r15.zzzz, r4.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, r15.wwww, r1.xyzx, r4.xyzx
eq r4.xyzw, l(20.000000, 21.000000, 11.000000, 12.000000), cb9[1].xxxx
movc r1.xyz, r4.xxxx, r17.xyzx, r1.xyzx
movc r1.xyz, r4.yyyy, r18.xyzx, r1.xyzx
or r1.w, r4.w, r4.z
movc r1.xyz, r1.wwww, l(1.000000,1.000000,1.000000,0), r1.xyzx
eq r4.xyzw, l(3.000000, 4.000000, 5.000000, 8.000000), cb9[1].xxxx
movc r1.xyz, r4.xxxx, r0.wwww, r1.xyzx
sqrt r5.xyz, r5.xyzx
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, r4.yyyy, r5.yzwy, r1.xyzx
ge r0.w, r5.x, l(0.000000)
ge r1.w, l(1.000000), r5.x
and r0.w, r0.w, r1.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 r12.xyzw, r5.xxxx, l(4.000000, 4.000000, 4.000000, 4.000000), l(-2.000000, -2.000000, -3.000000, -3.000000)
mad r13.xyz, r12.xyyx, l(1.000000, 0.000000, 0.000000, 0.000000), l(0.000000, 1.000000, 0.000000, 0.000000)
mad r12.xyz, r12.zwzz, l(0.000000, -1.000000, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
movc r12.xyz, r10.zzzz, r13.xyzx, r12.xyzx
movc r5.xyz, r10.yyyy, r5.yzwy, r12.xyzx
movc r5.xyz, r10.xxxx, r7.xyzx, r5.xyzx
and r5.xyz, r0.wwww, r5.xyzx
movc r1.xyz, r4.zzzz, r5.xyzx, r1.xyzx
eq r5.xyzw, l(9.000000, 1.000000, 49.000000, 34.000000), cb9[1].xxxx
or r0.w, r4.w, r5.x
movc r1.xyz, r0.wwww, l(0,0,0,0), r1.xyzx
sqrt r3.xyz, r3.xyzx
movc r1.xyz, r5.yyyy, r3.xyzx, r1.xyzx
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, r5.zzzz, r3.xyzx, r1.xyzx
movc r1.xyz, r5.wwww, r11.wwww, r1.xyzx
eq r3.xyzw, l(30.000000, 32.000000, 33.000000, 31.000000), cb9[1].xxxx
or r3.xy, r3.ywyy, r3.xzxx
movc r1.xyz, r3.xxxx, r9.wwww, r1.xyzx
movc r1.xyz, r3.yyyy, l(1.000000,1.000000,1.000000,0), r1.xyzx
eq r3.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, r3.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, r3.yyyy, r0.xyzx, r1.xyzx
add r0.w, -cb9[1].y, cb9[1].z
div r1.x, -cb9[1].y, r0.w
movc r0.xyz, r3.zzzz, r1.xxxx, r0.xyzx
eq r1.xyzw, l(56.000000, 16.000000, 40.000000, 41.000000), cb9[1].xxxx
or r1.x, r1.x, r3.w
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.yyyy, r0.wwww, r0.xyzx
movc r0.xyz, r1.zzzz, r11.xyzx, r0.xyzx
movc r0.xyz, r1.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, r15.xxxx, r6.xyzx, r0.xyzx
movc r0.xyz, r1.yyyy, l(0,0,1.000000,0), r0.xyzx
or r0.w, r1.w, r1.z
eq r1.xyzw, l(58.000000, 59.000000, 60.000000, 61.000000), cb9[1].xxxx
or r0.w, r0.w, r1.x
or r0.w, r1.y, r0.w
or r0.w, r1.z, r0.w
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, r9.z, 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 r8.xyz, r1.yyyy, r2.xyzx, r0.xyzx
mov r2.w, l(1.000000)
movc r0.xyzw, r15.yyyy, r2.xyzw, r8.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 693 instruction slots used

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