//Tobacco smoke VS.
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Fri May 17 16:33:45 2019
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// SV_VertexID              0   x           1   VERTID    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 cb12[8], immediateIndexed
dcl_constantbuffer cb0[6], immediateIndexed
dcl_constantbuffer cb9[1], immediateIndexed
dcl_resource_raw t16
dcl_resource_raw t17
dcl_resource_raw t19
dcl_input v0.xyzw
dcl_input_sgv v1.x, vertex_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
and r0.x, l(2), cb0[4].x
ishl r0.y, cb9[0].z, l(1)
iadd r0.y, r0.y, l(4)
iadd r0.z, l(2), cb9[0].z
movc r0.x, r0.x, r0.y, r0.z
udiv r1.x, r2.x, v1.x, r0.x
iadd r0.x, r0.x, l(-1)
ieq r0.x, r0.x, r2.x
iadd r0.x, -r0.x, r1.x
and r0.y, l(0x00040000), cb0[1].w
ishl r0.w, r0.x, l(2)
ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r0.w, r0.w, t17.xxxx
movc r0.x, r0.y, r0.w, r0.x
imul null, r0.y, r0.x, l(224)
imad r0.w, r0.x, l(224), l(12)
ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r1.x, r0.w, t16.xxxx
eq r1.x, r1.x, l(0.000000)
if_nz r1.x
  mov o0.xyzw, l(0,0,0,0)
  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 o4.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 o9.xyzw, l(0,0,0,0)
  mov o8.x, l(0)
  ret
endif
ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r1.xyzw, r0.y, t16.wxyz
ne r0.y, r1.x, l(0.000000)
if_nz r0.y
  and r0.y, v1.x, l(1)
  and r2.x, l(16), cb0[4].x
  movc r3.xyzw, r0.yyyy, l(1,3,0,2), l(2,0,3,1)
  movc r2.xyzw, r2.xxxx, r3.xxzz, r3.yyww
  imad r2.xyzw, l(44, 44, 44, 44), r2.xyzw, l(12, 28, 12, 28)
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r3.xyzw, r2.x, t19.xyzw
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r4.xyzw, r2.y, t19.xyzw
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r5.xyzw, r2.z, t19.xyzw
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r2.xyzw, r2.w, t19.xyzw
  udiv null, r0.y, v1.x, r0.z
  ushr r0.y, r0.y, l(1)
  iadd r0.z, l(-1), cb9[0].z
  ushr r0.z, r0.z, l(1)
  utof r0.yz, r0.yyzy
  div r0.y, r0.y, r0.z
  min r0.y, r0.y, l(1.000000)
  add r5.xyzw, -r3.xyzw, r5.xyzw
  mad r3.xyzw, r0.yyyy, r5.xyzw, r3.xyzw
  add r2.xyzw, -r4.xyzw, r2.xyzw
  mad r2.xyzw, r0.yyyy, r2.xyzw, r4.xyzw
  imad r4.xyzw, r0.xxxx, l(224, 224, 224, 224), l(64, 192, 208, 80)
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r0.yz, r4.x, t16.xxyx
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r5.xyzw, r0.w, t16.xyzw
  mov r6.xyz, r5.yzwy
  mov r6.w, l(1.000000)
  dp4 r7.x, cb12[4].xyzw, r6.xyzw
  dp4 r7.y, cb12[5].xyzw, r6.xyzw
  dp4 r7.z, cb12[6].xyzw, r6.xyzw
  dp4 r6.w, cb12[7].xyzw, r6.xyzw
  and r8.xyzw, l(128, 4096, 0x80000000, 0x20004000), cb0[1].wwww
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r9.xyz, r4.y, t16.xyzx
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r10.xyz, r4.z, t16.xyzx
  movc r9.xyz, r8.xxxx, r9.xyzx, l(0,0,0,0)
  movc r10.xyz, r8.xxxx, r10.xyzx, l(0,0,0,0)
  movc r11.xyz, r8.xxyx, l(0,1.000000,1.000000,0), l(0,0,0,0)
  movc r12.xyz, r8.yyyy, cb0[2].xyzx, l(0,0,0,0)
  movc r13.xyz, r8.yyyy, cb0[3].xyzx, l(0,0,0,0)
  mul r14.xy, r0.yzyy, v0.xyxx
  mul r0.yzw, r9.xxyz, r14.xxxx
  mad r0.yzw, r14.yyyy, r10.xxyz, r0.yyzw
  mad r0.yzw, v0.zzzz, r11.xxxy, r0.yyzw
  mov r14.z, v0.z
  movc r0.yzw, r8.xxxx, r0.yyzw, r14.xxyz
  mul r9.x, r0.y, r11.z
  dp3 r9.y, r12.xyzx, r0.yzwy
  dp3 r9.z, r13.xyzx, r0.yzwy
  movc r0.yzw, r8.yyyy, r9.xxyz, r0.yyzw
  add r6.xyz, r0.yzwy, r7.xyzx
  dp4 r20.x, cb12[0].xyzw, r6.xyzw
  dp4 r20.y, cb12[1].xyzw, r6.xyzw
  dp4 r0.y, cb12[2].xyzw, r6.xyzw
  dp4 r6.w, cb12[3].xyzw, r6.xyzw
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r7.xyzw, r4.w, t16.xyzw
  add o1.xyzw, r3.xyzw, r7.xyzw
  imad r7.xyzw, r0.xxxx, l(224, 224, 224, 224), l(112, 96, 128, 144)
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r9.xyzw, r7.x, t16.xyzw
  add o2.xyzw, r2.xyzw, r9.xyzw
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r9.xyzw, r7.y, t16.xyzw
  add o5.xyzw, r3.xyzw, r9.xyzw
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r3.xyzw, r7.z, t16.xyzw
  add o6.xyzw, r2.xyzw, r3.xyzw
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) o7.xyzw, r7.w, t16.xyzw
  mad r2.y, r6.w, cb0[0].z, r0.y
  mul r3.xyz, v0.xxxx, cb12[4].xyzx
  mad r3.xyz, v0.yyyy, cb12[5].xyzx, r3.xyzx
  mad r3.xyz, v0.zzzz, cb12[6].xyzx, r3.xyzx
  add r3.xyz, r3.xyzx, r5.yzwy
  movc r3.xyz, r8.wwww, r3.xyzx, l(0,0,0,0)
  div r3.w, r0.y, r6.w
  and r0.yz, l(0, 256, 0x00008000, 0), cb0[1].wwww
  iadd r4.xy, r4.xyxx, l(12, 12, 0, 0)
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r0.w, r4.x, t16.xxxx
  movc r6.z, r0.y, r0.w, l(0)
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r6.x, r4.y, t16.xxxx
  or r0.y, r4.z, l(28)
  ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r6.y, r0.y, t16.xxxx
  movc r2.x, r0.z, r0.x, cb0[5].w
  movc o3.xyzw, r8.zzzz, l(0,0,0,0), r6.xyzw
  movc o4.xyzw, r8.zzzz, l(0,0,0,0), r3.xyzw
  mov r2.z, l(0)
  movc r0.xy, r8.zzzz, r2.zyzz, r2.xyxx
  mov r20.z, r0.y
  mov r20.w, r6.w
  
  add r25.w, r20.w, -r25.y
  mad r20.x, r25.x, r25.w, r20.x
  
  mov o9.xyzw, r20.xyzw
  
  mov r1.x, r5.x
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 o4.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 o9.xyzw, l(0,0,0,0)
  mov r0.x, l(0)
endif
mul o0.w, r1.x, v0.w
mov o0.xyz, r1.yzwy
mov o8.x, r0.x
ret
// Approximately 0 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v1.3.16 on Fri May 17 16:33:45 2019
// cbuffer cb9 : register(b9)
// {
//   float4 cb9[1];
// }
//
// cbuffer cb0 : register(b0)
// {
//   float4 cb0[6];
// }
//
// cbuffer cb12 : register(b12)
// {
//   float4 cb12[8];
// }
//
//
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Texture2D<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : POSITION0,
//   uint v1 : SV_VertexID0,
//   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_resource_raw t19
// // Needs manual fix for instruction:
// // unknown dcl_: dcl_input_sgv v1.x, vertex_id
//   float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r0.x = 2 & asint(cb0[4].x);
//   r0.y = asuint(cb9[0].z) << 1;
//   r0.y = (int)r0.y + 4;
//   r0.z = 2 + asint(cb9[0].z);
//   r0.x = r0.x ? r0.y : r0.z;
//   uiDest.x = (uint)v1.x / (uint)r0.x;
//   r2.x = (uint)v1.x % (uint)r0.x;
//   r1.x = uiDest.x;
//   r0.x = (int)r0.x + -1;
//   r0.x = cmp((int)r0.x == (int)r2.x);
//   r0.x = (int)-r0.x + (int)r1.x;
//   r0.y = 0x00040000 & asint(cb0[1].w);
//   r0.w = (uint)r0.x << 2;
// // No code for instruction (needs manual fix):
// ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r0.w, r0.w, t17.xxxx
//   r0.x = r0.y ? r0.w : r0.x;
//   r0.y = (int)r0.x * 224;
//   r0.w = mad((int)r0.x, 224, 12);
// // No code for instruction (needs manual fix):
// ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r1.x, r0.w, t16.xxxx
//   r1.x = cmp(r1.x == 0.000000);
//   if (r1.x != 0) {
//     o0.xyzw = float4(0,0,0,0);
//     o1.xyzw = float4(0,0,0,0);
//     o2.xyzw = float4(0,0,0,0);
//     o3.xyzw = float4(0,0,0,0);
//     o4.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);
//     o9.xyzw = float4(0,0,0,0);
//     o8.x = 0;
//     return;
//   }
// // No code for instruction (needs manual fix):
// ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r1.xyzw, r0.y, t16.wxyz
//   r0.y = cmp(r1.x != 0.000000);
//   if (r0.y != 0) {
//     r0.y = (int)v1.x & 1;
//     r2.x = 16 & asint(cb0[4].x);
//     r3.xyzw = r0.yyyy ? float4(1,3,0,2) : float4(2,0,3,1);
//     r2.xyzw = r2.xxxx ? r3.xxzz : r3.yyww;
//     r2.xyzw = mad(int4(44,44,44,44), (int4)r2.xyzw, int4(12,28,12,28));
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r3.xyzw, r2.x, t19.xyzw
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r4.xyzw, r2.y, t19.xyzw
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r5.xyzw, r2.z, t19.xyzw
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r2.xyzw, r2.w, t19.xyzw
//     r0.y = (uint)v1.x % (uint)r0.z;
//     r0.y = (uint)r0.y >> 1;
//     r0.z = -1 + asint(cb9[0].z);
//     r0.z = (uint)r0.z >> 1;
//     r0.yz = (uint2)r0.yz;
//     r0.y = r0.y / r0.z;
//     r0.y = min(1, r0.y);
//     r5.xyzw = r5.xyzw + -r3.xyzw;
//     r3.xyzw = r0.yyyy * r5.xyzw + r3.xyzw;
//     r2.xyzw = r2.xyzw + -r4.xyzw;
//     r2.xyzw = r0.yyyy * r2.xyzw + r4.xyzw;
//     r4.xyzw = mad((int4)r0.xxxx, int4(224,224,224,224), int4(64,192,208,80));
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r0.yz, r4.x, t16.xxyx
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r5.xyzw, r0.w, t16.xyzw
//     r6.xyz = r5.yzw;
//     r6.w = 1;
//     r7.x = dot(cb12[4].xyzw, r6.xyzw);
//     r7.y = dot(cb12[5].xyzw, r6.xyzw);
//     r7.z = dot(cb12[6].xyzw, r6.xyzw);
//     r6.w = dot(cb12[7].xyzw, r6.xyzw);
//     r8.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) r9.xyz, r4.y, t16.xyzx
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r10.xyz, r4.z, t16.xyzx
//     r9.xyz = r8.xxx ? r9.xyz : float3(0,0,0);
//     r10.xyz = r8.xxx ? r10.xyz : float3(0,0,0);
//     r11.xyz = r8.xxy ? float3(0,1,1) : float3(0,0,0);
//     r12.xyz = r8.yyy ? cb0[2].xyz : float3(0,0,0);
//     r13.xyz = r8.yyy ? cb0[3].xyz : float3(0,0,0);
//     r14.xy = v0.xy * r0.yz;
//     r0.yzw = r14.xxx * r9.xyz;
//     r0.yzw = r14.yyy * r10.xyz + r0.yzw;
//     r0.yzw = v0.zzz * r11.xxy + r0.yzw;
//     r14.z = v0.z;
//     r0.yzw = r8.xxx ? r0.yzw : r14.xyz;
//     r9.x = r11.z * r0.y;
//     r9.y = dot(r12.xyz, r0.yzw);
//     r9.z = dot(r13.xyz, r0.yzw);
//     r0.yzw = r8.yyy ? r9.xyz : r0.yzw;
//     r6.xyz = r7.xyz + r0.yzw;
//     o9.x = dot(cb12[0].xyzw, r6.xyzw);
//     o9.y = dot(cb12[1].xyzw, r6.xyzw);
//     r0.y = dot(cb12[2].xyzw, r6.xyzw);
//     r6.w = dot(cb12[3].xyzw, r6.xyzw);
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r7.xyzw, r4.w, t16.xyzw
//     o1.xyzw = r7.xyzw + r3.xyzw;
//     r7.xyzw = mad((int4)r0.xxxx, int4(224,224,224,224), int4(112,96,128,144));
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r9.xyzw, r7.x, t16.xyzw
//     o2.xyzw = r9.xyzw + r2.xyzw;
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r9.xyzw, r7.y, t16.xyzw
//     o5.xyzw = r9.xyzw + r3.xyzw;
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r3.xyzw, r7.z, t16.xyzw
//     o6.xyzw = r3.xyzw + r2.xyzw;
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) o7.xyzw, r7.w, t16.xyzw
//     r2.y = r6.w * cb0[0].z + r0.y;
//     r3.xyz = cb12[4].xyz * v0.xxx;
//     r3.xyz = v0.yyy * cb12[5].xyz + r3.xyz;
//     r3.xyz = v0.zzz * cb12[6].xyz + r3.xyz;
//     r3.xyz = r5.yzw + r3.xyz;
//     r3.xyz = r8.www ? r3.xyz : float3(0,0,0);
//     r3.w = r0.y / r6.w;
//     r0.yz = int2(256,0x8000) & asint(cb0[1].ww);
//     r4.xy = (int2)r4.xy + int2(12,12);
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r0.w, r4.x, t16.xxxx
//     r6.z = r0.y ? r0.w : 0;
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r6.x, r4.y, t16.xxxx
//     r0.y = (int)r4.z | 28;
//   // No code for instruction (needs manual fix):
//     ld_raw_indexable(raw_buffer)(mixed,mixed,mixed,mixed) r6.y, r0.y, t16.xxxx
//     r2.x = r0.z ? r0.x : cb0[5].w;
//     o3.xyzw = r8.zzzz ? float4(0,0,0,0) : r6.xyzw;
//     o4.xyzw = r8.zzzz ? float4(0,0,0,0) : r3.xyzw;
//     r2.z = 0;
//     r0.xy = r8.zz ? r2.zy : r2.xy;
//     o9.z = r0.y;
//     o9.w = r6.w;
//     r1.x = r5.x;
//   } else {
//     o1.xyzw = float4(0,0,0,0);
//     o2.xyzw = float4(0,0,0,0);
//     o3.xyzw = float4(0,0,0,0);
//     o4.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);
//     o9.xyzw = float4(0,0,0,0);
//     r0.x = 0;
//   }
//   o0.w = v0.w * r1.x;
//   o0.xyz = r1.yzw;
//   o8.x = r0.x;
//   return;
// }
//////////////////////////////// HLSL Errors ////////////////////////////////
// E:\SteamLibrary\steamapps\common\Yakuza Kiwami 2\ShaderFixes\23f6c4fa2c662e50-vs_replace.txt(66,18-27): error X3004: undeclared identifier 'raw_buffer'
// E:\SteamLibrary\steamapps\common\Yakuza Kiwami 2\ShaderFixes\23f6c4fa2c662e50-vs_replace.txt(66,1-28): error X3004: undeclared identifier 'ld_raw_indexable'
/////////////////////////////////////////////////////////////////////////////
