//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//
// Buffer Definitions: 
//
// cbuffer XeEDRAMLoadStoreConstants
// {
//
//   uint4 xe_edram_load_store_constants;// Offset:    0 Size:    16
//   uint xe_edram_base_samples_2x_depth_pitch;// Offset:   16 Size:     4
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim      ID      HLSL Bind  Count
// ------------------------------ ---------- ------- ----------- ------- -------------- ------
// xe_edram_load_store_source        texture    byte         r/o      T0             t0      1 
// xe_edram_load_store_dest              UAV    byte         r/w      U0             u0      1 
// XeEDRAMLoadStoreConstants         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_raw T0[0:0], space=0
dcl_uav_raw U0[0:0], space=0
dcl_input vThreadGroupID.xy
dcl_input vThreadIDInGroup.xy
dcl_input vThreadID.xy
dcl_temps 13
dcl_thread_group 20, 16, 1
ubfe r0.xyzw, l(1, 1, 1, 1), l(12, 11, 13, 14), CB0[0][1].xxxx
ushr r1.xy, vThreadID.xyxx, r0.zzzz
ishl r1.yz, r1.xxyx, l(0, 2, 0, 0)
ushr r2.xy, CB0[0][0].xyxx, l(20, 20, 0, 0)
and r2.zw, CB0[0][0].xxxy, l(0, 0, 4095, 4095)
iadd r2.zw, r2.zzzw, r2.xxxy
imad r3.xyzw, r1.xxxx, l(4, 4, 4, 4), l(0, 1, 2, 3)
uge r4.xyzw, r3.xyzw, r2.xxxx
ult r5.xyzw, r3.xyzw, r2.zzzz
and r4.xyzw, r4.xyzw, r5.xyzw
ult r1.x, r1.z, r2.y
uge r1.w, r1.z, r2.w
or r1.x, r1.w, r1.x
or r2.zw, r4.zzzw, r4.xxxy
or r1.w, r2.w, r2.z
ieq r1.w, r1.w, l(0)
or r1.x, r1.w, r1.x
if_nz r1.x
  ret 
endif 
and r5.xy, r0.zzzz, vThreadIDInGroup.xyxx
if_nz r0.z
  xor r1.xw, r0.xxxy, l(1, 0, 0, 1)
  ushr r1.xw, vThreadGroupID.xxxy, r1.xxxw
  and r2.zw, vThreadGroupID.xxxy, l(0, 0, 1, 1)
  ushr r2.zw, r2.zzzw, r0.xxxy
  ushr r6.xy, vThreadIDInGroup.xyxx, l(1, 1, 0, 0)
  iadd r6.zw, r0.xxxy, l(0, 0, 2, 0)
  ishl r6.xy, r6.xyxx, r6.zwzz
  imad r2.zw, r2.zzzw, l(0, 0, 40, 8), r6.xxxy
else 
  uge r6.xy, vThreadIDInGroup.xyxx, l(10, 8, 0, 0)
  and r6.xy, r6.xyxx, l(1, 1, 0, 0)
  imul null, r6.zw, r0.xxxy, r6.xxxy
  ishl r7.xy, vThreadGroupID.xyxx, r0.xyxx
  imad r1.xw, r6.xxxy, r0.xxxy, r7.xxxy
  imad r6.xy, -r6.zwzz, l(10, 8, 0, 0), vThreadIDInGroup.xyxx
  iadd r6.zw, r0.xxxy, l(0, 0, 2, 0)
  ishl r2.zw, r6.xxxy, r6.zzzw
endif 
ubfe r6.xyzw, l(1, 1, 5, 5), l(19, 18, 12, 12), CB0[0][0].wwxy
iadd r2.zw, r2.zzzw, r6.xxxy
if_nz r0.w
  ieq r0.y, r1.z, r2.y
  and r0.y, r0.y, l(1)
  or r5.z, r0.y, r5.y
else 
  mov r5.z, r5.y
endif 
and r0.y, CB0[0][1].x, l(2047)
ushr r5.w, CB0[0][1].x, l(16)
imad r0.y, r1.w, r5.w, r0.y
ishl r1.x, r1.x, l(1)
iadd r0.y, r0.y, r1.x
imul null, r1.x, r2.w, l(640)
imad r0.y, r0.y, l(5120), r1.x
ishl r1.x, r2.z, l(3)
iadd r0.y, r0.y, r1.x
ubfe r1.x, l(1), l(13), CB0[0][1].x
and r2.zw, r1.xxxx, r5.xxxz
ishl r1.x, r1.x, l(1)
ishl r0.y, r0.y, r1.x
imad r0.y, r2.w, l(16), r0.y
ishl r1.x, r2.z, l(3)
iadd r7.x, r0.y, r1.x
if_nz r0.z
  ishl r8.xyz, l(32, 64, 96, 0), r0.xxxx
  iadd r7.yzw, r7.xxxx, r8.xxyz
  if_nz r0.w
    ieq r3.xyzw, r2.xxxx, r3.xyzw
    and r3.xyzw, r3.xyzw, l(8, 8, 8, 8)
    or r7.xyzw, r3.xyzw, r7.xyzw
  endif 
  ld_raw r3.xy, r7.x, T0[0].xyxx
  ld_raw r3.zw, r7.y, T0[0].xxxy
  ld_raw r8.xy, r7.z, T0[0].xyxx
  ld_raw r8.zw, r7.w, T0[0].xxxy
else 
  iadd r7.yzw, r7.xxxx, l(0, 16, 32, 48)
  ld_raw r3.xyzw, r7.x, T0[0].xyzw
  ld_raw r9.xyzw, r7.y, T0[0].xyzw
  if_nz r0.x
    ld_raw r8.xy, r7.z, T0[0].xyxx
    ld_raw r8.zw, r7.w, T0[0].xxxy
    mov r3.zw, r9.xxxy
  else 
    mov r8.xyzw, r9.xyzw
  endif 
endif 
and r0.x, CB0[0][0].w, l(0x00800000)
if_nz r0.x
  ubfe r0.x, l(4), l(24), CB0[0][0].w
  ieq r0.xy, r0.xxxx, l(5, 7, 0, 0)
  or r0.x, r0.y, r0.x
  if_nz r0.x
    bfi r3.xyzw, l(16, 16, 16, 16), l(0, 0, 0, 0), r3.yxwz, r3.xyzw
    bfi r8.xyzw, l(16, 16, 16, 16), l(0, 0, 0, 0), r8.yxwz, r8.xyzw
  endif 
endif 
ushr r0.xy, CB0[0][0].wwww, l(20, 9, 0, 0)
and r1.x, r0.x, l(4)
if_nz r1.x
  mov r3.xyzw, r3.yxwz
  mov r1.w, l(2)
else 
  mov r1.w, r0.x
endif 
ushr r2.z, r1.w, l(1)
xor r2.z, r1.w, r2.z
and r2.z, r2.z, l(1)
if_nz r2.z
  ishl r7.xyzw, r3.xyzw, l(8, 8, 8, 8)
  and r7.xyzw, r7.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r9.xyzw, r3.xyzw, l(8, 8, 8, 8)
  and r9.xyzw, r9.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r3.xyzw, r7.xyzw, r9.xyzw
endif 
and r1.w, r1.w, l(2)
if_nz r1.w
  ushr r7.xyzw, r3.xyzw, l(16, 16, 16, 16)
  bfi r3.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r3.xyzw, r7.xyzw
endif 
if_nz r1.x
  mov r8.xyzw, r8.yxwz
  mov r0.x, l(2)
endif 
ushr r1.x, r0.x, l(1)
xor r1.x, r0.x, r1.x
and r1.x, r1.x, l(1)
if_nz r1.x
  ishl r7.xyzw, r8.xyzw, l(8, 8, 8, 8)
  and r7.xyzw, r7.xyzw, l(0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00)
  ushr r9.xyzw, r8.xyzw, l(8, 8, 8, 8)
  and r9.xyzw, r9.xyzw, l(0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff)
  iadd r8.xyzw, r7.xyzw, r9.xyzw
endif 
and r0.x, r0.x, l(2)
if_nz r0.x
  ushr r7.xyzw, r8.xyzw, l(16, 16, 16, 16)
  bfi r8.xyzw, l(16, 16, 16, 16), l(16, 16, 16, 16), r8.xyzw, r7.xyzw
endif 
iadd r1.xy, r1.yzyy, r6.zwzz
iadd r1.xy, -r2.xyxx, r1.xyxx
mov r0.w, CB0[0][0].w
bfi r0.xy, l(9, 9, 0, 0), l(5, 5, 0, 0), r0.ywyy, l(0, 0, 0, 0)
if_nz r0.x
  iadd r2.xyzw, r1.xxxx, l(0, 1, 2, 3)
  ushr r1.zw, r1.yyyy, l(0, 0, 4, 3)
  ubfe r5.zw, l(0, 0, 3, 1), l(0, 0, 17, 19), CB0[0][0].xxxx
  ushr r0.xw, r0.xxxy, l(4, 0, 0, 5)
  imad r0.x, r5.w, r0.x, r1.z
  ushr r6.xyzw, r2.xyzw, l(5, 5, 5, 5)
  imad r6.xyzw, r0.xxxx, r0.wwww, r6.xyzw
  ishl r0.x, r1.y, l(11)
  and r0.x, r0.x, l(0x00003000)
  bfi r7.xyzw, l(3, 3, 3, 3), l(9, 9, 9, 9), r2.xyzw, r0.xxxx
  ushr r7.xyzw, r7.xyzw, l(6, 6, 6, 6)
  iadd r0.x, r1.w, r5.w
  ushr r2.xyzw, r2.xyzw, l(3, 3, 3, 3)
  bfi r0.w, l(1), l(1), r0.x, l(0)
  iadd r2.xyzw, r0.wwww, r2.xyzw
  bfi r2.xyzw, l(2, 2, 2, 2), l(1, 1, 1, 1), r2.xyzw, l(0, 0, 0, 0)
  bfi r2.xyzw, l(1, 1, 1, 1), l(0, 0, 0, 0), r0.xxxx, r2.xyzw
  and r9.xyzw, r7.xyzw, l(240, 240, 240, 240)
  bfi r10.xyzw, l(19, 19, 19, 19), l(11, 11, 11, 11), r6.xyzw, l(0, 0, 0, 0)
  imad r10.xyzw, r9.xyzw, l(2, 2, 2, 2), r10.xyzw
  bfi r10.xyzw, l(4, 4, 4, 4), l(0, 0, 0, 0), r7.xyzw, r10.xyzw
  bfi r10.xyzw, l(2, 2, 2, 2), l(9, 9, 9, 9), r5.zzzz, r10.xyzw
  bfi r11.xyzw, l(1, 1, 1, 1), l(4, 4, 4, 4), r1.yyyy, r10.xyzw
  ubfe r10.xyzw, l(3, 3, 3, 3), l(6, 6, 6, 6), r10.xyzw
  and r12.xyzw, r2.xyzw, l(6, 6, 6, 6)
  bfi r2.xyzw, l(1, 1, 1, 1), l(8, 8, 8, 8), r2.xyzw, l(0, 0, 0, 0)
  imad r2.xyzw, r10.xyzw, l(32, 32, 32, 32), r2.xyzw
  imad r2.xyzw, r12.xyzw, l(4, 4, 4, 4), r2.xyzw
  bfi r6.xyzw, l(19, 19, 19, 19), l(14, 14, 14, 14), r6.xyzw, l(0, 0, 0, 0)
  imad r6.xyzw, r9.xyzw, l(16, 16, 16, 16), r6.xyzw
  bfi r6.xyzw, l(4, 4, 4, 4), l(3, 3, 3, 3), r7.xyzw, r6.xyzw
  bfi r6.xyzw, l(2, 2, 2, 2), l(12, 12, 12, 12), r5.zzzz, r6.xyzw
  bfi r6.xyzw, l(1, 1, 1, 1), l(7, 7, 7, 7), r1.yyyy, r6.xyzw
  bfi r2.xyzw, l(9, 9, 9, 9), l(3, 3, 3, 3), r2.xyzw, r6.xyzw
  bfi r2.xyzw, l(6, 6, 6, 6), l(0, 0, 0, 0), r11.xyzw, r2.xyzw
else 
  iadd r6.xyzw, r1.xxxx, l(0, 1, 2, 3)
  ushr r7.xyzw, r6.xyzw, l(5, 5, 5, 5)
  ushr r0.xw, r1.yyyy, l(5, 0, 0, 2)
  ushr r0.y, r0.y, l(5)
  imad r7.xyzw, r0.xxxx, r0.yyyy, r7.xyzw
  ishl r0.xy, r1.yyyy, l(5, 7, 0, 0)
  and r0.xy, r0.xyxx, l(448, 2048, 0, 0)
  bfi r9.xyzw, l(3, 3, 3, 3), l(3, 3, 3, 3), r6.xyzw, r0.xxxx
  ishl r0.x, r0.x, l(1)
  bfi r10.xyzw, l(3, 3, 3, 3), l(4, 4, 4, 4), r6.xyzw, r0.xxxx
  and r10.xyzw, r10.xyzw, l(992, 992, 992, 992)
  bfi r11.xyzw, l(22, 22, 22, 22), l(10, 10, 10, 10), r7.xyzw, r10.xyzw
  bfi r11.xyzw, l(4, 4, 4, 4), l(0, 0, 0, 0), r9.xyzw, r11.xyzw
  bfi r11.xyzw, l(1, 1, 1, 1), l(4, 4, 4, 4), r1.yyyy, r11.xyzw
  ishl r12.xyzw, r10.xyzw, l(3, 3, 3, 3)
  bfi r12.xyzw, l(22, 22, 22, 22), l(13, 13, 13, 13), r7.xyzw, r12.xyzw
  bfi r12.xyzw, l(4, 4, 4, 4), l(3, 3, 3, 3), r9.xyzw, r12.xyzw
  bfi r12.xyzw, l(1, 1, 1, 1), l(7, 7, 7, 7), r1.yyyy, r12.xyzw
  bfi r12.xyzw, l(12, 12, 12, 12), l(0, 0, 0, 0), r0.yyyy, r12.xyzw
  ishl r10.xyzw, r10.xyzw, l(2, 2, 2, 2)
  bfi r7.xyzw, l(22, 22, 22, 22), l(12, 12, 12, 12), r7.xyzw, r10.xyzw
  bfi r7.xyzw, l(4, 4, 4, 4), l(2, 2, 2, 2), r9.xyzw, r7.xyzw
  bfi r1.xyzw, l(1, 1, 1, 1), l(6, 6, 6, 6), r1.yyyy, r7.xyzw
  and r1.xyzw, r1.xyzw, l(1792, 1792, 1792, 1792)
  iadd r1.xyzw, r12.xyzw, r1.xyzw
  ushr r6.xyzw, r6.xyzw, l(3, 3, 3, 3)
  and r0.x, r0.w, l(2)
  iadd r6.xyzw, r0.xxxx, r6.xyzw
  bfi r6.xyzw, l(2, 2, 2, 2), l(6, 6, 6, 6), r6.xyzw, l(0, 0, 0, 0)
  iadd r1.xyzw, r1.xyzw, r6.xyzw
  bfi r2.xyzw, l(6, 6, 6, 6), l(0, 0, 0, 0), r11.xyzw, r1.xyzw
endif 
iadd r1.xyzw, r2.xyzw, CB0[0][0].zzzz
ishl r0.x, r0.z, l(1)
ishl r0.xyzw, r1.xyzw, r0.xxxx
ishl r1.xy, r5.xyxx, l(3, 4, 0, 0)
iadd r0.xyzw, r0.xyzw, r1.xxxx
iadd r0.xyzw, r1.yyyy, r0.xyzw
if_nz r4.x
  store_raw U0[0].xy, r0.x, r3.xyxx
endif 
if_nz r4.y
  store_raw U0[0].xy, r0.y, r3.zwzz
endif 
if_nz r4.z
  store_raw U0[0].xy, r0.z, r8.xyxx
endif 
if_nz r4.w
  store_raw U0[0].xy, r0.w, r8.zwzz
endif 
ret 
// Approximately 233 instruction slots used
