#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(void) {
  int age;
  printf("请问多大:");
  scanf("%d", &age);
  if (age < 0 || 100 < age) {
    if (100 < age && age < 150) {
      printf("寿星啊，在家安度晚年!\n");
    } else if (age >= 150) {
      printf("老妖!\n");
    } else {
      printf("来自未来!\n");
    }
  } else if (age < 18) {
    printf("小朋友，回家写作业!\n");
  } else {
    printf("欢迎来尚观学习!\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    0xecc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jl     1163 <main+0x43>
mov    $0x64,%eax
cmp    -0x8(%rbp),%eax
jge    11c3 <main+0xa3>
mov    $0x64,%eax
cmp    -0x8(%rbp),%eax
jge    118f <main+0x6f>
cmpl   $0x96,-0x8(%rbp)
jge    118f <main+0x6f>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    11be <main+0x9e>
cmpl   $0x96,-0x8(%rbp)
jl     11ad <main+0x8d>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
jmp    11b9 <main+0x99>
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
jmp    11be <main+0x9e>
jmp    11ef <main+0xcf>
cmpl   $0x12,-0x8(%rbp)
jge    11de <main+0xbe>
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
jmp    11ea <main+0xca>
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
jmp    11ef <main+0xcf>
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    0xeca(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x65,%eax
jb     1168 <main+0x38>
lea    -0x65(%rax),%ecx
cmp    $0x31,%ecx
jae    117f <main+0x4f>
lea    0xef5(%rip),%rdi
jmp    1196 <main+0x66>
cmp    $0x12,%eax
lea    0xeb6(%rip),%rax
lea    0xe98(%rip),%rdi
cmovb  %rax,%rdi
jmp    1196 <main+0x66>
cmp    $0x96,%eax
lea    0xec8(%rip),%rax
lea    0xeb3(%rip),%rdi
cmovge %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"\E8\AF\B7\E9\97\AE\E5\A4\9A\E5\A4\A7:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [33 x i8] c"\E5\AF\BF\E6\98\9F\E5\95\8A\EF\BC\8C\E5\9C\A8\E5\AE\B6\E5\AE\89\E5\BA\A6\E6\99\9A\E5\B9\B4!\0A\00"
@.str.3 = [9 x i8] c"\E8\80\81\E5\A6\96!\0A\00"
@.str.4 = [15 x i8] c"\E6\9D\A5\E8\87\AA\E6\9C\AA\E6\9D\A5!\0A\00"
@.str.5 = [30 x i8] c"\E5\B0\8F\E6\9C\8B\E5\8F\8B\EF\BC\8C\E5\9B\9E\E5\AE\B6\E5\86\99\E4\BD\9C\E4\B8\9A!\0A\00"
@.str.6 = [24 x i8] c"\E6\AC\A2\E8\BF\8E\E6\9D\A5\E5\B0\9A\E8\A7\82\E5\AD\A6\E4\B9\A0!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 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 %10, label %7
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp slt i32 100, %8
br i1 %9, label %10, label %27
10: ; preds = %7, %0
%11 = load i32, i32* %2
%12 = icmp slt i32 100, %11
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load i32, i32* %2
%15 = icmp slt i32 %14, 150
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
br label %26
18: ; preds = %13, %10
%19 = load i32, i32* %2
%20 = icmp sge i32 %19, 150
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %25
23: ; preds = %18
%24 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
br label %25
25: ; preds = %23, %21
br label %26
26: ; preds = %25, %16
br label %35
27: ; preds = %7
%28 = load i32, i32* %2
%29 = icmp slt i32 %28, 18
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
br label %34
32: ; preds = %27
%33 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
br label %34
34: ; preds = %32, %30
br label %35
35: ; preds = %34, %26
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"\E8\AF\B7\E9\97\AE\E5\A4\9A\E5\A4\A7:\00"
@.str.1 = [3 x i8] c"%d\00"
@str = [23 x i8] c"\E6\AC\A2\E8\BF\8E\E6\9D\A5\E5\B0\9A\E8\A7\82\E5\AD\A6\E4\B9\A0!\00"
@str.7 = [29 x i8] c"\E5\B0\8F\E6\9C\8B\E5\8F\8B\EF\BC\8C\E5\9B\9E\E5\AE\B6\E5\86\99\E4\BD\9C\E4\B8\9A!\00"
@str.8 = [14 x i8] c"\E6\9D\A5\E8\87\AA\E6\9C\AA\E6\9D\A5!\00"
@str.9 = [8 x i8] c"\E8\80\81\E5\A6\96!\00"
@str.10 = [32 x i8] c"\E5\AF\BF\E6\98\9F\E5\95\8A\EF\BC\8C\E5\9C\A8\E5\AE\B6\E5\AE\89\E5\BA\A6\E6\99\9A\E5\B9\B4!\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 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 ugt i32 %5, 100
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = add i32 %5, -101
%9 = icmp ult i32 %8, 49
br i1 %9, label %16, label %10
10: ; preds = %7
%11 = icmp sgt i32 %5, 149
%12 = select i1 %11, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.8, i64 0, i64 0)
br label %16
13: ; preds = %0
%14 = icmp ult i32 %5, 18
%15 = select i1 %14, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @str.7, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0)
br label %16
16: ; preds = %13, %10, %7
%17 = phi i8* [ getelementptr inbounds ([32 x i8], [32 x i8]* @str.10, i64 0, i64 0), %7 ], [ %12, %10 ], [ %15, %13 ]
%18 = call i32 @puts(i8* dereferenceable(1) %17)
ret i32 0
}