//Volumetric fog CS over time.
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Thu Oct 06 20:29:10 2022
//
//
// Note: shader requires additional functionality:
//       64 UAV slots
//
//
// Buffer Definitions:
//
// cbuffer ConstBuf__globalData
// {
//
//   struct ParticleGPUGlobalData
//   {
//
//       struct ParticleGPUCameraData
//       {
//
//           float4x4 worldToCamera;    // Index:    0
//           float4x4 cameraToWorld;    // Index:    4
//           float4 cullPlanes[5];      // Index:    8
//           float nearPlane;           // Index:   13
//           float farPlane;            // Index:   13.y
//           float2 _pad;               // Index:   13.z
//
//       } cameras[11];                 // Index:    0
//       float3 windVolumeOffset;       // Index:  154
//       float3 windVolumeRatio;        // Index:  155
//       float3 ambientWind;            // Index:  156
//       uint flags;                    // Index:  156.w
//       float4x4 depthWorldToCamera;   // Index:  157
//       float4x4 depthWorldToProj;     // Index:  161
//
//       struct AtmosphericConstants
//       {
//
//           float3 cFogColor;          // Index:  165
//           float cHeightFalloff;      // Index:  165.w
//           float3 cEyePosition;       // Index:  166
//           float cHeightDensity;      // Index:  166.w
//           float cStartDistance;      // Index:  167
//           float cGlobalDensity;      // Index:  167.y
//           float cDepthReprojectScale;// Index:  167.z
//           float cDepthReprojectBias; // Index:  167.w
//           float4x4 cInvProjNoZReproj;// Index:  168
//           float3 cDirectionalFogDirection;// Index:  172
//           float cDirectionalityPower;// Index:  172.w
//           float3 cDirectionalFogColor;// Index:  173
//           float cDensityMapSparseBias;// Index:  173.w
//           float3 cDensityMapInvExtents;// Index:  174
//           float cDensityMapSparseSegmentScale;// Index:  174.w
//           float3 cDensityMapBias;    // Index:  175
//           float cDensityMapSparseCutoff;// Index:  175.w
//           float cVolFogExponentMultiply;// Index:  176
//           float cVolFogDistanceMultiply;// Index:  176.y
//           float cVolFogExponentNormalize;// Index:  176.z
//           float cVolFogDistanceNormalize;// Index:  176.w
//           float cVolFogResolutionScale;// Index:  177
//           int cVolFogWidth;          // Index:  177.y
//           int cVolFogHeight;         // Index:  177.z
//           int cVolFogDepth;          // Index:  177.w
//
//       } atmosphericConstants;        // Index:  165
//
//   } resourceTables__globalData;      // Index:    0-177            Components:   712
                                        // Textures:  t0-t10
//
// }
//
// Resource bind info for resourceTables__globalData.systemData
// {
//
//   struct ParticleGPUSystemData
//   {
//
//       float4x4 cSystemToWorld;       // Index:    0
//       uint cameraID;                 // Index:    4
//       uint cDrawArgStart;            // Index:    4.y
//       float4 textureFlipbookVecs[10];// Index:    4.z
//       float3 cSpriteCenter;          // Index:   14.z
//       float3 cSpriteSize;            // Index:   15.y
//       float3 cSpriteSizeRandom;      // Index:   16
//       float2 cUVScale;               // Index:   16.w
//       float2 cUVOffset;              // Index:   17.y
//       float2 cUVScroll;              // Index:   17.w
//       uint cRibbonUVMode;            // Index:   18.y
//       float cTimeStep;               // Index:   18.z
//       uint cFlags;                   // Index:   18.w
//       float cLifeTime;               // Index:   19
//       float cLifeTimeRandom;         // Index:   19.y
//       float cFogDensityStrength;     // Index:   19.z
//       float cAge;                    // Index:   19.w
//       uint systemRandom;             // Index:   20
//       uint cAlignMode;               // Index:   20.y
//       uint cSecondaryAlignMode;      // Index:   20.z
//       uint cBlendMode;               // Index:   20.w
//       float cAngleFadeRate;          // Index:   21
//       float cSoftDistance;           // Index:   21.y
//       float cSoftDistanceInverse;    // Index:   21.z
//       float cVelocityScale;          // Index:   21.w
//       float cVelocityScaleClamp;     // Index:   22
//       float cExternalScale;          // Index:   22.y
//       float cSpriteRotation;         // Index:   22.z
//       float cSpriteCameraOffset;     // Index:   22.w
//       float cStaticTwist;            // Index:   23
//       float cTwistSpeed;             // Index:   23.y
//       uint cTwistDirection;          // Index:   23.z
//       float cMaxExtent;              // Index:   23.w
//       float cColorModulate;          // Index:   24
//       float cColorRandom;            // Index:   24.y
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   24.z
//           float end;                 // Index:   24.w
//           uint type;                 // Index:   25
//           float alpha;               // Index:   25.y
//           float jitter;              // Index:   25.z
//
//       } cParticleColorBlend;         // Index:   24.z
//       float4 cColorTintModulate;     // Index:   25.w
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   26.w
//           float end;                 // Index:   27
//           uint type;                 // Index:   27.y
//           float alpha;               // Index:   27.z
//           float jitter;              // Index:   27.w
//
//       } cNormalMapIntensity;         // Index:   26.w
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   28
//           float end;                 // Index:   28.y
//           uint type;                 // Index:   28.z
//           float alpha;               // Index:   28.w
//           float jitter;              // Index:   29
//
//       } cOpacity;                    // Index:   28
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   29.y
//           float end;                 // Index:   29.z
//           uint type;                 // Index:   29.w
//           float alpha;               // Index:   30
//           float jitter;              // Index:   30.y
//
//       } cOpacityTexturesExponent;    // Index:   29.y
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   30.z
//           float end;                 // Index:   30.w
//           uint type;                 // Index:   31
//           float alpha;               // Index:   31.y
//           float jitter;              // Index:   31.z
//
//       } cScale;                      // Index:   30.z
//       float cCameraScaleStartDistance;// Index:   31.w
//       float cCameraScaleStartValue;  // Index:   32
//       float cCameraScaleEndDistance; // Index:   32.y
//       float cCameraScaleEndValue;    // Index:   32.z
//       float cCameraOneOverEndMinusStart;// Index:   32.w
//       uint cFlipbookPageCount;       // Index:   33
//       float cFlipbookPageCycle;      // Index:   33.y
//       float cNearCull;               // Index:   33.z
//       float cFarCull;                // Index:   33.w
//       float cNearFade;               // Index:   34
//       float cFarFade;                // Index:   34.y
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   34.z
//           float end;                 // Index:   34.w
//           uint type;                 // Index:   35
//           float alpha;               // Index:   35.y
//           float jitter;              // Index:   35.z
//
//       } cDrag;                       // Index:   34.z
//       float3 cGravity;               // Index:   35.w
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   36.z
//           float end;                 // Index:   36.w
//           uint type;                 // Index:   37
//           float alpha;               // Index:   37.y
//           float jitter;              // Index:   37.z
//
//       } cGravityIntensity;           // Index:   36.z
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   37.w
//           float end;                 // Index:   38
//           uint type;                 // Index:   38.y
//           float alpha;               // Index:   38.z
//           float jitter;              // Index:   38.w
//
//       } cWindInfluenceOverLifeTime;  // Index:   37.w
//       float cMinDistance;            // Index:   39
//       float cMaxDistance;            // Index:   39.y
//       float3 cTurbulenceFrequency;   // Index:   39.z
//       float3 cTurbulenceAmplitude;   // Index:   40.y
//       float3 cTurbulencePhase;       // Index:   41
//       float3 cTurbulenceScrollSpeed; // Index:   41.w
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   42.z
//           float end;                 // Index:   42.w
//           uint type;                 // Index:   43
//           float alpha;               // Index:   43.y
//           float jitter;              // Index:   43.z
//
//       } cTurbulenceIntensity;        // Index:   42.z
//       uint cActiveFields;            // Index:   43.w
//
//       struct ParticleGPUFieldData
//       {
//
//           float3 position;           // Index:   44
//           float attenuation;         // Index:   44.w
//           float3 direction;          // Index:   45
//           float maxDistance;         // Index:   45.w
//           float magnitude;           // Index:   46
//           float _pad0;               // Index:   46.y
//           float _pad1;               // Index:   46.z
//           float _pad2;               // Index:   46.w
//
//       } cFields[4];                  // Index:   44
//       float cNewtonMinDistance;      // Index:   56
//       float cCollisionBounciness;    // Index:   56.y
//       float cCollisionBouncinessRandom;// Index:   56.z
//       float cCollisionRadius;        // Index:   56.w
//       float cDepthCollisionAgeThreshold;// Index:   57
//       float cDepthCollisionThreshold;// Index:   57.y
//       float cPlaneCollisionHeight;   // Index:   57.z
//       float3 emitterPosition;        // Index:   57.w
//       float3 emitterVelocity;        // Index:   58.z
//       float3 velocityDirectionWorld; // Index:   59.y
//       float3x3 emitterOrientation;   // Index:   60
//       float emitterDistance;         // Index:   62.y
//       float cMFXEventProbability;    // Index:   62.z
//       uint4 ramp1Indices[2];         // Index:   62.w
//       uint4 ramp3Indices;            // Index:   64.w
//       uint4 ramp1Constants[2];       // Index:   65.w
//       float4 ramp3Constants;         // Index:   67.w
//
//   } $Element;                        // Index:    0-68.z           Components:   275
//
// }
//
// Resource bind info for resourceTables__globalData.ramp3Data
// {
//
//   struct ParticleGPURamp3Data
//   {
//
//       float3 multiplier;             // Index:    0
//       float3 offset;                 // Index:    0.w
//
//   } $Element;                        // Index:    0-1.y            Components:     6
//
// }
//
// Resource bind info for resourceTables__jobData.simulationJobs
// {
//
//   struct ParticleGPUSimulationJob
//   {
//
//       uint flags;                    // Index:    0
//       uint batchIndex;               // Index:    0.y
//       uint systemIndex;              // Index:    0.z
//       float batchAge;                // Index:    0.w
//       uint usedCount;                // Index:    1
//       uint primStart;                // Index:    1.y
//       uint geoDataStart;             // Index:    1.z
//       uint aux0;                     // Index:    1.w
//       uint aux1;                     // Index:    2
//       uint readbackStart;            // Index:    2.y
//       uint drawCallBatchIndex;       // Index:    2.z
//
//   } $Element;                        // Index:    0-2.z            Components:    11
//
// }
//
// Resource bind info for resourceTables__globalData.positions
// {
//
//   float3 $Element;                   // Index:    0.xyz            Components:     3
//
// }
//
// Resource bind info for resourceTables__globalData.spawnTimes
// {
//
//   float $Element;                    // Index:    0.x              Components:     1
//
// }
//
// Resource bind info for resourceTables__globalData.velocities
// {
//
//   float3 $Element;                   // Index:    0.xyz            Components:     3
//
// }
//
// Resource bind info for resourceTables__globalData.lifeTimes
// {
//
//   float $Element;                    // Index:    0.x              Components:     1
//
// }
//
// Resource bind info for resourceTables__globalData.colors
// {
//
//   uint $Element;                     // Index:    0.x              Components:     1
//
// }
//
// Resource bind info for resourceTables__globalData.particleReadbackData
// {
//
//   struct ParticleGPUParticleReadbackData
//   {
//
//       float3 prevPosition;           // Index:    0
//       float3 position;               // Index:    0.w
//       uint flags;                    // Index:    1.z
//
//   } $Element;                        // Index:    0-1.z            Components:     7
//
// }
//
// Resource bind info for resourceTables__globalData.batchReadbackData
// {
//
//   struct ParticleGPUBatchReadbackData
//   {
//
//       uint particleCount;            // Index:    0
//       float3 boundsMin;              // Index:    0.y
//       float3 boundsMax;              // Index:    1
//
//   } $Element;                        // Index:    0-1.z            Components:     7
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// resourceTables__globalData__smpLinearClamp    sampler      NA          NA    0        1
// resourceTables__globalData.systemData    texture  struct         r/o    0        1
// resourceTables__globalData.ramp3Data    texture  struct         r/o    5        1
// resourceTables__globalData.ramp3Textures    texture  float3          2d    7        1
// resourceTables__globalData.windVolumeTexture    texture  float3          3d    8        1
// resourceTables__globalData.linearDepthTexture    texture   float          2d    9        1
// resourceTables__globalData.normalTexture    texture  float4          2d   10        1
// resourceTables__jobData.simulationJobs    texture  struct         r/o   11        1
// resourceTables__globalData.positions        UAV  struct         r/w    8        1
// resourceTables__globalData.spawnTimes        UAV  struct         r/w    9        1
// resourceTables__globalData.velocities        UAV  struct         r/w   10        1
// resourceTables__globalData.lifeTimes        UAV  struct         r/w   12        1
// resourceTables__globalData.colors        UAV  struct         r/w   13        1
// resourceTables__globalData.particleReadbackData        UAV  struct         r/w   25        1
// resourceTables__globalData.batchReadbackData        UAV  struct         r/w   26        1
// resourceTables__globalData.PC_ScatterMap        UAV    uint          3d   29        1
// resourceTables__globalData.PC_DensityMap        UAV    uint          3d   30        1
// ConstBuf__globalData              cbuffer      NA          NA    0        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[178], dynamicIndexed
dcl_sampler s0, mode_default
dcl_resource_structured t0, 1100
dcl_resource_structured t5, 24
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture3d (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t9
dcl_resource_texture2d (float,float,float,float) t10
dcl_resource_structured t11, 44
dcl_uav_structured u8, 12
dcl_uav_structured u9, 4
dcl_uav_structured u10, 12
dcl_uav_structured u12, 4
dcl_uav_structured u13, 4
dcl_uav_structured u25, 28
dcl_uav_structured u26, 28
dcl_uav_typed_texture3d (uint,uint,uint,uint) u29
dcl_uav_typed_texture3d (uint,uint,uint,uint) u30
dcl_input vThreadIDInGroupFlattened
dcl_input vThreadGroupID.x
dcl_temps 50
dcl_indexableTemp x0[2], 4
dcl_indexableTemp x1[2], 4
dcl_indexableTemp x2[2], 4
dcl_tgsm_structured g0, 4, 64
dcl_tgsm_raw g1, 8
dcl_tgsm_raw g2, 4
dcl_thread_group 64, 1, 1
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_structured_indexable(structured_buffer, stride=44)(mixed,mixed,mixed,mixed) r0.xyzw, vThreadGroupID.x, l(4), t11.xyzw
ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r1.xyzw, r0.y, l(0), t0.xyzw
ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r2.xyzw, r0.y, l(16), t0.xyzw
ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r3.xyzw, r0.y, l(32), t0.xywz
ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r4.xyzw, r0.y, l(296), t0.xyzw
ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r5.xyz, r0.y, l(312), t0.xyzx
ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r6.xyzw, r0.y, l(380), t0.xyzw
if_z vThreadIDInGroupFlattened.x
  store_raw g2.x, l(0), l(0)
endif
ult r0.w, vThreadIDInGroupFlattened.x, r0.w
if_nz r0.w
  and r7.xy, r4.yyyy, l(4096, 0x00010000, 0, 0)
  bfi r0.w, l(26), l(6), r0.x, vThreadIDInGroupFlattened.x
  xor r5.w, r0.w, l(61)
  ubfe r0.x, l(16), l(10), r0.x
  xor r0.x, r0.x, r5.w
  imul null, r0.x, r0.x, l(9)
  ushr r5.w, r0.x, l(4)
  xor r0.x, r0.x, r5.w
  imul null, r0.x, r0.x, l(0x27d4eb2d)
  ushr r5.w, r0.x, l(15)
  xor r0.x, r0.x, r5.w
  movc r0.x, r7.x, r5.z, r0.x
  ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r5.z, r0.w, l(0), u9.xxxx
  add r0.z, r0.z, -r5.z
  ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r5.z, r0.w, l(0), u12.xxxx
  lt r5.w, l(0.000000), r4.w
  mul r4.w, r4.w, r4.z
  utof r7.x, r0.x
  mad r7.z, r7.x, l(4.656612873E-010), l(-1.000000)
  mad r4.w, r4.w, r7.z, r4.z
  movc r4.z, r5.w, r4.w, r4.z
  movc r4.z, r7.y, r5.z, r4.z
  div_sat r4.z, r0.z, r4.z
  lt r5.z, r4.z, l(1.000000)
  if_nz r5.z
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r8.xyzw, r0.y, l(568), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r9.xyzw, r0.y, l(584), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r10.xyzw, r0.y, l(600), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r11.xyzw, r0.y, l(616), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r12.xyzw, r0.y, l(632), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r13.xyzw, r0.y, l(648), t0.zwxy
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r14.xyzw, r0.y, l(696), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r15.xyzw, r0.y, l(712), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r7.yzw, r0.y, l(728), t0.xyzx
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r16.xyzw, r0.y, l(752), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r17.xy, r0.y, l(780), t0.xyxx
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r18.xyzw, r0.y, l(800), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r19.xyzw, r0.y, l(816), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r5.w, r0.y, l(832), t0.xxxx
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r20.xyzw, r0.y, l(848), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r21.xyzw, r0.y, l(864), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r17.z, r0.y, l(880), t0.xxxx
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r22.xyzw, r0.y, l(896), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r23.xyzw, r0.y, l(912), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r24.xy, r0.y, l(928), t0.xyxx
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r25.x, r0.y, l(960), t0.xxxx
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r25.y, r0.y, l(976), t0.xxxx
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r25.z, r0.y, l(992), t0.xxxx
    ld_structured_indexable(structured_buffer, stride=44)(mixed,mixed,mixed,mixed) r17.w, vThreadGroupID.x, l(36), t11.xxxx
    ld_structured_indexable(structured_buffer, stride=12)(mixed,mixed,mixed,mixed) r26.xyz, r0.w, l(0), u8.xyzx
    ld_structured_indexable(structured_buffer, stride=12)(mixed,mixed,mixed,mixed) r27.xyz, r0.w, l(0), u10.xyzx
    min r0.z, r0.z, r4.x
    and r28.xyzw, r4.yyyy, l(1024, 1, 0x00200000, 2)
    if_nz r28.x
      ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r4.x, r0.y, l(1000), t0.xxxx
      mul r7.x, r7.x, l(2.328306437E-010)
      lt r4.x, r7.x, r4.x
      if_nz r4.x
        imm_atomic_iadd r29.x, g2, l(0), l(1)
        iadd r7.x, r17.w, r29.x
        store_structured u25.xyz, r7.x, l(0), r26.xyzx
        store_structured u25.x, r7.x, l(24), l(1)
      else
        mov r29.x, l(0)
      endif
    else
      mov r29.x, l(0)
      mov r4.x, l(0)
    endif
    lt r7.x, l(0.000000), r10.x
    ishl r24.w, r0.x, l(13)
    xor r24.w, r0.x, r24.w
    ushr r25.w, r24.w, l(17)
    xor r24.w, r24.w, r25.w
    ishl r25.w, r24.w, l(5)
    xor r24.w, r24.w, r25.w
    movc r24.w, r28.x, r24.w, r0.x
    utof r24.w, r24.w
    mad r24.w, r24.w, l(4.656612873E-010), l(-1.000000)
    and r25.w, r7.x, r24.w
    switch r9.z
      case l(0)
      mov r9.z, l(0)
      break
      case l(1)
      mov r9.z, r4.z
      break
      case l(2)
      lt r26.w, l(0.000010), |r9.w|
      lt r27.w, l(0.000000), r9.w
      lt r29.y, r9.w, l(0.000000)
      iadd r27.w, -r27.w, r29.y
      itof r27.w, r27.w
      mul r27.w, r27.w, l(0.000100)
      movc r26.w, r26.w, r9.w, r27.w
      mul r27.w, r4.z, r26.w
      exp r27.w, r27.w
      add r27.w, r27.w, l(-1.000000)
      exp r26.w, r26.w
      add r26.w, r26.w, l(-1.000000)
      div r26.w, l(1.000000, 1.000000, 1.000000, 1.000000), r26.w
      mul r26.w, r26.w, r27.w
      max r9.z, r26.w, l(0.000000)
      break
      case l(3)
      add r9.w, |r9.w|, l(6.000000)
      add r26.w, -r4.z, l(0.500000)
      mul r9.w, r9.w, r26.w
      exp r9.w, r9.w
      add r9.w, r9.w, l(1.000000)
      div r9.z, l(1.000000, 1.000000, 1.000000, 1.000000), r9.w
      break
      default
      mov r9.z, l(0)
      break
    endswitch
    add r9.y, -r9.x, r9.y
    mad r9.x, r9.z, r9.y, r9.x
    mul r9.y, r10.x, r9.x
    mad r9.y, r9.y, r25.w, r9.x
    movc r7.x, r7.x, r9.y, r9.x
    mul r8.yzw, r7.xxxx, r8.yyzw
    lt r7.x, l(0.000000), r0.z
    if_nz r7.x
      ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r9.xyzw, r0.y, l(552), t0.xyzw
      lt r10.x, l(0.000000), r8.x
      and r25.w, r24.w, r10.x
      switch r9.z
        case l(0)
        mov r9.z, l(0)
        break
        case l(1)
        mov r9.z, r4.z
        break
        case l(2)
        lt r26.w, l(0.000010), |r9.w|
        lt r27.w, l(0.000000), r9.w
        lt r29.y, r9.w, l(0.000000)
        iadd r27.w, -r27.w, r29.y
        itof r27.w, r27.w
        mul r27.w, r27.w, l(0.000100)
        movc r26.w, r26.w, r9.w, r27.w
        mul r27.w, r4.z, r26.w
        exp r27.w, r27.w
        add r27.w, r27.w, l(-1.000000)
        exp r26.w, r26.w
        add r26.w, r26.w, l(-1.000000)
        div r26.w, l(1.000000, 1.000000, 1.000000, 1.000000), r26.w
        mul r26.w, r26.w, r27.w
        max r9.z, r26.w, l(0.000000)
        break
        case l(3)
        add r9.w, |r9.w|, l(6.000000)
        add r26.w, -r4.z, l(0.500000)
        mul r9.w, r9.w, r26.w
        exp r9.w, r9.w
        add r9.w, r9.w, l(1.000000)
        div r9.z, l(1.000000, 1.000000, 1.000000, 1.000000), r9.w
        break
        default
        mov r9.z, l(0)
        break
      endswitch
      add r9.y, -r9.x, r9.y
      mad r9.x, r9.z, r9.y, r9.x
      mul r8.x, r8.x, r9.x
      mad r8.x, r8.x, r25.w, r9.x
      movc r8.x, r10.x, r8.x, r9.x
      div r9.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z
      min r8.x, r8.x, r9.x
      mad r8.yzw, -r8.xxxx, r27.xxyz, r8.yyzw
    endif
    and r9.xyzw, r14.yyyy, l(4, 1, 2, 8)
    add r18.xyz, r18.xyzx, -r26.xyzx
    dp3 r8.x, r18.xyzx, r18.xyzx
    sqrt r8.x, r8.x
    ge r10.x, l(0.000000), r19.w
    ge r14.y, r19.w, r8.x
    or r10.x, r10.x, r14.y
    mul r8.x, r8.x, -r18.w
    mul r8.x, r8.x, l(1.442695)
    exp r8.x, r8.x
    mul r5.w, r5.w, r8.x
    mad r18.xyz, r19.xyzx, r5.wwww, r8.yzwy
    movc r18.xyz, r10.xxxx, r18.xyzx, r8.yzwy
    movc r8.xyz, r9.xxxx, r18.xyzx, r8.yzwy
    ine r5.w, r9.y, l(0)
    and r5.w, r7.x, r5.w
    mov r18.xy, r14.zwzz
    mov r18.z, r15.x
    add r14.yzw, -r26.xxyz, r18.xxyz
    dp3 r8.w, r14.yzwy, r14.yzwy
    sqrt r8.w, r8.w
    ge r9.x, l(0.000000), r7.y
    ge r9.y, r7.y, r8.w
    or r9.x, r9.y, r9.x
    mul r8.w, r8.w, -r15.y
    mul r8.w, r8.w, l(1.442695)
    exp r8.w, r8.w
    mul r8.w, r7.z, r8.w
    div r9.y, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z
    min r8.w, |r8.w|, r9.y
    mov r7.yz, r15.zzwz
    dp3 r9.y, r27.xyzx, r7.yzwy
    mul r9.y, r8.w, r9.y
    mad r7.yzw, -r9.yyyy, r7.yyzw, r8.xxyz
    mad r14.yzw, -r8.wwww, r27.xxyz, r8.xxyz
    movc r7.yzw, r28.yyyy, r7.yyzw, r14.yyzw
    movc r7.yzw, r9.xxxx, r7.yyzw, r8.xxyz
    movc r7.yzw, r5.wwww, r7.yyzw, r8.xxyz
    add r8.xyz, r16.xyzx, -r26.xyzx
    dp3 r5.w, r8.xyzx, r8.xyzx
    sqrt r5.w, r5.w
    ge r8.w, l(0.000000), r17.x
    ge r9.x, r17.x, r5.w
    or r8.w, r8.w, r9.x
    lt r9.x, r22.x, r5.w
    and r8.w, r8.w, r9.x
    lt r9.x, l(0.000010), r5.w
    and r8.w, r8.w, r9.x
    mul r9.x, r5.w, -r16.w
    mul r9.x, r9.x, l(1.442695)
    exp r9.x, r9.x
    mul r9.x, r17.y, r9.x
    div r5.w, r9.x, r5.w
    mad r8.xyz, r8.xyzx, r5.wwww, r7.yzwy
    movc r8.xyz, r8.wwww, r8.xyzx, r7.yzwy
    movc r7.yzw, r9.zzzz, r8.xxyz, r7.yyzw
    add r8.xyz, -r20.zxyz, r26.zxyz
    dp3 r5.w, r21.zxyz, r8.xyzx
    mad r8.xyz, r21.zxyz, r5.wwww, r8.xyzx
    dp3 r5.w, r8.xyzx, r8.xyzx
    sqrt r5.w, r5.w
    ge r8.w, l(0.000000), r21.w
    ge r9.x, r21.w, r5.w
    or r8.w, r8.w, r9.x
    lt r9.x, l(0.000010), r5.w
    and r8.w, r8.w, r9.x
    mul r9.xyz, r21.yzxy, r8.xyzx
    mad r8.xyz, r8.zxyz, r21.zxyz, -r9.xyzx
    dp3 r9.x, r8.xyzx, r8.xyzx
    max r9.x, r9.x, l(0.000010)
    rsq r9.x, r9.x
    mul r8.xyz, r8.xyzx, r9.xxxx
    mul r5.w, r5.w, -r20.w
    mul r5.w, r5.w, l(1.442695)
    exp r5.w, r5.w
    mul r5.w, r17.z, r5.w
    mad r8.xyz, r8.xyzx, r5.wwww, r7.yzwy
    movc r8.xyz, r8.wwww, r8.xyzx, r7.yzwy
    movc r7.yzw, r9.wwww, r8.xxyz, r7.yyzw
    lt r5.w, l(0.000000), r11.y
    and r8.x, r24.w, r5.w
    switch r10.w
      case l(0)
      mov r8.y, l(0)
      break
      case l(1)
      mov r8.y, r4.z
      break
      case l(2)
      lt r8.z, l(0.000010), |r11.x|
      lt r8.w, l(0.000000), r11.x
      lt r9.x, r11.x, l(0.000000)
      iadd r8.w, -r8.w, r9.x
      itof r8.w, r8.w
      mul r8.w, r8.w, l(0.000100)
      movc r8.z, r8.z, r11.x, r8.w
      mul r8.w, r4.z, r8.z
      exp r8.w, r8.w
      exp r8.z, r8.z
      add r8.zw, r8.zzzw, l(0.000000, 0.000000, -1.000000, -1.000000)
      div r8.z, l(1.000000, 1.000000, 1.000000, 1.000000), r8.z
      mul r8.z, r8.z, r8.w
      max r8.y, r8.z, l(0.000000)
      break
      case l(3)
      add r8.z, |r11.x|, l(6.000000)
      add r8.w, -r4.z, l(0.500000)
      mul r8.z, r8.w, r8.z
      exp r8.z, r8.z
      add r8.z, r8.z, l(1.000000)
      div r8.y, l(1.000000, 1.000000, 1.000000, 1.000000), r8.z
      break
      default
      mov r8.y, l(0)
      break
    endswitch
    add r8.z, -r10.y, r10.z
    mad r8.y, r8.y, r8.z, r10.y
    mul r8.z, r11.y, r8.y
    mad r8.x, r8.z, r8.x, r8.y
    movc_sat r5.w, r5.w, r8.x, r8.y
    ne r8.x, r5.w, l(0.000000)
    and r8.x, r7.x, r8.x
    if_nz r8.x
      and r8.x, l(1), cb0[156].w
      if_nz r8.x
        mad r8.xyz, r26.xzyx, cb0[155].xzyx, cb0[154].xzyx
        sample_l_indexable(texture3d)(float,float,float,float) r8.xyz, r8.xyzx, t8.xyzw, s0, l(0.000000)
        add r8.xyz, r8.xyzx, cb0[156].xyzx
      else
        mov r8.xyz, cb0[156].xyzx
      endif
      add r8.xyz, -r27.xyzx, r8.xyzx
      div r8.xyz, r8.xyzx, r0.zzzz
      mad r7.yzw, r8.xxyz, r5.wwww, r7.yyzw
    endif
    mov r8.x, r12.w
    mov r8.yz, r13.zzwz
    dp3 r5.w, r8.xyzx, r8.xyzx
    lt r5.w, l(0.000000), r5.w
    if_nz r5.w
      ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r9.xyzw, r0.y, l(664), t0.xyzw
      ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r10.xyzw, r0.y, l(680), t0.xyzw
      lt r5.w, l(0.000000), r14.x
      and r8.w, r24.w, r5.w
      switch r10.z
        case l(0)
        mov r10.z, l(0)
        break
        case l(1)
        mov r10.z, r4.z
        break
        case l(2)
        lt r11.x, l(0.000010), |r10.w|
        lt r11.y, l(0.000000), r10.w
        lt r12.w, r10.w, l(0.000000)
        iadd r11.y, -r11.y, r12.w
        itof r11.y, r11.y
        mul r11.y, r11.y, l(0.000100)
        movc r11.x, r11.x, r10.w, r11.y
        mul r11.y, r4.z, r11.x
        exp r11.y, r11.y
        exp r11.x, r11.x
        add r11.xy, r11.xyxx, l(-1.000000, -1.000000, 0.000000, 0.000000)
        div r11.x, l(1.000000, 1.000000, 1.000000, 1.000000), r11.x
        mul r11.x, r11.x, r11.y
        max r10.z, r11.x, l(0.000000)
        break
        case l(3)
        add r10.w, |r10.w|, l(6.000000)
        add r11.x, -r4.z, l(0.500000)
        mul r10.w, r10.w, r11.x
        exp r10.w, r10.w
        add r10.w, r10.w, l(1.000000)
        div r10.z, l(1.000000, 1.000000, 1.000000, 1.000000), r10.w
        break
        default
        mov r10.z, l(0)
        break
      endswitch
      add r10.y, -r10.x, r10.y
      mad r10.x, r10.z, r10.y, r10.x
      mul r10.y, r14.x, r10.x
      mad r8.w, r10.y, r8.w, r10.x
      movc r5.w, r5.w, r8.w, r10.x
      mov r13.z, r9.x
      mad r10.xyz, r26.xyzx, r12.xyzx, r13.xyzx
      mad r9.xyz, r9.yzwy, r5.yyyy, r10.xyzx
      mul r8.xyz, r8.xyzx, r5.wwww
      dp3 r5.y, r9.xyzx, l(0.333333343, 0.333333343, 0.333333343, 0.000000)
      add r10.xyz, r5.yyyy, r9.xyzx
      round_ni r10.xyz, r10.xyzx
      add r12.xyz, r9.xyzx, -r10.xyzx
      dp3 r5.y, r10.xyzx, l(0.166666672, 0.166666672, 0.166666672, 0.000000)
      add r12.xyz, r5.yyyy, r12.xyzx
      ge r13.xyz, r12.zxyz, r12.xyzx
      and r14.xyz, r13.yzxy, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
      movc r13.xyz, r13.xyzx, l(0,0,0,0), l(1.000000,1.000000,1.000000,0)
      min r15.xyz, r13.xyzx, r14.xyzx
      max r13.xyz, r13.yzxy, r14.yzxy
      add r14.xyz, r12.xyzx, -r15.xyzx
      add r14.xyz, r14.xyzx, l(0.166666672, 0.166666672, 0.166666672, 0.000000)
      add r16.xyz, r12.xyzx, -r13.zxyz
      add r16.xyz, r16.xyzx, l(0.333333343, 0.333333343, 0.333333343, 0.000000)
      add r17.xyz, r12.xyzx, l(-0.500000, -0.500000, -0.500000, 0.000000)
      mul r18.xyz, r10.xyzx, l(0.00346020772, 0.00346020772, 0.00346020772, 0.000000)
      round_ni r18.xyz, r18.xyzx
      mad r10.xyz, -r18.xyzx, l(289.000000, 289.000000, 289.000000, 0.000000), r10.xyzx
      mov r18.xw, l(0,0,0,1.000000)
      mov r18.y, r15.z
      mov r18.z, r13.y
      add r18.xyzw, r10.zzzz, r18.xyzw
      mad r19.xyzw, r18.xyzw, l(34.000000, 34.000000, 34.000000, 34.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      mul r18.xyzw, r18.xyzw, r19.xyzw
      mul r19.xyzw, r18.xyzw, l(0.00346020772, 0.00346020772, 0.00346020772, 0.00346020772)
      round_ni r19.xyzw, r19.xyzw
      mad r18.xyzw, -r19.xyzw, l(289.000000, 289.000000, 289.000000, 289.000000), r18.xyzw
      add r18.xyzw, r10.yyyy, r18.xyzw
      mov r19.xw, l(0,0,0,1.000000)
      mov r19.y, r15.y
      mov r19.z, r13.x
      add r18.xyzw, r18.xyzw, r19.xyzw
      mad r19.xyzw, r18.xyzw, l(34.000000, 34.000000, 34.000000, 34.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      mul r18.xyzw, r18.xyzw, r19.xyzw
      mul r19.xyzw, r18.xyzw, l(0.00346020772, 0.00346020772, 0.00346020772, 0.00346020772)
      round_ni r19.xyzw, r19.xyzw
      mad r18.xyzw, -r19.xyzw, l(289.000000, 289.000000, 289.000000, 289.000000), r18.xyzw
      add r10.xyzw, r10.xxxx, r18.xyzw
      mov r13.xw, l(0,0,0,1.000000)
      mov r13.y, r15.x
      add r10.xyzw, r10.xyzw, r13.xyzw
      mad r13.xyzw, r10.xyzw, l(34.000000, 34.000000, 34.000000, 34.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      mul r10.xyzw, r10.xyzw, r13.xyzw
      mul r13.xyzw, r10.xyzw, l(0.00346020772, 0.00346020772, 0.00346020772, 0.00346020772)
      round_ni r13.xyzw, r13.xyzw
      mad r10.xyzw, -r13.xyzw, l(289.000000, 289.000000, 289.000000, 289.000000), r10.xyzw
      mul r13.xyzw, r10.xyzw, l(0.0204081647, 0.0204081647, 0.0204081647, 0.0204081647)
      round_ni r13.xyzw, r13.xyzw
      mad r10.xyzw, -r13.xyzw, l(49.000000, 49.000000, 49.000000, 49.000000), r10.xyzw
      mul r13.xyzw, r10.xyzw, l(0.142857149, 0.142857149, 0.142857149, 0.142857149)
      round_ni r13.xyzw, r13.xyzw
      mad r10.xyzw, -r13.xyzw, l(7.000000, 7.000000, 7.000000, 7.000000), r10.xyzw
      mad r13.xyzw, r13.xyzw, l(0.285714298, 0.285714298, 0.285714298, 0.285714298), l(-0.928571403, -0.928571403, -0.928571403, -0.928571403)
      mad r10.xyzw, r10.xzyw, l(0.285714298, 0.285714298, 0.285714298, 0.285714298), l(-0.928571403, -0.928571403, -0.928571403, -0.928571403)
      add r15.xyzw, -|r13.xyzw|, l(1.000000, 1.000000, 1.000000, 1.000000)
      add r15.xyzw, -|r10.xzwy|, r15.xywz
      round_ni r18.xz, r13.xxyx
      round_ni r18.yw, r10.xxxz
      mad r18.xyzw, r18.xyzw, l(2.000000, 2.000000, 2.000000, 2.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      round_ni r19.xz, r13.zzwz
      round_ni r19.yw, r10.yyyw
      mad r19.xyzw, r19.xyzw, l(2.000000, 2.000000, 2.000000, 2.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      ge r20.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000), r15.xywz
      movc r20.xyzw, r20.xyzw, l(-1.000000,-1.000000,-1.000000,-1.000000), l(-0.000000,-0.000000,-0.000000,-0.000000)
      mov r21.xz, r13.xxyx
      mov r21.yw, r10.xxxz
      mad r18.xyzw, r18.zwxy, r20.yyxx, r21.zwxy
      mov r10.xz, r13.zzwz
      mad r10.xyzw, r19.xyzw, r20.zzww, r10.xyzw
      mov r13.xy, r18.zwzz
      mov r13.z, r15.x
      dp3 r19.x, r13.xyzx, r13.xyzx
      mov r18.z, r15.y
      dp3 r19.y, r18.xyzx, r18.xyzx
      mov r20.xy, r10.xyxx
      mov r20.z, r15.w
      dp3 r19.z, r20.xyzx, r20.xyzx
      mov r15.xy, r10.zwzz
      dp3 r19.w, r15.xyzx, r15.xyzx
      mad r10.xyzw, -r19.xyzw, l(0.853734732, 0.853734732, 0.853734732, 0.853734732), l(1.79284286, 1.79284286, 1.79284286, 1.79284286)
      mul r13.xyz, r10.xxxx, r13.xyzx
      mul r18.xyz, r10.yyyy, r18.xyzx
      mul r10.xyz, r10.zzzz, r20.xyzx
      mul r15.xyz, r10.wwww, r15.xyzx
      dp3 r19.x, r12.xyzx, r12.xyzx
      dp3 r19.y, r14.xyzx, r14.xyzx
      dp3 r19.z, r16.xyzx, r16.xyzx
      dp3 r19.w, r17.xyzx, r17.xyzx
      add r19.xyzw, -r19.xyzw, l(0.600000, 0.600000, 0.600000, 0.600000)
      max r19.xyzw, r19.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
      mul r20.xyzw, r19.xyzw, r19.xyzw
      mul r19.xyzw, r19.xyzw, r20.xyzw
      mul r20.xyzw, r20.xyzw, r20.xyzw
      mul r19.xyzw, r19.xyzw, l(-8.000000, -8.000000, -8.000000, -8.000000)
      dp3 r5.y, r13.xyzx, r12.xyzx
      dp3 r5.w, r18.xyzx, r14.xyzx
      dp3 r8.w, r10.xyzx, r16.xyzx
      dp3 r9.w, r15.xyzx, r17.xyzx
      mul r10.xw, r12.yyyz, r19.xxxx
      mul r11.xy, r13.yzyy, r20.xxxx
      mad r10.xw, r10.xxxw, r5.yyyy, r11.xxxy
      mul r11.xy, r14.yzyy, r19.yyyy
      mul r12.xy, r18.yzyy, r20.yyyy
      mad r5.yw, r11.xxxy, r5.wwww, r12.xxxy
      add r5.yw, r5.yyyw, r10.xxxw
      mul r10.xw, r16.yyyz, r19.zzzz
      mul r10.yz, r10.yyzy, r20.zzzz
      mad r10.xy, r10.xwxx, r8.wwww, r10.yzyy
      add r5.yw, r5.yyyw, r10.xxxy
      mul r10.xy, r17.yzyy, r19.wwww
      mul r10.zw, r15.yyyz, r20.wwww
      mad r10.xy, r10.xyxx, r9.wwww, r10.zwzz
      add r5.yw, r5.yyyw, r10.xxxy
      mul r5.y, r5.y, l(42.000000)
      add r10.xyz, r9.xyzx, l(920.718689, 125.506699, 523.453003, 0.000000)
      dp3 r8.w, r10.xyzx, l(0.333333343, 0.333333343, 0.333333343, 0.000000)
      add r12.xyz, r8.wwww, r10.xyzx
      round_ni r12.xyz, r12.xyzx
      add r10.xyz, r10.xyzx, -r12.xyzx
      dp3 r8.w, r12.xyzx, l(0.166666672, 0.166666672, 0.166666672, 0.000000)
      add r10.xyz, r8.wwww, r10.xyzx
      ge r13.xyz, r10.zxyz, r10.xyzx
      and r14.xyz, r13.yzxy, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
      movc r13.xyz, r13.xyzx, l(0,0,0,0), l(1.000000,1.000000,1.000000,0)
      min r15.xyz, r13.xyzx, r14.xyzx
      max r13.xyz, r13.yzxy, r14.yzxy
      add r14.xyz, r10.xyzx, -r15.xyzx
      add r14.xyz, r14.xyzx, l(0.166666672, 0.166666672, 0.166666672, 0.000000)
      add r16.xyz, r10.xyzx, -r13.zxyz
      add r16.xyz, r16.xyzx, l(0.333333343, 0.333333343, 0.333333343, 0.000000)
      add r17.xyz, r10.xyzx, l(-0.500000, -0.500000, -0.500000, 0.000000)
      mul r18.xyz, r12.xyzx, l(0.00346020772, 0.00346020772, 0.00346020772, 0.000000)
      round_ni r18.xyz, r18.xyzx
      mad r12.xyz, -r18.xyzx, l(289.000000, 289.000000, 289.000000, 0.000000), r12.xyzx
      mov r18.xw, l(0,0,0,1.000000)
      mov r18.y, r15.z
      mov r18.z, r13.y
      add r18.xyzw, r12.zzzz, r18.xyzw
      mad r19.xyzw, r18.xyzw, l(34.000000, 34.000000, 34.000000, 34.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      mul r18.xyzw, r18.xyzw, r19.xyzw
      mul r19.xyzw, r18.xyzw, l(0.00346020772, 0.00346020772, 0.00346020772, 0.00346020772)
      round_ni r19.xyzw, r19.xyzw
      mad r18.xyzw, -r19.xyzw, l(289.000000, 289.000000, 289.000000, 289.000000), r18.xyzw
      add r18.xyzw, r12.yyyy, r18.xyzw
      mov r19.xw, l(0,0,0,1.000000)
      mov r19.y, r15.y
      mov r19.z, r13.x
      add r18.xyzw, r18.xyzw, r19.xyzw
      mad r19.xyzw, r18.xyzw, l(34.000000, 34.000000, 34.000000, 34.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      mul r18.xyzw, r18.xyzw, r19.xyzw
      mul r19.xyzw, r18.xyzw, l(0.00346020772, 0.00346020772, 0.00346020772, 0.00346020772)
      round_ni r19.xyzw, r19.xyzw
      mad r18.xyzw, -r19.xyzw, l(289.000000, 289.000000, 289.000000, 289.000000), r18.xyzw
      add r12.xyzw, r12.xxxx, r18.xyzw
      mov r13.xw, l(0,0,0,1.000000)
      mov r13.y, r15.x
      add r12.xyzw, r12.xyzw, r13.xyzw
      mad r13.xyzw, r12.xyzw, l(34.000000, 34.000000, 34.000000, 34.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      mul r12.xyzw, r12.xyzw, r13.xyzw
      mul r13.xyzw, r12.xyzw, l(0.00346020772, 0.00346020772, 0.00346020772, 0.00346020772)
      round_ni r13.xyzw, r13.xyzw
      mad r12.xyzw, -r13.xyzw, l(289.000000, 289.000000, 289.000000, 289.000000), r12.xyzw
      mul r13.xyzw, r12.xyzw, l(0.0204081647, 0.0204081647, 0.0204081647, 0.0204081647)
      round_ni r13.xyzw, r13.xyzw
      mad r12.xyzw, -r13.xyzw, l(49.000000, 49.000000, 49.000000, 49.000000), r12.xyzw
      mul r13.xyzw, r12.xyzw, l(0.142857149, 0.142857149, 0.142857149, 0.142857149)
      round_ni r13.xyzw, r13.xyzw
      mad r12.xyzw, -r13.xyzw, l(7.000000, 7.000000, 7.000000, 7.000000), r12.xyzw
      mad r13.xyzw, r13.xyzw, l(0.285714298, 0.285714298, 0.285714298, 0.285714298), l(-0.928571403, -0.928571403, -0.928571403, -0.928571403)
      mad r12.xyzw, r12.xzyw, l(0.285714298, 0.285714298, 0.285714298, 0.285714298), l(-0.928571403, -0.928571403, -0.928571403, -0.928571403)
      add r15.xyzw, -|r13.xyzw|, l(1.000000, 1.000000, 1.000000, 1.000000)
      add r15.xyzw, -|r12.xzwy|, r15.xywz
      round_ni r18.xz, r13.xxyx
      round_ni r18.yw, r12.xxxz
      mad r18.xyzw, r18.xyzw, l(2.000000, 2.000000, 2.000000, 2.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      round_ni r19.xz, r13.zzwz
      round_ni r19.yw, r12.yyyw
      mad r19.xyzw, r19.xyzw, l(2.000000, 2.000000, 2.000000, 2.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      ge r20.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000), r15.xywz
      movc r20.xyzw, r20.xyzw, l(-1.000000,-1.000000,-1.000000,-1.000000), l(-0.000000,-0.000000,-0.000000,-0.000000)
      mov r21.xz, r13.xxyx
      mov r21.yw, r12.xxxz
      mad r18.xyzw, r18.zwxy, r20.yyxx, r21.zwxy
      mov r12.xz, r13.zzwz
      mad r12.xyzw, r19.xyzw, r20.zzww, r12.xyzw
      mov r13.xy, r18.zwzz
      mov r13.z, r15.x
      dp3 r19.x, r13.xyzx, r13.xyzx
      mov r18.z, r15.y
      dp3 r19.y, r18.xyzx, r18.xyzx
      mov r20.xy, r12.xyxx
      mov r20.z, r15.w
      dp3 r19.z, r20.xyzx, r20.xyzx
      mov r15.xy, r12.zwzz
      dp3 r19.w, r15.xyzx, r15.xyzx
      mad r12.xyzw, -r19.xyzw, l(0.853734732, 0.853734732, 0.853734732, 0.853734732), l(1.79284286, 1.79284286, 1.79284286, 1.79284286)
      mul r13.xyz, r12.xxxx, r13.xyzx
      mul r18.xyz, r12.yyyy, r18.xyzx
      mul r12.xyz, r12.zzzz, r20.xyzx
      mul r15.xyz, r12.wwww, r15.xyzx
      dp3 r19.x, r10.xyzx, r10.xyzx
      dp3 r19.y, r14.xyzx, r14.xyzx
      dp3 r19.z, r16.xyzx, r16.xyzx
      dp3 r19.w, r17.xyzx, r17.xyzx
      add r19.xyzw, -r19.xyzw, l(0.600000, 0.600000, 0.600000, 0.600000)
      max r19.xyzw, r19.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
      mul r20.xyzw, r19.xyzw, r19.xyzw
      mul r19.xyzw, r19.xyzw, r20.xyzw
      mul r20.xyzw, r20.xyzw, r20.xyzw
      mul r19.xyzw, r19.xyzw, l(-8.000000, -8.000000, -8.000000, -8.000000)
      dp3 r8.w, r13.xyzx, r10.xyzx
      dp3 r9.w, r18.xyzx, r14.xyzx
      dp3 r10.y, r12.xyzx, r16.xyzx
      dp3 r10.w, r15.xyzx, r17.xyzx
      mul r10.xz, r10.xxzx, r19.xxxx
      mul r11.xy, r13.xzxx, r20.xxxx
      mad r10.xz, r10.xxzx, r8.wwww, r11.xxyx
      mul r11.xy, r14.xzxx, r19.yyyy
      mul r12.yw, r18.xxxz, r20.yyyy
      mad r11.xy, r11.xyxx, r9.wwww, r12.ywyy
      add r10.xz, r10.xxzx, r11.xxyx
      mul r11.xy, r16.xzxx, r19.zzzz
      mul r12.xy, r12.xzxx, r20.zzzz
      mad r11.xy, r11.xyxx, r10.yyyy, r12.xyxx
      add r10.xy, r10.xzxx, r11.xyxx
      mul r11.xy, r17.xzxx, r19.wwww
      mul r12.xy, r15.xzxx, r20.wwww
      mad r10.zw, r11.xxxy, r10.wwww, r12.xxxy
      add r10.xy, r10.zwzz, r10.xyxx
      mul r8.w, r10.y, l(42.000000)
      add r9.xyz, r9.xyzx, l(328.609802, -515.140930, 343.312012, 0.000000)
      dp3 r9.w, r9.xyzx, l(0.333333343, 0.333333343, 0.333333343, 0.000000)
      add r10.yzw, r9.wwww, r9.xxyz
      round_ni r10.yzw, r10.yyzw
      add r9.xyz, r9.xyzx, -r10.yzwy
      dp3 r9.w, r10.yzwy, l(0.166666672, 0.166666672, 0.166666672, 0.000000)
      add r9.xyz, r9.wwww, r9.xyzx
      ge r12.xyz, r9.zxyz, r9.xyzx
      and r13.xyz, r12.yzxy, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
      movc r12.xyz, r12.xyzx, l(0,0,0,0), l(1.000000,1.000000,1.000000,0)
      min r14.xyz, r12.xyzx, r13.xyzx
      max r12.xyz, r12.yzxy, r13.yzxy
      add r13.xyz, r9.xyzx, -r14.xyzx
      add r13.xyz, r13.xyzx, l(0.166666672, 0.166666672, 0.166666672, 0.000000)
      add r15.xyz, r9.xyzx, -r12.zxyz
      add r15.xyz, r15.xyzx, l(0.333333343, 0.333333343, 0.333333343, 0.000000)
      add r16.xyz, r9.xyzx, l(-0.500000, -0.500000, -0.500000, 0.000000)
      mul r17.xyz, r10.yzwy, l(0.00346020772, 0.00346020772, 0.00346020772, 0.000000)
      round_ni r17.xyz, r17.xyzx
      mad r10.yzw, -r17.xxyz, l(0.000000, 289.000000, 289.000000, 289.000000), r10.yyzw
      mov r18.xw, l(0,0,0,1.000000)
      mov r18.y, r14.z
      mov r18.z, r12.y
      add r18.xyzw, r10.wwww, r18.xyzw
      mad r19.xyzw, r18.xyzw, l(34.000000, 34.000000, 34.000000, 34.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      mul r18.xyzw, r18.xyzw, r19.xyzw
      mul r19.xyzw, r18.xyzw, l(0.00346020772, 0.00346020772, 0.00346020772, 0.00346020772)
      round_ni r19.xyzw, r19.xyzw
      mad r18.xyzw, -r19.xyzw, l(289.000000, 289.000000, 289.000000, 289.000000), r18.xyzw
      add r18.xyzw, r10.zzzz, r18.xyzw
      mov r19.xw, l(0,0,0,1.000000)
      mov r19.y, r14.y
      mov r19.z, r12.x
      add r18.xyzw, r18.xyzw, r19.xyzw
      mad r19.xyzw, r18.xyzw, l(34.000000, 34.000000, 34.000000, 34.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      mul r18.xyzw, r18.xyzw, r19.xyzw
      mul r19.xyzw, r18.xyzw, l(0.00346020772, 0.00346020772, 0.00346020772, 0.00346020772)
      round_ni r19.xyzw, r19.xyzw
      mad r18.xyzw, -r19.xyzw, l(289.000000, 289.000000, 289.000000, 289.000000), r18.xyzw
      add r18.xyzw, r10.yyyy, r18.xyzw
      mov r12.xw, l(0,0,0,1.000000)
      mov r12.y, r14.x
      add r12.xyzw, r12.xyzw, r18.xyzw
      mad r14.xyzw, r12.xyzw, l(34.000000, 34.000000, 34.000000, 34.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      mul r12.xyzw, r12.xyzw, r14.xyzw
      mul r14.xyzw, r12.xyzw, l(0.00346020772, 0.00346020772, 0.00346020772, 0.00346020772)
      round_ni r14.xyzw, r14.xyzw
      mad r12.xyzw, -r14.xyzw, l(289.000000, 289.000000, 289.000000, 289.000000), r12.xyzw
      mul r14.xyzw, r12.xyzw, l(0.0204081647, 0.0204081647, 0.0204081647, 0.0204081647)
      round_ni r14.xyzw, r14.xyzw
      mad r12.xyzw, -r14.xyzw, l(49.000000, 49.000000, 49.000000, 49.000000), r12.xyzw
      mul r14.xyzw, r12.xyzw, l(0.142857149, 0.142857149, 0.142857149, 0.142857149)
      round_ni r14.xyzw, r14.xyzw
      mad r12.xyzw, -r14.xyzw, l(7.000000, 7.000000, 7.000000, 7.000000), r12.xyzw
      mad r14.xyzw, r14.xyzw, l(0.285714298, 0.285714298, 0.285714298, 0.285714298), l(-0.928571403, -0.928571403, -0.928571403, -0.928571403)
      mad r12.xyzw, r12.xzyw, l(0.285714298, 0.285714298, 0.285714298, 0.285714298), l(-0.928571403, -0.928571403, -0.928571403, -0.928571403)
      add r18.xyzw, -|r14.xyzw|, l(1.000000, 1.000000, 1.000000, 1.000000)
      add r18.xyzw, -|r12.xzwy|, r18.xywz
      round_ni r19.xz, r14.xxyx
      round_ni r19.yw, r12.xxxz
      mad r19.xyzw, r19.xyzw, l(2.000000, 2.000000, 2.000000, 2.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      round_ni r20.xz, r14.zzwz
      round_ni r20.yw, r12.yyyw
      mad r20.xyzw, r20.xyzw, l(2.000000, 2.000000, 2.000000, 2.000000), l(1.000000, 1.000000, 1.000000, 1.000000)
      ge r21.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000), r18.xywz
      movc r21.xyzw, r21.xyzw, l(-1.000000,-1.000000,-1.000000,-1.000000), l(-0.000000,-0.000000,-0.000000,-0.000000)
      mov r30.xz, r14.xxyx
      mov r30.yw, r12.xxxz
      mad r19.xyzw, r19.zwxy, r21.yyxx, r30.zwxy
      mov r12.xz, r14.zzwz
      mad r12.xyzw, r20.xyzw, r21.zzww, r12.xyzw
      mov r14.xy, r19.zwzz
      mov r14.z, r18.x
      dp3 r20.x, r14.xyzx, r14.xyzx
      mov r19.z, r18.y
      dp3 r20.y, r19.xyzx, r19.xyzx
      mov r17.xy, r12.xyxx
      mov r17.z, r18.w
      dp3 r20.z, r17.xyzx, r17.xyzx
      mov r18.xy, r12.zwzz
      dp3 r20.w, r18.xyzx, r18.xyzx
      mad r12.xyzw, -r20.xyzw, l(0.853734732, 0.853734732, 0.853734732, 0.853734732), l(1.79284286, 1.79284286, 1.79284286, 1.79284286)
      mul r10.yzw, r12.xxxx, r14.xxyz
      mul r14.xyz, r12.yyyy, r19.xyzx
      mul r12.xyz, r12.zzzz, r17.xyzx
      mul r17.xyz, r12.wwww, r18.xyzx
      dp3 r18.x, r9.xyzx, r9.xyzx
      dp3 r18.y, r13.xyzx, r13.xyzx
      dp3 r18.z, r15.xyzx, r15.xyzx
      dp3 r18.w, r16.xyzx, r16.xyzx
      add r18.xyzw, -r18.xyzw, l(0.600000, 0.600000, 0.600000, 0.600000)
      max r18.xyzw, r18.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
      mul r19.xyzw, r18.xyzw, r18.xyzw
      mul r18.xyzw, r18.xyzw, r19.xyzw
      mul r19.xyzw, r19.xyzw, r19.xyzw
      mul r18.xyzw, r18.xyzw, l(-8.000000, -8.000000, -8.000000, -8.000000)
      dp3 r9.z, r10.yzwy, r9.xyzx
      dp3 r9.w, r14.xyzx, r13.xyzx
      dp3 r10.w, r12.xyzx, r15.xyzx
      dp3 r11.x, r17.xyzx, r16.xyzx
      mul r9.xy, r9.xyxx, r18.xxxx
      mul r10.yz, r10.yyzy, r19.xxxx
      mad r9.xy, r9.xyxx, r9.zzzz, r10.yzyy
      mul r10.yz, r13.xxyx, r18.yyyy
      mul r12.zw, r14.xxxy, r19.yyyy
      mad r9.zw, r10.yyyz, r9.wwww, r12.zzzw
      add r9.xy, r9.zwzz, r9.xyxx
      mul r9.zw, r15.xxxy, r18.zzzz
      mul r10.yz, r12.xxyx, r19.zzzz
      mad r9.zw, r9.zzzw, r10.wwww, r10.yyyz
      add r9.xy, r9.zwzz, r9.xyxx
      mul r9.zw, r16.xxxy, r18.wwww
      mul r10.yz, r17.xxyx, r19.wwww
      mad r9.zw, r9.zzzw, r11.xxxx, r10.yyyz
      add r9.xy, r9.zwzz, r9.xyxx
      mul r9.x, r9.x, l(42.000000)
      mad r12.x, r9.y, l(42.000000), -r8.w
      mad r12.y, r5.w, l(42.000000), -r9.x
      mad r12.z, r10.x, l(42.000000), -r5.y
      mad r7.yzw, r8.xxyz, r12.xxyz, r7.yyzw
    endif
    mad r8.xyz, r27.xyzx, r0.zzzz, r26.xyzx
    mul r9.xyz, r0.zzzz, r7.yzwy
    mul r9.xyz, r0.zzzz, r9.xyzx
    mad r8.xyz, r9.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), r8.xyzx
    mad r7.yzw, r0.zzzz, r7.yyzw, r27.xxyz
    ieq r5.yw, r28.xxxz, l(0, 0, 0, 0)
    ge r0.z, r23.x, l(1.000000)
    and r0.z, r0.z, r5.w
    if_z r0.z
      lt r0.z, l(0.000000), r22.z
      mul r5.w, r22.z, r22.y
      mad r5.w, r5.w, r24.w, r22.y
      max r5.w, r5.w, l(0.000000)
      movc r0.z, r0.z, r5.w, r22.y
      add r5.w, r2.w, r23.z
      add r5.w, r22.w, r5.w
      add r5.w, -r26.y, r5.w
      add r9.x, -r26.y, r8.y
      div r5.w, r5.w, r9.x
      ge r9.x, r5.w, l(0.000000)
      ge r5.w, l(1.000000), r5.w
      and r5.w, r5.w, r9.x
      mad r9.xyz, r7.zzzz, l(-0.000000, -2.000000, -0.000000, 0.000000), r7.yzwy
      mul r9.xyz, r0.zzzz, r9.xyzx
      dp3 r9.w, r9.xyzx, r9.xyzx
      lt r9.w, r9.w, l(0.160000)
      movc r9.xyz, r9.wwww, l(0,0,0,0), r9.xyzx
      movc r10.xyz, r5.wwww, r26.xyzx, r8.xyzx
      movc r9.xyz, r5.wwww, r9.xyzx, r7.yzwy
      movc r8.xyz, r28.zzzz, r10.xyzx, r8.xyzx
      movc r7.yzw, r28.zzzz, r9.xxyz, r7.yyzw
      if_z r28.z
        ge r5.w, r4.z, r23.x
        if_nz r5.w
          mov r8.w, l(1.000000)
		  dp4 r5.w, r8.xyzw, cb0[159].xyzw
          dp4 r9.x, r8.xyzw, cb0[161].xyzw
          dp4 r9.y, r8.xyzw, cb0[162].xyzw
          dp4 r8.w, r8.xyzw, cb0[164].xyzw
		  
		  add r40.w, r8.w, -r40.y
		  mad r9.x, r40.x, r40.w, r9.x
		  
          div r8.w, l(1.000000, 1.000000, 1.000000, 1.000000), r8.w
          mul r9.xy, r8.wwww, r9.xyxx
          mad r9.xy, r9.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.w, r9.xyxx, t9.yzwx, s0, l(0.000000)
          add r5.w, -r5.w, -r8.w
          add r8.w, r22.w, r5.w
          lt r8.w, l(0.000000), r8.w
          add r5.w, -r22.w, r5.w
          lt r5.w, r5.w, r23.y
          and r5.w, r5.w, r8.w
          if_nz r5.w
            dp3 r5.w, r7.yzwy, r7.yzwy
            mul r8.w, r0.z, r0.z
            mul r5.w, r5.w, r8.w
            ge r5.w, l(0.160000), r5.w
            if_nz r5.w
              mov r7.yzw, l(0,0,0,0)
            else
              sample_l_indexable(texture2d)(float,float,float,float) r9.xyz, r9.xyxx, t10.xyzw, s0, l(0.000000)
              mad r9.xyz, r9.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
              dp3 r5.w, r7.yzwy, r9.xyzx
              add r5.w, r5.w, r5.w
              mad r9.xyz, r9.xyzx, -r5.wwww, r7.yzwy
              mul r7.yzw, r0.zzzz, r9.xxyz
            endif
            mov r8.xyz, r26.xyzx
          endif
        endif
      endif
    endif
    mov r9.x, r1.w
    mov r9.y, r2.w
    mov r9.z, r3.z
    add r10.xyz, r8.xyzx, -r9.xyzx
    dp3 r0.z, r10.xyzx, r10.xyzx
    sqrt r0.z, r0.z
    lt r5.w, l(0.000010), r0.z
    max r8.w, r11.z, r0.z
    min r8.w, r11.w, r8.w
    div r0.z, r8.w, r0.z
    mad r9.xyz, r10.xyzx, r0.zzzz, r9.xyzx
    movc r9.xyz, r5.wwww, r9.xyzx, r8.xyzx
    movc r8.xyz, r28.wwww, r9.xyzx, r8.xyzx
    and r9.xyzw, r4.yyyy, l(0x00800000, 0x01000000, 0x02000000, 0x20000000)
    movc r8.xyz, r9.xyzx, r26.xyzx, r8.xyzx
    add r9.xyz, r25.xyzx, r25.xyzx
    mov r24.z, r23.w
    add r10.xyz, -r24.zxyz, r8.xyzx
    add r10.xyz, r25.xyzx, r10.xyzx
    ge r11.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r10.xyzx
    and r11.xyz, r11.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
    div r10.xyz, |r10.xyzx|, r9.xyzx
    ge r12.xyz, r10.xyzx, -r10.xyzx
    frc r10.xyz, |r10.xyzx|
    movc r10.xyz, r12.xyzx, r10.xyzx, -r10.xyzx
    mad r9.xyz, r10.xyzx, r9.xyzx, -r25.xyzx
    mul r10.xyz, r11.xyzx, r9.xyzx
    mad r9.xyz, r10.xyzx, l(-2.000000, -2.000000, -2.000000, 0.000000), r9.xyzx
    add r9.xyz, r9.xyzx, r24.zxyz
    movc r8.xyz, r9.wwww, r9.xyzx, r8.xyzx
    if_nz r4.x
      iadd r0.z, r17.w, r29.x
      store_structured u25.xyz, r0.z, l(12), r8.xyzx
    endif
    if_nz r7.x
      store_structured u8.xyz, r0.w, l(0), r8.xyzx
      store_structured u10.xyz, r0.w, l(0), r7.yzwy
    endif
    and r0.z, r4.y, l(2048)
    mov r8.w, l(1.000000)
    dp4 r1.x, r8.xyzw, r1.xyzw
    dp4 r1.y, r8.xyzw, r2.xyzw
    dp4 r1.z, r8.xywz, r3.xyzw
    movc r7.xyz, r0.zzzz, r1.xyzx, r8.xyzx
  else
    mov r7.xyz, l(0,0,0,0)
    mov r0.xw, l(0,0,0,0)
    mov r5.y, l(0)
    mov r4.z, l(0)
  endif
else
  mov r7.xyz, l(0,0,0,0)
  mov r0.xw, l(0,0,0,0)
  mov r4.z, l(0)
  mov r5.yz, l(0,0,0,0)
endif
bfi r0.z, l(1), vThreadIDInGroupFlattened.x, r5.z, l(0)
ult r1.x, vThreadIDInGroupFlattened.x, l(32)
movc r1.y, r1.x, l(0), r0.z
and r0.z, r0.z, r1.x
if_z vThreadIDInGroupFlattened.x
  store_raw g1.xy, l(0), l(0,0,0,0)
endif
sync_g_t
atomic_or g1, l(0), r0.z
atomic_or g1, l(4), r1.y
sync_g_t
ld_raw r1.xy, l(0), g1.xyxx
movc r2.xyz, r5.zzzz, r7.xyzx, l(340282346638528860000000000000000000000.000000,340282346638528860000000000000000000000.000000,340282346638528860000000000000000000000.000000,0)
movc r8.xyz, r5.zzzz, r7.xyzx, l(-340282346638528860000000000000000000000.000000,-340282346638528860000000000000000000000.000000,-340282346638528860000000000000000000000.000000,0)
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r2.x
sync_g_t
xor r9.xyzw, vThreadIDInGroupFlattened.xxxx, l(1, 2, 4, 8)
ld_structured r0.z, r9.x, l(0), g0.xxxx
min r0.z, r0.z, r2.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r0.z
sync_g_t
ld_structured r1.z, r9.y, l(0), g0.xxxx
min r0.z, r0.z, r1.z
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r0.z
sync_g_t
ld_structured r1.z, r9.z, l(0), g0.xxxx
min r0.z, r0.z, r1.z
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r0.z
sync_g_t
ld_structured r1.z, r9.w, l(0), g0.xxxx
min r0.z, r0.z, r1.z
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r0.z
sync_g_t
xor r1.z, vThreadIDInGroupFlattened.x, l(16)
ld_structured r2.x, r1.z, l(0), g0.xxxx
min r0.z, r0.z, r2.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r0.z
sync_g_t
ld_structured r2.x, l(32), l(0), g0.xxxx
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r2.y
sync_g_t
ld_structured r3.w, r9.x, l(0), g0.xxxx
min r2.y, r2.y, r3.w
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r2.y
sync_g_t
ld_structured r3.w, r9.y, l(0), g0.xxxx
min r2.y, r2.y, r3.w
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r2.y
sync_g_t
ld_structured r3.w, r9.z, l(0), g0.xxxx
min r2.y, r2.y, r3.w
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r2.y
sync_g_t
ld_structured r3.w, r9.w, l(0), g0.xxxx
min r2.y, r2.y, r3.w
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r2.y
sync_g_t
ld_structured r3.w, r1.z, l(0), g0.xxxx
min r2.y, r2.y, r3.w
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r2.y
sync_g_t
ld_structured r3.w, l(32), l(0), g0.xxxx
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r2.z
sync_g_t
ld_structured r4.x, r9.x, l(0), g0.xxxx
min r2.z, r2.z, r4.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r2.z
sync_g_t
ld_structured r4.x, r9.y, l(0), g0.xxxx
min r2.z, r2.z, r4.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r2.z
sync_g_t
ld_structured r4.x, r9.z, l(0), g0.xxxx
min r2.z, r2.z, r4.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r2.z
sync_g_t
ld_structured r4.x, r9.w, l(0), g0.xxxx
min r2.z, r2.z, r4.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r2.z
sync_g_t
ld_structured r4.x, r1.z, l(0), g0.xxxx
min r2.z, r2.z, r4.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r2.z
sync_g_t
ld_structured r4.x, l(32), l(0), g0.xxxx
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r8.x
sync_g_t
ld_structured r5.w, r9.x, l(0), g0.xxxx
max r5.w, r5.w, r8.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r5.w
sync_g_t
ld_structured r8.x, r9.y, l(0), g0.xxxx
max r5.w, r5.w, r8.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r5.w
sync_g_t
ld_structured r8.x, r9.z, l(0), g0.xxxx
max r5.w, r5.w, r8.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r5.w
sync_g_t
ld_structured r8.x, r9.w, l(0), g0.xxxx
max r5.w, r5.w, r8.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r5.w
sync_g_t
ld_structured r8.x, r1.z, l(0), g0.xxxx
max r5.w, r5.w, r8.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r5.w
sync_g_t
ld_structured r8.x, l(32), l(0), g0.xxxx
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r8.y
sync_g_t
ld_structured r8.w, r9.x, l(0), g0.xxxx
max r8.y, r8.w, r8.y
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r8.y
sync_g_t
ld_structured r8.w, r9.y, l(0), g0.xxxx
max r8.y, r8.w, r8.y
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r8.y
sync_g_t
ld_structured r8.w, r9.z, l(0), g0.xxxx
max r8.y, r8.w, r8.y
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r8.y
sync_g_t
ld_structured r8.w, r9.w, l(0), g0.xxxx
max r8.y, r8.w, r8.y
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r8.y
sync_g_t
ld_structured r8.w, r1.z, l(0), g0.xxxx
max r8.y, r8.w, r8.y
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r8.y
sync_g_t
ld_structured r8.w, l(32), l(0), g0.xxxx
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r8.z
sync_g_t
ld_structured r9.x, r9.x, l(0), g0.xxxx
max r8.z, r8.z, r9.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r8.z
sync_g_t
ld_structured r9.x, r9.y, l(0), g0.xxxx
max r8.z, r8.z, r9.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r8.z
sync_g_t
ld_structured r9.x, r9.z, l(0), g0.xxxx
max r8.z, r8.z, r9.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r8.z
sync_g_t
ld_structured r9.x, r9.w, l(0), g0.xxxx
max r8.z, r8.z, r9.x
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r8.z
sync_g_t
ld_structured r1.z, r1.z, l(0), g0.xxxx
max r1.z, r1.z, r8.z
sync_g_t
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r1.z
sync_g_t
if_z vThreadIDInGroupFlattened.x
  countbits r1.xy, r1.xyxx
  iadd r9.x, r1.y, r1.x
  min r10.y, r0.z, r2.x
  min r10.z, r2.y, r3.w
  min r10.w, r2.z, r4.x
  max r2.x, r5.w, r8.x
  max r2.y, r8.w, r8.y
  ld_structured r0.z, l(32), l(0), g0.xxxx
  max r2.z, r0.z, r1.z
  ld_structured_indexable(structured_buffer, stride=44)(mixed,mixed,mixed,mixed) r0.z, vThreadGroupID.x, l(4), t11.xxxx
  mov r3.x, r1.w
  mov r3.y, r2.w
  movc r1.xyz, r9.xxxx, r10.yzwy, r3.xyzx
  movc r2.xyz, r9.xxxx, r2.xyzx, r3.xyzx
  add r9.yzw, -r6.xxxx, r1.xxyz
  store_structured u26.xyzw, r0.z, l(0), r9.xyzw
  add r1.xyz, r6.xxxx, r2.xyzx
  store_structured u26.xyz, r0.z, l(16), r1.xyzx
endif
if_nz r5.z
  mad r1.xyz, r7.xyzx, cb0[174].xyzx, cb0[175].xyzx
  lt r2.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r1.xyzx
  lt r3.xyz, r1.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
  iadd r2.xyz, -r2.xyzx, r3.xyzx
  itof r2.xyz, r2.xyzx
  mul r2.xyz, r2.xyzx, cb0[173].wwww
  mad r2.xyz, cb0[174].wwww, r1.xyzx, r2.xyzx
  lt r3.xyz, |r1.xyzx|, cb0[175].wwww
  movc r1.xyz, r3.xyzx, r1.xyzx, r2.xyzx
  lt r2.xyz, |r1.xyzx|, l(1.000000, 1.000000, 1.000000, 0.000000)
  and r0.z, r2.y, r2.x
  and r0.z, r2.z, r0.z
  if_nz r0.z
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r0.z, r0.y, l(64), t0.xxxx
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r2.xyzw, r0.y, l(448), t0.xyzw
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r1.w, r0.y, l(464), t0.xxxx
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r3.xyzw, r0.y, l(536), t0.xyzw
    mad r1.xyz, r1.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
    mul r1.xyz, r1.xyzx, l(128.000000, 128.000000, 128.000000, 0.000000)
    frc r8.xyz, r1.xyzx
    add r9.xyz, -r8.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    mov x0[0].x, r9.x
    mov x0[1].x, r8.x
    mov x1[0].x, r9.y
    mov x1[1].x, r8.y
    mov x2[0].x, r9.z
    mov x2[1].x, r8.z
    imul null, r0.z, r0.z, l(14)
    lt r5.zw, l(0.000000, 0.000000, 0.000000, 0.000000), r3.zzzw
    or r4.x, r5.w, r5.z
    if_nz r4.x
      mov r7.w, l(1.000000)
      dp4 r4.x, r7.xyzw, cb0[r0.z + 2].xyzw
    else
      mov r4.x, l(0)
    endif
    div r3.zw, l(1.000000, 1.000000, 1.000000, 1.000000), r3.zzzw
    lt r7.xy, r3.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
    movc r3.xy, r7.xyxx, cb0[r0.z + 13].xyxx, r3.xyxx
    add r0.z, -r3.x, -r4.x
    mul_sat r0.z, r3.z, r0.z
    movc r0.z, r5.z, r0.z, l(1.000000)
    add r3.x, r4.x, r3.y
    mul_sat r3.x, r3.w, r3.x
    mul r3.x, r0.z, r3.x
    movc r0.z, r5.w, r3.x, r0.z
    lt r3.x, l(0.000000), r1.w
    ishl r3.y, r0.x, l(13)
    xor r3.y, r0.x, r3.y
    ushr r3.z, r3.y, l(17)
    xor r3.y, r3.z, r3.y
    ishl r3.z, r3.y, l(5)
    xor r3.y, r3.z, r3.y
    movc r0.x, r5.y, r0.x, r3.y
    utof r3.y, r0.x
    mad r3.y, r3.y, l(4.656612873E-010), l(-1.000000)
    and r3.z, r3.y, r3.x
    switch r2.z
      case l(0)
      mov r2.z, l(0)
      break
      case l(1)
      mov r2.z, r4.z
      break
      case l(2)
      lt r3.w, l(0.000010), |r2.w|
      lt r4.x, l(0.000000), r2.w
      lt r5.y, r2.w, l(0.000000)
      iadd r4.x, -r4.x, r5.y
      itof r4.x, r4.x
      mul r4.x, r4.x, l(0.000100)
      movc r3.w, r3.w, r2.w, r4.x
      mul r4.x, r3.w, r4.z
      exp r4.x, r4.x
      add r4.x, r4.x, l(-1.000000)
      exp r3.w, r3.w
      add r3.w, r3.w, l(-1.000000)
      div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
      mul r3.w, r3.w, r4.x
      max r2.z, r3.w, l(0.000000)
      break
      case l(3)
      add r2.w, |r2.w|, l(6.000000)
      add r3.w, -r4.z, l(0.500000)
      mul r2.w, r2.w, r3.w
      exp r2.w, r2.w
      add r2.w, r2.w, l(1.000000)
      div r2.z, l(1.000000, 1.000000, 1.000000, 1.000000), r2.w
      break
      default
      mov r2.z, l(0)
      break
    endswitch
    add r2.y, -r2.x, r2.y
    mad r2.x, r2.z, r2.y, r2.x
    mul r1.w, r1.w, r2.x
    mad r1.w, r1.w, r3.z, r2.x
    movc r1.w, r3.x, r1.w, r2.x
    mul r1.w, r1.w, r5.x
    mul r0.z, r0.z, r1.w
    and r2.xy, r4.yyyy, l(512, 0x00020000, 0, 0)
    if_z r2.x
      ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r1.w, r0.y, l(1036), t0.xxxx
      ine r2.x, r1.w, l(-2)
      if_nz r2.x
        ld_structured_indexable(structured_buffer, stride=24)(mixed,mixed,mixed,mixed) r2.x, r1.w, l(4), t5.xxxx
        ld_structured_indexable(structured_buffer, stride=24)(mixed,mixed,mixed,mixed) r2.z, r1.w, l(16), t5.xxxx
        utof r1.w, r1.w
        add r1.w, r1.w, l(0.500000)
        mul r4.w, r1.w, l(0.000976562500)
        sample_l_indexable(texture2d)(float,float,float,float) r1.w, r4.zwzz, t7.xzwy, s0, l(0.000000)
        mad r1.w, r2.x, r1.w, r2.z
      else
        ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r1.w, r0.y, l(1088), t0.xxxx
      endif
    else
      mov r1.w, l(1.000000)
    endif
    if_nz r2.y
      ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r2.xyzw, r0.y, l(396), t0.xyzw
      ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r0.y, r0.w, l(0), u13.xxxx
      ubfe r0.y, l(8), l(8), r0.y
      utof r0.y, r0.y
      mul r0.w, r0.y, l(0.00392156886)
      lt r3.x, l(0.000000), r2.w
      and r3.y, r3.y, r3.x
      switch r2.y
        case l(0)
        mov r4.z, l(0)
        break
        case l(1)
        break
        case l(2)
        lt r2.y, l(0.000010), |r2.z|
        lt r3.z, l(0.000000), r2.z
        lt r3.w, r2.z, l(0.000000)
        iadd r3.z, -r3.z, r3.w
        itof r3.z, r3.z
        mul r3.z, r3.z, l(0.000100)
        movc r2.y, r2.y, r2.z, r3.z
        mul r3.z, r2.y, r4.z
        exp r3.z, r3.z
        add r3.z, r3.z, l(-1.000000)
        exp r2.y, r2.y
        add r2.y, r2.y, l(-1.000000)
        div r2.y, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y
        mul r2.y, r2.y, r3.z
        max r4.z, r2.y, l(0.000000)
        break
        case l(3)
        add r2.y, |r2.z|, l(6.000000)
        add r2.z, -r4.z, l(0.500000)
        mul r2.y, r2.z, r2.y
        exp r2.y, r2.y
        add r2.y, r2.y, l(1.000000)
        div r4.z, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y
        break
        default
        mov r4.z, l(0)
        break
      endswitch
      add r2.x, -r6.w, r2.x
      mad r2.x, r4.z, r2.x, r6.w
      mul r2.y, r2.w, r2.x
      mad r2.y, r2.y, r3.y, r2.x
      movc_sat r2.x, r3.x, r2.y, r2.x
      mad r0.y, -r0.y, l(0.00392156886), r1.w
      mad r1.w, r2.x, r0.y, r0.w
    endif
    mul_sat r0.y, r6.y, r1.w
    ne r0.w, r6.z, l(0.000000)
    ubfe r0.x, l(8), l(8), r0.x
    utof r0.x, r0.x
    mad r0.x, r0.x, l(0.00784313772), l(-1.000000)
    mad_sat r0.x, r6.z, r0.x, r0.y
    movc r0.x, r0.w, r0.x, r0.y
    mul r0.y, r0.z, r0.x
    add r0.x, -r0.x, l(1.000000)
    mul r0.x, r0.z, r0.x
    ftou r1.xyz, r1.xyzx
    mov r2.z, l(0)
    loop
      ige r0.z, r2.z, l(2)
      breakc_nz r0.z
      mov r0.z, x2[r2.z + 0].x
      mov r2.y, l(0)
      loop
        ige r0.w, r2.y, l(2)
        breakc_nz r0.w
        mov r0.w, x1[r2.y + 0].x
        mov r2.x, l(0)
        loop
          ige r1.w, r2.x, l(2)
          breakc_nz r1.w
          iadd r3.xyz, r1.xyzx, r2.xyzx
          mov r1.w, x0[r2.x + 0].x
          mul r1.w, r0.w, r1.w
          mul r1.w, r0.z, r1.w
          mul r2.w, r0.y, r1.w
          mul r1.w, r0.x, r1.w
          mad r2.w, r2.w, l(4096.000000), l(0.500000)
          ftou r2.w, r2.w
          mad r1.w, r1.w, l(4096.000000), l(0.500000)
          ftou r1.w, r1.w
          atomic_iadd u29, r3.xyzx, r2.w
          atomic_iadd u30, r3.xyzx, r1.w
          iadd r2.x, r2.x, l(1)
        endloop
        iadd r2.y, r2.y, l(1)
      endloop
      iadd r2.z, r2.z, l(1)
    endloop
  endif
endif
ret
// Approximately 1274 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v1.3.16 on Thu Oct 06 20:29:10 2022
// groupshared struct { float val[1]; } g0[64];
//
// struct ParticleGPUSystemData
// {
//     float4x4 cSystemToWorld;       // Offset:    0
//     uint cameraID;                 // Offset:   64
//     uint cDrawArgStart;            // Offset:   68
//     float4 textureFlipbookVecs[10];// Offset:   72
//     float3 cSpriteCenter;          // Offset:  232
//     float3 cSpriteSize;            // Offset:  244
//     float3 cSpriteSizeRandom;      // Offset:  256
//     float2 cUVScale;               // Offset:  268
//     float2 cUVOffset;              // Offset:  276
//     float2 cUVScroll;              // Offset:  284
//     uint cRibbonUVMode;            // Offset:  292
//     float cTimeStep;               // Offset:  296
//     uint cFlags;                   // Offset:  300
//     float cLifeTime;               // Offset:  304
//     float cLifeTimeRandom;         // Offset:  308
//     float cFogDensityStrength;     // Offset:  312
//     float cAge;                    // Offset:  316
//     uint systemRandom;             // Offset:  320
//     uint cAlignMode;               // Offset:  324
//     uint cSecondaryAlignMode;      // Offset:  328
//     uint cBlendMode;               // Offset:  332
//     float cAngleFadeRate;          // Offset:  336
//     float cSoftDistance;           // Offset:  340
//     float cSoftDistanceInverse;    // Offset:  344
//     float cVelocityScale;          // Offset:  348
//     float cVelocityScaleClamp;     // Offset:  352
//     float cExternalScale;          // Offset:  356
//     float cSpriteRotation;         // Offset:  360
//     float cSpriteCameraOffset;     // Offset:  364
//     float cStaticTwist;            // Offset:  368
//     float cTwistSpeed;             // Offset:  372
//     uint cTwistDirection;          // Offset:  376
//     float cMaxExtent;              // Offset:  380
//     float cColorModulate;          // Offset:  384
//     float cColorRandom;            // Offset:  388
//     struct {
//         float start;               // Offset:  392
//         float end;                 // Offset:  396
//         uint type;                 // Offset:  400
//         float alpha;               // Offset:  404
//         float jitter;              // Offset:  408
//     } cParticleColorBlend;         // Offset:  392
//     float4 cColorTintModulate;     // Offset:  412
//     struct {
//         float start;               // Offset:  428
//         float end;                 // Offset:  432
//         uint type;                 // Offset:  436
//         float alpha;               // Offset:  440
//         float jitter;              // Offset:  444
//     } cNormalMapIntensity;         // Offset:  428
//     struct {
//         float start;               // Offset:  448
//         float end;                 // Offset:  452
//         uint type;                 // Offset:  456
//         float alpha;               // Offset:  460
//         float jitter;              // Offset:  464
//     } cOpacity;                    // Offset:  448
//     struct {
//         float start;               // Offset:  468
//         float end;                 // Offset:  472
//         uint type;                 // Offset:  476
//         float alpha;               // Offset:  480
//         float jitter;              // Offset:  484
//     } cOpacityTexturesExponent;    // Offset:  468
//     struct {
//         float start;               // Offset:  488
//         float end;                 // Offset:  492
//         uint type;                 // Offset:  496
//         float alpha;               // Offset:  500
//         float jitter;              // Offset:  504
//     } cScale;                      // Offset:  488
//     float cCameraScaleStartDistance;// Offset:  508
//     float cCameraScaleStartValue;  // Offset:  512
//     float cCameraScaleEndDistance; // Offset:  516
//     float cCameraScaleEndValue;    // Offset:  520
//     float cCameraOneOverEndMinusStart;// Offset:  524
//     uint cFlipbookPageCount;       // Offset:  528
//     float cFlipbookPageCycle;      // Offset:  532
//     float cNearCull;               // Offset:  536
//     float cFarCull;                // Offset:  540
//     float cNearFade;               // Offset:  544
//     float cFarFade;                // Offset:  548
//     struct {
//         float start;               // Offset:  552
//         float end;                 // Offset:  556
//         uint type;                 // Offset:  560
//         float alpha;               // Offset:  564
//         float jitter;              // Offset:  568
//     } cDrag;                       // Offset:  552
//     float3 cGravity;               // Offset:  572
//     struct {
//         float start;               // Offset:  584
//         float end;                 // Offset:  588
//         uint type;                 // Offset:  592
//         float alpha;               // Offset:  596
//         float jitter;              // Offset:  600
//     } cGravityIntensity;           // Offset:  584
//     struct {
//         float start;               // Offset:  604
//         float end;                 // Offset:  608
//         uint type;                 // Offset:  612
//         float alpha;               // Offset:  616
//         float jitter;              // Offset:  620
//     } cWindInfluenceOverLifeTime;  // Offset:  604
//     float cMinDistance;            // Offset:  624
//     float cMaxDistance;            // Offset:  628
//     float3 cTurbulenceFrequency;   // Offset:  632
//     float3 cTurbulenceAmplitude;   // Offset:  644
//     float3 cTurbulencePhase;       // Offset:  656
//     float3 cTurbulenceScrollSpeed; // Offset:  668
//     struct {
//         float start;               // Offset:  680
//         float end;                 // Offset:  684
//         uint type;                 // Offset:  688
//         float alpha;               // Offset:  692
//         float jitter;              // Offset:  696
//     } cTurbulenceIntensity;        // Offset:  680
//     uint cActiveFields;            // Offset:  700
//     struct {
//         float3 position;           // Offset:  704
//         float attenuation;         // Offset:  716
//         float3 direction;          // Offset:  720
//         float maxDistance;         // Offset:  732
//         float magnitude;           // Offset:  736
//         float _pad0;               // Offset:  740
//         float _pad1;               // Offset:  744
//         float _pad2;               // Offset:  748
//     } cFields[4];                  // Offset:  704
//     float cNewtonMinDistance;      // Offset:  896
//     float cCollisionBounciness;    // Offset:  900
//     float cCollisionBouncinessRandom;// Offset:  904
//     float cCollisionRadius;        // Offset:  908
//     float cDepthCollisionAgeThreshold;// Offset:  912
//     float cDepthCollisionThreshold;// Offset:  916
//     float cPlaneCollisionHeight;   // Offset:  920
//     float3 emitterPosition;        // Offset:  924
//     float3 emitterVelocity;        // Offset:  936
//     float3 velocityDirectionWorld; // Offset:  948
//     float3x3 emitterOrientation;   // Offset:  960
//     float emitterDistance;         // Offset:  996
//     float cMFXEventProbability;    // Offset: 1000
//     uint4 ramp1Indices[2];         // Offset: 1004
//     uint4 ramp3Indices;            // Offset: 1036
//     uint4 ramp1Constants[2];       // Offset: 1052
//     float4 ramp3Constants;         // Offset: 1084
// };
//
// struct ParticleGPURamp3Data
// {
//     float3 multiplier;             // Offset:    0
//     float3 offset;                 // Offset:   12
// };
//
// struct ParticleGPUSimulationJob
// {
//     uint flags;                    // Offset:    0
//     uint batchIndex;               // Offset:    4
//     uint systemIndex;              // Offset:    8
//     float batchAge;                // Offset:   12
//     uint usedCount;                // Offset:   16
//     uint primStart;                // Offset:   20
//     uint geoDataStart;             // Offset:   24
//     uint aux0;                     // Offset:   28
//     uint aux1;                     // Offset:   32
//     uint readbackStart;            // Offset:   36
//     uint drawCallBatchIndex;       // Offset:   40
// };
//
// struct ParticleGPUParticleReadbackData
// {
//     float3 prevPosition;           // Offset:    0
//     float3 position;               // Offset:   12
//     uint flags;                    // Offset:   24
// };
//
// struct ParticleGPUBatchReadbackData
// {
//     uint particleCount;            // Offset:    0
//     float3 boundsMin;              // Offset:    4
//     float3 boundsMax;              // Offset:   16
// };
//
// cbuffer ConstBuf__globalData : register(b0)
// {
//
//   struct
//   {
//
//     struct
//     {
//       float4x4 worldToCamera;
//       float4x4 cameraToWorld;
//       float4 cullPlanes[5];
//       float nearPlane;
//       float farPlane;
//       float2 _pad;
//     } cameras[11];
//
//     float3 windVolumeOffset;
//     float3 windVolumeRatio;
//     float3 ambientWind;
//     uint flags;
//     float4x4 depthWorldToCamera;
//     float4x4 depthWorldToProj;
//
//     struct
//     {
//       float3 cFogColor;
//       float cHeightFalloff;
//       float3 cEyePosition;
//       float cHeightDensity;
//       float cStartDistance;
//       float cGlobalDensity;
//       float cDepthReprojectScale;
//       float cDepthReprojectBias;
//       float4x4 cInvProjNoZReproj;
//       float3 cDirectionalFogDirection;
//       float cDirectionalityPower;
//       float3 cDirectionalFogColor;
//       float cDensityMapSparseBias;
//       float3 cDensityMapInvExtents;
//       float cDensityMapSparseSegmentScale;
//       float3 cDensityMapBias;
//       float cDensityMapSparseCutoff;
//       float cVolFogExponentMultiply;
//       float cVolFogDistanceMultiply;
//       float cVolFogExponentNormalize;
//       float cVolFogDistanceNormalize;
//       float cVolFogResolutionScale;
//       int cVolFogWidth;
//       int cVolFogHeight;
//       int cVolFogDepth;
//     } atmosphericConstants;
//
//   } resourceTables__globalData : packoffset(c0);
//
//
// SamplerState resourceTables__globalData__smpLinearClamp_s : register(s0);
// StructuredBuffer<ParticleGPUSystemData> resourceTables__globalData.systemData : register(t0);
// StructuredBuffer<ParticleGPURamp3Data> resourceTables__globalData.ramp3Data : register(t5);
// Texture2D<float3> resourceTables__globalData.ramp3Textures : register(t7);
// Texture3D<float3> resourceTables__globalData.windVolumeTexture : register(t8);
// Texture2D<float> resourceTables__globalData.linearDepthTexture : register(t9);
// Texture2D<float4> resourceTables__globalData.normalTexture : register(t10);
// StructuredBuffer<ParticleGPUSimulationJob> resourceTables__jobData.simulationJobs : register(t11);
// RWStructuredBuffer<float3> resourceTables__globalData.positions : register(u8);
// RWStructuredBuffer<float> resourceTables__globalData.spawnTimes : register(u9);
// RWStructuredBuffer<float3> resourceTables__globalData.velocities : register(u10);
// RWStructuredBuffer<float> resourceTables__globalData.lifeTimes : register(u12);
// RWStructuredBuffer<uint> resourceTables__globalData.colors : register(u13);
// RWStructuredBuffer<ParticleGPUParticleReadbackData> resourceTables__globalData.particleReadbackData : register(u25);
// RWStructuredBuffer<ParticleGPUBatchReadbackData> resourceTables__globalData.batchReadbackData : register(u26);
// RWTexture3D<uint> resourceTables__globalData.PC_ScatterMap : register(u29);
// RWTexture3D<uint> resourceTables__globalData.PC_DensityMap : register(u30);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Texture2D<float4> StereoParams : register(t125);
//
//
// void main)
// {
//   Textures:.x = [t0-t10].val[/4];
//   Textures:.y = [t0-t10].val[/4+1];
//   Textures:.z = [t0-t10].val[/4+2];
//   Textures:.w = [t0-t10].val[/4+3];
// // Needs manual fix for instruction:
// // unknown dcl_: dcl_uav_typed_texture3d (uint,uint,uint,uint) u29
// // Needs manual fix for instruction:
// // unknown dcl_: dcl_uav_typed_texture3d (uint,uint,uint,uint) u30
//   float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16,r17,r18,r19,r20,r21,r22,r23,r24,r25,r26,r27,r28,r29,r30;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   float4 x0[2];
//   float4 x1[2];
//   float4 x2[2];
// // Needs manual fix for instruction:
// // unknown dcl_: dcl_tgsm_raw g1, 8
// // Needs manual fix for instruction:
// // unknown dcl_: dcl_tgsm_raw g2, 4
// // Needs manual fix for instruction:
// // unknown dcl_: dcl_thread_group 64, 1, 1
//   r0.x = resourceTables__globalData.systemData[vThreadGroupID.x].cSystemToWorld._m10;
//   r0.y = resourceTables__globalData.systemData[vThreadGroupID.x].cSystemToWorld._m20;
//   r0.z = resourceTables__globalData.systemData[vThreadGroupID.x].cSystemToWorld._m30;
//   r0.w = resourceTables__globalData.systemData[vThreadGroupID.x].cSystemToWorld._m01;
//   r1.x = resourceTables__globalData.systemData[r0.y].cSystemToWorld._m00;
//   r1.y = resourceTables__globalData.systemData[r0.y].cSystemToWorld._m10;
//   r1.z = resourceTables__globalData.systemData[r0.y].cSystemToWorld._m20;
//   r1.w = resourceTables__globalData.systemData[r0.y].cSystemToWorld._m30;
//   r2.x = resourceTables__globalData.systemData[r0.y].cSystemToWorld._m01;
//   r2.y = resourceTables__globalData.systemData[r0.y].cSystemToWorld._m11;
//   r2.z = resourceTables__globalData.systemData[r0.y].cSystemToWorld._m31;
//   r2.w = resourceTables__globalData.systemData[r0.y].cSystemToWorld._m21;
//   r3.x = resourceTables__globalData.systemData[r0.y].cSystemToWorld._m02;
//   r3.y = resourceTables__globalData.systemData[r0.y].cSystemToWorld._m12;
//   r3.z = resourceTables__globalData.systemData[r0.y].cSystemToWorld._m22;
//   r3.w = resourceTables__globalData.systemData[r0.y].cSystemToWorld._m32;
//   r4.x = resourceTables__globalData.systemData[r0.y].cTimeStep;
//   r4.y = resourceTables__globalData.systemData[r0.y].cFlags;
//   r4.z = resourceTables__globalData.systemData[r0.y].cLifeTime;
//   r5.x = resourceTables__globalData.systemData[r0.y].cFogDensityStrength;
//   r5.y = resourceTables__globalData.systemData[r0.y].cAge;
//   r5.z = resourceTables__globalData.systemData[r0.y].systemRandom;
//   r5.w = resourceTables__globalData.systemData[r0.y].cAlignMode;
//   if (stride=1100)(mixed,mixed,mixed,mixed) == 0) {
//   // No code for instruction (needs manual fix):
//   if_z vThreadIDInGroupFlattened.x
//   }
//    = cmp( < );
//   if (r0.w != 0) {
//     r0.w =  ?  : 0;
//     bitmask.x = ((~(-1 << r4.y)) << 4096) & 0xffffffff;  r7.x = (((uint) << 4096) & bitmask.x) | ((uint) & ~bitmask.x);
//     bitmask.y = ((~(-1 << r4.y)) << 0) & 0xffffffff;  r7.y = (((uint) << 0) & bitmask.y) | ((uint) & ~bitmask.y);
//     r0.w = 26 ^ 6;
//     if (r0.w == 0) r5.w = 0; else if (r0.w+61 < 32) {     r5.w = (uint) << (32-(r0.w + 61)); r5.w = (uint)r5.w >> (32-r0.w);    } else r5.w = (uint) >> 61;
//     r0.x = 16 ^ 10;
//     r0.x = (int)r5.w * ;
//     null = (uint)r0.x >> (uint)r0.x;
//     r5.w = (int)r0.x ^ 4;
//     r0.x = (int)r5.w * ;
//     null = (uint)r0.x >> (uint)r0.x;
//     r5.w = (int)r0.x ^ 15;
//     r0.x = r0.x ? r5.w : ;
//     r0.z = r0[r7.x].val[r5.z/4];
// }
//////////////////////////////// HLSL Errors ////////////////////////////////
// error X3506: unrecognized compiler target '                                        // Textures:  t0-t10'
/////////////////////////////////////////////////////////////////////////////
