// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.63 on Sun Oct  9 13:48:43 2022
//
//
// Note: shader requires additional functionality:
//       64 UAV slots
//
//
// 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[2048], dynamicIndexed
dcl_resource_texture2d (float,float,float,float) t0
dcl_uav_structured u8, 4
dcl_input vThreadIDInGroupFlattened
dcl_input vThreadGroupID.x
dcl_temps 50
dcl_tgsm_structured g0, 4, 64
dcl_thread_group 64, 1, 1
dcl_constantbuffer CB12[3], immediateIndexed
ishl r0.x, vThreadGroupID.x, l(1)
and r0.y, vThreadIDInGroupFlattened.x, l(7)
ushr r0.z, vThreadIDInGroupFlattened.x, l(3)
ige r0.w, r0.y, cb0[r0.x + 0].z
ige r1.x, r0.z, cb0[r0.x + 0].w
or r0.w, r0.w, r1.x
if_nz r0.w
  mov r0.w, l(0)
else
  iadd r1.xy, r0.yzyy, cb0[r0.x + 0].xyxx
  itof r11.x, r1.x
  itof r41.x, cb0[2047].z
  mul r41.x, r41.x, l(0.500000)
  mad r11.x, cb12[0].x, r41.x, r11.x
  ftoi r1.x, r11.x
  imax r0.yz, r1.xxyx, l(0, 0, 0, 0)
  imin r0.yz, r0.yyzy, cb0[2047].zzwz
  ine r0.yz, r0.yyzy, r1.xxyx
  or r0.y, r0.z, r0.y
  if_nz r0.y
    mov r0.w, l(0)
  else
    mov r1.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r0.y, r1.xyzw, t0.yxzw
    lt r0.w, r0.y, cb0[r0.x + 1].y
  endif
endif
store_structured g0.x, vThreadIDInGroupFlattened.x, l(0), r0.w
sync_g_t
if_z vThreadIDInGroupFlattened.x
  mov r0.yz, l(0,0,0,0)
  loop
    uge r0.w, r0.z, l(64)
    breakc_nz r0.w
    ld_structured r0.w, r0.z, l(0), g0.xxxx
    and r0.w, r0.w, l(1)
    iadd r0.y, r0.w, r0.y
    iadd r0.z, r0.z, l(1)
  endloop
  mov r1.x, cb0[r0.x + 1].x
  mov r1.y, l(0)
  atomic_iadd u8, r1.xyxx, r0.y
endif
ret
// Approximately 0 instruction slots used
