test60() {
  char *addr, *addr2, *addr3;
  int i, del, click, click2;
  addr = sbrk(0);
  addr = sbrk(0);
  for (i = 0; i < 10; i++)
    sbrk(7 * i);
  for (i = 0; i < 10; i++)
    sbrk(-7 * i);
  if (sbrk(0) != addr)
    e(1);
  sbrk(30);
  if (brk(addr) != 0)
    e(2);
  if (sbrk(0) != addr)
    e(3);
  del = 0;
  do {
    del++;
    brk(addr + del);
    addr2 = sbrk(0);
  } while (addr2 == addr);
  click = addr2 - addr;
  sbrk((char *)-1);
  if (sbrk(0) != addr)
    e(4);
  brk(addr);
  if (sbrk(0) != addr)
    e(5);
  del = 0;
  do {
    del++;
    brk(addr - del);
    addr3 = sbrk(0);
  } while (addr3 == addr);
  click2 = addr - addr3;
  sbrk((char *)1);
  if (sbrk(0) != addr)
    e(6);
  brk(addr);
  if (sbrk(0) != addr)
    e(8);
  if (click != click2)
    e(9);
  brk(addr + 2 * click);
  if (sbrk(0) != addr + 2 * click)
    e(10);
  sbrk(3 * click);
  if (sbrk(0) != addr + 5 * click)
    e(11);
  sbrk(-5 * click);
  if (sbrk(0) != addr)
    e(12);
}


x86 assembly (clang, -O0):
<test60>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
xor    %edi,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
cltq
mov    %rax,-0x10(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
cltq
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0xa,-0x24(%rbp)
jge    1180 <test60+0x50>
imul   $0x7,-0x24(%rbp),%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    115d <test60+0x2d>
movl   $0x0,-0x24(%rbp)
cmpl   $0xa,-0x24(%rbp)
jge    11ad <test60+0x7d>
imul   $0xfffffff9,-0x24(%rbp),%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1187 <test60+0x57>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
cltq
cmp    -0x10(%rbp),%rax
je     11ce <test60+0x9e>
mov    $0x1,%edi
mov    $0x0,%al
call   1050 <e@plt>
mov    $0x1e,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <brk@plt>
cmp    $0x0,%eax
je     11fa <test60+0xca>
mov    $0x2,%edi
mov    $0x0,%al
call   1050 <e@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
cltq
cmp    -0x10(%rbp),%rax
je     121b <test60+0xeb>
mov    $0x3,%edi
mov    $0x0,%al
call   1050 <e@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
movslq -0x28(%rbp),%rax
add    %rax,%rdi
mov    $0x0,%al
call   1030 <brk@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1222 <test60+0xf2>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x2c(%rbp)
mov    $0xffffffffffffffff,%rdi
mov    $0x0,%al
call   1040 <sbrk@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
cltq
cmp    -0x10(%rbp),%rax
je     1297 <test60+0x167>
mov    $0x4,%edi
mov    $0x0,%al
call   1050 <e@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <brk@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
cltq
cmp    -0x10(%rbp),%rax
je     12c3 <test60+0x193>
mov    $0x5,%edi
mov    $0x0,%al
call   1050 <e@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
movslq -0x28(%rbp),%rcx
xor    %eax,%eax
sub    %rcx,%rax
add    %rax,%rdi
mov    $0x0,%al
call   1030 <brk@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     12ca <test60+0x19a>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x30(%rbp)
mov    $0x1,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
cltq
cmp    -0x10(%rbp),%rax
je     1342 <test60+0x212>
mov    $0x6,%edi
mov    $0x0,%al
call   1050 <e@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <brk@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
cltq
cmp    -0x10(%rbp),%rax
je     136e <test60+0x23e>
mov    $0x8,%edi
mov    $0x0,%al
call   1050 <e@plt>
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
je     1386 <test60+0x256>
mov    $0x9,%edi
mov    $0x0,%al
call   1050 <e@plt>
mov    -0x10(%rbp),%rdi
mov    -0x2c(%rbp),%eax
shl    $0x1,%eax
cltq
add    %rax,%rdi
mov    $0x0,%al
call   1030 <brk@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
cltq
mov    -0x10(%rbp),%rcx
mov    -0x2c(%rbp),%edx
shl    $0x1,%edx
movslq %edx,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
je     13cc <test60+0x29c>
mov    $0xa,%edi
mov    $0x0,%al
call   1050 <e@plt>
imul   $0x3,-0x2c(%rbp),%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
cltq
mov    -0x10(%rbp),%rcx
imul   $0x5,-0x2c(%rbp),%edx
movslq %edx,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
je     1405 <test60+0x2d5>
mov    $0xb,%edi
mov    $0x0,%al
call   1050 <e@plt>
imul   $0xfffffffb,-0x2c(%rbp),%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <sbrk@plt>
cltq
cmp    -0x10(%rbp),%rax
je     1434 <test60+0x304>
mov    $0xc,%edi
mov    $0x0,%al
call   1050 <e@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test60>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
movslq %eax,%r14
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0x7,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0xe,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0x15,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0x1c,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0x23,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0x2a,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0x31,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0x38,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0x3f,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0xfffffff9,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0xfffffff2,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0xffffffeb,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0xffffffe4,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0xffffffdd,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0xffffffd6,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0xffffffcf,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0xffffffc8,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    $0xffffffc1,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
cltq
cmp    %r14,%rax
je     1252 <test60+0x122>
mov    $0x1,%edi
xor    %eax,%eax
call   1050 <e@plt>
mov    $0x1e,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <brk@plt>
test   %eax,%eax
je     1278 <test60+0x148>
mov    $0x2,%edi
xor    %eax,%eax
call   1050 <e@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
cltq
cmp    %r14,%rax
je     1294 <test60+0x164>
mov    $0x3,%edi
xor    %eax,%eax
call   1050 <e@plt>
lea    0x1(%r14),%rbp
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
xor    %eax,%eax
call   1030 <brk@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    %eax,%r15d
cltq
add    $0x1,%rbp
cmp    %r14,%rax
je     12a0 <test60+0x170>
mov    $0xffffffffffffffff,%rdi
xor    %eax,%eax
call   1040 <sbrk@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
cltq
cmp    %r14,%rax
je     12eb <test60+0x1bb>
mov    $0x4,%edi
xor    %eax,%eax
call   1050 <e@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <brk@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
cltq
cmp    %r14,%rax
je     1311 <test60+0x1e1>
mov    $0x5,%edi
xor    %eax,%eax
call   1050 <e@plt>
sub    %r14d,%r15d
lea    -0x1(%r14),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <brk@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
mov    %eax,%ebp
cltq
add    $0xffffffffffffffff,%rbx
cmp    %r14,%rax
je     1320 <test60+0x1f0>
mov    $0x1,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
cltq
cmp    %r14,%rax
je     1368 <test60+0x238>
mov    $0x6,%edi
xor    %eax,%eax
call   1050 <e@plt>
mov    %r14d,%ebx
sub    %ebp,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <brk@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
cltq
cmp    %r14,%rax
je     1393 <test60+0x263>
mov    $0x8,%edi
xor    %eax,%eax
call   1050 <e@plt>
cmp    %ebx,%r15d
je     13a4 <test60+0x274>
mov    $0x9,%edi
xor    %eax,%eax
call   1050 <e@plt>
lea    (%r15,%r15,1),%eax
movslq %eax,%rbx
add    %r14,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <brk@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
cltq
cmp    %rax,%rbx
je     13d4 <test60+0x2a4>
mov    $0xa,%edi
xor    %eax,%eax
call   1050 <e@plt>
lea    (%r15,%r15,2),%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
cltq
lea    (%r15,%r15,4),%ecx
movslq %ecx,%rcx
add    %r14,%rcx
cmp    %rax,%rcx
je     1405 <test60+0x2d5>
mov    $0xb,%edi
xor    %eax,%eax
call   1050 <e@plt>
lea    (%r15,%r15,4),%edi
neg    %edi
xor    %eax,%eax
call   1040 <sbrk@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <sbrk@plt>
cltq
cmp    %r14,%rax
je     142e <test60+0x2fe>
mov    $0xc,%edi
xor    %eax,%eax
call   1050 <e@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @test60() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %2
%12 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %2
store i32 0, i32* %5
br label %15
15: ; preds = %22, %0
%16 = load i32, i32* %5
%17 = icmp slt i32 %16, 10
br i1 %17, label %18, label %25
18: ; preds = %15
%19 = load i32, i32* %5
%20 = mul nsw i32 7, %19
%21 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 %20)
br label %22
22: ; preds = %18
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
store i32 %24, i32* %5
br label %15
25: ; preds = %15
store i32 0, i32* %5
br label %26
26: ; preds = %33, %25
%27 = load i32, i32* %5
%28 = icmp slt i32 %27, 10
br i1 %28, label %29, label %36
29: ; preds = %26
%30 = load i32, i32* %5
%31 = mul nsw i32 -7, %30
%32 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 %31)
br label %33
33: ; preds = %29
%34 = load i32, i32* %5
%35 = add nsw i32 %34, 1
store i32 %35, i32* %5
br label %26
36: ; preds = %26
%37 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%38 = sext i32 %37 to i64
%39 = inttoptr i64 %38 to i8*
%40 = load i8*, i8** %2
%41 = icmp ne i8* %39, %40
br i1 %41, label %42, label %44
42: ; preds = %36
%43 = call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 1)
br label %44
44: ; preds = %42, %36
%45 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 30)
%46 = load i8*, i8** %2
%47 = call i32 (i8*, ...) bitcast (i32 (...)* @brk to i32 (i8*, ...)*)(i8* %46)
%48 = icmp ne i32 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %44
%50 = call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 2)
br label %51
51: ; preds = %49, %44
%52 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%53 = sext i32 %52 to i64
%54 = inttoptr i64 %53 to i8*
%55 = load i8*, i8** %2
%56 = icmp ne i8* %54, %55
br i1 %56, label %57, label %59
57: ; preds = %51
%58 = call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 3)
br label %59
59: ; preds = %57, %51
store i32 0, i32* %6
br label %60
60: ; preds = %71, %59
%61 = load i32, i32* %6
%62 = add nsw i32 %61, 1
store i32 %62, i32* %6
%63 = load i8*, i8** %2
%64 = load i32, i32* %6
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i8, i8* %63, i64 %65
%67 = call i32 (i8*, ...) bitcast (i32 (...)* @brk to i32 (i8*, ...)*)(i8* %66)
%68 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%69 = sext i32 %68 to i64
%70 = inttoptr i64 %69 to i8*
store i8* %70, i8** %3
br label %71
71: ; preds = %60
%72 = load i8*, i8** %3
%73 = load i8*, i8** %2
%74 = icmp eq i8* %72, %73
br i1 %74, label %60, label %75
75: ; preds = %71
%76 = load i8*, i8** %3
%77 = load i8*, i8** %2
%78 = ptrtoint i8* %76 to i64
%79 = ptrtoint i8* %77 to i64
%80 = sub i64 %78, %79
%81 = trunc i64 %80 to i32
store i32 %81, i32* %7
%82 = call i32 (i8*, ...) bitcast (i32 (...)* @sbrk to i32 (i8*, ...)*)(i8* inttoptr (i64 -1 to i8*))
%83 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%84 = sext i32 %83 to i64
%85 = inttoptr i64 %84 to i8*
%86 = load i8*, i8** %2
%87 = icmp ne i8* %85, %86
br i1 %87, label %88, label %90
88: ; preds = %75
%89 = call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 4)
br label %90
90: ; preds = %88, %75
%91 = load i8*, i8** %2
%92 = call i32 (i8*, ...) bitcast (i32 (...)* @brk to i32 (i8*, ...)*)(i8* %91)
%93 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%94 = sext i32 %93 to i64
%95 = inttoptr i64 %94 to i8*
%96 = load i8*, i8** %2
%97 = icmp ne i8* %95, %96
br i1 %97, label %98, label %100
98: ; preds = %90
%99 = call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 5)
br label %100
100: ; preds = %98, %90
store i32 0, i32* %6
br label %101
101: ; preds = %113, %100
%102 = load i32, i32* %6
%103 = add nsw i32 %102, 1
store i32 %103, i32* %6
%104 = load i8*, i8** %2
%105 = load i32, i32* %6
%106 = sext i32 %105 to i64
%107 = sub i64 0, %106
%108 = getelementptr inbounds i8, i8* %104, i64 %107
%109 = call i32 (i8*, ...) bitcast (i32 (...)* @brk to i32 (i8*, ...)*)(i8* %108)
%110 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%111 = sext i32 %110 to i64
%112 = inttoptr i64 %111 to i8*
store i8* %112, i8** %4
br label %113
113: ; preds = %101
%114 = load i8*, i8** %4
%115 = load i8*, i8** %2
%116 = icmp eq i8* %114, %115
br i1 %116, label %101, label %117
117: ; preds = %113
%118 = load i8*, i8** %2
%119 = load i8*, i8** %4
%120 = ptrtoint i8* %118 to i64
%121 = ptrtoint i8* %119 to i64
%122 = sub i64 %120, %121
%123 = trunc i64 %122 to i32
store i32 %123, i32* %8
%124 = call i32 (i8*, ...) bitcast (i32 (...)* @sbrk to i32 (i8*, ...)*)(i8* inttoptr (i64 1 to i8*))
%125 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%126 = sext i32 %125 to i64
%127 = inttoptr i64 %126 to i8*
%128 = load i8*, i8** %2
%129 = icmp ne i8* %127, %128
br i1 %129, label %130, label %132
130: ; preds = %117
%131 = call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 6)
br label %132
132: ; preds = %130, %117
%133 = load i8*, i8** %2
%134 = call i32 (i8*, ...) bitcast (i32 (...)* @brk to i32 (i8*, ...)*)(i8* %133)
%135 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%136 = sext i32 %135 to i64
%137 = inttoptr i64 %136 to i8*
%138 = load i8*, i8** %2
%139 = icmp ne i8* %137, %138
br i1 %139, label %140, label %142
140: ; preds = %132
%141 = call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 8)
br label %142
142: ; preds = %140, %132
%143 = load i32, i32* %7
%144 = load i32, i32* %8
%145 = icmp ne i32 %143, %144
br i1 %145, label %146, label %148
146: ; preds = %142
%147 = call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 9)
br label %148
148: ; preds = %146, %142
%149 = load i8*, i8** %2
%150 = load i32, i32* %7
%151 = mul nsw i32 2, %150
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds i8, i8* %149, i64 %152
%154 = call i32 (i8*, ...) bitcast (i32 (...)* @brk to i32 (i8*, ...)*)(i8* %153)
%155 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%156 = sext i32 %155 to i64
%157 = inttoptr i64 %156 to i8*
%158 = load i8*, i8** %2
%159 = load i32, i32* %7
%160 = mul nsw i32 2, %159
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds i8, i8* %158, i64 %161
%163 = icmp ne i8* %157, %162
br i1 %163, label %164, label %166
164: ; preds = %148
%165 = call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 10)
br label %166
166: ; preds = %164, %148
%167 = load i32, i32* %7
%168 = mul nsw i32 3, %167
%169 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 %168)
%170 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%171 = sext i32 %170 to i64
%172 = inttoptr i64 %171 to i8*
%173 = load i8*, i8** %2
%174 = load i32, i32* %7
%175 = mul nsw i32 5, %174
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds i8, i8* %173, i64 %176
%178 = icmp ne i8* %172, %177
br i1 %178, label %179, label %181
179: ; preds = %166
%180 = call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 11)
br label %181
181: ; preds = %179, %166
%182 = load i32, i32* %7
%183 = mul nsw i32 -5, %182
%184 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 %183)
%185 = call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%186 = sext i32 %185 to i64
%187 = inttoptr i64 %186 to i8*
%188 = load i8*, i8** %2
%189 = icmp ne i8* %187, %188
br i1 %189, label %190, label %192
190: ; preds = %181
%191 = call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 12)
br label %192
192: ; preds = %190, %181
%193 = load i32, i32* %1
ret i32 %193
}

LLVM IR (-O2):
define i32 @test60() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%3 = sext i32 %2 to i64
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 7)
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 14)
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 21)
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 28)
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 35)
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 42)
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 49)
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 56)
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 63)
%14 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%15 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 -7)
%16 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 -14)
%17 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 -21)
%18 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 -28)
%19 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 -35)
%20 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 -42)
%21 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 -49)
%22 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 -56)
%23 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 -63)
%24 = inttoptr i64 %3 to i8*
%25 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%26 = sext i32 %25 to i64
%27 = inttoptr i64 %26 to i8*
%28 = icmp eq i8* %27, %24
br i1 %28, label %31, label %29
29: ; preds = %0
%30 = tail call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 1)
br label %31
31: ; preds = %29, %0
%32 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 30)
%33 = tail call i32 (i8*, ...) bitcast (i32 (...)* @brk to i32 (i8*, ...)*)(i8* %24)
%34 = icmp eq i32 %33, 0
br i1 %34, label %37, label %35
35: ; preds = %31
%36 = tail call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 2)
br label %37
37: ; preds = %35, %31
%38 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%39 = sext i32 %38 to i64
%40 = inttoptr i64 %39 to i8*
%41 = icmp eq i8* %40, %24
br i1 %41, label %44, label %42
42: ; preds = %37
%43 = tail call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 3)
br label %44
44: ; preds = %42, %37
br label %45
45: ; preds = %44, %45
%46 = phi i64 [ %47, %45 ], [ 0, %44 ]
%47 = add nuw nsw i64 %46, 1
%48 = getelementptr inbounds i8, i8* %24, i64 %47
%49 = tail call i32 (i8*, ...) bitcast (i32 (...)* @brk to i32 (i8*, ...)*)(i8* %48)
%50 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%51 = sext i32 %50 to i64
%52 = inttoptr i64 %51 to i8*
%53 = icmp eq i8* %52, %24
br i1 %53, label %45, label %54
54: ; preds = %45
%55 = sub i32 %50, %2
%56 = tail call i32 (i8*, ...) bitcast (i32 (...)* @sbrk to i32 (i8*, ...)*)(i8* inttoptr (i64 -1 to i8*))
%57 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%58 = sext i32 %57 to i64
%59 = inttoptr i64 %58 to i8*
%60 = icmp eq i8* %59, %24
br i1 %60, label %63, label %61
61: ; preds = %54
%62 = tail call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 4)
br label %63
63: ; preds = %61, %54
%64 = tail call i32 (i8*, ...) bitcast (i32 (...)* @brk to i32 (i8*, ...)*)(i8* %24)
%65 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%66 = sext i32 %65 to i64
%67 = inttoptr i64 %66 to i8*
%68 = icmp eq i8* %67, %24
br i1 %68, label %71, label %69
69: ; preds = %63
%70 = tail call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 5)
br label %71
71: ; preds = %69, %63
br label %72
72: ; preds = %71, %72
%73 = phi i64 [ %74, %72 ], [ 0, %71 ]
%74 = add nuw nsw i64 %73, 1
%75 = xor i64 %73, -1
%76 = getelementptr inbounds i8, i8* %24, i64 %75
%77 = tail call i32 (i8*, ...) bitcast (i32 (...)* @brk to i32 (i8*, ...)*)(i8* %76)
%78 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%79 = sext i32 %78 to i64
%80 = inttoptr i64 %79 to i8*
%81 = icmp eq i8* %80, %24
br i1 %81, label %72, label %82
82: ; preds = %72
%83 = sub i32 %2, %78
%84 = tail call i32 (i8*, ...) bitcast (i32 (...)* @sbrk to i32 (i8*, ...)*)(i8* inttoptr (i64 1 to i8*))
%85 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%86 = sext i32 %85 to i64
%87 = inttoptr i64 %86 to i8*
%88 = icmp eq i8* %87, %24
br i1 %88, label %91, label %89
89: ; preds = %82
%90 = tail call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 6)
br label %91
91: ; preds = %89, %82
%92 = tail call i32 (i8*, ...) bitcast (i32 (...)* @brk to i32 (i8*, ...)*)(i8* %24)
%93 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%94 = sext i32 %93 to i64
%95 = inttoptr i64 %94 to i8*
%96 = icmp eq i8* %95, %24
br i1 %96, label %99, label %97
97: ; preds = %91
%98 = tail call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 8)
br label %99
99: ; preds = %97, %91
%100 = icmp eq i32 %55, %83
br i1 %100, label %103, label %101
101: ; preds = %99
%102 = tail call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 9)
br label %103
103: ; preds = %101, %99
%104 = shl nsw i32 %55, 1
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds i8, i8* %24, i64 %105
%107 = tail call i32 (i8*, ...) bitcast (i32 (...)* @brk to i32 (i8*, ...)*)(i8* %106)
%108 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%109 = sext i32 %108 to i64
%110 = inttoptr i64 %109 to i8*
%111 = icmp eq i8* %106, %110
br i1 %111, label %114, label %112
112: ; preds = %103
%113 = tail call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 10)
br label %114
114: ; preds = %112, %103
%115 = mul nsw i32 %55, 3
%116 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 %115)
%117 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%118 = sext i32 %117 to i64
%119 = inttoptr i64 %118 to i8*
%120 = mul nsw i32 %55, 5
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds i8, i8* %24, i64 %121
%123 = icmp eq i8* %122, %119
br i1 %123, label %126, label %124
124: ; preds = %114
%125 = tail call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 11)
br label %126
126: ; preds = %124, %114
%127 = mul nsw i32 %55, -5
%128 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 %127)
%129 = tail call i32 (i32, ...) bitcast (i32 (...)* @sbrk to i32 (i32, ...)*)(i32 0)
%130 = sext i32 %129 to i64
%131 = inttoptr i64 %130 to i8*
%132 = icmp eq i8* %131, %24
br i1 %132, label %135, label %133
133: ; preds = %126
%134 = tail call i32 (i32, ...) bitcast (i32 (...)* @e to i32 (i32, ...)*)(i32 12)
br label %135
135: ; preds = %133, %126
ret i32 undef
}