#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*/ fpurge(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stdin;
int main() {
  int age;
  for (;;) {
    puts("Please enter your age");
    scanf("%d", &age);
    if (age < 18 || age > 65) {
      puts("\tEnjoy life while you can\n\n!");
    } else {
      puts("\tGet back to work!\n\n");
    }
    fpurge(stdin);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
lea    0xec4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x12,-0x8(%rbp)
jl     116f <main+0x3f>
cmpl   $0x41,-0x8(%rbp)
jle    1180 <main+0x50>
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
jmp    118c <main+0x5c>
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
call   1050 <fpurge@plt>
jmp    113f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xebe(%rip),%r14
lea    0xecd(%rip),%r15
lea    0x4(%rsp),%r12
lea    0xec4(%rip),%r13
lea    0xeda(%rip),%rbx
mov    0x2e85(%rip),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffbe,%eax
cmp    $0xffffffd0,%eax
mov    %rbx,%rdi
cmovb  %r13,%rdi
call   1030 <puts@plt>
mov    0x0(%rbp),%edi
call   1050 <fpurge@plt>
jmp    1170 <main+0x40>

LLVM IR (-O0):
@.str = [22 x i8] c"Please enter your age\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"\09Enjoy life while you can\0A\0A!\00"
@.str.3 = [21 x i8] c"\09Get back to work!\0A\0A\00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %15, %0
%4 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 18
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 65
br i1 %10, label %11, label %13
11: ; preds = %8, %3
%12 = call i32 @puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %15
13: ; preds = %8
%14 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
%16 = load i32, i32* @stdin
%17 = call i32 @fpurge(i32 %16)
br label %3
}

LLVM IR (-O2):
@.str = [22 x i8] c"Please enter your age\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"\09Enjoy life while you can\0A\0A!\00"
@.str.3 = [21 x i8] c"\09Get back to work!\0A\0A\00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add i32 %6, -66
%8 = icmp ult i32 %7, -48
%9 = select i1 %8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0)
%10 = call i32 @puts(i8* dereferenceable(1) %9)
%11 = load i32, i32* @stdin
%12 = call i32 @fpurge(i32 %11)
br label %3
}