#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*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int month;
  printf("请输入月份");
  scanf("%d", &month);
  if (month >= 3 && month <= 5)
    puts("春天");
  else if (month >= 6 && month <= 8)
    puts("夏天");
  else if (month >= 9 && month <= 11)
    puts("秋天");
  else if (month == 1 || month == 2 || month == 12)
    puts("冬天");
  else
    puts("月份不存在 \a");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    0xebe(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x3,-0x8(%rbp)
jl     1180 <main+0x50>
cmpl   $0x5,-0x8(%rbp)
jg     1180 <main+0x50>
lea    0xe9d(%rip),%rdi
call   1030 <puts@plt>
jmp    1214 <main+0xe4>
cmpl   $0x6,-0x8(%rbp)
jl     11a5 <main+0x75>
cmpl   $0x8,-0x8(%rbp)
jg     11a5 <main+0x75>
lea    0xe7f(%rip),%rdi
call   1030 <puts@plt>
jmp    120f <main+0xdf>
cmpl   $0x9,-0x8(%rbp)
jl     11ca <main+0x9a>
cmpl   $0xb,-0x8(%rbp)
jg     11ca <main+0x9a>
lea    0xe61(%rip),%rdi
call   1030 <puts@plt>
jmp    120a <main+0xda>
cmpl   $0x1,-0x8(%rbp)
je     11e8 <main+0xb8>
cmpl   $0x2,-0x8(%rbp)
je     11e8 <main+0xb8>
cmpl   $0xc,-0x8(%rbp)
jne    11f9 <main+0xc9>
lea    0xe39(%rip),%rdi
call   1030 <puts@plt>
jmp    1205 <main+0xd5>
lea    0xe2f(%rip),%rdi
call   1030 <puts@plt>
jmp    120a <main+0xda>
jmp    120f <main+0xdf>
jmp    1214 <main+0xe4>
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    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
lea    -0x3(%rax),%ecx
cmp    $0x3,%ecx
jae    1163 <main+0x33>
lea    0xeb2(%rip),%rdi
jmp    11a4 <main+0x74>
lea    -0x6(%rax),%ecx
cmp    $0x3,%ecx
jae    1174 <main+0x44>
lea    0xea8(%rip),%rdi
jmp    11a4 <main+0x74>
lea    -0x9(%rax),%ecx
cmp    $0x3,%ecx
jae    1185 <main+0x55>
lea    0xe9e(%rip),%rdi
jmp    11a4 <main+0x74>
cmp    $0xc,%eax
ja     119d <main+0x6d>
mov    $0x1006,%ecx
bt     %eax,%ecx
jae    119d <main+0x6d>
lea    0xe8d(%rip),%rdi
jmp    11a4 <main+0x74>
lea    0xe8b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E6\9C\88\E4\BB\BD\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [7 x i8] c"\E6\98\A5\E5\A4\A9\00"
@.str.3 = [7 x i8] c"\E5\A4\8F\E5\A4\A9\00"
@.str.4 = [7 x i8] c"\E7\A7\8B\E5\A4\A9\00"
@.str.5 = [7 x i8] c"\E5\86\AC\E5\A4\A9\00"
@.str.6 = [18 x i8] c"\E6\9C\88\E4\BB\BD\E4\B8\8D\E5\AD\98\E5\9C\A8 \07\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 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 sge i32 %5, 3
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 5
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %44
12: ; preds = %7, %0
%13 = load i32, i32* %2
%14 = icmp sge i32 %13, 6
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp sle i32 %16, 8
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %43
20: ; preds = %15, %12
%21 = load i32, i32* %2
%22 = icmp sge i32 %21, 9
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp sle i32 %24, 11
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %42
28: ; preds = %23, %20
%29 = load i32, i32* %2
%30 = icmp eq i32 %29, 1
br i1 %30, label %37, label %31
31: ; preds = %28
%32 = load i32, i32* %2
%33 = icmp eq i32 %32, 2
br i1 %33, label %37, label %34
34: ; preds = %31
%35 = load i32, i32* %2
%36 = icmp eq i32 %35, 12
br i1 %36, label %37, label %39
37: ; preds = %34, %31, %28
%38 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %41
39: ; preds = %34
%40 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
br label %41
41: ; preds = %39, %37
br label %42
42: ; preds = %41, %26
br label %43
43: ; preds = %42, %18
br label %44
44: ; preds = %43, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E6\9C\88\E4\BB\BD\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [7 x i8] c"\E6\98\A5\E5\A4\A9\00"
@.str.3 = [7 x i8] c"\E5\A4\8F\E5\A4\A9\00"
@.str.4 = [7 x i8] c"\E7\A7\8B\E5\A4\A9\00"
@.str.5 = [7 x i8] c"\E5\86\AC\E5\A4\A9\00"
@.str.6 = [18 x i8] c"\E6\9C\88\E4\BB\BD\E4\B8\8D\E5\AD\98\E5\9C\A8 \07\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 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 = add i32 %5, -3
%7 = icmp ult i32 %6, 3
br i1 %7, label %16, label %8
8: ; preds = %0
%9 = add i32 %5, -6
%10 = icmp ult i32 %9, 3
br i1 %10, label %16, label %11
11: ; preds = %8
%12 = add i32 %5, -9
%13 = icmp ult i32 %12, 3
br i1 %13, label %16, label %14
14: ; preds = %11
switch i32 %5, label %15 [
i32 12, label %16
i32 2, label %16
i32 1, label %16
]
15: ; preds = %14
br label %16
16: ; preds = %14, %14, %14, %11, %8, %0, %15
%17 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), %15 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), %8 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), %11 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), %14 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), %14 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), %14 ]
%18 = call i32 @puts(i8* dereferenceable(1) %17)
ret i32 0
}