#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 m;
  printf("Enter number of month (1..12):\n");
  scanf("%d", &m);
  if (m == 12 || m < 3) {
    printf("It is Winter\n");
  } else if (m > 2 && m < 6) {
    printf("It is Spring\n");
  } else if (m > 5 && m < 9) {
    printf("It is Summer\n");
  } else {
    printf("It is Autumn (Fall)\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    0xede(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0xc,-0x8(%rbp)
je     115f <main+0x3f>
cmpl   $0x3,-0x8(%rbp)
jge    1170 <main+0x50>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
jmp    11d0 <main+0xb0>
cmpl   $0x2,-0x8(%rbp)
jle    1195 <main+0x75>
cmpl   $0x6,-0x8(%rbp)
jge    1195 <main+0x75>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
jmp    11cb <main+0xab>
cmpl   $0x5,-0x8(%rbp)
jle    11ba <main+0x9a>
cmpl   $0x9,-0x8(%rbp)
jge    11ba <main+0x9a>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
jmp    11c6 <main+0xa6>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    11cb <main+0xab>
jmp    11d0 <main+0xb0>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
lea    0xf07(%rip),%rdi
cmp    $0xc,%eax
je     1176 <main+0x56>
cmp    $0x3,%eax
jl     1176 <main+0x56>
cmp    $0x6,%eax
jae    1161 <main+0x41>
lea    0xee4(%rip),%rdi
jmp    1176 <main+0x56>
cmp    $0x9,%eax
lea    0xecb(%rip),%rax
lea    0xeb0(%rip),%rdi
cmovb  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Enter number of month (1..12):\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [14 x i8] c"It is Winter\0A\00"
@.str.3 = [14 x i8] c"It is Spring\0A\00"
@.str.4 = [14 x i8] c"It is Summer\0A\00"
@.str.5 = [21 x i8] c"It is Autumn (Fall)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 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 eq i32 %5, 12
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %12
10: ; preds = %7, %0
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %32
12: ; preds = %7
%13 = load i32, i32* %2
%14 = icmp sgt i32 %13, 2
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp slt i32 %16, 6
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %31
20: ; preds = %15, %12
%21 = load i32, i32* %2
%22 = icmp sgt i32 %21, 5
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp slt i32 %24, 9
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %30
28: ; preds = %23, %20
%29 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
br label %30
30: ; preds = %28, %26
br label %31
31: ; preds = %30, %18
br label %32
32: ; preds = %31, %10
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [31 x i8] c"Enter number of month (1..12):\00"
@str.6 = [20 x i8] c"It is Autumn (Fall)\00"
@str.7 = [13 x i8] c"It is Summer\00"
@str.8 = [13 x i8] c"It is Spring\00"
@str.9 = [13 x i8] c"It is Winter\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 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 eq i32 %5, 12
%7 = icmp slt i32 %5, 3
%8 = or i1 %6, %7
br i1 %8, label %14, label %9
9: ; preds = %0
%10 = icmp ult i32 %5, 6
br i1 %10, label %14, label %11
11: ; preds = %9
%12 = icmp ult i32 %5, 9
%13 = select i1 %12, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.7, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.6, i64 0, i64 0)
br label %14
14: ; preds = %11, %9, %0
%15 = phi i8* [ getelementptr inbounds ([13 x i8], [13 x i8]* @str.9, i64 0, i64 0), %0 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @str.8, i64 0, i64 0), %9 ], [ %13, %11 ]
%16 = call i32 @puts(i8* dereferenceable(1) %15)
ret i32 0
}