// ---- Created with 3Dmigoto v1.3.16 on Sun Apr 21 22:07:59 2019
cbuffer cb3 : register(b3)
{
  float4 cb3[21];
}

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

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

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




// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
  float4 v0 : POSITION0,
  float3 v1 : NORMAL0,
  float4 v2 : COLOR0,
  float4 v3 : TEXCOORD0,
  float2 v4 : TEXCOORD1,
  out float4 o0 : SV_POSITION0,
  out float4 o1 : COLOR0,
  out float4 o2 : TEXCOORD0,
  out float4 o3 : TEXCOORD1,
  out float4 o4 : TEXCOORD2,
  out float4 o5 : TEXCOORD3,
  out float4 o6 : TEXCOORD5)
{
  float4 r0,r1,r2,r3;
  uint4 bitmask, uiDest;
  float4 fDest;
float4 stereo = StereoParams.Load(0);
float4 params = IniParams.Load(0);
  r0.xy = cb0[23].zw + v0.xy;
  r1.xyzw = cb2[1].xyzw * r0.yyyy;
  r1.xyzw = cb2[0].xyzw * r0.xxxx + r1.xyzw;
  r1.xyzw = cb2[2].xyzw * v0.zzzz + r1.xyzw;
  r2.xyzw = cb2[3].xyzw + r1.xyzw;
  r1.xyz = cb2[3].xyz * v0.www + r1.xyz;
  r1.xyz = cb1[4].xyz + -r1.xyz;
  r3.xyzw = cb3[18].xyzw * r2.yyyy;
  r3.xyzw = cb3[17].xyzw * r2.xxxx + r3.xyzw;
  r3.xyzw = cb3[19].xyzw * r2.zzzz + r3.xyzw;
  r2.xyzw = cb3[20].xyzw * r2.wwww + r3.xyzw;
  o0.xyzw = r2.xyzw;
o0.x += stereo.x * params.x;   
  o1.xyzw = v2.xyzw;
  o2.xy = v3.xy;
  r2.x = dot(v1.xyz, cb2[4].xyz);
  r2.y = dot(v1.xyz, cb2[5].xyz);
  r2.z = dot(v1.xyz, cb2[6].xyz);
  r0.z = dot(r2.xyz, r2.xyz);
  r0.z = rsqrt(r0.z);
  r2.xyz = r2.xyz * r0.zzz;
  r0.z = dot(r1.xyz, r1.xyz);
  r0.z = rsqrt(r0.z);
  r3.xyz = r1.xyz * r0.zzz;
  r0.z = dot(r2.xyz, r3.xyz);
  r2.xy = cb3[6].xy * cb1[6].yy;
  r2.xy = cb3[5].xy * cb1[6].xx + r2.xy;
  r2.xy = cb0[28].yz * abs(r2.xy);
  r2.xy = r2.ww / r2.xy;
  r0.w = dot(r2.xy, r2.xy);
  r2.xy = cb0[27].xy * float2(0.25,0.25) + r2.xy;
  o4.zw = float2(0.25,0.25) / r2.xy;
  r0.w = rsqrt(r0.w);
  r1.w = cb0[28].x * abs(v4.y);
  r0.w = r1.w * r0.w;
  r1.w = 1.5 * r0.w;
  r2.x = 1 + -cb0[28].w;
  r2.x = r2.x * abs(r1.w);
  r0.w = r0.w * 1.5 + -r2.x;
  r0.z = abs(r0.z) * r0.w + r2.x;
  r0.w = cmp(cb3[8].w == 0.000000);
  r2.y = r0.w ? r0.z : r1.w;
  r0.z = cmp(0 >= v4.y);
  r0.z = r0.z ? 1.000000 : 0;
  r0.w = cb0[22].z + -cb0[22].y;
  r0.z = r0.z * r0.w + cb0[22].y;
  r0.z = r0.z * 0.25 + cb0[4].x;
  r0.z = cb0[22].w * r0.z;
  r2.w = 0.5 * r0.z;
  o3.yw = r2.yw;
  r0.w = 0.5 / r2.y;
  r1.w = -cb0[6].x * cb0[22].w + 1;
  r1.w = -cb0[4].y * cb0[22].w + r1.w;
  r1.w = r1.w * 0.5 + -r0.w;
  o3.x = -r0.z * 0.5 + r1.w;
  r0.z = -r0.z * 0.5 + 0.5;
  o3.z = r0.z + r0.w;
  r2.xyzw = max(float4(-2e+010,-2e+010,-2e+010,-2e+010), cb0[26].xyzw);
  r2.xyzw = min(float4(2e+010,2e+010,2e+010,2e+010), r2.xyzw);
  r0.xy = r0.xy * float2(2,2) + -r2.xy;
  o4.xy = r0.xy + -r2.zw;
  r0.xyz = cb0[12].xyz * r1.yyy;
  r0.xyz = cb0[11].xyz * r1.xxx + r0.xyz;
  o5.xyz = cb0[13].xyz * r1.zzz + r0.xyz;
  r0.x = 0.000244140625 * v4.x;
  r0.z = floor(r0.x);
  r0.w = -r0.z * 4096 + v4.x;
  r0.xy = float2(0.001953125,0.001953125) * r0.zw;
  o6.xy = r0.xy * cb0[29].xy + cb0[29].zw;
  o6.zw = r0.xy * cb0[30].xy + cb0[30].zw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Sun Apr 21 22:07:59 2019
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// NORMAL                   0   xyz         1     NONE   float   xyz
// COLOR                    0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 0   xy          3     NONE   float   xy
// TEXCOORD                 1   xy          4     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xy          2     NONE   float   xy
// TEXCOORD                 1   xyzw        3     NONE   float   xyzw
// TEXCOORD                 2   xyzw        4     NONE   float   xyzw
// TEXCOORD                 3   xyz         5     NONE   float   xyz
// TEXCOORD                 5   xyzw        6     NONE   float   xyzw
//
vs_4_0
dcl_constantbuffer cb0[31], immediateIndexed
dcl_constantbuffer cb1[7], immediateIndexed
dcl_constantbuffer cb2[7], immediateIndexed
dcl_constantbuffer cb3[21], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xyz
dcl_input v2.xyzw
dcl_input v3.xy
dcl_input v4.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xy
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyz
dcl_output o6.xyzw
dcl_temps 4
add r0.xy, v0.xyxx, cb0[23].zwzz
mul r1.xyzw, r0.yyyy, cb2[1].xyzw
mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw
mad r1.xyzw, cb2[2].xyzw, v0.zzzz, r1.xyzw
add r2.xyzw, r1.xyzw, cb2[3].xyzw
mad r1.xyz, cb2[3].xyzx, v0.wwww, r1.xyzx
add r1.xyz, -r1.xyzx, cb1[4].xyzx
mul r3.xyzw, r2.yyyy, cb3[18].xyzw
mad r3.xyzw, cb3[17].xyzw, r2.xxxx, r3.xyzw
mad r3.xyzw, cb3[19].xyzw, r2.zzzz, r3.xyzw
mad r2.xyzw, cb3[20].xyzw, r2.wwww, r3.xyzw
mov o0.xyzw, r2.xyzw
mov o1.xyzw, v2.xyzw
mov o2.xy, v3.xyxx
dp3 r2.x, v1.xyzx, cb2[4].xyzx
dp3 r2.y, v1.xyzx, cb2[5].xyzx
dp3 r2.z, v1.xyzx, cb2[6].xyzx
dp3 r0.z, r2.xyzx, r2.xyzx
rsq r0.z, r0.z
mul r2.xyz, r0.zzzz, r2.xyzx
dp3 r0.z, r1.xyzx, r1.xyzx
rsq r0.z, r0.z
mul r3.xyz, r0.zzzz, r1.xyzx
dp3 r0.z, r2.xyzx, r3.xyzx
mul r2.xy, cb1[6].yyyy, cb3[6].xyxx
mad r2.xy, cb3[5].xyxx, cb1[6].xxxx, r2.xyxx
mul r2.xy, |r2.xyxx|, cb0[28].yzyy
div r2.xy, r2.wwww, r2.xyxx
dp2 r0.w, r2.xyxx, r2.xyxx
mad r2.xy, cb0[27].xyxx, l(0.250000, 0.250000, 0.000000, 0.000000), r2.xyxx
div o4.zw, l(0.000000, 0.000000, 0.250000, 0.250000), r2.xxxy
rsq r0.w, r0.w
mul r1.w, |v4.y|, cb0[28].x
mul r0.w, r0.w, r1.w
mul r1.w, r0.w, l(1.500000)
add r2.x, -cb0[28].w, l(1.000000)
mul r2.x, |r1.w|, r2.x
mad r0.w, r0.w, l(1.500000), -r2.x
mad r0.z, |r0.z|, r0.w, r2.x
eq r0.w, cb3[8].w, l(0.000000)
movc r2.y, r0.w, r0.z, r1.w
ge r0.z, l(0.000000), v4.y
and r0.z, r0.z, l(0x3f800000)
add r0.w, -cb0[22].y, cb0[22].z
mad r0.z, r0.z, r0.w, cb0[22].y
mad r0.z, r0.z, l(0.250000), cb0[4].x
mul r0.z, r0.z, cb0[22].w
mul r2.w, r0.z, l(0.500000)
mov o3.yw, r2.yyyw
div r0.w, l(0.500000), r2.y
mad r1.w, -cb0[6].x, cb0[22].w, l(1.000000)
mad r1.w, -cb0[4].y, cb0[22].w, r1.w
mad r1.w, r1.w, l(0.500000), -r0.w
mad o3.x, -r0.z, l(0.500000), r1.w
mad r0.z, -r0.z, l(0.500000), l(0.500000)
add o3.z, r0.w, r0.z
max r2.xyzw, cb0[26].xyzw, l(-20000000000.000000, -20000000000.000000, -20000000000.000000, -20000000000.000000)
min r2.xyzw, r2.xyzw, l(20000000000.000000, 20000000000.000000, 20000000000.000000, 20000000000.000000)
mad r0.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), -r2.xyxx
add o4.xy, -r2.zwzz, r0.xyxx
mul r0.xyz, r1.yyyy, cb0[12].xyzx
mad r0.xyz, cb0[11].xyzx, r1.xxxx, r0.xyzx
mad o5.xyz, cb0[13].xyzx, r1.zzzz, r0.xyzx
mul r0.x, v4.x, l(0.000244140625)
round_ni r0.z, r0.x
mad r0.w, -r0.z, l(4096.000000), v4.x
mul r0.xy, r0.zwzz, l(0.00195312500, 0.00195312500, 0.000000, 0.000000)
mad o6.xy, r0.xyxx, cb0[29].xyxx, cb0[29].zwzz
mad o6.zw, r0.xxxy, cb0[30].xxxy, cb0[30].zzzw
ret
// Approximately 0 instruction slots used

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