#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint32_t;
typedef int devid;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, ...);
void i810_debug_915_fence(char *result, int len, int reg, uint32_t val,
                          uint32_t devid) {
  char format = (val & 1 << 12) ? 'Y' : 'X';
  int pitch = 128 << ((val & 0x70) >> 4);
  unsigned int offset = val & 0x0ff00000;
  int size = (1024 * 1024) << ((val & 0x700) >> 8);
  if ((((devid) == 0x29A2 || (devid) == 0x2992 || (devid) == 0x2982 ||
        (devid) == 0x2A02 || (devid) == 0x2A12 || (devid) == 0x2972 ||
        (((devid) == 0x2E02 || (devid) == 0x2E12 || (devid) == 0x2E22 ||
          (devid) == 0x2E32) ||
         ((devid) == 0x2A42))) ||
       (((devid) == 0x0042) || ((devid) == 0x0046)) ||
       ((devid) == 0x0102 || (devid) == 0x0112 || (devid) == 0x0122 ||
        (devid) == 0x0106 || (devid) == 0x0116 || (devid) == 0x0126 ||
        (devid) == 0x010A) ||
       (((devid) == 0x0152 || (devid) == 0x0162 || (devid) == 0x0156 ||
         (devid) == 0x0166 || (devid) == 0x015a || (devid) == 0x016a) ||
        (((devid) == 0x0402 || (devid) == 0x0406 || (devid) == 0x040A ||
          (devid) == 0x040B || (devid) == 0x040E || (devid) == 0x0C02 ||
          (devid) == 0x0C06 || (devid) == 0x0C0A || (devid) == 0x0C0B ||
          (devid) == 0x0C0E || (devid) == 0x0A02 || (devid) == 0x0A06 ||
          (devid) == 0x0A0A || (devid) == 0x0A0B || (devid) == 0x0A0E ||
          (devid) == 0x0D02 || (devid) == 0x0D06 || (devid) == 0x0D0A ||
          (devid) == 0x0D0B || (devid) == 0x0D0E) ||
         ((devid) == 0x0412 || (devid) == 0x0416 || (devid) == 0x041A ||
          (devid) == 0x041B || (devid) == 0x041E || (devid) == 0x0C12 ||
          (devid) == 0x0C16 || (devid) == 0x0C1A || (devid) == 0x0C1B ||
          (devid) == 0x0C1E || (devid) == 0x0A12 || (devid) == 0x0A16 ||
          (devid) == 0x0A1A || (devid) == 0x0A1B || (devid) == 0x0A1E ||
          (devid) == 0x0D12 || (devid) == 0x0D16 || (devid) == 0x0D1A ||
          (devid) == 0x0D1B || (devid) == 0x0D1E) ||
         ((devid) == 0x0422 || (devid) == 0x0426 || (devid) == 0x042A ||
          (devid) == 0x042B || (devid) == 0x042E || (devid) == 0x0C22 ||
          (devid) == 0x0C26 || (devid) == 0x0C2A || (devid) == 0x0C2B ||
          (devid) == 0x0C2E || (devid) == 0x0A22 || (devid) == 0x0A26 ||
          (devid) == 0x0A2A || (devid) == 0x0A2B || (devid) == 0x0A2E ||
          (devid) == 0x0D22 || (devid) == 0x0D26 || (devid) == 0x0D2A ||
          (devid) == 0x0D2B || (devid) == 0x0D2E)) ||
        ((devid) == 0x0f30 || (devid) == 0x0f31 || (devid) == 0x0f32 ||
         (devid) == 0x0f33)) ||
       (((((devid)&0xff00) != 0x1600)    ? 0
         : ((((devid)&0x00f0) >> 4) > 3) ? 0
         : (((devid)&0x000f) == 0x2)     ? 1
         : (((devid)&0x000f) == 0x6)     ? 1
         : (((devid)&0x000f) == 0xb)     ? 1
         : (((devid)&0x000f) == 0xa)     ? 1
         : (((devid)&0x000f) == 0xd)     ? 1
         : (((devid)&0x000f) == 0xe)     ? 1
                                         : 0) ||
        ((devid) == 0x22b0 || (devid) == 0x22b1 || (devid) == 0x22b2 ||
         (devid) == 0x22b3)) ||
       (((((devid) == 0x5913 || (devid) == 0x5915 || (devid) == 0x5917 ||
           (devid) == 0x5906 || (devid) == 0x590E || (devid) == 0x5902 ||
           (devid) == 0x590B || (devid) == 0x590A) ||
          ((devid) == 0x5916 || (devid) == 0x5921 || (devid) == 0x591E ||
           (devid) == 0x5912 || (devid) == 0x591B || (devid) == 0x591A ||
           (devid) == 0x591D) ||
          ((devid) == 0x5926 || (devid) == 0x592B || (devid) == 0x592A)) ||
         ((devid) == 0x1906 || (devid) == 0x190E || (devid) == 0x1902 ||
          (devid) == 0x190B || (devid) == 0x190A) ||
         ((devid) == 0x1916 || (devid) == 0x1921 || (devid) == 0x191E ||
          (devid) == 0x1912 || (devid) == 0x191B || (devid) == 0x191A ||
          (devid) == 0x191D) ||
         ((devid) == 0x1926 || (devid) == 0x192B || (devid) == 0x192A)) ||
        ((devid) == 0x0A84 || (devid) == 0x1A84 || (devid) == 0x5A84))) ||
      (((devid) == 0x2582 || (devid) == 0x258A || (devid) == 0x2592) &&
       reg >= 0x3000))
    return;
  if (format == 'X')
    pitch *= 4;
  if (val & 1) {
    snprintf(result, len,
             "enabled, %c tiled, %4d pitch, 0x%08x - 0x%08x (%dkb)", format,
             pitch, offset, offset + size, size / 1024);
  } else {
    snprintf(result, len, "disabled");
  }
}


x86 assembly (clang, -O0):
<i810_debug_915_fence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x14(%rbp),%edx
and    $0x1000,%edx
mov    $0x58,%eax
mov    $0x59,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,-0x19(%rbp)
mov    -0x14(%rbp),%ecx
and    $0x70,%ecx
sar    $0x4,%ecx
mov    $0x80,%eax
shl    %cl,%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
and    $0xff00000,%eax
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%ecx
and    $0x700,%ecx
sar    $0x8,%ecx
mov    $0x100000,%eax
shl    %cl,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x29a2,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x2992,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x2982,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x2a02,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x2a12,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x2972,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x2e02,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x2e12,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x2e22,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x2e32,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x2a42,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x42,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x46,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x102,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x112,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x122,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x106,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x116,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x126,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x10a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x152,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x162,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x156,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x166,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x15a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x16a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x402,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x406,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x40a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x40b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x40e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc02,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc06,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc0a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc0b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc0e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa02,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa06,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa0a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa0b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa0e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd02,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd06,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd0a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd0b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd0e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x412,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x416,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x41a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x41b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x41e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc12,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc16,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc1a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc1b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc1e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa12,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa16,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa1a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa1b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa1e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd12,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd16,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd1a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd1b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd1e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x422,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x426,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x42a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x42b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x42e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc22,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc26,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc2a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc2b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xc2e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa22,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa26,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa2a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa2b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa2e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd22,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd26,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd2a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd2b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xd2e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xf30,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xf31,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xf32,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xf33,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
mov    -0x18(%rbp),%eax
and    $0xff00,%eax
cmp    $0x1600,%eax
je     1627 <i810_debug_915_fence+0x517>
xor    %eax,%eax
test   $0x1,%al
jne    1949 <i810_debug_915_fence+0x839>
jmp    170d <i810_debug_915_fence+0x5fd>
mov    -0x18(%rbp),%eax
and    $0xf0,%eax
sar    $0x4,%eax
cmp    $0x3,%eax
jle    164a <i810_debug_915_fence+0x53a>
xor    %eax,%eax
test   $0x1,%al
jne    1949 <i810_debug_915_fence+0x839>
jmp    170d <i810_debug_915_fence+0x5fd>
mov    -0x18(%rbp),%eax
and    $0xf,%eax
cmp    $0x2,%eax
jne    1668 <i810_debug_915_fence+0x558>
mov    $0x1,%al
test   $0x1,%al
jne    1949 <i810_debug_915_fence+0x839>
jmp    170d <i810_debug_915_fence+0x5fd>
mov    -0x18(%rbp),%eax
and    $0xf,%eax
cmp    $0x6,%eax
jne    1686 <i810_debug_915_fence+0x576>
mov    $0x1,%al
test   $0x1,%al
jne    1949 <i810_debug_915_fence+0x839>
jmp    170d <i810_debug_915_fence+0x5fd>
mov    -0x18(%rbp),%eax
and    $0xf,%eax
cmp    $0xb,%eax
jne    16a4 <i810_debug_915_fence+0x594>
mov    $0x1,%al
test   $0x1,%al
jne    1949 <i810_debug_915_fence+0x839>
jmp    170d <i810_debug_915_fence+0x5fd>
mov    -0x18(%rbp),%eax
and    $0xf,%eax
cmp    $0xa,%eax
jne    16c2 <i810_debug_915_fence+0x5b2>
mov    $0x1,%al
test   $0x1,%al
jne    1949 <i810_debug_915_fence+0x839>
jmp    170d <i810_debug_915_fence+0x5fd>
mov    -0x18(%rbp),%eax
and    $0xf,%eax
cmp    $0xd,%eax
jne    16e0 <i810_debug_915_fence+0x5d0>
mov    $0x1,%al
test   $0x1,%al
jne    1949 <i810_debug_915_fence+0x839>
jmp    170d <i810_debug_915_fence+0x5fd>
mov    -0x18(%rbp),%eax
and    $0xf,%eax
cmp    $0xe,%eax
jne    16fe <i810_debug_915_fence+0x5ee>
mov    $0x1,%al
test   $0x1,%al
jne    1949 <i810_debug_915_fence+0x839>
jmp    170d <i810_debug_915_fence+0x5fd>
xor    %eax,%eax
test   $0x1,%al
jne    1949 <i810_debug_915_fence+0x839>
jmp    170d <i810_debug_915_fence+0x5fd>
cmpl   $0x22b0,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x22b1,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x22b2,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x22b3,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x5913,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x5915,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x5917,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x5906,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x590e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x5902,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x590b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x590a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x5916,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x5921,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x591e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x5912,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x591b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x591a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x591d,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x5926,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x592b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x592a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x1906,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x190e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x1902,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x190b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x190a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x1916,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x1921,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x191e,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x1912,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x191b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x191a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x191d,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x1926,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x192b,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x192a,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0xa84,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x1a84,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x5a84,-0x18(%rbp)
je     1949 <i810_debug_915_fence+0x839>
cmpl   $0x2582,-0x18(%rbp)
je     193c <i810_debug_915_fence+0x82c>
cmpl   $0x258a,-0x18(%rbp)
je     193c <i810_debug_915_fence+0x82c>
cmpl   $0x2592,-0x18(%rbp)
jne    194e <i810_debug_915_fence+0x83e>
cmpl   $0x3000,-0x10(%rbp)
jl     194e <i810_debug_915_fence+0x83e>
jmp    19cb <i810_debug_915_fence+0x8bb>
movsbl -0x19(%rbp),%eax
cmp    $0x58,%eax
jne    1964 <i810_debug_915_fence+0x854>
mov    -0x20(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     19b6 <i810_debug_915_fence+0x8a6>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsbl -0x19(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    -0x24(%rbp),%r10d
add    -0x28(%rbp),%r10d
mov    -0x28(%rbp),%eax
mov    $0x400,%r11d
cltd
idiv   %r11d
lea    0x65e(%rip),%rdx
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    19cb <i810_debug_915_fence+0x8bb>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0x671(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i810_debug_915_fence>:
push   %rbx
mov    %ecx,%r11d
shr    $0x4,%cl
and    $0x7,%cl
mov    $0x80,%ebx
shl    %cl,%ebx
mov    %r11d,%ecx
shr    $0x8,%ecx
and    $0x7,%cl
mov    $0x100000,%r10d
shl    %cl,%r10d
cmp    $0xc01,%r8d
jg     117e <i810_debug_915_fence+0x6e>
cmp    $0x401,%r8d
jle    11bc <i810_debug_915_fence+0xac>
lea    -0x402(%r8),%ecx
cmp    $0x2c,%ecx
jbe    11fa <i810_debug_915_fence+0xea>
lea    -0xa02(%r8),%ecx
cmp    $0x2c,%ecx
ja     1267 <i810_debug_915_fence+0x157>
movabs $0x131113111311,%rax
bt     %rcx,%rax
jb     123c <i810_debug_915_fence+0x12c>
jmp    1267 <i810_debug_915_fence+0x157>
cmp    $0xf2f,%r8d
jg     11dc <i810_debug_915_fence+0xcc>
lea    -0xc02(%r8),%ecx
movabs $0x131113111311,%r9
cmp    $0x2c,%ecx
jbe    120f <i810_debug_915_fence+0xff>
lea    -0xd02(%r8),%ecx
cmp    $0x2c,%ecx
ja     1267 <i810_debug_915_fence+0x157>
bt     %rcx,%r9
jb     123c <i810_debug_915_fence+0x12c>
jmp    1267 <i810_debug_915_fence+0x157>
lea    -0x102(%r8),%ecx
cmp    $0x68,%ecx
ja     125b <i810_debug_915_fence+0x14b>
lea    0xe2d(%rip),%r9
movslq (%r9,%rcx,4),%rcx
add    %r9,%rcx
jmp    *%rcx
cmp    $0x2a01,%r8d
jg     1217 <i810_debug_915_fence+0x107>
lea    -0xf30(%r8),%eax
cmp    $0x4,%eax
jb     123c <i810_debug_915_fence+0x12c>
lea    -0x2972(%r8),%ecx
jmp    1227 <i810_debug_915_fence+0x117>
movabs $0x131113111311,%rax
bt     %rcx,%rax
jb     123c <i810_debug_915_fence+0x12c>
jmp    1155 <i810_debug_915_fence+0x45>
bt     %rcx,%r9
jb     123c <i810_debug_915_fence+0x12c>
jmp    119d <i810_debug_915_fence+0x8d>
cmp    $0x2e01,%r8d
jle    123e <i810_debug_915_fence+0x12e>
lea    -0x2e02(%r8),%ecx
cmp    $0x30,%ecx
ja     1267 <i810_debug_915_fence+0x157>
movabs $0x1000100010001,%rax
bt     %rcx,%rax
jae    1267 <i810_debug_915_fence+0x157>
pop    %rbx
ret
cmp    $0x2a02,%r8d
je     123c <i810_debug_915_fence+0x12c>
cmp    $0x2a12,%r8d
je     123c <i810_debug_915_fence+0x12c>
cmp    $0x2a42,%r8d
je     123c <i810_debug_915_fence+0x12c>
jmp    1267 <i810_debug_915_fence+0x157>
cmp    $0x42,%r8d
je     123c <i810_debug_915_fence+0x12c>
cmp    $0x46,%r8d
je     123c <i810_debug_915_fence+0x12c>
mov    %r8d,%eax
and    $0xffc0,%eax
cmp    $0x1600,%eax
jne    12d8 <i810_debug_915_fence+0x1c8>
mov    %r8d,%ecx
and    $0xf,%ecx
cmp    $0xd,%ecx
ja     128b <i810_debug_915_fence+0x17b>
mov    $0x2c44,%eax
bt     %ecx,%eax
jb     123c <i810_debug_915_fence+0x12c>
cmp    $0x22b0,%r8d
je     123c <i810_debug_915_fence+0x12c>
cmp    $0xe,%ecx
je     123c <i810_debug_915_fence+0x12c>
cmp    $0x5901,%r8d
jg     1399 <i810_debug_915_fence+0x289>
lea    -0x1902(%r8),%ecx
cmp    $0x29,%ecx
ja     12c6 <i810_debug_915_fence+0x1b6>
movabs $0x3109b111311,%rax
bt     %rcx,%rax
jb     123c <i810_debug_915_fence+0x12c>
lea    -0x22b1(%r8),%eax
cmp    $0x3,%eax
jb     123c <i810_debug_915_fence+0x12c>
jmp    130e <i810_debug_915_fence+0x1fe>
cmp    $0x22af,%r8d
jg     131d <i810_debug_915_fence+0x20d>
lea    -0x1902(%r8),%ecx
cmp    $0x29,%ecx
ja     1301 <i810_debug_915_fence+0x1f1>
movabs $0x3109b111311,%rax
bt     %rcx,%rax
jb     123c <i810_debug_915_fence+0x12c>
cmp    $0xa84,%r8d
je     123c <i810_debug_915_fence+0x12c>
cmp    $0x1a84,%r8d
je     123c <i810_debug_915_fence+0x12c>
jmp    135a <i810_debug_915_fence+0x24a>
lea    -0x5902(%r8),%ecx
cmp    $0x29,%ecx
ja     133d <i810_debug_915_fence+0x22d>
movabs $0x3109b3b1311,%rax
bt     %rcx,%rax
jb     123c <i810_debug_915_fence+0x12c>
lea    -0x22b0(%r8),%eax
cmp    $0x4,%eax
jb     123c <i810_debug_915_fence+0x12c>
cmp    $0x5a84,%r8d
je     123c <i810_debug_915_fence+0x12c>
mov    %r8d,%eax
and    $0xfffffff7,%eax
cmp    $0x2582,%eax
sete   %r9b
cmp    $0x2592,%r8d
sete   %cl
cmp    $0x3000,%edx
jl     1384 <i810_debug_915_fence+0x274>
or     %r9b,%cl
jne    123c <i810_debug_915_fence+0x12c>
test   $0x1,%r11b
jne    13bb <i810_debug_915_fence+0x2ab>
lea    0xe48(%rip),%rdx
xor    %eax,%eax
pop    %rbx
jmp    1030 <snprintf@plt>
lea    -0x5902(%r8),%ecx
cmp    $0x29,%ecx
ja     134d <i810_debug_915_fence+0x23d>
movabs $0x3109b3b1311,%rax
bt     %rcx,%rax
jb     123c <i810_debug_915_fence+0x12c>
jmp    134d <i810_debug_915_fence+0x23d>
mov    %r11d,%r9d
and    $0xff00000,%r9d
lea    0x0(,%rbx,4),%r8d
xor    %ecx,%ecx
test   $0x1000,%r11d
cmovne %ebx,%r8d
sete   %cl
xor    $0x59,%ecx
lea    (%r10,%r9,1),%ebx
shr    $0xa,%r10d
lea    0xdb5(%rip),%rdx
xor    %eax,%eax
push   %r10
push   %rbx
call   1030 <snprintf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [53 x i8] c"enabled, %c tiled, %4d pitch, 0x%08x - 0x%08x (%dkb)\00"
@.str.1 = [9 x i8] c"disabled\00"
define void @i810_debug_915_fence(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%15 = load i32, i32* %9
%16 = and i32 %15, 4096
%17 = icmp ne i32 %16, 0
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 89, i32 88
%20 = trunc i32 %19 to i8
store i8 %20, i8* %11
%21 = load i32, i32* %9
%22 = and i32 %21, 112
%23 = ashr i32 %22, 4
%24 = shl i32 128, %23
store i32 %24, i32* %12
%25 = load i32, i32* %9
%26 = and i32 %25, 267386880
store i32 %26, i32* %13
%27 = load i32, i32* %9
%28 = and i32 %27, 1792
%29 = ashr i32 %28, 8
%30 = shl i32 1048576, %29
store i32 %30, i32* %14
%31 = load i32, i32* %10
%32 = icmp eq i32 %31, 10658
br i1 %32, label %474, label %33
33: ; preds = %5
%34 = load i32, i32* %10
%35 = icmp eq i32 %34, 10642
br i1 %35, label %474, label %36
36: ; preds = %33
%37 = load i32, i32* %10
%38 = icmp eq i32 %37, 10626
br i1 %38, label %474, label %39
39: ; preds = %36
%40 = load i32, i32* %10
%41 = icmp eq i32 %40, 10754
br i1 %41, label %474, label %42
42: ; preds = %39
%43 = load i32, i32* %10
%44 = icmp eq i32 %43, 10770
br i1 %44, label %474, label %45
45: ; preds = %42
%46 = load i32, i32* %10
%47 = icmp eq i32 %46, 10610
br i1 %47, label %474, label %48
48: ; preds = %45
%49 = load i32, i32* %10
%50 = icmp eq i32 %49, 11778
br i1 %50, label %474, label %51
51: ; preds = %48
%52 = load i32, i32* %10
%53 = icmp eq i32 %52, 11794
br i1 %53, label %474, label %54
54: ; preds = %51
%55 = load i32, i32* %10
%56 = icmp eq i32 %55, 11810
br i1 %56, label %474, label %57
57: ; preds = %54
%58 = load i32, i32* %10
%59 = icmp eq i32 %58, 11826
br i1 %59, label %474, label %60
60: ; preds = %57
%61 = load i32, i32* %10
%62 = icmp eq i32 %61, 10818
br i1 %62, label %474, label %63
63: ; preds = %60
%64 = load i32, i32* %10
%65 = icmp eq i32 %64, 66
br i1 %65, label %474, label %66
66: ; preds = %63
%67 = load i32, i32* %10
%68 = icmp eq i32 %67, 70
br i1 %68, label %474, label %69
69: ; preds = %66
%70 = load i32, i32* %10
%71 = icmp eq i32 %70, 258
br i1 %71, label %474, label %72
72: ; preds = %69
%73 = load i32, i32* %10
%74 = icmp eq i32 %73, 274
br i1 %74, label %474, label %75
75: ; preds = %72
%76 = load i32, i32* %10
%77 = icmp eq i32 %76, 290
br i1 %77, label %474, label %78
78: ; preds = %75
%79 = load i32, i32* %10
%80 = icmp eq i32 %79, 262
br i1 %80, label %474, label %81
81: ; preds = %78
%82 = load i32, i32* %10
%83 = icmp eq i32 %82, 278
br i1 %83, label %474, label %84
84: ; preds = %81
%85 = load i32, i32* %10
%86 = icmp eq i32 %85, 294
br i1 %86, label %474, label %87
87: ; preds = %84
%88 = load i32, i32* %10
%89 = icmp eq i32 %88, 266
br i1 %89, label %474, label %90
90: ; preds = %87
%91 = load i32, i32* %10
%92 = icmp eq i32 %91, 338
br i1 %92, label %474, label %93
93: ; preds = %90
%94 = load i32, i32* %10
%95 = icmp eq i32 %94, 354
br i1 %95, label %474, label %96
96: ; preds = %93
%97 = load i32, i32* %10
%98 = icmp eq i32 %97, 342
br i1 %98, label %474, label %99
99: ; preds = %96
%100 = load i32, i32* %10
%101 = icmp eq i32 %100, 358
br i1 %101, label %474, label %102
102: ; preds = %99
%103 = load i32, i32* %10
%104 = icmp eq i32 %103, 346
br i1 %104, label %474, label %105
105: ; preds = %102
%106 = load i32, i32* %10
%107 = icmp eq i32 %106, 362
br i1 %107, label %474, label %108
108: ; preds = %105
%109 = load i32, i32* %10
%110 = icmp eq i32 %109, 1026
br i1 %110, label %474, label %111
111: ; preds = %108
%112 = load i32, i32* %10
%113 = icmp eq i32 %112, 1030
br i1 %113, label %474, label %114
114: ; preds = %111
%115 = load i32, i32* %10
%116 = icmp eq i32 %115, 1034
br i1 %116, label %474, label %117
117: ; preds = %114
%118 = load i32, i32* %10
%119 = icmp eq i32 %118, 1035
br i1 %119, label %474, label %120
120: ; preds = %117
%121 = load i32, i32* %10
%122 = icmp eq i32 %121, 1038
br i1 %122, label %474, label %123
123: ; preds = %120
%124 = load i32, i32* %10
%125 = icmp eq i32 %124, 3074
br i1 %125, label %474, label %126
126: ; preds = %123
%127 = load i32, i32* %10
%128 = icmp eq i32 %127, 3078
br i1 %128, label %474, label %129
129: ; preds = %126
%130 = load i32, i32* %10
%131 = icmp eq i32 %130, 3082
br i1 %131, label %474, label %132
132: ; preds = %129
%133 = load i32, i32* %10
%134 = icmp eq i32 %133, 3083
br i1 %134, label %474, label %135
135: ; preds = %132
%136 = load i32, i32* %10
%137 = icmp eq i32 %136, 3086
br i1 %137, label %474, label %138
138: ; preds = %135
%139 = load i32, i32* %10
%140 = icmp eq i32 %139, 2562
br i1 %140, label %474, label %141
141: ; preds = %138
%142 = load i32, i32* %10
%143 = icmp eq i32 %142, 2566
br i1 %143, label %474, label %144
144: ; preds = %141
%145 = load i32, i32* %10
%146 = icmp eq i32 %145, 2570
br i1 %146, label %474, label %147
147: ; preds = %144
%148 = load i32, i32* %10
%149 = icmp eq i32 %148, 2571
br i1 %149, label %474, label %150
150: ; preds = %147
%151 = load i32, i32* %10
%152 = icmp eq i32 %151, 2574
br i1 %152, label %474, label %153
153: ; preds = %150
%154 = load i32, i32* %10
%155 = icmp eq i32 %154, 3330
br i1 %155, label %474, label %156
156: ; preds = %153
%157 = load i32, i32* %10
%158 = icmp eq i32 %157, 3334
br i1 %158, label %474, label %159
159: ; preds = %156
%160 = load i32, i32* %10
%161 = icmp eq i32 %160, 3338
br i1 %161, label %474, label %162
162: ; preds = %159
%163 = load i32, i32* %10
%164 = icmp eq i32 %163, 3339
br i1 %164, label %474, label %165
165: ; preds = %162
%166 = load i32, i32* %10
%167 = icmp eq i32 %166, 3342
br i1 %167, label %474, label %168
168: ; preds = %165
%169 = load i32, i32* %10
%170 = icmp eq i32 %169, 1042
br i1 %170, label %474, label %171
171: ; preds = %168
%172 = load i32, i32* %10
%173 = icmp eq i32 %172, 1046
br i1 %173, label %474, label %174
174: ; preds = %171
%175 = load i32, i32* %10
%176 = icmp eq i32 %175, 1050
br i1 %176, label %474, label %177
177: ; preds = %174
%178 = load i32, i32* %10
%179 = icmp eq i32 %178, 1051
br i1 %179, label %474, label %180
180: ; preds = %177
%181 = load i32, i32* %10
%182 = icmp eq i32 %181, 1054
br i1 %182, label %474, label %183
183: ; preds = %180
%184 = load i32, i32* %10
%185 = icmp eq i32 %184, 3090
br i1 %185, label %474, label %186
186: ; preds = %183
%187 = load i32, i32* %10
%188 = icmp eq i32 %187, 3094
br i1 %188, label %474, label %189
189: ; preds = %186
%190 = load i32, i32* %10
%191 = icmp eq i32 %190, 3098
br i1 %191, label %474, label %192
192: ; preds = %189
%193 = load i32, i32* %10
%194 = icmp eq i32 %193, 3099
br i1 %194, label %474, label %195
195: ; preds = %192
%196 = load i32, i32* %10
%197 = icmp eq i32 %196, 3102
br i1 %197, label %474, label %198
198: ; preds = %195
%199 = load i32, i32* %10
%200 = icmp eq i32 %199, 2578
br i1 %200, label %474, label %201
201: ; preds = %198
%202 = load i32, i32* %10
%203 = icmp eq i32 %202, 2582
br i1 %203, label %474, label %204
204: ; preds = %201
%205 = load i32, i32* %10
%206 = icmp eq i32 %205, 2586
br i1 %206, label %474, label %207
207: ; preds = %204
%208 = load i32, i32* %10
%209 = icmp eq i32 %208, 2587
br i1 %209, label %474, label %210
210: ; preds = %207
%211 = load i32, i32* %10
%212 = icmp eq i32 %211, 2590
br i1 %212, label %474, label %213
213: ; preds = %210
%214 = load i32, i32* %10
%215 = icmp eq i32 %214, 3346
br i1 %215, label %474, label %216
216: ; preds = %213
%217 = load i32, i32* %10
%218 = icmp eq i32 %217, 3350
br i1 %218, label %474, label %219
219: ; preds = %216
%220 = load i32, i32* %10
%221 = icmp eq i32 %220, 3354
br i1 %221, label %474, label %222
222: ; preds = %219
%223 = load i32, i32* %10
%224 = icmp eq i32 %223, 3355
br i1 %224, label %474, label %225
225: ; preds = %222
%226 = load i32, i32* %10
%227 = icmp eq i32 %226, 3358
br i1 %227, label %474, label %228
228: ; preds = %225
%229 = load i32, i32* %10
%230 = icmp eq i32 %229, 1058
br i1 %230, label %474, label %231
231: ; preds = %228
%232 = load i32, i32* %10
%233 = icmp eq i32 %232, 1062
br i1 %233, label %474, label %234
234: ; preds = %231
%235 = load i32, i32* %10
%236 = icmp eq i32 %235, 1066
br i1 %236, label %474, label %237
237: ; preds = %234
%238 = load i32, i32* %10
%239 = icmp eq i32 %238, 1067
br i1 %239, label %474, label %240
240: ; preds = %237
%241 = load i32, i32* %10
%242 = icmp eq i32 %241, 1070
br i1 %242, label %474, label %243
243: ; preds = %240
%244 = load i32, i32* %10
%245 = icmp eq i32 %244, 3106
br i1 %245, label %474, label %246
246: ; preds = %243
%247 = load i32, i32* %10
%248 = icmp eq i32 %247, 3110
br i1 %248, label %474, label %249
249: ; preds = %246
%250 = load i32, i32* %10
%251 = icmp eq i32 %250, 3114
br i1 %251, label %474, label %252
252: ; preds = %249
%253 = load i32, i32* %10
%254 = icmp eq i32 %253, 3115
br i1 %254, label %474, label %255
255: ; preds = %252
%256 = load i32, i32* %10
%257 = icmp eq i32 %256, 3118
br i1 %257, label %474, label %258
258: ; preds = %255
%259 = load i32, i32* %10
%260 = icmp eq i32 %259, 2594
br i1 %260, label %474, label %261
261: ; preds = %258
%262 = load i32, i32* %10
%263 = icmp eq i32 %262, 2598
br i1 %263, label %474, label %264
264: ; preds = %261
%265 = load i32, i32* %10
%266 = icmp eq i32 %265, 2602
br i1 %266, label %474, label %267
267: ; preds = %264
%268 = load i32, i32* %10
%269 = icmp eq i32 %268, 2603
br i1 %269, label %474, label %270
270: ; preds = %267
%271 = load i32, i32* %10
%272 = icmp eq i32 %271, 2606
br i1 %272, label %474, label %273
273: ; preds = %270
%274 = load i32, i32* %10
%275 = icmp eq i32 %274, 3362
br i1 %275, label %474, label %276
276: ; preds = %273
%277 = load i32, i32* %10
%278 = icmp eq i32 %277, 3366
br i1 %278, label %474, label %279
279: ; preds = %276
%280 = load i32, i32* %10
%281 = icmp eq i32 %280, 3370
br i1 %281, label %474, label %282
282: ; preds = %279
%283 = load i32, i32* %10
%284 = icmp eq i32 %283, 3371
br i1 %284, label %474, label %285
285: ; preds = %282
%286 = load i32, i32* %10
%287 = icmp eq i32 %286, 3374
br i1 %287, label %474, label %288
288: ; preds = %285
%289 = load i32, i32* %10
%290 = icmp eq i32 %289, 3888
br i1 %290, label %474, label %291
291: ; preds = %288
%292 = load i32, i32* %10
%293 = icmp eq i32 %292, 3889
br i1 %293, label %474, label %294
294: ; preds = %291
%295 = load i32, i32* %10
%296 = icmp eq i32 %295, 3890
br i1 %296, label %474, label %297
297: ; preds = %294
%298 = load i32, i32* %10
%299 = icmp eq i32 %298, 3891
br i1 %299, label %474, label %300
300: ; preds = %297
%301 = load i32, i32* %10
%302 = and i32 %301, 65280
%303 = icmp ne i32 %302, 5632
br i1 %303, label %304, label %305
304: ; preds = %300
br i1 false, label %474, label %342
305: ; preds = %300
%306 = load i32, i32* %10
%307 = and i32 %306, 240
%308 = ashr i32 %307, 4
%309 = icmp sgt i32 %308, 3
br i1 %309, label %310, label %311
310: ; preds = %305
br i1 false, label %474, label %342
311: ; preds = %305
%312 = load i32, i32* %10
%313 = and i32 %312, 15
%314 = icmp eq i32 %313, 2
br i1 %314, label %315, label %316
315: ; preds = %311
br i1 true, label %474, label %342
316: ; preds = %311
%317 = load i32, i32* %10
%318 = and i32 %317, 15
%319 = icmp eq i32 %318, 6
br i1 %319, label %320, label %321
320: ; preds = %316
br i1 true, label %474, label %342
321: ; preds = %316
%322 = load i32, i32* %10
%323 = and i32 %322, 15
%324 = icmp eq i32 %323, 11
br i1 %324, label %325, label %326
325: ; preds = %321
br i1 true, label %474, label %342
326: ; preds = %321
%327 = load i32, i32* %10
%328 = and i32 %327, 15
%329 = icmp eq i32 %328, 10
br i1 %329, label %330, label %331
330: ; preds = %326
br i1 true, label %474, label %342
331: ; preds = %326
%332 = load i32, i32* %10
%333 = and i32 %332, 15
%334 = icmp eq i32 %333, 13
br i1 %334, label %335, label %336
335: ; preds = %331
br i1 true, label %474, label %342
336: ; preds = %331
%337 = load i32, i32* %10
%338 = and i32 %337, 15
%339 = icmp eq i32 %338, 14
br i1 %339, label %340, label %341
340: ; preds = %336
br i1 true, label %474, label %342
341: ; preds = %336
br i1 false, label %474, label %342
342: ; preds = %341, %340, %335, %330, %325, %320, %315, %310, %304
%343 = load i32, i32* %10
%344 = icmp eq i32 %343, 8880
br i1 %344, label %474, label %345
345: ; preds = %342
%346 = load i32, i32* %10
%347 = icmp eq i32 %346, 8881
br i1 %347, label %474, label %348
348: ; preds = %345
%349 = load i32, i32* %10
%350 = icmp eq i32 %349, 8882
br i1 %350, label %474, label %351
351: ; preds = %348
%352 = load i32, i32* %10
%353 = icmp eq i32 %352, 8883
br i1 %353, label %474, label %354
354: ; preds = %351
%355 = load i32, i32* %10
%356 = icmp eq i32 %355, 22803
br i1 %356, label %474, label %357
357: ; preds = %354
%358 = load i32, i32* %10
%359 = icmp eq i32 %358, 22805
br i1 %359, label %474, label %360
360: ; preds = %357
%361 = load i32, i32* %10
%362 = icmp eq i32 %361, 22807
br i1 %362, label %474, label %363
363: ; preds = %360
%364 = load i32, i32* %10
%365 = icmp eq i32 %364, 22790
br i1 %365, label %474, label %366
366: ; preds = %363
%367 = load i32, i32* %10
%368 = icmp eq i32 %367, 22798
br i1 %368, label %474, label %369
369: ; preds = %366
%370 = load i32, i32* %10
%371 = icmp eq i32 %370, 22786
br i1 %371, label %474, label %372
372: ; preds = %369
%373 = load i32, i32* %10
%374 = icmp eq i32 %373, 22795
br i1 %374, label %474, label %375
375: ; preds = %372
%376 = load i32, i32* %10
%377 = icmp eq i32 %376, 22794
br i1 %377, label %474, label %378
378: ; preds = %375
%379 = load i32, i32* %10
%380 = icmp eq i32 %379, 22806
br i1 %380, label %474, label %381
381: ; preds = %378
%382 = load i32, i32* %10
%383 = icmp eq i32 %382, 22817
br i1 %383, label %474, label %384
384: ; preds = %381
%385 = load i32, i32* %10
%386 = icmp eq i32 %385, 22814
br i1 %386, label %474, label %387
387: ; preds = %384
%388 = load i32, i32* %10
%389 = icmp eq i32 %388, 22802
br i1 %389, label %474, label %390
390: ; preds = %387
%391 = load i32, i32* %10
%392 = icmp eq i32 %391, 22811
br i1 %392, label %474, label %393
393: ; preds = %390
%394 = load i32, i32* %10
%395 = icmp eq i32 %394, 22810
br i1 %395, label %474, label %396
396: ; preds = %393
%397 = load i32, i32* %10
%398 = icmp eq i32 %397, 22813
br i1 %398, label %474, label %399
399: ; preds = %396
%400 = load i32, i32* %10
%401 = icmp eq i32 %400, 22822
br i1 %401, label %474, label %402
402: ; preds = %399
%403 = load i32, i32* %10
%404 = icmp eq i32 %403, 22827
br i1 %404, label %474, label %405
405: ; preds = %402
%406 = load i32, i32* %10
%407 = icmp eq i32 %406, 22826
br i1 %407, label %474, label %408
408: ; preds = %405
%409 = load i32, i32* %10
%410 = icmp eq i32 %409, 6406
br i1 %410, label %474, label %411
411: ; preds = %408
%412 = load i32, i32* %10
%413 = icmp eq i32 %412, 6414
br i1 %413, label %474, label %414
414: ; preds = %411
%415 = load i32, i32* %10
%416 = icmp eq i32 %415, 6402
br i1 %416, label %474, label %417
417: ; preds = %414
%418 = load i32, i32* %10
%419 = icmp eq i32 %418, 6411
br i1 %419, label %474, label %420
420: ; preds = %417
%421 = load i32, i32* %10
%422 = icmp eq i32 %421, 6410
br i1 %422, label %474, label %423
423: ; preds = %420
%424 = load i32, i32* %10
%425 = icmp eq i32 %424, 6422
br i1 %425, label %474, label %426
426: ; preds = %423
%427 = load i32, i32* %10
%428 = icmp eq i32 %427, 6433
br i1 %428, label %474, label %429
429: ; preds = %426
%430 = load i32, i32* %10
%431 = icmp eq i32 %430, 6430
br i1 %431, label %474, label %432
432: ; preds = %429
%433 = load i32, i32* %10
%434 = icmp eq i32 %433, 6418
br i1 %434, label %474, label %435
435: ; preds = %432
%436 = load i32, i32* %10
%437 = icmp eq i32 %436, 6427
br i1 %437, label %474, label %438
438: ; preds = %435
%439 = load i32, i32* %10
%440 = icmp eq i32 %439, 6426
br i1 %440, label %474, label %441
441: ; preds = %438
%442 = load i32, i32* %10
%443 = icmp eq i32 %442, 6429
br i1 %443, label %474, label %444
444: ; preds = %441
%445 = load i32, i32* %10
%446 = icmp eq i32 %445, 6438
br i1 %446, label %474, label %447
447: ; preds = %444
%448 = load i32, i32* %10
%449 = icmp eq i32 %448, 6443
br i1 %449, label %474, label %450
450: ; preds = %447
%451 = load i32, i32* %10
%452 = icmp eq i32 %451, 6442
br i1 %452, label %474, label %453
453: ; preds = %450
%454 = load i32, i32* %10
%455 = icmp eq i32 %454, 2692
br i1 %455, label %474, label %456
456: ; preds = %453
%457 = load i32, i32* %10
%458 = icmp eq i32 %457, 6788
br i1 %458, label %474, label %459
459: ; preds = %456
%460 = load i32, i32* %10
%461 = icmp eq i32 %460, 23172
br i1 %461, label %474, label %462
462: ; preds = %459
%463 = load i32, i32* %10
%464 = icmp eq i32 %463, 9602
br i1 %464, label %471, label %465
465: ; preds = %462
%466 = load i32, i32* %10
%467 = icmp eq i32 %466, 9610
br i1 %467, label %471, label %468
468: ; preds = %465
%469 = load i32, i32* %10
%470 = icmp eq i32 %469, 9618
br i1 %470, label %471, label %475
471: ; preds = %468, %465, %462
%472 = load i32, i32* %8
%473 = icmp sge i32 %472, 12288
br i1 %473, label %474, label %475
474: ; preds = %471, %459, %456, %453, %450, %447, %444, %441, %438, %435, %432, %429, %426, %423, %420, %417, %414, %411, %408, %405, %402, %399, %396, %393, %390, %387, %384, %381, %378, %375, %372, %369, %366, %363, %360, %357, %354, %351, %348, %345, %342, %341, %340, %335, %330, %325, %320, %315, %310, %304, %297, %294, %291, %288, %285, %282, %279, %276, %273, %270, %267, %264, %261, %258, %255, %252, %249, %246, %243, %240, %237, %234, %231, %228, %225, %222, %219, %216, %213, %210, %207, %204, %201, %198, %195, %192, %189, %186, %183, %180, %177, %174, %171, %168, %165, %162, %159, %156, %153, %150, %147, %144, %141, %138, %135, %132, %129, %126, %123, %120, %117, %114, %111, %108, %105, %102, %99, %96, %93, %90, %87, %84, %81, %78, %75, %72, %69, %66, %63, %60, %57, %54, %51, %48, %45, %42, %39, %36, %33, %5
br label %503
475: ; preds = %471, %468
%476 = load i8, i8* %11
%477 = sext i8 %476 to i32
%478 = icmp eq i32 %477, 88
br i1 %478, label %479, label %482
479: ; preds = %475
%480 = load i32, i32* %12
%481 = mul nsw i32 %480, 4
store i32 %481, i32* %12
br label %482
482: ; preds = %479, %475
%483 = load i32, i32* %9
%484 = and i32 %483, 1
%485 = icmp ne i32 %484, 0
br i1 %485, label %486, label %499
486: ; preds = %482
%487 = load i8*, i8** %6
%488 = load i32, i32* %7
%489 = load i8, i8* %11
%490 = sext i8 %489 to i32
%491 = load i32, i32* %12
%492 = load i32, i32* %13
%493 = load i32, i32* %13
%494 = load i32, i32* %14
%495 = add i32 %493, %494
%496 = load i32, i32* %14
%497 = sdiv i32 %496, 1024
%498 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %487, i32 %488, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %490, i32 %491, i32 %492, i32 %495, i32 %497)
br label %503
499: ; preds = %482
%500 = load i8*, i8** %6
%501 = load i32, i32* %7
%502 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %500, i32 %501, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %503
503: ; preds = %474, %499, %486
ret void
}

LLVM IR (-O2):
@.str = [53 x i8] c"enabled, %c tiled, %4d pitch, 0x%08x - 0x%08x (%dkb)\00"
@.str.1 = [9 x i8] c"disabled\00"
define void @i810_debug_915_fence(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = and i32 %3, 4096
%7 = icmp eq i32 %6, 0
%8 = lshr i32 %3, 4
%9 = and i32 %8, 7
%10 = shl nuw nsw i32 128, %9
%11 = and i32 %3, 267386880
%12 = lshr i32 %3, 8
%13 = and i32 %12, 7
%14 = shl nuw nsw i32 1048576, %13
switch i32 %4, label %15 [
i32 11826, label %45
i32 11810, label %45
i32 11794, label %45
i32 11778, label %45
i32 10818, label %45
i32 10770, label %45
i32 10754, label %45
i32 10658, label %45
i32 10642, label %45
i32 10626, label %45
i32 10610, label %45
i32 3891, label %45
i32 3890, label %45
i32 3889, label %45
i32 3888, label %45
i32 3374, label %45
i32 3371, label %45
i32 3370, label %45
i32 3366, label %45
i32 3362, label %45
i32 3358, label %45
i32 3355, label %45
i32 3354, label %45
i32 3350, label %45
i32 3346, label %45
i32 3342, label %45
i32 3339, label %45
i32 3338, label %45
i32 3334, label %45
i32 3330, label %45
i32 3118, label %45
i32 3115, label %45
i32 3114, label %45
i32 3110, label %45
i32 3106, label %45
i32 3102, label %45
i32 3099, label %45
i32 3098, label %45
i32 3094, label %45
i32 3090, label %45
i32 3086, label %45
i32 3083, label %45
i32 3082, label %45
i32 3078, label %45
i32 3074, label %45
i32 2606, label %45
i32 2603, label %45
i32 2602, label %45
i32 2598, label %45
i32 2594, label %45
i32 2590, label %45
i32 2587, label %45
i32 2586, label %45
i32 2582, label %45
i32 2578, label %45
i32 2574, label %45
i32 2571, label %45
i32 2570, label %45
i32 2566, label %45
i32 2562, label %45
i32 1070, label %45
i32 1067, label %45
i32 1066, label %45
i32 1062, label %45
i32 1058, label %45
i32 1054, label %45
i32 1051, label %45
i32 1050, label %45
i32 1046, label %45
i32 1042, label %45
i32 1038, label %45
i32 1035, label %45
i32 1034, label %45
i32 1030, label %45
i32 1026, label %45
i32 362, label %45
i32 358, label %45
i32 354, label %45
i32 346, label %45
i32 342, label %45
i32 338, label %45
i32 294, label %45
i32 290, label %45
i32 278, label %45
i32 274, label %45
i32 266, label %45
i32 262, label %45
i32 258, label %45
i32 70, label %45
i32 66, label %45
]
15: ; preds = %5
%16 = and i32 %4, 65472
%17 = icmp eq i32 %16, 5632
br i1 %17, label %18, label %24
18: ; preds = %15
%19 = and i32 %4, 15
switch i32 %19, label %20 [
i32 2, label %45
i32 6, label %45
i32 11, label %45
i32 10, label %45
i32 13, label %45
]
20: ; preds = %18
%21 = icmp eq i32 %19, 14
%22 = icmp eq i32 %4, 8880
%23 = or i1 %22, %21
br i1 %23, label %45, label %25
24: ; preds = %15
switch i32 %4, label %26 [
i32 8880, label %45
i32 23172, label %45
i32 22827, label %45
i32 22826, label %45
i32 22822, label %45
i32 22817, label %45
i32 22814, label %45
i32 22813, label %45
i32 22811, label %45
i32 22810, label %45
i32 22807, label %45
i32 22806, label %45
i32 22805, label %45
i32 22803, label %45
i32 22802, label %45
i32 22798, label %45
i32 22795, label %45
i32 22794, label %45
i32 22790, label %45
i32 22786, label %45
i32 8883, label %45
i32 8882, label %45
i32 8881, label %45
i32 6788, label %45
i32 6443, label %45
i32 6442, label %45
i32 6438, label %45
i32 6433, label %45
i32 6430, label %45
i32 6429, label %45
i32 6427, label %45
i32 6426, label %45
i32 6422, label %45
i32 6418, label %45
i32 6414, label %45
i32 6411, label %45
i32 6410, label %45
i32 6406, label %45
i32 6402, label %45
i32 2692, label %45
]
25: ; preds = %20
switch i32 %4, label %26 [
i32 23172, label %45
i32 22827, label %45
i32 22826, label %45
i32 22822, label %45
i32 22817, label %45
i32 22814, label %45
i32 22813, label %45
i32 22811, label %45
i32 22810, label %45
i32 22807, label %45
i32 22806, label %45
i32 22805, label %45
i32 22803, label %45
i32 22802, label %45
i32 22798, label %45
i32 22795, label %45
i32 22794, label %45
i32 22790, label %45
i32 22786, label %45
i32 8883, label %45
i32 8882, label %45
i32 8881, label %45
i32 6788, label %45
i32 6443, label %45
i32 6442, label %45
i32 6438, label %45
i32 6433, label %45
i32 6430, label %45
i32 6429, label %45
i32 6427, label %45
i32 6426, label %45
i32 6422, label %45
i32 6418, label %45
i32 6414, label %45
i32 6411, label %45
i32 6410, label %45
i32 6406, label %45
i32 6402, label %45
]
26: ; preds = %24, %25
%27 = and i32 %4, -9
%28 = icmp eq i32 %27, 9602
%29 = icmp eq i32 %4, 9618
%30 = or i1 %29, %28
%31 = icmp sgt i32 %2, 12287
%32 = and i1 %31, %30
br i1 %32, label %45, label %33
33: ; preds = %26
%34 = and i32 %3, 1
%35 = icmp eq i32 %34, 0
br i1 %35, label %43, label %36
36: ; preds = %33
%37 = shl nuw nsw i32 %10, 2
%38 = select i1 %7, i32 %37, i32 %10
%39 = select i1 %7, i32 88, i32 89
%40 = add nuw nsw i32 %14, %11
%41 = lshr exact i32 %14, 10
%42 = tail call i32 (i8*, i32, i8*, ...) @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %39, i32 %38, i32 %11, i32 %40, i32 %41)
br label %45
43: ; preds = %33
%44 = tail call i32 (i8*, i32, i8*, ...) @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %45
45: ; preds = %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %24, %36, %43, %20, %26, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %5, %18, %18, %18, %18, %18, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25, %25
ret void
}