//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.89 on Wed Dec 28 23:20:52 2022
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// cursor_mask                       texture  float4          2d  100        1
// cursor_color                      texture  float4          2d  101        1
// DepthBuffer                       texture   float          2d  110        1
// IniParams                         texture  float4          1d  120        1
// StereoParams                      texture  float4          2d  125        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_VertexID              0   x           0   VERTID    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
// P                        0   x           2  RTINDEX    uint   x
//
vs_5_0
dcl_output_siv o2.x, rendertarget_array_index
dcl_globalFlags refactoringAllowed
dcl_resource_texture2d (float,float,float,float) t100
dcl_resource_texture2d (float,float,float,float) t101
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_sgv v0.x, vertex_id
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_temps 8
ld_indexable(buffer)(float,float,float,float) r7.xyzw, l(0, 0, 0, 0), t125.xyzw
mov o2.x, r7.z
ld_indexable(texture1d)(float,float,float,float) r0.xyz, l(7, 0, 0, 0), t120.yzwx
ne r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), r0.x
if_z r0.x
  mov r5.xyzw, l(0,0,0,0)
  mov o1.xy, l(0,0,0,0)
  add r6.x, -r7.y, r5.w
  mul r6.y, r7.x, r7.w
  mad r6.x, r6.x, r6.y, r5.x
  ne r6.y, l(1.000000), r5.w
  movc r5.x, r6.y, r6.x, r5.x
  mov o0.xyzw, r5.xyzw
  ret
endif
resinfo_indexable(texture2d)(float,float,float,float)_uint r0.xw, l(0), t101.xzwy
if_nz r0.x
  ld_indexable(texture1d)(float,float,float,float) r1.x, l(5, 0, 0, 0), t120.wxyz
  eq r1.x, r1.x, l(2.000000)
  if_nz r1.x
    mov r5.xyzw, l(0,0,0,0)
    mov o1.xy, l(0,0,0,0)
    add r6.x, -r7.y, r5.w
    mul r6.y, r7.x, r7.w
    mad r6.x, r6.x, r6.y, r5.x
    ne r6.y, l(1.000000), r5.w
    movc r5.x, r6.y, r6.x, r5.x
    mov o0.xyzw, r5.xyzw
    ret
  endif
  utof r1.xz, r0.xxwx
else
  ld_indexable(texture1d)(float,float,float,float) r0.x, l(5, 0, 0, 0), t120.wxyz
  eq r0.x, r0.x, l(1.000000)
  if_nz r0.x
    mov r5.xyzw, l(0,0,0,0)
    mov o1.xy, l(0,0,0,0)
    add r6.x, -r7.y, r5.w
    mul r6.y, r7.x, r7.w
    mad r6.x, r6.x, r6.y, r5.x
    ne r6.y, l(1.000000), r5.w
    movc r5.x, r6.y, r6.x, r5.x
    mov o0.xyzw, r5.xyzw
    ret
  endif
  resinfo_indexable(texture2d)(float,float,float,float)_uint r0.xw, l(0), t100.xzwy
  ushr r0.w, r0.w, l(1)
  utof r1.xz, r0.xxwx
endif
ld_indexable(texture1d)(float,float,float,float) r2.xyzw, l(6, 0, 0, 0), t120.xyzw
add r2.yz, -r2.wwzw, r2.yyxy
switch v0.x
  case l(0)
  mov r2.xy, r2.zyzz
  mov r1.w, l(0)
  mov r1.xy, r1.wzww
  break
  case l(1)
  add r2.w, r1.z, r2.y
  mov r2.xy, r2.zwzz
  mov r1.xy, l(0,0,0,0)
  break
  case l(2)
  add r2.x, r1.x, r2.z
  mov r1.xy, r1.xzxx
  break
  case l(3)
  add r2.xy, r1.xzxx, r2.zyzz
  mov r1.y, l(0)
  break
  default
  mov r2.xy, l(0,0,0,0)
  mov r1.xy, l(0,0,0,0)
  break
endswitch
mov o1.xy, r1.xyxx
div r0.xy, r2.xyxx, r0.yzyy
mad r0.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mul r1.xy, r0.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000)
ld_indexable(buffer)(float,float,float,float) r0.yz, l(0, 0, 0, 0), t125.zxyw
ld_indexable(texture1d)(float,float,float,float) r0.w, l(90, 0, 0, 0), t120.xywz
eq r0.w, r0.w, l(1.000000)
if_nz r0.w
  ne r0.w, r0.y, l(0.000000)
  if_nz r0.w
    mul r0.z, r0.z, r0.y
    mul r0.z, r0.z, l(0.100000)
    resinfo_indexable(texture2d)(float,float,float,float)_uint r2.xy, l(0), t110.xyzw
    iadd r2.zw, r2.xxxy, l(0, 0, -1, -1)
    utof r2.xy, r2.xyxx
    mul r0.w, r2.y, l(0.500000)
    utof r2.yz, r2.zzwz
    min r0.w, r0.w, r2.z
    ftoi r3.y, r0.w
    mov r3.zw, l(0,0,0,0)
    mov r0.w, l(0)
    mov r2.zw, l(0,0,0,0)
    mov r4.xy, l(0,0,0,0)
    loop
      uge r4.z, r4.x, l(150)
      mov r4.y, l(0)
      breakc_nz r4.z
      mad r2.w, r0.y, l(0.00666666683), r2.w
      mad r4.z, r2.w, l(0.500000), l(0.500000)
      mul r4.z, r2.x, r4.z
      max r4.z, r4.z, l(0.000000)
      min r4.z, r2.y, r4.z
      ftoi r3.x, r4.z
      ld_indexable(texture2d)(float,float,float,float) r3.x, r3.xyzw, t110.xyzw
      ne r4.z, r3.x, l(1.000000)
      mul r4.w, r3.x, l(0.000010)
      div r4.w, l(0.000010), r4.w
      add r3.x, r3.x, r4.w
      and r3.x, r3.x, r4.z
      eq r4.z, r3.x, l(0.000000)
      if_nz r4.z
        mov r0.w, r0.y
        mov r4.y, l(-1)
        break
      endif
      add r4.w, r0.y, -r2.w
      div r4.w, r0.z, r4.w
      lt r3.x, r3.x, r4.w
      if_nz r3.x
        mov r0.w, l(0)
        mov r4.y, l(0)
        break
      endif
      mov r2.z, r2.w
      iadd r4.x, r4.x, l(1)
      mov r4.xy, r4.xzxx
      mov r0.w, l(0)
    endloop
    movc r0.z, r4.y, r0.w, r2.z
  else
    mov r0.z, l(0)
  endif
  mad r1.x, r0.x, l(1.000000), r0.z
else
  ld_indexable(texture1d)(float,float,float,float) r0.x, l(20, 0, 0, 0), t120.xyzw
  mad r1.x, r0.y, r0.x, r1.x
endif
mov r1.zw, l(0,0,0,1.000000)
mov r5.xyzw, r1.xyzw
add r6.x, -r7.y, r5.w
mul r6.y, r7.x, r7.w
mad r6.x, r6.x, r6.y, r5.x
ne r6.y, l(1.000000), r5.w
movc r5.x, r6.y, r6.x, r5.x
mov o0.xyzw, r5.xyzw
ret
// Approximately 125 instruction slots used
