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

cbuffer buffer2 : 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);
  float4 FC_WaterNormalUvScrollSpeed : packoffset(c15);
  float4 FC_WaterDiffuseUvScrollSpeed : packoffset(c16);
  float4 FC_WaterMiddleUvScrollSpeed : packoffset(c17);
  float4 FC_WaterFogParam0 : packoffset(c18);
  float4 FC_WaterFogParam1 : packoffset(c19);
  float4 FC_WaterFresnel : packoffset(c20);
  float4 FC_WaterFadeParam : packoffset(c21);
  float4 FC_SAT_DUMMMY_P3_2 : packoffset(c22);
  float4 FC_SAT_DUMMMY_P3_3 : packoffset(c23);
  float4 FC_SAT_DUMMMY_P3_4 : packoffset(c24);
  float4 FC_SAT_DUMMMY_P3_5 : packoffset(c25);
  float4 FC_SAT_DUMMMY_P3_6 : packoffset(c26);
  float4 FC_SAT_DUMMMY_P3_7 : packoffset(c27);
  float4 FC_SAT_DUMMMY_P3_8 : packoffset(c28);
  float MultiBlend4_et1_p_snp_0_float_0_0 : packoffset(c29);
  float MultiBlend4_et1_p_snp_0_float_1_0 : packoffset(c29.y);
  float MultiBlend4_et1_p_snp_0_float_2_0 : packoffset(c29.z);
  float MultiBlend4_et1_p_snp_0_float_3_0 : packoffset(c29.w);
}

cbuffer buffer3 : 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);
  float3 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_SSS_ID : packoffset(c14);
  float4 FC_SAT_DUMMMY_P7_2 : packoffset(c15);
  float4 FC_SAT_DUMMMY_P7_3 : packoffset(c16);
  float4 FC_SAT_DUMMMY_P7_4 : packoffset(c17);
  float4 FC_SAT_DUMMMY_P7_5 : packoffset(c18);
  float4 FC_SAT_DUMMMY_P7_6 : packoffset(c19);
  float4 FC_SAT_DUMMMY_P7_6_1 : packoffset(c20);
  float4 FC_SAT_DUMMMY_P7_6_2 : packoffset(c21);
  float4 FC_SAT_DUMMMY_P7_6_3 : packoffset(c22);
  float4 FC_SAT_DUMMMY_P7_7 : 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);
  float4x3 FC_MatrixView : packoffset(c2);
  float4x4 FC_MatrixInvViewProj : packoffset(c5);
  float4x4 FC_MatrixInvProj : packoffset(c9);
  float4x4 FC_MatrixProj : packoffset(c13);
  float4 FC_DepthComputeParam : packoffset(c17);
  float4 FC_ShadowMapParam : packoffset(c18);
  float4 FC_ShadowColor : packoffset(c19);
  float4 FC_ShadowDir : packoffset(c20);
  float4x4 VC_ShadowMapMatrix : packoffset(c21);
  float FC_ShadowDepthRate : packoffset(c25);
  float FC_ShadowDepthScale : packoffset(c25.y);
  float FC_ShadowKernelScale : packoffset(c25.z);
  float FC_ShadowRandTexInvScale : packoffset(c25.w);
  float FC_ShadowTexInvScaleX : packoffset(c26);
  float FC_ShadowTexInvScaleY : packoffset(c26.y);
  float FC_ShadowDepthOffsetScale : packoffset(c26.z);
  float4 FC_ShadowViewKernelScale : packoffset(c27);
  float4x4 FC_ProjSpaceToShadowMatrix[4] : packoffset(c28);
  float4 FC_CascadeSelectDist : packoffset(c44);
  float4x4 FC_MatrixInvView : packoffset(c45);
  float4 VC_ClipPlane : packoffset(c49);
  float4x4 VC_MatrixViewProj : packoffset(c50);
}

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);
  float4 FC_SnowDir : packoffset(c4);
  float4 FC_SnowTilingScale : packoffset(c5);
  float4 FC_SnowAlbedo : packoffset(c6);
  float FC_SnowReflectance : packoffset(c7);
  float FC_GroundPlaneHeight : packoffset(c7.y);
  float FC_RcpSnowHeightRange : packoffset(c7.z);
  float FC_SnowNormalScale : packoffset(c7.w);
  float4 FC_SnowSpakleTinlingScale : packoffset(c8);
  float FC_GlobalTime : packoffset(c9);
  float FC_DominantSharpnesMinValue : packoffset(c10);
  float FC_DominantSharpnesOffset : packoffset(c10.y);
  float FC_DominantSharpnesExponent : packoffset(c10.z);
  float FC_DominantColorScale : packoffset(c10.w);
}

cbuffer cbInstanceData : register(b4)
{

  struct
  {
    float4x3 mWorld;
    float4 atlasUvScaleOffset;
    float4 userClipPlane;
    uint4 matricesData;
    uint4 envData;
    float4 mulCol;
    float envMapInterpRatio;
    float envMapColorScale0;
    float envMapColorScale1;
    float giOcclusionMask;
    float4 aSh[3];
  } VC_InstanceData[2] : packoffset(c0);

}

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_ParallaxCorrectedCubemapOrigin : packoffset(c8);
  float4 FC_ParallaxCorrectedCubemapAabbMin : packoffset(c9);
  float4 FC_ParallaxCorrectedCubemapAabbMax : packoffset(c10);
}

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

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> MultiBlend4_et1_p_snp_0_Texture2D_16 : register(t1);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_15 : register(t2);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_14 : register(t3);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_13 : register(t4);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_4 : register(t5);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_3 : register(t6);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_1 : register(t7);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_2 : register(t8);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_0 : register(t9);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_6 : register(t10);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_5 : register(t11);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_9 : register(t12);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_10 : register(t13);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_11 : register(t14);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_12 : register(t15);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_8 : register(t16);
Texture2D<float4> MultiBlend4_et1_p_snp_0_Texture2D_7 : register(t17);
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);


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


void main( 
  float4 v0 : SV_Position0,
  float4 v1 : COLOR0,
  float3 v2 : NORMAL0,
  float3 v3 : TANGENT0,
  float3 v4 : BINORMAL0,
  float4 v5 : POSITION1,
  float4 v6 : POSITION2,
  float4 v7 : TEXCOORD29,
  float4 v8 : TEXCOORD0,
  float3 v9 : TEXCOORD17,
  uint v10 : SV_IsFrontFace0,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 x0[16];
  r0.x = dot(v7.xyz, v4.xyz);
  r0.y = dot(v7.xyz, v3.xyz);
  r0.z = dot(v7.xyz, v2.xyz);
  r1.xy = v8.xy * FC_TextureTilingScale[14].xy + FC_TextureTilingScale[14].zw;
  r0.w = dot(-r0.xy, -r0.xy);
  r0.w = rsqrt(r0.w);
  r1.zw = -r0.xy * r0.ww;
  r0.x = dot(-r0.xyz, -r0.xyz);
  r0.x = -r0.z * r0.z + r0.x;
  r0.x = sqrt(r0.x);
  r0.x = r0.x / -r0.z;
  r0.xy = r1.zw * r0.xx;
  r0.xy = MultiBlend4_et1_p_snp_0_float_3_0 * r0.xy;
  r0.z = dot(-v7.xyz, -v7.xyz);
  r0.z = rsqrt(r0.z);
  r2.xyz = -v7.xyz * r0.zzz;
  r0.z = dot(v2.xyz, v2.xyz);
  r0.z = rsqrt(r0.z);
  r3.xyz = v2.xyz * r0.zzz;
  r0.zw = ddx_coarse(r1.xy);
  r1.zw = ddy_coarse(r1.xy);
  r4.xy = abs(r1.zw) + abs(r0.zw);
  MultiBlend4_et1_p_snp_0_Texture2D_14.GetDimensions(0, uiDest.x, uiDest.y, uiDest.z);
  r4.zw = uiDest.xy;
  r4.zw = (uint2)r4.zw;
  r4.xy = r4.xy * r4.zw;
  r2.w = max(r4.x, r4.y);
  r2.w = log2(r2.w);
  r2.w = max(0, r2.w);
  r3.w = cmp(4 >= r2.w);
  if (r3.w != 0) {
    r3.w = dot(r2.xyz, r3.xyz);
    r3.w = abs(r3.w) * -12 + 16;
    r4.x = (int)r3.w;
    r3.w = trunc(r3.w);
    r3.w = 1 / r3.w;
    r4.yz = r1.xy;
    r4.w = 0;
    r5.zw = float2(1,1);
    r6.xyzw = float4(0,0,0,0);
    while (true) {
      r7.x = cmp((int)r4.w >= (int)r4.x);
      if (r7.x != 0) break;
      r4.yz = -r3.ww * r0.xy + r4.yz;
      r7.x = MultiBlend4_et1_p_snp_0_Texture2D_14.SampleGrad(SS_DiffuseMap_s, r4.yz, r0.z, r1.z).w;
      r5.x = r5.z + -r3.w;
      r7.y = cmp(r5.x < r7.x);
      r7.z = r7.y ? r4.x : r4.w;
      r5.y = r7.x;
      r6.xyzw = r7.yyyy ? r5.xyzw : r6.xyzw;
      r4.w = (int)r7.z + 1;
      r5.w = r7.x;
      r5.z = r5.x;
    }
    r0.zw = r6.zx + -r6.wy;
    r1.z = r0.z + -r0.w;
    r0.w = r6.z * r0.w;
    r0.z = r6.x * r0.z + -r0.w;
    r0.z = r0.z / r1.z;
    r0.z = 1 + -r0.z;
    r0.zw = -r0.xy * r0.zz + r1.xy;
    r1.z = cmp(3 < r2.w);
    r1.w = trunc(r2.w);
    r1.w = r2.w + -r1.w;
    r4.xy = r1.xy + -r0.zw;
    r4.xy = r1.ww * r4.xy + r0.zw;
    r0.zw = r1.zz ? r4.xy : r0.zw;
  } else {
    r0.zw = r1.xy;
  }
  r1.zw = v8.xy * FC_TextureTilingScale[13].xy + FC_TextureTilingScale[13].zw;
  r4.xy = ddx_coarse(r1.zw);
  r4.zw = ddy_coarse(r1.zw);
  r5.xy = abs(r4.xy) + abs(r4.zw);
  MultiBlend4_et1_p_snp_0_Texture2D_13.GetDimensions(0, uiDest.x, uiDest.y, uiDest.z);
  r5.zw = uiDest.xy;
  r5.zw = (uint2)r5.zw;
  r5.xy = r5.xy * r5.zw;
  r2.w = max(r5.x, r5.y);
  r2.w = log2(r2.w);
  r2.w = max(0, r2.w);
  r3.w = cmp(4 >= r2.w);
  if (r3.w != 0) {
    r3.w = dot(r2.xyz, r3.xyz);
    r3.w = abs(r3.w) * -12 + 16;
    r5.x = (int)r3.w;
    r3.w = trunc(r3.w);
    r3.w = 1 / r3.w;
    r5.yz = r1.zw;
    r5.w = 0;
    r6.zw = float2(1,1);
    r7.xyzw = float4(0,0,0,0);
    while (true) {
      r8.x = cmp((int)r5.w >= (int)r5.x);
      if (r8.x != 0) break;
      r5.yz = -r3.ww * r0.xy + r5.yz;
      r8.x = MultiBlend4_et1_p_snp_0_Texture2D_13.SampleGrad(SS_DiffuseMap_s, r5.yz, r4.x, r4.z).w;
      r6.x = r6.z + -r3.w;
      r8.y = cmp(r6.x < r8.x);
      r8.z = r8.y ? r5.x : r5.w;
      r6.y = r8.x;
      r7.xyzw = r8.yyyy ? r6.xyzw : r7.xyzw;
      r5.w = (int)r8.z + 1;
      r6.w = r8.x;
      r6.z = r6.x;
    }
    r3.w = r7.z + -r7.w;
    r4.x = r7.x + -r7.y;
    r4.y = -r4.x + r3.w;
    r4.x = r7.z * r4.x;
    r3.w = r7.x * r3.w + -r4.x;
    r3.w = r3.w / r4.y;
    r3.w = 1 + -r3.w;
    r4.xy = -r0.xy * r3.ww + r1.zw;
    r3.w = cmp(3 < r2.w);
    r4.z = trunc(r2.w);
    r2.w = -r4.z + r2.w;
    r4.zw = -r4.xy + r1.zw;
    r4.zw = r2.ww * r4.zw + r4.xy;
    r4.xy = r3.ww ? r4.zw : r4.xy;
  } else {
    r4.xy = r1.zw;
  }
  r4.zw = v8.xy * FC_TextureTilingScale[16].xy + FC_TextureTilingScale[16].zw;
  r5.xy = ddx_coarse(r4.zw);
  r5.zw = ddy_coarse(r4.zw);
  r6.xy = abs(r5.xy) + abs(r5.zw);
  MultiBlend4_et1_p_snp_0_Texture2D_16.GetDimensions(0, uiDest.x, uiDest.y, uiDest.z);
  r6.zw = uiDest.xy;
  r6.zw = (uint2)r6.zw;
  r6.xy = r6.xy * r6.zw;
  r2.w = max(r6.x, r6.y);
  r2.w = log2(r2.w);
  r2.w = max(0, r2.w);
  r3.w = cmp(4 >= r2.w);
  if (r3.w != 0) {
    r3.w = dot(r2.xyz, r3.xyz);
    r3.w = abs(r3.w) * -12 + 16;
    r6.x = (int)r3.w;
    r3.w = trunc(r3.w);
    r3.w = 1 / r3.w;
    r6.yz = r4.zw;
    r6.w = 0;
    r7.zw = float2(1,1);
    r8.xyzw = float4(0,0,0,0);
    while (true) {
      r9.x = cmp((int)r6.w >= (int)r6.x);
      if (r9.x != 0) break;
      r6.yz = -r3.ww * r0.xy + r6.yz;
      r9.x = MultiBlend4_et1_p_snp_0_Texture2D_16.SampleGrad(SS_DiffuseMap_s, r6.yz, r5.x, r5.z).w;
      r7.x = r7.z + -r3.w;
      r9.y = cmp(r7.x < r9.x);
      r9.z = r9.y ? r6.x : r6.w;
      r7.y = r9.x;
      r8.xyzw = r9.yyyy ? r7.xyzw : r8.xyzw;
      r6.w = (int)r9.z + 1;
      r7.w = r9.x;
      r7.z = r7.x;
    }
    r3.w = r8.z + -r8.w;
    r5.x = r8.x + -r8.y;
    r5.y = -r5.x + r3.w;
    r5.x = r8.z * r5.x;
    r3.w = r8.x * r3.w + -r5.x;
    r3.w = r3.w / r5.y;
    r3.w = 1 + -r3.w;
    r5.xy = -r0.xy * r3.ww + r4.zw;
    r3.w = cmp(3 < r2.w);
    r5.z = trunc(r2.w);
    r2.w = -r5.z + r2.w;
    r5.zw = -r5.xy + r4.zw;
    r5.zw = r2.ww * r5.zw + r5.xy;
    r5.xy = r3.ww ? r5.zw : r5.xy;
  } else {
    r5.xy = r4.zw;
  }
  r5.zw = v8.xy * FC_TextureTilingScale[15].xy + FC_TextureTilingScale[15].zw;
  r6.xy = ddx_coarse(r5.zw);
  r6.zw = ddy_coarse(r5.zw);
  r7.xy = abs(r6.xy) + abs(r6.zw);
  MultiBlend4_et1_p_snp_0_Texture2D_15.GetDimensions(0, uiDest.x, uiDest.y, uiDest.z);
  r7.zw = uiDest.xy;
  r7.zw = (uint2)r7.zw;
  r7.xy = r7.xy * r7.zw;
  r2.w = max(r7.x, r7.y);
  r2.w = log2(r2.w);
  r2.w = max(0, r2.w);
  r3.w = cmp(4 >= r2.w);
  if (r3.w != 0) {
    r2.x = dot(r2.xyz, r3.xyz);
    r2.x = abs(r2.x) * -12 + 16;
    r2.y = (int)r2.x;
    r2.x = trunc(r2.x);
    r2.x = 1 / r2.x;
    r7.xy = r5.zw;
    r2.z = 0;
    r8.zw = float2(1,1);
    r9.xyzw = float4(0,0,0,0);
    while (true) {
      r3.w = cmp((int)r2.z >= (int)r2.y);
      if (r3.w != 0) break;
      r7.xy = -r2.xx * r0.xy + r7.xy;
      r3.w = MultiBlend4_et1_p_snp_0_Texture2D_15.SampleGrad(SS_DiffuseMap_s, r7.xy, r6.x, r6.z).w;
      r8.x = r8.z + -r2.x;
      r7.z = cmp(r8.x < r3.w);
      r7.w = r7.z ? r2.y : r2.z;
      r8.y = r3.w;
      r9.xyzw = r7.zzzz ? r8.xyzw : r9.xyzw;
      r2.z = (int)r7.w + 1;
      r8.w = r3.w;
      r8.z = r8.x;
    }
    r2.xy = r9.zx + -r9.wy;
    r2.z = r2.x + -r2.y;
    r2.y = r9.z * r2.y;
    r2.x = r9.x * r2.x + -r2.y;
    r2.x = r2.x / r2.z;
    r2.x = 1 + -r2.x;
    r0.xy = -r0.xy * r2.xx + r5.zw;
    r2.x = cmp(3 < r2.w);
    r2.y = trunc(r2.w);
    r2.y = r2.w + -r2.y;
    r2.zw = r5.zw + -r0.xy;
    r2.yz = r2.yy * r2.zw + r0.xy;
    r0.xy = r2.xx ? r2.yz : r0.xy;
  } else {
    r0.xy = r5.zw;
  }
  r2.xy = v5.xy / v5.ww;
  r6.xy = r2.xy * float2(0.5,-0.5) + float2(0.5,0.5);
  r6.zw = FC_ScreenSize.xy * r6.xy;
  r6.zw = float2(0.25,0.25) * r6.zw;
  r3.w = g_DitherTexture.Sample(SS_WrapLinear_s, r6.zw).w;
  r3.w = -0.5 + r3.w;
  r6.z = cmp(0 < FC_DitherEnable);
  r6.w = cmp(FC_isDitherAlpha != 0);
  r6.z = r6.w ? r6.z : 0;
  r6.w = VC_InstanceData[0].mulCol.w + r3.w;
  r6.w = cmp(r6.w < 0.5);
  r6.z = r6.w ? r6.z : 0;
  r6.w = cmp(VC_InstanceData[0].mulCol.w == 0.000000);
  r3.w = r3.w * FC_AlphaRef.y + 1;
  r3.w = cmp(r3.w < FC_AlphaRef.x);
  r3.w = (int)r3.w | (int)r6.w;
  r3.w = (int)r3.w | (int)r6.z;
  if (r3.w != 0) discard;
  o0.w = r3.w ? 0 : VC_InstanceData[0].mulCol.w;
  r7.xyzw = cmp(FC_DebugOutputMode.xxxx == float4(65,66,67,75));
  if (r7.x != 0) {
    r3.w = g_DiffuseTexture.CalculateLevelOfDetailUnclamped(SS_DiffuseMap_s, v8.xy);
    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);
    r3.w = max(0, r3.w);
    r3.w = min(15, r3.w);
    r3.w = (int)r3.w;
    r8.xyz = x0[r3.w+0].xyz;
  } else {
    r6.zw = MultiBlend4_et1_p_snp_0_float_2_0 * v8.xy;
    r6.zw = r6.zw * FC_TextureTilingScale[0].xy + FC_TextureTilingScale[0].zw;
    r3.w = MultiBlend4_et1_p_snp_0_Texture2D_0.Sample(SS_DiffuseMap_s, r6.zw).x;
    r0.zw = r0.zw + -r1.xy;
    r0.zw = v8.xy + r0.zw;
    r1.xy = r0.zw * FC_TextureTilingScale[2].xy + FC_TextureTilingScale[2].zw;
    r9.xyz = MultiBlend4_et1_p_snp_0_Texture2D_2.Sample(SS_DiffuseMap_s, r1.xy).xyz;
    r1.xy = r4.xy + -r1.zw;
    r1.xy = v8.xy + r1.xy;
    r1.zw = r1.xy * FC_TextureTilingScale[1].xy + FC_TextureTilingScale[1].zw;
    r10.xyz = MultiBlend4_et1_p_snp_0_Texture2D_1.Sample(SS_DiffuseMap_s, r1.zw).xyz;
    r1.zw = r5.xy + -r4.zw;
    r1.zw = v8.xy + r1.zw;
    r4.xy = r1.zw * FC_TextureTilingScale[4].xy + FC_TextureTilingScale[4].zw;
    r4.xyz = MultiBlend4_et1_p_snp_0_Texture2D_4.Sample(SS_DiffuseMap_s, r4.xy).xyz;
    r0.xy = r0.xy + -r5.zw;
    r0.xy = v8.xy + r0.xy;
    r5.xy = r0.xy * FC_TextureTilingScale[3].xy + FC_TextureTilingScale[3].zw;
    r5.xyz = MultiBlend4_et1_p_snp_0_Texture2D_3.Sample(SS_DiffuseMap_s, r5.xy).xyz;
    r3.w = 0.00999999978 + r3.w;
    r3.w = MultiBlend4_et1_p_snp_0_float_0_0 * r3.w;
    r11.xyz = float3(1,1,1) + -v9.xyz;
    r11.xyz = -r3.www * r11.xyz + v9.xyz;
    r3.w = v1.w * MultiBlend4_et1_p_snp_0_float_1_0 + 1;
    r11.xyz = saturate(r11.xyz * r3.www);
    r9.xyz = -r10.xyz + r9.xyz;
    r9.xyz = r11.xxx * r9.xyz + r10.xyz;
    r5.xyz = -r9.xyz + r5.xyz;
    r5.xyz = r11.yyy * r5.xyz + r9.xyz;
    r4.xyz = -r5.xyz + r4.xyz;
    r4.xyz = r11.zzz * r4.xyz + r5.xyz;
    r5.xy = r1.xy * FC_TextureTilingScale[13].xy + FC_TextureTilingScale[13].zw;
    r5.xy = MultiBlend4_et1_p_snp_0_Texture2D_13.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 = v3.xyz * r5.yyy;
    r5.xyz = r5.xxx * v4.xyz + r5.yzw;
    r5.xyz = r3.www * v2.xyz + r5.xyz;
    r3.w = dot(r5.xyz, r5.xyz);
    r3.w = rsqrt(r3.w);
    r5.xyz = r5.xyz * r3.www;
    r6.zw = r0.zw * FC_TextureTilingScale[14].xy + FC_TextureTilingScale[14].zw;
    r6.zw = MultiBlend4_et1_p_snp_0_Texture2D_14.Sample(SS_DiffuseMap_s, r6.zw).xy;
    r6.zw = r6.zw * float2(2,2) + float2(-1,-1);
    r3.w = dot(r6.zw, r6.zw);
    r3.w = 1 + -r3.w;
    r3.w = max(0, r3.w);
    r3.w = sqrt(r3.w);
    r9.xyz = v3.xyz * r6.www;
    r9.xyz = r6.zzz * v4.xyz + r9.xyz;
    r9.xyz = r3.www * v2.xyz + r9.xyz;
    r3.w = dot(r9.xyz, r9.xyz);
    r3.w = rsqrt(r3.w);
    r6.zw = r0.xy * FC_TextureTilingScale[15].xy + FC_TextureTilingScale[15].zw;
    r6.zw = MultiBlend4_et1_p_snp_0_Texture2D_15.Sample(SS_DiffuseMap_s, r6.zw).xy;
    r6.zw = r6.zw * float2(2,2) + float2(-1,-1);
    r4.w = dot(r6.zw, r6.zw);
    r4.w = 1 + -r4.w;
    r4.w = max(0, r4.w);
    r4.xyzw = sqrt(r4.xyzw);
    r10.xyz = v3.xyz * r6.www;
    r10.xyz = r6.zzz * v4.xyz + r10.xyz;
    r10.xyz = r4.www * v2.xyz + r10.xyz;
    r4.w = dot(r10.xyz, r10.xyz);
    r4.w = rsqrt(r4.w);
    r6.zw = r1.zw * FC_TextureTilingScale[16].xy + FC_TextureTilingScale[16].zw;
    r6.zw = MultiBlend4_et1_p_snp_0_Texture2D_16.Sample(SS_DiffuseMap_s, r6.zw).xy;
    r6.zw = r6.zw * float2(2,2) + float2(-1,-1);
    r5.w = dot(r6.zw, r6.zw);
    r5.w = 1 + -r5.w;
    r5.w = max(0, r5.w);
    r5.w = sqrt(r5.w);
    r12.xyz = v3.xyz * r6.www;
    r12.xyz = r6.zzz * v4.xyz + r12.xyz;
    r12.xyz = r5.www * v2.xyz + r12.xyz;
    r5.w = dot(r12.xyz, r12.xyz);
    r5.w = rsqrt(r5.w);
    r9.xyz = r9.xyz * r3.www + -r5.xyz;
    r5.xyz = r11.xxx * r9.xyz + r5.xyz;
    r9.xyz = r10.xyz * r4.www + -r5.xyz;
    r5.xyz = r11.yyy * r9.xyz + r5.xyz;
    r9.xyz = r12.xyz * r5.www + -r5.xyz;
    r5.xyz = r11.zzz * r9.xyz + r5.xyz;
    r6.zw = r0.zw * FC_TextureTilingScale[6].xy + FC_TextureTilingScale[6].zw;
    r9.xyz = MultiBlend4_et1_p_snp_0_Texture2D_6.Sample(SS_DiffuseMap_s, r6.zw).xyz;
    r6.zw = r1.xy * FC_TextureTilingScale[5].xy + FC_TextureTilingScale[5].zw;
    r10.xyz = MultiBlend4_et1_p_snp_0_Texture2D_5.Sample(SS_DiffuseMap_s, r6.zw).xyz;
    r6.zw = r0.xy * FC_TextureTilingScale[7].xy + FC_TextureTilingScale[7].zw;
    r12.xyz = MultiBlend4_et1_p_snp_0_Texture2D_7.Sample(SS_DiffuseMap_s, r6.zw).xyz;
    r6.zw = r1.zw * FC_TextureTilingScale[8].xy + FC_TextureTilingScale[8].zw;
    r13.xyz = MultiBlend4_et1_p_snp_0_Texture2D_8.Sample(SS_DiffuseMap_s, r6.zw).xyz;
    r9.xyz = -r10.xyz + r9.xyz;
    r9.xyz = r11.xxx * r9.xyz + r10.xyz;
    r10.xyz = r12.xyz + -r9.xyz;
    r9.xyz = r11.yyy * r10.xyz + r9.xyz;
    r10.xyz = r13.xyz + -r9.xyz;
    r9.xyz = r11.zzz * r10.xyz + r9.xyz;
    r0.xy = r0.xy * FC_TextureTilingScale[11].xy + FC_TextureTilingScale[11].zw;
    r0.x = MultiBlend4_et1_p_snp_0_Texture2D_11.Sample(SS_DiffuseMap_s, r0.xy).x;
    r1.xy = r1.xy * FC_TextureTilingScale[9].xy + FC_TextureTilingScale[9].zw;
    r0.y = MultiBlend4_et1_p_snp_0_Texture2D_9.Sample(SS_DiffuseMap_s, r1.xy).x;
    r0.zw = r0.zw * FC_TextureTilingScale[10].xy + FC_TextureTilingScale[10].zw;
    r0.z = MultiBlend4_et1_p_snp_0_Texture2D_10.Sample(SS_DiffuseMap_s, r0.zw).x;
    r1.xy = r1.zw * FC_TextureTilingScale[12].xy + FC_TextureTilingScale[12].zw;
    r0.w = MultiBlend4_et1_p_snp_0_Texture2D_12.Sample(SS_DiffuseMap_s, r1.xy).x;
    r0.z = r0.z + -r0.y;
    r0.y = r11.x * r0.z + r0.y;
    r0.x = r0.x + -r0.y;
    r0.x = r11.y * r0.x + r0.y;
    r0.y = r0.w + -r0.x;
    r0.x = r11.z * r0.y + r0.x;
    r0.y = dot(v4.xyz, v4.xyz);
    r0.y = rsqrt(r0.y);
    r0.yzw = v4.xyz * r0.yyy;
    r1.x = dot(v3.xyz, v3.xyz);
    r1.x = rsqrt(r1.x);
    r1.xyz = v3.xyz * r1.xxx;
    r1.w = dot(v7.xyz, v7.xyz);
    r1.w = rsqrt(r1.w);
    r10.xyz = v7.xyz * r1.www;
    r1.w = dot(r5.xyz, r5.xyz);
    r1.w = rsqrt(r1.w);
    r5.xyz = r5.xyz * r1.www;
    r1.w = FC_GlobalReflectanceScale * FC_GlobalReflectanceScale;
    r9.xyz = r9.xyz * r1.www;
    r0.x = FC_GlobalShininessScale * r0.x;
    r1.w = g_SSAOTexture.Sample(SS_WrapLinear_s, r6.xy).x;
    r3.w = dot(r5.xyz, r10.xyz);
    r4.w = r3.w + r1.w;
    r4.w = r4.w * r4.w + r1.w;
    r4.w = saturate(-1 + r4.w);
    r3.w = r3.w + r3.w;
    r10.xyz = r3.www * r5.xyz + -r10.xyz;
    r3.w = -r0.x * 6.5 + 6.5;
    r3.w = min(6, r3.w);
    r11.xyz = g_IBLTexture.SampleLevel(SS_WrapLinear_s, r10.xyz, r3.w).xyz;
    r12.xyz = g_IBLTexture2.SampleLevel(SS_WrapLinear_s, r10.xyz, r3.w).xyz;
    r12.xyz = r12.xyz + -r11.xyz;
    r11.xyz = VC_InstanceData[0].envMapInterpRatio * r12.xyz + r11.xyz;
    r11.xyz = r11.xyz * r1.www;
    r5.w = dot(r10.xyz, r3.xyz);
    r5.w = saturate(1 + r5.w);
    r5.w = r5.w * r5.w;
    r10.xyz = r11.xyz * r5.www;
    r6.xyzw = g_RLRTexture.SampleLevel(SS_ClampLinear_s, r6.xy, r3.w).xyzw;
    r6.xyz = r6.xyz * r1.www;
    r3.w = 1 + -r6.w;
    r6.xyz = r10.xyz * r3.www + r6.xyz;
    r2.z = v5.z / v5.w;
    r2.w = 1;
    r10.x = dot(r2.xyzw, FC_MatrixInvProj._m00_m10_m20_m30);
    r10.y = dot(r2.xyzw, FC_MatrixInvProj._m01_m11_m21_m31);
    r10.z = dot(r2.xyzw, FC_MatrixInvProj._m02_m12_m22_m32);
    r3.w = dot(r2.xyzw, FC_MatrixInvProj._m03_m13_m23_m33);
    r10.xyz = r10.xyz / r3.www;
    r11.xyz = cmp(FC_CascadeSelectDist.xyz < r10.zzz);
    r11.xyz = r11.xyz ? float3(1,1,1) : 0;
    r3.w = (int)r11.x + (int)r11.y;
    r3.w = (int)r3.w + (int)r11.z;
    r3.w = (uint)r3.w << 2;
    r11.x = dot(r2.xyzw, FC_ProjSpaceToShadowMatrix[r3.w/4]._m00_m10_m20_m30);
    r11.y = dot(r2.xyzw, FC_ProjSpaceToShadowMatrix[r3.w/4]._m01_m11_m21_m31);
    r11.z = dot(r2.xyzw, FC_ProjSpaceToShadowMatrix[r3.w/4]._m02_m12_m22_m32);
    r11.w = dot(r2.xyzw, FC_ProjSpaceToShadowMatrix[r3.w/4]._m03_m13_m23_m33);
    r2.xy = FC_ShadowMapParam.zw * r11.ww;
    r2.z = 0;
    r12.xyzw = r11.xyzw + r2.xyzz;
    r12.xyz = r12.xyz / r12.www;
    r12.x = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r12.xy, r12.z).x;
    r2.w = -r2.x;
    r13.xyzw = r11.xyzw + r2.ywzz;
    r13.xyz = r13.xyz / r13.www;
    r12.y = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r13.xy, r13.z).x;
    r13.xyzw = r2.xyzz * float4(-1,-1,1,1) + r11.xyzw;
    r13.xyz = r13.xyz / r13.www;
    r12.z = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r13.xy, r13.z).x;
    r2.xyzw = r2.yxzz * float4(-1,1,1,1) + r11.xyzw;
    r2.xyz = r2.xyz / r2.www;
    r12.w = g_ShadowTexture.SampleCmpLevelZero(SS_Shadow_s, r2.xy, r2.z).x;
    r2.x = dot(r12.xyzw, float4(0.25,0.25,0.25,0.25));
    r2.x = 1 + -r2.x;
    r2.y = dot(r10.xyz, r10.xyz);
    r2.y = sqrt(r2.y);
    r2.y = FC_ShadowMapParam.x + -r2.y;
    r2.y = saturate(FC_ShadowMapParam.y * r2.y);
    r2.yzw = FC_ShadowColor.xyz * r2.yyy;
    r2.xyz = -r2.yzw * r2.xxx + float3(1,1,1);
    r10.xyzw = cmp(FC_DebugOutputMode.xxxx == float4(2,10,20,21));
    r5.xyz = r5.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
    r5.xyz = r10.xxx ? r5.xyz : 0;
    r3.xyz = r3.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
    r3.xyz = r10.yyy ? r3.xyz : r5.xyz;
    r2.w = (int)r10.w | (int)r10.z;
    r3.xyz = r2.www ? float3(0,0,0) : r3.xyz;
    r5.xyzw = cmp(FC_DebugOutputMode.xxxx == float4(11,12,3,4));
    r2.w = (int)r5.y | (int)r5.x;
    r3.xyz = r2.www ? float3(1,1,1) : r3.xyz;
    r3.xyz = r5.zzz ? r0.xxx : r3.xyz;
    r5.xyz = sqrt(r9.xyz);
    r5.xyz = -FC_DebugOutputMode.yyy + r5.xyz;
    r5.xyz = r5.xyz / FC_DebugOutputMode.zzz;
    r9.xyz = saturate(r5.xyz);
    r3.xyz = r5.www ? r9.xyz : r3.xyz;
    r9.xyzw = cmp(FC_DebugOutputMode.xxxx == float4(5,8,9,1));
    r0.x = cmp(r5.x >= 0);
    r2.w = cmp(1 >= r5.x);
    r0.x = r0.x ? r2.w : 0;
    r10.xyzw = r5.xxxx * float4(0,4,0,4) + float4(0,0,1,-1);
    r5.yzw = r10.www * float3(0,0,-1) + float3(0,1,1);
    r11.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 = r11.zzz ? r13.xyz : r12.xyz;
    r5.xyz = r11.yyy ? r5.yzw : r12.xyz;
    r5.xyz = r11.xxx ? r10.xyz : r5.xyz;
    r5.xyz = r0.xxx ? r5.xyz : 0;
    r3.xyz = r9.xxx ? r5.xyz : r3.xyz;
    r0.x = (int)r9.z | (int)r9.y;
    r3.xyz = r0.xxx ? float3(0,0,0) : r3.xyz;
    r3.xyz = r9.www ? r4.xyz : r3.xyz;
    r5.xyzw = cmp(FC_DebugOutputMode.xxxx == float4(49,34,30,32));
    r0.x = dot(float3(0.298909992,0.586610019,0.114480004), r4.xyz);
    r2.w = cmp(r0.x < 0.125490203);
    r3.w = cmp(0.952941179 < r0.x);
    r4.xyz = r3.www ? float3(0,1,0) : r0.xxx;
    r4.xyz = r2.www ? float3(1,0,0) : r4.xyz;
    r3.xyz = r5.xxx ? r4.xyz : r3.xyz;
    r3.xyz = r5.yyy ? r4.www : r3.xyz;
    r0.x = (int)r5.w | (int)r5.z;
    r3.xyz = r0.xxx ? r1.www : r3.xyz;
    r4.xyzw = cmp(FC_DebugOutputMode.xxxx == float4(33,31,13,14));
    r0.x = (int)r4.y | (int)r4.x;
    r3.xyz = r0.xxx ? float3(1,1,1) : r3.xyz;
    r1.xyz = r1.xyz * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
    r1.xyz = r4.zzz ? r1.xyz : r3.xyz;
    r0.xyz = r0.yzw * float3(0.5,0.5,0.5) + float3(0.5,0.5,0.5);
    r0.xyz = r4.www ? r0.xyz : r1.xyz;
    r1.xyzw = cmp(FC_DebugOutputMode.xxxx == float4(17,55,16,40));
    r0.w = (int)r1.y | (int)r1.x;
    r0.xyz = r0.www ? float3(0,0,0) : r0.xyz;
    r0.w = -FC_DebugOutputMode.y + v5.w;
    r1.x = FC_DebugOutputMode.z + -FC_DebugOutputMode.y;
    r0.w = saturate(r0.w / r1.x);
    r0.xyz = r1.zzz ? r0.www : r0.xyz;
    r0.xyz = r1.www ? r2.xyz : r0.xyz;
    r1.xyzw = cmp(FC_DebugOutputMode.xxxx == float4(41,42,48,50));
    r0.w = (int)r1.y | (int)r1.x;
    r0.xyz = r0.www ? float3(0,0,0) : r0.xyz;
    r0.xyz = r1.zzz ? r6.xyz : r0.xyz;
    r0.xyz = r1.www ? float3(0.200000003,0.800000012,0) : r0.xyz;
    r1.xyzw = cmp(FC_DebugOutputMode.xxxx == float4(15,60,61,62));
    r0.w = (int)r1.y | (int)r1.x;
    r0.w = (int)r1.z | (int)r0.w;
    r0.w = (int)r1.w | (int)r0.w;
    r8.xyz = r0.www ? float3(0,0,0) : r0.xyz;
  }
  r0.xyz = r7.yyy ? FC_DebugOutputMode.yyy : r8.xyz;
  r0.xyz = r7.zzz ? FC_DebugOutputMode.zzz : r0.xyz;
  r0.xyz = r7.www ? v9.xyz : r0.xyz;
  r1.xy = cmp(FC_DebugOutputMode.xx == float2(76,77));
  r0.w = (int)r1.y | (int)r1.x;
  o0.xyz = r0.www ? float3(0,0,0) : r0.xyz;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//
// Buffer Definitions: 
//
// cbuffer buffer2
// {
//
//   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]
//   float4 FC_WaterNormalUvScrollSpeed;// Offset:  240 Size:    16 [unused]
//   float4 FC_WaterDiffuseUvScrollSpeed;// Offset:  256 Size:    16 [unused]
//   float4 FC_WaterMiddleUvScrollSpeed;// Offset:  272 Size:    16 [unused]
//   float4 FC_WaterFogParam0;          // Offset:  288 Size:    16 [unused]
//   float4 FC_WaterFogParam1;          // Offset:  304 Size:    16 [unused]
//   float4 FC_WaterFresnel;            // Offset:  320 Size:    16 [unused]
//   float4 FC_WaterFadeParam;          // Offset:  336 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P3_2;         // Offset:  352 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P3_3;         // Offset:  368 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P3_4;         // Offset:  384 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P3_5;         // Offset:  400 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P3_6;         // Offset:  416 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P3_7;         // Offset:  432 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P3_8;         // Offset:  448 Size:    16 [unused]
//   float MultiBlend4_et1_p_snp_0_float_0_0;// Offset:  464 Size:     4
//   float MultiBlend4_et1_p_snp_0_float_1_0;// Offset:  468 Size:     4
//   float MultiBlend4_et1_p_snp_0_float_2_0;// Offset:  472 Size:     4
//   float MultiBlend4_et1_p_snp_0_float_3_0;// Offset:  476 Size:     4
//
// }
//
// cbuffer buffer3
// {
//
//   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]
//   float3 FC_AlphaRef;                // Offset:   80 Size:    12
//   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_SSS_ID;                   // Offset:  224 Size:     4 [unused]
//   float4 FC_SAT_DUMMMY_P7_2;         // Offset:  240 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P7_3;         // Offset:  256 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P7_4;         // Offset:  272 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P7_5;         // Offset:  288 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P7_6;         // Offset:  304 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P7_6_1;       // Offset:  320 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P7_6_2;       // Offset:  336 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P7_6_3;       // Offset:  352 Size:    16 [unused]
//   float4 FC_SAT_DUMMMY_P7_7;         // 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
//   float4x3 FC_MatrixView;            // Offset:   32 Size:    48 [unused]
//   float4x4 FC_MatrixInvViewProj;     // Offset:   80 Size:    64 [unused]
//   float4x4 FC_MatrixInvProj;         // Offset:  144 Size:    64
//   float4x4 FC_MatrixProj;            // Offset:  208 Size:    64 [unused]
//   float4 FC_DepthComputeParam;       // Offset:  272 Size:    16 [unused]
//   float4 FC_ShadowMapParam;          // Offset:  288 Size:    16
//   float4 FC_ShadowColor;             // Offset:  304 Size:    16
//   float4 FC_ShadowDir;               // Offset:  320 Size:    16 [unused]
//   float4x4 VC_ShadowMapMatrix;       // Offset:  336 Size:    64 [unused]
//   float FC_ShadowDepthRate;          // Offset:  400 Size:     4 [unused]
//   float FC_ShadowDepthScale;         // Offset:  404 Size:     4 [unused]
//   float FC_ShadowKernelScale;        // Offset:  408 Size:     4 [unused]
//   float FC_ShadowRandTexInvScale;    // Offset:  412 Size:     4 [unused]
//   float FC_ShadowTexInvScaleX;       // Offset:  416 Size:     4 [unused]
//   float FC_ShadowTexInvScaleY;       // Offset:  420 Size:     4 [unused]
//   float FC_ShadowDepthOffsetScale;   // Offset:  424 Size:     4 [unused]
//   float4 FC_ShadowViewKernelScale;   // Offset:  432 Size:    16 [unused]
//   float4x4 FC_ProjSpaceToShadowMatrix[4];// Offset:  448 Size:   256
//   float4 FC_CascadeSelectDist;       // Offset:  704 Size:    16
//   float4x4 FC_MatrixInvView;         // Offset:  720 Size:    64 [unused]
//   float4 VC_ClipPlane;               // Offset:  784 Size:    16 [unused]
//   float4x4 VC_MatrixViewProj;        // Offset:  800 Size:    64 [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
//   float4 FC_SnowDir;                 // Offset:   64 Size:    16 [unused]
//   float4 FC_SnowTilingScale;         // Offset:   80 Size:    16 [unused]
//   float4 FC_SnowAlbedo;              // Offset:   96 Size:    16 [unused]
//   float FC_SnowReflectance;          // Offset:  112 Size:     4 [unused]
//   float FC_GroundPlaneHeight;        // Offset:  116 Size:     4 [unused]
//   float FC_RcpSnowHeightRange;       // Offset:  120 Size:     4 [unused]
//   float FC_SnowNormalScale;          // Offset:  124 Size:     4 [unused]
//   float4 FC_SnowSpakleTinlingScale;  // Offset:  128 Size:    16 [unused]
//   float FC_GlobalTime;               // Offset:  144 Size:     4 [unused]
//   float FC_DominantSharpnesMinValue; // Offset:  160 Size:     4 [unused]
//   float FC_DominantSharpnesOffset;   // Offset:  164 Size:     4 [unused]
//   float FC_DominantSharpnesExponent; // Offset:  168 Size:     4 [unused]
//   float FC_DominantColorScale;       // Offset:  172 Size:     4 [unused]
//
// }
//
// cbuffer cbInstanceData
// {
//
//   struct PerInstanceData
//   {
//       
//       float4x3 mWorld;               // Offset:    0
//       float4 atlasUvScaleOffset;     // Offset:   48
//       float4 userClipPlane;          // Offset:   64
//       uint4 matricesData;            // Offset:   80
//       uint4 envData;                 // Offset:   96
//       float4 mulCol;                 // Offset:  112
//       float envMapInterpRatio;       // Offset:  128
//       float envMapColorScale0;       // Offset:  132
//       float envMapColorScale1;       // Offset:  136
//       float giOcclusionMask;         // Offset:  140
//       float4 aSh[3];                 // Offset:  144
//
//   } VC_InstanceData[2];              // Offset:    0 Size:   384
//
// }
//
// cbuffer cbModelParam
// {
//
//   float4 FC_DifColMul;               // Offset:    0 Size:    16 [unused]
//   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_ParallaxCorrectedCubemapOrigin;// Offset:  128 Size:    16 [unused]
//   float4 FC_ParallaxCorrectedCubemapAabbMin;// Offset:  144 Size:    16 [unused]
//   float4 FC_ParallaxCorrectedCubemapAabbMax;// Offset:  160 Size:    16 [unused]
//
// }
//
// cbuffer cbTextureTilingScale
// {
//
//   float4 FC_TextureTilingScale[25];  // Offset:    0 Size:   400
//
// }
//
//
// 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
// MultiBlend4_et1_p_snp_0_Texture2D_16    texture  float4          2d    1        1
// MultiBlend4_et1_p_snp_0_Texture2D_15    texture  float4          2d    2        1
// MultiBlend4_et1_p_snp_0_Texture2D_14    texture  float4          2d    3        1
// MultiBlend4_et1_p_snp_0_Texture2D_13    texture  float4          2d    4        1
// MultiBlend4_et1_p_snp_0_Texture2D_4    texture  float4          2d    5        1
// MultiBlend4_et1_p_snp_0_Texture2D_3    texture  float4          2d    6        1
// MultiBlend4_et1_p_snp_0_Texture2D_1    texture  float4          2d    7        1
// MultiBlend4_et1_p_snp_0_Texture2D_2    texture  float4          2d    8        1
// MultiBlend4_et1_p_snp_0_Texture2D_0    texture  float4          2d    9        1
// MultiBlend4_et1_p_snp_0_Texture2D_6    texture  float4          2d   10        1
// MultiBlend4_et1_p_snp_0_Texture2D_5    texture  float4          2d   11        1
// MultiBlend4_et1_p_snp_0_Texture2D_9    texture  float4          2d   12        1
// MultiBlend4_et1_p_snp_0_Texture2D_10    texture  float4          2d   13        1
// MultiBlend4_et1_p_snp_0_Texture2D_11    texture  float4          2d   14        1
// MultiBlend4_et1_p_snp_0_Texture2D_12    texture  float4          2d   15        1
// MultiBlend4_et1_p_snp_0_Texture2D_8    texture  float4          2d   16        1
// MultiBlend4_et1_p_snp_0_Texture2D_7    texture  float4          2d   17        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
// cbTextureTilingScale              cbuffer      NA          NA    1        1
// buffer2                           cbuffer      NA          NA    2        1
// buffer3                           cbuffer      NA          NA    3        1
// cbInstanceData                    cbuffer      NA          NA    4        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       
// COLOR                    0   xyzw        1     NONE   float      w
// NORMAL                   0   xyz         2     NONE   float   xyz 
// TANGENT                  0   xyz         3     NONE   float   xyz 
// BINORMAL                 0   xyz         4     NONE   float   xyz 
// POSITION                 1   xyzw        5     NONE   float   xyzw
// POSITION                 2   xyzw        6     NONE   float       
// TEXCOORD                29   xyz         7     NONE   float   xyz 
// TEXCOORD                 0   xy          8     NONE   float   xy  
// TEXCOORD                17   xyz         9     NONE   float   xyz 
// SV_IsFrontFace           0   x          10    FFACE    uint       
//
//
// 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 cb2[30], immediateIndexed
dcl_constantbuffer cb3[6], immediateIndexed
dcl_constantbuffer cb8[45], dynamicIndexed
dcl_constantbuffer cb9[4], immediateIndexed
dcl_constantbuffer cb4[9], immediateIndexed
dcl_constantbuffer cb7[3], immediateIndexed
dcl_constantbuffer cb1[17], 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_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture2d (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t9
dcl_resource_texture2d (float,float,float,float) t10
dcl_resource_texture2d (float,float,float,float) t11
dcl_resource_texture2d (float,float,float,float) t12
dcl_resource_texture2d (float,float,float,float) t13
dcl_resource_texture2d (float,float,float,float) t14
dcl_resource_texture2d (float,float,float,float) t15
dcl_resource_texture2d (float,float,float,float) t16
dcl_resource_texture2d (float,float,float,float) t17
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_input_ps linear v1.w
dcl_input_ps linear v2.xyz
dcl_input_ps linear v3.xyz
dcl_input_ps linear v4.xyz
dcl_input_ps linear v5.xyzw
dcl_input_ps linear v7.xyz
dcl_input_ps linear v8.xy
dcl_input_ps linear v9.xyz
dcl_output o0.xyzw
dcl_temps 14
dcl_indexableTemp x0[16], 4
dp3 r0.x, v7.xyzx, v4.xyzx
dp3 r0.y, v7.xyzx, v3.xyzx
dp3 r0.z, v7.xyzx, v2.xyzx
mad r1.xy, v8.xyxx, cb1[14].xyxx, cb1[14].zwzz
dp2 r0.w, -r0.xyxx, -r0.xyxx
rsq r0.w, r0.w
mul r1.zw, r0.wwww, -r0.xxxy
dp3 r0.x, -r0.xyzx, -r0.xyzx
mad r0.x, -r0.z, r0.z, r0.x
sqrt r0.x, r0.x
div r0.x, r0.x, -r0.z
mul r0.xy, r0.xxxx, r1.zwzz
mul r0.xy, r0.xyxx, cb2[29].wwww
dp3 r0.z, -v7.xyzx, -v7.xyzx
rsq r0.z, r0.z
mul r2.xyz, r0.zzzz, -v7.xyzx
dp3 r0.z, v2.xyzx, v2.xyzx
rsq r0.z, r0.z
mul r3.xyz, r0.zzzz, v2.xyzx
deriv_rtx_coarse r0.zw, r1.xxxy
deriv_rty_coarse r1.zw, r1.xxxy
add r4.xy, |r0.zwzz|, |r1.zwzz|
resinfo_indexable(texture2d)(float,float,float,float)_uint r4.zw, l(0), t3.zwxy
utof r4.zw, r4.zzzw
mul r4.xy, r4.zwzz, r4.xyxx
max r2.w, r4.y, r4.x
log r2.w, r2.w
max r2.w, r2.w, l(0.000000)
ge r3.w, l(4.000000), r2.w
if_nz r3.w
  dp3 r3.w, r2.xyzx, r3.xyzx
  mad r3.w, |r3.w|, l(-12.000000), l(16.000000)
  ftoi r4.x, r3.w
  round_z r3.w, r3.w
  div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
  mov r4.yz, r1.xxyx
  mov r4.w, l(0)
  mov r5.zw, l(0,0,1.000000,1.000000)
  mov r6.xyzw, l(0,0,0,0)
  loop 
    ige r7.x, r4.w, r4.x
    breakc_nz r7.x
    mad r4.yz, -r3.wwww, r0.xxyx, r4.yyzy
    sample_d_indexable(texture2d)(float,float,float,float) r7.x, r4.yzyy, t3.wxyz, s0, r0.zwzz, r1.zwzz
    add r5.x, -r3.w, r5.z
    lt r7.y, r5.x, r7.x
    movc r7.z, r7.y, r4.x, r4.w
    mov r5.y, r7.x
    movc r6.xyzw, r7.yyyy, r5.xyzw, r6.xyzw
    iadd r4.w, r7.z, l(1)
    mov r5.w, r7.x
    mov r5.z, r5.x
  endloop 
  add r0.zw, -r6.wwwy, r6.zzzx
  add r1.z, -r0.w, r0.z
  mul r0.w, r0.w, r6.z
  mad r0.z, r6.x, r0.z, -r0.w
  div r0.z, r0.z, r1.z
  add r0.z, -r0.z, l(1.000000)
  mad r0.zw, -r0.xxxy, r0.zzzz, r1.xxxy
  lt r1.z, l(3.000000), r2.w
  round_z r1.w, r2.w
  add r1.w, -r1.w, r2.w
  add r4.xy, -r0.zwzz, r1.xyxx
  mad r4.xy, r1.wwww, r4.xyxx, r0.zwzz
  movc r0.zw, r1.zzzz, r4.xxxy, r0.zzzw
else 
  mov r0.zw, r1.xxxy
endif 
mad r1.zw, v8.xxxy, cb1[13].xxxy, cb1[13].zzzw
deriv_rtx_coarse r4.xy, r1.zwzz
deriv_rty_coarse r4.zw, r1.zzzw
add r5.xy, |r4.zwzz|, |r4.xyxx|
resinfo_indexable(texture2d)(float,float,float,float)_uint r5.zw, l(0), t4.zwxy
utof r5.zw, r5.zzzw
mul r5.xy, r5.zwzz, r5.xyxx
max r2.w, r5.y, r5.x
log r2.w, r2.w
max r2.w, r2.w, l(0.000000)
ge r3.w, l(4.000000), r2.w
if_nz r3.w
  dp3 r3.w, r2.xyzx, r3.xyzx
  mad r3.w, |r3.w|, l(-12.000000), l(16.000000)
  ftoi r5.x, r3.w
  round_z r3.w, r3.w
  div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
  mov r5.yz, r1.zzwz
  mov r5.w, l(0)
  mov r6.zw, l(0,0,1.000000,1.000000)
  mov r7.xyzw, l(0,0,0,0)
  loop 
    ige r8.x, r5.w, r5.x
    breakc_nz r8.x
    mad r5.yz, -r3.wwww, r0.xxyx, r5.yyzy
    sample_d_indexable(texture2d)(float,float,float,float) r8.x, r5.yzyy, t4.wxyz, s0, r4.xyxx, r4.zwzz
    add r6.x, -r3.w, r6.z
    lt r8.y, r6.x, r8.x
    movc r8.z, r8.y, r5.x, r5.w
    mov r6.y, r8.x
    movc r7.xyzw, r8.yyyy, r6.xyzw, r7.xyzw
    iadd r5.w, r8.z, l(1)
    mov r6.w, r8.x
    mov r6.z, r6.x
  endloop 
  add r3.w, -r7.w, r7.z
  add r4.x, -r7.y, r7.x
  add r4.y, r3.w, -r4.x
  mul r4.x, r4.x, r7.z
  mad r3.w, r7.x, r3.w, -r4.x
  div r3.w, r3.w, r4.y
  add r3.w, -r3.w, l(1.000000)
  mad r4.xy, -r0.xyxx, r3.wwww, r1.zwzz
  lt r3.w, l(3.000000), r2.w
  round_z r4.z, r2.w
  add r2.w, r2.w, -r4.z
  add r4.zw, r1.zzzw, -r4.xxxy
  mad r4.zw, r2.wwww, r4.zzzw, r4.xxxy
  movc r4.xy, r3.wwww, r4.zwzz, r4.xyxx
else 
  mov r4.xy, r1.zwzz
endif 
mad r4.zw, v8.xxxy, cb1[16].xxxy, cb1[16].zzzw
deriv_rtx_coarse r5.xy, r4.zwzz
deriv_rty_coarse r5.zw, r4.zzzw
add r6.xy, |r5.zwzz|, |r5.xyxx|
resinfo_indexable(texture2d)(float,float,float,float)_uint r6.zw, l(0), t1.zwxy
utof r6.zw, r6.zzzw
mul r6.xy, r6.zwzz, r6.xyxx
max r2.w, r6.y, r6.x
log r2.w, r2.w
max r2.w, r2.w, l(0.000000)
ge r3.w, l(4.000000), r2.w
if_nz r3.w
  dp3 r3.w, r2.xyzx, r3.xyzx
  mad r3.w, |r3.w|, l(-12.000000), l(16.000000)
  ftoi r6.x, r3.w
  round_z r3.w, r3.w
  div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
  mov r6.yz, r4.zzwz
  mov r6.w, l(0)
  mov r7.zw, l(0,0,1.000000,1.000000)
  mov r8.xyzw, l(0,0,0,0)
  loop 
    ige r9.x, r6.w, r6.x
    breakc_nz r9.x
    mad r6.yz, -r3.wwww, r0.xxyx, r6.yyzy
    sample_d_indexable(texture2d)(float,float,float,float) r9.x, r6.yzyy, t1.wxyz, s0, r5.xyxx, r5.zwzz
    add r7.x, -r3.w, r7.z
    lt r9.y, r7.x, r9.x
    movc r9.z, r9.y, r6.x, r6.w
    mov r7.y, r9.x
    movc r8.xyzw, r9.yyyy, r7.xyzw, r8.xyzw
    iadd r6.w, r9.z, l(1)
    mov r7.w, r9.x
    mov r7.z, r7.x
  endloop 
  add r3.w, -r8.w, r8.z
  add r5.x, -r8.y, r8.x
  add r5.y, r3.w, -r5.x
  mul r5.x, r5.x, r8.z
  mad r3.w, r8.x, r3.w, -r5.x
  div r3.w, r3.w, r5.y
  add r3.w, -r3.w, l(1.000000)
  mad r5.xy, -r0.xyxx, r3.wwww, r4.zwzz
  lt r3.w, l(3.000000), r2.w
  round_z r5.z, r2.w
  add r2.w, r2.w, -r5.z
  add r5.zw, r4.zzzw, -r5.xxxy
  mad r5.zw, r2.wwww, r5.zzzw, r5.xxxy
  movc r5.xy, r3.wwww, r5.zwzz, r5.xyxx
else 
  mov r5.xy, r4.zwzz
endif 
mad r5.zw, v8.xxxy, cb1[15].xxxy, cb1[15].zzzw
deriv_rtx_coarse r6.xy, r5.zwzz
deriv_rty_coarse r6.zw, r5.zzzw
add r7.xy, |r6.zwzz|, |r6.xyxx|
resinfo_indexable(texture2d)(float,float,float,float)_uint r7.zw, l(0), t2.zwxy
utof r7.zw, r7.zzzw
mul r7.xy, r7.zwzz, r7.xyxx
max r2.w, r7.y, r7.x
log r2.w, r2.w
max r2.w, r2.w, l(0.000000)
ge r3.w, l(4.000000), r2.w
if_nz r3.w
  dp3 r2.x, r2.xyzx, r3.xyzx
  mad r2.x, |r2.x|, l(-12.000000), l(16.000000)
  ftoi r2.y, r2.x
  round_z r2.x, r2.x
  div r2.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.x
  mov r7.xy, r5.zwzz
  mov r2.z, l(0)
  mov r8.zw, l(0,0,1.000000,1.000000)
  mov r9.xyzw, l(0,0,0,0)
  loop 
    ige r3.w, r2.z, r2.y
    breakc_nz r3.w
    mad r7.xy, -r2.xxxx, r0.xyxx, r7.xyxx
    sample_d_indexable(texture2d)(float,float,float,float) r3.w, r7.xyxx, t2.xyzw, s0, r6.xyxx, r6.zwzz
    add r8.x, -r2.x, r8.z
    lt r7.z, r8.x, r3.w
    movc r7.w, r7.z, r2.y, r2.z
    mov r8.y, r3.w
    movc r9.xyzw, r7.zzzz, r8.xyzw, r9.xyzw
    iadd r2.z, r7.w, l(1)
    mov r8.w, r3.w
    mov r8.z, r8.x
  endloop 
  add r2.xy, -r9.wyww, r9.zxzz
  add r2.z, -r2.y, r2.x
  mul r2.y, r2.y, r9.z
  mad r2.x, r9.x, r2.x, -r2.y
  div r2.x, r2.x, r2.z
  add r2.x, -r2.x, l(1.000000)
  mad r0.xy, -r0.xyxx, r2.xxxx, r5.zwzz
  lt r2.x, l(3.000000), r2.w
  round_z r2.y, r2.w
  add r2.y, -r2.y, r2.w
  add r2.zw, -r0.xxxy, r5.zzzw
  mad r2.yz, r2.yyyy, r2.zzwz, r0.xxyx
  movc r0.xy, r2.xxxx, r2.yzyy, r0.xyxx
else 
  mov r0.xy, r5.zwzz
endif 
div r2.xy, v5.xyxx, v5.wwww
mad r6.xy, r2.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mul r6.zw, r6.xxxy, cb8[1].xxxy
mul r6.zw, r6.zzzw, l(0.000000, 0.000000, 0.250000, 0.250000)
sample_indexable(texture2d)(float,float,float,float) r3.w, r6.zwzz, t38.xyzw, s8
add r3.w, r3.w, l(-0.500000)
lt r6.z, l(0.000000), cb7[2].x
ine r6.w, cb2[0].x, l(0)
and r6.z, r6.w, r6.z
add r6.w, r3.w, cb4[7].w
lt r6.w, r6.w, l(0.500000)
and r6.z, r6.w, r6.z
eq r6.w, cb4[7].w, l(0.000000)
mad r3.w, r3.w, cb3[5].y, l(1.000000)
lt r3.w, r3.w, cb3[5].x
or r3.w, r3.w, r6.w
or r3.w, r3.w, r6.z
discard_nz r3.w
movc o0.w, r3.w, l(0), cb4[7].w
eq r7.xyzw, cb9[1].xxxx, l(65.000000, 66.000000, 67.000000, 75.000000)
if_nz r7.x
  lod r3.w, v8.xyxx, t0.y, s0
  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 r3.w, r3.w, l(0.000000)
  min r3.w, r3.w, l(15.000000)
  ftoi r3.w, r3.w
  mov r8.xyz, x0[r3.w + 0].xyzx
else 
  mul r6.zw, v8.xxxy, cb2[29].zzzz
  mad r6.zw, r6.zzzw, cb1[0].xxxy, cb1[0].zzzw
  sample_indexable(texture2d)(float,float,float,float) r3.w, r6.zwzz, t9.yzwx, s0
  add r0.zw, -r1.xxxy, r0.zzzw
  add r0.zw, r0.zzzw, v8.xxxy
  mad r1.xy, r0.zwzz, cb1[2].xyxx, cb1[2].zwzz
  sample_indexable(texture2d)(float,float,float,float) r9.xyz, r1.xyxx, t8.xyzw, s0
  add r1.xy, -r1.zwzz, r4.xyxx
  add r1.xy, r1.xyxx, v8.xyxx
  mad r1.zw, r1.xxxy, cb1[1].xxxy, cb1[1].zzzw
  sample_indexable(texture2d)(float,float,float,float) r10.xyz, r1.zwzz, t7.xyzw, s0
  add r1.zw, -r4.zzzw, r5.xxxy
  add r1.zw, r1.zzzw, v8.xxxy
  mad r4.xy, r1.zwzz, cb1[4].xyxx, cb1[4].zwzz
  sample_indexable(texture2d)(float,float,float,float) r4.xyz, r4.xyxx, t5.xyzw, s0
  add r0.xy, -r5.zwzz, r0.xyxx
  add r0.xy, r0.xyxx, v8.xyxx
  mad r5.xy, r0.xyxx, cb1[3].xyxx, cb1[3].zwzz
  sample_indexable(texture2d)(float,float,float,float) r5.xyz, r5.xyxx, t6.xyzw, s0
  add r3.w, r3.w, l(0.010000)
  mul r3.w, r3.w, cb2[29].x
  add r11.xyz, -v9.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  mad r11.xyz, -r3.wwww, r11.xyzx, v9.xyzx
  mad r3.w, v1.w, cb2[29].y, l(1.000000)
  mul_sat r11.xyz, r3.wwww, r11.xyzx
  add r9.xyz, r9.xyzx, -r10.xyzx
  mad r9.xyz, r11.xxxx, r9.xyzx, r10.xyzx
  add r5.xyz, r5.xyzx, -r9.xyzx
  mad r5.xyz, r11.yyyy, r5.xyzx, r9.xyzx
  add r4.xyz, r4.xyzx, -r5.xyzx
  mad r4.xyz, r11.zzzz, r4.xyzx, r5.xyzx
  mad r5.xy, r1.xyxx, cb1[13].xyxx, cb1[13].zwzz
  sample_indexable(texture2d)(float,float,float,float) r5.xy, r5.xyxx, t4.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, r5.yyyy, v3.xxyz
  mad r5.xyz, r5.xxxx, v4.xyzx, r5.yzwy
  mad r5.xyz, r3.wwww, v2.xyzx, r5.xyzx
  dp3 r3.w, r5.xyzx, r5.xyzx
  rsq r3.w, r3.w
  mul r5.xyz, r3.wwww, r5.xyzx
  mad r6.zw, r0.zzzw, cb1[14].xxxy, cb1[14].zzzw
  sample_indexable(texture2d)(float,float,float,float) r6.zw, r6.zwzz, t3.zwxy, s0
  mad r6.zw, r6.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
  dp2 r3.w, r6.zwzz, r6.zwzz
  add r3.w, -r3.w, l(1.000000)
  max r3.w, r3.w, l(0.000000)
  sqrt r3.w, r3.w
  mul r9.xyz, r6.wwww, v3.xyzx
  mad r9.xyz, r6.zzzz, v4.xyzx, r9.xyzx
  mad r9.xyz, r3.wwww, v2.xyzx, r9.xyzx
  dp3 r3.w, r9.xyzx, r9.xyzx
  rsq r3.w, r3.w
  mad r6.zw, r0.xxxy, cb1[15].xxxy, cb1[15].zzzw
  sample_indexable(texture2d)(float,float,float,float) r6.zw, r6.zwzz, t2.zwxy, s0
  mad r6.zw, r6.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
  dp2 r4.w, r6.zwzz, r6.zwzz
  add r4.w, -r4.w, l(1.000000)
  max r4.w, r4.w, l(0.000000)
  sqrt r4.xyzw, r4.xyzw
  mul r10.xyz, r6.wwww, v3.xyzx
  mad r10.xyz, r6.zzzz, v4.xyzx, r10.xyzx
  mad r10.xyz, r4.wwww, v2.xyzx, r10.xyzx
  dp3 r4.w, r10.xyzx, r10.xyzx
  rsq r4.w, r4.w
  mad r6.zw, r1.zzzw, cb1[16].xxxy, cb1[16].zzzw
  sample_indexable(texture2d)(float,float,float,float) r6.zw, r6.zwzz, t1.zwxy, s0
  mad r6.zw, r6.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
  dp2 r5.w, r6.zwzz, r6.zwzz
  add r5.w, -r5.w, l(1.000000)
  max r5.w, r5.w, l(0.000000)
  sqrt r5.w, r5.w
  mul r12.xyz, r6.wwww, v3.xyzx
  mad r12.xyz, r6.zzzz, v4.xyzx, r12.xyzx
  mad r12.xyz, r5.wwww, v2.xyzx, r12.xyzx
  dp3 r5.w, r12.xyzx, r12.xyzx
  rsq r5.w, r5.w
  mad r9.xyz, r9.xyzx, r3.wwww, -r5.xyzx
  mad r5.xyz, r11.xxxx, r9.xyzx, r5.xyzx
  mad r9.xyz, r10.xyzx, r4.wwww, -r5.xyzx
  mad r5.xyz, r11.yyyy, r9.xyzx, r5.xyzx
  mad r9.xyz, r12.xyzx, r5.wwww, -r5.xyzx
  mad r5.xyz, r11.zzzz, r9.xyzx, r5.xyzx
  mad r6.zw, r0.zzzw, cb1[6].xxxy, cb1[6].zzzw
  sample_indexable(texture2d)(float,float,float,float) r9.xyz, r6.zwzz, t10.xyzw, s0
  mad r6.zw, r1.xxxy, cb1[5].xxxy, cb1[5].zzzw
  sample_indexable(texture2d)(float,float,float,float) r10.xyz, r6.zwzz, t11.xyzw, s0
  mad r6.zw, r0.xxxy, cb1[7].xxxy, cb1[7].zzzw
  sample_indexable(texture2d)(float,float,float,float) r12.xyz, r6.zwzz, t17.xyzw, s0
  mad r6.zw, r1.zzzw, cb1[8].xxxy, cb1[8].zzzw
  sample_indexable(texture2d)(float,float,float,float) r13.xyz, r6.zwzz, t16.xyzw, s0
  add r9.xyz, r9.xyzx, -r10.xyzx
  mad r9.xyz, r11.xxxx, r9.xyzx, r10.xyzx
  add r10.xyz, -r9.xyzx, r12.xyzx
  mad r9.xyz, r11.yyyy, r10.xyzx, r9.xyzx
  add r10.xyz, -r9.xyzx, r13.xyzx
  mad r9.xyz, r11.zzzz, r10.xyzx, r9.xyzx
  mad r0.xy, r0.xyxx, cb1[11].xyxx, cb1[11].zwzz
  sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t14.xyzw, s0
  mad r1.xy, r1.xyxx, cb1[9].xyxx, cb1[9].zwzz
  sample_indexable(texture2d)(float,float,float,float) r0.y, r1.xyxx, t12.yxzw, s0
  mad r0.zw, r0.zzzw, cb1[10].xxxy, cb1[10].zzzw
  sample_indexable(texture2d)(float,float,float,float) r0.z, r0.zwzz, t13.yzxw, s0
  mad r1.xy, r1.zwzz, cb1[12].xyxx, cb1[12].zwzz
  sample_indexable(texture2d)(float,float,float,float) r0.w, r1.xyxx, t15.yzwx, s0
  add r0.z, -r0.y, r0.z
  mad r0.y, r11.x, r0.z, r0.y
  add r0.x, -r0.y, r0.x
  mad r0.x, r11.y, r0.x, r0.y
  add r0.y, -r0.x, r0.w
  mad r0.x, r11.z, r0.y, r0.x
  dp3 r0.y, v4.xyzx, v4.xyzx
  rsq r0.y, r0.y
  mul r0.yzw, r0.yyyy, v4.xxyz
  dp3 r1.x, v3.xyzx, v3.xyzx
  rsq r1.x, r1.x
  mul r1.xyz, r1.xxxx, v3.xyzx
  dp3 r1.w, v7.xyzx, v7.xyzx
  rsq r1.w, r1.w
  mul r10.xyz, r1.wwww, v7.xyzx
  dp3 r1.w, r5.xyzx, r5.xyzx
  rsq r1.w, r1.w
  mul r5.xyz, r1.wwww, r5.xyzx
  mul r1.w, cb9[3].y, cb9[3].y
  mul r9.xyz, r1.wwww, r9.xyzx
  mul r0.x, r0.x, cb9[3].z
  sample_indexable(texture2d)(float,float,float,float) r1.w, r6.xyxx, t33.yzwx, s8
  dp3 r3.w, r5.xyzx, r10.xyzx
  add r4.w, r1.w, r3.w
  mad r4.w, r4.w, r4.w, r1.w
  add_sat r4.w, r4.w, l(-1.000000)
  add r3.w, r3.w, r3.w
  mad r10.xyz, r3.wwww, r5.xyzx, -r10.xyzx
  mad r3.w, -r0.x, l(6.500000), l(6.500000)
  min r3.w, r3.w, l(6.000000)
  sample_l_indexable(texturecube)(float,float,float,float) r11.xyz, r10.xyzx, t30.xyzw, s8, r3.w
  sample_l_indexable(texturecube)(float,float,float,float) r12.xyz, r10.xyzx, t31.xyzw, s8, r3.w
  add r12.xyz, -r11.xyzx, r12.xyzx
  mad r11.xyz, cb4[8].xxxx, r12.xyzx, r11.xyzx
  mul r11.xyz, r1.wwww, r11.xyzx
  dp3 r5.w, r10.xyzx, r3.xyzx
  add_sat r5.w, r5.w, l(1.000000)
  mul r5.w, r5.w, r5.w
  mul r10.xyz, r5.wwww, r11.xyzx
  sample_l_indexable(texture2d)(float,float,float,float) r6.xyzw, r6.xyxx, t44.xyzw, s9, r3.w
  mul r6.xyz, r1.wwww, r6.xyzx
  add r3.w, -r6.w, l(1.000000)
  mad r6.xyz, r10.xyzx, r3.wwww, r6.xyzx
  div r2.z, v5.z, v5.w
  mov r2.w, l(1.000000)
  dp4 r10.x, r2.xyzw, cb8[9].xyzw
  dp4 r10.y, r2.xyzw, cb8[10].xyzw
  dp4 r10.z, r2.xyzw, cb8[11].xyzw
  dp4 r3.w, r2.xyzw, cb8[12].xyzw
  div r10.xyz, r10.xyzx, r3.wwww
  lt r11.xyz, cb8[44].xyzx, r10.zzzz
  and r11.xyz, r11.xyzx, l(1, 1, 1, 0)
  iadd r3.w, r11.x, r11.y
  iadd r3.w, r3.w, r11.z
  ishl r3.w, r3.w, l(2)
  dp4 r11.x, r2.xyzw, cb8[r3.w + 28].xyzw
  dp4 r11.y, r2.xyzw, cb8[r3.w + 29].xyzw
  dp4 r11.z, r2.xyzw, cb8[r3.w + 30].xyzw
  dp4 r11.w, r2.xyzw, cb8[r3.w + 31].xyzw
  mul r2.xy, r11.wwww, cb8[18].zwzz
  mov r2.z, l(0)
  add r12.xyzw, r2.xyzz, r11.xyzw
  div r12.xyz, r12.xyzx, r12.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r12.x, r12.xyxx, t32.xxxx, s12, r12.z
  mov r2.w, -r2.x
  add r13.xyzw, r2.ywzz, r11.xyzw
  div r13.xyz, r13.xyzx, r13.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r12.y, r13.xyxx, t32.xxxx, s12, r13.z
  mad r13.xyzw, r2.xyzz, l(-1.000000, -1.000000, 1.000000, 1.000000), r11.xyzw
  div r13.xyz, r13.xyzx, r13.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r12.z, r13.xyxx, t32.xxxx, s12, r13.z
  mad r2.xyzw, r2.yxzz, l(-1.000000, 1.000000, 1.000000, 1.000000), r11.xyzw
  div r2.xyz, r2.xyzx, r2.wwww
  sample_c_lz_indexable(texture2d)(float,float,float,float) r12.w, r2.xyxx, t32.xxxx, s12, r2.z
  dp4 r2.x, r12.xyzw, l(0.250000, 0.250000, 0.250000, 0.250000)
  add r2.x, -r2.x, l(1.000000)
  dp3 r2.y, r10.xyzx, r10.xyzx
  sqrt r2.y, r2.y
  add r2.y, -r2.y, cb8[18].x
  mul_sat r2.y, r2.y, cb8[18].y
  mul r2.yzw, r2.yyyy, cb8[19].xxyz
  mad r2.xyz, -r2.yzwy, r2.xxxx, l(1.000000, 1.000000, 1.000000, 0.000000)
  eq r10.xyzw, cb9[1].xxxx, l(2.000000, 10.000000, 20.000000, 21.000000)
  mad r5.xyz, r5.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
  and r5.xyz, r5.xyzx, r10.xxxx
  mad r3.xyz, r3.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
  movc r3.xyz, r10.yyyy, r3.xyzx, r5.xyzx
  or r2.w, r10.w, r10.z
  movc r3.xyz, r2.wwww, l(0,0,0,0), r3.xyzx
  eq r5.xyzw, cb9[1].xxxx, l(11.000000, 12.000000, 3.000000, 4.000000)
  or r2.w, r5.y, r5.x
  movc r3.xyz, r2.wwww, l(1.000000,1.000000,1.000000,0), r3.xyzx
  movc r3.xyz, r5.zzzz, r0.xxxx, r3.xyzx
  sqrt r5.xyz, r9.xyzx
  add r5.xyz, r5.xyzx, -cb9[1].yyyy
  div r5.xyz, r5.xyzx, cb9[1].zzzz
  mov_sat r9.xyz, r5.xyzx
  movc r3.xyz, r5.wwww, r9.xyzx, r3.xyzx
  eq r9.xyzw, cb9[1].xxxx, l(5.000000, 8.000000, 9.000000, 1.000000)
  ge r0.x, r5.x, l(0.000000)
  ge r2.w, l(1.000000), r5.x
  and r0.x, r0.x, r2.w
  mad r10.xyzw, r5.xxxx, l(0.000000, 4.000000, 0.000000, 4.000000), l(0.000000, 0.000000, 1.000000, -1.000000)
  mad r5.yzw, r10.wwww, l(0.000000, 0.000000, 0.000000, -1.000000), l(0.000000, 0.000000, 1.000000, 1.000000)
  lt r11.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, r11.zzzz, r13.xyzx, r12.xyzx
  movc r5.xyz, r11.yyyy, r5.yzwy, r12.xyzx
  movc r5.xyz, r11.xxxx, r10.xyzx, r5.xyzx
  and r5.xyz, r0.xxxx, r5.xyzx
  movc r3.xyz, r9.xxxx, r5.xyzx, r3.xyzx
  or r0.x, r9.z, r9.y
  movc r3.xyz, r0.xxxx, l(0,0,0,0), r3.xyzx
  movc r3.xyz, r9.wwww, r4.xyzx, r3.xyzx
  eq r5.xyzw, cb9[1].xxxx, l(49.000000, 34.000000, 30.000000, 32.000000)
  dp3 r0.x, l(0.298910, 0.586610, 0.114480, 0.000000), r4.xyzx
  lt r2.w, r0.x, l(0.125490)
  lt r3.w, l(0.952941), r0.x
  movc r4.xyz, r3.wwww, l(0,1.000000,0,0), r0.xxxx
  movc r4.xyz, r2.wwww, l(1.000000,0,0,0), r4.xyzx
  movc r3.xyz, r5.xxxx, r4.xyzx, r3.xyzx
  movc r3.xyz, r5.yyyy, r4.wwww, r3.xyzx
  or r0.x, r5.w, r5.z
  movc r3.xyz, r0.xxxx, r1.wwww, r3.xyzx
  eq r4.xyzw, cb9[1].xxxx, l(33.000000, 31.000000, 13.000000, 14.000000)
  or r0.x, r4.y, r4.x
  movc r3.xyz, r0.xxxx, l(1.000000,1.000000,1.000000,0), r3.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, r4.zzzz, r1.xyzx, r3.xyzx
  mad r0.xyz, r0.yzwy, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
  movc r0.xyz, r4.wwww, r0.xyzx, r1.xyzx
  eq r1.xyzw, cb9[1].xxxx, l(17.000000, 55.000000, 16.000000, 40.000000)
  or r0.w, r1.y, r1.x
  movc r0.xyz, r0.wwww, l(0,0,0,0), r0.xyzx
  add r0.w, v5.w, -cb9[1].y
  add r1.x, -cb9[1].y, cb9[1].z
  div_sat r0.w, r0.w, r1.x
  movc r0.xyz, r1.zzzz, r0.wwww, r0.xyzx
  movc r0.xyz, r1.wwww, r2.xyzx, r0.xyzx
  eq r1.xyzw, cb9[1].xxxx, l(41.000000, 42.000000, 48.000000, 50.000000)
  or r0.w, r1.y, r1.x
  movc r0.xyz, r0.wwww, l(0,0,0,0), r0.xyzx
  movc r0.xyz, r1.zzzz, r6.xyzx, r0.xyzx
  movc r0.xyz, r1.wwww, l(0.200000,0.800000,0,0), r0.xyzx
  eq r1.xyzw, cb9[1].xxxx, l(15.000000, 60.000000, 61.000000, 62.000000)
  or r0.w, r1.y, r1.x
  or r0.w, r1.z, r0.w
  or r0.w, r1.w, r0.w
  movc r8.xyz, r0.wwww, l(0,0,0,0), r0.xyzx
endif 
movc r0.xyz, r7.yyyy, cb9[1].yyyy, r8.xyzx
movc r0.xyz, r7.zzzz, cb9[1].zzzz, r0.xyzx
movc r0.xyz, r7.wwww, v9.xyzx, r0.xyzx
eq r1.xy, cb9[1].xxxx, l(76.000000, 77.000000, 0.000000, 0.000000)
or r0.w, r1.y, r1.x
movc o0.xyz, r0.wwww, l(0,0,0,0), r0.xyzx
ret 
// Approximately 534 instruction slots used

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