// 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 mvp[2];                     // Index:    0 1              Components:     8
//
// }
//
//
// 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
// -------------------- ----- ------ -------- -------- ------- ------
// COLOR                    0   xyzw        0     NONE   float   xyzw
// COLOR                    1   xyzw        1     NONE   float   xyzw
// SV_Position              0   xyzw        2     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// COLOR                    0   xyzw        0     NONE   float   xyzw
// COLOR                    1   xyzw        1     NONE   float   xyzw
// SV_Position              0   xyzw        2      POS   float   xyzw
// P                        0   x           3  RTINDEX    uint   x
//
vs_5_0
dcl_output_siv o3.x, rendertarget_array_index
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[2], immediateIndexed
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.xyzw
dcl_input v2.xyzw
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output_siv o2.xyzw, position
dcl_temps 19
ld_indexable(buffer)(float,float,float,float) r8.xyzw, l(0, 0, 0, 0), t125.xyzw
mov o3.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) r0.z, l(3, 0, 0, 0), t120.xywz
ld_indexable(texture1d)(float,float,float,float) r1.xyz, l(10, 0, 0, 0), t120.xywz
dp4 r0.w, v2.xyzw, cb0[0].xyzw
dp4 r2.y, v2.xyzw, cb0[1].xyzw
ne r0.z, r0.z, l(10.000000)
eq r1.yzw, r1.zzyy, l(0.000000, 1.000000, 2.000000, 1.000000)
and r1.y, r0.z, r1.y
lt r3.xy, l(-0.400000, -0.500000, 0.000000, 0.000000), r0.wwww
lt r3.zw, r2.yyyy, l(0.000000, 0.000000, 0.500000, 0.300000)
or r3.x, r3.z, r3.x
and r1.w, r1.w, r3.x
lt r3.xz, r0.wwww, l(0.300000, 0.000000, 0.500000, 0.000000)
or r3.x, r3.w, r3.x
and r1.w, r1.w, r3.x
lt r3.xw, l(-0.400000, 0.000000, 0.000000, -0.500000), r2.yyyy
or r3.x, r3.x, r3.y
and r1.w, r1.w, r3.x
or r3.x, r3.w, r3.z
and r1.w, r1.w, r3.x
or r1.z, r1.w, r1.z
and r1.y, r1.z, r1.y

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.zw, l(0,0,0,0)
    mov r3.yzw, l(0,0,0,0)
    loop
      utof r5.x, r3.z
      ge r5.x, r5.x, l(250.000000)
      mov r3.w, l(0)
      breakc_nz r5.x
      mad r3.y, r0.x, l(0.004000), r3.y
      mad r5.x, r3.y, l(0.500000), l(0.500000)
      mul r5.x, r1.y, r5.x
      max r5.x, r5.x, l(0.000000)
      min r5.x, r3.x, r5.x
      ftoi r4.x, r5.x
      ld_indexable(texture2d)(float,float,float,float) r4.x, r4.xyzw, t110.xyzw
      ne r5.x, r4.x, l(1.000000)
      mul r5.y, r4.x, l(0.000010)
      div r5.y, l(0.000010), r5.y
      add r4.x, r4.x, r5.y
      and r4.x, r4.x, r5.x
      eq r5.x, r4.x, l(0.000000)
      if_nz r5.x
        mov r1.z, r0.x
        mov r3.w, l(-1)
        break
      endif
      add r5.y, r0.x, -r3.y
      div r5.y, r0.y, r5.y
      lt r4.x, r4.x, r5.y
      if_nz r4.x
        mov r1.z, l(0)
        mov r3.w, l(0)
        break
      endif
      mov r1.w, r3.y
      iadd r3.z, r3.z, l(1)
      mov r3.w, r5.x
      mov r1.z, l(0)
    endloop
    movc r0.y, r3.w, r1.z, r1.w
  else
    mov r0.y, l(0)
  endif
  add r2.x, r0.y, r0.w
else
  if_nz r10.x
  mad r0.x, r0.x, r1.x, r0.w
  movc r2.x, r0.z, r0.x, r0.w
  else
  mov r2.x, r0.w
  endif
endif
mov o0.xyzw, v0.xyzw
mov o1.xyzw, v1.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 o2.xyzw, r6.xyzw
ret
// Approximately 87 instruction slots used
