//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Buffer Definitions: 
//
// cbuffer XeResolveConstants
// {
//
//   uint xe_resolve_edram_info;        // Offset:    0 Size:     4
//   uint xe_resolve_address_info;      // Offset:    4 Size:     4
//   uint xe_resolve_dest_info;         // Offset:    8 Size:     4
//   uint xe_resolve_dest_pitch_aligned;// Offset:   12 Size:     4
//   uint xe_resolve_dest_base;         // Offset:   16 Size:     4
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim      ID      HLSL Bind  Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_resolve_source                 texture   uint2         buf      T0             t0      1 
// xe_resolve_dest                       UAV   uint4         buf      U0             u0      1 
// XeResolveConstants                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][2], 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.xy
dcl_temps 6
dcl_thread_group 8, 8, 1
ishl r0.xw, vThreadID.xxxx, l(2, 0, 0, 2)
ushr r1.x, CB0[0][0].y, l(7)
bfi r1.x, l(11), l(3), r1.x, l(0)
uge r1.x, r0.w, r1.x
if_nz r1.x
  ret 
endif 
ushr r1.xy, CB0[0][0].yyyy, l(5, 29, 0, 0)
mov r1.z, CB0[0][0].y
bfi r2.xy, l(5, 2, 0, 0), l(3, 3, 0, 0), r1.zxzz, l(0, 0, 0, 0)
mov r0.yz, vThreadID.yyyy
iadd r2.xy, r0.wzww, r2.xyxx
ubfe r1.w, l(12), l(13), CB0[0][0].x
and r3.xyzw, CB0[0][0].zxzz, l(7, 1023, 0x01000000, 8)
uge r2.z, l(3), r1.y
if_nz r2.z
  mov r4.y, r1.y
else 
  ieq r2.z, r1.y, l(5)
  if_nz r2.z
    mov r4.y, l(2)
  else 
    mov r4.y, l(0)
  endif 
endif 
ishl r2.xy, r2.xyxx, l(1, 1, 0, 0)
ushr r4.x, r4.y, l(1)
bfi r2.xy, l(3, 1, 0, 0), l(0, 0, 0, 0), r4.xyxx, r2.xyxx
udiv r2.zw, null, r2.xxxy, l(0, 0, 80, 16)
ishl r1.y, r2.z, l(1)
imad r1.y, r2.w, r3.y, r1.y
iadd r1.y, r1.y, r1.w
imad r2.xy, -r2.zwzz, l(80, 16, 0, 0), r2.xyxx
imad r1.w, r2.y, l(80), r2.x
ishl r1.w, r1.w, l(1)
imad r1.y, r1.y, l(1280), r1.w
ushr r1.y, r1.y, l(1)
ld r2.xy, r1.yyyy, T0[0].xywz
iadd r4.xyz, r1.yyyy, l(2, 4, 6, 0)
ld r2.zw, r4.xxxx, T0[0].zwyx
ld r5.xy, r4.yyyy, T0[0].xywz
ld r5.zw, r4.zzzz, T0[0].zwyx
if_nz r3.z
  ubfe r1.y, l(4), l(25), CB0[0][0].x
  ieq r1.yw, r1.yyyy, l(0, 5, 0, 7)
  or r1.y, r1.w, r1.y
  if_nz r1.y
    mov r2.xyzw, r2.yxzw
    bfi r2.xyzw, l(16, 16, 16, 16), l(0, 0, 0, 0), r2.xywz, r2.yxzw
    mov r5.xyzw, r5.yxzw
    bfi r5.xyzw, l(16, 16, 16, 16), l(0, 0, 0, 0), r5.xywz, r5.yxzw
  endif 
endif 
bfi r1.xyzw, l(2, 2, 2, 2), l(3, 3, 3, 3), r1.zxxz, l(0, 0, 0, 0)
iadd r0.xyzw, r0.xyzw, r1.xyzw
bfi r1.x, l(10), l(5), CB0[0][0].w, l(0)
if_nz r3.w
  ubfe r1.y, l(3), l(4), CB0[0][0].z
  ushr r1.z, CB0[0][0].w, l(10)
  ishl r1.z, r1.z, l(5)
  ishr r4.xyzw, r0.zwzw, l(4, 5, 3, 3)
  ishr r1.w, r1.y, l(2)
  ushr r1.z, r1.z, l(4)
  and r1.z, r1.z, l(0x00007ffe)
  imad r1.z, r1.w, r1.z, r4.x
  ushr r3.y, r1.x, l(5)
  imad r1.z, r1.z, r3.y, r4.y
  ishl r3.y, r0.z, l(11)
  and r3.y, r3.y, l(0x00003000)
  bfi r3.y, l(3), l(9), r0.w, r3.y
  ishr r3.y, r3.y, l(6)
  iadd r1.w, r1.w, r4.z
  bfi r3.z, l(1), l(1), r1.w, l(0)
  iadd r3.z, r3.z, r4.w
  bfi r3.z, l(2), l(1), r3.z, l(0)
  bfi r1.w, l(1), l(0), r1.w, r3.z
  bfi r3.zw, l(0, 0, 19, 19), l(0, 0, 11, 14), r1.zzzz, l(0, 0, 0, 0)
  imad r3.yz, r3.yyyy, l(0, 2, 16, 0), r3.zzwz
  bfi r1.yz, l(0, 2, 2, 0), l(0, 9, 12, 0), r1.yyyy, r3.yyzy
  bfi r3.y, l(1), l(4), r0.z, l(0)
  ubfe r3.z, l(3), l(6), r1.y
  and r3.w, r1.w, l(6)
  bfi r1.w, l(1), l(8), r1.w, l(0)
  imad r1.w, r3.z, l(32), r1.w
  imad r1.w, r3.w, l(4), r1.w
  bfi r1.yz, l(0, 6, 6, 0), l(0, 0, 3, 0), r3.yyyy, r1.yyzy
  bfi r1.z, l(9), l(3), r1.w, r1.z
  bfi r1.y, l(6), l(0), r1.y, r1.z
else 
  ishr r4.xyzw, r0.xyzw, l(5, 5, 2, 3)
  ushr r0.x, r1.x, l(5)
  imad r0.x, r4.y, r0.x, r4.x
  ishl r1.xz, r0.zzzz, l(6, 0, 7, 0)
  and r1.xz, r1.xxzx, l(896, 0, 2048, 0)
  bfi r0.y, l(3), l(4), r0.w, r1.x
  bfi r0.y, l(22), l(10), r0.x, r0.y
  bfi r0.z, l(1), l(4), r0.z, l(0)
  iadd r0.y, r0.y, r0.z
  ishl r1.xw, r1.xxxx, l(3, 0, 0, 2)
  bfi r1.xw, l(3, 0, 0, 3), l(7, 0, 0, 6), r0.wwww, r1.xxxw
  bfi r0.xw, l(22, 0, 0, 22), l(13, 0, 0, 12), r0.xxxx, r1.xxxw
  imad r0.xz, r0.zzzz, l(8, 0, 4, 0), r0.xxwx
  bfi r0.x, l(12), l(0), r1.z, r0.x
  and r0.z, r0.z, l(1792)
  iadd r0.x, r0.x, r0.z
  and r0.z, r4.z, l(2)
  iadd r0.z, r4.w, r0.z
  bfi r0.z, l(2), l(6), r0.z, l(0)
  iadd r0.x, r0.x, r0.z
  bfi r1.y, l(6), l(0), r0.y, r0.x
endif 
iadd r0.x, r1.y, CB0[0][1].x
ushr r0.x, r0.x, l(4)
ieq r0.y, r3.x, l(4)
if_nz r0.y
  mov r2.xyzw, r2.yxwz
  mov r0.z, l(2)
else 
  mov r0.z, r3.x
endif 
ieq r1.xyz, r0.zzzz, l(1, 2, 3, 0)
or r0.zw, r1.yyyz, r1.xxxy
if_nz r0.z
  ishl r1.xyzw, r2.xywz, l(8, 8, 8, 8)
  and r1.xyzw, r1.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r4.xyzw, r2.xywz, l(8, 8, 8, 8)
  and r4.xyzw, r4.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r2.xyzw, r1.xywz, r4.xywz
endif 
if_nz r0.w
  ushr r1.xyzw, r2.xywz, l(16, 16, 16, 16)
  bfi r2.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r2.xyzw, r1.xywz
endif 
store_uav_typed U0[0].xyzw, r0.xxxx, r2.xywz
iadd r0.x, r0.x, l(2)
if_nz r0.y
  mov r5.xyzw, r5.yxwz
  mov r3.x, l(2)
endif 
ieq r0.yzw, r3.xxxx, l(0, 1, 2, 3)
or r0.yz, r0.zzwz, r0.yyzy
if_nz r0.y
  ishl r1.xyzw, r5.xywz, l(8, 8, 8, 8)
  and r1.xyzw, r1.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r2.xyzw, r5.xywz, l(8, 8, 8, 8)
  and r2.xyzw, r2.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r5.xyzw, r1.xywz, r2.xywz
endif 
if_nz r0.z
  ushr r1.xyzw, r5.xywz, l(16, 16, 16, 16)
  bfi r5.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r5.xyzw, r1.xywz
endif 
store_uav_typed U0[0].xyzw, r0.xxxx, r5.xywz
ret 
// Approximately 154 instruction slots used
