#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 /*<<< orphan*/ scanf(char *, int *);
void main() {
  int age = 0;
  printf("How old are you? ");
  scanf("%d", &age);
  if (age > 20) {
    printf("You're over 20 huh?\n");
  }
  if (age > 30)
    printf("You're over 30!?\n");
  if (age < 20) {
    printf("You're a young'n!\n");
  }
  if (age < 20 && age > 12) {
    printf("Being in your teens can tough...\n");
  }
  if (age == 100)
    printf("WOW!  What's your secret!?\n");
  if (age > 50)
    printf("Life after 50 can be great!\n");
  else
    printf("You've still got a LONG way to go...\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x14,-0x4(%rbp)
jle    1161 <main+0x41>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1e,-0x4(%rbp)
jle    1177 <main+0x57>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x14,-0x4(%rbp)
jge    118d <main+0x6d>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x14,-0x4(%rbp)
jge    11ad <main+0x8d>
cmpl   $0xc,-0x4(%rbp)
jle    11ad <main+0x8d>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x64,-0x4(%rbp)
jne    11c3 <main+0xa3>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x32,-0x4(%rbp)
jle    11de <main+0xbe>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    11ea <main+0xca>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x15,%eax
jl     1184 <main+0x54>
lea    0xf4f(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
cmp    $0x1f,%eax
jl     1184 <main+0x54>
lea    0xf29(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
cmp    $0x13,%eax
jg     1199 <main+0x69>
lea    0xf02(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
lea    -0xd(%rax),%ecx
cmp    $0x6,%ecx
ja     11b1 <main+0x81>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
cmp    $0x64,%eax
jne    11c6 <main+0x96>
lea    0xe99(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
cmp    $0x33,%eax
lea    0xe6a(%rip),%rax
lea    0xe3e(%rip),%rdi
cmovge %rax,%rdi
call   1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [18 x i8] c"How old are you? \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [21 x i8] c"You're over 20 huh?\0A\00"
@.str.3 = [18 x i8] c"You're over 30!?\0A\00"
@.str.4 = [19 x i8] c"You're a young'n!\0A\00"
@.str.5 = [34 x i8] c"Being in your teens can tough...\0A\00"
@.str.6 = [28 x i8] c"WOW! What's your secret!?\0A\00"
@.str.7 = [29 x i8] c"Life after 50 can be great!\0A\00"
@.str.8 = [38 x i8] c"You've still got a LONG way to go...\0A\00"
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 20
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = load i32, i32* %1
%10 = icmp sgt i32 %9, 30
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %13
13: ; preds = %11, %8
%14 = load i32, i32* %1
%15 = icmp slt i32 %14, 20
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
br label %18
18: ; preds = %16, %13
%19 = load i32, i32* %1
%20 = icmp slt i32 %19, 20
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = load i32, i32* %1
%23 = icmp sgt i32 %22, 12
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
br label %26
26: ; preds = %24, %21, %18
%27 = load i32, i32* %1
%28 = icmp eq i32 %27, 100
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0))
br label %31
31: ; preds = %29, %26
%32 = load i32, i32* %1
%33 = icmp sgt i32 %32, 50
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
br label %38
36: ; preds = %31
%37 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0))
br label %38
38: ; preds = %36, %34
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"How old are you? \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [37 x i8] c"You've still got a LONG way to go...\00"
@str.9 = [28 x i8] c"Life after 50 can be great!\00"
@str.10 = [27 x i8] c"WOW! What's your secret!?\00"
@str.11 = [33 x i8] c"Being in your teens can tough...\00"
@str.12 = [18 x i8] c"You're a young'n!\00"
@str.13 = [17 x i8] c"You're over 30!?\00"
@str.14 = [20 x i8] c"You're over 20 huh?\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp sgt i32 %5, 20
br i1 %6, label %7, label %14
7: ; preds = %0
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.14, i64 0, i64 0))
%9 = load i32, i32* %1
%10 = icmp sgt i32 %9, 30
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.13, i64 0, i64 0))
%13 = load i32, i32* %1
br label %14
14: ; preds = %0, %11, %7
%15 = phi i32 [ %13, %11 ], [ %9, %7 ], [ %5, %0 ]
%16 = icmp slt i32 %15, 20
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.12, i64 0, i64 0))
%19 = load i32, i32* %1
br label %20
20: ; preds = %17, %14
%21 = phi i32 [ %19, %17 ], [ %15, %14 ]
%22 = add i32 %21, -13
%23 = icmp ult i32 %22, 7
br i1 %23, label %24, label %27
24: ; preds = %20
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.11, i64 0, i64 0))
%26 = load i32, i32* %1
br label %27
27: ; preds = %24, %20
%28 = phi i32 [ %26, %24 ], [ %21, %20 ]
%29 = icmp eq i32 %28, 100
br i1 %29, label %30, label %33
30: ; preds = %27
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.10, i64 0, i64 0))
%32 = load i32, i32* %1
br label %33
33: ; preds = %30, %27
%34 = phi i32 [ %32, %30 ], [ %28, %27 ]
%35 = icmp sgt i32 %34, 50
%36 = select i1 %35, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0)
%37 = call i32 @puts(i8* dereferenceable(1) %36)
ret void
}