//0f7142ae84279851-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Sun Feb 07 14:06:11 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 DrawableBuffer
// {
//
//   float4 FogColor;                   // Offset:    0 Size:    16 [unused]
//   float4 DebugColor;                 // Offset:   16 Size:    16 [unused]
//   float AlphaThreshold;              // Offset:   32 Size:     4
//   float4 __InstancedMaterialOpacity[256];// Offset:   48 Size:  4096 [unused]
//
// }
//
// 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 [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 MaterialBuffer
// {
//
//   float4 MaterialParams[512];        // Offset:    0 Size:  8192
//
// }
//
// 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
// ------------------------------ ---------- ------- ----------- ---- --------
// 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_n161_19B9FD0C15847118_Param_texture    texture  float4          2d    0        1
// p_default_Setup_n35_Texture_texture    texture  float4          2d    1        1
// p_default_Setup_n44_Texture_texture    texture  float4          2d    2        1
// p_default_Setup_n40_Texture_texture    texture  float4          2d    3        1
// p_default_Material_n163_n181_n191_661830C016465534_cp0_Param_texture    texture  float4          2d    4        1
// p_default_Material_n161_49EF29C0204713_cp0_Param_texture    texture  float4          2d    5        1
// p_default_Setup_n11_n89_Texture_texture    texture  float4          2d    7        1
// p_default_Setup_n11_n79_Texture_texture    texture  float4          2d    8        1
// p_default_Setup_n1_n69_Texture_texture    texture  float4          2d    9        1
// p_default_Setup_n11_n101_Texture_texture    texture  float4          2d   10        1
// p_default_Setup_n1_n56_Texture_texture    texture  float4          2d   11        1
// p_default_Setup_n38_BD8AA44026454365_cp7_Param_texture    texture  float4          2d   12        1
// p_default_Setup_n1_n58_Texture_texture    texture  float4          2d   13        1
// p_default_Setup_n39_Texture_texture    texture  float4          2d   14        1
// p_default_Setup_n15_Texture_texture    texture  float4          2d   15        1
// p_default_Setup_n19_Texture_texture    texture  float4          2d   16        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
// DrawableBuffer                    cbuffer      NA          NA    1        1
// SceneBuffer                       cbuffer      NA          NA    2        1
// MaterialBuffer                    cbuffer      NA          NA    3        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                    0   xyzw        1     NONE   float   xy  
// COLOR                    1   xyzw        2     NONE   float   x  w
// TEXCOORD                 0   xyzw        3     NONE   float   xy  
// TEXCOORD                 2   xyz         4     NONE   float   xyz 
// PSIZE                    0   x           5     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 cb1[3], immediateIndexed
// dcl_constantbuffer cb2[72], immediateIndexed
dcl_constantbuffer cb2[82], immediateIndexed
dcl_constantbuffer cb3[15], immediateIndexed
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) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
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) 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.xy
dcl_input_ps linear v2.xw
dcl_input_ps linear v3.xy
dcl_input_ps linear v4.xyz
dcl_input_ps constant v5.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, v4.xyzx, v4.xyzx
rsq r0.x, r0.x
mul r0.yzw, r0.xxxx, v4.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
deriv_rty_fine r6.xy, v3.xyxx
deriv_rtx_fine r1.xy, v3.xyxx
mov r3.xy, r2.zwzz
dp4 r2.x, cb2[15].xyzw, r3.xyzw
dp4 r2.y, cb2[16].xyzw, r3.xyzw
dp4 r2.z, cb2[17].xyzw, r3.xyzw
deriv_rty_fine r3.xyz, r2.xyzx
deriv_rtx_fine r8.xyz, r2.yzxy
sample_indexable(texture2d)(float,float,float,float) r2.xyz, v3.xyxx, t3.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r2.w, v3.xyxx, t1.yzwx, s11
sample_indexable(texture2d)(float,float,float,float) r3.w, v3.xyxx, t2.yzwx, s11
mul r9.xyzw, v3.xyxy, cb3[7].zwxy
sample_indexable(texture2d)(float,float,float,float) r9.xy, r9.xyxx, t9.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, v3.xyxy, cb3[5].zwxy
sample_indexable(texture2d)(float,float,float,float) r11.xyzw, r10.xyxx, t11.xyzw, s11
mul r12.xyzw, v3.xyxy, cb3[6].zwxy
sample_indexable(texture2d)(float,float,float,float) r10.xy, r12.xyxx, t13.xyzw, s11
mul r12.xy, r9.xyxx, r9.xyxx
mad r4.w, -r9.x, r9.x, l(1.000000)
mad r4.w, -r9.y, r9.y, r4.w
max r6.w, r12.y, r12.x
mul r6.w, r6.w, l(0.0000610351563)
max r4.w, r4.w, r6.w
rsq r4.w, r4.w
mul r9.xy, r9.xyxx, -r4.wwww
mul r11.xyzw, r11.xyzw, cb3[0].xyzw
mul r4.w, r10.x, cb3[9].w
mul r9.xy, r9.xyxx, cb3[4].wwww
add r6.w, -cb3[10].z, cb3[10].y
mad r6.w, r10.y, r6.w, cb3[10].z
mul r13.xyz, r4.wwww, cb3[3].xyzx
mov_sat r10.xy, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r12.xy, v3.xyxx, t15.xyzw, s11
mad r12.xy, r12.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) r14.xy, v3.xyxx, t16.xyzw, s11
mad r14.xy, r14.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) r15.xyz, v3.xyxx, t14.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r4.w, v3.xyxx, t12.yzwx, s11
add_sat r7.w, -cb3[11].y, l(1.000000)
mad_sat r4.w, cb3[11].y, r4.w, r7.w
mov_sat r14.zw, v2.xxxw
mul r16.xy, r14.xyxx, r14.xyxx
mad r7.w, -r14.x, r14.x, l(1.000000)
mad r7.w, -r14.y, r14.y, r7.w
max r8.w, r16.y, r16.x
mul r8.w, r8.w, l(0.0000610351563)
max r7.w, r7.w, r8.w
rsq r7.w, r7.w
mul r14.xy, r14.xyxx, -r7.wwww
mul r16.xy, r12.xyxx, r12.xyxx
mad r7.w, -r12.x, r12.x, l(1.000000)
mad r7.w, -r12.y, r12.y, r7.w
max r8.w, r16.y, r16.x
mul r8.w, r8.w, l(0.0000610351563)
max r7.w, r7.w, r8.w
rsq r7.w, r7.w
mul r12.xy, r12.xyxx, -r7.wwww
dp3 r7.w, r8.zxyz, r0.yzwy
mad r8.xyz, -r7.wwww, r0.zwyz, r8.xyzx
dp3 r7.w, r3.xyzx, r0.yzwy
mad r3.xyz, -r7.wwww, r0.yzwy, r3.xyzx
mul r6.x, r6.x, r1.y
mad r1.x, r1.x, r6.y, -r6.x
lt r6.x, r1.x, l(0.000000)
movc r6.x, r6.x, l(-1.000000), l(1.000000)
mov r6.z, -r1.y
mul r6.yz, r6.yyzy, r6.xxxx
mul r16.xyz, r3.xyzx, r6.zzzz
mad r16.xyz, r8.zxyz, r6.yyyy, r16.xyzx
lt r1.x, l(0.000000), |r1.x|
dp3 r1.y, r16.xyzx, r16.xyzx
rsq r1.y, r1.y
mul r17.xyz, r1.yyyy, r16.xyzx
movc r16.xyz, r1.xxxx, r17.xyzx, r16.xyzx
mul r17.xyz, r0.wyzw, r16.yzxy
mad r17.xyz, r0.zwyz, r16.zxyz, -r17.xyzx
mul r18.xyz, r0.wyzw, r8.xyzx
mad r8.xyz, r0.zwyz, r8.yzxy, -r18.xyzx
dp3 r1.x, r3.xyzx, r8.xyzx
lt r1.x, r1.x, l(0.000000)
movc r1.x, r1.x, l(-1.000000), l(1.000000)
mul r1.x, r1.x, r6.x
mul r3.xyz, r1.xxxx, r17.xyzx
mul r1.xy, r10.yyyy, r12.xyxx
add r6.x, r10.y, r10.x
add r6.y, -r6.x, l(1.000000)
lt r6.z, l(1.000000), r6.x
div r8.xy, r10.xyxx, r6.xxxx
movc r6.xz, r6.zzzz, r8.xxyx, r10.xxyx
add r8.xyz, r15.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r8.xyz, r6.xxxx, r8.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r2.xyz, r2.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r2.xyz, r6.zzzz, r2.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
min r2.xyz, r2.xyzx, r8.xyzx
mul r2.xyz, r2.xyzx, r11.xyzx
mad r1.xy, r14.xyxx, r10.xxxx, r1.xyxx
mad r1.xy, r9.xyxx, r6.yyyy, r1.xyxx
sample_indexable(texture2d)(float,float,float,float) r6.xyz, r12.zwzz, t10.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r8.xy, r10.zwzz, t8.xyzw, s11
mad r8.xy, r8.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.zw, r9.zwzz, t7.zwxy, s11
mul r9.xy, r8.xyxx, r8.xyxx
mad r7.w, -r8.x, r8.x, l(1.000000)
mad r7.w, -r8.y, r8.y, r7.w
max r9.x, r9.y, r9.x
mul r9.x, r9.x, l(0.0000610351563)
max r7.w, r7.w, r9.x
rsq r7.w, r7.w
mul r8.xy, r8.xyxx, -r7.wwww
add r7.w, cb3[8].x, -cb3[10].x
mad r7.w, r8.w, r7.w, cb3[10].x
mad r2.w, r2.w, cb3[1].w, cb3[2].w
mul_sat r2.w, r2.w, r14.z
mad r6.xyz, cb3[4].xyzx, r6.xyzx, -r2.xyzx
mad r2.xyz, r2.wwww, r6.xyzx, r2.xyzx
mad r6.xy, r8.xyxx, cb3[3].wwww, -r1.xyxx
mad r1.xy, r2.wwww, r6.xyxx, r1.xyxx
mad r6.xyz, cb3[8].zzzz, r8.zzzz, -r13.xyzx
mad r6.xyz, r2.wwww, r6.xyzx, r13.xyzx
add r7.w, -r6.w, r7.w
mad r2.w, r2.w, r7.w, r6.w
mul r3.xyz, r3.xyzx, r1.yyyy
mad r3.xyz, r1.xxxx, r16.xyzx, r3.xyzx
mad r3.xyz, v4.xyzx, r0.xxxx, -r3.xyzx
dp3 r0.x, r3.xyzx, r3.xyzx
rsq r0.x, r0.x
mul r3.xyz, r0.xxxx, r3.xyzx
mad r8.xyz, r6.xyzx, cb3[11].zzzz, -r6.xyzx
mad r6.xyz, r14.wwww, r8.xyzx, r6.xyzx
mad r8.xyz, r2.xyzx, cb3[8].wwww, -r2.xyzx
mad r2.xyz, r14.wwww, r8.xyzx, r2.xyzx
mad r0.x, r2.w, cb3[8].y, -r2.w
mad r0.x, r14.w, r0.x, r2.w
max r1.x, |r5.y|, |r5.x|
add r8.xyz, -r1.xxxx, 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 r1.x, l(0)
loop 
  uge r1.y, r1.x, cb7[0].y
  breakc_nz r1.y
  iadd r1.y, r1.x, cb7[0].x
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r12.xyz, r1.y, l(16), t54.xyzx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r13.xyz, r1.y, l(64), t54.xyzx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r14.xyz, r1.y, l(112), t54.xyzx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r2.w, r1.y, l(156), t54.xxxx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r6.w, r1.y, 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 r2.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r12.xyzw, r1.y, l(192), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r16.xyzw, r1.y, l(208), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r17.xyzw, r1.y, l(224), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.xyzw, r1.y, 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 r2.w, r5.xyzw, r18.xyzw
    add r12.xyzw, -r2.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 r2.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) r7.w, r16.xyxx, t43.xxxx, s14, r12.w
    sample_c_lz_indexable(texture2d)(float,float,float,float) r8.w, r16.zwzz, t43.xxxx, s14, r12.w
    add r7.w, r7.w, r8.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) r8.w, r16.xyxx, t43.xxxx, s14, r12.w
    add r7.w, r7.w, r8.w
    sample_c_lz_indexable(texture2d)(float,float,float,float) r8.w, r16.zwzz, t43.xxxx, s14, r12.w
    add r7.w, r7.w, r8.w
    mul r7.w, r7.w, l(0.250000)
    movc r2.w, r2.w, r7.w, l(1.000000)
  else 
    mov r2.w, l(1.000000)
  endif 
  if_nz r6.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r12.xyzw, r1.y, l(256), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r16.xyzw, r1.y, l(272), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r17.xyzw, r1.y, l(288), t54.xyzw
    dp4 r1.y, r12.xyzw, r10.xyzw
    dp4 r6.w, r16.xyzw, r10.xyzw
    dp4 r7.w, r17.xyzw, r10.xyzw
    div r12.x, r1.y, r7.w
    div r12.y, r6.w, r7.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 r1.y, r3.xyzx, r15.xyzx
  mov_sat r9.x, r1.y
  mad r9.y, r1.y, l(0.500000), l(0.500000)
  dp3 r1.y, r9.xyzx, r14.xyzx
  mul r9.xyw, r13.xyxz, r1.yyyy
  mul r9.xyw, r12.xyxz, r9.xyxw
  mad r11.xyz, r9.xywx, r2.wwww, r11.xyzx
  iadd r1.x, r1.x, l(1)
endloop 
if_nz cb7[0].x
  mul r1.xy, v0.xyxx, l(0.062500, 0.062500, 0.000000, 0.000000)
  round_ni r1.xy, r1.xyxx
  utof r2.w, cb7[0].z
  mad r1.x, r1.y, r2.w, r1.x
  ftou r1.x, r1.x
  ishl r1.x, r1.x, l(1)
  dp3 r1.y, r10.xyzx, r10.xyzx
  sqrt r1.y, r1.y
  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 r2.w, l(0)
  loop 
    uge r5.w, r2.w, l(2)
    breakc_nz r5.w
    iadd r5.w, r1.x, r2.w
    ld_indexable(buffer)(uint,uint,uint,uint) r15.xyzw, r5.wwww, t55.xyzw
    ushr r16.xyzw, r15.xyzw, l(30, 30, 30, 30)
    iadd r5.w, r16.y, r16.x
    iadd r5.w, r16.z, r5.w
    iadd r5.w, r16.w, r5.w
    mov r16.xyz, r14.xyzx
    mov r6.w, l(0)
    loop 
      uge r7.w, r6.w, r5.w
      breakc_nz r7.w
      ult r17.xyz, r6.wwww, l(3, 6, 9, 0)
      iadd r18.xyz, r6.wwww, l(-3, -6, -9, 0)
      movc r7.w, r17.z, r18.y, r18.z
      movc r7.w, r17.y, r18.x, r7.w
      movc r7.w, r17.x, r6.w, r7.w
      movc r8.w, r17.z, r15.z, r15.w
      movc r8.w, r17.y, r15.y, r8.w
      movc r8.w, r17.x, r15.x, r8.w
      imul null, r7.w, r7.w, l(10)
      ushr r7.w, r8.w, r7.w
      and r7.w, r7.w, l(1023)
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r8.w, r7.w, l(140), t54.xxxx
      mov r17.xyz, r16.xyzx
      mov r9.w, r6.w
      mov r13.w, r7.w
      mov r14.w, r8.w
      loop 
        ult r16.w, r9.w, r5.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, r3.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, r9.w, l(1)
        ult r8.y, r8.x, r5.w
        if_nz r8.y
          ult r18.xyz, r8.xxxx, l(3, 6, 9, 0)
          iadd r19.xyz, r9.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 r9.w, r8.x
      endloop 
      mov r8.xyw, r17.xyxz
      mov r7.w, r9.w
      mov r16.w, r13.w
      mov r17.w, r14.w
      loop 
        ult r18.x, r7.w, r5.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, r1.yyyy, 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, r3.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, r7.w, l(1)
        ult r9.y, r9.x, r5.w
        if_nz r9.y
          ult r18.xyz, r9.xxxx, l(3, 6, 9, 0)
          iadd r19.xyz, r7.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 r7.w, r9.x
      endloop 
      mov r16.xyz, r8.xywx
      mov r9.x, r7.w
      mov r9.y, r16.w
      mov r18.x, r17.w
      loop 
        ult r18.y, r9.x, r5.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, r3.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, r5.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 r6.w, -r9.y, r9.x
    endloop 
    ult r5.w, r5.w, l(12)
    if_nz r5.w
      mov r14.xyz, r16.xyzx
      break 
    endif 
    iadd r2.w, r2.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) r1.xyz, r1.zwzz, t5.xyzw, s11
dp3 r1.w, r6.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
max r2.w, r11.w, l(0.000000)
add r0.x, r0.x, l(2.000000)
mul r0.x, r0.x, l(0.010000)
mul r6.xyz, r0.xxxx, r6.xyzx
add r8.xyz, -r5.xyzx, r11.xyzx
mad r5.xyz, r3.wwww, r8.xyzx, r5.xyzx
ftoi r8.xy, v0.xyxx
mov r8.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r0.x, r8.xyww, t4.xyzw
add r3.w, cb3[10].w, cb3[11].x
add_sat r3.w, -r3.w, l(1.000000)
mul r5.w, r0.x, r0.x
mad r0.x, cb3[10].w, r0.x, r3.w
mad_sat r0.x, r5.w, cb3[11].x, r0.x
add r9.xyz, -cb3[2].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad_sat r9.xyz, r0.xxxx, r9.xyzx, cb3[2].xyzx
ishl r0.x, v5.x, l(3)
add r10.xyz, r4.xyzx, -cb2[10].xyzx
dp3 r3.w, r10.xyzx, r10.xyzx
sqrt r3.w, r3.w
add r0.x, r4.z, -cb0[r0.x + 7].z
add r4.x, -cb3[11].w, cb3[12].x
add r3.w, r3.w, -cb3[11].w
div r4.x, l(1.000000, 1.000000, 1.000000, 1.000000), r4.x
mul_sat r3.w, r3.w, r4.x
mad r4.x, r3.w, l(-2.000000), l(3.000000)
mul r3.w, r3.w, r3.w
mul r3.w, r3.w, r4.x
add r0.x, r0.x, cb3[13].z
max r0.x, r0.x, l(0.000000)
add r4.x, cb3[12].w, -cb3[13].x
mad r4.x, r3.w, r4.x, cb3[13].x
add r4.y, -cb3[12].z, cb3[12].y
mad r3.w, r3.w, r4.y, cb3[12].z
mul r0.x, r0.x, cb3[13].y
mul r0.x, r0.x, l(0.005000)
mov_sat r4.y, r3.z
dp3 r4.z, r3.xyzx, r7.xyzx
add_sat r5.w, -r4.z, l(1.000000)
log r5.w, r5.w
mul r4.x, r4.x, r5.w
exp r4.x, r4.x
mul r5.w, r3.w, r4.y
lt r6.w, r3.z, l(0.000000)
mul r4.x, r4.y, r4.x
movc r4.x, r6.w, l(0), r4.x
mad r0.x, r5.w, r0.x, r4.x
mul r10.xyz, r0.xxxx, cb3[1].xyzx
mul r1.xyz, r1.xyzx, r9.xyzx
ld_indexable(texture2d)(float,float,float,float) r8.xyz, r8.xyzw, t53.xyzw
mad r5.xyz, r4.wwww, r8.xyzx, r5.xyzx
mul r5.xyz, r5.xyzx, r9.xyzx
mad r5.xyz, r3.wwww, r10.xyzx, r5.xyzx
mul r0.x, r4.w, r9.x
mul r1.xyz, r6.xyzx, r1.xyzx
max r3.w, r4.z, l(1.000000012E-007)
add r3.w, -r3.w, l(1.000000)
mul r4.x, r3.w, r3.w
mul r4.x, r4.x, r4.x
mul r3.xyzw, r3.xyzw, r4.zzzx
mad r3.w, r3.w, l(0.960000), l(0.040000)
mad r3.xyz, r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r7.xyzx
dp3 r0.y, r3.xyzx, r0.yzwy
mad_sat r0.y, cb3[14].x, r0.y, l(1.000000)
mul r0.y, r0.y, r0.y
mul r0.y, r3.w, r0.y
mul r0.y, r0.y, cb3[13].w
mul r0.x, r0.x, r0.y
mul r0.x, r1.w, r0.x
mad r0.yzw, r5.xxyz, r2.xxyz, r1.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
add r0.x, r2.w, -cb1[2].x
min r0.x, r0.x, l(0.000000)
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
mov o0.w, r2.w
ret 
// Approximately 628 instruction slots used
