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

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

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

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


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 float4 o2 : TEXCOORD1,
  out float4 o3 : TEXCOORD2,
  out float4 o4 : TEXCOORD3,
  out float3 o5 : TEXCOORD4)
{
  float4 r0,r1,r2,r3;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xyzw = cb3[1].xyzw * v0.yyyy;
  r0.xyzw = cb3[0].xyzw * v0.xxxx + r0.xyzw;
  r0.xyzw = cb3[2].xyzw * v0.zzzz + r0.xyzw;
  r0.xyzw = cb3[3].xyzw * v0.wwww + r0.xyzw;
  o0.xyzw = r0.xyzw;
float4 stereo = StereoParams.Load(0);
r0.x += stereo.x*(r0.w - stereo.y);
  o1.xy = v3.xy * cb0[10].xy + cb0[10].zw;
  r1.xyz = cb3[13].xyz * v0.yyy;
  r1.xyz = cb3[12].xyz * v0.xxx + r1.xyz;
  r1.xyz = cb3[14].xyz * v0.zzz + r1.xyz;
  o2.xyz = cb3[15].xyz * v0.www + r1.xyz;
  r0.y = cb1[5].x * r0.y;
  r1.xzw = float3(0.5,0.5,0.5) * r0.xwy;
  o3.zw = r0.zw;
  o3.xy = r1.xw + r1.zz;
  o4.xyzw = float4(0,0,0,0);
  r0.x = cb3[16].x * v2.x;
  r0.y = cb3[17].x * v2.x;
  r0.z = cb3[18].x * v2.x;
  r1.x = cb3[16].y * v2.y;
  r1.y = cb3[17].y * v2.y;
  r1.z = cb3[18].y * v2.y;
  r0.xyz = r1.xyz + r0.xyz;
  r1.x = cb3[16].z * v2.z;
  r1.y = cb3[17].z * v2.z;
  r1.z = cb3[18].z * v2.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.x = r0.y * r0.y;
  r1.x = r0.x * r0.x + -r1.x;
  r2.xyzw = r0.xyzz * r0.yzzx;
  r3.x = dot(cb2[41].xyzw, r2.xyzw);
  r3.y = dot(cb2[42].xyzw, r2.xyzw);
  r3.z = dot(cb2[43].xyzw, r2.xyzw);
  r1.xyz = cb2[44].xyz * r1.xxx + r3.xyz;
  r0.w = 1;
  r2.x = dot(cb2[38].xyzw, r0.xyzw);
  r2.y = dot(cb2[39].xyzw, r0.xyzw);
  r2.z = dot(cb2[40].xyzw, r0.xyzw);
  o5.xyz = r2.xyz + r1.xyz;
  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   xyzw
// TANGENT                  0   xyzw        1     NONE   float       
// NORMAL                   0   xyz         2     NONE   float   xyz 
// TEXCOORD                 0   xyzw        3     NONE   float   xy  
// 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   xy          1     NONE   float   xy  
// TEXCOORD                 1   xyz         2     NONE   float   xyz 
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
// TEXCOORD                 3   xyzw        4     NONE   float   xyzw
// TEXCOORD                 4   xyz         5     NONE   float   xyz 
//
vs_4_0
dcl_constantbuffer cb0[11], immediateIndexed
dcl_constantbuffer cb1[6], immediateIndexed
dcl_constantbuffer cb2[45], immediateIndexed
dcl_constantbuffer cb3[19], immediateIndexed
dcl_input v0.xyzw
dcl_input v2.xyz
dcl_input v3.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o2.xyz
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyz
dcl_temps 4
mul r0.xyzw, v0.yyyy, cb3[1].xyzw
mad r0.xyzw, cb3[0].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb3[2].xyzw, v0.zzzz, r0.xyzw
mad r0.xyzw, cb3[3].xyzw, v0.wwww, r0.xyzw
mov o0.xyzw, r0.xyzw
mad o1.xy, v3.xyxx, cb0[10].xyxx, cb0[10].zwzz
mul r1.xyz, v0.yyyy, cb3[13].xyzx
mad r1.xyz, cb3[12].xyzx, v0.xxxx, r1.xyzx
mad r1.xyz, cb3[14].xyzx, v0.zzzz, r1.xyzx
mad o2.xyz, cb3[15].xyzx, v0.wwww, r1.xyzx
mul r0.y, r0.y, cb1[5].x
mul r1.xzw, r0.xxwy, l(0.500000, 0.000000, 0.500000, 0.500000)
mov o3.zw, r0.zzzw
add o3.xy, r1.zzzz, r1.xwxx
mov o4.xyzw, l(0,0,0,0)
mul r0.x, v2.x, cb3[16].x
mul r0.y, v2.x, cb3[17].x
mul r0.z, v2.x, cb3[18].x
mul r1.x, v2.y, cb3[16].y
mul r1.y, v2.y, cb3[17].y
mul r1.z, v2.y, cb3[18].y
add r0.xyz, r0.xyzx, r1.xyzx
mul r1.x, v2.z, cb3[16].z
mul r1.y, v2.z, cb3[17].z
mul r1.z, v2.z, cb3[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.x, r0.y, r0.y
mad r1.x, r0.x, r0.x, -r1.x
mul r2.xyzw, r0.yzzx, r0.xyzz
dp4 r3.x, cb2[41].xyzw, r2.xyzw
dp4 r3.y, cb2[42].xyzw, r2.xyzw
dp4 r3.z, cb2[43].xyzw, r2.xyzw
mad r1.xyz, cb2[44].xyzx, r1.xxxx, r3.xyzx
mov r0.w, l(1.000000)
dp4 r2.x, cb2[38].xyzw, r0.xyzw
dp4 r2.y, cb2[39].xyzw, r0.xyzw
dp4 r2.z, cb2[40].xyzw, r0.xyzw
add o5.xyz, r1.xyzx, r2.xyzx
ret 
// Approximately 0 instruction slots used

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


/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HLSL errors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Steam\steamapps\common\Lumini\wrapper1349(35,14-15): warning X3578: Output value 'o1' is not completely initialized
C:\Program Files (x86)\Steam\steamapps\common\Lumini\wrapper1349(36,14-15): warning X3578: Output value 'o2' is not completely initialized
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/


/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Recompiled ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789
//
//   using 3Dmigoto v1.2.1 on Sun Sep 13 13:12:08 2015
//
//
// Buffer Definitions: 
//
// cbuffer cb3
// {
//
//   float4 cb3[19];                    // Offset:    0 Size:   304
//
// }
//
// cbuffer cb2
// {
//
//   float4 cb2[45];                    // Offset:    0 Size:   720
//
// }
//
// cbuffer cb1
// {
//
//   float4 cb1[6];                     // Offset:    0 Size:    96
//
// }
//
// cbuffer cb0
// {
//
//   float4 cb0[11];                    // Offset:    0 Size:   176
//
// }
//
//
// 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   xyzw
// TANGENT                  0   xyzw        1     NONE   float       
// NORMAL                   0   xyz         2     NONE   float   xyz 
// TEXCOORD                 0   xyzw        3     NONE   float   xy  
// 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   xy  
// TEXCOORD                 1   xyzw        2     NONE   float   xyz 
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
// TEXCOORD                 3   xyzw        4     NONE   float   xyzw
// TEXCOORD                 4   xyz         5     NONE   float   xyz 
//
vs_4_0
dcl_constantbuffer cb3[19], immediateIndexed
dcl_constantbuffer cb2[45], immediateIndexed
dcl_constantbuffer cb1[6], immediateIndexed
dcl_constantbuffer cb0[11], immediateIndexed
dcl_input v0.xyzw
dcl_input v2.xyz
dcl_input v3.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o2.xyz
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyz
dcl_temps 4
mul r0.xyzw, v0.yyyy, cb3[1].xyzw
mad r0.xyzw, cb3[0].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb3[2].xyzw, v0.zzzz, r0.xyzw
mad r0.xyzw, cb3[3].xwyz, v0.wwww, r0.xwyz
mov o0.xyzw, r0.xzwy
mad o1.xy, v3.xyxx, cb0[10].xyxx, cb0[10].zwzz
mul r1.xyz, v0.yyyy, cb3[13].xyzx
mad r1.xyz, cb3[12].xyzx, v0.xxxx, r1.xyzx
mad r1.xyz, cb3[14].xyzx, v0.zzzz, r1.xyzx
mad o2.xyz, cb3[15].xyzx, v0.wwww, r1.xyzx
mul r0.z, r0.z, cb1[5].x
mov o3.zw, r0.wwwy
mul r0.xyz, r0.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
add o3.xy, r0.yyyy, r0.xzxx
mov o4.xyzw, l(0,0,0,0)
mul r0.xyz, v2.zxyz, cb3[16].zxyz
mov r1.x, r0.z
mul r2.xyz, v2.yxzy, cb3[17].yxzy
mov r1.y, r2.x
mul r3.xyz, v2.xyzx, cb3[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.x, r0.y, r0.y
mad r1.x, r0.x, r0.x, -r1.x
mul r2.xyzw, r0.yzzx, r0.xyzz
dp4 r3.x, cb2[41].xyzw, r2.xyzw
dp4 r3.y, cb2[42].xyzw, r2.xyzw
dp4 r3.z, cb2[43].xyzw, r2.xyzw
mad r1.xyz, cb2[44].xyzx, r1.xxxx, r3.xyzx
mov r0.w, l(1.000000)
dp4 r2.x, cb2[38].xyzw, r0.xyzw
dp4 r2.y, cb2[39].xyzw, r0.xyzw
dp4 r2.z, cb2[40].xyzw, r0.xyzw
add o5.xyz, r1.xyzx, r2.xyzx
ret 
// Approximately 43 instruction slots used

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