// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.63 on Sun Oct  9 13:50:00 2022
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyz
// VERT_ID                  0   x           1     NONE    uint   x
// TEXCOORD                 0   xy          2     NONE   float   xy
// NORMAL                   0   xyz         3     NONE   float
// TEXCOORD                 5   xyzw        4     NONE   float
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Output
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[5], immediateIndexed
dcl_constantbuffer CB1[3], immediateIndexed
dcl_constantbuffer CB2[38], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_resource_texture2darray (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t9
dcl_resource_texture2d (float,float,float,float) t13
dcl_input_ps_siv linear noperspective v0.xyz, position
dcl_input_ps constant v1.x
dcl_input_ps linear v2.xy
dcl_temps 50
dcl_resource_buffer (float,float,float,float) t125
ld_indexable(buffer)(float,float,float,float) r40.xyzw, l(0, 0, 0, 0), t125.xyzw
ne r0.x, l(1.000000), cb1[2].w
if_nz r0.x
  if_z cb2[36].x
    ne r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb2[37].x
    if_z r0.x
      and r0.x, v1.x, l(0x00ffffff)
      ftoi r0.yz, v0.xxyx
      iadd r0.x, r0.x, l(1)
      and r0.x, r0.x, l(7)
      imad r0.xy, r0.xxxx, l(7, 7, 0, 0), r0.yzyy
      and r0.xy, r0.xyxx, l(63, 63, 0, 0)
      and r0.z, l(7), cb2[37].z
      mov r0.w, l(0)
      ld_indexable(texture2darray)(float,float,float,float) r0.x, r0.xyzw, t6.xyzw
    else
      mov r0.x, l(0)
    endif
  else
    mov r0.x, l(0)
  endif
  ge r0.x, r0.x, cb1[2].w
  discard_nz r0.x
endif
sample_indexable(texture2d)(float,float,float,float) r0.x, v2.xyxx, t9.wxyz, s2
sample_indexable(texture2d)(float,float,float,float) r0.y, v2.xyxx, t13.yxzw, s1
mov_sat r0.x, r0.x
mul r0.z, r0.y, r0.x
lt r0.w, r0.x, l(0.500000)
dp2 r0.z, r0.zzzz, r0.xxxx
add r1.x, -r0.x, l(1.000000)
add r1.x, r1.x, r1.x
mad r0.x, -r0.x, r0.y, l(1.000000)
mad r0.x, -r1.x, r0.x, l(1.000000)
movc_sat r0.x, r0.w, r0.z, r0.x
ge r0.x, l(0.000000), r0.x
discard_nz r0.x
mul r0.xy, v0.xyxx, cb2[32].zwzz
mad r0.xy, r0.xyxx, l(2.000000, -2.000000, 0.000000, 0.000000), l(-1.000000, 1.000000, 0.000000, 0.000000)
mad r0.z, v0.z, cb2[35].z, cb2[35].w
rcp r0.z, r0.z
mov r1.z, -r0.z
mul r1.xy, r0.xyxx, 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 r0.x, r1.xyzw, cb2[12].xyzw
dp4 r0.y, r1.xyzw, cb2[13].xyzw
dp4 r0.z, r1.xyzw, cb2[14].xyzw
ge r1.x, cb0[4].y, l(0.300000)
mov r0.w, l(1.000000)
dp4 r2.x, r0.xyzw, cb0[0].xyzw
dp4 r1.y, r0.xyzw, cb0[1].xyzw
dp4 r2.y, r0.xyzw, cb0[2].xyzw
dp4 r0.x, r0.xyzw, cb0[3].xyzw
lt r0.y, r1.y, l(0.300000)
and r0.y, r0.y, r1.x
div r0.xz, r2.xxyx, r0.xxxx
add r0.xw, r0.xxxx, l(4.64999962, 0.000000, 0.000000, -4.64999962)
mul r0.z, r0.z, r0.z
mad r0.xz, r0.xxwx, r0.xxwx, r0.zzzz
ge r0.xz, l(27.039997, 0.000000, 27.039997, 0.000000), r0.xxzx
and r0.x, r0.z, r0.x
and r0.x, r0.x, r0.y
discard_nz r0.x
ushr r0.x, v1.x, l(24)
ubfe r0.y, l(7), l(24), v1.x
utof r0.y, r0.y
mul r0.y, r0.y, l(0.00787401572)
and r0.x, r0.x, l(128)
movc r0.x, r0.x, -r0.y, r0.y
ieq r0.y, l(0), cb2[36].x
and r0.z, l(64), cb1[0].y
ine r0.z, r0.z, l(0)
or r0.y, r0.z, r0.y
ne r0.z, r0.x, l(0.000000)
if_nz r0.z
  ftou r0.zw, v0.xxxy
  and r1.xy, r0.zwzz, l(63, 63, 0, 0)
  and r1.z, l(7), cb2[37].z
  mov r1.w, l(0)
  ld_indexable(texture2darray)(float,float,float,float) r0.z, r1.xyzw, t6.yzxw
  lt r0.w, l(0.000000), r0.x
  add r1.x, -r0.x, l(1.000000)
  lt r1.x, r1.x, r0.z
  add r0.x, r0.x, l(1.000000)
  ge r0.x, r0.x, r0.z
  movc r0.x, r0.w, r1.x, r0.x
  mov r0.z, l(-1)
else
  mov r0.x, l(0)
endif
and r0.x, r0.z, r0.x
and r0.x, r0.x, r0.y
discard_nz r0.x
ret
// Approximately 0 instruction slots used
