#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 *);
void whichMonth(int m) {
  if (m == 1)
    printf(" January ");
  else if (m == 2)
    printf(" February ");
  else if (m == 3)
    printf(" March ");
  else if (m == 4)
    printf(" April ");
  else if (m == 5)
    printf(" May ");
  else if (m == 6)
    printf(" June ");
  else if (m == 7)
    printf(" July ");
  else if (m == 8)
    printf(" August ");
  else if (m == 9)
    printf(" September ");
  else if (m == 10)
    printf(" October ");
  else if (m == 11)
    printf(" November ");
  else if (m == 12)
    printf(" December ");
}


x86 assembly (clang, -O0):
<whichMonth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1136 <whichMonth+0x26>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
jmp    1291 <whichMonth+0x181>
cmpl   $0x2,-0x4(%rbp)
jne    1151 <whichMonth+0x41>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
jmp    128c <whichMonth+0x17c>
cmpl   $0x3,-0x4(%rbp)
jne    116c <whichMonth+0x5c>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    1287 <whichMonth+0x177>
cmpl   $0x4,-0x4(%rbp)
jne    1187 <whichMonth+0x77>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
jmp    1282 <whichMonth+0x172>
cmpl   $0x5,-0x4(%rbp)
jne    11a2 <whichMonth+0x92>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
jmp    127d <whichMonth+0x16d>
cmpl   $0x6,-0x4(%rbp)
jne    11bd <whichMonth+0xad>
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
jmp    1278 <whichMonth+0x168>
cmpl   $0x7,-0x4(%rbp)
jne    11d8 <whichMonth+0xc8>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
jmp    1273 <whichMonth+0x163>
cmpl   $0x8,-0x4(%rbp)
jne    11f3 <whichMonth+0xe3>
lea    0xe50(%rip),%rdi
call   1030 <printf@plt>
jmp    126e <whichMonth+0x15e>
cmpl   $0x9,-0x4(%rbp)
jne    120e <whichMonth+0xfe>
lea    0xe3e(%rip),%rdi
call   1030 <printf@plt>
jmp    1269 <whichMonth+0x159>
cmpl   $0xa,-0x4(%rbp)
jne    1229 <whichMonth+0x119>
lea    0xe2f(%rip),%rdi
call   1030 <printf@plt>
jmp    1264 <whichMonth+0x154>
cmpl   $0xb,-0x4(%rbp)
jne    1244 <whichMonth+0x134>
lea    0xe1e(%rip),%rdi
call   1030 <printf@plt>
jmp    125f <whichMonth+0x14f>
cmpl   $0xc,-0x4(%rbp)
jne    125a <whichMonth+0x14a>
lea    0xe0e(%rip),%rdi
call   1030 <printf@plt>
jmp    125f <whichMonth+0x14f>
jmp    1264 <whichMonth+0x154>
jmp    1269 <whichMonth+0x159>
jmp    126e <whichMonth+0x15e>
jmp    1273 <whichMonth+0x163>
jmp    1278 <whichMonth+0x168>
jmp    127d <whichMonth+0x16d>
jmp    1282 <whichMonth+0x172>
jmp    1287 <whichMonth+0x177>
jmp    128c <whichMonth+0x17c>
jmp    1291 <whichMonth+0x181>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<whichMonth>:
add    $0xffffffff,%edi
cmp    $0xb,%edi
ja     112e <whichMonth+0x1e>
movslq %edi,%rax
lea    0xf4e(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [10 x i8] c" January \00"
@.str.1 = [11 x i8] c" February \00"
@.str.2 = [8 x i8] c" March \00"
@.str.3 = [8 x i8] c" April \00"
@.str.4 = [6 x i8] c" May \00"
@.str.5 = [7 x i8] c" June \00"
@.str.6 = [7 x i8] c" July \00"
@.str.7 = [9 x i8] c" August \00"
@.str.8 = [12 x i8] c" September \00"
@.str.9 = [10 x i8] c" October \00"
@.str.10 = [11 x i8] c" November \00"
@.str.11 = [11 x i8] c" December \00"
define void @whichMonth(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %73
7: ; preds = %1
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 2
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %72
12: ; preds = %7
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 3
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %71
17: ; preds = %12
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 4
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %70
22: ; preds = %17
%23 = load i32, i32* %2
%24 = icmp eq i32 %23, 5
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %69
27: ; preds = %22
%28 = load i32, i32* %2
%29 = icmp eq i32 %28, 6
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %68
32: ; preds = %27
%33 = load i32, i32* %2
%34 = icmp eq i32 %33, 7
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
br label %67
37: ; preds = %32
%38 = load i32, i32* %2
%39 = icmp eq i32 %38, 8
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
br label %66
42: ; preds = %37
%43 = load i32, i32* %2
%44 = icmp eq i32 %43, 9
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
br label %65
47: ; preds = %42
%48 = load i32, i32* %2
%49 = icmp eq i32 %48, 10
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
br label %64
52: ; preds = %47
%53 = load i32, i32* %2
%54 = icmp eq i32 %53, 11
br i1 %54, label %55, label %57
55: ; preds = %52
%56 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
br label %63
57: ; preds = %52
%58 = load i32, i32* %2
%59 = icmp eq i32 %58, 12
br i1 %59, label %60, label %62
60: ; preds = %57
%61 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
br label %62
62: ; preds = %60, %57
br label %63
63: ; preds = %62, %55
br label %64
64: ; preds = %63, %50
br label %65
65: ; preds = %64, %45
br label %66
66: ; preds = %65, %40
br label %67
67: ; preds = %66, %35
br label %68
68: ; preds = %67, %30
br label %69
69: ; preds = %68, %25
br label %70
70: ; preds = %69, %20
br label %71
71: ; preds = %70, %15
br label %72
72: ; preds = %71, %10
br label %73
73: ; preds = %72, %5
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c" January \00"
@.str.1 = [11 x i8] c" February \00"
@.str.2 = [8 x i8] c" March \00"
@.str.3 = [8 x i8] c" April \00"
@.str.4 = [6 x i8] c" May \00"
@.str.5 = [7 x i8] c" June \00"
@.str.6 = [7 x i8] c" July \00"
@.str.7 = [9 x i8] c" August \00"
@.str.8 = [12 x i8] c" September \00"
@.str.9 = [10 x i8] c" October \00"
@.str.10 = [11 x i8] c" November \00"
@.str.11 = [11 x i8] c" December \00"
@reltable.whichMonth = [12 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str to i64), i64 ptrtoint ([12 x i32]* @reltable.whichMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.1 to i64), i64 ptrtoint ([12 x i32]* @reltable.whichMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.2 to i64), i64 ptrtoint ([12 x i32]* @reltable.whichMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.3 to i64), i64 ptrtoint ([12 x i32]* @reltable.whichMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.4 to i64), i64 ptrtoint ([12 x i32]* @reltable.whichMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.5 to i64), i64 ptrtoint ([12 x i32]* @reltable.whichMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.6 to i64), i64 ptrtoint ([12 x i32]* @reltable.whichMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.7 to i64), i64 ptrtoint ([12 x i32]* @reltable.whichMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.8 to i64), i64 ptrtoint ([12 x i32]* @reltable.whichMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.9 to i64), i64 ptrtoint ([12 x i32]* @reltable.whichMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.10 to i64), i64 ptrtoint ([12 x i32]* @reltable.whichMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.11 to i64), i64 ptrtoint ([12 x i32]* @reltable.whichMonth to i64)) to i32)]
define void @whichMonth(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 12
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = shl i64 %5, 2
%7 = call i8* @llvm.load.relative.i64(i8* bitcast ([12 x i32]* @reltable.whichMonth to i8*), i64 %6)
%8 = tail call i32 @printf(i8* dereferenceable(1) %7)
br label %9
9: ; preds = %1, %4
ret void
}