//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Buffer Definitions: 
//
// cbuffer XeTextureLoadConstants
// {
//
//   uint xe_texture_load_guest_base;   // Offset:    0 Size:     4
//   uint xe_texture_load_guest_pitch;  // Offset:    4 Size:     4
//   uint2 xe_texture_load_guest_storage_width_height;// Offset:    8 Size:     8
//   uint3 xe_texture_load_size_blocks; // Offset:   16 Size:    12
//   uint xe_texture_load_is_3d_endian; // Offset:   28 Size:     4
//   uint xe_texture_load_host_base;    // Offset:   32 Size:     4
//   uint xe_texture_load_host_pitch;   // Offset:   36 Size:     4
//   uint xe_texture_load_height_texels;// Offset:   40 Size:     4 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim      ID      HLSL Bind  Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_texture_load_source            texture   uint2         buf      T0             t0      1 
// xe_texture_load_dest                  UAV   uint2         buf      U0             u0      1 
// XeTextureLoadConstants            cbuffer      NA          NA     CB0            cb0      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_1
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[0:0][3], immediateIndexed, space=0
dcl_resource_buffer (uint,uint,uint,uint) T0[0:0], space=0
dcl_uav_typed_buffer (uint,uint,uint,uint) U0[0:0], space=0
dcl_input vThreadID.xyz
dcl_temps 9
dcl_thread_group 2, 32, 1
ishl r0.x, vThreadID.x, l(4)
mov r0.yz, vThreadID.yyzy
uge r1.xyz, r0.xyzx, CB0[0][1].xyzx
or r0.w, r1.y, r1.x
or r0.w, r1.z, r0.w
if_nz r0.w
  ret 
endif 
mov r1.x, l(3)
mov r1.z, CB0[0][1].y
imul null, r0.yzw, r0.xxyz, r1.xxxz
ishl r0.y, r0.y, l(1)
imad r0.z, l(3), r0.w, r0.z
imad r0.y, r0.z, CB0[0][2].y, r0.y
iadd r0.y, r0.y, CB0[0][2].x
ushr r0.z, CB0[0][2].y, l(3)
ieq r0.w, CB0[0][0].y, l(-1)
if_nz r0.w
  and r1.x, CB0[0][1].w, l(1)
  if_nz r1.x
    iadd r1.xy, CB0[0][0].wzww, l(31, 31, 0, 0)
    ishr r2.xyz, vThreadID.yzyy, l(4, 2, 3, 0)
    ushr r1.xy, r1.xyxx, l(4, 5, 0, 0)
    and r1.x, r1.x, l(0x0ffffffe)
    imad r1.x, r2.y, r1.x, r2.x
    ibfe r1.z, l(27), l(1), vThreadID.x
    imad r1.x, r1.x, r1.y, r1.z
    ishl r1.y, vThreadID.y, l(9)
    ishr r1.y, r1.y, l(6)
    iadd r1.z, r2.y, r2.z
    and r1.yw, r1.yyyz, l(0, 48, 0, 1)
    ishr r2.x, r0.x, l(3)
    bfi r1.z, l(1), l(1), r1.z, l(0)
    iadd r1.z, r1.z, r2.x
    bfi r1.z, l(2), l(1), r1.z, l(0)
    iadd r1.z, r1.z, r1.w
    bfi r1.xw, l(21, 0, 0, 21), l(9, 0, 0, 12), r1.xxxx, l(0, 0, 0, 0)
    imad r1.xy, r1.yyyy, l(2, 16, 0, 0), r1.xwxx
    bfi r1.xy, l(2, 2, 0, 0), l(7, 10, 0, 0), vThreadID.zzzz, r1.xyxx
    bfi r1.w, l(1), l(4), vThreadID.y, l(0)
    ubfe r2.x, l(3), l(6), r1.x
    and r2.y, r1.z, l(4)
    bfi r1.z, l(2), l(8), r1.z, l(0)
    imad r1.z, r2.x, l(32), r1.z
    imad r1.z, r2.y, l(4), r1.z
    bfi r1.xy, l(5, 5, 0, 0), l(0, 3, 0, 0), r1.wwww, r1.xyxx
    bfi r1.y, l(9), l(3), r1.z, r1.y
    bfi r1.x, l(6), l(0), r1.x, r1.y
  else 
    ibfe r1.y, l(27), l(1), vThreadID.x
    ishr r1.zw, vThreadID.yyyy, l(0, 0, 5, 2)
    iadd r2.x, CB0[0][0].z, l(31)
    ushr r2.x, r2.x, l(5)
    imad r1.y, r1.z, r2.x, r1.y
    bfi r2.xyz, l(4, 4, 4, 0), l(4, 7, 6, 0), vThreadID.yyyy, l(0, 0, 0, 0)
    bfi r2.xyz, l(24, 24, 24, 0), l(8, 11, 10, 0), r1.yyyy, r2.xyzx
    ishl r1.y, vThreadID.y, l(7)
    and r1.y, r1.y, l(2048)
    bfi r1.y, l(12), l(0), r1.y, r2.y
    and r1.z, r2.z, l(1792)
    iadd r1.y, r1.y, r1.z
    and r1.z, r1.w, l(2)
    ishr r1.w, r0.x, l(3)
    iadd r1.z, r1.w, r1.z
    bfi r1.z, l(2), l(6), r1.z, l(0)
    iadd r1.y, r1.y, r1.z
    bfi r1.x, l(6), l(0), r2.x, r1.y
  endif 
else 
  ishl r0.x, r0.x, l(1)
  iadd r1.y, CB0[0][1].y, l(31)
  and r1.y, r1.y, l(-32)
  imad r1.y, vThreadID.z, r1.y, vThreadID.y
  imad r1.x, r1.y, CB0[0][0].y, r0.x
endif 
iadd r0.x, r1.x, CB0[0][0].x
imul null, r0.x, r0.x, l(9)
ushr r0.xy, r0.xyxx, l(3, 3, 0, 0)
ushr r1.x, CB0[0][1].w, l(1)
ld r1.yz, r0.xxxx, T0[0].zyxw
ieq r1.x, r1.x, l(1)
if_nz r1.x
  ishl r2.xy, r1.zyzz, l(8, 8, 0, 0)
  ushr r2.zw, r1.zzzy, l(0, 0, 8, 8)
  and r2.xyzw, r2.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r1.yz, r2.wwzw, r2.yyxy
  mov r2.x, r1.z
else 
  mov r2.x, r1.z
endif 
iadd r3.xyzw, r0.xxxx, l(1, 2, 3, 4)
ld r1.zw, r3.xxxx, T0[0].zwxy
if_nz r1.x
  ishl r2.zw, r1.zzzw, l(0, 0, 8, 8)
  and r2.zw, r2.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r4.xy, r1.zwzz, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r1.zw, r2.zzzw, r4.xxxy
endif 
ld r2.zw, r3.yyyy, T0[0].zwyx
if_nz r1.x
  ishl r3.xy, r2.wzww, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r4.xy, r2.wzww, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r2.zw, r3.yyyx, r4.yyyx
  mov r3.x, r2.w
else 
  mov r3.x, r2.w
endif 
ld r3.yz, r3.zzzz, T0[0].zxyw
if_nz r1.x
  ishl r4.xy, r3.yzyy, l(8, 8, 0, 0)
  ushr r4.zw, r3.yyyz, l(0, 0, 8, 8)
  and r4.xyzw, r4.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r3.yz, r4.zzwz, r4.xxyx
endif 
ld r4.xy, r3.wwww, T0[0].xyzw
if_nz r1.x
  ishl r4.zw, r4.xxxy, l(0, 0, 8, 8)
  and r4.zw, r4.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r5.xy, r4.xyxx, l(8, 8, 0, 0)
  and r5.xy, r5.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r4.xy, r4.zwzz, r5.xyxx
  mov r2.w, r4.y
else 
  mov r2.w, r4.y
endif 
iadd r5.xyzw, r0.xxxx, l(5, 6, 7, 8)
ld r4.zw, r5.xxxx, T0[0].zwxy
if_nz r1.x
  ishl r6.xy, r4.zwzz, l(8, 8, 0, 0)
  ushr r6.zw, r4.zzzw, l(0, 0, 8, 8)
  and r6.xyzw, r6.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r4.zw, r6.zzzw, r6.xxxy
endif 
ld r5.xy, r5.yyyy, T0[0].yxzw
if_nz r1.x
  ishl r6.xy, r5.yxyy, l(8, 8, 0, 0)
  ushr r6.zw, r5.yyyx, l(0, 0, 8, 8)
  and r6.xyzw, r6.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r5.xy, r6.wzww, r6.yxyy
  mov r4.y, r5.y
else 
  mov r4.y, r5.y
endif 
ld r5.yz, r5.zzzz, T0[0].zyxw
if_nz r1.x
  ishl r6.xy, r5.zyzz, l(8, 8, 0, 0)
  ushr r6.zw, r5.zzzy, l(0, 0, 8, 8)
  and r6.xyzw, r6.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r5.yz, r6.wwzw, r6.yyxy
  mov r6.y, r5.z
else 
  mov r6.y, r5.z
endif 
ld r5.zw, r5.wwww, T0[0].zwxy
if_nz r1.x
  ishl r6.zw, r5.zzzw, l(0, 0, 8, 8)
  and r6.zw, r6.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r7.xy, r5.zwzz, l(8, 8, 0, 0)
  and r7.xy, r7.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r5.zw, r6.zzzw, r7.xxxy
endif 
bfi r2.y, l(16), l(0), r1.y, r3.x
store_uav_typed U0[0].xyzw, r0.yyyy, r2.xyxx
iadd r7.xyzw, r0.yyyy, l(1, 2, 3, 4)
store_uav_typed U0[0].xyzw, r7.xxxx, r2.zwzz
bfi r6.x, l(16), l(0), r4.z, r5.x
store_uav_typed U0[0].xyzw, r7.yyyy, r6.xyxx
iadd r2.x, r0.z, r0.y
ushr r1.y, r1.y, l(16)
bfi r6.xzw, l(16, 0, 16, 16), l(16, 0, 16, 16), r1.zzzz, r1.yyyy
ushr r1.y, r1.z, l(16)
bfi r6.y, l(16), l(16), r3.y, r1.y
store_uav_typed U0[0].xyzw, r2.xxxx, r6.xyzw
iadd r2.yz, r2.xxxx, l(0, 1, 2, 0)
ushr r1.y, r3.y, l(16)
bfi r6.xzw, l(16, 0, 16, 16), l(16, 0, 16, 16), r3.zzzz, r1.yyyy
ushr r1.y, r4.z, l(16)
bfi r6.y, l(16), l(16), r4.w, r1.y
store_uav_typed U0[0].xyzw, r2.yyyy, r6.xyzw
ushr r1.y, r4.w, l(16)
bfi r6.xzw, l(16, 0, 16, 16), l(16, 0, 16, 16), r5.yyyy, r1.yyyy
ushr r1.y, r5.y, l(16)
bfi r6.y, l(16), l(16), r5.z, r1.y
store_uav_typed U0[0].xyzw, r2.zzzz, r6.xyzw
iadd r1.y, r0.z, r2.x
bfi r1.z, l(16), l(0), r3.x, r3.z
store_uav_typed U0[0].xyzw, r1.yyyy, r1.wzww
iadd r1.zw, r1.yyyy, l(0, 0, 1, 2)
store_uav_typed U0[0].xyzw, r1.zzzz, r4.xyxx
bfi r5.z, l(16), l(0), r5.x, r5.z
store_uav_typed U0[0].xyzw, r1.wwww, r5.zwzz
iadd r2.xyzw, r0.xxxx, l(9, 10, 11, 12)
ld r1.yz, r2.xxxx, T0[0].zyxw
if_nz r1.x
  ishl r3.xy, r1.zyzz, l(8, 8, 0, 0)
  ushr r3.zw, r1.zzzy, l(0, 0, 8, 8)
  and r3.xyzw, r3.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r1.yz, r3.wwzw, r3.yyxy
  mov r3.x, r1.z
else 
  mov r3.x, r1.z
endif 
ld r1.zw, r2.yyyy, T0[0].zwxy
if_nz r1.x
  ishl r2.xy, r1.zwzz, l(8, 8, 0, 0)
  and r2.xy, r2.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r3.zw, r1.zzzw, l(0, 0, 8, 8)
  and r3.zw, r3.zzzw, l(0, 0, 0x00ff00ff, 0x00ff00ff)
  iadd r1.zw, r2.xxxy, r3.zzzw
endif 
ld r2.xy, r2.zzzz, T0[0].yxzw
if_nz r1.x
  ishl r3.zw, r2.yyyx, l(0, 0, 8, 8)
  and r3.zw, r3.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r4.xy, r2.yxyy, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r2.xy, r3.wzww, r4.yxyy
  mov r2.xz, r2.xxyx
else 
  mov r2.xz, r2.xxyx
endif 
ld r3.zw, r2.wwww, T0[0].zwxy
if_nz r1.x
  ishl r4.xy, r3.zwzz, l(8, 8, 0, 0)
  ushr r4.zw, r3.zzzw, l(0, 0, 8, 8)
  and r4.xyzw, r4.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r3.zw, r4.zzzw, r4.xxxy
endif 
iadd r4.xyzw, r0.xxxx, l(13, 14, 15, 16)
ld r5.xy, r4.xxxx, T0[0].xyzw
if_nz r1.x
  ishl r5.zw, r5.xxxy, l(0, 0, 8, 8)
  and r5.zw, r5.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r6.xy, r5.xyxx, l(8, 8, 0, 0)
  and r6.xy, r6.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r5.xy, r5.zwzz, r6.xyxx
  mov r2.y, r5.y
else 
  mov r2.y, r5.y
endif 
ld r4.xy, r4.yyyy, T0[0].xyzw
if_nz r1.x
  ishl r5.zw, r4.xxxy, l(0, 0, 8, 8)
  and r5.zw, r5.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r6.xy, r4.xyxx, l(8, 8, 0, 0)
  and r6.xy, r6.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r4.xy, r5.zwzz, r6.xyxx
endif 
ld r5.zw, r4.zzzz, T0[0].zwyx
if_nz r1.x
  ishl r6.xy, r5.wzww, l(8, 8, 0, 0)
  ushr r6.zw, r5.wwwz, l(0, 0, 8, 8)
  and r6.xyzw, r6.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r5.zw, r6.wwwz, r6.yyyx
  mov r5.yz, r5.wwzw
else 
  mov r5.yz, r5.wwzw
endif 
iadd r2.w, r0.x, l(17)
ld r4.zw, r4.wwww, T0[0].zwyx
if_nz r1.x
  ishl r6.xy, r4.wzww, l(8, 8, 0, 0)
  ushr r6.zw, r4.wwwz, l(0, 0, 8, 8)
  and r6.xyzw, r6.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r4.zw, r6.wwwz, r6.yyyx
  mov r6.y, r4.w
else 
  mov r6.y, r4.w
endif 
ld r6.zw, r2.wwww, T0[0].zwxy
if_nz r1.x
  ishl r7.xy, r6.zwzz, l(8, 8, 0, 0)
  and r7.xy, r7.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r8.xy, r6.zwzz, l(8, 8, 0, 0)
  and r8.xy, r8.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r6.zw, r7.xxxy, r8.xxxy
endif 
bfi r3.y, l(16), l(0), r1.y, r2.z
store_uav_typed U0[0].xyzw, r7.zzzz, r3.xyxx
store_uav_typed U0[0].xyzw, r7.wwww, r2.xyxx
iadd r8.xyzw, r0.yyyy, l(5, 6, 7, 8)
bfi r6.x, l(16), l(0), r4.x, r5.z
store_uav_typed U0[0].xyzw, r8.xxxx, r6.xyxx
iadd r2.x, r0.z, r7.z
ushr r1.y, r1.y, l(16)
bfi r7.xzw, l(16, 0, 16, 16), l(16, 0, 16, 16), r1.zzzz, r1.yyyy
ushr r1.y, r1.z, l(16)
bfi r7.y, l(16), l(16), r3.z, r1.y
store_uav_typed U0[0].xyzw, r2.xxxx, r7.xyzw
iadd r2.yw, r2.xxxx, l(0, 1, 0, 2)
ushr r1.y, r3.z, l(16)
bfi r7.xzw, l(16, 0, 16, 16), l(16, 0, 16, 16), r3.wwww, r1.yyyy
ushr r1.y, r4.x, l(16)
bfi r7.y, l(16), l(16), r4.y, r1.y
store_uav_typed U0[0].xyzw, r2.yyyy, r7.xyzw
ushr r1.y, r4.y, l(16)
bfi r7.xzw, l(16, 0, 16, 16), l(16, 0, 16, 16), r4.zzzz, r1.yyyy
ushr r1.y, r4.z, l(16)
bfi r7.y, l(16), l(16), r6.z, r1.y
store_uav_typed U0[0].xyzw, r2.wwww, r7.xyzw
iadd r1.y, r0.z, r2.x
bfi r1.z, l(16), l(0), r2.z, r3.w
store_uav_typed U0[0].xyzw, r1.yyyy, r1.wzww
iadd r1.zw, r1.yyyy, l(0, 0, 1, 2)
store_uav_typed U0[0].xyzw, r1.zzzz, r5.xyxx
bfi r6.z, l(16), l(0), r5.z, r6.z
store_uav_typed U0[0].xyzw, r1.wwww, r6.zwzz
if_nz r0.w
  iadd r0.w, r0.x, l(72)
else 
  iadd r0.w, r0.x, l(18)
endif 
ld r1.yz, r0.wwww, T0[0].zyxw
if_nz r1.x
  ishl r2.xy, r1.zyzz, l(8, 8, 0, 0)
  ushr r2.zw, r1.zzzy, l(0, 0, 8, 8)
  and r2.xyzw, r2.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r1.yz, r2.wwzw, r2.yyxy
  mov r2.x, r1.z
else 
  mov r2.x, r1.z
endif 
iadd r3.xyzw, r0.wwww, l(1, 2, 3, 4)
ld r1.zw, r3.xxxx, T0[0].zwxy
if_nz r1.x
  ishl r2.zw, r1.zzzw, l(0, 0, 8, 8)
  and r2.zw, r2.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r4.xy, r1.zwzz, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r1.zw, r2.zzzw, r4.xxxy
endif 
ld r2.zw, r3.yyyy, T0[0].zwyx
if_nz r1.x
  ishl r3.xy, r2.wzww, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r4.xy, r2.wzww, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r2.zw, r3.yyyx, r4.yyyx
  mov r0.x, r2.w
else 
  mov r0.x, r2.w
endif 
ld r3.xy, r3.zzzz, T0[0].xyzw
if_nz r1.x
  ishl r4.xy, r3.xyxx, l(8, 8, 0, 0)
  ushr r4.zw, r3.xxxy, l(0, 0, 8, 8)
  and r4.xyzw, r4.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r3.xy, r4.zwzz, r4.xyxx
endif 
ld r3.zw, r3.wwww, T0[0].zwxy
if_nz r1.x
  ishl r4.xy, r3.zwzz, l(8, 8, 0, 0)
  ushr r4.zw, r3.zzzw, l(0, 0, 8, 8)
  and r4.xyzw, r4.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r3.zw, r4.zzzw, r4.xxxy
  mov r2.w, r3.w
else 
  mov r2.w, r3.w
endif 
iadd r4.xyzw, r0.wwww, l(5, 6, 7, 8)
ld r5.xy, r4.xxxx, T0[0].xyzw
if_nz r1.x
  ishl r5.zw, r5.xxxy, l(0, 0, 8, 8)
  and r5.zw, r5.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r6.xy, r5.xyxx, l(8, 8, 0, 0)
  and r6.xy, r6.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r5.xy, r5.zwzz, r6.xyxx
endif 
ld r4.xy, r4.yyyy, T0[0].yxzw
if_nz r1.x
  ishl r5.zw, r4.yyyx, l(0, 0, 8, 8)
  and r5.zw, r5.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r6.xy, r4.yxyy, l(8, 8, 0, 0)
  and r6.xy, r6.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r4.xy, r5.wzww, r6.yxyy
  mov r3.w, r4.y
else 
  mov r3.w, r4.y
endif 
ld r4.yz, r4.zzzz, T0[0].zyxw
if_nz r1.x
  ishl r5.zw, r4.zzzy, l(0, 0, 8, 8)
  and r5.zw, r5.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r6.xy, r4.zyzz, l(8, 8, 0, 0)
  and r6.xy, r6.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r4.yz, r5.wwzw, r6.yyxy
  mov r6.y, r4.z
else 
  mov r6.y, r4.z
endif 
ld r4.zw, r4.wwww, T0[0].zwxy
if_nz r1.x
  ishl r5.zw, r4.zzzw, l(0, 0, 8, 8)
  and r5.zw, r5.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r6.zw, r4.zzzw, l(0, 0, 8, 8)
  and r6.zw, r6.zzzw, l(0, 0, 0x00ff00ff, 0x00ff00ff)
  iadd r4.zw, r5.zzzw, r6.zzzw
endif 
bfi r2.y, l(16), l(0), r1.y, r0.x
store_uav_typed U0[0].xyzw, r8.yyyy, r2.xyxx
store_uav_typed U0[0].xyzw, r8.zzzz, r2.zwzz
bfi r6.x, l(16), l(0), r5.x, r4.x
store_uav_typed U0[0].xyzw, r8.wwww, r6.xyxx
iadd r2.x, r0.z, r8.y
ushr r1.y, r1.y, l(16)
bfi r6.xzw, l(16, 0, 16, 16), l(16, 0, 16, 16), r1.zzzz, r1.yyyy
ushr r1.y, r1.z, l(16)
bfi r6.y, l(16), l(16), r3.x, r1.y
store_uav_typed U0[0].xyzw, r2.xxxx, r6.xyzw
iadd r2.yz, r2.xxxx, l(0, 1, 2, 0)
ushr r1.y, r3.x, l(16)
bfi r6.xzw, l(16, 0, 16, 16), l(16, 0, 16, 16), r3.yyyy, r1.yyyy
ushr r1.y, r5.x, l(16)
bfi r6.y, l(16), l(16), r5.y, r1.y
store_uav_typed U0[0].xyzw, r2.yyyy, r6.xyzw
ushr r1.y, r5.y, l(16)
bfi r5.xzw, l(16, 0, 16, 16), l(16, 0, 16, 16), r4.yyyy, r1.yyyy
ushr r1.y, r4.y, l(16)
bfi r5.y, l(16), l(16), r4.z, r1.y
store_uav_typed U0[0].xyzw, r2.zzzz, r5.xyzw
iadd r1.y, r0.z, r2.x
bfi r1.z, l(16), l(0), r0.x, r3.y
store_uav_typed U0[0].xyzw, r1.yyyy, r1.wzww
iadd r1.zw, r1.yyyy, l(0, 0, 1, 2)
store_uav_typed U0[0].xyzw, r1.zzzz, r3.zwzz
bfi r4.z, l(16), l(0), r4.x, r4.z
store_uav_typed U0[0].xyzw, r1.wwww, r4.zwzz
iadd r1.yzw, r0.yyyy, l(0, 9, 10, 11)
iadd r2.xyzw, r0.wwww, l(9, 10, 11, 12)
ld r3.xy, r2.xxxx, T0[0].yxzw
if_nz r1.x
  ishl r3.zw, r3.yyyx, l(0, 0, 8, 8)
  and r3.zw, r3.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r4.xy, r3.yxyy, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r3.xy, r3.wzww, r4.yxyy
  mov r4.x, r3.y
else 
  mov r4.x, r3.y
endif 
ld r2.xy, r2.yyyy, T0[0].xyzw
if_nz r1.x
  ishl r3.yz, r2.xxyx, l(0, 8, 8, 0)
  and r3.yz, r3.yyzy, l(0, 0xff00ff00, 0xff00ff00, 0)
  ushr r4.zw, r2.xxxy, l(0, 0, 8, 8)
  and r4.zw, r4.zzzw, l(0, 0, 0x00ff00ff, 0x00ff00ff)
  iadd r2.xy, r3.yzyy, r4.zwzz
endif 
ld r3.yz, r2.zzzz, T0[0].zyxw
if_nz r1.x
  ishl r4.zw, r3.zzzy, l(0, 0, 8, 8)
  and r4.zw, r4.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r5.xy, r3.zyzz, l(8, 8, 0, 0)
  and r5.xy, r5.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r3.yz, r4.wwzw, r5.yyxy
  mov r0.x, r3.z
else 
  mov r0.x, r3.z
endif 
ld r2.zw, r2.wwww, T0[0].zwxy
if_nz r1.x
  ishl r4.zw, r2.zzzw, l(0, 0, 8, 8)
  and r4.zw, r4.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r5.xy, r2.zwzz, l(8, 8, 0, 0)
  and r5.xy, r5.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r2.zw, r4.zzzw, r5.xxxy
endif 
iadd r5.xyzw, r0.wwww, l(13, 14, 15, 16)
ld r4.zw, r5.xxxx, T0[0].zwxy
if_nz r1.x
  ishl r6.xy, r4.zwzz, l(8, 8, 0, 0)
  ushr r6.zw, r4.zzzw, l(0, 0, 8, 8)
  and r6.xyzw, r6.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r4.zw, r6.zzzw, r6.xxxy
  mov r3.z, r4.w
else 
  mov r3.z, r4.w
endif 
ld r5.xy, r5.yyyy, T0[0].xyzw
if_nz r1.x
  ishl r6.xy, r5.xyxx, l(8, 8, 0, 0)
  ushr r6.zw, r5.xxxy, l(0, 0, 8, 8)
  and r6.xyzw, r6.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r5.xy, r6.zwzz, r6.xyxx
endif 
ld r6.xy, r5.zzzz, T0[0].yxzw
if_nz r1.x
  ishl r6.zw, r6.yyyx, l(0, 0, 8, 8)
  and r6.zw, r6.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r7.xy, r6.yxyy, l(8, 8, 0, 0)
  and r7.xy, r7.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r6.xy, r6.wzww, r7.yxyy
  mov r4.w, r6.y
else 
  mov r4.w, r6.y
endif 
iadd r0.w, r0.w, l(17)
ld r5.zw, r5.wwww, T0[0].zwyx
if_nz r1.x
  ishl r6.yz, r5.wwzw, l(0, 8, 8, 0)
  and r6.yz, r6.yyzy, l(0, 0xff00ff00, 0xff00ff00, 0)
  ushr r7.xy, r5.wzww, l(8, 8, 0, 0)
  and r7.xy, r7.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r5.zw, r6.zzzy, r7.yyyx
  mov r7.y, r5.w
else 
  mov r7.y, r5.w
endif 
ld r6.yz, r0.wwww, T0[0].zxyw
if_nz r1.x
  ishl r7.zw, r6.yyyz, l(0, 0, 8, 8)
  and r7.zw, r7.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r8.xy, r6.yzyy, l(8, 8, 0, 0)
  and r8.xy, r8.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r6.yz, r7.zzwz, r8.xxyx
endif 
bfi r4.y, l(16), l(0), r3.x, r0.x
store_uav_typed U0[0].xyzw, r1.yyyy, r4.xyxx
store_uav_typed U0[0].xyzw, r1.zzzz, r3.yzyy
bfi r7.x, l(16), l(0), r5.x, r6.x
store_uav_typed U0[0].xyzw, r1.wwww, r7.xyxx
iadd r0.y, r0.z, r1.y
ushr r0.w, r3.x, l(16)
bfi r1.xzw, l(16, 0, 16, 16), l(16, 0, 16, 16), r2.xxxx, r0.wwww
ushr r0.w, r2.x, l(16)
bfi r1.y, l(16), l(16), r2.z, r0.w
store_uav_typed U0[0].xyzw, r0.yyyy, r1.xyzw
iadd r1.xy, r0.yyyy, l(1, 2, 0, 0)
ushr r0.w, r2.z, l(16)
bfi r3.xzw, l(16, 0, 16, 16), l(16, 0, 16, 16), r2.wwww, r0.wwww
ushr r0.w, r5.x, l(16)
bfi r3.y, l(16), l(16), r5.y, r0.w
store_uav_typed U0[0].xyzw, r1.xxxx, r3.xyzw
ushr r0.w, r5.y, l(16)
bfi r3.xzw, l(16, 0, 16, 16), l(16, 0, 16, 16), r5.zzzz, r0.wwww
ushr r0.w, r5.z, l(16)
bfi r3.y, l(16), l(16), r6.y, r0.w
store_uav_typed U0[0].xyzw, r1.yyyy, r3.xyzw
iadd r0.y, r0.z, r0.y
bfi r2.x, l(16), l(0), r0.x, r2.w
store_uav_typed U0[0].xyzw, r0.yyyy, r2.yxyy
iadd r0.xz, r0.yyyy, l(1, 0, 2, 0)
store_uav_typed U0[0].xyzw, r0.xxxx, r4.zwzz
bfi r6.y, l(16), l(0), r6.x, r6.y
store_uav_typed U0[0].xyzw, r0.zzzz, r6.yzyy
ret 
// Approximately 549 instruction slots used
