#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*/ assert(int);
int main() {
  int i = 0;
  while (true) {
    if (i >= 0 && i <= 5) {
      i -= 1;
    } else if (i <= -1) {
      i += 7;
    } else if (i == 6) {
      i = 100;
      break;
    } else {
      i = 1000;
      break;
    }
  }
  assert(i == 100);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1148 <main+0x38>
cmpl   $0x5,-0x8(%rbp)
jg     1148 <main+0x38>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1187 <main+0x77>
cmpl   $0xffffffff,-0x8(%rbp)
jg     1160 <main+0x50>
mov    -0x8(%rbp),%eax
add    $0x7,%eax
mov    %eax,-0x8(%rbp)
jmp    1182 <main+0x72>
cmpl   $0x6,-0x8(%rbp)
jne    1176 <main+0x66>
movl   $0x64,-0x8(%rbp)
jmp    118c <main+0x7c>
movl   $0x3e8,-0x8(%rbp)
jmp    118c <main+0x7c>
jmp    1187 <main+0x77>
jmp    1126 <main+0x16>
cmpl   $0x64,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %ecx,%ecx
jmp    1125 <main+0x15>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %ecx,%eax
cmp    $0x5,%ecx
jbe    1120 <main+0x10>
mov    $0x6,%ecx
test   %eax,%eax
js     1125 <main+0x15>
push   %rax
xor    %edi,%edi
cmp    $0x6,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %0, %24
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 5
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %2
%11 = sub nsw i32 %10, 1
store i32 %11, i32* %2
br label %24
12: ; preds = %6, %3
%13 = load i32, i32* %2
%14 = icmp sle i32 %13, -1
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 7
store i32 %17, i32* %2
br label %23
18: ; preds = %12
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 6
br i1 %20, label %21, label %22
21: ; preds = %18
store i32 100, i32* %2
br label %25
22: ; preds = %18
store i32 1000, i32* %2
br label %25
23: ; preds = %15
br label %24
24: ; preds = %23, %9
br label %3
25: ; preds = %22, %21
%26 = load i32, i32* %2
%27 = icmp eq i32 %26, 100
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = load i32, i32* %1
ret i32 %30
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %8, %0
%2 = phi i32 [ 0, %0 ], [ %9, %8 ]
%3 = icmp ult i32 %2, 6
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = add nsw i32 %2, -1
br label %8
6: ; preds = %1
%7 = icmp slt i32 %2, 0
br i1 %7, label %8, label %10
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ 6, %6 ]
br label %1
10: ; preds = %6
%11 = icmp eq i32 %2, 6
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
ret i32 0
}