// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.58 on Sat Apr 18 21:19:46 2026
//
//
// Buffer Definitions:
//
// cbuffer cb4
// {
//
//   float4 cb4[276];                   // Index:    0-275            Components:  1104
//
// }
//
//
// 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
// cb4                               cbuffer      NA          NA    4        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xyzw        2     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 8   xyzw        1     NONE   float   xyzw
// COLOR                    0   xyzw        2     NONE   float   xyzw
// COLOR                    1   xyzw        3     NONE   float   xyzw
// TEXCOORD                 9   xyzw        4     NONE   float   xyzw
// TEXCOORD                 0   xyzw        5     NONE   float   xyzw
// TEXCOORD                 1   xyzw        6     NONE   float   xyzw
// TEXCOORD                 2   xyzw        7     NONE   float   xyzw
// TEXCOORD                 3   xyzw        8     NONE   float   xyzw
// TEXCOORD                 4   xyzw        9     NONE   float   xyzw
// TEXCOORD                 5   xyzw       10     NONE   float   xyzw
// TEXCOORD                 6   xyzw       11     NONE   float   xyzw
// TEXCOORD                 7   xyzw       12     NONE   float   xyzw
// P                        0   x          13     NONE    uint   x
// P                        0   x          14  RTINDEX    uint   x
//
vs_5_0
dcl_output_siv o14.x, rendertarget_array_index
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB4[30], 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.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_output o7.xyzw
dcl_output o8.xyzw
dcl_output o9.xyzw
dcl_output o10.xyzw
dcl_output o11.xyzw
dcl_output o12.xyzw
dcl_output o13.x
dcl_temps 11
ld_indexable(buffer)(float,float,float,float) r10.xyzw, l(0, 0, 0, 0), t125.xyzw
mov o14.x, r10.z
ld_indexable(texture1d)(float,float,float,float) r0.x, l(14, 0, 0, 0), t120.xyzw
ld_indexable(texture1d)(float,float,float,float) r0.y, l(88, 0, 0, 0), t120.yxzw
ld_indexable(buffer)(float,float,float,float) r1.xyzw, l(0, 0, 0, 0), t125.xyzw
ld_indexable(buffer)(float,float,float,float) r1.w, l(1, 0, 0, 0), t125.z
movc r1.z, r1.z, l(-1.000000), l(1.000000)
ftou o13.x, r1.z
mul r2.xyzw, v0.yyyy, cb4[21].xyzw
mad r2.xyzw, cb4[20].xyzw, v0.xxxx, r2.xyzw
mad r2.xyzw, cb4[22].xyzw, v0.zzzz, r2.xyzw
mad r2.xyzw, cb4[23].xyzw, v0.wwww, r2.xyzw
mul o2.xyzw, v1.xyzw, cb4[28].xyzw
mul r3.xyz, v0.yyyy, cb4[25].xyzx
mad r3.xyz, cb4[24].xyzx, v0.xxxx, r3.xyzx
mad r3.xyz, cb4[26].xyzx, v0.zzzz, r3.xyzx
mad r3.xyz, cb4[27].xyzx, v0.wwww, r3.xyzx
dp3 r0.z, r3.xyzx, r3.xyzx
rsq r0.z, r0.z
ftoi r0.w, r0.z
ieq r0.w, r0.w, l(0x7f800000)
rcp r0.z, r0.z
movc r0.z, r0.w, l(0), r0.z
ftoi r0.w, r0.z
and r0.w, r0.w, l(0x7fffffff)
utof r0.w, r0.w
ftoi r0.w, r0.w
ieq r0.w, r0.w, l(0x7f800000)
movc r0.z, r0.w, l(0x7f800000), r0.z
mul r0.z, r0.z, cb4[29].x
exp r0.z, r0.z
rcp r0.z, r0.z
ftoi r0.w, r0.z
and r0.w, r0.w, l(0x7fffffff)
utof r0.w, r0.w
ftoi r0.w, r0.w
ieq r0.w, r0.w, l(0x7f800000)
movc o4.x, r0.w, l(0x7f800000), r0.z
add r0.z, -r1.y, r2.w
mul r0.w, r1.x, r1.w
mad r0.w, r0.z, r0.w, r2.x
ne r1.z, r2.w, l(1.000000)
movc r3.x, r1.z, r0.w, r2.x
ne r0.w, r0.y, l(1.000000)
if_nz r0.w
  if_nz r1.z
    eq r0.w, r0.x, l(15.000000)
    if_nz r0.w
      mad r0.w, -r1.x, r0.z, r3.x
      ne r1.w, r1.x, l(0.000000)
      if_nz r1.w
        add r1.w, -r1.y, l(0.000100)
        mul r4.x, r1.x, r1.w
        mad r1.w, -r1.w, r1.x, r1.x
        mul r4.y, r1.y, r1.x
        mul r4.y, r4.y, l(36.000000)
        resinfo_indexable(texture2d)(float,float,float,float)_uint r4.zw, l(0), t110.zwxy
        iadd r5.xy, r4.zwzz, l(-1, -1, 0, 0)
        utof r4.zw, r4.zzzw
        mul r4.w, r4.w, l(0.500000)
        utof r5.xy, r5.xyxx
        min r4.w, r4.w, r5.y
        ftoi r6.y, r4.w
        mov r6.zw, l(0,0,0,0)
        mov r4.w, l(0)
        mov r5.yz, r4.xxxx
        mov r5.w, l(0)
        mov r7.x, l(0)
        loop
          uge r7.y, r5.w, l(255)
          mov r7.x, l(0)
          breakc_nz r7.y
          mad r5.z, r1.w, l(0.00392156886), r5.z
          mad r7.y, r5.z, l(0.500000), l(0.500000)
          mul r7.y, r4.z, r7.y
          max r7.y, r7.y, l(0.000000)
          min r7.y, r5.x, r7.y
          ftoi r6.x, r7.y
          ld_indexable(texture2d)(float,float,float,float) r6.x, r6.xyzw, t110.xyzw
          ne r7.y, r6.x, l(1.000000)
          add r7.z, -r6.x, l(1.000000)
          mul r7.z, r7.z, l(0.000100)
          div r7.z, l(0.000100), r7.z
          add r6.x, r6.x, r7.z
          and r6.x, r6.x, r7.y
          eq r7.y, r6.x, l(0.000000)
          if_nz r7.y
            mov r4.w, r1.x
            mov r7.x, l(-1)
            break
          endif
          add r7.z, r1.x, -r5.z
          div r7.z, r4.y, r7.z
          lt r6.x, r6.x, r7.z
          if_nz r6.x
            mov r4.w, l(0)
            mov r7.x, l(0)
            break
          endif
          mov r5.y, r5.z
          iadd r5.w, r5.w, l(1)
          mov r7.x, r7.y
          mov r4.w, l(0)
        endloop
        movc r1.w, r7.x, r4.w, r5.y
      else
        mov r1.w, l(0)
      endif
      mad r3.x, r1.w, r2.w, r0.w
    else
      ld_indexable(texture1d)(float,float,float,float) r0.w, l(80, 0, 0, 0), t120.xywz
      eq r1.w, r0.x, l(16.000000)
      mad r4.x, -r1.x, r0.z, r3.x
      mad r0.w, r1.x, r0.w, r4.x
      movc r3.x, r1.w, r0.w, r3.x
    endif
  endif
endif
eq r0.y, r0.y, l(1.000000)
if_nz r0.y
  eq r0.x, r0.x, l(16.000000)
  and r0.x, r1.z, r0.x
  if_nz r0.x
    mad r0.x, -r1.x, r0.z, r3.x
    ne r0.y, r1.x, l(0.000000)
    if_nz r0.y
      ld_indexable(texture1d)(float,float,float,float) r0.yz, l(0, 0, 0, 0), t120.zxyw
      mad r0.yz, r0.yyzy, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000)
      add r0.w, -r1.y, l(0.000100)
      mul r1.z, r1.x, r0.w
      mad r0.w, -r0.w, r1.x, r1.x
      mul r1.y, r1.y, r1.x
      mul r1.y, r1.y, l(5.000000)
      resinfo_indexable(texture2d)(float,float,float,float)_uint r4.xy, l(0), t110.xyzw
      iadd r4.zw, r4.xxxy, l(0, 0, -1, -1)
      mad r0.z, r0.z, l(0.500000), l(0.500000)
      utof r4.xy, r4.xyxx
      mul r0.z, r0.z, r4.y
      max r0.z, r0.z, l(0.000000)
      utof r4.yz, r4.zzwz
      min r0.z, r0.z, r4.z
      ftoi r5.y, r0.z
      mov r5.zw, l(0,0,0,0)
      mov r0.z, l(0)
      mov r1.w, r1.z
      mov r4.z, r1.z
      mov r4.w, l(0)
      mov r6.x, l(0)
      loop
        uge r6.y, r4.w, l(255)
        mov r6.x, l(0)
        breakc_nz r6.y
        mad r4.z, r0.w, l(0.00392156886), r4.z
        add r6.y, r0.y, r4.z
        mad r6.y, r6.y, l(0.500000), l(0.500000)
        mul r6.y, r4.x, r6.y
        max r6.y, r6.y, l(0.000000)
        min r6.y, r4.y, r6.y
        ftoi r5.x, r6.y
        ld_indexable(texture2d)(float,float,float,float) r5.x, r5.xyzw, t110.xyzw
        ne r6.y, r5.x, l(1.000000)
        add r6.z, -r5.x, l(1.000000)
        mul r6.z, r6.z, l(0.000100)
        div r6.z, l(0.000100), r6.z
        add r5.x, r5.x, r6.z
        and r5.x, r5.x, r6.y
        eq r6.y, r5.x, l(0.000000)
        if_nz r6.y
          mov r0.z, r1.x
          mov r6.x, l(-1)
          break
        endif
        add r6.z, r1.x, -r4.z
        div r6.z, r1.y, r6.z
        lt r5.x, r5.x, r6.z
        if_nz r5.x
          mov r0.z, l(0)
          mov r6.x, l(0)
          break
        endif
        mov r1.w, r4.z
        iadd r4.w, r4.w, l(1)
        mov r6.x, r6.y
        mov r0.z, l(0)
      endloop
      movc r0.y, r6.x, r0.z, r1.w
    else
      mov r0.y, l(0)
    endif
    mad r3.x, r0.y, r2.w, r0.x
  endif
endif
mov r3.yzw, r2.yyzw
mov r8.xyzw, r3.xyzw
mov o1.xyzw, r2.xyzw
mov o3.xyzw, l(0,0,0,1.000000)
mov o4.yzw, l(0,1.000000,0,0)
mov o5.xy, v2.xyxx
mov o5.zw, l(0,0,0,1.000000)
mov o6.xyzw, l(0,0,0,1.000000)
mov o7.xyzw, l(0,0,0,1.000000)
mov o8.xyzw, l(0,0,0,1.000000)
mov o9.xyzw, l(0,0,0,1.000000)
mov o10.xyzw, l(0,0,0,1.000000)
mov o11.xyzw, l(0,0,0,1.000000)
mov o12.xyzw, l(0,0,0,1.000000)
add r9.x, -r10.y, r8.w
mul r9.y, r10.x, r10.w
mad r9.x, r9.x, r9.y, r8.x
ne r9.y, l(1.000000), r8.w
movc r8.x, r9.y, r9.x, r8.x
mov o0.xyzw, r8.xyzw
ret
// Approximately 203 instruction slots used
