//1153ffa8d698d8d9-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Thu Feb 04 21:55:45 2016
//
//
// Buffer Definitions: 
//
// cbuffer cbTiledLighting
// {
//
//   uint g_uNumNonDirectionalLights;   // Offset:    0 Size:     4
//   uint g_uNumDirectionalLights;      // Offset:    4 Size:     4
//   uint g_uNumTilesX;                 // Offset:    8 Size:     4
//   uint g_uNumTilesY;                 // Offset:   12 Size:     4 [unused]
//   row_major float4x4 g_mProjection;  // Offset:   16 Size:    64 [unused]
//   row_major float4x4 g_mInvProjection;// Offset:   80 Size:    64 [unused]
//
// }
//
// cbuffer WorldBuffer
// {
//
//   struct WorldStruct
//   {
//       
//       row_major float4x4 ViewProject;// Offset:    0
//       
//       struct WorldStruct_PerInstanceData
//       {
//           
//           row_major float4x4 World;  // Offset:   64
//           row_major float4x4 WorldViewProject;// Offset:  128
//
//       } PerInstance[256];            // Offset:   64
//
//   } WorldParameters;                 // Offset:    0 Size: 32832
//
// }
//
// 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
//   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
//   float4 DepthToView;                // Offset:  288 Size:    16
//   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
//   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
//   float2 ScreenResolution;           // Offset:  736 Size:     8 [unused]
//   float2 __padding3;                 // Offset:  744 Size:     8 [unused]
//   float4 PSSMToMap1Lin;              // Offset:  752 Size:    16
//   float4 PSSMToMap1Const;            // Offset:  768 Size:    16
//   float4 PSSMToMap2Lin;              // Offset:  784 Size:    16
//   float4 PSSMToMap2Const;            // Offset:  800 Size:    16
//   float4 PSSMToMap3Lin;              // Offset:  816 Size:    16
//   float4 PSSMToMap3Const;            // Offset:  832 Size:    16
//   float4 PSSMDistances;              // Offset:  848 Size:    16
//   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
//   float4 ShadowAtlasResolution;      // Offset: 1136 Size:    16
//   float4 UnitRimData[3];             // Offset: 1152 Size:    48
//   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 MaterialBuffer
// {
//
//   float4 MaterialParams[512];        // Offset:    0 Size:  8192
//
// }
//
// cbuffer InstanceBuffer
// {
//
//   struct InstanceStruct
//   {
//       
//       float4 InstanceParams[8];      // Offset:    0
//
//   } InstanceParameters[256];         // Offset:    0 Size: 32768
//
// }
//
// 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
// ------------------------------ ---------- ------- ----------- ---- --------
// SamplerGenericPointClamp          sampler      NA          NA   10        1
// SamplerGenericTrilinearWrap       sampler      NA          NA   11        1
// SamplerGenericBilinearWrap        sampler      NA          NA   12        1
// SamplerGenericBilinearClamp       sampler      NA          NA   13        1
// SamplerGenericShadowCompare     sampler_c      NA          NA   14        1
// p_default_Material_n206_19B9FD0C15847118_Param_texture    texture  float4          2d    0        1
// p_default_Setup_n12_n64_Texture_texture    texture  float4          2d    1        1
// p_default_Setup_n12_n76_Texture_texture    texture  float4          2d    2        1
// p_default_Setup_n7_Texture_texture    texture  float4          2d    4        1
// p_default_Setup_n21_n105_Texture_texture    texture  float4          2d    5        1
// p_default_Setup_n1_n52_Texture_texture    texture  float4          2d    6        1
// p_default_Material_n208_n225_n235_661830C016465534_cp0_Param_texture    texture  float4          2d    7        1
// p_default_Setup_n1_n39_Texture_texture    texture  float4          2d    8        1
// p_default_Material_n206_49EF29C0204713_cp0_Param_texture    texture  float4          2d    9        1
// p_default_Setup_n1_n41_Texture_texture    texture  float4          2d   10        1
// p_default_Setup_n21_n126_Texture_texture    texture  float4          2d   11        1
// p_default_Setup_n12_n54_Texture_texture    texture  float4          2d   12        1
// p_default_Setup_n19_Texture_texture    texture  float4          2d   13        1
// p_default_Setup_n21_n113_Texture_texture    texture  float4          2d   14        1
// p_default_Setup_n21_n111_Texture_texture    texture  float4          2d   15        1
// GlobalModulationMapTextures[0]    texture  float4          2d   40        1
// ShadowMapSampler_texture          texture  float4          2d   43        1
// AttenuationSampler_texture        texture  float4          2d   44        1
// AmbientAccumulation_texture       texture  float4          2d   53        1
// LightDataBuffer                   texture  struct         r/o   54        1
// LightIndexBuffer                  texture   uint4         buf   55        1
// ModulationMaps                    texture  float4     2darray   56        1
// WorldBuffer                       cbuffer      NA          NA    0        1
// SceneBuffer                       cbuffer      NA          NA    2        1
// MaterialBuffer                    cbuffer      NA          NA    3        1
// InstanceBuffer                    cbuffer      NA          NA    5        1
// cbTiledLighting                   cbuffer      NA          NA    7        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy w
// COLOR                    1   xyzw        1     NONE   float   x  w
// TEXCOORD                 0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 2   xyz         3     NONE   float   xyz 
// PSIZE                    0   x           4     NONE    uint   x   
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET                0   xyzw        0   TARGET   float   xyzw
// SV_TARGET                1   x           1   TARGET   float   x   
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb7[1], immediateIndexed
dcl_constantbuffer cb0[2048], dynamicIndexed
// dcl_constantbuffer cb2[75], immediateIndexed
dcl_constantbuffer cb2[82], immediateIndexed
dcl_constantbuffer cb3[19], immediateIndexed
dcl_constantbuffer cb5[2045], dynamicIndexed
dcl_sampler s10, mode_default
dcl_sampler s11, mode_default
dcl_sampler s12, mode_default
dcl_sampler s13, mode_default
dcl_sampler s14, 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) 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) t40
dcl_resource_texture2d (float,float,float,float) t43
dcl_resource_texture2d (float,float,float,float) t44
dcl_resource_texture2d (float,float,float,float) t53
dcl_resource_structured t54, 384 
dcl_resource_buffer (uint,uint,uint,uint) t55
dcl_resource_texture2darray (float,float,float,float) t56
dcl_input_ps_siv linear noperspective v0.xyw, position
dcl_input_ps linear v1.xw
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.xyz
dcl_input_ps constant v4.x
dcl_output o0.xyzw
dcl_output o1.x
// dcl_temps 28
dcl_temps 30
dcl_resource_texture2d (float,float,float,float) t125
dp3 r0.x, v3.xyzx, v3.xyzx
rsq r0.x, r0.x
mul r0.yzw, r0.xxxx, v3.xxyz
mad r1.xyzw, v0.xyxy, cb2[45].zwzw, cb2[45].xyxy
mul r2.xyzw, r1.xyzw, v0.wwww
mov r3.xy, r2.xyxx
mov r3.z, v0.w

//Screen space correction, therefore need the '0.5'
ld_indexable(texture2d)(float,float,float,float) r29.xyzw, l(0, 0, 0, 0), t125.xyzw
add r29.w, v0.w, -r29.y
mul r29.w, r29.w, r29.x
mul r29.w, r29.w, l(0.5)
add r3.x, r3.x, -r29.w


mov r3.w, l(1.000000)
dp4 r4.x, cb2[15].xyzw, r3.xyzw
dp4 r4.y, cb2[16].xyzw, r3.xyzw
dp4 r4.z, cb2[17].xyzw, r3.xyzw
mad r1.xy, r1.zwzz, cb2[18].xyxx, cb2[18].zwzz
mul r5.xy, r1.xyxx, v0.wwww
mov r5.z, v0.w

//View space correction, therefore need the InvProj._m00
ld_indexable(texture2d)(float,float,float,float) r29.xyzw, l(0, 0, 0, 0), t125.xyzw
add r29.w, v0.w, -r29.y
mul r29.w, r29.w, r29.x
mul r29.w, r29.w, cb2[81].x
add r5.x, r5.x, -r29.w


dp3 r1.x, -r5.xyzx, -r5.xyzx
rsq r1.x, r1.x
mul r6.xyz, r1.xxxx, -r5.xyzx
dp3 r7.x, r6.xyzx, cb2[0].xyzx
dp3 r7.y, r6.xyzx, cb2[1].xyzx
dp3 r7.z, r6.xyzx, cb2[2].xyzx
ishl r1.x, v4.x, l(3)
deriv_rty_fine r6.xy, v2.xyxx
deriv_rtx_fine r2.xy, v2.xyxx
mov r3.xy, r2.zwzz
dp4 r1.y, cb2[15].xyzw, r3.xyzw
dp4 r2.z, cb2[16].xyzw, r3.xyzw
dp4 r2.w, cb2[17].xyzw, r3.xyzw
deriv_rty_fine r3.x, r1.y
deriv_rty_fine r3.yz, r2.zzwz
deriv_rtx_fine r8.z, r1.y
deriv_rtx_fine r8.xy, r2.zwzz
mov_sat r2.zw, v1.xxxw
mul r9.xyzw, v2.xyzw, cb3[12].zwxy
sample_indexable(texture2d)(float,float,float,float) r9.xy, r9.xyxx, t6.xyzw, s11
mad r9.xy, r9.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mul r10.xyzw, v2.xyxy, cb3[8].zwxy
sample_indexable(texture2d)(float,float,float,float) r11.xyzw, r10.xyxx, t8.xyzw, s11
mul r10.xy, v2.xyxx, cb3[9].xyxx
sample_indexable(texture2d)(float,float,float,float) r10.xy, r10.xyxx, t10.xyzw, s11
mul r12.xy, r9.xyxx, r9.xyxx
mad r1.y, -r9.x, r9.x, l(1.000000)
mad r1.y, -r9.y, r9.y, r1.y
max r3.w, r12.y, r12.x
mul r3.w, r3.w, l(0.0000610351563)
max r1.y, r1.y, r3.w
rsq r1.y, r1.y
mul r9.xy, r9.xyxx, -r1.yyyy
mul r11.xyzw, r11.xyzw, cb3[0].xyzw
mul r1.y, r10.x, cb3[16].w
mul r9.xy, r9.xyxx, cb3[16].xxxx
add r3.w, -cb3[5].w, cb3[17].x
mad r3.w, r10.y, r3.w, cb3[5].w
mul r12.xyz, r1.yyyy, cb3[6].xyzx
sample_indexable(texture2d)(float,float,float,float) r1.y, v2.xyxx, t4.yxzw, s11
sample_indexable(texture2d)(float,float,float,float) r4.w, v2.xyxx, t13.yzwx, s11
dp3 r6.w, r8.zxyz, r0.yzwy
mad r8.xyz, -r6.wwww, r0.zwyz, r8.xyzx
dp3 r6.w, r3.xyzx, r0.yzwy
mad r3.xyz, -r6.wwww, r0.yzwy, r3.xyzx
mul r6.x, r6.x, r2.y
mad r2.x, r2.x, r6.y, -r6.x
lt r6.x, r2.x, l(0.000000)
movc r6.x, r6.x, l(-1.000000), l(1.000000)
mov r6.z, -r2.y
mul r6.yz, r6.yyzy, r6.xxxx
mul r13.xyz, r3.xyzx, r6.zzzz
mad r6.yzw, r8.zzxy, r6.yyyy, r13.xxyz
lt r2.x, l(0.000000), |r2.x|
dp3 r2.y, r6.yzwy, r6.yzwy
rsq r2.y, r2.y
mul r13.xyz, r2.yyyy, r6.yzwy
movc r6.yzw, r2.xxxx, r13.xxyz, r6.yyzw
mul r13.xyz, r0.wyzw, r6.zwyz
mad r13.xyz, r0.zwyz, r6.wyzw, -r13.xyzx
mul r14.xyz, r0.wyzw, r8.xyzx
mad r8.xyz, r0.zwyz, r8.yzxy, -r14.xyzx
dp3 r2.x, r3.xyzx, r8.xyzx
lt r2.x, r2.x, l(0.000000)
movc r2.x, r2.x, l(-1.000000), l(1.000000)
mul r2.x, r2.x, r6.x
mul r3.xyz, r2.xxxx, r13.xyzx
mul r8.xyzw, v2.xyxy, cb3[7].zwxy
sample_indexable(texture2d)(float,float,float,float) r13.xyz, r8.xyxx, t2.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r2.xy, r8.zwzz, t12.xyzw, s11
mad r2.xy, r2.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r8.xy, r10.zwzz, t1.xyzw, s11
mul r8.zw, r2.xxxy, r2.xxxy
mad r6.x, -r2.x, r2.x, l(1.000000)
mad r6.x, -r2.y, r2.y, r6.x
max r7.w, r8.w, r8.z
mul r7.w, r7.w, l(0.0000610351563)
max r6.x, r6.x, r7.w
rsq r6.x, r6.x
mul r2.xy, r2.xyxx, -r6.xxxx
add r6.x, cb3[13].z, -cb3[15].x
mad r6.x, r8.y, r6.x, cb3[15].x
mad r1.y, r1.y, cb3[13].w, cb3[6].w
mul_sat r1.y, r1.y, r2.z
mad r8.yzw, cb3[2].xxyz, r13.xxyz, -r11.xxyz
mad r8.yzw, r1.yyyy, r8.yyzw, r11.xxyz
mad r2.xy, r2.xyxx, cb3[1].wwww, -r9.xyxx
mad r2.xy, r1.yyyy, r2.xyxx, r9.xyxx
mad r10.xyz, cb3[14].xxxx, r8.xxxx, -r12.xyzx
mad r10.xyz, r1.yyyy, r10.xyzx, r12.xyzx
add r2.z, -r3.w, r6.x
mad r1.y, r1.y, r2.z, r3.w
mul r3.xyz, r3.xyzx, r2.yyyy
mad r2.xyz, r2.xxxx, r6.yzwy, r3.xyzx
mad r2.xyz, v3.xyzx, r0.xxxx, -r2.xyzx
dp3 r0.x, r2.xyzx, r2.xyzx
rsq r0.x, r0.x
mul r2.xyz, r0.xxxx, r2.xyzx
mad r3.xyz, r10.xyzx, cb3[15].yyyy, -r10.xyzx
mad r3.xyz, r2.wwww, r3.xyzx, r10.xyzx
mad r6.xyz, r8.yzwy, cb3[14].wwww, -r8.yzwy
mad r6.xyz, r2.wwww, r6.xyzx, r8.yzwy
mad r0.x, r1.y, cb3[15].z, -r1.y
mad r0.x, r2.w, r0.x, r1.y
mul r8.xyzw, v2.zwzw, cb3[11].xyzw
sample_indexable(texture2d)(float,float,float,float) r10.xyzw, r8.xyxx, t5.xyzw, s11
mul r8.xy, v2.zwzz, cb3[10].zwzz
sample_indexable(texture2d)(float,float,float,float) r1.y, r8.xyxx, t15.yxzw, s11
max r2.w, cb3[4].w, l(0.010000)
max r3.w, cb3[2].w, l(0.010000)
add r6.w, cb3[2].w, cb3[4].w
mad r8.xy, cb2[24].xxxx, cb3[10].xyxx, r9.zwzz
mad r8.zw, cb2[24].xxxx, cb3[9].zzzw, r8.zzzw
sample_indexable(texture2d)(float,float,float,float) r7.w, r8.xyxx, t14.yzwx, s11
sample_indexable(texture2d)(float,float,float,float) r8.xyz, r8.zwzz, t11.xyzw, s11
mul r8.xyz, r8.xyzx, cb3[5].xyzx
add r8.w, r6.w, cb3[13].y
add r8.w, r8.w, cb3[3].w
add r8.w, r8.w, l(1.000000)
mad r9.xyz, cb3[3].xyzx, r7.wwww, -r10.xyzx
mad r9.xyz, r10.wwww, r9.xyzx, r10.xyzx
mul r11.xyz, r6.xyzx, cb3[15].wwww
mad r7.w, -cb5[r1.x + 4].x, r8.w, l(1.000000)
add r8.w, r7.w, cb3[4].w
add r12.x, r8.w, cb3[2].w
add r12.y, r1.y, -r7.w
add r6.w, -r6.w, -r7.w
add r12.z, r1.y, -r8.w
add r12.w, r12.x, cb3[3].w
add r13.x, r12.x, cb3[13].y
div_sat r6.w, r6.w, cb3[13].y
div r2.w, r12.y, r2.w
add r2.w, -r2.w, l(1.000000)
div r3.w, r12.z, r3.w
add r12.y, -r6.w, l(1.000000)
add r3.w, -r3.w, l(1.000000)
lt r12.z, r12.w, r1.y
movc r12.z, r12.z, l(0), l(1.000000)
mul r14.xyz, r3.wwww, r8.xyzx
mul r8.xyz, r11.xyzx, r2.wwww
lt r2.w, r7.w, r1.y
movc r15.xyz, r2.wwww, r8.xyzx, r6.xyzx
lt r2.w, r8.w, r1.y
mov r14.w, l(1.000000)
mov r15.w, l(0)
movc r8.xyzw, r2.wwww, r14.xyzw, r15.xyzw
lt r2.w, r12.x, r1.y
mov r9.w, r10.w
mov r14.xyz, r8.xyzx
mov r14.w, l(1.000000)
movc r9.xyzw, r2.wwww, r9.xyzw, r14.xyzw
add r6.xyz, -r9.xyzx, r10.xyzx
mad r6.xyz, r6.wwww, r6.xyzx, r9.xyzx
lt r1.y, r13.x, r1.y
movc r6.xyz, r1.yyyy, r10.xyzx, r6.xyzx
mul r1.y, r8.w, r9.w
mul r1.y, r12.y, r1.y
mad r3.xyz, r1.yyyy, -r3.xyzx, r3.xyzx
mul r1.y, r11.w, r12.z
max r2.w, |r5.y|, |r5.x|
add r8.xyz, -r2.wwww, cb2[70].yzwy
mov r9.z, l(1.000000)
mov r5.w, l(1.000000)
mov r10.xyz, r5.xyzx
mov r10.w, l(1.000000)
mov r11.xyz, l(0,0,0,0)
mov r2.w, l(0)
loop 
  uge r3.w, r2.w, cb7[0].y
  breakc_nz r3.w
  iadd r3.w, r2.w, cb7[0].x
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r12.xyz, r3.w, l(16), t54.xyzx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r13.xyz, r3.w, l(64), t54.xyzx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r14.xyz, r3.w, l(112), t54.xyzx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r6.w, r3.w, l(156), t54.xxxx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r7.w, r3.w, l(172), t54.xxxx
  dp3 r15.x, -r12.xyzx, cb2[0].xyzx
  dp3 r15.y, -r12.xyzx, cb2[1].xyzx
  dp3 r15.z, -r12.xyzx, cb2[2].xyzx
  if_nz r6.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r12.xyzw, r3.w, l(192), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r16.xyzw, r3.w, l(208), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r17.xyzw, r3.w, l(224), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.xyzw, r3.w, l(240), t54.xyzw
    mov r19.x, r12.x
    mov r19.y, r16.x
    mov r19.z, r17.x
    mov r19.w, r18.x
    dp4 r19.x, r5.xyzw, r19.xyzw
    mov r20.x, r12.y
    mov r20.y, r16.y
    mov r20.z, r17.y
    mov r20.w, r18.y
    dp4 r19.y, r5.xyzw, r20.xyzw
    mov r20.x, r12.z
    mov r20.y, r16.z
    mov r20.z, r17.z
    mov r20.w, r18.z
    dp4 r19.z, r5.xyzw, r20.xyzw
    mov r18.x, r12.w
    mov r18.y, r16.w
    mov r18.z, r17.w
    dp4 r6.w, r5.xyzw, r18.xyzw
    add r12.xyzw, -r6.wwww, cb2[53].xyzw
    min r12.yzw, r8.xxyz, r12.yyzw
    lt r12.yzw, l(0.000000, 0.000000, 0.000000, 0.000000), r12.yyzw
    movc r16.xyz, r12.yyyy, cb2[47].xyzx, cb2[47].wwww
    movc r17.xyz, r12.yyyy, cb2[48].xyzx, cb2[48].wwww
    movc r16.xyz, r12.zzzz, cb2[49].xyzx, r16.xyzx
    movc r17.xyz, r12.zzzz, cb2[50].xyzx, r17.xyzx
    movc r16.xyz, r12.wwww, cb2[51].xyzx, r16.xyzx
    movc r12.yzw, r12.wwww, cb2[52].xxyz, r17.xxyz
    mad r12.yzw, r19.xxyz, r16.xxyz, r12.yyzw
    lt r6.w, l(0.000000), r12.x
    mad r16.xyzw, cb2[71].zwzw, l(-0.500000, 0.500000, 0.500000, 0.500000), r12.yzyz
    sample_c_lz_indexable(texture2d)(float,float,float,float) r8.w, r16.xyxx, t43.xxxx, s14, r12.w
    sample_c_lz_indexable(texture2d)(float,float,float,float) r9.w, r16.zwzz, t43.xxxx, s14, r12.w
    add r8.w, r8.w, r9.w
    mad r16.xyzw, cb2[71].zwzw, l(-0.500000, -0.500000, 0.500000, -0.500000), r12.yzyz
    sample_c_lz_indexable(texture2d)(float,float,float,float) r9.w, r16.xyxx, t43.xxxx, s14, r12.w
    add r8.w, r8.w, r9.w
    sample_c_lz_indexable(texture2d)(float,float,float,float) r9.w, r16.zwzz, t43.xxxx, s14, r12.w
    add r8.w, r8.w, r9.w
    mul r8.w, r8.w, l(0.250000)
    movc r6.w, r6.w, r8.w, l(1.000000)
  else 
    mov r6.w, l(1.000000)
  endif 
  if_nz r7.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r12.xyzw, r3.w, l(256), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r16.xyzw, r3.w, l(272), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r17.xyzw, r3.w, l(288), t54.xyzw
    dp4 r3.w, r12.xyzw, r10.xyzw
    dp4 r7.w, r16.xyzw, r10.xyzw
    dp4 r8.w, r17.xyzw, r10.xyzw
    div r12.x, r3.w, r8.w
    div r12.y, r7.w, r8.w
    sample_l_indexable(texture2d)(float,float,float,float) r12.xyz, r12.xyxx, t40.xyzw, s12, l(0.000000)
  else 
    mov r12.xyz, l(1.000000,1.000000,1.000000,0)
  endif 
  dp3 r3.w, r2.xyzx, r15.xyzx
  mov_sat r9.x, r3.w
  mad r9.y, r3.w, l(0.500000), l(0.500000)
  dp3 r3.w, r9.xyzx, r14.xyzx
  mul r9.xyw, r13.xyxz, r3.wwww
  mul r9.xyw, r12.xyxz, r9.xyxw
  mad r11.xyz, r9.xywx, r6.wwww, r11.xyzx
  iadd r2.w, r2.w, l(1)
endloop 
if_nz cb7[0].x
  mul r8.xy, v0.xyxx, l(0.062500, 0.062500, 0.000000, 0.000000)
  round_ni r8.xy, r8.xyxx
  utof r2.w, cb7[0].z
  mad r2.w, r8.y, r2.w, r8.x
  ftou r2.w, r2.w
  ishl r2.w, r2.w, l(1)
  dp3 r3.w, r10.xyzx, r10.xyzx
  sqrt r3.w, r3.w
  mov r8.z, l(1.000000)
  mov r9.z, l(1.000000)
  mov r12.xyz, r10.xyzx
  mov r12.w, l(1.000000)
  mov r10.w, l(1.000000)
  mov r13.z, l(1.000000)
  mov r14.xyz, r11.xyzx
  mov r5.w, l(0)
  loop 
    uge r6.w, r5.w, l(2)
    breakc_nz r6.w
    iadd r6.w, r2.w, r5.w
    ld_indexable(buffer)(uint,uint,uint,uint) r15.xyzw, r6.wwww, t55.xyzw
    ushr r16.xyzw, r15.xyzw, l(30, 30, 30, 30)
    iadd r6.w, r16.y, r16.x
    iadd r6.w, r16.z, r6.w
    iadd r6.w, r16.w, r6.w
    mov r16.xyz, r14.xyzx
    mov r7.w, l(0)
    loop 
      uge r8.w, r7.w, r6.w
      breakc_nz r8.w
      ult r17.xyz, r7.wwww, l(3, 6, 9, 0)
      iadd r18.xyz, r7.wwww, l(-3, -6, -9, 0)
      movc r8.w, r17.z, r18.y, r18.z
      movc r8.w, r17.y, r18.x, r8.w
      movc r8.w, r17.x, r7.w, r8.w
      movc r9.w, r17.z, r15.z, r15.w
      movc r9.w, r17.y, r15.y, r9.w
      movc r9.w, r17.x, r15.x, r9.w
      imul null, r8.w, r8.w, l(10)
      ushr r8.w, r9.w, r8.w
      and r8.w, r8.w, l(1023)
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(140), t54.xxxx
      mov r17.xyz, r16.xyzx
      mov r11.w, r7.w
      mov r13.w, r8.w
      mov r14.w, r9.w
      loop 
        ult r16.w, r11.w, r6.w
        ieq r18.xy, r14.wwww, l(0, 1, 0, 0)
        or r17.w, r18.y, r18.x
        and r16.w, r16.w, r17.w
        breakc_z r16.w
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.xzw, r13.w, l(0), t54.xxyz
        if_nz r18.y
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.xyzw, r13.w, l(12), t54.xyzw
          add r20.xyz, r10.xyzx, -r18.xzwx
          dp3 r16.w, r20.xyzx, r19.yzwy
          max r16.w, r16.w, l(0.000000)
          min r16.w, r19.x, r16.w
          mad r18.xzw, r16.wwww, r19.yyzw, r18.xxzw
        endif 
        add r18.xyz, -r5.xyzx, r18.xzwx
        dp3 r16.w, r18.xyzx, r18.xyzx
        sqrt r16.w, r16.w
        div r18.xyz, r18.xyzx, r16.wwww
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.xyz, r13.w, l(64), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r20.xyz, r13.w, l(112), t54.xyzx
        dp3 r21.x, r18.xyzx, cb2[0].xyzx
        dp3 r21.y, r18.xyzx, cb2[1].xyzx
        dp3 r21.z, r18.xyzx, cb2[2].xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r17.w, r13.w, l(32), t54.xxxx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.yz, r13.w, l(40), t54.xxyx
        mad_sat r18.x, r16.w, r17.w, r18.y
        sample_l_indexable(texture2d)(float,float,float,float) r16.w, r18.xzxx, t44.xywz, s13, l(0.000000)
        dp3 r17.w, r2.xyzx, r21.xyzx
        mov_sat r8.x, r17.w
        mad r8.y, r17.w, l(0.500000), l(0.500000)
        dp3 r8.x, r8.xyzx, r20.xyzx
        mul r18.xyz, r19.xyzx, r8.xxxx
        mad r17.xyz, r18.xyzx, r16.wwww, r17.xyzx
        iadd r8.x, r11.w, l(1)
        ult r8.y, r8.x, r6.w
        if_nz r8.y
          ult r18.xyz, r8.xxxx, l(3, 6, 9, 0)
          iadd r19.xyz, r11.wwww, l(-2, -5, -8, 0)
          movc r8.y, r18.z, r19.y, r19.z
          movc r8.y, r18.y, r19.x, r8.y
          movc r8.y, r18.x, r8.x, r8.y
          movc r16.w, r18.z, r15.z, r15.w
          movc r16.w, r18.y, r15.y, r16.w
          movc r16.w, r18.x, r15.x, r16.w
          imul null, r8.y, r8.y, l(10)
          ushr r8.y, r16.w, r8.y
          and r13.w, r8.y, l(1023)
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r14.w, r13.w, l(140), t54.xxxx
        endif 
        mov r11.w, r8.x
      endloop 
      mov r8.xyw, r17.xyxz
      mov r9.w, r11.w
      mov r16.w, r13.w
      mov r17.w, r14.w
      loop 
        ult r18.x, r9.w, r6.w
        ieq r18.yz, r17.wwww, l(0, 2, 3, 0)
        or r18.y, r18.z, r18.y
        and r18.x, r18.y, r18.x
        breakc_z r18.x
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.xyw, r16.w, l(16), t54.xyxz
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.xyz, r16.w, l(0), t54.xyzx
        if_nz r18.z
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r20.xyz, r16.w, l(128), t54.xyzx
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.z, r16.w, l(12), t54.xxxx
          add r21.xyz, r10.xyzx, -r19.xyzx
          dp3 r19.w, r21.xyzx, r20.xyzx
          max r19.w, r19.w, l(0.000000)
          min r18.z, r18.z, r19.w
          mad r19.xyz, r18.zzzz, r20.xyzx, r19.xyzx
        endif 
        add r19.xyz, -r5.xyzx, r19.xyzx
        dp3 r18.z, r19.xyzx, r19.xyzx
        sqrt r18.z, r18.z
        div r19.xyz, r19.xyzx, r18.zzzz
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r20.xyz, r16.w, l(64), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r21.xyz, r16.w, l(112), t54.xyzx
        dp3 r22.x, r19.xyzx, cb2[0].xyzx
        dp3 r22.y, r19.xyzx, cb2[1].xyzx
        dp3 r22.z, r19.xyzx, cb2[2].xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.xyz, r16.w, l(32), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.xyzw, r16.w, l(44), t54.xyzw
        mov r23.w, r24.x
        mad r23.xy, r18.zzzz, r23.xyxx, r23.zwzz
        dp3 r18.x, r19.xyzx, -r18.xywx
        mad_sat r18.y, r18.x, r24.y, r24.z
        mul r18.w, r18.y, r18.y
        mad r18.y, -r18.y, l(2.000000), l(3.000000)
        mul r18.y, r18.y, r18.w
        mul r18.xy, r18.zyzz, r18.xyxx
        lt r18.x, r18.x, r24.w
        movc r18.x, r18.x, l(0), r18.y
        sample_l_indexable(texture2d)(float,float,float,float) r18.y, r23.xyxx, t44.xzyw, s13, l(0.000000)
        mul r18.x, r18.x, r18.y
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.y, r16.w, l(172), t54.xxxx
        if_nz r18.y
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.y, r16.w, l(188), t54.xxxx
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.xyzw, r16.w, l(256), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.xyzw, r16.w, l(272), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.xyzw, r16.w, l(288), t54.xyzw
          dp4 r18.z, r19.xyzw, r12.xyzw
          dp4 r18.w, r23.xyzw, r12.xyzw
          dp4 r19.x, r24.xyzw, r12.xyzw
          div r23.xy, r18.zwzz, r19.xxxx
          utof r23.z, r18.y
          sample_l_indexable(texture2darray)(float,float,float,float) r18.yzw, r23.xyzx, t56.wxyz, s12, l(0.000000)
        else 
          mov r18.yzw, l(0,1.000000,1.000000,1.000000)
        endif 
        dp3 r19.x, r18.yzwy, r18.yzwy
        mul r19.x, r18.x, r19.x
        lt r19.x, cb2[24].w, r19.x
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.y, r16.w, l(156), t54.xxxx
        ine r19.y, r19.y, l(0)
        and r19.x, r19.x, r19.y
        if_nz r19.x
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.xyzw, r16.w, l(192), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.xyzw, r16.w, l(208), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.xyzw, r16.w, l(224), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r25.xyzw, r16.w, l(240), t54.xyzw
          mov r26.x, r19.x
          mov r26.y, r23.x
          mov r26.z, r24.x
          mov r26.w, r25.x
          dp4 r26.x, r10.xyzw, r26.xyzw
          mov r27.x, r19.y
          mov r27.y, r23.y
          mov r27.z, r24.y
          mov r27.w, r25.y
          dp4 r26.y, r10.xyzw, r27.xyzw
          mov r27.x, r19.z
          mov r27.y, r23.z
          mov r27.z, r24.z
          mov r27.w, r25.z
          dp4 r19.x, r10.xyzw, r27.xyzw
          mov r25.x, r19.w
          mov r25.y, r23.w
          mov r25.z, r24.w
          dp4 r19.y, r10.xyzw, r25.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.xyzw, r16.w, l(80), t54.xyzw
          mad_sat r19.zw, r3.wwww, r23.xxxy, r23.zzzw
          div r23.xyzw, r26.xyxy, r19.yyyy
          mad r24.xyzw, cb2[71].zwzw, l(-0.500000, 0.500000, 0.500000, 0.500000), r23.zwzw
          sample_c_lz_indexable(texture2d)(float,float,float,float) r19.y, r24.xyxx, t43.xxxx, s14, r19.x
          sample_c_lz_indexable(texture2d)(float,float,float,float) r20.w, r24.zwzz, t43.xxxx, s14, r19.x
          add r19.y, r19.y, r20.w
          mad r23.xyzw, cb2[71].zwzw, l(-0.500000, -0.500000, 0.500000, -0.500000), r23.xyzw
          sample_c_lz_indexable(texture2d)(float,float,float,float) r20.w, r23.xyxx, t43.xxxx, s14, r19.x
          add r19.y, r19.y, r20.w
          sample_c_lz_indexable(texture2d)(float,float,float,float) r19.x, r23.zwzz, t43.xxxx, s14, r19.x
          add r19.x, r19.x, r19.y
          mul r19.x, r19.x, l(0.250000)
          mad r19.x, r19.x, r19.z, r19.w
        else 
          mov r19.x, l(1.000000)
        endif 
        dp3 r19.y, r2.xyzx, r22.xyzx
        mov_sat r9.x, r19.y
        mad r9.y, r19.y, l(0.500000), l(0.500000)
        dp3 r9.x, r9.xyzx, r21.xyzx
        mul r19.yzw, r20.xxyz, r9.xxxx
        mul r18.yzw, r18.yyzw, r19.yyzw
        mul r18.yzw, r19.xxxx, r18.yyzw
        mad r8.xyw, r18.yzyw, r18.xxxx, r8.xyxw
        iadd r9.x, r9.w, l(1)
        ult r9.y, r9.x, r6.w
        if_nz r9.y
          ult r18.xyz, r9.xxxx, l(3, 6, 9, 0)
          iadd r19.xyz, r9.wwww, l(-2, -5, -8, 0)
          movc r9.y, r18.z, r19.y, r19.z
          movc r9.y, r18.y, r19.x, r9.y
          movc r9.y, r18.x, r9.x, r9.y
          movc r18.z, r18.z, r15.z, r15.w
          movc r18.y, r18.y, r15.y, r18.z
          movc r18.x, r18.x, r15.x, r18.y
          imul null, r9.y, r9.y, l(10)
          ushr r9.y, r18.x, r9.y
          and r16.w, r9.y, l(1023)
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r17.w, r16.w, l(140), t54.xxxx
        endif 
        mov r9.w, r9.x
      endloop 
      mov r16.xyz, r8.xywx
      mov r9.x, r9.w
      mov r9.y, r16.w
      mov r18.x, r17.w
      loop 
        ult r18.y, r9.x, r6.w
        ieq r18.z, r18.x, l(4)
        and r18.y, r18.z, r18.y
        breakc_z r18.y
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.yzw, r9.y, l(0), t54.xxyz
        add r18.yzw, -r5.xxyz, r18.yyzw
        dp3 r19.x, r18.yzwy, r18.yzwy
        sqrt r19.x, r19.x
        div r19.xyz, r18.yzwy, r19.xxxx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r20.xyz, r9.y, l(64), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r21.xyz, r9.y, l(112), t54.xyzx
        dp3 r22.x, r19.xyzx, cb2[0].xyzx
        dp3 r22.y, r19.xyzx, cb2[1].xyzx
        dp3 r22.z, r19.xyzx, cb2[2].xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.xyz, r9.y, l(16), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.y, r9.y, l(44), t54.xxxx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.xyz, r9.y, l(128), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r25.xyz, r9.y, l(144), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r26.xyz, r9.y, l(160), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r27.xyz, r9.y, l(176), t54.xyzx
        dp3 r24.x, r18.yzwy, r24.xyzx
        dp3 r24.y, r18.yzwy, r19.xyzx
        dp3 r24.z, r18.yzwy, r25.xyzx
        add r18.yzw, -r26.xxyz, |r24.xxyz|
        mul_sat r18.yzw, r27.xxyz, r18.yyzw
        max r18.y, r18.z, r18.y
        max r23.x, r18.w, r18.y
        sample_l_indexable(texture2d)(float,float,float,float) r18.y, r23.xyxx, t44.xzyw, s13, l(0.000000)
        dp3 r18.z, r2.xyzx, r22.xyzx
        mov_sat r13.x, r18.z
        mad r13.y, r18.z, l(0.500000), l(0.500000)
        dp3 r13.x, r13.xyzx, r21.xyzx
        mul r19.xyz, r20.xyzx, r13.xxxx
        mad r16.xyz, r19.xyzx, r18.yyyy, r16.xyzx
        iadd r13.x, r9.x, l(1)
        ult r13.y, r13.x, r6.w
        if_nz r13.y
          ult r18.yzw, r13.xxxx, l(0, 3, 6, 9)
          iadd r19.xyz, r9.xxxx, l(-2, -5, -8, 0)
          movc r13.y, r18.w, r19.y, r19.z
          movc r13.y, r18.z, r19.x, r13.y
          movc r13.y, r18.y, r13.x, r13.y
          movc r18.w, r18.w, r15.z, r15.w
          movc r18.z, r18.z, r15.y, r18.w
          movc r18.y, r18.y, r15.x, r18.z
          imul null, r13.y, r13.y, l(10)
          ushr r13.y, r18.y, r13.y
          and r9.y, r13.y, l(1023)
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.x, r9.y, l(140), t54.xxxx
        endif 
        mov r9.x, r13.x
      endloop 
      uge r9.y, r18.x, l(5)
      iadd r7.w, -r9.y, r9.x
    endloop 
    ult r6.w, r6.w, l(12)
    if_nz r6.w
      mov r14.xyz, r16.xyzx
      break 
    endif 
    iadd r5.w, r5.w, l(1)
    mov r14.xyz, r16.xyzx
  endloop 
  mov r11.xyz, r14.xyzx
endif 
sample_indexable(texture2d)(float,float,float,float) r5.xyz, r1.zwzz, t0.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r8.xyz, r1.zwzz, t9.xyzw, s11
dp3 r2.w, r3.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
max o0.w, r1.y, l(0.000000)
add r0.x, r0.x, l(2.000000)
mul r0.x, r0.x, l(0.010000)
mul r3.xyz, r0.xxxx, r3.xyzx
add r9.xyz, -r5.xyzx, r11.xyzx
mad r5.xyz, r4.wwww, r9.xyzx, r5.xyzx
sample_indexable(texture2d)(float,float,float,float) r0.x, r1.zwzz, t7.xyzw, s10
add r1.y, cb3[16].z, cb3[16].y
add_sat r1.y, -r1.y, l(1.000000)
mul r1.z, r0.x, r0.x
mad r0.x, cb3[16].y, r0.x, r1.y
mad_sat r0.x, r1.z, cb3[16].z, r0.x
add r1.yzw, -cb3[1].xxyz, l(0.000000, 1.000000, 1.000000, 1.000000)
mad_sat r1.yzw, r0.xxxx, r1.yyzw, cb3[1].xxyz
add r4.xyw, r4.xyxz, -cb2[10].xyxz
dp3 r0.x, r4.xywx, r4.xywx
sqrt r0.x, r0.x
add r1.x, r4.z, -cb0[r1.x + 7].z
add r3.w, -cb2[73].x, cb2[73].y
add r0.x, r0.x, -cb2[73].x
div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
mul_sat r0.x, r0.x, r3.w
mad r3.w, r0.x, l(-2.000000), l(3.000000)
mul r0.x, r0.x, r0.x
mul r0.x, r0.x, r3.w
add r1.x, r1.x, cb3[17].z
max r1.x, r1.x, l(0.000000)
add r4.xy, -cb2[74].zxzz, cb2[74].wyww
mad r4.xy, r0.xxxx, r4.xyxx, cb2[74].zxzz
mul r0.x, r1.x, cb3[17].y
mul r0.x, r0.x, l(0.005000)
mov_sat r1.x, r2.z
dp3 r3.w, r2.xyzx, r7.xyzx
add_sat r4.z, -r3.w, l(1.000000)
log r4.z, r4.z
mul r4.x, r4.z, r4.x
exp r4.x, r4.x
mul r4.z, r1.x, r4.y
lt r4.w, r2.z, l(0.000000)
mul r1.x, r1.x, r4.x
movc r1.x, r4.w, l(0), r1.x
mad r0.x, r4.z, r0.x, r1.x
mul r4.xzw, r0.xxxx, cb3[4].xxyz
mul r8.xyz, r8.xyzx, r1.yzwy
ftoi r9.xy, v0.xyxx
mov r9.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r9.xyz, r9.xyzw, t53.xyzw
add r5.xyz, r5.xyzx, r9.xyzx
mul r1.xzw, r1.yyzw, r5.xxyz
mad r1.xzw, r4.yyyy, r4.xxzw, r1.xxzw
mul r3.xyz, r3.xyzx, r8.xyzx
max r0.x, r3.w, l(1.000000012E-007)
add r0.x, -r0.x, l(1.000000)
mul r4.x, r0.x, r0.x
mul r4.x, r4.x, r4.x
mul r0.x, r0.x, r4.x
mad r0.x, r0.x, l(0.960000), l(0.040000)
mul r2.xyz, r2.xyzx, r3.wwww
mad r2.xyz, r2.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r7.xyzx
dp3 r0.y, r2.xyzx, r0.yzwy
mad_sat r0.y, cb3[18].x, r0.y, l(1.000000)
mul r0.y, r0.y, r0.y
mul r0.x, r0.x, r0.y
mul r0.x, r0.x, cb3[17].w
mul r0.x, r1.y, r0.x
mul r0.x, r2.w, r0.x
mad r0.yzw, r1.xxzw, r6.xxyz, r3.xxyz
max o0.xyz, r0.yzwy, l(0.000000, 0.000000, 0.000000, 0.000000)
mul_sat r0.x, r0.x, l(0.250000)
sqrt o1.x, r0.x
ret 
// Approximately 639 instruction slots used
