// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.163 on Tue Apr 11 00:13:42 2023
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyz
// TEXCOORD                 0   xy          1     NONE   float   xy
// NORMAL                   0   xyz         2     NONE   float   xyz
// COLOR                    0   xyzw        3     NONE   float   xyzw
// SV_InstanceID            0   x           4   INSTID    uint   x
// SV_VertexID              0   x           5   VERTID    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// VERT_ID                  0   x           1     NONE    uint   x
// TEXCOORD                 0   xy          2     NONE   float   xy
// NORMAL                   0   xyz         3     NONE   float   xyz
// COLOR                    0   xyzw        4     NONE   float   xyzw
// TEXCOORD                 8   xyz         5     NONE   float   xyz
// P                        0   x           6  RTINDEX    uint   x
//
vs_5_0
dcl_output_siv o6.x, rendertarget_array_index
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB1[6], immediateIndexed
dcl_constantbuffer CB3[28], immediateIndexed
dcl_constantbuffer CB12[1], immediateIndexed
dcl_resource_structured t17, 104
dcl_input v0.xyz
dcl_input v1.xy
dcl_input v2.xyz
dcl_input v3.xyzw
dcl_input_sgv v4.x, instance_id
dcl_input_sgv v5.x, vertex_id
dcl_output_siv o0.xyzw, position
dcl_output o1.x
dcl_output o2.xy
dcl_output o3.xyz
dcl_output o4.xyzw
dcl_output o5.xyz
dcl_temps 51
dcl_resource_buffer (float,float,float,float) t125
dcl_resource_texture1d (float,float,float,float) t120
ld_indexable(buffer)(float,float,float,float) r51.xyzw, l(0, 0, 0, 0), t125.xyzw
mov o6.x, r51.z
ld_indexable(buffer)(float,float,float,float) r40.xyzw, l(0, 0, 0, 0), t125.xyzw
ld_indexable(texture1d)(float,float,float,float) r33.xyzw, l(3, 0, 0, 0), t120.xyzw
ld_indexable(texture1d)(float,float,float,float) r35.xyzw, l(10, 0, 0, 0), t120.xyzw
ld_indexable(texture1d)(float,float,float,float) r36.xyzw, l(11, 0, 0, 0), t120.xyzw
iadd r0.x, v4.x, cb1[1].y
ld_structured_indexable(structured_buffer, stride=104)(mixed,mixed,mixed,mixed) r1.xyzw, r0.x, l(0), t17.xyzw
mov r2.x, r1.w
ld_structured_indexable(structured_buffer, stride=104)(mixed,mixed,mixed,mixed) r3.xyzw, r0.x, l(16), t17.xyzw
mov r2.y, r3.w
ld_structured_indexable(structured_buffer, stride=104)(mixed,mixed,mixed,mixed) r4.xyzw, r0.x, l(32), t17.xyzw
mov r2.z, r4.w
mad r0.yzw, v0.xxyz, cb1[4].xxyz, cb1[5].xxyz
dp3 r5.x, r0.yzwy, r1.xyzx
dp3 r5.y, r0.yzwy, r3.xyzx
dp3 r5.z, r0.yzwy, r4.xyzx
add r2.xyz, r2.xyzx, r5.xyzx
mov r2.w, l(1.000000)
dp4 r10.x, r2.xyzw, cb3[16].xyzw
dp4 r10.y, r2.xyzw, cb3[17].xyzw
dp4 r10.z, r2.xyzw, cb3[18].xyzw
dp4 r10.w, r2.xyzw, cb3[19].xyzw
ieq r42.x, r33.x, l(0x40c00000)
ne r42.y, r36.x, l(1.000000)
ieq r42.w, r10.w, l(0x3f800000)
ge r43.x, r10.x, l(-0.700000)
lt r43.y, r10.x, l(0.700000)
ge r43.z, r10.y, l(-0.882222)
lt r43.w, r10.y, l(-0.522222)
and r43.x, r43.x, r43.y
and r43.x, r43.x, r43.z
and r43.x, r43.x, r43.w
and r42.x, r42.x, r42.y
and r42.x, r42.x, r42.w
and r42.x, r42.x, r43.x
if_z r42.x
  ieq r41.x, r10.w, l(0x3f800000)
  ge r45.x, r10.w, l(0.850000)
  if_z r41.x
    if_nz r45.x
      add r40.w, r10.w, -r40.y
      mad r10.x, r40.x, r40.w, r10.x
    else
      mul r40.w, r40.y, l(0.450000)
      add r40.w, r10.w, -r40.w
      mad r10.x, r40.x, r40.w, r10.x
    endif
  else
    mad r10.x, r40.x, r35.x, r10.x
  endif
endif
mov o0.xyzw, r10.xyzw
ld_structured_indexable(structured_buffer, stride=104)(mixed,mixed,mixed,mixed) r1.w, r0.x, l(100), t17.xxxx
bfi o1.x, l(24), l(0), v5.x, r1.w
mov o2.xy, v1.xyxx
mad r2.xyz, v2.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r1.x, r2.xyzx, r1.xyzx
dp3 r1.y, r2.xyzx, r3.xyzx
dp3 r1.z, r2.xyzx, r4.xyzx
dp3 r1.w, r1.xyzx, r1.xyzx
rsq r1.w, r1.w
mul o3.xyz, r1.wwww, r1.xyzx
mov o4.xyzw, v3.xyzw
ld_structured_indexable(structured_buffer, stride=104)(mixed,mixed,mixed,mixed) r1.xyzw, r0.x, l(48), t17.wxyz
dp3 r2.x, r0.yzwy, r1.yzwy
ld_structured_indexable(structured_buffer, stride=104)(mixed,mixed,mixed,mixed) r3.xyzw, r0.x, l(64), t17.xyzw
ld_structured_indexable(structured_buffer, stride=104)(mixed,mixed,mixed,mixed) r4.xyzw, r0.x, l(80), t17.xyzw
mov r1.y, r3.w
dp3 r2.y, r0.yzwy, r3.xyzx
dp3 r2.z, r0.yzwy, r4.xyzx
mov r1.z, r4.w
add r0.xyz, r1.xyzx, r2.xyzx
mov r0.w, l(1.000000)
dp4 o5.x, r0.xyzw, cb3[24].xyzw
dp4 o5.y, r0.xyzw, cb3[25].xyzw
dp4 o5.z, r0.xyzw, cb3[27].xyzw
ret
// Approximately 0 instruction slots used
