// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.89 on Wed Dec 21 12:57:04 2022
//
//
// Buffer Definitions:
//
// cbuffer Constants
// {
//
//   float4 vfuniforms[144];            // Index:    0-143            Components:   576
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// DepthBuffer                       texture   float          2d  110        1
// IniParams                         texture  float4          1d  120        1
// StereoParams                      texture  float4          2d  125        1
// Constants                         cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0     NONE   float   xyzw
// COLOR                    1   x           1     NONE    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 1   xyzw        1     NONE   float   xyzw
// TEXCOORD                 2   xy          2     NONE   float   xy
// SV_Position              0   xyzw        3      POS   float   xyzw
// P                        0   x           4  RTINDEX    uint   x
//
vs_5_0
dcl_output_siv o4.x, rendertarget_array_index
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[144], dynamicIndexed
dcl_resource_texture2d (float,float,float,float) t110
dcl_resource_texture1d (float,float,float,float) t120
dcl_resource_buffer (float,float,float,float) t125
dcl_input v0.xyzw
dcl_input v1.x
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xy
dcl_output_siv o3.xyzw, position
dcl_temps 19
ld_indexable(buffer)(float,float,float,float) r8.xyzw, l(0, 0, 0, 0), t125.xyzw
mov o4.x, r8.z
ld_indexable(buffer)(float,float,float,float) r0.xy, l(0, 0, 0, 0), t125.xyzw
ld_indexable(texture1d)(float,float,float,float) r1.xyz, l(10, 0, 0, 0), t120.xywz
imul null, r0.z, v1.x, l(6)
imad r0.w, v1.x, l(6), l(1)
itof r0.zw, r0.zzzw
ftou r2.xy, r0.zwzz
utof r0.zw, r2.xxxy
add r0.zw, r0.zzzw, l(0.000000, 0.000000, 0.100000, 0.100000)
ftou r0.zw, r0.zzzw
imad r2.xyzw, v1.xxxx, l(6, 6, 6, 6), l(2, 2, 4, 4)
itof r2.xyzw, r2.xyzw
ftou r2.xyzw, r2.xyzw
utof r2.xyzw, r2.xyzw
add r2.xyzw, r2.xyzw, l(0.100000, 1.100000, 0.100000, 1.100000)
ftou r2.xyzw, r2.xyzw
dp4 o2.x, v0.xyzw, cb0[r2.z + 0].xyzw
dp4 o2.y, v0.xyzw, cb0[r2.w + 0].xyzw
dp4 r1.w, v0.xyzw, cb0[r2.x + 0].xyzw
dp4 r2.y, v0.xyzw, cb0[r2.y + 0].xyzw
eq r3.xyz, r1.zyyz, l(1.000000, 2.000000, 1.000000, 0.000000)
lt r1.yz, l(0.000000, -0.300000, -0.500000, 0.000000), r1.wwww
lt r4.xy, r2.yyyy, l(0.500000, 0.400000, 0.000000, 0.000000)
or r1.y, r1.y, r4.x
and r1.y, r1.y, r3.z
lt r3.zw, r1.wwww, l(0.000000, 0.000000, 0.400000, 0.500000)
or r3.z, r4.y, r3.z
and r1.y, r1.y, r3.z
lt r3.z, l(-0.500000), r2.y
or r1.z, r1.z, r3.z
and r1.y, r1.z, r1.y
or r1.z, r3.z, r3.w
and r1.y, r1.z, r1.y
or r1.y, r1.y, r3.y
and r1.y, r1.y, r3.x

ne r10.x, r8.w, l(0.0)

and r1.y, r1.y, r10.x

if_nz r1.y
  ne r1.y, r0.x, l(0.000000)
  if_nz r1.y
    mul r0.y, r0.y, r0.x
    mul r0.y, r0.y, l(5.000000)
    resinfo_indexable(texture2d)(float,float,float,float)_uint r1.yz, l(0), t110.zxyw
    iadd r3.xy, r1.yzyy, l(-1, -1, 0, 0)
    utof r1.yz, r1.yyzy
    mul r1.z, r1.z, l(0.500000)
    utof r3.xy, r3.xyxx
    min r1.z, r1.z, r3.y
    ftoi r4.y, r1.z
    mov r4.zw, l(0,0,0,0)
    mov r1.z, l(0)
    mov r3.yzw, l(0,0,0,0)
    mov r5.x, l(0)
    loop
      utof r5.y, r3.w
      ge r5.y, r5.y, l(250.000000)
      mov r5.x, l(0)
      breakc_nz r5.y
      mad r3.z, r0.x, l(0.004000), r3.z
      mad r5.y, r3.z, l(0.500000), l(0.500000)
      mul r5.y, r1.y, r5.y
      max r5.y, r5.y, l(0.000000)
      min r5.y, r3.x, r5.y
      ftoi r4.x, r5.y
      ld_indexable(texture2d)(float,float,float,float) r4.x, r4.xyzw, t110.xyzw
      ne r5.y, r4.x, l(1.000000)
      mul r5.z, r4.x, l(0.000010)
      div r5.z, l(0.000010), r5.z
      add r4.x, r4.x, r5.z
      and r4.x, r4.x, r5.y
      eq r5.y, r4.x, l(0.000000)
      if_nz r5.y
        mov r1.z, r0.x
        mov r5.x, l(-1)
        break
      endif
      add r5.z, r0.x, -r3.z
      div r5.z, r0.y, r5.z
      lt r4.x, r4.x, r5.z
      if_nz r4.x
        mov r1.z, l(0)
        mov r5.x, l(0)
        break
      endif
      mov r3.y, r3.z
      iadd r3.w, r3.w, l(1)
      mov r5.x, r5.y
      mov r1.z, l(0)
    endloop
    movc r0.y, r5.x, r1.z, r3.y
  else
    mov r0.y, l(0)
  endif
  add r2.x, r0.y, r1.w
else
  if_nz r10.x
  mad r2.x, r0.x, r1.x, r1.w
  else
  mov r2.x, r1.w
  endif
endif
mov o0.xyzw, cb0[r0.z + 0].xyzw
mov o1.xyzw, cb0[r0.w + 0].xyzw
mov r2.zw, l(0,0,0,1.000000)
mov r6.xyzw, r2.xyzw
add r7.x, -r8.y, r6.w
mul r7.y, r8.x, r8.w
mad r7.x, r7.x, r7.y, r6.x
ne r7.y, l(1.000000), r6.w
movc r6.x, r7.y, r7.x, r6.x
mov o3.xyzw, r6.xyzw
ret
// Approximately 99 instruction slots used
