#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*/ strcpy(char *, char *);
void Clock_PrintMonth(int mon, char *buffer, int buffLen) {
  static char *MonthName[] = {"January",   "February", "March",    "April",
                              "May",       "June",     "July",     "August",
                              "September", "October",  "November", "December"};
  ;
  ;
  strcpy(buffer, MonthName[mon - 1]);
}


x86 assembly (clang, -O0):
<Clock_PrintMonth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2efa(%rip),%rax
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Clock_PrintMonth>:
mov    %rsi,%rax
movslq %edi,%rcx
lea    0xee3(%rip),%rdx
movslq -0x4(%rdx,%rcx,4),%rsi
add    %rdx,%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@Clock_PrintMonth.MonthName = internal global [12 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 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 = [8 x i8] c"January\00"
@.str.1 = [9 x i8] c"February\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"
define void @Clock_PrintMonth(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %4
%9 = sub nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [12 x i8*], [12 x i8*]* @Clock_PrintMonth.MonthName, i64 0, i64 %10
%12 = load i8*, i8** %11
%13 = call i32 @strcpy(i8* %7, i8* %12)
ret void
}

LLVM IR (-O2):
@reltable.Clock_PrintMonth = internal unnamed_addr constant [12 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str to i64), i64 ptrtoint ([12 x i32]* @reltable.Clock_PrintMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.1 to i64), i64 ptrtoint ([12 x i32]* @reltable.Clock_PrintMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.2 to i64), i64 ptrtoint ([12 x i32]* @reltable.Clock_PrintMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.3 to i64), i64 ptrtoint ([12 x i32]* @reltable.Clock_PrintMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.4 to i64), i64 ptrtoint ([12 x i32]* @reltable.Clock_PrintMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.5 to i64), i64 ptrtoint ([12 x i32]* @reltable.Clock_PrintMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.6 to i64), i64 ptrtoint ([12 x i32]* @reltable.Clock_PrintMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.7 to i64), i64 ptrtoint ([12 x i32]* @reltable.Clock_PrintMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.8 to i64), i64 ptrtoint ([12 x i32]* @reltable.Clock_PrintMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.9 to i64), i64 ptrtoint ([12 x i32]* @reltable.Clock_PrintMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.10 to i64), i64 ptrtoint ([12 x i32]* @reltable.Clock_PrintMonth to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.11 to i64), i64 ptrtoint ([12 x i32]* @reltable.Clock_PrintMonth to i64)) to i32)]
@.str = [8 x i8] c"January\00"
@.str.1 = [9 x i8] c"February\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"
define void @Clock_PrintMonth(i32 %0, i8* %1, i32 %2) {
%4 = add nsw i32 %0, -1
%5 = sext i32 %4 to i64
%6 = shl i64 %5, 2
%7 = call i8* @llvm.load.relative.i64(i8* bitcast ([12 x i32]* @reltable.Clock_PrintMonth to i8*), i64 %6)
%8 = tail call i32 @strcpy(i8* %1, i8* %7)
ret void
}