#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 argc, char *argv[]) {
  int age;
  printf("Please enter your age ");
  scanf("%d", &age);
  if (age > 18)
    printf("You're older than 18");
  if (age == 18)
    printf("You're 18!!");
  if (age < 18)
    printf("You're younger than 18");
  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)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x12,-0x14(%rbp)
jle    1168 <main+0x48>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x12,-0x14(%rbp)
jne    117e <main+0x5e>
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x12,-0x14(%rbp)
jge    1194 <main+0x74>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x13,%eax
jge    1161 <main+0x41>
cmp    $0x12,%eax
je     1176 <main+0x56>
cmp    $0x11,%eax
jg     115d <main+0x3d>
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x12,%eax
jne    114c <main+0x2c>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x11,%eax
jle    1151 <main+0x31>
jmp    115d <main+0x3d>

LLVM IR (-O0):
@.str = [23 x i8] c"Please enter your age \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [21 x i8] c"You're older than 18\00"
@.str.3 = [12 x i8] c"You're 18!!\00"
@.str.4 = [23 x i8] c"You're younger than 18\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%9 = load i32, i32* %6
%10 = icmp sgt i32 %9, 18
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i32, i32* %6
%15 = icmp eq i32 %14, 18
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
br label %18
18: ; preds = %16, %13
%19 = load i32, i32* %6
%20 = icmp slt i32 %19, 18
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
br label %23
23: ; preds = %21, %18
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Please enter your age \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [21 x i8] c"You're older than 18\00"
@.str.3 = [12 x i8] c"You're 18!!\00"
@.str.4 = [23 x i8] c"You're younger than 18\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 18
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32, i32* %3
br label %12
12: ; preds = %9, %2
%13 = phi i32 [ %11, %9 ], [ %7, %2 ]
%14 = icmp eq i32 %13, 18
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%17 = load i32, i32* %3
br label %18
18: ; preds = %15, %12
%19 = phi i32 [ %17, %15 ], [ %13, %12 ]
%20 = icmp slt i32 %19, 18
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
br label %23
23: ; preds = %21, %18
ret i32 0
}