#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 */
struct tm {
  int tm_mon;
  int tm_mday;
  int tm_hour;
  int tm_min;
  int tm_sec;
};

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, ...);
int /*<<< orphan*/ strcpy(char *, char *);
void syslogdate(char *sdate, struct tm *cdate) {
  char Month[4];
  char Date[3];
  char Hour[3];
  char Min[3];
  char Sec[3];
  if (!sdate || !cdate)
    return;
  switch (cdate->tm_mon) {
  case 0:
    strcpy(Month, "Jan");
    break;
  case 1:
    strcpy(Month, "Feb");
    break;
  case 2:
    strcpy(Month, "Mar");
    break;
  case 3:
    strcpy(Month, "Apr");
    break;
  case 4:
    strcpy(Month, "May");
    break;
  case 5:
    strcpy(Month, "Jun");
    break;
  case 6:
    strcpy(Month, "Jul");
    break;
  case 7:
    strcpy(Month, "Aug");
    break;
  case 8:
    strcpy(Month, "Sep");
    break;
  case 9:
    strcpy(Month, "Oct");
    break;
  case 10:
    strcpy(Month, "Nov");
    break;
  default:
    strcpy(Month, "Dec");
    break;
  }
  if (cdate->tm_mday < 10) {
    snprintf(Date, 3, " %d", cdate->tm_mday);
  } else {
    snprintf(Date, 3, "%d", cdate->tm_mday);
  }
  if (cdate->tm_hour < 10) {
    snprintf(Hour, 3, "0%d", cdate->tm_hour);
  } else {
    snprintf(Hour, 3, "%d", cdate->tm_hour);
  }
  if (cdate->tm_min < 10) {
    snprintf(Min, 3, "0%d", cdate->tm_min);
  } else {
    snprintf(Min, 3, "%d", cdate->tm_min);
  }
  if (cdate->tm_sec < 10) {
    snprintf(Sec, 3, "0%d", cdate->tm_sec);
  } else {
    snprintf(Sec, 3, "%d", cdate->tm_sec);
  }
  snprintf(sdate, 16, "%s %s %s:%s:%s", Month, Date, Hour, Min, Sec);
}


x86 assembly (clang, -O0):
<syslogdate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1146 <syslogdate+0x26>
cmpq   $0x0,-0x10(%rbp)
jne    114b <syslogdate+0x2b>
jmp    13da <syslogdate+0x2ba>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %rax,-0x28(%rbp)
sub    $0xa,%rax
ja     125a <syslogdate+0x13a>
mov    -0x28(%rbp),%rax
lea    0xe96(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0x14(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1030 <strcpy@plt>
jmp    126a <syslogdate+0x14a>
lea    -0x14(%rbp),%rdi
lea    0xe9d(%rip),%rsi
call   1030 <strcpy@plt>
jmp    126a <syslogdate+0x14a>
lea    -0x14(%rbp),%rdi
lea    0xe8c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    126a <syslogdate+0x14a>
lea    -0x14(%rbp),%rdi
lea    0xe7b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    126a <syslogdate+0x14a>
lea    -0x14(%rbp),%rdi
lea    0xe6a(%rip),%rsi
call   1030 <strcpy@plt>
jmp    126a <syslogdate+0x14a>
lea    -0x14(%rbp),%rdi
lea    0xe59(%rip),%rsi
call   1030 <strcpy@plt>
jmp    126a <syslogdate+0x14a>
lea    -0x14(%rbp),%rdi
lea    0xe48(%rip),%rsi
call   1030 <strcpy@plt>
jmp    126a <syslogdate+0x14a>
lea    -0x14(%rbp),%rdi
lea    0xe37(%rip),%rsi
call   1030 <strcpy@plt>
jmp    126a <syslogdate+0x14a>
lea    -0x14(%rbp),%rdi
lea    0xe26(%rip),%rsi
call   1030 <strcpy@plt>
jmp    126a <syslogdate+0x14a>
lea    -0x14(%rbp),%rdi
lea    0xe15(%rip),%rsi
call   1030 <strcpy@plt>
jmp    126a <syslogdate+0x14a>
lea    -0x14(%rbp),%rdi
lea    0xe04(%rip),%rsi
call   1030 <strcpy@plt>
jmp    126a <syslogdate+0x14a>
lea    -0x14(%rbp),%rdi
lea    0xdf3(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
cmpl   $0xa,0x4(%rax)
jge    129b <syslogdate+0x17b>
lea    -0x17(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    $0x3,%esi
lea    0xdcd(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
jmp    12b9 <syslogdate+0x199>
lea    -0x17(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    $0x3,%esi
lea    0xdab(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
mov    -0x10(%rbp),%rax
cmpl   $0xa,0x8(%rax)
jge    12ea <syslogdate+0x1ca>
lea    -0x1a(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    $0x3,%esi
lea    0xd82(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
jmp    1308 <syslogdate+0x1e8>
lea    -0x1a(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    $0x3,%esi
lea    0xd5c(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
mov    -0x10(%rbp),%rax
cmpl   $0xa,0xc(%rax)
jge    1339 <syslogdate+0x219>
lea    -0x1d(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
mov    $0x3,%esi
lea    0xd33(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
jmp    1357 <syslogdate+0x237>
lea    -0x1d(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
mov    $0x3,%esi
lea    0xd0d(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
mov    -0x10(%rbp),%rax
cmpl   $0xa,0x10(%rax)
jge    1388 <syslogdate+0x268>
lea    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%ecx
mov    $0x3,%esi
lea    0xce4(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
jmp    13a6 <syslogdate+0x286>
lea    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%ecx
mov    $0x3,%esi
lea    0xcbe(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x14(%rbp),%rcx
lea    -0x17(%rbp),%r8
lea    -0x1a(%rbp),%r9
lea    -0x1d(%rbp),%r10
lea    -0x20(%rbp),%rax
mov    $0x10,%esi
lea    0xc9a(%rip),%rdx
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1040 <snprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syslogdate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
test   %rdi,%rdi
je     1232 <syslogdate+0x112>
mov    %rsi,%r13
test   %rsi,%rsi
je     1232 <syslogdate+0x112>
mov    %rdi,%r14
movslq 0x0(%r13),%rax
cmp    $0xa,%rax
ja     1160 <syslogdate+0x40>
lea    0xef1(%rip),%rcx
movslq (%rcx,%rax,4),%rsi
add    %rcx,%rsi
jmp    1167 <syslogdate+0x47>
lea    0xec5(%rip),%rsi
lea    0xb(%rsp),%rdi
call   1030 <strcpy@plt>
mov    0x4(%r13),%ecx
cmp    $0xa,%ecx
lea    0xeb1(%rip),%rdx
lea    0xeab(%rip),%rbx
cmovge %rbx,%rdx
lea    0x8(%rsp),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <snprintf@plt>
mov    0x8(%r13),%ecx
cmp    $0xa,%ecx
lea    0xe8b(%rip),%rbp
mov    %rbx,%rdx
cmovl  %rbp,%rdx
lea    0x15(%rsp),%r12
mov    %r12,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <snprintf@plt>
mov    0xc(%r13),%ecx
cmp    $0xa,%ecx
mov    %rbx,%rdx
cmovl  %rbp,%rdx
lea    0x12(%rsp),%r15
mov    %r15,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <snprintf@plt>
mov    0x10(%r13),%ecx
cmp    $0xa,%ecx
cmovl  %rbp,%rbx
lea    0xf(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x3,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <snprintf@plt>
lea    0xe29(%rip),%rdx
mov    %r14,%rdi
mov    $0x10,%esi
lea    0xb(%rsp),%rcx
lea    0x8(%rsp),%r8
mov    %r12,%r9
xor    %eax,%eax
push   %rbp
push   %r15
call   1040 <snprintf@plt>
add    $0x10,%rsp
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32, i32, i32 }
@.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"
@.str.12 = [4 x i8] c" %d\00"
@.str.13 = [3 x i8] c"%d\00"
@.str.14 = [4 x i8] c"0%d\00"
@.str.15 = [15 x i8] c"%s %s %s:%s:%s\00"
define void @syslogdate(i8* %0, %struct.tm* %1) {
%3 = alloca i8*
%4 = alloca %struct.tm*
%5 = alloca [4 x i8]
%6 = alloca [3 x i8]
%7 = alloca [3 x i8]
%8 = alloca [3 x i8]
%9 = alloca [3 x i8]
store i8* %0, i8** %3
store %struct.tm* %1, %struct.tm** %4
%10 = load i8*, i8** %3
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load %struct.tm*, %struct.tm** %4
%14 = icmp ne %struct.tm* %13, null
br i1 %14, label %16, label %15
15: ; preds = %12, %2
br label %132
16: ; preds = %12
%17 = load %struct.tm*, %struct.tm** %4
%18 = getelementptr inbounds %struct.tm, %struct.tm* %17, i32 0, i32 0
%19 = load i32, i32* %18
switch i32 %19, label %53 [
i32 0, label %20
i32 1, label %23
i32 2, label %26
i32 3, label %29
i32 4, label %32
i32 5, label %35
i32 6, label %38
i32 7, label %41
i32 8, label %44
i32 9, label %47
i32 10, label %50
]
20: ; preds = %16
%21 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%22 = call i32 @strcpy(i8* %21, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %56
23: ; preds = %16
%24 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%25 = call i32 @strcpy(i8* %24, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %56
26: ; preds = %16
%27 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%28 = call i32 @strcpy(i8* %27, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %56
29: ; preds = %16
%30 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%31 = call i32 @strcpy(i8* %30, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %56
32: ; preds = %16
%33 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%34 = call i32 @strcpy(i8* %33, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
br label %56
35: ; preds = %16
%36 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%37 = call i32 @strcpy(i8* %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
br label %56
38: ; preds = %16
%39 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%40 = call i32 @strcpy(i8* %39, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %56
41: ; preds = %16
%42 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%43 = call i32 @strcpy(i8* %42, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %56
44: ; preds = %16
%45 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%46 = call i32 @strcpy(i8* %45, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
br label %56
47: ; preds = %16
%48 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%49 = call i32 @strcpy(i8* %48, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
br label %56
50: ; preds = %16
%51 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%52 = call i32 @strcpy(i8* %51, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
br label %56
53: ; preds = %16
%54 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%55 = call i32 @strcpy(i8* %54, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
br label %56
56: ; preds = %53, %50, %47, %44, %41, %38, %35, %32, %29, %26, %23, %20
%57 = load %struct.tm*, %struct.tm** %4
%58 = getelementptr inbounds %struct.tm, %struct.tm* %57, i32 0, i32 1
%59 = load i32, i32* %58
%60 = icmp slt i32 %59, 10
br i1 %60, label %61, label %67
61: ; preds = %56
%62 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%63 = load %struct.tm*, %struct.tm** %4
%64 = getelementptr inbounds %struct.tm, %struct.tm* %63, i32 0, i32 1
%65 = load i32, i32* %64
%66 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %62, i32 3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i32 %65)
br label %73
67: ; preds = %56
%68 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%69 = load %struct.tm*, %struct.tm** %4
%70 = getelementptr inbounds %struct.tm, %struct.tm* %69, i32 0, i32 1
%71 = load i32, i32* %70
%72 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %68, i32 3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32 %71)
br label %73
73: ; preds = %67, %61
%74 = load %struct.tm*, %struct.tm** %4
%75 = getelementptr inbounds %struct.tm, %struct.tm* %74, i32 0, i32 2
%76 = load i32, i32* %75
%77 = icmp slt i32 %76, 10
br i1 %77, label %78, label %84
78: ; preds = %73
%79 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%80 = load %struct.tm*, %struct.tm** %4
%81 = getelementptr inbounds %struct.tm, %struct.tm* %80, i32 0, i32 2
%82 = load i32, i32* %81
%83 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %79, i32 3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %82)
br label %90
84: ; preds = %73
%85 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%86 = load %struct.tm*, %struct.tm** %4
%87 = getelementptr inbounds %struct.tm, %struct.tm* %86, i32 0, i32 2
%88 = load i32, i32* %87
%89 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %85, i32 3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32 %88)
br label %90
90: ; preds = %84, %78
%91 = load %struct.tm*, %struct.tm** %4
%92 = getelementptr inbounds %struct.tm, %struct.tm* %91, i32 0, i32 3
%93 = load i32, i32* %92
%94 = icmp slt i32 %93, 10
br i1 %94, label %95, label %101
95: ; preds = %90
%96 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
%97 = load %struct.tm*, %struct.tm** %4
%98 = getelementptr inbounds %struct.tm, %struct.tm* %97, i32 0, i32 3
%99 = load i32, i32* %98
%100 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %96, i32 3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %99)
br label %107
101: ; preds = %90
%102 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
%103 = load %struct.tm*, %struct.tm** %4
%104 = getelementptr inbounds %struct.tm, %struct.tm* %103, i32 0, i32 3
%105 = load i32, i32* %104
%106 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %102, i32 3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32 %105)
br label %107
107: ; preds = %101, %95
%108 = load %struct.tm*, %struct.tm** %4
%109 = getelementptr inbounds %struct.tm, %struct.tm* %108, i32 0, i32 4
%110 = load i32, i32* %109
%111 = icmp slt i32 %110, 10
br i1 %111, label %112, label %118
112: ; preds = %107
%113 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 0
%114 = load %struct.tm*, %struct.tm** %4
%115 = getelementptr inbounds %struct.tm, %struct.tm* %114, i32 0, i32 4
%116 = load i32, i32* %115
%117 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %113, i32 3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %116)
br label %124
118: ; preds = %107
%119 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 0
%120 = load %struct.tm*, %struct.tm** %4
%121 = getelementptr inbounds %struct.tm, %struct.tm* %120, i32 0, i32 4
%122 = load i32, i32* %121
%123 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %119, i32 3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32 %122)
br label %124
124: ; preds = %118, %112
%125 = load i8*, i8** %3
%126 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%127 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%128 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%129 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
%130 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 0
%131 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %125, i32 16, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), i8* %126, i8* %127, i8* %128, i8* %129, i8* %130)
br label %132
132: ; preds = %124, %15
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32, i32, i32 }
@.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"
@.str.12 = [4 x i8] c" %d\00"
@.str.13 = [3 x i8] c"%d\00"
@.str.14 = [4 x i8] c"0%d\00"
@.str.15 = [15 x i8] c"%s %s %s:%s:%s\00"
@reltable.syslogdate = [11 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str to i64), i64 ptrtoint ([11 x i32]* @reltable.syslogdate to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.1 to i64), i64 ptrtoint ([11 x i32]* @reltable.syslogdate to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.2 to i64), i64 ptrtoint ([11 x i32]* @reltable.syslogdate to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.3 to i64), i64 ptrtoint ([11 x i32]* @reltable.syslogdate to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.4 to i64), i64 ptrtoint ([11 x i32]* @reltable.syslogdate to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.5 to i64), i64 ptrtoint ([11 x i32]* @reltable.syslogdate to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.6 to i64), i64 ptrtoint ([11 x i32]* @reltable.syslogdate to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.7 to i64), i64 ptrtoint ([11 x i32]* @reltable.syslogdate to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.8 to i64), i64 ptrtoint ([11 x i32]* @reltable.syslogdate to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.9 to i64), i64 ptrtoint ([11 x i32]* @reltable.syslogdate to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.10 to i64), i64 ptrtoint ([11 x i32]* @reltable.syslogdate to i64)) to i32)]
define void @syslogdate(i8* %0, %struct.tm* %1) {
%3 = alloca [4 x i8]
%4 = alloca [3 x i8]
%5 = alloca [3 x i8]
%6 = alloca [3 x i8]
%7 = alloca [3 x i8]
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%11 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%12 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%13 = icmp ne i8* %0, null
%14 = icmp ne %struct.tm* %1, null
%15 = and i1 %13, %14
br i1 %15, label %16, label %48
16: ; preds = %2
%17 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 0
%18 = load i32, i32* %17
%19 = icmp ult i32 %18, 11
br i1 %19, label %20, label %24
20: ; preds = %16
%21 = sext i32 %18 to i64
%22 = shl i64 %21, 2
%23 = call i8* @llvm.load.relative.i64(i8* bitcast ([11 x i32]* @reltable.syslogdate to i8*), i64 %22)
br label %24
24: ; preds = %16, %20
%25 = phi i8* [ %23, %20 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), %16 ]
%26 = call i32 @strcpy(i8* %8, i8* %25)
%27 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 1
%28 = load i32, i32* %27
%29 = icmp slt i32 %28, 10
%30 = select i1 %29, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0)
%31 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %9, i32 3, i8* %30, i32 %28)
%32 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 2
%33 = load i32, i32* %32
%34 = icmp slt i32 %33, 10
%35 = select i1 %34, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0)
%36 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %10, i32 3, i8* %35, i32 %33)
%37 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 3
%38 = load i32, i32* %37
%39 = icmp slt i32 %38, 10
%40 = select i1 %39, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0)
%41 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %11, i32 3, i8* %40, i32 %38)
%42 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 4
%43 = load i32, i32* %42
%44 = icmp slt i32 %43, 10
%45 = select i1 %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0)
%46 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %12, i32 3, i8* %45, i32 %43)
%47 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %0, i32 16, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), i8* %8, i8* %9, i8* %10, i8* %11, i8* %12)
br label %48
48: ; preds = %2, %24
ret void
}