#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 *);
int main() {
  int age;
  printf("Please enter your age: ");
  scanf("%d", &age);
  if (age < 0) {
    printf("That's probably not a real age.\n");
  } else if (age >= 0 && age <= 15) {
    printf("You are too young to drive a car.\n");
  } else if (age >= 16 && age <= 24) {
    printf("You are old enough to drive a car.\n");
  } else if (age >= 25) {
    printf("You are old enough to drive a car and get a break on auto "
           "insurance.\n");
  } else {
    printf("Well, I just don't know.\n");
  }
  return 0;
}


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    0xed6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jge    1166 <main+0x46>
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
jmp    11e6 <main+0xc6>
cmpl   $0x0,-0x8(%rbp)
jl     118b <main+0x6b>
cmpl   $0xf,-0x8(%rbp)
jg     118b <main+0x6b>
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
jmp    11e1 <main+0xc1>
cmpl   $0x10,-0x8(%rbp)
jl     11b0 <main+0x90>
cmpl   $0x18,-0x8(%rbp)
jg     11b0 <main+0x90>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    11dc <main+0xbc>
cmpl   $0x19,-0x8(%rbp)
jl     11cb <main+0xab>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
jmp    11d7 <main+0xb7>
lea    0xef7(%rip),%rdi
call   1030 <printf@plt>
jmp    11dc <main+0xbc>
jmp    11e1 <main+0xc1>
jmp    11e6 <main+0xc6>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
js     1164 <main+0x34>
cmp    $0x10,%eax
jae    116d <main+0x3d>
lea    0xf21(%rip),%rdi
jmp    1182 <main+0x52>
lea    0xf3a(%rip),%rdi
jmp    1182 <main+0x52>
cmp    $0x19,%eax
lea    0xee9(%rip),%rax
lea    0xe9d(%rip),%rdi
cmovb  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Please enter your age: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [33 x i8] c"That's probably not a real age.\0A\00"
@.str.3 = [35 x i8] c"You are too young to drive a car.\0A\00"
@.str.4 = [36 x i8] c"You are old enough to drive a car.\0A\00"
@.str.5 = [70 x i8] c"You are old enough to drive a car and get a break on auto insurance.\0A\00"
@.str.6 = [26 x i8] c"Well, I just don't know.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 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* %2)
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
br label %35
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp sle i32 %13, 15
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
br label %34
17: ; preds = %12, %9
%18 = load i32, i32* %2
%19 = icmp sge i32 %18, 16
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp sle i32 %21, 24
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
br label %33
25: ; preds = %20, %17
%26 = load i32, i32* %2
%27 = icmp sge i32 %26, 25
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.5, i64 0, i64 0))
br label %32
30: ; preds = %25
%31 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
br label %32
32: ; preds = %30, %28
br label %33
33: ; preds = %32, %23
br label %34
34: ; preds = %33, %15
br label %35
35: ; preds = %34, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Please enter your age: \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [69 x i8] c"You are old enough to drive a car and get a break on auto insurance.\00"
@str.7 = [35 x i8] c"You are old enough to drive a car.\00"
@str.8 = [34 x i8] c"You are too young to drive a car.\00"
@str.9 = [32 x i8] c"That's probably not a real age.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 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 slt i32 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %0
%8 = icmp ult i32 %5, 16
br i1 %8, label %12, label %9
9: ; preds = %7
%10 = icmp ult i32 %5, 25
%11 = select i1 %10, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @str.7, i64 0, i64 0), i8* getelementptr inbounds ([69 x i8], [69 x i8]* @str, i64 0, i64 0)
br label %12
12: ; preds = %9, %7, %0
%13 = phi i8* [ getelementptr inbounds ([32 x i8], [32 x i8]* @str.9, i64 0, i64 0), %0 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @str.8, i64 0, i64 0), %7 ], [ %11, %9 ]
%14 = call i32 @puts(i8* dereferenceable(1) %13)
ret i32 0
}