// asmtool.py --auto-fix-vertex-halo -i --only-autofixed 882c3fac12ec8fc9-vs.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.4 on Mon Mar 05 05:00:58 2018
//
//
// Buffer Definitions:
//
// cbuffer vector_register_block
// {
//
//   float3 gEffectHemisphereVector;    // Offset:    0 Size:    12 [unused]
//   float3 gEffectHemisphereColor0;    // Offset:   16 Size:    12 [unused]
//   float3 gEffectHemisphereColor1;    // Offset:   32 Size:    12 [unused]
//   row_major float3x3 gEffectLightDirection;// Offset:   48 Size:    44 [unused]
//   row_major float3x3 gEffectLightColorDir;// Offset:   96 Size:    44 [unused]
//   float4 gEffectLightPosition[4];    // Offset:  144 Size:    64 [unused]
//   float4 gEffectLightColorPoint[4];  // Offset:  208 Size:    64 [unused]
//   row_major float4x4 gEffectWorldViewProj;// Offset:  480 Size:    64
//   row_major float4x4 gEffectShadingMatrix;// Offset:  544 Size:    64 [unused]
//   float3 gEffectEyePosition;         // Offset:  608 Size:    12 [unused]
//   float4 gEffectUVOffset;            // Offset:  624 Size:    16
//   float4 gEffectConstantColor;       // Offset:  640 Size:    16 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// vector_register_block             cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyz         0     NONE   float   xyz
// NORMAL                   0   xyz         1     NONE   float   xyz
// 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                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[40], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xyz
dcl_input v2.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_temps 3
// 3DMigoto StereoParams:
dcl_resource_texture2d (float,float,float,float) t125

ld_indexable(texture2d)(float,float,float,float) r2.xyzw, l(0, 0, 0, 0), t125.xyzw

mul r0.xyzw, v0.yyyy, cb0[31].xyzw
mad r0.xyzw, v0.xxxx, cb0[30].xyzw, r0.xyzw
mad r0.xyzw, v0.zzzz, cb0[32].xyzw, r0.xyzw
add r0.xyzw, r0.xyzw, cb0[33].xyzw
mov o0.xyzw, r0.xyzw

// Automatic vertex shader halo fix inserted with DarkStarSword's asmtool.py:
// asmtool.py --auto-fix-vertex-halo -i --only-autofixed 882c3fac12ec8fc9-vs.txt
ne r2.w, r0.w, l(1.0)
if_nz r2.w
  add r2.w, r0.w, -r2.y
  mad r0.x, r2.w, r2.x, r0.x
endif

mul r1.xy, v1.yyyy, cb0[31].xyxx
mad r1.xy, v1.xxxx, cb0[30].xyxx, r1.xyxx
mad r1.xy, v1.zzzz, cb0[32].xyxx, r1.xyxx
mov r1.z, -r1.y
mov o1.zw, -r1.xxxz
add o1.xy, v2.xyxx, cb0[39].xyxx
mul r1.xyz, r0.xywx, l(0.500000, -0.500000, 0.500000, 0.000000)
mov o2.zw, r0.zzzw
add o2.xy, r1.zzzz, r1.xyxx
ret
// Approximately 15 instruction slots used