#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 */

/* Variables and functions */
int /*<<< orphan*/ fail(int);
int /*<<< orphan*/ report_device(int);
int /*<<< orphan*/ report_subtest(unsigned int);
void l34stat_test(unsigned int addr, unsigned char l3) {
  unsigned char ncnt;
  volatile unsigned int *val, *ctrl;
  unsigned int i, tmp;
  val = (unsigned int *)(addr + 0x00);
  ctrl = (unsigned int *)(addr + 0x100);
  if (l3) {
    report_device(0x01098000);
  } else {
    report_device(0x01047000);
  }
  *ctrl = 0;
  ncnt = ((*ctrl >> 23) & 0x3f) + 1;
  for (i = 0; i < ncnt; i++) {
    report_subtest(i);
    ctrl[i] = 0;
    val[i] = 0;
    ctrl[i] = ((1 << 17) | (1 << 16) | (0x3 << 14) | (0xff << 4) | (0xf << 0));
    tmp = ctrl[i];
    if (((tmp & ((1 << 17) | (1 << 16))) && !(tmp & (1 << 22))) ||
        (!(tmp & ((1 << 17) | (1 << 16))) && (tmp & (1 << 22))))
      fail(0);
    if (((tmp >> 14) & 0x3) != 0x3)
      fail(1);
    if (tmp & (1 << 13))
      fail(2);
    if (tmp & (1 << 12))
      fail(3);
    if (((tmp & ((1 << 20) | (1 << 19))) &&
         (((tmp >> 4) & 0xff & 0x7f) != 0x7f)) ||
        (!(tmp & ((1 << 20) | (1 << 19))) && (((tmp >> 4) & 0xff) != 0x3f)))
      fail(4);
    if (((tmp >> 0) & 0xf) != 0xf)
      fail(5);
    if (val[i])
      fail(6);
    val[i] = 0xa5a5a5a5;
    if (val[i] != 0xa5a5a5a5)
      fail(7);
    val[i] = 0x5a5a5a5a;
    if (val[i] != 0x5a5a5a5a)
      fail(8);
    val[i] = 0;
    ctrl[i] = (1 << 12) | (0x11 << 4);
    if (!(ctrl[i] & (1 << 12)))
      fail(9);
    if (!val[i])
      fail(10);
    ctrl[i] |= (1 << 13);
    if (!val[i] || !val[i])
      fail(11);
    ctrl[i] &= ~(1 << 12);
    if (val[i] && val[i])
      fail(12);
    ctrl[i] = 0;
  }
}


x86 assembly (clang, -O0):
<l34stat_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
add    $0x0,%eax
mov    %eax,%eax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x100,%eax
mov    %eax,%eax
mov    %rax,-0x18(%rbp)
cmpb   $0x0,-0x5(%rbp)
je     1174 <l34stat_test+0x44>
mov    $0x1098000,%edi
call   1030 <report_device@plt>
jmp    117e <l34stat_test+0x4e>
mov    $0x1047000,%edi
call   1030 <report_device@plt>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
shr    $0x17,%eax
and    $0x3f,%eax
add    $0x1,%eax
mov    %al,-0x6(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
movzbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jae    1473 <l34stat_test+0x343>
mov    -0x1c(%rbp),%edi
call   1040 <report_subtest@plt>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movl   $0x0,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movl   $0x3cfff,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
and    $0x30000,%eax
cmp    $0x0,%eax
je     1211 <l34stat_test+0xe1>
mov    -0x20(%rbp),%eax
and    $0x400000,%eax
cmp    $0x0,%eax
je     1233 <l34stat_test+0x103>
mov    -0x20(%rbp),%eax
and    $0x30000,%eax
cmp    $0x0,%eax
jne    123a <l34stat_test+0x10a>
mov    -0x20(%rbp),%eax
and    $0x400000,%eax
cmp    $0x0,%eax
je     123a <l34stat_test+0x10a>
xor    %edi,%edi
call   1050 <fail@plt>
mov    -0x20(%rbp),%eax
shr    $0xe,%eax
and    $0x3,%eax
cmp    $0x3,%eax
je     1256 <l34stat_test+0x126>
mov    $0x1,%edi
call   1050 <fail@plt>
mov    -0x20(%rbp),%eax
and    $0x2000,%eax
cmp    $0x0,%eax
je     1271 <l34stat_test+0x141>
mov    $0x2,%edi
call   1050 <fail@plt>
mov    -0x20(%rbp),%eax
and    $0x1000,%eax
cmp    $0x0,%eax
je     128c <l34stat_test+0x15c>
mov    $0x3,%edi
call   1050 <fail@plt>
mov    -0x20(%rbp),%eax
and    $0x180000,%eax
cmp    $0x0,%eax
je     12b4 <l34stat_test+0x184>
mov    -0x20(%rbp),%eax
shr    $0x4,%eax
and    $0xff,%eax
and    $0x7f,%eax
cmp    $0x7f,%eax
jne    12d9 <l34stat_test+0x1a9>
mov    -0x20(%rbp),%eax
and    $0x180000,%eax
cmp    $0x0,%eax
jne    12e3 <l34stat_test+0x1b3>
mov    -0x20(%rbp),%eax
shr    $0x4,%eax
and    $0xff,%eax
cmp    $0x3f,%eax
je     12e3 <l34stat_test+0x1b3>
mov    $0x4,%edi
call   1050 <fail@plt>
mov    -0x20(%rbp),%eax
shr    $0x0,%eax
and    $0xf,%eax
cmp    $0xf,%eax
je     12ff <l34stat_test+0x1cf>
mov    $0x5,%edi
call   1050 <fail@plt>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
cmp    $0x0,%eax
je     131c <l34stat_test+0x1ec>
mov    $0x6,%edi
call   1050 <fail@plt>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movl   $0xa5a5a5a5,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
cmp    $0xa5a5a5a5,%eax
je     1349 <l34stat_test+0x219>
mov    $0x7,%edi
call   1050 <fail@plt>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movl   $0x5a5a5a5a,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
cmp    $0x5a5a5a5a,%eax
je     1376 <l34stat_test+0x246>
mov    $0x8,%edi
call   1050 <fail@plt>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movl   $0x0,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movl   $0x1110,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
and    $0x1000,%eax
cmp    $0x0,%eax
jne    13b4 <l34stat_test+0x284>
mov    $0x9,%edi
call   1050 <fail@plt>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
cmp    $0x0,%eax
jne    13d1 <l34stat_test+0x2a1>
mov    $0xa,%edi
call   1050 <fail@plt>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    (%rax,%rcx,4),%edx
or     $0x2000,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
cmp    $0x0,%eax
je     140a <l34stat_test+0x2da>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
cmp    $0x0,%eax
jne    1414 <l34stat_test+0x2e4>
mov    $0xb,%edi
call   1050 <fail@plt>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    (%rax,%rcx,4),%edx
and    $0xffffefff,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
cmp    $0x0,%eax
je     1457 <l34stat_test+0x327>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
cmp    $0x0,%eax
je     1457 <l34stat_test+0x327>
mov    $0xc,%edi
call   1050 <fail@plt>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movl   $0x0,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a1 <l34stat_test+0x71>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l34stat_test>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edi,%r14d
mov    %edi,%r15d
add    $0x100,%r14d
test   %esi,%esi
mov    $0x1047000,%eax
mov    $0x1098000,%edi
cmove  %eax,%edi
call   1030 <report_device@plt>
movl   $0x0,(%r14)
mov    (%r14),%r12d
shr    $0x17,%r12d
and    $0x3f,%r12d
add    $0x1,%r12
xor    %ebx,%ebx
jmp    1195 <l34stat_test+0x65>
cs nopw 0x0(%rax,%rax,1)
movl   $0x0,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r12
je     1351 <l34stat_test+0x221>
mov    %ebx,%edi
call   1040 <report_subtest@plt>
movl   $0x0,(%r14,%rbx,4)
movl   $0x0,(%r15,%rbx,4)
movl   $0x3cfff,(%r14,%rbx,4)
mov    (%r14,%rbx,4),%ebp
test   $0x30000,%ebp
setne  %al
test   $0x400000,%ebp
sete   %cl
test   %cl,%al
jne    11dc <l34stat_test+0xac>
mov    %ebp,%eax
and    $0x430000,%eax
cmp    $0x400000,%eax
jne    11e3 <l34stat_test+0xb3>
xor    %edi,%edi
call   1050 <fail@plt>
mov    %ebp,%r13d
not    %r13d
test   $0xc000,%r13d
jne    1210 <l34stat_test+0xe0>
test   $0x2000,%ebp
jne    1222 <l34stat_test+0xf2>
test   $0x1000,%ebp
jne    1234 <l34stat_test+0x104>
test   $0x180000,%ebp
jne    1246 <l34stat_test+0x116>
jmp    1254 <l34stat_test+0x124>
nopl   0x0(%rax)
mov    $0x1,%edi
call   1050 <fail@plt>
test   $0x2000,%ebp
je     11fa <l34stat_test+0xca>
mov    $0x2,%edi
call   1050 <fail@plt>
test   $0x1000,%ebp
je     1202 <l34stat_test+0xd2>
mov    $0x3,%edi
call   1050 <fail@plt>
test   $0x180000,%ebp
je     1254 <l34stat_test+0x124>
mov    %ebp,%eax
and    $0x7f0,%eax
cmp    $0x7f0,%eax
jne    126a <l34stat_test+0x13a>
test   $0x180000,%ebp
jne    1274 <l34stat_test+0x144>
and    $0xff0,%ebp
cmp    $0x3f0,%ebp
je     1274 <l34stat_test+0x144>
mov    $0x4,%edi
call   1050 <fail@plt>
test   $0xf,%r13b
je     1284 <l34stat_test+0x154>
mov    $0x5,%edi
call   1050 <fail@plt>
cmpl   $0x0,(%r15,%rbx,4)
je     1295 <l34stat_test+0x165>
mov    $0x6,%edi
call   1050 <fail@plt>
movl   $0xa5a5a5a5,(%r15,%rbx,4)
a5
mov    (%r15,%rbx,4),%eax
cmp    $0xa5a5a5a5,%eax
je     12b2 <l34stat_test+0x182>
mov    $0x7,%edi
call   1050 <fail@plt>
movl   $0x5a5a5a5a,(%r15,%rbx,4)
5a
mov    (%r15,%rbx,4),%eax
cmp    $0x5a5a5a5a,%eax
je     12cf <l34stat_test+0x19f>
mov    $0x8,%edi
call   1050 <fail@plt>
movl   $0x0,(%r15,%rbx,4)
movl   $0x1110,(%r14,%rbx,4)
testl  $0x1000,(%r14,%rbx,4)
jne    12f3 <l34stat_test+0x1c3>
mov    $0x9,%edi
call   1050 <fail@plt>
cmpl   $0x0,(%r15,%rbx,4)
jne    1304 <l34stat_test+0x1d4>
mov    $0xa,%edi
call   1050 <fail@plt>
orl    $0x2000,(%r14,%rbx,4)
cmpl   $0x0,(%r15,%rbx,4)
je     131a <l34stat_test+0x1ea>
cmpl   $0x0,(%r15,%rbx,4)
jne    1324 <l34stat_test+0x1f4>
mov    $0xb,%edi
call   1050 <fail@plt>
andl   $0xffffefff,(%r14,%rbx,4)
ff
cmpl   $0x0,(%r15,%rbx,4)
je     1180 <l34stat_test+0x50>
cmpl   $0x0,(%r15,%rbx,4)
je     1180 <l34stat_test+0x50>
mov    $0xc,%edi
call   1050 <fail@plt>
jmp    1180 <l34stat_test+0x50>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @l34stat_test(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %3
store i8 %1, i8* %4
%10 = load i32, i32* %3
%11 = add i32 %10, 0
%12 = zext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store i32* %13, i32** %6
%14 = load i32, i32* %3
%15 = add i32 %14, 256
%16 = zext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
store i32* %17, i32** %7
%18 = load i8, i8* %4
%19 = icmp ne i8 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 @report_device(i32 17399808)
br label %24
22: ; preds = %2
%23 = call i32 @report_device(i32 17068032)
br label %24
24: ; preds = %22, %20
%25 = load i32*, i32** %7
store volatile i32 0, i32* %25
%26 = load i32*, i32** %7
%27 = load volatile i32, i32* %26
%28 = lshr i32 %27, 23
%29 = and i32 %28, 63
%30 = add i32 %29, 1
%31 = trunc i32 %30 to i8
store i8 %31, i8* %5
store i32 0, i32* %8
br label %32
32: ; preds = %232, %24
%33 = load i32, i32* %8
%34 = load i8, i8* %5
%35 = zext i8 %34 to i32
%36 = icmp ult i32 %33, %35
br i1 %36, label %37, label %235
37: ; preds = %32
%38 = load i32, i32* %8
%39 = call i32 @report_subtest(i32 %38)
%40 = load i32*, i32** %7
%41 = load i32, i32* %8
%42 = zext i32 %41 to i64
%43 = getelementptr inbounds i32, i32* %40, i64 %42
store volatile i32 0, i32* %43
%44 = load i32*, i32** %6
%45 = load i32, i32* %8
%46 = zext i32 %45 to i64
%47 = getelementptr inbounds i32, i32* %44, i64 %46
store volatile i32 0, i32* %47
%48 = load i32*, i32** %7
%49 = load i32, i32* %8
%50 = zext i32 %49 to i64
%51 = getelementptr inbounds i32, i32* %48, i64 %50
store volatile i32 249855, i32* %51
%52 = load i32*, i32** %7
%53 = load i32, i32* %8
%54 = zext i32 %53 to i64
%55 = getelementptr inbounds i32, i32* %52, i64 %54
%56 = load volatile i32, i32* %55
store i32 %56, i32* %9
%57 = load i32, i32* %9
%58 = and i32 %57, 196608
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %64
60: ; preds = %37
%61 = load i32, i32* %9
%62 = and i32 %61, 4194304
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %72
64: ; preds = %60, %37
%65 = load i32, i32* %9
%66 = and i32 %65, 196608
%67 = icmp ne i32 %66, 0
br i1 %67, label %74, label %68
68: ; preds = %64
%69 = load i32, i32* %9
%70 = and i32 %69, 4194304
%71 = icmp ne i32 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %68, %60
%73 = call i32 @fail(i32 0)
br label %74
74: ; preds = %72, %68, %64
%75 = load i32, i32* %9
%76 = lshr i32 %75, 14
%77 = and i32 %76, 3
%78 = icmp ne i32 %77, 3
br i1 %78, label %79, label %81
79: ; preds = %74
%80 = call i32 @fail(i32 1)
br label %81
81: ; preds = %79, %74
%82 = load i32, i32* %9
%83 = and i32 %82, 8192
%84 = icmp ne i32 %83, 0
br i1 %84, label %85, label %87
85: ; preds = %81
%86 = call i32 @fail(i32 2)
br label %87
87: ; preds = %85, %81
%88 = load i32, i32* %9
%89 = and i32 %88, 4096
%90 = icmp ne i32 %89, 0
br i1 %90, label %91, label %93
91: ; preds = %87
%92 = call i32 @fail(i32 3)
br label %93
93: ; preds = %91, %87
%94 = load i32, i32* %9
%95 = and i32 %94, 1572864
%96 = icmp ne i32 %95, 0
br i1 %96, label %97, label %103
97: ; preds = %93
%98 = load i32, i32* %9
%99 = lshr i32 %98, 4
%100 = and i32 %99, 255
%101 = and i32 %100, 127
%102 = icmp ne i32 %101, 127
br i1 %102, label %112, label %103
103: ; preds = %97, %93
%104 = load i32, i32* %9
%105 = and i32 %104, 1572864
%106 = icmp ne i32 %105, 0
br i1 %106, label %114, label %107
107: ; preds = %103
%108 = load i32, i32* %9
%109 = lshr i32 %108, 4
%110 = and i32 %109, 255
%111 = icmp ne i32 %110, 63
br i1 %111, label %112, label %114
112: ; preds = %107, %97
%113 = call i32 @fail(i32 4)
br label %114
114: ; preds = %112, %107, %103
%115 = load i32, i32* %9
%116 = lshr i32 %115, 0
%117 = and i32 %116, 15
%118 = icmp ne i32 %117, 15
br i1 %118, label %119, label %121
119: ; preds = %114
%120 = call i32 @fail(i32 5)
br label %121
121: ; preds = %119, %114
%122 = load i32*, i32** %6
%123 = load i32, i32* %8
%124 = zext i32 %123 to i64
%125 = getelementptr inbounds i32, i32* %122, i64 %124
%126 = load volatile i32, i32* %125
%127 = icmp ne i32 %126, 0
br i1 %127, label %128, label %130
128: ; preds = %121
%129 = call i32 @fail(i32 6)
br label %130
130: ; preds = %128, %121
%131 = load i32*, i32** %6
%132 = load i32, i32* %8
%133 = zext i32 %132 to i64
%134 = getelementptr inbounds i32, i32* %131, i64 %133
store volatile i32 -1515870811, i32* %134
%135 = load i32*, i32** %6
%136 = load i32, i32* %8
%137 = zext i32 %136 to i64
%138 = getelementptr inbounds i32, i32* %135, i64 %137
%139 = load volatile i32, i32* %138
%140 = icmp ne i32 %139, -1515870811
br i1 %140, label %141, label %143
141: ; preds = %130
%142 = call i32 @fail(i32 7)
br label %143
143: ; preds = %141, %130
%144 = load i32*, i32** %6
%145 = load i32, i32* %8
%146 = zext i32 %145 to i64
%147 = getelementptr inbounds i32, i32* %144, i64 %146
store volatile i32 1515870810, i32* %147
%148 = load i32*, i32** %6
%149 = load i32, i32* %8
%150 = zext i32 %149 to i64
%151 = getelementptr inbounds i32, i32* %148, i64 %150
%152 = load volatile i32, i32* %151
%153 = icmp ne i32 %152, 1515870810
br i1 %153, label %154, label %156
154: ; preds = %143
%155 = call i32 @fail(i32 8)
br label %156
156: ; preds = %154, %143
%157 = load i32*, i32** %6
%158 = load i32, i32* %8
%159 = zext i32 %158 to i64
%160 = getelementptr inbounds i32, i32* %157, i64 %159
store volatile i32 0, i32* %160
%161 = load i32*, i32** %7
%162 = load i32, i32* %8
%163 = zext i32 %162 to i64
%164 = getelementptr inbounds i32, i32* %161, i64 %163
store volatile i32 4368, i32* %164
%165 = load i32*, i32** %7
%166 = load i32, i32* %8
%167 = zext i32 %166 to i64
%168 = getelementptr inbounds i32, i32* %165, i64 %167
%169 = load volatile i32, i32* %168
%170 = and i32 %169, 4096
%171 = icmp ne i32 %170, 0
br i1 %171, label %174, label %172
172: ; preds = %156
%173 = call i32 @fail(i32 9)
br label %174
174: ; preds = %172, %156
%175 = load i32*, i32** %6
%176 = load i32, i32* %8
%177 = zext i32 %176 to i64
%178 = getelementptr inbounds i32, i32* %175, i64 %177
%179 = load volatile i32, i32* %178
%180 = icmp ne i32 %179, 0
br i1 %180, label %183, label %181
181: ; preds = %174
%182 = call i32 @fail(i32 10)
br label %183
183: ; preds = %181, %174
%184 = load i32*, i32** %7
%185 = load i32, i32* %8
%186 = zext i32 %185 to i64
%187 = getelementptr inbounds i32, i32* %184, i64 %186
%188 = load volatile i32, i32* %187
%189 = or i32 %188, 8192
store volatile i32 %189, i32* %187
%190 = load i32*, i32** %6
%191 = load i32, i32* %8
%192 = zext i32 %191 to i64
%193 = getelementptr inbounds i32, i32* %190, i64 %192
%194 = load volatile i32, i32* %193
%195 = icmp ne i32 %194, 0
br i1 %195, label %196, label %203
196: ; preds = %183
%197 = load i32*, i32** %6
%198 = load i32, i32* %8
%199 = zext i32 %198 to i64
%200 = getelementptr inbounds i32, i32* %197, i64 %199
%201 = load volatile i32, i32* %200
%202 = icmp ne i32 %201, 0
br i1 %202, label %205, label %203
203: ; preds = %196, %183
%204 = call i32 @fail(i32 11)
br label %205
205: ; preds = %203, %196
%206 = load i32*, i32** %7
%207 = load i32, i32* %8
%208 = zext i32 %207 to i64
%209 = getelementptr inbounds i32, i32* %206, i64 %208
%210 = load volatile i32, i32* %209
%211 = and i32 %210, -4097
store volatile i32 %211, i32* %209
%212 = load i32*, i32** %6
%213 = load i32, i32* %8
%214 = zext i32 %213 to i64
%215 = getelementptr inbounds i32, i32* %212, i64 %214
%216 = load volatile i32, i32* %215
%217 = icmp ne i32 %216, 0
br i1 %217, label %218, label %227
218: ; preds = %205
%219 = load i32*, i32** %6
%220 = load i32, i32* %8
%221 = zext i32 %220 to i64
%222 = getelementptr inbounds i32, i32* %219, i64 %221
%223 = load volatile i32, i32* %222
%224 = icmp ne i32 %223, 0
br i1 %224, label %225, label %227
225: ; preds = %218
%226 = call i32 @fail(i32 12)
br label %227
227: ; preds = %225, %218, %205
%228 = load i32*, i32** %7
%229 = load i32, i32* %8
%230 = zext i32 %229 to i64
%231 = getelementptr inbounds i32, i32* %228, i64 %230
store volatile i32 0, i32* %231
br label %232
232: ; preds = %227
%233 = load i32, i32* %8
%234 = add i32 %233, 1
store i32 %234, i32* %8
br label %32
235: ; preds = %32
ret void
}

LLVM IR (-O2):
define void @l34stat_test(i32 %0, i8 zeroext %1) {
%3 = zext i32 %0 to i64
%4 = inttoptr i64 %3 to i32*
%5 = add i32 %0, 256
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = icmp eq i8 %1, 0
%9 = select i1 %8, i32 17068032, i32 17399808
%10 = tail call i32 @report_device(i32 %9)
store volatile i32 0, i32* %7
%11 = load volatile i32, i32* %7
%12 = lshr i32 %11, 23
%13 = and i32 %12, 63
%14 = add nuw nsw i32 %13, 1
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %2, %112
%17 = phi i64 [ 0, %2 ], [ %113, %112 ]
%18 = trunc i64 %17 to i32
%19 = tail call i32 @report_subtest(i32 %18)
%20 = getelementptr inbounds i32, i32* %7, i64 %17
store volatile i32 0, i32* %20
%21 = getelementptr inbounds i32, i32* %4, i64 %17
store volatile i32 0, i32* %21
store volatile i32 249855, i32* %20
%22 = load volatile i32, i32* %20
%23 = and i32 %22, 196608
%24 = icmp ne i32 %23, 0
%25 = and i32 %22, 4194304
%26 = icmp eq i32 %25, 0
%27 = and i1 %24, %26
%28 = and i32 %22, 4390912
%29 = icmp eq i32 %28, 4194304
%30 = select i1 %27, i1 true, i1 %29
br i1 %30, label %31, label %33
31: ; preds = %16
%32 = tail call i32 @fail(i32 0)
br label %33
33: ; preds = %16, %31
%34 = and i32 %22, 49152
%35 = icmp eq i32 %34, 49152
br i1 %35, label %38, label %36
36: ; preds = %33
%37 = tail call i32 @fail(i32 1)
br label %38
38: ; preds = %36, %33
%39 = and i32 %22, 8192
%40 = icmp eq i32 %39, 0
br i1 %40, label %43, label %41
41: ; preds = %38
%42 = tail call i32 @fail(i32 2)
br label %43
43: ; preds = %41, %38
%44 = and i32 %22, 4096
%45 = icmp eq i32 %44, 0
br i1 %45, label %48, label %46
46: ; preds = %43
%47 = tail call i32 @fail(i32 3)
br label %48
48: ; preds = %46, %43
%49 = and i32 %22, 1572864
%50 = icmp eq i32 %49, 0
%51 = and i32 %22, 2032
%52 = icmp eq i32 %51, 2032
%53 = or i1 %50, %52
br i1 %53, label %54, label %59
54: ; preds = %48
%55 = xor i1 %50, true
%56 = and i32 %22, 4080
%57 = icmp eq i32 %56, 1008
%58 = select i1 %55, i1 true, i1 %57
br i1 %58, label %61, label %59
59: ; preds = %54, %48
%60 = tail call i32 @fail(i32 4)
br label %61
61: ; preds = %59, %54
%62 = and i32 %22, 15
%63 = icmp eq i32 %62, 15
br i1 %63, label %66, label %64
64: ; preds = %61
%65 = tail call i32 @fail(i32 5)
br label %66
66: ; preds = %64, %61
%67 = load volatile i32, i32* %21
%68 = icmp eq i32 %67, 0
br i1 %68, label %71, label %69
69: ; preds = %66
%70 = tail call i32 @fail(i32 6)
br label %71
71: ; preds = %69, %66
store volatile i32 -1515870811, i32* %21
%72 = load volatile i32, i32* %21
%73 = icmp eq i32 %72, -1515870811
br i1 %73, label %76, label %74
74: ; preds = %71
%75 = tail call i32 @fail(i32 7)
br label %76
76: ; preds = %74, %71
store volatile i32 1515870810, i32* %21
%77 = load volatile i32, i32* %21
%78 = icmp eq i32 %77, 1515870810
br i1 %78, label %81, label %79
79: ; preds = %76
%80 = tail call i32 @fail(i32 8)
br label %81
81: ; preds = %79, %76
store volatile i32 0, i32* %21
store volatile i32 4368, i32* %20
%82 = load volatile i32, i32* %20
%83 = and i32 %82, 4096
%84 = icmp eq i32 %83, 0
br i1 %84, label %85, label %87
85: ; preds = %81
%86 = tail call i32 @fail(i32 9)
br label %87
87: ; preds = %85, %81
%88 = load volatile i32, i32* %21
%89 = icmp eq i32 %88, 0
br i1 %89, label %90, label %92
90: ; preds = %87
%91 = tail call i32 @fail(i32 10)
br label %92
92: ; preds = %90, %87
%93 = load volatile i32, i32* %20
%94 = or i32 %93, 8192
store volatile i32 %94, i32* %20
%95 = load volatile i32, i32* %21
%96 = icmp eq i32 %95, 0
br i1 %96, label %100, label %97
97: ; preds = %92
%98 = load volatile i32, i32* %21
%99 = icmp eq i32 %98, 0
br i1 %99, label %100, label %102
100: ; preds = %97, %92
%101 = tail call i32 @fail(i32 11)
br label %102
102: ; preds = %100, %97
%103 = load volatile i32, i32* %20
%104 = and i32 %103, -4097
store volatile i32 %104, i32* %20
%105 = load volatile i32, i32* %21
%106 = icmp eq i32 %105, 0
br i1 %106, label %112, label %107
107: ; preds = %102
%108 = load volatile i32, i32* %21
%109 = icmp eq i32 %108, 0
br i1 %109, label %112, label %110
110: ; preds = %107
%111 = tail call i32 @fail(i32 12)
br label %112
112: ; preds = %110, %107, %102
store volatile i32 0, i32* %20
%113 = add nuw nsw i64 %17, 1
%114 = icmp eq i64 %113, %15
br i1 %114, label %115, label %16
115: ; preds = %112
ret void
}