#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 speed;
  printf("Enter wind speed: ");
  scanf("%dm", &speed);
  if (speed < 1) {
    printf("Calm\n");
  } else if (speed < 4) {
    printf("Light air\n");
  } else if (speed < 28) {
    printf("Breeze\n");
  } else if (speed < 48) {
    printf("Gale\n");
  } else if (speed < 64) {
    printf("Storm\n");
  } else {
    printf("Hurricane\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    0xed1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jge    1166 <main+0x46>
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
jmp    11f2 <main+0xd2>
cmpl   $0x4,-0x8(%rbp)
jge    1181 <main+0x61>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
jmp    11ed <main+0xcd>
cmpl   $0x1c,-0x8(%rbp)
jge    119c <main+0x7c>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
jmp    11e8 <main+0xc8>
cmpl   $0x30,-0x8(%rbp)
jge    11b7 <main+0x97>
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
jmp    11e3 <main+0xc3>
cmpl   $0x40,-0x8(%rbp)
jge    11d2 <main+0xb2>
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
jmp    11de <main+0xbe>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
jmp    11e3 <main+0xc3>
jmp    11e8 <main+0xc8>
jmp    11ed <main+0xcd>
jmp    11f2 <main+0xd2>
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    0xecf(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    1164 <main+0x34>
cmp    $0x4,%eax
jae    116d <main+0x3d>
lea    0xed1(%rip),%rdi
jmp    119e <main+0x6e>
lea    0xed2(%rip),%rdi
jmp    119e <main+0x6e>
cmp    $0x1c,%eax
jae    117b <main+0x4b>
lea    0xeb3(%rip),%rdi
jmp    119e <main+0x6e>
cmp    $0x30,%eax
jae    1189 <main+0x59>
lea    0xea0(%rip),%rdi
jmp    119e <main+0x6e>
cmp    $0x40,%eax
lea    0xe8e(%rip),%rax
lea    0xe7d(%rip),%rdi
cmovb  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Enter wind speed: \00"
@.str.1 = [4 x i8] c"%dm\00"
@.str.2 = [6 x i8] c"Calm\0A\00"
@.str.3 = [11 x i8] c"Light air\0A\00"
@.str.4 = [8 x i8] c"Breeze\0A\00"
@.str.5 = [6 x i8] c"Gale\0A\00"
@.str.6 = [7 x i8] c"Storm\0A\00"
@.str.7 = [11 x i8] c"Hurricane\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %35
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 4
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
br label %34
14: ; preds = %9
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 28
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %33
19: ; preds = %14
%20 = load i32, i32* %2
%21 = icmp slt i32 %20, 48
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %32
24: ; preds = %19
%25 = load i32, i32* %2
%26 = icmp slt i32 %25, 64
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
br label %31
29: ; preds = %24
%30 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
br label %31
31: ; preds = %29, %27
br label %32
32: ; preds = %31, %22
br label %33
33: ; preds = %32, %17
br label %34
34: ; preds = %33, %12
br label %35
35: ; preds = %34, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Enter wind speed: \00"
@.str.1 = [4 x i8] c"%dm\00"
@str = [10 x i8] c"Hurricane\00"
@str.8 = [6 x i8] c"Storm\00"
@str.9 = [5 x i8] c"Gale\00"
@str.10 = [7 x i8] c"Breeze\00"
@str.11 = [10 x i8] c"Light air\00"
@str.12 = [5 x i8] c"Calm\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 1
br i1 %6, label %16, label %7
7: ; preds = %0
%8 = icmp ult i32 %5, 4
br i1 %8, label %16, label %9
9: ; preds = %7
%10 = icmp ult i32 %5, 28
br i1 %10, label %16, label %11
11: ; preds = %9
%12 = icmp ult i32 %5, 48
br i1 %12, label %16, label %13
13: ; preds = %11
%14 = icmp ult i32 %5, 64
%15 = select i1 %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.8, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0)
br label %16
16: ; preds = %13, %11, %9, %7, %0
%17 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @str.12, i64 0, i64 0), %0 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @str.11, i64 0, i64 0), %7 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.10, i64 0, i64 0), %9 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @str.9, i64 0, i64 0), %11 ], [ %15, %13 ]
%18 = call i32 @puts(i8* dereferenceable(1) %17)
ret i32 0
}