int getlday(m, d)
char *m, *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
mov    $0x0,%al
call   1040 <digitstring@plt>
cmp    $0x0,%eax
je     1175 <getlday+0x45>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1050 <atoi@plt>
mov    %eax,-0x28(%rbp)
jmp    117f <getlday+0x4f>
xor    %eax,%eax
mov    %eax,-0x28(%rbp)
jmp    117f <getlday+0x4f>
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    11d9 <getlday+0xa9>
mov    -0x10(%rbp),%rdi
mov    0x2f93(%rip),%rax
mov    (%rax),%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x29(%rbp)
je     11d9 <getlday+0xa9>
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
setne  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
test   $0x1,%al
jne    11e9 <getlday+0xb9>
jmp    120e <getlday+0xde>
jmp    11ee <getlday+0xbe>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    0x2f4a(%rip),%rax
add    $0x10,%rax
mov    %rax,0x2f3f(%rip)
jmp    119b <getlday+0x6b>
cmpl   $0xd,-0x1c(%rbp)
jge    128d <getlday+0x15d>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <digitstring@plt>
cmp    $0x0,%eax
je     123f <getlday+0x10f>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1050 <atoi@plt>
mov    %eax,-0x30(%rbp)
jmp    1249 <getlday+0x119>
xor    %eax,%eax
mov    %eax,-0x30(%rbp)
jmp    1249 <getlday+0x119>
mov    -0x30(%rbp),%eax
mov    %eax,-0x20(%rbp)
cmp    $0x0,%eax
je     128d <getlday+0x15d>
mov    -0x20(%rbp),%eax
mov    0x2ee6(%rip),%rcx
cmp    0x8(%rcx),%eax
jg     128d <getlday+0x15d>
mov    -0x20(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
movslq -0x1c(%rbp),%rdx
lea    0x2dbe(%rip),%rcx
add    (%rcx,%rdx,4),%eax
mov    %eax,-0x4(%rbp)
jmp    1294 <getlday+0x164>
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   %r12
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x2efb(%rip),%rax
mov    %rax,0x2fbc(%rip)
xor    %r15d,%r15d
xor    %eax,%eax
call   1040 <digitstring@plt>
test   %eax,%eax
je     1167 <getlday+0x37>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <atoi@plt>
mov    %eax,%r15d
andb   $0xdf,(%rbx)
mov    0x2f97(%rip),%rbp
mov    0x0(%rbp),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x1,%r12d
test   %eax,%eax
je     13af <getlday+0x27f>
cmp    $0x1,%r15d
je     13af <getlday+0x27f>
lea    0x10(%rbp),%rax
mov    %rax,0x2f68(%rip)
mov    0x10(%rbp),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x2,%r12d
test   %eax,%eax
je     13af <getlday+0x27f>
cmp    $0x2,%r15d
je     13af <getlday+0x27f>
lea    0x20(%rbp),%rax
mov    %rax,0x2f39(%rip)
mov    0x20(%rbp),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x3,%r12d
test   %eax,%eax
je     13af <getlday+0x27f>
cmp    $0x3,%r15d
je     13af <getlday+0x27f>
lea    0x30(%rbp),%rax
mov    %rax,0x2f0a(%rip)
mov    0x30(%rbp),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x4,%r12d
test   %eax,%eax
je     13af <getlday+0x27f>
cmp    $0x4,%r15d
je     13af <getlday+0x27f>
lea    0x40(%rbp),%rax
mov    %rax,0x2edb(%rip)
mov    0x40(%rbp),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x5,%r12d
test   %eax,%eax
je     13af <getlday+0x27f>
cmp    $0x5,%r15d
je     13af <getlday+0x27f>
lea    0x50(%rbp),%rax
mov    %rax,0x2eac(%rip)
mov    0x50(%rbp),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x6,%r12d
test   %eax,%eax
je     13af <getlday+0x27f>
cmp    $0x6,%r15d
je     13af <getlday+0x27f>
lea    0x60(%rbp),%rax
mov    %rax,0x2e7d(%rip)
mov    0x60(%rbp),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x7,%r12d
test   %eax,%eax
je     13af <getlday+0x27f>
cmp    $0x7,%r15d
je     13af <getlday+0x27f>
lea    0x70(%rbp),%rax
mov    %rax,0x2e4e(%rip)
mov    0x70(%rbp),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x8,%r12d
test   %eax,%eax
je     13af <getlday+0x27f>
cmp    $0x8,%r15d
je     13af <getlday+0x27f>
lea    0x80(%rbp),%rax
mov    %rax,0x2e1c(%rip)
mov    0x80(%rbp),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x9,%r12d
test   %eax,%eax
je     13af <getlday+0x27f>
cmp    $0x9,%r15d
je     13af <getlday+0x27f>
lea    0x90(%rbp),%rax
mov    %rax,0x2de7(%rip)
mov    0x90(%rbp),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0xa,%r12d
test   %eax,%eax
je     13af <getlday+0x27f>
cmp    $0xa,%r15d
je     13af <getlday+0x27f>
lea    0xa0(%rbp),%rax
mov    %rax,0x2dba(%rip)
mov    0xa0(%rbp),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0xb,%r12d
test   %eax,%eax
je     13af <getlday+0x27f>
cmp    $0xb,%r15d
je     13af <getlday+0x27f>
lea    0xb0(%rbp),%rax
mov    %rax,0x2d8d(%rip)
mov    0xb0(%rbp),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0xc,%r12d
test   %eax,%eax
je     13af <getlday+0x27f>
cmp    $0xc,%r15d
je     13af <getlday+0x27f>
add    $0xc0,%rbp
mov    %rbp,0x2d60(%rip)
mov    $0xffffffff,%ebx
jmp    13ed <getlday+0x2bd>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <digitstring@plt>
mov    $0xffffffff,%ebx
test   %eax,%eax
je     13ed <getlday+0x2bd>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <atoi@plt>
test   %eax,%eax
je     13ed <getlday+0x2bd>
mov    0x2d31(%rip),%rcx
cmp    0x8(%rcx),%eax
jg     13ed <getlday+0x2bd>
lea    0xc1d(%rip),%rcx
mov    (%rcx,%r12,4),%ecx
lea    (%rax,%rcx,1),%ebx
add    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r12
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 i32 (i8*, ...) bitcast (i32 (...)* @digitstring to i32 (i8*, ...)*)(i8* %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(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 i32 @strcmp(i8* %28, i8* %31)
%33 = icmp ne i32 %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 i32 (i8*, ...) bitcast (i32 (...)* @digitstring to i32 (i8*, ...)*)(i8* %50)
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %56
53: ; preds = %49
%54 = load i8*, i8** %5
%55 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(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 i32 (i8*, ...) bitcast (i32 (...)* @digitstring to i32 (i8*, ...)*)(i8* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(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 i32 @strcmp(i8* %0, i8* dereferenceable(1) %13)
%15 = icmp eq i32 %14, 0
%16 = icmp eq i32 %8, 1
%17 = select i1 %15, i1 true, i1 %16
br i1 %17, label %108, label %18
18: ; preds = %7
%19 = getelementptr inbounds %struct.date, %struct.date* %11, i64 1
store %struct.date* %19, %struct.date** @getlday.pc
%20 = getelementptr inbounds %struct.date, %struct.date* %19, i64 0, i32 0
%21 = load i8*, i8** %20
%22 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(1) %21)
%23 = icmp eq i32 %22, 0
%24 = icmp eq i32 %8, 2
%25 = select i1 %23, i1 true, i1 %24
br i1 %25, label %108, label %26
26: ; preds = %18
%27 = getelementptr inbounds %struct.date, %struct.date* %11, i64 2
store %struct.date* %27, %struct.date** @getlday.pc
%28 = getelementptr inbounds %struct.date, %struct.date* %27, i64 0, i32 0
%29 = load i8*, i8** %28
%30 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(1) %29)
%31 = icmp eq i32 %30, 0
%32 = icmp eq i32 %8, 3
%33 = select i1 %31, i1 true, i1 %32
br i1 %33, label %108, label %34
34: ; preds = %26
%35 = getelementptr inbounds %struct.date, %struct.date* %11, i64 3
store %struct.date* %35, %struct.date** @getlday.pc
%36 = getelementptr inbounds %struct.date, %struct.date* %35, i64 0, i32 0
%37 = load i8*, i8** %36
%38 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(1) %37)
%39 = icmp eq i32 %38, 0
%40 = icmp eq i32 %8, 4
%41 = select i1 %39, i1 true, i1 %40
br i1 %41, label %108, label %42
42: ; preds = %34
%43 = getelementptr inbounds %struct.date, %struct.date* %11, i64 4
store %struct.date* %43, %struct.date** @getlday.pc
%44 = getelementptr inbounds %struct.date, %struct.date* %43, i64 0, i32 0
%45 = load i8*, i8** %44
%46 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(1) %45)
%47 = icmp eq i32 %46, 0
%48 = icmp eq i32 %8, 5
%49 = select i1 %47, i1 true, i1 %48
br i1 %49, label %108, label %50
50: ; preds = %42
%51 = getelementptr inbounds %struct.date, %struct.date* %11, i64 5
store %struct.date* %51, %struct.date** @getlday.pc
%52 = getelementptr inbounds %struct.date, %struct.date* %51, i64 0, i32 0
%53 = load i8*, i8** %52
%54 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(1) %53)
%55 = icmp eq i32 %54, 0
%56 = icmp eq i32 %8, 6
%57 = select i1 %55, i1 true, i1 %56
br i1 %57, label %108, label %58
58: ; preds = %50
%59 = getelementptr inbounds %struct.date, %struct.date* %11, i64 6
store %struct.date* %59, %struct.date** @getlday.pc
%60 = getelementptr inbounds %struct.date, %struct.date* %59, i64 0, i32 0
%61 = load i8*, i8** %60
%62 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(1) %61)
%63 = icmp eq i32 %62, 0
%64 = icmp eq i32 %8, 7
%65 = select i1 %63, i1 true, i1 %64
br i1 %65, label %108, label %66
66: ; preds = %58
%67 = getelementptr inbounds %struct.date, %struct.date* %11, i64 7
store %struct.date* %67, %struct.date** @getlday.pc
%68 = getelementptr inbounds %struct.date, %struct.date* %67, i64 0, i32 0
%69 = load i8*, i8** %68
%70 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(1) %69)
%71 = icmp eq i32 %70, 0
%72 = icmp eq i32 %8, 8
%73 = select i1 %71, i1 true, i1 %72
br i1 %73, label %108, label %74
74: ; preds = %66
%75 = getelementptr inbounds %struct.date, %struct.date* %11, i64 8
store %struct.date* %75, %struct.date** @getlday.pc
%76 = getelementptr inbounds %struct.date, %struct.date* %75, i64 0, i32 0
%77 = load i8*, i8** %76
%78 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(1) %77)
%79 = icmp eq i32 %78, 0
%80 = icmp eq i32 %8, 9
%81 = select i1 %79, i1 true, i1 %80
br i1 %81, label %108, label %82
82: ; preds = %74
%83 = getelementptr inbounds %struct.date, %struct.date* %11, i64 9
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 i32 @strcmp(i8* %0, i8* dereferenceable(1) %85)
%87 = icmp eq i32 %86, 0
%88 = icmp eq i32 %8, 10
%89 = select i1 %87, i1 true, i1 %88
br i1 %89, label %108, label %90
90: ; preds = %82
%91 = getelementptr inbounds %struct.date, %struct.date* %11, i64 10
store %struct.date* %91, %struct.date** @getlday.pc
%92 = getelementptr inbounds %struct.date, %struct.date* %91, i64 0, i32 0
%93 = load i8*, i8** %92
%94 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(1) %93)
%95 = icmp eq i32 %94, 0
%96 = icmp eq i32 %8, 11
%97 = select i1 %95, i1 true, i1 %96
br i1 %97, label %108, label %98
98: ; preds = %90
%99 = getelementptr inbounds %struct.date, %struct.date* %11, i64 11
store %struct.date* %99, %struct.date** @getlday.pc
%100 = getelementptr inbounds %struct.date, %struct.date* %99, i64 0, i32 0
%101 = load i8*, i8** %100
%102 = tail call i32 @strcmp(i8* %0, i8* dereferenceable(1) %101)
%103 = icmp eq i32 %102, 0
%104 = icmp eq i32 %8, 12
%105 = select i1 %103, i1 true, i1 %104
br i1 %105, label %108, label %106
106: ; preds = %98
%107 = getelementptr inbounds %struct.date, %struct.date* %11, i64 12
store %struct.date* %107, %struct.date** @getlday.pc
br label %125
108: ; preds = %98, %90, %82, %74, %66, %58, %50, %42, %34, %26, %18, %7
%109 = phi i64 [ 1, %7 ], [ 2, %18 ], [ 3, %26 ], [ 4, %34 ], [ 5, %42 ], [ 6, %50 ], [ 7, %58 ], [ 8, %66 ], [ 9, %74 ], [ 10, %82 ], [ 11, %90 ], [ 12, %98 ]
%110 = tail call i32 (i8*, ...) bitcast (i32 (...)* @digitstring to i32 (i8*, ...)*)(i8* %1)
%111 = icmp eq i32 %110, 0
br i1 %111, label %125, label %112
112: ; preds = %108
%113 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %1)
%114 = icmp eq i32 %113, 0
br i1 %114, label %125, label %115
115: ; preds = %112
%116 = load %struct.date*, %struct.date** @getlday.pc
%117 = getelementptr inbounds %struct.date, %struct.date* %116, i64 0, i32 1
%118 = load i32, i32* %117
%119 = icmp sgt i32 %113, %118
br i1 %119, label %125, label %120
120: ; preds = %115
%121 = add nsw i32 %113, -1
%122 = getelementptr inbounds [13 x i32], [13 x i32]* @getlday.cumday, i64 0, i64 %109
%123 = load i32, i32* %122
%124 = add nsw i32 %121, %123
br label %125
125: ; preds = %106, %108, %112, %115, %120
%126 = phi i32 [ %124, %120 ], [ -1, %115 ], [ -1, %112 ], [ -1, %108 ], [ -1, %106 ]
ret i32 %126
}