#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(int argc, char **argv) {
  int a = 1;
  int b = 2;
  int c = 3;
  int d = 4;
  if (2 + 2 == 4) {
    printf("Two and two sum to four.\n");
  }
  if (a > b) {
    printf("%d is greater than %d.\n", a, b);
  } else {
    printf("%d is not greater than %d.\n", a, b);
  }
  if (a < b && c >= d) {
    printf("%d < %d && %d > %d is true.\n", a, b, c, d);
  } else {
    printf("%d < %d && %d > %d is false.\n", a, b, c, d);
  }
  if (a == 1 || b != 2) {
    printf("%d == 1 || %d != 2 is true.\n", a, b);
  } else {
    printf("%d == 1 || %d != 2 is false.\n", a, b);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
movl   $0x3,-0x1c(%rbp)
movl   $0x4,-0x20(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    1175 <main+0x65>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1189 <main+0x79>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11c1 <main+0xb1>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jl     11c1 <main+0xb1>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11dc <main+0xcc>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1,-0x14(%rbp)
je     11f0 <main+0xe0>
cmpl   $0x2,-0x18(%rbp)
je     1209 <main+0xf9>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121d <main+0x10d>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf2f(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Two and two sum to four.\0A\00"
@.str.1 = [24 x i8] c"%d is greater than %d.\0A\00"
@.str.2 = [28 x i8] c"%d is not greater than %d.\0A\00"
@.str.3 = [29 x i8] c"%d < %d && %d > %d is true.\0A\00"
@.str.4 = [30 x i8] c"%d < %d && %d > %d is false.\0A\00"
@.str.5 = [29 x i8] c"%d == 1 || %d != 2 is true.\0A\00"
@.str.6 = [30 x i8] c"%d == 1 || %d != 2 is false.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
store i32 2, i32* %7
store i32 3, i32* %8
store i32 4, i32* %9
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %18
14: ; preds = %2
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %16)
br label %22
18: ; preds = %2
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %19, i32 %20)
br label %22
22: ; preds = %18, %14
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %36
26: ; preds = %22
%27 = load i32, i32* %8
%28 = load i32, i32* %9
%29 = icmp sge i32 %27, %28
br i1 %29, label %30, label %36
30: ; preds = %26
%31 = load i32, i32* %6
%32 = load i32, i32* %7
%33 = load i32, i32* %8
%34 = load i32, i32* %9
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %31, i32 %32, i32 %33, i32 %34)
br label %42
36: ; preds = %26, %22
%37 = load i32, i32* %6
%38 = load i32, i32* %7
%39 = load i32, i32* %8
%40 = load i32, i32* %9
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %37, i32 %38, i32 %39, i32 %40)
br label %42
42: ; preds = %36, %30
%43 = load i32, i32* %6
%44 = icmp eq i32 %43, 1
br i1 %44, label %48, label %45
45: ; preds = %42
%46 = load i32, i32* %7
%47 = icmp ne i32 %46, 2
br i1 %47, label %48, label %52
48: ; preds = %45, %42
%49 = load i32, i32* %6
%50 = load i32, i32* %7
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i32 %49, i32 %50)
br label %56
52: ; preds = %45
%53 = load i32, i32* %6
%54 = load i32, i32* %7
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i32 %53, i32 %54)
br label %56
56: ; preds = %52, %48
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [28 x i8] c"%d is not greater than %d.\0A\00"
@.str.4 = [30 x i8] c"%d < %d && %d > %d is false.\0A\00"
@.str.5 = [29 x i8] c"%d == 1 || %d != 2 is true.\0A\00"
@str = [25 x i8] c"Two and two sum to four.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 2)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 1, i32 2, i32 3, i32 4)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i32 1, i32 2)
ret i32 0
}