// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.89 on Sun Dec  4 00:00:21 2022
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyz
// VERT_ID                  0   x           1     NONE    uint
// TEXCOORD                 0   xy          2     NONE   float   xy
// NORMAL                   0   xyz         3     NONE   float   xyz
// TANGENT                  0   xyz         4     NONE   float
// BINORMAL                 0   xyz         5     NONE   float
// TEXCOORD                 7   xyz         6     NONE   float   xyz
// TEXCOORD                 8   xyz         7     NONE   float   xyz
// SV_IsFrontFace           0   x           8    FFACE    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
// SV_Target                1   xyzw        1   TARGET   float   xyzw
// SV_Target                2   xyzw        2   TARGET   float   xyzw
// SV_Target                3   xyzw        3   TARGET   float   xyzw
// SV_Target                4   xy          4   TARGET   float   xy
// SV_Depth                 0    N/A   oDepth    DEPTH   float    YES
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB1[4], immediateIndexed
dcl_constantbuffer CB3[38], immediateIndexed
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t11
dcl_resource_texture2d (float,float,float,float) t13
dcl_input_ps_siv linear noperspective v0.xyz, position
dcl_input_ps linear v2.xy
dcl_input_ps linear v3.xyz
dcl_input_ps linear v6.xyz
dcl_input_ps linear v7.xyz
dcl_input_ps_sgv constant v8.x, is_front_face
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xy
dcl_output oDepth
dcl_temps 50
dcl_resource_buffer (float,float,float,float) t125
ld_indexable(buffer)(float,float,float,float) r40.xyzw, l(0, 0, 0, 0), t125.xyzw
mov o0.xyzw, l(0,0.498039216,0,0)
movc r0.xyz, v8.xxxx, v3.xyzx, -v3.xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
mad o1.xyz, r0.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
mov o1.w, l(1.00000024)
add r0.x, l(0.075000), cb3[35].x
mul r0.x, r0.x, l(6.66666651)
frc r0.x, r0.x
add r0.x, r0.x, l(-0.500000)
mul r0.x, r0.x, l(0.200000)
sample_indexable(texture2d)(float,float,float,float) r0.yz, v2.xyxx, t11.zxyw, s1
mad r0.yz, r0.yyzy, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, -0.996078432, -0.996078432, 0.000000)
mul r0.yz, r0.yyzy, l(0.000000, 4.000000, 4.000000, 0.000000)
mad r0.xw, r0.yyyz, r0.xxxx, v2.xxxy
sample_indexable(texture2d)(float,float,float,float) r1.xyz, r0.xwxx, t13.xyzw, s1
mul r0.x, l(6.66666651), cb3[35].x
frc r0.x, r0.x
add r0.w, r0.x, l(-0.500000)
mul r0.xw, r0.xxxw, l(6.28318548, 0.000000, 0.000000, 0.200000)
sincos null, r0.x, r0.x
mad r0.x, r0.x, l(0.500000), l(0.500000)
mad r0.yz, r0.yyzy, r0.wwww, v2.xxyx
sample_indexable(texture2d)(float,float,float,float) r0.yzw, r0.yzyy, t13.wxyz, s1
add r1.xyz, -r0.yzwy, r1.xyzx
mad r0.xyz, r0.xxxx, r1.xyzx, r0.yzwy
mov r1.x, cb1[3].x
mov r1.z, l(1.000000)
mul r0.xyz, r0.xyzx, r1.xxzx
mov r1.xy, l(0.450786,0.730490,0,0)
mov r1.z, cb1[3].x
mul r0.xyz, r0.xyzx, r1.xyzx
max r0.w, r0.z, r0.y
max r0.w, r0.w, r0.x
lt r0.w, l(0.0000153787005), r0.w
and r1.x, r0.w, l(2)
and o3.xyz, r0.xyzx, r0.wwww
and r0.x, l(8), cb1[0].y
movc r0.x, r0.x, l(1), l(0)
iadd r0.x, r1.x, r0.x
utof r0.x, r0.x
mul o2.w, r0.x, l(0.00392156886)
mov o2.xyz, l(1.000000,0,0,0)
mov o3.w, l(0)
mul r0.xy, v0.xyxx, cb3[32].zwzz
mad r0.xy, r0.xyxx, l(2.000000, -2.000000, 0.000000, 0.000000), l(-1.000000, 1.000000, 0.000000, 0.000000)
max r0.z, |v7.z|, l(0.000001)
mov r37.xyz, v7.xyzx
ld_indexable(buffer)(float,float,float,float) r41.xyzw, l(2, 0, 0, 0), t125.xyzw
ge r42.x, r41.x, l(5.000000)
if_z r42.x
  add r40.w, r37.z, -r41.y
  mad r37.x, r41.x, r40.w, r37.x
else
  add r40.w, r37.z, -r40.y
  mad r37.x, r40.x, r40.w, r37.x
endif
div r0.zw, r37.xxxy, r0.zzzz
add o4.xy, -r0.zwzz, r0.xyxx
imul null, r0.x, l(4099), cb3[37].z
and r0.x, r0.x, l(63)
ftoi r0.yz, v0.xxyx
iadd r0.xy, r0.xxxx, r0.yzyy
utof r0.xy, r0.xyxx
mul r0.xy, r0.xyxx, l(0.0671105608, 0.00583714992, 0.000000, 0.000000)
add r0.x, r0.y, r0.x
frc r0.x, r0.x
mul r0.x, r0.x, l(52.982918)
frc r0.x, r0.x
mul r0.x, r0.x, l(0.250000)
add r0.yzw, -v6.xxyz, cb3[29].xxyz
dp3 r1.x, r0.yzwy, r0.yzwy
rsq r1.x, r1.x
mul r0.yzw, r0.yyzw, r1.xxxx
mad r0.xyz, -r0.yzwy, r0.xxxx, v6.xyzx
mov r0.w, l(1.000000)
dp4 r1.x, r0.xyzw, cb3[18].xyzw
dp4 r0.x, r0.xyzw, cb3[19].xyzw
div r0.x, r1.x, r0.x
min r0.x, r0.x, v0.z
ine r0.y, l(0), cb3[36].x
ne r0.z, l(0.000000, 0.000000, 0.000000, 0.000000), cb3[37].x
or r0.y, r0.z, r0.y
movc oDepth, r0.y, v0.z, r0.x
ret
// Approximately 0 instruction slots used
