//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Buffer Definitions: 
//
// cbuffer XeTextureLoadConstants
// {
//
//   uint xe_texture_load_is_tiled_3d_endian;// Offset:    0 Size:     4
//   uint xe_texture_load_guest_offset; // Offset:    4 Size:     4
//   uint xe_texture_load_guest_pitch_aligned;// Offset:    8 Size:     4
//   uint xe_texture_load_guest_z_stride_block_rows_aligned;// Offset:   12 Size:     4
//   uint3 xe_texture_load_size_blocks; // Offset:   16 Size:    12
//   uint xe_texture_load_host_offset;  // Offset:   28 Size:     4
//   uint xe_texture_load_host_pitch;   // Offset:   32 Size:     4
//   uint xe_texture_load_height_texels;// Offset:   36 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 6
dcl_thread_group 8, 32, 1
ishl r0.x, vThreadID.x, l(2)
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(3)
imad r0.z, l(3), r0.w, r0.z
imad r0.y, r0.z, CB0[0][2].x, r0.y
iadd r0.y, r0.y, CB0[0][1].w
ushr r0.z, CB0[0][2].x, l(3)
and r0.w, CB0[0][0].x, l(1)
if_nz r0.w
  and r1.x, CB0[0][0].x, l(2)
  if_nz r1.x
    ishr r1.xyz, vThreadID.yzyy, l(4, 2, 3, 0)
    ushr r2.xy, CB0[0][0].wzww, l(4, 5, 0, 0)
    imad r1.x, r1.y, r2.x, r1.x
    ibfe r2.xz, l(27, 0, 29, 0), l(3, 0, 1, 0), vThreadID.xxxx
    imad r1.x, r1.x, r2.y, r2.x
    ishl r1.w, vThreadID.y, l(11)
    and r1.w, r1.w, l(0x00003000)
    bfi r1.w, l(3), l(9), r0.x, r1.w
    ishr r1.w, r1.w, l(6)
    iadd r1.y, r1.y, r1.z
    bfi r1.z, l(1), l(1), r1.y, l(0)
    iadd r1.z, r1.z, r2.z
    bfi r1.z, l(2), l(1), r1.z, l(0)
    bfi r1.y, l(1), l(0), r1.y, r1.z
    bfi r1.xz, l(19, 0, 19, 0), l(11, 0, 14, 0), r1.xxxx, l(0, 0, 0, 0)
    imad r1.xz, r1.wwww, l(2, 0, 16, 0), r1.xxzx
    bfi r1.xz, l(2, 0, 2, 0), l(9, 0, 12, 0), vThreadID.zzzz, r1.xxzx
    bfi r1.w, l(1), l(4), vThreadID.y, l(0)
    ubfe r2.x, l(3), l(6), r1.x
    and r2.y, r1.y, l(6)
    bfi r1.y, l(1), l(8), r1.y, l(0)
    imad r1.y, r2.x, l(32), r1.y
    imad r1.y, r2.y, l(4), r1.y
    bfi r1.xz, l(6, 0, 6, 0), l(0, 0, 3, 0), r1.wwww, r1.xxzx
    bfi r1.y, l(9), l(3), r1.y, r1.z
    bfi r1.x, l(6), l(0), r1.x, r1.y
  else 
    ibfe r1.yz, l(0, 27, 29, 0), l(0, 3, 1, 0), vThreadID.xxxx
    ishr r2.xy, vThreadID.yyyy, l(5, 2, 0, 0)
    ushr r1.w, CB0[0][0].z, l(5)
    imad r1.y, r2.x, r1.w, r1.y
    ishl r2.xz, vThreadID.yyyy, l(6, 0, 7, 0)
    and r2.xz, r2.xxzx, l(896, 0, 2048, 0)
    bfi r1.w, l(3), l(4), r0.x, r2.x
    bfi r1.w, l(22), l(10), r1.y, r1.w
    bfi r2.w, l(1), l(4), vThreadID.y, l(0)
    iadd r1.w, r1.w, r2.w
    ishl r3.xy, r2.xxxx, l(3, 2, 0, 0)
    bfi r3.xy, l(3, 3, 0, 0), l(7, 6, 0, 0), r0.xxxx, r3.xyxx
    bfi r3.xy, l(22, 22, 0, 0), l(13, 12, 0, 0), r1.yyyy, r3.xyxx
    imad r2.xw, r2.wwww, l(8, 0, 0, 4), r3.xxxy
    bfi r1.y, l(12), l(0), r2.z, r2.x
    and r2.x, r2.w, l(1792)
    iadd r1.y, r1.y, r2.x
    and r2.x, r2.y, l(2)
    iadd r1.z, r1.z, r2.x
    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), r1.w, r1.y
  endif 
else 
  ishl r0.x, r0.x, l(3)
  imad r1.y, vThreadID.z, CB0[0][0].w, vThreadID.y
  imad r1.x, r1.y, CB0[0][0].z, r0.x
endif 
iadd r0.x, r1.x, CB0[0][0].y
imul null, r0.x, r0.x, l(9)
ushr r0.xy, r0.xyxx, l(3, 3, 0, 0)
ushr r1.x, CB0[0][0].x, l(2)
ld r1.yz, r0.xxxx, T0[0].zxyw
ieq r2.xyz, r1.xxxx, l(1, 2, 3, 0)
or r1.xw, r2.yyyz, r2.xxxy
if_nz r1.x
  ishl r2.xy, r1.yzyy, l(8, 8, 0, 0)
  ushr r2.zw, r1.yyyz, l(0, 0, 8, 8)
  and r2.xyzw, r2.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r1.yz, r2.zzwz, r2.xxyx
endif 
if_nz r1.w
  ushr r2.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r2.xxyx
endif 
store_uav_typed U0[0].xyzw, r0.yyyy, r1.yzyy
iadd r2.xyzw, r0.yyyy, l(1, 2, 3, 4)
iadd r3.xyzw, r0.xxxx, l(1, 2, 3, 4)
ld r1.yz, r3.xxxx, T0[0].zxyw
if_nz r1.x
  ishl r4.xy, r1.yzyy, l(8, 8, 0, 0)
  ushr r4.zw, r1.yyyz, l(0, 0, 8, 8)
  and r4.xyzw, r4.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r1.yz, r4.zzwz, r4.xxyx
endif 
if_nz r1.w
  ushr r4.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r4.xxyx
endif 
store_uav_typed U0[0].xyzw, r2.xxxx, r1.yzyy
ld r1.yz, r3.yyyy, T0[0].zxyw
if_nz r1.x
  ishl r3.xy, r1.yzyy, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r4.xy, r1.yzyy, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r1.yz, r3.xxyx, r4.xxyx
endif 
if_nz r1.w
  ushr r3.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r3.xxyx
endif 
store_uav_typed U0[0].xyzw, r2.yyyy, r1.yzyy
iadd r1.y, r0.z, r0.y
ld r2.xy, r3.zzzz, T0[0].xyzw
if_nz r1.x
  ishl r3.xy, r2.xyxx, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r4.xy, r2.xyxx, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r2.xy, r3.xyxx, r4.xyxx
endif 
if_nz r1.w
  ushr r3.xy, r2.xyxx, l(16, 16, 0, 0)
  bfi r2.xy, l(16, 16, 0, 0), l(16, 16, 0, 0), r2.xyxx, r3.xyxx
endif 
store_uav_typed U0[0].xyzw, r1.yyyy, r2.xyxx
iadd r2.xy, r1.yyyy, l(1, 2, 0, 0)
ld r3.xy, r3.wwww, T0[0].xyzw
if_nz r1.x
  ishl r3.zw, r3.xxxy, l(0, 0, 8, 8)
  and r3.zw, r3.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r4.xy, r3.xyxx, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r3.xy, r3.zwzz, r4.xyxx
endif 
if_nz r1.w
  ushr r3.zw, r3.xxxy, l(0, 0, 16, 16)
  bfi r3.xy, l(16, 16, 0, 0), l(16, 16, 0, 0), r3.xyxx, r3.zwzz
endif 
store_uav_typed U0[0].xyzw, r2.xxxx, r3.xyxx
iadd r3.xyzw, r0.xxxx, l(5, 6, 7, 8)
ld r4.xy, r3.xxxx, 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
endif 
if_nz r1.w
  ushr r4.zw, r4.xxxy, l(0, 0, 16, 16)
  bfi r4.xy, l(16, 16, 0, 0), l(16, 16, 0, 0), r4.xyxx, r4.zwzz
endif 
store_uav_typed U0[0].xyzw, r2.yyyy, r4.xyxx
iadd r1.y, r0.z, r1.y
ld r2.xy, r3.yyyy, T0[0].xyzw
if_nz r1.x
  ishl r3.xy, r2.xyxx, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r4.xy, r2.xyxx, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r2.xy, r3.xyxx, r4.xyxx
endif 
if_nz r1.w
  ushr r3.xy, r2.xyxx, l(16, 16, 0, 0)
  bfi r2.xy, l(16, 16, 0, 0), l(16, 16, 0, 0), r2.xyxx, r3.xyxx
endif 
store_uav_typed U0[0].xyzw, r1.yyyy, r2.xyxx
iadd r2.xy, r1.yyyy, l(1, 2, 0, 0)
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 
if_nz r1.w
  ushr r4.xy, r3.xyxx, l(16, 16, 0, 0)
  bfi r3.xy, l(16, 16, 0, 0), l(16, 16, 0, 0), r3.xyxx, r4.xyxx
endif 
store_uav_typed U0[0].xyzw, r2.xxxx, r3.xyxx
ld r3.xy, r3.wwww, T0[0].xyzw
if_nz r1.x
  ishl r3.zw, r3.xxxy, l(0, 0, 8, 8)
  and r3.zw, r3.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r4.xy, r3.xyxx, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r3.xy, r3.zwzz, r4.xyxx
endif 
if_nz r1.w
  ushr r3.zw, r3.xxxy, l(0, 0, 16, 16)
  bfi r3.xy, l(16, 16, 0, 0), l(16, 16, 0, 0), r3.xyxx, r3.zwzz
endif 
store_uav_typed U0[0].xyzw, r2.yyyy, r3.xyxx
iadd r3.xyzw, r0.xxxx, l(9, 10, 11, 12)
ld r1.yz, r3.xxxx, T0[0].zxyw
if_nz r1.x
  ishl r2.xy, r1.yzyy, l(8, 8, 0, 0)
  and r2.xy, r2.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r4.xy, r1.yzyy, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r1.yz, r2.xxyx, r4.xxyx
endif 
if_nz r1.w
  ushr r2.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r2.xxyx
endif 
store_uav_typed U0[0].xyzw, r2.zzzz, r1.yzyy
ld r1.yz, r3.yyyy, T0[0].zxyw
if_nz r1.x
  ishl r2.xy, r1.yzyy, l(8, 8, 0, 0)
  and r2.xy, r2.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r3.xy, r1.yzyy, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r1.yz, r2.xxyx, r3.xxyx
endif 
if_nz r1.w
  ushr r2.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r2.xxyx
endif 
store_uav_typed U0[0].xyzw, r2.wwww, r1.yzyy
iadd r4.xyzw, r0.yyyy, l(5, 6, 7, 8)
ld r1.yz, r3.zzzz, T0[0].zxyw
if_nz r1.x
  ishl r2.xy, r1.yzyy, l(8, 8, 0, 0)
  and r2.xy, r2.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r3.xy, r1.yzyy, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r1.yz, r2.xxyx, r3.xxyx
endif 
if_nz r1.w
  ushr r2.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r2.xxyx
endif 
store_uav_typed U0[0].xyzw, r4.xxxx, r1.yzyy
iadd r1.y, r0.z, r2.z
ld r2.xy, r3.wwww, T0[0].xyzw
if_nz r1.x
  ishl r2.zw, r2.xxxy, l(0, 0, 8, 8)
  and r2.zw, r2.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r3.xy, r2.xyxx, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r2.xy, r2.zwzz, r3.xyxx
endif 
if_nz r1.w
  ushr r2.zw, r2.xxxy, l(0, 0, 16, 16)
  bfi r2.xy, l(16, 16, 0, 0), l(16, 16, 0, 0), r2.xyxx, r2.zwzz
endif 
store_uav_typed U0[0].xyzw, r1.yyyy, r2.xyxx
iadd r2.xy, r1.yyyy, l(1, 2, 0, 0)
iadd r3.xyzw, r0.xxxx, l(13, 14, 15, 16)
ld r2.zw, r3.xxxx, T0[0].zwxy
if_nz r1.x
  ishl r5.xy, r2.zwzz, l(8, 8, 0, 0)
  ushr r5.zw, r2.zzzw, l(0, 0, 8, 8)
  and r5.xyzw, r5.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r2.zw, r5.zzzw, r5.xxxy
endif 
if_nz r1.w
  ushr r5.xy, r2.zwzz, l(16, 16, 0, 0)
  bfi r2.zw, l(0, 0, 16, 16), l(0, 0, 16, 16), r2.zzzw, r5.xxxy
endif 
store_uav_typed U0[0].xyzw, r2.xxxx, r2.zwzz
ld r2.xz, r3.yyyy, T0[0].xzyw
if_nz r1.x
  ishl r3.xy, r2.xzxx, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r5.xy, r2.xzxx, l(8, 8, 0, 0)
  and r5.xy, r5.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r2.xz, r3.xxyx, r5.xxyx
endif 
if_nz r1.w
  ushr r3.xy, r2.xzxx, l(16, 16, 0, 0)
  bfi r2.xz, l(16, 0, 16, 0), l(16, 0, 16, 0), r2.xxzx, r3.xxyx
endif 
store_uav_typed U0[0].xyzw, r2.yyyy, r2.xzxx
iadd r1.y, r0.z, r1.y
ld r2.xy, r3.zzzz, T0[0].xyzw
if_nz r1.x
  ishl r2.zw, r2.xxxy, l(0, 0, 8, 8)
  and r2.zw, r2.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r3.xy, r2.xyxx, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r2.xy, r2.zwzz, r3.xyxx
endif 
if_nz r1.w
  ushr r2.zw, r2.xxxy, l(0, 0, 16, 16)
  bfi r2.xy, l(16, 16, 0, 0), l(16, 16, 0, 0), r2.xyxx, r2.zwzz
endif 
store_uav_typed U0[0].xyzw, r1.yyyy, r2.xyxx
iadd r2.xy, r1.yyyy, l(1, 2, 0, 0)
iadd r1.z, r0.x, l(17)
ld r2.zw, r3.wwww, T0[0].zwxy
if_nz r1.x
  ishl r3.xy, r2.zwzz, l(8, 8, 0, 0)
  ushr r3.zw, r2.zzzw, l(0, 0, 8, 8)
  and r3.xyzw, r3.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r2.zw, r3.zzzw, r3.xxxy
endif 
if_nz r1.w
  ushr r3.xy, r2.zwzz, l(16, 16, 0, 0)
  bfi r2.zw, l(0, 0, 16, 16), l(0, 0, 16, 16), r2.zzzw, r3.xxxy
endif 
store_uav_typed U0[0].xyzw, r2.xxxx, r2.zwzz
ld r2.xz, r1.zzzz, T0[0].xzyw
if_nz r1.x
  ishl r3.xy, r2.xzxx, l(8, 8, 0, 0)
  ushr r3.zw, r2.xxxz, l(0, 0, 8, 8)
  and r3.xyzw, r3.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r2.xz, r3.zzwz, r3.xxyx
endif 
if_nz r1.w
  ushr r3.xy, r2.xzxx, l(16, 16, 0, 0)
  bfi r2.xz, l(16, 0, 16, 0), l(16, 0, 16, 0), r2.xxzx, r3.xxyx
endif 
store_uav_typed U0[0].xyzw, r2.yyyy, r2.xzxx
if_nz r0.w
  iadd r0.w, r0.x, l(36)
else 
  iadd r0.w, r0.x, l(18)
endif 
ld r1.yz, r0.wwww, T0[0].zxyw
if_nz r1.x
  ishl r2.xy, r1.yzyy, l(8, 8, 0, 0)
  ushr r2.zw, r1.yyyz, l(0, 0, 8, 8)
  and r2.xyzw, r2.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r1.yz, r2.zzwz, r2.xxyx
endif 
if_nz r1.w
  ushr r2.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r2.xxyx
endif 
store_uav_typed U0[0].xyzw, r4.yyyy, r1.yzyy
iadd r2.xyzw, r0.wwww, l(1, 2, 3, 4)
ld r1.yz, r2.xxxx, T0[0].zxyw
if_nz r1.x
  ishl r3.xy, r1.yzyy, l(8, 8, 0, 0)
  ushr r3.zw, r1.yyyz, l(0, 0, 8, 8)
  and r3.xyzw, r3.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r1.yz, r3.zzwz, r3.xxyx
endif 
if_nz r1.w
  ushr r3.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r3.xxyx
endif 
store_uav_typed U0[0].xyzw, r4.zzzz, r1.yzyy
ld r1.yz, r2.yyyy, T0[0].zxyw
if_nz r1.x
  ishl r2.xy, r1.yzyy, l(8, 8, 0, 0)
  and r2.xy, r2.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r3.xy, r1.yzyy, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r1.yz, r2.xxyx, r3.xxyx
endif 
if_nz r1.w
  ushr r2.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r2.xxyx
endif 
store_uav_typed U0[0].xyzw, r4.wwww, r1.yzyy
iadd r0.x, r0.z, r4.y
ld r1.yz, r2.zzzz, T0[0].zxyw
if_nz r1.x
  ishl r2.xy, r1.yzyy, l(8, 8, 0, 0)
  and r2.xy, r2.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r3.xy, r1.yzyy, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r1.yz, r2.xxyx, r3.xxyx
endif 
if_nz r1.w
  ushr r2.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r2.xxyx
endif 
store_uav_typed U0[0].xyzw, r0.xxxx, r1.yzyy
iadd r1.yz, r0.xxxx, l(0, 1, 2, 0)
ld r2.xy, r2.wwww, T0[0].xyzw
if_nz r1.x
  ishl r2.zw, r2.xxxy, l(0, 0, 8, 8)
  and r2.zw, r2.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r3.xy, r2.xyxx, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r2.xy, r2.zwzz, r3.xyxx
endif 
if_nz r1.w
  ushr r2.zw, r2.xxxy, l(0, 0, 16, 16)
  bfi r2.xy, l(16, 16, 0, 0), l(16, 16, 0, 0), r2.xyxx, r2.zwzz
endif 
store_uav_typed U0[0].xyzw, r1.yyyy, r2.xyxx
iadd r2.xyzw, r0.wwww, l(5, 6, 7, 8)
ld r3.xy, r2.xxxx, T0[0].xyzw
if_nz r1.x
  ishl r3.zw, r3.xxxy, l(0, 0, 8, 8)
  and r3.zw, r3.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r4.xy, r3.xyxx, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r3.xy, r3.zwzz, r4.xyxx
endif 
if_nz r1.w
  ushr r3.zw, r3.xxxy, l(0, 0, 16, 16)
  bfi r3.xy, l(16, 16, 0, 0), l(16, 16, 0, 0), r3.xyxx, r3.zwzz
endif 
store_uav_typed U0[0].xyzw, r1.zzzz, r3.xyxx
iadd r0.x, r0.z, r0.x
ld r1.yz, r2.yyyy, T0[0].zxyw
if_nz r1.x
  ishl r2.xy, r1.yzyy, l(8, 8, 0, 0)
  and r2.xy, r2.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r3.xy, r1.yzyy, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r1.yz, r2.xxyx, r3.xxyx
endif 
if_nz r1.w
  ushr r2.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r2.xxyx
endif 
store_uav_typed U0[0].xyzw, r0.xxxx, r1.yzyy
iadd r1.yz, r0.xxxx, l(0, 1, 2, 0)
ld r2.xy, r2.zzzz, T0[0].xyzw
if_nz r1.x
  ishl r3.xy, r2.xyxx, l(8, 8, 0, 0)
  ushr r3.zw, r2.xxxy, l(0, 0, 8, 8)
  and r3.xyzw, r3.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r2.xy, r3.zwzz, r3.xyxx
endif 
if_nz r1.w
  ushr r3.xy, r2.xyxx, l(16, 16, 0, 0)
  bfi r2.xy, l(16, 16, 0, 0), l(16, 16, 0, 0), r2.xyxx, r3.xyxx
endif 
store_uav_typed U0[0].xyzw, r1.yyyy, r2.xyxx
ld r2.xy, r2.wwww, T0[0].xyzw
if_nz r1.x
  ishl r2.zw, r2.xxxy, l(0, 0, 8, 8)
  and r2.zw, r2.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r3.xy, r2.xyxx, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r2.xy, r2.zwzz, r3.xyxx
endif 
if_nz r1.w
  ushr r2.zw, r2.xxxy, l(0, 0, 16, 16)
  bfi r2.xy, l(16, 16, 0, 0), l(16, 16, 0, 0), r2.xyxx, r2.zwzz
endif 
store_uav_typed U0[0].xyzw, r1.zzzz, r2.xyxx
iadd r2.xyz, r0.yyyy, l(9, 10, 11, 0)
iadd r3.xyzw, r0.wwww, l(9, 10, 11, 12)
ld r1.yz, r3.xxxx, T0[0].zxyw
if_nz r1.x
  ishl r4.xy, r1.yzyy, l(8, 8, 0, 0)
  ushr r4.zw, r1.yyyz, l(0, 0, 8, 8)
  and r4.xyzw, r4.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r1.yz, r4.zzwz, r4.xxyx
endif 
if_nz r1.w
  ushr r4.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r4.xxyx
endif 
store_uav_typed U0[0].xyzw, r2.xxxx, r1.yzyy
ld r1.yz, r3.yyyy, T0[0].zxyw
if_nz r1.x
  ishl r3.xy, r1.yzyy, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r4.xy, r1.yzyy, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r1.yz, r3.xxyx, r4.xxyx
endif 
if_nz r1.w
  ushr r3.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r3.xxyx
endif 
store_uav_typed U0[0].xyzw, r2.yyyy, r1.yzyy
ld r1.yz, r3.zzzz, T0[0].zxyw
if_nz r1.x
  ishl r2.yw, r1.yyyz, l(0, 8, 0, 8)
  and r2.yw, r2.yyyw, l(0, 0xff00ff00, 0, 0xff00ff00)
  ushr r3.xy, r1.yzyy, l(8, 8, 0, 0)
  and r3.xy, r3.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r1.yz, r2.yywy, r3.xxyx
endif 
if_nz r1.w
  ushr r2.yw, r1.yyyz, l(0, 16, 0, 16)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r2.yywy
endif 
store_uav_typed U0[0].xyzw, r2.zzzz, r1.yzyy
iadd r0.x, r0.z, r2.x
ld r1.yz, r3.wwww, T0[0].zxyw
if_nz r1.x
  ishl r2.xy, r1.yzyy, l(8, 8, 0, 0)
  ushr r2.zw, r1.yyyz, l(0, 0, 8, 8)
  and r2.xyzw, r2.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r1.yz, r2.zzwz, r2.xxyx
endif 
if_nz r1.w
  ushr r2.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r2.xxyx
endif 
store_uav_typed U0[0].xyzw, r0.xxxx, r1.yzyy
iadd r1.yz, r0.xxxx, l(0, 1, 2, 0)
iadd r2.xyzw, r0.wwww, l(13, 14, 15, 16)
ld r3.xy, r2.xxxx, T0[0].xyzw
if_nz r1.x
  ishl r3.zw, r3.xxxy, l(0, 0, 8, 8)
  and r3.zw, r3.zzzw, l(0, 0, 0xff00ff00, 0xff00ff00)
  ushr r4.xy, r3.xyxx, l(8, 8, 0, 0)
  and r4.xy, r4.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r3.xy, r3.zwzz, r4.xyxx
endif 
if_nz r1.w
  ushr r3.zw, r3.xxxy, l(0, 0, 16, 16)
  bfi r3.xy, l(16, 16, 0, 0), l(16, 16, 0, 0), r3.xyxx, r3.zwzz
endif 
store_uav_typed U0[0].xyzw, r1.yyyy, r3.xyxx
ld r2.xy, r2.yyyy, T0[0].xyzw
if_nz r1.x
  ishl r3.xy, r2.xyxx, l(8, 8, 0, 0)
  ushr r3.zw, r2.xxxy, l(0, 0, 8, 8)
  and r3.xyzw, r3.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r2.xy, r3.zwzz, r3.xyxx
endif 
if_nz r1.w
  ushr r3.xy, r2.xyxx, l(16, 16, 0, 0)
  bfi r2.xy, l(16, 16, 0, 0), l(16, 16, 0, 0), r2.xyxx, r3.xyxx
endif 
store_uav_typed U0[0].xyzw, r1.zzzz, r2.xyxx
iadd r0.x, r0.z, r0.x
ld r0.yz, r2.zzzz, T0[0].zxyw
if_nz r1.x
  ishl r1.yz, r0.yyzy, l(0, 8, 8, 0)
  and r1.yz, r1.yyzy, l(0, 0xff00ff00, 0xff00ff00, 0)
  ushr r2.xy, r0.yzyy, l(8, 8, 0, 0)
  and r2.xy, r2.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r0.yz, r1.yyzy, r2.xxyx
endif 
if_nz r1.w
  ushr r1.yz, r0.yyzy, l(0, 16, 16, 0)
  bfi r0.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r0.yyzy, r1.yyzy
endif 
store_uav_typed U0[0].xyzw, r0.xxxx, r0.yzyy
iadd r0.yzw, r0.xxxw, l(0, 1, 2, 17)
ld r1.yz, r2.wwww, T0[0].zxyw
if_nz r1.x
  ishl r2.xy, r1.yzyy, l(8, 8, 0, 0)
  ushr r2.zw, r1.yyyz, l(0, 0, 8, 8)
  and r2.xyzw, r2.xyzw, l(0xff00ff00, 0xff00ff00, 0x00ff00ff, 0x00ff00ff)
  iadd r1.yz, r2.zzwz, r2.xxyx
endif 
if_nz r1.w
  ushr r2.xy, r1.yzyy, l(16, 16, 0, 0)
  bfi r1.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r1.yyzy, r2.xxyx
endif 
store_uav_typed U0[0].xyzw, r0.yyyy, r1.yzyy
ld r0.yw, r0.wwww, T0[0].zxwy
if_nz r1.x
  ishl r1.xy, r0.ywyy, l(8, 8, 0, 0)
  and r1.xy, r1.xyxx, l(0xff00ff00, 0xff00ff00, 0, 0)
  ushr r2.xy, r0.ywyy, l(8, 8, 0, 0)
  and r2.xy, r2.xyxx, l(0x00ff00ff, 0x00ff00ff, 0, 0)
  iadd r0.yw, r1.xxxy, r2.xxxy
endif 
if_nz r1.w
  ushr r1.xy, r0.ywyy, l(16, 16, 0, 0)
  bfi r0.yw, l(0, 16, 0, 16), l(0, 16, 0, 16), r0.yyyw, r1.xxxy
endif 
store_uav_typed U0[0].xyzw, r0.zzzz, r0.ywyy
ret 
// Approximately 570 instruction slots used
