//Eyes reflection VS. Haloing in o8.
// ---- Created with 3Dmigoto v1.3.16 on Sat May 11 00:08:36 2019
cbuffer cb9 : register(b9)
{
  float4 cb9[7];
}

cbuffer cb5 : register(b5)
{
  float4 cb5[2];
}

cbuffer cb12 : register(b12)
{
  float4 cb12[31];
}

cbuffer cb10 : register(b10)
{
  float4 cb10[768];
}




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


void main(
  float4 v0 : POSITION0,
  float4 v1 : BLENDWEIGHT0,
  uint4 v2 : BLENDINDICES0,
  float4 v3 : NORMAL0,
  float4 v4 : TANGENT0,
  float2 v5 : TEXCOORD0,
  out float4 o0 : TEXCOORD0,
  out float4 o1 : TEXCOORD1,
  out float4 o2 : TEXCOORD2,
  out float4 o3 : TEXCOORD3,
  out float4 o4 : TEXCOORD4,
  out float4 o5 : TEXCOORD5,
  out float4 o6 : TEXCOORD6,
  out float4 o7 : TEXCOORD7,
  out float4 o8 : TEXCOORD8,
  out float4 o9 : SV_POSITION0)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 stereo = StereoParams.Load(0);

  o0.xy = cb5[0].xy + v5.xy;
  r0.x = dot(v1.yzw, float3(1,1,1));
  r0.x = 1 + -r0.x;
  r1.xyz = float3(0,0,0);
  r2.xyzw = (int4)v2.xyzw * int4(3,3,3,3);
  r1.w = floor(cb10[r2.x+2].w);
  r3.xyzw = cb10[r2.y+2].xyzw + -r1.zzzw;
  r3.xyzw = v1.yyyy * r3.xyzw;
  r4.xyzw = cb10[r2.x+2].xyzw + -r1.zzzw;
  r3.xyzw = r4.xyzw * r0.xxxx + r3.xyzw;
  r4.xyzw = cb10[r2.z+2].xyzw + -r1.zzzw;
  r3.xyzw = r4.xyzw * v1.zzzz + r3.xyzw;
  r4.xyzw = cb10[r2.w+2].xyzw + -r1.zzzw;
  r3.xyzw = r4.xyzw * v1.wwww + r3.xyzw;
  r1.xyzw = r3.xyzw + r1.xyzw;
  r0.yzw = v3.xyz * float3(2.00787401,2.00787401,2.00787401) + float3(-1,-1,-1);
  r3.z = dot(r1.xyz, r0.yzw);
  r4.y = floor(cb10[r2.x+0].w);
  r4.xz = float2(0,0);
  r5.xyzw = cb10[r2.y+0].xyzw + -r4.xxxy;
  r5.xyzw = v1.yyyy * r5.xyzw;
  r6.xyzw = cb10[r2.x+0].xyzw + -r4.xxxy;
  r5.xyzw = r6.xyzw * r0.xxxx + r5.xyzw;
  r6.xyzw = cb10[r2.z+0].xyzw + -r4.xxxy;
  r5.xyzw = r6.xyzw * v1.zzzz + r5.xyzw;
  r6.xyzw = cb10[r2.w+0].xyzw + -r4.xxxy;
  r5.xyzw = r6.xyzw * v1.wwww + r5.xyzw;
  r5.xyzw = r5.xyzw + r4.zzzy;
  r3.x = dot(r5.xyz, r0.yzw);
  r4.w = floor(cb10[r2.x+1].w);
  r6.xyzw = cb10[r2.y+1].xyzw + -r4.zzzw;
  r6.xyzw = v1.yyyy * r6.xyzw;
  r7.xyzw = cb10[r2.x+1].xyzw + -r4.zzzw;
  r6.xyzw = r7.xyzw * r0.xxxx + r6.xyzw;
  r7.xyzw = cb10[r2.z+1].xyzw + -r4.zzzw;
  r2.xyzw = cb10[r2.w+1].xyzw + -r4.zzzw;
  r6.xyzw = r7.xyzw * v1.zzzz + r6.xyzw;
  r2.xyzw = r2.xyzw * v1.wwww + r6.xyzw;
  r2.xyzw = r2.xyzw + r4.zzzw;
  r3.y = dot(r2.xyz, r0.yzw);
  o1.xyz = float3(-1,-1,1) * r3.xyz;
  o3.xyz = r3.xyz;
  r0.xyz = v0.xyz;
  r0.w = 1;
  r3.x = dot(r5.xyzw, r0.xyzw);
  r3.y = dot(r2.xyzw, r0.xyzw);
  r3.z = dot(r1.xyzw, r0.xyzw);
  o2.xyz = r3.xyz;
  r0.xyz = -cb12[30].xyz + r3.xyz;
  o2.w = cb5[1].w;
  o3.w = 0;
  r3.xyz = v4.xyz * float3(2.00787401,2.00787401,2.00787401) + float3(-1,-1,-1);
  o4.x = dot(r5.xyz, r3.xyz);
  o4.y = dot(r2.xyz, r3.xyz);
  o4.z = dot(r1.xyz, r3.xyz);
  o4.w = v4.w * 2.00787401 + -1;
  r0.w = dot(cb9[4].xy, cb9[4].xy);
  r0.w = sqrt(r0.w);
  r1.z = saturate(2 + -r0.w);
  r2.xyzw = max(cb9[4].xyzw, float4(-1,-1,-1,-1));
  r2.xyzw = min(float4(1,1,1,1), r2.zwxy);
  r1.xy = r2.zw;
  r0.w = dot(r1.xyz, r1.xyz);
  r0.w = rsqrt(r0.w);
  r1.xyz = r1.xyz * r0.www;
  r3.x = dot(cb9[0].xyz, r1.xyz);
  r3.y = dot(cb9[1].xyz, r1.xyz);
  r3.z = dot(cb9[2].xyz, r1.xyz);
  r0.w = dot(-cb12[6].xyz, r3.xyz);
  r0.w = r0.w + r0.w;
  r1.xyz = r3.xyz * -r0.www + -cb12[6].xyz;
  r1.xyz = cb9[6].xxx * r1.xyz + r3.xyz;
  o5.xyz = -r1.xyz;
  r0.w = dot(cb9[5].zw, cb9[5].zw);
  r0.w = rsqrt(r0.w);
  r1.xy = cb9[5].zw * r0.ww;
  o5.w = dot(cb9[0].xy, r1.xy);
  r0.w = dot(cb9[4].zw, cb9[4].zw);
  r0.w = sqrt(r0.w);
  r2.z = saturate(2 + -r0.w);
  r0.w = dot(r2.xyz, r2.xyz);
  r0.w = rsqrt(r0.w);
  r2.xyz = r2.xyz * r0.www;
  r3.x = dot(cb9[0].xyz, r2.xyz);
  r3.y = dot(cb9[1].xyz, r2.xyz);
  r3.z = dot(cb9[2].xyz, r2.xyz);
  r0.w = dot(-cb12[6].xyz, r3.xyz);
  r0.w = r0.w + r0.w;
  r2.xyz = r3.xyz * -r0.www + -cb12[6].xyz;
  r2.xyz = cb9[6].xxx * r2.xyz + r3.xyz;
  o6.xyz = -r2.xyz;
  o6.w = dot(cb9[1].xy, r1.xy);
  o7.w = dot(cb9[2].xy, r1.xy);
  r0.w = dot(cb9[5].xy, cb9[5].xy);
  r0.w = sqrt(r0.w);
  r1.z = saturate(2 + -r0.w);
  r2.xy = max(cb9[5].xy, float2(-1,-1));
  r1.xy = min(float2(1,1), r2.xy);
  r0.w = dot(r1.xyz, r1.xyz);
  r0.w = rsqrt(r0.w);
  r1.xyz = r1.xyz * r0.www;
  r2.x = dot(cb9[0].xyz, r1.xyz);
  r2.y = dot(cb9[1].xyz, r1.xyz);
  r2.z = dot(cb9[2].xyz, r1.xyz);
  r0.w = dot(-cb12[6].xyz, r2.xyz);
  r0.w = r0.w + r0.w;
  r1.xyz = r2.xyz * -r0.www + -cb12[6].xyz;
  r1.xyz = cb9[6].xxx * r1.xyz + r2.xyz;
  o7.xyz = -r1.xyz;
  r1.x = dot(cb12[4].xyz, r0.xyz);
  r1.y = dot(cb12[5].xyz, r0.xyz);
  r1.z = dot(cb12[6].xyz, r0.xyz);
  r1.w = 1;
  r0.x = dot(cb12[0].xyzw, r1.xyzw);
  r0.y = dot(cb12[1].xyzw, r1.xyzw);
  r0.z = dot(cb12[2].xyzw, r1.xyzw);
  r0.w = dot(cb12[3].xyzw, r1.xyzw);
  o8.xyzw = r0.xyzw;
  o9.xyzw = r0.xyzw;
  o8.x+=stereo.x*(o8.w-stereo.y);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Sat May 11 00:08:36 2019
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyz
// BLENDWEIGHT              0   xyzw        1     NONE   float    yzw
// BLENDINDICES             0   xyzw        2     NONE    uint   xyzw
// NORMAL                   0   xyzw        3     NONE   float   xyz
// TANGENT                  0   xyzw        4     NONE   float   xyzw
// TEXCOORD                 0   xy          5     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xy          0     NONE   float   xy
// TEXCOORD                 1   xyz         1     NONE   float   xyz
// TEXCOORD                 2   xyzw        2     NONE   float   xyzw
// TEXCOORD                 3   xyzw        3     NONE   float   xyzw
// TEXCOORD                 4   xyzw        4     NONE   float   xyzw
// TEXCOORD                 5   xyzw        5     NONE   float   xyzw
// TEXCOORD                 6   xyzw        6     NONE   float   xyzw
// TEXCOORD                 7   xyzw        7     NONE   float   xyzw
// TEXCOORD                 8   xyzw        8     NONE   float   xyzw
// SV_POSITION              0   xyzw        9      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb10[768], dynamicIndexed
dcl_constantbuffer cb12[31], immediateIndexed
dcl_constantbuffer cb5[2], immediateIndexed
dcl_constantbuffer cb9[7], immediateIndexed
dcl_input v0.xyz
dcl_input v1.yzw
dcl_input v2.xyzw
dcl_input v3.xyz
dcl_input v4.xyzw
dcl_input v5.xy
dcl_output o0.xy
dcl_output o1.xyz
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_output o7.xyzw
dcl_output o8.xyzw
dcl_output_siv o9.xyzw, position
dcl_temps 8
add o0.xy, v5.xyxx, cb5[0].xyxx
dp3 r0.x, v1.yzwy, l(1.000000, 1.000000, 1.000000, 0.000000)
add r0.x, -r0.x, l(1.000000)
mov r1.xyz, l(0,0,0,0)
imul null, r2.xyzw, v2.xyzw, l(3, 3, 3, 3)
round_ni r1.w, cb10[r2.x + 2].w
add r3.xyzw, -r1.zzzw, cb10[r2.y + 2].xyzw
mul r3.xyzw, r3.xyzw, v1.yyyy
add r4.xyzw, -r1.zzzw, cb10[r2.x + 2].xyzw
mad r3.xyzw, r4.xyzw, r0.xxxx, r3.xyzw
add r4.xyzw, -r1.zzzw, cb10[r2.z + 2].xyzw
mad r3.xyzw, r4.xyzw, v1.zzzz, r3.xyzw
add r4.xyzw, -r1.zzzw, cb10[r2.w + 2].xyzw
mad r3.xyzw, r4.xyzw, v1.wwww, r3.xyzw
add r1.xyzw, r1.xyzw, r3.xyzw
mad r0.yzw, v3.xxyz, l(0.000000, 2.007874, 2.007874, 2.007874), l(0.000000, -1.000000, -1.000000, -1.000000)
dp3 r3.z, r1.xyzx, r0.yzwy
round_ni r4.y, cb10[r2.x + 0].w
mov r4.xz, l(0,0,0,0)
add r5.xyzw, -r4.xxxy, cb10[r2.y + 0].xyzw
mul r5.xyzw, r5.xyzw, v1.yyyy
add r6.xyzw, -r4.xxxy, cb10[r2.x + 0].xyzw
mad r5.xyzw, r6.xyzw, r0.xxxx, r5.xyzw
add r6.xyzw, -r4.xxxy, cb10[r2.z + 0].xyzw
mad r5.xyzw, r6.xyzw, v1.zzzz, r5.xyzw
add r6.xyzw, -r4.xxxy, cb10[r2.w + 0].xyzw
mad r5.xyzw, r6.xyzw, v1.wwww, r5.xyzw
add r5.xyzw, r4.zzzy, r5.xyzw
dp3 r3.x, r5.xyzx, r0.yzwy
round_ni r4.w, cb10[r2.x + 1].w
add r6.xyzw, -r4.zzzw, cb10[r2.y + 1].xyzw
mul r6.xyzw, r6.xyzw, v1.yyyy
add r7.xyzw, -r4.zzzw, cb10[r2.x + 1].xyzw
mad r6.xyzw, r7.xyzw, r0.xxxx, r6.xyzw
add r7.xyzw, -r4.zzzw, cb10[r2.z + 1].xyzw
add r2.xyzw, -r4.zzzw, cb10[r2.w + 1].xyzw
mad r6.xyzw, r7.xyzw, v1.zzzz, r6.xyzw
mad r2.xyzw, r2.xyzw, v1.wwww, r6.xyzw
add r2.xyzw, r4.zzzw, r2.xyzw
dp3 r3.y, r2.xyzx, r0.yzwy
mul o1.xyz, r3.xyzx, l(-1.000000, -1.000000, 1.000000, 0.000000)
mov o3.xyz, r3.xyzx
mov r0.xyz, v0.xyzx
mov r0.w, l(1.000000)
dp4 r3.x, r5.xyzw, r0.xyzw
dp4 r3.y, r2.xyzw, r0.xyzw
dp4 r3.z, r1.xyzw, r0.xyzw
mov o2.xyz, r3.xyzx
add r0.xyz, r3.xyzx, -cb12[30].xyzx
mov o2.w, cb5[1].w
mov o3.w, l(0)
mad r3.xyz, v4.xyzx, l(2.007874, 2.007874, 2.007874, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 o4.x, r5.xyzx, r3.xyzx
dp3 o4.y, r2.xyzx, r3.xyzx
dp3 o4.z, r1.xyzx, r3.xyzx
mad o4.w, v4.w, l(2.007874), l(-1.000000)
dp2 r0.w, cb9[4].xyxx, cb9[4].xyxx
sqrt r0.w, r0.w
add_sat r1.z, -r0.w, l(2.000000)
max r2.xyzw, l(-1.000000, -1.000000, -1.000000, -1.000000), cb9[4].xyzw
min r2.xyzw, r2.zwxy, l(1.000000, 1.000000, 1.000000, 1.000000)
mov r1.xy, r2.zwzz
dp3 r0.w, r1.xyzx, r1.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, r1.xyzx
dp3 r3.x, cb9[0].xyzx, r1.xyzx
dp3 r3.y, cb9[1].xyzx, r1.xyzx
dp3 r3.z, cb9[2].xyzx, r1.xyzx
dp3 r0.w, -cb12[6].xyzx, r3.xyzx
add r0.w, r0.w, r0.w
mad r1.xyz, r3.xyzx, -r0.wwww, -cb12[6].xyzx
mad r1.xyz, cb9[6].xxxx, r1.xyzx, r3.xyzx
mov o5.xyz, -r1.xyzx
dp2 r0.w, cb9[5].zwzz, cb9[5].zwzz
rsq r0.w, r0.w
mul r1.xy, r0.wwww, cb9[5].zwzz
dp2 o5.w, cb9[0].xyxx, r1.xyxx
dp2 r0.w, cb9[4].zwzz, cb9[4].zwzz
sqrt r0.w, r0.w
add_sat r2.z, -r0.w, l(2.000000)
dp3 r0.w, r2.xyzx, r2.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, r2.xyzx
dp3 r3.x, cb9[0].xyzx, r2.xyzx
dp3 r3.y, cb9[1].xyzx, r2.xyzx
dp3 r3.z, cb9[2].xyzx, r2.xyzx
dp3 r0.w, -cb12[6].xyzx, r3.xyzx
add r0.w, r0.w, r0.w
mad r2.xyz, r3.xyzx, -r0.wwww, -cb12[6].xyzx
mad r2.xyz, cb9[6].xxxx, r2.xyzx, r3.xyzx
mov o6.xyz, -r2.xyzx
dp2 o6.w, cb9[1].xyxx, r1.xyxx
dp2 o7.w, cb9[2].xyxx, r1.xyxx
dp2 r0.w, cb9[5].xyxx, cb9[5].xyxx
sqrt r0.w, r0.w
add_sat r1.z, -r0.w, l(2.000000)
max r2.xy, l(-1.000000, -1.000000, 0.000000, 0.000000), cb9[5].xyxx
min r1.xy, r2.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
dp3 r0.w, r1.xyzx, r1.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, r1.xyzx
dp3 r2.x, cb9[0].xyzx, r1.xyzx
dp3 r2.y, cb9[1].xyzx, r1.xyzx
dp3 r2.z, cb9[2].xyzx, r1.xyzx
dp3 r0.w, -cb12[6].xyzx, r2.xyzx
add r0.w, r0.w, r0.w
mad r1.xyz, r2.xyzx, -r0.wwww, -cb12[6].xyzx
mad r1.xyz, cb9[6].xxxx, r1.xyzx, r2.xyzx
mov o7.xyz, -r1.xyzx
dp3 r1.x, cb12[4].xyzx, r0.xyzx
dp3 r1.y, cb12[5].xyzx, r0.xyzx
dp3 r1.z, cb12[6].xyzx, r0.xyzx
mov r1.w, l(1.000000)
dp4 r0.x, cb12[0].xyzw, r1.xyzw
dp4 r0.y, cb12[1].xyzw, r1.xyzw
dp4 r0.z, cb12[2].xyzw, r1.xyzw
dp4 r0.w, cb12[3].xyzw, r1.xyzw
mov o8.xyzw, r0.xyzw
mov o9.xyzw, r0.xyzw
ret
// Approximately 0 instruction slots used

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


/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HLSL errors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:\SteamLibrary\steamapps\common\Yakuza Kiwami 2\ShaderCache\c774d1ab3477d9a4-vs_replace.txt(38,14-15): warning X3578: Output value 'o0' is not completely initialized
E:\SteamLibrary\steamapps\common\Yakuza Kiwami 2\ShaderCache\c774d1ab3477d9a4-vs_replace.txt(39,14-15): warning X3578: Output value 'o1' is not completely initialized
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
