//HUD VS 3.
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Fri May 17 18:09:32 2019
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyz
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
// SV_InstanceID            0   x           3   INSTID    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 1   xyzw        1     NONE   float   xyzw
// 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                11   x           8     NONE    uint   x
// SV_POSITION              0   xyzw        9      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[6], immediateIndexed
dcl_constantbuffer cb9[8], immediateIndexed
dcl_resource_raw t16
dcl_resource_raw t17
dcl_input v0.xyz
dcl_input v1.xyzw
dcl_input v2.xyzw
dcl_input_sgv v3.x, instance_id
dcl_output o0.xyzw
dcl_output o1.xyzw
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.x
dcl_output_siv o9.xyzw, position
dcl_temps 35
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r25.xyzw, l(0, 0, 0, 0), t125.xyzw
dcl_resource_texture1d (float,float,float,float) t120
ld_indexable(texture1d)(float,float,float,float) r24.xyzw, l(0, 0, 0, 0), t120.xyzw
and r0.xy, l(0x00040000, 0x80000000, 0, 0), cb0[1].wwww
ishl r0.z, v3.x, l(2)
ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r0.z, r0.z, t17.xxxx
movc r0.x, r0.x, r0.z, v3.x
imul null, r0.z, r0.x, l(224)
ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r1.xyzw, r0.z, t16.xyzw
ne r0.z, r1.w, l(0.000000)
if_nz r0.z
  imad r0.z, r0.x, l(224), l(16)
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r2.xyz, r0.z, t16.xyzx
  imad r3.xyzw, r0.xxxx, l(224, 224, 224, 224), l(32, 64, 192, 208)
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r4.xyzw, r3.x, t16.xyzw
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r5.xyz, r3.y, t16.xyzx
  and r6.xyzw, l(128, 4096, 0x80000000, 0x20004000), cb0[1].wwww
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r7.xyz, r3.z, t16.xyzx
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r8.xyz, r3.w, t16.xyzx
  movc r7.xyz, r6.xxxx, r7.xyzx, l(0,0,0,0)
  movc r8.xyz, r6.xxxx, r8.xyzx, l(0,0,0,0)
  movc r9.xyz, r6.xxyx, l(0,1.000000,1.000000,0), l(0,0,0,0)
  movc r10.xyz, r6.yyyy, cb0[2].xyzx, l(0,0,0,0)
  movc r11.xyz, r6.yyyy, cb0[3].xyzx, l(0,0,0,0)
  mul r0.zw, r5.xxxy, v0.xxxy
  mul r5.xyw, r7.xyxz, r0.zzzz
  mad r5.xyw, r0.wwww, r8.xyxz, r5.xyxw
  mad r5.xyw, v0.zzzz, r9.xxxy, r5.xyxw
  sincos r3.x, r7.x, r5.z
  mov r8.x, -r3.x
  mov r8.y, r7.x
  dp2 r7.x, r8.yxyy, r0.zwzz
  mov r8.z, r3.x
  dp2 r7.y, r8.zyzz, r0.zwzz
  mov r7.z, v0.z
  movc r5.xyz, r6.xxxx, r5.xywx, r7.xyzx
  mul r7.x, r5.x, r9.z
  dp3 r7.y, r10.xyzx, r5.xyzx
  dp3 r7.z, r11.xyzx, r5.xyzx
  movc r5.xyz, r6.yyyy, r7.xyzx, r5.xyzx
  mul r5.xy, r5.xyxx, cb0[0].xyxx
  add r4.xyz, r4.xyzx, r5.xyzx
  dp4 r5.x, cb9[4].xyzw, r4.xyzw
  dp4 r5.y, cb9[5].xyzw, r4.xyzw
  dp4 r0.z, cb9[6].xyzw, r4.xyzw
  dp4 r4.w, cb9[7].xyzw, r4.xyzw
  imad r7.xyzw, r0.xxxx, l(224, 224, 224, 224), l(80, 112, 96, 128)
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r8.xyzw, r7.x, t16.xyzw
  add o1.xyzw, r8.xyzw, v1.xyzw
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r8.xyzw, r7.y, t16.xyzw
  add o2.xyzw, r8.xyzw, v2.xyzw
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r8.xyzw, r7.z, t16.xyzw
  add o5.xyzw, r8.xyzw, v1.xyzw
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r7.xyzw, r7.w, t16.xyzw
  add o6.xyzw, r7.xyzw, v2.xyzw
  imad r0.w, r0.x, l(224), l(144)
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) o7.xyzw, r0.w, t16.xyzw
  mad r7.y, r4.w, cb0[0].z, r0.z
  mul r8.xyz, v0.xxxx, cb9[0].xyzx
  mad r8.xyz, v0.yyyy, cb9[1].xyzx, r8.xyzx
  mad r8.xyz, v0.zzzz, cb9[2].xyzx, r8.xyzx
  add r2.xyz, r2.xyzx, r8.xyzx
  movc r2.xyz, r6.wwww, r2.xyzx, l(0,0,0,0)
  div r2.w, r0.z, r4.w
  and r0.zw, l(0, 0, 256, 0x00008000), cb0[1].wwww
  iadd r3.xy, r3.yzyy, l(12, 12, 0, 0)
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r3.x, r3.x, t16.xxxx
  movc r4.z, r0.z, r3.x, l(0)
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r4.x, r3.y, t16.xxxx
  or r0.z, r3.w, l(28)
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r4.y, r0.z, t16.xxxx
  movc r7.x, r0.w, r0.x, cb0[5].w
  movc o3.xyzw, r6.zzzz, l(0,0,0,0), r4.xyzw
  movc r2.xyzw, r6.zzzz, l(0,0,0,0), r2.xyzw
  mov r7.z, l(0)
  movc r0.xz, r6.zzzz, r7.zzyz, r7.xxyx
  mov r5.z, r4.w
else
  mov o1.xyzw, l(0,0,0,0)
  mov o2.xyzw, l(0,0,0,0)
  mov o3.xyzw, l(0,0,0,0)
  mov r2.xyzw, l(0,0,0,0)
  mov o5.xyzw, l(0,0,0,0)
  mov o6.xyzw, l(0,0,0,0)
  mov o7.xyzw, l(0,0,0,0)
  mov r5.xyz, l(0,0,0,0)
  mov r0.xz, l(0,0,0,0)
endif
mov_sat r3.z, r0.z
div r3.w, r3.z, r5.z
mov r3.xy, r5.xyxx
movc o4.xyzw, r0.yyyy, r3.xyzw, r2.xyzw
movc r5.w, r0.y, r3.z, r0.z
mov o0.xyzw, r1.xyzw

mul r5.x, r24.y, r5.x
mad r5.x, r25.x, r24.x, r5.x

mov o9.xyzw, r5.xywz
mov o8.x, r0.x
ret
// Approximately 0 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v1.3.16 on Fri May 17 18:09:32 2019
// cbuffer cb9 : register(b9)
// {
//   float4 cb9[8];
// }
//
// cbuffer cb0 : register(b0)
// {
//   float4 cb0[6];
// }
//
//
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Texture2D<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : POSITION0,
//   float4 v1 : TEXCOORD0,
//   float4 v2 : TEXCOORD1,
//   uint v3 : SV_InstanceID0,
//   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 uint o8 : TEXCOORD11,
//   out float4 o9 : SV_POSITION0)
// {
// // Needs manual fix for instruction:
// // unknown dcl_: dcl_resource_raw t16
// // Needs manual fix for instruction:
// // unknown dcl_: dcl_resource_raw t17
// // Needs manual fix for instruction:
// // unknown dcl_: dcl_input_sgv v3.x, instance_id
//   float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r0.xy = int2(0x40000,0x80000000) & asint(cb0[1].ww);
//   r0.z = (uint)v3.x << 2;
// // No code for instruction (needs manual fix):
// ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r0.z, r0.z, t17.xxxx
//   r0.x = r0.x ? r0.z : v3.x;
//   r0.z = (int)r0.x * 224;
// // No code for instruction (needs manual fix):
// ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r1.xyzw, r0.z, t16.xyzw
//   r0.z = cmp(r1.w != 0.000000);
//   if (r0.z != 0) {
//     r0.z = mad((int)r0.x, 224, 16);
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r2.xyz, r0.z, t16.xyzx
//     r3.xyzw = mad((int4)r0.xxxx, int4(224,224,224,224), int4(32,64,192,208));
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r4.xyzw, r3.x, t16.xyzw
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r5.xyz, r3.y, t16.xyzx
//     r6.xyzw = int4(128,4096,0x80000000,0x20004000) & asint(cb0[1].wwww);
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r7.xyz, r3.z, t16.xyzx
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r8.xyz, r3.w, t16.xyzx
//     r7.xyz = r6.xxx ? r7.xyz : float3(0,0,0);
//     r8.xyz = r6.xxx ? r8.xyz : float3(0,0,0);
//     r9.xyz = r6.xxy ? float3(0,1,1) : float3(0,0,0);
//     r10.xyz = r6.yyy ? cb0[2].xyz : float3(0,0,0);
//     r11.xyz = r6.yyy ? cb0[3].xyz : float3(0,0,0);
//     r0.zw = v0.xy * r5.xy;
//     r5.xyw = r0.zzz * r7.xyz;
//     r5.xyw = r0.www * r8.xyz + r5.xyw;
//     r5.xyw = v0.zzz * r9.xxy + r5.xyw;
//     sincos(r5.z, r3.x, r7.x);
//     r8.x = -r3.x;
//     r8.y = r7.x;
//     r7.x = dot(r8.yx, r0.zw);
//     r8.z = r3.x;
//     r7.y = dot(r8.zy, r0.zw);
//     r7.z = v0.z;
//     r5.xyz = r6.xxx ? r5.xyw : r7.xyz;
//     r7.x = r9.z * r5.x;
//     r7.y = dot(r10.xyz, r5.xyz);
//     r7.z = dot(r11.xyz, r5.xyz);
//     r5.xyz = r6.yyy ? r7.xyz : r5.xyz;
//     r5.xy = cb0[0].xy * r5.xy;
//     r4.xyz = r5.xyz + r4.xyz;
//     r5.x = dot(cb9[4].xyzw, r4.xyzw);
//     r5.y = dot(cb9[5].xyzw, r4.xyzw);
//     r0.z = dot(cb9[6].xyzw, r4.xyzw);
//     r4.w = dot(cb9[7].xyzw, r4.xyzw);
//     r7.xyzw = mad((int4)r0.xxxx, int4(224,224,224,224), int4(80,112,96,128));
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r8.xyzw, r7.x, t16.xyzw
//     o1.xyzw = v1.xyzw + r8.xyzw;
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r8.xyzw, r7.y, t16.xyzw
//     o2.xyzw = v2.xyzw + r8.xyzw;
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r8.xyzw, r7.z, t16.xyzw
//     o5.xyzw = v1.xyzw + r8.xyzw;
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r7.xyzw, r7.w, t16.xyzw
//     o6.xyzw = v2.xyzw + r7.xyzw;
//     r0.w = mad((int)r0.x, 224, 144);
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) o7.xyzw, r0.w, t16.xyzw
//     r7.y = r4.w * cb0[0].z + r0.z;
//     r8.xyz = cb9[0].xyz * v0.xxx;
//     r8.xyz = v0.yyy * cb9[1].xyz + r8.xyz;
//     r8.xyz = v0.zzz * cb9[2].xyz + r8.xyz;
//     r2.xyz = r8.xyz + r2.xyz;
//     r2.xyz = r6.www ? r2.xyz : float3(0,0,0);
//     r2.w = r0.z / r4.w;
//     r0.zw = int2(256,0x8000) & asint(cb0[1].ww);
//     r3.xy = (int2)r3.yz + int2(12,12);
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r3.x, r3.x, t16.xxxx
//     r4.z = r0.z ? r3.x : 0;
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r4.x, r3.y, t16.xxxx
//     r0.z = (int)r3.w | 28;
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r4.y, r0.z, t16.xxxx
//     r7.x = r0.w ? r0.x : cb0[5].w;
//     o3.xyzw = r6.zzzz ? float4(0,0,0,0) : r4.xyzw;
//     r2.xyzw = r6.zzzz ? float4(0,0,0,0) : r2.xyzw;
//     r7.z = 0;
//     r0.xz = r6.zz ? r7.zy : r7.xy;
//     r5.z = r4.w;
//   } else {
//     o1.xyzw = float4(0,0,0,0);
//     o2.xyzw = float4(0,0,0,0);
//     o3.xyzw = float4(0,0,0,0);
//     r2.xyzw = float4(0,0,0,0);
//     o5.xyzw = float4(0,0,0,0);
//     o6.xyzw = float4(0,0,0,0);
//     o7.xyzw = float4(0,0,0,0);
//     r5.xyz = float3(0,0,0);
//     r0.xz = float2(0,0);
//   }
//   r3.z = saturate(r0.z);
//   r3.w = r3.z / r5.z;
//   r3.xy = r5.xy;
//   o4.xyzw = r0.yyyy ? r3.xyzw : r2.xyzw;
//   r5.w = r0.y ? r3.z : r0.z;
//   o0.xyzw = r1.xyzw;
//   o9.xyzw = r5.xywz;
//   o8.x = r0.x;
//   return;
// }
//////////////////////////////// HLSL Errors ////////////////////////////////
// E:\SteamLibrary\steamapps\common\Yakuza Kiwami 2\ShaderFixes\d0c311d22d40701b-vs_replace.txt(50,18-27): error X3004: undeclared identifier 'raw_buffer'
// E:\SteamLibrary\steamapps\common\Yakuza Kiwami 2\ShaderFixes\d0c311d22d40701b-vs_replace.txt(50,1-28): error X3004: undeclared identifier 'ld_raw_indexable'
/////////////////////////////////////////////////////////////////////////////
