cbuffer cb3 : register(b3)
{
  float4 cb3[13];
}

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

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

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


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

void main( 
  float4 v0 : POSITION0,
  float3 v1 : NORMAL0,
  float4 v2 : TEXCOORD0,
  out float4 o0 : SV_POSITION0)
{
  float4 r0,r1,r2;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = cb2[16].x * v1.x;
  r0.y = cb2[17].x * v1.x;
  r0.z = cb2[18].x * v1.x;
  r1.x = cb2[16].y * v1.y;
  r1.y = cb2[17].y * v1.y;
  r1.z = cb2[18].y * v1.y;
  r0.xyz = r1.xyz + r0.xyz;
  r1.x = cb2[16].z * v1.z;
  r1.y = cb2[17].z * v1.z;
  r1.z = cb2[18].z * v1.z;
  r0.xyz = r1.xyz + r0.xyz;
  r0.w = dot(r0.xyz, r0.xyz);
  r0.w = rsqrt(r0.w);
  r0.xyz = r0.xyz * r0.www;
  r1.xyz = cb2[13].xyz * v0.yyy;
  r1.xyz = cb2[12].xyz * v0.xxx + r1.xyz;
  r1.xyz = cb2[14].xyz * v0.zzz + r1.xyz;
  r1.xyz = cb2[15].xyz + r1.xyz;
  r2.xyz = -r1.xyz * cb0[0].www + cb0[0].xyz;
  r0.w = dot(r2.xyz, r2.xyz);
  r0.w = rsqrt(r0.w);
  r2.xyz = r2.xyz * r0.www;
  r0.w = dot(r0.xyz, r2.xyz);
  r0.w = -r0.w * r0.w + 1;
  r0.w = sqrt(r0.w);
  r0.w = cb1[5].z * r0.w;
  r0.xyz = -r0.xyz * r0.www + r1.xyz;
  r1.xyzw = cb3[10].xyzw * r0.yyyy;
  r1.xyzw = cb3[9].xyzw * r0.xxxx + r1.xyzw;
  r0.xyzw = cb3[11].xyzw * r0.zzzz + r1.xyzw;
  r0.xyzw = cb3[12].xyzw + r0.xyzw;
  r1.xyzw = cb2[1].xyzw * v0.yyyy;
  r1.xyzw = cb2[0].xyzw * v0.xxxx + r1.xyzw;
  r1.xyzw = cb2[2].xyzw * v0.zzzz + r1.xyzw;
  r1.xyzw = cb2[3].xyzw + r1.xyzw;
  r2.x = cb1[5].z != 0.000000;
  r0.xyzw = r2.xxxx ? r0.xyzw : r1.xyzw;
  r1.x = saturate(cb1[5].x / r0.w);
  r0.z = r1.x + r0.z;
  o0.xyw = r0.xyw;
  r0.x = max(0, r0.z);
  r0.x = r0.x + -r0.z;
  o0.z = cb1[5].y * r0.x + r0.z;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyz 
// NORMAL                   0   xyz         1     NONE   float   xyz 
// TEXCOORD                 0   xyzw        2     NONE   float       
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
//
vs_4_0
dcl_constantbuffer cb0[1], immediateIndexed
dcl_constantbuffer cb1[6], immediateIndexed
dcl_constantbuffer cb2[19], immediateIndexed
dcl_constantbuffer cb3[13], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xyz
dcl_output_siv o0.xyzw, position
dcl_temps 3
mul r0.x, v1.x, cb2[16].x
mul r0.y, v1.x, cb2[17].x
mul r0.z, v1.x, cb2[18].x
mul r1.x, v1.y, cb2[16].y
mul r1.y, v1.y, cb2[17].y
mul r1.z, v1.y, cb2[18].y
add r0.xyz, r0.xyzx, r1.xyzx
mul r1.x, v1.z, cb2[16].z
mul r1.y, v1.z, cb2[17].z
mul r1.z, v1.z, cb2[18].z
add r0.xyz, r0.xyzx, r1.xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
mul r1.xyz, v0.yyyy, cb2[13].xyzx
mad r1.xyz, cb2[12].xyzx, v0.xxxx, r1.xyzx
mad r1.xyz, cb2[14].xyzx, v0.zzzz, r1.xyzx
add r1.xyz, r1.xyzx, cb2[15].xyzx
mad r2.xyz, -r1.xyzx, cb0[0].wwww, cb0[0].xyzx
dp3 r0.w, r2.xyzx, r2.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, r2.xyzx
dp3 r0.w, r0.xyzx, r2.xyzx
mad r0.w, -r0.w, r0.w, l(1.000000)
sqrt r0.w, r0.w
mul r0.w, r0.w, cb1[5].z
mad r0.xyz, -r0.xyzx, r0.wwww, r1.xyzx
mul r1.xyzw, r0.yyyy, cb3[10].xyzw
mad r1.xyzw, cb3[9].xyzw, r0.xxxx, r1.xyzw
mad r0.xyzw, cb3[11].xyzw, r0.zzzz, r1.xyzw
add r0.xyzw, r0.xyzw, cb3[12].xyzw
mul r1.xyzw, v0.yyyy, cb2[1].xyzw
mad r1.xyzw, cb2[0].xyzw, v0.xxxx, r1.xyzw
mad r1.xyzw, cb2[2].xyzw, v0.zzzz, r1.xyzw
add r1.xyzw, r1.xyzw, cb2[3].xyzw
ne r2.x, cb1[5].z, l(0.000000)
movc r0.xyzw, r2.xxxx, r0.xyzw, r1.xyzw
div_sat r1.x, cb1[5].x, r0.w
add r0.z, r0.z, r1.x
mov o0.xyw, r0.xyxw
max r0.x, r0.z, l(0.000000)
add r0.x, -r0.z, r0.x
mad o0.z, cb1[5].y, r0.x, r0.z
ret 
// Approximately 0 instruction slots used

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


/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Recompiled ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789
//
//   using 3Dmigoto v1.2.1 on Sun Sep 13 13:44:27 2015
//
//
// Buffer Definitions: 
//
// cbuffer cb3
// {
//
//   float4 cb3[13];                    // Offset:    0 Size:   208
//
// }
//
// cbuffer cb2
// {
//
//   float4 cb2[19];                    // Offset:    0 Size:   304
//
// }
//
// cbuffer cb1
// {
//
//   float4 cb1[6];                     // Offset:    0 Size:    96
//
// }
//
// cbuffer cb0
// {
//
//   float4 cb0;                        // Offset:    0 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// cb0                               cbuffer      NA          NA    0        1
// cb1                               cbuffer      NA          NA    1        1
// cb2                               cbuffer      NA          NA    2        1
// cb3                               cbuffer      NA          NA    3        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyz 
// NORMAL                   0   xyz         1     NONE   float   xyz 
// TEXCOORD                 0   xyzw        2     NONE   float       
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
//
vs_4_0
dcl_constantbuffer cb3[13], immediateIndexed
dcl_constantbuffer cb2[19], immediateIndexed
dcl_constantbuffer cb1[6], immediateIndexed
dcl_constantbuffer cb0[1], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xyz
dcl_output_siv o0.xyzw, position
dcl_temps 4
mul r0.xyz, v1.zxyz, cb2[16].zxyz
mov r1.x, r0.z
mul r2.xyz, v1.yxzy, cb2[17].yxzy
mov r1.y, r2.x
mul r3.xyz, v1.xyzx, cb2[18].xyzx
mov r1.z, r3.y
mov r2.x, r0.y
mov r0.y, r2.z
mov r2.z, r3.x
mov r0.z, r3.z
add r1.xyz, r1.xyzx, r2.xyzx
add r0.xyz, r0.xyzx, r1.xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
mul r1.xyz, v0.yyyy, cb2[13].xyzx
mad r1.xyz, cb2[12].xyzx, v0.xxxx, r1.xyzx
mad r1.xyz, cb2[14].xyzx, v0.zzzz, r1.xyzx
add r1.xyz, r1.xyzx, cb2[15].xyzx
mad r2.xyz, -r1.xyzx, cb0[0].wwww, cb0[0].xyzx
dp3 r0.w, r2.xyzx, r2.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, r2.xyzx
dp3 r0.w, r0.xyzx, r2.xyzx
mad r0.w, -r0.w, r0.w, l(1.000000)
sqrt r0.w, r0.w
mul r0.w, r0.w, cb1[5].z
mad r0.xyz, -r0.xyzx, r0.wwww, r1.xyzx
mul r1.xyzw, r0.yyyy, cb3[10].xyzw
mad r1.xyzw, cb3[9].xyzw, r0.xxxx, r1.xyzw
mad r0.xyzw, cb3[11].xyzw, r0.zzzz, r1.xyzw
add r0.xyzw, r0.xyzw, cb3[12].xyzw
mul r1.xyzw, v0.yyyy, cb2[1].xyzw
mad r1.xyzw, cb2[0].xyzw, v0.xxxx, r1.xyzw
mad r1.xyzw, cb2[2].xyzw, v0.zzzz, r1.xyzw
add r1.xyzw, r1.xyzw, cb2[3].xyzw
ne r2.x, cb1[5].z, l(0.000000)
movc r0.xyzw, r2.xxxx, r0.xyzw, r1.xyzw
div_sat r1.x, cb1[5].x, r0.w
add r0.z, r0.z, r1.x
mov o0.xyw, r0.xyxw
max r0.x, r0.z, l(0.000000)
add r0.x, -r0.z, r0.x
mad o0.z, cb1[5].y, r0.x, r0.z
ret 
// Approximately 45 instruction slots used

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