//Volumetric lighting CS from cache.
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Fri Jan 14 20:06:33 2022
//
//
// Note: shader requires additional functionality:
//       64 UAV slots
//
//
// Buffer Definitions:
//
// cbuffer ConstBuf__volumetricFogData
// {
//
//   struct VolumetricFogData
//   {
//
//       float4 cPoissonSamples[64];    // Index:    0
//       float4x4 cInvViewProjMatrixNoZReproj;// Index:   64
//       float4x4 cReprojToPreviousFrame;// Index:   68
//       float4 cWorldEyePos;           // Index:   72
//       float4x4 cGIVolumeTransform;   // Index:   73
//       float4 cGIVolumeStart;         // Index:   77
//       float4 cGIVolumeTexelScale;    // Index:   78
//
//       struct AtmosphericConstants
//       {
//
//           float3 cFogColor;          // Index:   79
//           float cHeightFalloff;      // Index:   79.w
//           float3 cEyePosition;       // Index:   80
//           float cHeightDensity;      // Index:   80.w
//           float cStartDistance;      // Index:   81
//           float cGlobalDensity;      // Index:   81.y
//           float cDepthReprojectScale;// Index:   81.z
//           float cDepthReprojectBias; // Index:   81.w
//           float4x4 cInvProjNoZReproj;// Index:   82
//           float3 cDirectionalFogDirection;// Index:   86
//           float cDirectionalityPower;// Index:   86.w
//           float3 cDirectionalFogColor;// Index:   87
//           float cDensityMapSparseBias;// Index:   87.w
//           float3 cDensityMapInvExtents;// Index:   88
//           float cDensityMapSparseSegmentScale;// Index:   88.w
//           float3 cDensityMapBias;    // Index:   89
//           float cDensityMapSparseCutoff;// Index:   89.w
//           float cVolFogExponentMultiply;// Index:   90
//           float cVolFogDistanceMultiply;// Index:   90.y
//           float cVolFogExponentNormalize;// Index:   90.z
//           float cVolFogDistanceNormalize;// Index:   90.w
//           float cVolFogResolutionScale;// Index:   91
//           int cVolFogWidth;          // Index:   91.y
//           int cVolFogHeight;         // Index:   91.z
//           int cVolFogDepth;          // Index:   91.w
//
//       } atmosphericConstants;        // Index:   79
//       float3 cFogAlbedo;             // Index:   92
//       float cLightingTemporal;       // Index:   92.w
//       float cDensityTemporal;        // Index:   93
//       float cPrevFogResolutionScale; // Index:   93.y
//       float CascadeShadowSize;       // Index:   93.z
//       float OneOverCascadeShadowSize;// Index:   93.w
//       float ShadowTextureW;          // Index:   94
//       float ShadowTextureH;          // Index:   94.y
//       float OneOverShadowTextureW;   // Index:   94.z
//       float OneOverShadowTextureH;   // Index:   94.w
//
//   } resourceTables__volumetricFogData;// Index:    0-94             Components:   380
                                        // Textures:  t0-t6
//
// }
//
// cbuffer ConstBuf__lightConstants
// {
//
//   struct VolumetricLightConstants
//   {
//
//       struct LightingCB
//       {
//
//           uint imageWidth;           // Index:    0
//           uint imageHeight;          // Index:    0.y
//           float invImageWidth;       // Index:    0.z
//           float invImageHeight;      // Index:    0.w
//           uint tilesHorz;            // Index:    1
//           uint tilesVert;            // Index:    1.y
//           uint tilesHorzHalfRes;     // Index:    1.z
//           uint tilesVertHalfRes;     // Index:    1.w
//           uint numLocalShadows;      // Index:    2
//           uint numLocalLights;       // Index:    2.y
//           uint numExposureLights;    // Index:    2.z
//           uint numDirectionalLights; // Index:    2.w
//           uint numDirectionalShadows;// Index:    3
//
//           struct Projector
//           {
//
//               float4x4 mat;          // Index:    4
//
//           } projectors[4];           // Index:    4
//
//           struct DirectionalLight
//           {
//
//               float3 dirWS;          // Index:   20
//               uint groupID;          // Index:   20.w
//               float3 color;          // Index:   21
//               float solidAngle;      // Index:   21.w
//               float halfAngle;       // Index:   22
//               int shadowMaskIndex;   // Index:   22.y
//               int projectorIndex;    // Index:   22.z
//               float ssdoAmount;      // Index:   22.w
//
//           } DirectionalLights[2];    // Index:   20
//
//           struct LightShadowInfo
//           {
//
//               float4x4 gWorldToLight;// Index:   26
//
//               struct CascadeOffset
//               {
//
//                   float fScale;      // Index:   30
//                   float3 vTranslate; // Index:   30.y
//
//               } gCascadeOffset[3];   // Index:   30
//               float4 uvScaleOffset[4];// Index:   33
//               int extraCascadeIndex; // Index:   37
//               float cascadeRange;    // Index:   37.y
//               float2 linearizeConstants;// Index:   37.z
//               float filterSize;      // Index:   38
//               float shadowFade;      // Index:   38.y
//               float shadowBias;      // Index:   38.z
//               float padd;            // Index:   38.w
//
//           } DirectionalShadows[2];   // Index:   26
//
//           struct LocalLightFull
//           {
//
//               float3 posWS;          // Index:   52
//               float sourceRadiusSquared;// Index:   52.w
//               float3 dirWS;          // Index:   53
//               float falloffConstant; // Index:   53.w
//               float3 color;          // Index:   54
//               uint groupID;          // Index:   54.w
//               float innerMinusOuterCosHalfAngleRcp;// Index:   55
//               float outerCosHalfAngle;// Index:   55.y
//               int lightIndex;        // Index:   55.z
//               int capsuleShadowIndex;// Index:   55.w
//               int projectorIndex;    // Index:   56
//               float fadeStartOnDist; // Index:   56.y
//               float fadeRcpDist;     // Index:   56.z
//               float fadeRate;        // Index:   56.w
//               float ssdoAmount;      // Index:   57
//               uint3 _unused1;        // Index:   57.y
//
//           } LocalLightsUnshadowed[32];// Index:   52
//
//           struct LocalLightFull
//           {
//
//               float3 posWS;          // Index:  244
//               float sourceRadiusSquared;// Index:  244.w
//               float3 dirWS;          // Index:  245
//               float falloffConstant; // Index:  245.w
//               float3 color;          // Index:  246
//               uint groupID;          // Index:  246.w
//               float innerMinusOuterCosHalfAngleRcp;// Index:  247
//               float outerCosHalfAngle;// Index:  247.y
//               int lightIndex;        // Index:  247.z
//               int capsuleShadowIndex;// Index:  247.w
//               int projectorIndex;    // Index:  248
//               float fadeStartOnDist; // Index:  248.y
//               float fadeRcpDist;     // Index:  248.z
//               float fadeRate;        // Index:  248.w
//               float ssdoAmount;      // Index:  249
//               uint3 _unused1;        // Index:  249.y
//
//           } LocalLightsShadowed[16]; // Index:  244
//
//           struct LightShadowInfo
//           {
//
//               float4x4 gWorldToLight;// Index:  340
//
//               struct CascadeOffset
//               {
//
//                   float fScale;      // Index:  344
//                   float3 vTranslate; // Index:  344.y
//
//               } gCascadeOffset[3];   // Index:  344
//               float4 uvScaleOffset[4];// Index:  347
//               int extraCascadeIndex; // Index:  351
//               float cascadeRange;    // Index:  351.y
//               float2 linearizeConstants;// Index:  351.z
//               float filterSize;      // Index:  352
//               float shadowFade;      // Index:  352.y
//               float shadowBias;      // Index:  352.z
//               float padd;            // Index:  352.w
//
//           } LocalLightsShadows[16];  // Index:  340
//
//           struct LightShadowInfo
//           {
//
//               float4x4 gWorldToLight;// Index:  548
//
//               struct CascadeOffset
//               {
//
//                   float fScale;      // Index:  552
//                   float3 vTranslate; // Index:  552.y
//
//               } gCascadeOffset[3];   // Index:  552
//               float4 uvScaleOffset[4];// Index:  555
//               int extraCascadeIndex; // Index:  559
//               float cascadeRange;    // Index:  559.y
//               float2 linearizeConstants;// Index:  559.z
//               float filterSize;      // Index:  560
//               float shadowFade;      // Index:  560.y
//               float shadowBias;      // Index:  560.z
//               float padd;            // Index:  560.w
//
//           } ShadowTransmittanceInfo; // Index:  548
//
//           struct LightShadowInfo
//           {
//
//               float4x4 gWorldToLight;// Index:  561
//
//               struct CascadeOffset
//               {
//
//                   float fScale;      // Index:  565
//                   float3 vTranslate; // Index:  565.y
//
//               } gCascadeOffset[3];   // Index:  565
//               float4 uvScaleOffset[4];// Index:  568
//               int extraCascadeIndex; // Index:  572
//               float cascadeRange;    // Index:  572.y
//               float2 linearizeConstants;// Index:  572.z
//               float filterSize;      // Index:  573
//               float shadowFade;      // Index:  573.y
//               float shadowBias;      // Index:  573.z
//               float padd;            // Index:  573.w
//
//           } ExtraCascades[2];        // Index:  561
//
//           struct ExposureLightFull
//           {
//
//               float3 posWS;          // Index:  587
//               float falloffConstant; // Index:  587.w
//               float3 color;          // Index:  588
//               uint groupID;          // Index:  588.w
//
//           } ExposureLightsFull[16];  // Index:  587
//
//       } global;                      // Index:    0
//
//   } resourceTables__lightConstants;  // Index:    0-618            Components:  2476
                                        // Textures:  t8-t11
//
// }
//
// cbuffer ConstBuf__giVolumeConstants
// {
//
//   struct GIVolumeConstants
//   {
//
//       int numGIVolumes;              // Index:    0
//
//       struct GIVolumeGlobal
//       {
//
//           float giVolumeSHDiffuseBlur;// Index:    1
//           float giVolumeSHSpecularBlur;// Index:    1.y
//           float giVolumeSaturation;  // Index:    1.z
//           float4 defaultOcclusionSH; // Index:    2
//           float4 skyFullRSH;         // Index:    3
//           float4 skyFullGSH;         // Index:    4
//           float4 skyFullBSH;         // Index:    5
//           float4 skyFullClampRSH;    // Index:    6
//           float4 skyFullClampGSH;    // Index:    7
//           float4 skyFullClampBSH;    // Index:    8
//           float4 skyFullGeoRSH;      // Index:    9
//           float4 skyFullGeoGSH;      // Index:   10
//           float4 skyFullGeoBSH;      // Index:   11
//           float4 skyTopRSH;          // Index:   12
//           float4 skyTopGSH;          // Index:   13
//           float4 skyTopBSH;          // Index:   14
//           float4 skyTopClampRSH;     // Index:   15
//           float4 skyTopClampGSH;     // Index:   16
//           float4 skyTopClampBSH;     // Index:   17
//           float4 skyTopGeoRSH;       // Index:   18
//           float4 skyTopGeoGSH;       // Index:   19
//           float4 skyTopGeoBSH;       // Index:   20
//           float4 skyTopAndBounceRSH; // Index:   21
//           float4 skyTopAndBounceGSH; // Index:   22
//           float4 skyTopAndBounceBSH; // Index:   23
//           float4 skyTopAndBounceClampRSH;// Index:   24
//           float4 skyTopAndBounceClampGSH;// Index:   25
//           float4 skyTopAndBounceClampBSH;// Index:   26
//           float4 skyTopAndBounceGeoRSH;// Index:   27
//           float4 skyTopAndBounceGeoGSH;// Index:   28
//           float4 skyTopAndBounceGeoBSH;// Index:   29
//           float4 skyDifFullRSH;      // Index:   30
//           float4 skyDifFullGSH;      // Index:   31
//           float4 skyDifFullBSH;      // Index:   32
//           float4 skyDifFullClampRSH; // Index:   33
//           float4 skyDifFullClampGSH; // Index:   34
//           float4 skyDifFullClampBSH; // Index:   35
//           float4 skyDifFullGeoRSH;   // Index:   36
//           float4 skyDifFullGeoGSH;   // Index:   37
//           float4 skyDifFullGeoBSH;   // Index:   38
//           float4 skyDifTopRSH;       // Index:   39
//           float4 skyDifTopGSH;       // Index:   40
//           float4 skyDifTopBSH;       // Index:   41
//           float4 skyDifTopClampRSH;  // Index:   42
//           float4 skyDifTopClampGSH;  // Index:   43
//           float4 skyDifTopClampBSH;  // Index:   44
//           float4 skyDifTopGeoRSH;    // Index:   45
//           float4 skyDifTopGeoGSH;    // Index:   46
//           float4 skyDifTopGeoBSH;    // Index:   47
//           float4 skyDifTopAndBounceRSH;// Index:   48
//           float4 skyDifTopAndBounceGSH;// Index:   49
//           float4 skyDifTopAndBounceBSH;// Index:   50
//           float4 skyDifTopAndBounceClampRSH;// Index:   51
//           float4 skyDifTopAndBounceClampGSH;// Index:   52
//           float4 skyDifTopAndBounceClampBSH;// Index:   53
//           float4 skyDifTopAndBounceGeoRSH;// Index:   54
//           float4 skyDifTopAndBounceGeoGSH;// Index:   55
//           float4 skyDifTopAndBounceGeoBSH;// Index:   56
//
//       } global;                      // Index:    1
//
//       struct GIVolume
//       {
//
//           float3 invTransX;          // Index:   57
//           float3 invTransY;          // Index:   58
//           float3 invTransZ;          // Index:   59
//           float3 invTransT;          // Index:   60
//           float3 invRotX;            // Index:   61
//           float3 invRotY;            // Index:   62
//           float3 invRotZ;            // Index:   63
//           uint3 indDims;             // Index:   64
//           float3 invIndDims;         // Index:   65
//           uint3 atlasDims;           // Index:   66
//           float3 invAtlasDims;       // Index:   67
//           float4 cr1Min;             // Index:   68
//           float4 cr1MaxSubMin;       // Index:   69
//           float4 cr2Min;             // Index:   70
//           float4 cr2MaxSubMin;       // Index:   71
//           float4 cr3Min;             // Index:   72
//           float4 cr3MaxSubMin;       // Index:   73
//           float normalOffset;        // Index:   74
//           float4 giTintScaled;       // Index:   75
//           uint flags;                // Index:   76
//
//       } giVolumes[4];                // Index:   57
//
//   } resourceTables__giVolumeConstants;// Index:    0-136.x          Components:   545
                                        // Textures:  t18-t25
//
// }
//
// cbuffer ConstBuf__splitConstants
// {
//
//   struct VolumetricSplitConstants
//   {
//
//       uint3 cGroupOffset;            // Index:    0
//       uint localLightMask;           // Index:    0.w
//       uint shadowLightAndGIMask;     // Index:    1
//
//   } resourceTables__splitConstants;  // Index:    0-1.x            Components:     5
//
// }
//
// Resource bind info for resourceTables__volumetricFogDensityData.DensityAtLightPoints
// {
//
//   float $Element;                    // Index:    0.x              Components:     1
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// resourceTables__volumetricFogData__smpLinear    sampler      NA          NA    1        1
// resourceTables__volumetricFogData__smpLinearClamp    sampler      NA          NA    3        1
// resourceTables__giVolumeConstants__giSampler    sampler      NA          NA   10        1
// resourceTables__volumetricFogData.LightTextureAccum    texture  float3          3d    0        1
// resourceTables__volumetricFogData.DirTextureAccum    texture  float4          3d    2        1
// resourceTables__volumetricFogData.ShadowTextureESM    texture   float          2d    4        1
// resourceTables__volumetricFogData.ShadowTransmittanceTexture0    texture  float4          2d    5        1
// resourceTables__volumetricFogData.ShadowTransmittanceTexture1    texture  float4          2d    6        1
// resourceTables__lightConstants.ProjTextureMaps[0]    texture  float4          2d    8        1
// resourceTables__lightConstants.ProjTextureMaps[1]    texture  float4          2d    9        1
// resourceTables__lightConstants.ProjTextureMaps[2]    texture  float4          2d   10        1
// resourceTables__lightConstants.ProjTextureMaps[3]    texture  float4          2d   11        1
// resourceTables__volumetricFogDensityData.DensityAtLightPoints    texture  struct         r/o   12        1
// resourceTables__giVolumeConstants.giVolumesInd[0]    texture  float4          3d   18        1
// resourceTables__giVolumeConstants.giVolumesInd[1]    texture  float4          3d   19        1
// resourceTables__giVolumeConstants.giVolumesInd[2]    texture  float4          3d   20        1
// resourceTables__giVolumeConstants.giVolumesInd[3]    texture  float4          3d   21        1
// resourceTables__giVolumeConstants.giVolumesSH0[0]    texture  float4          3d   22        1
// resourceTables__giVolumeConstants.giVolumesSH0[1]    texture  float4          3d   23        1
// resourceTables__giVolumeConstants.giVolumesSH0[2]    texture  float4          3d   24        1
// resourceTables__giVolumeConstants.giVolumesSH0[3]    texture  float4          3d   25        1
// resourceTables__volumetricFogData.OutLightingTexture        UAV  float3          3d    8        1
// resourceTables__volumetricFogData.OutDirectionTexture        UAV  float4          3d   10        1
// ConstBuf__volumetricFogData       cbuffer      NA          NA    0        1
// ConstBuf__lightConstants          cbuffer      NA          NA    1        1
// ConstBuf__giVolumeConstants       cbuffer      NA          NA    3        1
// ConstBuf__splitConstants          cbuffer      NA          NA    4        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_constantbuffer cb0[94], dynamicIndexed
dcl_constantbuffer cb1[619], dynamicIndexed
dcl_constantbuffer cb3[137], immediateIndexed
dcl_constantbuffer cb4[2], immediateIndexed
dcl_constantbuffer cb12[3], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s3, mode_default
dcl_sampler s10, mode_default
dcl_resource_texture3d (float,float,float,float) t0
dcl_resource_texture3d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) 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_structured t12, 4
dcl_resource_texture3d (float,float,float,float) t18
dcl_resource_texture3d (float,float,float,float) t19
dcl_resource_texture3d (float,float,float,float) t20
dcl_resource_texture3d (float,float,float,float) t21
dcl_resource_texture3d (float,float,float,float) t22
dcl_resource_texture3d (float,float,float,float) t23
dcl_resource_texture3d (float,float,float,float) t24
dcl_resource_texture3d (float,float,float,float) t25
dcl_uav_typed_texture3d (float,float,float,float) u8
dcl_uav_typed_texture3d (float,float,float,float) u10
dcl_input vThreadIDInGroupFlattened
dcl_input vThreadGroupID.xyz
dcl_temps 50
dcl_indexableTemp x0[16], 4
dcl_indexableTemp x1[8], 4
dcl_thread_group 4, 4, 4
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r40.xyzw, l(0, 0, 0, 0), t125.xyzw
ld_indexable(texture2d)(float,float,float,float) r41.xyzw, l(2, 0, 0, 0), t125.xyzw
iadd r0.xyzw, vThreadGroupID.xyzz, cb4[0].xyzz
ishl r1.x, vThreadIDInGroupFlattened.x, l(1)
ushr r1.xy, l(0xebfa5014, 0xfa4141af, 0, 0), r1.xxxx
and r1.xy, r1.xyxx, l(3, 3, 0, 0)
ushr r1.zw, vThreadIDInGroupFlattened.xxxx, l(0, 0, 4, 4)
bfi r0.xyzw, l(30, 30, 30, 30), l(2, 2, 2, 2), r0.xyzw, r1.xyzw
utof r1.xyz, r0.xywx
add r2.xyz, r1.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
itof r3.xyz, cb0[91].yzwy
mul r2.xyz, r2.xyzx, l(2.000000, -2.000000, 1.000000, 0.000000)
div r2.xyz, r2.xyzx, r3.xyzx
add r2.xyz, r2.xyzx, l(-1.000000, 1.000000, 0.000000, 0.000000)
mul r1.w, r2.z, cb0[90].x
exp r1.w, r1.w
add r1.w, r1.w, l(-1.000000)
mul r4.z, r1.w, cb0[90].y
mul r4.xy, r2.xyxx, r4.zzzz
mov r4.w, l(1.000000)

add r40.w, r4.z, -r40.y
mad r4.x, -r40.x, r40.w, r4.x

dp4 r2.x, r4.xyzw, cb0[68].xyzw
dp4 r2.y, r4.xyzw, cb0[69].xyzw
dp4 r1.w, r4.xyzw, cb0[70].xyzw

ge r42.x, r41.x, l(5.0)
if_z r42.x
add r40.w, r1.w, -cb12[2].y
mad r2.x, cb12[2].x, r40.w, r2.x
else
add r40.w, r1.w, -r40.y
mad r2.x, r40.x, r40.w, r2.x
endif

div r2.xy, r2.xyxx, r1.wwww
mad r4.xy, r2.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mad r2.z, r1.w, cb0[90].w, l(1.000000)
log r2.z, r2.z
mul r4.z, r2.z, cb0[90].z
lt r2.xy, |r2.xyxx|, l(1.000000, 1.000000, 0.000000, 0.000000)
and r2.x, r2.y, r2.x
and r2.x, r2.x, l(0x3f800000)
mul r2.x, r2.x, cb0[92].w
mul_sat r1.w, r1.w, l(1000.000000)
mul r1.w, r1.w, r2.x
sample_l_indexable(texture3d)(float,float,float,float) r2.xyz, r4.xyzx, t0.xyzw, s3, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r4.xyz, r4.xyzx, t2.xyzw, s3, l(0.000000)
mov r2.w, vThreadIDInGroupFlattened.x
add r1.xyz, r1.xyzx, cb0[r2.w + 0].xyzx
mul r1.xyz, r1.xyzx, l(2.000000, -2.000000, 1.000000, 0.000000)
div r1.xyz, r1.xyzx, r3.xyzx
add r1.xyz, r1.xyzx, l(-1.000000, 1.000000, 0.000000, 0.000000)
mul r1.z, r1.z, cb0[90].x
exp r1.z, r1.z
add r1.z, r1.z, l(-1.000000)
mul r3.z, r1.z, cb0[90].y
mul r3.xy, r1.xyxx, r3.zzzz
mov r3.w, l(1.000000)

add r40.w, r3.z, -r40.y
mad r3.x, -r40.x, r40.w, r3.x

dp4 r5.x, r3.xyzw, cb0[64].xyzw
dp4 r5.y, r3.xyzw, cb0[65].xyzw
dp4 r5.z, r3.xyzw, cb0[66].xyzw
mov x0[0].x, cb1[4].x
mov x0[1].x, cb1[5].x
mov x0[3].x, cb1[7].x
mov x0[0].y, cb1[4].y
mov x0[1].y, cb1[5].y
mov x0[3].y, cb1[7].y
mov x0[0].z, cb1[4].z
mov x0[1].z, cb1[5].z
mov x0[3].z, cb1[7].z
mov x0[0].w, cb1[4].w
mov x0[1].w, cb1[5].w
mov x0[3].w, cb1[7].w
mov x0[4].x, cb1[8].x
mov x0[5].x, cb1[9].x
mov x0[7].x, cb1[11].x
mov x0[4].y, cb1[8].y
mov x0[5].y, cb1[9].y
mov x0[7].y, cb1[11].y
mov x0[4].z, cb1[8].z
mov x0[5].z, cb1[9].z
mov x0[7].z, cb1[11].z
mov x0[4].w, cb1[8].w
mov x0[5].w, cb1[9].w
mov x0[7].w, cb1[11].w
mov x0[8].x, cb1[12].x
mov x0[9].x, cb1[13].x
mov x0[11].x, cb1[15].x
mov x0[8].y, cb1[12].y
mov x0[9].y, cb1[13].y
mov x0[11].y, cb1[15].y
mov x0[8].z, cb1[12].z
mov x0[9].z, cb1[13].z
mov x0[11].z, cb1[15].z
mov x0[8].w, cb1[12].w
mov x0[9].w, cb1[13].w
mov x0[11].w, cb1[15].w
mov x0[12].x, cb1[16].x
mov x0[13].x, cb1[17].x
mov x0[15].x, cb1[19].x
mov x0[12].y, cb1[16].y
mov x0[13].y, cb1[17].y
mov x0[15].y, cb1[19].y
mov x0[12].z, cb1[16].z
mov x0[13].z, cb1[17].z
mov x0[15].z, cb1[19].z
mov x0[12].w, cb1[16].w
mov x0[13].w, cb1[17].w
mov x0[15].w, cb1[19].w
mul r3.w, l(0.282094806), cb3[2].x
ilt r1.x, l(0), cb3[0].x
if_nz r1.x
  mul r1.xyz, r5.yyyy, cb3[58].xzyx
  mad r1.xyz, cb3[57].xzyx, r5.xxxx, r1.xyzx
  mad r1.xyz, cb3[59].xzyx, r5.zzzz, r1.xyzx
  add r1.xyz, r1.xyzx, cb3[60].xzyx
  lt r6.xyz, |r1.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
  and r2.w, r6.y, r6.x
  and r2.w, r6.z, r2.w
  if_nz r2.w
    add r1.xyz, r1.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r4.w, l(1), cb3[76].x
    if_nz r4.w
      utof r6.xyz, cb3[64].xyzx
      mul r6.xyz, r1.xyzx, r6.xyzx
      ftoi r7.xyz, r6.xyzx
      mov r7.w, l(0)
      ld_indexable(texture3d)(float,float,float,float) r7.xyzw, r7.xyzw, t18.xyzw
      mul r8.xyzw, r7.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
      frc r4.w, r8.z
      mad r8.x, r4.w, l(4.000000), r8.x
      mad r8.z, r7.z, l(63.750000), -r4.w
      frc r6.xyz, r6.xyzx
      mad r6.xyz, r6.xyzx, r8.wwww, r8.xyzx
      add r6.xyz, r6.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      utof r7.xyz, cb3[66].xyzx
      div r1.xyz, r6.xyzx, r7.xyzx
    endif
    sample_l_indexable(texture3d)(float,float,float,float) r6.xyzw, r1.xyzx, t22.xyzw, s10, l(0.000000)
    mul r6.xyzw, r6.xyzw, cb3[75].xyzw
    mul r3.xyzw, r6.xyzw, l(0.282094806, 0.282094806, 0.282094806, 0.282094806)
  else
    mov r3.xyz, l(0,0,0,0)
  endif
  ige r1.x, l(1), cb3[0].x
  or r1.x, r2.w, r1.x
  if_z r1.x
    mul r6.xyz, r5.yyyy, cb3[78].xzyx
    mad r6.xyz, cb3[77].xzyx, r5.xxxx, r6.xyzx
    mad r6.xyz, cb3[79].xzyx, r5.zzzz, r6.xyzx
    add r6.xyz, r6.xyzx, cb3[80].xzyx
    lt r7.xyz, |r6.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r1.y, r7.y, r7.x
    and r1.y, r7.z, r1.y
    if_nz r1.y
      add r6.xyz, r6.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      and r1.y, l(1), cb3[96].x
      if_nz r1.y
        utof r7.xyz, cb3[84].xyzx
        mul r7.xyz, r6.xyzx, r7.xyzx
        ftoi r8.xyz, r7.xyzx
        mov r8.w, l(0)
        ld_indexable(texture3d)(float,float,float,float) r8.xyzw, r8.xyzw, t19.xyzw
        mul r9.xyzw, r8.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
        frc r1.y, r9.z
        mad r9.x, r1.y, l(4.000000), r9.x
        mad r9.z, r8.z, l(63.750000), -r1.y
        frc r7.xyz, r7.xyzx
        mad r7.xyz, r7.xyzx, r9.wwww, r9.xyzx
        add r7.xyz, r7.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
        utof r8.xyz, cb3[86].xyzx
        div r6.xyz, r7.xyzx, r8.xyzx
      endif
      sample_l_indexable(texture3d)(float,float,float,float) r6.xyzw, r6.xyzx, t23.xyzw, s10, l(0.000000)
      mul r6.xyzw, r6.xyzw, cb3[95].xyzw
      mul r3.xyzw, r6.xyzw, l(0.282094806, 0.282094806, 0.282094806, 0.282094806)
      mov r2.w, l(-1)
    else
      mov r2.w, l(0)
    endif
  endif
else
  mov r3.xyz, l(0,0,0,0)
  mov r2.w, l(0)
  mov r1.x, l(-1)
endif
if_z r1.x
  ige r1.x, l(2), cb3[0].x
  or r1.x, r2.w, r1.x
  if_z r1.x
    mul r6.xyz, r5.yyyy, cb3[98].xzyx
    mad r6.xyz, cb3[97].xzyx, r5.xxxx, r6.xyzx
    mad r6.xyz, cb3[99].xzyx, r5.zzzz, r6.xyzx
    add r6.xyz, r6.xyzx, cb3[100].xzyx
    lt r7.xyz, |r6.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r1.y, r7.y, r7.x
    and r2.w, r7.z, r1.y
    if_nz r2.w
      add r6.xyz, r6.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      and r1.y, l(1), cb3[116].x
      if_nz r1.y
        utof r7.xyz, cb3[104].xyzx
        mul r7.xyz, r6.xyzx, r7.xyzx
        ftoi r8.xyz, r7.xyzx
        mov r8.w, l(0)
        ld_indexable(texture3d)(float,float,float,float) r8.xyzw, r8.xyzw, t20.xyzw
        mul r9.xyzw, r8.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
        frc r1.y, r9.z
        mad r9.x, r1.y, l(4.000000), r9.x
        mad r9.z, r8.z, l(63.750000), -r1.y
        frc r7.xyz, r7.xyzx
        mad r7.xyz, r7.xyzx, r9.wwww, r9.xyzx
        add r7.xyz, r7.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
        utof r8.xyz, cb3[106].xyzx
        div r6.xyz, r7.xyzx, r8.xyzx
      endif
      sample_l_indexable(texture3d)(float,float,float,float) r6.xyzw, r6.xyzx, t24.xyzw, s10, l(0.000000)
      mul r6.xyzw, r6.xyzw, cb3[115].xyzw
      mul r3.xyzw, r6.xyzw, l(0.282094806, 0.282094806, 0.282094806, 0.282094806)
    endif
  endif
else
  mov r1.x, l(-1)
endif
if_z r1.x
  ige r1.x, l(3), cb3[0].x
  or r1.x, r2.w, r1.x
  if_z r1.x
    mul r1.xyz, r5.yyyy, cb3[118].xzyx
    mad r1.xyz, cb3[117].xzyx, r5.xxxx, r1.xyzx
    mad r1.xyz, cb3[119].xzyx, r5.zzzz, r1.xyzx
    add r1.xyz, r1.xyzx, cb3[120].xzyx
    lt r6.xyz, |r1.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r2.w, r6.y, r6.x
    and r2.w, r6.z, r2.w
    if_nz r2.w
      add r1.xyz, r1.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      and r2.w, l(1), cb3[136].x
      if_nz r2.w
        utof r6.xyz, cb3[124].xyzx
        mul r6.xyz, r1.xyzx, r6.xyzx
        ftoi r7.xyz, r6.xyzx
        mov r7.w, l(0)
        ld_indexable(texture3d)(float,float,float,float) r7.xyzw, r7.xyzw, t21.xyzw
        mul r8.xyzw, r7.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
        frc r2.w, r8.z
        mad r8.x, r2.w, l(4.000000), r8.x
        mad r8.z, r7.z, l(63.750000), -r2.w
        frc r6.xyz, r6.xyzx
        mad r6.xyz, r6.xyzx, r8.wwww, r8.xyzx
        add r6.xyz, r6.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
        utof r7.xyz, cb3[126].xyzx
        div r1.xyz, r6.xyzx, r7.xyzx
      endif
      sample_l_indexable(texture3d)(float,float,float,float) r6.xyzw, r1.xyzx, t25.xyzw, s10, l(0.000000)
      mul r6.xyzw, r6.xyzw, cb3[135].xyzw
      mul r3.xyzw, r6.xyzw, l(0.282094806, 0.282094806, 0.282094806, 0.282094806)
    endif
  endif
endif
mul r1.x, r3.w, l(0.282094806)
mul r6.x, r1.x, cb3[21].x
mul r6.y, r1.x, cb3[22].x
mul r6.z, r1.x, cb3[23].x
add r1.xyz, r3.xyzx, r6.xyzx
mul r3.xyzw, r1.xxyy, l(0.000000, 1.000000, 0.000000, 1.000000)
mul r6.xyzw, r1.zzzz, l(0.000000, 0.000000, 0.000000, 1.000000)
mad r1.x, -cb0[93].w, l(8.000000), l(1.000000)
mov r5.w, l(1.000000)
dp4 r7.x, r5.xyzw, cb1[548].xyzw
dp4 r7.y, r5.xyzw, cb1[549].xyzw
dp4 r1.y, r5.xyzw, cb1[550].xyzw
dp4 r1.z, r5.xyzw, cb1[551].xyzw
div r7.xy, r7.xyxx, r1.zzzz
lt r7.zw, l(0.000000, 0.000000, 1.000000, 1.000000), |r7.xxxy|
or r2.w, r7.w, r7.z
max r4.w, |r7.y|, |r7.x|
mad r4.w, r4.w, l(1.05263162), l(-1.000000)
mul_sat r4.w, r4.w, l(20.000000)
movc r4.w, r2.w, l(0), r4.w
mad r7.xy, r7.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r8.xyzw, r7.xyxx, t5.xyzw, s3, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r7.xyzw, r7.xyxx, t6.xyzw, s3, l(0.000000)
div r1.y, r1.y, r1.z
max r1.y, r1.y, l(0.000000)
min r1.y, r1.y, l(0.999990)
mul r1.z, r1.y, l(8.000000)
round_ni r1.z, r1.z
ftoi r9.x, r1.z
ilt r9.y, r9.x, l(7)
iadd r9.z, r9.x, l(1)
movc r9.y, r9.y, r9.z, l(7)
mad r1.y, r1.y, l(8.000000), -r1.z
mov r10.w, l(1.000000)
mov r11.z, l(1.000000)
mov r12.z, l(1.000000)
mov r13.z, l(1.000000)
mov r14.xyzw, r3.xxxy
mov r15.xyzw, r3.zzzw
mov r16.xyzw, r6.xyzw
mov r1.z, l(0)
loop
  uge r9.z, r1.z, cb1[2].w
  breakc_nz r9.z
  ult r9.z, r1.z, cb1[3].x
  if_nz r9.z
    imul null, r9.z, r1.z, l(13)
    dp4 r17.x, r5.xyzw, cb1[r9.z + 26].xyzw
    dp4 r17.y, r5.xyzw, cb1[r9.z + 27].xyzw
    dp4 r17.z, r5.xyzw, cb1[r9.z + 28].xyzw
    lt r9.w, r17.z, l(0.000000)
    lt r11.y, l(1.000000), r17.z
    or r9.w, r9.w, r11.y
    if_z r9.w
      mov r11.x, cb1[r9.z + 30].x
      mad r11.xyw, r17.xyxz, r11.xxxz, cb1[r9.z + 30].yzyw
      mov r12.x, cb1[r9.z + 31].x
      mad r12.xyw, r17.xyxz, r12.xxxz, cb1[r9.z + 31].yzyw
      mov r13.x, cb1[r9.z + 32].x
      mad r13.xyw, r17.xyxz, r13.xxxz, cb1[r9.z + 32].yzyw
      lt r18.xy, |r17.xyxx|, r1.xxxx
      and r17.w, r18.y, r18.x
      lt r18.xy, |r11.xyxx|, r1.xxxx
      and r18.x, r18.y, r18.x
      lt r18.yz, |r12.xxyx|, r1.xxxx
      and r18.y, r18.z, r18.y
      lt r18.zw, |r13.xxxy|, r1.xxxx
      and r18.z, r18.w, r18.z
      mad r13.xy, r13.xyxx, cb1[r9.z + 36].xyxx, cb1[r9.z + 36].zwzz
      mad r12.xy, r12.xyxx, cb1[r9.z + 35].xyxx, cb1[r9.z + 35].zwzz
      movc r12.xyw, r18.yyyy, r12.xyxw, r13.xyxw
      mad r11.xy, r11.xyxx, cb1[r9.z + 34].xyxx, cb1[r9.z + 34].zwzz
      movc r11.xyw, r18.xxxx, r11.xyxw, r12.xyxw
      mad r17.xy, r17.xyxx, cb1[r9.z + 33].xyxx, cb1[r9.z + 33].zwzz
      movc r11.xyw, r17.wwww, r17.xyxz, r11.xyxw
      movc r12.x, r18.z, l(3), l(-1)
      movc r12.x, r18.y, l(2), r12.x
      movc r12.x, r18.x, l(1), r12.x
      movc r12.x, r17.w, l(0), r12.x
    else
      mov r11.xyw, l(0,0,0,0)
      mov r12.x, l(0)
    endif
    ige r12.x, r12.x, l(0)
    movc r9.w, r9.w, l(0), r12.x
    if_nz r9.w
      add r9.w, -r11.w, l(1.000000)
      sample_l_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r11.x, r11.xyxx, t4.xyzw, s3, l(0.000000)
      mad r9.w, r9.w, l(2.000000), l(-1.000000)
      mul r9.w, r9.w, l(60.593193)
      exp r9.w, r9.w
      div r9.w, r11.x, r9.w
      mad_sat r9.w, r9.w, l(11.000000), l(-10.000000)
    else
      mov r9.w, l(1.000000)
    endif
    add_sat r9.z, r9.w, cb1[r9.z + 38].y
    if_nz r2.w
      mov r9.w, l(1.000000)
    endif
    if_z r2.w
      mov x1[0].x, r8.x
      mov x1[1].x, r8.y
      mov x1[2].x, r8.z
      mov x1[3].x, r8.w
      mov x1[4].x, r7.x
      mov x1[5].x, r7.y
      mov x1[6].x, r7.z
      mov x1[7].x, r7.w
      mov r11.x, x1[r9.x + 0].x
      mov r11.y, x1[r9.y + 0].x
      add r11.y, -r11.x, r11.y
      mad r11.x, r1.y, r11.y, r11.x
      exp r11.x, -r11.x
      add r11.x, r4.w, r11.x
      min r9.w, r11.x, l(1.000000)
    endif
    mul r9.z, r9.w, r9.z
  else
    mov r9.z, l(1.000000)
  endif
  lt r9.w, l(0.00392156886), r9.z
  if_nz r9.w
    imul null, r9.w, r1.z, l(3)
    mul r9.z, r9.z, cb1[r9.w + 21].w
    mul r9.z, r9.z, l(0.0795774683)
    mul r11.xyw, r9.zzzz, cb1[r9.w + 21].xyxz
    ige r9.z, cb1[r9.w + 22].z, l(0)
    if_nz r9.z
      ishl r9.z, cb1[r9.w + 22].z, l(2)
      mov r17.x, x0[r9.z + 0].x
      mov r18.x, x0[r9.z + 1].x
      mov r19.x, x0[r9.z + 3].x
      mov r17.y, x0[r9.z + 0].y
      mov r18.y, x0[r9.z + 1].y
      mov r19.y, x0[r9.z + 3].y
      mov r17.z, x0[r9.z + 0].z
      mov r18.z, x0[r9.z + 1].z
      mov r19.z, x0[r9.z + 3].z
      mov r17.w, x0[r9.z + 0].w
      mov r18.w, x0[r9.z + 1].w
      mov r19.w, x0[r9.z + 3].w
      dp4 r12.x, r5.xyzw, r17.xyzw
      dp4 r12.y, r5.xyzw, r18.xyzw
      dp4 r9.z, r5.xyzw, r19.xyzw
      div r12.xy, r12.xyxx, r9.zzzz
      sample_l_indexable(texture2d)(float,float,float,float) r13.xyw, r12.xyxx, t8.xywz, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r17.xyz, r12.xyxx, t9.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r18.xyz, r12.xyxx, t10.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r12.xyw, r12.xyxx, t11.xywz, s1, l(0.000000)
      ieq r19.xyz, l(1, 2, 3, 0), cb1[r9.w + 22].zzzz
      movc r13.xyw, r19.xxxx, r17.xyxz, r13.xyxw
      movc r13.xyw, r19.yyyy, r18.xyxz, r13.xyxw
      movc r12.xyw, r19.zzzz, r12.xyxw, r13.xyxw
      mul r11.xyw, r11.xyxw, r12.xyxw
    endif
    mov r10.xyz, cb1[r9.w + 20].xyzx
    mad r14.xyzw, r10.xyzw, r11.xxxx, r14.xyzw
    mad r15.xyzw, r10.xyzw, r11.yyyy, r15.xyzw
    mad r16.xyzw, r10.xyzw, r11.wwww, r16.xyzw
  endif
  iadd r1.z, r1.z, l(1)
endloop
and r1.x, cb4[1].x, l(0x0000ffff)
mov r3.w, l(1.000000)
mov r6.xyzw, r14.xyzw
mov r7.xyzw, r15.xyzw
mov r8.xyzw, r16.xyzw
mov r1.y, l(0)
loop
  uge r1.z, r1.y, cb1[2].x
  breakc_nz r1.z
  ishl r2.w, l(1), r1.y
  and r2.w, r1.x, r2.w
  if_z r2.w
    iadd r2.w, r1.y, l(1)
    mov r1.y, r2.w
    continue
  endif
  if_nz r1.z
    break
  endif
  imul null, r1.z, r1.y, l(6)
  add r9.xyz, -r5.xyzx, cb1[r1.z + 244].xyzx
  dp3 r2.w, r9.xyzx, r9.xyzx
  rsq r4.w, r2.w
  mul r3.xyz, r4.wwww, r9.xyzx
  add r9.x, r2.w, -cb1[r1.z + 244].w
  max r9.x, r9.x, l(0.001000)
  rcp r9.x, r9.x
  mad r9.x, cb1[r1.z + 244].w, r9.x, l(1.000000)
  rsq r9.x, r9.x
  add r9.x, -r9.x, l(1.000000)
  mul r9.x, r9.x, l(6.28318548)
  mul r9.y, r2.w, r2.w
  mad_sat r9.y, -r9.y, cb1[r1.z + 245].w, l(1.000000)
  mul r9.y, r9.y, r9.y
  mul r9.x, r9.y, r9.x
  dp3_sat r9.y, cb1[r1.z + 245].xyzx, r3.xyzx
  add_sat r9.y, r9.y, -cb1[r1.z + 247].y
  mul_sat r9.y, r9.y, cb1[r1.z + 247].x
  mul r9.z, r9.y, r9.y
  mad r9.y, -r9.y, l(2.000000), l(3.000000)
  mul r9.y, r9.y, r9.z
  mul r9.x, r9.y, r9.x
  lt r9.y, l(0.000000), r9.x
  if_nz r9.y
    mul r2.w, r2.w, r4.w
    ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r4.w, cb1[r1.z + 247].z, l(0), t12.xxxx
    mul r4.w, r2.w, -r4.w
    exp r4.w, r4.w
    mad_sat r2.w, r2.w, cb1[r1.z + 248].z, -cb1[r1.z + 248].y
    log r2.w, r2.w
    mul r2.w, r2.w, cb1[r1.z + 248].w
    exp r2.w, r2.w
    mul r4.w, r4.w, r9.x
    mul r2.w, r2.w, r4.w
    mul r2.w, r2.w, l(0.0795774683)
    imul null, r4.w, r1.y, l(13)
    dp4 r9.x, r5.xyzw, cb1[r4.w + 340].xyzw
    dp4 r9.y, r5.xyzw, cb1[r4.w + 341].xyzw
    dp4 r9.z, r5.xyzw, cb1[r4.w + 342].xyzw
    dp4 r9.w, r5.xyzw, cb1[r4.w + 343].xyzw
    lt r10.xy, r9.wwww, |r9.xyxx|
    or r10.x, r10.y, r10.x
    lt r10.y, r9.w, l(0.000000)
    or r10.x, r10.y, r10.x
    if_nz r10.x
      mov r10.yz, l(0,0,0,0)
      mov r11.x, l(0)
    else
      div r11.xyz, r9.zxyz, r9.wwww
      mad r10.yz, r11.yyzy, cb1[r4.w + 347].xxyx, cb1[r4.w + 347].zzwz
    endif
    ige r9.x, r10.x, l(0)
    if_nz r9.x
      mul r9.x, r11.x, cb1[r4.w + 351].z
      mul r9.y, cb1[r4.w + 351].y, cb1[r4.w + 351].w
      mad r9.x, r9.x, cb1[r4.w + 351].y, r9.y
      rcp r9.x, r9.x
      sample_l_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r9.y, r10.yzyy, t4.yxzw, s3, l(0.000000)
      mad r9.x, r9.x, l(-2.000000), l(-1.000000)
      mul r9.x, r9.x, l(60.593193)
      exp r9.x, r9.x
      div r9.x, r9.y, r9.x
      mad_sat r9.x, r9.x, l(11.000000), l(-10.000000)
    else
      mov r9.x, l(1.000000)
    endif
    add_sat r4.w, r9.x, cb1[r4.w + 352].y
    mul r2.w, r2.w, r4.w
    mul r9.xyz, r2.wwww, cb1[r1.z + 246].xyzx
    ige r2.w, cb1[r1.z + 248].x, l(0)
    if_nz r2.w
      ishl r2.w, cb1[r1.z + 248].x, l(2)
      mov r10.x, x0[r2.w + 0].x
      mov r11.x, x0[r2.w + 1].x
      mov r12.x, x0[r2.w + 3].x
      mov r10.y, x0[r2.w + 0].y
      mov r11.y, x0[r2.w + 1].y
      mov r12.y, x0[r2.w + 3].y
      mov r10.z, x0[r2.w + 0].z
      mov r11.z, x0[r2.w + 1].z
      mov r12.z, x0[r2.w + 3].z
      mov r10.w, x0[r2.w + 0].w
      mov r11.w, x0[r2.w + 1].w
      mov r12.w, x0[r2.w + 3].w
      dp4 r10.x, r5.xyzw, r10.xyzw
      dp4 r10.y, r5.xyzw, r11.xyzw
      dp4 r2.w, r5.xyzw, r12.xyzw
      div r10.xy, r10.xyxx, r2.wwww
      sample_l_indexable(texture2d)(float,float,float,float) r11.xyz, r10.xyxx, t8.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r12.xyz, r10.xyxx, t9.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r13.xyz, r10.xyxx, t10.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r10.xyz, r10.xyxx, t11.xyzw, s1, l(0.000000)
      ieq r17.xyz, l(1, 2, 3, 0), cb1[r1.z + 248].xxxx
      movc r11.xyz, r17.xxxx, r12.xyzx, r11.xyzx
      movc r11.xyz, r17.yyyy, r13.xyzx, r11.xyzx
      movc r10.xyz, r17.zzzz, r10.xyzx, r11.xyzx
      mul r9.xyz, r9.xyzx, r10.xyzx
    endif
    mad r6.xyzw, r3.xyzw, r9.xxxx, r6.xyzw
    mad r7.xyzw, r3.xyzw, r9.yyyy, r7.xyzw
    mad r8.xyzw, r3.xyzw, r9.zzzz, r8.xyzw
  endif
  iadd r1.y, r1.y, l(1)
endloop
mov r3.w, l(1.000000)
mov r9.xyzw, r6.xyzw
mov r10.xyzw, r7.xyzw
mov r11.xyzw, r8.xywz
mov r1.x, l(0)
loop
  uge r1.y, r1.x, cb1[2].y
  breakc_nz r1.y
  ishl r1.z, l(1), r1.x
  and r1.z, r1.z, cb4[0].w
  if_z r1.z
    iadd r1.z, r1.x, l(1)
    mov r1.x, r1.z
    continue
  endif
  if_nz r1.y
    break
  endif
  imul null, r1.y, r1.x, l(6)
  add r12.xyz, -r5.xyzx, cb1[r1.y + 52].xyzx
  dp3 r1.z, r12.xyzx, r12.xyzx
  rsq r2.w, r1.z
  mul r3.xyz, r2.wwww, r12.xyzx
  add r4.w, r1.z, -cb1[r1.y + 52].w
  max r4.w, r4.w, l(0.001000)
  rcp r4.w, r4.w
  mad r4.w, cb1[r1.y + 52].w, r4.w, l(1.000000)
  rsq r4.w, r4.w
  add r4.w, -r4.w, l(1.000000)
  mul r4.w, r4.w, l(6.28318548)
  mul r12.x, r1.z, r1.z
  mad_sat r12.x, -r12.x, cb1[r1.y + 53].w, l(1.000000)
  mul r12.x, r12.x, r12.x
  mul r4.w, r4.w, r12.x
  dp3_sat r12.x, cb1[r1.y + 53].xyzx, r3.xyzx
  add_sat r12.x, r12.x, -cb1[r1.y + 55].y
  mul_sat r12.x, r12.x, cb1[r1.y + 55].x
  mul r12.y, r12.x, r12.x
  mad r12.x, -r12.x, l(2.000000), l(3.000000)
  mul r12.x, r12.x, r12.y
  mul r4.w, r4.w, r12.x
  lt r12.x, l(0.000000), r4.w
  if_nz r12.x
    mul r1.z, r1.z, r2.w
    ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r2.w, cb1[r1.y + 55].z, l(0), t12.xxxx
    mul r2.w, r1.z, -r2.w
    exp r2.w, r2.w
    mad_sat r1.z, r1.z, cb1[r1.y + 56].z, -cb1[r1.y + 56].y
    log r1.z, r1.z
    mul r1.z, r1.z, cb1[r1.y + 56].w
    exp r1.z, r1.z
    mul r2.w, r2.w, r4.w
    mul r1.z, r1.z, r2.w
    mul r1.z, r1.z, l(0.0795774683)
    mul r12.xyz, r1.zzzz, cb1[r1.y + 54].xyzx
    ige r1.z, cb1[r1.y + 56].x, l(0)
    if_nz r1.z
      ishl r1.z, cb1[r1.y + 56].x, l(2)
      mov r13.x, x0[r1.z + 0].x
      mov r14.x, x0[r1.z + 1].x
      mov r15.x, x0[r1.z + 3].x
      mov r13.y, x0[r1.z + 0].y
      mov r14.y, x0[r1.z + 1].y
      mov r15.y, x0[r1.z + 3].y
      mov r13.z, x0[r1.z + 0].z
      mov r14.z, x0[r1.z + 1].z
      mov r15.z, x0[r1.z + 3].z
      mov r13.w, x0[r1.z + 0].w
      mov r14.w, x0[r1.z + 1].w
      mov r15.w, x0[r1.z + 3].w
      dp4 r13.x, r5.xyzw, r13.xyzw
      dp4 r13.y, r5.xyzw, r14.xyzw
      dp4 r1.z, r5.xyzw, r15.xyzw
      div r13.xy, r13.xyxx, r1.zzzz
      sample_l_indexable(texture2d)(float,float,float,float) r14.xyz, r13.xyxx, t8.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r15.xyz, r13.xyxx, t9.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r16.xyz, r13.xyxx, t10.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r13.xyz, r13.xyxx, t11.xyzw, s1, l(0.000000)
      ieq r17.xyz, l(1, 2, 3, 0), cb1[r1.y + 56].xxxx
      movc r14.xyz, r17.xxxx, r15.xyzx, r14.xyzx
      movc r14.xyz, r17.yyyy, r16.xyzx, r14.xyzx
      movc r13.xyz, r17.zzzz, r13.xyzx, r14.xyzx
      mul r12.xyz, r12.xyzx, r13.xyzx
    endif
    mad r9.xyzw, r3.xyzw, r12.xxxx, r9.xyzw
    mad r10.xyzw, r3.xyzw, r12.yyyy, r10.xyzw
    mad r11.xyzw, r3.xywz, r12.zzzz, r11.xyzw
  endif
  iadd r1.x, r1.x, l(1)
endloop
mul r3.xyzw, r10.xyzw, l(0.587000, 0.587000, 0.587000, 0.587000)
mad r3.xyzw, r9.xyzw, l(0.299000, 0.299000, 0.299000, 0.299000), r3.xyzw
mad r3.xyzw, r11.xywz, l(0.114000, 0.114000, 0.114000, 0.114000), r3.xyzw
rcp r1.x, r3.w
mul r5.xyz, r1.xxxx, r3.xyzx
mov r11.xw, r9.wwww
mov r11.y, r10.w
add r2.xyzw, r2.xyzx, -r11.wyzw
mad r2.xyzw, r1.wwww, r2.xyzw, r11.xyzw
store_uav_typed u8.xyzw, r0.xyww, r2.xyzw
mad r1.xyz, -r3.xyzx, r1.xxxx, r4.xyzx
mad r1.xyz, r1.wwww, r1.xyzx, r5.xyzx
mov r1.w, l(1.000000)
store_uav_typed u10.xyzw, r0.xyzw, r1.xyzw
ret
// Approximately 639 instruction slots used
