//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//   using 3Dmigoto v1.3.16 on Wed Mar 27 20:15:55 2019
//
//
// Buffer Definitions:
//
// cbuffer ccbSceneParam
// {
//
//   float4 m_CameraNearFar;            // Index:    0.xyzw           Components:     4 [unused]
//   float4 m_ParentRot;                // Index:    1.xyzw           Components:     4
//   float4 m_ParentScale;              // Index:    2.xyzw           Components:     4
//   float4 m_ParentColor;              // Index:    3.xyzw           Components:     4
//   int4 m_TexNumInfo;                 // Index:    4.xyzw           Components:     4
//   float4 m_MoveInterpolateWeight;    // Index:    5.xyzw           Components:     4 [unused]
//   float4 m_vDepthComputeParam;       // Index:    6.xyzw           Components:     4 [unused]
//   int4 m_vDepthTexParam;             // Index:    7.xyzw           Components:     4 [unused]
//   int4 m_YurayuraParam;              // Index:    8.xyzw           Components:     4
//   int4 m_HitParam;                   // Index:    9.xyzw           Components:     4 [unused]
//   float4 m_UvCropInfo;               // Index:   10.xyzw           Components:     4
//   float4 m_ParentWeight;             // Index:   11.xyzw           Components:     4
//   int4 m_KeyBlendParam;              // Index:   12.xyzw           Components:     4
//   float4x4 m_CameraMatrix;           // Index:   13 14 15 16       Components:    16 [unused]
//   float4x4 m_ViewMatrix;             // Index:   17 18 19 20       Components:    16 [unused]
//   float4x4 m_ProjMatrix;             // Index:   21 22 23 24       Components:    16 [unused]
//   float4x4 m_ViewProjMatrix;         // Index:   25 26 27 28       Components:    16 [unused]
//   float4 m_ForceUnevenness;          // Index:   29.xyzw           Components:     4 [unused]
//   int4 m_TraceInfo;                  // Index:   30.xyzw           Components:     4 [unused]
//   float4 m_TraceParam;               // Index:   31.xyzw           Components:     4 [unused]
//   float4 m_WorldShift;               // Index:   32.xyzw           Components:     4
//   float4 m_cs_attachParam;           // Index:   33.xyzw           Components:     4
//   int4 m_EmitInfo;                   // Index:   34.xyzw           Components:     4
//
//   struct GX_VFX_STANDARD_CS_SCENE_PLACEMENT_BUFFER
//   {
//
//       float4 elapsedTime;            // Index:   35
//       float4 parentMove;             // Index:   36
//       int4 emitInfo;                 // Index:   37
//       float4 rootPosition;           // Index:   38
//
//   } m_aPlacementParam[3];            // Index:   35-46             Components:    48
//
// }
//
// Resource bind info for consumeBuf_0
// {
//
//   struct GXStandardParticleVS
//   {
//
//       float4 Position;               // Index:    0
//       float4 OldPosition;            // Index:    1
//       uint2 Longevity;               // Index:    2
//       uint2 Velocity;                // Index:    2.z
//       uint2 Rotation;                // Index:    3
//       uint2 RotationVelocity;        // Index:    3.z
//       uint2 NoneWeightScale;         // Index:    4
//       uint2 WeightScale;             // Index:    4.z
//       uint2 ScaleVelocity;           // Index:    5
//       uint2 WeightColor;             // Index:    5.z
//       uint2 CurrentDiffuseUV;        // Index:    6
//       uint2 BlendParam;              // Index:    6.z
//       int2 CloneParam;               // Index:    7
//       uint2 MoveBaseAddVelNoise;     // Index:    7.z
//       uint2 RotBaseAddVelNoise;      // Index:    8
//       uint2 ScaleBaseAddVelNoise;    // Index:    8.z
//       uint2 ColorBaseNoise;          // Index:    9
//       uint2 ForceVelocity;           // Index:    9.z
//       int2 TexAnimInfo;              // Index:   10
//       int2 nDummy;                   // Index:   10.z
//
//   } $Element;                        // Index:    0-10             Components:    44
//
// }
//
// Resource bind info for appendBuf_update_0
// {
//
//   struct GXStandardParticleVS
//   {
//
//       float4 Position;               // Index:    0
//       float4 OldPosition;            // Index:    1
//       uint2 Longevity;               // Index:    2
//       uint2 Velocity;                // Index:    2.z
//       uint2 Rotation;                // Index:    3
//       uint2 RotationVelocity;        // Index:    3.z
//       uint2 NoneWeightScale;         // Index:    4
//       uint2 WeightScale;             // Index:    4.z
//       uint2 ScaleVelocity;           // Index:    5
//       uint2 WeightColor;             // Index:    5.z
//       uint2 CurrentDiffuseUV;        // Index:    6
//       uint2 BlendParam;              // Index:    6.z
//       int2 CloneParam;               // Index:    7
//       uint2 MoveBaseAddVelNoise;     // Index:    7.z
//       uint2 RotBaseAddVelNoise;      // Index:    8
//       uint2 ScaleBaseAddVelNoise;    // Index:    8.z
//       uint2 ColorBaseNoise;          // Index:    9
//       uint2 ForceVelocity;           // Index:    9.z
//       int2 TexAnimInfo;              // Index:   10
//       int2 nDummy;                   // Index:   10.z
//
//   } $Element;                        // Index:    0-10             Components:    44
//
// }
//
// Resource bind info for wEmitUavCounter_update_0
// {
//
//   uint4 $Element;                    // Index:    0.xyzw           Components:     4
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// csInputTex                        texture  float4          2d    0        1
// rUpdateUavCounter_0               texture   uint3         buf    3        1
// csTargetTex                       texture  float4          2d    4        1
// consumeBuf_0                          UAV  struct         r/w    0        1
// appendBuf_update_0                    UAV  struct         r/w    1        1
// wEmitUavCounter_update_0              UAV  struct         r/w    2        1
// ccbSceneParam                     cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Input
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Output
cs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[39], immediateIndexed
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_buffer (uint,uint,uint,uint) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_uav_structured u0, 176
dcl_uav_structured u1, 176
dcl_uav_structured u2, 16
dcl_input vThreadIDInGroupFlattened
dcl_input vThreadIDInGroup.x
dcl_input vThreadID.x
dcl_temps 25
dcl_thread_group 32, 1, 1
ieq r0.x, l(0), cb0[34].x
if_z cb0[34].x
  ld_indexable(buffer)(uint,uint,uint,uint) r0.y, l(0, 0, 0, 0), t3.yxzw
  ult r0.y, vThreadID.x, r0.y
endif
and r0.y, r0.y, r0.x
if_z r0.y
  ret
endif
if_z cb0[34].x
  ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r1.xyzw, vThreadID.x, l(0), u0.xyzw
  ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r2.xyzw, vThreadID.x, l(32), u0.xyzw
  ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r3.xyzw, vThreadID.x, l(48), u0.xyzw
  ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r0.yz, vThreadID.x, l(64), u0.xxyx
  ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r4.xyz, vThreadID.x, l(76), u0.xyzx
  ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r5.xyzw, vThreadID.x, l(108), u0.xyzw
  ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r6.xyzw, vThreadID.x, l(124), u0.zwyx
  ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r7.xyzw, vThreadID.x, l(140), u0.yzxw
  ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r8.xyzw, vThreadID.x, l(156), u0.xyzw
  ld_structured_indexable(structured_buffer, stride=176)(mixed,mixed,mixed,mixed) r9.w, vThreadID.x, l(172), u0.xxxx
  mov r9.z, r8.w
  mov r10.xyz, r6.zxyz
  mov r10.w, r7.z
  mov r6.xyz, r5.yzwy
endif
if_nz r0.x
endif
and r0.x, r2.z, l(0x0000ffff)
f16tof32 r11.x, r0.x
ushr r0.xw, r2.zzzx, l(16, 0, 0, 16)
f16tof32 r11.y, r0.x
and r0.x, r2.w, l(0x0000ffff)
f16tof32 r11.z, r0.x
ushr r0.x, r6.x, l(16)
and r5.yz, r6.xxyx, l(0, 0x0000ffff, 0x0000ffff, 0)
and r12.x, r8.y, l(0x0000ffff)
ushr r12.y, r8.z, l(16)
f16tof32 r0.w, r0.w
and r2.z, r2.y, l(0x0000ffff)
f16tof32 r2.z, r2.z
add r13.x, r2.z, cb0[35].x
div_sat r4.w, r13.x, r0.w
if_z cb0[12].x
  itof r5.w, cb0[37].w
  mul r5.w, r4.w, r5.w
  ftoi r14.y, r5.w
  add r5.w, -r4.w, l(1.000000)
  mov r14.xzw, l(0,0,1,0)
  ld_indexable(texture2d)(float,float,float,float) r15.yz, r14.xyxx, t0.xzyw
  ld_indexable(texture2d)(float,float,float,float) r16.xyzw, r14.zyww, t0.xyzw
  and r12.zw, r6.zzzw, l(0, 0, 0x0000ffff, 0x0000ffff)
  ushr r8.w, r6.z, l(16)
  f16tof32 r17.y, r8.w
  f16tof32 r17.xz, r12.zzwz
  mov r17.w, l(0)
  mad r16.xyzw, r17.xyzw, r5.wwww, r16.xyzw
  mov r14.xzw, l(2,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r17.xyz, r14.xyzw, t0.xyzw
  and r18.xyzw, r10.xyzw, l(0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff)
  ushr r12.zw, r10.xxxz, l(0, 0, 16, 16)
  f16tof32 r19.xy, r12.zwzz
  f16tof32 r18.xyzw, r18.xyzw
  mov r19.zw, r18.xxxy
  mad r17.xyz, r19.zxwz, r5.wwww, r17.xyzx
  mov r14.xzw, l(3,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r20.xyz, r14.xyzw, t0.xyzw
  mov r19.xz, r18.zzwz
  mad r18.xyz, r19.xyzx, r5.wwww, r20.xyzx
  mov r14.xzw, l(4,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r19.xyzw, r14.xyzw, t0.xyzw
  and r12.zw, r7.xxxy, l(0, 0, 0x0000ffff, 0x0000ffff)
  ushr r13.zw, r7.xxxy, l(0, 0, 16, 16)
  f16tof32 r20.xz, r12.zzwz
  f16tof32 r20.yw, r13.zzzw
  mad r19.xyzw, r20.xyzw, r5.wwww, r19.xyzw
  max r19.xyzw, r19.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
  mov r14.xzw, l(7,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r5.w, r14.xyzw, t0.yzwx
  mul r5.w, -r5.w, cb0[35].x
  mul r5.w, r5.w, l(1.442695)
  exp r5.w, r5.w
  mov r14.xzw, l(8,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r8.w, r14.xyzw, t0.yzwx
  mov r15.xy, r15.zyzz
else
  add r11.w, -r4.w, l(1.000000)
  itof r12.z, cb0[37].w
  mul r12.z, r4.w, r12.z
  ftoi r14.y, r12.z
  itof r12.z, cb0[12].y
  mul r12.z, r4.w, r12.z
  ftoi r20.y, r12.z
  mov r20.xzw, l(10,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r12.z, r20.xyzw, t4.yzxw
  mov r14.xzw, l(0,0,1,0)
  ld_indexable(texture2d)(float,float,float,float) r13.zw, r14.xyxx, t0.xwyz
  ld_indexable(texture2d)(float,float,float,float) r15.zw, r20.wyww, t4.xwyz
  add r15.zw, -r13.zzzw, r15.zzzw
  mad r15.xy, r12.zzzz, r15.zwzz, r13.zwzz
  ld_indexable(texture2d)(float,float,float,float) r21.xyzw, r14.zyww, t0.xyzw
  mov r20.xzw, l(1,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r22.xyzw, r20.xyzw, t4.xyzw
  add r22.xyzw, -r21.xyzw, r22.xyzw
  mad r21.xyzw, r12.zzzz, r22.xyzw, r21.xyzw
  and r13.zw, r6.zzzw, l(0, 0, 0x0000ffff, 0x0000ffff)
  ushr r12.w, r6.z, l(16)
  f16tof32 r22.y, r12.w
  f16tof32 r22.xz, r13.zzwz
  mov r22.w, l(0)
  mad r16.xyzw, r22.xyzw, r11.wwww, r21.xyzw
  mov r14.xzw, l(2,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r21.xyz, r14.xyzw, t0.xyzw
  mov r20.xzw, l(2,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r22.xyz, r20.xyzw, t4.xyzw
  add r22.xyz, -r21.xyzx, r22.xyzx
  mad r21.xyz, r12.zzzz, r22.xyzx, r21.xyzx
  and r22.xyzw, r10.xyzw, l(0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff)
  ushr r13.zw, r10.xxxz, l(0, 0, 16, 16)
  f16tof32 r23.xy, r13.zwzz
  f16tof32 r22.xyzw, r22.xyzw
  mov r23.zw, r22.xxxy
  mad r17.xyz, r23.zxwz, r11.wwww, r21.xyzx
  mov r14.xzw, l(3,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r21.xyz, r14.xyzw, t0.xyzw
  mov r20.xzw, l(3,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r24.xyz, r20.xyzw, t4.xyzw
  add r24.xyz, -r21.xyzx, r24.xyzx
  mad r21.xyz, r12.zzzz, r24.xyzx, r21.xyzx
  mov r23.xz, r22.zzwz
  mad r18.xyz, r23.xyzx, r11.wwww, r21.xyzx
  mov r14.xzw, l(4,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r21.xyzw, r14.xyzw, t0.xyzw
  mov r20.xzw, l(4,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r22.xyzw, r20.xyzw, t4.xyzw
  add r22.xyzw, -r21.xyzw, r22.xyzw
  mad r21.xyzw, r12.zzzz, r22.xyzw, r21.xyzw
  and r13.zw, r7.xxxy, l(0, 0, 0x0000ffff, 0x0000ffff)
  ushr r15.zw, r7.xxxy, l(0, 0, 16, 16)
  f16tof32 r22.xz, r13.zzwz
  f16tof32 r22.yw, r15.zzzw
  mad r21.xyzw, r22.xyzw, r11.wwww, r21.xyzw
  max r19.xyzw, r21.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
  mov r14.xzw, l(7,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r11.w, r14.xyzw, t0.yzwx
  mov r20.xzw, l(7,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r12.w, r20.xyzw, t4.yzwx
  add r12.w, r11.w, -r12.w
  mad r11.w, r12.z, r12.w, -r11.w
  mul r11.w, r11.w, cb0[35].x
  mul r11.w, r11.w, l(1.442695)
  exp r5.w, r11.w
  mov r14.xzw, l(8,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r11.w, r14.xyzw, t0.yzwx
  mov r20.xzw, l(8,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r12.w, r20.xyzw, t4.yzwx
  add r12.w, -r11.w, r12.w
  mad r8.w, r12.z, r12.w, r11.w
endif
itof r11.w, cb0[4].w
ge r11.w, r11.w, l(0.950000)
if_nz r11.w
  itof r11.w, cb0[37].w
  mul r11.w, r4.w, r11.w
  ftoi r14.y, r11.w
  mov r14.xzw, l(9,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r12.zw, r14.xyzw, t0.zwyx
  itof r11.w, r12.y
  lt r11.w, r12.w, r11.w
  iadd r13.z, -r12.y, cb0[4].z
  iadd r14.y, r12.x, r13.z
  mov r14.x, l(0)
  movc r13.zw, r11.wwww, r14.xxxy, r12.yyyx
  itof r13.zw, r13.zzzw
  add r11.w, r12.w, -r13.z
  add r11.w, r11.w, r13.w
  ftoi r12.x, r11.w
  ftoi r12.y, r12.w
  and r11.w, r12.x, l(0x80000000)
  imax r12.w, r12.x, -r12.x
  imax r13.zw, cb0[4].zzzx, -cb0[4].zzzx
  udiv null, r12.w, r12.w, r13.z
  ineg r14.x, r12.w
  movc r11.w, r11.w, r14.x, r12.w
  iadd r12.w, r11.w, l(1)
  and r14.x, r12.w, l(0x80000000)
  imax r12.w, r12.w, -r12.w
  udiv null, r12.w, r12.w, r13.z
  ineg r13.z, r12.w
  movc r12.w, r14.x, r13.z, r12.w
  and r13.z, r11.w, l(0x80000000)
  imax r14.x, r11.w, -r11.w
  udiv null, r14.x, r14.x, r13.w
  ineg r14.y, r14.x
  movc r13.z, r13.z, r14.y, r14.x
  itof r11.w, r11.w
  itof r14.x, cb0[4].x
  div r11.w, r11.w, r14.x
  round_z r11.w, r11.w
  and r14.x, r12.w, l(0x80000000)
  imax r14.y, r12.w, -r12.w
  udiv r20.x, r21.x, r14.y, r13.w
  ineg r13.w, r21.x
  movc r13.w, r14.x, r13.w, r21.x
  itof r13.zw, r13.zzzw
  xor r12.w, r12.w, cb0[4].x
  ineg r14.x, r20.x
  and r12.w, r12.w, l(0x80000000)
  movc r12.w, r12.w, r14.x, r20.x
  itof r12.w, r12.w
  mul r14.y, r11.w, cb0[10].y
  mul r14.xz, r13.zzwz, cb0[10].xxxx
  mul r14.w, r12.w, cb0[10].y
else
  iadd r11.w, l(-1), cb0[4].z
  imax r12.w, r11.w, l(1)
  itof r12.w, r12.w
  mul r13.z, r4.w, r12.w
  round_z r13.z, r13.z
  ftoi r13.w, r13.z
  mad_sat r12.z, r12.w, r4.w, -r13.z
  iadd r12.w, r13.w, l(1)
  imax r12.w, r12.w, l(1)
  imin r11.w, r11.w, r12.w
  and r12.w, r13.w, l(0x80000000)
  imax r13.w, r13.w, -r13.w
  imax r15.z, cb0[4].x, -cb0[4].x
  udiv null, r13.w, r13.w, r15.z
  ineg r15.w, r13.w
  movc r12.w, r12.w, r15.w, r13.w
  itof r12.w, r12.w
  itof r13.w, cb0[4].x
  div r13.z, r13.z, r13.w
  round_z r13.z, r13.z
  and r13.w, r11.w, l(0x80000000)
  imax r15.w, r11.w, -r11.w
  udiv r20.x, r21.x, r15.w, r15.z
  ineg r15.z, r21.x
  movc r13.w, r13.w, r15.z, r21.x
  itof r13.w, r13.w
  xor r11.w, r11.w, cb0[4].x
  ineg r15.z, r20.x
  and r11.w, r11.w, l(0x80000000)
  movc r11.w, r11.w, r15.z, r20.x
  itof r11.w, r11.w
  mul r14.x, r12.w, cb0[10].x
  mul r14.yz, r13.zzwz, cb0[10].yyxy
  mul r14.w, r11.w, cb0[10].y
endif
mad r11.xzw, r16.xxzy, cb0[35].xxxx, r11.xxzy
mad r11.y, r16.w, cb0[35].x, r11.w
ige r11.w, l(1), cb0[8].x
itof r12.w, cb0[37].w
mul r13.z, r12.w, r13.x
itof r13.w, cb0[8].x
div r13.z, r13.z, r13.w
ftoi r13.z, r13.z
movc r13.z, r11.w, l(1), r13.z
mul r2.z, r2.z, r12.w
div r2.z, r2.z, r13.w
ftoi r2.z, r2.z
movc r2.z, r11.w, l(0), r2.z
ilt r2.z, r2.z, r13.z
lt r11.w, l(0.000000), |r8.w|
and r2.z, r2.z, r11.w
if_nz r2.z
  add r2.z, r8.w, r8.w
  mul r4.w, r4.w, r12.w
  ftoi r4.w, r4.w
  iadd r11.w, vThreadIDInGroupFlattened.x, vThreadID.x
  iadd r4.w, r4.w, r11.w
  iadd r4.w, r4.w, vThreadIDInGroup.x
  utof r4.w, r4.w
  mad r4.w, cb0[35].y, l(10.000000), r4.w
  ftoi r4.w, r4.w
  imad r11.w, l(6389), r4.w, l(7381)
  and r11.w, r11.w, l(0x000fffff)
  udiv null, r11.w, r11.w, l(1000)
  itof r11.w, r11.w
  mul r11.w, r2.z, r11.w
  mad r11.w, r11.w, l(0.001000), -r8.w
  iadd r4.w, r4.w, vThreadIDInGroup.x
  imad r4.w, l(6389), r4.w, l(7381)
  and r4.w, r4.w, l(0x000fffff)
  udiv null, r4.w, r4.w, l(1000)
  itof r4.w, r4.w
  mul r2.z, r2.z, r4.w
  mad r2.z, r2.z, l(0.001000), -r8.w
  sincos r16.x, r20.x, r11.w
  sincos r21.x, r22.x, r2.z
  mov r23.x, -r21.x
  mul r22.y, r16.x, r21.x
  mul r23.y, r16.x, r22.x
  mul r22.z, r20.x, r21.x
  mov r20.y, -r16.x
  mul r23.z, r20.x, r22.x
  dp3 r16.x, r11.xyzx, r22.xyzx
  dp2 r16.y, r11.yzyy, r20.xyxx
  dp3 r16.z, r11.xyzx, r23.xyzx
  mov r11.xyz, r16.xyzx
endif
add r16.xyzw, -r19.xyzw, cb0[3].xyzw
mad r16.xyzw, cb0[11].wwww, r16.xyzw, r19.xyzw
itof r2.z, r0.x
mad r2.z, r2.z, l(1.500000), l(1.000000)
div r13.y, r16.w, r2.z
imad r2.z, r0.x, l(2), l(1)
itof r2.z, r2.z
div r19.y, r16.w, r2.z
ige r0.x, r0.x, r5.z
movc r19.x, r0.x, r0.w, r13.x
movc r5.yz, r5.yyyy, r19.xxyx, r13.xxyx
lt r0.x, r5.y, r0.w
if_nz r0.x
  if_z cb0[34].x
    ushr r0.x, r2.w, l(16)
    and r2.zw, r3.xxxz, l(0, 0, 0x0000ffff, 0x0000ffff)
    f16tof32 r19.x, r2.z
    ushr r2.z, r3.x, l(16)
    f16tof32 r19.y, r2.z
    and r2.z, r3.y, l(0x0000ffff)
    f16tof32 r19.z, r2.z
    f16tof32 r20.x, r2.w
    ushr r2.zw, r3.yyyz, l(0, 0, 16, 16)
    f16tof32 r20.y, r2.w
    and r2.w, r3.w, l(0x0000ffff)
    f16tof32 r20.z, r2.w
    ushr r2.w, r3.w, l(16)
    and r3.x, r0.y, l(0x0000ffff)
    ushr r0.y, r0.y, l(16)
    f16tof32 r3.y, r0.y
    and r0.y, r0.z, l(0x0000ffff)
    f16tof32 r3.z, r0.y
    ushr r0.y, r0.z, l(16)
    ushr r0.z, r4.x, l(16)
    f16tof32 r0.xyz, r0.xyzx
    and r3.w, r4.y, l(0x0000ffff)
    f16tof32 r21.x, r3.w
    ushr r3.w, r4.y, l(16)
    f16tof32 r21.y, r3.w
    and r3.w, r4.z, l(0x0000ffff)
    f16tof32 r21.z, r3.w
    ushr r3.w, r4.z, l(16)
    f16tof32 r3.xw, r3.xxxw
    and r4.x, r5.x, l(0x0000ffff)
    ushr r4.y, r5.x, l(16)
    and r4.z, r7.w, l(0x0000ffff)
    f16tof32 r22.x, r4.z
    ushr r4.z, r7.w, l(16)
    f16tof32 r22.y, r4.z
    and r4.z, r8.x, l(0x0000ffff)
    f16tof32 r22.z, r4.z
    ushr r4.z, r8.x, l(16)
    f16tof32 r4.xyz, r4.xyzx
    and r2.x, r2.x, l(0x0000ffff)
    ushr r2.y, r2.y, l(16)
    f16tof32 r2.xyzw, r2.xyzw
    add r1.xyzw, r1.xyzw, cb0[32].xyzw
    mul r4.w, r0.w, l(0.450000)
    mad r5.x, -r0.w, l(0.550000), r13.x
    max r5.x, r5.x, l(0.000000)
    min r5.x, r4.w, r5.x
    max r4.w, r4.w, l(0.000000)
    add r5.x, -r5.x, r4.w
    mul r5.x, r5.x, r5.x
    mul r5.x, -r4.w, r5.x
    mul r8.x, r4.w, r4.w
    div r5.x, r5.x, r8.x
    add r5.x, r4.w, r5.x
    div_sat r4.w, r5.x, r4.w
    add r4.w, -r4.w, l(1.000000)
    add r4.w, -r4.w, l(1.000000)
    mul r13.xyz, r5.wwww, r22.xyzx
    mad r17.xyz, r17.xyzx, cb0[35].xxxx, r20.xyzx
    mad r18.xyz, r18.xyzx, cb0[35].xxxx, r21.xyzx
    mad r20.xyz, r22.xyzx, r5.wwww, r11.xyzx
    mul r21.xyz, cb0[11].xxxx, cb0[36].xyzx
    mad r20.xyz, r20.xyzx, cb0[35].xxxx, r21.xyzx
    add r20.xyz, r1.xyzx, r20.xyzx
    add r5.x, l(1.000000), -cb0[33].z
    mad r21.xyz, r21.xyzx, r5.xxxx, r1.xyzx
    lt r5.x, l(0.000000), cb0[33].x
    dp3 r5.w, cb0[36].xyzx, cb0[36].xyzx
    sqrt r8.x, r5.w
    lt r8.x, l(0.001000), r8.x
    rsq r5.w, r5.w
    mul r22.xyz, r5.wwww, cb0[36].xyzx
    add r23.xyz, -r20.xyzx, cb0[38].xyzx
    dp3 r5.w, r22.xyzx, r23.xyzx
    lt r5.w, l(0.001000), r5.w
    dp3 r8.w, r23.xyzx, r23.xyzx
    sqrt r8.w, r8.w
    lt r8.w, cb0[33].x, r8.w
    mad r22.xyz, r23.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), r20.xyzx
    mad r23.xyz, r23.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), r21.xyzx
    movc r22.xyz, r8.wwww, r22.xyzx, r20.xyzx
    movc r23.xyz, r8.wwww, r23.xyzx, r21.xyzx
    movc r22.xyz, r5.wwww, r22.xyzx, r20.xyzx
    movc r23.xyz, r5.wwww, r23.xyzx, r21.xyzx
    movc r22.xyz, r8.xxxx, r22.xyzx, r20.xyzx
    movc r23.xyz, r8.xxxx, r23.xyzx, r21.xyzx
    movc r1.xyz, r5.xxxx, r22.xyzx, r20.xyzx
    movc r20.xyz, r5.xxxx, r23.xyzx, r21.xyzx
    mul r21.xyz, cb0[1].xyzx, cb0[11].yyyy
    mul r15.xzw, r15.xxxx, r21.xxyz
    mad r15.xzw, r17.xxyz, cb0[35].xxxx, r15.xxzw
    add r15.xzw, r15.xxzw, r19.xxyz
    mad r3.xyz, r18.xyzx, cb0[35].xxxx, r3.xyzx
    lt r5.x, l(0.000000), r0.y
    add r5.w, r3.y, r3.x
    mul r5.w, r5.w, l(0.500000)
    movc r3.xy, r5.xxxx, r5.wwww, r3.xyxx
    mul r5.x, r15.y, cb0[11].z
    add r19.xyz, -r3.xyzx, cb0[2].xyzx
    mad r19.xyz, r5.xxxx, r19.xyzx, r3.xyzx
    f32tof16 r2.x, r2.x
    f32tof16 r0.w, r0.w
    imad r21.x, r0.w, l(0x00010000), r2.x
    f32tof16 r5.xy, r5.yzyy
    f32tof16 r0.w, r2.y
    imad r21.y, r0.w, l(0x00010000), r5.x
    f32tof16 r5.xzw, r11.xxyz
    imad r21.z, r5.z, l(0x00010000), r5.x
    f32tof16 r0.xy, r0.xyxx
    imad r21.w, r0.x, l(0x00010000), r5.w
    f32tof16 r5.xzw, r15.xxzw
    imad r11.x, r5.z, l(0x00010000), r5.x
    f32tof16 r0.x, r2.z
    imad r11.y, r0.x, l(0x00010000), r5.w
    f32tof16 r2.xyz, r17.xyzx
    imad r11.z, r2.y, l(0x00010000), r2.x
    f32tof16 r0.x, r2.w
    imad r11.w, r0.x, l(0x00010000), r2.z
    f32tof16 r0.xw, r3.xxxy
    imad r2.x, r0.w, l(0x00010000), r0.x
    f32tof16 r0.x, r3.z
    imad r2.y, r0.y, l(0x00010000), r0.x
    f32tof16 r0.xyw, r19.xyxz
    imad r2.z, r0.y, l(0x00010000), r0.x
    f32tof16 r0.x, r0.z
    imad r2.w, r0.x, l(0x00010000), r0.w
    f32tof16 r0.xyz, r18.xyzx
    imad r15.x, r0.y, l(0x00010000), r0.x
    f32tof16 r0.x, r3.w
    imad r15.y, r0.x, l(0x00010000), r0.z
    f32tof16 r0.xyz, r16.xyzx
    imad r15.z, r0.y, l(0x00010000), r0.x
    imad r15.w, r5.y, l(0x00010000), r0.z
    f32tof16 r0.xyzw, r14.xyzw
    imad r0.xy, r0.ywyy, l(0x00010000, 0x00010000, 0, 0), r0.xzxx
    f32tof16 r3.x, r4.w
    f32tof16 r3.y, r12.z
    imad r0.z, r3.y, l(0x00010000), r3.x
    f32tof16 r3.xy, r4.xyxx
    imad r0.w, r3.y, l(0x00010000), r3.x
    f32tof16 r3.xyz, r13.xyzx
    imad r7.z, r3.y, l(0x00010000), r3.x
    f32tof16 r3.x, r4.z
    imad r7.w, r3.x, l(0x00010000), r3.z
    bfi r9.xy, l(16, 16, 0, 0), l(0, 16, 0, 0), r12.xyxx, r8.yzyy
    imm_atomic_iadd r3.x, u2, l(0, 0, 0, 0), l(1)
    store_structured u2.xy, l(0), l(4), l(1,1,0,0)
    store_structured u1.xyzw, r3.x, l(0), r1.xyzw
    mov r20.w, r1.w
    store_structured u1.xyzw, r3.x, l(16), r20.xyzw
    store_structured u1.xyzw, r3.x, l(32), r21.xyzw
    store_structured u1.xyzw, r3.x, l(48), r11.xyzw
    store_structured u1.xyzw, r3.x, l(64), r2.xyzw
    store_structured u1.xyzw, r3.x, l(80), r15.xyzw
    store_structured u1.xyzw, r3.x, l(96), r0.xyzw
    store_structured u1.xyzw, r3.x, l(112), r6.xyzw
    store_structured u1.xyzw, r3.x, l(128), r10.xyzw
    store_structured u1.xyzw, r3.x, l(144), r7.xyzw
    store_structured u1.xyzw, r3.x, l(160), r9.xyzw
  endif
endif
ret
// Approximately 476 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v1.3.16 on Wed Mar 27 20:15:55 2019
//
// struct GXStandardParticleVS
// {
//     float4 Position;               // Offset:    0
//     float4 OldPosition;            // Offset:   16
//     uint2 Longevity;               // Offset:   32
//     uint2 Velocity;                // Offset:   40
//     uint2 Rotation;                // Offset:   48
//     uint2 RotationVelocity;        // Offset:   56
//     uint2 NoneWeightScale;         // Offset:   64
//     uint2 WeightScale;             // Offset:   72
//     uint2 ScaleVelocity;           // Offset:   80
//     uint2 WeightColor;             // Offset:   88
//     uint2 CurrentDiffuseUV;        // Offset:   96
//     uint2 BlendParam;              // Offset:  104
//     int2 CloneParam;               // Offset:  112
//     uint2 MoveBaseAddVelNoise;     // Offset:  120
//     uint2 RotBaseAddVelNoise;      // Offset:  128
//     uint2 ScaleBaseAddVelNoise;    // Offset:  136
//     uint2 ColorBaseNoise;          // Offset:  144
//     uint2 ForceVelocity;           // Offset:  152
//     int2 TexAnimInfo;              // Offset:  160
//     int2 nDummy;                   // Offset:  168
// };
//
// cbuffer ccbSceneParam : register(b0)
// {
//   float4 m_CameraNearFar : packoffset(c0);
//   float4 m_ParentRot : packoffset(c1);
//   float4 m_ParentScale : packoffset(c2);
//   float4 m_ParentColor : packoffset(c3);
//   int4 m_TexNumInfo : packoffset(c4);
//   float4 m_MoveInterpolateWeight : packoffset(c5);
//   float4 m_vDepthComputeParam : packoffset(c6);
//   int4 m_vDepthTexParam : packoffset(c7);
//   int4 m_YurayuraParam : packoffset(c8);
//   int4 m_HitParam : packoffset(c9);
//   float4 m_UvCropInfo : packoffset(c10);
//   float4 m_ParentWeight : packoffset(c11);
//   int4 m_KeyBlendParam : packoffset(c12);
//   float4x4 m_CameraMatrix : packoffset(c13);
//   float4x4 m_ViewMatrix : packoffset(c17);
//   float4x4 m_ProjMatrix : packoffset(c21);
//   float4x4 m_ViewProjMatrix : packoffset(c25);
//   float4 m_ForceUnevenness : packoffset(c29);
//   int4 m_TraceInfo : packoffset(c30);
//   float4 m_TraceParam : packoffset(c31);
//   float4 m_WorldShift : packoffset(c32);
//   float4 m_cs_attachParam : packoffset(c33);
//   int4 m_EmitInfo : packoffset(c34);
//
//   struct
//   {
//     float4 elapsedTime;
//     float4 parentMove;
//     int4 emitInfo;
//     float4 rootPosition;
//   } m_aPlacementParam[3] : packoffset(c35);
//
// }
//
// Texture2D<float4> csInputTex : register(t0);
// Buffer<uint3> rUpdateUavCounter_0 : register(t3);
// Texture2D<float4> csTargetTex : register(t4);
// RWStructuredBuffer<GXStandardParticleVS> consumeBuf_0 : register(u0);
// RWStructuredBuffer<GXStandardParticleVS> appendBuf_update_0 : register(u1);
// RWStructuredBuffer<uint4> wEmitUavCounter_update_0 : register(u2);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Texture2D<float4> StereoParams : register(t125);
//
//
// void main)
// {
//   float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16,r17,r18,r19,r20,r21,r22,r23,r24;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
// // Needs manual fix for instruction:
// // unknown dcl_: dcl_thread_group 32, 1, 1
//   r0.x = cmp(0 == (int)m_EmitInfo.x);
//   if (m_EmitInfo.x == 0) {
//     r0.y = rUpdateUavCounter_0.Load(float4(0,0,0,0)).x;
//     r0.y = cmp((uint)vThreadID.x < (uint)r0.y);
//   }
//   r0.y = r0.y ? r0.x : 0;
//   if (r0.y == 0) {
//     return;
//   }
//   if (m_EmitInfo.x == 0) {
//     r1.x = consumeBuf_0[vThreadID.x].Position.x;
//     r1.y = consumeBuf_0[vThreadID.x].Position.y;
//     r1.z = consumeBuf_0[vThreadID.x].Position.z;
//     r1.w = consumeBuf_0[vThreadID.x].Position.w;
//     r2.x = consumeBuf_0[vThreadID.x].Longevity.x;
//     r2.y = consumeBuf_0[vThreadID.x].Longevity.y;
//     r2.z = consumeBuf_0[vThreadID.x].Velocity.x;
//     r2.w = consumeBuf_0[vThreadID.x].Velocity.y;
//     r3.x = consumeBuf_0[vThreadID.x].Rotation.x;
//     r3.y = consumeBuf_0[vThreadID.x].Rotation.y;
//     r3.z = consumeBuf_0[vThreadID.x].RotationVelocity.x;
//     r3.w = consumeBuf_0[vThreadID.x].RotationVelocity.y;
//     r0.y = consumeBuf_0[vThreadID.x].NoneWeightScale.x;
//     r0.z = consumeBuf_0[vThreadID.x].NoneWeightScale.y;
//     r4.x = consumeBuf_0[vThreadID.x].WeightScale.y;
//     r4.y = consumeBuf_0[vThreadID.x].ScaleVelocity.x;
//     r4.z = consumeBuf_0[vThreadID.x].ScaleVelocity.y;
//     r5.x = consumeBuf_0[vThreadID.x].BlendParam.y;
//     r5.y = consumeBuf_0[vThreadID.x].CloneParam.x;
//     r5.z = consumeBuf_0[vThreadID.x].CloneParam.y;
//     r5.w = consumeBuf_0[vThreadID.x].MoveBaseAddVelNoise.x;
//     r6.x = consumeBuf_0[vThreadID.x].RotBaseAddVelNoise.y;
//     r6.y = consumeBuf_0[vThreadID.x].ScaleBaseAddVelNoise.x;
//     r6.z = consumeBuf_0[vThreadID.x].RotBaseAddVelNoise.x;
//     r6.w = consumeBuf_0[vThreadID.x].MoveBaseAddVelNoise.y;
//     r7.x = consumeBuf_0[vThreadID.x].ColorBaseNoise.x;
//     r7.y = consumeBuf_0[vThreadID.x].ColorBaseNoise.y;
//     r7.z = consumeBuf_0[vThreadID.x].ScaleBaseAddVelNoise.y;
//     r7.w = consumeBuf_0[vThreadID.x].ForceVelocity.x;
//     r8.x = consumeBuf_0[vThreadID.x].ForceVelocity.y;
//     r8.y = consumeBuf_0[vThreadID.x].TexAnimInfo.x;
//     r8.z = consumeBuf_0[vThreadID.x].TexAnimInfo.y;
//     r8.w = consumeBuf_0[vThreadID.x].nDummy.x;
//     r9.w = consumeBuf_0[vThreadID.x].nDummy.y;
//     r9.z = r8.w;
//     r10.xyz = r6.zxy;
//     r10.w = r7.z;
//     r6.xyz = r5.yzw;
//   }
//   if (r0.x != 0) {
//   }
//   r0.x = (int)r2.z & 0x0000ffff;
//   r11.x = f16tof32(r0.x);
//   r0.xw = (uint2)r2.zx >> int2(16,16);
//   r11.y = f16tof32(r0.x);
//   r0.x = (int)r2.w & 0x0000ffff;
//   r11.z = f16tof32(r0.x);
//   r0.x = (uint)r6.x >> 16;
//   r5.yz = (int2)r6.xy & int2(0xffff,0xffff);
//   r12.x = (int)r8.y & 0x0000ffff;
//   r12.y = (uint)r8.z >> 16;
//   r0.w = f16tof32(r0.w);
//   r2.z = (int)r2.y & 0x0000ffff;
//   r2.z = f16tof32(r2.z);
//   r13.x = m_aPlacementParam[0].elapsedTime.x + r2.z;
//   r4.w = saturate(r13.x / r0.w);
//   if (m_KeyBlendParam.x == 0) {
//     r5.w = (int)m_aPlacementParam[0].emitInfo.w;
//     r5.w = r5.w * r4.w;
//     r14.y = (int)r5.w;
//     r5.w = 1 + -r4.w;
//     r14.xzw = float3(0,0,0);
//     r15.yz = csInputTex.Load(r14.xyx).zy;
//     r16.xyzw = csInputTex.Load(r14.zyw).xyzw;
//     r12.zw = (int2)r6.zw & int2(0xffff,0xffff);
//     r8.w = (uint)r6.z >> 16;
//     r17.y = f16tof32(r8.w);
//     r17.xz = f16tof32(r12.zw);
//     r17.w = 0;
//     r16.xyzw = r17.xyzw * r5.wwww + r16.xyzw;
//     r14.xzw = float3(2,0,0);
//     r17.xyz = csInputTex.Load(r14.xyz).xyz;
//     r18.xyzw = (int4)r10.xyzw & int4(0xffff,0xffff,0xffff,0xffff);
//     r12.zw = (uint2)r10.xz >> int2(16,16);
//     r19.xy = f16tof32(r12.zw);
//     r18.xyzw = f16tof32(r18.xyzw);
//     r19.zw = r18.xy;
//     r17.xyz = r19.zxw * r5.www + r17.xyz;
//     r14.xzw = float3(3,0,0);
//     r20.xyz = csInputTex.Load(r14.xyz).xyz;
//     r19.xz = r18.zw;
//     r18.xyz = r19.xyz * r5.www + r20.xyz;
//     r14.xzw = float3(4,0,0);
//     r19.xyzw = csInputTex.Load(r14.xyz).xyzw;
//     r12.zw = (int2)r7.xy & int2(0xffff,0xffff);
//     r13.zw = (uint2)r7.xy >> int2(16,16);
//     r20.xz = f16tof32(r12.zw);
//     r20.yw = f16tof32(r13.zw);
//     r19.xyzw = r20.xyzw * r5.wwww + r19.xyzw;
//     r19.xyzw = max(float4(0,0,0,0), r19.xyzw);
//     r14.xzw = float3(7,0,0);
//     r5.w = csInputTex.Load(r14.xyz).x;
//     r5.w = m_aPlacementParam[0].elapsedTime.x * -r5.w;
//     r5.w = 1.44269502 * r5.w;
//     r5.w = exp2(r5.w);
//     r14.xzw = float3(8,0,0);
//     r8.w = csInputTex.Load(r14.xyz).x;
//     r15.xy = r15.zy;
//   } else {
//     r11.w = 1 + -r4.w;
//     r12.z = (int)m_aPlacementParam[0].emitInfo.w;
//     r12.z = r12.z * r4.w;
//     r14.y = (int)r12.z;
//     r12.z = (int)m_KeyBlendParam.y;
//     r12.z = r12.z * r4.w;
//     r20.y = (int)r12.z;
//     r20.xzw = float3(10,0,0);
//     r12.z = csTargetTex.Load(r20.xyz).x;
//     r14.xzw = float3(0,0,0);
//     r13.zw = csInputTex.Load(r14.xyx).yz;
//     r15.zw = csTargetTex.Load(r20.wyw).yz;
//     r15.zw = r15.zw + -r13.zw;
//     r15.xy = r12.zz * r15.zw + r13.zw;
//     r21.xyzw = csInputTex.Load(r14.zyw).xyzw;
//     r20.xzw = float3(1,0,0);
//     r22.xyzw = csTargetTex.Load(r20.xyz).xyzw;
//     r22.xyzw = r22.xyzw + -r21.xyzw;
//     r21.xyzw = r12.zzzz * r22.xyzw + r21.xyzw;
//     r13.zw = (int2)r6.zw & int2(0xffff,0xffff);
//     r12.w = (uint)r6.z >> 16;
//     r22.y = f16tof32(r12.w);
//     r22.xz = f16tof32(r13.zw);
//     r22.w = 0;
//     r16.xyzw = r22.xyzw * r11.wwww + r21.xyzw;
//     r14.xzw = float3(2,0,0);
//     r21.xyz = csInputTex.Load(r14.xyz).xyz;
//     r20.xzw = float3(2,0,0);
//     r22.xyz = csTargetTex.Load(r20.xyz).xyz;
//     r22.xyz = r22.xyz + -r21.xyz;
//     r21.xyz = r12.zzz * r22.xyz + r21.xyz;
//     r22.xyzw = (int4)r10.xyzw & int4(0xffff,0xffff,0xffff,0xffff);
//     r13.zw = (uint2)r10.xz >> int2(16,16);
//     r23.xy = f16tof32(r13.zw);
//     r22.xyzw = f16tof32(r22.xyzw);
//     r23.zw = r22.xy;
//     r17.xyz = r23.zxw * r11.www + r21.xyz;
//     r14.xzw = float3(3,0,0);
//     r21.xyz = csInputTex.Load(r14.xyz).xyz;
//     r20.xzw = float3(3,0,0);
//     r24.xyz = csTargetTex.Load(r20.xyz).xyz;
//     r24.xyz = r24.xyz + -r21.xyz;
//     r21.xyz = r12.zzz * r24.xyz + r21.xyz;
//     r23.xz = r22.zw;
//     r18.xyz = r23.xyz * r11.www + r21.xyz;
//     r14.xzw = float3(4,0,0);
//     r21.xyzw = csInputTex.Load(r14.xyz).xyzw;
//     r20.xzw = float3(4,0,0);
//     r22.xyzw = csTargetTex.Load(r20.xyz).xyzw;
//     r22.xyzw = r22.xyzw + -r21.xyzw;
//     r21.xyzw = r12.zzzz * r22.xyzw + r21.xyzw;
//     r13.zw = (int2)r7.xy & int2(0xffff,0xffff);
//     r15.zw = (uint2)r7.xy >> int2(16,16);
//     r22.xz = f16tof32(r13.zw);
//     r22.yw = f16tof32(r15.zw);
//     r21.xyzw = r22.xyzw * r11.wwww + r21.xyzw;
//     r19.xyzw = max(float4(0,0,0,0), r21.xyzw);
//     r14.xzw = float3(7,0,0);
//     r11.w = csInputTex.Load(r14.xyz).x;
//     r20.xzw = float3(7,0,0);
//     r12.w = csTargetTex.Load(r20.xyz).x;
//     r12.w = -r12.w + r11.w;
//     r11.w = r12.z * r12.w + -r11.w;
//     r11.w = m_aPlacementParam[0].elapsedTime.x * r11.w;
//     r11.w = 1.44269502 * r11.w;
//     r5.w = exp2(r11.w);
//     r14.xzw = float3(8,0,0);
//     r11.w = csInputTex.Load(r14.xyz).x;
//     r20.xzw = float3(8,0,0);
//     r12.w = csTargetTex.Load(r20.xyz).x;
//     r12.w = r12.w + -r11.w;
//     r8.w = r12.z * r12.w + r11.w;
//   }
//   r11.w = (int)m_TexNumInfo.w;
//   r11.w = cmp(r11.w >= 0.949999988);
//   if (r11.w != 0) {
//     r11.w = (int)m_aPlacementParam[0].emitInfo.w;
//     r11.w = r11.w * r4.w;
//     r14.y = (int)r11.w;
//     r14.xzw = float3(9,0,0);
//     r12.zw = csInputTex.Load(r14.xyz).yx;
//     r11.w = (int)r12.y;
//     r11.w = cmp(r12.w < r11.w);
//     r13.z = (int)-r12.y + (int)m_TexNumInfo.z;
//     r14.y = (int)r12.x + (int)r13.z;
//     r14.x = 0;
//     r13.zw = r11.ww ? r14.xy : r12.yx;
//     r13.zw = (int2)r13.zw;
//     r11.w = -r13.z + r12.w;
//     r11.w = r13.w + r11.w;
//     r12.x = (int)r11.w;
//     r12.y = (int)r12.w;
//     r11.w = (int)r12.x & 0x80000000;
//     r12.w = max((int)-r12.x, (int)r12.x);
//     r13.zw = max((int2)-m_TexNumInfo.zx, (int2)m_TexNumInfo.zx);
//     r12.w = (uint)r12.w % (uint)r13.z;
//     r14.x = -(int)r12.w;
//     r11.w = r11.w ? r14.x : r12.w;
//     r12.w = (int)r11.w + 1;
//     r14.x = (int)r12.w & 0x80000000;
//     r12.w = max((int)-r12.w, (int)r12.w);
//     r12.w = (uint)r12.w % (uint)r13.z;
//     r13.z = -(int)r12.w;
//     r12.w = r14.x ? r13.z : r12.w;
//     r13.z = (int)r11.w & 0x80000000;
//     r14.x = max((int)-r11.w, (int)r11.w);
//     r14.x = (uint)r14.x % (uint)r13.w;
//     r14.y = -(int)r14.x;
//     r13.z = r13.z ? r14.y : r14.x;
//     r11.w = (int)r11.w;
//     r14.x = (int)m_TexNumInfo.x;
//     r11.w = r11.w / r14.x;
//     r11.w = trunc(r11.w);
//     r14.x = (int)r12.w & 0x80000000;
//     r14.y = max((int)-r12.w, (int)r12.w);
//     uiDest.x = (uint)r14.y / (uint)r13.w;
//     r21.x = (uint)r14.y % (uint)r13.w;
//     r20.x = uiDest.x;
//     r13.w = -(int)r21.x;
//     r13.w = r14.x ? r13.w : r21.x;
//     r13.zw = (int2)r13.zw;
//     r12.w = (int)r12.w ^ (int)m_TexNumInfo.x;
//     r14.x = -(int)r20.x;
//     r12.w = (int)r12.w & 0x80000000;
//     r12.w = r12.w ? r14.x : r20.x;
//     r12.w = (int)r12.w;
//     r14.y = m_UvCropInfo.y * r11.w;
//     r14.xz = m_UvCropInfo.xx * r13.zw;
//     r14.w = m_UvCropInfo.y * r12.w;
//   } else {
//     r11.w = -1 + (int)m_TexNumInfo.z;
//     r12.w = max(1, (int)r11.w);
//     r12.w = (int)r12.w;
//     r13.z = r12.w * r4.w;
//     r13.z = trunc(r13.z);
//     r13.w = (int)r13.z;
//     r12.z = saturate(r12.w * r4.w + -r13.z);
//     r12.w = (int)r13.w + 1;
//     r12.w = max(1, (int)r12.w);
//     r11.w = min((int)r12.w, (int)r11.w);
//     r12.w = (int)r13.w & 0x80000000;
//     r13.w = max((int)-r13.w, (int)r13.w);
//     r15.z = max((int)-m_TexNumInfo.x, (int)m_TexNumInfo.x);
//     r13.w = (uint)r13.w % (uint)r15.z;
//     r15.w = -(int)r13.w;
//     r12.w = r12.w ? r15.w : r13.w;
//     r12.w = (int)r12.w;
//     r13.w = (int)m_TexNumInfo.x;
//     r13.z = r13.z / r13.w;
//     r13.z = trunc(r13.z);
//     r13.w = (int)r11.w & 0x80000000;
//     r15.w = max((int)-r11.w, (int)r11.w);
//     uiDest.x = (uint)r15.w / (uint)r15.z;
//     r21.x = (uint)r15.w % (uint)r15.z;
//     r20.x = uiDest.x;
//     r15.z = -(int)r21.x;
//     r13.w = r13.w ? r15.z : r21.x;
//     r13.w = (int)r13.w;
//     r11.w = (int)r11.w ^ (int)m_TexNumInfo.x;
//     r15.z = -(int)r20.x;
//     r11.w = (int)r11.w & 0x80000000;
//     r11.w = r11.w ? r15.z : r20.x;
//     r11.w = (int)r11.w;
//     r14.x = m_UvCropInfo.x * r12.w;
//     r14.yz = m_UvCropInfo.yx * r13.zw;
//     r14.w = m_UvCropInfo.y * r11.w;
//   }
//   r11.xzw = r16.xzy * m_aPlacementParam[0].elapsedTime.xxx + r11.xzy;
//   r11.y = r16.w * m_aPlacementParam[0].elapsedTime.x + r11.w;
//   r11.w = cmp(1 >= (int)m_YurayuraParam.x);
//   r12.w = (int)m_aPlacementParam[0].emitInfo.w;
//   r13.z = r13.x * r12.w;
//   r13.w = (int)m_YurayuraParam.x;
//   r13.z = r13.z / r13.w;
//   r13.z = (int)r13.z;
//   r13.z = r11.w ? 1 : r13.z;
//   r2.z = r12.w * r2.z;
//   r2.z = r2.z / r13.w;
//   r2.z = (int)r2.z;
//   r2.z = r11.w ? 0 : r2.z;
//   r2.z = cmp((int)r2.z < (int)r13.z);
//   r11.w = cmp(0 < abs(r8.w));
//   r2.z = r2.z ? r11.w : 0;
//   if (r2.z != 0) {
//     r2.z = r8.w + r8.w;
//     r4.w = r12.w * r4.w;
//     r4.w = (int)r4.w;
//     r11.w = (int)vThreadIDInGroupFlattened.x + (int)vThreadID.x;
//     r4.w = (int)r4.w + (int)r11.w;
//     r4.w = (int)r4.w + (int)vThreadIDInGroup.x;
//     r4.w = (uint)r4.w;
//     r4.w = m_aPlacementParam[0].elapsedTime.y * 10 + r4.w;
//     r4.w = (int)r4.w;
//     r11.w = mad(6389, (int)r4.w, 7381);
//     r11.w = (int)r11.w & 0x000fffff;
//     r11.w = (uint)r11.w % 1000;
//     r11.w = (int)r11.w;
//     r11.w = r11.w * r2.z;
//     r11.w = r11.w * 0.00100000005 + -r8.w;
//     r4.w = (int)r4.w + (int)vThreadIDInGroup.x;
//     r4.w = mad(6389, (int)r4.w, 7381);
//     r4.w = (int)r4.w & 0x000fffff;
//     r4.w = (uint)r4.w % 1000;
//     r4.w = (int)r4.w;
//     r2.z = r4.w * r2.z;
//     r2.z = r2.z * 0.00100000005 + -r8.w;
//     sincos(r11.w, r16.x, r20.x);
//     sincos(r2.z, r21.x, r22.x);
//     r23.x = -r21.x;
//     r22.y = r21.x * r16.x;
//     r23.y = r22.x * r16.x;
//     r22.z = r21.x * r20.x;
//     r20.y = -r16.x;
//     r23.z = r22.x * r20.x;
//     r16.x = dot(r11.xyz, r22.xyz);
//     r16.y = dot(r11.yz, r20.xy);
//     r16.z = dot(r11.xyz, r23.xyz);
//     r11.xyz = r16.xyz;
//   }
//   r16.xyzw = m_ParentColor.xyzw + -r19.xyzw;
//   r16.xyzw = m_ParentWeight.wwww * r16.xyzw + r19.xyzw;
//   r2.z = (int)r0.x;
//   r2.z = r2.z * 1.5 + 1;
//   r13.y = r16.w / r2.z;
//   r2.z = mad((int)r0.x, 2, 1);
//   r2.z = (int)r2.z;
//   r19.y = r16.w / r2.z;
//   r0.x = cmp((int)r0.x >= (int)r5.z);
//   r19.x = r0.x ? r0.w : r13.x;
//   r5.yz = r5.yy ? r19.xy : r13.xy;
//   r0.x = cmp(r5.y < r0.w);
//   if (r0.x != 0) {
//     if (m_EmitInfo.x == 0) {
//       r0.x = (uint)r2.w >> 16;
//       r2.zw = (int2)r3.xz & int2(0xffff,0xffff);
//       r19.x = f16tof32(r2.z);
//       r2.z = (uint)r3.x >> 16;
//       r19.y = f16tof32(r2.z);
//       r2.z = (int)r3.y & 0x0000ffff;
//       r19.z = f16tof32(r2.z);
//       r20.x = f16tof32(r2.w);
//       r2.zw = (uint2)r3.yz >> int2(16,16);
//       r20.y = f16tof32(r2.w);
//       r2.w = (int)r3.w & 0x0000ffff;
//       r20.z = f16tof32(r2.w);
//       r2.w = (uint)r3.w >> 16;
//       r3.x = r0.y ? 0.000000 : 0;
//       r0.y = (uint)r0.y >> 16;
//       r3.y = f16tof32(r0.y);
//       r0.y = (int)r0.z & 0x0000ffff;
//       r3.z = f16tof32(r0.y);
//       r0.y = (uint)r0.z >> 16;
//       r0.z = (uint)r4.x >> 16;
//       r0.xyz = f16tof32(r0.xyz);
//       r3.w = (int)r4.y & 0x0000ffff;
//       r21.x = f16tof32(r3.w);
//       r3.w = (uint)r4.y >> 16;
//       r21.y = f16tof32(r3.w);
//       r3.w = (int)r4.z & 0x0000ffff;
//       r21.z = f16tof32(r3.w);
//       r3.w = (uint)r4.z >> 16;
//       r3.xw = f16tof32(r3.xw);
//       r4.x = (int)r5.x & 0x0000ffff;
//       r4.y = (uint)r5.x >> 16;
//       r4.z = (int)r7.w & 0x0000ffff;
//       r22.x = f16tof32(r4.z);
//       r4.z = (uint)r7.w >> 16;
//       r22.y = f16tof32(r4.z);
//       r4.z = (int)r8.x & 0x0000ffff;
//       r22.z = f16tof32(r4.z);
//       r4.z = (uint)r8.x >> 16;
//       r4.xyz = f16tof32(r4.xyz);
//       r2.x = (int)r2.x & 0x0000ffff;
//       r2.y = (uint)r2.y >> 16;
//       r2.xyzw = f16tof32(r2.xyzw);
//       r1.xyzw = m_WorldShift.xyzw + r1.xyzw;
//       r4.w = 0.449999988 * r0.w;
//       r5.x = -r0.w * 0.550000012 + r13.x;
//       r5.x = max(0, r5.x);
//       r5.x = min(r5.x, r4.w);
//       r4.w = max(0, r4.w);
//       r5.x = r4.w + -r5.x;
//       r5.x = r5.x * r5.x;
//       r5.x = r5.x * -r4.w;
//       r8.x = r4.w * r4.w;
//       r5.x = r5.x / r8.x;
//       r5.x = r5.x + r4.w;
//       r4.w = saturate(r5.x / r4.w);
//       r4.w = 1 + -r4.w;
//       r4.w = 1 + -r4.w;
//       r13.xyz = r22.xyz * r5.www;
//       r17.xyz = r17.xyz * m_aPlacementParam[0].elapsedTime.xxx + r20.xyz;
//       r18.xyz = r18.xyz * m_aPlacementParam[0].elapsedTime.xxx + r21.xyz;
//       r20.xyz = r22.xyz * r5.www + r11.xyz;
//       r21.xyz = m_aPlacementParam[0].parentMove.xyz * m_ParentWeight.xxx;
//       r20.xyz = r20.xyz * m_aPlacementParam[0].elapsedTime.xxx + r21.xyz;
//       r20.xyz = r20.xyz + r1.xyz;
//       r5.x = -m_cs_attachParam.z + 1;
//       r21.xyz = r21.xyz * r5.xxx + r1.xyz;
//       r5.x = cmp(0 < m_cs_attachParam.x);
//       r5.w = dot(m_aPlacementParam[0].parentMove.xyz, m_aPlacementParam[0].parentMove.xyz);
//       r8.x = sqrt(r5.w);
//       r8.x = cmp(0.00100000005 < r8.x);
//       r5.w = rsqrt(r5.w);
//       r22.xyz = m_aPlacementParam[0].parentMove.xyz * r5.www;
//       r23.xyz = m_aPlacementParam[0].rootPosition.xyz + -r20.xyz;
//       r5.w = dot(r22.xyz, r23.xyz);
//       r5.w = cmp(0.00100000005 < r5.w);
//       r8.w = dot(r23.xyz, r23.xyz);
//       r8.w = sqrt(r8.w);
//       r8.w = cmp(m_cs_attachParam.x < r8.w);
//       r22.xyz = r23.xyz * float3(2,2,2) + r20.xyz;
//       r23.xyz = r23.xyz * float3(2,2,2) + r21.xyz;
//       r22.xyz = r8.www ? r22.xyz : r20.xyz;
//       r23.xyz = r8.www ? r23.xyz : r21.xyz;
//       r22.xyz = r5.www ? r22.xyz : r20.xyz;
//       r23.xyz = r5.www ? r23.xyz : r21.xyz;
//       r22.xyz = r8.xxx ? r22.xyz : r20.xyz;
//       r23.xyz = r8.xxx ? r23.xyz : r21.xyz;
//       r1.xyz = r5.xxx ? r22.xyz : r20.xyz;
//       r20.xyz = r5.xxx ? r23.xyz : r21.xyz;
//       r21.xyz = m_ParentWeight.yyy * m_ParentRot.xyz;
//       r15.xzw = r21.xyz * r15.xxx;
//       r15.xzw = r17.xyz * m_aPlacementParam[0].elapsedTime.xxx + r15.xzw;
//       r15.xzw = r19.xyz + r15.xzw;
//       r3.xyz = r18.xyz * m_aPlacementParam[0].elapsedTime.xxx + r3.xyz;
//       r5.x = cmp(0 < r0.y);
//       r5.w = r3.x + r3.y;
//       r5.w = 0.5 * r5.w;
//       r3.xy = r5.xx ? r5.ww : r3.xy;
//       r5.x = m_ParentWeight.z * r15.y;
//       r19.xyz = m_ParentScale.xyz + -r3.xyz;
//       r19.xyz = r5.xxx * r19.xyz + r3.xyz;
//       r2.x = f32tof16(r2.x);
//       r0.w = f32tof16(r0.w);
//       r21.x = mad((int)r0.w, 0x00010000, (int)r2.x);
//       r5.xy = f32tof16(r5.yz);
//       r0.w = f32tof16(r2.y);
//       r21.y = mad((int)r0.w, 0x00010000, (int)r5.x);
//       r5.xzw = f32tof16(r11.xyz);
//       r21.z = mad((int)r5.z, 0x00010000, (int)r5.x);
//       r0.xy = f32tof16(r0.xy);
//       r21.w = mad((int)r0.x, 0x00010000, (int)r5.w);
//       r5.xzw = f32tof16(r15.xzw);
//       r11.x = mad((int)r5.z, 0x00010000, (int)r5.x);
//       r0.x = f32tof16(r2.z);
//       r11.y = mad((int)r0.x, 0x00010000, (int)r5.w);
//       r2.xyz = f32tof16(r17.xyz);
//       r11.z = mad((int)r2.y, 0x00010000, (int)r2.x);
//       r0.x = f32tof16(r2.w);
//       r11.w = mad((int)r0.x, 0x00010000, (int)r2.z);
//       r0.xw = f32tof16(r3.xy);
//       r2.x = mad((int)r0.w, 0x00010000, (int)r0.x);
//       r0.x = f32tof16(r3.z);
//       r2.y = mad((int)r0.y, 0x00010000, (int)r0.x);
//       r0.xyw = f32tof16(r19.xyz);
//       r2.z = mad((int)r0.y, 0x00010000, (int)r0.x);
//       r0.x = f32tof16(r0.z);
//       r2.w = mad((int)r0.x, 0x00010000, (int)r0.w);
//       r0.xyz = f32tof16(r18.xyz);
//       r15.x = mad((int)r0.y, 0x00010000, (int)r0.x);
//       r0.x = f32tof16(r3.w);
//       r15.y = mad((int)r0.x, 0x00010000, (int)r0.z);
//       r0.xyz = f32tof16(r16.xyz);
//       r15.z = mad((int)r0.y, 0x00010000, (int)r0.x);
//       r15.w = mad((int)r5.y, 0x00010000, (int)r0.z);
//       r0.xyzw = f32tof16(r14.xyzw);
//       r0.xy = mad((int2)r0.yw, int2(0x10000,0x10000), (int2)r0.xz);
//       r3.x = f32tof16(r4.w);
//       r3.y = f32tof16(r12.z);
//       r0.z = mad((int)r3.y, 0x00010000, (int)r3.x);
//       r3.xy = f32tof16(r4.xy);
//       r0.w = mad((int)r3.y, 0x00010000, (int)r3.x);
//       r3.xyz = f32tof16(r13.xyz);
//       r7.z = mad((int)r3.y, 0x00010000, (int)r3.x);
//       r3.x = f32tof16(r4.z);
//       r7.w = mad((int)r3.x, 0x00010000, (int)r3.z);
//       bitmask.x = ((~(-1 << 16)) << 0) & 0xffffffff;  r9.x = (((uint)r12.x << 0) & bitmask.x) | ((uint)r8.y & ~bitmask.x);
//       bitmask.y = ((~(-1 << 16)) << 16) & 0xffffffff;  r9.y = (((uint)r12.y << 16) & bitmask.y) | ((uint)r8.z & ~bitmask.y);
//       // Needs manual fix for instruction:
//         imm_atomic_iadd r3.x, u2, l(0, 0, 0, 0), l(1)
//       InterlockedAdd(dest, imm_value, orig_value);
//       wEmitUavCounter_update_0[0].yz = float2(1,1);
//       appendBuf_update_0[r3.x].Position.x = r1.x;
//       appendBuf_update_0[r3.x].Position.y = r1.y;
//       appendBuf_update_0[r3.x].Position.z = r1.z;
//       appendBuf_update_0[r3.x].Position.w = r1.w;
//       r20.w = r1.w;
//       appendBuf_update_0[r3.x].OldPosition.x = r20.x;
//       appendBuf_update_0[r3.x].OldPosition.y = r20.y;
//       appendBuf_update_0[r3.x].OldPosition.z = r20.z;
//       appendBuf_update_0[r3.x].OldPosition.w = r20.w;
//       appendBuf_update_0[r3.x].Longevity.x = r21.x;
//       appendBuf_update_0[r3.x].Longevity.y = r21.y;
//       appendBuf_update_0[r3.x].Velocity.x = r21.z;
//       appendBuf_update_0[r3.x].Velocity.y = r21.w;
//       appendBuf_update_0[r3.x].Rotation.x = r11.x;
//       appendBuf_update_0[r3.x].Rotation.y = r11.y;
//       appendBuf_update_0[r3.x].RotationVelocity.x = r11.z;
//       appendBuf_update_0[r3.x].RotationVelocity.y = r11.w;
//       appendBuf_update_0[r3.x].NoneWeightScale.x = r2.x;
//       appendBuf_update_0[r3.x].NoneWeightScale.y = r2.y;
//       appendBuf_update_0[r3.x].WeightScale.x = r2.z;
//       appendBuf_update_0[r3.x].WeightScale.y = r2.w;
//       appendBuf_update_0[r3.x].ScaleVelocity.x = r15.x;
//       appendBuf_update_0[r3.x].ScaleVelocity.y = r15.y;
//       appendBuf_update_0[r3.x].WeightColor.x = r15.z;
//       appendBuf_update_0[r3.x].WeightColor.y = r15.w;
//       appendBuf_update_0[r3.x].CurrentDiffuseUV.x = r0.x;
//       appendBuf_update_0[r3.x].CurrentDiffuseUV.y = r0.y;
//       appendBuf_update_0[r3.x].BlendParam.x = r0.z;
//       appendBuf_update_0[r3.x].BlendParam.y = r0.w;
//       appendBuf_update_0[r3.x].CloneParam.x = r6.x;
//       appendBuf_update_0[r3.x].CloneParam.y = r6.y;
//       appendBuf_update_0[r3.x].MoveBaseAddVelNoise.x = r6.z;
//       appendBuf_update_0[r3.x].MoveBaseAddVelNoise.y = r6.w;
//       appendBuf_update_0[r3.x].RotBaseAddVelNoise.x = r10.x;
//       appendBuf_update_0[r3.x].RotBaseAddVelNoise.y = r10.y;
//       appendBuf_update_0[r3.x].ScaleBaseAddVelNoise.x = r10.z;
//       appendBuf_update_0[r3.x].ScaleBaseAddVelNoise.y = r10.w;
//       appendBuf_update_0[r3.x].ColorBaseNoise.x = r7.x;
//       appendBuf_update_0[r3.x].ColorBaseNoise.y = r7.y;
//       appendBuf_update_0[r3.x].ForceVelocity.x = r7.z;
//       appendBuf_update_0[r3.x].ForceVelocity.y = r7.w;
//       appendBuf_update_0[r3.x].TexAnimInfo.x = r9.x;
//       appendBuf_update_0[r3.x].TexAnimInfo.y = r9.y;
//       appendBuf_update_0[r3.x].nDummy.x = r9.z;
//       appendBuf_update_0[r3.x].nDummy.y = r9.w;
//     }
//   }
//   return;
// }
//////////////////////////////// HLSL Errors ////////////////////////////////
// F:\SteamLibrary\steamapps\common\Sekiro\ShaderFixes\a42c82f43a43defa-cs_replace.txt(77,10): error X3000: syntax error: unexpected token ')'
/////////////////////////////////////////////////////////////////////////////
