#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*/ printf(char *);
int main(void) {
  int i = 2;
  if (i > 2) {
    printf("i > 2 is true\n");
  } else {
    printf("i > 2 is false\n");
  }
  i = 3;
  if (i == 3)
    printf("i == 3\n");
  if (i != 3)
    printf("i != 3 is true\n");
  else
    printf("i != 3 is false\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    1141 <main+0x31>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    114d <main+0x3d>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
movl   $0x3,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jne    116a <main+0x5a>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x3,-0x8(%rbp)
je     1185 <main+0x75>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    1191 <main+0x81>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"i > 2 is true\0A\00"
@.str.1 = [16 x i8] c"i > 2 is false\0A\00"
@.str.2 = [8 x i8] c"i == 3\0A\00"
@.str.3 = [16 x i8] c"i != 3 is true\0A\00"
@.str.4 = [17 x i8] c"i != 3 is false\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 2
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
store i32 3, i32* %2
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 3
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
%16 = icmp ne i32 %15, 3
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %21
19: ; preds = %14
%20 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
br label %21
21: ; preds = %19, %17
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@str = [15 x i8] c"i > 2 is false\00"
@str.5 = [7 x i8] c"i == 3\00"
@str.6 = [16 x i8] c"i != 3 is false\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}