#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 people = 20;
  int cats = 30;
  int dogs = 15;
  if (people < cats) {
    printf("Too many cats! The world is doomed!\n");
  }
  if (people > cats) {
    printf("Not many cats! The world is saved!\n");
  }
  if (people < dogs) {
    printf("\nThe world is drooled on!\n");
  }
  if (people > dogs) {
    printf("\nThe world is dry!\n");
  }
  dogs += 5;
  if (people >= dogs) {
    printf("\nPeople are greater than or equal to dogs.");
  }
  if (people <= dogs) {
    printf("\nPeople are less than or equal to dogs");
  }
  if (people == dogs) {
    printf("\nPeople are dogs");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
movl   $0x1e,-0xc(%rbp)
movl   $0xf,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    114c <main+0x3c>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1164 <main+0x54>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    117c <main+0x6c>
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1194 <main+0x84>
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     11b5 <main+0xa5>
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11cd <main+0xbd>
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11e5 <main+0xd5>
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf3b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf53(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
lea    0xedf(%rip),%rdi
call   1040 <printf@plt>
lea    0xefa(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Too many cats! The world is doomed!\0A\00"
@.str.1 = [36 x i8] c"Not many cats! The world is saved!\0A\00"
@.str.2 = [27 x i8] c"\0AThe world is drooled on!\0A\00"
@.str.3 = [20 x i8] c"\0AThe world is dry!\0A\00"
@.str.4 = [43 x i8] c"\0APeople are greater than or equal to dogs.\00"
@.str.5 = [39 x i8] c"\0APeople are less than or equal to dogs\00"
@.str.6 = [17 x i8] c"\0APeople are dogs\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 20, i32* %2
store i32 30, i32* %3
store i32 15, i32* %4
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %0
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %10
%17 = load i32, i32* %2
%18 = load i32, i32* %4
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %22
22: ; preds = %20, %16
%23 = load i32, i32* %2
%24 = load i32, i32* %4
%25 = icmp sgt i32 %23, %24
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
br label %28
28: ; preds = %26, %22
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 5
store i32 %30, i32* %4
%31 = load i32, i32* %2
%32 = load i32, i32* %4
%33 = icmp sge i32 %31, %32
br i1 %33, label %34, label %36
34: ; preds = %28
%35 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
br label %36
36: ; preds = %34, %28
%37 = load i32, i32* %2
%38 = load i32, i32* %4
%39 = icmp sle i32 %37, %38
br i1 %39, label %40, label %42
40: ; preds = %36
%41 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
br label %42
42: ; preds = %40, %36
%43 = load i32, i32* %2
%44 = load i32, i32* %4
%45 = icmp eq i32 %43, %44
br i1 %45, label %46, label %48
46: ; preds = %42
%47 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
br label %48
48: ; preds = %46, %42
%49 = load i32, i32* %1
ret i32 %49
}

LLVM IR (-O2):
@.str.4 = [43 x i8] c"\0APeople are greater than or equal to dogs.\00"
@.str.5 = [39 x i8] c"\0APeople are less than or equal to dogs\00"
@.str.6 = [17 x i8] c"\0APeople are dogs\00"
@str = [36 x i8] c"Too many cats! The world is doomed!\00"
@str.7 = [19 x i8] c"\0AThe world is dry!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.7, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}