//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.164 on Mon Jul 20 01:15:57 2026
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// cursor_mask                       texture  float4          2d  100        1
// cursor_color                      texture  float4          2d  101        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float
// TEXCOORD                 0   xy          1     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_resource_texture2d (float,float,float,float) t100
dcl_resource_texture2d (float,float,float,float) t101
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 7
resinfo_indexable(texture2d)(float,float,float,float)_uint r0.xy, l(0), t101.xyzw
if_nz r0.x
  utof r0.xy, r0.xyxx
  add r0.zw, v1.xxxy, l(0.000000, 0.000000, -0.500000, -0.500000)
  round_ni r1.zw, r0.zzzw
  round_pi r2.xy, r0.zwzz
  add r2.zw, r0.xxxy, l(0.000000, 0.000000, -1.000000, -1.000000)
  min r1.xy, r2.zwzz, r2.xyxx
  lt r2.xyzw, r1.zwxw, l(0.000000, 0.000000, 0.000000, 0.000000)
  ge r3.xyzw, r1.zwxw, r0.xyxy
  or r2.xyzw, r2.xyzw, r3.xyzw
  or r2.xy, r2.ywyy, r2.xzxx
  if_z r2.x
    ftoi r3.xy, r1.zwzz
    mov r3.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r4.xyzw, r3.xyww, t101.xyzw
    ld_indexable(texture2d)(float,float,float,float) r2.x, r3.xyzw, t100.xyzw
    ne r2.z, l(0.000000, 0.000000, 0.000000, 0.000000), r4.w
    movc r2.z, r2.z, r4.w, l(1.000000)
    ne r2.x, l(0.000000, 0.000000, 0.000000, 0.000000), r2.x
    movc r4.w, r2.x, l(0), r2.z
  else
    mov r4.xyzw, l(0,0,0,0)
  endif
  if_z r2.y
    ftoi r2.xy, r1.xwxx
    mov r2.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r3.xyzw, r2.xyww, t101.xyzw
    ld_indexable(texture2d)(float,float,float,float) r1.w, r2.xyzw, t100.yzwx
    ne r2.x, l(0.000000, 0.000000, 0.000000, 0.000000), r3.w
    movc r2.x, r2.x, r3.w, l(1.000000)
    ne r1.w, l(0.000000, 0.000000, 0.000000, 0.000000), r1.w
    movc r3.w, r1.w, l(0), r2.x
  else
    mov r3.xyzw, l(0,0,0,0)
  endif
  lt r2.xyzw, r1.zyxy, l(0.000000, 0.000000, 0.000000, 0.000000)
  ge r5.xyzw, r1.zyxy, r0.xyxy
  or r2.xyzw, r2.xyzw, r5.xyzw
  or r0.xy, r2.ywyy, r2.xzxx
  if_z r0.x
    ftoi r2.xy, r1.zyzz
    mov r2.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r5.xyzw, r2.xyww, t101.xyzw
    ld_indexable(texture2d)(float,float,float,float) r0.x, r2.xyzw, t100.xyzw
    ne r1.z, l(0.000000, 0.000000, 0.000000, 0.000000), r5.w
    movc r1.z, r1.z, r5.w, l(1.000000)
    ne r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), r0.x
    movc r5.w, r0.x, l(0), r1.z
  else
    mov r5.xyzw, l(0,0,0,0)
  endif
  if_z r0.y
    ftoi r1.xy, r1.xyxx
    mov r1.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r2.xyzw, r1.xyww, t101.xyzw
    ld_indexable(texture2d)(float,float,float,float) r0.x, r1.xyzw, t100.xyzw
    ne r0.y, l(0.000000, 0.000000, 0.000000, 0.000000), r2.w
    movc r0.y, r0.y, r2.w, l(1.000000)
    ne r0.x, l(0.000000, 0.000000, 0.000000, 0.000000), r0.x
    movc r2.w, r0.x, l(0), r0.y
  else
    mov r2.xyzw, l(0,0,0,0)
  endif
  frc r0.xy, r0.zwzz
  add r1.xyzw, -r4.xyzw, r3.xyzw
  mad r1.xyzw, r0.xxxx, r1.xyzw, r4.xyzw
  add r2.xyzw, -r5.xyzw, r2.xyzw
  mad r2.xyzw, r0.xxxx, r2.xyzw, r5.xyzw
  add r2.xyzw, -r1.xyzw, r2.xyzw
  mad o0.xyzw, r0.yyyy, r2.xyzw, r1.xyzw
else
  resinfo_indexable(texture2d)(float,float,float,float)_uint r0.xy, l(0), t100.xyzw
  ushr r0.y, r0.y, l(1)
  utof r1.xy, r0.xyxx
  add r0.xy, v1.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
  round_ni r2.zw, r0.xxxy
  round_pi r0.zw, r0.xxxy
  add r1.zw, r1.xxxy, l(0.000000, 0.000000, -1.000000, -1.000000)
  min r2.xy, r0.zwzz, r1.zwzz
  lt r3.xyzw, r2.zwxw, l(0.000000, 0.000000, 0.000000, 0.000000)
  ge r4.xyzw, r2.zwxw, r1.xyxy
  or r3.xyzw, r3.xyzw, r4.xyzw
  or r0.zw, r3.yyyw, r3.xxxz
  if_z r0.z
    ftoi r3.xy, r2.zwzz
    mov r3.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r0.z, r3.xyzw, t100.yzxw
    ftou r0.z, r0.z
    add r1.z, r1.y, r2.w
    ftoi r3.x, r2.z
    ftoi r3.y, r1.z
    mov r3.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r1.z, r3.xyzw, t100.yzxw
    ftou r1.z, r1.z
    utof r3.xyz, r0.zzzz
    xor r0.z, r0.z, r1.z
    utof r3.w, r0.z
  else
    mov r3.xyzw, l(0,0,0,1.000000)
  endif
  if_z r0.w
    ftoi r4.xy, r2.xwxx
    mov r4.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r0.z, r4.xyzw, t100.yzxw
    ftou r0.z, r0.z
    add r0.w, r1.y, r2.w
    ftoi r4.x, r2.x
    ftoi r4.y, r0.w
    mov r4.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r0.w, r4.xyzw, t100.yzwx
    ftou r0.w, r0.w
    utof r4.xyz, r0.zzzz
    xor r0.z, r0.z, r0.w
    utof r4.w, r0.z
  else
    mov r4.xyzw, l(0,0,0,1.000000)
  endif
  lt r5.xyzw, r2.zyxy, l(0.000000, 0.000000, 0.000000, 0.000000)
  ge r6.xyzw, r2.zyxy, r1.xyxy
  or r5.xyzw, r5.xyzw, r6.xyzw
  or r0.zw, r5.yyyw, r5.xxxz
  if_z r0.z
    ftoi r5.xy, r2.zyzz
    mov r5.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r0.z, r5.xyzw, t100.yzxw
    ftou r0.z, r0.z
    add r1.x, r1.y, r2.y
    ftoi r5.x, r2.z
    ftoi r5.y, r1.x
    mov r5.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r1.x, r5.xyzw, t100.xyzw
    ftou r1.x, r1.x
    utof r5.xyz, r0.zzzz
    xor r0.z, r0.z, r1.x
    utof r5.w, r0.z
  else
    mov r5.xyzw, l(0,0,0,1.000000)
  endif
  if_z r0.w
    ftoi r6.xy, r2.xyxx
    mov r6.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r0.z, r6.xyzw, t100.yzxw
    ftou r0.z, r0.z
    add r0.w, r1.y, r2.y
    ftoi r1.x, r2.x
    ftoi r1.y, r0.w
    mov r1.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r0.w, r1.xyzw, t100.yzwx
    ftou r0.w, r0.w
    utof r1.xyz, r0.zzzz
    xor r0.z, r0.z, r0.w
    utof r1.w, r0.z
  else
    mov r1.xyzw, l(0,0,0,1.000000)
  endif
  frc r0.xy, r0.xyxx
  add r2.xyzw, -r3.xyzw, r4.xyzw
  mad r2.xyzw, r0.xxxx, r2.xyzw, r3.xyzw
  add r1.xyzw, -r5.xyzw, r1.xyzw
  mad r1.xyzw, r0.xxxx, r1.xyzw, r5.xyzw
  add r1.xyzw, -r2.xyzw, r1.xyzw
  mad o0.xyzw, r0.yyyy, r1.xyzw, r2.xyzw
endif
ret
// Approximately 165 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v0.6.164 on Mon Jul 20 01:15:57 2026
//
// Texture2D<float4> cursor_mask : register(t100);
// Texture2D<float4> cursor_color : register(t101);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Buffer<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : SV_Position0,
//   float2 v1 : TEXCOORD0,
//   out float4 o0 : SV_Target0)
// {
//   float4 r0,r1,r2,r3,r4,r5,r6;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   cursor_color.GetDimensions(0, uiDest.x, uiDest.y, uiDest.z);
//   r0.xy = uiDest.xy;
//   if (r0.x != 0) {
//     r0.xy = (uint2)r0.xy;
//     r0.zw = float2(-0.5,-0.5) + v1.xy;
//     r1.zw = floor(r0.zw);
//     r2.xy = ceil(r0.zw);
//     r2.zw = float2(-1,-1) + r0.xy;
//     r1.xy = min(r2.xy, r2.zw);
//     r2.xyzw = cmp(r1.zwxw < float4(0,0,0,0));
//     r3.xyzw = cmp(r1.zwxw >= r0.xyxy);
//     r2.xyzw = (int4)r2.xyzw | (int4)r3.xyzw;
//     r2.xy = (int2)r2.yw | (int2)r2.xz;
//     if (r2.x == 0) {
//       r3.xy = (int2)r1.zw;
//       r3.zw = float2(0,0);
//       r4.xyzw = cursor_color.Load(r3.xyw).xyzw;
//       r2.x = cursor_mask.Load(r3.xyz).x;
//       r2.z = cmp(0 != r4.w);
//       r2.z = r2.z ? r4.w : 1;
//       r2.x = cmp(0 != r2.x);
//       r4.w = r2.x ? 0 : r2.z;
//     } else {
//       r4.xyzw = float4(0,0,0,0);
//     }
//     if (r2.y == 0) {
//       r2.xy = (int2)r1.xw;
//       r2.zw = float2(0,0);
//       r3.xyzw = cursor_color.Load(r2.xyw).xyzw;
//       r1.w = cursor_mask.Load(r2.xyz).x;
//       r2.x = cmp(0 != r3.w);
//       r2.x = r2.x ? r3.w : 1;
//       r1.w = cmp(0 != r1.w);
//       r3.w = r1.w ? 0 : r2.x;
//     } else {
//       r3.xyzw = float4(0,0,0,0);
//     }
//     r2.xyzw = cmp(r1.zyxy < float4(0,0,0,0));
//     r5.xyzw = cmp(r1.zyxy >= r0.xyxy);
//     r2.xyzw = (int4)r2.xyzw | (int4)r5.xyzw;
//     r0.xy = (int2)r2.yw | (int2)r2.xz;
//     if (r0.x == 0) {
//       r2.xy = (int2)r1.zy;
//       r2.zw = float2(0,0);
//       r5.xyzw = cursor_color.Load(r2.xyw).xyzw;
//       r0.x = cursor_mask.Load(r2.xyz).x;
//       r1.z = cmp(0 != r5.w);
//       r1.z = r1.z ? r5.w : 1;
//       r0.x = cmp(0 != r0.x);
//       r5.w = r0.x ? 0 : r1.z;
//     } else {
//       r5.xyzw = float4(0,0,0,0);
//     }
//     if (r0.y == 0) {
//       r1.xy = (int2)r1.xy;
//       r1.zw = float2(0,0);
//       r2.xyzw = cursor_color.Load(r1.xyw).xyzw;
//       r0.x = cursor_mask.Load(r1.xyz).x;
//       r0.y = cmp(0 != r2.w);
//       r0.y = r0.y ? r2.w : 1;
//       r0.x = cmp(0 != r0.x);
//       r2.w = r0.x ? 0 : r0.y;
//     } else {
//       r2.xyzw = float4(0,0,0,0);
//     }
//     r0.xy = frac(r0.zw);
//     r1.xyzw = r3.xyzw + -r4.xyzw;
//     r1.xyzw = r0.xxxx * r1.xyzw + r4.xyzw;
//     r2.xyzw = r2.xyzw + -r5.xyzw;
//     r2.xyzw = r0.xxxx * r2.xyzw + r5.xyzw;
//     r2.xyzw = r2.xyzw + -r1.xyzw;
//     o0.xyzw = r0.yyyy * r2.xyzw + r1.xyzw;
//   } else {
//     cursor_mask.GetDimensions(0, uiDest.x, uiDest.y, uiDest.z);
//     r0.xy = uiDest.xy;
//     r0.y = (uint)r0.y >> 1;
//     r1.xy = (uint2)r0.xy;
//     r0.xy = float2(-0.5,-0.5) + v1.xy;
//     r2.zw = floor(r0.xy);
//     r0.zw = ceil(r0.xy);
//     r1.zw = float2(-1,-1) + r1.xy;
//     r2.xy = min(r1.zw, r0.zw);
//     r3.xyzw = cmp(r2.zwxw < float4(0,0,0,0));
//     r4.xyzw = cmp(r2.zwxw >= r1.xyxy);
//     r3.xyzw = (int4)r3.xyzw | (int4)r4.xyzw;
//     r0.zw = (int2)r3.yw | (int2)r3.xz;
//     if (r0.z == 0) {
//       r3.xy = (int2)r2.zw;
//       r3.zw = float2(0,0);
//       r0.z = cursor_mask.Load(r3.xyz).x;
//       r0.z = (uint)r0.z;
//       r1.z = r2.w + r1.y;
//       r3.x = (int)r2.z;
//       r3.y = (int)r1.z;
//       r3.zw = float2(0,0);
//       r1.z = cursor_mask.Load(r3.xyz).x;
//       r1.z = (uint)r1.z;
//       r3.xyz = (uint3)r0.zzz;
//       r0.z = (int)r0.z ^ (int)r1.z;
//       r3.w = (uint)r0.z;
//     } else {
//       r3.xyzw = float4(0,0,0,1);
//     }
//     if (r0.w == 0) {
//       r4.xy = (int2)r2.xw;
//       r4.zw = float2(0,0);
//       r0.z = cursor_mask.Load(r4.xyz).x;
//       r0.z = (uint)r0.z;
//       r0.w = r2.w + r1.y;
//       r4.x = (int)r2.x;
//       r4.y = (int)r0.w;
//       r4.zw = float2(0,0);
//       r0.w = cursor_mask.Load(r4.xyz).x;
//       r0.w = (uint)r0.w;
//       r4.xyz = (uint3)r0.zzz;
//       r0.z = (int)r0.z ^ (int)r0.w;
//       r4.w = (uint)r0.z;
//     } else {
//       r4.xyzw = float4(0,0,0,1);
//     }
//     r5.xyzw = cmp(r2.zyxy < float4(0,0,0,0));
//     r6.xyzw = cmp(r2.zyxy >= r1.xyxy);
//     r5.xyzw = (int4)r5.xyzw | (int4)r6.xyzw;
//     r0.zw = (int2)r5.yw | (int2)r5.xz;
//     if (r0.z == 0) {
//       r5.xy = (int2)r2.zy;
//       r5.zw = float2(0,0);
//       r0.z = cursor_mask.Load(r5.xyz).x;
//       r0.z = (uint)r0.z;
//       r1.x = r2.y + r1.y;
//       r5.x = (int)r2.z;
//       r5.y = (int)r1.x;
//       r5.zw = float2(0,0);
//       r1.x = cursor_mask.Load(r5.xyz).x;
//       r1.x = (uint)r1.x;
//       r5.xyz = (uint3)r0.zzz;
//       r0.z = (int)r0.z ^ (int)r1.x;
//       r5.w = (uint)r0.z;
//     } else {
//       r5.xyzw = float4(0,0,0,1);
//     }
//     if (r0.w == 0) {
//       r6.xy = (int2)r2.xy;
//       r6.zw = float2(0,0);
//       r0.z = cursor_mask.Load(r6.xyz).x;
//       r0.z = (uint)r0.z;
//       r0.w = r2.y + r1.y;
//       r1.x = (int)r2.x;
//       r1.y = (int)r0.w;
//       r1.zw = float2(0,0);
//       r0.w = cursor_mask.Load(r1.xyz).x;
//       r0.w = (uint)r0.w;
//       r1.xyz = (uint3)r0.zzz;
//       r0.z = (int)r0.z ^ (int)r0.w;
//       r1.w = (uint)r0.z;
//     } else {
//       r1.xyzw = float4(0,0,0,1);
//     }
//     r0.xy = frac(r0.xy);
//     r2.xyzw = r4.xyzw + -r3.xyzw;
//     r2.xyzw = r0.xxxx * r2.xyzw + r3.xyzw;
//     r1.xyzw = r1.xyzw + -r5.xyzw;
//     r1.xyzw = r0.xxxx * r1.xyzw + r5.xyzw;
//     r1.xyzw = r1.xyzw + -r2.xyzw;
//     o0.xyzw = r0.yyyy * r1.xyzw + r2.xyzw;
//   }
//   return;
// }
/////////////////////////////////////////////////////////////////////////////
