#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 mes;
  int estacion;
  printf("Introduzca un mes: ");
  scanf("%d", &mes);
  if ((0 < mes) && (mes <= 12)) {
    if (mes == 12 || mes == 1 || mes == 2) {
      estacion = 1;
    } else if (mes == 3 || mes == 4 || mes == 5) {
      estacion = 2;
    } else if (mes == 6 || mes == 7 || mes == 8) {
      estacion = 3;
    } else if (mes == 9 || mes == 10 || mes == 11) {
      estacion = 4;
    }
    printf("El mes %d pertenece a la estacion %d\n", mes, estacion);
  } else {
    printf("Numero de mes incorrecto\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
cmp    -0x8(%rbp),%eax
jge    122d <main+0x10d>
cmpl   $0xc,-0x8(%rbp)
jg     122d <main+0x10d>
cmpl   $0xc,-0x8(%rbp)
je     1180 <main+0x60>
cmpl   $0x1,-0x8(%rbp)
je     1180 <main+0x60>
cmpl   $0x2,-0x8(%rbp)
jne    118c <main+0x6c>
movl   $0x1,-0xc(%rbp)
jmp    1214 <main+0xf4>
cmpl   $0x3,-0x8(%rbp)
je     11aa <main+0x8a>
cmpl   $0x4,-0x8(%rbp)
je     11aa <main+0x8a>
cmpl   $0x5,-0x8(%rbp)
jne    11b6 <main+0x96>
movl   $0x2,-0xc(%rbp)
jmp    120f <main+0xef>
cmpl   $0x6,-0x8(%rbp)
je     11d4 <main+0xb4>
cmpl   $0x7,-0x8(%rbp)
je     11d4 <main+0xb4>
cmpl   $0x8,-0x8(%rbp)
jne    11e0 <main+0xc0>
movl   $0x3,-0xc(%rbp)
jmp    120a <main+0xea>
cmpl   $0x9,-0x8(%rbp)
je     11fe <main+0xde>
cmpl   $0xa,-0x8(%rbp)
je     11fe <main+0xde>
cmpl   $0xb,-0x8(%rbp)
jne    1205 <main+0xe5>
movl   $0x4,-0xc(%rbp)
jmp    120a <main+0xea>
jmp    120f <main+0xef>
jmp    1214 <main+0xf4>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    123b <main+0x11b>
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%esi
lea    -0x1(%rsi),%eax
cmp    $0xb,%eax
ja     1180 <main+0x50>
cmp    $0xc,%esi
ja     1190 <main+0x60>
mov    $0x1,%edx
mov    $0x1006,%eax
bt     %esi,%eax
jae    1190 <main+0x60>
lea    0xea0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    118c <main+0x5c>
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    -0x3(%rsi),%eax
mov    $0x2,%edx
cmp    $0x3,%eax
jb     1170 <main+0x40>
lea    -0x6(%rsi),%eax
cmp    $0x3,%eax
mov    $0x4,%edx
sbb    $0x0,%edx
jmp    1170 <main+0x40>

LLVM IR (-O0):
@.str = [20 x i8] c"Introduzca un mes: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [38 x i8] c"El mes %d pertenece a la estacion %d\0A\00"
@.str.3 = [26 x i8] c"Numero de mes incorrecto\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 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 0, %6
br i1 %7, label %8, label %58
8: ; preds = %0
%9 = load i32, i32* %2
%10 = icmp sle i32 %9, 12
br i1 %10, label %11, label %58
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 12
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 1
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 2
br i1 %19, label %20, label %21
20: ; preds = %17, %14, %11
store i32 1, i32* %3
br label %54
21: ; preds = %17
%22 = load i32, i32* %2
%23 = icmp eq i32 %22, 3
br i1 %23, label %30, label %24
24: ; preds = %21
%25 = load i32, i32* %2
%26 = icmp eq i32 %25, 4
br i1 %26, label %30, label %27
27: ; preds = %24
%28 = load i32, i32* %2
%29 = icmp eq i32 %28, 5
br i1 %29, label %30, label %31
30: ; preds = %27, %24, %21
store i32 2, i32* %3
br label %53
31: ; preds = %27
%32 = load i32, i32* %2
%33 = icmp eq i32 %32, 6
br i1 %33, label %40, label %34
34: ; preds = %31
%35 = load i32, i32* %2
%36 = icmp eq i32 %35, 7
br i1 %36, label %40, label %37
37: ; preds = %34
%38 = load i32, i32* %2
%39 = icmp eq i32 %38, 8
br i1 %39, label %40, label %41
40: ; preds = %37, %34, %31
store i32 3, i32* %3
br label %52
41: ; preds = %37
%42 = load i32, i32* %2
%43 = icmp eq i32 %42, 9
br i1 %43, label %50, label %44
44: ; preds = %41
%45 = load i32, i32* %2
%46 = icmp eq i32 %45, 10
br i1 %46, label %50, label %47
47: ; preds = %44
%48 = load i32, i32* %2
%49 = icmp eq i32 %48, 11
br i1 %49, label %50, label %51
50: ; preds = %47, %44, %41
store i32 4, i32* %3
br label %51
51: ; preds = %50, %47
br label %52
52: ; preds = %51, %40
br label %53
53: ; preds = %52, %30
br label %54
54: ; preds = %53, %20
%55 = load i32, i32* %2
%56 = load i32, i32* %3
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %55, i32 %56)
br label %60
58: ; preds = %8, %0
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %60
60: ; preds = %58, %54
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Introduzca un mes: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [38 x i8] c"El mes %d pertenece a la estacion %d\0A\00"
@str = [25 x i8] c"Numero de mes incorrecto\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 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, -1
%7 = icmp ult i32 %6, 12
br i1 %7, label %8, label %19
8: ; preds = %0
switch i32 %5, label %9 [
i32 12, label %16
i32 2, label %16
i32 1, label %16
]
9: ; preds = %8
%10 = add nsw i32 %5, -3
%11 = icmp ult i32 %10, 3
br i1 %11, label %16, label %12
12: ; preds = %9
%13 = add nsw i32 %5, -6
%14 = icmp ult i32 %13, 3
%15 = select i1 %14, i32 3, i32 4
br label %16
16: ; preds = %12, %9, %8, %8, %8
%17 = phi i32 [ 1, %8 ], [ 1, %8 ], [ 1, %8 ], [ 2, %9 ], [ %15, %12 ]
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %17)
br label %21
19: ; preds = %0
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
br label %21
21: ; preds = %19, %16
ret i32 0
}