// Unconfirmed
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.65 on Thu Sep 21 20:33:50 2017
//
//
// 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[4], immediateIndexed
dcl_constantbuffer cb1[119], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_buffer (float,float,float,float) t2
dcl_resource_buffer (float,float,float,float) t3
dcl_uav_typed_texture2d (float,float,float,float) u0
dcl_uav_typed_buffer (uint,uint,uint,uint) u1
dcl_input vThreadGroupID.xy
dcl_input vThreadIDInGroup.xy
dcl_input vThreadID.xy
//dcl_temps 13
dcl_temps 36

dcl_tgsm_structured g0, 4, 1024
dcl_tgsm_raw g1, 4
dcl_tgsm_raw g2, 4
dcl_tgsm_raw g3, 4
dcl_tgsm_raw g4, 4
dcl_tgsm_raw g5, 4
dcl_tgsm_raw g6, 4
dcl_thread_group 8, 8, 1

dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r36.xyzw, l(0, 0, 0, 0), t125.xyzw

imad r0.x, vThreadIDInGroup.y, l(8), vThreadIDInGroup.x
imad r0.yz, vThreadID.xxyx, cb0[2].wwww, cb0[1].xxyx
utof r0.yz, r0.yyzy
add r0.yz, r0.yyzy, l(0.000000, 0.500000, 0.500000, 0.000000)
mul r1.xy, r0.yzyy, cb1[118].zwzz
sample_l_indexable(texture2d)(float,float,float,float) r0.w, r1.xyxx, t1.yzwx, s1, l(0.000000)
mad r1.z, r0.w, cb1[53].x, cb1[53].y
mad r0.w, r0.w, cb1[53].z, -cb1[53].w
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
add r2.y, r0.w, r1.z
if_z r0.x
  store_raw g1.x, l(0), l(340282346638528860000000000000000000000.000000)
  store_raw g2.x, l(0), l(0)
  store_raw g3.x, l(0), l(340282346638528860000000000000000000000.000000)
  store_raw g4.x, l(0), l(0)
  store_raw g5.x, l(0), l(0)
  store_raw g6.x, l(0), l(0)
endif 
sync_g_t
lt r0.w, r2.y, l(20000.000000)
if_nz r0.w
  atomic_umin g1, l(0), r2.y
  atomic_umax g2, l(0), r2.y
endif 
sync_g_t
ld_raw r3.z, l(0), g1.xxxx
ld_raw r4.z, l(0), g2.xxxx
if_nz r0.w
  add r0.w, r3.z, r4.z
  mul r0.w, r0.w, l(0.500000)
  ge r1.z, r2.y, r0.w
  if_nz r1.z
    atomic_umin g3, l(0), r2.y
  endif 
  ge r0.w, r0.w, r2.y
  if_nz r0.w
    atomic_umax g4, l(0), r2.y
  endif 
endif 
sync_g_t
ld_raw r5.z, l(0), g3.xxxx
ld_raw r6.z, l(0), g4.xxxx
ieq r0.w, r3.z, l(0x7f7fffff)
ieq r1.z, r4.z, l(0)
and r0.w, r0.w, r1.z
lt r1.z, |cb1[25].x|, l(0.000010)
lt r1.w, |cb1[26].x|, l(0.000010)
and r1.z, r1.w, r1.z
if_nz r1.z
  mov r7.x, cb1[28].x
  mov r7.y, cb1[29].y
  add r1.zw, r7.xxxy, r7.xxxy
  utof r8.xyzw, cb0[1].zwxy
  mul r2.zw, r1.zzzw, r8.xxxy
  mul r7.zw, cb0[2].xxxy, cb1[117].xxxy
  div r2.zw, r2.zzzw, r7.zzzw
  add r7.zw, r8.zzzw, -cb1[116].xxxy
  mul r1.zw, r1.zzzw, r7.zzzw
  mad r1.zw, r1.zzzw, cb1[117].zzzw, -r7.xxxy
  utof r7.xy, vThreadGroupID.xyxx
  mad r7.xy, r7.xyxx, r2.zwzz, r1.zwzz
  mul r7.xy, r7.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000)
  iadd r7.zw, vThreadGroupID.xxxy, l(0, 0, 1, 1)
  utof r7.zw, r7.zzzw
  mad r1.zw, r7.zzzw, r2.zzzw, r1.zzzw
  mul r1.zw, r1.zzzw, l(0.000000, 0.000000, 1.000000, -1.000000)
  mul r2.zw, r3.zzzz, r7.xxxy
  mul r7.zw, r6.zzzz, r7.xxxy
  min r3.xy, r2.zwzz, r7.zwzz
  mul r2.zw, r1.zzzw, r3.zzzz
  mul r7.zw, r1.zzzw, r6.zzzz
  max r6.xy, r2.zwzz, r7.zwzz
  mul r2.zw, r5.zzzz, r7.xxxy
  mul r7.xy, r4.zzzz, r7.xyxx
  min r5.xy, r2.zwzz, r7.xyxx
  mul r2.zw, r1.zzzw, r5.zzzz
  mul r1.zw, r1.zzzw, r4.zzzz
  max r4.xy, r1.zwzz, r2.zwzz
else 
  ishl r1.zw, cb0[1].zzzw, l(0, 0, 1, 1)
  utof r1.zw, r1.zzzw
  mul r2.zw, cb0[2].xxxy, cb1[117].xxxy
  div r1.zw, r1.zzzw, r2.zzzw
  utof r2.zw, cb0[1].xxxy
  add r2.zw, r2.zzzw, -cb1[116].xxxy
  mul r2.zw, r2.zzzw, cb1[117].zzzw
  mad r2.zw, r2.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
  utof r7.xy, vThreadGroupID.xyxx
  mad r7.xy, r7.xyxx, r1.zwzz, r2.zwzz
  mul r7.xy, r7.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000)
  iadd r7.zw, vThreadGroupID.xxxy, l(0, 0, 1, 1)
  utof r7.zw, r7.zzzw
  mad r1.zw, r7.zzzw, r1.zzzw, r2.zzzw
  mul r1.zw, r1.zzzw, l(0.000000, 0.000000, 1.000000, -1.000000)
  lt r2.z, cb1[27].w, l(1.000000)
  add r2.w, r3.z, cb1[53].w
  mul r2.w, r2.w, cb1[53].z
  div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.w
  mad r3.w, r3.z, cb1[26].z, cb1[27].z
  movc r2.w, r2.z, r2.w, r3.w
  mul r7.yzw, r7.yyyy, cb1[29].xxyw
  mad r7.xyz, r7.xxxx, cb1[28].xywx, r7.yzwy
  mad r8.xyz, r2.wwww, cb1[30].xywx, r7.xyzx
  add r8.xyz, r8.xyzx, cb1[31].xywx
  mul r9.xyz, r1.wwww, cb1[29].xywx
  mad r9.xyz, r1.zzzz, cb1[28].xywx, r9.xyzx
  mad r10.xyz, r2.wwww, cb1[30].xywx, r9.xyzx
  add r10.xyz, r10.xyzx, cb1[31].xywx
  add r1.z, r6.z, cb1[53].w
  mul r1.z, r1.z, cb1[53].z
  div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), r1.z
  mad r1.w, r6.z, cb1[26].z, cb1[27].z
  movc r1.z, r2.z, r1.z, r1.w
  mad r11.xyz, r1.zzzz, cb1[30].xywx, r7.xyzx
  add r11.xyz, r11.xyzx, cb1[31].xywx
  mad r12.xyz, r1.zzzz, cb1[30].xywx, r9.xyzx
  add r12.xyz, r12.xyzx, cb1[31].xywx
  div r1.zw, r8.xxxy, r8.zzzz
  div r8.xy, r11.xyxx, r11.zzzz
  min r3.xy, r1.zwzz, r8.xyxx
  div r1.zw, r10.xxxy, r10.zzzz
  div r8.xy, r12.xyxx, r12.zzzz
  max r6.xy, r1.zwzz, r8.xyxx
  add r1.z, r5.z, cb1[53].w
  mul r1.z, r1.z, cb1[53].z
  div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), r1.z
  mad r1.w, r5.z, cb1[26].z, cb1[27].z
  movc r1.z, r2.z, r1.z, r1.w
  mad r8.xyz, r1.zzzz, cb1[30].xywx, r7.xyzx
  add r8.xyz, r8.xyzx, cb1[31].xywx
  mad r10.xyz, r1.zzzz, cb1[30].xywx, r9.xyzx
  add r10.xyz, r10.xyzx, cb1[31].xywx
  add r1.z, r4.z, cb1[53].w
  mul r1.z, r1.z, cb1[53].z
  div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), r1.z
  mad r1.w, r4.z, cb1[26].z, cb1[27].z
  movc r1.z, r2.z, r1.z, r1.w
  mad r7.xyz, r1.zzzz, cb1[30].xywx, r7.xyzx
  add r7.xyz, r7.xyzx, cb1[31].xywx
  mad r9.xyz, r1.zzzz, cb1[30].xywx, r9.xyzx
  add r9.xyz, r9.xyzx, cb1[31].xywx
  div r1.zw, r8.xxxy, r8.zzzz
  div r2.zw, r7.xxxy, r7.zzzz
  min r5.xy, r1.zwzz, r2.zwzz
  div r1.zw, r10.xxxy, r10.zzzz
  div r2.zw, r9.xxxy, r9.zzzz
  max r4.xy, r1.zwzz, r2.zwzz
endif 
if_z r0.w
  mad r0.yz, r0.yyzy, cb1[118].zzwz, -cb1[54].wwzw
  div r0.yz, r0.yyzy, cb1[54].xxyx
  mul r0.yz, r2.yyyy, r0.yyzy
  
  //Fix
  add r36.w, r2.y, -r36.y
  mul r36.w, r36.x, r36.w
  add r0.y, r0.y, -r36.w
  
  mul r7.xyzw, r0.zzzz, cb1[41].xyzw
  mad r7.xyzw, r0.yyyy, cb1[40].xyzw, r7.xyzw
  mad r7.xyzw, r2.yyyy, cb1[42].xyzw, r7.xyzw
  add r7.xyzw, r7.xyzw, cb1[43].xyzw
  div r0.yzw, r7.xxyz, r7.wwww
  add r3.xyz, r3.xyzx, r6.xyzx
  mul r7.xyz, r3.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
  mul r8.xyz, r7.yyyy, cb1[13].xyzx
  mad r7.xyw, r7.xxxx, cb1[12].xyxz, r8.xyxz
  mad r7.xyz, r7.zzzz, cb1[14].xyzx, r7.xywx
  add r7.xyz, r7.xyzx, cb1[15].xyzx
  add r7.xyz, r7.xyzx, -cb1[58].xyzx
  mad r3.xyz, r3.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), -r6.xyzx
  dp3 r1.z, r3.xyzx, r3.xyzx
  add r3.xyz, r4.xyzx, r5.xyzx
  mul r5.xyz, r3.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
  mul r6.xyw, r5.yyyy, cb1[13].xyxz
  mad r5.xyw, r5.xxxx, cb1[12].xyxz, r6.xyxw
  mad r5.xyz, r5.zzzz, cb1[14].xyzx, r5.xywx
  add r5.xyz, r5.xyzx, cb1[15].xyzx
  add r5.xyz, r5.xyzx, -cb1[58].xyzx
  mad r3.xyz, r3.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), -r4.xyzx
  dp3 r1.w, r3.xyzx, r3.xyzx
  sqrt r1.zw, r1.zzzw
  lt r2.z, r6.z, r2.y
  mov r3.y, l(0)
  mov r4.x, l(0)
  mov r2.w, r0.x
  loop 
    uge r3.w, r2.w, cb0[0].x
    breakc_nz r3.w
    ld_indexable(buffer)(float,float,float,float) r6.xyzw, r2.wwww, t3.xyzw
    f16tof32 r3.w, r6.w
    sincos r8.x, r9.x, r3.w
    ishl r3.w, r2.w, l(1)
    ld_indexable(buffer)(float,float,float,float) r10.xyzw, r3.wwww, t2.xyzw
    bfi r3.w, l(31), l(1), r2.w, l(1)
    ld_indexable(buffer)(float,float,float,float) r11.xyzw, r3.wwww, t2.xyzw
    lt r3.w, |r11.y|, |r11.x|
    dp2 r4.w, r11.xzxx, r11.xzxx
    sqrt r4.w, r4.w
    div r4.w, l(1.000000, 1.000000, 1.000000, 1.000000), r4.w
    mul r3.x, r4.w, -r11.z
    mul r3.z, r4.w, r11.x
    dp2 r4.w, r11.yzyy, r11.yzyy
    sqrt r4.w, r4.w
    div r4.w, l(1.000000, 1.000000, 1.000000, 1.000000), r4.w
    mul r4.y, r4.w, r11.z
    mul r4.z, r4.w, -r11.y
    movc r3.xzw, r3.wwww, r3.xxyz, r4.xxyz
    mul r4.yzw, r3.zzwx, r11.zzxy
    mad r4.yzw, r11.yyzx, r3.wwxz, -r4.yyzw
    mad r5.w, r11.w, l(0.500000), r10.w
    div r5.w, r10.w, r5.w
    mul r8.yzw, r5.wwww, r11.xxyz
    add r9.yzw, r7.xxyz, -r10.xxyz
    dp3 r11.x, r9.yzwy, r3.xzwx
    dp3 r11.y, r9.yzwy, r4.yzwy
    dp3 r11.z, r9.yzwy, r8.yzwy
    add r9.yzw, r5.xxyz, -r10.xxyz
    dp3 r10.x, r9.yzwy, r3.xzwx
    dp3 r10.y, r9.yzwy, r4.yzwy
    dp3 r10.z, r9.yzwy, r8.yzwy
    dp3 r12.x, r6.xyzx, r3.xzwx
    dp3 r12.y, r6.xyzx, r4.yzwy
    dp3 r12.z, r6.xyzx, r8.yzwy
    dp3 r3.x, r12.xyzx, r12.xyzx
    rsq r3.x, r3.x
    mul r3.xzw, r3.xxxx, r12.xxyz
    add r4.y, r10.w, cb0[3].x
    add r4.z, r1.z, r4.y
    dp3 r4.w, -r11.xyzx, -r11.xyzx
    mul r4.z, r4.z, r4.z
    lt r4.z, r4.w, r4.z
    add r5.w, r1.z, r10.w
    div r6.x, r5.w, r8.x
    mad r6.xyz, -r6.xxxx, r3.xzwx, r11.xyzx
    dp3 r6.w, -r6.xyzx, -r6.xyzx
    dp3 r6.x, r3.xzwx, -r6.xyzx
    lt r6.y, l(0.000000), r6.x
    mul r6.z, r9.x, r9.x
    mul r6.xw, r6.xxxw, r6.xxxz
    ge r6.x, r6.x, r6.w
    and r6.x, r6.x, r6.y
    dp3 r6.y, r3.xzwx, -r11.xyzx
    lt r6.w, l(0.000000), -r6.y
    mul r7.w, r6.y, r6.y
    mul r8.y, r8.x, r8.x
    mul r8.z, r4.w, r8.y
    ge r7.w, r7.w, r8.z
    and r6.w, r6.w, r7.w
    mul r7.w, r5.w, r5.w
    ge r4.w, r7.w, r4.w
    movc r4.w, r6.w, r4.w, l(-1)
    and r4.w, r4.w, r6.x
    add r5.w, -r5.w, r6.y
    lt r5.w, r5.w, cb0[3].x
    and r4.w, r4.w, r5.w
    and r4.z, r4.w, r4.z
    if_nz r4.z
      imm_atomic_iadd r9.x, g5, l(0), l(1)
      umin r4.z, r9.x, l(511)
      store_structured g0.x, r4.z, l(0), r2.w
    endif 
    add r4.y, r1.w, r4.y
    dp3 r4.z, -r10.xyzx, -r10.xyzx
    mul r4.y, r4.y, r4.y
    lt r4.y, r4.z, r4.y
    add r4.w, r1.w, r10.w
    div r5.w, r4.w, r8.x
    mad r6.xyw, -r5.wwww, r3.xzxw, r10.xyxz
    dp3 r5.w, -r6.xywx, -r6.xywx
    dp3 r6.x, r3.xzwx, -r6.xywx
    lt r6.y, l(0.000000), r6.x
    mul r6.x, r6.x, r6.x
    mul r5.w, r5.w, r6.z
    ge r5.w, r6.x, r5.w
    and r5.w, r5.w, r6.y
    dp3 r3.x, r3.xzwx, -r10.xyzx
    lt r3.z, l(0.000000), -r3.x
    mul r3.w, r3.x, r3.x
    mul r6.x, r4.z, r8.y
    ge r3.w, r3.w, r6.x
    and r3.z, r3.w, r3.z
    mul r3.w, r4.w, r4.w
    ge r3.w, r3.w, r4.z
    movc r3.z, r3.z, r3.w, l(-1)
    and r3.z, r3.z, r5.w
    add r3.x, -r4.w, r3.x
    lt r3.x, r3.x, cb0[3].x
    and r3.x, r3.x, r3.z
    and r3.x, r3.x, r4.y
    if_nz r3.x
      imm_atomic_iadd r6.x, g6, l(0), l(1)
      umin r3.x, r6.x, l(511)
      iadd r3.x, r3.x, l(512)
      store_structured g0.x, r3.x, l(0), r2.w
    endif 
    iadd r2.w, r2.w, l(64)
  endloop 
  sync_g_t
  ld_raw r0.x, l(0), g5.xxxx
  ld_raw r1.z, l(0), g6.xxxx
  movc r1.w, r2.z, r1.z, r0.x
  umin r1.w, r1.w, l(512)
  iadd r0.x, r0.x, r1.z
  div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), cb0[3].x
  bfi r2.z, l(1), l(9), r2.z, l(0)
  mov r3.y, l(0)
  mov r4.x, l(0)
  mov r2.xw, l(1.000000,0,0,0)
  loop 
    uge r3.w, r2.w, r1.w
    breakc_nz r3.w
    iadd r3.w, r2.w, r2.z
    ld_structured r3.w, r3.w, l(0), g0.xxxx
    ld_indexable(buffer)(float,float,float,float) r5.xyzw, r3.wwww, t3.xyzw
    f16tof32 r4.w, r5.w
    ushr r5.w, r5.w, l(16)
    f16tof32 r5.w, r5.w
    sincos null, r6.x, r4.w
    mad r6.x, -r6.x, l(6.28318548), l(6.28318548)
    ishl r6.y, r3.w, l(1)
    ld_indexable(buffer)(float,float,float,float) r7.xyzw, r6.yyyy, t2.xyzw
    bfi r3.w, l(31), l(1), r3.w, l(1)
    ld_indexable(buffer)(float,float,float,float) r8.xyzw, r3.wwww, t2.xyzw
    lt r3.w, l(0.000000), r8.w
    if_nz r3.w
      lt r3.w, |r8.y|, |r8.x|
      dp2 r6.y, r8.xzxx, r8.xzxx
      sqrt r6.y, r6.y
      div r6.y, l(1.000000, 1.000000, 1.000000, 1.000000), r6.y
      mul r3.x, r6.y, -r8.z
      mul r3.z, r6.y, r8.x
      dp2 r6.y, r8.yzyy, r8.yzyy
      sqrt r6.y, r6.y
      div r6.y, l(1.000000, 1.000000, 1.000000, 1.000000), r6.y
      mul r4.y, r6.y, r8.z
      mul r4.z, r6.y, -r8.y
      movc r3.xzw, r3.wwww, r3.xxyz, r4.xxyz
      mul r6.yzw, r3.zzwx, r8.zzxy
      mad r6.yzw, r8.yyzx, r3.wwxz, -r6.yyzw
      mad r4.y, r8.w, l(0.500000), r7.w
      div r4.y, r7.w, r4.y
      mul r8.xyz, r4.yyyy, r8.xyzx
      add r9.xyz, r0.yzwy, -r7.xyzx
      dp3 r10.x, r9.xyzx, r3.xzwx
      dp3 r10.y, r9.xyzx, r6.yzwy
      dp3 r10.z, r9.xyzx, r8.xyzx
      dp3 r9.x, r5.xyzx, r3.xzwx
      dp3 r9.y, r5.xyzx, r6.yzwy
      dp3 r9.z, r5.xyzx, r8.xyzx
      dp3 r3.x, r10.xyzx, r10.xyzx
      sqrt r3.x, r3.x
      div r6.yzw, -r10.xxyz, r3.xxxx
      dp3 r3.z, r9.xyzx, r9.xyzx
      rsq r3.z, r3.z
      mul r5.xyz, r3.zzzz, r9.xyzx
    else 
      add r7.xyz, -r0.yzwy, r7.xyzx
      dp3 r3.z, r7.xyzx, r7.xyzx
      sqrt r3.x, r3.z
      div r6.yzw, r7.xxyz, r3.xxxx
    endif 
    dp3 r3.z, r6.yzwy, r5.xyzx
    mad r3.w, |r3.z|, l(-0.156583), l(1.57079637)
    add r4.y, -|r3.z|, l(1.000000)
    sqrt r4.y, r4.y
    mul r4.z, r3.w, r4.y
    ge r3.z, r3.z, l(0.000000)
    mad r3.w, -r3.w, r4.y, l(3.14159274)
    movc r3.z, r3.z, r4.z, r3.w
    div r3.w, r7.w, r3.x
    lt r4.y, r3.w, l(1.000000)
    div r4.z, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
    movc r3.w, r4.y, r3.w, r4.z
    mul r4.z, r3.w, r3.w
    mad r5.x, r4.z, l(0.0872929022), l(-0.301895)
    mad r4.z, r5.x, r4.z, l(1.000000)
    mul r5.x, r3.w, r4.z
    mad r3.w, -r4.z, r3.w, l(1.57079637)
    movc r3.w, r4.y, r5.x, r3.w
    max r4.y, r3.w, r4.w
    min r4.z, r3.w, r4.w
    add r4.y, -r4.z, r4.y
    ge r4.y, r4.y, r3.z
    sincos null, r4.z, r4.z
    mad r4.z, -r4.z, l(6.28318548), l(6.28318548)
    add r5.x, r3.w, r4.w
    ge r5.y, r3.z, r5.x
    add r3.w, -r3.w, r4.w
    add r3.z, -|r3.w|, r3.z
    add r3.w, -|r3.w|, r5.x
    div_sat r3.z, r3.z, r3.w
    add r3.z, -r3.z, l(1.000000)
    mad r3.w, r3.z, l(-2.000000), l(3.000000)
    mul r3.z, r3.z, r3.z
    mul r3.z, r3.z, r3.w
    mul r3.z, r4.z, r3.z
    movc r3.z, r5.y, l(0), r3.z
    movc r3.z, r4.y, r4.z, r3.z
    div r3.z, r3.z, r6.x
    min r3.z, r3.z, l(1.000000)
    add r3.z, -r3.z, l(1.000000)
    mul r3.x, r1.z, r3.x
    mad_sat r3.x, r3.x, l(3.000000), l(-2.000000)
    add r3.w, -r3.z, l(1.000000)
    mad r3.x, r3.x, r3.w, r3.z
    add r3.z, -r5.w, l(1.000000)
    mad r3.x, r3.x, r3.z, r5.w
    mul r2.x, r2.x, r3.x
    iadd r2.w, r2.w, l(1)
  endloop 
  ieq r0.yz, vThreadIDInGroup.xxyx, l(0, 0, 0, 0)
  and r0.y, r0.z, r0.y
  ult r0.zw, vThreadGroupID.xxxy, cb0[3].yyyz
  and r0.z, r0.w, r0.z
  and r0.y, r0.z, r0.y
  if_nz r0.y
    imad r0.y, vThreadGroupID.y, cb0[3].y, vThreadGroupID.x
    store_uav_typed u1.xyzw, r0.yyyy, r0.xxxx
  endif 
else 
  mov r2.x, l(1.000000)
endif 
lt r0.x, cb0[2].z, l(1.000000)
if_nz r0.x
  sample_l_indexable(texture2d)(float,float,float,float) r0.x, r1.xyxx, t0.wxyz, s0, l(0.000000)
  mul r0.x, r0.x, l(3.999000)
  ftou r0.x, r0.x
  and r0.x, r0.x, l(1)
  movc r0.x, r0.x, cb0[2].z, l(1.000000)
  add r0.y, r2.x, l(-1.000000)
  mad r2.x, r0.x, r0.y, l(1.000000)
endif 
store_uav_typed u0.xyzw, vThreadID.xyyy, r2.xyxx
ret 
// Approximately 0 instruction slots used
