// ---- Created with 3Dmigoto v1.2.35 on Tue Apr 26 22:31:23 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 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 cbTextureTilingScale : register(b1)
{
  float4 FC_TextureTilingScale[25] : packoffset(c0);
}

SamplerState SS_DiffuseMap_s : register(s0);
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);


// 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,
  float2 v8 : TEXCOORD0,
  float2 w8 : TEXCOORD2,
  float3 v9 : TEXCOORD17,
  uint v10 : SV_IsFrontFace0,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = MultiBlend4_et1_p_snp_0_float_2_0 * v8.xy;
  r0.xy = r0.xy * FC_TextureTilingScale[0].xy + FC_TextureTilingScale[0].zw;
  r0.x = MultiBlend4_et1_p_snp_0_Texture2D_0.Sample(SS_DiffuseMap_s, r0.xy).x;
  r1.x = dot(v7.xyz, v4.xyz);
  r1.y = dot(v7.xyz, v3.xyz);
  r1.z = dot(v7.xyz, v2.xyz);
  r0.yz = v8.xy * FC_TextureTilingScale[14].xy + FC_TextureTilingScale[14].zw;
  r0.w = dot(-r1.xy, -r1.xy);
  r0.w = rsqrt(r0.w);
  r2.xy = -r1.xy * r0.ww;
  r0.w = dot(-r1.xyz, -r1.xyz);
  r0.w = -r1.z * r1.z + r0.w;
  r0.w = sqrt(r0.w);
  r0.w = r0.w / -r1.z;
  r1.xy = r2.xy * r0.ww;
  r1.xy = MultiBlend4_et1_p_snp_0_float_3_0 * r1.xy;
  r0.w = dot(-v7.xyz, -v7.xyz);
  r0.w = rsqrt(r0.w);
  r2.xyz = -v7.xyz * r0.www;
  r0.w = dot(v2.xyz, v2.xyz);
  r0.w = rsqrt(r0.w);
  r3.xyz = v2.xyz * r0.www;
  r1.zw = ddx_coarse(r0.yz);
  r4.xy = ddy_coarse(r0.yz);
  r4.zw = abs(r4.xy) + abs(r1.zw);
  MultiBlend4_et1_p_snp_0_Texture2D_14.GetDimensions(0, uiDest.x, uiDest.y, uiDest.z);
  r5.xy = uiDest.xy;
  r5.xy = (uint2)r5.xy;
  r4.zw = r5.xy * r4.zw;
  r0.w = max(r4.z, r4.w);
  r0.w = log2(r0.w);
  r0.w = max(0, r0.w);
  r2.w = cmp(4 >= r0.w);
  if (r2.w != 0) {
    r2.w = dot(r2.xyz, r3.xyz);
    r2.w = abs(r2.w) * -12 + 16;
    r3.w = (int)r2.w;
    r2.w = trunc(r2.w);
    r2.w = 1 / r2.w;
    r4.zw = r0.yz;
    r6.x = 0;
    r5.zw = float2(1,1);
    r7.xyzw = float4(0,0,0,0);
    while (true) {
      r6.y = cmp((int)r6.x >= (int)r3.w);
      if (r6.y != 0) break;
      r4.zw = -r2.ww * r1.xy + r4.zw;
      r6.y = MultiBlend4_et1_p_snp_0_Texture2D_14.SampleGrad(SS_DiffuseMap_s, r4.zw, r1.w, r4.y).w;
      r5.x = r5.z + -r2.w;
      r6.z = cmp(r5.x < r6.y);
      r6.w = r6.z ? r3.w : r6.x;
      r5.y = r6.y;
      r7.xyzw = r6.zzzz ? r5.xyzw : r7.xyzw;
      r6.x = (int)r6.w + 1;
      r5.w = r6.y;
      r5.z = r5.x;
    }
    r1.zw = r7.zx + -r7.wy;
    r2.w = r1.z + -r1.w;
    r1.w = r7.z * r1.w;
    r1.z = r7.x * r1.z + -r1.w;
    r1.z = r1.z / r2.w;
    r1.z = 1 + -r1.z;
    r1.zw = -r1.xy * r1.zz + r0.yz;
    r2.w = cmp(3 < r0.w);
    r3.w = trunc(r0.w);
    r0.w = -r3.w + r0.w;
    r4.xy = -r1.zw + r0.yz;
    r4.xy = r0.ww * r4.xy + r1.zw;
    r1.zw = r2.ww ? r4.xy : r1.zw;
  } else {
    r1.zw = r0.yz;
  }
  r0.yz = r1.zw + -r0.yz;
  r0.yz = v8.xy + r0.yz;
  r0.yz = r0.yz * FC_TextureTilingScale[2].xy + FC_TextureTilingScale[2].zw;
  r0.yzw = MultiBlend4_et1_p_snp_0_Texture2D_2.Sample(SS_DiffuseMap_s, r0.yz).xyz;
  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 * r1.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 = -r1.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;
  }
  r1.zw = r4.xy + -r1.zw;
  r1.zw = v8.xy + r1.zw;
  r1.zw = r1.zw * FC_TextureTilingScale[1].xy + FC_TextureTilingScale[1].zw;
  r4.xyz = MultiBlend4_et1_p_snp_0_Texture2D_1.Sample(SS_DiffuseMap_s, r1.zw).xyz;
  r1.zw = v8.xy * FC_TextureTilingScale[16].xy + FC_TextureTilingScale[16].zw;
  r5.xy = ddx_coarse(r1.zw);
  r5.zw = ddy_coarse(r1.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;
    r4.w = (int)r3.w;
    r3.w = trunc(r3.w);
    r3.w = 1 / r3.w;
    r6.xy = r1.zw;
    r6.z = 0;
    r7.zw = float2(1,1);
    r8.xyzw = float4(0,0,0,0);
    while (true) {
      r6.w = cmp((int)r6.z >= (int)r4.w);
      if (r6.w != 0) break;
      r6.xy = -r3.ww * r1.xy + r6.xy;
      r6.w = MultiBlend4_et1_p_snp_0_Texture2D_16.SampleGrad(SS_DiffuseMap_s, r6.xy, r5.x, r5.z).w;
      r7.x = r7.z + -r3.w;
      r9.x = cmp(r7.x < r6.w);
      r9.y = r9.x ? r4.w : r6.z;
      r7.y = r6.w;
      r8.xyzw = r9.xxxx ? r7.xyzw : r8.xyzw;
      r6.z = (int)r9.y + 1;
      r7.w = r6.w;
      r7.z = r7.x;
    }
    r3.w = r8.z + -r8.w;
    r4.w = r8.x + -r8.y;
    r5.x = -r4.w + r3.w;
    r4.w = r8.z * r4.w;
    r3.w = r8.x * r3.w + -r4.w;
    r3.w = r3.w / r5.x;
    r3.w = 1 + -r3.w;
    r5.xy = -r1.xy * r3.ww + r1.zw;
    r3.w = cmp(3 < r2.w);
    r4.w = trunc(r2.w);
    r2.w = -r4.w + r2.w;
    r5.zw = -r5.xy + r1.zw;
    r5.zw = r2.ww * r5.zw + r5.xy;
    r5.xy = r3.ww ? r5.zw : r5.xy;
  } else {
    r5.xy = r1.zw;
  }
  r1.zw = r5.xy + -r1.zw;
  r1.zw = v8.xy + r1.zw;
  r1.zw = r1.zw * FC_TextureTilingScale[4].xy + FC_TextureTilingScale[4].zw;
  r5.xyz = MultiBlend4_et1_p_snp_0_Texture2D_4.Sample(SS_DiffuseMap_s, r1.zw).xyz;
  r1.zw = v8.xy * FC_TextureTilingScale[15].xy + FC_TextureTilingScale[15].zw;
  r6.xy = ddx_coarse(r1.zw);
  r6.zw = ddy_coarse(r1.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;
    r3.xy = r1.zw;
    r2.z = 0;
    r7.zw = float2(1,1);
    r8.xyzw = float4(0,0,0,0);
    while (true) {
      r3.z = cmp((int)r2.z >= (int)r2.y);
      if (r3.z != 0) break;
      r3.xy = -r2.xx * r1.xy + r3.xy;
      r3.z = MultiBlend4_et1_p_snp_0_Texture2D_15.SampleGrad(SS_DiffuseMap_s, r3.xy, r6.x, r6.z).w;
      r7.x = r7.z + -r2.x;
      r3.w = cmp(r7.x < r3.z);
      r4.w = r3.w ? r2.y : r2.z;
      r7.y = r3.z;
      r8.xyzw = r3.wwww ? r7.xyzw : r8.xyzw;
      r2.z = (int)r4.w + 1;
      r7.w = r3.z;
      r7.z = r7.x;
    }
    r2.xy = r8.zx + -r8.wy;
    r2.z = r2.x + -r2.y;
    r2.y = r8.z * r2.y;
    r2.x = r8.x * r2.x + -r2.y;
    r2.x = r2.x / r2.z;
    r2.x = 1 + -r2.x;
    r1.xy = -r1.xy * r2.xx + r1.zw;
    r2.x = cmp(3 < r2.w);
    r2.y = trunc(r2.w);
    r2.y = r2.w + -r2.y;
    r2.zw = r1.zw + -r1.xy;
    r2.yz = r2.yy * r2.zw + r1.xy;
    r1.xy = r2.xx ? r2.yz : r1.xy;
  } else {
    r1.xy = r1.zw;
  }
  r1.xy = r1.xy + -r1.zw;
  r1.xy = v8.xy + r1.xy;
  r1.xy = r1.xy * FC_TextureTilingScale[3].xy + FC_TextureTilingScale[3].zw;
  r1.xyz = MultiBlend4_et1_p_snp_0_Texture2D_3.Sample(SS_DiffuseMap_s, r1.xy).xyz;
  r0.x = 0.00999999978 + r0.x;
  r0.x = MultiBlend4_et1_p_snp_0_float_0_0 * r0.x;
  r2.xyz = float3(1,1,1) + -v9.xyz;
  r2.xyz = -r0.xxx * r2.xyz + v9.xyz;
  r0.x = v1.w * MultiBlend4_et1_p_snp_0_float_1_0 + 1;
  r2.xyz = saturate(r2.xyz * r0.xxx);
  r0.xyz = -r4.xyz + r0.yzw;
  r0.xyz = r2.xxx * r0.xyz + r4.xyz;
  r1.xyz = r1.xyz + -r0.xyz;
  r0.xyz = r2.yyy * r1.xyz + r0.xyz;
  r1.xyz = r5.xyz + -r0.xyz;
  o0.xyz = r2.zzz * r1.xyz + r0.xyz;
  o0.w = VC_InstanceData[0].mulCol.w;
  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 [unused]
//   float FC_TranslucencyScale;        // Offset:   16 Size:     4 [unused]
//   float4 FC_EmissiveColor;           // Offset:   32 Size:    16 [unused]
//   float4 FC_BlendMaskParam;          // Offset:   48 Size:    16 [unused]
//   float FC_PomHeightScale;           // Offset:   64 Size:     4 [unused]
//   float FC_PomHeightBias;            // Offset:   68 Size:     4 [unused]
//   float FC_PomMinSamples;            // Offset:   72 Size:     4 [unused]
//   float FC_PomMaxSamples;            // Offset:   76 Size:     4 [unused]
//   float FC_PomShadowSoftening;       // Offset:   80 Size:     4 [unused]
//   bool FC_bPomDisplayShadows;        // Offset:   84 Size:     4 [unused]
//   float4 FC_ParallaxParam;           // Offset:   96 Size:    16 [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 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 cbTextureTilingScale
// {
//
//   float4 FC_TextureTilingScale[25];  // Offset:    0 Size:   400
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SS_DiffuseMap                     sampler      NA          NA    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
// cbTextureTilingScale              cbuffer      NA          NA    1        1
// buffer2                           cbuffer      NA          NA    2        1
// cbInstanceData                    cbuffer      NA          NA    4        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       
// POSITION                 2   xyzw        6     NONE   float       
// TEXCOORD                29   xyz         7     NONE   float   xyz 
// TEXCOORD                 0   xy          8     NONE   float   xy  
// TEXCOORD                 2     zw        8     NONE   float       
// 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 cb4[8], immediateIndexed
dcl_constantbuffer cb1[17], immediateIndexed
dcl_sampler s0, mode_default
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_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 v7.xyz
dcl_input_ps linear v8.xy
dcl_input_ps linear v9.xyz
dcl_output o0.xyzw
dcl_temps 10
mul r0.xy, v8.xyxx, cb2[29].zzzz
mad r0.xy, r0.xyxx, cb1[0].xyxx, cb1[0].zwzz
sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t9.xyzw, s0
dp3 r1.x, v7.xyzx, v4.xyzx
dp3 r1.y, v7.xyzx, v3.xyzx
dp3 r1.z, v7.xyzx, v2.xyzx
mad r0.yz, v8.xxyx, cb1[14].xxyx, cb1[14].zzwz
dp2 r0.w, -r1.xyxx, -r1.xyxx
rsq r0.w, r0.w
mul r2.xy, r0.wwww, -r1.xyxx
dp3 r0.w, -r1.xyzx, -r1.xyzx
mad r0.w, -r1.z, r1.z, r0.w
sqrt r0.w, r0.w
div r0.w, r0.w, -r1.z
mul r1.xy, r0.wwww, r2.xyxx
mul r1.xy, r1.xyxx, cb2[29].wwww
dp3 r0.w, -v7.xyzx, -v7.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, -v7.xyzx
dp3 r0.w, v2.xyzx, v2.xyzx
rsq r0.w, r0.w
mul r3.xyz, r0.wwww, v2.xyzx
deriv_rtx_coarse r1.zw, r0.yyyz
deriv_rty_coarse r4.xy, r0.yzyy
add r4.zw, |r1.zzzw|, |r4.xxxy|
resinfo_indexable(texture2d)(float,float,float,float)_uint r5.xy, l(0), t3.xyzw
utof r5.xy, r5.xyxx
mul r4.zw, r4.zzzw, r5.xxxy
max r0.w, r4.w, r4.z
log r0.w, r0.w
max r0.w, r0.w, l(0.000000)
ge r2.w, l(4.000000), r0.w
if_nz r2.w
  dp3 r2.w, r2.xyzx, r3.xyzx
  mad r2.w, |r2.w|, l(-12.000000), l(16.000000)
  ftoi r3.w, r2.w
  round_z r2.w, r2.w
  div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.w
  mov r4.zw, r0.yyyz
  mov r6.x, l(0)
  mov r5.zw, l(0,0,1.000000,1.000000)
  mov r7.xyzw, l(0,0,0,0)
  loop 
    ige r6.y, r6.x, r3.w
    breakc_nz r6.y
    mad r4.zw, -r2.wwww, r1.xxxy, r4.zzzw
    sample_d_indexable(texture2d)(float,float,float,float) r6.y, r4.zwzz, t3.xwyz, s0, r1.zwzz, r4.xyxx
    add r5.x, -r2.w, r5.z
    lt r6.z, r5.x, r6.y
    movc r6.w, r6.z, r3.w, r6.x
    mov r5.y, r6.y
    movc r7.xyzw, r6.zzzz, r5.xyzw, r7.xyzw
    iadd r6.x, r6.w, l(1)
    mov r5.w, r6.y
    mov r5.z, r5.x
  endloop 
  add r1.zw, -r7.wwwy, r7.zzzx
  add r2.w, -r1.w, r1.z
  mul r1.w, r1.w, r7.z
  mad r1.z, r7.x, r1.z, -r1.w
  div r1.z, r1.z, r2.w
  add r1.z, -r1.z, l(1.000000)
  mad r1.zw, -r1.xxxy, r1.zzzz, r0.yyyz
  lt r2.w, l(3.000000), r0.w
  round_z r3.w, r0.w
  add r0.w, r0.w, -r3.w
  add r4.xy, r0.yzyy, -r1.zwzz
  mad r4.xy, r0.wwww, r4.xyxx, r1.zwzz
  movc r1.zw, r2.wwww, r4.xxxy, r1.zzzw
else 
  mov r1.zw, r0.yyyz
endif 
add r0.yz, -r0.yyzy, r1.zzwz
add r0.yz, r0.yyzy, v8.xxyx
mad r0.yz, r0.yyzy, cb1[2].xxyx, cb1[2].zzwz
sample_indexable(texture2d)(float,float,float,float) r0.yzw, r0.yzyy, t8.wxyz, s0
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, r1.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, -r1.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 
add r1.zw, -r1.zzzw, r4.xxxy
add r1.zw, r1.zzzw, v8.xxxy
mad r1.zw, r1.zzzw, cb1[1].xxxy, cb1[1].zzzw
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r1.zwzz, t7.xyzw, s0
mad r1.zw, v8.xxxy, cb1[16].xxxy, cb1[16].zzzw
deriv_rtx_coarse r5.xy, r1.zwzz
deriv_rty_coarse r5.zw, r1.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 r4.w, r3.w
  round_z r3.w, r3.w
  div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
  mov r6.xy, r1.zwzz
  mov r6.z, l(0)
  mov r7.zw, l(0,0,1.000000,1.000000)
  mov r8.xyzw, l(0,0,0,0)
  loop 
    ige r6.w, r6.z, r4.w
    breakc_nz r6.w
    mad r6.xy, -r3.wwww, r1.xyxx, r6.xyxx
    sample_d_indexable(texture2d)(float,float,float,float) r6.w, r6.xyxx, t1.xyzw, s0, r5.xyxx, r5.zwzz
    add r7.x, -r3.w, r7.z
    lt r9.x, r7.x, r6.w
    movc r9.y, r9.x, r4.w, r6.z
    mov r7.y, r6.w
    movc r8.xyzw, r9.xxxx, r7.xyzw, r8.xyzw
    iadd r6.z, r9.y, l(1)
    mov r7.w, r6.w
    mov r7.z, r7.x
  endloop 
  add r3.w, -r8.w, r8.z
  add r4.w, -r8.y, r8.x
  add r5.x, r3.w, -r4.w
  mul r4.w, r4.w, r8.z
  mad r3.w, r8.x, r3.w, -r4.w
  div r3.w, r3.w, r5.x
  add r3.w, -r3.w, l(1.000000)
  mad r5.xy, -r1.xyxx, r3.wwww, r1.zwzz
  lt r3.w, l(3.000000), r2.w
  round_z r4.w, r2.w
  add r2.w, r2.w, -r4.w
  add r5.zw, r1.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, r1.zwzz
endif 
add r1.zw, -r1.zzzw, r5.xxxy
add r1.zw, r1.zzzw, v8.xxxy
mad r1.zw, r1.zzzw, cb1[4].xxxy, cb1[4].zzzw
sample_indexable(texture2d)(float,float,float,float) r5.xyz, r1.zwzz, t5.xyzw, s0
mad r1.zw, v8.xxxy, cb1[15].xxxy, cb1[15].zzzw
deriv_rtx_coarse r6.xy, r1.zwzz
deriv_rty_coarse r6.zw, r1.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 r3.xy, r1.zwzz
  mov r2.z, l(0)
  mov r7.zw, l(0,0,1.000000,1.000000)
  mov r8.xyzw, l(0,0,0,0)
  loop 
    ige r3.z, r2.z, r2.y
    breakc_nz r3.z
    mad r3.xy, -r2.xxxx, r1.xyxx, r3.xyxx
    sample_d_indexable(texture2d)(float,float,float,float) r3.z, r3.xyxx, t2.xywz, s0, r6.xyxx, r6.zwzz
    add r7.x, -r2.x, r7.z
    lt r3.w, r7.x, r3.z
    movc r4.w, r3.w, r2.y, r2.z
    mov r7.y, r3.z
    movc r8.xyzw, r3.wwww, r7.xyzw, r8.xyzw
    iadd r2.z, r4.w, l(1)
    mov r7.w, r3.z
    mov r7.z, r7.x
  endloop 
  add r2.xy, -r8.wyww, r8.zxzz
  add r2.z, -r2.y, r2.x
  mul r2.y, r2.y, r8.z
  mad r2.x, r8.x, r2.x, -r2.y
  div r2.x, r2.x, r2.z
  add r2.x, -r2.x, l(1.000000)
  mad r1.xy, -r1.xyxx, r2.xxxx, r1.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, -r1.xxxy, r1.zzzw
  mad r2.yz, r2.yyyy, r2.zzwz, r1.xxyx
  movc r1.xy, r2.xxxx, r2.yzyy, r1.xyxx
else 
  mov r1.xy, r1.zwzz
endif 
add r1.xy, -r1.zwzz, r1.xyxx
add r1.xy, r1.xyxx, v8.xyxx
mad r1.xy, r1.xyxx, cb1[3].xyxx, cb1[3].zwzz
sample_indexable(texture2d)(float,float,float,float) r1.xyz, r1.xyxx, t6.xyzw, s0
add r0.x, r0.x, l(0.010000)
mul r0.x, r0.x, cb2[29].x
add r2.xyz, -v9.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad r2.xyz, -r0.xxxx, r2.xyzx, v9.xyzx
mad r0.x, v1.w, cb2[29].y, l(1.000000)
mul_sat r2.xyz, r0.xxxx, r2.xyzx
add r0.xyz, r0.yzwy, -r4.xyzx
mad r0.xyz, r2.xxxx, r0.xyzx, r4.xyzx
add r1.xyz, -r0.xyzx, r1.xyzx
mad r0.xyz, r2.yyyy, r1.xyzx, r0.xyzx
add r1.xyz, -r0.xyzx, r5.xyzx
mad o0.xyz, r2.zzzz, r1.xyzx, r0.xyzx
mov o0.w, cb4[7].w
ret 
// Approximately 257 instruction slots used

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