//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Mon Feb 08 02:06:32 2016
//
//
// Buffer Definitions: 
//
// cbuffer SkinningBuffer
// {
//
//   struct SkinningStruct
//   {
//       
//       float NumSkinMatricesPerInstance;// Offset:    0
//       row_major float4x4 SkinMatrices[1023];// Offset:   16
//
//   } SkinningParameters;              // Offset:    0 Size: 65488
//
// }
//
// cbuffer SceneBuffer
// {
//
//   row_major float4x4 View;           // Offset:    0 Size:    64
//   row_major float4x4 ScreenMatrix;   // Offset:   64 Size:    64 [unused]
//   float2 DepthExportScale;           // Offset:  128 Size:     8 [unused]
//   float2 __padding0;                 // Offset:  136 Size:     8 [unused]
//   float4 FogParams;                  // Offset:  144 Size:    16 [unused]
//   float3 __CameraPosition;           // Offset:  160 Size:    12 [unused]
//   float __padding12;                 // Offset:  172 Size:     4 [unused]
//   float3 CameraDirection;            // Offset:  176 Size:    12 [unused]
//   float __padding9;                  // Offset:  188 Size:     4 [unused]
//   float3 DepthFactors;               // Offset:  192 Size:    12 [unused]
//   float __padding10;                 // Offset:  204 Size:     4 [unused]
//   float3 ShadowDepthBiasAndLightType;// Offset:  208 Size:    12 [unused]
//   float __padding11;                 // Offset:  220 Size:     4 [unused]
//   float4 SubframeViewport;           // Offset:  224 Size:    16 [unused]
//   row_major float3x4 DepthToWorld;   // Offset:  240 Size:    48 [unused]
//   float4 DepthToView;                // Offset:  288 Size:    16 [unused]
//   float4 OneOverDepthToView;         // Offset:  304 Size:    16 [unused]
//   float4 DepthToW;                   // Offset:  320 Size:    16 [unused]
//   float4 ClipPlane;                  // Offset:  336 Size:    16 [unused]
//   float2 ViewportDepthScaleOffset;   // Offset:  352 Size:     8 [unused]
//   float2 __padding1;                 // Offset:  360 Size:     8 [unused]
//   float2 ColorDOFDepthScaleOffset;   // Offset:  368 Size:     8 [unused]
//   float2 __padding2;                 // Offset:  376 Size:     8 [unused]
//   float4 TimeVector;                 // Offset:  384 Size:    16 [unused]
//   float4 FogParams2;                 // Offset:  400 Size:    16 [unused]
//   float4 FogParams3;                 // Offset:  416 Size:    16 [unused]
//   float3 GlobalAmbient;              // Offset:  432 Size:    12 [unused]
//   float __padding8;                  // Offset:  444 Size:     4 [unused]
//   float4 GlobalParams[16];           // Offset:  448 Size:   256 [unused]
//   float4 ViewToFogH;                 // Offset:  704 Size:    16 [unused]
//   float4 ScreenExtents;              // Offset:  720 Size:    16 [unused]
//   float2 ScreenResolution;           // Offset:  736 Size:     8 [unused]
//   float2 __padding3;                 // Offset:  744 Size:     8 [unused]
//   float4 PSSMToMap1Lin;              // Offset:  752 Size:    16 [unused]
//   float4 PSSMToMap1Const;            // Offset:  768 Size:    16 [unused]
//   float4 PSSMToMap2Lin;              // Offset:  784 Size:    16 [unused]
//   float4 PSSMToMap2Const;            // Offset:  800 Size:    16 [unused]
//   float4 PSSMToMap3Lin;              // Offset:  816 Size:    16 [unused]
//   float4 PSSMToMap3Const;            // Offset:  832 Size:    16 [unused]
//   float4 PSSMDistances;              // Offset:  848 Size:    16 [unused]
//   row_major float4x4 WorldToPSSM0;   // Offset:  864 Size:    64 [unused]
//   row_major float4x4 PrevViewProject;// Offset:  928 Size:    64 [unused]
//   row_major float4x4 PrevWorld;      // Offset:  992 Size:    64 [unused]
//   row_major float4x4 ViewT;          // Offset: 1056 Size:    64 [unused]
//   float4 PSSMExtents;                // Offset: 1120 Size:    16 [unused]
//   float4 ShadowAtlasResolution;      // Offset: 1136 Size:    16 [unused]
//   float4 UnitRimData[3];             // Offset: 1152 Size:    48 [unused]
//   float3 __CameraPositionForCorrection;// Offset: 1200 Size:    12 [unused]
//   float __padding7;                  // Offset: 1212 Size:     4 [unused]
//   row_major float4x4 CameraViewProject;// Offset: 1216 Size:    64 [unused]
//   float4 BackBufferResolution;       // Offset: 1280 Size:    16 [unused]
//   row_major float4x4 InverseProjection;// Offset: 1296 Size:    64 [unused]
//   float4 StereoOffset;               // Offset: 1360 Size:    16 [unused]
//   row_major float4x4 Projection;     // Offset: 1376 Size:    64 [unused]
//   row_major float4x4 ViewInv;        // Offset: 1440 Size:    64 [unused]
//   float4 ColorSSAO;                  // Offset: 1504 Size:    16 [unused]
//   float4 GlobalFogColor;             // Offset: 1520 Size:    16 [unused]
//   float4 VolumetricLightGlobalParams;// Offset: 1536 Size:    16 [unused]
//   float4 SnowParams01;               // Offset: 1552 Size:    16 [unused]
//   float4 SnowParams02;               // Offset: 1568 Size:    16 [unused]
//   float4 SnowParams03;               // Offset: 1584 Size:    16 [unused]
//   int SSREnabled;                    // Offset: 1600 Size:     4 [unused]
//   int __padding4;                    // Offset: 1604 Size:     4 [unused]
//   int __padding5;                    // Offset: 1608 Size:     4 [unused]
//   int __padding6;                    // Offset: 1612 Size:     4 [unused]
//
// }
//
// cbuffer StreamDeclBuffer
// {
//
//   float4 NormalScaleOffset;          // Offset:    0 Size:    16
//   float4 TexcoordScales;             // Offset:   16 Size:    16
//
// }
//
// cbuffer LightBuffer
// {
//
//   struct Light
//   {
//       
//       float4 position;               // Offset:    0
//       float3 direction;              // Offset:   16
//       float4 attParams;              // Offset:   32
//       float4 spotParams;             // Offset:   48
//       float4 diffuseColor;           // Offset:   64
//       float4 shadowFadeParams;       // Offset:   80
//
//   } ShadowLights[3];                 // Offset:    0 Size:   288 [unused]
//   
//   struct Light
//   {
//       
//       float4 position;               // Offset:  288
//       float3 direction;              // Offset:  304
//       float4 attParams;              // Offset:  320
//       float4 spotParams;             // Offset:  336
//       float4 diffuseColor;           // Offset:  352
//       float4 shadowFadeParams;       // Offset:  368
//
//   } NonShadowLights[3];              // Offset:  288 Size:   288 [unused]
//   
//   struct Light
//   {
//       
//       float4 position;               // Offset:  576
//       float3 direction;              // Offset:  592
//       float4 attParams;              // Offset:  608
//       float4 spotParams;             // Offset:  624
//       float4 diffuseColor;           // Offset:  640
//       float4 shadowFadeParams;       // Offset:  656
//
//   } SunLight;                        // Offset:  576 Size:    96 [unused]
//   row_major float4x4 WorldToShadowMap[3];// Offset:  672 Size:   192 [unused]
//   row_major float3x4 WorldToModulationMapSpot[2];// Offset:  864 Size:    96 [unused]
//   row_major float2x4 WorldToModulationMapSun;// Offset:  960 Size:    32 [unused]
//   bool ShadowLightEnabled[3];        // Offset:  992 Size:    36 [unused]
//   bool NonShadowLightEnabled[3];     // Offset: 1040 Size:    36 [unused]
//   bool SunLightEnabled;              // Offset: 1088 Size:     4 [unused]
//   float4 LightAndProbeSet[24];       // Offset: 1104 Size:   384
//   float4 LightSetInfo;               // Offset: 1488 Size:    16
//   float4 ProbeSetInfo;               // Offset: 1504 Size:    16 [unused]
//
// }
//
// Resource bind info for LightDataBuffer
// {
//
//   struct STiledLightData
//   {
//       
//       float3 vPosition;              // Offset:    0
//       float fSegmentLength;          // Offset:   12
//       float3 vDirection;             // Offset:   16
//       float fMinShadowSpec;          // Offset:   28
//       float4 vAttParams;             // Offset:   32
//       float3 vSpotParams;            // Offset:   48
//       float fIntensity;              // Offset:   60
//       float4 vDiffuseColor;          // Offset:   64
//       float4 vShadowFadeParams;      // Offset:   80
//       uint uRelCen;                  // Offset:   96
//       uint uFxSpecificIdx;           // Offset:  100
//       uint uFxType;                  // Offset:  104
//       float fRadiusSquared;          // Offset:  108
//       float3 vLambertWeights;        // Offset:  112
//       float fSpecularStrength;       // Offset:  124
//       float3 vBoxAxisX;              // Offset:  128
//       uint uLightType;               // Offset:  140
//       float3 vBoxAxisZ;              // Offset:  144
//       uint bShadowEnabled;           // Offset:  156
//       float3 vBoxInnerDistance;      // Offset:  160
//       uint bModulationMapEnabled;    // Offset:  172
//       float3 vBoxInvRange;           // Offset:  176
//       uint uModulationMapIndex;      // Offset:  188
//       row_major float4x4 mViewToShadowMap;// Offset:  192
//       row_major float4x4 mViewToModulationMap;// Offset:  256
//       float3 vRecipOuterColiProxy;   // Offset:  320
//       uint uProbeFlags;              // Offset:  332
//       float3 vColixProxyCen;         // Offset:  336
//       uint bForwardOnly;             // Offset:  348
//       uint uShadowType;              // Offset:  352
//       uint uNumSoftShadowSamples;    // Offset:  356
//       float fSoftShadowRadius;       // Offset:  360
//       float fSoftShadowDepthBias;    // Offset:  364
//       float fSoftShadowExponent;     // Offset:  368
//       float fProbePriority;          // Offset:  372
//       float fUnusedParam[2];         // Offset:  376
//
//   } $Element;                        // Offset:    0 Size:   384
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SamplerGenericBilinearWrap        sampler      NA          NA   12        1
// SamplerGenericBilinearClamp       sampler      NA          NA   13        1
// AttenuationSampler_texture        texture  float4          2d   42        1
// LightDataBuffer                   texture  struct         r/o   43        1
// ModulationMaps                    texture  float4     2darray   45        1
// SkinningBuffer                    cbuffer      NA          NA    1        1
// SceneBuffer                       cbuffer      NA          NA    2        1
// StreamDeclBuffer                  cbuffer      NA          NA    3        1
// LightBuffer                       cbuffer      NA          NA   11        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// NORMAL                   0   xyz         0     NONE   float   xyz 
// BLENDINDICES             0   xyzw        1     NONE   float   x   
// COLOR                    0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 0   xyzw        3     NONE   float   xy  
// POSITION                 0   xyz         4     NONE   float   xyz 
// TANGENT                  0   xyz         5     NONE   float   xyz 
// SV_InstanceID            0   x           6   INSTID    uint   x   
// SV_VertexID              0   x           7   VERTID    uint       
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// PSIZE                    0   x           0     NONE    uint   x   
// POSITION                 0   xyzw        1     NONE   float   xyzw
// COLOR                    0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 0   xyzw        3     NONE   float   xyzw
// TEXCOORD                 2   xyz         4     NONE   float   xyz 
// TEXCOORD                 3   xyz         5     NONE   float   xyz 
// TEXCOORD                 4   xyz         6     NONE   float   xyz 
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[4092], dynamicIndexed
dcl_constantbuffer cb2[4], immediateIndexed
dcl_constantbuffer cb3[2], immediateIndexed
dcl_constantbuffer cb11[94], dynamicIndexed
dcl_sampler s12, mode_default
dcl_sampler s13, mode_default
dcl_resource_texture2d (float,float,float,float) t42
dcl_resource_structured t43, 384 
dcl_resource_texture2darray (float,float,float,float) t45
dcl_input v0.xyz
dcl_input v1.x
dcl_input v2.xyzw
dcl_input v3.xy
dcl_input v4.xyz
dcl_input v5.xyz
dcl_input_sgv v6.x, instance_id
dcl_output o0.x
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyz
dcl_output o5.xyz
dcl_output o6.xyz
dcl_temps 18
mad r0.xyz, cb3[0].xxxx, v0.xyzx, cb3[0].yyyy
mad r1.xyz, cb3[0].xxxx, v5.xyzx, cb3[0].yyyy
mul r0.w, v1.x, l(255.000000)
round_ne r0.w, r0.w
mul o3.xy, v3.xyxx, cb3[1].xxxx
utof r1.w, v6.x
mul r1.w, r1.w, cb1[0].x
round_z r1.w, r1.w
add r0.w, r0.w, r1.w
ftou r0.w, r0.w
ishl r0.w, r0.w, l(2)
dp3 r2.x, cb1[r0.w + 1].xyzx, r0.xyzx
dp3 r2.y, cb1[r0.w + 2].xyzx, r0.xyzx
dp3 r2.z, cb1[r0.w + 3].xyzx, r0.xyzx
mov r3.xyz, v4.xyzx
mov r3.w, l(1.000000)
dp4 r0.x, cb1[r0.w + 1].xyzw, r3.xyzw
dp4 r0.y, cb1[r0.w + 2].xyzw, r3.xyzw
dp4 r0.z, cb1[r0.w + 3].xyzw, r3.xyzw
dp3 o5.x, cb1[r0.w + 1].xyzx, r1.xyzx
dp3 o5.y, cb1[r0.w + 2].xyzx, r1.xyzx
dp3 o5.z, cb1[r0.w + 3].xyzx, r1.xyzx
dp3 r1.x, cb2[0].xyzx, r2.xyzx
dp3 r1.y, cb2[1].xyzx, r2.xyzx
dp3 r1.z, cb2[2].xyzx, r2.xyzx
mul r2.xyz, r0.yyyy, cb2[1].xyzx
mad r2.xyz, r0.xxxx, cb2[0].xyzx, r2.xyzx
mad r2.xyz, r0.zzzz, cb2[2].xyzx, r2.xyzx
add r2.xyz, r2.xyzx, cb2[3].xyzx
dp3 o4.x, r1.xyzx, cb2[0].xyzx
dp3 o4.y, r1.xyzx, cb2[1].xyzx
dp3 o4.z, r1.xyzx, cb2[2].xyzx
ftou r3.xy, cb11[93].xzxx
mul r4.xyz, r1.xyzx, l(0.000020, 0.000020, 0.000020, 0.000000)
mov r2.w, l(1.000000)
mov r5.xyz, r4.xyzx
mov r0.w, l(0)
loop 
  uge r1.w, r0.w, r3.y
  breakc_nz r1.w
  ftou r1.w, cb11[r0.w + 69].x
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r3.z, r1.w, l(140), t43.xxxx
  mov r6.xyz, r5.xyzx
  mov r3.w, r0.w
  mov r4.w, r1.w
  mov r5.w, r3.z
  loop 
    ult r6.w, r3.w, r3.x
    ieq r7.xy, r5.wwww, l(0, 1, 0, 0)
    or r7.x, r7.y, r7.x
    and r6.w, r6.w, r7.x
    breakc_z r6.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r7.xzw, r4.w, l(0), t43.xxyz
    if_nz r7.y
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r8.xyzw, r4.w, l(12), t43.xyzw
      add r9.xyz, r2.xyzx, -r7.xzwx
      dp3 r6.w, r9.xyzx, r8.yzwy
      max r6.w, r6.w, l(0.000000)
      min r6.w, r8.x, r6.w
      mad r7.xzw, r6.wwww, r8.yyzw, r7.xxzw
    endif 
    add r7.xyz, -r2.xyzx, r7.xzwx
    dp3 r6.w, r7.xyzx, r7.xyzx
    sqrt r6.w, r6.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r8.xyz, r4.w, l(64), t43.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r7.w, r4.w, l(32), t43.xxxx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r9.yz, r4.w, l(40), t43.xxyx
    mad_sat r9.x, r6.w, r7.w, r9.y
    sample_l_indexable(texture2d)(float,float,float,float) r7.w, r9.xzxx, t42.xywz, s13, l(0.000000)
    mul r8.xyz, r7.wwww, r8.xyzx
    div r7.xyz, r7.xyzx, r6.wwww
    dp3_sat r6.w, r1.xyzx, r7.xyzx
    max r7.w, r8.y, r8.x
    max r7.w, r8.z, r7.w
    min r8.x, r8.y, r8.x
    min r8.x, r8.z, r8.x
    add r7.w, r7.w, r8.x
    mul r7.w, r7.w, l(0.500000)
    max r7.w, r7.w, l(0.000000)
    mul r6.w, r6.w, r7.w
    mad r6.xyz, r7.xyzx, r6.wwww, r6.xyzx
    iadd r3.w, r3.w, l(1)
    ult r6.w, r3.w, r3.x
    if_nz r6.w
      ftou r4.w, cb11[r3.w + 69].x
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r5.w, r4.w, l(140), t43.xxxx
    endif 
  endloop 
  mov r7.xyz, r6.xyzx
  mov r1.w, r3.w
  mov r3.z, r4.w
  mov r6.w, r5.w
  loop 
    ult r7.w, r1.w, r3.x
    ieq r8.xy, r6.wwww, l(2, 3, 0, 0)
    or r8.x, r8.y, r8.x
    and r7.w, r7.w, r8.x
    breakc_z r7.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r8.xzw, r3.z, l(0), t43.xxyz
    if_nz r8.y
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r9.xyz, r3.z, l(128), t43.xyzx
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r7.w, r3.z, l(12), t43.xxxx
      add r10.xyz, r2.xyzx, -r8.xzwx
      dp3 r8.y, r10.xyzx, r9.xyzx
      max r8.y, r8.y, l(0.000000)
      min r7.w, r7.w, r8.y
      mad r8.xzw, r7.wwww, r9.xxyz, r8.xxzw
    endif 
    add r8.xyz, -r2.xyzx, r8.xzwx
    dp3 r7.w, r8.xyzx, r8.xyzx
    sqrt r7.w, r7.w
    div r8.xyz, r8.xyzx, r7.wwww
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r9.xyz, r3.z, l(64), t43.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r8.w, r3.z, l(32), t43.xxxx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r10.xyzw, r3.z, l(40), t43.xyzw
    mad_sat r10.x, r7.w, r8.w, r10.x
    sample_l_indexable(texture2d)(float,float,float,float) r8.w, r10.xyxx, t42.xywz, s13, l(0.000000)
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r11.xyz, r3.z, l(16), t43.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r9.w, r3.z, l(56), t43.xxxx
    dp3 r10.x, r8.xyzx, -r11.xyzx
    mad_sat r10.y, r10.x, r10.z, r10.w
    mul r10.z, r10.y, r10.y
    mad r10.y, -r10.y, l(2.000000), l(3.000000)
    mul r10.y, r10.y, r10.z
    mul r10.y, r10.y, r10.y
    mul r7.w, r7.w, r10.x
    lt r7.w, r7.w, r9.w
    movc r7.w, r7.w, l(0), r10.y
    mul r7.w, r7.w, r8.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r8.w, r3.z, l(172), t43.xxxx
    if_nz r8.w
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r8.w, r3.z, l(188), t43.xxxx
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r10.xyzw, r3.z, l(256), t43.xyzw
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r11.xyzw, r3.z, l(272), t43.xyzw
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r12.xyzw, r3.z, l(288), t43.xyzw
      dp4 r9.w, r10.xyzw, r2.xyzw
      dp4 r10.x, r11.xyzw, r2.xyzw
      dp4 r10.y, r12.xyzw, r2.xyzw
      div r11.x, r9.w, r10.y
      div r11.y, r10.x, r10.y
      utof r11.z, r8.w
      sample_l_indexable(texture2darray)(float,float,float,float) r10.xyz, r11.xyzx, t45.xyzw, s12, l(0.000000)
      mul r9.xyz, r9.xyzx, r10.xyzx
    endif 
    mul r9.xyz, r7.wwww, r9.xyzx
    dp3_sat r7.w, r1.xyzx, r8.xyzx
    max r8.w, r9.y, r9.x
    max r8.w, r9.z, r8.w
    min r9.x, r9.y, r9.x
    min r9.x, r9.z, r9.x
    add r8.w, r8.w, r9.x
    mul r8.w, r8.w, l(0.500000)
    max r8.w, r8.w, l(0.000000)
    mul r7.w, r7.w, r8.w
    mad r7.xyz, r8.xyzx, r7.wwww, r7.xyzx
    iadd r1.w, r1.w, l(1)
    ult r7.w, r1.w, r3.x
    if_nz r7.w
      ftou r3.z, cb11[r1.w + 69].x
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r6.w, r3.z, l(140), t43.xxxx
    endif 
  endloop 
  mov r5.xyz, r7.xyzx
  mov r7.w, r1.w
  mov r8.x, r3.z
  mov r8.y, r6.w
  loop 
    ult r8.z, r7.w, r3.x
    ieq r8.w, r8.y, l(4)
    and r8.z, r8.w, r8.z
    breakc_z r8.z
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r9.xyz, r8.x, l(0), t43.xyzx
    add r9.xyz, -r2.xyzx, r9.xyzx
    dp3 r8.z, r9.xyzx, r9.xyzx
    sqrt r8.z, r8.z
    div r10.xyz, r9.xyzx, r8.zzzz
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r11.xyz, r8.x, l(64), t43.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r12.xyz, r8.x, l(16), t43.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r13.y, r8.x, l(44), t43.xxxx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r14.xyz, r8.x, l(128), t43.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r15.xyz, r8.x, l(144), t43.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r16.xyz, r8.x, l(160), t43.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r17.xyz, r8.x, l(176), t43.xyzx
    dp3 r14.x, r9.xyzx, r14.xyzx
    dp3 r14.y, r9.xyzx, r12.xyzx
    dp3 r14.z, r9.xyzx, r15.xyzx
    add r9.xyz, -r16.xyzx, |r14.xyzx|
    mul_sat r9.xyz, r17.xyzx, r9.xyzx
    max r8.z, r9.y, r9.x
    max r13.x, r9.z, r8.z
    sample_l_indexable(texture2d)(float,float,float,float) r8.z, r13.xyxx, t42.xyzw, s13, l(0.000000)
    mul r9.xyz, r8.zzzz, r11.xyzx
    dp3_sat r8.z, r1.xyzx, r10.xyzx
    max r8.w, r9.y, r9.x
    max r8.w, r9.z, r8.w
    min r9.x, r9.y, r9.x
    min r9.x, r9.z, r9.x
    add r8.w, r8.w, r9.x
    mul r8.w, r8.w, l(0.500000)
    max r8.w, r8.w, l(0.000000)
    mul r8.z, r8.w, r8.z
    mad r5.xyz, r10.xyzx, r8.zzzz, r5.xyzx
    iadd r7.w, r7.w, l(1)
    ult r8.z, r7.w, r3.x
    if_nz r8.z
      ftou r8.x, cb11[r7.w + 69].x
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r8.y, r8.x, l(140), t43.xxxx
    endif 
  endloop 
  uge r8.x, r8.y, l(5)
  iadd r0.w, r7.w, -r8.x
endloop 
dp3 r0.w, r5.xyzx, r5.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, r5.xyzx
dp3 o6.x, r1.xyzx, cb2[0].xyzx
dp3 o6.y, r1.xyzx, cb2[1].xyzx
dp3 o6.z, r1.xyzx, cb2[2].xyzx
mov o1.w, l(1.000000)
mov o1.xyz, r0.xyzx
mov o2.xyzw, v2.zyxw
mov o3.zw, l(0,0,0,0)
mov o0.x, v6.x
ret 
// Approximately 224 instruction slots used
