//
// 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   uint4         buf      T0             t0      1 
// xe_texture_load_dest                  UAV   uint4         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 4, 32, 1
ishl r0.x, vThreadID.x, l(3)
mov r0.yz, vThreadID.yyzy
uge r1.xyz, r0.xyzx, CB0[0][1].xyzx
or r0.z, r1.y, r1.x
or r0.z, r1.z, r0.z
if_nz r0.z
  ret 
endif 
ishl r0.yz, r0.xxyx, l(0, 1, 1, 0)
ishl r0.w, CB0[0][1].y, l(1)
ishl r0.y, r0.y, l(3)
imad r0.z, vThreadID.z, 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(4)
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(2, 0, 0, 0), vThreadID.xxxx
    imad r1.x, r1.x, r2.y, r2.x
    ishl r1.w, vThreadID.y, l(10)
    ishr r1.w, r1.w, l(6)
    and r1.w, r1.w, l(96)
    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(20, 0, 20, 0), l(10, 0, 13, 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(8, 0, 11, 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, 2, 0, 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(5, 0, 7, 0)
    and r2.xz, r2.xxzx, l(448, 0, 2048, 0)
    bfi r1.w, l(23), l(9), r1.y, r2.x
    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(23, 23, 0, 0), l(12, 11, 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(2)
  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
ushr r0.xy, r0.xyxx, l(2, 4, 0, 0)
ushr r1.x, CB0[0][0].x, l(2)
ld r2.xyzw, r0.xxxx, T0[0].zwxy
ieq r1.xyz, r1.xxxx, l(1, 2, 3, 0)
or r1.xy, r1.yzyy, r1.xyxx
if_nz r1.x
  ishl r3.xyzw, r2.zwxy, l(8, 8, 8, 8)
  and r3.xyzw, r3.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r4.xyzw, r2.zwxy, l(8, 8, 8, 8)
  and r4.xyzw, r4.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r2.xyzw, r3.zwxy, r4.zwxy
endif 
if_nz r1.y
  ushr r3.xyzw, r2.zwxy, l(16, 16, 16, 16)
  bfi r2.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r2.xyzw, r3.zwxy
  mov r3.xy, r2.zwzz
else 
  mov r3.xy, r2.zwzz
endif 
ushr r4.xyzw, r3.xyxy, l(22, 22, 1, 1)
mov r3.zw, r4.xxxy
bfi r5.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r3.xzyw, l(0, 0, 0, 0)
ubfe r6.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r3.xxyy
iadd r5.xyzw, r5.xyzw, r6.xyzw
ishl r1.zw, r3.xxxy, l(0, 0, 10, 10)
and r3.xy, r4.zwzz, l(0x001f0000, 0x001f0000, 0, 0)
bfi r1.zw, l(0, 0, 21, 21), l(0, 0, 0, 0), r3.xxxy, r1.zzzw
iadd r3.xz, r1.zzwz, r5.xxzx
iadd r3.yw, r5.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
ushr r4.xyzw, r2.xyxy, l(22, 22, 1, 1)
mov r2.zw, r4.xxxy
bfi r5.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r2.xzyw, l(0, 0, 0, 0)
ubfe r6.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r2.xxyy
iadd r5.xyzw, r5.xyzw, r6.xyzw
ishl r1.zw, r2.xxxy, l(0, 0, 10, 10)
and r2.xy, r4.zwzz, l(0x001f0000, 0x001f0000, 0, 0)
bfi r1.zw, l(0, 0, 21, 21), l(0, 0, 0, 0), r2.xxxy, r1.zzzw
iadd r2.xz, r1.zzwz, r5.xxzx
iadd r2.yw, r5.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
store_uav_typed U0[0].xyzw, r0.yyyy, r3.xyzw
iadd r1.z, r0.z, r0.y
store_uav_typed U0[0].xyzw, r1.zzzz, r2.xyzw
iadd r2.xyz, r0.xxxx, l(1, 2, 3, 0)
ld r3.xyzw, r2.xxxx, T0[0].zwxy
if_nz r1.x
  ishl r4.xyzw, r3.zwxy, l(8, 8, 8, 8)
  and r4.xyzw, r4.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r5.xyzw, r3.zwxy, l(8, 8, 8, 8)
  and r5.xyzw, r5.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r3.xyzw, r4.zwxy, r5.zwxy
endif 
if_nz r1.y
  ushr r4.xyzw, r3.zwxy, l(16, 16, 16, 16)
  bfi r3.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r3.xyzw, r4.zwxy
  mov r4.xy, r3.zwzz
else 
  mov r4.xy, r3.zwzz
endif 
ushr r5.xyzw, r4.xyxy, l(22, 22, 1, 1)
mov r4.zw, r5.xxxy
bfi r6.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r4.xzyw, l(0, 0, 0, 0)
ubfe r7.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r4.xxyy
iadd r6.xyzw, r6.xyzw, r7.xyzw
ishl r2.xw, r4.xxxy, l(10, 0, 0, 10)
and r4.xy, r5.zwzz, l(0x001f0000, 0x001f0000, 0, 0)
bfi r2.xw, l(21, 0, 0, 21), l(0, 0, 0, 0), r4.xxxy, r2.xxxw
iadd r4.xz, r2.xxwx, r6.xxzx
iadd r4.yw, r6.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
ushr r5.xyzw, r3.xyxy, l(22, 22, 1, 1)
mov r3.zw, r5.xxxy
bfi r6.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r3.xzyw, l(0, 0, 0, 0)
ubfe r7.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r3.xxyy
iadd r6.xyzw, r6.xyzw, r7.xyzw
ishl r2.xw, r3.xxxy, l(10, 0, 0, 10)
and r3.xy, r5.zwzz, l(0x001f0000, 0x001f0000, 0, 0)
bfi r2.xw, l(21, 0, 0, 21), l(0, 0, 0, 0), r3.xxxy, r2.xxxw
iadd r3.xz, r2.xxwx, r6.xxzx
iadd r3.yw, r6.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
iadd r5.xyzw, r0.yyyy, l(1, 2, 3, 4)
store_uav_typed U0[0].xyzw, r5.xxxx, r4.xyzw
iadd r1.z, r1.z, l(1)
store_uav_typed U0[0].xyzw, r1.zzzz, r3.xyzw
ld r3.xyzw, r2.yyyy, T0[0].zwxy
if_nz r1.x
  ishl r4.xyzw, r3.zwxy, l(8, 8, 8, 8)
  and r4.xyzw, r4.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r6.xyzw, r3.zwxy, l(8, 8, 8, 8)
  and r6.xyzw, r6.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r3.xyzw, r4.zwxy, r6.zwxy
endif 
if_nz r1.y
  ushr r4.xyzw, r3.zwxy, l(16, 16, 16, 16)
  bfi r3.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r3.xyzw, r4.zwxy
  mov r4.xy, r3.zwzz
else 
  mov r4.xy, r3.zwzz
endif 
ushr r6.xyzw, r4.xyxy, l(22, 22, 1, 1)
mov r4.zw, r6.xxxy
bfi r7.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r4.xzyw, l(0, 0, 0, 0)
ubfe r8.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r4.xxyy
iadd r7.xyzw, r7.xyzw, r8.xyzw
ishl r1.zw, r4.xxxy, l(0, 0, 10, 10)
and r2.xy, r6.zwzz, l(0x001f0000, 0x001f0000, 0, 0)
bfi r1.zw, l(0, 0, 21, 21), l(0, 0, 0, 0), r2.xxxy, r1.zzzw
iadd r4.xz, r1.zzwz, r7.xxzx
iadd r4.yw, r7.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
ushr r6.xyzw, r3.xyxy, l(22, 22, 1, 1)
mov r3.zw, r6.xxxy
bfi r7.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r3.xzyw, l(0, 0, 0, 0)
ubfe r8.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r3.xxyy
iadd r7.xyzw, r7.xyzw, r8.xyzw
ishl r1.zw, r3.xxxy, l(0, 0, 10, 10)
and r2.xy, r6.zwzz, l(0x001f0000, 0x001f0000, 0, 0)
bfi r1.zw, l(0, 0, 21, 21), l(0, 0, 0, 0), r2.xxxy, r1.zzzw
iadd r3.xz, r1.zzwz, r7.xxzx
iadd r3.yw, r7.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
store_uav_typed U0[0].xyzw, r5.yyyy, r4.xyzw
iadd r1.zw, r0.zzzz, r5.yyyw
store_uav_typed U0[0].xyzw, r1.zzzz, r3.xyzw
ld r2.xyzw, r2.zzzz, T0[0].zwxy
if_nz r1.x
  ishl r3.xyzw, r2.zwxy, l(8, 8, 8, 8)
  and r3.xyzw, r3.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r4.xyzw, r2.zwxy, l(8, 8, 8, 8)
  and r4.xyzw, r4.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r2.xyzw, r3.zwxy, r4.zwxy
endif 
if_nz r1.y
  ushr r3.xyzw, r2.zwxy, l(16, 16, 16, 16)
  bfi r2.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r2.xyzw, r3.zwxy
  mov r3.xy, r2.zwzz
else 
  mov r3.xy, r2.zwzz
endif 
ushr r4.xyzw, r3.xyxy, l(22, 22, 1, 1)
mov r3.zw, r4.xxxy
bfi r6.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r3.xzyw, l(0, 0, 0, 0)
ubfe r7.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r3.xxyy
iadd r6.xyzw, r6.xyzw, r7.xyzw
ishl r3.xy, r3.xyxx, l(10, 10, 0, 0)
and r3.zw, r4.zzzw, l(0, 0, 0x001f0000, 0x001f0000)
bfi r3.xy, l(21, 21, 0, 0), l(0, 0, 0, 0), r3.zwzz, r3.xyxx
iadd r3.xz, r3.xxyx, r6.xxzx
iadd r3.yw, r6.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
ushr r4.xyzw, r2.xyxy, l(22, 22, 1, 1)
mov r2.zw, r4.xxxy
bfi r6.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r2.xzyw, l(0, 0, 0, 0)
ubfe r7.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r2.xxyy
iadd r6.xyzw, r6.xyzw, r7.xyzw
ishl r2.xy, r2.xyxx, l(10, 10, 0, 0)
and r2.zw, r4.zzzw, l(0, 0, 0x001f0000, 0x001f0000)
bfi r2.xy, l(21, 21, 0, 0), l(0, 0, 0, 0), r2.zwzz, r2.xyxx
iadd r2.xz, r2.xxyx, r6.xxzx
iadd r2.yw, r6.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
store_uav_typed U0[0].xyzw, r5.zzzz, r3.xyzw
iadd r3.xy, r1.zwzz, l(1, 1, 0, 0)
store_uav_typed U0[0].xyzw, r3.xxxx, r2.xyzw
if_nz r0.w
  iadd r0.w, r0.x, l(8)
else 
  iadd r0.w, r0.x, l(4)
endif 
ld r2.xyzw, r0.wwww, T0[0].zwxy
if_nz r1.x
  ishl r4.xyzw, r2.zwxy, l(8, 8, 8, 8)
  and r4.xyzw, r4.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r6.xyzw, r2.zwxy, l(8, 8, 8, 8)
  and r6.xyzw, r6.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r2.xyzw, r4.zwxy, r6.zwxy
endif 
if_nz r1.y
  ushr r4.xyzw, r2.zwxy, l(16, 16, 16, 16)
  bfi r2.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r2.xyzw, r4.zwxy
  mov r4.xy, r2.zwzz
else 
  mov r4.xy, r2.zwzz
endif 
ushr r6.xyzw, r4.xyxy, l(22, 22, 1, 1)
mov r4.zw, r6.xxxy
bfi r7.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r4.xzyw, l(0, 0, 0, 0)
ubfe r8.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r4.xxyy
iadd r7.xyzw, r7.xyzw, r8.xyzw
ishl r3.xz, r4.xxyx, l(10, 0, 10, 0)
and r4.xy, r6.zwzz, l(0x001f0000, 0x001f0000, 0, 0)
bfi r3.xz, l(21, 0, 21, 0), l(0, 0, 0, 0), r4.xxyx, r3.xxzx
iadd r4.xz, r3.xxzx, r7.xxzx
iadd r4.yw, r7.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
ushr r6.xyzw, r2.xyxy, l(22, 22, 1, 1)
mov r2.zw, r6.xxxy
bfi r7.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r2.xzyw, l(0, 0, 0, 0)
ubfe r8.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r2.xxyy
iadd r7.xyzw, r7.xyzw, r8.xyzw
ishl r2.xy, r2.xyxx, l(10, 10, 0, 0)
and r2.zw, r6.zzzw, l(0, 0, 0x001f0000, 0x001f0000)
bfi r2.xy, l(21, 21, 0, 0), l(0, 0, 0, 0), r2.zwzz, r2.xyxx
iadd r2.xz, r2.xxyx, r7.xxzx
iadd r2.yw, r7.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
store_uav_typed U0[0].xyzw, r5.wwww, r4.xyzw
store_uav_typed U0[0].xyzw, r1.wwww, r2.xyzw
iadd r2.xyz, r0.wwww, l(1, 2, 3, 0)
ld r4.xyzw, r2.xxxx, T0[0].zwxy
if_nz r1.x
  ishl r5.xyzw, r4.zwxy, l(8, 8, 8, 8)
  and r5.xyzw, r5.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r6.xyzw, r4.zwxy, l(8, 8, 8, 8)
  and r6.xyzw, r6.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r4.xyzw, r5.zwxy, r6.zwxy
endif 
if_nz r1.y
  ushr r5.xyzw, r4.zwxy, l(16, 16, 16, 16)
  bfi r4.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r4.xyzw, r5.zwxy
  mov r5.xy, r4.zwzz
else 
  mov r5.xy, r4.zwzz
endif 
ushr r6.xyzw, r5.xyxy, l(22, 22, 1, 1)
mov r5.zw, r6.xxxy
bfi r7.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r5.xzyw, l(0, 0, 0, 0)
ubfe r8.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r5.xxyy
iadd r7.xyzw, r7.xyzw, r8.xyzw
ishl r0.xw, r5.xxxy, l(10, 0, 0, 10)
and r1.zw, r6.zzzw, l(0, 0, 0x001f0000, 0x001f0000)
bfi r0.xw, l(21, 0, 0, 21), l(0, 0, 0, 0), r1.zzzw, r0.xxxw
iadd r5.xz, r0.xxwx, r7.xxzx
iadd r5.yw, r7.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
ushr r6.xyzw, r4.xyxy, l(22, 22, 1, 1)
mov r4.zw, r6.xxxy
bfi r7.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r4.xzyw, l(0, 0, 0, 0)
ubfe r8.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r4.xxyy
iadd r7.xyzw, r7.xyzw, r8.xyzw
ishl r0.xw, r4.xxxy, l(10, 0, 0, 10)
and r1.zw, r6.zzzw, l(0, 0, 0x001f0000, 0x001f0000)
bfi r0.xw, l(21, 0, 0, 21), l(0, 0, 0, 0), r1.zzzw, r0.xxxw
iadd r4.xz, r0.xxwx, r7.xxzx
iadd r4.yw, r7.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
iadd r0.xyw, r0.yyyy, l(5, 6, 0, 7)
store_uav_typed U0[0].xyzw, r0.xxxx, r5.xyzw
store_uav_typed U0[0].xyzw, r3.yyyy, r4.xyzw
ld r3.xyzw, r2.yyyy, T0[0].zwxy
if_nz r1.x
  ishl r4.xyzw, r3.zwxy, l(8, 8, 8, 8)
  and r4.xyzw, r4.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r5.xyzw, r3.zwxy, l(8, 8, 8, 8)
  and r5.xyzw, r5.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r3.xyzw, r4.zwxy, r5.zwxy
endif 
if_nz r1.y
  ushr r4.xyzw, r3.zwxy, l(16, 16, 16, 16)
  bfi r3.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r3.xyzw, r4.zwxy
  mov r4.xy, r3.zwzz
else 
  mov r4.xy, r3.zwzz
endif 
ushr r5.xyzw, r4.xyxy, l(22, 22, 1, 1)
mov r4.zw, r5.xxxy
bfi r6.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r4.xzyw, l(0, 0, 0, 0)
ubfe r7.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r4.xxyy
iadd r6.xyzw, r6.xyzw, r7.xyzw
ishl r1.zw, r4.xxxy, l(0, 0, 10, 10)
and r2.xy, r5.zwzz, l(0x001f0000, 0x001f0000, 0, 0)
bfi r1.zw, l(0, 0, 21, 21), l(0, 0, 0, 0), r2.xxxy, r1.zzzw
iadd r4.xz, r1.zzwz, r6.xxzx
iadd r4.yw, r6.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
ushr r5.xyzw, r3.xyxy, l(22, 22, 1, 1)
mov r3.zw, r5.xxxy
bfi r6.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r3.xzyw, l(0, 0, 0, 0)
ubfe r7.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r3.xxyy
iadd r6.xyzw, r6.xyzw, r7.xyzw
ishl r1.zw, r3.xxxy, l(0, 0, 10, 10)
and r2.xy, r5.zwzz, l(0x001f0000, 0x001f0000, 0, 0)
bfi r1.zw, l(0, 0, 21, 21), l(0, 0, 0, 0), r2.xxxy, r1.zzzw
iadd r3.xz, r1.zzwz, r6.xxzx
iadd r3.yw, r6.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
store_uav_typed U0[0].xyzw, r0.yyyy, r4.xyzw
iadd r0.x, r0.z, r0.y
store_uav_typed U0[0].xyzw, r0.xxxx, r3.xyzw
ld r2.xyzw, r2.zzzz, T0[0].zwxy
if_nz r1.x
  ishl r3.xyzw, r2.zwxy, l(8, 8, 8, 8)
  and r3.xyzw, r3.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r4.xyzw, r2.zwxy, l(8, 8, 8, 8)
  and r4.xyzw, r4.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r2.xyzw, r3.zwxy, r4.zwxy
endif 
if_nz r1.y
  ushr r1.xyzw, r2.zwxy, l(16, 16, 16, 16)
  bfi r2.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r2.xyzw, r1.zwxy
  mov r1.xy, r2.zwzz
else 
  mov r1.xy, r2.zwzz
endif 
ushr r3.xyzw, r1.xyxy, l(22, 22, 1, 1)
mov r1.zw, r3.xxxy
bfi r4.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r1.xzyw, l(0, 0, 0, 0)
ubfe r5.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r1.xxyy
iadd r4.xyzw, r4.xyzw, r5.xyzw
ishl r0.yz, r1.xxyx, l(0, 10, 10, 0)
and r1.xy, r3.zwzz, l(0x001f0000, 0x001f0000, 0, 0)
bfi r0.yz, l(0, 21, 21, 0), l(0, 0, 0, 0), r1.xxyx, r0.yyzy
iadd r1.xz, r0.yyzy, r4.xxzx
iadd r1.yw, r4.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
ushr r3.xyzw, r2.xyxy, l(22, 22, 1, 1)
mov r2.zw, r3.xxxy
bfi r4.xyzw, l(11, 26, 11, 26), l(5, 6, 5, 6), r2.xzyw, l(0, 0, 0, 0)
ubfe r5.xyzw, l(5, 6, 5, 6), l(6, 26, 6, 26), r2.xxyy
iadd r4.xyzw, r4.xyzw, r5.xyzw
ishl r0.yz, r2.xxyx, l(0, 10, 10, 0)
and r2.xy, r3.zwzz, l(0x001f0000, 0x001f0000, 0, 0)
bfi r0.yz, l(0, 21, 21, 0), l(0, 0, 0, 0), r2.xxyx, r0.yyzy
iadd r2.xz, r0.yyzy, r4.xxzx
iadd r2.yw, r4.yyyw, l(0, 0xffff0000, 0, 0xffff0000)
store_uav_typed U0[0].xyzw, r0.wwww, r1.xyzw
iadd r0.x, r0.x, l(1)
store_uav_typed U0[0].xyzw, r0.xxxx, r2.xyzw
ret 
// Approximately 388 instruction slots used
