//739b0f011d01ffc0-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Sat Feb 06 00:36:01 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 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
//   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
//   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 [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
//   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
//   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
//   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
// ------------------------------ ---------- ------- ----------- ---- --------
// 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_n294_n356_n362_661830C016465534_cp0_Param_texture    texture  float4          2d    0        1
// p_default_Setup_4FE05D605316617_Param_texture    texture  float4          2d    1        1
// p_default_Setup_508FD10019919790_Param_texture    texture  float4          2d    2        1
// p_default_Setup_47AC6AA019884710_Param_texture    texture  float4          2d    3        1
// p_default_Setup_682531608820084_cp4_DepthBufferTexture_texture    texture  float4          2d    5        1
// p_default_Material_508F0A605905068_Param_texture    texture  float4        cube    6        1
// p_default_Material_5D538DD03205705_Param_texture    texture  float4          2d    7        1
// p_default_Setup_5B743C1024312614_cp0_Param_texture    texture  float4          2d    8        1
// p_default_Setup_n7_4DF3FB3016561432_cp3_Param_texture    texture  float4          2d    9        1
// p_default_Setup_n44_n233_Texture_texture    texture  float4          2d   10        1
// p_default_Setup_n43_n74_Texture_texture    texture  float4          2d   11        1
// p_default_Setup_n43_n88_Texture_texture    texture  float4          2d   12        1
// p_default_Setup_n3_n175_Texture_texture    texture  float4          2d   13        1
// p_default_Setup_n11_n88_Texture_texture    texture  float4          2d   14        1
// p_default_Setup_n3_586C1AD013233232_Param_texture    texture  float4          2d   15        1
// p_default_Setup_n11_n74_Texture_texture    texture  float4          2d   16        1
// p_default_Setup_n43_n79_Texture_texture    texture  float4          2d   17        1
// p_default_Setup_n0_n88_Texture_texture    texture  float4          2d   18        1
// p_default_Setup_n3_2FCBF5109468681_Param_texture    texture  float4          2d   19        1
// p_default_Setup_n0_n74_Texture_texture    texture  float4          2d   20        1
// p_default_Setup_n11_n79_Texture_texture    texture  float4          2d   21        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
// DirectionalShadow_texture         texture  float4          2d   58        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
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 2   xyz         2     NONE   float   xyz 
// TEXCOORD                 3   xyz         3     NONE   float   xyz 
// TEXCOORD                 4   xyz         4     NONE   float   xyz 
// PSIZE                    0   x           5     NONE    uint       
//
//
// 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 cb2[95], immediateIndexed
dcl_constantbuffer cb3[39], immediateIndexed
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) t3
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texturecube (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture2d (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t9
dcl_resource_texture2d (float,float,float,float) t10
dcl_resource_texture2d (float,float,float,float) t11
dcl_resource_texture2d (float,float,float,float) t12
dcl_resource_texture2d (float,float,float,float) t13
dcl_resource_texture2d (float,float,float,float) t14
dcl_resource_texture2d (float,float,float,float) t15
dcl_resource_texture2d (float,float,float,float) t16
dcl_resource_texture2d (float,float,float,float) t17
dcl_resource_texture2d (float,float,float,float) t18
dcl_resource_texture2d (float,float,float,float) t19
dcl_resource_texture2d (float,float,float,float) t20
dcl_resource_texture2d (float,float,float,float) t21
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_resource_texture2d (float,float,float,float) t58
dcl_input_ps_siv linear noperspective v0.xyw, position
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xyz
dcl_input_ps linear v3.xyz
dcl_input_ps linear v4.xyz
dcl_output o0.xyzw
dcl_output o1.x
// dcl_temps 34
dcl_temps 36
dcl_resource_texture2d (float,float,float,float) t125
dp3 r0.x, v2.xyzx, v2.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, v2.xyzx
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) r35.xyzw, l(0, 0, 0, 0), t125.xyzw
add r35.w, v0.w, -r35.y
mul r35.w, r35.w, r35.x
mul r35.w, r35.w, l(0.5)
add r3.x, r3.x, -r35.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) r35.xyzw, l(0, 0, 0, 0), t125.xyzw
add r35.w, v0.w, -r35.y
mul r35.w, r35.w, r35.x
mul r35.w, r35.w, cb2[81].x
add r5.x, r5.x, -r35.w


dp3 r0.w, -r5.xyzx, -r5.xyzx
rsq r0.w, r0.w
mul r6.xyz, r0.wwww, -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.xyz, r4.zxyz
deriv_rtx_fine r8.xyz, r4.xyzx
mul r9.xyz, r0.zxyz, r8.yzxy
mad r9.xyz, r0.yzxy, r8.zxyz, -r9.xyzx
mul r10.xyz, r0.yzxy, r6.xyzx
mad r6.xyz, r6.zxyz, r0.zxyz, -r10.xyzx
dp3 r1.x, r6.xyzx, r7.xyzx
dp3 r1.y, r9.xyzx, r7.xyzx
dp3 r0.w, r8.xyzx, r6.xyzx
div r1.xy, r1.xyxx, r0.wwww
deriv_rty_fine r6.xy, v1.xyxx
deriv_rtx_fine r2.xy, v1.xyxx
mov r3.xy, r2.zwzz
dp4 r0.w, 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, r0.w
deriv_rty_fine r3.yz, r2.zzwz
deriv_rtx_fine r8.z, r0.w
deriv_rtx_fine r8.xy, r2.zwzz
add r9.xyz, r4.xyzx, -cb2[10].xyzx
dp3 r0.w, r9.xyzx, cb2[11].xyzx
mad r2.zw, cb2[24].xxxx, cb3[25].xxxy, v1.zzzw
sample_l_indexable(texture2d)(float,float,float,float) r3.w, r1.zwzz, t5.yzwx, s10, l(0.000000)
mad r3.w, r3.w, cb2[20].x, cb2[20].y
max r3.w, r3.w, l(0.000001)
div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
mul r2.zw, r2.zzzw, cb3[18].zzzw
mul r9.xyzw, v1.zwxy, cb3[24].xyzw
mul r10.xyzw, v1.zwzw, cb3[22].zwxy
sample_indexable(texture2d)(float,float,float,float) r4.w, r10.xyxx, t18.xzwy, s11
sample_indexable(texture2d)(float,float,float,float) r11.xyz, r9.xyxx, t20.xyzw, s11
mul r11.xyz, r11.xyzx, cb3[10].xyzx
add r6.w, -cb3[15].w, cb3[29].z
mad r6.w, r4.w, r6.w, cb3[15].w
mul r9.xy, v1.zwzz, cb3[21].zwzz
mul r12.xyzw, v1.zwxy, cb3[20].zwxy
sample_indexable(texture2d)(float,float,float,float) r7.w, r12.xyxx, t12.yzwx, s11
sample_indexable(texture2d)(float,float,float,float) r10.xyz, r10.zwzz, t11.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r9.xy, r9.xyxx, t17.xyzw, s11
mad r13.xy, r9.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r8.w, r13.xyxx, r13.xyxx
add r8.w, -r8.w, l(1.000000)
max r8.w, r8.w, l(0.000000)
sqrt r13.z, r8.w
mov r14.x, cb3[36].x
mov r14.z, l(1.000000)
add r3.w, -r0.w, r3.w
mul r15.xyzw, v1.zwxy, cb3[19].xyzw
mul r16.xyzw, v1.xyzw, cb3[26].xyzw
mul r9.xy, v1.xyxx, cb3[18].xyxx
sample_indexable(texture2d)(float,float,float,float) r8.w, r9.xyxx, t1.yzwx, s11
deriv_rtx_fine r12.xy, r9.xyxx
deriv_rty_fine r9.xy, r9.xyxx
add r8.w, r8.w, l(-0.500000)
mul r8.w, r8.w, cb3[32].y
mul r9.xy, r1.yyyy, r9.xyxx
mad r1.xy, r1.xxxx, r12.xyxx, r9.xyxx
mad r9.xy, r1.xyxx, r8.wwww, v1.xyxx
mul r9.xy, r9.xyxx, cb3[21].xyxx
sample_indexable(texture2d)(float,float,float,float) r9.xy, r9.xyxx, t14.xyzw, s11
mad r12.xy, r1.xyxx, r8.wwww, r15.zwzz
mad r1.xy, r1.xyxx, r8.wwww, r16.xyxx
sample_indexable(texture2d)(float,float,float,float) r17.xyz, r1.xyxx, t16.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r1.xy, r12.xyxx, t21.xyzw, s11
mad r18.xy, r1.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r1.x, r18.xyxx, r18.xyxx
add r1.x, -r1.x, l(1.000000)
max r1.x, r1.x, l(0.000000)
sqrt r18.z, r1.x
mul r19.xyz, r9.xxxx, cb3[9].xyzx
add r1.x, cb3[34].z, -cb3[37].x
mad r1.x, r9.y, r1.x, cb3[37].x
mov r20.x, cb3[33].y
mov r20.z, l(1.000000)
sample_indexable(texture2d)(float,float,float,float) r1.y, r15.xyxx, t8.yxzw, s11
sample_indexable(texture2d)(float,float,float,float) r2.z, r2.zwzz, t3.yzxw, s11
dp3 r2.w, r8.zxyz, r0.xyzx
mad r8.xyz, -r2.wwww, r0.yzxy, r8.xyzx
dp3 r2.w, r3.xyzx, r0.xyzx
mad r3.xyz, -r2.wwww, r0.xyzx, r3.xyzx
mul r2.w, r6.x, r2.y
mad r2.x, r2.x, r6.y, -r2.w
lt r2.w, r2.x, l(0.000000)
movc r2.w, r2.w, l(-1.000000), l(1.000000)
mov r6.z, -r2.y
mul r6.xy, r2.wwww, r6.yzyy
mul r15.xyz, r3.xyzx, r6.yyyy
mad r6.xyz, r8.zxyz, r6.xxxx, r15.xyzx
lt r2.x, l(0.000000), |r2.x|
dp3 r2.y, r6.xyzx, r6.xyzx
rsq r2.y, r2.y
mul r15.xyz, r2.yyyy, r6.xyzx
movc r6.xyz, r2.xxxx, r15.xyzx, r6.xyzx
mul r15.xyz, r0.zxyz, r6.yzxy
mad r15.xyz, r0.yzxy, r6.zxyz, -r15.xyzx
mul r21.xyz, r0.zxyz, r8.xyzx
mad r8.xyz, r0.yzxy, r8.yzxy, -r21.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, r2.w
mul r2.xyw, r2.xxxx, r15.xyxz
mad_sat r2.z, r2.z, cb3[34].w, cb3[32].x
sample_indexable(texture2d)(float,float,float,float) r3.xy, r16.zwzz, t13.xyzw, s11
mad r3.xy, r3.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r3.z, r3.xyxx, r3.xyxx
add r3.z, -r3.z, l(1.000000)
max r3.z, r3.z, l(0.000000)
sqrt r3.z, r3.z
mad r8.xy, cb2[24].xxxx, cb3[27].xyxx, v1.zwzz
mul r15.xyzw, v1.xyxy, cb3[27].zwzw
mul r15.xyzw, r15.xyzw, cb3[28].xyzw
mul r8.xy, r8.xyxx, cb3[25].zwzz
sample_indexable(texture2d)(float,float,float,float) r16.y, r15.xyxx, t15.yxzw, s11
sample_indexable(texture2d)(float,float,float,float) r8.xyz, r8.xyxx, t19.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r15.y, r15.zwzz, t15.xzyw, s11
mul r21.xyz, r2.xywx, r3.yyyy
mad r21.xyz, r3.xxxx, r6.xyzx, r21.xyzx
mad r3.xyz, r3.zzzz, r0.xyzx, r21.xyzx
dp3 r3.x, r3.xyzx, r3.xyzx
rsq r3.x, r3.x
mul r3.x, r3.x, r3.z
mad_sat r3.x, r3.x, l(0.500000), l(0.500000)
add r3.x, r3.x, r8.x
add_sat r16.x, r8.z, cb3[30].x
mad_sat r15.x, r8.y, cb3[16].w, cb3[31].y
mad_sat r3.y, r8.y, cb3[13].w, cb3[14].w
mad_sat r3.z, r3.x, cb3[17].w, cb3[31].z
mad_sat r3.x, r3.x, cb3[29].w, cb3[38].x
mov r16.z, l(1.000000)
dp3_sat r8.x, cb3[13].xyzx, r16.xyzx
mov r15.z, l(1.000000)
dp3_sat r8.y, cb3[14].xyzx, r15.xyzx
max r8.y, r3.x, r8.y
max r8.y, r3.y, r8.y
max r3.z, r3.z, r8.y
add r3.z, -r3.z, l(1.000000)
sample_indexable(texture2d)(float,float,float,float) r15.xyzw, r9.zwzz, t2.xyzw, s11
mul r8.y, r15.w, cb3[8].w
mul r8.x, r8.x, r8.y
mad r8.yzw, cb3[8].xxyz, r15.xxyz, -r11.xxyz
mad r8.xyz, r8.xxxx, r8.yzwy, r11.xyzx
add r2.z, -r2.z, l(1.000000)
add r8.w, -r3.y, l(1.000000)
mad r2.z, -r2.z, r8.w, l(1.000000)
add r9.xzw, -cb3[2].xxyz, cb3[5].xxyz
mad r9.xzw, r3.yyyy, r9.xxzw, cb3[2].xxyz
add r8.w, -r4.w, r9.y
mad r4.w, r3.y, r8.w, r4.w
add r1.x, -r6.w, r1.x
mad r1.x, r3.y, r1.x, r6.w
add r11.xyz, -cb3[3].xyzx, cb3[7].xyzx
mad r11.xyz, r3.yyyy, r11.xyzx, cb3[3].xyzx
add r6.w, cb3[35].y, -cb3[37].w
mad r6.w, r3.y, r6.w, cb3[37].w
mad r15.xyz, r18.xyzx, r20.xxzx, l(-0.000000, -0.000000, -1.000000, 0.000000)
mad r15.xyz, r3.yyyy, r15.xyzx, l(0.000000, 0.000000, 1.000000, 0.000000)
mul r16.xyz, r19.xyzx, r3.yyyy
mad r17.xyz, r17.xyzx, cb3[12].xyzx, -r8.xyzx
mad r8.xyz, r3.yyyy, r17.xyzx, r8.xyzx
add r2.z, -r2.z, l(1.000000)
add r8.w, -r3.x, l(1.000000)
mad r2.z, -r2.z, r8.w, l(1.000000)
add r17.xyz, -r9.xzwx, cb3[6].xyzx
mad r9.xyz, r3.xxxx, r17.xyzx, r9.xzwx
mad r4.w, r3.x, -r4.w, r4.w
add r8.w, -r1.x, cb3[31].w
mad r1.x, r3.x, r8.w, r1.x
add r17.xyz, -r11.xyzx, cb3[4].xyzx
mad r11.xyz, r3.xxxx, r17.xyzx, r11.xyzx
add r8.w, -r6.w, cb3[35].x
mad r6.w, r3.x, r8.w, r6.w
mad r13.xyz, r13.xyzx, r14.xxzx, -r15.xyzx
mad r13.xyz, r3.xxxx, r13.xyzx, r15.xyzx
mad r14.xyz, cb3[1].xyzx, r7.wwww, -r16.xyzx
mad r14.xyz, r3.xxxx, r14.xyzx, r16.xyzx
mad r10.xyz, r10.xyzx, cb3[0].xyzx, -r8.xyzx
mad r8.xyz, r3.xxxx, r10.xyzx, r8.xyzx
add r3.x, -cb3[30].w, cb3[30].y
add r0.w, r0.w, -cb3[30].w
div r3.x, l(1.000000, 1.000000, 1.000000, 1.000000), r3.x
mul_sat r0.w, r0.w, r3.x
mad r3.x, r0.w, l(-2.000000), l(3.000000)
mul r0.w, r0.w, r0.w
mul r0.w, r0.w, r3.x
mul r10.xy, cb2[24].xxxx, cb3[23].xyxx
mad r10.xy, v1.zwzz, cb3[23].zwzz, r10.xyxx
sample_indexable(texture2d)(float,float,float,float) r10.xy, r10.xyxx, t10.xyzw, s11
mad r10.xy, r10.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
min r0.w, r0.w, l(1.000000)
add r3.x, -cb3[30].z, cb3[31].x
mad r0.w, r0.w, r3.x, cb3[30].z
mul r10.xy, r10.xyxx, r0.wwww
mov r10.z, l(0)
add r10.xyz, r10.xyzx, r13.xyzx
dp3 r0.w, r10.xyzx, r10.xyzx
rsq r0.w, r0.w
mul r10.xyz, r0.wwww, r10.xyzx
mul r2.xyw, r2.xyxw, r10.yyyy
mad r2.xyw, r10.xxxx, r6.xyxz, r2.xyxw
mad r2.xyw, r10.zzzz, r0.xyxz, r2.xyxw
dp3 r0.w, r2.xywx, r2.xywx
rsq r0.w, r0.w
mul r6.xyz, r0.wwww, r2.xywx
sample_indexable(texture2d)(float,float,float,float) r3.x, r12.zwzz, t9.xyzw, s11
mul r3.x, r3.x, cb3[33].x
dp3 r7.w, -r7.xyzx, r6.xyzx
add r7.w, r7.w, r7.w
mad r10.xy, r6.xyxx, -r7.wwww, -r7.xyxx
mul r10.xy, r10.xyxx, cb3[32].wwww
sample_indexable(texture2d)(float,float,float,float) r7.w, r10.xyxx, t9.xzwy, s11
mul_sat r3.x, r3.x, r7.w
add r6.w, -r1.x, r6.w
mad r1.x, r3.x, r6.w, r1.x
mad r10.xyz, r11.xyzx, cb3[32].zzzz, -r14.xyzx
mad r10.xyz, r3.xxxx, r10.xyzx, r14.xyzx
sample_l_indexable(texture2d)(float,float,float,float) r1.z, r1.zwzz, t58.yzxw, s13, l(0.000000)
add r1.w, cb3[33].z, l(1.000000)
add r3.x, cb3[34].x, l(1.000000)
mov r5.w, l(1.000000)
mov r11.xyz, r5.xyzx
mov r11.w, l(1.000000)
mov r12.xyz, l(0,0,0,0)
mov r13.xyz, l(0,0,0,0)
mov r6.w, l(0)
loop 
  uge r7.w, r6.w, cb7[0].y
  breakc_nz r7.w
  iadd r7.w, r6.w, cb7[0].x
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r14.xyz, r7.w, l(16), t54.xyzx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r15.xyz, r7.w, l(64), t54.xyzx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r8.w, r7.w, l(124), t54.xxxx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r9.w, r7.w, l(156), t54.xxxx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r10.w, r7.w, l(172), t54.xxxx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r16.xyzw, r7.w, l(252), t54.yzwx
  dp3 r17.x, -r14.xyzx, cb2[0].xyzx
  dp3 r17.y, -r14.xyzx, cb2[1].xyzx
  dp3 r17.z, -r14.xyzx, cb2[2].xyzx
  if_nz r9.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r14.x, r7.w, l(204), t54.xxxx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r14.y, r7.w, l(220), t54.xxxx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r14.z, r7.w, l(236), t54.xxxx
    mov r14.w, r16.w
    dp4 r9.w, r5.xyzw, r14.xyzw
    add r9.w, -r9.w, cb2[53].x
    lt r9.w, l(0.000000), r9.w
    movc r9.w, r9.w, r1.z, l(1.000000)
  else 
    mov r9.w, l(1.000000)
  endif 
  if_nz r10.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r14.xyzw, r7.w, l(268), t54.yzwx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.xyzw, r7.w, l(284), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.w, r7.w, l(300), t54.xxxx
    mov r16.w, r14.w
    dp4 r7.w, r16.xyzw, r11.xyzw
    mov r14.w, r18.x
    dp4 r10.w, r14.xyzw, r11.xyzw
    mov r19.xyz, r18.yzwy
    dp4 r12.w, r19.xyzw, r11.xyzw
    div r14.x, r7.w, r12.w
    div r14.y, r10.w, r12.w
    sample_l_indexable(texture2d)(float,float,float,float) r14.xyz, r14.xyxx, t40.xyzw, s12, l(0.000000)
  else 
    mov r14.xyz, l(1.000000,1.000000,1.000000,0)
  endif 
  dp3 r7.w, -r7.xyzx, r17.xyzx
  add r7.w, r7.w, cb3[33].z
  div r7.w, r7.w, r1.w
  max r7.w, r7.w, l(0.000000)
  mul r16.xyz, r7.wwww, cb3[15].xyzx
  dp3 r7.w, r17.xyzx, r6.xyzx
  mov_sat r10.w, r7.w
  add r12.w, r7.w, cb3[34].x
  div r12.w, r12.w, r3.x
  max r12.w, r12.w, l(0.000000)
  mul r12.w, r12.w, cb3[33].w
  mul r18.xyz, r6.xyzx, r7.wwww
  mad r17.xyz, r18.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r17.xyzx
  dp3_sat r7.w, r17.xyzx, r7.xyzx
  log r7.w, r7.w
  mul r7.w, r1.x, r7.w
  exp r7.w, r7.w
  mad r16.xyz, r16.xyzx, r1.yyyy, r12.wwww
  add r16.xyz, -r10.wwww, r16.xyzx
  mad r16.xyz, r3.yyyy, r16.xyzx, r10.wwww
  mul r16.xyz, r15.xyzx, r16.xyzx
  mul r16.xyz, r14.xyzx, r16.xyzx
  mul r15.xyz, r15.xyzx, r7.wwww
  mul r14.xyz, r14.xyzx, r15.xyzx
  mul r14.xyz, r9.wwww, r14.xyzx
  mad r12.xyz, r16.xyzx, r9.wwww, r12.xyzx
  mad r13.xyz, r14.xyzx, r8.wwww, r13.xyzx
  iadd r6.w, r6.w, l(1)
endloop 
if_nz cb7[0].x
  mul r14.xy, v0.xyxx, l(0.062500, 0.062500, 0.000000, 0.000000)
  round_ni r14.xy, r14.xyxx
  utof r1.z, cb7[0].z
  mad r1.z, r14.y, r1.z, r14.x
  ftou r1.z, r1.z
  ishl r1.z, r1.z, l(1)
  dp3 r5.w, r11.xyzx, r11.xyzx
  sqrt r5.w, r5.w
  mov r14.xyz, r11.xyzx
  mov r14.w, l(1.000000)
  mov r11.w, l(1.000000)
  mov r15.xyz, r12.xyzx
  mov r16.xyz, r13.xyzx
  mov r6.w, l(0)
  loop 
    uge r7.w, r6.w, l(2)
    breakc_nz r7.w
    iadd r7.w, r1.z, r6.w
    ld_indexable(buffer)(uint,uint,uint,uint) r17.xyzw, r7.wwww, t55.xyzw
    ushr r18.xyzw, r17.xyzw, l(30, 30, 30, 30)
    iadd r7.w, r18.y, r18.x
    iadd r7.w, r18.z, r7.w
    iadd r7.w, r18.w, r7.w
    mov r18.xyz, r15.xyzx
    mov r19.xyz, r16.xyzx
    mov r8.w, l(0)
    loop 
      uge r9.w, r8.w, r7.w
      breakc_nz r9.w
      ult r20.xyz, r8.wwww, l(3, 6, 9, 0)
      iadd r21.xyz, r8.wwww, l(-3, -6, -9, 0)
      movc r9.w, r20.z, r21.y, r21.z
      movc r9.w, r20.y, r21.x, r9.w
      movc r9.w, r20.x, r8.w, r9.w
      movc r10.w, r20.z, r17.z, r17.w
      movc r10.w, r20.y, r17.y, r10.w
      movc r10.w, r20.x, r17.x, r10.w
      imul null, r9.w, r9.w, l(10)
      ushr r9.w, r10.w, r9.w
      and r9.w, r9.w, l(1023)
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r10.w, r9.w, l(140), t54.xxxx
      mov r20.xyz, r18.xyzx
      mov r21.xyz, r19.xyzx
      mov r12.w, r8.w
      mov r13.w, r9.w
      mov r15.w, r10.w
      loop 
        ult r16.w, r12.w, r7.w
        ieq r22.xy, r15.wwww, l(0, 1, 0, 0)
        or r18.w, r22.y, r22.x
        and r16.w, r16.w, r18.w
        breakc_z r16.w
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r22.xzw, r13.w, l(0), t54.xxyz
        if_nz r22.y
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.xyzw, r13.w, l(12), t54.xyzw
          add r24.xyz, r11.xyzx, -r22.xzwx
          dp3 r16.w, r24.xyzx, r23.yzwy
          max r16.w, r16.w, l(0.000000)
          min r16.w, r23.x, r16.w
          mad r22.xzw, r16.wwww, r23.yyzw, r22.xxzw
        endif 
        add r22.xyz, -r5.xyzx, r22.xzwx
        dp3 r16.w, r22.xyzx, r22.xyzx
        sqrt r16.w, r16.w
        div r22.xyz, r22.xyzx, r16.wwww
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.xyz, r13.w, l(64), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.w, r13.w, l(124), t54.xxxx
        dp3 r24.x, r22.xyzx, cb2[0].xyzx
        dp3 r24.y, r22.xyzx, cb2[1].xyzx
        dp3 r24.z, r22.xyzx, cb2[2].xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.w, r13.w, l(32), t54.xxxx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r22.yz, r13.w, l(40), t54.xxyx
        mad_sat r22.x, r16.w, r19.w, r22.y
        sample_l_indexable(texture2d)(float,float,float,float) r16.w, r22.xzxx, t44.xywz, s13, l(0.000000)
        dp3 r19.w, -r7.xyzx, r24.xyzx
        add r19.w, r19.w, cb3[33].z
        div r19.w, r19.w, r1.w
        max r19.w, r19.w, l(0.000000)
        mul r22.xyz, r19.wwww, cb3[15].xyzx
        dp3 r19.w, r24.xyzx, r6.xyzx
        mov_sat r20.w, r19.w
        add r21.w, r19.w, cb3[34].x
        div r21.w, r21.w, r3.x
        max r21.w, r21.w, l(0.000000)
        mul r21.w, r21.w, cb3[33].w
        mul r25.xyz, r6.xyzx, r19.wwww
        mad r24.xyz, r25.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r24.xyzx
        dp3_sat r19.w, r24.xyzx, r7.xyzx
        log r19.w, r19.w
        mul r19.w, r1.x, r19.w
        exp r19.w, r19.w
        mad r22.xyz, r22.xyzx, r1.yyyy, r21.wwww
        add r22.xyz, -r20.wwww, r22.xyzx
        mad r22.xyz, r3.yyyy, r22.xyzx, r20.wwww
        mul r22.xyz, r23.xyzx, r22.xyzx
        mul r23.xyz, r23.xyzx, r19.wwww
        mul r23.xyz, r16.wwww, r23.xyzx
        mad r20.xyz, r22.xyzx, r16.wwww, r20.xyzx
        mad r21.xyz, r23.xyzx, r18.wwww, r21.xyzx
        iadd r16.w, r12.w, l(1)
        ult r18.w, r16.w, r7.w
        if_nz r18.w
          ult r22.xyz, r16.wwww, l(3, 6, 9, 0)
          iadd r23.xyz, r12.wwww, l(-2, -5, -8, 0)
          movc r18.w, r22.z, r23.y, r23.z
          movc r18.w, r22.y, r23.x, r18.w
          movc r18.w, r22.x, r16.w, r18.w
          movc r19.w, r22.z, r17.z, r17.w
          movc r19.w, r22.y, r17.y, r19.w
          movc r19.w, r22.x, r17.x, r19.w
          imul null, r18.w, r18.w, l(10)
          ushr r18.w, r19.w, r18.w
          and r13.w, r18.w, l(1023)
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r15.w, r13.w, l(140), t54.xxxx
        endif 
        mov r12.w, r16.w
      endloop 
      mov r22.xyz, r20.xyzx
      mov r23.xyz, r21.xyzx
      mov r9.w, r12.w
      mov r10.w, r13.w
      mov r16.w, r15.w
      loop 
        ult r18.w, r9.w, r7.w
        ieq r24.xy, r16.wwww, l(2, 3, 0, 0)
        or r19.w, r24.y, r24.x
        and r18.w, r18.w, r19.w
        breakc_z r18.w
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.xzw, r10.w, l(16), t54.xxyz
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r25.xyz, r10.w, l(0), t54.xyzx
        if_nz r24.y
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r26.xyz, r10.w, l(128), t54.xyzx
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.w, r10.w, l(12), t54.xxxx
          add r27.xyz, r11.xyzx, -r25.xyzx
          dp3 r19.w, r27.xyzx, r26.xyzx
          max r19.w, r19.w, l(0.000000)
          min r18.w, r18.w, r19.w
          mad r25.xyz, r18.wwww, r26.xyzx, r25.xyzx
        endif 
        add r25.xyz, -r5.xyzx, r25.xyzx
        dp3 r18.w, r25.xyzx, r25.xyzx
        sqrt r18.w, r18.w
        div r25.xyz, r25.xyzx, r18.wwww
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r26.xyz, r10.w, l(64), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.w, r10.w, l(124), t54.xxxx
        dp3 r27.x, r25.xyzx, cb2[0].xyzx
        dp3 r27.y, r25.xyzx, cb2[1].xyzx
        dp3 r27.z, r25.xyzx, cb2[2].xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r28.xyz, r10.w, l(32), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r29.xyzw, r10.w, l(44), t54.xyzw
        mov r28.w, r29.x
        mad r28.xy, r18.wwww, r28.xyxx, r28.zwzz
        dp3 r20.w, r25.xyzx, -r24.xzwx
        mad_sat r21.w, r20.w, r29.y, r29.z
        mul r22.w, r21.w, r21.w
        mad r21.w, -r21.w, l(2.000000), l(3.000000)
        mul r21.w, r21.w, r22.w
        mul r21.w, r21.w, r21.w
        mul r18.w, r18.w, r20.w
        lt r18.w, r18.w, r29.w
        movc r18.w, r18.w, l(0), r21.w
        sample_l_indexable(texture2d)(float,float,float,float) r20.w, r28.xyxx, t44.xywz, s13, l(0.000000)
        mul r18.w, r18.w, r20.w
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r20.w, r10.w, l(172), t54.xxxx
        if_nz r20.w
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r20.w, r10.w, l(188), t54.xxxx
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.xyzw, r10.w, l(256), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r25.xyzw, r10.w, l(272), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r28.xyzw, r10.w, l(288), t54.xyzw
          dp4 r21.w, r24.xyzw, r14.xyzw
          dp4 r22.w, r25.xyzw, r14.xyzw
          dp4 r23.w, r28.xyzw, r14.xyzw
          div r24.x, r21.w, r23.w
          div r24.y, r22.w, r23.w
          utof r24.z, r20.w
          sample_l_indexable(texture2darray)(float,float,float,float) r24.xyz, r24.xyzx, t56.xyzw, s12, l(0.000000)
        else 
          mov r24.xyz, l(1.000000,1.000000,1.000000,0)
        endif 
        dp3 r20.w, r24.xyzx, r24.xyzx
        mul r20.w, r18.w, r20.w
        lt r20.w, cb2[24].w, r20.w
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r21.w, r10.w, l(156), t54.xxxx
        ine r21.w, r21.w, l(0)
        and r20.w, r20.w, r21.w
        if_nz r20.w
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r25.xyzw, r10.w, l(192), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r28.xyzw, r10.w, l(208), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r29.xyzw, r10.w, l(224), t54.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r30.xyzw, r10.w, l(240), t54.xyzw
          mov r31.x, r25.x
          mov r31.y, r28.x
          mov r31.z, r29.x
          mov r31.w, r30.x
          dp4 r31.x, r11.xyzw, r31.xyzw
          mov r32.x, r25.y
          mov r32.y, r28.y
          mov r32.z, r29.y
          mov r32.w, r30.y
          dp4 r31.y, r11.xyzw, r32.xyzw
          mov r32.x, r25.z
          mov r32.y, r28.z
          mov r32.z, r29.z
          mov r32.w, r30.z
          dp4 r20.w, r11.xyzw, r32.xyzw
          mov r30.x, r25.w
          mov r30.y, r28.w
          mov r30.z, r29.w
          dp4 r21.w, r11.xyzw, r30.xyzw
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r25.xyzw, r10.w, l(80), t54.xyzw
          mad_sat r25.xy, r5.wwww, r25.xyxx, r25.zwzz
          div r28.xyzw, r31.xyxy, r21.wwww
          mad r29.xyzw, cb2[71].zwzw, l(-0.500000, 0.500000, 0.500000, 0.500000), r28.zwzw
          sample_c_lz_indexable(texture2d)(float,float,float,float) r21.w, r29.xyxx, t43.xxxx, s14, r20.w
          sample_c_lz_indexable(texture2d)(float,float,float,float) r22.w, r29.zwzz, t43.xxxx, s14, r20.w
          add r21.w, r21.w, r22.w
          mad r28.xyzw, cb2[71].zwzw, l(-0.500000, -0.500000, 0.500000, -0.500000), r28.xyzw
          sample_c_lz_indexable(texture2d)(float,float,float,float) r22.w, r28.xyxx, t43.xxxx, s14, r20.w
          add r21.w, r21.w, r22.w
          sample_c_lz_indexable(texture2d)(float,float,float,float) r20.w, r28.zwzz, t43.xxxx, s14, r20.w
          add r20.w, r20.w, r21.w
          mul r20.w, r20.w, l(0.250000)
          mad r20.w, r20.w, r25.x, r25.y
        else 
          mov r20.w, l(1.000000)
        endif 
        dp3 r21.w, -r7.xyzx, r27.xyzx
        add r21.w, r21.w, cb3[33].z
        div r21.w, r21.w, r1.w
        max r21.w, r21.w, l(0.000000)
        mul r25.xyz, r21.wwww, cb3[15].xyzx
        dp3 r21.w, r27.xyzx, r6.xyzx
        mov_sat r22.w, r21.w
        add r23.w, r21.w, cb3[34].x
        div r23.w, r23.w, r3.x
        max r23.w, r23.w, l(0.000000)
        mul r23.w, r23.w, cb3[33].w
        mul r28.xyz, r6.xyzx, r21.wwww
        mad r27.xyz, r28.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r27.xyzx
        dp3_sat r21.w, r27.xyzx, r7.xyzx
        log r21.w, r21.w
        mul r21.w, r1.x, r21.w
        exp r21.w, r21.w
        mad r25.xyz, r25.xyzx, r1.yyyy, r23.wwww
        add r25.xyz, -r22.wwww, r25.xyzx
        mad r25.xyz, r3.yyyy, r25.xyzx, r22.wwww
        mul r25.xyz, r26.xyzx, r25.xyzx
        mul r25.xyz, r24.xyzx, r25.xyzx
        mul r25.xyz, r20.wwww, r25.xyzx
        mul r26.xyz, r26.xyzx, r21.wwww
        mul r24.xyz, r24.xyzx, r26.xyzx
        mul r24.xyz, r20.wwww, r24.xyzx
        mul r24.xyz, r18.wwww, r24.xyzx
        mad r22.xyz, r25.xyzx, r18.wwww, r22.xyzx
        mad r23.xyz, r24.xyzx, r19.wwww, r23.xyzx
        iadd r18.w, r9.w, l(1)
        ult r19.w, r18.w, r7.w
        if_nz r19.w
          ult r24.xyz, r18.wwww, l(3, 6, 9, 0)
          iadd r25.xyz, r9.wwww, l(-2, -5, -8, 0)
          movc r19.w, r24.z, r25.y, r25.z
          movc r19.w, r24.y, r25.x, r19.w
          movc r19.w, r24.x, r18.w, r19.w
          movc r20.w, r24.z, r17.z, r17.w
          movc r20.w, r24.y, r17.y, r20.w
          movc r20.w, r24.x, r17.x, r20.w
          imul null, r19.w, r19.w, l(10)
          ushr r19.w, r20.w, r19.w
          and r10.w, r19.w, l(1023)
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r16.w, r10.w, l(140), t54.xxxx
        endif 
        mov r9.w, r18.w
      endloop 
      mov r18.xyz, r22.xyzx
      mov r19.xyz, r23.xyzx
      mov r18.w, r9.w
      mov r19.w, r10.w
      mov r20.w, r16.w
      loop 
        ult r21.w, r18.w, r7.w
        ieq r22.w, r20.w, l(4)
        and r21.w, r21.w, r22.w
        breakc_z r21.w
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.xyz, r19.w, l(0), t54.xyzx
        add r24.xyz, -r5.xyzx, r24.xyzx
        dp3 r21.w, r24.xyzx, r24.xyzx
        sqrt r21.w, r21.w
        div r25.xyz, r24.xyzx, r21.wwww
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r26.xyz, r19.w, l(64), t54.xyzx
        dp3 r27.x, r25.xyzx, cb2[0].xyzx
        dp3 r27.y, r25.xyzx, cb2[1].xyzx
        dp3 r27.z, r25.xyzx, cb2[2].xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r25.xyz, r19.w, l(16), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r28.y, r19.w, l(44), t54.xxxx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r29.xyzw, r19.w, l(124), t54.xyzw
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r30.xyz, r19.w, l(144), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r31.xyz, r19.w, l(160), t54.xyzx
        ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r32.xyz, r19.w, l(176), t54.xyzx
        dp3 r33.x, r24.xyzx, r29.yzwy
        dp3 r33.y, r24.xyzx, r25.xyzx
        dp3 r33.z, r24.xyzx, r30.xyzx
        add r24.xyz, -r31.xyzx, |r33.xyzx|
        mul_sat r24.xyz, r32.xyzx, r24.xyzx
        max r21.w, r24.y, r24.x
        max r28.x, r24.z, r21.w
        sample_l_indexable(texture2d)(float,float,float,float) r21.w, r28.xyxx, t44.xywz, s13, l(0.000000)
        dp3 r22.w, -r7.xyzx, r27.xyzx
        add r22.w, r22.w, cb3[33].z
        div r22.w, r22.w, r1.w
        max r22.w, r22.w, l(0.000000)
        mul r24.xyz, r22.wwww, cb3[15].xyzx
        dp3 r22.w, r27.xyzx, r6.xyzx
        mov_sat r23.w, r22.w
        add r24.w, r22.w, cb3[34].x
        div r24.w, r24.w, r3.x
        max r24.w, r24.w, l(0.000000)
        mul r24.w, r24.w, cb3[33].w
        mul r25.xyz, r6.xyzx, r22.wwww
        mad r25.xyz, r25.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r27.xyzx
        dp3_sat r22.w, r25.xyzx, r7.xyzx
        log r22.w, r22.w
        mul r22.w, r1.x, r22.w
        exp r22.w, r22.w
        mad r24.xyz, r24.xyzx, r1.yyyy, r24.wwww
        add r24.xyz, -r23.wwww, r24.xyzx
        mad r24.xyz, r3.yyyy, r24.xyzx, r23.wwww
        mul r24.xyz, r26.xyzx, r24.xyzx
        mul r25.xyz, r26.xyzx, r22.wwww
        mul r25.xyz, r21.wwww, r25.xyzx
        mad r18.xyz, r24.xyzx, r21.wwww, r18.xyzx
        mad r19.xyz, r25.xyzx, r29.xxxx, r19.xyzx
        iadd r21.w, r18.w, l(1)
        ult r22.w, r21.w, r7.w
        if_nz r22.w
          ult r24.xyz, r21.wwww, l(3, 6, 9, 0)
          iadd r25.xyz, r18.wwww, l(-2, -5, -8, 0)
          movc r22.w, r24.z, r25.y, r25.z
          movc r22.w, r24.y, r25.x, r22.w
          movc r22.w, r24.x, r21.w, r22.w
          movc r23.w, r24.z, r17.z, r17.w
          movc r23.w, r24.y, r17.y, r23.w
          movc r23.w, r24.x, r17.x, r23.w
          imul null, r22.w, r22.w, l(10)
          ushr r22.w, r23.w, r22.w
          and r19.w, r22.w, l(1023)
          ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r20.w, r19.w, l(140), t54.xxxx
        endif 
        mov r18.w, r21.w
      endloop 
      uge r19.w, r20.w, l(5)
      iadd r8.w, r18.w, -r19.w
    endloop 
    ult r7.w, r7.w, l(12)
    if_nz r7.w
      mov r15.xyz, r18.xyzx
      mov r16.xyz, r19.xyzx
      break 
    endif 
    iadd r6.w, r6.w, l(1)
    mov r15.xyz, r18.xyzx
    mov r16.xyz, r19.xyzx
  endloop 
  mov r12.xyz, r15.xyzx
  mov r13.xyz, r16.xyzx
endif 
dp3 r1.x, r10.xyzx, l(0.299000, 0.587000, 0.114000, 0.000000)
mul r1.y, r3.z, cb3[34].y
add r1.z, r4.w, l(2.000000)
mul r1.z, r1.z, l(0.010000)
mul r5.xyz, r1.zzzz, r10.xyzx
mad r6.xyz, -r2.xywx, r0.wwww, -r7.xyzx
mad r6.xyz, cb3[35].wwww, r6.xyzx, r7.xyzx
sample_b_indexable(texturecube)(float,float,float,float) r6.xyz, r6.xyzx, t6.xyzw, s11, l(0.000000)
mul r6.xyz, r6.xyzx, cb3[17].xyzx
max r1.w, r6.z, r6.y
max r11.w, r1.w, r6.x
lt r1.w, l(0.000000), r11.w
div_sat r11.xyz, r6.xyzx, r11.wwww
mov r6.w, l(1.000000)
movc r6.xyzw, r1.wwww, r11.xyzw, r6.xyzw
max r1.w, cb3[16].z, cb3[16].y
max r1.w, r1.w, cb3[16].x
lt r3.x, l(0.000000), r1.w
div_sat r11.xyz, cb3[16].xyzx, r1.wwww
movc r11.xyz, r3.xxxx, r11.xyzx, cb3[16].xyzx
add r4.xyzw, -r4.zxyz, cb2[10].zxyz
mul r1.w, |r3.w|, r4.x
dp3 r3.x, r4.yzwy, r4.yzwy
sqrt r3.x, r3.x
div r1.w, r1.w, r3.x
max r1.w, r1.w, l(0.000000)
mul r1.w, -r1.w, cb3[35].z
mul r1.w, r1.w, l(1.442695)
exp r1.w, r1.w
add r3.xzw, r6.xxyz, -r11.xxyz
mad r3.xzw, r1.wwww, r3.xxzw, r11.xxyz
mul r4.xyz, r3.xzwx, r6.wwww
mul r6.xyz, r0.yyyy, v4.xyzx
mad r6.xyz, r0.xxxx, v3.xyzx, r6.xyzx
mad r0.xyz, r0.zzzz, v2.xyzx, r6.xyzx
dp3 r1.w, r0.xyzx, r0.xyzx
rsq r1.w, r1.w
mul r0.xyz, r0.xyzx, r1.wwww
mul r1.x, r1.x, cb3[36].w
mad r2.xyw, r2.xyxw, r0.wwww, -r0.xyxz
mad r0.xyz, cb3[36].zzzz, r2.xywx, r0.xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
dp3 r0.x, r0.xyzx, r7.xyzx
add_sat r0.x, -r0.x, l(1.000000)
log r0.x, r0.x
mul r0.x, r0.x, cb3[36].y
exp r0.x, r0.x
mul r0.x, r3.y, r0.x
mul r0.x, r1.x, r0.x
mad r0.yzw, -r10.xxyz, r1.zzzz, l(0.000000, 1.000000, 1.000000, 1.000000)
mad r0.yzw, r1.yyyy, r0.yyzw, r5.xxyz
mad r1.xzw, -r6.wwww, r3.xxzw, r8.xxyz
mad r1.xzw, r2.zzzz, r1.xxzw, r4.xxyz
ftoi r2.xy, v0.xyxx
mov r2.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r3.x, r2.xyww, t0.xyzw
add r3.y, cb3[37].z, cb3[37].y
add_sat r3.y, -r3.y, l(1.000000)
mul r3.z, r3.x, r3.x
mad r3.x, cb3[37].y, r3.x, r3.y
mad_sat r3.x, r3.z, cb3[37].z, r3.x
add r3.yzw, -cb2[94].xxyz, l(0.000000, 1.000000, 1.000000, 1.000000)
mad_sat r3.xyz, r3.xxxx, r3.yzwy, cb2[94].xyzx
mul r4.xyz, r13.xyzx, r3.xyzx
add r5.xyz, r9.xyzx, r12.xyzx
ld_indexable(texture2d)(float,float,float,float) r2.xyz, r2.xyzw, t53.xyzw
add r2.xyz, r2.xyzx, r5.xyzx
mul r5.xyz, r2.xyzx, r3.xyzx
mad r2.xyz, -r3.xyzx, r2.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad r2.xyz, r1.yyyy, r2.xyzx, r5.xyzx
mul r1.xyz, r1.xzwx, r2.xyzx
mad r0.yzw, r4.xxyz, r0.yyzw, r1.xxyz
mul r1.xy, v1.zwzz, cb3[29].xyxx
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, r1.xyxx, t7.xyzw, s11
mul r1.xyzw, r1.xyzw, cb3[11].xyzw
max r1.xyz, r0.yzwy, r1.xyzx
add r1.xyz, -r0.yzwy, r1.xyzx
mad r0.yzw, r1.wwww, r1.xxyz, r0.yyzw
max o0.xyz, r0.yzwy, l(0.000000, 0.000000, 0.000000, 0.000000)
mul_sat r0.x, r0.x, l(0.200000)
sqrt o1.x, r0.x
mov o0.w, l(1.000000)
ret 
// Approximately 767 instruction slots used
