#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 */
scalar_t__ strcmp(char *, char *);
int ExtractMonth(const char *RawDate) {
  int Temp;
  char RawMonth[4];
  RawMonth[0] = RawDate[4];
  RawMonth[1] = RawDate[5];
  RawMonth[2] = RawDate[6];
  RawMonth[3] = 0;
  if (strcmp(RawMonth, "Jan") == 0) {
    Temp = 1;
  };
  if (strcmp(RawMonth, "Feb") == 0) {
    Temp = 2;
  };
  if (strcmp(RawMonth, "Mar") == 0) {
    Temp = 3;
  };
  if (strcmp(RawMonth, "Apr") == 0) {
    Temp = 4;
  };
  if (strcmp(RawMonth, "May") == 0) {
    Temp = 5;
  };
  if (strcmp(RawMonth, "Jun") == 0) {
    Temp = 6;
  };
  if (strcmp(RawMonth, "Jul") == 0) {
    Temp = 7;
  };
  if (strcmp(RawMonth, "Aug") == 0) {
    Temp = 8;
  };
  if (strcmp(RawMonth, "Sep") == 0) {
    Temp = 9;
  };
  if (strcmp(RawMonth, "Oct") == 0) {
    Temp = 10;
  };
  if (strcmp(RawMonth, "Nov") == 0) {
    Temp = 11;
  };
  if (strcmp(RawMonth, "Dec") == 0) {
    Temp = 12;
  };
  return Temp;
}


x86 assembly (clang, -O0):
<ExtractMonth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%al
mov    %al,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x5(%rax),%al
mov    %al,-0xf(%rbp)
mov    -0x8(%rbp),%rax
mov    0x6(%rax),%al
mov    %al,-0xe(%rbp)
movb   $0x0,-0xd(%rbp)
lea    -0x10(%rbp),%rdi
lea    0xeb7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    115f <ExtractMonth+0x4f>
movl   $0x1,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    0xe9a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1180 <ExtractMonth+0x70>
movl   $0x2,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    0xe7d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11a1 <ExtractMonth+0x91>
movl   $0x3,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    0xe60(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11c2 <ExtractMonth+0xb2>
movl   $0x4,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    0xe43(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11e3 <ExtractMonth+0xd3>
movl   $0x5,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    0xe26(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1204 <ExtractMonth+0xf4>
movl   $0x6,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    0xe09(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1225 <ExtractMonth+0x115>
movl   $0x7,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    0xdec(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1246 <ExtractMonth+0x136>
movl   $0x8,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    0xdcf(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1267 <ExtractMonth+0x157>
movl   $0x9,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    0xdb2(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1288 <ExtractMonth+0x178>
movl   $0xa,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    0xd95(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    12a9 <ExtractMonth+0x199>
movl   $0xb,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    0xd78(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    12ca <ExtractMonth+0x1ba>
movl   $0xc,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExtractMonth>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0x4(%rdi),%al
mov    %al,0xc(%rsp)
mov    0x5(%rdi),%al
mov    %al,0xd(%rsp)
mov    0x6(%rdi),%al
mov    %al,0xe(%rsp)
movb   $0x0,0xf(%rsp)
lea    0xec7(%rip),%rsi
lea    0xc(%rsp),%r14
mov    %r14,%rdi
call   1030 <strcmp@plt>
lea    0xeb7(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
cmp    $0x1,%rax
mov    $0x1,%ebp
adc    $0x0,%ebp
lea    0xea0(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
mov    $0x3,%ebx
cmovne %ebp,%ebx
lea    0xe8a(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
mov    $0x4,%ebp
cmovne %ebx,%ebp
lea    0xe74(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
mov    $0x5,%ebx
cmovne %ebp,%ebx
lea    0xe5e(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
mov    $0x6,%ebp
cmovne %ebx,%ebp
lea    0xe48(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
mov    $0x7,%ebx
cmovne %ebp,%ebx
lea    0xe32(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
mov    $0x8,%ebp
cmovne %ebx,%ebp
lea    0xe1c(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
mov    $0x9,%ebx
cmovne %ebp,%ebx
lea    0xe06(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
mov    $0xa,%ebp
cmovne %ebx,%ebp
lea    0xdf0(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
mov    $0xb,%ebx
cmovne %ebp,%ebx
lea    0xdda(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
mov    $0xc,%eax
cmovne %ebx,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.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 @ExtractMonth(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [4 x i8]
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 4
%7 = load i8, i8* %6
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
store i8 %7, i8* %8
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 5
%11 = load i8, i8* %10
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 1
store i8 %11, i8* %12
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 6
%15 = load i8, i8* %14
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 2
store i8 %15, i8* %16
%17 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 3
store i8 0, i8* %17
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%19 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %1
store i32 1, i32* %3
br label %22
22: ; preds = %21, %1
%23 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %22
store i32 2, i32* %3
br label %27
27: ; preds = %26, %22
%28 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%29 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %27
store i32 3, i32* %3
br label %32
32: ; preds = %31, %27
%33 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%34 = call i64 @strcmp(i8* %33, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %32
store i32 4, i32* %3
br label %37
37: ; preds = %36, %32
%38 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %42
41: ; preds = %37
store i32 5, i32* %3
br label %42
42: ; preds = %41, %37
%43 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%44 = call i64 @strcmp(i8* %43, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %47
46: ; preds = %42
store i32 6, i32* %3
br label %47
47: ; preds = %46, %42
%48 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%49 = call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %52
51: ; preds = %47
store i32 7, i32* %3
br label %52
52: ; preds = %51, %47
%53 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%54 = call i64 @strcmp(i8* %53, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %57
56: ; preds = %52
store i32 8, i32* %3
br label %57
57: ; preds = %56, %52
%58 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%59 = call i64 @strcmp(i8* %58, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%60 = icmp eq i64 %59, 0
br i1 %60, label %61, label %62
61: ; preds = %57
store i32 9, i32* %3
br label %62
62: ; preds = %61, %57
%63 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%64 = call i64 @strcmp(i8* %63, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%65 = icmp eq i64 %64, 0
br i1 %65, label %66, label %67
66: ; preds = %62
store i32 10, i32* %3
br label %67
67: ; preds = %66, %62
%68 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%69 = call i64 @strcmp(i8* %68, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%70 = icmp eq i64 %69, 0
br i1 %70, label %71, label %72
71: ; preds = %67
store i32 11, i32* %3
br label %72
72: ; preds = %71, %67
%73 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%74 = call i64 @strcmp(i8* %73, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%75 = icmp eq i64 %74, 0
br i1 %75, label %76, label %77
76: ; preds = %72
store i32 12, i32* %3
br label %77
77: ; preds = %76, %72
%78 = load i32, i32* %3
ret i32 %78
}

LLVM IR (-O2):
@.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 @ExtractMonth(i8* nocapture %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = getelementptr inbounds i8, i8* %0, i64 4
%5 = load i8, i8* %4
store i8 %5, i8* %3
%6 = getelementptr inbounds i8, i8* %0, i64 5
%7 = load i8, i8* %6
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
store i8 %7, i8* %8
%9 = getelementptr inbounds i8, i8* %0, i64 6
%10 = load i8, i8* %9
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
store i8 %10, i8* %11
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 3
store i8 0, i8* %12
%13 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%14 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
%16 = select i1 %15, i32 2, i32 1
%17 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
%19 = select i1 %18, i32 3, i32 %16
%20 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
%22 = select i1 %21, i32 4, i32 %19
%23 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
%25 = select i1 %24, i32 5, i32 %22
%26 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
%28 = select i1 %27, i32 6, i32 %25
%29 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
%31 = select i1 %30, i32 7, i32 %28
%32 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
%34 = select i1 %33, i32 8, i32 %31
%35 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
%37 = select i1 %36, i32 9, i32 %34
%38 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
%40 = select i1 %39, i32 10, i32 %37
%41 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
%43 = select i1 %42, i32 11, i32 %40
%44 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
%46 = select i1 %45, i32 12, i32 %43
ret i32 %46
}