int main() {
  int i = 0;
  i = i + 5;
  i = i - 3;
  i = i * 4;
  i = i / 3;
  i = i % 3;
  i += 4;
  i -= 8;
  i *= 5;
  i /= 1;
  i %= 2;
  i--;
  i++;
  if (i == 5) {
    return (1);
  }
  if (i != 5) {
    return (2);
  }
  if (i > 5) {
    return (3);
  }
  if (i < 5) {
    return (4);
  }
  if (i >= 5) {
    return (5);
  }
  if (i <= 5) {
    return (6);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x8,%eax
mov    %eax,-0x8(%rbp)
imul   $0x5,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x1,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jne    11a6 <main+0xa6>
movl   $0x1,-0x4(%rbp)
jmp    121b <main+0x11b>
cmpl   $0x5,-0x8(%rbp)
je     11bc <main+0xbc>
movl   $0x2,-0x4(%rbp)
jmp    121b <main+0x11b>
cmpl   $0x5,-0x8(%rbp)
jle    11d2 <main+0xd2>
movl   $0x3,-0x4(%rbp)
jmp    121b <main+0x11b>
cmpl   $0x5,-0x8(%rbp)
jge    11e8 <main+0xe8>
movl   $0x4,-0x4(%rbp)
jmp    121b <main+0x11b>
cmpl   $0x5,-0x8(%rbp)
jl     11fe <main+0xfe>
movl   $0x5,-0x4(%rbp)
jmp    121b <main+0x11b>
cmpl   $0x5,-0x8(%rbp)
jg     1214 <main+0x114>
movl   $0x6,-0x4(%rbp)
jmp    121b <main+0x11b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 5
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = sub nsw i32 %5, 3
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = mul nsw i32 %7, 4
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = sdiv i32 %9, 3
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = srem i32 %11, 3
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 4
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = sub nsw i32 %15, 8
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = mul nsw i32 %17, 5
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = sdiv i32 %19, 1
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = srem i32 %21, 2
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = add nsw i32 %23, -1
store i32 %24, i32* %2
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
%27 = load i32, i32* %2
%28 = icmp eq i32 %27, 5
br i1 %28, label %29, label %30
29: ; preds = %0
store i32 1, i32* %1
br label %51
30: ; preds = %0
%31 = load i32, i32* %2
%32 = icmp ne i32 %31, 5
br i1 %32, label %33, label %34
33: ; preds = %30
store i32 2, i32* %1
br label %51
34: ; preds = %30
%35 = load i32, i32* %2
%36 = icmp sgt i32 %35, 5
br i1 %36, label %37, label %38
37: ; preds = %34
store i32 3, i32* %1
br label %51
38: ; preds = %34
%39 = load i32, i32* %2
%40 = icmp slt i32 %39, 5
br i1 %40, label %41, label %42
41: ; preds = %38
store i32 4, i32* %1
br label %51
42: ; preds = %38
%43 = load i32, i32* %2
%44 = icmp sge i32 %43, 5
br i1 %44, label %45, label %46
45: ; preds = %42
store i32 5, i32* %1
br label %51
46: ; preds = %42
%47 = load i32, i32* %2
%48 = icmp sle i32 %47, 5
br i1 %48, label %49, label %50
49: ; preds = %46
store i32 6, i32* %1
br label %51
50: ; preds = %46
store i32 0, i32* %1
br label %51
51: ; preds = %50, %49, %45, %41, %37, %33, %29
%52 = load i32, i32* %1
ret i32 %52
}

LLVM IR (-O2):
define i32 @main() {
ret i32 2
}