cbuffer cb2 : register(b2)
{
  float4 cb2[16];
}

cbuffer cb1 : register(b1)
{
  float4 cb1[6];
}

cbuffer cb0 : register(b0)
{
  float4 cb0[24];
}


Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main( 
  float4 v0 : POSITION0,
  float4 v1 : TANGENT0,
  float3 v2 : NORMAL0,
  float4 v3 : TEXCOORD0,
  float4 v4 : TEXCOORD1,
  float4 v5 : TEXCOORD2,
  float4 v6 : TEXCOORD3,
  float4 v7 : COLOR0,
  out float4 o0 : SV_POSITION0,
  out float4 o1 : TEXCOORD0,
  out float3 o2 : TEXCOORD1,
  out float p2 : TEXCOORD4,
  out float4 o3 : TEXCOORD2,
  out float4 o4 : TEXCOORD3)
{
  float4 r0,r1,r2,r3,r4,r5,r6;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xyz = cb2[13].xyz * v0.yyy;
  r0.xyz = cb2[12].xyz * v0.xxx + r0.xyz;
  r0.xyz = cb2[14].xyz * v0.zzz + r0.xyz;
  r0.xyz = cb2[15].xyz * v0.www + r0.xyz;
  r1.x = dot(cb0[22].xy, r0.xz);
  r1.y = dot(cb0[22].zw, r0.xz);
  r1.z = dot(cb0[23].xy, r0.xz);
  r1.w = dot(cb0[23].zw, r0.xz);
  r2.xyzw = cb1[0].yyyy * cb0[21].xyzw;
  r1.xyzw = cb0[19].xyzw * r1.xyzw + r2.xyzw;
  sincos(r1.xyzw, r1.xyzw, r3.xyzw);
  r1.y = dot(r1.xyzw, cb0[18].xyzw);
  r4.xyzw = cb0[20].xyzw * cb0[18].xyzw;
  r5.xyzw = cb0[22].ywxz * r4.xyxy;
  r4.xyzw = cb0[23].xyzw * r4.zzww;
  r6.xy = r5.zw;
  r6.zw = r4.xz;
  r5.zw = r4.yw;
  r1.z = dot(r3.xyzw, r5.xyzw);
  r1.x = dot(r3.xyzw, r6.xyzw);
  r3.xyz = v0.xyz + r1.xyz;
  r1.xy = r1.xz + r0.xz;
  o2.xyz = -cb1[4].xyz + r0.xyz;
  r0.xyzw = cb2[1].xyzw * r3.yyyy;
  r0.xyzw = cb2[0].xyzw * r3.xxxx + r0.xyzw;
  r0.xyzw = cb2[2].xyzw * r3.zzzz + r0.xyzw;
  r0.xyzw = cb2[3].xyzw * v0.wwww + r0.xyzw;
  o0.xyzw = r0.xyzw;
   
float4 stereo = StereoParams.Load(0);
r0.x += stereo.x*(r0.w - stereo.y);

  r4.x = dot(cb0[22].xy, r1.xy);
  r4.y = dot(cb0[22].zw, r1.xy);
  r4.z = dot(cb0[23].xy, r1.xy);
  r4.w = dot(cb0[23].zw, r1.xy);
  r1.xyzw = cb0[19].xyzw * r4.xyzw + r2.xyzw;
  r1.xyzw = cos(r1.xyzw);
  r2.xyzw = cb0[19].xyzw * cb0[18].xyzw;
  r4.xyzw = cb0[22].ywxz * r2.xyxy;
  r2.xyzw = cb0[23].xyzw * r2.zzww;
  r5.xy = r4.zw;
  r5.zw = r2.xz;
  r4.zw = r2.yw;
  r2.x = dot(r1.xyzw, r4.xyzw);
  r1.x = dot(r1.xyzw, r5.xyzw);
  r1.x = -r1.x;
  r1.z = -r2.x;
  r1.xz = cb0[6].xx * r1.xz;
  r1.y = 2;
  r1.w = dot(r1.xyz, r1.xyz);
  r1.w = rsqrt(r1.w);
  o1.xyz = r1.xyz * r1.www;
  o1.w = 1;
  p2.x = r0.z;
  r1.xyzw = cb2[13].xzxz * r3.yyyy;
  r1.xyzw = cb2[12].xzxz * r3.xxxx + r1.xyzw;
  r1.xyzw = cb2[14].xzxz * r3.zzzz + r1.xyzw;
  r1.xyzw = cb2[15].xzxz * v0.wwww + r1.xyzw;
  r1.xyzw = cb1[0].xxxx * cb0[17].xyzw + r1.xyzw;
  o3.xyzw = cb0[16].xyzw * r1.xyzw;
  r0.y = cb1[5].x * r0.y;
  r1.xzw = float3(0.5,0.5,0.5) * r0.xwy;
  o4.zw = r0.zw;
  o4.xy = r1.xw + r1.zz;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.9 on Fri Nov 20 22:37:59 2015
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// TANGENT                  0   xyzw        1     NONE   float       
// NORMAL                   0   xyz         2     NONE   float       
// TEXCOORD                 0   xyzw        3     NONE   float       
// TEXCOORD                 1   xyzw        4     NONE   float       
// TEXCOORD                 2   xyzw        5     NONE   float       
// TEXCOORD                 3   xyzw        6     NONE   float       
// COLOR                    0   xyzw        7     NONE   float       
//
//
// 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   xyz         2     NONE   float   xyz 
// TEXCOORD                 4      w        2     NONE   float      w
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
// TEXCOORD                 3   xyzw        4     NONE   float   xyzw
//
vs_4_0
dcl_constantbuffer cb0[24], immediateIndexed
dcl_constantbuffer cb1[6], immediateIndexed
dcl_constantbuffer cb2[16], immediateIndexed
dcl_input v0.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyz
dcl_output o2.w
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_temps 7
mul r0.xyz, v0.yyyy, cb2[13].xyzx
mad r0.xyz, cb2[12].xyzx, v0.xxxx, r0.xyzx
mad r0.xyz, cb2[14].xyzx, v0.zzzz, r0.xyzx
mad r0.xyz, cb2[15].xyzx, v0.wwww, r0.xyzx
dp2 r1.x, cb0[22].xyxx, r0.xzxx
dp2 r1.y, cb0[22].zwzz, r0.xzxx
dp2 r1.z, cb0[23].xyxx, r0.xzxx
dp2 r1.w, cb0[23].zwzz, r0.xzxx
mul r2.xyzw, cb0[21].xyzw, cb1[0].yyyy
mad r1.xyzw, cb0[19].xyzw, r1.xyzw, r2.xyzw
sincos r1.xyzw, r3.xyzw, r1.xyzw
dp4 r1.y, r1.xyzw, cb0[18].xyzw
mul r4.xyzw, cb0[18].xyzw, cb0[20].xyzw
mul r5.xyzw, r4.xyxy, cb0[22].ywxz
mul r4.xyzw, r4.zzww, cb0[23].xyzw
mov r6.xy, r5.zwzz
mov r6.zw, r4.xxxz
mov r5.zw, r4.yyyw
dp4 r1.z, r3.xyzw, r5.xyzw
dp4 r1.x, r3.xyzw, r6.xyzw
add r3.xyz, r1.xyzx, v0.xyzx
add r1.xy, r0.xzxx, r1.xzxx
add o2.xyz, r0.xyzx, -cb1[4].xyzx
mul r0.xyzw, r3.yyyy, cb2[1].xyzw
mad r0.xyzw, cb2[0].xyzw, r3.xxxx, r0.xyzw
mad r0.xyzw, cb2[2].xyzw, r3.zzzz, r0.xyzw
mad r0.xyzw, cb2[3].xyzw, v0.wwww, r0.xyzw
mov o0.xyzw, r0.xyzw
dp2 r4.x, cb0[22].xyxx, r1.xyxx
dp2 r4.y, cb0[22].zwzz, r1.xyxx
dp2 r4.z, cb0[23].xyxx, r1.xyxx
dp2 r4.w, cb0[23].zwzz, r1.xyxx
mad r1.xyzw, cb0[19].xyzw, r4.xyzw, r2.xyzw
sincos null, r1.xyzw, r1.xyzw
mul r2.xyzw, cb0[18].xyzw, cb0[19].xyzw
mul r4.xyzw, r2.xyxy, cb0[22].ywxz
mul r2.xyzw, r2.zzww, cb0[23].xyzw
mov r5.xy, r4.zwzz
mov r5.zw, r2.xxxz
mov r4.zw, r2.yyyw
dp4 r2.x, r1.xyzw, r4.xyzw
dp4 r1.x, r1.xyzw, r5.xyzw
mov r1.x, -r1.x
mov r1.z, -r2.x
mul r1.xz, r1.xxzx, cb0[6].xxxx
mov r1.y, l(2.000000)
dp3 r1.w, r1.xyzx, r1.xyzx
rsq r1.w, r1.w
mul o1.xyz, r1.wwww, r1.xyzx
mov o1.w, l(1.000000)
mov o2.w, r0.z
mul r1.xyzw, r3.yyyy, cb2[13].xzxz
mad r1.xyzw, cb2[12].xzxz, r3.xxxx, r1.xyzw
mad r1.xyzw, cb2[14].xzxz, r3.zzzz, r1.xyzw
mad r1.xyzw, cb2[15].xzxz, v0.wwww, r1.xyzw
mad r1.xyzw, cb1[0].xxxx, cb0[17].xyzw, r1.xyzw
mul o3.xyzw, r1.xyzw, cb0[16].xyzw
mul r0.y, r0.y, cb1[5].x
mul r1.xzw, r0.xxwy, l(0.500000, 0.000000, 0.500000, 0.500000)
mov o4.zw, r0.zzzw
add o4.xy, r1.zzzz, r1.xwxx
ret 
// Approximately 0 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
