//46ed103429c943a3-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Fri Feb 12 21:56:21 2016
//
//
// Buffer Definitions: 
//
// 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
//
// }
//
// 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
//   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
//   float4 FogParams3;                 // Offset:  416 Size:    16
//   float3 GlobalAmbient;              // Offset:  432 Size:    12
//   float __padding8;                  // Offset:  444 Size:     4 [unused]
//   float4 GlobalParams[16];           // Offset:  448 Size:   256
//   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
//   float4 GlobalFogColor;             // Offset: 1520 Size:    16
//   float4 VolumetricLightGlobalParams;// Offset: 1536 Size:    16
//   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 LightBuffer
// {
//
//   struct Light
//   {
//       
//       float4 position;               // Offset:    0
//       float3 direction;              // Offset:   16
//       float4 attParams;              // Offset:   32
//       float4 spotParams;             // Offset:   48
//       float4 diffuseColor;           // Offset:   64
//       float4 shadowFadeParams;       // Offset:   80
//
//   } ShadowLights[3];                 // Offset:    0 Size:   288 [unused]
//   
//   struct Light
//   {
//       
//       float4 position;               // Offset:  288
//       float3 direction;              // Offset:  304
//       float4 attParams;              // Offset:  320
//       float4 spotParams;             // Offset:  336
//       float4 diffuseColor;           // Offset:  352
//       float4 shadowFadeParams;       // Offset:  368
//
//   } NonShadowLights[3];              // Offset:  288 Size:   288 [unused]
//   
//   struct Light
//   {
//       
//       float4 position;               // Offset:  576
//       float3 direction;              // Offset:  592
//       float4 attParams;              // Offset:  608
//       float4 spotParams;             // Offset:  624
//       float4 diffuseColor;           // Offset:  640
//       float4 shadowFadeParams;       // Offset:  656
//
//   } SunLight;                        // Offset:  576 Size:    96 [unused]
//   row_major float4x4 WorldToShadowMap[3];// Offset:  672 Size:   192 [unused]
//   row_major float3x4 WorldToModulationMapSpot[2];// Offset:  864 Size:    96 [unused]
//   row_major float2x4 WorldToModulationMapSun;// Offset:  960 Size:    32 [unused]
//   bool ShadowLightEnabled[3];        // Offset:  992 Size:    36 [unused]
//   bool NonShadowLightEnabled[3];     // Offset: 1040 Size:    36 [unused]
//   bool SunLightEnabled;              // Offset: 1088 Size:     4 [unused]
//   float4 LightAndProbeSet[24];       // Offset: 1104 Size:   384
//   float4 LightSetInfo;               // Offset: 1488 Size:    16
//   float4 ProbeSetInfo;               // Offset: 1504 Size:    16
//
// }
//
// cbuffer IrradianceBuffer
// {
//
//   float4 IrradianceStateRed0;        // Offset:    0 Size:    16
//   float4 IrradianceStateRed1;        // Offset:   16 Size:    16
//   float4 IrradianceStateGreen0;      // Offset:   32 Size:    16
//   float4 IrradianceStateGreen1;      // Offset:   48 Size:    16
//   float4 IrradianceStateBlue0;       // Offset:   64 Size:    16
//   float4 IrradianceStateBlue1;       // Offset:   80 Size:    16
//   float4 IrradianceStateBase;        // Offset:   96 Size:    16
//   float4 IrradianceConstantData;     // Offset:  112 Size:    16
//
// }
//
// 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_n146_n224_fogCube_texture    texture  float4        cube    0        1
// p_default_Material_n147_n206_Texture_texture    texture  float4        cube    1        1
// p_default_Setup_n18_n84_Texture_texture    texture  float4          2d    2        1
// p_default_Material_n148_n156_DepthBufferTexture_texture    texture  float4          2d    3        1
// p_default_Setup_n10_4DF3FB3016561432_cp3_Param_texture    texture  float4          2d    4        1
// p_default_Material_n137_n176_n181_661830C016465534_cp0_Param_texture    texture  float4          2d    5        1
// p_default_Setup_n0_n57_Texture_texture    texture  float4          2d    6        1
// p_default_Setup_n0_n32_Texture_texture    texture  float4          2d    7        1
// p_default_Setup_n0_n50_Texture_texture    texture  float4          2d    8        1
// GlobalModulationMapTextures[0]    texture  float4          2d   40        1
// ShadowMapSampler_texture          texture  float4          2d   43        1
// AttenuationSampler_texture        texture  float4          2d   44        1
// LightDataBuffer                   texture  struct         r/o   54        1
// ModulationMaps                    texture  float4     2darray   56        1
// ReflCubeMaps                      texture  float4   cubearray   57        1
// VolumetricLightIntensity_texture    texture  float4          3d   59        1
// DrawableBuffer                    cbuffer      NA          NA    1        1
// SceneBuffer                       cbuffer      NA          NA    2        1
// MaterialBuffer                    cbuffer      NA          NA    3        1
// LightBuffer                       cbuffer      NA          NA    4        1
// IrradianceBuffer                  cbuffer      NA          NA    6        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   xy  
// TEXCOORD                 2   xyz         2     NONE   float   xyz 
// PSIZE                    0   x           3     NONE    uint   x   
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[259], dynamicIndexed
dcl_constantbuffer cb2[97], immediateIndexed
dcl_constantbuffer cb3[11], immediateIndexed
dcl_constantbuffer cb4[95], dynamicIndexed
dcl_constantbuffer cb6[8], 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_texturecube (float,float,float,float) t0
dcl_resource_texturecube (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture2d (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t40
dcl_resource_texture2d (float,float,float,float) t43
dcl_resource_texture2d (float,float,float,float) t44
dcl_resource_structured t54, 384 
dcl_resource_texture2darray (float,float,float,float) t56
dcl_resource_texturecubearray (float,float,float,float) t57
dcl_resource_texture3d (float,float,float,float) t59
dcl_input_ps_siv linear noperspective v0.xyw, position
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xyz
dcl_input_ps constant v3.x
dcl_output o0.xyzw
// dcl_temps 30
dcl_temps 32
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.zwxy, 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) r31.xyzw, l(0, 0, 0, 0), t125.xyzw
add r31.w, v0.w, -r31.y
mul r31.w, r31.w, r31.x
mul r31.w, r31.w, l(0.5)
add r3.x, r3.x, -r31.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 r2.xy, r1.xyxx, cb2[18].xyxx, cb2[18].zwzz
mul r5.xy, r2.xyxx, v0.wwww
mov r5.z, v0.w

//View space correction, therefore need the InvProj._m00
ld_indexable(texture2d)(float,float,float,float) r31.xyzw, l(0, 0, 0, 0), t125.xyzw
add r31.w, v0.w, -r31.y
mul r31.w, r31.w, r31.x
mul r31.w, r31.w, cb2[81].x
add r5.x, r5.x, -r31.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.xy, v1.xyxx
deriv_rtx_fine r2.xy, v1.xyxx
mov r3.xy, r2.zwzz
dp4 r0.w, cb2[15].xyzw, r3.xyzw
dp4 r1.w, cb2[16].xyzw, r3.xyzw
dp4 r2.z, cb2[17].xyzw, r3.xyzw
deriv_rty_fine r3.x, r0.w
deriv_rty_fine r3.y, r1.w
deriv_rty_fine r3.z, r2.z
deriv_rtx_fine r8.z, r0.w
deriv_rtx_fine r8.x, r1.w
deriv_rtx_fine r8.y, r2.z
mul r9.xyzw, v1.xyxy, cb3[5].xyzw
mul r10.xyzw, v1.xyxy, cb3[4].xyzw
sample_indexable(texture2d)(float,float,float,float) r2.zw, r10.zwzz, t8.zwxy, s11
sample_indexable(texture2d)(float,float,float,float) r11.xyzw, r9.xyxx, t7.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r9.xy, r10.xyxx, t6.xyzw, s11
mad r10.xy, r9.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r0.w, r10.xyxx, r10.xyxx
add r0.w, -r0.w, l(1.000000)
max r0.w, r0.w, l(0.000000)
sqrt r10.z, r0.w
mul r12.xyz, r2.zzzz, cb3[1].xyzx
mul r11.xyzw, r11.xyzw, cb3[3].xyzw
add r0.w, -cb3[7].y, cb3[9].x
mad r0.w, r2.w, r0.w, cb3[7].y
mov r13.x, cb3[10].w
mov r13.z, l(1.000000)
dp3 r1.w, r8.zxyz, r0.xyzx
mad r8.xyz, -r1.wwww, r0.yzxy, r8.xyzx
dp3 r1.w, r3.xyzx, r0.xyzx
mad r3.xyz, -r1.wwww, r0.xyzx, r3.xyzx
mul r1.w, r6.x, r2.y
mad r1.w, r2.x, r6.y, -r1.w
lt r2.x, r1.w, l(0.000000)
movc r2.x, r2.x, l(-1.000000), l(1.000000)
mov r6.z, -r2.y
mul r2.yz, r2.xxxx, r6.yyzy
mul r6.xyz, r2.zzzz, r3.xyzx
mad r6.xyz, r8.zxyz, r2.yyyy, r6.xyzx
lt r1.w, l(0.000000), |r1.w|
dp3 r2.y, r6.xyzx, r6.xyzx
rsq r2.y, r2.y
mul r14.xyz, r2.yyyy, r6.xyzx
movc r6.xyz, r1.wwww, r14.xyzx, r6.xyzx
mul r14.xyz, r0.zxyz, r6.yzxy
mad r14.xyz, r0.yzxy, r6.zxyz, -r14.xyzx
mul r15.xyz, r0.zxyz, r8.xyzx
mad r8.xyz, r0.yzxy, r8.yzxy, -r15.xyzx
dp3 r1.w, r3.xyzx, r8.xyzx
lt r1.w, r1.w, l(0.000000)
movc r1.w, r1.w, l(-1.000000), l(1.000000)
mul r1.w, r1.w, r2.x
mul r2.xyz, r1.wwww, r14.xyzx
add r3.xyz, r4.xyzx, -cb2[10].xyzx
dp3 r1.w, r3.xyzx, cb2[11].xyzx
add r3.w, -cb3[8].x, cb3[8].w
add r4.x, r1.w, -cb3[8].x
div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
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
mul r4.xy, cb2[24].xxxx, cb3[6].zwzz
mad r4.xy, v1.xyxx, cb3[6].xyxx, r4.xyxx
sample_indexable(texture2d)(float,float,float,float) r4.xy, r4.xyxx, t2.xyzw, s11
mad r4.xy, r4.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
min r3.w, r3.w, l(1.000000)
add r4.w, cb3[7].z, -cb3[8].z
mad r3.w, r3.w, r4.w, cb3[8].z
mul r8.xy, r4.xyxx, r3.wwww
mov r8.z, l(0)
mad r4.xyw, r10.xyxz, r13.xxxz, r8.xyxz
dp3 r3.w, r4.xywx, r4.xywx
rsq r3.w, r3.w
mul r4.xyw, r3.wwww, r4.xyxw
mul r2.xyz, r2.xyzx, r4.yyyy
mad r2.xyz, r4.xxxx, r6.xyzx, r2.xyzx
mad r0.xyz, r4.wwww, r0.xyzx, r2.xyzx
dp3 r2.x, r0.xyzx, r0.xyzx
rsq r2.x, r2.x
mul r6.xyz, r0.xyzx, r2.xxxx
sample_indexable(texture2d)(float,float,float,float) r0.x, r9.zwzz, t4.xyzw, s11
mul r0.x, r0.x, cb3[8].y
dp3 r0.y, -r7.xyzx, r6.xyzx
add r0.y, r0.y, r0.y
mad r0.yz, r6.xxyx, -r0.yyyy, -r7.xxyx
mul r0.yz, r0.yyzy, cb3[10].zzzz
sample_indexable(texture2d)(float,float,float,float) r0.y, r0.yzyy, t4.xyzw, s11
mul_sat r0.x, r0.x, r0.y
add r0.y, -r0.w, cb3[7].x
mad r0.y, r0.x, r0.y, r0.w
mad r0.xzw, r0.xxxx, -r12.xxyz, r12.xxyz
ftou r2.xyz, cb4[93].xyzx
dp3 r3.w, r7.xyzx, r6.xyzx
max r4.x, |r5.y|, |r5.x|
add r4.xyw, -r4.xxxx, cb2[70].yzyw
mov_sat r7.w, r3.w
div r8.x, l(1.000000, 1.000000, 1.000000, 1.000000), r7.w
mov r5.w, l(1.000000)
mov r9.xyz, r5.xyzx
mov r9.w, l(1.000000)
mov r8.yzw, l(0,0,0,0)
mov r10.xyzw, l(0,0,0,0)
loop 
  uge r12.x, r10.w, r2.y
  breakc_nz r12.x
  iadd r12.x, r2.z, r10.w
  ftou r12.x, cb4[r12.x + 69].x
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r12.yzw, r12.x, l(16), t54.xxyz
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r13.xyz, r12.x, l(64), t54.xyzx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r13.w, r12.x, l(124), t54.xxxx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r14.x, r12.x, l(156), t54.xxxx
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r14.y, r12.x, l(172), t54.xxxx
  dp3 r15.x, -r12.yzwy, cb2[0].xyzx
  dp3 r15.y, -r12.yzwy, cb2[1].xyzx
  dp3 r15.z, -r12.yzwy, cb2[2].xyzx
  if_nz r14.x
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r16.xyzw, r12.x, l(192), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r17.xyzw, r12.x, l(208), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.xyzw, r12.x, l(224), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.xyzw, r12.x, l(240), t54.xyzw
    mov r20.x, r16.x
    mov r20.y, r17.x
    mov r20.z, r18.x
    mov r20.w, r19.x
    dp4 r20.x, r5.xyzw, r20.xyzw
    mov r21.x, r16.y
    mov r21.y, r17.y
    mov r21.z, r18.y
    mov r21.w, r19.y
    dp4 r20.y, r5.xyzw, r21.xyzw
    mov r21.x, r16.z
    mov r21.y, r17.z
    mov r21.z, r18.z
    mov r21.w, r19.z
    dp4 r20.z, r5.xyzw, r21.xyzw
    mov r19.x, r16.w
    mov r19.y, r17.w
    mov r19.z, r18.w
    dp4 r12.y, r5.xyzw, r19.xyzw
    add r16.xyzw, -r12.yyyy, cb2[53].xyzw
    min r12.yzw, r4.xxyw, r16.yyzw
    lt r12.yzw, l(0.000000, 0.000000, 0.000000, 0.000000), r12.yyzw
    movc r14.xzw, r12.yyyy, cb2[47].xxyz, cb2[47].wwww
    movc r16.yzw, r12.yyyy, cb2[48].xxyz, cb2[48].wwww
    movc r14.xzw, r12.zzzz, cb2[49].xxyz, r14.xxzw
    movc r16.yzw, r12.zzzz, cb2[50].xxyz, r16.yyzw
    movc r14.xzw, r12.wwww, cb2[51].xxyz, r14.xxzw
    movc r12.yzw, r12.wwww, cb2[52].xxyz, r16.yyzw
    mad r12.yzw, r20.xxyz, r14.xxzw, r12.yyzw
    lt r14.x, l(0.000000), r16.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) r14.z, r16.xyxx, t43.xxxx, s14, r12.w
    sample_c_lz_indexable(texture2d)(float,float,float,float) r14.w, r16.zwzz, t43.xxxx, s14, r12.w
    add r14.z, r14.w, r14.z
    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) r12.y, r16.xyxx, t43.xxxx, s14, r12.w
    add r12.y, r12.y, r14.z
    sample_c_lz_indexable(texture2d)(float,float,float,float) r12.z, r16.zwzz, t43.xxxx, s14, r12.w
    add r12.y, r12.z, r12.y
    mul r12.y, r12.y, l(0.250000)
    movc r12.y, r14.x, r12.y, l(1.000000)
  else 
    mov r12.y, l(1.000000)
  endif 
  if_nz r14.y
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r14.xyzw, r12.x, l(256), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r16.xyzw, r12.x, l(272), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r17.xyzw, r12.x, l(288), t54.xyzw
    dp4 r12.x, r14.xyzw, r9.xyzw
    dp4 r12.z, r16.xyzw, r9.xyzw
    dp4 r12.w, r17.xyzw, r9.xyzw
    div r14.xy, r12.xzxx, r12.wwww
    sample_l_indexable(texture2d)(float,float,float,float) r12.xzw, r14.xyxx, t40.xwyz, s12, l(0.000000)
  else 
    mov r12.xzw, l(1.000000,0,1.000000,1.000000)
  endif 
  dp3_sat r14.x, r15.xyzx, r6.xyzx
  add r14.yzw, r7.xxyz, r15.xxyz
  dp3 r15.x, r14.yzwy, r14.yzwy
  rsq r15.x, r15.x
  mul r14.yzw, r14.yyzw, r15.xxxx
  dp3_sat r15.x, r7.xyzx, r14.yzwy
  dp3_sat r14.y, r14.yzwy, r6.xyzx
  log r14.z, r14.y
  mul r14.z, r0.y, r14.z
  exp r14.z, r14.z
  max r14.w, r15.x, l(1.192092896E-007)
  min r15.x, r7.w, r14.x
  add r14.y, r14.y, r14.y
  mul r15.y, r14.y, r15.x
  ge r15.y, r14.w, r15.y
  eq r15.x, r7.w, r15.x
  div r15.z, r14.x, r7.w
  movc r15.x, r15.x, l(1.000000), r15.z
  mul r14.y, r14.y, r15.x
  div r14.y, r14.y, r14.w
  movc r14.y, r15.y, r14.y, r8.x
  mul r14.y, r14.z, r14.y
  mul r14.xzw, r13.xxyz, r14.xxxx
  mul r14.xzw, r12.xxzw, r14.xxzw
  mul r13.xyz, r13.xyzx, r14.yyyy
  mul r12.xzw, r12.xxzw, r13.xxyz
  mul r12.xzw, r12.yyyy, r12.xxzw
  mad r8.yzw, r14.xxzw, r12.yyyy, r8.yyzw
  mad r10.xyz, r12.xzwx, r13.wwww, r10.xyzx
  iadd r10.w, r10.w, l(1)
endloop 
dp3 r2.y, r9.xyzx, r9.xyzx
sqrt r2.y, r2.y
mov r12.xyz, r9.xyzx
mov r12.w, l(1.000000)
mov r9.w, l(1.000000)
mov r4.xyw, r8.yzyw
mov r13.xyz, r10.xyzx
mov r5.w, l(0)
loop 
  uge r10.w, r5.w, r2.z
  breakc_nz r10.w
  ftou r10.w, cb4[r5.w + 69].x
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r13.w, r10.w, l(140), t54.xxxx
  mov r14.xyz, r4.xywx
  mov r15.xyz, r13.xyzx
  mov r14.w, r5.w
  mov r15.w, r10.w
  mov r16.x, r13.w
  loop 
    ult r16.y, r14.w, r2.x
    ieq r16.zw, r16.xxxx, l(0, 0, 0, 1)
    or r16.z, r16.w, r16.z
    and r16.y, r16.z, r16.y
    breakc_z r16.y
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r17.xyz, r15.w, l(0), t54.xyzx
    if_nz r16.w
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.xyzw, r15.w, l(12), t54.xyzw
      add r16.yzw, r9.xxyz, -r17.xxyz
      dp3 r16.y, r16.yzwy, r18.yzwy
      max r16.y, r16.y, l(0.000000)
      min r16.y, r18.x, r16.y
      mad r17.xyz, r16.yyyy, r18.yzwy, r17.xyzx
    endif 
    add r16.yzw, -r5.xxyz, r17.xxyz
    dp3 r17.x, r16.yzwy, r16.yzwy
    sqrt r17.x, r17.x
    div r16.yzw, r16.yyzw, r17.xxxx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r17.yzw, r15.w, l(64), t54.xxyz
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.x, r15.w, l(124), t54.xxxx
    dp3 r19.x, r16.yzwy, cb2[0].xyzx
    dp3 r19.y, r16.yzwy, cb2[1].xyzx
    dp3 r19.z, r16.yzwy, cb2[2].xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r16.y, r15.w, l(32), t54.xxxx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r20.yz, r15.w, l(40), t54.xxyx
    mad_sat r20.x, r17.x, r16.y, r20.y
    sample_l_indexable(texture2d)(float,float,float,float) r16.y, r20.xzxx, t44.xzyw, s13, l(0.000000)
    dp3_sat r16.z, r19.xyzx, r6.xyzx
    add r18.yzw, r7.xxyz, r19.xxyz
    dp3 r16.w, r18.yzwy, r18.yzwy
    rsq r16.w, r16.w
    mul r18.yzw, r16.wwww, r18.yyzw
    dp3_sat r16.w, r7.xyzx, r18.yzwy
    dp3_sat r17.x, r18.yzwy, r6.xyzx
    log r18.y, r17.x
    mul r18.y, r0.y, r18.y
    exp r18.y, r18.y
    max r16.w, r16.w, l(1.192092896E-007)
    min r18.z, r7.w, r16.z
    add r17.x, r17.x, r17.x
    mul r18.w, r17.x, r18.z
    ge r18.w, r16.w, r18.w
    eq r18.z, r7.w, r18.z
    div r19.x, r16.z, r7.w
    movc r18.z, r18.z, l(1.000000), r19.x
    mul r17.x, r17.x, r18.z
    div r16.w, r17.x, r16.w
    movc r16.w, r18.w, r16.w, r8.x
    mul r16.w, r18.y, r16.w
    mul r18.yzw, r17.yyzw, r16.zzzz
    mul r17.xyz, r17.yzwy, r16.wwww
    mul r17.xyz, r16.yyyy, r17.xyzx
    mad r14.xyz, r18.yzwy, r16.yyyy, r14.xyzx
    mad r15.xyz, r17.xyzx, r18.xxxx, r15.xyzx
    iadd r14.w, r14.w, l(1)
    ult r16.y, r14.w, r2.x
    if_nz r16.y
      ftou r15.w, cb4[r14.w + 69].x
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r16.x, r15.w, l(140), t54.xxxx
    endif 
  endloop 
  mov r16.yzw, r14.xxyz
  mov r17.xyz, r15.xyzx
  mov r10.w, r14.w
  mov r13.w, r15.w
  mov r17.w, r16.x
  loop 
    ult r18.x, r10.w, r2.x
    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, r13.w, l(16), t54.xyxz
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.xyz, r13.w, l(0), t54.xyzx
    if_nz r18.z
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r20.xyz, r13.w, l(128), t54.xyzx
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.z, r13.w, l(12), t54.xxxx
      add r21.xyz, r9.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, r13.w, l(64), t54.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.w, r13.w, l(124), t54.xxxx
    dp3 r21.x, r19.xyzx, cb2[0].xyzx
    dp3 r21.y, r19.xyzx, cb2[1].xyzx
    dp3 r21.z, r19.xyzx, cb2[2].xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r22.xyz, r13.w, l(32), t54.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.xyzw, r13.w, l(44), t54.xyzw
    mov r22.w, r23.x
    mad r22.xy, r18.zzzz, r22.xyxx, r22.zwzz
    dp3 r18.x, r19.xyzx, -r18.xywx
    mad_sat r18.y, r18.x, r23.y, r23.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, r23.w
    movc r18.x, r18.x, l(0), r18.y
    sample_l_indexable(texture2d)(float,float,float,float) r18.y, r22.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, r13.w, l(172), t54.xxxx
    if_nz r18.y
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.y, r13.w, l(188), t54.xxxx
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r22.xyzw, r13.w, l(256), t54.xyzw
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.xyzw, r13.w, l(272), t54.xyzw
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.xyzw, r13.w, l(288), t54.xyzw
      dp4 r18.z, r22.xyzw, r12.xyzw
      dp4 r18.w, r23.xyzw, r12.xyzw
      dp4 r19.x, r24.xyzw, r12.xyzw
      div r22.xy, r18.zwzz, r19.xxxx
      utof r22.z, r18.y
      sample_l_indexable(texture2darray)(float,float,float,float) r18.yzw, r22.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, r13.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) r22.xyzw, r13.w, l(192), t54.xyzw
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.xyzw, r13.w, l(208), t54.xyzw
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.xyzw, r13.w, l(224), t54.xyzw
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r25.xyzw, r13.w, l(240), t54.xyzw
      mov r26.x, r22.x
      mov r26.y, r23.x
      mov r26.z, r24.x
      mov r26.w, r25.x
      dp4 r19.x, r9.xyzw, r26.xyzw
      mov r26.x, r22.y
      mov r26.y, r23.y
      mov r26.z, r24.y
      mov r26.w, r25.y
      dp4 r19.y, r9.xyzw, r26.xyzw
      mov r26.x, r22.z
      mov r26.y, r23.z
      mov r26.z, r24.z
      mov r26.w, r25.z
      dp4 r19.z, r9.xyzw, r26.xyzw
      mov r25.x, r22.w
      mov r25.y, r23.w
      mov r25.z, r24.w
      dp4 r20.w, r9.xyzw, r25.xyzw
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r22.xyzw, r13.w, l(80), t54.xyzw
      mad_sat r22.xy, r2.yyyy, r22.xyxx, r22.zwzz
      div r23.xyzw, r19.xyxy, r20.wwww
      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.x, r24.xyxx, t43.xxxx, s14, r19.z
      sample_c_lz_indexable(texture2d)(float,float,float,float) r19.y, r24.zwzz, t43.xxxx, s14, r19.z
      add r19.x, r19.y, r19.x
      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) r19.y, r23.xyxx, t43.xxxx, s14, r19.z
      add r19.x, r19.y, r19.x
      sample_c_lz_indexable(texture2d)(float,float,float,float) r19.y, r23.zwzz, t43.xxxx, s14, r19.z
      add r19.x, r19.y, r19.x
      mul r19.x, r19.x, l(0.250000)
      mad r19.x, r19.x, r22.x, r22.y
    else 
      mov r19.x, l(1.000000)
    endif 
    dp3_sat r19.y, r21.xyzx, r6.xyzx
    add r21.xyz, r7.xyzx, r21.xyzx
    dp3 r19.z, r21.xyzx, r21.xyzx
    rsq r19.z, r19.z
    mul r21.xyz, r19.zzzz, r21.xyzx
    dp3_sat r19.z, r7.xyzx, r21.xyzx
    dp3_sat r20.w, r21.xyzx, r6.xyzx
    log r21.x, r20.w
    mul r21.x, r0.y, r21.x
    exp r21.x, r21.x
    max r19.z, r19.z, l(1.192092896E-007)
    min r21.y, r7.w, r19.y
    add r20.w, r20.w, r20.w
    mul r21.z, r20.w, r21.y
    ge r21.z, r19.z, r21.z
    eq r21.y, r7.w, r21.y
    div r21.w, r19.y, r7.w
    movc r21.y, r21.y, l(1.000000), r21.w
    mul r20.w, r20.w, r21.y
    div r19.z, r20.w, r19.z
    movc r19.z, r21.z, r19.z, r8.x
    mul r19.z, r21.x, r19.z
    mul r21.xyz, r20.xyzx, r19.yyyy
    mul r21.xyz, r18.yzwy, r21.xyzx
    mul r21.xyz, r19.xxxx, r21.xyzx
    mul r20.xyz, r20.xyzx, r19.zzzz
    mul r18.yzw, r18.yyzw, r20.xxyz
    mul r18.yzw, r19.xxxx, r18.yyzw
    mul r18.yzw, r18.xxxx, r18.yyzw
    mad r16.yzw, r21.xxyz, r18.xxxx, r16.yyzw
    mad r17.xyz, r18.yzwy, r19.wwww, r17.xyzx
    iadd r10.w, r10.w, l(1)
    ult r18.x, r10.w, r2.x
    if_nz r18.x
      ftou r13.w, cb4[r10.w + 69].x
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r17.w, r13.w, l(140), t54.xxxx
    endif 
  endloop 
  mov r4.xyw, r16.yzyw
  mov r13.xyz, r17.xyzx
  mov r18.x, r10.w
  mov r18.y, r13.w
  mov r18.z, r17.w
  loop 
    ult r18.w, r18.x, r2.x
    ieq r19.x, r18.z, l(4)
    and r18.w, r18.w, r19.x
    breakc_z r18.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r19.xyz, r18.y, l(0), t54.xyzx
    add r19.xyz, -r5.xyzx, r19.xyzx
    dp3 r18.w, r19.xyzx, r19.xyzx
    sqrt r18.w, r18.w
    div r20.xyz, r19.xyzx, r18.wwww
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r21.xyz, r18.y, l(64), t54.xyzx
    dp3 r22.x, r20.xyzx, cb2[0].xyzx
    dp3 r22.y, r20.xyzx, cb2[1].xyzx
    dp3 r22.z, r20.xyzx, cb2[2].xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r20.xyz, r18.y, l(16), t54.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.y, r18.y, l(44), t54.xxxx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.xyzw, r18.y, l(124), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r25.xyz, r18.y, l(144), t54.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r26.xyz, r18.y, l(160), t54.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r27.xyz, r18.y, l(176), t54.xyzx
    dp3 r28.x, r19.xyzx, r24.yzwy
    dp3 r28.y, r19.xyzx, r20.xyzx
    dp3 r28.z, r19.xyzx, r25.xyzx
    add r19.xyz, -r26.xyzx, |r28.xyzx|
    mul_sat r19.xyz, r27.xyzx, r19.xyzx
    max r18.w, r19.y, r19.x
    max r23.x, r19.z, r18.w
    sample_l_indexable(texture2d)(float,float,float,float) r18.w, r23.xyxx, t44.xywz, s13, l(0.000000)
    dp3_sat r19.x, r22.xyzx, r6.xyzx
    add r19.yzw, r7.xxyz, r22.xxyz
    dp3 r20.x, r19.yzwy, r19.yzwy
    rsq r20.x, r20.x
    mul r19.yzw, r19.yyzw, r20.xxxx
    dp3_sat r20.x, r7.xyzx, r19.yzwy
    dp3_sat r19.y, r19.yzwy, r6.xyzx
    log r19.z, r19.y
    mul r19.z, r0.y, r19.z
    exp r19.z, r19.z
    max r19.w, r20.x, l(1.192092896E-007)
    min r20.x, r7.w, r19.x
    add r19.y, r19.y, r19.y
    mul r20.y, r19.y, r20.x
    ge r20.y, r19.w, r20.y
    eq r20.x, r7.w, r20.x
    div r20.z, r19.x, r7.w
    movc r20.x, r20.x, l(1.000000), r20.z
    mul r19.y, r19.y, r20.x
    div r19.y, r19.y, r19.w
    movc r19.y, r20.y, r19.y, r8.x
    mul r19.y, r19.z, r19.y
    mul r19.xzw, r21.xxyz, r19.xxxx
    mul r20.xyz, r21.xyzx, r19.yyyy
    mul r20.xyz, r18.wwww, r20.xyzx
    mad r4.xyw, r19.xzxw, r18.wwww, r4.xyxw
    mad r13.xyz, r20.xyzx, r24.xxxx, r13.xyzx
    iadd r18.x, r18.x, l(1)
    ult r18.w, r18.x, r2.x
    if_nz r18.w
      ftou r18.y, cb4[r18.x + 69].x
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.z, r18.y, l(140), t54.xxxx
    endif 
  endloop 
  uge r18.y, r18.z, l(5)
  iadd r5.w, -r18.y, r18.x
endloop 
max r0.y, r11.w, l(0.000000)
sample_indexable(texture2d)(float,float,float,float) r2.x, r1.xyxx, t3.xyzw, s10
mad r2.x, r2.x, cb2[20].x, cb2[20].y
max r2.x, r2.x, l(0.000001)
div r2.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.x
add r1.w, -r1.w, r2.x
max r1.w, r1.w, l(0.000000)
mul_sat r1.w, r1.w, cb3[0].y
mul r0.y, r0.y, r1.w
mov r1.w, v3.x
mul r2.x, r0.y, cb1[r1.w + 3].x
add r2.y, r2.w, l(2.000000)
mul r2.y, r2.y, l(0.010000)
mul r0.xzw, r0.xxzw, r2.yyyy
sample_indexable(texture2d)(float,float,float,float) r2.y, r1.xyxx, t5.yxzw, s10
add r2.z, cb3[9].z, cb3[9].y
add_sat r2.z, -r2.z, l(1.000000)
mul r2.w, r2.y, r2.y
mad r2.y, cb3[9].y, r2.y, r2.z
mad_sat r2.y, r2.w, cb3[9].z, r2.y
add r5.xyz, -cb2[94].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad_sat r2.yzw, r2.yyyy, r5.xxyz, cb2[94].xxyz
mul r5.xyz, r13.xyzx, r2.yzwy
add r4.xyw, r4.xyxw, cb3[2].xyxz
mul r8.xyzw, r6.yzzz, r6.xxyz
mul r5.w, r6.y, r6.y
mad r6.w, r6.x, r6.x, -r5.w
dp4 r10.x, r8.xyzw, cb6[0].xyzw
dp4 r10.y, r8.xyzw, cb6[2].xyzw
dp4 r10.z, r8.xyzw, cb6[4].xyzw
dp4 r8.x, r6.xyzw, cb6[1].xyzw
dp4 r8.y, r6.xyzw, cb6[3].xyzw
dp4 r8.z, r6.xyzw, cb6[5].xyzw
add r8.xyz, r8.xyzx, r10.xyzx
add r8.xyz, r8.xyzx, cb6[6].xyzx
max r8.xyz, r8.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mad r5.w, r6.z, l(0.500000), l(0.500000)
add r10.xyz, cb2[27].xyzx, -cb2[38].xyzx
mad r10.xyz, r5.wwww, r10.xyzx, cb2[38].xyzx
add r8.xyz, r8.xyzx, r10.xyzx
mul r5.w, cb6[7].x, l(3.14159274)
ftoi r8.w, cb4[94].x
mov r10.w, l(1.000000)
mov r12.w, l(1.000000)
mov r13.xyz, l(0,0,0,0)
mov r14.xyz, l(0,0,0,0)
mov r15.xyz, l(0,0,0,0)
mov r16.xyzw, l(0,0,0,0)
mov r9.w, l(1.000000)
mov r11.w, l(0)
loop 
  uge r15.w, r11.w, r8.w
  breakc_nz r15.w
  ftou r15.w, cb4[r11.w + 69].y
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r17.x, r15.w, l(140), t54.xxxx
  mov r18.xyz, r13.xyzx
  mov r19.xyz, r14.xyzx
  mov r17.yzw, r15.xxyz
  mov r20.xyzw, r16.xyzw
  mov r21.x, r9.w
  mov r21.y, r11.w
  mov r21.z, r15.w
  mov r21.w, r17.x
  loop 
    ult r22.x, r21.y, r8.w
    ieq r22.yz, r21.wwww, l(0, 0, 1, 0)
    or r22.y, r22.z, r22.y
    and r22.x, r22.y, r22.x
    breakc_z r22.x
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.xyzw, r21.z, l(0), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r22.xyw, r21.z, l(16), t54.xyxz
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.x, r21.z, l(32), t54.xxxx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r25.yz, r21.z, l(40), t54.xxyx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r26.xyzw, r21.z, l(60), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.yz, r21.z, l(100), t54.xxyx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.w, r21.z, l(332), t54.xxxx
    and r24.w, r24.w, l(3)
    add r23.xyz, r9.xyzx, -r23.xyzx
    dp3 r25.w, r23.xyzx, r22.xywx
    max r25.w, r25.w, l(0.000000)
    min r23.w, r23.w, r25.w
    mad r22.xyw, -r23.wwww, r22.xyxw, r23.xyxz
    movc r22.xyz, r22.zzzz, r22.xywx, r23.xyzx
    dp3 r22.x, r22.xyzx, r22.xyzx
    sqrt r22.x, r22.x
    mad_sat r25.x, r22.x, r24.x, r25.y
    sample_l_indexable(texture2d)(float,float,float,float) r22.x, r25.xzxx, t44.zxyw, s13, l(0.000000)
    ine r22.y, r24.z, l(1)
    movc r22.x, r22.y, l(0), r22.x
    ine r22.y, r24.w, l(2)
    if_nz r22.y
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r22.y, r21.z, l(372), t54.xxxx
      mul r22.z, r22.x, r22.x
      mul r22.y, r22.y, r22.z
      ieq r22.zw, r24.wwww, l(0, 0, 1, 3)
      mul r23.x, r5.w, r26.x
      itof r6.w, r24.y
      sample_l_indexable(texturecubearray)(float,float,float,float) r23.yzw, r6.xyzw, t57.wxyz, s12, l(4.000000)
      mul r23.xyz, r23.yzwy, r23.xxxx
      mul r10.xyz, r26.yzwy, r23.xyzx
      mad r23.xyz, r22.yyyy, r10.xyzx, r17.yzwy
      mov r19.w, r20.z
      mad r24.xyzw, r22.yyyy, r10.wxyz, r19.wxyz
      max r25.w, r20.w, r22.y
      mov r18.w, r20.x
      mad r27.xyzw, r22.yyyy, r10.xyzw, r18.xyzw
      max r28.x, r20.y, r22.y
      mov r25.x, r18.w
      mov r25.z, r24.x
      mov r20.x, r27.w
      mov r20.z, r19.w
      movc r29.xzw, r22.zzzz, r25.xxzw, r20.xxzw
      mov r24.x, r20.y
      mov r28.yzw, r19.xxyz
      movc r28.xyzw, r22.zzzz, r24.xyzw, r28.xyzw
      or r10.x, r22.w, r22.z
      movc r18.xyz, r10.xxxx, r18.xyzx, r27.xyzx
      movc r19.xyz, r22.wwww, r19.xyzx, r28.yzwy
      movc r17.yzw, r22.wwww, r23.xxyz, r17.yyzw
      mov r20.x, r25.x
      mov r20.y, r24.x
      mov r29.y, r28.x
      movc r20.xyzw, r22.wwww, r20.xyzw, r29.xyzw
    else 
      add_sat r10.x, -r22.x, l(1.000000)
      mul r10.x, r10.x, r10.x
      add r10.y, -r26.x, l(1.000000)
      mad r10.x, r10.x, r10.y, r26.x
      mul r21.x, r10.x, r21.x
    endif 
    iadd r21.y, r21.y, l(1)
    ult r10.x, r21.y, r8.w
    if_nz r10.x
      ftou r21.z, cb4[r21.y + 69].y
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r21.w, r21.z, l(140), t54.xxxx
    endif 
  endloop 
  mov r13.xyz, r18.xyzx
  mov r14.xyz, r19.xyzx
  mov r15.xyz, r17.yzwy
  mov r16.xyzw, r20.xyzw
  mov r9.w, r21.x
  mov r10.xyz, r21.yzwy
  loop 
    ult r15.w, r10.x, r8.w
    ieq r17.x, r10.z, l(4)
    and r15.w, r15.w, r17.x
    breakc_z r15.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r22.xyz, r10.y, l(0), t54.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r23.xyz, r10.y, l(16), t54.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.y, r10.y, l(44), t54.xxxx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r25.xyzw, r10.y, l(60), t54.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r24.zw, r10.y, l(100), t54.xxxy
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r26.xyz, r10.y, l(128), t54.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r27.xyz, r10.y, l(144), t54.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r28.xyz, r10.y, l(160), t54.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r29.xyz, r10.y, l(176), t54.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r15.w, r10.y, l(332), t54.xxxx
    and r15.w, r15.w, l(3)
    add r22.xyz, r9.xyzx, -r22.xyzx
    dp3 r26.y, r22.xyzx, r26.xyzx
    dp3 r26.z, r22.xyzx, r23.xyzx
    dp3 r26.w, r22.xyzx, r27.xyzx
    mul r22.xyz, r28.xyzx, r29.xyzx
    mad r23.xyz, r29.xyzx, r28.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    div r23.xyz, r29.xyzx, r23.xyzx
    mul r23.xyz, r23.xyzx, r26.yzwy
    max r23.xyz, r23.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
    min r23.xyz, r23.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    mul r26.yzw, r23.xxyz, r23.xxyz
    mad r17.x, -r23.x, r23.x, l(1.000000)
    mad r17.x, r26.w, r17.x, r26.y
    add r18.w, -r17.x, l(1.000000)
    mad_sat r17.x, r26.z, r18.w, r17.x
    sqrt r17.x, r17.x
    max r26.x, r26.y, l(0.000010)
    dp3 r18.w, r22.xyzx, r26.xzwx
    mad r19.w, r23.y, r23.y, r26.x
    mad r19.w, r23.z, r23.z, r19.w
    div r18.w, r18.w, r19.w
    add r19.w, r18.w, l(1.000000)
    mad_sat r24.x, r17.x, r19.w, -r18.w
    sample_l_indexable(texture2d)(float,float,float,float) r17.x, r24.xyxx, t44.zxyw, s13, l(0.000000)
    ine r18.w, r24.w, l(1)
    movc r17.x, r18.w, l(0), r17.x
    ine r18.w, r15.w, l(2)
    if_nz r18.w
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r18.w, r10.y, l(372), t54.xxxx
      mul r19.w, r17.x, r17.x
      mul r18.w, r18.w, r19.w
      ieq r22.xy, r15.wwww, l(1, 3, 0, 0)
      mul r15.w, r5.w, r25.x
      itof r6.w, r24.z
      sample_l_indexable(texturecubearray)(float,float,float,float) r23.xyz, r6.xyzw, t57.xyzw, s12, l(4.000000)
      mul r23.xyz, r15.wwww, r23.xyzx
      mul r12.xyz, r25.yzwy, r23.xyzx
      mad r23.xyz, r18.wwww, r12.xyzx, r15.xyzx
      mov r14.w, r16.z
      mad r24.xyzw, r18.wwww, r12.wxyz, r14.wxyz
      max r26.w, r16.w, r18.w
      mov r13.w, r16.x
      mad r27.xyzw, r18.wwww, r12.xyzw, r13.xyzw
      max r28.x, r16.y, r18.w
      mov r26.x, r13.w
      mov r26.z, r24.x
      mov r16.x, r27.w
      mov r16.z, r14.w
      movc r29.xzw, r22.xxxx, r26.xxzw, r16.xxzw
      mov r24.x, r16.y
      mov r28.yzw, r14.xxyz
      movc r28.xyzw, r22.xxxx, r24.xyzw, r28.xyzw
      or r6.w, r22.y, r22.x
      movc r13.xyz, r6.wwww, r13.xyzx, r27.xyzx
      movc r14.xyz, r22.yyyy, r14.xyzx, r28.yzwy
      movc r15.xyz, r22.yyyy, r23.xyzx, r15.xyzx
      mov r16.x, r26.x
      mov r16.y, r24.x
      mov r29.y, r28.x
      movc r16.xyzw, r22.yyyy, r16.xyzw, r29.xyzw
    else 
      add_sat r6.w, -r17.x, l(1.000000)
      mul r6.w, r6.w, r6.w
      add r12.x, -r25.x, l(1.000000)
      mad r6.w, r6.w, r12.x, r25.x
      mul r9.w, r6.w, r9.w
    endif 
    iadd r10.x, r10.x, l(1)
    ult r6.w, r10.x, r8.w
    if_nz r6.w
      ftou r10.y, cb4[r10.x + 69].y
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r10.z, r10.y, l(140), t54.xxxx
    endif 
  endloop 
  ine r12.xyz, r10.zzzz, l(0, 4, 1, 0)
  and r6.w, r12.y, r12.x
  and r6.w, r12.z, r6.w
  iadd r11.w, -r6.w, r10.x
endloop 
max r5.w, r16.z, l(1.192092896E-007)
div r9.xyz, r14.xyzx, r5.wwww
mov_sat r16.yw, r16.yyyw
add r9.xyz, -r8.xyzx, r9.xyzx
mad r8.xyz, r16.wwww, r9.xyzx, r8.xyzx
max r5.w, r16.x, l(1.192092896E-007)
div r9.xyz, r13.xyzx, r5.wwww
add r9.xyz, -r8.xyzx, r9.xyzx
mad r8.xyz, r16.yyyy, r9.xyzx, r8.xyzx
add r8.xyz, r15.xyzx, r8.xyzx
mad r4.xyw, r8.xyxz, r9.wwww, r4.xyxw
mul r2.yzw, r2.yyzw, r4.xxyw
mul r4.xyw, r3.wwww, r6.xyxz
mad r4.xyw, r4.xyxw, l(2.000000, 2.000000, 0.000000, 2.000000), -r7.xyxz
mul r3.w, r7.w, r7.w
max r3.w, r3.w, l(0.010000)
div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
sample_indexable(texturecube)(float,float,float,float) r4.xyw, r4.xywx, t1.xywz, s11
mul r4.xyw, r4.xyxw, cb3[9].wwww
min r3.w, r3.w, cb3[10].y
max r5.w, r2.z, r2.y
mul r4.xyw, r3.wwww, r4.xyxw
max r3.w, r2.w, r5.w
add_sat r3.w, r3.w, cb3[10].x
mad r4.xyw, r4.xyxw, r3.wwww, r5.xyxz
mul r0.xzw, r0.xxzw, r4.xxyw
mad r0.xzw, r2.yyzw, r11.xxyz, r0.xxzw
eq r2.y, cb2[95].w, l(0.000000)
movc r2.yzw, r2.yyyy, cb2[95].xxyz, cb2[35].xxyz
max r2.yzw, r2.yyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
log r2.yzw, r2.yyzw
mul r2.yzw, r2.yyzw, cb2[26].yyyy
exp r2.yzw, r2.yyzw
mad r4.x, r4.z, cb2[9].y, cb2[25].y
mov r4.yw, cb2[25].zzzz
sample_l_indexable(texture2d)(float,float,float,float) r3.w, r4.xyxx, t44.xzwy, s13, l(0.000000)
dp3 r4.x, r3.xyzx, r3.xyzx
sqrt r4.x, r4.x
lt r4.y, l(0.000000), cb2[26].w
if_nz r4.y
  mul r5.xy, r3.xyxx, cb2[9].wwww
  mad r6.x, cb2[25].w, r3.y, r5.x
  mad r6.y, -cb2[25].w, r3.x, r5.y
  mov r6.z, r3.z
  sample_indexable(texturecube)(float,float,float,float) r3.xyz, r6.xyzx, t0.xyzw, s11
  add r3.xyz, r3.xyzx, -cb2[95].xyzx
  mad r3.xyz, cb2[26].wwww, r3.xyzx, cb2[95].xyzx
else 
  mov r3.xyz, cb2[95].xyzx
endif 
max r3.xyz, r3.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
log r3.xyz, r3.xyzx
mul r3.xyz, r3.xyzx, cb2[26].yyyy
exp r3.xyz, r3.xyzx
mad r4.z, r4.x, cb2[9].x, cb2[25].x
sample_l_indexable(texture2d)(float,float,float,float) r4.x, r4.zwzz, t44.xyzw, s13, l(0.000000)
mad r3.xyz, cb2[26].xxxx, r3.xyzx, -r0.xzwx
mad r0.xzw, r4.xxxx, r3.xxyz, r0.xxzw
mad r2.yzw, cb2[26].xxxx, r2.yyzw, -r0.xxzw
mad r0.xzw, r3.wwww, r2.yyzw, r0.xxzw
max r0.xzw, r0.xxzw, l(0.000000, 0.000000, 0.000000, 0.000000)
div r2.y, l(1.000000, 1.000000, 1.000000, 1.000000), cb2[20].y
add r2.y, -r2.y, v0.w
rcp r2.z, cb2[96].x
mul r2.y, r2.z, r2.y
rsq r2.y, |r2.y|
div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y
mov_sat r1.xyz, r1.xyzx
mad r1.xyz, r1.xyzx, l(1.000000, 1.000000, 0.984375, 0.000000), l(0.000000, 0.000000, -0.0117187500, 0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r1.xyz, r1.xyzx, t59.xyzw, s13, l(0.000000)
add o0.xyz, r0.xzwx, r1.xyzx
mad r0.x, cb1[r1.w + 3].x, r0.y, -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.x
ret 
// Approximately 839 instruction slots used
