//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__volumetricFogDensityData
// {
//
//   struct VolumetricFogDensityData
//   {
//
//       struct AtmosphericConstants
//       {
//
//           float3 cFogColor;          // Index:    0
//           float cHeightFalloff;      // Index:    0.w
//           float3 cEyePosition;       // Index:    1
//           float cHeightDensity;      // Index:    1.w
//           float cStartDistance;      // Index:    2
//           float cGlobalDensity;      // Index:    2.y
//           float cDepthReprojectScale;// Index:    2.z
//           float cDepthReprojectBias; // Index:    2.w
//           float4x4 cInvProjNoZReproj;// Index:    3
//           float3 cDirectionalFogDirection;// Index:    7
//           float cDirectionalityPower;// Index:    7.w
//           float3 cDirectionalFogColor;// Index:    8
//           float cDensityMapSparseBias;// Index:    8.w
//           float3 cDensityMapInvExtents;// Index:    9
//           float cDensityMapSparseSegmentScale;// Index:    9.w
//           float3 cDensityMapBias;    // Index:   10
//           float cDensityMapSparseCutoff;// Index:   10.w
//           float cVolFogExponentMultiply;// Index:   11
//           float cVolFogDistanceMultiply;// Index:   11.y
//           float cVolFogExponentNormalize;// Index:   11.z
//           float cVolFogDistanceNormalize;// Index:   11.w
//           float cVolFogResolutionScale;// Index:   12
//           int cVolFogWidth;          // Index:   12.y
//           int cVolFogHeight;         // Index:   12.z
//           int cVolFogDepth;          // Index:   12.w
//
//       } atmosphericConstants;        // Index:    0
//
//       struct FogDensityMapConstants
//       {
//
//           float4x4 cMatrix;          // Index:   13
//           float cStartDistance;      // Index:   17
//           float cStartDistanceRcp;   // Index:   17.y
//           float cFogVerticalAttenuation;// Index:   17.z
//           float cDensityHeightStart; // Index:   17.w
//           float cDensityHeightScale; // Index:   18
//           float cGlobalDensityScale; // Index:   18.y
//           float cVolumetricFogScattering;// Index:   18.z
//           float cFlowMap0Scale;      // Index:   18.w
//           float cFlowMap1Scale;      // Index:   19
//           float cFlowMap0Weight;     // Index:   19.y
//           float cFlowMap1Weight;     // Index:   19.z
//           int cFlowMapEnabled;       // Index:   19.w
//           float cLocalWeight;        // Index:   20
//
//       } fogDensityMapConstants;      // Index:   13
//       float cStartDistance;          // Index:   20.y
//       float cStartDistanceRcp;       // Index:   20.z
//       float cVolumetricFogScattering;// Index:   20.w
//       float cVolumetricFogAbsorption;// Index:   21
//       float cFogVerticalAttenuation; // Index:   21.y
//       float3 cWorldEyePos;           // Index:   22
//       float cVerticalFalloffRelativePosTimesAttenuation;// Index:   22.w
//       float cVerticalFalloffRelativePos;// Index:   23
//       float cVolumetricFogTransmittanceFade;// Index:   23.y
//
//   } resourceTables__volumetricFogDensityData;// Index:    0-23.y           Components:    94
                                        // Textures:  t12-t15
//
// }
//
// 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__volumetricFogDensityData__smpLinearBorder    sampler      NA          NA    7        1
// resourceTables__giVolumeConstants__giSampler    sampler      NA          NA   10        1
// resourceTables__volumetricFogData.LightTextureAccum    texture  float3          3d    0        1
// resourceTables__volumetricFogData.OpticalDensityTextureAccum    texture  float2          3d    1        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__volumetricFogDensityData.PC_ParticleDensityTexture    texture   float          3d   14        1
// resourceTables__volumetricFogDensityData.PC_ParticleScatterTexture    texture   float          3d   15        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.OutOpticalDensityTexture        UAV  float2          3d    9        1
// resourceTables__volumetricFogData.OutDirectionTexture        UAV  float4          3d   10        1
// ConstBuf__volumetricFogData       cbuffer      NA          NA    0        1
// ConstBuf__lightConstants          cbuffer      NA          NA    1        1
// ConstBuf__volumetricFogDensityData    cbuffer      NA          NA    2        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 cb2[23], immediateIndexed
dcl_constantbuffer cb3[137], immediateIndexed
dcl_constantbuffer cb4[1], immediateIndexed
dcl_constantbuffer cb12[3], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s3, mode_default
dcl_sampler s7, mode_default
dcl_sampler s10, mode_default
dcl_resource_texture3d (float,float,float,float) t0
dcl_resource_texture3d (float,float,float,float) t1
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) t14
dcl_resource_texture3d (float,float,float,float) t15
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) u9
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.y, r2.x, cb0[92].w
mul_sat r1.w, r1.w, l(1000.000000)
mul r2.y, r1.w, r2.y
mul r2.x, r2.x, cb0[93].x
mul r1.w, r1.w, r2.x
sample_l_indexable(texture3d)(float,float,float,float) r2.xzw, r4.xyzx, t0.xwyz, s3, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r5.xyz, r4.xyzx, t2.xyzw, s3, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r4.xy, r4.xyzx, t1.xyzw, s3, l(0.000000)
mov r3.w, vThreadIDInGroupFlattened.x
add r1.xyz, r1.xyzx, cb0[r3.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 r6.x, r3.xyzw, cb0[64].xyzw
dp4 r6.y, r3.xyzw, cb0[65].xyzw
dp4 r6.z, r3.xyzw, cb0[66].xyzw
add r1.xyz, r6.xyzx, -cb0[72].xyzx
dp3 r1.x, r1.xyzx, r1.xyzx
max r1.x, r1.x, l(0.000001)
rsq r1.y, r1.x
mul r1.x, r1.y, r1.x
mad_sat r1.x, r1.x, cb2[20].z, l(-1.000000)
mad r1.y, -r6.y, cb2[21].y, cb2[22].w
exp r1.y, r1.y
min r1.y, r1.y, l(1.000000)
mul r1.x, r1.y, r1.x
mul r3.xzw, r1.xxxx, cb2[20].wwww
mul r3.y, r1.x, cb2[21].x
mad r1.xyz, r6.xyzx, cb2[9].xyzx, cb2[10].xyzx
lt r7.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r1.xyzx
lt r8.xyz, r1.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
iadd r7.xyz, -r7.xyzx, r8.xyzx
itof r7.xyz, r7.xyzx
mul r7.xyz, r7.xyzx, cb2[8].wwww
mad r7.xyz, cb2[9].wwww, r1.xyzx, r7.xyzx
lt r8.xyz, |r1.xyzx|, cb2[10].wwww
movc r1.xyz, r8.xyzx, r1.xyzx, r7.xyzx
mad r1.xyz, r1.xyzx, l(0.496093750, 0.496093750, 0.496093750, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r4.z, r1.xyzx, t15.yzxw, s7, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r7.y, r1.xyzx, t14.yxzw, s7, l(0.000000)
mov r7.xzw, r4.zzzz
add_sat r7.xyzw, r7.xyzw, l(-1.000000, -1.000000, -1.000000, -1.000000)
mad r3.xyzw, r7.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), r3.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 r7.w, l(0.282094806), cb3[2].x
ilt r1.x, l(0), cb3[0].x
if_nz r1.x
  mul r1.xyz, r6.yyyy, cb3[58].xzyx
  mad r1.xyz, cb3[57].xzyx, r6.xxxx, r1.xyzx
  mad r1.xyz, cb3[59].xzyx, r6.zzzz, r1.xyzx
  add r1.xyz, r1.xyzx, cb3[60].xzyx
  lt r8.xyz, |r1.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
  and r4.z, r8.y, r8.x
  and r4.z, r8.z, r4.z
  if_nz r4.z
    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 r8.xyz, cb3[64].xyzx
      mul r8.xyz, r1.xyzx, r8.xyzx
      ftoi r9.xyz, r8.xyzx
      mov r9.w, l(0)
      ld_indexable(texture3d)(float,float,float,float) r9.xyzw, r9.xyzw, t18.xyzw
      mul r10.xyzw, r9.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
      frc r4.w, r10.z
      mad r10.x, r4.w, l(4.000000), r10.x
      mad r10.z, r9.z, l(63.750000), -r4.w
      frc r8.xyz, r8.xyzx
      mad r8.xyz, r8.xyzx, r10.wwww, r10.xyzx
      add r8.xyz, r8.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      utof r9.xyz, cb3[66].xyzx
      div r1.xyz, r8.xyzx, r9.xyzx
    endif
    sample_l_indexable(texture3d)(float,float,float,float) r8.xyzw, r1.xyzx, t22.xyzw, s10, l(0.000000)
    mul r8.xyzw, r8.xyzw, cb3[75].xyzw
    mul r7.xyzw, r8.xyzw, l(0.282094806, 0.282094806, 0.282094806, 0.282094806)
  else
    mov r7.xyz, l(0,0,0,0)
  endif
  ige r1.x, l(1), cb3[0].x
  or r1.x, r4.z, r1.x
  if_z r1.x
    mul r8.xyz, r6.yyyy, cb3[78].xzyx
    mad r8.xyz, cb3[77].xzyx, r6.xxxx, r8.xyzx
    mad r8.xyz, cb3[79].xzyx, r6.zzzz, r8.xyzx
    add r8.xyz, r8.xyzx, cb3[80].xzyx
    lt r9.xyz, |r8.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r1.y, r9.y, r9.x
    and r1.y, r9.z, r1.y
    if_nz r1.y
      add r8.xyz, r8.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      and r1.y, l(1), cb3[96].x
      if_nz r1.y
        utof r9.xyz, cb3[84].xyzx
        mul r9.xyz, r8.xyzx, r9.xyzx
        ftoi r10.xyz, r9.xyzx
        mov r10.w, l(0)
        ld_indexable(texture3d)(float,float,float,float) r10.xyzw, r10.xyzw, t19.xyzw
        mul r11.xyzw, r10.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
        frc r1.y, r11.z
        mad r11.x, r1.y, l(4.000000), r11.x
        mad r11.z, r10.z, l(63.750000), -r1.y
        frc r9.xyz, r9.xyzx
        mad r9.xyz, r9.xyzx, r11.wwww, r11.xyzx
        add r9.xyz, r9.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
        utof r10.xyz, cb3[86].xyzx
        div r8.xyz, r9.xyzx, r10.xyzx
      endif
      sample_l_indexable(texture3d)(float,float,float,float) r8.xyzw, r8.xyzx, t23.xyzw, s10, l(0.000000)
      mul r8.xyzw, r8.xyzw, cb3[95].xyzw
      mul r7.xyzw, r8.xyzw, l(0.282094806, 0.282094806, 0.282094806, 0.282094806)
      mov r4.z, l(-1)
    else
      mov r4.z, l(0)
    endif
  endif
else
  mov r7.xyz, l(0,0,0,0)
  mov r4.z, l(0)
  mov r1.x, l(-1)
endif
if_z r1.x
  ige r1.x, l(2), cb3[0].x
  or r1.x, r4.z, r1.x
  if_z r1.x
    mul r8.xyz, r6.yyyy, cb3[98].xzyx
    mad r8.xyz, cb3[97].xzyx, r6.xxxx, r8.xyzx
    mad r8.xyz, cb3[99].xzyx, r6.zzzz, r8.xyzx
    add r8.xyz, r8.xyzx, cb3[100].xzyx
    lt r9.xyz, |r8.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r1.y, r9.y, r9.x
    and r4.z, r9.z, r1.y
    if_nz r4.z
      add r8.xyz, r8.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      and r1.y, l(1), cb3[116].x
      if_nz r1.y
        utof r9.xyz, cb3[104].xyzx
        mul r9.xyz, r8.xyzx, r9.xyzx
        ftoi r10.xyz, r9.xyzx
        mov r10.w, l(0)
        ld_indexable(texture3d)(float,float,float,float) r10.xyzw, r10.xyzw, t20.xyzw
        mul r11.xyzw, r10.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
        frc r1.y, r11.z
        mad r11.x, r1.y, l(4.000000), r11.x
        mad r11.z, r10.z, l(63.750000), -r1.y
        frc r9.xyz, r9.xyzx
        mad r9.xyz, r9.xyzx, r11.wwww, r11.xyzx
        add r9.xyz, r9.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
        utof r10.xyz, cb3[106].xyzx
        div r8.xyz, r9.xyzx, r10.xyzx
      endif
      sample_l_indexable(texture3d)(float,float,float,float) r8.xyzw, r8.xyzx, t24.xyzw, s10, l(0.000000)
      mul r8.xyzw, r8.xyzw, cb3[115].xyzw
      mul r7.xyzw, r8.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, r4.z, r1.x
  if_z r1.x
    mul r1.xyz, r6.yyyy, cb3[118].xzyx
    mad r1.xyz, cb3[117].xzyx, r6.xxxx, r1.xyzx
    mad r1.xyz, cb3[119].xzyx, r6.zzzz, r1.xyzx
    add r1.xyz, r1.xyzx, cb3[120].xzyx
    lt r8.xyz, |r1.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r4.z, r8.y, r8.x
    and r4.z, r8.z, r4.z
    if_nz r4.z
      add r1.xyz, r1.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      and r4.z, l(1), cb3[136].x
      if_nz r4.z
        utof r8.xyz, cb3[124].xyzx
        mul r8.xyz, r1.xyzx, r8.xyzx
        ftoi r9.xyz, r8.xyzx
        mov r9.w, l(0)
        ld_indexable(texture3d)(float,float,float,float) r9.xyzw, r9.xyzw, t21.xyzw
        mul r10.xyzw, r9.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
        frc r4.z, r10.z
        mad r10.x, r4.z, l(4.000000), r10.x
        mad r10.z, r9.z, l(63.750000), -r4.z
        frc r8.xyz, r8.xyzx
        mad r8.xyz, r8.xyzx, r10.wwww, r10.xyzx
        add r8.xyz, r8.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
        utof r9.xyz, cb3[126].xyzx
        div r1.xyz, r8.xyzx, r9.xyzx
      endif
      sample_l_indexable(texture3d)(float,float,float,float) r8.xyzw, r1.xyzx, t25.xyzw, s10, l(0.000000)
      mul r8.xyzw, r8.xyzw, cb3[135].xyzw
      mul r7.xyzw, r8.xyzw, l(0.282094806, 0.282094806, 0.282094806, 0.282094806)
    endif
  endif
endif
mul r1.x, r7.w, l(0.282094806)
mul r8.x, r1.x, cb3[21].x
mul r8.y, r1.x, cb3[22].x
mul r8.z, r1.x, cb3[23].x
add r1.xyz, r7.xyzx, r8.xyzx
mul r7.xyzw, r1.xxyy, l(0.000000, 1.000000, 0.000000, 1.000000)
mul r8.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 r6.w, l(1.000000)
dp4 r9.x, r6.xyzw, cb1[548].xyzw
dp4 r9.y, r6.xyzw, cb1[549].xyzw
dp4 r1.y, r6.xyzw, cb1[550].xyzw
dp4 r1.z, r6.xyzw, cb1[551].xyzw
div r4.zw, r9.xxxy, r1.zzzz
lt r9.xy, l(1.000000, 1.000000, 0.000000, 0.000000), |r4.zwzz|
or r5.w, r9.y, r9.x
max r9.x, |r4.w|, |r4.z|
mad r9.x, r9.x, l(1.05263162), l(-1.000000)
mul_sat r9.x, r9.x, l(20.000000)
movc r9.x, r5.w, l(0), r9.x
mad r4.zw, r4.zzzw, l(0.000000, 0.000000, 0.500000, -0.500000), l(0.000000, 0.000000, 0.500000, 0.500000)
sample_l_indexable(texture2d)(float,float,float,float) r10.xyzw, r4.zwzz, t5.xyzw, s3, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r11.xyzw, r4.zwzz, 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 r4.z, r1.z
ilt r4.w, r4.z, l(7)
iadd r9.y, r4.z, l(1)
movc r4.w, r4.w, r9.y, l(7)
mad r1.y, r1.y, l(8.000000), -r1.z
mov r12.w, l(1.000000)
mov r13.z, l(1.000000)
mov r14.z, l(1.000000)
mov r15.z, l(1.000000)
mov r16.xyzw, r7.xxxy
mov r17.xyzw, r7.zzzw
mov r18.xyzw, r8.xyzw
mov r1.z, l(0)
loop
  uge r9.y, r1.z, cb1[2].w
  breakc_nz r9.y
  ult r9.y, r1.z, cb1[3].x
  if_nz r9.y
    imul null, r9.y, r1.z, l(13)
    dp4 r19.x, r6.xyzw, cb1[r9.y + 26].xyzw
    dp4 r19.y, r6.xyzw, cb1[r9.y + 27].xyzw
    dp4 r19.z, r6.xyzw, cb1[r9.y + 28].xyzw
    lt r9.z, r19.z, l(0.000000)
    lt r9.w, l(1.000000), r19.z
    or r9.z, r9.w, r9.z
    if_z r9.z
      mov r13.x, cb1[r9.y + 30].x
      mad r13.xyw, r19.xyxz, r13.xxxz, cb1[r9.y + 30].yzyw
      mov r14.x, cb1[r9.y + 31].x
      mad r14.xyw, r19.xyxz, r14.xxxz, cb1[r9.y + 31].yzyw
      mov r15.x, cb1[r9.y + 32].x
      mad r15.xyw, r19.xyxz, r15.xxxz, cb1[r9.y + 32].yzyw
      lt r20.xy, |r19.xyxx|, r1.xxxx
      and r9.w, r20.y, r20.x
      lt r20.xy, |r13.xyxx|, r1.xxxx
      and r19.w, r20.y, r20.x
      lt r20.xy, |r14.xyxx|, r1.xxxx
      and r20.x, r20.y, r20.x
      lt r20.yz, |r15.xxyx|, r1.xxxx
      and r20.y, r20.z, r20.y
      mad r15.xy, r15.xyxx, cb1[r9.y + 36].xyxx, cb1[r9.y + 36].zwzz
      mad r14.xy, r14.xyxx, cb1[r9.y + 35].xyxx, cb1[r9.y + 35].zwzz
      movc r14.xyw, r20.xxxx, r14.xyxw, r15.xyxw
      mad r13.xy, r13.xyxx, cb1[r9.y + 34].xyxx, cb1[r9.y + 34].zwzz
      movc r13.xyw, r19.wwww, r13.xyxw, r14.xyxw
      mad r19.xy, r19.xyxx, cb1[r9.y + 33].xyxx, cb1[r9.y + 33].zwzz
      movc r13.xyw, r9.wwww, r19.xyxz, r13.xyxw
      movc r14.x, r20.y, l(3), l(-1)
      movc r14.x, r20.x, l(2), r14.x
      movc r14.x, r19.w, l(1), r14.x
      movc r9.w, r9.w, l(0), r14.x
    else
      mov r13.xyw, l(0,0,0,0)
      mov r9.w, l(0)
    endif
    ige r9.w, r9.w, l(0)
    movc r9.z, r9.z, l(0), r9.w
    if_nz r9.z
      add r9.z, -r13.w, l(1.000000)
      sample_l_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r9.w, r13.xyxx, t4.yzwx, s3, l(0.000000)
      mad r9.z, r9.z, l(2.000000), l(-1.000000)
      mul r9.z, r9.z, l(60.593193)
      exp r9.z, r9.z
      div r9.z, r9.w, r9.z
      mad_sat r9.z, r9.z, l(11.000000), l(-10.000000)
    else
      mov r9.z, l(1.000000)
    endif
    add_sat r9.y, r9.z, cb1[r9.y + 38].y
    if_nz r5.w
      mov r9.z, l(1.000000)
    endif
    if_z r5.w
      mov x1[0].x, r10.x
      mov x1[1].x, r10.y
      mov x1[2].x, r10.z
      mov x1[3].x, r10.w
      mov x1[4].x, r11.x
      mov x1[5].x, r11.y
      mov x1[6].x, r11.z
      mov x1[7].x, r11.w
      mov r9.w, x1[r4.z + 0].x
      mov r13.x, x1[r4.w + 0].x
      add r13.x, -r9.w, r13.x
      mad r9.w, r1.y, r13.x, r9.w
      exp r9.w, -r9.w
      add r9.w, r9.x, r9.w
      min r9.z, r9.w, l(1.000000)
    endif
    mul r9.y, r9.z, r9.y
  else
    mov r9.y, l(1.000000)
  endif
  lt r9.z, l(0.00392156886), r9.y
  if_nz r9.z
    imul null, r9.z, r1.z, l(3)
    mul r9.y, r9.y, cb1[r9.z + 21].w
    mul r9.y, r9.y, l(0.0795774683)
    mul r13.xyw, r9.yyyy, cb1[r9.z + 21].xyxz
    ige r9.y, cb1[r9.z + 22].z, l(0)
    if_nz r9.y
      ishl r9.y, cb1[r9.z + 22].z, l(2)
      mov r19.x, x0[r9.y + 0].x
      mov r20.x, x0[r9.y + 1].x
      mov r21.x, x0[r9.y + 3].x
      mov r19.y, x0[r9.y + 0].y
      mov r20.y, x0[r9.y + 1].y
      mov r21.y, x0[r9.y + 3].y
      mov r19.z, x0[r9.y + 0].z
      mov r20.z, x0[r9.y + 1].z
      mov r21.z, x0[r9.y + 3].z
      mov r19.w, x0[r9.y + 0].w
      mov r20.w, x0[r9.y + 1].w
      mov r21.w, x0[r9.y + 3].w
      dp4 r14.x, r6.xyzw, r19.xyzw
      dp4 r14.y, r6.xyzw, r20.xyzw
      dp4 r9.y, r6.xyzw, r21.xyzw
      div r9.yw, r14.xxxy, r9.yyyy
      sample_l_indexable(texture2d)(float,float,float,float) r14.xyw, r9.ywyy, t8.xywz, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r15.xyw, r9.ywyy, t9.xywz, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r19.xyz, r9.ywyy, t10.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r20.xyz, r9.ywyy, t11.xyzw, s1, l(0.000000)
      ieq r21.xyz, l(1, 2, 3, 0), cb1[r9.z + 22].zzzz
      movc r14.xyw, r21.xxxx, r15.xyxw, r14.xyxw
      movc r14.xyw, r21.yyyy, r19.xyxz, r14.xyxw
      movc r14.xyw, r21.zzzz, r20.xyxz, r14.xyxw
      mul r13.xyw, r13.xyxw, r14.xyxw
    endif
    mov r12.xyz, cb1[r9.z + 20].xyzx
    mad r16.xyzw, r12.xyzw, r13.xxxx, r16.xyzw
    mad r17.xyzw, r12.xyzw, r13.yyyy, r17.xyzw
    mad r18.xyzw, r12.xyzw, r13.wwww, r18.xyzw
  endif
  iadd r1.z, r1.z, l(1)
endloop
mov r7.w, l(1.000000)
mov r8.xyzw, r16.xyzw
mov r9.xyzw, r17.xyzw
mov r10.xyzw, r18.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 r11.xyz, -r6.xyzx, cb1[r1.y + 52].xyzx
  dp3 r1.z, r11.xyzx, r11.xyzx
  rsq r4.z, r1.z
  mul r7.xyz, r4.zzzz, r11.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 r5.w, r1.z, r1.z
  mad_sat r5.w, -r5.w, cb1[r1.y + 53].w, l(1.000000)
  mul r5.w, r5.w, r5.w
  mul r4.w, r4.w, r5.w
  dp3_sat r5.w, cb1[r1.y + 53].xyzx, r7.xyzx
  add_sat r5.w, r5.w, -cb1[r1.y + 55].y
  mul_sat r5.w, r5.w, cb1[r1.y + 55].x
  mul r11.x, r5.w, r5.w
  mad r5.w, -r5.w, l(2.000000), l(3.000000)
  mul r5.w, r5.w, r11.x
  mul r4.w, r4.w, r5.w
  lt r5.w, l(0.000000), r4.w
  if_nz r5.w
    mul r1.z, r1.z, r4.z
    ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r4.z, cb1[r1.y + 55].z, l(0), t12.xxxx
    mul r4.z, r1.z, -r4.z
    exp r4.z, r4.z
    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 r4.z, r4.z, r4.w
    mul r1.z, r1.z, r4.z
    mul r1.z, r1.z, l(0.0795774683)
    mul r11.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 r12.x, x0[r1.z + 0].x
      mov r13.x, x0[r1.z + 1].x
      mov r14.x, x0[r1.z + 3].x
      mov r12.y, x0[r1.z + 0].y
      mov r13.y, x0[r1.z + 1].y
      mov r14.y, x0[r1.z + 3].y
      mov r12.z, x0[r1.z + 0].z
      mov r13.z, x0[r1.z + 1].z
      mov r14.z, x0[r1.z + 3].z
      mov r12.w, x0[r1.z + 0].w
      mov r13.w, x0[r1.z + 1].w
      mov r14.w, x0[r1.z + 3].w
      dp4 r12.x, r6.xyzw, r12.xyzw
      dp4 r12.y, r6.xyzw, r13.xyzw
      dp4 r1.z, r6.xyzw, r14.xyzw
      div r4.zw, r12.xxxy, r1.zzzz
      sample_l_indexable(texture2d)(float,float,float,float) r12.xyz, r4.zwzz, t8.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r13.xyz, r4.zwzz, t9.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r14.xyz, r4.zwzz, t10.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r15.xyz, r4.zwzz, t11.xyzw, s1, l(0.000000)
      ieq r19.xyz, l(1, 2, 3, 0), cb1[r1.y + 56].xxxx
      movc r12.xyz, r19.xxxx, r13.xyzx, r12.xyzx
      movc r12.xyz, r19.yyyy, r14.xyzx, r12.xyzx
      movc r12.xyz, r19.zzzz, r15.xyzx, r12.xyzx
      mul r11.xyz, r11.xyzx, r12.xyzx
    endif
    mad r8.xyzw, r7.xyzw, r11.xxxx, r8.xyzw
    mad r9.xyzw, r7.xyzw, r11.yyyy, r9.xyzw
    mad r10.xyzw, r7.xywz, r11.zzzz, r10.xyzw
  endif
  iadd r1.x, r1.x, l(1)
endloop
mul r6.xyzw, r9.xyzw, l(0.587000, 0.587000, 0.587000, 0.587000)
mad r6.xyzw, r8.xyzw, l(0.299000, 0.299000, 0.299000, 0.299000), r6.xyzw
mad r6.xyzw, r10.xywz, l(0.114000, 0.114000, 0.114000, 0.114000), r6.xyzw
rcp r1.x, r6.w
mul r7.xyz, r1.xxxx, r6.xyzx
mov r10.xw, r8.wwww
mov r10.y, r9.w
add r8.xyzw, r2.xzwx, -r10.wyzw
mad r8.xyzw, r2.yyyy, r8.xyzw, r10.xyzw
store_uav_typed u8.xyzw, r0.xyww, r8.xyzw
mad r1.xyz, -r6.xyzx, r1.xxxx, r5.xyzx
mad r2.xyz, r2.yyyy, r1.xyzx, r7.xyzx
mov r2.w, l(1.000000)
store_uav_typed u10.xyzw, r0.xyww, r2.xyzw
add r2.xyzw, -r3.wyww, r4.xyxx
mad r1.xyzw, r1.wwww, r2.xyzw, r3.xyzw
store_uav_typed u9.xyzw, r0.xyzw, r1.xyzw
ret
// Approximately 548 instruction slots used
