#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 atoi(char *);
scalar_t__ digitstring(char *);
scalar_t__ strcmp(char *, char *);
int getlday(char *m, char *d) {
  int i, day, im;
  static int cumday[] = {0,   0,   31,  60,  91,  121, 152,
                         182, 213, 244, 274, 305, 335};
  static struct date {
    char *mon;
    int dcnt;
  } * pc, kal[] = {
              {"Jan", 31}, {"Feb", 29}, {"Mar", 31}, {"Apr", 30},
              {"May", 31}, {"Jun", 30}, {"Jul", 31}, {"Aug", 31},
              {"Sep", 30}, {"Oct", 31}, {"Nov", 30}, {"Dec", 31},
          };
  pc = kal;
  im = (digitstring(m)) ? atoi(m) : 0;
  m[0] &= 0337;
  for (i = 1; i < 13 && strcmp(m, pc->mon) && im != i; i++, pc++)
    ;
  if (i < 13 && (day = (digitstring(d)) ? atoi(d) : 0) && day <= pc->dcnt) {
    if (!0)
      day--;
    return (day + cumday[i]);
  } else
    return (-1);
}


x86 assembly (clang, -O0):
<getlday>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    0x2f39(%rip),%rax
mov    %rax,0x2ffa(%rip)
mov    -0x10(%rbp),%rdi
call   1040 <digitstring@plt>
cmp    $0x0,%rax
je     1172 <getlday+0x42>
mov    -0x10(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x28(%rbp)
jmp    117c <getlday+0x4c>
xor    %eax,%eax
mov    %eax,-0x28(%rbp)
jmp    117c <getlday+0x4c>
mov    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
and    $0xdf,%ecx
mov    %cl,(%rax)
movl   $0x1,-0x1c(%rbp)
xor    %eax,%eax
cmpl   $0xd,-0x1c(%rbp)
mov    %al,-0x29(%rbp)
jge    11d8 <getlday+0xa8>
mov    -0x10(%rbp),%rdi
mov    0x2f96(%rip),%rax
mov    (%rax),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x29(%rbp)
je     11d8 <getlday+0xa8>
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
setne  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
test   $0x1,%al
jne    11e8 <getlday+0xb8>
jmp    120d <getlday+0xdd>
jmp    11ed <getlday+0xbd>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    0x2f4b(%rip),%rax
add    $0x10,%rax
mov    %rax,0x2f40(%rip)
jmp    1198 <getlday+0x68>
cmpl   $0xd,-0x1c(%rbp)
jge    1289 <getlday+0x159>
mov    -0x18(%rbp),%rdi
call   1040 <digitstring@plt>
cmp    $0x0,%rax
je     123b <getlday+0x10b>
mov    -0x18(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x30(%rbp)
jmp    1245 <getlday+0x115>
xor    %eax,%eax
mov    %eax,-0x30(%rbp)
jmp    1245 <getlday+0x115>
mov    -0x30(%rbp),%eax
mov    %eax,-0x20(%rbp)
cmp    $0x0,%eax
je     1289 <getlday+0x159>
mov    -0x20(%rbp),%eax
mov    0x2eea(%rip),%rcx
cmp    0x8(%rcx),%eax
jg     1289 <getlday+0x159>
mov    -0x20(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
movslq -0x1c(%rbp),%rdx
lea    0x2dc2(%rip),%rcx
add    (%rcx,%rdx,4),%eax
mov    %eax,-0x4(%rbp)
jmp    1290 <getlday+0x160>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getlday>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x2efc(%rip),%rax
mov    %rax,0x2fbd(%rip)
call   1040 <digitstring@plt>
test   %rax,%rax
je     1162 <getlday+0x32>
mov    %rbx,%rdi
call   1050 <atoi@plt>
mov    %eax,%r15d
jmp    1165 <getlday+0x35>
xor    %r15d,%r15d
andb   $0xdf,(%rbx)
mov    0x2f99(%rip),%rax
mov    (%rax),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x1,%ebp
test   %rax,%rax
je     13db <getlday+0x2ab>
cmp    $0x1,%r15d
je     13db <getlday+0x2ab>
mov    0x2f6f(%rip),%rax
lea    0x10(%rax),%rcx
mov    %rcx,0x2f64(%rip)
mov    0x10(%rax),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x2,%ebp
test   %rax,%rax
je     13db <getlday+0x2ab>
cmp    $0x2,%r15d
je     13db <getlday+0x2ab>
mov    0x2f39(%rip),%rax
lea    0x10(%rax),%rcx
mov    %rcx,0x2f2e(%rip)
mov    0x10(%rax),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x3,%ebp
test   %rax,%rax
je     13db <getlday+0x2ab>
cmp    $0x3,%r15d
je     13db <getlday+0x2ab>
mov    0x2f03(%rip),%rax
lea    0x10(%rax),%rcx
mov    %rcx,0x2ef8(%rip)
mov    0x10(%rax),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x4,%ebp
test   %rax,%rax
je     13db <getlday+0x2ab>
cmp    $0x4,%r15d
je     13db <getlday+0x2ab>
mov    0x2ecd(%rip),%rax
lea    0x10(%rax),%rcx
mov    %rcx,0x2ec2(%rip)
mov    0x10(%rax),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x5,%ebp
test   %rax,%rax
je     13db <getlday+0x2ab>
cmp    $0x5,%r15d
je     13db <getlday+0x2ab>
mov    0x2e97(%rip),%rax
lea    0x10(%rax),%rcx
mov    %rcx,0x2e8c(%rip)
mov    0x10(%rax),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x6,%ebp
test   %rax,%rax
je     13db <getlday+0x2ab>
cmp    $0x6,%r15d
je     13db <getlday+0x2ab>
mov    0x2e61(%rip),%rax
lea    0x10(%rax),%rcx
mov    %rcx,0x2e56(%rip)
mov    0x10(%rax),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x7,%ebp
test   %rax,%rax
je     13db <getlday+0x2ab>
cmp    $0x7,%r15d
je     13db <getlday+0x2ab>
mov    0x2e2b(%rip),%rax
lea    0x10(%rax),%rcx
mov    %rcx,0x2e20(%rip)
mov    0x10(%rax),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x8,%ebp
test   %rax,%rax
je     13db <getlday+0x2ab>
cmp    $0x8,%r15d
je     13db <getlday+0x2ab>
mov    0x2df5(%rip),%rax
lea    0x10(%rax),%rcx
mov    %rcx,0x2dea(%rip)
mov    0x10(%rax),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x9,%ebp
test   %rax,%rax
je     13db <getlday+0x2ab>
cmp    $0x9,%r15d
je     13db <getlday+0x2ab>
mov    0x2dbf(%rip),%rax
lea    0x10(%rax),%rcx
mov    %rcx,0x2db4(%rip)
mov    0x10(%rax),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0xa,%ebp
test   %rax,%rax
je     13db <getlday+0x2ab>
cmp    $0xa,%r15d
je     13db <getlday+0x2ab>
mov    0x2d91(%rip),%rax
lea    0x10(%rax),%rcx
mov    %rcx,0x2d86(%rip)
mov    0x10(%rax),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0xb,%ebp
test   %rax,%rax
je     13db <getlday+0x2ab>
cmp    $0xb,%r15d
je     13db <getlday+0x2ab>
mov    0x2d63(%rip),%rax
lea    0x10(%rax),%rcx
mov    %rcx,0x2d58(%rip)
mov    0x10(%rax),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0xc,%ebp
test   %rax,%rax
je     13db <getlday+0x2ab>
cmp    $0xc,%r15d
je     13db <getlday+0x2ab>
addq   $0x10,0x2d34(%rip)
10
mov    $0xffffffff,%ebx
jmp    1415 <getlday+0x2e5>
mov    %r14,%rdi
call   1040 <digitstring@plt>
mov    $0xffffffff,%ebx
test   %rax,%rax
je     1415 <getlday+0x2e5>
mov    %r14,%rdi
call   1050 <atoi@plt>
test   %eax,%eax
je     1415 <getlday+0x2e5>
mov    0x2d08(%rip),%rcx
cmp    0x8(%rcx),%eax
jg     1415 <getlday+0x2e5>
lea    0xbf4(%rip),%rcx
mov    (%rcx,%rbp,4),%ecx
lea    (%rax,%rcx,1),%ebx
add    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.date = type { i8*, i32 }
@getlday.cumday = internal global [13 x i32] [i32 0, i32 0, i32 31, i32 60, i32 91, i32 121, i32 152, i32 182, i32 213, i32 244, i32 274, i32 305, i32 335]
@getlday.pc = internal global %struct.date* null
@getlday.kal = internal global [12 x %struct.date] [%struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 31 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i32 29 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i32 31 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i32 30 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i32 0, i32 0), i32 31 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i32 30 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i32 31 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i32 0, i32 0), i32 31 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i32 0, i32 0), i32 30 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i32 0, i32 0), i32 31 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i32 30 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i32 0, i32 0), i32 31 }]
@.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 @getlday(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.date* getelementptr inbounds ([12 x %struct.date], [12 x %struct.date]* @getlday.kal, i64 0, i64 0), %struct.date** @getlday.pc
%9 = load i8*, i8** %4
%10 = call i64 @digitstring(i8* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = call i32 @atoi(i8* %13)
br label %16
15: ; preds = %2
br label %16
16: ; preds = %15, %12
%17 = phi i32 [ %14, %12 ], [ 0, %15 ]
store i32 %17, i32* %8
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 0
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = and i32 %21, 223
%23 = trunc i32 %22 to i8
store i8 %23, i8* %19
store i32 1, i32* %6
br label %24
24: ; preds = %41, %16
%25 = load i32, i32* %6
%26 = icmp slt i32 %25, 13
br i1 %26, label %27, label %38
27: ; preds = %24
%28 = load i8*, i8** %4
%29 = load %struct.date*, %struct.date** @getlday.pc
%30 = getelementptr inbounds %struct.date, %struct.date* %29, i32 0, i32 0
%31 = load i8*, i8** %30
%32 = call i64 @strcmp(i8* %28, i8* %31)
%33 = icmp ne i64 %32, 0
br i1 %33, label %34, label %38
34: ; preds = %27
%35 = load i32, i32* %8
%36 = load i32, i32* %6
%37 = icmp ne i32 %35, %36
br label %38
38: ; preds = %34, %27, %24
%39 = phi i1 [ false, %27 ], [ false, %24 ], [ %37, %34 ]
br i1 %39, label %40, label %46
40: ; preds = %38
br label %41
41: ; preds = %40
%42 = load i32, i32* %6
%43 = add nsw i32 %42, 1
store i32 %43, i32* %6
%44 = load %struct.date*, %struct.date** @getlday.pc
%45 = getelementptr inbounds %struct.date, %struct.date* %44, i32 1
store %struct.date* %45, %struct.date** @getlday.pc
br label %24
46: ; preds = %38
%47 = load i32, i32* %6
%48 = icmp slt i32 %47, 13
br i1 %48, label %49, label %75
49: ; preds = %46
%50 = load i8*, i8** %5
%51 = call i64 @digitstring(i8* %50)
%52 = icmp ne i64 %51, 0
br i1 %52, label %53, label %56
53: ; preds = %49
%54 = load i8*, i8** %5
%55 = call i32 @atoi(i8* %54)
br label %57
56: ; preds = %49
br label %57
57: ; preds = %56, %53
%58 = phi i32 [ %55, %53 ], [ 0, %56 ]
store i32 %58, i32* %7
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %75
60: ; preds = %57
%61 = load i32, i32* %7
%62 = load %struct.date*, %struct.date** @getlday.pc
%63 = getelementptr inbounds %struct.date, %struct.date* %62, i32 0, i32 1
%64 = load i32, i32* %63
%65 = icmp sle i32 %61, %64
br i1 %65, label %66, label %75
66: ; preds = %60
%67 = load i32, i32* %7
%68 = add nsw i32 %67, -1
store i32 %68, i32* %7
%69 = load i32, i32* %7
%70 = load i32, i32* %6
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [13 x i32], [13 x i32]* @getlday.cumday, i64 0, i64 %71
%73 = load i32, i32* %72
%74 = add nsw i32 %69, %73
store i32 %74, i32* %3
br label %76
75: ; preds = %60, %57, %46
store i32 -1, i32* %3
br label %76
76: ; preds = %75, %66
%77 = load i32, i32* %3
ret i32 %77
}

LLVM IR (-O2):
%struct.date = type { i8*, i32 }
@getlday.cumday = internal unnamed_addr constant [13 x i32] [i32 0, i32 0, i32 31, i32 60, i32 91, i32 121, i32 152, i32 182, i32 213, i32 244, i32 274, i32 305, i32 335]
@getlday.pc = internal unnamed_addr global %struct.date* null
@getlday.kal = internal global [12 x %struct.date] [%struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 31 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i32 29 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i32 31 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i32 30 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i32 0, i32 0), i32 31 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i32 30 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i32 31 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i32 0, i32 0), i32 31 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i32 0, i32 0), i32 30 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i32 0, i32 0), i32 31 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i32 30 }, %struct.date { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i32 0, i32 0), i32 31 }]
@.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 @getlday(i8* %0, i8* %1) {
store %struct.date* getelementptr inbounds ([12 x %struct.date], [12 x %struct.date]* @getlday.kal, i64 0, i64 0), %struct.date** @getlday.pc
%3 = tail call i64 @digitstring(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @atoi(i8* %0)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ 0, %2 ]
%9 = load i8, i8* %0
%10 = and i8 %9, -33
store i8 %10, i8* %0
%11 = load %struct.date*, %struct.date** @getlday.pc
%12 = getelementptr inbounds %struct.date, %struct.date* %11, i64 0, i32 0
%13 = load i8*, i8** %12
%14 = tail call i64 @strcmp(i8* %0, i8* %13)
%15 = icmp eq i64 %14, 0
%16 = icmp eq i32 %8, 1
%17 = select i1 %15, i1 true, i1 %16
br i1 %17, label %120, label %18
18: ; preds = %7
%19 = load %struct.date*, %struct.date** @getlday.pc
%20 = getelementptr inbounds %struct.date, %struct.date* %19, i64 1
store %struct.date* %20, %struct.date** @getlday.pc
%21 = getelementptr inbounds %struct.date, %struct.date* %20, i64 0, i32 0
%22 = load i8*, i8** %21
%23 = tail call i64 @strcmp(i8* %0, i8* %22)
%24 = icmp eq i64 %23, 0
%25 = icmp eq i32 %8, 2
%26 = select i1 %24, i1 true, i1 %25
br i1 %26, label %120, label %27
27: ; preds = %18
%28 = load %struct.date*, %struct.date** @getlday.pc
%29 = getelementptr inbounds %struct.date, %struct.date* %28, i64 1
store %struct.date* %29, %struct.date** @getlday.pc
%30 = getelementptr inbounds %struct.date, %struct.date* %29, i64 0, i32 0
%31 = load i8*, i8** %30
%32 = tail call i64 @strcmp(i8* %0, i8* %31)
%33 = icmp eq i64 %32, 0
%34 = icmp eq i32 %8, 3
%35 = select i1 %33, i1 true, i1 %34
br i1 %35, label %120, label %36
36: ; preds = %27
%37 = load %struct.date*, %struct.date** @getlday.pc
%38 = getelementptr inbounds %struct.date, %struct.date* %37, i64 1
store %struct.date* %38, %struct.date** @getlday.pc
%39 = getelementptr inbounds %struct.date, %struct.date* %38, i64 0, i32 0
%40 = load i8*, i8** %39
%41 = tail call i64 @strcmp(i8* %0, i8* %40)
%42 = icmp eq i64 %41, 0
%43 = icmp eq i32 %8, 4
%44 = select i1 %42, i1 true, i1 %43
br i1 %44, label %120, label %45
45: ; preds = %36
%46 = load %struct.date*, %struct.date** @getlday.pc
%47 = getelementptr inbounds %struct.date, %struct.date* %46, i64 1
store %struct.date* %47, %struct.date** @getlday.pc
%48 = getelementptr inbounds %struct.date, %struct.date* %47, i64 0, i32 0
%49 = load i8*, i8** %48
%50 = tail call i64 @strcmp(i8* %0, i8* %49)
%51 = icmp eq i64 %50, 0
%52 = icmp eq i32 %8, 5
%53 = select i1 %51, i1 true, i1 %52
br i1 %53, label %120, label %54
54: ; preds = %45
%55 = load %struct.date*, %struct.date** @getlday.pc
%56 = getelementptr inbounds %struct.date, %struct.date* %55, i64 1
store %struct.date* %56, %struct.date** @getlday.pc
%57 = getelementptr inbounds %struct.date, %struct.date* %56, i64 0, i32 0
%58 = load i8*, i8** %57
%59 = tail call i64 @strcmp(i8* %0, i8* %58)
%60 = icmp eq i64 %59, 0
%61 = icmp eq i32 %8, 6
%62 = select i1 %60, i1 true, i1 %61
br i1 %62, label %120, label %63
63: ; preds = %54
%64 = load %struct.date*, %struct.date** @getlday.pc
%65 = getelementptr inbounds %struct.date, %struct.date* %64, i64 1
store %struct.date* %65, %struct.date** @getlday.pc
%66 = getelementptr inbounds %struct.date, %struct.date* %65, i64 0, i32 0
%67 = load i8*, i8** %66
%68 = tail call i64 @strcmp(i8* %0, i8* %67)
%69 = icmp eq i64 %68, 0
%70 = icmp eq i32 %8, 7
%71 = select i1 %69, i1 true, i1 %70
br i1 %71, label %120, label %72
72: ; preds = %63
%73 = load %struct.date*, %struct.date** @getlday.pc
%74 = getelementptr inbounds %struct.date, %struct.date* %73, i64 1
store %struct.date* %74, %struct.date** @getlday.pc
%75 = getelementptr inbounds %struct.date, %struct.date* %74, i64 0, i32 0
%76 = load i8*, i8** %75
%77 = tail call i64 @strcmp(i8* %0, i8* %76)
%78 = icmp eq i64 %77, 0
%79 = icmp eq i32 %8, 8
%80 = select i1 %78, i1 true, i1 %79
br i1 %80, label %120, label %81
81: ; preds = %72
%82 = load %struct.date*, %struct.date** @getlday.pc
%83 = getelementptr inbounds %struct.date, %struct.date* %82, i64 1
store %struct.date* %83, %struct.date** @getlday.pc
%84 = getelementptr inbounds %struct.date, %struct.date* %83, i64 0, i32 0
%85 = load i8*, i8** %84
%86 = tail call i64 @strcmp(i8* %0, i8* %85)
%87 = icmp eq i64 %86, 0
%88 = icmp eq i32 %8, 9
%89 = select i1 %87, i1 true, i1 %88
br i1 %89, label %120, label %90
90: ; preds = %81
%91 = load %struct.date*, %struct.date** @getlday.pc
%92 = getelementptr inbounds %struct.date, %struct.date* %91, i64 1
store %struct.date* %92, %struct.date** @getlday.pc
%93 = getelementptr inbounds %struct.date, %struct.date* %92, i64 0, i32 0
%94 = load i8*, i8** %93
%95 = tail call i64 @strcmp(i8* %0, i8* %94)
%96 = icmp eq i64 %95, 0
%97 = icmp eq i32 %8, 10
%98 = select i1 %96, i1 true, i1 %97
br i1 %98, label %120, label %99
99: ; preds = %90
%100 = load %struct.date*, %struct.date** @getlday.pc
%101 = getelementptr inbounds %struct.date, %struct.date* %100, i64 1
store %struct.date* %101, %struct.date** @getlday.pc
%102 = getelementptr inbounds %struct.date, %struct.date* %101, i64 0, i32 0
%103 = load i8*, i8** %102
%104 = tail call i64 @strcmp(i8* %0, i8* %103)
%105 = icmp eq i64 %104, 0
%106 = icmp eq i32 %8, 11
%107 = select i1 %105, i1 true, i1 %106
br i1 %107, label %120, label %108
108: ; preds = %99
%109 = load %struct.date*, %struct.date** @getlday.pc
%110 = getelementptr inbounds %struct.date, %struct.date* %109, i64 1
store %struct.date* %110, %struct.date** @getlday.pc
%111 = getelementptr inbounds %struct.date, %struct.date* %110, i64 0, i32 0
%112 = load i8*, i8** %111
%113 = tail call i64 @strcmp(i8* %0, i8* %112)
%114 = icmp eq i64 %113, 0
%115 = icmp eq i32 %8, 12
%116 = select i1 %114, i1 true, i1 %115
br i1 %116, label %120, label %117
117: ; preds = %108
%118 = load %struct.date*, %struct.date** @getlday.pc
%119 = getelementptr inbounds %struct.date, %struct.date* %118, i64 1
store %struct.date* %119, %struct.date** @getlday.pc
br label %137
120: ; preds = %108, %99, %90, %81, %72, %63, %54, %45, %36, %27, %18, %7
%121 = phi i64 [ 1, %7 ], [ 2, %18 ], [ 3, %27 ], [ 4, %36 ], [ 5, %45 ], [ 6, %54 ], [ 7, %63 ], [ 8, %72 ], [ 9, %81 ], [ 10, %90 ], [ 11, %99 ], [ 12, %108 ]
%122 = tail call i64 @digitstring(i8* %1)
%123 = icmp eq i64 %122, 0
br i1 %123, label %137, label %124
124: ; preds = %120
%125 = tail call i32 @atoi(i8* %1)
%126 = icmp eq i32 %125, 0
br i1 %126, label %137, label %127
127: ; preds = %124
%128 = load %struct.date*, %struct.date** @getlday.pc
%129 = getelementptr inbounds %struct.date, %struct.date* %128, i64 0, i32 1
%130 = load i32, i32* %129
%131 = icmp sgt i32 %125, %130
br i1 %131, label %137, label %132
132: ; preds = %127
%133 = add nsw i32 %125, -1
%134 = getelementptr inbounds [13 x i32], [13 x i32]* @getlday.cumday, i64 0, i64 %121
%135 = load i32, i32* %134
%136 = add nsw i32 %133, %135
br label %137
137: ; preds = %117, %120, %124, %127, %132
%138 = phi i32 [ %136, %132 ], [ -1, %127 ], [ -1, %124 ], [ -1, %120 ], [ -1, %117 ]
ret i32 %138
}