#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 *);
main() {
  int m;
  char *month[12] = {"January",   "Febuary", "March",    "April",
                     "May",       "June",    "July",     "August",
                     "September", "October", "November", "December"};
  do {
    printf("1〜12の数字を入力してください: ");
    scanf("%d", &m);
  } while (m < 1 || m > 12);
  printf("%d月は英語で%sです。\n", m, month[m - 1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0x2c73(%rip),%rsi
mov    $0x60,%edx
call   1040 <memcpy@plt>
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf16(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    $0x1,%al
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0x71(%rbp)
jl     118e <main+0x5e>
cmpl   $0xc,-0x8(%rbp)
setg   %al
mov    %al,-0x71(%rbp)
mov    -0x71(%rbp),%al
test   $0x1,%al
jne    1157 <main+0x27>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x70(%rbp,%rax,8),%rdx
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xf25(%rip),%r14
lea    0xf4b(%rip),%r15
lea    0xc(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
lea    -0xd(%rsi),%eax
cmp    $0xfffffff4,%eax
jb     1140 <main+0x20>
lea    -0x1(%rsi),%eax
lea    0xf39(%rip),%rcx
movslq (%rcx,%rax,4),%rdx
add    %rcx,%rdx
lea    0xf0c(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c"January\00"
@.str.1 = [8 x i8] c"Febuary\00"
@.str.2 = [6 x i8] c"March\00"
@.str.3 = [6 x i8] c"April\00"
@.str.4 = [4 x i8] c"May\00"
@.str.5 = [5 x i8] c"June\00"
@.str.6 = [5 x i8] c"July\00"
@.str.7 = [7 x i8] c"August\00"
@.str.8 = [10 x i8] c"September\00"
@.str.9 = [8 x i8] c"October\00"
@.str.10 = [9 x i8] c"November\00"
@.str.11 = [9 x i8] c"December\00"
@__const.main.month = [12 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i32 0, i32 0)]
@.str.12 = [45 x i8] c"1\E3\80\9C12\E3\81\AE\E6\95\B0\E5\AD\97\E3\82\92\E5\85\A5\E5\8A\9B\E3\81\97\E3\81\A6\E3\81\8F\E3\81\A0\E3\81\95\E3\81\84: \00"
@.str.13 = [3 x i8] c"%d\00"
@.str.14 = [30 x i8] c"%d\E6\9C\88\E3\81\AF\E8\8B\B1\E8\AA\9E\E3\81\A7%s\E3\81\A7\E3\81\99\E3\80\82\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [12 x i8*]
store i32 0, i32* %1
%4 = bitcast [12 x i8*]* %3 to i8*
br label %5
5: ; preds = %14, %0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32* %2)
br label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 1
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 12
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ true, %8 ], [ %13, %11 ]
br i1 %15, label %5, label %16
16: ; preds = %14
%17 = load i32, i32* %2
%18 = load i32, i32* %2
%19 = sub nsw i32 %18, 1
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [12 x i8*], [12 x i8*]* %3, i64 0, i64 %20
%22 = load i8*, i8** %21
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.14, i64 0, i64 0), i32 %17, i8* %22)
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@.str = [8 x i8] c"January\00"
@.str.1 = [8 x i8] c"Febuary\00"
@.str.2 = [6 x i8] c"March\00"
@.str.3 = [6 x i8] c"April\00"
@.str.4 = [4 x i8] c"May\00"
@.str.5 = [5 x i8] c"June\00"
@.str.6 = [5 x i8] c"July\00"
@.str.7 = [7 x i8] c"August\00"
@.str.8 = [10 x i8] c"September\00"
@.str.9 = [8 x i8] c"October\00"
@.str.10 = [9 x i8] c"November\00"
@.str.11 = [9 x i8] c"December\00"
@reltable.main = [12 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.1 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.2 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.3 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.4 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.5 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.6 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.7 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.8 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.9 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.10 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.11 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32)]
@.str.12 = [45 x i8] c"1\E3\80\9C12\E3\81\AE\E6\95\B0\E5\AD\97\E3\82\92\E5\85\A5\E5\8A\9B\E3\81\97\E3\81\A6\E3\81\8F\E3\81\A0\E3\81\95\E3\81\84: \00"
@.str.13 = [3 x i8] c"%d\00"
@.str.14 = [30 x i8] c"%d\E6\9C\88\E3\81\AF\E8\8B\B1\E8\AA\9E\E3\81\A7%s\E3\81\A7\E3\81\99\E3\80\82\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add i32 %6, -13
%8 = icmp ult i32 %7, -12
br i1 %8, label %3, label %9
9: ; preds = %3
%10 = add nsw i32 %6, -1
%11 = zext i32 %10 to i64
%12 = shl i64 %11, 2
%13 = call i8* @llvm.load.relative.i64(i8* bitcast ([12 x i32]* @reltable.main to i8*), i64 %12)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.14, i64 0, i64 0), i32 %6, i8* %13)
ret i32 0
}