#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 aindex(char const **, char const **, int);
int month(char const **str) {
  static char const *months[] = {"jan", "feb", "mar", "apr", "may",
                                 "jun", "jul", "aug", "sep", "oct",
                                 "nov", "dec", NULL};
  return aindex(months, str, 3);
}


x86 assembly (clang, -O0):
<month>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x2f09(%rip),%rdi
mov    $0x3,%edx
call   1030 <aindex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<month>:
mov    %rdi,%rsi
lea    0x2f16(%rip),%rdi
mov    $0x3,%edx
jmp    1030 <aindex@plt>

LLVM IR (-O0):
@month.months = internal global [13 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 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 ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i32 0, i32 0), i8* null]
@.str = [4 x i8] c"jan\00"
@.str.1 = [4 x i8] c"feb\00"
@.str.2 = [4 x i8] c"mar\00"
@.str.3 = [4 x i8] c"apr\00"
@.str.4 = [4 x i8] c"may\00"
@.str.5 = [4 x i8] c"jun\00"
@.str.6 = [4 x i8] c"jul\00"
@.str.7 = [4 x i8] c"aug\00"
@.str.8 = [4 x i8] c"sep\00"
@.str.9 = [4 x i8] c"oct\00"
@.str.10 = [4 x i8] c"nov\00"
@.str.11 = [4 x i8] c"dec\00"
define i32 @month(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i32 @aindex(i8** getelementptr inbounds ([13 x i8*], [13 x i8*]* @month.months, i64 0, i64 0), i8** %3, i32 3)
ret i32 %4
}

LLVM IR (-O2):
@month.months = internal global [13 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 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 ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i32 0, i32 0), i8* null]
@.str = [4 x i8] c"jan\00"
@.str.1 = [4 x i8] c"feb\00"
@.str.2 = [4 x i8] c"mar\00"
@.str.3 = [4 x i8] c"apr\00"
@.str.4 = [4 x i8] c"may\00"
@.str.5 = [4 x i8] c"jun\00"
@.str.6 = [4 x i8] c"jul\00"
@.str.7 = [4 x i8] c"aug\00"
@.str.8 = [4 x i8] c"sep\00"
@.str.9 = [4 x i8] c"oct\00"
@.str.10 = [4 x i8] c"nov\00"
@.str.11 = [4 x i8] c"dec\00"
define i32 @month(i8** %0) {
%2 = tail call i32 @aindex(i8** getelementptr inbounds ([13 x i8*], [13 x i8*]* @month.months, i64 0, i64 0), i8** %0, i32 3)
ret i32 %2
}