//
// 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 8
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].xyzw
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.xyzw, l(8, 8, 8, 8)
  and r3.xyzw, r3.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r4.xyzw, r2.xyzw, l(8, 8, 8, 8)
  and r4.xyzw, r4.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r2.xyzw, r3.xyzw, r4.xyzw
endif 
if_nz r1.y
  ushr r3.xyzw, r2.xyzw, l(16, 16, 16, 16)
  bfi r2.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r2.xyzw, r3.xyzw
endif 
and r1.zw, r2.xxxy, l(0, 0, 1023, 1023)
ubfe r3.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r2.xyxy
ieq r4.xy, r1.zwzz, l(512, 512, 0, 0)
movc r1.zw, r4.xxxy, l(0,0,513,513), r1.zzzw
movc r4.xyzw, r3.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r1.zw, r1.zzzw, r4.xxxy
iadd r1.zw, r3.xxxy, r1.zzzw
ishl r4.xy, r1.zwzz, l(6, 6, 0, 0)
ushr r1.zw, r1.zzzw, l(0, 0, 3, 3)
or r1.zw, r1.zzzw, r4.xxxy
xor r1.zw, r4.zzzw, r1.zzzw
iadd r1.zw, r3.xxxy, r1.zzzw
ubfe r3.xy, l(1, 1, 0, 0), l(20, 20, 0, 0), r2.xyxx
ieq r4.xy, r3.zwzz, l(1024, 1024, 0, 0)
movc r3.zw, r4.xxxy, l(0,0,1025,1025), r3.zzzw
movc r4.xyzw, r3.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r3.zw, r3.zzzw, r4.xxxy
iadd r3.zw, r3.xxxy, r3.zzzw
ishl r4.xy, r3.zwzz, l(5, 5, 0, 0)
ushr r3.zw, r3.zzzw, l(0, 0, 5, 5)
or r3.zw, r3.zzzw, r4.xxxy
xor r3.zw, r4.zzzw, r3.zzzw
iadd r3.xy, r3.xyxx, r3.zwzz
ishl r3.xy, r3.xyxx, l(16, 16, 0, 0)
or r3.xz, r1.zzwz, r3.xxyx
ushr r1.zw, r2.xxxy, l(0, 0, 21, 21)
ushr r2.xy, r1.zwzz, l(10, 10, 0, 0)
ieq r4.xy, r1.zwzz, l(1024, 1024, 0, 0)
movc r1.zw, r4.xxxy, l(0,0,1025,1025), r1.zzzw
movc r4.xyzw, r2.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r1.zw, r1.zzzw, r4.xxxy
iadd r1.zw, r2.xxxy, r1.zzzw
ishl r4.xy, r1.zwzz, l(5, 5, 0, 0)
ushr r1.zw, r1.zzzw, l(0, 0, 5, 5)
or r1.zw, r1.zzzw, r4.xxxy
xor r1.zw, r4.zzzw, r1.zzzw
iadd r1.zw, r2.xxxy, r1.zzzw
or r3.yw, r1.zzzw, l(0, 0x7fff0000, 0, 0x7fff0000)
and r1.zw, r2.zzzw, l(0, 0, 1023, 1023)
ubfe r4.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r2.zwzw
ieq r2.xy, r1.zwzz, l(512, 512, 0, 0)
movc r1.zw, r2.xxxy, l(0,0,513,513), r1.zzzw
movc r5.xyzw, r4.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r1.zw, r1.zzzw, r5.xxxy
iadd r1.zw, r4.xxxy, r1.zzzw
ishl r2.xy, r1.zwzz, l(6, 6, 0, 0)
ushr r1.zw, r1.zzzw, l(0, 0, 3, 3)
or r1.zw, r1.zzzw, r2.xxxy
xor r1.zw, r5.zzzw, r1.zzzw
iadd r1.zw, r4.xxxy, r1.zzzw
ubfe r2.xy, l(1, 1, 0, 0), l(20, 20, 0, 0), r2.zwzz
ieq r4.xy, r4.zwzz, l(1024, 1024, 0, 0)
movc r4.xy, r4.xyxx, l(1025,1025,0,0), r4.zwzz
movc r5.xyzw, r2.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r4.xy, r4.xyxx, r5.xyxx
iadd r4.xy, r2.xyxx, r4.xyxx
ishl r4.zw, r4.xxxy, l(0, 0, 5, 5)
ushr r4.xy, r4.xyxx, l(5, 5, 0, 0)
or r4.xy, r4.xyxx, r4.zwzz
xor r4.xy, r5.zwzz, r4.xyxx
iadd r2.xy, r2.xyxx, r4.xyxx
ishl r2.xy, r2.xyxx, l(16, 16, 0, 0)
or r4.xz, r1.zzwz, r2.xxyx
ushr r1.zw, r2.zzzw, l(0, 0, 21, 21)
ushr r2.xy, r1.zwzz, l(10, 10, 0, 0)
ieq r2.zw, r1.zzzw, l(0, 0, 1024, 1024)
movc r1.zw, r2.zzzw, l(0,0,1025,1025), r1.zzzw
movc r5.xyzw, r2.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r1.zw, r1.zzzw, r5.xxxy
iadd r1.zw, r2.xxxy, r1.zzzw
ishl r2.zw, r1.zzzw, l(0, 0, 5, 5)
ushr r1.zw, r1.zzzw, l(0, 0, 5, 5)
or r1.zw, r1.zzzw, r2.zzzw
xor r1.zw, r5.zzzw, r1.zzzw
iadd r1.zw, r2.xxxy, r1.zzzw
or r4.yw, r1.zzzw, l(0, 0x7fff0000, 0, 0x7fff0000)
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, r4.xyzw
iadd r2.xyz, r0.xxxx, l(1, 2, 3, 0)
ld r3.xyzw, r2.xxxx, T0[0].xyzw
if_nz r1.x
  ishl r4.xyzw, r3.xyzw, l(8, 8, 8, 8)
  and r4.xyzw, r4.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r5.xyzw, r3.xyzw, l(8, 8, 8, 8)
  and r5.xyzw, r5.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r3.xyzw, r4.xyzw, r5.xyzw
endif 
if_nz r1.y
  ushr r4.xyzw, r3.xyzw, l(16, 16, 16, 16)
  bfi r3.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r3.xyzw, r4.xyzw
endif 
and r2.xw, r3.xxxy, l(1023, 0, 0, 1023)
ubfe r4.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r3.xyxy
ieq r5.xy, r2.xwxx, l(512, 512, 0, 0)
movc r2.xw, r5.xxxy, l(513,0,0,513), r2.xxxw
movc r5.xyzw, r4.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r2.xw, r2.xxxw, r5.xxxy
iadd r2.xw, r4.xxxy, r2.xxxw
ishl r5.xy, r2.xwxx, l(6, 6, 0, 0)
ushr r2.xw, r2.xxxw, l(3, 0, 0, 3)
or r2.xw, r2.xxxw, r5.xxxy
xor r2.xw, r5.zzzw, r2.xxxw
iadd r2.xw, r4.xxxy, r2.xxxw
ubfe r4.xy, l(1, 1, 0, 0), l(20, 20, 0, 0), r3.xyxx
ieq r5.xy, r4.zwzz, l(1024, 1024, 0, 0)
movc r4.zw, r5.xxxy, l(0,0,1025,1025), r4.zzzw
movc r5.xyzw, r4.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r4.zw, r4.zzzw, r5.xxxy
iadd r4.zw, r4.xxxy, r4.zzzw
ishl r5.xy, r4.zwzz, l(5, 5, 0, 0)
ushr r4.zw, r4.zzzw, l(0, 0, 5, 5)
or r4.zw, r4.zzzw, r5.xxxy
xor r4.zw, r5.zzzw, r4.zzzw
iadd r4.xy, r4.xyxx, r4.zwzz
ishl r4.xy, r4.xyxx, l(16, 16, 0, 0)
or r4.xz, r2.xxwx, r4.xxyx
ushr r2.xw, r3.xxxy, l(21, 0, 0, 21)
ushr r3.xy, r2.xwxx, l(10, 10, 0, 0)
ieq r5.xy, r2.xwxx, l(1024, 1024, 0, 0)
movc r2.xw, r5.xxxy, l(1025,0,0,1025), r2.xxxw
movc r5.xyzw, r3.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r2.xw, r2.xxxw, r5.xxxy
iadd r2.xw, r3.xxxy, r2.xxxw
ishl r5.xy, r2.xwxx, l(5, 5, 0, 0)
ushr r2.xw, r2.xxxw, l(5, 0, 0, 5)
or r2.xw, r2.xxxw, r5.xxxy
xor r2.xw, r5.zzzw, r2.xxxw
iadd r2.xw, r3.xxxy, r2.xxxw
or r4.yw, r2.xxxw, l(0, 0x7fff0000, 0, 0x7fff0000)
and r2.xw, r3.zzzw, l(1023, 0, 0, 1023)
ubfe r5.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r3.zwzw
ieq r3.xy, r2.xwxx, l(512, 512, 0, 0)
movc r2.xw, r3.xxxy, l(513,0,0,513), r2.xxxw
movc r6.xyzw, r5.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r2.xw, r2.xxxw, r6.xxxy
iadd r2.xw, r5.xxxy, r2.xxxw
ishl r3.xy, r2.xwxx, l(6, 6, 0, 0)
ushr r2.xw, r2.xxxw, l(3, 0, 0, 3)
or r2.xw, r2.xxxw, r3.xxxy
xor r2.xw, r6.zzzw, r2.xxxw
iadd r2.xw, r5.xxxy, r2.xxxw
ubfe r3.xy, l(1, 1, 0, 0), l(20, 20, 0, 0), r3.zwzz
ieq r5.xy, r5.zwzz, l(1024, 1024, 0, 0)
movc r5.xy, r5.xyxx, l(1025,1025,0,0), r5.zwzz
movc r6.xyzw, r3.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r5.xy, r5.xyxx, r6.xyxx
iadd r5.xy, r3.xyxx, r5.xyxx
ishl r5.zw, r5.xxxy, l(0, 0, 5, 5)
ushr r5.xy, r5.xyxx, l(5, 5, 0, 0)
or r5.xy, r5.xyxx, r5.zwzz
xor r5.xy, r6.zwzz, r5.xyxx
iadd r3.xy, r3.xyxx, r5.xyxx
ishl r3.xy, r3.xyxx, l(16, 16, 0, 0)
or r5.xz, r2.xxwx, r3.xxyx
ushr r2.xw, r3.zzzw, l(21, 0, 0, 21)
ushr r3.xy, r2.xwxx, l(10, 10, 0, 0)
ieq r3.zw, r2.xxxw, l(0, 0, 1024, 1024)
movc r2.xw, r3.zzzw, l(1025,0,0,1025), r2.xxxw
movc r6.xyzw, r3.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r2.xw, r2.xxxw, r6.xxxy
iadd r2.xw, r3.xxxy, r2.xxxw
ishl r3.zw, r2.xxxw, l(0, 0, 5, 5)
ushr r2.xw, r2.xxxw, l(5, 0, 0, 5)
or r2.xw, r2.xxxw, r3.zzzw
xor r2.xw, r6.zzzw, r2.xxxw
iadd r2.xw, r3.xxxy, r2.xxxw
or r5.yw, r2.xxxw, l(0, 0x7fff0000, 0, 0x7fff0000)
iadd r3.xyzw, r0.yyyy, l(1, 2, 3, 4)
store_uav_typed U0[0].xyzw, r3.xxxx, r4.xyzw
iadd r1.z, r1.z, l(1)
store_uav_typed U0[0].xyzw, r1.zzzz, r5.xyzw
ld r4.xyzw, r2.yyyy, T0[0].xyzw
if_nz r1.x
  ishl r5.xyzw, r4.xyzw, l(8, 8, 8, 8)
  and r5.xyzw, r5.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r6.xyzw, r4.xyzw, l(8, 8, 8, 8)
  and r6.xyzw, r6.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r4.xyzw, r5.xyzw, r6.xyzw
endif 
if_nz r1.y
  ushr r5.xyzw, r4.xyzw, l(16, 16, 16, 16)
  bfi r4.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r4.xyzw, r5.xyzw
endif 
and r1.zw, r4.xxxy, l(0, 0, 1023, 1023)
ubfe r5.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r4.xyxy
ieq r2.xy, r1.zwzz, l(512, 512, 0, 0)
movc r1.zw, r2.xxxy, l(0,0,513,513), r1.zzzw
movc r6.xyzw, r5.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r1.zw, r1.zzzw, r6.xxxy
iadd r1.zw, r5.xxxy, r1.zzzw
ishl r2.xy, r1.zwzz, l(6, 6, 0, 0)
ushr r1.zw, r1.zzzw, l(0, 0, 3, 3)
or r1.zw, r1.zzzw, r2.xxxy
xor r1.zw, r6.zzzw, r1.zzzw
iadd r1.zw, r5.xxxy, r1.zzzw
ubfe r2.xy, l(1, 1, 0, 0), l(20, 20, 0, 0), r4.xyxx
ieq r5.xy, r5.zwzz, l(1024, 1024, 0, 0)
movc r5.xy, r5.xyxx, l(1025,1025,0,0), r5.zwzz
movc r6.xyzw, r2.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r5.xy, r5.xyxx, r6.xyxx
iadd r5.xy, r2.xyxx, r5.xyxx
ishl r5.zw, r5.xxxy, l(0, 0, 5, 5)
ushr r5.xy, r5.xyxx, l(5, 5, 0, 0)
or r5.xy, r5.xyxx, r5.zwzz
xor r5.xy, r6.zwzz, r5.xyxx
iadd r2.xy, r2.xyxx, r5.xyxx
ishl r2.xy, r2.xyxx, l(16, 16, 0, 0)
or r5.xz, r1.zzwz, r2.xxyx
ushr r1.zw, r4.xxxy, l(0, 0, 21, 21)
ushr r2.xy, r1.zwzz, l(10, 10, 0, 0)
ieq r4.xy, r1.zwzz, l(1024, 1024, 0, 0)
movc r1.zw, r4.xxxy, l(0,0,1025,1025), r1.zzzw
movc r6.xyzw, r2.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r1.zw, r1.zzzw, r6.xxxy
iadd r1.zw, r2.xxxy, r1.zzzw
ishl r4.xy, r1.zwzz, l(5, 5, 0, 0)
ushr r1.zw, r1.zzzw, l(0, 0, 5, 5)
or r1.zw, r1.zzzw, r4.xxxy
xor r1.zw, r6.zzzw, r1.zzzw
iadd r1.zw, r2.xxxy, r1.zzzw
or r5.yw, r1.zzzw, l(0, 0x7fff0000, 0, 0x7fff0000)
and r1.zw, r4.zzzw, l(0, 0, 1023, 1023)
ubfe r6.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r4.zwzw
ieq r2.xy, r1.zwzz, l(512, 512, 0, 0)
movc r1.zw, r2.xxxy, l(0,0,513,513), r1.zzzw
movc r7.xyzw, r6.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r1.zw, r1.zzzw, r7.xxxy
iadd r1.zw, r6.xxxy, r1.zzzw
ishl r2.xy, r1.zwzz, l(6, 6, 0, 0)
ushr r1.zw, r1.zzzw, l(0, 0, 3, 3)
or r1.zw, r1.zzzw, r2.xxxy
xor r1.zw, r7.zzzw, r1.zzzw
iadd r1.zw, r6.xxxy, r1.zzzw
ubfe r2.xy, l(1, 1, 0, 0), l(20, 20, 0, 0), r4.zwzz
ieq r4.xy, r6.zwzz, l(1024, 1024, 0, 0)
movc r4.xy, r4.xyxx, l(1025,1025,0,0), r6.zwzz
movc r6.xyzw, r2.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r4.xy, r4.xyxx, r6.xyxx
iadd r4.xy, r2.xyxx, r4.xyxx
ishl r6.xy, r4.xyxx, l(5, 5, 0, 0)
ushr r4.xy, r4.xyxx, l(5, 5, 0, 0)
or r4.xy, r4.xyxx, r6.xyxx
xor r4.xy, r6.zwzz, r4.xyxx
iadd r2.xy, r2.xyxx, r4.xyxx
ishl r2.xy, r2.xyxx, l(16, 16, 0, 0)
or r6.xz, r1.zzwz, r2.xxyx
ushr r1.zw, r4.zzzw, l(0, 0, 21, 21)
ushr r2.xy, r1.zwzz, l(10, 10, 0, 0)
ieq r4.xy, r1.zwzz, l(1024, 1024, 0, 0)
movc r1.zw, r4.xxxy, l(0,0,1025,1025), r1.zzzw
movc r4.xyzw, r2.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r1.zw, r1.zzzw, r4.xxxy
iadd r1.zw, r2.xxxy, r1.zzzw
ishl r4.xy, r1.zwzz, l(5, 5, 0, 0)
ushr r1.zw, r1.zzzw, l(0, 0, 5, 5)
or r1.zw, r1.zzzw, r4.xxxy
xor r1.zw, r4.zzzw, r1.zzzw
iadd r1.zw, r2.xxxy, r1.zzzw
or r6.yw, r1.zzzw, l(0, 0x7fff0000, 0, 0x7fff0000)
store_uav_typed U0[0].xyzw, r3.yyyy, r5.xyzw
iadd r1.zw, r0.zzzz, r3.yyyw
store_uav_typed U0[0].xyzw, r1.zzzz, r6.xyzw
ld r2.xyzw, r2.zzzz, T0[0].xyzw
if_nz r1.x
  ishl r4.xyzw, r2.xyzw, l(8, 8, 8, 8)
  and r4.xyzw, r4.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r5.xyzw, r2.xyzw, l(8, 8, 8, 8)
  and r5.xyzw, r5.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r2.xyzw, r4.xyzw, r5.xyzw
endif 
if_nz r1.y
  ushr r4.xyzw, r2.xyzw, l(16, 16, 16, 16)
  bfi r2.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r2.xyzw, r4.xyzw
endif 
and r3.xy, r2.xyxx, l(1023, 1023, 0, 0)
ubfe r4.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r2.xyxy
ieq r5.xy, r3.xyxx, l(512, 512, 0, 0)
movc r3.xy, r5.xyxx, l(513,513,0,0), r3.xyxx
movc r5.xyzw, r4.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r3.xy, r3.xyxx, r5.xyxx
iadd r3.xy, r4.xyxx, r3.xyxx
ishl r5.xy, r3.xyxx, l(6, 6, 0, 0)
ushr r3.xy, r3.xyxx, l(3, 3, 0, 0)
or r3.xy, r3.xyxx, r5.xyxx
xor r3.xy, r5.zwzz, r3.xyxx
iadd r3.xy, r4.xyxx, r3.xyxx
ubfe r4.xy, l(1, 1, 0, 0), l(20, 20, 0, 0), r2.xyxx
ieq r5.xy, r4.zwzz, l(1024, 1024, 0, 0)
movc r4.zw, r5.xxxy, l(0,0,1025,1025), r4.zzzw
movc r5.xyzw, r4.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r4.zw, r4.zzzw, r5.xxxy
iadd r4.zw, r4.xxxy, r4.zzzw
ishl r5.xy, r4.zwzz, l(5, 5, 0, 0)
ushr r4.zw, r4.zzzw, l(0, 0, 5, 5)
or r4.zw, r4.zzzw, r5.xxxy
xor r4.zw, r5.zzzw, r4.zzzw
iadd r4.xy, r4.xyxx, r4.zwzz
ishl r4.xy, r4.xyxx, l(16, 16, 0, 0)
or r4.xz, r3.xxyx, r4.xxyx
ushr r2.xy, r2.xyxx, l(21, 21, 0, 0)
ushr r3.xy, r2.xyxx, l(10, 10, 0, 0)
ieq r5.xy, r2.xyxx, l(1024, 1024, 0, 0)
movc r2.xy, r5.xyxx, l(1025,1025,0,0), r2.xyxx
movc r5.xyzw, r3.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r2.xy, r2.xyxx, r5.xyxx
iadd r2.xy, r3.xyxx, r2.xyxx
ishl r5.xy, r2.xyxx, l(5, 5, 0, 0)
ushr r2.xy, r2.xyxx, l(5, 5, 0, 0)
or r2.xy, r2.xyxx, r5.xyxx
xor r2.xy, r5.zwzz, r2.xyxx
iadd r2.xy, r3.xyxx, r2.xyxx
or r4.yw, r2.xxxy, l(0, 0x7fff0000, 0, 0x7fff0000)
and r2.xy, r2.zwzz, l(1023, 1023, 0, 0)
ubfe r5.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r2.zwzw
ieq r3.xy, r2.xyxx, l(512, 512, 0, 0)
movc r2.xy, r3.xyxx, l(513,513,0,0), r2.xyxx
movc r6.xyzw, r5.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r2.xy, r2.xyxx, r6.xyxx
iadd r2.xy, r5.xyxx, r2.xyxx
ishl r3.xy, r2.xyxx, l(6, 6, 0, 0)
ushr r2.xy, r2.xyxx, l(3, 3, 0, 0)
or r2.xy, r2.xyxx, r3.xyxx
xor r2.xy, r6.zwzz, r2.xyxx
iadd r2.xy, r5.xyxx, r2.xyxx
ubfe r3.xy, l(1, 1, 0, 0), l(20, 20, 0, 0), r2.zwzz
ieq r5.xy, r5.zwzz, l(1024, 1024, 0, 0)
movc r5.xy, r5.xyxx, l(1025,1025,0,0), r5.zwzz
movc r6.xyzw, r3.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r5.xy, r5.xyxx, r6.xyxx
iadd r5.xy, r3.xyxx, r5.xyxx
ishl r5.zw, r5.xxxy, l(0, 0, 5, 5)
ushr r5.xy, r5.xyxx, l(5, 5, 0, 0)
or r5.xy, r5.xyxx, r5.zwzz
xor r5.xy, r6.zwzz, r5.xyxx
iadd r3.xy, r3.xyxx, r5.xyxx
ishl r3.xy, r3.xyxx, l(16, 16, 0, 0)
or r5.xz, r2.xxyx, r3.xxyx
ushr r2.xy, r2.zwzz, l(21, 21, 0, 0)
ushr r2.zw, r2.xxxy, l(0, 0, 10, 10)
ieq r3.xy, r2.xyxx, l(1024, 1024, 0, 0)
movc r2.xy, r3.xyxx, l(1025,1025,0,0), r2.xyxx
movc r6.xyzw, r2.zwzw, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r2.xy, r2.xyxx, r6.xyxx
iadd r2.xy, r2.zwzz, r2.xyxx
ishl r3.xy, r2.xyxx, l(5, 5, 0, 0)
ushr r2.xy, r2.xyxx, l(5, 5, 0, 0)
or r2.xy, r2.xyxx, r3.xyxx
xor r2.xy, r6.zwzz, r2.xyxx
iadd r2.xy, r2.zwzz, r2.xyxx
or r5.yw, r2.xxxy, l(0, 0x7fff0000, 0, 0x7fff0000)
store_uav_typed U0[0].xyzw, r3.zzzz, r4.xyzw
iadd r2.xy, r1.zwzz, l(1, 1, 0, 0)
store_uav_typed U0[0].xyzw, r2.xxxx, r5.xyzw
if_nz r0.w
  iadd r0.w, r0.x, l(8)
else 
  iadd r0.w, r0.x, l(4)
endif 
ld r4.xyzw, r0.wwww, T0[0].xyzw
if_nz r1.x
  ishl r5.xyzw, r4.xyzw, l(8, 8, 8, 8)
  and r5.xyzw, r5.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r6.xyzw, r4.xyzw, l(8, 8, 8, 8)
  and r6.xyzw, r6.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r4.xyzw, r5.xyzw, r6.xyzw
endif 
if_nz r1.y
  ushr r5.xyzw, r4.xyzw, l(16, 16, 16, 16)
  bfi r4.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r4.xyzw, r5.xyzw
endif 
and r2.xz, r4.xxyx, l(1023, 0, 1023, 0)
ubfe r5.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r4.xyxy
ieq r3.xy, r2.xzxx, l(512, 512, 0, 0)
movc r2.xz, r3.xxyx, l(513,0,513,0), r2.xxzx
movc r6.xyzw, r5.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r2.xz, r2.xxzx, r6.xxyx
iadd r2.xz, r5.xxyx, r2.xxzx
ishl r3.xy, r2.xzxx, l(6, 6, 0, 0)
ushr r2.xz, r2.xxzx, l(3, 0, 3, 0)
or r2.xz, r2.xxzx, r3.xxyx
xor r2.xz, r6.zzwz, r2.xxzx
iadd r2.xz, r5.xxyx, r2.xxzx
ubfe r3.xy, l(1, 1, 0, 0), l(20, 20, 0, 0), r4.xyxx
ieq r5.xy, r5.zwzz, l(1024, 1024, 0, 0)
movc r5.xy, r5.xyxx, l(1025,1025,0,0), r5.zwzz
movc r6.xyzw, r3.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r5.xy, r5.xyxx, r6.xyxx
iadd r5.xy, r3.xyxx, r5.xyxx
ishl r5.zw, r5.xxxy, l(0, 0, 5, 5)
ushr r5.xy, r5.xyxx, l(5, 5, 0, 0)
or r5.xy, r5.xyxx, r5.zwzz
xor r5.xy, r6.zwzz, r5.xyxx
iadd r3.xy, r3.xyxx, r5.xyxx
ishl r3.xy, r3.xyxx, l(16, 16, 0, 0)
or r5.xz, r2.xxzx, r3.xxyx
ushr r2.xz, r4.xxyx, l(21, 0, 21, 0)
ushr r3.xy, r2.xzxx, l(10, 10, 0, 0)
ieq r4.xy, r2.xzxx, l(1024, 1024, 0, 0)
movc r2.xz, r4.xxyx, l(1025,0,1025,0), r2.xxzx
movc r6.xyzw, r3.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r2.xz, r2.xxzx, r6.xxyx
iadd r2.xz, r3.xxyx, r2.xxzx
ishl r4.xy, r2.xzxx, l(5, 5, 0, 0)
ushr r2.xz, r2.xxzx, l(5, 0, 5, 0)
or r2.xz, r2.xxzx, r4.xxyx
xor r2.xz, r6.zzwz, r2.xxzx
iadd r2.xz, r3.xxyx, r2.xxzx
or r5.yw, r2.xxxz, l(0, 0x7fff0000, 0, 0x7fff0000)
and r2.xz, r4.zzwz, l(1023, 0, 1023, 0)
ubfe r6.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r4.zwzw
ieq r3.xy, r2.xzxx, l(512, 512, 0, 0)
movc r2.xz, r3.xxyx, l(513,0,513,0), r2.xxzx
movc r7.xyzw, r6.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r2.xz, r2.xxzx, r7.xxyx
iadd r2.xz, r6.xxyx, r2.xxzx
ishl r3.xy, r2.xzxx, l(6, 6, 0, 0)
ushr r2.xz, r2.xxzx, l(3, 0, 3, 0)
or r2.xz, r2.xxzx, r3.xxyx
xor r2.xz, r7.zzwz, r2.xxzx
iadd r2.xz, r6.xxyx, r2.xxzx
ubfe r3.xy, l(1, 1, 0, 0), l(20, 20, 0, 0), r4.zwzz
ieq r4.xy, r6.zwzz, l(1024, 1024, 0, 0)
movc r4.xy, r4.xyxx, l(1025,1025,0,0), r6.zwzz
movc r6.xyzw, r3.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r4.xy, r4.xyxx, r6.xyxx
iadd r4.xy, r3.xyxx, r4.xyxx
ishl r6.xy, r4.xyxx, l(5, 5, 0, 0)
ushr r4.xy, r4.xyxx, l(5, 5, 0, 0)
or r4.xy, r4.xyxx, r6.xyxx
xor r4.xy, r6.zwzz, r4.xyxx
iadd r3.xy, r3.xyxx, r4.xyxx
ishl r3.xy, r3.xyxx, l(16, 16, 0, 0)
or r6.xz, r2.xxzx, r3.xxyx
ushr r2.xz, r4.zzwz, l(21, 0, 21, 0)
ushr r3.xy, r2.xzxx, l(10, 10, 0, 0)
ieq r4.xy, r2.xzxx, l(1024, 1024, 0, 0)
movc r2.xz, r4.xxyx, l(1025,0,1025,0), r2.xxzx
movc r4.xyzw, r3.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r2.xz, r2.xxzx, r4.xxyx
iadd r2.xz, r3.xxyx, r2.xxzx
ishl r4.xy, r2.xzxx, l(5, 5, 0, 0)
ushr r2.xz, r2.xxzx, l(5, 0, 5, 0)
or r2.xz, r2.xxzx, r4.xxyx
xor r2.xz, r4.zzwz, r2.xxzx
iadd r2.xz, r3.xxyx, r2.xxzx
or r6.yw, r2.xxxz, l(0, 0x7fff0000, 0, 0x7fff0000)
store_uav_typed U0[0].xyzw, r3.wwww, r5.xyzw
store_uav_typed U0[0].xyzw, r1.wwww, r6.xyzw
iadd r2.xzw, r0.wwww, l(1, 0, 2, 3)
ld r3.xyzw, r2.xxxx, T0[0].xyzw
if_nz r1.x
  ishl r4.xyzw, r3.xyzw, l(8, 8, 8, 8)
  and r4.xyzw, r4.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r5.xyzw, r3.xyzw, l(8, 8, 8, 8)
  and r5.xyzw, r5.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r3.xyzw, r4.xyzw, r5.xyzw
endif 
if_nz r1.y
  ushr r4.xyzw, r3.xyzw, l(16, 16, 16, 16)
  bfi r3.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r3.xyzw, r4.xyzw
endif 
and r0.xw, r3.xxxy, l(1023, 0, 0, 1023)
ubfe r4.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r3.xyxy
ieq r1.zw, r0.xxxw, l(0, 0, 512, 512)
movc r0.xw, r1.zzzw, l(513,0,0,513), r0.xxxw
movc r5.xyzw, r4.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r0.xw, r0.xxxw, r5.xxxy
iadd r0.xw, r4.xxxy, r0.xxxw
ishl r1.zw, r0.xxxw, l(0, 0, 6, 6)
ushr r0.xw, r0.xxxw, l(3, 0, 0, 3)
or r0.xw, r0.xxxw, r1.zzzw
xor r0.xw, r5.zzzw, r0.xxxw
iadd r0.xw, r4.xxxy, r0.xxxw
ubfe r1.zw, l(0, 0, 1, 1), l(0, 0, 20, 20), r3.xxxy
ieq r4.xy, r4.zwzz, l(1024, 1024, 0, 0)
movc r4.xy, r4.xyxx, l(1025,1025,0,0), r4.zwzz
movc r5.xyzw, r1.zwzw, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r4.xy, r4.xyxx, r5.xyxx
iadd r4.xy, r1.zwzz, r4.xyxx
ishl r4.zw, r4.xxxy, l(0, 0, 5, 5)
ushr r4.xy, r4.xyxx, l(5, 5, 0, 0)
or r4.xy, r4.xyxx, r4.zwzz
xor r4.xy, r5.zwzz, r4.xyxx
iadd r1.zw, r1.zzzw, r4.xxxy
ishl r1.zw, r1.zzzw, l(0, 0, 16, 16)
or r4.xz, r0.xxwx, r1.zzwz
ushr r0.xw, r3.xxxy, l(21, 0, 0, 21)
ushr r1.zw, r0.xxxw, l(0, 0, 10, 10)
ieq r3.xy, r0.xwxx, l(1024, 1024, 0, 0)
movc r0.xw, r3.xxxy, l(1025,0,0,1025), r0.xxxw
movc r5.xyzw, r1.zwzw, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r0.xw, r0.xxxw, r5.xxxy
iadd r0.xw, r1.zzzw, r0.xxxw
ishl r3.xy, r0.xwxx, l(5, 5, 0, 0)
ushr r0.xw, r0.xxxw, l(5, 0, 0, 5)
or r0.xw, r0.xxxw, r3.xxxy
xor r0.xw, r5.zzzw, r0.xxxw
iadd r0.xw, r1.zzzw, r0.xxxw
or r4.yw, r0.xxxw, l(0, 0x7fff0000, 0, 0x7fff0000)
and r0.xw, r3.zzzw, l(1023, 0, 0, 1023)
ubfe r5.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r3.zwzw
ieq r1.zw, r0.xxxw, l(0, 0, 512, 512)
movc r0.xw, r1.zzzw, l(513,0,0,513), r0.xxxw
movc r6.xyzw, r5.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r0.xw, r0.xxxw, r6.xxxy
iadd r0.xw, r5.xxxy, r0.xxxw
ishl r1.zw, r0.xxxw, l(0, 0, 6, 6)
ushr r0.xw, r0.xxxw, l(3, 0, 0, 3)
or r0.xw, r0.xxxw, r1.zzzw
xor r0.xw, r6.zzzw, r0.xxxw
iadd r0.xw, r5.xxxy, r0.xxxw
ubfe r1.zw, l(0, 0, 1, 1), l(0, 0, 20, 20), r3.zzzw
ieq r3.xy, r5.zwzz, l(1024, 1024, 0, 0)
movc r3.xy, r3.xyxx, l(1025,1025,0,0), r5.zwzz
movc r5.xyzw, r1.zwzw, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r3.xy, r3.xyxx, r5.xyxx
iadd r3.xy, r1.zwzz, r3.xyxx
ishl r5.xy, r3.xyxx, l(5, 5, 0, 0)
ushr r3.xy, r3.xyxx, l(5, 5, 0, 0)
or r3.xy, r3.xyxx, r5.xyxx
xor r3.xy, r5.zwzz, r3.xyxx
iadd r1.zw, r1.zzzw, r3.xxxy
ishl r1.zw, r1.zzzw, l(0, 0, 16, 16)
or r5.xz, r0.xxwx, r1.zzwz
ushr r0.xw, r3.zzzw, l(21, 0, 0, 21)
ushr r1.zw, r0.xxxw, l(0, 0, 10, 10)
ieq r3.xy, r0.xwxx, l(1024, 1024, 0, 0)
movc r0.xw, r3.xxxy, l(1025,0,0,1025), r0.xxxw
movc r3.xyzw, r1.zwzw, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r0.xw, r0.xxxw, r3.xxxy
iadd r0.xw, r1.zzzw, r0.xxxw
ishl r3.xy, r0.xwxx, l(5, 5, 0, 0)
ushr r0.xw, r0.xxxw, l(5, 0, 0, 5)
or r0.xw, r0.xxxw, r3.xxxy
xor r0.xw, r3.zzzw, r0.xxxw
iadd r0.xw, r1.zzzw, r0.xxxw
or r5.yw, r0.xxxw, l(0, 0x7fff0000, 0, 0x7fff0000)
iadd r0.xyw, r0.yyyy, l(5, 6, 0, 7)
store_uav_typed U0[0].xyzw, r0.xxxx, r4.xyzw
store_uav_typed U0[0].xyzw, r2.yyyy, r5.xyzw
ld r3.xyzw, r2.zzzz, T0[0].xyzw
if_nz r1.x
  ishl r4.xyzw, r3.xyzw, l(8, 8, 8, 8)
  and r4.xyzw, r4.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r5.xyzw, r3.xyzw, l(8, 8, 8, 8)
  and r5.xyzw, r5.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r3.xyzw, r4.xyzw, r5.xyzw
endif 
if_nz r1.y
  ushr r4.xyzw, r3.xyzw, l(16, 16, 16, 16)
  bfi r3.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r3.xyzw, r4.xyzw
endif 
and r1.zw, r3.xxxy, l(0, 0, 1023, 1023)
ubfe r4.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r3.xyxy
ieq r2.xy, r1.zwzz, l(512, 512, 0, 0)
movc r1.zw, r2.xxxy, l(0,0,513,513), r1.zzzw
movc r5.xyzw, r4.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r1.zw, r1.zzzw, r5.xxxy
iadd r1.zw, r4.xxxy, r1.zzzw
ishl r2.xy, r1.zwzz, l(6, 6, 0, 0)
ushr r1.zw, r1.zzzw, l(0, 0, 3, 3)
or r1.zw, r1.zzzw, r2.xxxy
xor r1.zw, r5.zzzw, r1.zzzw
iadd r1.zw, r4.xxxy, r1.zzzw
ubfe r2.xy, l(1, 1, 0, 0), l(20, 20, 0, 0), r3.xyxx
ieq r4.xy, r4.zwzz, l(1024, 1024, 0, 0)
movc r4.xy, r4.xyxx, l(1025,1025,0,0), r4.zwzz
movc r5.xyzw, r2.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r4.xy, r4.xyxx, r5.xyxx
iadd r4.xy, r2.xyxx, r4.xyxx
ishl r4.zw, r4.xxxy, l(0, 0, 5, 5)
ushr r4.xy, r4.xyxx, l(5, 5, 0, 0)
or r4.xy, r4.xyxx, r4.zwzz
xor r4.xy, r5.zwzz, r4.xyxx
iadd r2.xy, r2.xyxx, r4.xyxx
ishl r2.xy, r2.xyxx, l(16, 16, 0, 0)
or r4.xz, r1.zzwz, r2.xxyx
ushr r1.zw, r3.xxxy, l(0, 0, 21, 21)
ushr r2.xy, r1.zwzz, l(10, 10, 0, 0)
ieq r3.xy, r1.zwzz, l(1024, 1024, 0, 0)
movc r1.zw, r3.xxxy, l(0,0,1025,1025), r1.zzzw
movc r5.xyzw, r2.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r1.zw, r1.zzzw, r5.xxxy
iadd r1.zw, r2.xxxy, r1.zzzw
ishl r3.xy, r1.zwzz, l(5, 5, 0, 0)
ushr r1.zw, r1.zzzw, l(0, 0, 5, 5)
or r1.zw, r1.zzzw, r3.xxxy
xor r1.zw, r5.zzzw, r1.zzzw
iadd r1.zw, r2.xxxy, r1.zzzw
or r4.yw, r1.zzzw, l(0, 0x7fff0000, 0, 0x7fff0000)
and r1.zw, r3.zzzw, l(0, 0, 1023, 1023)
ubfe r5.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r3.zwzw
ieq r2.xy, r1.zwzz, l(512, 512, 0, 0)
movc r1.zw, r2.xxxy, l(0,0,513,513), r1.zzzw
movc r6.xyzw, r5.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r1.zw, r1.zzzw, r6.xxxy
iadd r1.zw, r5.xxxy, r1.zzzw
ishl r2.xy, r1.zwzz, l(6, 6, 0, 0)
ushr r1.zw, r1.zzzw, l(0, 0, 3, 3)
or r1.zw, r1.zzzw, r2.xxxy
xor r1.zw, r6.zzzw, r1.zzzw
iadd r1.zw, r5.xxxy, r1.zzzw
ubfe r2.xy, l(1, 1, 0, 0), l(20, 20, 0, 0), r3.zwzz
ieq r3.xy, r5.zwzz, l(1024, 1024, 0, 0)
movc r3.xy, r3.xyxx, l(1025,1025,0,0), r5.zwzz
movc r5.xyzw, r2.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r3.xy, r3.xyxx, r5.xyxx
iadd r3.xy, r2.xyxx, r3.xyxx
ishl r5.xy, r3.xyxx, l(5, 5, 0, 0)
ushr r3.xy, r3.xyxx, l(5, 5, 0, 0)
or r3.xy, r3.xyxx, r5.xyxx
xor r3.xy, r5.zwzz, r3.xyxx
iadd r2.xy, r2.xyxx, r3.xyxx
ishl r2.xy, r2.xyxx, l(16, 16, 0, 0)
or r5.xz, r1.zzwz, r2.xxyx
ushr r1.zw, r3.zzzw, l(0, 0, 21, 21)
ushr r2.xy, r1.zwzz, l(10, 10, 0, 0)
ieq r3.xy, r1.zwzz, l(1024, 1024, 0, 0)
movc r1.zw, r3.xxxy, l(0,0,1025,1025), r1.zzzw
movc r3.xyzw, r2.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r1.zw, r1.zzzw, r3.xxxy
iadd r1.zw, r2.xxxy, r1.zzzw
ishl r3.xy, r1.zwzz, l(5, 5, 0, 0)
ushr r1.zw, r1.zzzw, l(0, 0, 5, 5)
or r1.zw, r1.zzzw, r3.xxxy
xor r1.zw, r3.zzzw, r1.zzzw
iadd r1.zw, r2.xxxy, r1.zzzw
or r5.yw, r1.zzzw, l(0, 0x7fff0000, 0, 0x7fff0000)
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, r5.xyzw
ld r2.xyzw, r2.wwww, T0[0].xyzw
if_nz r1.x
  ishl r3.xyzw, r2.xyzw, l(8, 8, 8, 8)
  and r3.xyzw, r3.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r4.xyzw, r2.xyzw, l(8, 8, 8, 8)
  and r4.xyzw, r4.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r2.xyzw, r3.xyzw, r4.xyzw
endif 
if_nz r1.y
  ushr r1.xyzw, r2.xyzw, l(16, 16, 16, 16)
  bfi r2.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r2.xyzw, r1.xyzw
endif 
and r0.yz, r2.xxyx, l(0, 1023, 1023, 0)
ubfe r1.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r2.xyxy
ieq r3.xy, r0.yzyy, l(512, 512, 0, 0)
movc r0.yz, r3.xxyx, l(0,513,513,0), r0.yyzy
movc r3.xyzw, r1.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r0.yz, r0.yyzy, r3.xxyx
iadd r0.yz, r1.xxyx, r0.yyzy
ishl r3.xy, r0.yzyy, l(6, 6, 0, 0)
ushr r0.yz, r0.yyzy, l(0, 3, 3, 0)
or r0.yz, r0.yyzy, r3.xxyx
xor r0.yz, r3.zzwz, r0.yyzy
iadd r0.yz, r1.xxyx, r0.yyzy
ubfe r1.xy, l(1, 1, 0, 0), l(20, 20, 0, 0), r2.xyxx
ieq r3.xy, r1.zwzz, l(1024, 1024, 0, 0)
movc r1.zw, r3.xxxy, l(0,0,1025,1025), r1.zzzw
movc r3.xyzw, r1.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r1.zw, r1.zzzw, r3.xxxy
iadd r1.zw, r1.xxxy, r1.zzzw
ishl r3.xy, r1.zwzz, l(5, 5, 0, 0)
ushr r1.zw, r1.zzzw, l(0, 0, 5, 5)
or r1.zw, r1.zzzw, r3.xxxy
xor r1.zw, r3.zzzw, r1.zzzw
iadd r1.xy, r1.xyxx, r1.zwzz
ishl r1.xy, r1.xyxx, l(16, 16, 0, 0)
or r1.xz, r0.yyzy, r1.xxyx
ushr r0.yz, r2.xxyx, l(0, 21, 21, 0)
ushr r2.xy, r0.yzyy, l(10, 10, 0, 0)
ieq r3.xy, r0.yzyy, l(1024, 1024, 0, 0)
movc r0.yz, r3.xxyx, l(0,1025,1025,0), r0.yyzy
movc r3.xyzw, r2.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r0.yz, r0.yyzy, r3.xxyx
iadd r0.yz, r2.xxyx, r0.yyzy
ishl r3.xy, r0.yzyy, l(5, 5, 0, 0)
ushr r0.yz, r0.yyzy, l(0, 5, 5, 0)
or r0.yz, r0.yyzy, r3.xxyx
xor r0.yz, r3.zzwz, r0.yyzy
iadd r0.yz, r2.xxyx, r0.yyzy
or r1.yw, r0.yyyz, l(0, 0x7fff0000, 0, 0x7fff0000)
and r0.yz, r2.zzwz, l(0, 1023, 1023, 0)
ubfe r3.xyzw, l(1, 1, 11, 11), l(9, 9, 10, 10), r2.zwzw
ieq r2.xy, r0.yzyy, l(512, 512, 0, 0)
movc r0.yz, r2.xxyx, l(0,513,513,0), r0.yyzy
movc r4.xyzw, r3.xyxy, l(1023,1023,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r0.yz, r0.yyzy, r4.xxyx
iadd r0.yz, r3.xxyx, r0.yyzy
ishl r2.xy, r0.yzyy, l(6, 6, 0, 0)
ushr r0.yz, r0.yyzy, l(0, 3, 3, 0)
or r0.yz, r0.yyzy, r2.xxyx
xor r0.yz, r4.zzwz, r0.yyzy
iadd r0.yz, r3.xxyx, r0.yyzy
ubfe r2.xy, l(1, 1, 0, 0), l(20, 20, 0, 0), r2.zwzz
ieq r3.xy, r3.zwzz, l(1024, 1024, 0, 0)
movc r3.xy, r3.xyxx, l(1025,1025,0,0), r3.zwzz
movc r4.xyzw, r2.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r3.xy, r3.xyxx, r4.xyxx
iadd r3.xy, r2.xyxx, r3.xyxx
ishl r3.zw, r3.xxxy, l(0, 0, 5, 5)
ushr r3.xy, r3.xyxx, l(5, 5, 0, 0)
or r3.xy, r3.xyxx, r3.zwzz
xor r3.xy, r4.zwzz, r3.xyxx
iadd r2.xy, r2.xyxx, r3.xyxx
ishl r2.xy, r2.xyxx, l(16, 16, 0, 0)
or r3.xz, r0.yyzy, r2.xxyx
ushr r0.yz, r2.zzwz, l(0, 21, 21, 0)
ushr r2.xy, r0.yzyy, l(10, 10, 0, 0)
ieq r2.zw, r0.yyyz, l(0, 0, 1024, 1024)
movc r0.yz, r2.zzwz, l(0,1025,1025,0), r0.yyzy
movc r4.xyzw, r2.xyxy, l(2047,2047,0x0000ffff,0x0000ffff), l(0,0,0,0)
xor r0.yz, r0.yyzy, r4.xxyx
iadd r0.yz, r2.xxyx, r0.yyzy
ishl r2.zw, r0.yyyz, l(0, 0, 5, 5)
ushr r0.yz, r0.yyzy, l(0, 5, 5, 0)
or r0.yz, r0.yyzy, r2.zzwz
xor r0.yz, r4.zzwz, r0.yyzy
iadd r0.yz, r2.xxyx, r0.yyzy
or r3.yw, r0.yyyz, l(0, 0x7fff0000, 0, 0x7fff0000)
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, r3.xyzw
ret 
// Approximately 812 instruction slots used
