//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.2.27 on Mon Feb 08 02:06:25 2016
//
//
// Buffer Definitions: 
//
// cbuffer cbVolumetricLightCS
// {
//
//   row_major float4x4 g_mScreenToPreviousProjectionMatrix;// Offset:    0 Size:    64 [unused]
//   float4 g_LightParams[32];          // Offset:   64 Size:   512
//   float4 g_LightParams2[32];         // Offset:  576 Size:   512 [unused]
//   
//   struct VolumetricLightOverrideLightData_shader
//   {
//       
//       float4 VLColor;                // Offset: 1088
//       float4 VLAttenuation;          // Offset: 1104
//       float3 VLSpotParams;           // Offset: 1120
//       float VLSpotRadius;            // Offset: 1132
//
//   } g_LightOverride[32];             // Offset: 1088 Size:  1536
//   float4 g_VolumeZData[64];          // Offset: 2624 Size:  1024
//   float4 g_VolumetricLightParamsCS;  // Offset: 3648 Size:    16
//   float4 g_VolumetricLightParamsCS2; // Offset: 3664 Size:    16
//   float4 g_PreviousBoundMin;         // Offset: 3680 Size:    16
//   float4 g_PreviousBoundMax;         // Offset: 3696 Size:    16 [unused]
//   int g_DispatchOffsetX;             // Offset: 3712 Size:     4
//   int g_DispatchOffsetY;             // Offset: 3716 Size:     4
//   int g_DispatchOffsetZ;             // Offset: 3720 Size:     4
//   int g_DispatchMaxX;                // Offset: 3724 Size:     4 [unused]
//   int g_DispatchMaxY;                // Offset: 3728 Size:     4 [unused]
//   int g_DispatchMaxZ;                // Offset: 3732 Size:     4 [unused]
//   int g_DispatchOffsetBPX;           // Offset: 3736 Size:     4 [unused]
//   int g_DispatchOffsetBPY;           // Offset: 3740 Size:     4 [unused]
//   int g_DispatchOffsetBPZ;           // Offset: 3744 Size:     4 [unused]
//   int g_DispatchWidthBP;             // Offset: 3748 Size:     4 [unused]
//   int g_DispatchHeightBP;            // Offset: 3752 Size:     4 [unused]
//   int g_DispatchDepthBP;             // Offset: 3756 Size:     4 [unused]
//
// }
//
// cbuffer SceneBuffer
// {
//
//   row_major float4x4 View;           // Offset:    0 Size:    64 [unused]
//   row_major float4x4 ScreenMatrix;   // Offset:   64 Size:    64 [unused]
//   float2 DepthExportScale;           // Offset:  128 Size:     8 [unused]
//   float2 __padding0;                 // Offset:  136 Size:     8 [unused]
//   float4 FogParams;                  // Offset:  144 Size:    16 [unused]
//   float3 __CameraPosition;           // Offset:  160 Size:    12 [unused]
//   float __padding12;                 // Offset:  172 Size:     4 [unused]
//   float3 CameraDirection;            // Offset:  176 Size:    12 [unused]
//   float __padding9;                  // Offset:  188 Size:     4 [unused]
//   float3 DepthFactors;               // Offset:  192 Size:    12 [unused]
//   float __padding10;                 // Offset:  204 Size:     4 [unused]
//   float3 ShadowDepthBiasAndLightType;// Offset:  208 Size:    12 [unused]
//   float __padding11;                 // Offset:  220 Size:     4 [unused]
//   float4 SubframeViewport;           // Offset:  224 Size:    16 [unused]
//   row_major float3x4 DepthToWorld;   // Offset:  240 Size:    48 [unused]
//   float4 DepthToView;                // Offset:  288 Size:    16
//   float4 OneOverDepthToView;         // Offset:  304 Size:    16 [unused]
//   float4 DepthToW;                   // Offset:  320 Size:    16 [unused]
//   float4 ClipPlane;                  // Offset:  336 Size:    16 [unused]
//   float2 ViewportDepthScaleOffset;   // Offset:  352 Size:     8 [unused]
//   float2 __padding1;                 // Offset:  360 Size:     8 [unused]
//   float2 ColorDOFDepthScaleOffset;   // Offset:  368 Size:     8 [unused]
//   float2 __padding2;                 // Offset:  376 Size:     8 [unused]
//   float4 TimeVector;                 // Offset:  384 Size:    16 [unused]
//   float4 FogParams2;                 // Offset:  400 Size:    16 [unused]
//   float4 FogParams3;                 // Offset:  416 Size:    16 [unused]
//   float3 GlobalAmbient;              // Offset:  432 Size:    12 [unused]
//   float __padding8;                  // Offset:  444 Size:     4 [unused]
//   float4 GlobalParams[16];           // Offset:  448 Size:   256 [unused]
//   float4 ViewToFogH;                 // Offset:  704 Size:    16 [unused]
//   float4 ScreenExtents;              // Offset:  720 Size:    16 [unused]
//   float2 ScreenResolution;           // Offset:  736 Size:     8 [unused]
//   float2 __padding3;                 // Offset:  744 Size:     8 [unused]
//   float4 PSSMToMap1Lin;              // Offset:  752 Size:    16
//   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 [unused]
//   float4 UnitRimData[3];             // Offset: 1152 Size:    48 [unused]
//   float3 __CameraPositionForCorrection;// Offset: 1200 Size:    12 [unused]
//   float __padding7;                  // Offset: 1212 Size:     4 [unused]
//   row_major float4x4 CameraViewProject;// Offset: 1216 Size:    64 [unused]
//   float4 BackBufferResolution;       // Offset: 1280 Size:    16 [unused]
//   row_major float4x4 InverseProjection;// Offset: 1296 Size:    64 [unused]
//   float4 StereoOffset;               // Offset: 1360 Size:    16 [unused]
//   row_major float4x4 Projection;     // Offset: 1376 Size:    64 [unused]
//   row_major float4x4 ViewInv;        // Offset: 1440 Size:    64 [unused]
//   float4 ColorSSAO;                  // Offset: 1504 Size:    16 [unused]
//   float4 GlobalFogColor;             // Offset: 1520 Size:    16 [unused]
//   float4 VolumetricLightGlobalParams;// Offset: 1536 Size:    16 [unused]
//   float4 SnowParams01;               // Offset: 1552 Size:    16 [unused]
//   float4 SnowParams02;               // Offset: 1568 Size:    16 [unused]
//   float4 SnowParams03;               // Offset: 1584 Size:    16 [unused]
//   int SSREnabled;                    // Offset: 1600 Size:     4 [unused]
//   int __padding4;                    // Offset: 1604 Size:     4 [unused]
//   int __padding5;                    // Offset: 1608 Size:     4 [unused]
//   int __padding6;                    // Offset: 1612 Size:     4 [unused]
//
// }
//
// 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 bind info for InLightIndices
// {
//
//   struct _VL_PackedVolumetricLightIndices
//   {
//       
//       uint bits[8];                  // Offset:    0
//
//   } $Element;                        // Offset:    0 Size:    32
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SamplerGenericBilinearClamp       sampler      NA          NA    0        1
// ShadowMapSampler_sampler        sampler_c      NA          NA    1        1
// SamplerGenericBilinearWrap        sampler      NA          NA    2        1
// LightDataBuffer                   texture  struct         r/o    1        1
// ShadowMapSampler_texture          texture  float4          2d    2        1
// AttenuationSampler_texture        texture  float4          2d    3        1
// ModulationMaps                    texture  float4     2darray    4        1
// InLightNum                        texture    uint          3d    7        1
// InLightIndices                    texture  struct         r/o    8        1
// InScatteringAmountTextureBitmap    texture   float          3d   10        1
// OutVolumetricLightTexture             UAV  float4          3d    0        1
// SceneBuffer                       cbuffer      NA          NA    0        1
// cbVolumetricLightCS               cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Input
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Output
cs_5_0
dcl_globalFlags refactoringAllowed
dcl_immediateConstantBuffer { { 0, 0, 0, 0},
                              { 0.500000, 0, 0, 0},
                              { 0.750000, 0, 0, 0},
                              { 0.250000, 0, 0, 0} }
dcl_constantbuffer cb1[233], dynamicIndexed
dcl_constantbuffer cb0[71], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_comparison
dcl_sampler s2, mode_default
dcl_resource_structured t1, 384 
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2darray (float,float,float,float) t4
dcl_resource_texture3d (uint,uint,uint,uint) t7
dcl_resource_structured t8, 32 
dcl_resource_texture3d (float,float,float,float) t10
dcl_uav_typed_texture3d (float,float,float,float) u0
dcl_input vThreadID.xyz
dcl_temps 19
dcl_thread_group 4, 4, 4
iadd r0.xyzw, vThreadID.xyzz, cb1[232].xyzz
uge r1.xyz, r0.xywx, l(160, 90, 64, 0)
or r1.x, r1.y, r1.x
or r1.x, r1.z, r1.x
if_nz r1.x
  ret 
endif 
ushr r1.xyz, r0.xywx, l(2, 2, 2, 0)
mov r1.w, l(0)
ld_indexable(texture3d)(uint,uint,uint,uint) r1.y, r1.xyzw, t7.yxzw
ftou r1.w, cb1[229].z
ieq r2.xy, r1.wyww, l(0, 0, 0, 0)
and r2.x, r2.y, r2.x
if_nz r2.x
  store_uav_typed u0.xyzw, r0.xyww, l(0,0,0,0)
  ret 
endif 
utof r2.xy, r0.xyxx
mad r2.xy, r2.xyxx, l(0.006250, 0.0111111114, 0.000000, 0.000000), l(0.003125, 0.00555555569, 0.000000, 0.000000)
add r2.w, cb1[230].w, cb1[r0.w + 164].x
mad r3.xy, r2.xyxx, cb0[18].xyxx, cb0[18].zwzz
ftou r3.z, cb1[229].y
iadd r1.w, r1.w, r3.z
mul r3.w, cb1[228].y, cb1[r0.w + 164].y
bfi r4.x, l(1), l(1), r0.x, l(0)
bfi r4.x, l(1), l(0), r0.y, r4.x
mad r4.z, icb[r4.x + 0].x, cb1[r0.w + 164].y, r2.w
mul r4.xy, r3.xyxx, r4.zzzz
dp3 r2.w, -r4.xyzx, -r4.xyzx
rsq r2.w, r2.w
mul r5.xyz, r2.wwww, -r4.xyzx
add r2.w, r4.z, -cb1[230].w
rcp r3.x, cb1[228].x
mul r2.w, r2.w, r3.x
rsq r2.w, |r2.w|
div r2.z, l(1.000000, 1.000000, 1.000000, 1.000000), r2.w
sample_l_indexable(texture3d)(float,float,float,float) r2.x, r2.xyzx, t10.xyzw, s0, l(0.000000)
max r2.y, |r4.y|, |r4.x|
add r2.yzw, -r2.yyyy, cb0[70].yyzw
mov r4.w, l(1.000000)
mov r6.xyz, l(0,0,0,0)
mov r6.w, r3.z
loop 
  uge r3.x, r6.w, r1.w
  breakc_nz r3.x
  ftou r3.x, cb1[r6.w + 4].z
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r3.y, r3.x, l(348), t1.xxxx
  if_z r3.y
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r7.xyz, r3.x, l(16), t1.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r3.y, r3.x, l(156), t1.xxxx
    imul null, r5.w, r6.w, l(3)
    mul r8.xyz, r3.wwww, cb1[r5.w + 68].xyzx
    ftoi r5.w, cb1[r6.w + 4].w
    if_nz r5.w
      mul r5.w, r2.x, cb1[r6.w + 4].y
    else 
      mov r5.w, cb1[r6.w + 4].y
    endif 
    mul r8.xyz, r5.wwww, r8.xyzx
    if_nz r3.y
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r9.xyzw, r3.x, l(192), t1.xyzw
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r10.xyzw, r3.x, l(208), t1.xyzw
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r11.xyzw, r3.x, l(224), t1.xyzw
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r12.xyzw, r3.x, l(240), t1.xyzw
      mov r13.x, r9.x
      mov r13.y, r10.x
      mov r13.z, r11.x
      mov r13.w, r12.x
      dp4 r13.x, r4.xyzw, r13.xyzw
      mov r14.x, r9.y
      mov r14.y, r10.y
      mov r14.z, r11.y
      mov r14.w, r12.y
      dp4 r13.y, r4.xyzw, r14.xyzw
      mov r14.x, r9.z
      mov r14.y, r10.z
      mov r14.z, r11.z
      mov r14.w, r12.z
      dp4 r13.z, r4.xyzw, r14.xyzw
      mov r12.x, r9.w
      mov r12.y, r10.w
      mov r12.z, r11.w
      dp4 r3.x, r4.xyzw, r12.xyzw
      add r9.xyz, -r3.xxxx, cb0[53].yzwy
      min r9.xyz, r2.yzwy, r9.xyzx
      lt r9.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r9.xyzx
      movc r10.xyz, r9.xxxx, cb0[47].xyzx, cb0[47].wwww
      movc r11.xyz, r9.xxxx, cb0[48].xyzx, cb0[48].wwww
      movc r10.xyz, r9.yyyy, cb0[49].xyzx, r10.xyzx
      movc r9.xyw, r9.yyyy, cb0[50].xyxz, r11.xyxz
      movc r10.xyz, r9.zzzz, cb0[51].xyzx, r10.xyzx
      movc r9.xyz, r9.zzzz, cb0[52].xyzx, r9.xywx
      mad r9.xyz, r13.xyzx, r10.xyzx, r9.xyzx
      sample_c_lz_indexable(texture2d)(float,float,float,float) r3.x, r9.xyxx, t2.xxxx, s1, r9.z
      mul r8.xyz, r3.xxxx, r8.xyzx
    endif 
    dp3 r3.x, r5.xyzx, r7.xyzx
    mad r3.y, -cb1[r6.w + 4].x, cb1[r6.w + 4].x, l(1.000000)
    mad r5.w, cb1[r6.w + 4].x, cb1[r6.w + 4].x, l(1.000000)
    dp2 r3.x, r3.xxxx, cb1[r6.w + 4].xxxx
    add r3.x, -r3.x, r5.w
    log r3.x, |r3.x|
    mul r3.x, r3.x, l(1.500000)
    exp r3.x, r3.x
    mul r3.x, r3.x, l(0.785398185)
    rcp r3.x, r3.x
    mul r3.x, r3.x, r3.y
    mad r6.xyz, r8.xyzx, r3.xxxx, r6.xyzx
  endif 
  iadd r6.w, r6.w, l(1)
endloop 
and r1.w, r0.y, l(-4)
imul null, r1.z, r1.z, l(40)
imad r1.z, r1.w, l(160), r1.z
iadd r1.x, r1.x, r1.z
ld_structured_indexable(structured_buffer, stride=32)(mixed,mixed,mixed,mixed) r7.xyzw, r1.x, l(0), t8.xyzw
ld_structured_indexable(structured_buffer, stride=32)(mixed,mixed,mixed,mixed) r8.xyzw, r1.x, l(16), t8.xyzw
mov r4.w, l(1.000000)
mov r9.xyz, r4.xyzx
mov r9.w, l(1.000000)
mov r10.xyz, r6.xyzx
mov r1.x, l(0)
loop 
  uge r1.z, r1.x, r1.y
  breakc_nz r1.z
  ishl r1.z, r1.x, l(3)
  ubfe r1.w, l(27), l(2), r1.x
  ishl r2.y, r1.w, l(5)
  iadd r1.z, -r1.z, r2.y
  iadd r1.z, r1.z, l(24)
  ieq r11.xyzw, r1.wwww, l(0, 1, 2, 3)
  ieq r12.xyzw, r1.wwww, l(4, 5, 6, 7)
  and r11.xyzw, r7.xyzw, r11.xyzw
  or r1.w, r11.x, r11.y
  or r1.w, r1.w, r11.z
  or r1.w, r1.w, r11.w
  and r11.xyzw, r8.xyzw, r12.xyzw
  or r1.w, r1.w, r11.x
  or r1.w, r1.w, r11.y
  or r1.w, r1.w, r11.z
  or r1.w, r1.w, r11.w
  ushr r1.z, r1.w, r1.z
  and r1.z, r1.z, l(31)
  ftou r1.w, cb1[r1.z + 4].z
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r2.yzw, r1.w, l(0), t1.xxyz
  ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r3.x, r1.w, l(140), t1.xxxx
  imul null, r3.y, r1.z, l(3)
  mul r11.xyz, r3.wwww, cb1[r3.y + 68].xyzx
  ftoi r3.z, cb1[r1.z + 4].w
  if_nz r3.z
    mul r3.z, r2.x, cb1[r1.z + 4].y
  else 
    mov r3.z, cb1[r1.z + 4].y
  endif 
  mul r11.xyz, r3.zzzz, r11.xyzx
  add r2.yzw, -r2.yyzw, r4.xxyz
  dp3 r3.z, r2.yzwy, r2.yzwy
  sqrt r3.z, r3.z
  rcp r5.w, r3.z
  mul r2.yzw, r2.yyzw, r5.wwww
  dp3 r5.w, r5.xyzx, r2.yzwy
  mad r6.w, -cb1[r1.z + 4].x, cb1[r1.z + 4].x, l(1.000000)
  mad r11.w, cb1[r1.z + 4].x, cb1[r1.z + 4].x, l(1.000000)
  dp2 r1.z, r5.wwww, cb1[r1.z + 4].xxxx
  add r1.z, -r1.z, r11.w
  log r1.z, |r1.z|
  mul r1.z, r1.z, l(1.500000)
  exp r1.z, r1.z
  rcp r1.z, r1.z
  mul r1.z, r1.z, r6.w
  mul r1.z, r1.z, l(0.785398185)
  mul r11.xyz, r1.zzzz, r11.xyzx
  mad_sat r12.x, r3.z, cb1[r3.y + 69].x, cb1[r3.y + 69].z
  mov r12.y, cb1[r3.y + 69].w
  sample_l_indexable(texture2d)(float,float,float,float) r1.z, r12.xyxx, t3.xyzw, s0, l(0.000000)
  ieq r5.w, r3.x, l(2)
  if_nz r5.w
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r12.xyz, r1.w, l(16), t1.xyzx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r5.w, r1.w, l(56), t1.xxxx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r6.w, r1.w, l(156), t1.xxxx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r11.w, r1.w, l(172), t1.xxxx
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r13.xyzw, r1.w, l(188), t1.xyzw
    ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r14.xyzw, r1.w, l(252), t1.yzwx
    dp3 r2.y, -r2.yzwy, -r12.xyzx
    mad_sat r2.z, r2.y, cb1[r3.y + 70].x, cb1[r3.y + 70].y
    mul r2.w, r2.z, r2.z
    mad r2.z, -r2.z, l(2.000000), l(3.000000)
    mul r2.z, r2.z, r2.w
    mul r2.z, r2.z, r2.z
    mul r2.y, r3.z, r2.y
    lt r2.y, r2.y, r5.w
    movc r2.y, r2.y, l(0), r2.z
    mul r2.y, r1.z, r2.y
    if_nz r6.w
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r12.xyzw, r1.w, l(204), t1.xyzw
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r15.xyzw, r1.w, l(220), t1.xyzw
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r16.xyzw, r1.w, l(236), t1.yzxw
      mov r17.x, r13.y
      mov r17.y, r12.y
      mov r17.z, r15.y
      mov r17.w, r16.x
      dp4 r17.x, r4.xyzw, r17.xyzw
      mov r18.x, r13.z
      mov r18.y, r12.z
      mov r18.z, r15.z
      mov r18.w, r16.y
      dp4 r17.y, r4.xyzw, r18.xyzw
      mov r18.x, r13.w
      mov r18.y, r12.w
      mov r18.z, r15.w
      mov r18.w, r16.w
      dp4 r2.z, r4.xyzw, r18.xyzw
      mov r16.x, r12.x
      mov r16.y, r15.x
      mov r16.w, r14.w
      dp4 r2.w, r4.xyzw, r16.xyzw
      rcp r2.w, r2.w
      mul r3.yz, r2.wwww, r17.xxyx
      sample_c_lz_indexable(texture2d)(float,float,float,float) r2.z, r3.yzyy, t2.xxxx, s1, r2.z
      mul r11.xyz, r2.zzzz, r11.xyzx
    endif 
    if_nz r11.w
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r12.xyzw, r1.w, l(268), t1.yzwx
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r15.xyzw, r1.w, l(284), t1.xyzw
      ld_structured_indexable(structured_buffer, stride=384)(mixed,mixed,mixed,mixed) r16.w, r1.w, l(300), t1.xxxx
      mov r14.w, r12.w
      dp4 r1.w, r14.xyzw, r9.xyzw
      mov r12.w, r15.x
      dp4 r2.z, r12.xyzw, r9.xyzw
      mov r16.xyz, r15.yzwy
      dp4 r2.w, r16.xyzw, r9.xyzw
      div r12.x, r1.w, r2.w
      div r12.y, r2.z, r2.w
      utof r12.z, r13.x
      sample_l_indexable(texture2darray)(float,float,float,float) r12.xyz, r12.xyzx, t4.xyzw, s2, l(0.000000)
      mul r11.xyz, r11.xyzx, r12.xyzx
    endif 
    mad r10.xyz, r11.xyzx, r2.yyyy, r10.xyzx
  else 
    mad r2.yzw, r11.xxyz, r1.zzzz, r10.xxyz
    movc r10.xyz, r3.xxxx, r10.xyzx, r2.yzwy
  endif 
  iadd r1.x, r1.x, l(1)
endloop 
mov r10.w, l(0)
store_uav_typed u0.xyzw, r0.xyzw, r10.xyzw
ret 
// Approximately 247 instruction slots used
