#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 *);
char *Mmofyr(int m, char *s) {
  char *p;
  if (m <= 0)
    if (s) {
      *s = '\0';
      return (s);
    } else
      return ("");
  m = (m - 1) % 12;
  switch (m) {
  case 0:
    p = "January";
    break;
  case 1:
    p = "February";
    break;
  case 2:
    p = "March";
    break;
  case 3:
    p = "April";
    break;
  case 4:
    p = "May";
    break;
  case 5:
    p = "June";
    break;
  case 6:
    p = "July";
    break;
  case 7:
    p = "August";
    break;
  case 8:
    p = "September";
    break;
  case 9:
    p = "October";
    break;
  case 10:
    p = "November";
    break;
  case 11:
    p = "December";
    break;
  default:
    p = "";
    break;
  }
  if (s) {
    strcpy(s, p);
    return (s);
  } else
    return (p);
}


x86 assembly (clang, -O0):
<Mmofyr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     1158 <Mmofyr+0x48>
cmpq   $0x0,-0x18(%rbp)
je     1148 <Mmofyr+0x38>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    12a9 <Mmofyr+0x199>
lea    0xf06(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12a9 <Mmofyr+0x199>
mov    -0xc(%rbp),%edx
mov    %edx,%ecx
add    $0xffffffff,%ecx
mov    %edx,%eax
movslq %ecx,%rcx
imul   $0x2aaaaaab,%rcx,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
shr    $0x21,%rdx
add    %ecx,%edx
shl    $0x2,%edx
mov    %edx,%ecx
lea    (%rcx,%rcx,2),%edx
neg    %edx
mov    %edx,%ecx
lea    -0x1(%rax,%rcx,1),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x28(%rbp)
sub    $0xb,%rax
ja     1271 <Mmofyr+0x161>
mov    -0x28(%rbp),%rax
lea    0xe58(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe78(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    127c <Mmofyr+0x16c>
lea    0xe70(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    127c <Mmofyr+0x16c>
lea    0xe69(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    127c <Mmofyr+0x16c>
lea    0xe5f(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    127c <Mmofyr+0x16c>
lea    0xe55(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    127c <Mmofyr+0x16c>
lea    0xe49(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    127c <Mmofyr+0x16c>
lea    0xe3e(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    127c <Mmofyr+0x16c>
lea    0xe33(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    127c <Mmofyr+0x16c>
lea    0xe2a(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    127c <Mmofyr+0x16c>
lea    0xe24(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    127c <Mmofyr+0x16c>
lea    0xe1c(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    127c <Mmofyr+0x16c>
lea    0xe15(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    127c <Mmofyr+0x16c>
lea    0xddd(%rip),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     12a1 <Mmofyr+0x191>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    12a9 <Mmofyr+0x199>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mmofyr>:
push   %rbx
mov    %rsi,%rbx
test   %edi,%edi
jle    114a <Mmofyr+0x3a>
add    $0xffffffff,%edi
mov    $0xaaaaaaab,%eax
imul   %rdi,%rax
shr    $0x23,%rax
shl    $0x2,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%edi
lea    0x2c89(%rip),%rax
mov    (%rax,%rdi,8),%rsi
test   %rbx,%rbx
je     1154 <Mmofyr+0x44>
mov    %rbx,%rdi
call   1030 <strcpy@plt>
jmp    1160 <Mmofyr+0x50>
test   %rbx,%rbx
je     1159 <Mmofyr+0x49>
movb   $0x0,(%rbx)
jmp    1160 <Mmofyr+0x50>
mov    %rsi,%rbx
jmp    1160 <Mmofyr+0x50>
lea    0xec5(%rip),%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [8 x i8] c"January\00"
@.str.2 = [9 x i8] c"February\00"
@.str.3 = [6 x i8] c"March\00"
@.str.4 = [6 x i8] c"April\00"
@.str.5 = [4 x i8] c"May\00"
@.str.6 = [5 x i8] c"June\00"
@.str.7 = [5 x i8] c"July\00"
@.str.8 = [7 x i8] c"August\00"
@.str.9 = [10 x i8] c"September\00"
@.str.10 = [8 x i8] c"October\00"
@.str.11 = [9 x i8] c"November\00"
@.str.12 = [9 x i8] c"December\00"
define i8* @Mmofyr(i32 %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%7 = load i32, i32* %4
%8 = icmp sle i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %2
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i8*, i8** %5
store i8 0, i8* %13
%14 = load i8*, i8** %5
store i8* %14, i8** %3
br label %44
15: ; preds = %9
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %3
br label %44
16: ; preds = %2
%17 = load i32, i32* %4
%18 = sub nsw i32 %17, 1
%19 = srem i32 %18, 12
store i32 %19, i32* %4
%20 = load i32, i32* %4
switch i32 %20, label %33 [
i32 0, label %21
i32 1, label %22
i32 2, label %23
i32 3, label %24
i32 4, label %25
i32 5, label %26
i32 6, label %27
i32 7, label %28
i32 8, label %29
i32 9, label %30
i32 10, label %31
i32 11, label %32
]
21: ; preds = %16
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %6
br label %34
22: ; preds = %16
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8** %6
br label %34
23: ; preds = %16
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %6
br label %34
24: ; preds = %16
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %6
br label %34
25: ; preds = %16
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8** %6
br label %34
26: ; preds = %16
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8** %6
br label %34
27: ; preds = %16
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8** %6
br label %34
28: ; preds = %16
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8** %6
br label %34
29: ; preds = %16
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8** %6
br label %34
30: ; preds = %16
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8** %6
br label %34
31: ; preds = %16
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8** %6
br label %34
32: ; preds = %16
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i8** %6
br label %34
33: ; preds = %16
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %6
br label %34
34: ; preds = %33, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21
%35 = load i8*, i8** %5
%36 = icmp ne i8* %35, null
br i1 %36, label %37, label %42
37: ; preds = %34
%38 = load i8*, i8** %5
%39 = load i8*, i8** %6
%40 = call i32 @strcpy(i8* %38, i8* %39)
%41 = load i8*, i8** %5
store i8* %41, i8** %3
br label %44
42: ; preds = %34
%43 = load i8*, i8** %6
store i8* %43, i8** %3
br label %44
44: ; preds = %42, %37, %15, %12
%45 = load i8*, i8** %3
ret i8* %45
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [8 x i8] c"January\00"
@.str.2 = [9 x i8] c"February\00"
@.str.3 = [6 x i8] c"March\00"
@.str.4 = [6 x i8] c"April\00"
@.str.5 = [4 x i8] c"May\00"
@.str.6 = [5 x i8] c"June\00"
@.str.7 = [5 x i8] c"July\00"
@.str.8 = [7 x i8] c"August\00"
@.str.9 = [10 x i8] c"September\00"
@.str.10 = [8 x i8] c"October\00"
@.str.11 = [9 x i8] c"November\00"
@.str.12 = [9 x i8] c"December\00"
@switch.table.Mmofyr = [12 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0)]
define i8* @Mmofyr(i32 %0, i8* %1) {
%3 = icmp slt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = icmp eq i8* %1, null
br i1 %5, label %16, label %6
6: ; preds = %4
store i8 0, i8* %1
br label %16
7: ; preds = %2
%8 = add nsw i32 %0, -1
%9 = urem i32 %8, 12
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds [12 x i8*], [12 x i8*]* @switch.table.Mmofyr, i64 0, i64 %10
%12 = load i8*, i8** %11
%13 = icmp eq i8* %1, null
br i1 %13, label %16, label %14
14: ; preds = %7
%15 = tail call i32 @strcpy(i8* %1, i8* %12)
br label %16
16: ; preds = %7, %4, %14, %6
%17 = phi i8* [ %1, %6 ], [ %1, %14 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %4 ], [ %12, %7 ]
ret i8* %17
}