// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.198 on Tue Nov 12 23:16:34 2024
//
//
// Buffer Definitions:
//
// cbuffer cb1
// {
//
//   float4 cb1[5];                     // Index:    0-4              Components:    20
//
// }
//
// cbuffer cb0
// {
//
//   float4 cb0[154];                   // Index:    0-153            Components:   616
//
// }
//
// Resource bind info for t0
// {
//
//   struct t0_t
//   {
//
//       float val[4];                  // Index:    0
//
//   } $Element;                        // Index:    0.xyzw           Components:     4
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// s0_s                              sampler      NA          NA    0        1
// s1_s                              sampler      NA          NA    1        1
// t0                                texture  struct         r/o    0        1
// t1                                texture  float4          2d    1        1
// t2                                texture  float4          2d    2        1
// IniParams                         texture  float4          1d  120        1
// cb0                               cbuffer      NA          NA    0        1
// cb1                               cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xy
// PRIMITIVE_ID             0   x           1     NONE    uint   x
// SV_IsFrontFace           0   x           2    FFACE    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB1[5], immediateIndexed
dcl_constantbuffer CB0[154], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_structured t0, 16
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture1d (float,float,float,float) t120
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps constant v1.x
dcl_input_ps_sgv constant v2.x, is_front_face
dcl_output o0.xyzw
dcl_temps 2
ld_indexable(texture1d)(float,float,float,float) r0.x, l(10, 0, 0, 0), t120.xyzw
eq r0.x, r0.x, l(0.000000)
discard_nz r0.x
add r0.xy, v0.xyxx, -cb0[128].xyxx
add r0.zw, r0.xxxy, cb0[153].xxxx
ftou r0.zw, r0.zzzw
ishl r0.w, r0.w, l(1)
utof r0.zw, r0.zzzw
ftoi r0.zw, r0.zzzw
iadd r0.z, r0.z, r0.w
itof r0.z, r0.z
ftou r0.z, r0.z
udiv null, r0.z, r0.z, l(5)
utof r0.z, r0.z
mul r1.xy, r0.xyxx, l(0.015625, 0.015625, 0.000000, 0.000000)
mad r0.xy, r0.xyxx, cb0[129].zwzz, l(0.500000, 0.500000, 0.000000, 0.000000)
sample_b_indexable(texture2d)(float,float,float,float) r0.w, r1.xyxx, t1.yzwx, s0, cb0[144].x
add r0.z, r0.w, r0.z
mad r0.z, r0.z, l(0.166666672), cb1[3].w
add r0.z, r0.z, l(-0.500000)
div r1.y, cb0[129].y, cb0[129].x
mov r1.x, l(1.000000)
mul r0.xy, r0.xyxx, r1.xyxx
mul r0.xy, r0.xyxx, cb1[4].xxxx
sample_b_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t2.xyzw, s1, cb0[144].x
add r0.x, r0.x, l(0.500000)
mul r0.x, r0.x, cb1[4].y
mul r0.y, |r0.x|, r0.z
ge r0.z, cb1[4].z, l(0.500000)
movc r0.y, r0.z, r0.y, |r0.x|
add r0.z, cb1[4].z, l(-0.500000)
lt r0.z, l(0.000010), |r0.z|
movc r0.x, r0.z, r0.y, |r0.x|
imul null, r0.y, v1.x, l(42)
itof r0.y, r0.y
ftou r0.y, r0.y
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r0.y, r0.y, l(0), t0.xxxx
ftoi r0.y, r0.y
and r0.y, r0.y, l(64)
itof r0.y, r0.y
ne r0.y, l(0.000000, 0.000000, 0.000000, 0.000000), r0.y
movc r0.y, r0.y, l(-1.000000), l(1.000000)
mul r0.y, r0.y, cb0[142].w
movc r0.z, v2.x, l(1.000000), l(-1.000000)
mul r0.y, r0.z, r0.y
mad r0.x, -r0.y, r0.x, l(-0.333300)
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
mov o0.xyzw, l(0,0,0,0)
ret
// Approximately 50 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with geo-11 v0.6.198 on Tue Nov 12 23:16:34 2024
//
// struct t0_t
// {
//     float val[4];                  // Offset:    0
// };
//
// cbuffer cb1 : register(b1)
// {
//   float4 cb1[5] : packoffset(c0);
// }
//
// cbuffer cb0 : register(b0)
// {
//   float4 cb0[154] : packoffset(c0);
// }
//
// SamplerState s0_s_s : register(s0);
// SamplerState s1_s_s : register(s1);
// StructuredBuffer<t0_t> t0 : register(t0);
// Texture2D<float4> t1 : register(t1);
// Texture2D<float4> t2 : register(t2);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Buffer<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : SV_Position0,
//   nointerpolation uint v1 : PRIMITIVE_ID0,
//   uint v2 : SV_IsFrontFace0,
//   out float4 o0 : SV_Target0)
// {
//   float4 r0,r1;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r0.x = IniParams.Load(float4(10,0,0,0)).x;
//   r0.x = cmp(r0.x == 0.000000);
//   if (r0.x != 0) discard;
//   r0.xy = -cb0[128].xy + v0.xy;
//   r0.zw = cb0[153].xx + r0.xy;
//   r0.zw = (uint2)r0.zw;
//   r0.w = (uint)r0.w << 1;
//   r0.zw = (uint2)r0.zw;
//   r0.zw = (int2)r0.zw;
//   r0.z = (int)r0.z + (int)r0.w;
//   r0.z = (int)r0.z;
//   r0.z = (uint)r0.z;
//   r0.z = (uint)r0.z % 5;
//   r0.z = (uint)r0.z;
//   r1.xy = float2(0.015625,0.015625) * r0.xy;
//   r0.xy = r0.xy * cb0[129].zw + float2(0.5,0.5);
//   r0.w = t1.SampleBias(s0_s_s, r1.xy, cb0[144].x).x;
//   r0.z = r0.z + r0.w;
//   r0.z = r0.z * 0.166666672 + cb1[3].w;
//   r0.z = -0.5 + r0.z;
//   r1.y = cb0[129].y / cb0[129].x;
//   r1.x = 1;
//   r0.xy = r1.xy * r0.xy;
//   r0.xy = cb1[4].xx * r0.xy;
//   r0.x = t2.SampleBias(s1_s_s, r0.xy, cb0[144].x).x;
//   r0.x = 0.5 + r0.x;
//   r0.x = cb1[4].y * r0.x;
//   r0.y = r0.z * abs(r0.x);
//   r0.z = cmp(cb1[4].z >= 0.5);
//   r0.y = r0.z ? r0.y : abs(r0.x);
//   r0.z = -0.5 + cb1[4].z;
//   r0.z = cmp(9.99999975e-06 < abs(r0.z));
//   r0.x = r0.z ? r0.y : abs(r0.x);
//   r0.y = (int)v1.x * 42;
//   r0.y = (int)r0.y;
//   r0.y = (uint)r0.y;
//   r0.y = t0[r0.y].val[0];
//   r0.y = (int)r0.y;
//   r0.y = (int)r0.y & 64;
//   r0.y = (int)r0.y;
//   r0.y = cmp(0 != r0.y);
//   r0.y = r0.y ? -1 : 1;
//   r0.y = cb0[142].w * r0.y;
//   r0.z = v2.x ? 1 : -1;
//   r0.y = r0.y * r0.z;
//   r0.x = -r0.y * r0.x + -0.333299994;
//   r0.x = cmp(r0.x < 0);
//   if (r0.x != 0) discard;
//   o0.xyzw = float4(0,0,0,0);
//   return;
// }
/////////////////////////////////////////////////////////////////////////////
