//Shadows PS from cache.
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Fri Jan 14 20:08:05 2022
//
//
// Note: shader requires additional functionality:
//       64 UAV slots
//
//
// Buffer Definitions:
//
// cbuffer ConstBuf__modelData
// {
//
//   struct ModelData
//   {
//
//       uint lightGroupID;             // Index:    0
//       uint modelFlags;               // Index:    0.y
//       float lodFade;                 // Index:    0.z
//       float displacementBlend;       // Index:    0.w
//       int turbulenceDataIdx;         // Index:    1
//       int instanceOffset;            // Index:    1.y
//       int characterFxIdx;            // Index:    1.z
//       uint debugRenderChannel;       // Index:    1.w
//       uint decayWriteOffset;         // Index:    2
//       uint decayWriteMaxCount;       // Index:    2.y
//       uint decayAtomicCounterIndex;  // Index:    2.z
//       float modelAlpha;              // Index:    2.w
//       float emissiveScale;           // Index:    3
//       float desaturationScale;       // Index:    3.y
//       float decayCoverageEstimation; // Index:    3.z
//       float3 quantScale;             // Index:    4
//       float3 quantBias;              // Index:    5
//
//   } resourceTables__modelData;       // Index:    0-5.z            Components:    23
//
// }
//
// cbuffer ConstBuf__viewData
// {
//
//   struct ViewData
//   {
//
//       float4x4 view;                 // Index:    0
//       float4x4 invView;              // Index:    4
//       float4x4 proj;                 // Index:    8
//       float4x4 invViewProjNoZReproj; // Index:   12
//       float4x4 viewProj;             // Index:   16
//       float4x4 invViewProj;          // Index:   20
//       float4x4 previousViewProj;     // Index:   24
//       float4 prevLodEyePos;          // Index:   28
//       float4 lodEyePos;              // Index:   29
//       float4 viewDirDepthBias;       // Index:   30
//       float3 eyePos;                 // Index:   31
//       float2 viewportSize;           // Index:   32
//       float2 invViewportSize;        // Index:   32.z
//       float4 mirrorPlaneWS;          // Index:   33
//       float2 mirrorViewportSize;     // Index:   34
//       float2 opaqueRefractionViewportSize;// Index:   34.z
//       float windTime;                // Index:   35
//       float deltaTime;               // Index:   35.y
//       float depthReprojectScale;     // Index:   35.z
//       float depthReprojectBias;      // Index:   35.w
//       uint shadowViewType;           // Index:   36
//       float normalDepthBias;         // Index:   36.y
//       float noNormalAA;              // Index:   36.z
//       float noNormalFromAlpha;       // Index:   36.w
//       float noOpaqueTransparency;    // Index:   37
//       float translucentAmount;       // Index:   37.y
//       uint framePhase;               // Index:   37.z
//       float cameraAmbientExposure;   // Index:   37.w
//       float fxExposure;              // Index:   38
//       float fxAmbientExposure;       // Index:   38.y
//       uint checkerboardPhase;        // Index:   38.z
//       float sparkleIntensityScale;   // Index:   38.w
//
//   } resourceTables__viewData;        // Index:    0-38             Components:   156
                                        // Texture:   t8
//
// }
//
// cbuffer ConstBuf__materialData
// {
//
//   struct MaterialData
//   {
//
//       float2 material_cst_ParticleSpawnReference;// Index:    0
//       float material_cst_ParticleSpawnReferenceRange;// Index:    0.z
//
//   } resourceTables__materialData;    // Index:    0.xyz            Components:     3
                                        // Textures:  t11-t26
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// resourceTables__viewData__smpLinear    sampler      NA          NA    1        1
// resourceTables__viewData__smpLowAniso    sampler      NA          NA    2        1
// resourceTables__passData.depthTexture    texture  float4          2d    0        1
// resourceTables__viewData.blueNoiseTexture    texture   float     2darray    8        1
// resourceTables__materialData.material_particlespawn    texture  float4          2d   11        1
// resourceTables__materialData.layer_0__diffuse    texture  float4          2d   17        1
// resourceTables__materialData.layer_0__emissive    texture  float4          2d   18        1
// resourceTables__materialData.layer_0__opacity    texture  float4          2d   19        1
// resourceTables__materialData.layer_1__normal    texture  float4          2d   21        1
// resourceTables__materialData.layer_1__ao    texture  float4          2d   22        1
// resourceTables__materialData.layer_2__alpha    texture  float4          2d   24        1
// resourceTables__materialData.layer_3__alpha    texture  float4          2d   26        1
// resourceTables__passData.decaySpawnBuffer        UAV    uint         buf    8        1
// resourceTables__passData.decayAtomicCountersBuffer        UAV    uint         buf    9        1
// ConstBuf__modelData               cbuffer      NA          NA    1        1
// ConstBuf__viewData                cbuffer      NA          NA    3        1
// ConstBuf__materialData            cbuffer      NA          NA    4        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// VERT_ID                  0   x           1     NONE    uint   x
// TEXCOORD                 0   xy          2     NONE   float   xy
// NORMAL                   0   xyz         3     NONE   float   xyz
// TANGENT                  0   xyz         4     NONE   float   xyz
// BINORMAL                 0   xyz         5     NONE   float   xyz
// TEXCOORD                 8   xyz         6     NONE   float   xyz
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
// SV_Target                1   xyzw        1   TARGET   float   xyzw
// SV_Target                2   xyzw        2   TARGET   float   xyzw
// SV_Target                3   xyzw        3   TARGET   float   xyzw
// SV_Target                4   xy          4   TARGET   float   xy
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[4], immediateIndexed
dcl_constantbuffer cb3[38], immediateIndexed
dcl_constantbuffer cb4[1], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2darray (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t11
dcl_resource_texture2d (float,float,float,float) t17
dcl_resource_texture2d (float,float,float,float) t18
dcl_resource_texture2d (float,float,float,float) t19
dcl_resource_texture2d (float,float,float,float) t21
dcl_resource_texture2d (float,float,float,float) t22
dcl_resource_texture2d (float,float,float,float) t24
dcl_resource_texture2d (float,float,float,float) t26
dcl_uav_typed_buffer (uint,uint,uint,uint) u8
dcl_uav_typed_buffer (uint,uint,uint,uint) u9
dcl_input_ps_siv linear noperspective v0.xyzw, position
dcl_input_ps constant v1.x
dcl_input_ps linear v2.xy
dcl_input_ps linear v3.xyz
dcl_input_ps linear v4.xyz
dcl_input_ps linear v5.xyz
dcl_input_ps linear v6.xyz
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xy
dcl_temps 50
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r40.xyzw, l(0, 0, 0, 0), t125.xyzw
and r0.x, v1.x, l(0x00ffffff)
ne r0.y, l(1.000000), cb1[2].w
if_nz r0.y
  ne r0.y, l(0.000000, 0.000000, 0.000000, 0.000000), cb3[37].x
  if_z r0.y
    ftoi r0.yz, v0.xxyx
    iadd r0.w, r0.x, l(1)
    and r0.w, r0.w, l(7)
    imad r0.yz, r0.wwww, l(0, 7, 7, 0), r0.yyzy
    and r1.xy, r0.yzyy, l(63, 63, 0, 0)
    and r1.z, l(7), cb3[37].z
    mov r1.w, l(0)
    ld_indexable(texture2darray)(float,float,float,float) r0.y, r1.xyzw, t8.yxzw
  else
    mov r0.y, l(0)
  endif
  ge r0.y, r0.y, cb1[2].w
  discard_nz r0.y
endif
mul r0.yz, v0.xxyx, cb3[32].zzwz
mad r0.yz, r0.yyzy, l(0.000000, 2.000000, -2.000000, 0.000000), l(0.000000, -1.000000, 1.000000, 0.000000)
mad r0.w, v0.z, cb3[35].z, cb3[35].w
rcp r0.w, r0.w
mov r1.z, -r0.w
mul r1.xy, r0.yzyy, r1.zzzz
mov r1.w, l(1.000000)

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

dp4 r2.x, r1.xyzw, cb3[12].xyzw
dp4 r2.y, r1.xyzw, cb3[13].xyzw
dp4 r2.z, r1.xyzw, cb3[14].xyzw
add r1.xyz, -r2.xyzx, cb3[29].xyzx

//Tessellation specular PS..
mul r41.xyz, r40.yyyy, cb3[16].xyzx
mul r41.w, cb3[16].x, cb3[16].x
mad r41.w, cb3[16].y, cb3[16].y, r41.w
mad r41.w, cb3[16].z, cb3[16].z, r41.w
div r41.xyz, r41.xyzx, r41.wwww
mad r1.x, r40.x, r41.x, r1.x
mad r1.y, r40.x, r41.y, r1.y
mad r1.z, r40.x, r41.z, r1.z

dp3 r0.w, r1.xyzx, r1.xyzx
rsq r1.w, r0.w
mul r1.xyz, r1.wwww, r1.xyzx
dp3 r2.x, r1.xyzx, v4.xyzx
dp3 r2.y, r1.xyzx, v5.xyzx
dp3 r2.z, r1.xyzx, v3.xyzx
dp3 r1.x, v3.xyzx, v3.xyzx
rsq r1.x, r1.x
mul r1.xyz, r1.xxxx, v3.xyzx
dp3 r2.w, -r2.xyzx, -r2.xyzx
rsq r2.w, r2.w
mul r2.xyz, r2.wwww, -r2.xyzx
lod r3.x, v2.xyxx, t19.x, s1
mad r3.y, r3.x, l(2.000000), l(10.000000)
mov r2.w, -r2.y
dp2 r2.y, r2.xwxx, r2.xwxx
sqrt r2.y, r2.y
max r2.y, r2.y, l(0.000001)
div r2.xyz, r2.xwzx, r2.yyyy
mul r2.w, r3.y, r2.z
mul r3.yzw, r2.xxyw, l(0.000000, 0.000976562500, 0.000976562500, 0.000325520843)
min r2.z, r3.w, l(-0.00520833349)
mov r4.xy, v2.xyxx
mov r2.w, l(0.999000)
loop
  mad r5.xyzw, r2.xyxy, l(0.000976562500, 0.000976562500, 0.00195312500, 0.00195312500), r4.xyxy
  mad r6.xyzw, r2.xyxy, l(0.00390625000, 0.00390625000, 0.00292968750, 0.00292968750), r4.xyxy
  sample_l_indexable(texture2d)(float,float,float,float) r7.x, r5.xyxx, t19.xyzw, s1, r3.x
  sample_l_indexable(texture2d)(float,float,float,float) r7.y, r5.zwzz, t19.yxzw, s1, r3.x
  sample_l_indexable(texture2d)(float,float,float,float) r7.z, r6.zwzz, t19.yzxw, s1, r3.x
  sample_l_indexable(texture2d)(float,float,float,float) r7.w, r6.xyxx, t19.yzwx, s1, r3.x
  mad r8.xyzw, r2.zzzz, l(2.000000, 3.000000, 1.000000, 4.000000), r2.wwww
  ge r7.xyzw, r7.xyzw, r8.zxyw
  mov r9.xy, r6.zwzz
  mov r9.z, r8.y
  mov r6.z, r8.w
  movc r6.xyz, r7.zzzz, r9.xyzx, r6.xyzx
  mov r9.xy, r5.zwzz
  mov r9.z, r8.x
  movc r6.xyz, r7.yyyy, r9.xyzx, r6.xyzx
  mov r8.xy, r5.xyxx
  movc r5.xyz, r7.xxxx, r8.xyzx, r6.xyzx
  or r4.zw, r7.zzzw, r7.xxxy
  or r3.w, r4.w, r4.z
  if_nz r3.w
    mov r4.xy, r5.xyxx
    mov r2.w, r5.z
    break
  endif
  mov r4.xy, r5.xyxx
  mov r2.w, r5.z
endloop
sample_l_indexable(texture2d)(float,float,float,float) r3.w, r4.xyxx, t19.yzwx, s1, r3.x
mad r2.xy, -r2.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r4.xyxx
sample_l_indexable(texture2d)(float,float,float,float) r2.x, r2.xyxx, t19.xyzw, s1, r3.x
add r2.y, -r2.z, r2.w
add r2.z, r2.w, -r3.w
add r2.x, -r2.x, r2.y
mul r2.yw, |r2.zzzz|, r3.yyyz
add r2.x, |r2.x|, |r2.z|
max r2.x, r2.x, l(0.000010)
div r2.xy, r2.ywyy, r2.xxxx
add r2.xy, -r2.xyxx, r4.xyxx
mul r2.zw, v2.xxxy, l(0.000000, 0.000000, 0.200000, 0.200000)
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r2.xyxx, t17.xyzw, s2
lt r4.xyz, r3.xyzx, l(0.00313080009, 0.00313080009, 0.00313080009, 0.000000)
mul r5.xyz, r3.xyzx, l(12.920000, 12.920000, 12.920000, 0.000000)
log r3.xyz, r3.xyzx
mul r3.xyz, r3.xyzx, l(0.416666657, 0.416666657, 0.416666657, 0.000000)
exp r3.xyz, r3.xyzx
mad r3.xyz, r3.xyzx, l(1.055000, 1.055000, 1.055000, 0.000000), l(-0.055000, -0.055000, -0.055000, 0.000000)
movc r3.xyz, r4.xyzx, r5.xyzx, r3.xyzx
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r2.xyxx, t18.xyzw, s1
mul r4.xyz, r4.xyzx, l(6.444800, 9.822160, 10.000000, 0.000000)
mul r5.xyz, r3.xyzx, l(0.482731104, 0.552344859, 0.561645329, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r3.w, r2.xyxx, t22.yzwx, s2
mov_sat r4.w, r3.w
add r4.w, -r4.w, l(1.000000)
lt r5.w, l(0.000000), r4.w
if_nz r5.w
  sample_indexable(texture2d)(float,float,float,float) r6.xyz, r2.xyxx, t21.xyzw, s2
  mad r6.xyz, r6.xyzx, l(2.007874, 2.007874, 2.007874, 0.000000), l(-1.007874, -1.007874, -1.007874, 0.000000)
  dp3 r5.w, r6.xyzx, r6.xyzx
  sqrt r5.w, r5.w
  max r5.w, r5.w, l(0.000010)
  rcp r6.w, r5.w
  add r5.w, r5.w, l(-1.000000)
  mad r7.x, r4.w, r5.w, l(1.000000)
  mad r6.xyz, r6.xyzx, r6.wwww, l(-0.000000, -0.000000, -1.000000, 0.000000)
  mad r6.xyz, r4.wwww, r6.xyzx, l(0.000000, 0.000000, 1.000000, 0.000000)
  mul r3.xyz, r3.xyzx, r4.wwww
  mad r5.xyz, r3.xyzx, l(0.262020, 0.192406237, 0.183105767, 0.000000), r5.xyzx
  mul r3.x, r4.w, l(0.570190)
  add r3.y, r3.w, l(-1.000000)
  mad r8.x, r4.w, r3.y, l(1.000000)
  mad r3.yz, r4.wwww, l(0.000000, -0.890612781, -0.030000, 0.000000), l(0.000000, 0.950000, 0.030000, 0.000000)
  mad r4.xyz, r4.wwww, -r4.xyzx, r4.xyzx
else
  mov r7.x, l(1.000000)
  mov r3.xyz, l(0,0.950000,0.030000,0)
  mov r6.xyz, l(0,0,1.000000,0)
  mov r8.x, l(1.000000)
endif
sample_indexable(texture2d)(float,float,float,float) r2.z, r2.zwzz, t24.xyzw, s2
mov_sat r2.z, r2.z
lt r2.w, l(0.000000), r2.z
if_nz r2.w
  add r9.xyz, -r6.xyzx, l(0.000000, 0.000000, 1.000000, 0.000000)
  mad r6.xyz, r2.zzzz, r9.xyzx, r6.xyzx
  add r2.w, -r7.x, l(1.000000)
  mad r7.x, r2.z, r2.w, r7.x
  mad r3.x, r2.z, -r3.x, r3.x
  add r9.xyz, -r5.xyzx, l(0.999999940, 0.784374535, 0.00784313772, 0.000000)
  mad r5.xyz, r2.zzzz, r9.xyzx, r5.xyzx
  add r2.w, -r3.y, l(0.353000)
  mad r3.y, r2.z, r2.w, r3.y
  add r2.w, -r8.x, l(1.000000)
  mad r8.x, r2.z, r2.w, r8.x
  add r2.w, -r3.z, l(0.042000)
  mad r3.z, r2.z, r2.w, r3.z
  mad r4.xyz, r2.zzzz, -r4.xyzx, r4.xyzx
endif
sample_indexable(texture2d)(float,float,float,float) r2.z, r2.xyxx, t26.yzxw, s1
mad r0.w, -r0.w, r1.w, l(20.000000)
mul_sat r0.w, r0.w, l(0.0666666701)
mad r0.w, r0.w, l(3.14159274), l(-1.57079637)
sincos r0.w, null, r0.w
mad r0.w, r0.w, l(0.500000), l(0.500000)
add r0.w, -r0.w, l(1.000000)
mul_sat r0.w, r0.w, r2.z
lt r1.w, l(0.000000), r0.w
if_nz r1.w
  sample_indexable(texture2d)(float,float,float,float) r2.xyz, r2.xyxx, t17.xyzw, s1
  mul r0.w, r0.w, l(0.882690)
  add r9.xyz, -r6.xyzx, l(0.000000, 0.000000, 1.000000, 0.000000)
  mad r6.xyz, r0.wwww, r9.xyzx, r6.xyzx
  add r1.w, -r7.x, l(1.000000)
  mad r7.x, r0.w, r1.w, r7.x
  add r1.w, -r3.x, l(1.000000)
  mad r3.x, r0.w, r1.w, r3.x
  add r9.xyz, -r5.xyzx, l(0.999999940, 0.999999940, 0.999999940, 0.000000)
  mad r5.xyz, r0.wwww, r9.xyzx, r5.xyzx
  add r1.w, -r3.y, l(0.050000)
  mad r3.y, r0.w, r1.w, r3.y
  add r1.w, -r8.x, l(1.000000)
  mad r8.x, r0.w, r1.w, r8.x
  add r1.w, -r3.z, l(0.042000)
  mad r3.z, r0.w, r1.w, r3.z
  mad r2.xyz, r2.xyzx, l(2000.000000, 2000.000000, 2000.000000, 0.000000), -r4.xyzx
  mad r4.xyz, r0.wwww, r2.xyzx, r4.xyzx
endif
dp3 r0.w, v4.xyzx, v4.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, v4.xyzx
dp3 r0.w, v5.xyzx, v5.xyzx
rsq r0.w, r0.w
mul r9.xyz, r0.wwww, v5.xyzx
dp3 r0.w, r6.xyzx, r6.xyzx
rsq r0.w, r0.w
mul r6.xyz, r0.wwww, r6.xyzx
mul r9.xyz, r9.xyzx, r6.yyyy
mad r2.xyz, r6.xxxx, r2.xyzx, r9.xyzx
mad r2.xyz, r6.zzzz, r1.xyzx, r2.xyzx
dp3 r0.w, r2.xyzx, r2.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, r2.xyzx
ne r0.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb3[36].z
deriv_rtx_fine r6.xyz, r1.xyzx
deriv_rty_fine r1.xyz, r1.xyzx
dp3 r1.w, r6.xyzx, r6.xyzx
dp3 r1.x, r1.xyzx, r1.xyzx
add r1.x, r1.x, r1.w
min r7.y, r1.x, l(0.300000)
movc r1.xy, r0.wwww, l(1.000000,0,0,0), r7.xyxx
add r0.w, -r3.y, l(1.000000)
mul r0.w, r0.w, r0.w
max r1.z, r1.x, l(0.600000)
mad r1.z, r1.z, l(-0.527635), l(0.520718)
max r1.z, r1.z, l(0.000000)
mad r0.w, r0.w, r0.w, r1.z
add r0.w, r1.y, r0.w
sqrt r0.w, r0.w
min r0.w, r0.w, l(1.000000)
max r0.w, r0.w, l(0.001000)
sqrt r0.w, r0.w
add r8.y, -r0.w, l(1.000000)
lt r0.w, r5.x, l(0.040450)
mul r1.y, r5.x, l(0.0773993805)
add r1.zw, r5.xxxy, l(0.000000, 0.000000, 0.055000, 0.055000)
mul r1.zw, r1.zzzw, l(0.000000, 0.000000, 0.947867334, 0.947867334)
log r1.z, r1.z
mul r1.z, r1.z, l(2.400000)
exp r1.z, r1.z
movc r0.w, r0.w, r1.y, r1.z
lt r1.y, r5.y, l(0.040450)
mul r1.z, r5.y, l(0.0773993805)
log r1.w, r1.w
mul r1.w, r1.w, l(2.400000)
exp r1.w, r1.w
movc r1.y, r1.y, r1.z, r1.w
lt r1.z, r5.z, l(0.040450)
mul r1.w, r5.z, l(0.0773993805)
add r2.w, r5.z, l(0.055000)
mul r2.w, r2.w, l(0.947867334)
log r2.w, r2.w
mul r2.w, r2.w, l(2.400000)
exp r2.w, r2.w
movc r1.z, r1.z, r1.w, r2.w
mul o3.w, r3.x, cb3[37].y
mul r1.w, l(0.900000), cb3[37].w
exp r1.w, r1.w
mul r3.xyw, r1.wwww, r4.xyxz
mul r3.xyw, r3.xyxw, cb1[3].xxxx
ult r1.w, cb1[2].z, l(64)
if_nz r1.w
  add r4.xy, v2.xyxx, v2.xyxx
  sample_l_indexable(texture2d)(float,float,float,float) r1.w, r4.xyxx, t11.yzwx, s1, l(0.000000)
  ne r2.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb3[37].x
  if_z r2.w
    ftoi r4.xy, v0.xyxx
    iadd r0.x, r0.x, cb3[37].z
    imul null, r0.x, r0.x, l(4099)
    and r0.x, r0.x, l(63)
    iadd r4.xy, r0.xxxx, r4.xyxx
    utof r4.xy, r4.xyxx
    mul r4.xy, r4.xyxx, l(0.0671105608, 0.00583714992, 0.000000, 0.000000)
    add r0.x, r4.y, r4.x
    frc r0.x, r0.x
    mul r0.x, r0.x, l(52.982918)
    frc r0.x, r0.x
  else
    mov r0.x, l(0)
  endif
  add r2.w, cb4[0].z, cb4[0].x
  ge r0.x, cb1[3].z, r0.x
  ftou r4.xy, v0.xyxx
  mov r4.zw, l(0,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r4.x, r4.xyzw, t0.xyzw
  add r4.x, r4.x, -v0.w
  ge r4.x, l(0.000005), |r4.x|
  and r0.x, r0.x, r4.x
  lt r4.x, cb4[0].y, r1.w
  and r0.x, r0.x, r4.x
  lt r2.w, r1.w, r2.w
  and r0.x, r0.x, r2.w
  if_nz r0.x
    imm_atomic_iadd r4.x, u9, cb1[2].z, l(1)
    ult r0.x, r4.x, cb1[2].y
    if_nz r0.x
      ftou r4.yz, v0.xxyx
      add r0.x, r1.w, -cb4[0].y
      div_sat r0.x, r0.x, cb4[0].z
      add r0.x, -r0.x, l(1.000000)
      mul r0.x, r0.x, l(255.000000)
      ftou r0.x, r0.x
      iadd r1.w, r4.x, cb1[2].x
      ishl r2.w, r1.w, l(1)
      bfi r4.x, l(16), l(16), r4.y, r4.z
      store_uav_typed u8.xyzw, r2.wwww, r0.xxxx
      bfi r0.x, l(31), l(1), r1.w, l(1)
      store_uav_typed u8.xyzw, r0.xxxx, r4.xxxx
    endif
  endif
endif
and r0.x, l(8), cb1[0].y
max r1.w, r3.w, r3.y
max r1.w, r1.w, r3.x
lt r1.w, l(0.0000153787005), r1.w
add r1.x, r1.x, l(-0.950000)
mul o1.w, r1.x, l(20.000000)
ftou r4.xy, v0.xyxx
sqrt r5.xw, r0.wwww
sqrt r5.yz, r1.yyzy
mul r1.xyz, r5.xywx, l(0.250000, 0.500000, -0.250000, 0.000000)
add r1.xy, r1.yyyy, r1.xzxx
mad r6.x, r5.z, l(0.250000), r1.x
dp2 r6.y, r5.wzww, l(0.500000, -0.500000, 0.000000, 0.000000)
mad r6.z, r5.z, l(-0.250000), r1.y
and r1.xy, r4.xyxx, l(1, 1, 0, 0)
ine r0.w, r1.y, r1.x
movc r1.xy, r0.wwww, r6.xyxx, r6.xzxx
add o0.xy, r1.xyxx, l(0.000000, 0.498039216, 0.000000, 0.000000)
mul r0.w, r3.z, l(6.250000)
sqrt o0.w, r0.w
mad o1.xyz, r2.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
movc r0.x, r0.x, l(1), l(0)
and r0.w, r1.w, l(2)
iadd r0.x, r0.w, r0.x
iadd r0.x, r0.x, l(28)
utof r0.x, r0.x
mul r8.z, r0.x, l(0.00392156886)
and o3.xyz, r3.xywx, r1.wwww
max r0.x, |v6.z|, l(0.000001)

mov r37.xyz, v6.xyzx
ld_indexable(texture2d)(float,float,float,float) r41.xyzw, l(2, 0, 0, 0), t125.xyzw
ge r42.x, r41.x, l(5.0)
if_z r42.x
add r40.w, r37.z, -r41.y
mad r37.x, r41.x, r40.w, r37.x
else
add r40.w, r37.z, -r40.y
mad r37.x, r40.x, r40.w, r37.x
endif

div r0.xw, r37.xxxy, r0.xxxx
add o4.xy, -r0.xwxx, r0.yzyy
mov o0.z, l(0)
mov r8.w, l(0)
mov o2.xyzw, r8.xwyz
ret
// Approximately 329 instruction slots used
